@ranger-testing/ranger-cli 2.5.4-alpha.ed286f1-2 → 2.5.4-alpha.f940f0d-18

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 (82) hide show
  1. package/README.md +36 -14
  2. package/build/cli.js +1 -1
  3. package/build/commands/addEnv.js +1 -1
  4. package/build/commands/authEncrypt.js +1 -1
  5. package/build/commands/clean.js +1 -1
  6. package/build/commands/config.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -0
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -0
  43. package/build/commands/utils/cloudProfileSession.js +1 -0
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -0
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -0
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -0
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/opencodeConfig.js +1 -1
  58. package/build/commands/utils/playwrightCli.js +1 -1
  59. package/build/commands/utils/profileMessages.js +1 -1
  60. package/build/commands/utils/profileSetupBanner.js +1 -1
  61. package/build/commands/utils/projectsConfig.js +1 -0
  62. package/build/commands/utils/rangerConfig.js +1 -1
  63. package/build/commands/utils/rangerRoot.js +1 -1
  64. package/build/commands/utils/resolveProfileContext.js +1 -0
  65. package/build/commands/utils/resolveProfileUrl.js +1 -0
  66. package/build/commands/utils/retry.js +1 -1
  67. package/build/commands/utils/sessionCache.js +1 -1
  68. package/build/commands/utils/settings.js +1 -1
  69. package/build/commands/utils/skillContent.js +1 -1
  70. package/build/commands/utils/skills.js +1 -1
  71. package/build/commands/utils/stitchWebmFiles.js +1 -1
  72. package/build/commands/utils/telemetry.js +1 -1
  73. package/build/commands/utils/tokenRefresh.js +1 -1
  74. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  75. package/build/commands/utils/userApi.js +1 -1
  76. package/build/commands/utils/version.js +1 -1
  77. package/build/commands/verifyFeature.js +1 -1
  78. package/build/commands/verifyFeatureCli.js +1 -1
  79. package/build/skills/ranger/SKILL.md +36 -6
  80. package/build/skills/ranger/create.md +19 -0
  81. package/build/skills/ranger/verify.md +46 -7
  82. package/package.json +3 -2
@@ -1 +1 @@
1
- (function(_0x4e9239,_0x4cf29c){const _0x33b067=_0x2fa1,_0x76bdd0=_0x4e9239();while(!![]){try{const _0x187464=-parseInt(_0x33b067(0x130))/0x1+-parseInt(_0x33b067(0x11b))/0x2+-parseInt(_0x33b067(0xff))/0x3+parseInt(_0x33b067(0x127))/0x4*(-parseInt(_0x33b067(0x15c))/0x5)+-parseInt(_0x33b067(0x118))/0x6*(parseInt(_0x33b067(0x122))/0x7)+parseInt(_0x33b067(0xf2))/0x8+-parseInt(_0x33b067(0x147))/0x9*(-parseInt(_0x33b067(0xf6))/0xa);if(_0x187464===_0x4cf29c)break;else _0x76bdd0['push'](_0x76bdd0['shift']());}catch(_0x506fd2){_0x76bdd0['push'](_0x76bdd0['shift']());}}}(_0x16a0,0xd1d5d));import{mkdir,writeFile,readFile,unlink,rm,mkdtemp,rename}from'fs/promises';import{join}from'path';import _0x38b58a from'inquirer';import{chromium}from'playwright';import{findExistingEnv,loadSettings}from'./utils/settings.js';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';function _0x16a0(){const _0x2a681a=['xGZXf','rdElX','trim','cdpEndpoint','4412592deoPmh','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','rIVZP','290akzwSQ','\x22\x20configured','NrClp','message','Continue\x20anyway','dfGDE','env','lkEvM','\x20\x20\x20Creating\x20it\x20in\x20','2559351csQVgi','list','Removed\x20existing\x20profile\x20at\x20','test','orYcB','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','isTTY','slice','prompt','skipAuth','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','location','HEAD','WcPlu','length','Missing\x20API\x20token;\x20aborting\x20CI\x20profile\x20creation.','dLjBU','frqmY','baseUrl','status','abort','OMoQg','Aborted.','wZrsT','247362OAjyYZ','indexOf','manual','907180VJiZhQ','isProtocolError','\x20\x20Did\x20you\x20mean\x20','\x20--safe-mode\x20\x20\x20\x20(disables\x20browser\x20features\x20that\x20can\x20cause\x20crashes)','.tmp-','continue','\x20\x20ranger\x20profile\x20add\x20','161CpwMpW','force','Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','KKsWJ','What\x20would\x20you\x20like\x20to\x20do?','31732jYCvki','user','use_suggestion','goto','\x20--skip-auth\x20\x20\x20\x20(skip\x20browser\x20auth\x20entirely)\x0a','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','jUqXD','trackPhaseEnd','RLlLK','536447HbhNXi','\x20\x20Make\x20sure\x20your\x20Electron\x20app\x20(or\x20browser)\x20is\x20running\x20with\x20remote\x20debugging\x20enabled.\x0a','iMAfd','path','safeMode','now','isElectron','ARfpj','ULPWn','setupHeader','\x20would\x20shadow\x20the\x20existing\x20profile.','trackPhaseStart','assign','DWEHY','.backup-','NODE_TLS_REJECT_UNAUTHORIZED','HTTP\x20','local','error','\x22\x20already\x20exists.\x20Overwrite?','confirm','Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20at\x20','url_setup','1345914yLzABd','about:blank','\x22\x20already\x20exists\x20in\x20','settings.json','allowInsecureLocalhost','newPage','url','lYWhv','log','\x0a📋\x20Authentication\x20Setup','sjqYr','xWdug','http://localhost:3000','\x20(continuing\x20with\x20--force)','CAixW','Invalid\x20URL','liANx','XWKFH','oEhPc','\x20\x20Ranger\x20will\x20open\x20it\x20in\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20and\x20save\x20your\x20session.\x0a','\x20\x20\x20A\x20browser\x20will\x20open.\x20Please\x20log\x20in\x20to\x20the\x20profile\x20you\x20want\x20to\x20test\x20so\x20Ranger\x20can\x20access\x20it.','780divfvS','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','oWUAL','sHmTG','✓\x20Created\x20settings:\x20','cQxsE','stdout','scope','catch','setupHeaders'];_0x16a0=function(){return _0x2a681a;};return _0x16a0();}import{writeActiveProfileName}from'./utils/activeProfile.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';function _0x2fa1(_0x58e639,_0x2f4a0b){_0x58e639=_0x58e639-0xef;const _0x16a023=_0x16a0();let _0x2fa17b=_0x16a023[_0x58e639];return _0x2fa17b;}async function checkUrlReachability(_0x540c50){const _0x1b26da=_0x2fa1,_0x416e67={'mungJ':_0x1b26da(0x11a),'xWdug':function(_0x5062f0,_0x361b6b){return _0x5062f0===_0x361b6b;},'DWEHY':'TypeError'};try{const _0x342cfa=new AbortController(),_0x86f699=setTimeout(()=>_0x342cfa[_0x1b26da(0x114)](),0x1388),_0x31797f={'method':_0x1b26da(0x10c),'signal':_0x342cfa['signal'],'redirect':_0x416e67['mungJ']};/^https:\/\/localhost(:\d+)?/i[_0x1b26da(0x102)](_0x540c50)&&(process['env'][_0x1b26da(0x13f)]='0');const _0x41b384=await fetch(_0x540c50,_0x31797f);delete process[_0x1b26da(0xfc)][_0x1b26da(0x13f)],clearTimeout(_0x86f699);if(_0x41b384[_0x1b26da(0x113)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0x1b26da(0x140)+_0x41b384['status']};}catch(_0x3c8797){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x517ad7=_0x3c8797,_0xff03d7=_0x517ad7[_0x1b26da(0xf9)]||String(_0x3c8797),_0x5a2ed0=_0xff03d7['includes'](_0x1b26da(0x156))||_0x416e67[_0x1b26da(0x152)](_0x517ad7['name'],_0x416e67[_0x1b26da(0x13d)])||_0xff03d7['includes']('fetch\x20failed');return{'ok':![],'error':_0xff03d7,'isProtocolError':_0x5a2ed0};}}export async function addEnv(_0x2cfb9f,_0x347bbe={},_0x22c8fb){const _0x3d7900=_0x2fa1,_0x3cce62={'DusDu':'close','uvVgn':_0x3d7900(0x141),'WRohr':function(_0x439f25,_0x41862a){return _0x439f25===_0x41862a;},'sjqYr':_0x3d7900(0x128),'oEhPc':function(_0x1d6479){return _0x1d6479();},'rFKQq':function(_0x1fd4cd){return _0x1fd4cd();},'oWUAL':function(_0x4d2107,_0xdc25e3,_0x38eb50,_0x48d3e7){return _0x4d2107(_0xdc25e3,_0x38eb50,_0x48d3e7);},'ARfpj':function(_0xa47a5,_0x464fb){return _0xa47a5===_0x464fb;},'lYWhv':function(_0x523b6f,_0x56f8eb,_0x4ee515){return _0x523b6f(_0x56f8eb,_0x4ee515);},'heIFu':function(_0x76776f,_0x1552fb){return _0x76776f===_0x1552fb;},'lkEvM':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','FPyqE':'--ci\x20and\x20--cdp-endpoint\x20cannot\x20be\x20used\x20together.\x20Electron/CDP\x20profiles\x20only\x20work\x20with\x20a\x20locally\x20running\x20app\x20and\x20are\x20not\x20supported\x20in\x20CI.','sHmTG':function(_0x4f9e19,_0x56ab61){return _0x4f9e19(_0x56ab61);},'OMoQg':_0x3d7900(0x124),'dLjBU':function(_0x4a1a06,_0x29df31){return _0x4a1a06===_0x29df31;},'aupFL':_0x3d7900(0x116),'iMAfd':'legacy','cQxsE':'root\x20(.ranger/)','rsrjA':_0x3d7900(0x131),'RLlLK':'\x0a🌐\x20Profile\x20Setup\x0a','ULPWn':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','xGZXf':'baseUrl','UmljP':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','lBalc':_0x3d7900(0x12c),'orYcB':function(_0x3b06af,_0xc48ff7){return _0x3b06af||_0xc48ff7;},'dfGDE':_0x3d7900(0x153),'AeXtp':function(_0x90703e,_0x1ede1f){return _0x90703e(_0x1ede1f);},'KKsWJ':'action','WcPlu':_0x3d7900(0x126),'QyCUn':_0x3d7900(0xfa),'AttbV':function(_0x4731ca,_0x69e8c9){return _0x4731ca===_0x69e8c9;},'IJOrN':function(_0x51b752,_0x251ae4){return _0x51b752===_0x251ae4;},'rIVZP':function(_0x46f93a,_0x4bad72){return _0x46f93a(_0x4bad72);},'QUphZ':function(_0x4a0a60,_0x3a64c3,_0x393ac1){return _0x4a0a60(_0x3a64c3,_0x393ac1);},'wZrsT':'auth.json','TjkBS':_0x3d7900(0x150),'XWKFH':'\x20\x20\x20When\x20done\x20logging\x20in,\x20close\x20the\x20browser\x20to\x20save\x20the\x20session.','gWPnp':'\x0a\x20\x20\x20⚠\x20This\x20step\x20requires\x20human\x20interaction\x20in\x20a\x20browser.','frqmY':'\x20\x20\x20If\x20you\x20are\x20an\x20agent,\x20background\x20this\x20process\x20and\x20let\x20your\x20user\x20know\x20they\x20need\x20to\x20complete\x20browser\x20authentication.\x0a','lkBcQ':'--disable-features=WebBluetooth','jUqXD':'--allow-insecure-localhost','kWnpK':_0x3d7900(0x10a),'rdElX':'Browser\x20closed\x20before\x20authentication\x20was\x20saved.','liANx':function(_0x3e2796){return _0x3e2796();},'HMQER':_0x3d7900(0x10f),'CAixW':'.enc','NrClp':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','RQBgW':_0x3d7900(0xf3),'ATQrL':'config_write','aKJHF':function(_0x4ff822,_0x31c6fa){return _0x4ff822>_0x31c6fa;},'PcYfa':_0x3d7900(0x14a),'EhyGZ':function(_0x267934,_0xe5c4d1,_0x4264f4){return _0x267934(_0xe5c4d1,_0x4264f4);},'gEbLa':function(_0x2baa9c,_0x965f8d,_0x5f532f){return _0x2baa9c(_0x965f8d,_0x5f532f);}},_0x2ec69a=_0x347bbe['ci']??![],_0x3a4098=_0x2ec69a?'ci':_0x3cce62['uvVgn'],_0x4f71d9=_0x3cce62['WRohr'](_0x347bbe[_0x3d7900(0x163)],_0x3cce62[_0x3d7900(0x151)])?_0x3cce62[_0x3d7900(0x159)](getRangerHomeDir):_0x3cce62['rFKQq'](getRangerDir),_0x465d20=_0x3cce62[_0x3d7900(0x15e)](join,_0x4f71d9,_0x3a4098,_0x2cfb9f),_0x5f6c7e={};if(_0x347bbe['setupHeader'])for(const _0x20a6f8 of _0x347bbe[_0x3d7900(0x139)]){const _0x2097ef=_0x20a6f8[_0x3d7900(0x119)](':');if(_0x3cce62[_0x3d7900(0x137)](_0x2097ef,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x20a6f8+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x1797b8=_0x20a6f8[_0x3d7900(0x106)](0x0,_0x2097ef)[_0x3d7900(0xf0)](),_0x4b4e0e=_0x20a6f8[_0x3d7900(0x106)](_0x2097ef+0x1)['trim']();_0x5f6c7e[_0x1797b8]=_0x4b4e0e;}const _0x2f5850=_0x3cce62['lYWhv'](join,_0x4f71d9,_0x3a4098);if(_0x347bbe['cdpEndpoint']!==undefined&&_0x3cce62['heIFu'](_0x347bbe['cdpEndpoint'][_0x3d7900(0xf0)](),''))throw new Error(_0x3cce62[_0x3d7900(0xfd)]);if(_0x347bbe['cdpEndpoint']&&_0x347bbe['url'])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');if(_0x347bbe[_0x3d7900(0xf1)]&&_0x347bbe['ci'])throw new Error(_0x3cce62['FPyqE']);const _0xb7c884=_0x3cce62[_0x3d7900(0x15f)](Boolean,_0x347bbe['cdpEndpoint']),_0x295542=!_0x347bbe[_0x3d7900(0x108)]&&!_0xb7c884,_0xc6bf21=process['stdin'][_0x3d7900(0x105)]&&process[_0x3d7900(0x162)][_0x3d7900(0x105)];if(!_0xc6bf21&&!_0x347bbe['url']&&!_0xb7c884)throw new Error(_0x3cce62[_0x3d7900(0x115)]);const _0x224318=_0x3cce62['lYWhv'](findExistingEnv,_0x2cfb9f,{'rangerDir':_0x4f71d9});let _0x27f686=null;if(_0x224318){if(!_0xc6bf21)_0x27f686=_0x224318;else{if(_0x3cce62[_0x3d7900(0x110)](_0x224318[_0x3d7900(0x10b)],_0x3a4098)){const {overwrite:_0x1a1fe0}=await _0x38b58a[_0x3d7900(0x107)]([{'type':'confirm','name':'overwrite','message':'Profile\x20\x22'+_0x2cfb9f+_0x3d7900(0x143),'default':![]}]);if(!_0x1a1fe0){console[_0x3d7900(0x14f)](_0x3cce62['aupFL']);return;}_0x27f686=_0x224318;}else{const _0x564cfe=_0x224318['location']===_0x3cce62[_0x3d7900(0x132)]?_0x3cce62[_0x3d7900(0x161)]:_0x224318[_0x3d7900(0x10b)];console['error']('\x0a⚠️\x20\x20Profile\x20\x22'+_0x2cfb9f+_0x3d7900(0x149)+_0x564cfe+':\x20'+_0x224318['path']),console['error'](_0x3d7900(0xfe)+_0x3a4098+_0x3d7900(0x13a));const {shouldReplace:_0x414f76}=await _0x38b58a[_0x3d7900(0x107)]([{'type':_0x3d7900(0x144),'name':'shouldReplace','message':'Delete\x20existing\x20and\x20create\x20new\x20in\x20'+_0x3a4098+'?','default':![]}]);if(!_0x414f76){console['log'](_0x3cce62['aupFL']);return;}_0x27f686=_0x224318;}}}_0x22c8fb?.['trackPhaseStart'](_0x3d7900(0x146));let _0x2451af='';if(_0xb7c884)console['log'](_0x3d7900(0x109)),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x347bbe['cdpEndpoint']),console['log'](_0x3cce62['rsrjA']);else{if(_0x347bbe[_0x3d7900(0x14d)]){_0x2451af=_0x347bbe[_0x3d7900(0x14d)];const _0x4b85c2=await checkUrlReachability(_0x2451af);if(!_0x4b85c2['ok']&&!_0x347bbe[_0x3d7900(0x123)])throw new Error('Could\x20not\x20reach\x20'+_0x2451af+':\x20'+_0x4b85c2['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x4b85c2['ok']&&_0x347bbe['force']&&console[_0x3d7900(0x14f)]('⚠\x20Could\x20not\x20reach\x20'+_0x2451af+':\x20'+_0x4b85c2['error']+_0x3d7900(0x154));}else{console['log'](_0x3cce62[_0x3d7900(0x12f)]),console['log'](_0x3cce62[_0x3d7900(0x138)]),console['log'](_0x3d7900(0x15a));let _0x48170f=![];while(!![]){const _0x25bc45=await _0x38b58a['prompt']([{'type':'input','name':_0x3cce62[_0x3d7900(0x166)],'message':_0x48170f?_0x3cce62['UmljP']:_0x3cce62['lBalc'],'default':_0x3cce62[_0x3d7900(0x103)](_0x2451af,_0x3cce62[_0x3d7900(0xfb)])}]);_0x2451af=_0x25bc45[_0x3d7900(0x112)];const _0xbe61c8=await _0x3cce62['AeXtp'](checkUrlReachability,_0x2451af);if(_0xbe61c8['ok'])break;const _0x2c22cf=/^[a-zA-Z][\w+.-]*:\/\//[_0x3d7900(0x102)](_0x2451af),_0x1046e1=_0xbe61c8[_0x3d7900(0x11c)]&&!_0x2c22cf,_0x51cd2d=_0x1046e1?'http://'+_0x2451af:null;_0x48170f=!![],console[_0x3d7900(0x14f)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x2451af+':\x20'+_0xbe61c8['error']);_0x51cd2d&&console['log'](_0x3d7900(0x11d)+_0x51cd2d+'?');const {action:_0x595f24}=await _0x38b58a['prompt']([{'type':_0x3d7900(0x100),'name':_0x3cce62[_0x3d7900(0x125)],'message':_0x3cce62[_0x3d7900(0x10d)],'choices':[..._0x51cd2d?[{'name':'Use\x20'+_0x51cd2d,'value':'use_suggestion'}]:[],{'name':'Enter\x20a\x20different\x20URL','value':'retry'},{'name':_0x3cce62['QyCUn'],'value':_0x3d7900(0x120)}]}]);if(_0x3cce62['AttbV'](_0x595f24,_0x3d7900(0x129))&&_0x51cd2d){_0x2451af=_0x51cd2d;const _0x430384=await _0x3cce62[_0x3d7900(0x15f)](checkUrlReachability,_0x2451af);if(_0x430384['ok'])break;console[_0x3d7900(0x14f)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x2451af+':\x20'+_0x430384[_0x3d7900(0x142)]);}else{if(_0x3cce62['IJOrN'](_0x595f24,_0x3d7900(0x120)))break;}}}}_0x22c8fb?.['trackPhaseEnd']('url_setup');const _0x56c7e9={};if(_0x27f686){const _0x1fde9d=await _0x3cce62[_0x3d7900(0xf5)](loadSettings,_0x2cfb9f);Object['assign'](_0x56c7e9,_0x1fde9d[_0x3d7900(0x165)]);}Object[_0x3d7900(0x13c)](_0x56c7e9,_0x5f6c7e),await _0x3cce62['QUphZ'](mkdir,_0x2f5850,{'recursive':!![]});const _0x82a38f=await mkdtemp(_0x3cce62['lYWhv'](join,_0x2f5850,_0x3d7900(0x11f)+_0x2cfb9f+'-')),_0x47224f=join(_0x82a38f,_0x3cce62[_0x3d7900(0x117)]),_0x869981=_0x3cce62['AeXtp'](Boolean,_0x2451af)&&/^https:\/\/localhost(:\d+)?/i['test'](_0x2451af);try{if(_0x295542){_0x22c8fb?.['trackPhaseStart']('browser_auth'),console[_0x3d7900(0x14f)](_0x3cce62['TjkBS']),console[_0x3d7900(0x14f)](_0x3d7900(0x15b)),console['log'](_0x3cce62[_0x3d7900(0x158)]);!_0xc6bf21?(console[_0x3d7900(0x14f)](_0x3cce62['gWPnp']),console['log'](_0x3cce62[_0x3d7900(0x111)])):console['log']('');await new Promise(_0x233e0d=>setTimeout(_0x233e0d,0xbb8));const _0x44cc9d=[];_0x347bbe['safeMode']&&_0x44cc9d['push'](_0x3cce62['lkBcQ']);const _0x4a2d99=_0x347bbe['allowInsecureLocalhost']||_0x869981;_0x4a2d99&&_0x44cc9d['push'](_0x3cce62[_0x3d7900(0x12d)]);const _0x1dcb1b=await chromium['launch']({'headless':![],..._0x44cc9d[_0x3d7900(0x10e)]>0x0?{'args':_0x44cc9d}:{}});try{const _0x4bf65f=Object['keys'](_0x56c7e9)['length']>0x0,_0x5dd102={'ignoreHTTPSErrors':!![]};_0x4bf65f&&(_0x5dd102['extraHTTPHeaders']=_0x56c7e9);const _0x1c5a52=await _0x1dcb1b['newContext'](_0x5dd102);await addProfileSetupBanner(_0x1c5a52);const _0x19a89e=await _0x1c5a52[_0x3d7900(0x14c)]();await _0x19a89e[_0x3d7900(0x12a)](_0x3cce62['orYcB'](_0x2451af,_0x3d7900(0x148)));let _0x56e062=![];await new Promise(_0x436d12=>{_0x19a89e['on'](_0x3cce62['DusDu'],async()=>{const _0x1ef04a=_0x2fa1;try{console[_0x1ef04a(0x14f)]('Saving\x20authentication\x20state...'),await _0x1c5a52['storageState']({'path':_0x47224f}),_0x56e062=!![];}catch{}_0x436d12();});});if(!_0x56e062){console['log'](_0x3cce62['kWnpK']);!_0x347bbe[_0x3d7900(0x134)]&&(console['log']('This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a'),console['log']('You\x20can\x20try\x20again\x20with\x20one\x20of:'),console[_0x3d7900(0x14f)]('\x20\x20ranger\x20profile\x20add\x20'+_0x2cfb9f+_0x3d7900(0x11e)),console[_0x3d7900(0x14f)](_0x3d7900(0x121)+_0x2cfb9f+_0x3d7900(0x12b)));throw new Error(_0x3cce62[_0x3d7900(0xef)]);}}finally{await _0x1dcb1b['close']()[_0x3d7900(0x164)](()=>{});}if(_0x2ec69a){const _0x47b6f0=await _0x3cce62['lYWhv'](readFile,_0x47224f,'utf-8'),_0x240596=await _0x3cce62[_0x3d7900(0x157)](getToken);if(!_0x240596){console['error'](_0x3d7900(0x104)),await unlink(_0x47224f)[_0x3d7900(0x164)](()=>{});throw new Error(_0x3cce62['HMQER']);}else{const _0x2c5edb=encrypt(_0x47b6f0,_0x240596);await _0x3cce62['lYWhv'](writeFile,_0x47224f+_0x3cce62[_0x3d7900(0x155)],_0x2c5edb),await unlink(_0x47224f),console[_0x3d7900(0x14f)](_0x3d7900(0x15d)+_0x47224f+'.enc'),console['log'](_0x3cce62[_0x3d7900(0xf8)]),console['log'](_0x3cce62['RQBgW']);}}else console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x47224f);_0x22c8fb?.[_0x3d7900(0x12e)]('browser_auth');}_0x22c8fb?.[_0x3d7900(0x13b)](_0x3cce62['ATQrL']);const _0x2e5015={};_0x2451af&&(_0x2e5015[_0x3d7900(0x112)]=_0x2451af);_0x347bbe['cdpEndpoint']&&(_0x2e5015['cdpEndpoint']=_0x347bbe[_0x3d7900(0xf1)],_0x2e5015[_0x3d7900(0x136)]=!![]);(_0x347bbe[_0x3d7900(0x14b)]||_0x869981)&&(_0x2e5015['allowInsecureLocalhost']=!![]);_0x347bbe['safeMode']&&(_0x2e5015[_0x3d7900(0x134)]=!![]);_0x3cce62['aKJHF'](Object['keys'](_0x56c7e9)['length'],0x0)&&(_0x2e5015[_0x3d7900(0x165)]=_0x56c7e9);await writeFile(_0x3cce62['QUphZ'](join,_0x82a38f,'settings.json'),JSON['stringify'](_0x2e5015,null,0x2)),console[_0x3d7900(0x14f)](_0x3d7900(0x160)+_0x3cce62[_0x3d7900(0x14e)](join,_0x465d20,_0x3cce62['PcYfa']));if(_0x27f686?.[_0x3d7900(0x10b)]===_0x3a4098){const _0x544f6d=_0x27f686[_0x3d7900(0x133)]+_0x3d7900(0x13e)+Date[_0x3d7900(0x135)]();await _0x3cce62['EhyGZ'](rename,_0x27f686[_0x3d7900(0x133)],_0x544f6d);try{await rename(_0x82a38f,_0x465d20);}catch(_0x3297c2){await rename(_0x544f6d,_0x27f686[_0x3d7900(0x133)]);throw _0x3297c2;}try{await rm(_0x544f6d,{'recursive':!![]});}catch{console[_0x3d7900(0x14f)]('Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20backup\x20at\x20'+_0x544f6d);}}else{await _0x3cce62['gEbLa'](rename,_0x82a38f,_0x465d20);if(_0x27f686)try{await _0x3cce62['EhyGZ'](rm,_0x27f686['path'],{'recursive':!![]}),console[_0x3d7900(0x14f)](_0x3d7900(0x101)+_0x27f686[_0x3d7900(0x133)]);}catch{console[_0x3d7900(0x14f)](_0x3d7900(0x145)+_0x27f686['path']);}}try{await writeActiveProfileName(_0x2cfb9f),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x2cfb9f);}catch{console['log'](_0x3d7900(0xf4));}_0x22c8fb?.[_0x3d7900(0x12e)]('config_write'),console[_0x3d7900(0x14f)]('\x0a\x20\x20Profile\x20\x22'+_0x2cfb9f+_0x3d7900(0xf7));}catch(_0x347c54){await rm(_0x82a38f,{'recursive':!![],'force':!![]});throw _0x347c54;}}
1
+ (function(_0x13adca,_0x37ac9d){const _0x2b5611=_0x5f5a,_0x5b080f=_0x13adca();while(!![]){try{const _0x5ab86e=-parseInt(_0x2b5611(0x1d4))/0x1*(parseInt(_0x2b5611(0x237))/0x2)+parseInt(_0x2b5611(0x213))/0x3*(-parseInt(_0x2b5611(0x1de))/0x4)+-parseInt(_0x2b5611(0x23a))/0x5+parseInt(_0x2b5611(0x20f))/0x6*(-parseInt(_0x2b5611(0x238))/0x7)+-parseInt(_0x2b5611(0x24d))/0x8+parseInt(_0x2b5611(0x1fe))/0x9*(-parseInt(_0x2b5611(0x234))/0xa)+-parseInt(_0x2b5611(0x1ea))/0xb*(-parseInt(_0x2b5611(0x253))/0xc);if(_0x5ab86e===_0x37ac9d)break;else _0x5b080f['push'](_0x5b080f['shift']());}catch(_0x1a1e87){_0x5b080f['push'](_0x5b080f['shift']());}}}(_0x44d0,0x9382d));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x5135e8 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';function _0x44d0(){const _0x12aa59=['--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','isElectron','indexOf','9auTshp','no_match','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','EJdmK','RikVU','status','✓\x20Cloud\x20profile\x20\x27','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','DknrS','bzemE','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','Found\x20auth\x20environment\x20\x27','input','\x0a\x20\x20Still\x20could\x20not\x20reach\x20',')\x0a\x20\x20Save\x20\x27','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','HEAD','6VhHyrK','\x0a🌐\x20Profile\x20Setup\x0a','environments','saveToCloud','3WoxjEP','\x27\x20to\x20the\x20cloud?','length','HTTP\x20','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.','paTTw','join','error','setupHeader','url','profile.add.autoRouteSkipped','some','isProtocolError','exit','eAZZj','keys','yjHSB','Lvhsi','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','\x0a\x20\x20Could\x20not\x20reach\x20','xwKuc','name','user_declined','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','tOwyT','\x27\x20created\x20(no\x20session).\x0a','\x0a✓\x20Profile\x20\x27','VNLmg','rQscs','5388400eolmKy','setupHeaders','\x20\x20https://docs.ranger.net/main/concepts/profiles','9884rsvpmW','565635sHlxSC','env','5468195nMzefB','pSzVh','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','fetch\x20failed','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','✓\x20Profile\x20\x27','manual','vDPRq','profile.add.autoRouted','\x20\x20Did\x20you\x20mean\x20','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','includes','\x22:\x20','\x27\x20created\x20(CDP).','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','Enter\x20a\x20different\x20URL','trim','DAxrP','Could\x20not\x20reach\x20','7884368vtRVin','bVbYn','\x20\x20Set\x20active\x20profile:\x20','boTlU','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','tnBgZ','43620XONsSA','kdTqz','stdout','KQoUf','capture','jrhVr','Use\x20','origin','165tPekkz','log','isTTY','DsZBe','zmBxF','aZlAb','http://localhost:3000','NODE_TLS_REJECT_UNAUTHORIZED','cdpEndpoint','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','3096980OKfTyZ','no_auth_config','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','\x20--url\x20','prompt','action','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','sLPxs','slice','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','LaNMo','14806Bkedjj','PBRUf','voPiL','baseUrl','FnkHn','\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22','xUDIe','domains','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','RMAab','OAqKb','trackPhaseEnd','retry','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','message','`\x20again\x20without\x20--skip-auth.','confirm'];_0x44d0=function(){return _0x12aa59;};return _0x44d0();}import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';async function checkUrlReachability(_0x443ee1){const _0xb96b2d=_0x5f5a,_0x3af391={'nHlZX':_0xb96b2d(0x20e),'DAxrP':function(_0x59ae39,_0x49897c){return _0x59ae39(_0x49897c);},'VNLmg':function(_0x38b6c5,_0xa7cd89){return _0x38b6c5===_0xa7cd89;},'IQiNU':'TypeError','Etsge':_0xb96b2d(0x23d)};try{const _0x471c64=new AbortController(),_0x7e12c2=setTimeout(()=>_0x471c64['abort'](),0x1388),_0x4f7504={'method':_0x3af391['nHlZX'],'signal':_0x471c64['signal'],'redirect':_0xb96b2d(0x240)};/^https:\/\/localhost(:\d+)?/i['test'](_0x443ee1)&&(process[_0xb96b2d(0x239)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x4c45a3=await fetch(_0x443ee1,_0x4f7504);delete process[_0xb96b2d(0x239)][_0xb96b2d(0x1db)],_0x3af391[_0xb96b2d(0x24b)](clearTimeout,_0x7e12c2);if(_0x4c45a3[_0xb96b2d(0x203)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0xb96b2d(0x216)+_0x4c45a3['status']};}catch(_0x596413){delete process[_0xb96b2d(0x239)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x1eb16d=_0x596413,_0x3782ed=_0x1eb16d[_0xb96b2d(0x1f8)]||String(_0x596413),_0x3b212d=_0x3782ed[_0xb96b2d(0x245)]('Invalid\x20URL')||_0x3af391[_0xb96b2d(0x232)](_0x1eb16d[_0xb96b2d(0x22a)],_0x3af391['IQiNU'])||_0x3782ed[_0xb96b2d(0x245)](_0x3af391['Etsge']);return{'ok':![],'error':_0x3782ed,'isProtocolError':_0x3b212d};}}function _0x5f5a(_0x1687b4,_0x2d484e){_0x1687b4=_0x1687b4-0x1d4;const _0x44d069=_0x44d0();let _0x5f5a7f=_0x44d069[_0x1687b4];return _0x5f5a7f;}async function sweepOrphanLocalProfile(_0x5254fe,_0x5b1ac9,_0x477184){const _0x19ce3c=_0x5f5a,_0x4bb5f2={'kdTqz':function(_0x48ceb2,_0x2cf6cc,_0x473421){return _0x48ceb2(_0x2cf6cc,_0x473421);},'xUDIe':function(_0x1d3bf1,_0x2ac1c0){return _0x1d3bf1(_0x2ac1c0);},'tnBgZ':function(_0x4d518e,_0x49ad80,_0x1bdc2e){return _0x4d518e(_0x49ad80,_0x1bdc2e);}},_0x142b7c=_0x4bb5f2['kdTqz'](join,_0x5b1ac9,'local'),_0x407941=_0x4bb5f2[_0x19ce3c(0x254)](join,_0x142b7c,_0x5254fe);existsSync(_0x407941)&&(_0x477184&&await isPathGitTracked(_0x407941)?console[_0x19ce3c(0x1d5)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x407941+_0x19ce3c(0x22d)):(await _0x4bb5f2['kdTqz'](rm,_0x407941,{'recursive':!![],'force':!![]}),console['log'](_0x19ce3c(0x22e)+_0x407941)));if(existsSync(_0x142b7c)){let _0x1d2fde=[];try{_0x1d2fde=await _0x4bb5f2[_0x19ce3c(0x1f0)](readdir,_0x142b7c);}catch{return;}const _0x3622b2='.tmp-'+_0x5254fe+'-';for(const _0x1c7d9a of _0x1d2fde){if(!_0x1c7d9a['startsWith'](_0x3622b2))continue;const _0x11eb30=_0x4bb5f2['kdTqz'](join,_0x142b7c,_0x1c7d9a);await _0x4bb5f2[_0x19ce3c(0x252)](rm,_0x11eb30,{'recursive':!![],'force':!![]}),console[_0x19ce3c(0x1d5)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x11eb30);}}}async function sweepOrphansBestEffort(_0x5417fe){const _0x50c853=_0x5f5a,_0x52774e={'PBRUf':function(_0x5d79cb,_0x12b06b,_0x7746a2,_0x4ce0f1){return _0x5d79cb(_0x12b06b,_0x7746a2,_0x4ce0f1);},'PXIvU':function(_0x3f5c10){return _0x3f5c10();},'AhwQg':function(_0x5198d9,_0x51fb59){return _0x5198d9(_0x51fb59);}};try{await _0x52774e[_0x50c853(0x1eb)](sweepOrphanLocalProfile,_0x5417fe,getRangerHomeDir(),![]);const _0x1ca387=getRangerDir();_0x1ca387!==_0x52774e['PXIvU'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x5417fe,_0x1ca387,!![]);}catch(_0x4da04b){console['log'](_0x50c853(0x200)+(_0x4da04b instanceof Error?_0x4da04b['message']:_0x52774e['AhwQg'](String,_0x4da04b))+').');}}async function markActive(_0x3d8e06){const _0x3970b9=_0x5f5a,_0x5cd458={'zmBxF':function(_0x379b34,_0x1a33f4){return _0x379b34(_0x1a33f4);}};try{await _0x5cd458[_0x3970b9(0x1d8)](writeActiveProfileName,_0x3d8e06),console[_0x3970b9(0x1d5)](_0x3970b9(0x24f)+_0x3d8e06);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0x9c8e15,_0x59e282,_0xf62c2b,_0x3b8fc8,_0x16fac5){const _0x3ec470=_0x5f5a,_0x265ce3={'FnkHn':function(_0x189e13,_0x3f6980){return _0x189e13===_0x3f6980;},'EJdmK':function(_0xb3cb5a,_0x29fa08){return _0xb3cb5a instanceof _0x29fa08;},'WNnvA':function(_0x1f09e6,_0x43c633){return _0x1f09e6(_0x43c633);},'DsZBe':'profile.add.autoRouteSkipped','xwKuc':_0x3ec470(0x1df),'bVbYn':function(_0x698d7e,_0xd56a6a){return _0x698d7e+_0xd56a6a;},'aZlAb':function(_0x4ce4df,_0x12ebbe){return _0x4ce4df+_0x12ebbe;},'OSjAo':_0x3ec470(0x251),'yjHSB':function(_0x97ec50,_0x434ad5,_0x4d6df6){return _0x97ec50(_0x434ad5,_0x4d6df6);},'QIWmj':_0x3ec470(0x1ff),'BKKAi':_0x3ec470(0x212),'UZIeS':_0x3ec470(0x22b),'RMAab':_0x3ec470(0x1e1),'rGDlo':function(_0x816e4a,_0x363fa3,_0x483144,_0x23688c){return _0x816e4a(_0x363fa3,_0x483144,_0x23688c);},'KQoUf':function(_0x46b0cd,_0xbf8cca){return _0x46b0cd===_0xbf8cca;},'qkrQh':function(_0x46d599,_0x42680f){return _0x46d599+_0x42680f;},'bzemE':_0x3ec470(0x242)};let _0x3d0a78;try{_0x3d0a78=await fetchAuthConfig();}catch(_0x128e6f){return _0x16fac5?.['trackPhaseEnd'](_0x3ec470(0x21e),{'reason':'no_auth_config','profileName':_0x9c8e15}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x265ce3[_0x3ec470(0x201)](_0x128e6f,Error)?_0x128e6f['message']:_0x265ce3['WNnvA'](String,_0x128e6f))),![];}if(!_0x3d0a78||!_0x3d0a78['environments']||_0x265ce3['FnkHn'](Object[_0x3ec470(0x223)](_0x3d0a78['environments'])[_0x3ec470(0x215)],0x0)){if(_0x3b8fc8)return await captureEnvLessProfile(_0x9c8e15,_0x59e282,_0xf62c2b,_0x16fac5);return _0x16fac5?.[_0x3ec470(0x1f5)](_0x265ce3['DsZBe'],{'reason':_0x265ce3[_0x3ec470(0x229)],'profileName':_0x9c8e15}),console['error'](_0x265ce3['bVbYn'](_0x265ce3[_0x3ec470(0x1d9)](_0x265ce3[_0x3ec470(0x24e)](_0x265ce3[_0x3ec470(0x1d9)](_0x3ec470(0x227),'\x0a'),_0x265ce3['OSjAo']),_0x3ec470(0x1e5)+_0x9c8e15+_0x3ec470(0x1e2)+_0x59e282+'\x20--skip-auth\x0a')+'\x0a',_0x3ec470(0x1e8))+'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login'),![];}const _0x3c8237=_0x265ce3[_0x3ec470(0x224)](matchAuthEnvironment,_0x59e282,_0x3d0a78);if(!_0x3c8237)return _0x16fac5?.[_0x3ec470(0x1f5)]('profile.add.autoRouteSkipped',{'reason':_0x265ce3['QIWmj'],'profileName':_0x9c8e15}),console[_0x3ec470(0x21b)](_0x3ec470(0x208)+_0x59e282+'.\x20Configured\x20envs:\x20'+Object[_0x3ec470(0x223)](_0x3d0a78[_0x3ec470(0x211)])[_0x3ec470(0x21a)](',\x20')+'.'),![];const _0x2ffb13=_0x3d0a78['environments'][_0x3c8237],_0x96d5b4=_0x2ffb13?.[_0x3ec470(0x1f1)]??[];if(_0x3b8fc8&&!_0xf62c2b['yes']){const {saveToCloud:_0x5c757c}=await _0x5135e8['prompt']([{'type':'confirm','name':_0x265ce3['BKKAi'],'message':_0x3ec470(0x209)+_0x3c8237+'\x27\x20matching\x20'+_0x59e282+'\x0a\x20\x20(domains:\x20'+_0x96d5b4['join'](',\x20')+_0x3ec470(0x20c)+_0x9c8e15+_0x3ec470(0x214),'default':!![]}]);if(!_0x5c757c)return _0x16fac5?.['trackPhaseEnd'](_0x265ce3[_0x3ec470(0x1d7)],{'reason':_0x265ce3['UZIeS'],'profileName':_0x9c8e15}),console[_0x3ec470(0x21b)](_0x265ce3[_0x3ec470(0x1f3)]),![];}const _0x173e31=_0x96d5b4[_0x3ec470(0x21f)](_0x29c878=>{const _0x3fe97e=_0x3ec470;try{return _0x265ce3[_0x3fe97e(0x1ee)](new URL(_0x29c878)['origin'],new URL(_0x59e282)[_0x3fe97e(0x25a)]);}catch{return![];}}),_0x382f4e={};!_0x173e31&&(_0x382f4e[_0x3ec470(0x1ed)]=_0x59e282);try{await _0x265ce3['rGDlo'](createCloudProfile,_0x9c8e15,_0x3c8237,{'settings':_0x382f4e});}catch(_0x1a548e){if(_0x265ce3[_0x3ec470(0x201)](_0x1a548e,ApiError)&&_0x265ce3[_0x3ec470(0x256)](_0x1a548e['status'],0x199)){console['error']('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x9c8e15+_0x3ec470(0x218));throw _0x1a548e;}throw _0x1a548e;}return console['log'](_0x265ce3['qkrQh'](_0x3ec470(0x23f)+_0x9c8e15+'\x27\x20created.\x0a',_0x3ec470(0x1dd)+_0x9c8e15)),await _0x265ce3['WNnvA'](sweepOrphansBestEffort,_0x9c8e15),_0x16fac5?.['trackPhaseEnd'](_0x265ce3[_0x3ec470(0x207)],{'envKey':_0x3c8237,'profileName':_0x9c8e15}),!![];}async function createUnconfiguredCloudProfile(_0x3ef0d4,_0x6f4b73){const _0x26ab3b=_0x5f5a,_0x3843c4={'jrhVr':function(_0x375e8c,_0x31a8c8,_0x159265,_0x24468f){return _0x375e8c(_0x31a8c8,_0x159265,_0x24468f);},'PaAGF':function(_0x63e63a,_0x540d7a){return _0x63e63a instanceof _0x540d7a;}};try{await _0x3843c4[_0x26ab3b(0x258)](createCloudProfile,_0x3ef0d4,undefined,{'settings':_0x6f4b73});}catch(_0x25eab1){_0x3843c4['PaAGF'](_0x25eab1,ApiError)&&_0x25eab1['status']===0x199&&console['error'](_0x26ab3b(0x1ef)+_0x3ef0d4+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x25eab1;}}async function captureEnvLessProfile(_0x63c91c,_0x21bb33,_0x1bf779,_0x129c3f){const _0x8ada72=_0x5f5a,_0x32a046={'Lvhsi':_0x8ada72(0x226),'JQxKm':_0x8ada72(0x21e),'pSzVh':'user_declined','sLPxs':function(_0x4820f3,_0x571557){return _0x4820f3===_0x571557;},'OAqKb':function(_0x3a4b8f,_0x12ecc8){return _0x3a4b8f+_0x12ecc8;},'LaNMo':function(_0xdadfad,_0x41c102){return _0xdadfad>_0x41c102;},'eAZZj':function(_0x3ac5d5,_0x2a2cdb,_0x2aade4,_0x391b53){return _0x3ac5d5(_0x2a2cdb,_0x2aade4,_0x391b53);},'vDPRq':function(_0x1df93f,_0x4c1e51,_0x14e55a){return _0x1df93f(_0x4c1e51,_0x14e55a);},'voPiL':function(_0xe7158,_0x3e5824){return _0xe7158(_0x3e5824);}};if(!_0x1bf779['yes']){const {capture:_0x1861cf}=await _0x5135e8['prompt']([{'type':_0x8ada72(0x1fa),'name':_0x8ada72(0x257),'message':_0x32a046[_0x8ada72(0x225)],'default':!![]}]);if(!_0x1861cf)return _0x129c3f?.['trackPhaseEnd'](_0x32a046['JQxKm'],{'reason':_0x32a046[_0x8ada72(0x23b)],'profileName':_0x63c91c}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x3b53b0={};if(_0x1bf779['setupHeader'])for(const _0x17bcd7 of _0x1bf779[_0x8ada72(0x21c)]){const _0x1e3e9f=_0x17bcd7['indexOf'](':');if(_0x32a046['sLPxs'](_0x1e3e9f,-0x1))continue;_0x3b53b0[_0x17bcd7[_0x8ada72(0x1e7)](0x0,_0x1e3e9f)[_0x8ada72(0x24a)]()]=_0x17bcd7['slice'](_0x32a046[_0x8ada72(0x1f4)](_0x1e3e9f,0x1))[_0x8ada72(0x24a)]();}const _0x186573={'baseUrl':_0x21bb33};_0x32a046[_0x8ada72(0x1e9)](Object['keys'](_0x3b53b0)[_0x8ada72(0x215)],0x0)&&(_0x186573[_0x8ada72(0x235)]=_0x3b53b0);let _0x2c428f;try{_0x2c428f=await _0x32a046[_0x8ada72(0x222)](createCloudProfile,_0x63c91c,undefined,{'settings':_0x186573});}catch(_0x26352a){_0x26352a instanceof ApiError&&_0x32a046[_0x8ada72(0x1e6)](_0x26352a['status'],0x199)&&console[_0x8ada72(0x21b)]('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x63c91c+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x26352a;}return await _0x32a046[_0x8ada72(0x241)](manualBrowserLogin,_0x2c428f,{'key':'','domains':[_0x21bb33],'setupHeaders':_0x32a046['LaNMo'](Object['keys'](_0x3b53b0)['length'],0x0)?_0x3b53b0:undefined}),console['log'](_0x8ada72(0x231)+_0x63c91c+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x63c91c)),await _0x32a046[_0x8ada72(0x1ec)](sweepOrphansBestEffort,_0x63c91c),_0x129c3f?.[_0x8ada72(0x1f5)]('profile.add.autoRouted',{'envKey':null,'profileName':_0x63c91c}),!![];}export async function addEnv(_0x4af174,_0x2d44b4={},_0x3521ae){const _0x34aa44=_0x5f5a,_0x42d15f={'rQscs':function(_0x327242,_0xced69c){return _0x327242+_0xced69c;},'HXsys':_0x34aa44(0x217),'boTlU':_0x34aa44(0x22c),'ZRhZg':_0x34aa44(0x23c),'iokqB':_0x34aa44(0x236),'paTTw':function(_0x437097,_0x328ee2){return _0x437097===_0x328ee2;},'DknrS':function(_0x3528e0,_0x4ecc2e){return _0x3528e0(_0x4ecc2e);},'CDSeD':'Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','NUMft':_0x34aa44(0x1e0),'fHGdE':function(_0x3f6f9e,_0x55f9a4){return _0x3f6f9e>_0x55f9a4;},'NXrCy':function(_0x1e64d4,_0x39f53d){return _0x1e64d4||_0x39f53d;},'fkOgB':_0x34aa44(0x1e4),'RikVU':'What\x20would\x20you\x20like\x20to\x20do?','aIvXq':_0x34aa44(0x1f6),'KUody':'continue','tOwyT':function(_0x186c23,_0x1e0f83){return _0x186c23===_0x1e0f83;},'yQDCY':function(_0x3cc4b1,_0x4b0d6b){return _0x3cc4b1===_0x4b0d6b;},'pwBFB':function(_0xb9c449,_0x360ed0){return _0xb9c449 instanceof _0x360ed0;}};_0x2d44b4['ci']&&(console[_0x34aa44(0x21b)](_0x42d15f[_0x34aa44(0x233)](_0x42d15f[_0x34aa44(0x233)](_0x42d15f[_0x34aa44(0x233)](_0x42d15f['HXsys']+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'+'\x0a'+_0x42d15f[_0x34aa44(0x250)],_0x42d15f['ZRhZg']),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+_0x42d15f['iokqB']),process['exit'](0x1));const _0x146065={};if(_0x2d44b4[_0x34aa44(0x21c)])for(const _0x2c109e of _0x2d44b4[_0x34aa44(0x21c)]){const _0x3de3f9=_0x2c109e[_0x34aa44(0x1fd)](':');if(_0x3de3f9===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x2c109e+_0x34aa44(0x205));const _0x681897=_0x2c109e[_0x34aa44(0x1e7)](0x0,_0x3de3f9)[_0x34aa44(0x24a)](),_0xcb0ed6=_0x2c109e['slice'](_0x3de3f9+0x1)[_0x34aa44(0x24a)]();_0x146065[_0x681897]=_0xcb0ed6;}if(_0x2d44b4[_0x34aa44(0x1dc)]!==undefined&&_0x42d15f[_0x34aa44(0x219)](_0x2d44b4[_0x34aa44(0x1dc)][_0x34aa44(0x24a)](),''))throw new Error(_0x34aa44(0x1fb));if(_0x2d44b4['cdpEndpoint']&&_0x2d44b4[_0x34aa44(0x21d)])throw new Error(_0x34aa44(0x1f7));const _0x5873fd=_0x42d15f['DknrS'](Boolean,_0x2d44b4['cdpEndpoint']),_0x4a79a4=process['stdin'][_0x34aa44(0x1d6)]&&process[_0x34aa44(0x255)][_0x34aa44(0x1d6)];if(!_0x4a79a4&&!_0x2d44b4[_0x34aa44(0x21d)]&&!_0x5873fd&&!_0x2d44b4['skipAuth'])throw new Error(_0x42d15f['CDSeD']);if(_0x5873fd){const _0x37b470=_0x2d44b4[_0x34aa44(0x1dc)];console['log'](_0x42d15f['NUMft']),console[_0x34aa44(0x1d5)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x37b470);const _0xe55dc2={'cdpEndpoint':_0x37b470,'isElectron':!![]};Object[_0x34aa44(0x223)](_0x146065)['length']>0x0&&(_0xe55dc2['setupHeaders']=_0x146065);await createUnconfiguredCloudProfile(_0x4af174,_0xe55dc2);try{setProfileOverride(process['cwd'](),_0x4af174,_0x34aa44(0x1dc),_0x37b470),setProfileOverride(process['cwd'](),_0x4af174,_0x34aa44(0x1fc),!![]);}catch(_0x46989c){console[_0x34aa44(0x21b)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x46989c instanceof Error?_0x46989c['message']:_0x42d15f[_0x34aa44(0x206)](String,_0x46989c)));}console[_0x34aa44(0x1d5)](_0x34aa44(0x204)+_0x4af174+_0x34aa44(0x247)),await _0x42d15f[_0x34aa44(0x206)](sweepOrphansBestEffort,_0x4af174),await markActive(_0x4af174);return;}if(_0x2d44b4['skipAuth']){const _0x12589d={};_0x2d44b4[_0x34aa44(0x21d)]&&(_0x12589d[_0x34aa44(0x1ed)]=_0x2d44b4[_0x34aa44(0x21d)]);_0x42d15f['fHGdE'](Object['keys'](_0x146065)['length'],0x0)&&(_0x12589d['setupHeaders']=_0x146065);await createUnconfiguredCloudProfile(_0x4af174,_0x12589d),console[_0x34aa44(0x1d5)](_0x34aa44(0x23f)+_0x4af174+_0x34aa44(0x230)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x4af174+_0x34aa44(0x1f9))),await sweepOrphansBestEffort(_0x4af174),await markActive(_0x4af174);return;}if(_0x2d44b4[_0x34aa44(0x21d)]){const _0x73279=_0x2d44b4[_0x34aa44(0x21d)],_0x276a4a=await checkUrlReachability(_0x73279);if(!_0x276a4a['ok']&&!_0x2d44b4['force'])throw new Error(_0x34aa44(0x24c)+_0x73279+':\x20'+_0x276a4a['error']+_0x34aa44(0x248));!_0x276a4a['ok']&&_0x2d44b4['force']&&console[_0x34aa44(0x1d5)]('⚠\x20Could\x20not\x20reach\x20'+_0x73279+':\x20'+_0x276a4a[_0x34aa44(0x21b)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x34aa44(0x210)),console[_0x34aa44(0x1d5)](_0x34aa44(0x23e)),console['log'](_0x34aa44(0x1f2));let _0x20f1e5='',_0x2ef3ef=![];while(!![]){const _0x5c3eab=await _0x5135e8[_0x34aa44(0x1e3)]([{'type':_0x34aa44(0x20a),'name':_0x34aa44(0x1ed),'message':_0x2ef3ef?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0x34aa44(0x244),'default':_0x42d15f['NXrCy'](_0x20f1e5,_0x34aa44(0x1da))}]);_0x20f1e5=_0x5c3eab[_0x34aa44(0x1ed)];const _0x31045d=await _0x42d15f['DknrS'](checkUrlReachability,_0x20f1e5);if(_0x31045d['ok'])break;const _0x6b0f39=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x20f1e5),_0x405381=_0x31045d[_0x34aa44(0x220)]&&!_0x6b0f39,_0x385cd7=_0x405381?'http://'+_0x20f1e5:null;_0x2ef3ef=!![],console[_0x34aa44(0x1d5)](_0x34aa44(0x228)+_0x20f1e5+':\x20'+_0x31045d['error']);_0x385cd7&&console[_0x34aa44(0x1d5)](_0x34aa44(0x243)+_0x385cd7+'?');const {action:_0x106b04}=await _0x5135e8[_0x34aa44(0x1e3)]([{'type':'list','name':_0x42d15f['fkOgB'],'message':_0x42d15f[_0x34aa44(0x202)],'choices':[..._0x385cd7?[{'name':_0x34aa44(0x259)+_0x385cd7,'value':'use_suggestion'}]:[],{'name':_0x34aa44(0x249),'value':_0x42d15f['aIvXq']},{'name':'Continue\x20anyway','value':_0x42d15f['KUody']}]}]);if(_0x42d15f[_0x34aa44(0x22f)](_0x106b04,'use_suggestion')&&_0x385cd7){_0x20f1e5=_0x385cd7;const _0x4043bd=await _0x42d15f[_0x34aa44(0x206)](checkUrlReachability,_0x20f1e5);if(_0x4043bd['ok'])break;console[_0x34aa44(0x1d5)](_0x34aa44(0x20b)+_0x20f1e5+':\x20'+_0x4043bd['error']);}else{if(_0x42d15f['yQDCY'](_0x106b04,'continue'))break;}}_0x2d44b4={..._0x2d44b4,'url':_0x20f1e5};}let _0x43c8d4=![];try{_0x43c8d4=await tryAutoRouteCloudProfile(_0x4af174,_0x2d44b4['url'],_0x2d44b4,_0x4a79a4,_0x3521ae);}catch(_0x49452a){console['error'](_0x34aa44(0x20d)+_0x4af174+_0x34aa44(0x246)+(_0x42d15f['pwBFB'](_0x49452a,Error)?_0x49452a[_0x34aa44(0x1f8)]:_0x42d15f[_0x34aa44(0x206)](String,_0x49452a))),process[_0x34aa44(0x221)](0x1);}!_0x43c8d4&&process['exit'](0x1),await markActive(_0x4af174);}
@@ -1 +1 @@
1
- (function(_0xafd4ed,_0xd658dc){const _0x500640=_0x1a74,_0x42f699=_0xafd4ed();while(!![]){try{const _0x527aca=parseInt(_0x500640(0x120))/0x1*(-parseInt(_0x500640(0x131))/0x2)+parseInt(_0x500640(0x119))/0x3+-parseInt(_0x500640(0x12c))/0x4*(-parseInt(_0x500640(0x11b))/0x5)+-parseInt(_0x500640(0x11f))/0x6*(-parseInt(_0x500640(0x12a))/0x7)+parseInt(_0x500640(0x127))/0x8*(-parseInt(_0x500640(0x11c))/0x9)+parseInt(_0x500640(0x128))/0xa+parseInt(_0x500640(0x123))/0xb*(-parseInt(_0x500640(0x12f))/0xc);if(_0x527aca===_0xd658dc)break;else _0x42f699['push'](_0x42f699['shift']());}catch(_0x89173f){_0x42f699['push'](_0x42f699['shift']());}}}(_0x22d5,0xb43b6));function _0x22d5(){const _0x480431=['136WCHHGm','\x20\x20The\x20encrypted\x20auth.json.enc\x20can\x20be\x20committed.','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','1260hLfnuo','log','2927314Cgjuko','2487486VQgYMU','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','187795FWVTCe','2952630BnGrFE','No\x20auth.json\x20found\x20at\x20','.enc','12eQRpaU','1fhrOSX','auth.json','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20with\x20authentication,\x20or\x20ranger\x20profile\x20update','43274APPZFn','uVQUV','\x0a✓\x20Encrypted\x20auth\x20saved\x20to:\x20','\x0a\x20\x20The\x20plaintext\x20auth.json\x20is\x20gitignored\x20for\x20security.','8BgnnDR','7220830cIJnmX','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','401716DdXqbS','YliRI'];_0x22d5=function(){return _0x480431;};return _0x22d5();}import{readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{encrypt}from'./utils/crypto.js';function _0x1a74(_0x58354d,_0x1f0015){_0x58354d=_0x58354d-0x119;const _0x22d5b2=_0x22d5();let _0x1a74e2=_0x22d5b2[_0x58354d];return _0x1a74e2;}import{getToken}from'./utils/keychain.js';import{getEnvDir}from'./utils/settings.js';export async function authEncrypt(_0x1bd1cf){const _0x312eb9=_0x1a74,_0x57ef58={'YliRI':function(_0x14f19e,_0x21a341){return _0x14f19e+_0x21a341;},'kXXGn':_0x312eb9(0x11e),'cooTe':'utf-8','uVQUV':function(_0xa67e04,_0x22936a,_0x4b9bb5){return _0xa67e04(_0x22936a,_0x4b9bb5);},'mlBib':_0x312eb9(0x12e)},_0x555b97=getEnvDir(_0x1bd1cf),_0x18138e=join(_0x555b97,_0x312eb9(0x121)),_0x5ea042=_0x57ef58[_0x312eb9(0x12b)](_0x18138e,_0x57ef58['kXXGn']);if(!existsSync(_0x555b97))throw new Error('Profile\x20\x22'+_0x1bd1cf+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x1bd1cf);if(!existsSync(_0x18138e))throw new Error(_0x312eb9(0x11d)+_0x18138e+_0x312eb9(0x122));const _0x3e0b12=await getToken();if(!_0x3e0b12)throw new Error(_0x312eb9(0x11a));const _0x550fe3=await readFile(_0x18138e,_0x57ef58['cooTe']),_0x32f236=_0x57ef58[_0x312eb9(0x124)](encrypt,_0x550fe3,_0x3e0b12);await writeFile(_0x5ea042,_0x32f236),console['log'](_0x312eb9(0x125)+_0x5ea042),console['log'](_0x312eb9(0x129)),console[_0x312eb9(0x130)](_0x57ef58['mlBib']),existsSync(_0x5ea042)&&(console[_0x312eb9(0x130)](_0x312eb9(0x126)),console[_0x312eb9(0x130)](_0x312eb9(0x12d)));}
1
+ (function(_0x41c173,_0xca6219){var _0x2b428d=_0x4a9e,_0x10b672=_0x41c173();while(!![]){try{var _0x3472f9=parseInt(_0x2b428d(0x188))/0x1+-parseInt(_0x2b428d(0x194))/0x2*(parseInt(_0x2b428d(0x18c))/0x3)+-parseInt(_0x2b428d(0x193))/0x4+-parseInt(_0x2b428d(0x189))/0x5*(-parseInt(_0x2b428d(0x192))/0x6)+parseInt(_0x2b428d(0x195))/0x7+parseInt(_0x2b428d(0x18b))/0x8+-parseInt(_0x2b428d(0x18a))/0x9*(-parseInt(_0x2b428d(0x190))/0xa);if(_0x3472f9===_0xca6219)break;else _0x10b672['push'](_0x10b672['shift']());}catch(_0x542572){_0x10b672['push'](_0x10b672['shift']());}}}(_0x2a48,0x68ea8));function _0x4a9e(_0x3e1734,_0x4b80aa){_0x3e1734=_0x3e1734-0x188;var _0x2a487e=_0x2a48();var _0x4a9eaf=_0x2a487e[_0x3e1734];return _0x4a9eaf;}function _0x2a48(){var _0x954cf1=['error','57066MHGHfV','3231360yaxsRS','8FmitBn','1014307uTcXHD','gfHgI','588447OgxUcT','145fnEXRW','52524yTrBgG','934760UqncCi','52014KWANNz','\x20\x20https://docs.ranger.net/main/concepts/profiles','exit','cxVDv','310QdDvhP'];_0x2a48=function(){return _0x954cf1;};return _0x2a48();}export async function authEncrypt(_0x56c350){var _0x2b7bb0=_0x4a9e,_0x4f5c2a={'cxVDv':function(_0x48f799,_0x1a2274){return _0x48f799+_0x1a2274;},'gfHgI':'ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','VqjVq':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','FUxvG':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ezAGB':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','VKhVq':_0x2b7bb0(0x18d)};console[_0x2b7bb0(0x191)](_0x4f5c2a[_0x2b7bb0(0x18f)](_0x4f5c2a['cxVDv'](_0x4f5c2a[_0x2b7bb0(0x196)]+_0x4f5c2a['VqjVq'],'\x0a')+_0x4f5c2a['FUxvG']+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a',_0x4f5c2a['ezAGB'])+_0x4f5c2a['VKhVq']),process[_0x2b7bb0(0x18e)](0x1);}
@@ -1 +1 @@
1
- const _0x126fee=_0xf149;(function(_0x36402c,_0x47680d){const _0x4090e9=_0xf149,_0x53f9ed=_0x36402c();while(!![]){try{const _0x538063=-parseInt(_0x4090e9(0x21e))/0x1+parseInt(_0x4090e9(0x1f5))/0x2+parseInt(_0x4090e9(0x1ed))/0x3*(-parseInt(_0x4090e9(0x20b))/0x4)+parseInt(_0x4090e9(0x204))/0x5*(parseInt(_0x4090e9(0x1e6))/0x6)+parseInt(_0x4090e9(0x1e1))/0x7*(-parseInt(_0x4090e9(0x1f9))/0x8)+-parseInt(_0x4090e9(0x1ff))/0x9*(-parseInt(_0x4090e9(0x213))/0xa)+parseInt(_0x4090e9(0x1e0))/0xb;if(_0x538063===_0x47680d)break;else _0x53f9ed['push'](_0x53f9ed['shift']());}catch(_0xc4d810){_0x53f9ed['push'](_0x53f9ed['shift']());}}}(_0x3705,0xe18d4));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x126fee(0x21b),_0x126fee(0x20e),'bug-bash',_0x126fee(0x208)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x182fe4){const _0x1433c5=_0x126fee,_0x59b10a=_0x182fe4[_0x1433c5(0x206)](/\/\*[\s\S]*?\*\//g,''),_0xe151f5=_0x59b10a['replace'](/^\s*\/\/.*$/gm,''),_0xf06846=_0xe151f5['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x1433c5(0x203)](_0xf06846);}async function removeOpencodePluginConfig(_0x5c7a94){const _0x4f24ed=_0x126fee,_0x454fff={'jdHZF':'string','qsVqF':function(_0x4b37ba,_0x580fcc){return _0x4b37ba!==_0x580fcc;},'ZjQvg':function(_0x4cb34a,_0x5a6231,_0x496b0a){return _0x4cb34a(_0x5a6231,_0x496b0a);},'ioVyc':_0x4f24ed(0x1e7),'kUzkw':function(_0x4f392c,_0xc53dd6){return _0x4f392c===_0xc53dd6;}};if(!existsSync(_0x5c7a94))return![];let _0x5a2d3a;try{const _0x558c79=await _0x454fff[_0x4f24ed(0x1f0)](readFile,_0x5c7a94,_0x454fff[_0x4f24ed(0x220)]);_0x5a2d3a=parseJsonc(_0x558c79);}catch{return![];}const _0x4629ec=Array['isArray'](_0x5a2d3a[_0x4f24ed(0x1e2)])?_0x5a2d3a['plugin']:[];if(_0x454fff[_0x4f24ed(0x1e8)](_0x4629ec[_0x4f24ed(0x1fe)],0x0))return![];const _0x2ae767=_0x4629ec['filter'](_0xbcdb2d=>{if(typeof _0xbcdb2d!==_0x454fff['jdHZF'])return!![];return _0x454fff['qsVqF'](_0xbcdb2d,opencodePluginName);});if(_0x454fff['kUzkw'](_0x2ae767['length'],_0x4629ec[_0x4f24ed(0x1fe)]))return![];return _0x454fff[_0x4f24ed(0x1e8)](_0x2ae767[_0x4f24ed(0x1fe)],0x0)?delete _0x5a2d3a[_0x4f24ed(0x1e2)]:_0x5a2d3a[_0x4f24ed(0x1e2)]=_0x2ae767,await writeFile(_0x5c7a94,JSON[_0x4f24ed(0x201)](_0x5a2d3a,null,0x2)+'\x0a'),!![];}function _0x3705(){const _0x43e95b=['utf-8','kUzkw','ranger@trailhead','pipe','FJKzE','NgPxP','4773cMaOLJ','claude','platform','ZjQvg','✓\x20Removed\x20stored\x20credentials','FIcmY','SpRKa','marketplace','3403834peGHAE','JyVKt','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','yogvU','8yZKUhU','win32','wlnCH','trailhead','error','length','45tvHBpB','FiOhY','stringify','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','parse','11725IqHffR','OWiFf','replace','pjkWA','e2e-test-recommender','NTxzE','uninstall','1580dnmjjN','Xmrlc','fbGvA','feature-tracker','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','log','user','bzxKE','1642740KFajYQ','opencode.json','✓\x20Removed\x20user\x20skill:\x20','push','RYSJg','project','close','\x0a✅\x20Cleanup\x20complete!\x0a','ranger','HCWvZ','✓\x20Removed\x20trailhead\x20marketplace','1255995lNHMXc','HUoAA','ioVyc','2280146QBBQod','2131556VnPDYv','plugin','RlqAj','✓\x20Removed\x20.ranger/\x20directory','KngYk','978ouiSXh'];_0x3705=function(){return _0x43e95b;};return _0x3705();}async function uninstallClaudePlugin(_0x5a33e6){const _0x5a88e8=_0x126fee,_0x1f0301={'qbNZn':_0x5a88e8(0x1e2),'RYSJg':_0x5a88e8(0x20a),'aYtIj':function(_0x573c74,_0x3a2c0d,_0x57033e,_0x385619){return _0x573c74(_0x3a2c0d,_0x57033e,_0x385619);},'OWiFf':_0x5a88e8(0x1ee),'HUoAA':_0x5a88e8(0x1ea),'HCWvZ':function(_0x37c15c,_0x59a72b){return _0x37c15c===_0x59a72b;},'uuOuG':'win32','KngYk':'close'};return new Promise(_0x485036=>{const _0x30b0ba=_0x5a88e8,_0x25477a={'YIajB':function(_0x3881d9,_0x3196b4){return _0x3881d9(_0x3196b4);}},_0x30ea4b=[_0x1f0301['qbNZn'],_0x1f0301[_0x30b0ba(0x217)],_0x30b0ba(0x1e9)];_0x5a33e6&&_0x30ea4b[_0x30b0ba(0x216)]('--scope',_0x5a33e6);const _0x1ade2f=_0x1f0301['aYtIj'](spawn,_0x1f0301[_0x30b0ba(0x205)],_0x30ea4b,{'stdio':_0x1f0301[_0x30b0ba(0x21f)],'shell':_0x1f0301[_0x30b0ba(0x21c)](process['platform'],_0x1f0301['uuOuG'])});_0x1ade2f['on'](_0x1f0301[_0x30b0ba(0x1e5)],_0x4c7e9c=>{_0x25477a['YIajB'](_0x485036,_0x4c7e9c===0x0);}),_0x1ade2f['on'](_0x30b0ba(0x1fd),()=>{_0x485036(![]);});});}function _0xf149(_0x5774bc,_0x1a0cdb){_0x5774bc=_0x5774bc-0x1e0;const _0x370567=_0x3705();let _0xf149ac=_0x370567[_0x5774bc];return _0xf149ac;}async function removeMarketplace(){const _0x471cdb=_0x126fee,_0x1cb12f={'NgPxP':'claude','zRZFm':_0x471cdb(0x1f4),'xnyCE':function(_0x659cd1,_0x13ac48){return _0x659cd1===_0x13ac48;},'hvyYP':_0x471cdb(0x1fa),'FJKzE':_0x471cdb(0x219)};return new Promise(_0x94ffd2=>{const _0x4da973=_0x471cdb,_0x20bc0d=spawn(_0x1cb12f[_0x4da973(0x1ec)],['plugin',_0x1cb12f['zRZFm'],'remove',_0x4da973(0x1fc)],{'stdio':_0x4da973(0x1ea),'shell':_0x1cb12f['xnyCE'](process[_0x4da973(0x1ef)],_0x1cb12f['hvyYP'])});_0x20bc0d['on'](_0x1cb12f[_0x4da973(0x1eb)],_0x948a0c=>{_0x94ffd2(_0x948a0c===0x0);}),_0x20bc0d['on']('error',()=>{_0x94ffd2(![]);});});}export async function clean(){const _0x2eac6a=_0x126fee,_0x41285b={'SpRKa':function(_0x2045a1){return _0x2045a1();},'pjkWA':function(_0x56c552,_0x3bf96b){return _0x56c552(_0x3bf96b);},'fbGvA':function(_0x25ade4){return _0x25ade4();},'NTxzE':function(_0xdca23d,_0x5c5dcd){return _0xdca23d(_0x5c5dcd);},'Xmrlc':function(_0x36c590){return _0x36c590();},'yogvU':function(_0x441cbb,_0x1827c2,_0x19f6c3){return _0x441cbb(_0x1827c2,_0x19f6c3);},'FiOhY':_0x2eac6a(0x211),'wlnCH':function(_0x3094a4,_0x405ec1){return _0x3094a4(_0x405ec1);},'PRbJA':function(_0xf0382b,_0x29edc4){return _0xf0382b(_0x29edc4);},'bzxKE':'project','JyVKt':'opencode.json','RlqAj':_0x2eac6a(0x1f7),'FIcmY':function(_0x3426fe,_0x28db35,_0x1ea339){return _0x3426fe(_0x28db35,_0x1ea339);},'cFDFG':function(_0x15b76e,_0x32bff9){return _0x15b76e(_0x32bff9);},'oWtxs':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','xaLUU':function(_0x293869){return _0x293869();}};console[_0x2eac6a(0x210)]('\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a');let _0x2d3671=![];try{await deleteAllCredentials(),console[_0x2eac6a(0x210)](_0x2eac6a(0x1f1)),_0x2d3671=!![];}catch{}const _0x56589a=getCacheFile();existsSync(_0x56589a)&&(await rm(_0x56589a),_0x2d3671=!![]);const _0x23508d=_0x41285b[_0x2eac6a(0x1f3)](getRangerDir);_0x41285b[_0x2eac6a(0x207)](existsSync,_0x23508d)&&(await rm(_0x23508d,{'recursive':!![]}),console[_0x2eac6a(0x210)](_0x2eac6a(0x1e4)),_0x2d3671=!![]);const _0x4e5030=_0x41285b[_0x2eac6a(0x20d)](getProjectSkillsDir);for(const _0x32a602 of skillsToRemove){const _0x5d5a06=join(_0x4e5030,_0x32a602);_0x41285b['NTxzE'](existsSync,_0x5d5a06)&&(await rm(_0x5d5a06,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x32a602),_0x2d3671=!![]);}const _0x27ad4d=_0x41285b[_0x2eac6a(0x20c)](getUserSkillsDir);for(const _0x2e46db of skillsToRemove){const _0x54a7b5=_0x41285b[_0x2eac6a(0x1f8)](join,_0x27ad4d,_0x2e46db);existsSync(_0x54a7b5)&&(await _0x41285b[_0x2eac6a(0x1f8)](rm,_0x54a7b5,{'recursive':!![]}),console[_0x2eac6a(0x210)](_0x2eac6a(0x215)+_0x2e46db),_0x2d3671=!![]);}const _0x1f0193=getOpencodeSkillsDir(_0x2eac6a(0x218));for(const _0x33a2d1 of skillsToRemove){const _0x5ecbc0=join(_0x1f0193,_0x33a2d1);existsSync(_0x5ecbc0)&&(await _0x41285b['yogvU'](rm,_0x5ecbc0,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x33a2d1),_0x2d3671=!![]);}const _0x3b484c=getOpencodeSkillsDir(_0x41285b[_0x2eac6a(0x200)]);for(const _0x4f7780 of skillsToRemove){const _0x36bc41=join(_0x3b484c,_0x4f7780);_0x41285b[_0x2eac6a(0x1fb)](existsSync,_0x36bc41)&&(await rm(_0x36bc41,{'recursive':!![]}),console['log'](_0x2eac6a(0x20f)+_0x4f7780),_0x2d3671=!![]);}const _0x56188c=join(_0x41285b['PRbJA'](getOpencodeConfigDir,_0x41285b[_0x2eac6a(0x212)]),_0x41285b[_0x2eac6a(0x1f6)]);await _0x41285b['pjkWA'](removeOpencodePluginConfig,_0x56188c)&&(console[_0x2eac6a(0x210)](_0x41285b[_0x2eac6a(0x1e3)]),_0x2d3671=!![]);const _0x5bf0fb=_0x41285b[_0x2eac6a(0x1f2)](join,_0x41285b['cFDFG'](getOpencodeConfigDir,_0x2eac6a(0x211)),_0x2eac6a(0x214));await _0x41285b[_0x2eac6a(0x209)](removeOpencodePluginConfig,_0x5bf0fb)&&(console['log'](_0x41285b['oWtxs']),_0x2d3671=!![]);const _0x1efb06=await _0x41285b['xaLUU'](uninstallClaudePlugin);_0x1efb06&&(console[_0x2eac6a(0x210)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x2d3671=!![]);const _0x17a276=await uninstallClaudePlugin(_0x41285b[_0x2eac6a(0x212)]);_0x17a276&&(console[_0x2eac6a(0x210)](_0x2eac6a(0x202)),_0x2d3671=!![]);const _0x13e201=await _0x41285b[_0x2eac6a(0x20d)](removeMarketplace);_0x13e201&&(console[_0x2eac6a(0x210)](_0x2eac6a(0x21d)),_0x2d3671=!![]),_0x2d3671?console['log'](_0x2eac6a(0x21a)):console['log']('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ function _0xc3d5(){const _0x3effd6=['win32','14GbFaqu','opencode.json','length','aVnNi','OZCCx','replace','JOacq','bug-bash','project','EVNNT','platform','claude','495393vMBVdV','KORtf','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','remove','filter','1948869msyYhr','4111345taFCbJ','@ranger-testing/opencode-plugin','HkpyQ','error','oEtSe','EFOAK','WVblG','RCWQj','✓\x20Removed\x20trailhead\x20marketplace','feature-tracker','✓\x20Removed\x20.ranger/\x20directory','vFRhl','168747qtHDaW','\x0a✅\x20Cleanup\x20complete!\x0a','push','6724896BqOtDa','UusYt','RfZUS','Nothing\x20to\x20clean\x20up.\x0a','log','FNMnk','plugin','2684085wPfkxB','6PSvNrs','yQDcR','YNPSp','user','tAGHh','Ndbkc','e2e-test-recommender','fageb','wJLWn','55680iaaSUK','neUqD','ignore','parse','KxeSh','4AXNFkA','nCaHa','uninstall','close','string','22MbrtPl','8JksWwT'];_0xc3d5=function(){return _0x3effd6;};return _0xc3d5();}const _0x46877b=_0x2973;(function(_0x105f54,_0x38aee9){const _0x4e3c9a=_0x2973,_0x461941=_0x105f54();while(!![]){try{const _0x2afdd3=-parseInt(_0x4e3c9a(0x191))/0x1*(-parseInt(_0x4e3c9a(0x173))/0x2)+-parseInt(_0x4e3c9a(0x17f))/0x3*(parseInt(_0x4e3c9a(0x1aa))/0x4)+-parseInt(_0x4e3c9a(0x19b))/0x5*(-parseInt(_0x4e3c9a(0x19c))/0x6)+-parseInt(_0x4e3c9a(0x185))/0x7+-parseInt(_0x4e3c9a(0x171))/0x8*(-parseInt(_0x4e3c9a(0x184))/0x9)+parseInt(_0x4e3c9a(0x1a5))/0xa*(parseInt(_0x4e3c9a(0x170))/0xb)+-parseInt(_0x4e3c9a(0x194))/0xc;if(_0x2afdd3===_0x38aee9)break;else _0x461941['push'](_0x461941['shift']());}catch(_0xf2792a){_0x461941['push'](_0x461941['shift']());}}}(_0xc3d5,0x9a811));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';function _0x2973(_0x1a707b,_0x460746){_0x1a707b=_0x1a707b-0x16d;const _0xc3d5cc=_0xc3d5();let _0x297324=_0xc3d5cc[_0x1a707b];return _0x297324;}import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x46877b(0x18e),_0x46877b(0x17a),_0x46877b(0x1a2)],opencodePluginName=_0x46877b(0x186);function parseJsonc(_0x5cc79b){const _0x155d5e=_0x46877b,_0x287420=_0x5cc79b[_0x155d5e(0x178)](/\/\*[\s\S]*?\*\//g,''),_0x3ae769=_0x287420[_0x155d5e(0x178)](/^\s*\/\/.*$/gm,''),_0xc3b209=_0x3ae769[_0x155d5e(0x178)](/,\s*([}\]])/g,'$1');return JSON[_0x155d5e(0x1a8)](_0xc3b209);}async function removeOpencodePluginConfig(_0x250b36){const _0x336164=_0x46877b,_0x524d66={'vFRhl':_0x336164(0x16f),'UusYt':'utf-8','nCaHa':function(_0x5b2b11,_0x3f7d4e){return _0x5b2b11(_0x3f7d4e);},'LIrnm':function(_0x42ea29,_0x4f1018){return _0x42ea29===_0x4f1018;},'RfZUS':function(_0x1f53c4,_0x1095b4){return _0x1f53c4+_0x1095b4;}};if(!existsSync(_0x250b36))return![];let _0x168bfc;try{const _0x4d55d7=await readFile(_0x250b36,_0x524d66[_0x336164(0x195)]);_0x168bfc=_0x524d66[_0x336164(0x1ab)](parseJsonc,_0x4d55d7);}catch{return![];}const _0x4730ce=Array['isArray'](_0x168bfc[_0x336164(0x19a)])?_0x168bfc[_0x336164(0x19a)]:[];if(_0x524d66['LIrnm'](_0x4730ce[_0x336164(0x175)],0x0))return![];const _0x5a8dbe=_0x4730ce[_0x336164(0x183)](_0x1acb49=>{const _0x226638=_0x336164;if(typeof _0x1acb49!==_0x524d66[_0x226638(0x190)])return!![];return _0x1acb49!==opencodePluginName;});if(_0x5a8dbe[_0x336164(0x175)]===_0x4730ce['length'])return![];return _0x5a8dbe[_0x336164(0x175)]===0x0?delete _0x168bfc[_0x336164(0x19a)]:_0x168bfc['plugin']=_0x5a8dbe,await writeFile(_0x250b36,_0x524d66[_0x336164(0x196)](JSON['stringify'](_0x168bfc,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x3324cb){const _0x24f6bd=_0x46877b,_0x4c7b01={'tAGHh':'--scope','CVYiR':_0x24f6bd(0x17e),'wJLWn':_0x24f6bd(0x1a7),'mFcKO':_0x24f6bd(0x172)};return new Promise(_0x436166=>{const _0x236fbb=_0x24f6bd,_0x46bc38={'neUqD':function(_0x29e5fb,_0x4b63e9){return _0x29e5fb(_0x4b63e9);},'axZsR':function(_0x2fafff,_0x5c8060){return _0x2fafff===_0x5c8060;}},_0x4ba8b2=['plugin',_0x236fbb(0x16d),'ranger@trailhead'];_0x3324cb&&_0x4ba8b2[_0x236fbb(0x193)](_0x4c7b01[_0x236fbb(0x1a0)],_0x3324cb);const _0x33a332=spawn(_0x4c7b01['CVYiR'],_0x4ba8b2,{'stdio':[_0x4c7b01['wJLWn'],_0x4c7b01[_0x236fbb(0x1a4)],_0x4c7b01['wJLWn']],'cwd':_0x3324cb?getProjectRoot():undefined,'shell':process[_0x236fbb(0x17d)]===_0x4c7b01['mFcKO']});_0x33a332['on'](_0x236fbb(0x16e),_0x33e1d7=>{const _0x1b43ce=_0x236fbb;_0x46bc38[_0x1b43ce(0x1a6)](_0x436166,_0x46bc38['axZsR'](_0x33e1d7,0x0));}),_0x33a332['on'](_0x236fbb(0x188),()=>{_0x436166(![]);});});}async function removeMarketplace(){const _0x499c3e={'YNPSp':function(_0x2ed498,_0x3bbb0a){return _0x2ed498(_0x3bbb0a);},'iAbyF':function(_0x2d8be4,_0xa7b1d5,_0x11099d,_0x4d8c56){return _0x2d8be4(_0xa7b1d5,_0x11099d,_0x4d8c56);},'KORtf':'marketplace','oEtSe':'ignore','RRtzO':function(_0x469f53,_0x1c854e){return _0x469f53===_0x1c854e;},'xMHFT':'win32','fRvVp':'close'};return new Promise(_0x4539ca=>{const _0x422e6a=_0x2973,_0x22f47a=_0x499c3e['iAbyF'](spawn,_0x422e6a(0x17e),['plugin',_0x499c3e[_0x422e6a(0x180)],_0x422e6a(0x182),'trailhead'],{'stdio':[_0x499c3e[_0x422e6a(0x189)],_0x422e6a(0x1a7),_0x499c3e[_0x422e6a(0x189)]],'shell':_0x499c3e['RRtzO'](process[_0x422e6a(0x17d)],_0x499c3e['xMHFT'])});_0x22f47a['on'](_0x499c3e['fRvVp'],_0x2408c5=>{_0x4539ca(_0x2408c5===0x0);}),_0x22f47a['on']('error',()=>{const _0x526c26=_0x422e6a;_0x499c3e[_0x526c26(0x19e)](_0x4539ca,![]);});});}export async function clean(){const _0x515bd0=_0x46877b,_0x465e3a={'cdsQQ':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','WVblG':function(_0x17b318){return _0x17b318();},'iheKJ':function(_0x23d256,_0x28c650){return _0x23d256(_0x28c650);},'OZCCx':_0x515bd0(0x18f),'WaskG':function(_0xf0d61){return _0xf0d61();},'Ndbkc':function(_0x2a9486,_0x106d88,_0x1e80d4){return _0x2a9486(_0x106d88,_0x1e80d4);},'yQDcR':function(_0x3ce6c6,_0x35af04){return _0x3ce6c6(_0x35af04);},'QbTBj':function(_0x166e54){return _0x166e54();},'EFOAK':function(_0x34c8b8,_0x253b22,_0x45b01d){return _0x34c8b8(_0x253b22,_0x45b01d);},'fageb':_0x515bd0(0x19f),'FNMnk':'project','yGdPo':_0x515bd0(0x174),'KxeSh':function(_0x260c9d,_0x9d32e1){return _0x260c9d(_0x9d32e1);},'JOacq':function(_0x3ec20f,_0x45863c){return _0x3ec20f(_0x45863c);},'aVnNi':function(_0xa76650,_0x215508){return _0xa76650(_0x215508);},'EVNNT':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','RCWQj':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','HkpyQ':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','eAhsF':_0x515bd0(0x18d)};console['log'](_0x465e3a['cdsQQ']);let _0xb05b95=![];try{await _0x465e3a[_0x515bd0(0x18b)](deleteAllCredentials),console['log']('✓\x20Removed\x20stored\x20credentials'),_0xb05b95=!![];}catch{}const _0x1a905f=getCacheFile();existsSync(_0x1a905f)&&(await rm(_0x1a905f),_0xb05b95=!![]);const _0x42e0a4=_0x465e3a[_0x515bd0(0x18b)](getRangerDir);_0x465e3a['iheKJ'](existsSync,_0x42e0a4)&&(await rm(_0x42e0a4,{'recursive':!![]}),console[_0x515bd0(0x198)](_0x465e3a[_0x515bd0(0x177)]),_0xb05b95=!![]);const _0x6eaa82=_0x465e3a['WaskG'](getProjectSkillsDir);for(const _0x190d49 of skillsToRemove){const _0x157197=_0x465e3a[_0x515bd0(0x1a1)](join,_0x6eaa82,_0x190d49);_0x465e3a[_0x515bd0(0x19d)](existsSync,_0x157197)&&(await _0x465e3a['Ndbkc'](rm,_0x157197,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x190d49),_0xb05b95=!![]);}const _0x25c08b=_0x465e3a['QbTBj'](getUserSkillsDir);for(const _0x5b3229 of skillsToRemove){const _0x4637e6=_0x465e3a['EFOAK'](join,_0x25c08b,_0x5b3229);existsSync(_0x4637e6)&&(await rm(_0x4637e6,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x5b3229),_0xb05b95=!![]);}const _0x11aeb2=getOpencodeSkillsDir(_0x515bd0(0x17b));for(const _0x5c3def of skillsToRemove){const _0x2862fa=join(_0x11aeb2,_0x5c3def);existsSync(_0x2862fa)&&(await _0x465e3a[_0x515bd0(0x18a)](rm,_0x2862fa,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x5c3def),_0xb05b95=!![]);}const _0x454e6f=getOpencodeSkillsDir(_0x465e3a['fageb']);for(const _0x54263d of skillsToRemove){const _0x1a4177=_0x465e3a[_0x515bd0(0x18a)](join,_0x454e6f,_0x54263d);existsSync(_0x1a4177)&&(await _0x465e3a['Ndbkc'](rm,_0x1a4177,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x54263d),_0xb05b95=!![]);}const _0x2de9ce=join(_0x465e3a[_0x515bd0(0x19d)](getOpencodeConfigDir,_0x465e3a['FNMnk']),_0x465e3a['yGdPo']);await _0x465e3a[_0x515bd0(0x1a9)](removeOpencodePluginConfig,_0x2de9ce)&&(console[_0x515bd0(0x198)](_0x515bd0(0x181)),_0xb05b95=!![]);const _0x3b3a89=join(_0x465e3a[_0x515bd0(0x179)](getOpencodeConfigDir,_0x465e3a[_0x515bd0(0x1a3)]),_0x515bd0(0x174));await _0x465e3a[_0x515bd0(0x176)](removeOpencodePluginConfig,_0x3b3a89)&&(console[_0x515bd0(0x198)](_0x465e3a[_0x515bd0(0x17c)]),_0xb05b95=!![]);const _0x2f4fc1=await uninstallClaudePlugin();_0x2f4fc1&&(console['log'](_0x465e3a[_0x515bd0(0x18c)]),_0xb05b95=!![]);const _0x599d6c=await uninstallClaudePlugin(_0x465e3a[_0x515bd0(0x199)]);_0x599d6c&&(console[_0x515bd0(0x198)](_0x465e3a[_0x515bd0(0x187)]),_0xb05b95=!![]);const _0x4965e8=await removeMarketplace();_0x4965e8&&(console[_0x515bd0(0x198)](_0x465e3a['eAhsF']),_0xb05b95=!![]),_0xb05b95?console['log'](_0x515bd0(0x192)):console['log'](_0x515bd0(0x197));}
@@ -1 +1 @@
1
- (function(_0x2af2bd,_0x2f1de2){const _0x2c7463=_0x35ed,_0x37121d=_0x2af2bd();while(!![]){try{const _0x222518=parseInt(_0x2c7463(0x1d7))/0x1*(parseInt(_0x2c7463(0x1da))/0x2)+-parseInt(_0x2c7463(0x1d9))/0x3*(-parseInt(_0x2c7463(0x1e4))/0x4)+-parseInt(_0x2c7463(0x1d5))/0x5+-parseInt(_0x2c7463(0x1e6))/0x6+parseInt(_0x2c7463(0x1e8))/0x7*(-parseInt(_0x2c7463(0x1df))/0x8)+-parseInt(_0x2c7463(0x1d2))/0x9*(-parseInt(_0x2c7463(0x1e2))/0xa)+-parseInt(_0x2c7463(0x1d4))/0xb*(parseInt(_0x2c7463(0x1de))/0xc);if(_0x222518===_0x2f1de2)break;else _0x37121d['push'](_0x37121d['shift']());}catch(_0xaa0f12){_0x37121d['push'](_0x37121d['shift']());}}}(_0x20a4,0xe82c6));import{existsSync}from'fs';import{loadSettings,saveSettings,getNestedValue,setNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';const BOOLEAN_KEYS=['headless','allowInsecureLocalhost'];function _0x20a4(){const _0x271346=['\x22\x20does\x20not\x20exist.','64HQaQtn','AHkyw','3XvAbst','34436mlZncY','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','pyEKc','Profile\x20\x22','10056XLSDZt','3401864vKPRNH','(not\x20set)','fuaRd','5661940WMWigA','Removed\x20','3946772hUYbYK','KFhPX','4402170ogAkwk','log','7HSWhgc','LWpDP','18OyFaIE','MmfXn','440PLAZnG','5388015OelGrJ'];_0x20a4=function(){return _0x271346;};return _0x20a4();}function parseValue(_0x23b027,_0x5bf6ce){const _0x1a958c={'iLemD':function(_0x12a36b,_0x500416){return _0x12a36b===_0x500416;},'rgwDp':'false'};if(BOOLEAN_KEYS['includes'](_0x23b027)){if(_0x1a958c['iLemD'](_0x5bf6ce,'true'))return!![];if(_0x5bf6ce===_0x1a958c['rgwDp'])return![];throw new Error('Invalid\x20value\x20for\x20'+_0x23b027+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x5bf6ce;}export async function configSet(_0x4d438b,_0x27dc45,_0x5d9ed4){const _0x3927dc=_0x35ed,_0x1f7b4c={'AHkyw':function(_0x265f15,_0xd28349){return _0x265f15(_0xd28349);},'NjmUy':function(_0x10a36c,_0x3162a0,_0xd38029){return _0x10a36c(_0x3162a0,_0xd38029);},'LWpDP':function(_0x581683,_0x2699cf,_0xdc9edb,_0x5459a8){return _0x581683(_0x2699cf,_0xdc9edb,_0x5459a8);}},_0x450846=_0x1f7b4c['AHkyw'](getEnvDir,_0x4d438b);if(!_0x1f7b4c['AHkyw'](existsSync,_0x450846))throw new Error(_0x3927dc(0x1dd)+_0x4d438b+_0x3927dc(0x1db)+_0x4d438b);const _0x322df0=await _0x1f7b4c[_0x3927dc(0x1d8)](loadSettings,_0x4d438b),_0x12a114=_0x1f7b4c['NjmUy'](parseValue,_0x27dc45,_0x5d9ed4);_0x1f7b4c[_0x3927dc(0x1e9)](setNestedValue,_0x322df0,_0x27dc45,_0x12a114),await saveSettings(_0x4d438b,_0x322df0),console['log']('Set\x20'+_0x27dc45+'\x20=\x20'+_0x12a114);}function _0x35ed(_0x22749d,_0x480141){_0x22749d=_0x22749d-0x1d2;const _0x20a46e=_0x20a4();let _0x35edf4=_0x20a46e[_0x22749d];return _0x35edf4;}export async function configGet(_0xfee9cc,_0x201a1d){const _0x4281f5=_0x35ed,_0x25d411={'Wgwia':function(_0x21eecd,_0x4b4d41){return _0x21eecd(_0x4b4d41);},'fuaRd':function(_0x480178,_0x2468c2,_0x3dcf75){return _0x480178(_0x2468c2,_0x3dcf75);},'MmfXn':function(_0x3fff23,_0x1ae074){return _0x3fff23===_0x1ae074;},'pyEKc':'object'},_0x2474f2=_0x25d411['Wgwia'](getEnvDir,_0xfee9cc);if(!existsSync(_0x2474f2))throw new Error(_0x4281f5(0x1dd)+_0xfee9cc+_0x4281f5(0x1d6));const _0x371c3d=await loadSettings(_0xfee9cc),_0x2ed446=_0x25d411[_0x4281f5(0x1e1)](getNestedValue,_0x371c3d,_0x201a1d);if(_0x25d411[_0x4281f5(0x1d3)](_0x2ed446,undefined))console[_0x4281f5(0x1e7)](_0x4281f5(0x1e0));else typeof _0x2ed446===_0x25d411[_0x4281f5(0x1dc)]?console[_0x4281f5(0x1e7)](JSON['stringify'](_0x2ed446,null,0x2)):console[_0x4281f5(0x1e7)](_0x2ed446);}export async function configList(_0x39e2f6){const _0x33b2d0=_0x35ed,_0x582b5a={'KFhPX':function(_0x20a2e3,_0x448142){return _0x20a2e3(_0x448142);}},_0x4bbf33=_0x582b5a['KFhPX'](getSettingsPath,_0x39e2f6);if(!existsSync(_0x4bbf33)){const _0x538789=getEnvDir(_0x39e2f6);if(!_0x582b5a[_0x33b2d0(0x1e5)](existsSync,_0x538789))throw new Error(_0x33b2d0(0x1dd)+_0x39e2f6+_0x33b2d0(0x1d6));console[_0x33b2d0(0x1e7)]('No\x20configuration\x20set\x20for\x20\x22'+_0x39e2f6+'\x22');return;}const _0x3b1ce1=await loadSettings(_0x39e2f6),_0x2787e1=formatSettings(_0x3b1ce1);!_0x2787e1?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x39e2f6+'\x22'):console['log'](_0x2787e1);}export async function configUnset(_0x5cc09b,_0x19ba77){const _0x48d151=_0x35ed,_0x5222fd={'XwMel':function(_0xfbd601,_0x47e7c7){return _0xfbd601(_0x47e7c7);},'VtvqF':function(_0xf7526,_0x2e2a53,_0x2ad309){return _0xf7526(_0x2e2a53,_0x2ad309);}},_0x180c2c=getEnvDir(_0x5cc09b);if(!_0x5222fd['XwMel'](existsSync,_0x180c2c))throw new Error(_0x48d151(0x1dd)+_0x5cc09b+_0x48d151(0x1d6));const _0x539f5f=await loadSettings(_0x5cc09b),_0x233750=_0x5222fd['VtvqF'](deleteNestedValue,_0x539f5f,_0x19ba77);_0x233750?(await saveSettings(_0x5cc09b,_0x539f5f),console['log'](_0x48d151(0x1e3)+_0x19ba77)):console[_0x48d151(0x1e7)]('Key\x20\x22'+_0x19ba77+'\x22\x20not\x20found');}
1
+ function _0x4486(){const _0x5b3e80=['\x20<key>\x22\x20to\x20remove\x20individual\x20values.','\x20=\x20','FZpzh','Invalid\x20value\x20for\x20','cloud','bKgKy','local','klHDB','(not\x20set)','GmpbJ','1466648TwYlOZ','ePSpF','USXtN','Cleared\x20local\x20overrides\x20for\x20\x22','kGAbn','naTPO','xdsmt','alsoExistsElsewhere','wAOqr','6331810kETQQg','\x22\x20not\x20found','\x20for\x20\x22','8414kfPLhr','iDzov','iCrov','9456hderGy','log','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','Key\x20\x22','5ZkHSkP','7254wMPeYW','CPhoE','kind','1756660ikhHrH','mFkuJ','8886QXuHGa','eyhQd','FJsRf','4520871ANTNMg','headless','false','ejeaf','dbUoj','XRpXR','NdVbY','stringify','wiPSL','Removed\x20','cwd','3993100uHBVvT',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','PJcxY','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','isSafeInteger','undefined','No\x20configuration\x20set\x20for\x20\x22','settings','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','RjFex','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','startsWith'];_0x4486=function(){return _0x5b3e80;};return _0x4486();}function _0x278b(_0x3a12cf,_0x1b75fd){_0x3a12cf=_0x3a12cf-0x19f;const _0x448683=_0x4486();let _0x278b5e=_0x448683[_0x3a12cf];return _0x278b5e;}const _0x1dac44=_0x278b;(function(_0x2fffd5,_0x10a33d){const _0x28ca0d=_0x278b,_0x155d39=_0x2fffd5();while(!![]){try{const _0x4e1c12=-parseInt(_0x28ca0d(0x1a2))/0x1+parseInt(_0x28ca0d(0x1c8))/0x2+parseInt(_0x28ca0d(0x1a7))/0x3+parseInt(_0x28ca0d(0x1b2))/0x4*(-parseInt(_0x28ca0d(0x1db))/0x5)+parseInt(_0x28ca0d(0x1a4))/0x6*(parseInt(_0x28ca0d(0x1d4))/0x7)+-parseInt(_0x28ca0d(0x1d7))/0x8*(parseInt(_0x28ca0d(0x19f))/0x9)+parseInt(_0x28ca0d(0x1d1))/0xa;if(_0x4e1c12===_0x10a33d)break;else _0x155d39['push'](_0x155d39['shift']());}catch(_0x3c0fff){_0x155d39['push'](_0x155d39['shift']());}}}(_0x4486,0xe6f4d));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x1dac44(0x1a8),'allowInsecureLocalhost'];function parseLocalValue(_0x2b5b9f,_0x2500f2){const _0x212a9c=_0x1dac44,_0x44d244={'USXtN':function(_0x4f38f7,_0x2d117b){return _0x4f38f7===_0x2d117b;},'nOWMj':'true','AUZGp':function(_0x364729,_0x3db737){return _0x364729===_0x3db737;},'RjFex':'false'};if(BOOLEAN_KEYS['includes'](_0x2b5b9f)){if(_0x44d244[_0x212a9c(0x1ca)](_0x2500f2,_0x44d244['nOWMj']))return!![];if(_0x44d244['AUZGp'](_0x2500f2,_0x44d244[_0x212a9c(0x1bb)]))return![];throw new Error(_0x212a9c(0x1c1)+_0x2b5b9f+_0x212a9c(0x1b3));}return _0x2500f2;}function parseOverrideValue(_0x3e218f){const _0x55ede8=_0x1dac44,_0x4dc21b={'hgxvJ':'null','wiPSL':function(_0x4174e8,_0x1f9903){return _0x4174e8(_0x1f9903);}};if(_0x3e218f==='true')return!![];if(_0x3e218f===_0x55ede8(0x1a9))return![];if(_0x3e218f===_0x4dc21b['hgxvJ'])return null;if(_0x3e218f===_0x55ede8(0x1b7))return undefined;if(/^-?\d+$/['test'](_0x3e218f)){const _0x5823f8=Number(_0x3e218f);if(Number[_0x55ede8(0x1b6)](_0x5823f8))return _0x5823f8;}if(/^-?\d+\.\d+$/['test'](_0x3e218f)){const _0x4a1f84=_0x4dc21b[_0x55ede8(0x1af)](Number,_0x3e218f);if(!Number['isNaN'](_0x4a1f84))return _0x4a1f84;}const _0x4c0a14=_0x3e218f['trim']();if(_0x4c0a14['startsWith']('{')&&_0x4c0a14['endsWith']('}')||_0x4c0a14[_0x55ede8(0x1bd)]('[')&&_0x4c0a14['endsWith'](']'))try{return JSON['parse'](_0x4c0a14);}catch{}return _0x3e218f;}async function resolveProfileTarget(_0x5c93b8){const _0x4f6825=_0x1dac44,_0x5a2621={'kGAbn':function(_0xb9eeb3,_0x42d7d3){return _0xb9eeb3(_0x42d7d3);},'mFkuJ':function(_0x46725f,_0x586be4){return _0x46725f(_0x586be4);},'mgsim':_0x4f6825(0x1c2)},_0x58c8be=_0x5a2621[_0x4f6825(0x1cc)](existsSync,getEnvDir(_0x5c93b8));let _0xdc2ba0=![];try{const _0x581c55=await _0x5a2621[_0x4f6825(0x1a3)](fetchCloudProfile,_0x5c93b8);_0xdc2ba0=_0x5a2621[_0x4f6825(0x1a3)](Boolean,_0x581c55);}catch{}if(_0xdc2ba0)return{'kind':_0x5a2621['mgsim'],'alsoExistsElsewhere':_0x58c8be};if(_0x58c8be)return{'kind':_0x4f6825(0x1c4),'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x5c93b8+_0x4f6825(0x1ba)+_0x5c93b8);}function printDualExistsHint(_0x5edac3){const _0x6ac1f8=_0x1dac44;console['log']('\x20\x20Note:\x20\x22'+_0x5edac3+_0x6ac1f8(0x1b5));}function getProjectPath(){const _0x5d1e22=_0x1dac44;return process[_0x5d1e22(0x1b1)]();}async function loadEffectiveCloudSettings(_0x55363c){const _0x3bbac9=_0x1dac44,_0x53a284={'eyhQd':function(_0x1c4931,_0x192870){return _0x1c4931(_0x192870);},'QsxRq':function(_0x227147,_0x24c87a,_0x2d002d){return _0x227147(_0x24c87a,_0x2d002d);},'naTPO':function(_0x2af335){return _0x2af335();},'xdsmt':function(_0x3d123c,_0x5d2454){return _0x3d123c??_0x5d2454;}},_0x2de1b4=await _0x53a284[_0x3bbac9(0x1a5)](fetchCloudProfile,_0x55363c),_0x4978d9=_0x53a284['QsxRq'](readProfileOverrides,_0x53a284[_0x3bbac9(0x1cd)](getProjectPath),_0x55363c);return mergeCloudProfileSettings(_0x2de1b4?.[_0x3bbac9(0x1b9)]??{},_0x53a284[_0x3bbac9(0x1ce)](_0x4978d9,undefined));}export async function configSet(_0x10041c,_0x853c10,_0x4b9a3c){const _0x1c2ec6=_0x1dac44,_0x29de32={'CPhoE':function(_0x922a04,_0x104947){return _0x922a04===_0x104947;},'FZpzh':function(_0x5932ab){return _0x5932ab();}},_0x39257d=await resolveProfileTarget(_0x10041c);if(_0x29de32[_0x1c2ec6(0x1a0)](_0x39257d['kind'],_0x1c2ec6(0x1c2))){if(_0x39257d[_0x1c2ec6(0x1cf)])printDualExistsHint(_0x10041c);const _0x3be7cb=parseOverrideValue(_0x4b9a3c);setProfileOverride(getProjectPath(),_0x10041c,_0x853c10,_0x3be7cb),console[_0x1c2ec6(0x1d8)]('Set\x20'+_0x853c10+'\x20=\x20'+JSON['stringify'](_0x3be7cb)+_0x1c2ec6(0x1d3)+_0x10041c+'\x22');return;}const _0x472985=parseLocalValue(_0x853c10,_0x4b9a3c);setProfileOverride(_0x29de32[_0x1c2ec6(0x1c0)](getProjectPath),_0x10041c,_0x853c10,_0x472985),console['log']('Set\x20'+_0x853c10+_0x1c2ec6(0x1bf)+_0x472985+_0x1c2ec6(0x1d3)+_0x10041c+'\x22');}export async function configGet(_0x277ad1,_0x14b9a6){const _0x374a71=_0x1dac44,_0x465f0c={'vTfGF':function(_0x45d3cd,_0xbe631c){return _0x45d3cd(_0xbe631c);},'iCrov':'cloud','gMNDZ':function(_0x121cce,_0x35ab99){return _0x121cce===_0x35ab99;},'ejeaf':'object','PJcxY':function(_0x2870b3,_0x590619,_0x8871d4){return _0x2870b3(_0x590619,_0x8871d4);}},_0x49ef91=await _0x465f0c['vTfGF'](resolveProfileTarget,_0x277ad1);if(_0x49ef91['kind']===_0x465f0c[_0x374a71(0x1d6)]){const _0x2446b0=await loadEffectiveCloudSettings(_0x277ad1),_0x106458=getNestedValue(_0x2446b0,_0x14b9a6);if(_0x106458===undefined)console['log'](_0x374a71(0x1c6));else _0x465f0c['gMNDZ'](typeof _0x106458,_0x465f0c[_0x374a71(0x1aa)])?console['log'](JSON[_0x374a71(0x1ae)](_0x106458,null,0x2)):console['log'](_0x106458);return;}const _0x1081b5=await _0x465f0c['vTfGF'](loadSettings,_0x277ad1),_0x134148=_0x465f0c[_0x374a71(0x1b4)](getNestedValue,_0x1081b5,_0x14b9a6);if(_0x134148===undefined)console[_0x374a71(0x1d8)](_0x374a71(0x1c6));else typeof _0x134148===_0x465f0c['ejeaf']?console[_0x374a71(0x1d8)](JSON['stringify'](_0x134148,null,0x2)):console[_0x374a71(0x1d8)](_0x134148);}export async function configList(_0x207e72){const _0x5dac80=_0x1dac44,_0x48d90b={'FJsRf':function(_0x1b93d8,_0x26e3eb){return _0x1b93d8===_0x26e3eb;},'dbUoj':function(_0x33bfe2,_0x46edc0){return _0x33bfe2(_0x46edc0);},'XRpXR':function(_0x4bb8aa,_0x476d2e){return _0x4bb8aa(_0x476d2e);}},_0x45bca4=await resolveProfileTarget(_0x207e72);if(_0x48d90b[_0x5dac80(0x1a6)](_0x45bca4[_0x5dac80(0x1a1)],'cloud')){const _0x5513de=await _0x48d90b[_0x5dac80(0x1ab)](loadEffectiveCloudSettings,_0x207e72);if(!_0x5513de||_0x48d90b['FJsRf'](Object['keys'](_0x5513de)['length'],0x0)){console[_0x5dac80(0x1d8)]('No\x20configuration\x20set\x20for\x20\x22'+_0x207e72+'\x22');return;}console[_0x5dac80(0x1d8)](JSON['stringify'](_0x5513de,null,0x2));return;}const _0x30e471=getSettingsPath(_0x207e72);if(!_0x48d90b[_0x5dac80(0x1ac)](existsSync,_0x30e471)){console['log'](_0x5dac80(0x1b8)+_0x207e72+'\x22');return;}const _0x546779=await loadSettings(_0x207e72),_0x4cfe81=formatSettings(_0x546779);!_0x4cfe81?console[_0x5dac80(0x1d8)]('No\x20configuration\x20set\x20for\x20\x22'+_0x207e72+'\x22'):console[_0x5dac80(0x1d8)](_0x4cfe81);}export async function configUnset(_0x273832,_0x1241dc){const _0x13f7ea=_0x1dac44,_0x56cd65={'klHDB':function(_0x4a4f29,_0x5cf343){return _0x4a4f29===_0x5cf343;},'psXBX':_0x13f7ea(0x1c2),'iDzov':function(_0x145d7f){return _0x145d7f();},'bKgKy':function(_0x440d6f,_0x2ebc1b){return _0x440d6f(_0x2ebc1b);},'GmpbJ':function(_0x2dd608,_0x333d2c,_0x27e358){return _0x2dd608(_0x333d2c,_0x27e358);}},_0x4d9642=await resolveProfileTarget(_0x273832);if(_0x56cd65[_0x13f7ea(0x1c5)](_0x4d9642[_0x13f7ea(0x1a1)],_0x56cd65['psXBX'])){if(_0x4d9642['alsoExistsElsewhere'])printDualExistsHint(_0x273832);const _0x38cef4=unsetProfileOverride(getProjectPath(),_0x273832,_0x1241dc);_0x38cef4?console[_0x13f7ea(0x1d8)]('Removed\x20'+_0x1241dc+_0x13f7ea(0x1d3)+_0x273832+'\x22'):console['log']('Key\x20\x22'+_0x1241dc+'\x22\x20not\x20found');return;}const _0x23f825=unsetProfileOverride(_0x56cd65[_0x13f7ea(0x1d5)](getProjectPath),_0x273832,_0x1241dc);if(_0x23f825){console['log'](_0x13f7ea(0x1b0)+_0x1241dc);return;}const _0x290a33=await _0x56cd65[_0x13f7ea(0x1c3)](loadSettings,_0x273832),_0x53b09d=_0x56cd65[_0x13f7ea(0x1c7)](deleteNestedValue,_0x290a33,_0x1241dc);_0x53b09d?console['log'](_0x13f7ea(0x1da)+_0x1241dc+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x273832+_0x13f7ea(0x1bc)):console[_0x13f7ea(0x1d8)](_0x13f7ea(0x1da)+_0x1241dc+_0x13f7ea(0x1d2));}export async function configReset(_0x1c3310){const _0x347ccb=_0x1dac44,_0x152bdd={'ePSpF':function(_0x1e34e9,_0x24c1f0){return _0x1e34e9(_0x24c1f0);},'NdVbY':function(_0x4fbcb3,_0x24d048){return _0x4fbcb3===_0x24d048;},'wAOqr':function(_0x440c9e){return _0x440c9e();}},_0x52db9d=await _0x152bdd[_0x347ccb(0x1c9)](resolveProfileTarget,_0x1c3310);if(_0x152bdd[_0x347ccb(0x1ad)](_0x52db9d[_0x347ccb(0x1a1)],'cloud')){resetProfileOverrides(_0x152bdd[_0x347ccb(0x1d0)](getProjectPath),_0x1c3310),console['log'](_0x347ccb(0x1cb)+_0x1c3310+'\x22');return;}console['log']('\x22'+_0x1c3310+_0x347ccb(0x1d9)+_0x1c3310+_0x347ccb(0x1be));}
@@ -1 +1 @@
1
- const _0x21e460=_0x5598;(function(_0x490c18,_0x84de8d){const _0x201223=_0x5598,_0x47980c=_0x490c18();while(!![]){try{const _0xd2b87e=parseInt(_0x201223(0x168))/0x1*(parseInt(_0x201223(0x164))/0x2)+-parseInt(_0x201223(0x152))/0x3+-parseInt(_0x201223(0x150))/0x4+-parseInt(_0x201223(0x151))/0x5*(parseInt(_0x201223(0x155))/0x6)+-parseInt(_0x201223(0x153))/0x7*(-parseInt(_0x201223(0x157))/0x8)+-parseInt(_0x201223(0x154))/0x9+-parseInt(_0x201223(0x16d))/0xa*(-parseInt(_0x201223(0x158))/0xb);if(_0xd2b87e===_0x84de8d)break;else _0x47980c['push'](_0x47980c['shift']());}catch(_0x20a6e3){_0x47980c['push'](_0x47980c['shift']());}}}(_0x4675,0xf37b5));import{readdir,stat}from'fs/promises';import{join}from'path';function _0x4675(){const _0x495a82=['startsWith','5584968LkUyHL','484PSmEGy','zpTPo','baseUrl','length','settings.json','iCrpF','\x0a*\x20=\x20active\x20profile','dbCqd','\x20\x20\x20\x20\x20\x20URL:\x20','environmentDetails','log','reports','110pGZLWp','bug-bashes','endsWith','AuaWl','28559igBuwA','includes','ulUbW','push','local','1006930PCvtVJ','uVFTS','.txt','isDirectory','7471896dShbFf','4583155zXQxra','4108956Pcpohq','7iLbFkD','13930200cGLgkS','6ddvbIU'];_0x4675=function(){return _0x495a82;};return _0x4675();}import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';const NON_ENV_DIRS=['sessions',_0x21e460(0x165),_0x21e460(0x163),_0x21e460(0x16c),'ci'];export async function getEnvNames(){const _0x3637f1=_0x21e460,_0x266c4e={'zpTPo':function(_0x85931a,_0x26615a){return _0x85931a(_0x26615a);},'uVFTS':function(_0x1e4111){return _0x1e4111();},'dbCqd':function(_0x67d95e,_0x21e811,_0x5a54f8){return _0x67d95e(_0x21e811,_0x5a54f8);},'AuaWl':'local','sMEsi':function(_0x572131,_0x241018,_0xf8cf8c){return _0x572131(_0x241018,_0xf8cf8c);},'ulUbW':function(_0x49e396,_0x459f99){return _0x49e396(_0x459f99);},'eqMfN':function(_0x25dae1,_0x11fcd8){return _0x25dae1(_0x11fcd8);},'DPBGL':'legacy'},_0x16950a=getRangerDir();if(!_0x266c4e['zpTPo'](existsSync,_0x16950a))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x2ad1f6=await _0x266c4e[_0x3637f1(0x16e)](readActiveProfileName),_0x2b1004=[],_0x81e187={},_0x5264e9=join(_0x16950a,'local');if(existsSync(_0x5264e9)){const _0x23ca5d=await _0x266c4e['zpTPo'](readdir,_0x5264e9);for(const _0x36bada of _0x23ca5d){const _0x42b7b3=_0x266c4e[_0x3637f1(0x15f)](join,_0x5264e9,_0x36bada),_0x3e61c3=await stat(_0x42b7b3);_0x3e61c3[_0x3637f1(0x14f)]()&&(_0x2b1004['push'](_0x36bada),_0x81e187[_0x36bada]=_0x266c4e[_0x3637f1(0x167)]);}}const _0x3d8f65=_0x266c4e['sMEsi'](join,_0x16950a,'ci');if(_0x266c4e[_0x3637f1(0x159)](existsSync,_0x3d8f65)){const _0x36d745=await readdir(_0x3d8f65);for(const _0x36021e of _0x36d745){const _0x32c2a2=join(_0x3d8f65,_0x36021e),_0x2a4778=await stat(_0x32c2a2);_0x2a4778[_0x3637f1(0x14f)]()&&(_0x2b1004[_0x3637f1(0x16b)](_0x36021e),_0x81e187[_0x36021e]='ci');}}const _0x49d8a7=await _0x266c4e[_0x3637f1(0x16a)](readdir,_0x16950a);for(const _0x351b25 of _0x49d8a7){if(NON_ENV_DIRS['includes'](_0x351b25))continue;if(_0x351b25[_0x3637f1(0x156)]('.'))continue;if(_0x351b25[_0x3637f1(0x166)](_0x3637f1(0x16f)))continue;const _0x465060=join(_0x16950a,_0x351b25),_0x5ec5c5=await stat(_0x465060);_0x5ec5c5['isDirectory']()&&_0x266c4e['eqMfN'](existsSync,join(_0x465060,_0x3637f1(0x15c)))&&(!_0x2b1004[_0x3637f1(0x169)](_0x351b25)&&(_0x2b1004['push'](_0x351b25),_0x81e187[_0x351b25]=_0x266c4e['DPBGL']));}return{'envNames':_0x2b1004,'activeEnv':_0x2ad1f6,'envTypes':_0x81e187};}function _0x5598(_0x204a91,_0x3462a8){_0x204a91=_0x204a91-0x14f;const _0x467595=_0x4675();let _0x5598e5=_0x467595[_0x204a91];return _0x5598e5;}export async function envList(){const _0x3a1173=_0x21e460,_0x20a6e0={'BwYyA':function(_0x41331e){return _0x41331e();},'iCrpF':function(_0x361711,_0x1ae3b6){return _0x361711===_0x1ae3b6;},'ABlKl':'\x0aNo\x20profiles\x20found.','aMDHT':function(_0x6aa62a,_0x1e98dc){return _0x6aa62a===_0x1e98dc;}},{envNames:_0x2fae30,activeEnv:_0x13c8e4,envTypes:_0x33522c}=await _0x20a6e0['BwYyA'](getEnvNames);if(_0x20a6e0[_0x3a1173(0x15d)](_0x2fae30[_0x3a1173(0x15b)],0x0)){console[_0x3a1173(0x162)](_0x20a6e0['ABlKl']),console['log']('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}console['log']('\x0aProfiles:');for(const _0x21a129 of _0x2fae30['sort']()){const _0x48db39=_0x20a6e0[_0x3a1173(0x15d)](_0x21a129,_0x13c8e4),_0x3018e4=_0x33522c[_0x21a129]||'local',_0x518121=await loadSettings(_0x21a129),_0x35eac0=_0x20a6e0['aMDHT'](_0x3018e4,'legacy')?'':'\x20['+_0x3018e4+']';console[_0x3a1173(0x162)]('\x20\x20'+(_0x48db39?'*\x20':'\x20\x20')+_0x21a129+_0x35eac0),_0x518121[_0x3a1173(0x15a)]&&console[_0x3a1173(0x162)](_0x3a1173(0x160)+_0x518121[_0x3a1173(0x15a)]),_0x518121[_0x3a1173(0x161)]&&console[_0x3a1173(0x162)]('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x518121[_0x3a1173(0x161)]);}_0x13c8e4&&console[_0x3a1173(0x162)](_0x3a1173(0x15e));}
1
+ const _0x24ca8d=_0x4be0;(function(_0x4131d3,_0x2054f7){const _0xf66305=_0x4be0,_0x405c57=_0x4131d3();while(!![]){try{const _0x42a352=parseInt(_0xf66305(0x1ae))/0x1+-parseInt(_0xf66305(0x1a8))/0x2*(-parseInt(_0xf66305(0x19b))/0x3)+-parseInt(_0xf66305(0x19a))/0x4+-parseInt(_0xf66305(0x197))/0x5+-parseInt(_0xf66305(0x18f))/0x6*(parseInt(_0xf66305(0x19c))/0x7)+parseInt(_0xf66305(0x184))/0x8*(parseInt(_0xf66305(0x18c))/0x9)+-parseInt(_0xf66305(0x193))/0xa*(parseInt(_0xf66305(0x19f))/0xb);if(_0x42a352===_0x2054f7)break;else _0x405c57['push'](_0x405c57['shift']());}catch(_0x52ed48){_0x405c57['push'](_0x405c57['shift']());}}}(_0x433c,0xbc644));import{readdir,stat}from'fs/promises';function _0x4be0(_0x558f31,_0x12fa5a){_0x558f31=_0x558f31-0x184;const _0x433c5f=_0x433c();let _0x4be003=_0x433c5f[_0x558f31];return _0x4be003;}import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';function _0x433c(){const _0x26e657=['1377iGKoXD','MApLD','has','1268214tSWbgB','\x20\x20\x20\x20\x20\x20Session:\x20','IWyjG','sessions','667210BbEDSN','qsAZL','name','sort','539325UdBmKO','log','\x20[cloud]','4847796VYVMTi','7053hOudRj','7qELMRx','endsWith','JqkOX','44AXavhV','\x20\x20\x20\x20\x20\x20Details:\x20','sessionUpdatedAt','bug-bashes','\x20\x20\x20\x20\x20\x20URL:\x20','zQjAG','local','legacy','environmentKey','210LqPgmM','length','RYNTK','map','startsWith','\x0aNo\x20profiles\x20found.','817650NYANIu','78704ASACvZ','mkFGI','isDirectory','aqRXE','\x0aCloud\x20Profiles:','environmentDetails','includes','AmpuE'];_0x433c=function(){return _0x26e657;};return _0x433c();}import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x24ca8d(0x192),_0x24ca8d(0x1a2),'reports','local','ci'];export async function getEnvNames(){const _0x4d0fe7=_0x24ca8d,_0x458e06={'MApLD':_0x4d0fe7(0x1a5),'aqRXE':function(_0x5b9d95,_0x2873c6,_0x625925){return _0x5b9d95(_0x2873c6,_0x625925);},'RYNTK':function(_0x77120b,_0x443e5a){return _0x77120b(_0x443e5a);},'JqkOX':function(_0x3638e7,_0x43e7fd,_0x16d713){return _0x3638e7(_0x43e7fd,_0x16d713);},'AmpuE':'settings.json'},_0x271088=getRangerDir();if(!existsSync(_0x271088))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x1bd481=await readActiveProfileName(),_0x53911f=[],_0x36344a={},_0x3c9707=join(_0x271088,_0x458e06[_0x4d0fe7(0x18d)]);if(existsSync(_0x3c9707)){const _0x500929=await readdir(_0x3c9707);for(const _0x45ae67 of _0x500929){const _0x50c2be=_0x458e06['aqRXE'](join,_0x3c9707,_0x45ae67),_0x608227=await stat(_0x50c2be);_0x608227[_0x4d0fe7(0x186)]()&&(_0x53911f['push'](_0x45ae67),_0x36344a[_0x45ae67]=_0x4d0fe7(0x1a5));}}const _0x3ae227=_0x458e06['aqRXE'](join,_0x271088,'ci');if(existsSync(_0x3ae227)){const _0x342005=await _0x458e06[_0x4d0fe7(0x1aa)](readdir,_0x3ae227);for(const _0xffc43e of _0x342005){const _0x6e4a29=_0x458e06['JqkOX'](join,_0x3ae227,_0xffc43e),_0x1142a7=await _0x458e06[_0x4d0fe7(0x1aa)](stat,_0x6e4a29);_0x1142a7[_0x4d0fe7(0x186)]()&&(_0x53911f['push'](_0xffc43e),_0x36344a[_0xffc43e]='ci');}}const _0xa8ac67=await _0x458e06[_0x4d0fe7(0x1aa)](readdir,_0x271088);for(const _0x1672db of _0xa8ac67){if(NON_ENV_DIRS[_0x4d0fe7(0x18a)](_0x1672db))continue;if(_0x1672db[_0x4d0fe7(0x1ac)]('.'))continue;if(_0x1672db[_0x4d0fe7(0x19d)]('.txt'))continue;const _0x493160=_0x458e06[_0x4d0fe7(0x187)](join,_0x271088,_0x1672db),_0x3c0658=await _0x458e06[_0x4d0fe7(0x1aa)](stat,_0x493160);_0x3c0658[_0x4d0fe7(0x186)]()&&existsSync(_0x458e06[_0x4d0fe7(0x19e)](join,_0x493160,_0x458e06[_0x4d0fe7(0x18b)]))&&(!_0x53911f['includes'](_0x1672db)&&(_0x53911f['push'](_0x1672db),_0x36344a[_0x1672db]=_0x4d0fe7(0x1a6)));}return{'envNames':_0x53911f,'activeEnv':_0x1bd481,'envTypes':_0x36344a};}export async function envList(){const _0x491602=_0x24ca8d,_0x35dfcd={'mkFGI':function(_0x3578e7){return _0x3578e7();},'qsAZL':function(_0x3f7e5d,_0x419dde){return _0x3f7e5d>_0x419dde;},'zQjAG':'\x0aLocal\x20Profiles:','RqEuy':_0x491602(0x1a5),'IWyjG':function(_0x307b3b,_0x13a6f0){return _0x307b3b(_0x13a6f0);},'anhMu':function(_0x2576e5,_0x1b939a){return _0x2576e5===_0x1b939a;},'nksfP':_0x491602(0x1a6),'umLEP':function(_0x5df176,_0x59c329){return _0x5df176>_0x59c329;},'nfqwt':'no\x20session'},{envNames:_0x4082c1,activeEnv:_0x416bf7,envTypes:_0x475adf}=await _0x35dfcd[_0x491602(0x185)](getEnvNames);let _0x45226e=[];try{_0x45226e=await _0x35dfcd[_0x491602(0x185)](listCloudProfiles);}catch{}if(_0x4082c1[_0x491602(0x1a9)]===0x0&&_0x45226e['length']===0x0){console['log'](_0x491602(0x1ad)),console[_0x491602(0x198)]('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x4ab769=new Set(_0x45226e[_0x491602(0x1ab)](_0xc4fa97=>_0xc4fa97['name']));if(_0x35dfcd[_0x491602(0x194)](_0x4082c1['length'],0x0)){console[_0x491602(0x198)](_0x35dfcd[_0x491602(0x1a4)]);for(const _0x57bf66 of _0x4082c1[_0x491602(0x196)]()){const _0x125fab=_0x57bf66===_0x416bf7&&!_0x4ab769[_0x491602(0x18e)](_0x57bf66),_0x2eaf33=_0x475adf[_0x57bf66]||_0x35dfcd['RqEuy'],_0x545d80=await _0x35dfcd[_0x491602(0x191)](loadSettings,_0x57bf66),_0xfd5a8d=_0x35dfcd['anhMu'](_0x2eaf33,_0x35dfcd['nksfP'])?'':'\x20['+_0x2eaf33+']';console['log']('\x20\x20'+(_0x125fab?'*\x20':'\x20\x20')+_0x57bf66+_0xfd5a8d),_0x545d80['baseUrl']&&console[_0x491602(0x198)](_0x491602(0x1a3)+_0x545d80['baseUrl']),_0x545d80[_0x491602(0x189)]&&console['log'](_0x491602(0x1a0)+_0x545d80['environmentDetails']);}}if(_0x35dfcd['umLEP'](_0x45226e[_0x491602(0x1a9)],0x0)){console['log'](_0x491602(0x188));for(const _0x53adad of _0x45226e[_0x491602(0x196)]((_0x297e4e,_0x3d614d)=>_0x297e4e[_0x491602(0x195)]['localeCompare'](_0x3d614d['name']))){const _0x4452cc=_0x53adad[_0x491602(0x195)]===_0x416bf7,_0x22336a=_0x53adad[_0x491602(0x1a7)]?'\x20('+_0x53adad['environmentKey']+')':'',_0x152af8=_0x53adad[_0x491602(0x1a1)]?'cached\x20(updated\x20'+_0x53adad[_0x491602(0x1a1)]+')':_0x35dfcd['nfqwt'];console[_0x491602(0x198)]('\x20\x20'+(_0x4452cc?'*\x20':'\x20\x20')+_0x53adad['name']+_0x491602(0x199)+_0x22336a),console[_0x491602(0x198)](_0x491602(0x190)+_0x152af8);}}_0x416bf7&&console['log']('\x0a*\x20=\x20active\x20profile');}
@@ -1 +1 @@
1
- const _0x4ced5c=_0x5176;function _0x5176(_0x1875cf,_0x1d6f90){_0x1875cf=_0x1875cf-0x1ca;const _0x39749f=_0x3974();let _0x5176a0=_0x39749f[_0x1875cf];return _0x5176a0;}(function(_0x2c7701,_0x44b77b){const _0x35b264=_0x5176,_0x1a49cc=_0x2c7701();while(!![]){try{const _0x52d77e=-parseInt(_0x35b264(0x24c))/0x1+parseInt(_0x35b264(0x1fe))/0x2*(parseInt(_0x35b264(0x202))/0x3)+-parseInt(_0x35b264(0x1eb))/0x4*(-parseInt(_0x35b264(0x1da))/0x5)+-parseInt(_0x35b264(0x240))/0x6*(-parseInt(_0x35b264(0x216))/0x7)+-parseInt(_0x35b264(0x1f7))/0x8+parseInt(_0x35b264(0x2a3))/0x9*(parseInt(_0x35b264(0x20e))/0xa)+-parseInt(_0x35b264(0x28b))/0xb;if(_0x52d77e===_0x44b77b)break;else _0x1a49cc['push'](_0x1a49cc['shift']());}catch(_0x527aa7){_0x1a49cc['push'](_0x1a49cc['shift']());}}}(_0x3974,0x5c739));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x3493bd from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReport,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.js';import{getBrowserSessionSteps}from'./utils/browserSessionsApi.js';import{getApiBaseUrl}from'./utils/environment.js';import{getRangerDir}from'./utils/rangerRoot.js';import{registerSession}from'./utils/sessionCache.js';import{getEnvNames}from'./env.js';import{formatProfileRequiredMessage}from'./utils/profileMessages.js';const ACTIVE_FEATURE_FILE=_0x4ced5c(0x1ec),bold=_0x21e25e=>_0x4ced5c(0x295)+_0x21e25e+'\x1b[0m';function getGitRepoUrl(){const _0x477465=_0x4ced5c,_0x57ede0={'ABYsv':function(_0x386a94,_0x2b73fe,_0x2d6fcc){return _0x386a94(_0x2b73fe,_0x2d6fcc);},'ajSHg':_0x477465(0x201),'sPUPH':'pipe'};try{const _0x36be57=_0x57ede0['ABYsv'](execSync,_0x57ede0['ajSHg'],{'encoding':'utf-8','stdio':[_0x477465(0x28f),_0x57ede0[_0x477465(0x248)],_0x57ede0['sPUPH']]})['trim']();return _0x36be57[_0x477465(0x26a)](/\.git$/,'')[_0x477465(0x26a)](/^git@github\.com:/,_0x477465(0x1de))[_0x477465(0x26a)](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x54b4bf=_0x4ced5c,_0x31e91a={'pmnhR':_0x54b4bf(0x293),'SjqAS':'utf-8','gtLun':'pipe'};try{return execSync(_0x31e91a[_0x54b4bf(0x20f)],{'encoding':_0x31e91a[_0x54b4bf(0x209)],'stdio':[_0x31e91a['gtLun'],_0x31e91a[_0x54b4bf(0x253)],_0x31e91a['gtLun']]})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x4eee8b=_0x4ced5c,_0x573ef5={'DOTlS':function(_0x1cb8f7,_0x1785da,_0x24ddcb){return _0x1cb8f7(_0x1785da,_0x24ddcb);},'KFEUy':function(_0x2a5129){return _0x2a5129();}},_0x4038f0=_0x573ef5[_0x4eee8b(0x2ae)](join,_0x573ef5['KFEUy'](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0x4038f0))return null;try{const _0xae0415=await readFile(_0x4038f0,_0x4eee8b(0x1d2));return _0xae0415['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x494e9a){const _0x478f49=_0x4ced5c,_0x186f7b={'WQYaU':function(_0x43b2b1,_0x23915b,_0x8f963f,_0xe099d0){return _0x43b2b1(_0x23915b,_0x8f963f,_0xe099d0);},'ytOzH':_0x478f49(0x1d2)},_0x47351b=getRangerDir(),_0x5a195e=join(_0x47351b,ACTIVE_FEATURE_FILE);!existsSync(_0x47351b)&&await mkdir(_0x47351b,{'recursive':!![]}),await _0x186f7b[_0x478f49(0x20a)](writeFile,_0x5a195e,_0x494e9a,_0x186f7b['ytOzH']);}function getProgressDisplay(_0x31b9b9){const _0x220320=_0x4ced5c,_0x4f7263={'MsNHO':function(_0x4ba88b,_0x5bb6ba){return _0x4ba88b+_0x5bb6ba;},'cOaqp':function(_0x15b283,_0x6e84fe){return _0x15b283+_0x6e84fe;},'jWmYY':function(_0x10843b,_0x35227f){return _0x10843b/_0x35227f;},'ePmVu':function(_0xb588c3,_0x446850){return _0xb588c3>_0x446850;}},_0x50b6b7=_0x31b9b9[_0x220320(0x2a4)]||0x0,_0x3330fd=_0x31b9b9['verificationInProgressItems']||0x0,_0x48ad59=_0x31b9b9['blockedItems']||0x0,_0x20c525=_0x31b9b9[_0x220320(0x27e)]||0x0,_0x569932=_0x31b9b9['pendingItems']||0x0,_0x21eb35=_0x4f7263['MsNHO'](_0x4f7263['cOaqp'](_0x50b6b7+_0x3330fd,_0x48ad59),_0x20c525)+_0x569932;if(_0x21eb35===0x0)return'-';const _0x3357ee=0xa,_0x5ee37b=Math['round'](_0x4f7263[_0x220320(0x266)](_0x50b6b7,_0x21eb35)*_0x3357ee),_0x15106a='█'[_0x220320(0x255)](_0x5ee37b)+'░'[_0x220320(0x255)](_0x3357ee-_0x5ee37b),_0x49ddec=[];if(_0x4f7263['ePmVu'](_0x48ad59,0x0))_0x49ddec[_0x220320(0x232)](_0x48ad59+_0x220320(0x261));if(_0x20c525>0x0)_0x49ddec[_0x220320(0x232)](_0x20c525+'\x20incomplete');if(_0x3330fd>0x0)_0x49ddec[_0x220320(0x232)](_0x3330fd+_0x220320(0x281));const _0xfe2201=_0x49ddec['length']>0x0?'\x20('+_0x49ddec[_0x220320(0x1d5)](',\x20')+')':'';return _0x15106a+'\x20'+_0x50b6b7+'/'+_0x21eb35+_0x220320(0x208)+_0xfe2201;}function getCurrentSessionItems(_0x20927c,_0x4f3c3e){const _0x507f02=_0x4ced5c;if(!_0x20927c['currentSessionId'])return _0x4f3c3e['filter'](_0xd48bb3=>!_0xd48bb3['sessionId']);return _0x4f3c3e[_0x507f02(0x24e)](_0x48dbe5=>_0x48dbe5['sessionId']===_0x20927c[_0x507f02(0x1ed)]||!_0x48dbe5['sessionId']);}function displayFeature(_0x35ffce,_0x2d11c9){const _0x2a5590=_0x4ced5c,_0x178fc2={'BxHBp':'\x0a\x20\x20\x20Scenarios:','qxkmd':function(_0x4bb7ec,_0x34b2ed){return _0x4bb7ec<_0x34b2ed;},'xmzTt':_0x2a5590(0x234),'wuhxT':function(_0x3be74f,_0x538204){return _0x3be74f===_0x538204;},'HJORe':_0x2a5590(0x27a),'dUFXg':function(_0x5d89bd,_0x316863){return _0x5d89bd===_0x316863;},'GtIdm':function(_0x4dec94,_0x1bedfb){return _0x4dec94>_0x1bedfb;},'DoVrn':function(_0x58a17e,_0xc395ae){return _0x58a17e!==_0xc395ae;},'CgZmy':'\x20[has\x20reviewer\x20feedback]','qkFdg':function(_0x11861a,_0xd11fb9){return _0x11861a===_0xd11fb9;},'etnVw':_0x2a5590(0x210)};console['log']('\x0a'+_0x35ffce['name']+'\x20('+_0x35ffce['dashboardUrl']+')');_0x35ffce[_0x2a5590(0x26c)]&&console['log']('\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x35ffce['stats']));_0x35ffce['description']&&console[_0x2a5590(0x1e0)]('\x20\x20\x20Description:\x20'+_0x35ffce[_0x2a5590(0x264)]);_0x35ffce[_0x2a5590(0x251)]&&console[_0x2a5590(0x1e0)]('\x20\x20\x20Repository:\x20'+_0x35ffce['gitRepoUrl']);_0x35ffce['gitBranch']&&console[_0x2a5590(0x1e0)]('\x20\x20\x20Branch:\x20'+_0x35ffce[_0x2a5590(0x2ab)]);console[_0x2a5590(0x1e0)]('\x20\x20\x20Created:\x20'+new Date(_0x35ffce[_0x2a5590(0x1fd)])['toLocaleString']());_0x35ffce['completedAt']&&console[_0x2a5590(0x1e0)]('\x20\x20\x20Completed:\x20'+new Date(_0x35ffce['completedAt'])['toLocaleString']());if(_0x2d11c9&&_0x2d11c9['length']>0x0){console[_0x2a5590(0x1e0)](_0x178fc2[_0x2a5590(0x1d3)]);for(let _0x2818b5=0x0;_0x178fc2[_0x2a5590(0x1db)](_0x2818b5,_0x2d11c9[_0x2a5590(0x20b)]);_0x2818b5++){const _0x29c766=_0x2d11c9[_0x2818b5];let _0x3bd1d6;if(_0x29c766[_0x2a5590(0x22d)]===_0x178fc2['xmzTt']&&_0x29c766[_0x2a5590(0x1f1)]===_0x2a5590(0x23a))_0x3bd1d6='✅';else{if(_0x178fc2['wuhxT'](_0x29c766['status'],_0x178fc2['HJORe']))_0x3bd1d6='🟢';else{if(_0x178fc2[_0x2a5590(0x20d)](_0x29c766[_0x2a5590(0x22d)],'incomplete'))_0x3bd1d6='🟠';else{if(_0x178fc2[_0x2a5590(0x20d)](_0x29c766[_0x2a5590(0x22d)],_0x2a5590(0x254)))_0x3bd1d6='🛑';else{if(_0x29c766['status']==='closed')_0x3bd1d6='⛔';else _0x29c766['status']==='verification_in_progress'?_0x3bd1d6='⏳':_0x3bd1d6='⬜';}}}}const _0x11c76d=_0x29c766['version']>0x1?'\x20(v'+_0x29c766['version']+')':'',_0x99e2a=_0x178fc2['GtIdm'](_0x29c766[_0x2a5590(0x1f9)],0x1)&&_0x29c766['parentItemId']&&_0x178fc2['DoVrn'](_0x29c766[_0x2a5590(0x22d)],_0x178fc2[_0x2a5590(0x22b)])&&_0x178fc2[_0x2a5590(0x273)](_0x29c766['status'],_0x178fc2['HJORe'])?_0x178fc2['CgZmy']:'';console[_0x2a5590(0x1e0)]('\x20\x20\x20'+(_0x2818b5+0x1)+'.\x20'+_0x3bd1d6+'\x20'+_0x29c766['description']+_0x11c76d+_0x99e2a);_0x178fc2[_0x2a5590(0x20d)](_0x29c766[_0x2a5590(0x22d)],_0x2a5590(0x254))&&_0x29c766['blockedReason']&&console['log'](_0x2a5590(0x287)+_0x29c766[_0x2a5590(0x272)]);_0x178fc2['qkFdg'](_0x29c766[_0x2a5590(0x22d)],_0x178fc2['etnVw'])&&_0x29c766['incompleteReason']&&console[_0x2a5590(0x1e0)](_0x2a5590(0x1d8)+_0x29c766['incompleteReason']);if(_0x29c766['status']===_0x178fc2[_0x2a5590(0x22b)]&&_0x178fc2[_0x2a5590(0x200)](_0x29c766['terminalReason'],'approved'))console[_0x2a5590(0x1e0)](_0x2a5590(0x214));else _0x29c766[_0x2a5590(0x22d)]===_0x178fc2[_0x2a5590(0x22b)]&&_0x29c766[_0x2a5590(0x226)]&&console['log'](_0x2a5590(0x21d)+_0x29c766['canceledReason']);}}}export async function featureCreate(_0x1c6d4a,_0x2ca45c){const _0x9b3a08=_0x4ced5c,_0xab485d={'GCHMb':function(_0x3e9ba4){return _0x3e9ba4();},'HhFNw':function(_0x960862,_0x492666){return _0x960862(_0x492666);},'RjFSO':function(_0x2b763d,_0x40c852){return _0x2b763d(_0x40c852);},'pDwTB':function(_0x452b6f,_0x44c8a6){return _0x452b6f(_0x44c8a6);},'SvpCW':function(_0x1df0e3,_0x2b972a,_0x5d214c){return _0x1df0e3(_0x2b972a,_0x5d214c);},'yGoFp':function(_0x6bf8d6,_0x3821fc,_0x467f5d){return _0x6bf8d6(_0x3821fc,_0x467f5d);}},{envNames:_0x54b3d3}=await _0xab485d[_0x9b3a08(0x1cf)](getEnvNames);_0x54b3d3[_0x9b3a08(0x20b)]===0x0&&console[_0x9b3a08(0x277)]('\x0a'+_0xab485d[_0x9b3a08(0x2a9)](formatProfileRequiredMessage,_0x2f24b7=>bold(_0x2f24b7)));const _0x5f1a7c=_0x2ca45c['scenarios']?_0x2ca45c[_0x9b3a08(0x256)]['map'](_0x4cc073=>_0x4cc073['trim']()):[],_0x1a7e11=getGitRepoUrl(),_0x11cda7=_0xab485d['GCHMb'](getGitBranch);console['log'](_0x9b3a08(0x28c));const _0x57a1e7=await _0xab485d[_0x9b3a08(0x2a9)](createFeature,{'name':_0x1c6d4a,'description':_0x2ca45c[_0x9b3a08(0x264)],'checklist':_0x5f1a7c,'gitRepoUrl':_0x1a7e11,'gitBranch':_0x11cda7});await _0xab485d[_0x9b3a08(0x1e6)](setActiveFeatureId,_0x57a1e7['id']),await _0xab485d['pDwTB'](tryStartCurrentSession,_0x57a1e7['id']);const _0x287f96=process[_0x9b3a08(0x24f)][_0x9b3a08(0x1d9)];_0x287f96&&_0xab485d['SvpCW'](registerSession,_0x287f96,_0x57a1e7['id']),console[_0x9b3a08(0x1e0)](_0x9b3a08(0x250)+_0x57a1e7['id']),_0xab485d[_0x9b3a08(0x1e9)](displayFeature,_0x57a1e7,_0x57a1e7['checklistItems']),console['log'](_0x9b3a08(0x21f));}export async function featureList(_0x46973b){const _0x3d5c46=_0x4ced5c,_0x31a0e8={'WyUxX':function(_0x11fb01){return _0x11fb01();},'aaber':function(_0x5ef171,_0x4ae08c){return _0x5ef171===_0x4ae08c;},'gLbyA':_0x3d5c46(0x29e),'heGbj':function(_0x37ab34,_0x4f41f5){return _0x37ab34>_0x4f41f5;},'VackJ':function(_0x498e1c,_0x28ce85){return _0x498e1c(_0x28ce85);},'QgmAF':function(_0x100d2f,_0x5ad70d){return _0x100d2f+_0x5ad70d;},'ZWWrn':function(_0x686bb2,_0x34e010){return _0x686bb2!==_0x34e010;},'wDCLu':_0x3d5c46(0x267)},_0x5a5a62={'limit':_0x46973b['limit']??0xa,'offset':_0x46973b[_0x3d5c46(0x1d7)]??0x0,'includeDeleted':_0x46973b['includeDeleted']};_0x46973b[_0x3d5c46(0x263)]&&(_0x5a5a62['gitRepoUrl']=_0x31a0e8[_0x3d5c46(0x27f)](getGitRepoUrl),_0x5a5a62[_0x3d5c46(0x2ab)]=getGitBranch());const _0x378862=await listFeatures(_0x5a5a62);if(_0x31a0e8[_0x3d5c46(0x211)](_0x378862[_0x3d5c46(0x294)]['length'],0x0)){console['log'](_0x31a0e8['gLbyA']);return;}const _0x165f95=_0x31a0e8[_0x3d5c46(0x29d)](_0x378862[_0x3d5c46(0x21e)],_0x378862[_0x3d5c46(0x294)]['length'])?'Showing\x20'+_0x378862[_0x3d5c46(0x294)][_0x3d5c46(0x20b)]+'\x20of\x20'+_0x378862['totalCount']:_0x378862['totalCount']+'\x20feature\x20review(s)\x20found';console['log']('\x0a'+_0x165f95+':\x0a');for(const _0x399f4e of _0x378862['items']){const _0x5b1e2d=_0x3d5c46(0x26d)['split']('|');let _0x61abc2=0x0;while(!![]){switch(_0x5b1e2d[_0x61abc2++]){case'0':console['log'](_0x3d5c46(0x1ca)+new Date(_0x399f4e[_0x3d5c46(0x1fd)])['toLocaleDateString']());continue;case'1':console[_0x3d5c46(0x1e0)]('');continue;case'2':_0x399f4e[_0x3d5c46(0x2ab)]&&console['log'](_0x3d5c46(0x278)+_0x399f4e[_0x3d5c46(0x2ab)]);continue;case'3':_0x399f4e[_0x3d5c46(0x26c)]&&console[_0x3d5c46(0x1e0)](_0x3d5c46(0x230)+_0x31a0e8['VackJ'](getProgressDisplay,_0x399f4e[_0x3d5c46(0x26c)]));continue;case'4':console[_0x3d5c46(0x1e0)](''+_0x399f4e['name']);continue;case'5':console['log'](_0x3d5c46(0x29b)+_0x399f4e['id']);continue;}break;}}const _0x1195fa=_0x5a5a62[_0x3d5c46(0x26e)]??0xa,_0x196e16=_0x31a0e8['QgmAF'](_0x5a5a62['offset']??0x0,_0x378862['items']['length']);if(_0x196e16<_0x378862['totalCount']){const _0x463fc1=_0x31a0e8['ZWWrn'](_0x1195fa,0xa)?'\x20--limit\x20'+_0x1195fa:'',_0xa5c82d=_0x46973b[_0x3d5c46(0x263)]?'\x20--current-branch':'',_0x4a26c3=_0x46973b[_0x3d5c46(0x228)]?_0x31a0e8[_0x3d5c46(0x237)]:'';console['log'](_0x3d5c46(0x241)+_0x196e16+_0x463fc1+_0xa5c82d+_0x4a26c3);}}function _0x3974(){const _0x104cb9=['name','1158784oznymT','\x0aCreating\x20feature\x20review...','\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20','uOWxj','pipe','KRDsM','\x20\x20\x20\x20','en-US','git\x20rev-parse\x20--abbrev-ref\x20HEAD','items','\x1b[1m','textContent','ready','\x0aAvailable\x20scenarios:','storage','linkedSession','\x20\x20\x20ID:\x20','any','heGbj','\x0aNo\x20feature\x20reviews\x20found.','browserSessionId','HEsHI','dashboardUrl','Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','9aAZidX','verifiedItems','element','toFixed','\x20>\x20','latestReview','HhFNw','iteration','gitBranch','No\x20sessions\x20found.','pop','DOTlS','qaZxb','\x20\x20\x20Updated\x20branch\x20to:\x20','No\x20active\x20session\x20for\x20this\x20feature\x20review.','\x0a❌\x20Invalid\x20scenario\x20index:\x20','unaddressedComments','\x20\x20\x20Created:\x20','UNDEz','\x20—\x20','nrRtH','\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.','GCHMb','Oecki','UCywK','utf-8','BxHBp','No\x20scenarios\x20found.','join','.\x20Feature\x20review\x20has\x20','offset','\x20\x20\x20\x20\x20\x20Incomplete:\x20','CLAUDE_SESSION_ID','906020XMBCek','qxkmd','map','):\x20\x22','github.com/','\x20\x20\x20\x20\x20📍\x20Annotation:\x20','log','canonicalFlow','0|2|5|3|4|1','selector','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','ejUrS','RjFSO','\x0a✅\x20Session\x20is\x20already\x20completed.','Scenario\x20','yGoFp','\x20concluded.','16TQrAfk','active-feature.txt','currentSessionId','domRef','comment_','\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20(','terminalReason','in_progress','eNaYN','UdziB','from','find','3728168NtIdyq','mENRm','version','checklistItems','Unknown','QNWnt','createdAt','551810KgHYsw','LADeM','wuhxT','git\x20remote\x20get-url\x20origin','3qlGeeV','hBjpo','scenario','type','json','IjDLI','\x20verified','SjqAS','WQYaU','length','Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','dUFXg','2773450vxfaCx','pmnhR','incomplete','aaber','VsCTu','\x20\x20\x20\x20\x20ID:\x20','\x20\x20\x20\x20\x20\x20Approved','stringify','14FtdkKr','IcFrG','IBPOp','.png','\x20\x20\x20\x20\x20📷\x20Screenshot:\x20','gakqM','assetType','\x20\x20\x20\x20\x20\x20Cancelled:\x20','totalCount','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','MImtA','Step\x20','\x0a✅\x20Resumed\x20feature\x20review:\x20','yoWlO','/artifacts/','canceledReason','LBWKp','includeDeleted','feedback-images','qOUPJ','xmzTt','exit','status','toLocaleString','split','\x20\x20\x20Progress:\x20','JRYEw','push','has','closed','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','bzokB','wDCLu','nUgWm','completedAt','approved','\x20\x20\x20\x20\x20Branch:\x20','RFfwi','\x20\x20💬\x20','\x20unaddressed\x20comment(s)','Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20','365730evmUoQ','Next\x20page:\x20ranger\x20list\x20--offset\x20','gpLen','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','reports','location','list','all','sPUPH','slice','\x0a⚠️\x20\x20','Screenshot\x20','449930teTmvY','screenshot','filter','env','\x0a✅\x20Feature\x20review\x20created:\x20','gitRepoUrl','error','gtLun','blocked','repeat','scenarios','\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','Ntbmt','output','nmfar','RAWLU','agentResponse','authorName','assetUrl','completed','\x20blocked','ztyBm','currentBranch','description','Current\x20session\x20not\x20found.','jWmYY','\x20--include-deleted','assets','\x0a✅\x20Session\x20','replace','incompleteReason','stats','4|5|3|2|0|1','limit','Wjwjx','stdin','wbBVE','blockedReason','DoVrn','stdout','spatial','isTTY','warn','\x20\x20\x20Branch:\x20','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','verified','\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20','\x20\x20✅\x20No\x20feedback\x20to\x20address','ALDvz','incompleteItems','WyUxX','AFWeE','\x20in\x20progress','OjomI','\x20\x20\x20\x20\x20📋\x20Selector:\x20','screenshotUrls','\x0a✅\x20Scenario\x20added','\x20\x20\x20▶️\x20Started\x20session\x20','\x20\x20\x20\x20\x20\x20Blocked:\x20','\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','isInteger'];_0x3974=function(){return _0x104cb9;};return _0x3974();}export async function featureShow(_0x2e1ea3){const _0x477b89=_0x4ced5c,_0x16644f={'wbBVE':function(_0x32d14d){return _0x32d14d();},'rIoBf':_0x477b89(0x258),'nFEdX':function(_0x1ff9b5,_0x531209){return _0x1ff9b5(_0x531209);}},_0x515e89=_0x2e1ea3||await _0x16644f[_0x477b89(0x271)](getActiveFeatureId);if(!_0x515e89)throw new Error(_0x16644f['rIoBf']);const _0x540870=await _0x16644f['nFEdX'](getFeature,_0x515e89);displayFeature(_0x540870,_0x540870[_0x477b89(0x1fa)]);}export async function featureResume(_0x531206){const _0x477ef5=_0x4ced5c,_0x7ee59e={'RFfwi':function(_0x440222,_0x2bb643){return _0x440222(_0x2bb643);},'gpLen':function(_0x55b092,_0x396a53){return _0x55b092!==_0x396a53;},'UCywK':function(_0x34b4e6,_0x214e3e,_0x4b822e){return _0x34b4e6(_0x214e3e,_0x4b822e);},'LADeM':function(_0x44aaf1,_0x1a54a8,_0x575157){return _0x44aaf1(_0x1a54a8,_0x575157);},'LBWKp':function(_0x21277b,_0x45f554){return _0x21277b(_0x45f554);},'MImtA':function(_0x29ba12,_0x557912){return _0x29ba12||_0x557912;},'pgymh':function(_0x5bfc91,_0x27e72e){return _0x5bfc91||_0x27e72e;},'gzjUd':'any','bzokB':function(_0x542c40,_0x41be07){return _0x542c40(_0x41be07);},'IBPOp':'Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','FKrpg':'selected','RAWLU':function(_0x258e15,_0x1b6e98,_0x22d76f){return _0x258e15(_0x1b6e98,_0x22d76f);}};if(_0x531206){const _0x16a288=await getFeature(_0x531206);await _0x7ee59e[_0x477ef5(0x23c)](setActiveFeatureId,_0x16a288['id']);const _0x39e215=getGitBranch();_0x39e215&&_0x7ee59e[_0x477ef5(0x242)](_0x39e215,_0x16a288['gitBranch'])&&(await _0x7ee59e['UCywK'](updateFeature,_0x16a288['id'],{'gitBranch':_0x39e215}),console[_0x477ef5(0x1e0)](_0x477ef5(0x2b0)+_0x39e215));console['log'](_0x477ef5(0x223)+_0x16a288['name']+'\x20('+_0x16a288['id']+')'),await _0x7ee59e[_0x477ef5(0x23c)](tryStartCurrentSession,_0x16a288['id']);const _0x103eaa=process[_0x477ef5(0x24f)]['CLAUDE_SESSION_ID'];_0x103eaa&&_0x7ee59e[_0x477ef5(0x1ff)](registerSession,_0x103eaa,_0x16a288['id']);_0x7ee59e[_0x477ef5(0x1ff)](displayFeature,_0x16a288,_0x16a288[_0x477ef5(0x1fa)]),await _0x7ee59e[_0x477ef5(0x227)](printFeedbackNudge,_0x16a288['id']);return;}const _0x4ec964=getGitRepoUrl(),_0x560f23=getGitBranch();if(!_0x4ec964&&!_0x560f23)throw new Error('Not\x20in\x20a\x20git\x20repository.');console[_0x477ef5(0x1e0)](_0x477ef5(0x27b)+_0x7ee59e[_0x477ef5(0x221)](_0x4ec964,_0x477ef5(0x29c))+'\x20/\x20'+_0x7ee59e['pgymh'](_0x560f23,_0x7ee59e['gzjUd'])+'...');const _0x10f3f6=await _0x7ee59e['bzokB'](listFeatures,{'gitRepoUrl':_0x4ec964,'gitBranch':_0x560f23}),_0x50a98a=_0x10f3f6['items']['filter'](_0x4bf999=>_0x4bf999[_0x477ef5(0x22d)]?_0x4bf999['status']!=='verified':!_0x4bf999[_0x477ef5(0x239)]);if(_0x50a98a['length']===0x0){console['log'](_0x477ef5(0x235)),console['log'](_0x7ee59e[_0x477ef5(0x218)]);return;}let _0x3a41c4;if(_0x50a98a[_0x477ef5(0x20b)]===0x1)_0x3a41c4=_0x50a98a[0x0];else{const _0xde0051=process[_0x477ef5(0x270)]['isTTY']&&process[_0x477ef5(0x274)][_0x477ef5(0x276)];if(!_0xde0051){console['log'](_0x477ef5(0x288));for(const _0x437996 of _0x50a98a){console[_0x477ef5(0x1e0)]('\x20\x20'+_0x437996['name']),console[_0x477ef5(0x1e0)](_0x477ef5(0x213)+_0x437996['id']),_0x437996['stats']&&console[_0x477ef5(0x1e0)]('\x20\x20\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x437996['stats'])),_0x437996[_0x477ef5(0x2ab)]&&console['log'](_0x477ef5(0x23b)+_0x437996[_0x477ef5(0x2ab)]);}throw new Error(_0x477ef5(0x20c));}const {selected:_0x3514e6}=await _0x3493bd['prompt']([{'type':_0x477ef5(0x246),'name':_0x7ee59e['FKrpg'],'message':_0x477ef5(0x2a2),'choices':_0x50a98a['map'](_0x1a3ac6=>({'name':_0x1a3ac6['name']+'\x20('+_0x1a3ac6['id']+')','value':_0x1a3ac6['id']}))}]);_0x3a41c4=_0x50a98a[_0x477ef5(0x1f6)](_0x36514f=>_0x36514f['id']===_0x3514e6);}await setActiveFeatureId(_0x3a41c4['id']);_0x560f23&&_0x7ee59e['gpLen'](_0x560f23,_0x3a41c4[_0x477ef5(0x2ab)])&&(await _0x7ee59e[_0x477ef5(0x1d1)](updateFeature,_0x3a41c4['id'],{'gitBranch':_0x560f23}),console[_0x477ef5(0x1e0)]('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x560f23));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x3a41c4[_0x477ef5(0x28a)]+'\x20('+_0x3a41c4['id']+')'),await tryStartCurrentSession(_0x3a41c4['id']);const _0x17b548=await _0x7ee59e[_0x477ef5(0x23c)](getFeature,_0x3a41c4['id']),_0x102d93=process['env'][_0x477ef5(0x1d9)];_0x102d93&&_0x7ee59e['LADeM'](registerSession,_0x102d93,_0x17b548['id']),_0x7ee59e[_0x477ef5(0x25c)](displayFeature,_0x17b548,_0x17b548['checklistItems']),await _0x7ee59e[_0x477ef5(0x236)](printFeedbackNudge,_0x17b548['id']);}async function printFeedbackNudge(_0x2cc82a){const _0x331686=_0x4ced5c,_0x38cea5={'uOWxj':function(_0x4bf256,_0x189f24){return _0x4bf256(_0x189f24);},'dXPwR':function(_0xd159ba,_0x16986a,_0x3e445){return _0xd159ba(_0x16986a,_0x3e445);},'fdBRu':function(_0x5d4a85,_0x533719){return _0x5d4a85>_0x533719;},'UNDEz':_0x331686(0x1ce)};try{const {items:_0x807b3}=await _0x38cea5[_0x331686(0x28e)](getActionItems,_0x2cc82a);let _0x2e783f=0x0,_0x258d1d=0x0;for(const _0x387f4b of _0x807b3){const _0x305ccf=await _0x38cea5['dXPwR'](getItemFeedback,_0x2cc82a,_0x387f4b['id']);_0x38cea5['fdBRu'](_0x305ccf[_0x331686(0x2b3)][_0x331686(0x20b)],0x0)&&(_0x2e783f+=_0x305ccf[_0x331686(0x2b3)]['length'],_0x258d1d++);}_0x2e783f>0x0&&(console[_0x331686(0x1e0)](_0x331686(0x24a)+_0x2e783f+_0x331686(0x28d)+_0x258d1d+'\x20scenario(s).'),console['log'](_0x38cea5[_0x331686(0x1cb)]));}catch{}}async function tryStartCurrentSession(_0x1f3f35){const _0xf86ee0=_0x4ced5c,_0x4e491d={'Qdkei':function(_0x114fbf,_0x421c7a){return _0x114fbf(_0x421c7a);},'LWExF':function(_0x16cb80,_0x5132db,_0x35b9ed){return _0x16cb80(_0x5132db,_0x35b9ed);}};try{const {sessions:_0x3b5c0a}=await _0x4e491d['Qdkei'](listFeatureSessions,_0x1f3f35),_0x2ea736=_0x3b5c0a['find'](_0x5d6074=>_0x5d6074['status']===_0xf86ee0(0x297));_0x2ea736&&(await _0x4e491d['LWExF'](startSession,_0x1f3f35,_0x2ea736['id']),console['log'](_0xf86ee0(0x286)+_0x2ea736['iteration']));}catch{}}export async function featureReport(_0x32edec,_0x4261e0){const _0x1b59ca=_0x4ced5c,_0x52474b={'NvLyU':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','qOUPJ':function(_0x30dfb7,_0x3ece8d,_0x5411b7){return _0x30dfb7(_0x3ece8d,_0x5411b7);},'Oecki':function(_0x23c747){return _0x23c747();},'ztyBm':_0x1b59ca(0x244),'VQTBm':function(_0x21e34b,_0x2a867c,_0x2e34f2){return _0x21e34b(_0x2a867c,_0x2e34f2);},'dJWPD':'utf-8'},_0x46a868=_0x32edec||await getActiveFeatureId();if(!_0x46a868)throw new Error(_0x52474b['NvLyU']);console['log']('\x0aGenerating\x20report...');const _0x46fbef=await _0x52474b[_0x1b59ca(0x22a)](getFeatureReportMarkdown,_0x46a868,{'style':_0x4261e0['style']}),_0x2f2d88=_0x4261e0[_0x1b59ca(0x25a)]||join(_0x52474b[_0x1b59ca(0x1d0)](getRangerDir),_0x52474b[_0x1b59ca(0x262)],_0x46a868+'.md'),_0x1c4ab0=_0x52474b['VQTBm'](join,_0x2f2d88,'..');!existsSync(_0x1c4ab0)&&await mkdir(_0x1c4ab0,{'recursive':!![]}),await writeFile(_0x2f2d88,_0x46fbef,_0x52474b['dJWPD']),console['log']('\x0a✅\x20Report\x20generated:\x20'+_0x2f2d88);}function getScenarioResult(_0x360a9d){const _0x24093a=_0x4ced5c,_0x2c5e33={'Ntbmt':function(_0x2177c5,_0x523558){return _0x2177c5===_0x523558;},'eNaYN':_0x24093a(0x234),'rxoue':_0x24093a(0x1f2)};if(_0x2c5e33[_0x24093a(0x259)](_0x360a9d['status'],_0x2c5e33[_0x24093a(0x1f3)]))return _0x360a9d[_0x24093a(0x1f1)]??_0x24093a(0x234);if(_0x360a9d[_0x24093a(0x22d)]==='verification_in_progress')return _0x2c5e33['rxoue'];return _0x360a9d['status'];}function getScenarioRationale(_0x10aee6,_0xb3b8d5){const _0x4c6d74=_0x4ced5c,_0x2a27c9={'QjYrh':_0x4c6d74(0x1e2)},_0x4d7811=_0x2a27c9['QjYrh'][_0x4c6d74(0x22f)]('|');let _0x3215ed=0x0;while(!![]){switch(_0x4d7811[_0x3215ed++]){case'0':if(_0xb3b8d5)return _0xb3b8d5;continue;case'1':return null;case'2':if(_0x10aee6['blockedReason'])return _0x10aee6[_0x4c6d74(0x272)];continue;case'3':if(_0x10aee6['canceledReason'])return _0x10aee6['canceledReason'];continue;case'4':if(_0x10aee6['notes'])return _0x10aee6['notes'];continue;case'5':if(_0x10aee6[_0x4c6d74(0x26b)])return _0x10aee6[_0x4c6d74(0x26b)];continue;}break;}}export async function featureReportPrDescription(_0x44d4da,_0x424c40){const _0x215c00=_0x4ced5c,_0x14438a={'qaZxb':function(_0x7c7c3b){return _0x7c7c3b();},'kBVze':_0x215c00(0x220),'mENRm':function(_0x2ee82e,_0x2910cb,_0x16cb15){return _0x2ee82e(_0x2910cb,_0x16cb15);},'GHFqz':_0x215c00(0x257),'yoWlO':function(_0x4c7b63,_0x36ea72){return _0x4c7b63>_0x36ea72;},'kgZVN':function(_0x624b7d,_0x427a38){return _0x624b7d<_0x427a38;},'bDyKb':function(_0x5ad155,_0x2cc04b){return _0x5ad155+_0x2cc04b;}},_0x4ea341=_0x44d4da||await _0x14438a[_0x215c00(0x2af)](getActiveFeatureId);if(!_0x4ea341)throw new Error(_0x14438a['kBVze']);const _0xebcdc2=await getFeature(_0x4ea341),_0x20c560=_0xebcdc2[_0x215c00(0x1fa)]||[],_0x53ae96=_0x14438a['mENRm'](getCurrentSessionItems,_0xebcdc2,_0x20c560);_0x53ae96['length']===0x0&&(console[_0x215c00(0x252)](_0x14438a['GHFqz']),process[_0x215c00(0x22c)](0x1));const _0x5cda92=_0x424c40['excludeScenarios']??[],_0x59c340=_0x5cda92['filter'](_0x12e091=>!Number[_0x215c00(0x289)](_0x12e091)||_0x12e091<0x1||_0x12e091>_0x53ae96[_0x215c00(0x20b)]);if(_0x14438a[_0x215c00(0x224)](_0x59c340['length'],0x0)){console['error']('\x0a❌\x20Invalid\x20scenario\x20number(s):\x20'+_0x59c340['join'](',\x20')),console[_0x215c00(0x1e0)]('\x0aAvailable\x20scenarios:');for(let _0x5c5ee9=0x0;_0x14438a['kgZVN'](_0x5c5ee9,_0x53ae96['length']);_0x5c5ee9++){console['log']('\x20\x20'+_0x14438a['bDyKb'](_0x5c5ee9,0x1)+'.\x20'+_0x53ae96[_0x5c5ee9]['description']);}process['exit'](0x1);}const _0x557cba=new Set(_0x5cda92[_0x215c00(0x1dc)](_0x592850=>_0x592850-0x1)),_0x2f7b43=_0x53ae96['filter']((_0x16cf19,_0x401f6c)=>!_0x557cba[_0x215c00(0x233)](_0x401f6c));_0x2f7b43[_0x215c00(0x20b)]===0x0&&(console['error']('\x0a❌\x20All\x20scenarios\x20were\x20excluded.'),process['exit'](0x1));if(_0x424c40[_0x215c00(0x206)])await outputJsonReport(_0x4ea341,_0xebcdc2,_0x2f7b43);else{const _0x4e91cd=await _0x14438a[_0x215c00(0x1f8)](getFeatureReportMarkdown,_0x4ea341,{'itemIds':_0x2f7b43[_0x215c00(0x1dc)](_0x26f757=>_0x26f757['id'])});process['stdout']['write'](_0x4e91cd['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x43b8be,_0x4fa56c,_0x2b5549){const _0x37d5a3=_0x4ced5c,_0x24fdd9={'ulttk':function(_0xda90d8,_0x8dc40){return _0xda90d8===_0x8dc40;},'KRDsM':function(_0x2e9149,_0x1e76f3,_0x4fa028){return _0x2e9149(_0x1e76f3,_0x4fa028);},'HEsHI':function(_0x69e913){return _0x69e913();}},_0x40ad53=_0x24fdd9[_0x37d5a3(0x2a0)](getApiBaseUrl),_0x225c59=await getFeatureReport(_0x43b8be),_0xcbdab7=new Map(_0x225c59[_0x37d5a3(0x1fa)][_0x37d5a3(0x1dc)](_0x303f00=>[_0x303f00['id'],_0x303f00])),_0x188a80=await Promise[_0x37d5a3(0x247)](_0x2b5549[_0x37d5a3(0x1dc)](async _0x9ba000=>{const _0x4820ae=_0x37d5a3,_0x15f06a=_0xcbdab7['get'](_0x9ba000['id']),_0x4fbdcb=_0x15f06a?.[_0x4820ae(0x29a)]??null;let _0x172941=[];if(_0x9ba000[_0x4820ae(0x29f)])try{const {steps:_0x16dd38}=await getBrowserSessionSteps(_0x9ba000[_0x4820ae(0x29f)]);_0x16dd38[_0x4820ae(0x20b)]>0x0&&(_0x172941=_0x16dd38['map'](_0x46aea9=>{const _0x392c1e=_0x4820ae,_0x575b00=_0x46aea9[_0x392c1e(0x268)]['find'](_0x3ebd13=>_0x3ebd13[_0x392c1e(0x21c)]===_0x392c1e(0x24d)&&_0x3ebd13['timing']==='after')??_0x46aea9['assets']['find'](_0x331bf3=>_0x331bf3[_0x392c1e(0x21c)]==='screenshot');let _0x1db3c9=null,_0x1c5d62=null;if(_0x575b00){const _0x6f3e22=_0x575b00[_0x392c1e(0x299)][_0x392c1e(0x245)][_0x392c1e(0x22f)]('/')[_0x392c1e(0x2ad)]();_0x1db3c9=_0x40ad53+'/api/v1/mcp/browser-sessions/'+_0x9ba000[_0x392c1e(0x29f)]+_0x392c1e(0x225)+_0x6f3e22,_0x6f3e22&&(_0x1c5d62=_0x6f3e22['replace'](/\.\w+$/,'')[_0x392c1e(0x26a)](/^(key_)?\d+_/,'')['replace'](/[-_]/g,'\x20'));}return{'description':_0x1c5d62||_0x46aea9[_0x392c1e(0x264)]||_0x46aea9['stepName']||_0x392c1e(0x222)+_0x46aea9['position'],'screenshot':_0x1db3c9,'is_key_step':_0x46aea9['isKeyStep']};}));}catch{}return _0x24fdd9['ulttk'](_0x172941[_0x4820ae(0x20b)],0x0)&&_0x4fbdcb?.['screenshotUrls']&&(_0x172941=_0x4fbdcb[_0x4820ae(0x284)][_0x4820ae(0x1dc)]((_0x2a163f,_0x17158a)=>({'description':_0x4820ae(0x24b)+(_0x17158a+0x1),'screenshot':_0x2a163f,'is_key_step':![]}))),{'description':_0x9ba000[_0x4820ae(0x264)],'result':getScenarioResult(_0x9ba000),'rationale':_0x24fdd9[_0x4820ae(0x290)](getScenarioRationale,_0x9ba000,_0x4fbdcb?.[_0x4820ae(0x25d)]),'steps':_0x172941};})),_0x113d1c={'url':_0x4fa56c['dashboardUrl'],'scenarios':_0x188a80};process[_0x37d5a3(0x274)]['write'](JSON[_0x37d5a3(0x215)](_0x113d1c,null,0x2)+'\x0a');}export async function featureConcludeSession(_0x50654e){const _0x584195=_0x4ced5c,_0x496a5f={'hqMUB':function(_0x106cde,_0x43251a){return _0x106cde(_0x43251a);},'hBjpo':_0x584195(0x1e7),'MaeFn':'in_progress','MKPOb':function(_0x1e11fe,_0x22dbfa,_0x3ea28f){return _0x1e11fe(_0x22dbfa,_0x3ea28f);}},_0xa2a495=_0x50654e||await getActiveFeatureId();if(!_0xa2a495)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x22d61d=await getFeature(_0xa2a495);if(!_0x22d61d['currentSessionId'])throw new Error(_0x584195(0x2b1));const {sessions:_0xea0138}=await _0x496a5f['hqMUB'](listFeatureSessions,_0xa2a495),_0x1f78ff=_0xea0138['find'](_0x3191e1=>_0x3191e1['id']===_0x22d61d[_0x584195(0x1ed)]);if(!_0x1f78ff)throw new Error(_0x584195(0x265));if(_0x1f78ff[_0x584195(0x22d)]==='completed'){console['log'](_0x496a5f[_0x584195(0x203)]);return;}if(_0x1f78ff['status']!==_0x496a5f['MaeFn'])throw new Error('Cannot\x20conclude\x20session\x20with\x20status:\x20'+_0x1f78ff[_0x584195(0x22d)]);console['log']('\x0aConcluding\x20session...'),await _0x496a5f['MKPOb'](concludeSession,_0xa2a495,_0x22d61d[_0x584195(0x1ed)]),console[_0x584195(0x1e0)](_0x584195(0x269)+_0x1f78ff[_0x584195(0x2aa)]+_0x584195(0x1ea)),console['log']('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x1b8d84){const _0x5874d5=_0x4ced5c,_0x1afdda={'JaXLJ':function(_0x2b3477){return _0x2b3477();},'OcLfP':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','Wjwjx':function(_0x243ed5,_0x4e6346){return _0x243ed5===_0x4e6346;},'MkeHR':_0x5874d5(0x2ac),'QNWnt':_0x5874d5(0x260),'NZBSi':function(_0x4b85ac,_0x70141){return _0x4b85ac===_0x70141;}},_0x1153b2=_0x1b8d84||await _0x1afdda['JaXLJ'](getActiveFeatureId);if(!_0x1153b2)throw new Error(_0x1afdda['OcLfP']);const _0x547276=await getFeature(_0x1153b2);console[_0x5874d5(0x1e0)]('\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20'+_0x547276[_0x5874d5(0x28a)]+'\x0a');const {sessions:_0x1b329f}=await listFeatureSessions(_0x1153b2);if(_0x1afdda['Wjwjx'](_0x1b329f['length'],0x0)){console['log'](_0x1afdda['MkeHR']);return;}for(const _0x4f335c of _0x1b329f){const _0x9d2b61=_0x1afdda[_0x5874d5(0x26f)](_0x4f335c['status'],_0x1afdda[_0x5874d5(0x1fc)])?'✅':_0x1afdda['NZBSi'](_0x4f335c['status'],'in_progress')?'🔄':'▶️';console['log'](_0x9d2b61+'\x20Session\x20'+_0x4f335c['iteration']+'\x20('+_0x4f335c['id']+')'),console['log']('\x20\x20\x20Status:\x20'+_0x4f335c[_0x5874d5(0x22d)]),console[_0x5874d5(0x1e0)]('\x20\x20\x20Created:\x20'+new Date(_0x4f335c['createdAt'])[_0x5874d5(0x22e)]()),_0x4f335c[_0x5874d5(0x239)]&&console[_0x5874d5(0x1e0)]('\x20\x20\x20Completed:\x20'+new Date(_0x4f335c['completedAt'])['toLocaleString']()),console[_0x5874d5(0x1e0)]('');}}export async function featureAddScenario(_0x2c039b,_0x1694bb){const _0x1a1715=_0x4ced5c,_0x3d66c6={'GGYga':function(_0x45a929){return _0x45a929();},'dpCOM':function(_0x772e81,_0x51784a){return _0x772e81(_0x51784a);},'fnUmt':function(_0x65da9,_0x9fac0a,_0x4fd9a0){return _0x65da9(_0x9fac0a,_0x4fd9a0);}},_0x5d50a3=_0x1694bb||await _0x3d66c6['GGYga'](getActiveFeatureId);if(!_0x5d50a3)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x9c9e7d=await _0x3d66c6['dpCOM'](getFeature,_0x5d50a3);if(_0x9c9e7d[_0x1a1715(0x2a8)]&&!_0x9c9e7d[_0x1a1715(0x2a8)]['submittedAt'])throw new Error(_0x1a1715(0x23f)+_0x9c9e7d[_0x1a1715(0x2a1)]);await _0x3d66c6['fnUmt'](createChecklistItem,_0x5d50a3,_0x2c039b);const _0x3fb90a=await getFeature(_0x5d50a3);console[_0x1a1715(0x1e0)](_0x1a1715(0x285)),displayFeature(_0x3fb90a,_0x3fb90a[_0x1a1715(0x1fa)]);}export async function featureEditScenario(_0x11e79a,_0x25ab53){const _0x3f9e4c=_0x4ced5c,_0x3467e5={'FHVkW':'\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','MIlgo':_0x3f9e4c(0x279),'hjroI':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','nrRtH':function(_0x1c7fba,_0x537172){return _0x1c7fba===_0x537172;},'nUgWm':function(_0x1547b7,_0x23957d){return _0x1547b7<_0x23957d;},'IcFrG':function(_0x4c94a8,_0x1ac540){return _0x4c94a8+_0x1ac540;},'yExIx':function(_0x30ac76,_0x469d39){return _0x30ac76-_0x469d39;},'qElPJ':function(_0x2d4cb0,_0x1b26f6){return _0x2d4cb0<_0x1b26f6;},'uRhmb':function(_0x310578,_0x5629b4){return _0x310578>=_0x5629b4;},'VsCTu':function(_0x46ac1b,_0x2e7bb3){return _0x46ac1b<_0x2e7bb3;},'gakqM':function(_0x166a49,_0x21e310,_0xfa0a50,_0x1723b7){return _0x166a49(_0x21e310,_0xfa0a50,_0x1723b7);},'ejUrS':function(_0x232b41,_0x433126,_0x138abd){return _0x232b41(_0x433126,_0x138abd);}},_0x251971=_0x25ab53['id']||await getActiveFeatureId();!_0x251971&&(console[_0x3f9e4c(0x252)](_0x3467e5['FHVkW']),console[_0x3f9e4c(0x252)](_0x3467e5['MIlgo']),process[_0x3f9e4c(0x22c)](0x1));const _0x19c08a=await getFeature(_0x251971);_0x19c08a[_0x3f9e4c(0x2a8)]&&!_0x19c08a['latestReview']['submittedAt']&&(console['error']('\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.'),console['error']('Please\x20finish\x20your\x20review\x20first:'),console[_0x3f9e4c(0x252)]('\x20\x20'+_0x19c08a[_0x3f9e4c(0x2a1)]),process[_0x3f9e4c(0x22c)](0x1));const _0x49c880=_0x19c08a[_0x3f9e4c(0x1fa)]||[];_0x49c880['length']===0x0&&(console[_0x3f9e4c(0x252)](_0x3467e5['hjroI']),process['exit'](0x1));if(_0x3467e5[_0x3f9e4c(0x1cd)](_0x25ab53['scenario'],undefined)){console['error']('\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.'),console[_0x3f9e4c(0x1e0)](_0x3f9e4c(0x298));for(let _0x3ae600=0x0;_0x3467e5[_0x3f9e4c(0x238)](_0x3ae600,_0x49c880[_0x3f9e4c(0x20b)]);_0x3ae600++){console[_0x3f9e4c(0x1e0)]('\x20\x20'+_0x3467e5[_0x3f9e4c(0x217)](_0x3ae600,0x1)+'.\x20'+_0x49c880[_0x3ae600]['description']);}process[_0x3f9e4c(0x22c)](0x1);}const _0x388651=_0x3467e5['yExIx'](_0x25ab53[_0x3f9e4c(0x204)],0x1);if(_0x3467e5['qElPJ'](_0x388651,0x0)||_0x3467e5['uRhmb'](_0x388651,_0x49c880[_0x3f9e4c(0x20b)])){console['error'](_0x3f9e4c(0x2b2)+_0x25ab53[_0x3f9e4c(0x204)]+_0x3f9e4c(0x1d6)+_0x49c880[_0x3f9e4c(0x20b)]+'\x20scenarios.'),console['log']('\x0aAvailable\x20scenarios:');for(let _0x3cf402=0x0;_0x3467e5[_0x3f9e4c(0x212)](_0x3cf402,_0x49c880['length']);_0x3cf402++){console['log']('\x20\x20'+_0x3467e5['IcFrG'](_0x3cf402,0x1)+'.\x20'+_0x49c880[_0x3cf402]['description']);}process[_0x3f9e4c(0x22c)](0x1);}const _0x33f144=_0x49c880[_0x388651];await _0x3467e5[_0x3f9e4c(0x21b)](updateChecklistItem,_0x251971,_0x33f144['id'],{'description':_0x11e79a});const _0x44c1b6=await getFeature(_0x251971);console[_0x3f9e4c(0x1e0)]('\x0a✅\x20Scenario\x20updated'),_0x3467e5[_0x3f9e4c(0x1e5)](displayFeature,_0x44c1b6,_0x44c1b6['checklistItems']);}async function downloadFeedbackImage(_0xb7e6b0,_0x23853d){const _0x4a7460=_0x4ced5c,_0x578303={'NpTtz':function(_0x519e1f,_0x2218cf,_0x303f7f){return _0x519e1f(_0x2218cf,_0x303f7f);},'sAOug':function(_0x88e945,_0x53bf9e){return _0x88e945(_0x53bf9e);},'ElXSM':function(_0x244df4,_0xbc1c9,_0x2f32bc){return _0x244df4(_0xbc1c9,_0x2f32bc);}};try{const _0x69ace9=join(getRangerDir(),_0x4a7460(0x229));await _0x578303['NpTtz'](mkdir,_0x69ace9,{'recursive':!![]});const _0x15b351=join(_0x69ace9,_0x4a7460(0x1ef)+_0x23853d+_0x4a7460(0x219)),_0x48672c=await _0x578303['sAOug'](fetch,_0xb7e6b0);if(!_0x48672c['ok'])return null;const _0x3e2ecc=Buffer[_0x4a7460(0x1f5)](await _0x48672c['arrayBuffer']());return await _0x578303['ElXSM'](writeFile,_0x15b351,_0x3e2ecc),_0x15b351;}catch{return null;}}export async function featureGetReview(_0x348b9b){const _0x101a54=_0x4ced5c,_0x44efb6={'IjDLI':function(_0x5aedd2){return _0x5aedd2();},'AFWeE':_0x101a54(0x258),'XCXFP':function(_0x455352,_0x1bafa5){return _0x455352<_0x1bafa5;},'MrRhO':function(_0x327933,_0x4a63bd){return _0x327933>_0x4a63bd;},'nmfar':_0x101a54(0x292),'MVPvr':_0x101a54(0x1fb),'OjomI':_0x101a54(0x2a7),'ALDvz':_0x101a54(0x2a5),'JRYEw':function(_0x1c1084,_0x2c34e1){return _0x1c1084===_0x2c34e1;},'KRvXU':function(_0x1c8a0e,_0x4f68be){return _0x1c8a0e>=_0x4f68be;}},_0x3cacf1=_0x348b9b||await _0x44efb6[_0x101a54(0x207)](getActiveFeatureId);if(!_0x3cacf1)throw new Error(_0x44efb6[_0x101a54(0x280)]);const _0x194b72=await getFeature(_0x3cacf1),{items:_0xc275e5}=await getActionItems(_0x3cacf1);console[_0x101a54(0x1e0)]('\x0a📋\x20Feedback\x20for:\x20'+_0x194b72[_0x101a54(0x28a)]+'\x20('+_0x194b72['id']+')\x0a');if(_0xc275e5[_0x101a54(0x20b)]===0x0){console[_0x101a54(0x1e0)](_0x101a54(0x1d4));return;}for(let _0x1c0e38=0x0;_0x44efb6['XCXFP'](_0x1c0e38,_0xc275e5['length']);_0x1c0e38++){const _0x311ef0=_0xc275e5[_0x1c0e38],_0x50b49e=_0x44efb6['MrRhO'](_0x311ef0[_0x101a54(0x1f9)],0x1)?'\x20(v'+_0x311ef0[_0x101a54(0x1f9)]+')':'',_0x42a5cf=await getItemFeedback(_0x3cacf1,_0x311ef0['id']);if(_0x42a5cf['unaddressedComments'][_0x101a54(0x20b)]>0x0){console['log'](_0x101a54(0x1e8)+(_0x1c0e38+0x1)+':\x20\x22'+_0x311ef0['description']+'\x22'+_0x50b49e+_0x101a54(0x1cc)+_0x42a5cf['unaddressedComments']['length']+_0x101a54(0x23e));for(const _0x52502b of _0x42a5cf[_0x101a54(0x2b3)]){const _0x5f42f0=new Date(_0x52502b[_0x101a54(0x1fd)])['toLocaleDateString'](_0x44efb6[_0x101a54(0x25b)],{'month':'short','day':'numeric'}),_0x263e9f=_0x52502b[_0x101a54(0x25e)]||_0x52502b['authorEmail']||_0x44efb6['MVPvr'];console[_0x101a54(0x1e0)](_0x101a54(0x23d)+_0x263e9f+'\x20('+_0x5f42f0+_0x101a54(0x1dd)+_0x52502b['content']+'\x22');if(_0x52502b[_0x101a54(0x25f)]){const _0xf0043c=await downloadFeedbackImage(_0x52502b['assetUrl'],_0x52502b['id']);_0xf0043c&&console['log'](_0x101a54(0x21a)+_0xf0043c);}if(_0x52502b[_0x101a54(0x1ee)]){const _0x8f2746=_0x52502b[_0x101a54(0x1ee)][_0x101a54(0x1e3)]['split'](_0x44efb6[_0x101a54(0x282)])[_0x101a54(0x2ad)]()?.['split'](':')[0x0]||_0x44efb6[_0x101a54(0x27d)],_0x48e332=_0x52502b[_0x101a54(0x1ee)][_0x101a54(0x296)]?'\x20\x22'+_0x52502b[_0x101a54(0x1ee)]['textContent'][_0x101a54(0x249)](0x0,0x3c)+'\x22':'';console[_0x101a54(0x1e0)](_0x101a54(0x243)+_0x8f2746+'>'+_0x48e332),console[_0x101a54(0x1e0)](_0x101a54(0x283)+_0x52502b[_0x101a54(0x1ee)]['selector']);}else{if(_0x52502b[_0x101a54(0x275)]){const _0x38e249=_0x52502b[_0x101a54(0x275)]['coordinates'];_0x44efb6[_0x101a54(0x231)](_0x52502b['spatial'][_0x101a54(0x205)],'point')&&_0x44efb6['KRvXU'](_0x38e249['length'],0x2)?console['log'](_0x101a54(0x1f0)+_0x38e249[0x0][_0x101a54(0x2a6)](0x2)+',\x20'+_0x38e249[0x1]['toFixed'](0x2)+')'):console[_0x101a54(0x1e0)](_0x101a54(0x1df)+_0x52502b[_0x101a54(0x275)][_0x101a54(0x205)]+'\x20at\x20['+_0x38e249[_0x101a54(0x1dc)](_0x336e5e=>_0x336e5e[_0x101a54(0x2a6)](0x2))[_0x101a54(0x1d5)](',\x20')+']');}}}if(_0x42a5cf[_0x101a54(0x1e1)]){console['log']('\x20\x20Expected\x20flow:');for(const _0x102872 of _0x42a5cf[_0x101a54(0x1e1)][_0x101a54(0x22f)]('\x0a')){console[_0x101a54(0x1e0)](_0x101a54(0x291)+_0x102872);}}}else console[_0x101a54(0x1e0)]('Scenario\x20'+(_0x1c0e38+0x1)+':\x20\x22'+_0x311ef0[_0x101a54(0x264)]+'\x22'+_0x50b49e+'\x20—\x20no\x20comments'),console['log'](_0x101a54(0x27c));console[_0x101a54(0x1e0)]('');}}export async function featureDelete(_0x3024e3){const _0x4babb1=_0x4ced5c,_0x46568a={'UdziB':function(_0x232f18,_0x43e7c8){return _0x232f18(_0x43e7c8);}},_0x24176e=_0x3024e3||await getActiveFeatureId();if(!_0x24176e)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x1c3b76=await getFeature(_0x24176e);await _0x46568a[_0x4babb1(0x1f4)](softDeleteFeature,_0x24176e),console[_0x4babb1(0x1e0)]('\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20'+_0x1c3b76[_0x4babb1(0x28a)]+'\x20('+_0x24176e+')'),console[_0x4babb1(0x1e0)](_0x4babb1(0x1e4)+_0x24176e);}export async function featureRestore(_0x1003f4){const _0x4c4fab=_0x4ced5c;await restoreFeature(_0x1003f4);const _0x10e146=await getFeature(_0x1003f4);console[_0x4c4fab(0x1e0)]('\x0a✅\x20Restored\x20feature\x20review:\x20'+_0x10e146['name']+'\x20('+_0x1003f4+')'),displayFeature(_0x10e146,_0x10e146[_0x4c4fab(0x1fa)]);}
1
+ const _0x455191=_0xea2f;(function(_0x359d55,_0x73b88e){const _0x44de3b=_0xea2f,_0x4e5b80=_0x359d55();while(!![]){try{const _0x43b49e=parseInt(_0x44de3b(0x12d))/0x1*(parseInt(_0x44de3b(0xd2))/0x2)+parseInt(_0x44de3b(0x121))/0x3*(parseInt(_0x44de3b(0x144))/0x4)+-parseInt(_0x44de3b(0x11b))/0x5+-parseInt(_0x44de3b(0xfe))/0x6*(parseInt(_0x44de3b(0x116))/0x7)+-parseInt(_0x44de3b(0x131))/0x8+-parseInt(_0x44de3b(0x15c))/0x9*(parseInt(_0x44de3b(0x10d))/0xa)+parseInt(_0x44de3b(0x162))/0xb;if(_0x43b49e===_0x73b88e)break;else _0x4e5b80['push'](_0x4e5b80['shift']());}catch(_0x59beb1){_0x4e5b80['push'](_0x4e5b80['shift']());}}}(_0x4f03,0xd8510));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x49b5e8 from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReport,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.js';import{getBrowserSessionSteps}from'./utils/browserSessionsApi.js';import{getApiBaseUrl}from'./utils/environment.js';import{getRangerDir}from'./utils/rangerRoot.js';import{registerSession}from'./utils/sessionCache.js';import{getEnvNames}from'./env.js';import{formatProfileRequiredMessage}from'./utils/profileMessages.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const ACTIVE_FEATURE_FILE=_0x455191(0xfa),bold=_0x529136=>_0x455191(0x184)+_0x529136+'\x1b[0m';function getGitRepoUrl(){const _0xffe878=_0x455191,_0x2e0ecb={'aaMgR':function(_0x5e661f,_0x4b9282,_0x322493){return _0x5e661f(_0x4b9282,_0x322493);},'JlihD':_0xffe878(0x182),'uQQec':'pipe','LYgRD':'github.com/'};try{const _0x306380=_0x2e0ecb['aaMgR'](execSync,_0x2e0ecb[_0xffe878(0x16a)],{'encoding':_0xffe878(0x1a5),'stdio':[_0x2e0ecb[_0xffe878(0x126)],_0x2e0ecb['uQQec'],_0x2e0ecb['uQQec']]})['trim']();return _0x306380[_0xffe878(0x192)](/\.git$/,'')[_0xffe878(0x192)](/^git@github\.com:/,_0x2e0ecb[_0xffe878(0x161)])[_0xffe878(0x192)](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x247b84=_0x455191,_0x3ace9a={'wXNPI':_0x247b84(0x1a5),'jwYlB':_0x247b84(0x12e)};try{return execSync(_0x247b84(0x141),{'encoding':_0x3ace9a[_0x247b84(0xef)],'stdio':[_0x247b84(0x12e),_0x247b84(0x12e),_0x3ace9a[_0x247b84(0x114)]]})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0xd56fd4={'PNtde':function(_0x34d083,_0x3b9e9e,_0x190d42){return _0x34d083(_0x3b9e9e,_0x190d42);},'MgDkV':function(_0x1045a0){return _0x1045a0();},'lrtUO':'utf-8'},_0x511aba=_0xd56fd4['PNtde'](join,_0xd56fd4['MgDkV'](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0x511aba))return null;try{const _0x4aa3eb=await _0xd56fd4['PNtde'](readFile,_0x511aba,_0xd56fd4['lrtUO']);return _0x4aa3eb['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x21b938){const _0x27d11f=_0x455191,_0x2f8f70={'VBkLd':function(_0x26fe22){return _0x26fe22();},'kDTzX':function(_0xd90a59,_0x236268,_0x1b39ed){return _0xd90a59(_0x236268,_0x1b39ed);},'HoeFG':function(_0x3a745b,_0x203639,_0x1d6d24,_0x18befe){return _0x3a745b(_0x203639,_0x1d6d24,_0x18befe);}},_0x5197c4=_0x2f8f70[_0x27d11f(0x17f)](getRangerDir),_0xc00c4e=join(_0x5197c4,ACTIVE_FEATURE_FILE);!existsSync(_0x5197c4)&&await _0x2f8f70[_0x27d11f(0x128)](mkdir,_0x5197c4,{'recursive':!![]}),await _0x2f8f70[_0x27d11f(0x150)](writeFile,_0xc00c4e,_0x21b938,'utf-8');}function getProgressDisplay(_0x5b54fb){const _0x32dd59=_0x455191,_0x392150={'AodpI':function(_0x3d76f5,_0x207f72){return _0x3d76f5+_0x207f72;},'EAmAQ':function(_0x22ce96,_0x509b11){return _0x22ce96===_0x509b11;},'UimQv':function(_0x1d9272,_0x33a413){return _0x1d9272*_0x33a413;},'YUJWP':function(_0x1bd9c6,_0x5da90c){return _0x1bd9c6-_0x5da90c;},'yfnZm':function(_0x4765df,_0x1dd426){return _0x4765df>_0x1dd426;}},_0x4e6f64=_0x5b54fb['verifiedItems']||0x0,_0x9383d1=_0x5b54fb[_0x32dd59(0x136)]||0x0,_0x264c7e=_0x5b54fb[_0x32dd59(0x119)]||0x0,_0x2b6143=_0x5b54fb[_0x32dd59(0xcc)]||0x0,_0x55543e=_0x5b54fb[_0x32dd59(0x16d)]||0x0,_0x1d5ac7=_0x392150[_0x32dd59(0x10f)](_0x4e6f64+_0x9383d1,_0x264c7e)+_0x2b6143+_0x55543e;if(_0x392150[_0x32dd59(0x17a)](_0x1d5ac7,0x0))return'-';const _0x3aedd3=0xa,_0x3268d4=Math['round'](_0x392150[_0x32dd59(0x129)](_0x4e6f64/_0x1d5ac7,_0x3aedd3)),_0x578466='█'['repeat'](_0x3268d4)+'░'[_0x32dd59(0xf4)](_0x392150['YUJWP'](_0x3aedd3,_0x3268d4)),_0xb820cd=[];if(_0x264c7e>0x0)_0xb820cd['push'](_0x264c7e+_0x32dd59(0x199));if(_0x392150[_0x32dd59(0x179)](_0x2b6143,0x0))_0xb820cd['push'](_0x2b6143+'\x20incomplete');if(_0x9383d1>0x0)_0xb820cd[_0x32dd59(0xf0)](_0x9383d1+'\x20in\x20progress');const _0x339adf=_0x392150['yfnZm'](_0xb820cd[_0x32dd59(0x19b)],0x0)?'\x20('+_0xb820cd[_0x32dd59(0x11a)](',\x20')+')':'';return _0x578466+'\x20'+_0x4e6f64+'/'+_0x1d5ac7+'\x20verified'+_0x339adf;}function getCurrentSessionItems(_0x367a6d,_0x446846){const _0x1adfac=_0x455191;if(!_0x367a6d[_0x1adfac(0x17d)])return _0x446846['filter'](_0x48bf26=>!_0x48bf26[_0x1adfac(0x18a)]);return _0x446846['filter'](_0xc60b2b=>_0xc60b2b[_0x1adfac(0x18a)]===_0x367a6d['currentSessionId']||!_0xc60b2b[_0x1adfac(0x18a)]);}function _0x4f03(){const _0x2d9638=['/artifacts/','\x20\x20\x20\x20\x20Progress:\x20','No\x20scenarios\x20found.','stats','ylNeY','latestReview','description','jEHkZ','RhhuZ','kSCSZ','write','toLocaleString','UbTfn','assetType','DFaVS','zfSiT','offset','wXNPI','push','):\x20\x22','get','YcArI','repeat','RsgbZ','VkABZ','\x20scenarios.','assets','blockedReason','active-feature.txt','in_progress','short','error','1542WLPlSB','\x0a✅\x20Resumed\x20feature\x20review:\x20','scenarios','JCSwn','incomplete','approved','trim','vrpql','\x20--current-branch','dashboardUrl','\x20\x20\x20\x20\x20📋\x20Selector:\x20','fxwYY','jdumC','textContent','\x20\x20\x20Branch:\x20','3948600wOEepS','pJhue','AodpI','asHeD','completedAt','.md','\x0a✅\x20Session\x20is\x20already\x20completed.','jwYlB','Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','32088nzjWOM','screenshotUrls','type','blockedItems','join','4786470jycbpT','jCPPW','iftRX','mDLsj','all','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','54EcfLUg','agentResponse','RANGER_TEST_USERNAME','gitBranch','terminalReason','uQQec','\x0aConcluding\x20session...','kDTzX','UimQv','\x20\x20\x20ID:\x20','ready','scenario','5tNoTuk','pipe','\x20(v','has','11654224guGPEM','\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20(','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','\x20\x20Expected\x20flow:','verificationInProgressItems','linkedSession','No\x20active\x20session\x20for\x20this\x20feature\x20review.','tpRdg','\x20\x20\x20Created:\x20','incompleteReason','\x20\x20\x20\x20\x20📷\x20Screenshot:\x20','\x20\x20\x20\x20\x20📍\x20Annotation:\x20','content','toLocaleDateString','limit','git\x20rev-parse\x20--abbrev-ref\x20HEAD','mTBuJ','XtFWL','210460PnhjYf','items','\x20\x20\x20\x20\x20\x20Blocked:\x20','yOAer','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','en-US','filter','Scenario\x20','AHwRP','\x0a⚠️\x20\x20','find','HoeFG','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','\x20\x20\x20Updated\x20branch\x20to:\x20','bPkSp','\x20—\x20','pjnTR','canonicalFlow','env','name','kWVZZ','\x20/\x20','\x0a❌\x20Invalid\x20scenario\x20index:\x20','9ZKqTAp','any','uqODk','\x0a\x20\x20\x20Scenarios:','uvRNy','LYgRD','39774757uttzAf','\x0a✅\x20Report\x20generated:\x20','authorName','stdout','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','submittedAt','sGjBc','version','JlihD','gitRepoUrl','isInteger','pendingItems','closed','dAKOv','log','split','reports','rNYCB','YpEBX','YVlzU','vPJVk','ohoQU','\x20\x20\x20\x20\x20\x20Incomplete:\x20','yfnZm','EAmAQ','isKeyStep','unaddressedComments','currentSessionId','selector','VBkLd','qGrpx','oGBpf','git\x20remote\x20get-url\x20origin','\x0a✅\x20Scenario\x20added','\x1b[1m','\x20\x20\x20Progress:\x20','createdAt','browserSessionId','ryDbh','domRef','sessionId','storage','\x20\x20\x20▶️\x20Started\x20session\x20','\x20--limit\x20','kppUY','bDdZT','spatial','Step\x20','replace','timing','qpjlv','\x20>\x20','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','wALUZ','WXXZS','\x20blocked','NNPBM','length','\x0a✅\x20Restored\x20feature\x20review:\x20','checklistItems','verification_in_progress','AoaAY','canceledReason','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','point','exit','\x0aNo\x20feature\x20reviews\x20found.','utf-8','slice','ziNyc','\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','includeDeleted','\x20Session\x20','incompleteItems','\x20\x20\x20Repository:\x20','toFixed','PtwIt','\x0a✅\x20Scenario\x20updated','\x20scenario(s).','124038Fldfmx','status','map','cHaiC','YGNka','totalCount','Next\x20page:\x20ranger\x20list\x20--offset\x20','style','after','assetUrl','currentBranch','lckZM'];_0x4f03=function(){return _0x2d9638;};return _0x4f03();}function displayFeature(_0x3fff91,_0x4ffda3){const _0x9d6ec5=_0x455191,_0x37c34f={'ziNyc':function(_0x5a5ea6,_0x418280){return _0x5a5ea6>_0x418280;},'vrpql':_0x9d6ec5(0x15f),'DFaVS':function(_0x3c672c,_0x160f1e){return _0x3c672c===_0x160f1e;},'PtwIt':_0x9d6ec5(0x103),'YVlzU':_0x9d6ec5(0x102),'wALUZ':function(_0x4062eb,_0x514d31){return _0x4062eb===_0x514d31;},'uvRNy':_0x9d6ec5(0x16e),'fHrFs':_0x9d6ec5(0x19e),'rFFcl':function(_0x11c247,_0x260ab1){return _0x11c247>_0x260ab1;},'ohoQU':function(_0x3df8e0,_0x4658eb){return _0x3df8e0+_0x4658eb;},'bPkSp':function(_0x55cf4e,_0x27a9b4){return _0x55cf4e===_0x27a9b4;},'vXjPb':function(_0xe1364d,_0x2dc094){return _0xe1364d===_0x2dc094;}};console[_0x9d6ec5(0x170)]('\x0a'+_0x3fff91['name']+'\x20('+_0x3fff91[_0x9d6ec5(0x107)]+')');_0x3fff91[_0x9d6ec5(0xe1)]&&console['log']('\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x3fff91[_0x9d6ec5(0xe1)]));_0x3fff91[_0x9d6ec5(0xe4)]&&console[_0x9d6ec5(0x170)]('\x20\x20\x20Description:\x20'+_0x3fff91['description']);_0x3fff91['gitRepoUrl']&&console[_0x9d6ec5(0x170)](_0x9d6ec5(0xcd)+_0x3fff91[_0x9d6ec5(0x16b)]);_0x3fff91['gitBranch']&&console['log'](_0x9d6ec5(0x10c)+_0x3fff91['gitBranch']);console['log'](_0x9d6ec5(0x13a)+new Date(_0x3fff91[_0x9d6ec5(0x186)])['toLocaleString']());_0x3fff91['completedAt']&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x3fff91['completedAt'])['toLocaleString']());if(_0x4ffda3&&_0x37c34f[_0x9d6ec5(0x1a7)](_0x4ffda3[_0x9d6ec5(0x19b)],0x0)){console['log'](_0x37c34f[_0x9d6ec5(0x105)]);for(let _0x88c204=0x0;_0x88c204<_0x4ffda3[_0x9d6ec5(0x19b)];_0x88c204++){const _0x589df8=_0x4ffda3[_0x88c204];let _0xb4b462;if(_0x37c34f[_0x9d6ec5(0xec)](_0x589df8['status'],_0x9d6ec5(0x16e))&&_0x589df8['terminalReason']===_0x37c34f[_0x9d6ec5(0xcf)])_0xb4b462='✅';else{if(_0x37c34f['DFaVS'](_0x589df8['status'],'verified'))_0xb4b462='🟢';else{if(_0x589df8['status']===_0x37c34f[_0x9d6ec5(0x175)])_0xb4b462='🟠';else{if(_0x37c34f['wALUZ'](_0x589df8['status'],'blocked'))_0xb4b462='🛑';else{if(_0x37c34f[_0x9d6ec5(0xec)](_0x589df8['status'],_0x37c34f[_0x9d6ec5(0x160)]))_0xb4b462='⛔';else _0x589df8['status']===_0x37c34f['fHrFs']?_0xb4b462='⏳':_0xb4b462='⬜';}}}}const _0x5c25d2=_0x37c34f['rFFcl'](_0x589df8[_0x9d6ec5(0x169)],0x1)?_0x9d6ec5(0x12f)+_0x589df8['version']+')':'',_0x5a9f5c=_0x589df8['version']>0x1&&_0x589df8['parentItemId']&&_0x589df8[_0x9d6ec5(0xd3)]!==_0x37c34f['uvRNy']&&_0x589df8['status']!=='verified'?'\x20[has\x20reviewer\x20feedback]':'';console['log']('\x20\x20\x20'+_0x37c34f[_0x9d6ec5(0x177)](_0x88c204,0x1)+'.\x20'+_0xb4b462+'\x20'+_0x589df8['description']+_0x5c25d2+_0x5a9f5c);_0x589df8['status']==='blocked'&&_0x589df8['blockedReason']&&console[_0x9d6ec5(0x170)](_0x9d6ec5(0x146)+_0x589df8[_0x9d6ec5(0xf9)]);_0x37c34f[_0x9d6ec5(0x153)](_0x589df8[_0x9d6ec5(0xd3)],'incomplete')&&_0x589df8['incompleteReason']&&console['log'](_0x9d6ec5(0x178)+_0x589df8['incompleteReason']);if(_0x589df8[_0x9d6ec5(0xd3)]===_0x37c34f['uvRNy']&&_0x37c34f[_0x9d6ec5(0x197)](_0x589df8[_0x9d6ec5(0x125)],_0x9d6ec5(0x103)))console[_0x9d6ec5(0x170)]('\x20\x20\x20\x20\x20\x20Approved');else _0x37c34f['vXjPb'](_0x589df8['status'],_0x37c34f[_0x9d6ec5(0x160)])&&_0x589df8['canceledReason']&&console['log']('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0x589df8['canceledReason']);}}}export async function featureCreate(_0x25e41c,_0x3835b3){const _0x2e1050=_0x455191,_0x20da5b={'zfSiT':function(_0x282be5,_0x217655){return _0x282be5===_0x217655;},'RsgbZ':function(_0x31945d){return _0x31945d();},'AoaAY':'\x0aCreating\x20feature\x20review...','ONcpZ':function(_0x3e5a71,_0x3c3dbc){return _0x3e5a71(_0x3c3dbc);},'DlCdH':function(_0x4fcc28,_0x5310c8){return _0x4fcc28(_0x5310c8);},'NNPBM':function(_0x599c82,_0x226bdc){return _0x599c82(_0x226bdc);},'mmBxm':function(_0x34e4ea,_0x49d8b0,_0x4f6fd6){return _0x34e4ea(_0x49d8b0,_0x4f6fd6);}},{envNames:_0x3be200}=await getEnvNames();if(_0x3be200[_0x2e1050(0x19b)]===0x0&&!process['env'][_0x2e1050(0x123)]){let _0x4bf60c=0x0;try{_0x4bf60c=(await listCloudProfiles())[_0x2e1050(0x19b)];}catch{_0x4bf60c=0x1;}_0x20da5b[_0x2e1050(0xed)](_0x4bf60c,0x0)&&console['warn']('\x0a'+formatProfileRequiredMessage(_0x3b729d=>bold(_0x3b729d)));}const _0x4d5f44=_0x3835b3[_0x2e1050(0x100)]?_0x3835b3[_0x2e1050(0x100)]['map'](_0x5ac65c=>_0x5ac65c[_0x2e1050(0x104)]()):[],_0x29460b=getGitRepoUrl(),_0x4fcadd=_0x20da5b[_0x2e1050(0xf5)](getGitBranch);console['log'](_0x20da5b[_0x2e1050(0x19f)]);const _0x5b4ba6=await _0x20da5b['ONcpZ'](createFeature,{'name':_0x25e41c,'description':_0x3835b3[_0x2e1050(0xe4)],'checklist':_0x4d5f44,'gitRepoUrl':_0x29460b,'gitBranch':_0x4fcadd});await _0x20da5b['DlCdH'](setActiveFeatureId,_0x5b4ba6['id']),await _0x20da5b[_0x2e1050(0x19a)](tryStartCurrentSession,_0x5b4ba6['id']);const _0x1e148e=process[_0x2e1050(0x157)]['CLAUDE_SESSION_ID'];_0x1e148e&&_0x20da5b['mmBxm'](registerSession,_0x1e148e,_0x5b4ba6['id']),console['log']('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x5b4ba6['id']),displayFeature(_0x5b4ba6,_0x5b4ba6[_0x2e1050(0x19d)]),console['log']('\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review');}export async function featureList(_0x486a01){const _0x528c80=_0x455191,_0x1be227={'WXXZS':function(_0x3197a6){return _0x3197a6();},'jCPPW':'1|5|4|2|0|3','OtAtF':function(_0x2f304,_0x5767e4){return _0x2f304(_0x5767e4);},'pEKft':'\x20--include-deleted'},_0x38da55={'limit':_0x486a01['limit']??0xa,'offset':_0x486a01['offset']??0x0,'includeDeleted':_0x486a01['includeDeleted']};_0x486a01[_0x528c80(0xdc)]&&(_0x38da55['gitRepoUrl']=_0x1be227[_0x528c80(0x198)](getGitRepoUrl),_0x38da55[_0x528c80(0x124)]=getGitBranch());const _0x30efcc=await listFeatures(_0x38da55);if(_0x30efcc[_0x528c80(0x145)]['length']===0x0){console['log'](_0x528c80(0x1a4));return;}const _0x361915=_0x30efcc[_0x528c80(0xd7)]>_0x30efcc['items'][_0x528c80(0x19b)]?'Showing\x20'+_0x30efcc['items']['length']+'\x20of\x20'+_0x30efcc[_0x528c80(0xd7)]:_0x30efcc[_0x528c80(0xd7)]+'\x20feature\x20review(s)\x20found';console['log']('\x0a'+_0x361915+':\x0a');for(const _0x3f59f7 of _0x30efcc['items']){const _0x45dceb=_0x1be227[_0x528c80(0x11c)]['split']('|');let _0x57cd56=0x0;while(!![]){switch(_0x45dceb[_0x57cd56++]){case'0':console['log'](_0x528c80(0x13a)+new Date(_0x3f59f7['createdAt'])['toLocaleDateString']());continue;case'1':console[_0x528c80(0x170)](''+_0x3f59f7[_0x528c80(0x158)]);continue;case'2':_0x3f59f7[_0x528c80(0x124)]&&console[_0x528c80(0x170)]('\x20\x20\x20Branch:\x20'+_0x3f59f7['gitBranch']);continue;case'3':console['log']('');continue;case'4':_0x3f59f7['stats']&&console[_0x528c80(0x170)](_0x528c80(0x185)+_0x1be227['OtAtF'](getProgressDisplay,_0x3f59f7['stats']));continue;case'5':console['log'](_0x528c80(0x12a)+_0x3f59f7['id']);continue;}break;}}const _0x48dbf8=_0x38da55[_0x528c80(0x140)]??0xa,_0x240f50=(_0x38da55[_0x528c80(0xee)]??0x0)+_0x30efcc['items']['length'];if(_0x240f50<_0x30efcc[_0x528c80(0xd7)]){const _0x5f4e2f=_0x48dbf8!==0xa?_0x528c80(0x18d)+_0x48dbf8:'',_0x1b4d2a=_0x486a01[_0x528c80(0xdc)]?_0x528c80(0x106):'',_0x404dbc=_0x486a01[_0x528c80(0x1a9)]?_0x1be227['pEKft']:'';console[_0x528c80(0x170)](_0x528c80(0xd8)+_0x240f50+_0x5f4e2f+_0x1b4d2a+_0x404dbc);}}export async function featureShow(_0x14d54d){const _0x4318dc=_0x455191,_0x2b20c6={'pJhue':function(_0x3360f5,_0x243cc1,_0x5614f9){return _0x3360f5(_0x243cc1,_0x5614f9);}},_0x183655=_0x14d54d||await getActiveFeatureId();if(!_0x183655)throw new Error(_0x4318dc(0x133));const _0x21d822=await getFeature(_0x183655);_0x2b20c6[_0x4318dc(0x10e)](displayFeature,_0x21d822,_0x21d822[_0x4318dc(0x19d)]);}export async function featureResume(_0x15beb3){const _0x1ef07c=_0x455191,_0x2eb68a={'qpjlv':function(_0x4da653,_0x3a0f9e){return _0x4da653(_0x3a0f9e);},'ryDbh':function(_0x3f7a5f){return _0x3f7a5f();},'InaGN':function(_0x4e7948,_0x14c639){return _0x4e7948!==_0x14c639;},'xhmeC':function(_0xebc01,_0x56f177,_0x1259d6){return _0xebc01(_0x56f177,_0x1259d6);},'fxwYY':function(_0x160706,_0x40d70c){return _0x160706(_0x40d70c);},'rNYCB':function(_0x39cb8a){return _0x39cb8a();},'NVSoZ':function(_0x5250b9,_0xc5f7c9){return _0x5250b9||_0xc5f7c9;},'hHgxq':_0x1ef07c(0x15d),'asHeD':'selected','dAKOv':function(_0x4bd0d3,_0x397aee){return _0x4bd0d3(_0x397aee);}};if(_0x15beb3){const _0x409118=await _0x2eb68a['qpjlv'](getFeature,_0x15beb3);await setActiveFeatureId(_0x409118['id']);const _0x555c4c=_0x2eb68a[_0x1ef07c(0x188)](getGitBranch);_0x555c4c&&_0x2eb68a['InaGN'](_0x555c4c,_0x409118['gitBranch'])&&(await _0x2eb68a['xhmeC'](updateFeature,_0x409118['id'],{'gitBranch':_0x555c4c}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x555c4c));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x409118[_0x1ef07c(0x158)]+'\x20('+_0x409118['id']+')'),await tryStartCurrentSession(_0x409118['id']);const _0x3c3c71=process['env']['CLAUDE_SESSION_ID'];_0x3c3c71&&registerSession(_0x3c3c71,_0x409118['id']);_0x2eb68a['xhmeC'](displayFeature,_0x409118,_0x409118['checklistItems']),await _0x2eb68a[_0x1ef07c(0x109)](printFeedbackNudge,_0x409118['id']);return;}const _0x7cf641=getGitRepoUrl(),_0x139047=_0x2eb68a[_0x1ef07c(0x173)](getGitBranch);if(!_0x7cf641&&!_0x139047)throw new Error('Not\x20in\x20a\x20git\x20repository.');console['log']('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+_0x2eb68a['NVSoZ'](_0x7cf641,_0x2eb68a['hHgxq'])+_0x1ef07c(0x15a)+(_0x139047||_0x1ef07c(0x15d))+'...');const _0x17de42=await _0x2eb68a[_0x1ef07c(0x109)](listFeatures,{'gitRepoUrl':_0x7cf641,'gitBranch':_0x139047}),_0x229229=_0x17de42['items']['filter'](_0x2c4d0b=>_0x2c4d0b[_0x1ef07c(0xd3)]?_0x2c4d0b['status']!=='verified':!_0x2c4d0b['completedAt']);if(_0x229229[_0x1ef07c(0x19b)]===0x0){console[_0x1ef07c(0x170)]('\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.'),console[_0x1ef07c(0x170)](_0x1ef07c(0x166));return;}let _0x5d0fe1;if(_0x229229[_0x1ef07c(0x19b)]===0x1)_0x5d0fe1=_0x229229[0x0];else{const _0x4f98ae=process['stdin']['isTTY']&&process[_0x1ef07c(0x165)]['isTTY'];if(!_0x4f98ae){console['log'](_0x1ef07c(0x1a8));for(const _0x93184a of _0x229229){console['log']('\x20\x20'+_0x93184a['name']),console[_0x1ef07c(0x170)]('\x20\x20\x20\x20\x20ID:\x20'+_0x93184a['id']),_0x93184a['stats']&&console['log'](_0x1ef07c(0xdf)+_0x2eb68a['qpjlv'](getProgressDisplay,_0x93184a[_0x1ef07c(0xe1)])),_0x93184a[_0x1ef07c(0x124)]&&console['log']('\x20\x20\x20\x20\x20Branch:\x20'+_0x93184a['gitBranch']);}throw new Error('Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>');}const {selected:_0x94ecaf}=await _0x49b5e8['prompt']([{'type':'list','name':_0x2eb68a[_0x1ef07c(0x110)],'message':_0x1ef07c(0x115),'choices':_0x229229['map'](_0x419637=>({'name':_0x419637[_0x1ef07c(0x158)]+'\x20('+_0x419637['id']+')','value':_0x419637['id']}))}]);_0x5d0fe1=_0x229229[_0x1ef07c(0x14f)](_0x59cf4d=>_0x59cf4d['id']===_0x94ecaf);}await _0x2eb68a[_0x1ef07c(0x16f)](setActiveFeatureId,_0x5d0fe1['id']);_0x139047&&_0x139047!==_0x5d0fe1[_0x1ef07c(0x124)]&&(await updateFeature(_0x5d0fe1['id'],{'gitBranch':_0x139047}),console['log'](_0x1ef07c(0x152)+_0x139047));console['log'](_0x1ef07c(0xff)+_0x5d0fe1['name']+'\x20('+_0x5d0fe1['id']+')'),await _0x2eb68a[_0x1ef07c(0x194)](tryStartCurrentSession,_0x5d0fe1['id']);const _0x2fc5b3=await _0x2eb68a['dAKOv'](getFeature,_0x5d0fe1['id']),_0x1e0537=process['env']['CLAUDE_SESSION_ID'];_0x1e0537&&registerSession(_0x1e0537,_0x2fc5b3['id']),displayFeature(_0x2fc5b3,_0x2fc5b3['checklistItems']),await printFeedbackNudge(_0x2fc5b3['id']);}async function printFeedbackNudge(_0x4b250c){const _0x4a6e46=_0x455191;try{const {items:_0x277461}=await getActionItems(_0x4b250c);let _0x1a939e=0x0,_0x173c1a=0x0;for(const _0x6f4a41 of _0x277461){const _0x2bc67d=await getItemFeedback(_0x4b250c,_0x6f4a41['id']);_0x2bc67d['unaddressedComments']['length']>0x0&&(_0x1a939e+=_0x2bc67d['unaddressedComments'][_0x4a6e46(0x19b)],_0x173c1a++);}_0x1a939e>0x0&&(console[_0x4a6e46(0x170)](_0x4a6e46(0x14e)+_0x1a939e+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x173c1a+_0x4a6e46(0xd1)),console['log']('\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'));}catch{}}async function tryStartCurrentSession(_0x20893b){const _0x573324=_0x455191,_0x519f8a={'AHwRP':function(_0x13c8b3,_0x9c9629){return _0x13c8b3(_0x9c9629);}};try{const {sessions:_0x41297c}=await _0x519f8a[_0x573324(0x14d)](listFeatureSessions,_0x20893b),_0xf705c6=_0x41297c['find'](_0x8a4735=>_0x8a4735['status']===_0x573324(0x12b));_0xf705c6&&(await startSession(_0x20893b,_0xf705c6['id']),console['log'](_0x573324(0x18c)+_0xf705c6['iteration']));}catch{}}function _0xea2f(_0x36d32,_0x41dad5){_0x36d32=_0x36d32-0xcc;const _0x4f039f=_0x4f03();let _0xea2fe4=_0x4f039f[_0x36d32];return _0xea2fe4;}export async function featureReport(_0x38209f,_0x50d07a){const _0x18de00=_0x455191,_0xe7de13={'mDLsj':function(_0x145a25){return _0x145a25();},'jWwMC':'\x0aGenerating\x20report...','jEHkZ':function(_0x5005fb,_0x67f808,_0x3fc0b9,_0x464bd2){return _0x5005fb(_0x67f808,_0x3fc0b9,_0x464bd2);},'HrjDH':function(_0x348fa7,_0xd5809c){return _0x348fa7(_0xd5809c);},'WtgBc':function(_0x35fce1,_0x404b1e,_0x321602){return _0x35fce1(_0x404b1e,_0x321602);}},_0x2ec03a=_0x38209f||await _0xe7de13[_0x18de00(0x11e)](getActiveFeatureId);if(!_0x2ec03a)throw new Error(_0x18de00(0x120));console['log'](_0xe7de13['jWwMC']);const _0x3cfb68=await getFeatureReportMarkdown(_0x2ec03a,{'style':_0x50d07a[_0x18de00(0xd9)]}),_0x34f96f=_0x50d07a['output']||_0xe7de13[_0x18de00(0xe5)](join,_0xe7de13[_0x18de00(0x11e)](getRangerDir),_0x18de00(0x172),_0x2ec03a+_0x18de00(0x112)),_0x4b644e=join(_0x34f96f,'..');!_0xe7de13['HrjDH'](existsSync,_0x4b644e)&&await _0xe7de13['WtgBc'](mkdir,_0x4b644e,{'recursive':!![]}),await _0xe7de13['jEHkZ'](writeFile,_0x34f96f,_0x3cfb68,'utf-8'),console['log'](_0x18de00(0x163)+_0x34f96f);}function getScenarioResult(_0x1dc3cd){const _0x5bd365=_0x455191,_0x53c795={'jdumC':function(_0x4cf2ae,_0x3f901e){return _0x4cf2ae===_0x3f901e;},'sGjBc':'closed','mRBgK':'verification_in_progress','uqODk':_0x5bd365(0xfb)};if(_0x53c795['jdumC'](_0x1dc3cd[_0x5bd365(0xd3)],_0x5bd365(0x16e)))return _0x1dc3cd['terminalReason']??_0x53c795[_0x5bd365(0x168)];if(_0x53c795[_0x5bd365(0x10a)](_0x1dc3cd[_0x5bd365(0xd3)],_0x53c795['mRBgK']))return _0x53c795[_0x5bd365(0x15e)];return _0x1dc3cd['status'];}function getScenarioRationale(_0x25f7c7,_0x5f126b){const _0x3d5ff1=_0x455191;if(_0x5f126b)return _0x5f126b;if(_0x25f7c7['blockedReason'])return _0x25f7c7[_0x3d5ff1(0xf9)];if(_0x25f7c7[_0x3d5ff1(0x13b)])return _0x25f7c7['incompleteReason'];if(_0x25f7c7['canceledReason'])return _0x25f7c7[_0x3d5ff1(0x1a0)];if(_0x25f7c7['notes'])return _0x25f7c7['notes'];return null;}export async function featureReportPrDescription(_0x972fe0,_0x2d08e9){const _0x23ef30=_0x455191,_0x5aca2e={'sRRLZ':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','UWdzR':function(_0x26113c,_0x4f7b29,_0x3abaff){return _0x26113c(_0x4f7b29,_0x3abaff);},'ZwKRy':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','iQyBZ':function(_0x4fb5be,_0x12abb9){return _0x4fb5be+_0x12abb9;},'pCLCG':function(_0x224d13,_0x359437){return _0x224d13===_0x359437;},'tpRdg':'\x0a❌\x20All\x20scenarios\x20were\x20excluded.'},_0x5dd39e=_0x972fe0||await getActiveFeatureId();if(!_0x5dd39e)throw new Error(_0x5aca2e['sRRLZ']);const _0x23c05e=await getFeature(_0x5dd39e),_0x357595=_0x23c05e[_0x23ef30(0x19d)]||[],_0x41c68c=_0x5aca2e['UWdzR'](getCurrentSessionItems,_0x23c05e,_0x357595);_0x41c68c[_0x23ef30(0x19b)]===0x0&&(console['error'](_0x5aca2e['ZwKRy']),process['exit'](0x1));const _0x1becf5=_0x2d08e9['excludeScenarios']??[],_0x800b3a=_0x1becf5['filter'](_0x2af888=>!Number[_0x23ef30(0x16c)](_0x2af888)||_0x2af888<0x1||_0x2af888>_0x41c68c[_0x23ef30(0x19b)]);if(_0x800b3a[_0x23ef30(0x19b)]>0x0){console[_0x23ef30(0xfd)](_0x23ef30(0x151)+_0x800b3a[_0x23ef30(0x11a)](',\x20')),console['log']('\x0aAvailable\x20scenarios:');for(let _0x2cc996=0x0;_0x2cc996<_0x41c68c['length'];_0x2cc996++){console['log']('\x20\x20'+_0x5aca2e['iQyBZ'](_0x2cc996,0x1)+'.\x20'+_0x41c68c[_0x2cc996]['description']);}process[_0x23ef30(0x1a3)](0x1);}const _0x25f875=new Set(_0x1becf5[_0x23ef30(0xd4)](_0x2747e6=>_0x2747e6-0x1)),_0x301bd5=_0x41c68c[_0x23ef30(0x14b)]((_0x1c104d,_0x4be15a)=>!_0x25f875[_0x23ef30(0x130)](_0x4be15a));_0x5aca2e['pCLCG'](_0x301bd5[_0x23ef30(0x19b)],0x0)&&(console['error'](_0x5aca2e[_0x23ef30(0x139)]),process[_0x23ef30(0x1a3)](0x1));if(_0x2d08e9['json'])await outputJsonReport(_0x5dd39e,_0x23c05e,_0x301bd5);else{const _0x237895=await getFeatureReportMarkdown(_0x5dd39e,{'itemIds':_0x301bd5['map'](_0x187d16=>_0x187d16['id'])});process[_0x23ef30(0x165)][_0x23ef30(0xe8)](_0x237895['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x4e459b,_0x4df671,_0x158848){const _0x10af0c=_0x455191,_0xc7d74e={'yOAer':function(_0x4d892a,_0x1cf148){return _0x4d892a(_0x1cf148);},'qfhoC':function(_0x5a1d36,_0x4cd4e0){return _0x5a1d36>_0x4cd4e0;},'YpEBX':function(_0x251cb8){return _0x251cb8();}},_0x58f43f=_0xc7d74e[_0x10af0c(0x174)](getApiBaseUrl),_0x502e6f=await getFeatureReport(_0x4e459b),_0x3e3076=new Map(_0x502e6f[_0x10af0c(0x19d)][_0x10af0c(0xd4)](_0x56bf0c=>[_0x56bf0c['id'],_0x56bf0c])),_0x5b5b49=await Promise[_0x10af0c(0x11f)](_0x158848[_0x10af0c(0xd4)](async _0x286121=>{const _0x206fe0=_0x10af0c,_0x5a0a96=_0x3e3076[_0x206fe0(0xf2)](_0x286121['id']),_0x315a05=_0x5a0a96?.[_0x206fe0(0x137)]??null;let _0x4edd4f=[];if(_0x286121['browserSessionId'])try{const {steps:_0x4662f7}=await _0xc7d74e['yOAer'](getBrowserSessionSteps,_0x286121[_0x206fe0(0x187)]);_0xc7d74e['qfhoC'](_0x4662f7['length'],0x0)&&(_0x4edd4f=_0x4662f7[_0x206fe0(0xd4)](_0x29144c=>{const _0xd2b2ac=_0x206fe0,_0x41aec2=_0x29144c['assets'][_0xd2b2ac(0x14f)](_0x243fef=>_0x243fef[_0xd2b2ac(0xeb)]==='screenshot'&&_0x243fef[_0xd2b2ac(0x193)]===_0xd2b2ac(0xda))??_0x29144c[_0xd2b2ac(0xf8)][_0xd2b2ac(0x14f)](_0x3188e0=>_0x3188e0[_0xd2b2ac(0xeb)]==='screenshot');let _0x548224=null,_0x4c5029=null;if(_0x41aec2){const _0xd7dc54=_0x41aec2[_0xd2b2ac(0x18b)]['location'][_0xd2b2ac(0x171)]('/')['pop']();_0x548224=_0x58f43f+'/api/v1/mcp/browser-sessions/'+_0x286121[_0xd2b2ac(0x187)]+_0xd2b2ac(0xde)+_0xd7dc54,_0xd7dc54&&(_0x4c5029=_0xd7dc54[_0xd2b2ac(0x192)](/\.\w+$/,'')[_0xd2b2ac(0x192)](/^(key_)?\d+_/,'')[_0xd2b2ac(0x192)](/[-_]/g,'\x20'));}return{'description':_0x4c5029||_0x29144c['description']||_0x29144c['stepName']||_0xd2b2ac(0x191)+_0x29144c['position'],'screenshot':_0x548224,'is_key_step':_0x29144c[_0xd2b2ac(0x17b)]};}));}catch{}return _0x4edd4f['length']===0x0&&_0x315a05?.['screenshotUrls']&&(_0x4edd4f=_0x315a05[_0x206fe0(0x117)][_0x206fe0(0xd4)]((_0x417ac2,_0x5adc53)=>({'description':'Screenshot\x20'+(_0x5adc53+0x1),'screenshot':_0x417ac2,'is_key_step':![]}))),{'description':_0x286121[_0x206fe0(0xe4)],'result':_0xc7d74e[_0x206fe0(0x147)](getScenarioResult,_0x286121),'rationale':getScenarioRationale(_0x286121,_0x315a05?.[_0x206fe0(0x122)]),'steps':_0x4edd4f};})),_0x42a526={'url':_0x4df671[_0x10af0c(0x107)],'scenarios':_0x5b5b49};process['stdout']['write'](JSON['stringify'](_0x42a526,null,0x2)+'\x0a');}export async function featureConcludeSession(_0x168cfd){const _0x47e6c8=_0x455191,_0x37ba81={'JCSwn':function(_0x1dc737){return _0x1dc737();},'oGBpf':'completed','lckZM':function(_0x5caf77,_0x45cc18){return _0x5caf77!==_0x45cc18;}},_0x240fae=_0x168cfd||await _0x37ba81[_0x47e6c8(0x101)](getActiveFeatureId);if(!_0x240fae)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x29c456=await getFeature(_0x240fae);if(!_0x29c456['currentSessionId'])throw new Error(_0x47e6c8(0x138));const {sessions:_0x4c78e7}=await listFeatureSessions(_0x240fae),_0x5b4f4f=_0x4c78e7['find'](_0x241b45=>_0x241b45['id']===_0x29c456['currentSessionId']);if(!_0x5b4f4f)throw new Error('Current\x20session\x20not\x20found.');if(_0x5b4f4f[_0x47e6c8(0xd3)]===_0x37ba81[_0x47e6c8(0x181)]){console[_0x47e6c8(0x170)](_0x47e6c8(0x113));return;}if(_0x37ba81[_0x47e6c8(0xdd)](_0x5b4f4f[_0x47e6c8(0xd3)],_0x47e6c8(0xfb)))throw new Error('Cannot\x20conclude\x20session\x20with\x20status:\x20'+_0x5b4f4f['status']);console['log'](_0x47e6c8(0x127)),await concludeSession(_0x240fae,_0x29c456[_0x47e6c8(0x17d)]),console[_0x47e6c8(0x170)]('\x0a✅\x20Session\x20'+_0x5b4f4f['iteration']+'\x20concluded.'),console[_0x47e6c8(0x170)]('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x429ddc){const _0x270719=_0x455191,_0x5d463c={'sIjqG':function(_0x51e36c){return _0x51e36c();},'XtFWL':function(_0xc381c0,_0x4af47f){return _0xc381c0(_0x4af47f);},'UAzdt':function(_0x465dff,_0x55fc74){return _0x465dff===_0x55fc74;},'QQxSa':'completed'},_0x5a59c8=_0x429ddc||await _0x5d463c['sIjqG'](getActiveFeatureId);if(!_0x5a59c8)throw new Error(_0x270719(0x120));const _0x1ca129=await _0x5d463c[_0x270719(0x143)](getFeature,_0x5a59c8);console[_0x270719(0x170)]('\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20'+_0x1ca129[_0x270719(0x158)]+'\x0a');const {sessions:_0x45e712}=await listFeatureSessions(_0x5a59c8);if(_0x5d463c['UAzdt'](_0x45e712[_0x270719(0x19b)],0x0)){console['log']('No\x20sessions\x20found.');return;}for(const _0x357a33 of _0x45e712){const _0x206e5d=_0x357a33['status']===_0x5d463c['QQxSa']?'✅':_0x357a33[_0x270719(0xd3)]==='in_progress'?'🔄':'▶️';console['log'](_0x206e5d+_0x270719(0x1aa)+_0x357a33['iteration']+'\x20('+_0x357a33['id']+')'),console[_0x270719(0x170)]('\x20\x20\x20Status:\x20'+_0x357a33['status']),console[_0x270719(0x170)]('\x20\x20\x20Created:\x20'+new Date(_0x357a33['createdAt'])[_0x270719(0xe9)]()),_0x357a33['completedAt']&&console[_0x270719(0x170)]('\x20\x20\x20Completed:\x20'+new Date(_0x357a33[_0x270719(0x111)])[_0x270719(0xe9)]()),console[_0x270719(0x170)]('');}}export async function featureAddScenario(_0x28b292,_0x3ec5b8){const _0x5a86a1=_0x455191,_0x2d2d1d={'ZFMPI':function(_0x63e4a8){return _0x63e4a8();},'WczBY':function(_0x15aab5,_0xf75251,_0x7e41c2){return _0x15aab5(_0xf75251,_0x7e41c2);}},_0x54ee5d=_0x3ec5b8||await _0x2d2d1d['ZFMPI'](getActiveFeatureId);if(!_0x54ee5d)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x977a83=await getFeature(_0x54ee5d);if(_0x977a83[_0x5a86a1(0xe3)]&&!_0x977a83['latestReview'][_0x5a86a1(0x167)])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x977a83['dashboardUrl']);await _0x2d2d1d['WczBY'](createChecklistItem,_0x54ee5d,_0x28b292);const _0x231715=await getFeature(_0x54ee5d);console[_0x5a86a1(0x170)](_0x5a86a1(0x183)),displayFeature(_0x231715,_0x231715[_0x5a86a1(0x19d)]);}export async function featureEditScenario(_0x16cc0c,_0x2ed000){const _0x4a145a=_0x455191,_0x944d23={'OuXWm':function(_0x154c3e,_0x4589c1){return _0x154c3e(_0x4589c1);},'kSCSZ':'Please\x20finish\x20your\x20review\x20first:','vVcAh':function(_0x2c40d1,_0x5ba2f6){return _0x2c40d1===_0x5ba2f6;},'kWVZZ':_0x4a145a(0x1a1),'RhhuZ':'\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','klDff':'\x0aAvailable\x20scenarios:','YcArI':function(_0x11bbd5,_0x3d5d20){return _0x11bbd5<_0x3d5d20;},'OLTil':function(_0x337e8d,_0x3b2dbc){return _0x337e8d>=_0x3b2dbc;},'cHaiC':function(_0x2bbe0e,_0x345a67){return _0x2bbe0e+_0x345a67;},'pjnTR':function(_0x3a6bae,_0x1ccae2,_0x2da972,_0x4732cc){return _0x3a6bae(_0x1ccae2,_0x2da972,_0x4732cc);}},_0x443e80=_0x2ed000['id']||await getActiveFeatureId();!_0x443e80&&(console['error']('\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.'),console[_0x4a145a(0xfd)](_0x4a145a(0x196)),process[_0x4a145a(0x1a3)](0x1));const _0x16719e=await _0x944d23['OuXWm'](getFeature,_0x443e80);_0x16719e[_0x4a145a(0xe3)]&&!_0x16719e['latestReview']['submittedAt']&&(console['error'](_0x4a145a(0x149)),console[_0x4a145a(0xfd)](_0x944d23[_0x4a145a(0xe7)]),console[_0x4a145a(0xfd)]('\x20\x20'+_0x16719e['dashboardUrl']),process[_0x4a145a(0x1a3)](0x1));const _0x446625=_0x16719e[_0x4a145a(0x19d)]||[];_0x944d23['vVcAh'](_0x446625['length'],0x0)&&(console[_0x4a145a(0xfd)](_0x944d23[_0x4a145a(0x159)]),process['exit'](0x1));if(_0x2ed000['scenario']===undefined){console['error'](_0x944d23[_0x4a145a(0xe6)]),console['log'](_0x944d23['klDff']);for(let _0x46d5fd=0x0;_0x46d5fd<_0x446625[_0x4a145a(0x19b)];_0x46d5fd++){console[_0x4a145a(0x170)]('\x20\x20'+(_0x46d5fd+0x1)+'.\x20'+_0x446625[_0x46d5fd]['description']);}process['exit'](0x1);}const _0x1f8653=_0x2ed000[_0x4a145a(0x12c)]-0x1;if(_0x944d23['YcArI'](_0x1f8653,0x0)||_0x944d23['OLTil'](_0x1f8653,_0x446625['length'])){console[_0x4a145a(0xfd)](_0x4a145a(0x15b)+_0x2ed000[_0x4a145a(0x12c)]+'.\x20Feature\x20review\x20has\x20'+_0x446625['length']+_0x4a145a(0xf7)),console['log']('\x0aAvailable\x20scenarios:');for(let _0x335a1d=0x0;_0x944d23[_0x4a145a(0xf3)](_0x335a1d,_0x446625['length']);_0x335a1d++){console[_0x4a145a(0x170)]('\x20\x20'+_0x944d23[_0x4a145a(0xd5)](_0x335a1d,0x1)+'.\x20'+_0x446625[_0x335a1d][_0x4a145a(0xe4)]);}process[_0x4a145a(0x1a3)](0x1);}const _0x124b8d=_0x446625[_0x1f8653];await _0x944d23[_0x4a145a(0x155)](updateChecklistItem,_0x443e80,_0x124b8d['id'],{'description':_0x16cc0c});const _0xc50a13=await getFeature(_0x443e80);console['log'](_0x4a145a(0xd0)),displayFeature(_0xc50a13,_0xc50a13[_0x4a145a(0x19d)]);}async function downloadFeedbackImage(_0x171724,_0x152daa){const _0x56f26b=_0x455191,_0x5f06de={'mTBuJ':function(_0x210915,_0x37bb85,_0x36b8d9){return _0x210915(_0x37bb85,_0x36b8d9);},'iftRX':'feedback-images'};try{const _0x33b31d=_0x5f06de[_0x56f26b(0x142)](join,getRangerDir(),_0x5f06de[_0x56f26b(0x11d)]);await _0x5f06de[_0x56f26b(0x142)](mkdir,_0x33b31d,{'recursive':!![]});const _0x62742e=join(_0x33b31d,'comment_'+_0x152daa+'.png'),_0x1d943e=await fetch(_0x171724);if(!_0x1d943e['ok'])return null;const _0x55c536=Buffer['from'](await _0x1d943e['arrayBuffer']());return await writeFile(_0x62742e,_0x55c536),_0x62742e;}catch{return null;}}export async function featureGetReview(_0x4fb15c){const _0x159b6c=_0x455191,_0x211776={'bDdZT':_0x159b6c(0x133),'kppUY':function(_0x3b7428,_0x493369){return _0x3b7428(_0x493369);},'vPJVk':function(_0xeb1253,_0x5b0f5d){return _0xeb1253===_0x5b0f5d;},'BHgAY':_0x159b6c(0xe0),'JqDta':function(_0x4d9fb5,_0x296e43){return _0x4d9fb5<_0x296e43;},'uBJQJ':function(_0x15484e,_0x53e3cb){return _0x15484e>_0x53e3cb;},'iuRLJ':function(_0x548f31,_0x28f75b){return _0x548f31>_0x28f75b;},'qGrpx':function(_0x4f9a2f,_0x53275a){return _0x4f9a2f+_0x53275a;},'ylNeY':_0x159b6c(0x14a),'YGNka':'Unknown','UbTfn':function(_0x1342d1,_0x3f0ee7){return _0x1342d1===_0x3f0ee7;}},_0x25c1fe=_0x4fb15c||await getActiveFeatureId();if(!_0x25c1fe)throw new Error(_0x211776[_0x159b6c(0x18f)]);const _0x1d0ff7=await getFeature(_0x25c1fe),{items:_0x521281}=await _0x211776[_0x159b6c(0x18e)](getActionItems,_0x25c1fe);console[_0x159b6c(0x170)]('\x0a📋\x20Feedback\x20for:\x20'+_0x1d0ff7['name']+'\x20('+_0x1d0ff7['id']+')\x0a');if(_0x211776[_0x159b6c(0x176)](_0x521281['length'],0x0)){console[_0x159b6c(0x170)](_0x211776['BHgAY']);return;}for(let _0x26668b=0x0;_0x211776['JqDta'](_0x26668b,_0x521281[_0x159b6c(0x19b)]);_0x26668b++){const _0x369b20=_0x521281[_0x26668b],_0x2a1f71=_0x211776['uBJQJ'](_0x369b20[_0x159b6c(0x169)],0x1)?'\x20(v'+_0x369b20['version']+')':'',_0x2485f1=await getItemFeedback(_0x25c1fe,_0x369b20['id']);if(_0x211776['iuRLJ'](_0x2485f1[_0x159b6c(0x17c)][_0x159b6c(0x19b)],0x0)){console[_0x159b6c(0x170)](_0x159b6c(0x14c)+_0x211776[_0x159b6c(0x180)](_0x26668b,0x1)+':\x20\x22'+_0x369b20['description']+'\x22'+_0x2a1f71+_0x159b6c(0x154)+_0x2485f1[_0x159b6c(0x17c)]['length']+'\x20unaddressed\x20comment(s)');for(const _0x343b63 of _0x2485f1['unaddressedComments']){const _0xdcedb=new Date(_0x343b63[_0x159b6c(0x186)])[_0x159b6c(0x13f)](_0x211776[_0x159b6c(0xe2)],{'month':_0x159b6c(0xfc),'day':'numeric'}),_0xf36755=_0x343b63[_0x159b6c(0x164)]||_0x343b63['authorEmail']||_0x211776[_0x159b6c(0xd6)];console['log']('\x20\x20💬\x20'+_0xf36755+'\x20('+_0xdcedb+_0x159b6c(0xf1)+_0x343b63[_0x159b6c(0x13e)]+'\x22');if(_0x343b63[_0x159b6c(0xdb)]){const _0x7682a3=await downloadFeedbackImage(_0x343b63['assetUrl'],_0x343b63['id']);_0x7682a3&&console[_0x159b6c(0x170)](_0x159b6c(0x13c)+_0x7682a3);}if(_0x343b63['domRef']){const _0x36ca1e=_0x343b63[_0x159b6c(0x189)][_0x159b6c(0x17e)]['split'](_0x159b6c(0x195))['pop']()?.[_0x159b6c(0x171)](':')[0x0]||'element',_0x5d7ee8=_0x343b63['domRef']['textContent']?'\x20\x22'+_0x343b63['domRef'][_0x159b6c(0x10b)][_0x159b6c(0x1a6)](0x0,0x3c)+'\x22':'';console['log'](_0x159b6c(0x148)+_0x36ca1e+'>'+_0x5d7ee8),console[_0x159b6c(0x170)](_0x159b6c(0x108)+_0x343b63['domRef']['selector']);}else{if(_0x343b63[_0x159b6c(0x190)]){const _0x413377=_0x343b63['spatial']['coordinates'];_0x211776[_0x159b6c(0xea)](_0x343b63['spatial']['type'],_0x159b6c(0x1a2))&&_0x413377['length']>=0x2?console['log'](_0x159b6c(0x132)+_0x413377[0x0][_0x159b6c(0xce)](0x2)+',\x20'+_0x413377[0x1]['toFixed'](0x2)+')'):console[_0x159b6c(0x170)](_0x159b6c(0x13d)+_0x343b63[_0x159b6c(0x190)][_0x159b6c(0x118)]+'\x20at\x20['+_0x413377['map'](_0x379d26=>_0x379d26[_0x159b6c(0xce)](0x2))['join'](',\x20')+']');}}}if(_0x2485f1['canonicalFlow']){console['log'](_0x159b6c(0x135));for(const _0x508c52 of _0x2485f1[_0x159b6c(0x156)][_0x159b6c(0x171)]('\x0a')){console['log']('\x20\x20\x20\x20'+_0x508c52);}}}else console['log']('Scenario\x20'+(_0x26668b+0x1)+':\x20\x22'+_0x369b20['description']+'\x22'+_0x2a1f71+'\x20—\x20no\x20comments'),console[_0x159b6c(0x170)]('\x20\x20✅\x20No\x20feedback\x20to\x20address');console['log']('');}}export async function featureDelete(_0x1f5f43){const _0x5f3992=_0x455191,_0x2582b4={'VkABZ':function(_0x5599ed,_0x4afacb){return _0x5599ed+_0x4afacb;},'ixGVO':_0x5f3992(0x134)},_0x4c7c6c=_0x1f5f43||await getActiveFeatureId();if(!_0x4c7c6c)throw new Error(_0x5f3992(0x133));const _0xec401c=await getFeature(_0x4c7c6c);await softDeleteFeature(_0x4c7c6c),console['log']('\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20'+_0xec401c['name']+'\x20('+_0x4c7c6c+')'),console[_0x5f3992(0x170)](_0x2582b4[_0x5f3992(0xf6)](_0x2582b4['ixGVO'],_0x4c7c6c));}export async function featureRestore(_0x1d6b6e){const _0x3539cf=_0x455191,_0x2efde8={'iipao':function(_0x36257e,_0xc0f324){return _0x36257e(_0xc0f324);}};await restoreFeature(_0x1d6b6e);const _0x2130cc=await _0x2efde8['iipao'](getFeature,_0x1d6b6e);console[_0x3539cf(0x170)](_0x3539cf(0x19c)+_0x2130cc[_0x3539cf(0x158)]+'\x20('+_0x1d6b6e+')'),displayFeature(_0x2130cc,_0x2130cc[_0x3539cf(0x19d)]);}
@@ -1 +1 @@
1
- (function(_0x42d6af,_0x2af47c){const _0x5f352b=_0x5c4e,_0x35b830=_0x42d6af();while(!![]){try{const _0x299899=parseInt(_0x5f352b(0x10b))/0x1*(-parseInt(_0x5f352b(0x114))/0x2)+-parseInt(_0x5f352b(0x10d))/0x3*(-parseInt(_0x5f352b(0x112))/0x4)+parseInt(_0x5f352b(0x117))/0x5*(-parseInt(_0x5f352b(0x115))/0x6)+-parseInt(_0x5f352b(0x110))/0x7*(parseInt(_0x5f352b(0x10c))/0x8)+-parseInt(_0x5f352b(0x10e))/0x9*(parseInt(_0x5f352b(0x118))/0xa)+parseInt(_0x5f352b(0x116))/0xb+parseInt(_0x5f352b(0x10a))/0xc;if(_0x299899===_0x2af47c)break;else _0x35b830['push'](_0x35b830['shift']());}catch(_0x56c53b){_0x35b830['push'](_0x35b830['shift']());}}}(_0x31fa,0x2c691));import{sessionStart,sessionEnd,preCompact,postEdit,planStart,planReminder,exitPlanMode,stopHook,enable,disable,autoPrompt}from'./hooks/index.js';const HOOKS={'session-start':sessionStart,'session-end':sessionEnd,'pre-compact':preCompact,'post-edit':postEdit,'plan-start':planStart,'plan-reminder':planReminder,'exit-plan-mode':exitPlanMode,'stop':stopHook,'enable':enable,'disable':disable,'auto-prompt':autoPrompt};let cancellationHandlersInstalled=![];function installCancellationHandlers(){const _0x350e54=_0x5c4e;if(cancellationHandlersInstalled)return;const _0x380d37=()=>{process['exit'](0x0);};process[_0x350e54(0x113)]('SIGINT',_0x380d37),process[_0x350e54(0x113)](_0x350e54(0x119),_0x380d37),process[_0x350e54(0x113)]('SIGHUP',_0x380d37),cancellationHandlersInstalled=!![];}function _0x31fa(){const _0x5a1572=['exit','keys','error','1006488LrXtZK','197pIoVUF','8RJnZIC','3XJfopX','9OgibVZ','Valid\x20hooks:\x20','100723NQTZfQ','join','662932JCHKML','once','1772mJyzPE','124962lQbNSs','3381356WDZZFv','10XYdswa','1445130FHkUxE','SIGTERM'];_0x31fa=function(){return _0x5a1572;};return _0x31fa();}function _0x5c4e(_0x8b9290,_0x47c4f2){_0x8b9290=_0x8b9290-0x107;const _0x31fae5=_0x31fa();let _0x5c4ef5=_0x31fae5[_0x8b9290];return _0x5c4ef5;}export async function hook(_0x3d47c6,_0x111a06){const _0x5cce8e=_0x5c4e;installCancellationHandlers();const _0x1c822d=HOOKS[_0x3d47c6];if(!_0x1c822d){const _0x40ff00=Object[_0x5cce8e(0x108)](HOOKS)[_0x5cce8e(0x111)](',\x20');console['error']('Unknown\x20hook:\x20'+_0x3d47c6),console[_0x5cce8e(0x109)](_0x5cce8e(0x10f)+_0x40ff00),process[_0x5cce8e(0x107)](0x1);}await _0x1c822d(_0x111a06);}
1
+ function _0x2937(){const _0x2f7923=['Unknown\x20hook:\x20','180824UuPAHW','SIGHUP','938451wAwDJl','NLNoW','300345CTwiXB','lQmTf','141944xZvNKR','error','SIGINT','357190bVFWoq','42PtZQTN','20LsKTwv','216ADAzbI','once','2064768qfKkOm','1431134oqJZhO','exit','keys','lezPa'];_0x2937=function(){return _0x2f7923;};return _0x2937();}(function(_0x316110,_0x2f0472){const _0x2d80f1=_0x2c64,_0x43c510=_0x316110();while(!![]){try{const _0x54b786=parseInt(_0x2d80f1(0x12c))/0x1+-parseInt(_0x2d80f1(0x135))/0x2+parseInt(_0x2d80f1(0x13c))/0x3+-parseInt(_0x2d80f1(0x131))/0x4*(parseInt(_0x2d80f1(0x13e))/0x5)+parseInt(_0x2d80f1(0x130))/0x6*(-parseInt(_0x2d80f1(0x13a))/0x7)+parseInt(_0x2d80f1(0x134))/0x8+-parseInt(_0x2d80f1(0x132))/0x9*(-parseInt(_0x2d80f1(0x12f))/0xa);if(_0x54b786===_0x2f0472)break;else _0x43c510['push'](_0x43c510['shift']());}catch(_0x11ad95){_0x43c510['push'](_0x43c510['shift']());}}}(_0x2937,0x5b281));import{sessionStart,sessionEnd,preCompact,postEdit,planStart,planReminder,exitPlanMode,stopHook,enable,disable,autoPrompt}from'./hooks/index.js';const HOOKS={'session-start':sessionStart,'session-end':sessionEnd,'pre-compact':preCompact,'post-edit':postEdit,'plan-start':planStart,'plan-reminder':planReminder,'exit-plan-mode':exitPlanMode,'stop':stopHook,'enable':enable,'disable':disable,'auto-prompt':autoPrompt};let cancellationHandlersInstalled=![];function _0x2c64(_0x39719e,_0x5638cf){_0x39719e=_0x39719e-0x12c;const _0x293717=_0x2937();let _0x2c6492=_0x293717[_0x39719e];return _0x2c6492;}function installCancellationHandlers(){const _0x1319df=_0x2c64,_0x2396d4={'lQmTf':_0x1319df(0x12e),'lnbFa':'SIGTERM','NLNoW':_0x1319df(0x13b)};if(cancellationHandlersInstalled)return;const _0x139cda=()=>{const _0x5e2757=_0x1319df;process[_0x5e2757(0x136)](0x0);};process[_0x1319df(0x133)](_0x2396d4[_0x1319df(0x13f)],_0x139cda),process[_0x1319df(0x133)](_0x2396d4['lnbFa'],_0x139cda),process[_0x1319df(0x133)](_0x2396d4[_0x1319df(0x13d)],_0x139cda),cancellationHandlersInstalled=!![];}export async function hook(_0x4c2ec4,_0x36f820){const _0x410c57=_0x2c64,_0x54cde3={'lezPa':function(_0x199ec2){return _0x199ec2();}};_0x54cde3[_0x410c57(0x138)](installCancellationHandlers);const _0x526f41=HOOKS[_0x4c2ec4];if(!_0x526f41){const _0x582af0=Object[_0x410c57(0x137)](HOOKS)['join'](',\x20');console[_0x410c57(0x12d)](_0x410c57(0x139)+_0x4c2ec4),console['error']('Valid\x20hooks:\x20'+_0x582af0),process['exit'](0x1);}await _0x526f41(_0x36f820);}