@ranger-testing/ranger-cli 2.5.4-alpha.f6504c0-8 → 2.5.4-alpha.feb9faf-20

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 -1
  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 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  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 -1
  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 -1
  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 -1
  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 -1
  65. package/build/commands/utils/resolveProfileUrl.js +1 -1
  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 +24 -8
  80. package/build/skills/ranger/create.md +16 -3
  81. package/build/skills/ranger/verify.md +35 -10
  82. package/package.json +3 -2
@@ -1 +1 @@
1
- (function(_0x59e691,_0xe3d7e8){const _0x364837=_0xd6f0,_0x2c1014=_0x59e691();while(!![]){try{const _0xda118a=parseInt(_0x364837(0x20c))/0x1+-parseInt(_0x364837(0x1c4))/0x2*(-parseInt(_0x364837(0x22d))/0x3)+-parseInt(_0x364837(0x204))/0x4+parseInt(_0x364837(0x201))/0x5+-parseInt(_0x364837(0x1ca))/0x6+parseInt(_0x364837(0x1ce))/0x7+-parseInt(_0x364837(0x1c2))/0x8;if(_0xda118a===_0xe3d7e8)break;else _0x2c1014['push'](_0x2c1014['shift']());}catch(_0x18598b){_0x2c1014['push'](_0x2c1014['shift']());}}}(_0x5c4f,0x53288));import{mkdir,writeFile,readFile,readdir,unlink,rm,mkdtemp,rename}from'fs/promises';function _0xd6f0(_0x980b02,_0x3d6627){_0x980b02=_0x980b02-0x1a2;const _0x5c4f50=_0x5c4f();let _0xd6f02d=_0x5c4f50[_0x980b02];return _0xd6f02d;}import{join}from'path';import{existsSync}from'fs';import _0x3b0782 from'inquirer';import{chromium}from'playwright';function _0x5c4f(){const _0x11945c=['hKBKV','✓\x20Cloud\x20profile\x20\x27','gMvHS','XPaqc','Saving\x20authentication\x20state...','http://','confirm','env','\x0a\x20\x20(domains:\x20','isTTY','irqCp','\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.','hKVsR','Could\x20not\x20reach\x20','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','scope','profile.add.autoRouteSkipped','setupHeader','newPage','Delete\x20existing\x20and\x20create\x20new\x20in\x20','off','input','finally','launch','pnDNl','3359220hqKEWl','isElectron','\x20\x20\x20A\x20browser\x20will\x20open.\x20Please\x20log\x20in\x20to\x20the\x20profile\x20you\x20want\x20to\x20test\x20so\x20Ranger\x20can\x20access\x20it.','731068yarpeq','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','Use\x20','FMHaz','Profile\x20\x22','\x20\x20ranger\x20profile\x20add\x20','iRfTD','stdout','26502puVVSL','\x20--safe-mode\x20\x20\x20\x20(disables\x20browser\x20features\x20that\x20can\x20cause\x20crashes)','prompt','includes','✓\x20Created\x20settings:\x20','stdin','\x0a\x20\x20Profile\x20\x22','startsWith','Enter\x20a\x20different\x20URL','url_setup','waeEc','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','test','indexOf','\x27.\x0a','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','assign','AsdwQ','Invalid\x20URL','local','NODE_TLS_REJECT_UNAUTHORIZED','keys','SIGINT','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','hWwCg','pHLIC','catch','\x20\x20Make\x20sure\x20your\x20Electron\x20app\x20(or\x20browser)\x20is\x20running\x20with\x20remote\x20debugging\x20enabled.\x0a','\x22\x20already\x20exists.\x20Overwrite?','push','SuvpM','10176hqnWJJ','DOZUQ','retry','BQqTA','allowInsecureLocalhost','url','baseUrl','uqUGq','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','exit','setupHeaders','utf-8','⚠\x20Could\x20not\x20reach\x20','environments','\x20--skip-auth\x20\x20\x20\x20(skip\x20browser\x20auth\x20entirely)\x0a','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','eNBTp','settings.json','manual','✓\x20Auth\x20state\x20saved\x20to:\x20','browser_auth','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','--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.','location','log','isProtocolError','NwdlP','nDoml','config_write','close','SZGZi','list','\x20\x20Set\x20active\x20profile:\x20','Missing\x20API\x20token;\x20aborting\x20CI\x20profile\x20creation.','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','--allow-insecure-localhost','UgrGQ','Continue\x20anyway','newContext','.backup-','.tmp-','trackPhaseEnd','no_match','origin','eTaeH','7496320zUgRze','signal','248sphtFN','error','gGWqx','overwrite','hFCmm','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','1355292UMwkmd','cdpEndpoint','QGwYB','continue','3971457bxKtMJ','\x0a🌐\x20Profile\x20Setup\x0a','GGIOZ','Aborted.',')\x0a\x20\x20Save\x20\x27','kdlAB','status','Invalid\x20--setup-header\x20format:\x20\x22','\x20(continuing\x20with\x20--force)','\x20\x20\x20If\x20you\x20are\x20an\x20agent,\x20background\x20this\x20process\x20and\x20let\x20your\x20user\x20know\x20they\x20need\x20to\x20complete\x20browser\x20authentication.\x0a','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','path','xZOBC','xDmpY','safeMode','ETeeJ','No\x20auth\x20env\x20matches\x20this\x20URL.\x20Creating\x20local\x20profile.','skipAuth','extraHTTPHeaders','HEAD','BFKLn','xAAkd','QBGro','\x20\x20Did\x20you\x20mean\x20','http://localhost:3000'];_0x5c4f=function(){return _0x11945c;};return _0x5c4f();}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';import{writeActiveProfileName}from'./utils/activeProfile.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';import{fetchAuthConfig,createCloudProfile,ApiError}from'./utils/cloudProfile.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';async function checkUrlReachability(_0x5f4934){const _0x232b79=_0xd6f0,_0xc0c328={'qoiWP':function(_0xdb6990,_0x408607,_0x53834b){return _0xdb6990(_0x408607,_0x53834b);},'uPdpm':_0x232b79(0x1e1),'ETeeJ':function(_0x394475,_0x1a7099){return _0x394475<_0x1a7099;}};try{const _0x4f1ab9=new AbortController(),_0x3a2a17=_0xc0c328['qoiWP'](setTimeout,()=>_0x4f1ab9['abort'](),0x1388),_0x2f8ec6={'method':_0xc0c328['uPdpm'],'signal':_0x4f1ab9[_0x232b79(0x1c3)],'redirect':_0x232b79(0x1a6)};/^https:\/\/localhost(:\d+)?/i[_0x232b79(0x218)](_0x5f4934)&&(process[_0x232b79(0x1ee)][_0x232b79(0x220)]='0');const _0x1e085e=await fetch(_0x5f4934,_0x2f8ec6);delete process[_0x232b79(0x1ee)][_0x232b79(0x220)],clearTimeout(_0x3a2a17);if(_0xc0c328[_0x232b79(0x1dd)](_0x1e085e['status'],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x1e085e['status']};}catch(_0x57f793){delete process[_0x232b79(0x1ee)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x175614=_0x57f793,_0x16de5f=_0x175614['message']||String(_0x57f793),_0x5d73a0=_0x16de5f[_0x232b79(0x20f)](_0x232b79(0x21e))||_0x175614['name']==='TypeError'||_0x16de5f['includes']('fetch\x20failed');return{'ok':![],'error':_0x16de5f,'isProtocolError':_0x5d73a0};}}async function sweepOrphanLocalProfile(_0x4b78a5,_0x3881c3,_0x4c7e57){const _0x4f0391=_0xd6f0,_0x4f7462={'xAAkd':_0x4f0391(0x21f),'eNBTp':function(_0x15f141,_0x48f397,_0x2cee02){return _0x15f141(_0x48f397,_0x2cee02);},'gztUx':function(_0x54ecba,_0x34887e){return _0x54ecba(_0x34887e);}},_0x7b2d09=join(_0x3881c3,_0x4f7462[_0x4f0391(0x1e3)]),_0x115928=_0x4f7462[_0x4f0391(0x1a4)](join,_0x7b2d09,_0x4b78a5);existsSync(_0x115928)&&(_0x4c7e57&&await isPathGitTracked(_0x115928)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x115928+_0x4f0391(0x1b6)):(await rm(_0x115928,{'recursive':!![],'force':!![]}),console['log'](_0x4f0391(0x21b)+_0x115928)));if(existsSync(_0x7b2d09)){let _0x567d83=[];try{_0x567d83=await _0x4f7462['gztUx'](readdir,_0x7b2d09);}catch{return;}const _0x20b78c='.tmp-'+_0x4b78a5+'-';for(const _0x34e1d1 of _0x567d83){if(!_0x34e1d1[_0x4f0391(0x213)](_0x20b78c))continue;const _0x14f027=join(_0x7b2d09,_0x34e1d1);await rm(_0x14f027,{'recursive':!![],'force':!![]}),console[_0x4f0391(0x1ac)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x14f027);}}}async function tryAutoRouteCloudProfile(_0x2272e7,_0xb4502f,_0x1c4f3f,_0x3d79cf,_0x5cf572){const _0x5eb23e=_0xd6f0,_0x43bdbd={'eTaeH':function(_0x4f83f8,_0x16c80e){return _0x4f83f8===_0x16c80e;},'hWwCg':'no_auth_config','yFkpF':_0x5eb23e(0x1f8),'NwdlP':_0x5eb23e(0x1de),'eHKKe':'user_declined','nDoml':function(_0xd60ea6,_0x12dc95){return _0xd60ea6 instanceof _0x12dc95;},'QyhJr':function(_0x35cf4b,_0x41acf6){return _0x35cf4b+_0x41acf6;},'HJfKi':function(_0x6ef665,_0x2123d9){return _0x6ef665!==_0x2123d9;},'DOZUQ':function(_0x3b56b5,_0x15877f){return _0x3b56b5 instanceof _0x15877f;},'gGWqx':function(_0x42df08,_0x12422c){return _0x42df08(_0x12422c);},'dwaNT':'profile.add.autoRouted'};let _0x51190b;try{_0x51190b=await fetchAuthConfig();}catch{return _0x5cf572?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x43bdbd['hWwCg'],'profileName':_0x2272e7}),![];}if(!_0x51190b||!_0x51190b['environments']||_0x43bdbd['eTaeH'](Object['keys'](_0x51190b[_0x5eb23e(0x23a)])['length'],0x0))return _0x5cf572?.['trackPhaseEnd'](_0x43bdbd['yFkpF'],{'reason':_0x43bdbd[_0x5eb23e(0x226)],'profileName':_0x2272e7}),![];const _0x1081ea=matchAuthEnvironment(_0xb4502f,_0x51190b);if(!_0x1081ea)return console['log'](_0x43bdbd[_0x5eb23e(0x1ae)]),_0x5cf572?.[_0x5eb23e(0x1be)](_0x43bdbd['yFkpF'],{'reason':_0x5eb23e(0x1bf),'profileName':_0x2272e7}),![];const _0x2aa1bc=_0x51190b[_0x5eb23e(0x23a)][_0x1081ea],_0x13c4fc=_0x2aa1bc?.['domains']??[];if(_0x3d79cf&&!_0x1c4f3f['yes']){const {saveToCloud:_0x5a9190}=await _0x3b0782['prompt']([{'type':_0x5eb23e(0x1ed),'name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x1081ea+'\x27\x20matching\x20'+_0xb4502f+_0x5eb23e(0x1ef)+_0x13c4fc['join'](',\x20')+_0x5eb23e(0x1d2)+_0x2272e7+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x5a9190)return _0x5cf572?.[_0x5eb23e(0x1be)](_0x5eb23e(0x1f8),{'reason':_0x43bdbd['eHKKe'],'profileName':_0x2272e7}),![];}const _0x2e0e87=_0x13c4fc['some'](_0x56364a=>{const _0xc312d5=_0x5eb23e;try{return _0x43bdbd[_0xc312d5(0x1c1)](new URL(_0x56364a)[_0xc312d5(0x1c0)],new URL(_0xb4502f)['origin']);}catch{return![];}}),_0x3f971e={};!_0x2e0e87&&(_0x3f971e[_0x5eb23e(0x233)]=_0xb4502f);try{await createCloudProfile(_0x2272e7,_0x1081ea,{'settings':_0x3f971e});}catch(_0x59c584){if(_0x59c584 instanceof ApiError&&_0x59c584[_0x5eb23e(0x1d4)]===0x199){console[_0x5eb23e(0x1c5)]('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x2272e7+_0x5eb23e(0x1f2));throw _0x59c584;}return console['log']('\x20\x20Could\x20not\x20reach\x20Ranger\x20API\x20to\x20create\x20a\x20cloud\x20profile\x20('+(_0x43bdbd[_0x5eb23e(0x1af)](_0x59c584,Error)?_0x59c584['message']:String(_0x59c584))+').\x20Falling\x20back\x20to\x20local\x20profile.'),_0x5cf572?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x43bdbd[_0x5eb23e(0x226)],'profileName':_0x2272e7}),![];}console[_0x5eb23e(0x1ac)](_0x43bdbd['QyhJr'](_0x5eb23e(0x1e8)+_0x2272e7+'\x27\x20created,\x20linked\x20to\x20env\x20\x27'+_0x1081ea+_0x5eb23e(0x21a),'\x20\x20Next:\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--profile\x20'+_0x2272e7));try{await sweepOrphanLocalProfile(_0x2272e7,getRangerHomeDir(),![]);const _0x6ea6c2=getRangerDir();_0x43bdbd['HJfKi'](_0x6ea6c2,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x2272e7,_0x6ea6c2,!![]);}catch(_0x7ec22f){console[_0x5eb23e(0x1ac)](_0x5eb23e(0x1a3)+(_0x43bdbd[_0x5eb23e(0x22e)](_0x7ec22f,Error)?_0x7ec22f['message']:_0x43bdbd[_0x5eb23e(0x1c6)](String,_0x7ec22f))+').');}return _0x5cf572?.['trackPhaseEnd'](_0x43bdbd['dwaNT'],{'envKey':_0x1081ea,'profileName':_0x2272e7}),!![];}export async function addEnv(_0x187388,_0x208f50={},_0x28e09d){const _0x471413=_0xd6f0,_0x5c387d={'xDmpY':_0x471413(0x1eb),'iRfTD':function(_0x39e716){return _0x39e716();},'AAfmW':function(_0x4e90c7){return _0x4e90c7();},'SZGZi':function(_0x3e59b1,_0x98b28e,_0x5c9c7f,_0x445cec){return _0x3e59b1(_0x98b28e,_0x5c9c7f,_0x445cec);},'rJfWT':function(_0x2020fe,_0x29446a){return _0x2020fe+_0x29446a;},'hFCmm':function(_0x8d5ac5,_0x580bb5){return _0x8d5ac5(_0x580bb5);},'UgrGQ':'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','GGIOZ':function(_0x1b5a4a,_0xea7408,_0x23fd32,_0x14025e,_0x246e37,_0x339ff5){return _0x1b5a4a(_0xea7408,_0x23fd32,_0x14025e,_0x246e37,_0x339ff5);},'QBGro':function(_0x2ba03a,_0x4ecc3c,_0x3a2d3c){return _0x2ba03a(_0x4ecc3c,_0x3a2d3c);},'waeEc':function(_0x17b018,_0x570a7f){return _0x17b018===_0x570a7f;},'gMvHS':'legacy','VPQbJ':'root\x20(.ranger/)','LCQkm':_0x471413(0x1ed),'BIYPM':'shouldReplace','pHLIC':_0x471413(0x215),'pIFVd':_0x471413(0x1a9),'AsdwQ':_0x471413(0x229),'dxNnJ':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','VpqmK':_0x471413(0x235),'LjWNi':_0x471413(0x1d8),'nAhSi':'What\x20would\x20you\x20like\x20to\x20do?','KAFSR':'use_suggestion','BiblD':_0x471413(0x1ba),'kdlAB':_0x471413(0x1cd),'irqCp':function(_0xd7192c,_0x452b39,_0x572dd4){return _0xd7192c(_0x452b39,_0x572dd4);},'TxgJs':function(_0xb150f6,_0x45b90c){return _0xb150f6(_0x45b90c);},'NeMSH':_0x471413(0x1a8),'QGwYB':'\x0a📋\x20Authentication\x20Setup','jHEQp':_0x471413(0x203),'MgMKH':'\x20\x20\x20When\x20done\x20logging\x20in,\x20close\x20the\x20browser\x20to\x20save\x20the\x20session.','hrQLh':'\x0a\x20\x20\x20⚠\x20This\x20step\x20requires\x20human\x20interaction\x20in\x20a\x20browser.','XPaqc':_0x471413(0x1d7),'ElVGc':'--disable-features=WebBluetooth','SpNLQ':function(_0x155b12,_0x2e9338){return _0x155b12>_0x2e9338;},'FMHaz':function(_0x21bc65,_0x5a16f6){return _0x21bc65||_0x5a16f6;},'SuvpM':'about:blank','selAA':'This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','BFKLn':'You\x20can\x20try\x20again\x20with\x20one\x20of:','uqUGq':_0x471413(0x1f5),'BQqTA':_0x471413(0x238),'xZOBC':function(_0xb10138){return _0xb10138();},'EdFWq':'.enc','hKVsR':_0x471413(0x1b7),'bVMcR':'\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','hKBKV':function(_0x4f101c,_0x1bf630,_0x5d8d58){return _0x4f101c(_0x1bf630,_0x5d8d58);},'nRsml':function(_0xc40d62,_0x27ad20,_0x4cb2b0){return _0xc40d62(_0x27ad20,_0x4cb2b0);},'pnDNl':function(_0x2b1ace,_0x140cad,_0x5b3a4b){return _0x2b1ace(_0x140cad,_0x5b3a4b);},'xcHiH':_0x471413(0x205),'baIsW':'config_write'},_0x3c6b75=_0x208f50['ci']??![],_0x3a9957=_0x3c6b75?'ci':'local',_0x32fa74=_0x208f50[_0x471413(0x1f7)]==='user'?_0x5c387d['AAfmW'](getRangerHomeDir):getRangerDir(),_0x2c7c67=_0x5c387d[_0x471413(0x1b2)](join,_0x32fa74,_0x3a9957,_0x187388),_0x45e815={};if(_0x208f50[_0x471413(0x1f9)])for(const _0x471606 of _0x208f50[_0x471413(0x1f9)]){const _0x37a090=_0x471606[_0x471413(0x219)](':');if(_0x37a090===-0x1)throw new Error(_0x471413(0x1d5)+_0x471606+_0x471413(0x1f6));const _0x287a1a=_0x471606['slice'](0x0,_0x37a090)['trim'](),_0x5e00c4=_0x471606['slice'](_0x5c387d['rJfWT'](_0x37a090,0x1))['trim']();_0x45e815[_0x287a1a]=_0x5e00c4;}const _0xd7aa78=join(_0x32fa74,_0x3a9957);if(_0x208f50['cdpEndpoint']!==undefined&&_0x208f50['cdpEndpoint']['trim']()==='')throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x208f50[_0x471413(0x1cb)]&&_0x208f50[_0x471413(0x232)])throw new Error(_0x471413(0x225));if(_0x208f50['cdpEndpoint']&&_0x208f50['ci'])throw new Error(_0x471413(0x1aa));const _0x30759a=_0x5c387d['hFCmm'](Boolean,_0x208f50['cdpEndpoint']),_0x3a4480=!_0x208f50['skipAuth']&&!_0x30759a,_0x266438=process[_0x471413(0x211)][_0x471413(0x1f0)]&&process[_0x471413(0x20b)][_0x471413(0x1f0)];if(!_0x266438&&!_0x208f50[_0x471413(0x232)]&&!_0x30759a)throw new Error(_0x5c387d[_0x471413(0x1b9)]);if(!_0x3c6b75&&!_0x208f50[_0x471413(0x1df)]&&!_0x30759a&&_0x208f50['url']){const _0x5c5c01=await _0x5c387d[_0x471413(0x1d0)](tryAutoRouteCloudProfile,_0x187388,_0x208f50['url'],_0x208f50,_0x266438,_0x28e09d);if(_0x5c5c01)return;}const _0x10d7cc=_0x5c387d[_0x471413(0x1e4)](findExistingEnv,_0x187388,{'rangerDir':_0x32fa74});let _0x4f3d27=null;if(_0x10d7cc){if(!_0x266438)_0x4f3d27=_0x10d7cc;else{if(_0x5c387d['waeEc'](_0x10d7cc[_0x471413(0x1ab)],_0x3a9957)){const {overwrite:_0x2a9ca3}=await _0x3b0782[_0x471413(0x20e)]([{'type':'confirm','name':_0x471413(0x1c7),'message':_0x471413(0x208)+_0x187388+_0x471413(0x22a),'default':![]}]);if(!_0x2a9ca3){console['log']('Aborted.');return;}_0x4f3d27=_0x10d7cc;}else{const _0x58a09d=_0x5c387d[_0x471413(0x216)](_0x10d7cc['location'],_0x5c387d[_0x471413(0x1e9)])?_0x5c387d['VPQbJ']:_0x10d7cc['location'];console[_0x471413(0x1c5)]('\x0a⚠️\x20\x20Profile\x20\x22'+_0x187388+'\x22\x20already\x20exists\x20in\x20'+_0x58a09d+':\x20'+_0x10d7cc['path']),console[_0x471413(0x1c5)]('\x20\x20\x20Creating\x20it\x20in\x20'+_0x3a9957+'\x20would\x20shadow\x20the\x20existing\x20profile.');const {shouldReplace:_0x23772e}=await _0x3b0782[_0x471413(0x20e)]([{'type':_0x5c387d['LCQkm'],'name':_0x5c387d['BIYPM'],'message':_0x471413(0x1fb)+_0x3a9957+'?','default':![]}]);if(!_0x23772e){console['log'](_0x471413(0x1d1));return;}_0x4f3d27=_0x10d7cc;}}}_0x28e09d?.['trackPhaseStart'](_0x5c387d[_0x471413(0x227)]);let _0x42ae1c='';if(_0x30759a)console[_0x471413(0x1ac)](_0x5c387d['pIFVd']),console[_0x471413(0x1ac)](_0x471413(0x224)+_0x208f50[_0x471413(0x1cb)]),console[_0x471413(0x1ac)](_0x5c387d[_0x471413(0x21d)]);else{if(_0x208f50['url']){_0x42ae1c=_0x208f50['url'];const _0x8605dc=await _0x5c387d[_0x471413(0x1c8)](checkUrlReachability,_0x42ae1c);if(!_0x8605dc['ok']&&!_0x208f50['force'])throw new Error(_0x471413(0x1f4)+_0x42ae1c+':\x20'+_0x8605dc[_0x471413(0x1c5)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x8605dc['ok']&&_0x208f50['force']&&console[_0x471413(0x1ac)](_0x471413(0x239)+_0x42ae1c+':\x20'+_0x8605dc[_0x471413(0x1c5)]+_0x471413(0x1d6));}else{console[_0x471413(0x1ac)](_0x471413(0x1cf)),console[_0x471413(0x1ac)](_0x5c387d['dxNnJ']),console[_0x471413(0x1ac)]('\x20\x20Ranger\x20will\x20open\x20it\x20in\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20and\x20save\x20your\x20session.\x0a');let _0x2ec2c8=![];while(!![]){const _0x30f57b=await _0x3b0782[_0x471413(0x20e)]([{'type':_0x471413(0x1fd),'name':_0x471413(0x233),'message':_0x2ec2c8?_0x5c387d['VpqmK']:_0x5c387d['LjWNi'],'default':_0x42ae1c||_0x471413(0x1e6)}]);_0x42ae1c=_0x30f57b['baseUrl'];const _0x42282e=await checkUrlReachability(_0x42ae1c);if(_0x42282e['ok'])break;const _0x11aa69=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x42ae1c),_0x1d96d6=_0x42282e[_0x471413(0x1ad)]&&!_0x11aa69,_0xabba14=_0x1d96d6?_0x471413(0x1ec)+_0x42ae1c:null;_0x2ec2c8=!![],console[_0x471413(0x1ac)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x42ae1c+':\x20'+_0x42282e['error']);_0xabba14&&console['log'](_0x471413(0x1e5)+_0xabba14+'?');const {action:_0x492589}=await _0x3b0782[_0x471413(0x20e)]([{'type':_0x471413(0x1b3),'name':'action','message':_0x5c387d['nAhSi'],'choices':[..._0xabba14?[{'name':_0x471413(0x206)+_0xabba14,'value':_0x5c387d['KAFSR']}]:[],{'name':_0x471413(0x214),'value':_0x471413(0x22f)},{'name':_0x5c387d['BiblD'],'value':_0x5c387d['kdlAB']}]}]);if(_0x492589===_0x5c387d['KAFSR']&&_0xabba14){_0x42ae1c=_0xabba14;const _0x33755e=await checkUrlReachability(_0x42ae1c);if(_0x33755e['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x42ae1c+':\x20'+_0x33755e[_0x471413(0x1c5)]);}else{if(_0x5c387d[_0x471413(0x216)](_0x492589,_0x5c387d[_0x471413(0x1d3)]))break;}}}}_0x28e09d?.['trackPhaseEnd']('url_setup');const _0x53ca4d={};if(_0x4f3d27){const _0x4ca2d2=await loadSettings(_0x187388);Object[_0x471413(0x21c)](_0x53ca4d,_0x4ca2d2[_0x471413(0x237)]);}Object[_0x471413(0x21c)](_0x53ca4d,_0x45e815),await _0x5c387d[_0x471413(0x1f1)](mkdir,_0xd7aa78,{'recursive':!![]});try{const _0x3b6118=await readdir(_0xd7aa78),_0x8fa956=_0x471413(0x1bd)+_0x187388+'-';for(const _0x1bd529 of _0x3b6118){_0x1bd529[_0x471413(0x213)](_0x8fa956)&&await rm(join(_0xd7aa78,_0x1bd529),{'recursive':!![],'force':!![]});}}catch{}const _0x288af8=await _0x5c387d['hFCmm'](mkdtemp,join(_0xd7aa78,'.tmp-'+_0x187388+'-')),_0x777cbc=_0x5c387d['QBGro'](join,_0x288af8,'auth.json'),_0xd99475=()=>{const _0x47075e=_0x471413;rm(_0x288af8,{'recursive':!![],'force':!![]})['catch'](()=>{})[_0x47075e(0x1fe)](()=>{const _0x1da0cb=_0x47075e;process[_0x1da0cb(0x236)](0x82);});};process['once'](_0x471413(0x222),_0xd99475);const _0x1cbcba=_0x5c387d['TxgJs'](Boolean,_0x42ae1c)&&/^https:\/\/localhost(:\d+)?/i[_0x471413(0x218)](_0x42ae1c);try{if(_0x3a4480){_0x28e09d?.['trackPhaseStart'](_0x5c387d['NeMSH']),console['log'](_0x5c387d[_0x471413(0x1cc)]),console[_0x471413(0x1ac)](_0x5c387d['jHEQp']),console['log'](_0x5c387d['MgMKH']);!_0x266438?(console[_0x471413(0x1ac)](_0x5c387d['hrQLh']),console['log'](_0x5c387d[_0x471413(0x1ea)])):console[_0x471413(0x1ac)]('');await new Promise(_0x4f40cc=>setTimeout(_0x4f40cc,0xbb8));const _0x3dd4e4=[];_0x208f50[_0x471413(0x1dc)]&&_0x3dd4e4[_0x471413(0x22b)](_0x5c387d['ElVGc']);const _0x5ed959=_0x208f50[_0x471413(0x231)]||_0x1cbcba;_0x5ed959&&_0x3dd4e4[_0x471413(0x22b)](_0x471413(0x1b8));const _0x160348=await chromium[_0x471413(0x1ff)]({'headless':![],..._0x3dd4e4['length']>0x0?{'args':_0x3dd4e4}:{}});try{const _0x5f3e98=_0x5c387d['SpNLQ'](Object[_0x471413(0x221)](_0x53ca4d)['length'],0x0),_0x4b497e={'ignoreHTTPSErrors':!![]};_0x5f3e98&&(_0x4b497e[_0x471413(0x1e0)]=_0x53ca4d);const _0x53dc48=await _0x160348[_0x471413(0x1bb)](_0x4b497e);await addProfileSetupBanner(_0x53dc48);const _0x43a8b1=await _0x53dc48[_0x471413(0x1fa)]();await _0x43a8b1['goto'](_0x5c387d[_0x471413(0x207)](_0x42ae1c,_0x5c387d[_0x471413(0x22c)]));let _0x5c0b73=![];await new Promise(_0x196085=>{const _0x275e64=_0x471413;_0x43a8b1['on'](_0x275e64(0x1b1),async()=>{const _0x4f0224=_0x275e64;try{console[_0x4f0224(0x1ac)](_0x5c387d[_0x4f0224(0x1db)]),await _0x53dc48['storageState']({'path':_0x777cbc}),_0x5c0b73=!![];}catch{}_0x5c387d[_0x4f0224(0x20a)](_0x196085);});});if(!_0x5c0b73){console[_0x471413(0x1ac)](_0x471413(0x223));!_0x208f50[_0x471413(0x1dc)]&&(console[_0x471413(0x1ac)](_0x5c387d['selAA']),console['log'](_0x5c387d[_0x471413(0x1e2)]),console['log'](_0x471413(0x209)+_0x187388+_0x471413(0x20d)),console['log']('\x20\x20ranger\x20profile\x20add\x20'+_0x187388+_0x471413(0x1a2)));throw new Error(_0x5c387d[_0x471413(0x234)]);}}finally{await _0x160348['close']()[_0x471413(0x228)](()=>{});}if(_0x3c6b75){const _0x3134f4=await readFile(_0x777cbc,_0x5c387d[_0x471413(0x230)]),_0x107eef=await _0x5c387d[_0x471413(0x1da)](getToken);if(!_0x107eef){console[_0x471413(0x1c5)](_0x471413(0x217)),await unlink(_0x777cbc)['catch'](()=>{});throw new Error(_0x471413(0x1b5));}else{const _0x470a92=_0x5c387d[_0x471413(0x1f1)](encrypt,_0x3134f4,_0x107eef);await writeFile(_0x777cbc+_0x5c387d['EdFWq'],_0x470a92),await unlink(_0x777cbc),console[_0x471413(0x1ac)](_0x471413(0x1c9)+_0x777cbc+'.enc'),console['log'](_0x5c387d[_0x471413(0x1f3)]),console[_0x471413(0x1ac)](_0x5c387d['bVMcR']);}}else console[_0x471413(0x1ac)](_0x471413(0x1a7)+_0x777cbc);_0x28e09d?.['trackPhaseEnd'](_0x471413(0x1a8));}_0x28e09d?.['trackPhaseStart'](_0x471413(0x1b0));const _0x158aba={};_0x42ae1c&&(_0x158aba[_0x471413(0x233)]=_0x42ae1c);_0x208f50[_0x471413(0x1cb)]&&(_0x158aba[_0x471413(0x1cb)]=_0x208f50['cdpEndpoint'],_0x158aba[_0x471413(0x202)]=!![]);(_0x208f50[_0x471413(0x231)]||_0x1cbcba)&&(_0x158aba[_0x471413(0x231)]=!![]);_0x208f50['safeMode']&&(_0x158aba['safeMode']=!![]);Object['keys'](_0x53ca4d)['length']>0x0&&(_0x158aba[_0x471413(0x237)]=_0x53ca4d);await _0x5c387d[_0x471413(0x1f1)](writeFile,_0x5c387d[_0x471413(0x1f1)](join,_0x288af8,'settings.json'),JSON['stringify'](_0x158aba,null,0x2)),console['log'](_0x471413(0x210)+_0x5c387d['hKBKV'](join,_0x2c7c67,_0x471413(0x1a5)));if(_0x4f3d27?.['location']===_0x3a9957){const _0x29c349=_0x4f3d27['path']+_0x471413(0x1bc)+Date['now']();await _0x5c387d['nRsml'](rename,_0x4f3d27[_0x471413(0x1d9)],_0x29c349);try{await rename(_0x288af8,_0x2c7c67);}catch(_0xbe447){await _0x5c387d[_0x471413(0x200)](rename,_0x29c349,_0x4f3d27[_0x471413(0x1d9)]);throw _0xbe447;}try{await rm(_0x29c349,{'recursive':!![]});}catch{console['log']('Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20backup\x20at\x20'+_0x29c349);}}else{await _0x5c387d[_0x471413(0x1e7)](rename,_0x288af8,_0x2c7c67);if(_0x4f3d27)try{await rm(_0x4f3d27['path'],{'recursive':!![]}),console['log']('Removed\x20existing\x20profile\x20at\x20'+_0x4f3d27['path']);}catch{console[_0x471413(0x1ac)]('Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20at\x20'+_0x4f3d27['path']);}}try{await writeActiveProfileName(_0x187388),console[_0x471413(0x1ac)](_0x471413(0x1b4)+_0x187388);}catch{console['log'](_0x5c387d['xcHiH']);}_0x28e09d?.['trackPhaseEnd'](_0x5c387d['baIsW']),console['log'](_0x471413(0x212)+_0x187388+'\x22\x20configured');}catch(_0x21c14f){await rm(_0x288af8,{'recursive':!![],'force':!![]});throw _0x21c14f;}finally{process[_0x471413(0x1fc)](_0x471413(0x222),_0xd99475);}}
1
+ (function(_0x3a7b82,_0x51edb0){const _0x5809ae=_0x332f,_0x4dd505=_0x3a7b82();while(!![]){try{const _0x5c8dc1=-parseInt(_0x5809ae(0x16b))/0x1+-parseInt(_0x5809ae(0x189))/0x2*(-parseInt(_0x5809ae(0x195))/0x3)+parseInt(_0x5809ae(0x197))/0x4*(-parseInt(_0x5809ae(0x14b))/0x5)+-parseInt(_0x5809ae(0x1af))/0x6*(-parseInt(_0x5809ae(0x199))/0x7)+-parseInt(_0x5809ae(0x19e))/0x8+-parseInt(_0x5809ae(0x196))/0x9*(parseInt(_0x5809ae(0x16d))/0xa)+-parseInt(_0x5809ae(0x192))/0xb*(-parseInt(_0x5809ae(0x15d))/0xc);if(_0x5c8dc1===_0x51edb0)break;else _0x4dd505['push'](_0x4dd505['shift']());}catch(_0xd71988){_0x4dd505['push'](_0x4dd505['shift']());}}}(_0x2ae8,0xdef6f));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x356642 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';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';async function checkUrlReachability(_0x2b8bc2){const _0x473a0e=_0x332f,_0x586490={'NwNNX':function(_0x230330,_0x56f7d9,_0x55a319){return _0x230330(_0x56f7d9,_0x55a319);},'WHzsY':function(_0x536408,_0x430383){return _0x536408(_0x430383);},'srfLx':function(_0xf5acde,_0x2da8b1){return _0xf5acde<_0x2da8b1;},'mPjbA':function(_0x5618fa,_0x31dac8){return _0x5618fa===_0x31dac8;},'IjvJk':'fetch\x20failed'};try{const _0x12a9e1=new AbortController(),_0xf4dc5f=setTimeout(()=>_0x12a9e1['abort'](),0x1388),_0x2f37df={'method':_0x473a0e(0x160),'signal':_0x12a9e1['signal'],'redirect':_0x473a0e(0x18f)};/^https:\/\/localhost(:\d+)?/i['test'](_0x2b8bc2)&&(process[_0x473a0e(0x1b5)][_0x473a0e(0x1a3)]='0');const _0xce2d87=await _0x586490[_0x473a0e(0x1b2)](fetch,_0x2b8bc2,_0x2f37df);delete process['env'][_0x473a0e(0x1a3)],_0x586490[_0x473a0e(0x1c7)](clearTimeout,_0xf4dc5f);if(_0x586490[_0x473a0e(0x149)](_0xce2d87['status'],0x190))return{'ok':!![]};return{'ok':![],'error':_0x473a0e(0x14a)+_0xce2d87['status']};}catch(_0x467aae){delete process[_0x473a0e(0x1b5)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0xa6f0=_0x467aae,_0x59c006=_0xa6f0[_0x473a0e(0x180)]||String(_0x467aae),_0x16013a=_0x59c006[_0x473a0e(0x19f)]('Invalid\x20URL')||_0x586490[_0x473a0e(0x161)](_0xa6f0['name'],_0x473a0e(0x18b))||_0x59c006['includes'](_0x586490['IjvJk']);return{'ok':![],'error':_0x59c006,'isProtocolError':_0x16013a};}}async function sweepOrphanLocalProfile(_0x3455f7,_0x171edb,_0x355c12){const _0x42c640=_0x332f,_0x3c77a5={'sZRdE':function(_0x31352e,_0x164271,_0x17d89c){return _0x31352e(_0x164271,_0x17d89c);},'lFNCB':'local','iiUkL':function(_0x1a0b0a,_0x78afa5){return _0x1a0b0a(_0x78afa5);}},_0x5233d8=_0x3c77a5[_0x42c640(0x185)](join,_0x171edb,_0x3c77a5[_0x42c640(0x159)]),_0x275d18=_0x3c77a5[_0x42c640(0x185)](join,_0x5233d8,_0x3455f7);existsSync(_0x275d18)&&(_0x355c12&&await isPathGitTracked(_0x275d18)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x275d18+_0x42c640(0x19a)):(await rm(_0x275d18,{'recursive':!![],'force':!![]}),console[_0x42c640(0x1a4)](_0x42c640(0x17f)+_0x275d18)));if(_0x3c77a5['iiUkL'](existsSync,_0x5233d8)){let _0x420890=[];try{_0x420890=await readdir(_0x5233d8);}catch{return;}const _0x527ad0='.tmp-'+_0x3455f7+'-';for(const _0x24580f of _0x420890){if(!_0x24580f[_0x42c640(0x177)](_0x527ad0))continue;const _0x2abab2=_0x3c77a5[_0x42c640(0x185)](join,_0x5233d8,_0x24580f);await rm(_0x2abab2,{'recursive':!![],'force':!![]}),console[_0x42c640(0x1a4)](_0x42c640(0x17f)+_0x2abab2);}}}async function sweepOrphansBestEffort(_0x2803c2){const _0x135974=_0x332f,_0x154008={'FUgJA':function(_0x44a825,_0x106cd6){return _0x44a825!==_0x106cd6;},'ycldD':function(_0x3b0cac,_0x2cee7e){return _0x3b0cac(_0x2cee7e);}};try{await sweepOrphanLocalProfile(_0x2803c2,getRangerHomeDir(),![]);const _0x2f19ae=getRangerDir();_0x154008[_0x135974(0x170)](_0x2f19ae,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x2803c2,_0x2f19ae,!![]);}catch(_0x55471b){console['log'](_0x135974(0x154)+(_0x55471b instanceof Error?_0x55471b[_0x135974(0x180)]:_0x154008['ycldD'](String,_0x55471b))+').');}}function _0x2ae8(){const _0x34d4a4=['\x0a🌐\x20Profile\x20Setup\x0a','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','HEAD','mPjbA','Hbiap','MpWhs','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','RPpAN','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','url','KjJyd','cwd','http://localhost:3000','530962klazPe','⚠\x20Could\x20not\x20reach\x20','290tfKxJz','FLsnp','JfLls','FUgJA','capture','profile.add.autoRouteSkipped','cdpEndpoint','RxqRK','\x0a\x20\x20(domains:\x20','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','startsWith','prompt','hBywO','retry','UtpqF','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','WxvLA','KssPC','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','message','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','trackPhaseEnd','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','error','sZRdE','fJZCP','Use\x20','ncNoK','8WojPSV','hcpBZ','TypeError','iuERG','\x20\x20Did\x20you\x20mean\x20','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','manual','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','`\x20again\x20without\x20--skip-auth.','21399917XpGspx','continue','input','196539tSoozh','241443wvEVpB','2104QHYTuQ','FvEyC','14hmGvZe','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','What\x20would\x20you\x20like\x20to\x20do?','qGHRT','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','2161544wcNQeh','includes','keys','zWXnJ','ghDsV','NODE_TLS_REJECT_UNAUTHORIZED','log','yes','action','exit','vaWRj','otUeX','baseUrl','setupHeaders','\x0a\x20\x20A\x20profile\x20named\x20\x22','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','3191724pVOOyR','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','length','NwNNX','BpHIF','Enter\x20a\x20different\x20URL','env','confirm','\x27\x20to\x20the\x20cloud?','status','\x27\x20matching\x20','QfMHx','\x20\x20https://docs.ranger.net/main/concepts/profiles','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','YjCCF','luZOJ','isElectron','✓\x20Profile\x20\x27','domains','slice','join','\x22:\x20','profile.add.autoRouted','mkRQP','WHzsY','\x20\x20Set\x20active\x20profile:\x20','srfLx','HTTP\x20','7405CoDTPT','\x20--url\x20','trim','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','environments','Could\x20not\x20reach\x20','saveToCloud','xfGOB','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','use_suggestion','force','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','lFNCB','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','GSkDI','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','12wPBOTR'];_0x2ae8=function(){return _0x34d4a4;};return _0x2ae8();}async function markActive(_0x21e361){const _0x3c35f6=_0x332f,_0x5bafed={'TeyTK':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0x21e361),console[_0x3c35f6(0x1a4)](_0x3c35f6(0x1c8)+_0x21e361);}catch{console['log'](_0x5bafed['TeyTK']);}}async function tryAutoRouteCloudProfile(_0x5b323e,_0x172863,_0x131112,_0x2ecc43,_0x465de2){const _0x272560=_0x332f,_0x587951={'cNFSf':function(_0x1ffd00,_0x241b06){return _0x1ffd00===_0x241b06;},'MpWhs':function(_0x44530a,_0x3a5b8f){return _0x44530a instanceof _0x3a5b8f;},'ieMlw':function(_0x3a3a7b,_0x16cc2c){return _0x3a3a7b(_0x16cc2c);},'mkRQP':'profile.add.autoRouteSkipped','otUeX':function(_0x628bda,_0x4616d4){return _0x628bda+_0x4616d4;},'PEqvF':function(_0x471285,_0x31bd7b){return _0x471285+_0x31bd7b;},'MmyMC':'\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','mdOnB':_0x272560(0x19d),'WxvLA':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','zlifT':_0x272560(0x15f),'jsdwk':function(_0x287c68,_0x5963d2,_0x4ac38a){return _0x287c68(_0x5963d2,_0x4ac38a);},'Srqoi':'no_match','zXWpQ':'user_declined','JfLls':_0x272560(0x1c5)};let _0x116fc8;try{_0x116fc8=await fetchAuthConfig();}catch(_0x1a8397){return _0x465de2?.['trackPhaseEnd'](_0x272560(0x172),{'reason':'no_auth_config','profileName':_0x5b323e}),console['error'](_0x272560(0x14f)+(_0x587951[_0x272560(0x163)](_0x1a8397,Error)?_0x1a8397['message']:_0x587951['ieMlw'](String,_0x1a8397))),![];}if(!_0x116fc8||!_0x116fc8['environments']||Object[_0x272560(0x1a0)](_0x116fc8[_0x272560(0x150)])[_0x272560(0x1b1)]===0x0){if(_0x2ecc43)return await captureEnvLessProfile(_0x5b323e,_0x172863,_0x131112,_0x465de2);return _0x465de2?.['trackPhaseEnd'](_0x587951['mkRQP'],{'reason':'no_auth_config','profileName':_0x5b323e}),console[_0x272560(0x184)](_0x587951[_0x272560(0x1a9)](_0x587951['PEqvF'](_0x587951['MmyMC'],'\x0a')+_0x587951['mdOnB']+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x5b323e+_0x272560(0x14c)+_0x172863+'\x20--skip-auth\x0a')+'\x0a',_0x587951[_0x272560(0x17d)])+_0x587951['zlifT']),![];}const _0x536407=_0x587951['jsdwk'](matchAuthEnvironment,_0x172863,_0x116fc8);if(!_0x536407)return _0x465de2?.['trackPhaseEnd'](_0x587951[_0x272560(0x1c6)],{'reason':_0x587951['Srqoi'],'profileName':_0x5b323e}),console[_0x272560(0x184)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x172863+'.\x20Configured\x20envs:\x20'+Object['keys'](_0x116fc8[_0x272560(0x150)])[_0x272560(0x1c3)](',\x20')+'.'),![];const _0x4bf430=_0x116fc8[_0x272560(0x150)][_0x536407],_0x3d0b07=_0x4bf430?.[_0x272560(0x1c1)]??[];if(_0x2ecc43&&!_0x131112[_0x272560(0x1a5)]){const {saveToCloud:_0x38de62}=await _0x356642['prompt']([{'type':_0x272560(0x1b6),'name':_0x272560(0x152),'message':'Found\x20auth\x20environment\x20\x27'+_0x536407+_0x272560(0x1b9)+_0x172863+_0x272560(0x175)+_0x3d0b07[_0x272560(0x1c3)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x5b323e+_0x272560(0x1b7),'default':!![]}]);if(!_0x38de62)return _0x465de2?.[_0x272560(0x182)](_0x587951['mkRQP'],{'reason':_0x587951['zXWpQ'],'profileName':_0x5b323e}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x38321d=_0x3d0b07['some'](_0x5b6a03=>{try{return _0x587951['cNFSf'](new URL(_0x5b6a03)['origin'],new URL(_0x172863)['origin']);}catch{return![];}}),_0x338ecb={};!_0x38321d&&(_0x338ecb['baseUrl']=_0x172863);try{await createCloudProfile(_0x5b323e,_0x536407,{'settings':_0x338ecb});}catch(_0x50f856){if(_0x50f856 instanceof ApiError&&_0x50f856['status']===0x199){console['error'](_0x272560(0x1ac)+_0x5b323e+_0x272560(0x158)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x5b323e));throw _0x50f856;}throw _0x50f856;}return console['log'](_0x587951['PEqvF']('✓\x20Profile\x20\x27'+_0x5b323e+'\x27\x20created.\x0a',_0x272560(0x166)+_0x5b323e)),await _0x587951['ieMlw'](sweepOrphansBestEffort,_0x5b323e),_0x465de2?.[_0x272560(0x182)](_0x587951[_0x272560(0x16f)],{'envKey':_0x536407,'profileName':_0x5b323e}),!![];}async function createUnconfiguredCloudProfile(_0x4cf094,_0x2060ca){const _0x2d37dd=_0x332f;try{await createCloudProfile(_0x4cf094,undefined,{'settings':_0x2060ca});}catch(_0x8a7084){_0x8a7084 instanceof ApiError&&_0x8a7084['status']===0x199&&console[_0x2d37dd(0x184)](_0x2d37dd(0x1ac)+_0x4cf094+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x4cf094));throw _0x8a7084;}}function _0x332f(_0x46d516,_0x50f596){_0x46d516=_0x46d516-0x149;const _0x2ae82e=_0x2ae8();let _0x332f2f=_0x2ae82e[_0x46d516];return _0x332f2f;}async function captureEnvLessProfile(_0x310457,_0x58cf30,_0x4eb74f,_0x4fe327){const _0xced005=_0x332f,_0x379fb8={'YVdQW':'confirm','ncNoK':'user_declined','BpHIF':function(_0x3d6842,_0x2c068d){return _0x3d6842+_0x2c068d;},'UtpqF':function(_0xb9964f,_0x3df03b){return _0xb9964f===_0x3df03b;},'jynut':function(_0x41eb3c,_0x3fa305){return _0x41eb3c>_0x3fa305;},'luZOJ':function(_0x3011be,_0x1ef4d3,_0xd24a7,_0x527cd2){return _0x3011be(_0x1ef4d3,_0xd24a7,_0x527cd2);},'zWXnJ':function(_0x4de165,_0x1da359){return _0x4de165 instanceof _0x1da359;},'hcpBZ':function(_0x164031,_0xba4341,_0x11046b){return _0x164031(_0xba4341,_0x11046b);},'pIXoc':_0xced005(0x1c5)};if(!_0x4eb74f['yes']){const {capture:_0x434ff0}=await _0x356642[_0xced005(0x178)]([{'type':_0x379fb8['YVdQW'],'name':_0xced005(0x171),'message':_0xced005(0x1ae),'default':!![]}]);if(!_0x434ff0)return _0x4fe327?.[_0xced005(0x182)](_0xced005(0x172),{'reason':_0x379fb8[_0xced005(0x188)],'profileName':_0x310457}),console['error'](_0x379fb8[_0xced005(0x1b3)](_0xced005(0x157),'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0x5f41d4={};if(_0x4eb74f['setupHeader'])for(const _0x37c4a5 of _0x4eb74f['setupHeader']){const _0x288345=_0x37c4a5['indexOf'](':');if(_0x379fb8[_0xced005(0x17b)](_0x288345,-0x1))continue;_0x5f41d4[_0x37c4a5['slice'](0x0,_0x288345)[_0xced005(0x14d)]()]=_0x37c4a5[_0xced005(0x1c2)](_0x288345+0x1)['trim']();}const _0x638116={'baseUrl':_0x58cf30};_0x379fb8['jynut'](Object['keys'](_0x5f41d4)['length'],0x0)&&(_0x638116[_0xced005(0x1ab)]=_0x5f41d4);let _0x4eb625;try{_0x4eb625=await _0x379fb8[_0xced005(0x1be)](createCloudProfile,_0x310457,undefined,{'settings':_0x638116});}catch(_0x3c63de){_0x379fb8[_0xced005(0x1a1)](_0x3c63de,ApiError)&&_0x379fb8['UtpqF'](_0x3c63de[_0xced005(0x1b8)],0x199)&&console[_0xced005(0x184)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x310457+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x310457));throw _0x3c63de;}return await _0x379fb8[_0xced005(0x18a)](manualBrowserLogin,_0x4eb625,{'key':'','domains':[_0x58cf30],'setupHeaders':Object['keys'](_0x5f41d4)['length']>0x0?_0x5f41d4:undefined}),console[_0xced005(0x1a4)]('\x0a✓\x20Profile\x20\x27'+_0x310457+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x310457)),await sweepOrphansBestEffort(_0x310457),_0x4fe327?.[_0xced005(0x182)](_0x379fb8['pIXoc'],{'envKey':null,'profileName':_0x310457}),!![];}export async function addEnv(_0x5fbf0f,_0x300611={},_0x24c80a){const _0x5aa2ce=_0x332f,_0x91573d={'oqhpD':_0x5aa2ce(0x1ad),'FLsnp':_0x5aa2ce(0x1b0),'hBywO':function(_0x1b07e1,_0x22ed34){return _0x1b07e1+_0x22ed34;},'vaWRj':function(_0x1780be,_0x588b73){return _0x1780be!==_0x588b73;},'QfMHx':function(_0x2c7e68,_0x549257){return _0x2c7e68===_0x549257;},'iuERG':_0x5aa2ce(0x181),'vxWsw':_0x5aa2ce(0x15a),'oGVaO':function(_0x1edf21,_0x4cbc04){return _0x1edf21(_0x4cbc04);},'RxqRK':function(_0x1448c9,_0x4b2efc,_0x5a88ae){return _0x1448c9(_0x4b2efc,_0x5a88ae);},'fJZCP':function(_0x59b22b,_0x4261d3,_0x9cb2be,_0x1d0ed1,_0x5c83c2){return _0x59b22b(_0x4261d3,_0x9cb2be,_0x1d0ed1,_0x5c83c2);},'Hbiap':function(_0x26f963,_0xf287dd,_0x3abd86,_0x13aaa4,_0xe9108){return _0x26f963(_0xf287dd,_0x3abd86,_0x13aaa4,_0xe9108);},'dMwIa':_0x5aa2ce(0x1bf),'aOxii':function(_0x4e9593,_0x574da6){return _0x4e9593(_0x574da6);},'KjJyd':function(_0x3b04a2,_0xebc72c){return _0x3b04a2>_0xebc72c;},'qGHRT':function(_0x5b7e72,_0xd44ad3){return _0x5b7e72(_0xd44ad3);},'ghDsV':function(_0x1f7741,_0x4513fe){return _0x1f7741(_0x4513fe);},'JjFVt':_0x5aa2ce(0x1aa),'RPpAN':_0x5aa2ce(0x190),'YjCCF':_0x5aa2ce(0x16a),'FvEyC':_0x5aa2ce(0x1a6),'KssPC':_0x5aa2ce(0x19b),'xfGOB':_0x5aa2ce(0x1b4),'ZTdOg':'Continue\x20anyway','SMvUK':function(_0x29f1b2,_0x441072){return _0x29f1b2===_0x441072;},'Rfhha':_0x5aa2ce(0x155),'GSkDI':function(_0x433218,_0x2c4f69){return _0x433218(_0x2c4f69);}};_0x300611['ci']&&(console[_0x5aa2ce(0x184)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'+_0x91573d['oqhpD']+'\x0a'+_0x91573d[_0x5aa2ce(0x16e)]+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'+_0x5aa2ce(0x1bb)),process['exit'](0x1));const _0x1a5f1b={};if(_0x300611['setupHeader'])for(const _0x51d256 of _0x300611['setupHeader']){const _0x6b1f77=_0x51d256['indexOf'](':');if(_0x6b1f77===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x51d256+_0x5aa2ce(0x1bc));const _0x1db0cd=_0x51d256[_0x5aa2ce(0x1c2)](0x0,_0x6b1f77)[_0x5aa2ce(0x14d)](),_0x49a291=_0x51d256['slice'](_0x91573d[_0x5aa2ce(0x179)](_0x6b1f77,0x1))['trim']();_0x1a5f1b[_0x1db0cd]=_0x49a291;}if(_0x91573d[_0x5aa2ce(0x1a8)](_0x300611[_0x5aa2ce(0x173)],undefined)&&_0x91573d[_0x5aa2ce(0x1ba)](_0x300611['cdpEndpoint']['trim'](),''))throw new Error(_0x91573d[_0x5aa2ce(0x18c)]);if(_0x300611['cdpEndpoint']&&_0x300611['url'])throw new Error(_0x91573d['vxWsw']);const _0x3910c9=_0x91573d['oGVaO'](Boolean,_0x300611['cdpEndpoint']),_0x45543a=process['stdin']['isTTY']&&process['stdout']['isTTY'];if(!_0x45543a&&!_0x300611['url']&&!_0x3910c9&&!_0x300611['skipAuth'])throw new Error('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');if(_0x3910c9){const _0x5e0be3=_0x300611[_0x5aa2ce(0x173)];console[_0x5aa2ce(0x1a4)](_0x5aa2ce(0x14e)),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x5e0be3);const _0x4bf96b={'cdpEndpoint':_0x5e0be3,'isElectron':!![]};Object['keys'](_0x1a5f1b)['length']>0x0&&(_0x4bf96b[_0x5aa2ce(0x1ab)]=_0x1a5f1b);await _0x91573d[_0x5aa2ce(0x174)](createUnconfiguredCloudProfile,_0x5fbf0f,_0x4bf96b);try{_0x91573d[_0x5aa2ce(0x186)](setProfileOverride,process['cwd'](),_0x5fbf0f,_0x5aa2ce(0x173),_0x5e0be3),_0x91573d[_0x5aa2ce(0x162)](setProfileOverride,process[_0x5aa2ce(0x169)](),_0x5fbf0f,_0x91573d['dMwIa'],!![]);}catch(_0x3491fd){console[_0x5aa2ce(0x184)](_0x5aa2ce(0x17c)+(_0x3491fd instanceof Error?_0x3491fd[_0x5aa2ce(0x180)]:String(_0x3491fd)));}console[_0x5aa2ce(0x1a4)]('✓\x20Cloud\x20profile\x20\x27'+_0x5fbf0f+'\x27\x20created\x20(CDP).'),await _0x91573d['aOxii'](sweepOrphansBestEffort,_0x5fbf0f),await markActive(_0x5fbf0f);return;}if(_0x300611['skipAuth']){const _0x37e18b={};_0x300611[_0x5aa2ce(0x167)]&&(_0x37e18b[_0x5aa2ce(0x1aa)]=_0x300611['url']);_0x91573d[_0x5aa2ce(0x168)](Object[_0x5aa2ce(0x1a0)](_0x1a5f1b)['length'],0x0)&&(_0x37e18b['setupHeaders']=_0x1a5f1b);await createUnconfiguredCloudProfile(_0x5fbf0f,_0x37e18b),console['log'](_0x91573d['hBywO'](_0x5aa2ce(0x1c0)+_0x5fbf0f+'\x27\x20created\x20(no\x20session).\x0a','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x5fbf0f+_0x5aa2ce(0x191))),await _0x91573d[_0x5aa2ce(0x19c)](sweepOrphansBestEffort,_0x5fbf0f),await _0x91573d[_0x5aa2ce(0x1a2)](markActive,_0x5fbf0f);return;}if(_0x300611['url']){const _0x5732cb=_0x300611['url'],_0x5c237e=await _0x91573d['oGVaO'](checkUrlReachability,_0x5732cb);if(!_0x5c237e['ok']&&!_0x300611[_0x5aa2ce(0x156)])throw new Error(_0x5aa2ce(0x151)+_0x5732cb+':\x20'+_0x5c237e['error']+_0x5aa2ce(0x15c));!_0x5c237e['ok']&&_0x300611['force']&&console['log'](_0x5aa2ce(0x16c)+_0x5732cb+':\x20'+_0x5c237e[_0x5aa2ce(0x184)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x5aa2ce(0x15e)),console[_0x5aa2ce(0x1a4)](_0x5aa2ce(0x164)),console[_0x5aa2ce(0x1a4)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x2774bb='',_0x429716=![];while(!![]){const _0xb4b7b5=await _0x356642['prompt']([{'type':_0x5aa2ce(0x194),'name':_0x91573d['JjFVt'],'message':_0x429716?_0x91573d[_0x5aa2ce(0x165)]:_0x5aa2ce(0x183),'default':_0x2774bb||_0x91573d[_0x5aa2ce(0x1bd)]}]);_0x2774bb=_0xb4b7b5['baseUrl'];const _0x78d5fe=await checkUrlReachability(_0x2774bb);if(_0x78d5fe['ok'])break;const _0x4da3af=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x2774bb),_0x1bf393=_0x78d5fe['isProtocolError']&&!_0x4da3af,_0x58ad06=_0x1bf393?'http://'+_0x2774bb:null;_0x429716=!![],console[_0x5aa2ce(0x1a4)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x2774bb+':\x20'+_0x78d5fe['error']);_0x58ad06&&console[_0x5aa2ce(0x1a4)](_0x5aa2ce(0x18d)+_0x58ad06+'?');const {action:_0x537b94}=await _0x356642['prompt']([{'type':'list','name':_0x91573d[_0x5aa2ce(0x198)],'message':_0x91573d[_0x5aa2ce(0x17e)],'choices':[..._0x58ad06?[{'name':_0x5aa2ce(0x187)+_0x58ad06,'value':_0x5aa2ce(0x155)}]:[],{'name':_0x91573d[_0x5aa2ce(0x153)],'value':_0x5aa2ce(0x17a)},{'name':_0x91573d['ZTdOg'],'value':'continue'}]}]);if(_0x91573d['SMvUK'](_0x537b94,_0x91573d['Rfhha'])&&_0x58ad06){_0x2774bb=_0x58ad06;const _0x1c5a26=await _0x91573d[_0x5aa2ce(0x15b)](checkUrlReachability,_0x2774bb);if(_0x1c5a26['ok'])break;console['log'](_0x5aa2ce(0x18e)+_0x2774bb+':\x20'+_0x1c5a26['error']);}else{if(_0x537b94===_0x5aa2ce(0x193))break;}}_0x300611={..._0x300611,'url':_0x2774bb};}let _0x3a73d6=![];try{_0x3a73d6=await tryAutoRouteCloudProfile(_0x5fbf0f,_0x300611[_0x5aa2ce(0x167)],_0x300611,_0x45543a,_0x24c80a);}catch(_0x1e9757){console['error'](_0x5aa2ce(0x176)+_0x5fbf0f+_0x5aa2ce(0x1c4)+(_0x1e9757 instanceof Error?_0x1e9757[_0x5aa2ce(0x180)]:String(_0x1e9757))),process[_0x5aa2ce(0x1a7)](0x1);}!_0x3a73d6&&process['exit'](0x1),await _0x91573d[_0x5aa2ce(0x15b)](markActive,_0x5fbf0f);}
@@ -1 +1 @@
1
- (function(_0x443c05,_0x2bd29f){const _0x8dbad8=_0x4c54,_0x5219c8=_0x443c05();while(!![]){try{const _0x498856=-parseInt(_0x8dbad8(0x1f5))/0x1+-parseInt(_0x8dbad8(0x1f4))/0x2*(-parseInt(_0x8dbad8(0x1fd))/0x3)+parseInt(_0x8dbad8(0x204))/0x4*(-parseInt(_0x8dbad8(0x1fa))/0x5)+-parseInt(_0x8dbad8(0x1fc))/0x6+-parseInt(_0x8dbad8(0x205))/0x7*(parseInt(_0x8dbad8(0x202))/0x8)+-parseInt(_0x8dbad8(0x206))/0x9*(parseInt(_0x8dbad8(0x1ff))/0xa)+parseInt(_0x8dbad8(0x1f2))/0xb;if(_0x498856===_0x2bd29f)break;else _0x5219c8['push'](_0x5219c8['shift']());}catch(_0xa188b1){_0x5219c8['push'](_0x5219c8['shift']());}}}(_0xb74b,0xe3b8d));import{readFile,writeFile}from'fs/promises';function _0x4c54(_0x8f01ff,_0x32b949){_0x8f01ff=_0x8f01ff-0x1f2;const _0xb74bd9=_0xb74b();let _0x4c54e3=_0xb74bd9[_0x8f01ff];return _0x4c54e3;}function _0xb74b(){const _0x244e48=['.enc','log','dliYe','\x0a✓\x20Encrypted\x20auth\x20saved\x20to:\x20','4497865QJCrDy','nWvKz','5100030wbXZTc','213bBRfbx','\x20\x20The\x20encrypted\x20auth.json.enc\x20can\x20be\x20committed.','39410jAGdRc','No\x20auth.json\x20found\x20at\x20','auth.json','4958952kVkGjm','OdjSG','4fjmcdW','7Hgsxji','738HNuwCI','\x0a\x20\x20The\x20plaintext\x20auth.json\x20is\x20gitignored\x20for\x20security.','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','xMOUf','41475577dVKzbE','utf-8','22298obteJk','936728TPraVT'];_0xb74b=function(){return _0x244e48;};return _0xb74b();}import{join}from'path';import{existsSync}from'fs';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getEnvDir}from'./utils/settings.js';export async function authEncrypt(_0x4443dc){const _0x386304=_0x4c54,_0x52ec52={'OdjSG':function(_0x1ae796,_0x382993){return _0x1ae796(_0x382993);},'kFXcK':_0x386304(0x201),'dliYe':function(_0x4d898b,_0x18071d){return _0x4d898b+_0x18071d;},'xMOUf':_0x386304(0x1f3),'nWvKz':function(_0x48db81,_0x533e06,_0x4564b7){return _0x48db81(_0x533e06,_0x4564b7);},'lIGUB':_0x386304(0x208)},_0x64a281=_0x52ec52[_0x386304(0x203)](getEnvDir,_0x4443dc),_0x5b8d5a=join(_0x64a281,_0x52ec52['kFXcK']),_0x3a7ec4=_0x52ec52[_0x386304(0x1f8)](_0x5b8d5a,_0x386304(0x1f6));if(!existsSync(_0x64a281))throw new Error('Profile\x20\x22'+_0x4443dc+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x4443dc);if(!_0x52ec52['OdjSG'](existsSync,_0x5b8d5a))throw new Error(_0x386304(0x200)+_0x5b8d5a+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20with\x20authentication,\x20or\x20ranger\x20profile\x20update');const _0x4a5d98=await getToken();if(!_0x4a5d98)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x10c035=await readFile(_0x5b8d5a,_0x52ec52[_0x386304(0x209)]),_0x32e91a=_0x52ec52[_0x386304(0x1fb)](encrypt,_0x10c035,_0x4a5d98);await writeFile(_0x3a7ec4,_0x32e91a),console[_0x386304(0x1f7)](_0x386304(0x1f9)+_0x3a7ec4),console[_0x386304(0x1f7)](_0x52ec52['lIGUB']),console[_0x386304(0x1f7)]('\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.'),_0x52ec52[_0x386304(0x203)](existsSync,_0x3a7ec4)&&(console[_0x386304(0x1f7)](_0x386304(0x207)),console[_0x386304(0x1f7)](_0x386304(0x1fe)));}
1
+ (function(_0x53ba59,_0x56b44d){var _0x5c584e=_0x2fdd,_0xee69b1=_0x53ba59();while(!![]){try{var _0x42bbb2=parseInt(_0x5c584e(0x179))/0x1+-parseInt(_0x5c584e(0x175))/0x2*(-parseInt(_0x5c584e(0x174))/0x3)+parseInt(_0x5c584e(0x171))/0x4*(-parseInt(_0x5c584e(0x16d))/0x5)+-parseInt(_0x5c584e(0x172))/0x6+-parseInt(_0x5c584e(0x16c))/0x7+-parseInt(_0x5c584e(0x16e))/0x8*(-parseInt(_0x5c584e(0x173))/0x9)+parseInt(_0x5c584e(0x176))/0xa*(parseInt(_0x5c584e(0x178))/0xb);if(_0x42bbb2===_0x56b44d)break;else _0xee69b1['push'](_0xee69b1['shift']());}catch(_0xbc3dac){_0xee69b1['push'](_0xee69b1['shift']());}}}(_0x4cb3,0xe8b54));function _0x2fdd(_0x25be0b,_0x17f3a3){_0x25be0b=_0x25be0b-0x16c;var _0x4cb34f=_0x4cb3();var _0x2fdd10=_0x4cb34f[_0x25be0b];return _0x2fdd10;}function _0x4cb3(){var _0x41c826=['9VWLvtT','1353360IpLrna','2alqgud','31630oTehye','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','14861JTEZEJ','308859WYcNDi','mmSPS','13291915HZPsoB','45635kefrHh','4313648wxSpYf','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','780IVttpk','5643696RLcdfw'];_0x4cb3=function(){return _0x41c826;};return _0x4cb3();}export async function authEncrypt(_0x170247){var _0xa809e8=_0x2fdd,_0xdc9747={'tKZVQ':_0xa809e8(0x177),'MFQJf':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','mmSPS':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','JjcFq':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console['error'](_0xa809e8(0x16f)+_0xdc9747['tKZVQ']+'\x0a'+_0xdc9747['MFQJf']+_0xdc9747[_0xa809e8(0x17a)]+'\x0a'+_0xa809e8(0x170)+_0xdc9747['JjcFq']),process['exit'](0x1);}
@@ -1 +1 @@
1
- const _0x29b917=_0x4109;(function(_0x151fae,_0x1099ef){const _0x517398=_0x4109,_0x25ec16=_0x151fae();while(!![]){try{const _0x166b3b=parseInt(_0x517398(0x9d))/0x1+parseInt(_0x517398(0x95))/0x2*(-parseInt(_0x517398(0x84))/0x3)+-parseInt(_0x517398(0xb5))/0x4+parseInt(_0x517398(0xb7))/0x5+parseInt(_0x517398(0x88))/0x6+-parseInt(_0x517398(0xb9))/0x7+parseInt(_0x517398(0x9f))/0x8;if(_0x166b3b===_0x1099ef)break;else _0x25ec16['push'](_0x25ec16['shift']());}catch(_0x29441f){_0x25ec16['push'](_0x25ec16['shift']());}}}(_0x25cd,0xe98be));import{rm,readFile,writeFile}from'fs/promises';function _0x4109(_0x49106b,_0xacbc1b){_0x49106b=_0x49106b-0x80;const _0x25cd27=_0x25cd();let _0x41097e=_0x25cd27[_0x49106b];return _0x41097e;}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';function _0x25cd(){const _0x1675b5=['✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','8446085OucOwp','hQiEn','5645822PLOngx','filter','zEIYM','✓\x20Removed\x20trailhead\x20marketplace','log','ScQsO','pipe','✓\x20Removed\x20project\x20skill:\x20','341745JsLmrt','stringify','UpfnD','XLTSQ','4489272egzOEt','vaQfN','DBYDZ','plugin','marketplace','SwRNL','error','push','win32','platform','DARiq','user','xENpY','18zscyjV','string','vkxdB','LmVVo','✓\x20Removed\x20stored\x20credentials','project','WJIka','length','396770nritOl','isArray','5819776UwSBiM','EkVdJ','Ihatv','parse','uninstall','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','fQblx','nIaNA','ZwdPB','✓\x20Removed\x20.ranger/\x20directory','Sgqei','jOmJs','nGaun','WVfAH','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','claude','eHYHL','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','VCrnp','@ranger-testing/opencode-plugin','zcnwY','e2e-test-recommender','3093136iPllqj'];_0x25cd=function(){return _0x1675b5;};return _0x25cd();}const skillsToRemove=['ranger','feature-tracker','bug-bash',_0x29b917(0xb4)],opencodePluginName=_0x29b917(0xb2);function parseJsonc(_0x3abe06){const _0x22fd39=_0x29b917,_0x1867b7=_0x3abe06['replace'](/\/\*[\s\S]*?\*\//g,''),_0x8625d8=_0x1867b7['replace'](/^\s*\/\/.*$/gm,''),_0x1a27d8=_0x8625d8['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x22fd39(0xa2)](_0x1a27d8);}async function removeOpencodePluginConfig(_0x247787){const _0xf9750a=_0x29b917,_0x5ed65f={'LmVVo':function(_0x5212f7,_0x3b8ce1){return _0x5212f7!==_0x3b8ce1;},'eHYHL':function(_0x49e32e,_0x279002){return _0x49e32e!==_0x279002;},'vxuGj':function(_0x1911e8,_0x9d29f7,_0x5f1d35){return _0x1911e8(_0x9d29f7,_0x5f1d35);},'egxam':'utf-8','XLTSQ':function(_0x27efb6,_0x737765){return _0x27efb6===_0x737765;}};if(!existsSync(_0x247787))return![];let _0x1548fc;try{const _0x5e144c=await _0x5ed65f['vxuGj'](readFile,_0x247787,_0x5ed65f['egxam']);_0x1548fc=parseJsonc(_0x5e144c);}catch{return![];}const _0x48b53f=Array[_0xf9750a(0x9e)](_0x1548fc[_0xf9750a(0x8b)])?_0x1548fc[_0xf9750a(0x8b)]:[];if(_0x5ed65f['XLTSQ'](_0x48b53f['length'],0x0))return![];const _0x3c81f4=_0x48b53f[_0xf9750a(0xba)](_0x299117=>{const _0x2781a9=_0xf9750a;if(_0x5ed65f[_0x2781a9(0x98)](typeof _0x299117,_0x2781a9(0x96)))return!![];return _0x5ed65f[_0x2781a9(0xaf)](_0x299117,opencodePluginName);});if(_0x5ed65f['XLTSQ'](_0x3c81f4['length'],_0x48b53f['length']))return![];return _0x5ed65f[_0xf9750a(0x87)](_0x3c81f4[_0xf9750a(0x9c)],0x0)?delete _0x1548fc['plugin']:_0x1548fc[_0xf9750a(0x8b)]=_0x3c81f4,await writeFile(_0x247787,JSON[_0xf9750a(0x85)](_0x1548fc,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x24c8cb){const _0x3a4514=_0x29b917,_0x1b95f4={'ScQsO':'plugin','DARiq':'--scope','vkxdB':'claude','WJIka':'pipe','ZwdPB':function(_0x1fc858,_0x302893){return _0x1fc858===_0x302893;},'fbyQP':_0x3a4514(0x90)};return new Promise(_0x147bb7=>{const _0x560d63=_0x3a4514,_0x23650e={'Sgqei':function(_0x26833a,_0x2f586f){return _0x26833a===_0x2f586f;}},_0x225121=[_0x1b95f4[_0x560d63(0x81)],_0x560d63(0xa3),'ranger@trailhead'];_0x24c8cb&&_0x225121[_0x560d63(0x8f)](_0x1b95f4[_0x560d63(0x92)],_0x24c8cb);const _0x2b5886=spawn(_0x1b95f4[_0x560d63(0x97)],_0x225121,{'stdio':_0x1b95f4[_0x560d63(0x9b)],'shell':_0x1b95f4[_0x560d63(0xa7)](process['platform'],_0x1b95f4['fbyQP'])});_0x2b5886['on']('close',_0x2fab4f=>{const _0x45b13f=_0x560d63;_0x147bb7(_0x23650e[_0x45b13f(0xa9)](_0x2fab4f,0x0));}),_0x2b5886['on'](_0x560d63(0x8e),()=>{_0x147bb7(![]);});});}async function removeMarketplace(){const _0x3522b9=_0x29b917,_0x2d8354={'jPdJT':function(_0x394768,_0x540901){return _0x394768(_0x540901);},'xENpY':function(_0x2cabd1,_0x23cdcf,_0x49d26f,_0x3e198d){return _0x2cabd1(_0x23cdcf,_0x49d26f,_0x3e198d);},'EkVdJ':_0x3522b9(0x8b),'IqzwO':'remove','fZYoB':_0x3522b9(0x90)};return new Promise(_0x549d9e=>{const _0xed36ca=_0x3522b9,_0x268889={'jOmJs':function(_0x456045,_0x500132){return _0x2d8354['jPdJT'](_0x456045,_0x500132);}},_0x3eb3f8=_0x2d8354[_0xed36ca(0x94)](spawn,_0xed36ca(0xae),[_0x2d8354[_0xed36ca(0xa0)],_0xed36ca(0x8c),_0x2d8354['IqzwO'],'trailhead'],{'stdio':_0xed36ca(0x82),'shell':process[_0xed36ca(0x91)]===_0x2d8354['fZYoB']});_0x3eb3f8['on']('close',_0x2a0540=>{_0x549d9e(_0x2a0540===0x0);}),_0x3eb3f8['on']('error',()=>{const _0x45749f=_0xed36ca;_0x268889[_0x45749f(0xaa)](_0x549d9e,![]);});});}export async function clean(){const _0x31ca2b=_0x29b917,_0x9a7c09={'vaQfN':function(_0x1014a4){return _0x1014a4();},'Ihatv':function(_0x11fb26){return _0x11fb26();},'fQblx':function(_0x3cb99f,_0x461d64){return _0x3cb99f(_0x461d64);},'SwRNL':function(_0xffbdb7,_0x41e390,_0xa39e95){return _0xffbdb7(_0x41e390,_0xa39e95);},'VCrnp':_0x31ca2b(0xa8),'hQiEn':function(_0x2e6570){return _0x2e6570();},'UpfnD':function(_0x5b3492,_0x1ae7cf){return _0x5b3492(_0x1ae7cf);},'nGaun':function(_0x50b2a9,_0x308602){return _0x50b2a9(_0x308602);},'yYmbw':function(_0x36f25a,_0x2d1d87){return _0x36f25a(_0x2d1d87);},'xFyJO':_0x31ca2b(0x93),'zEIYM':function(_0x3b9089,_0x2efae7,_0x403102){return _0x3b9089(_0x2efae7,_0x403102);},'zcnwY':'opencode.json','nIaNA':_0x31ca2b(0xb6),'tifea':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','fDVkj':_0x31ca2b(0xad),'XnXLw':function(_0x256e63,_0xb319b3){return _0x256e63(_0xb319b3);},'WVfAH':'project','DBYDZ':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','DrFXz':function(_0x66e298){return _0x66e298();},'ZPJsF':'\x0a✅\x20Cleanup\x20complete!\x0a'};console['log']('\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a');let _0x5c3e58=![];try{await _0x9a7c09[_0x31ca2b(0x89)](deleteAllCredentials),console[_0x31ca2b(0x80)](_0x31ca2b(0x99)),_0x5c3e58=!![];}catch{}const _0xc54dd4=_0x9a7c09[_0x31ca2b(0xa1)](getCacheFile);_0x9a7c09['fQblx'](existsSync,_0xc54dd4)&&(await rm(_0xc54dd4),_0x5c3e58=!![]);const _0x42dd65=getRangerDir();_0x9a7c09[_0x31ca2b(0xa5)](existsSync,_0x42dd65)&&(await _0x9a7c09[_0x31ca2b(0x8d)](rm,_0x42dd65,{'recursive':!![]}),console[_0x31ca2b(0x80)](_0x9a7c09[_0x31ca2b(0xb1)]),_0x5c3e58=!![]);const _0x49e17b=_0x9a7c09[_0x31ca2b(0xb8)](getProjectSkillsDir);for(const _0x599028 of skillsToRemove){const _0x2d45c4=join(_0x49e17b,_0x599028);existsSync(_0x2d45c4)&&(await rm(_0x2d45c4,{'recursive':!![]}),console[_0x31ca2b(0x80)](_0x31ca2b(0x83)+_0x599028),_0x5c3e58=!![]);}const _0x24b6dc=getUserSkillsDir();for(const _0x5adc43 of skillsToRemove){const _0x55faeb=_0x9a7c09[_0x31ca2b(0x8d)](join,_0x24b6dc,_0x5adc43);_0x9a7c09[_0x31ca2b(0x86)](existsSync,_0x55faeb)&&(await _0x9a7c09[_0x31ca2b(0x8d)](rm,_0x55faeb,{'recursive':!![]}),console[_0x31ca2b(0x80)]('✓\x20Removed\x20user\x20skill:\x20'+_0x5adc43),_0x5c3e58=!![]);}const _0xe8a32e=_0x9a7c09['nGaun'](getOpencodeSkillsDir,'project');for(const _0x233931 of skillsToRemove){const _0x51e243=join(_0xe8a32e,_0x233931);_0x9a7c09['yYmbw'](existsSync,_0x51e243)&&(await _0x9a7c09['SwRNL'](rm,_0x51e243,{'recursive':!![]}),console['log'](_0x31ca2b(0xa4)+_0x233931),_0x5c3e58=!![]);}const _0x492510=getOpencodeSkillsDir(_0x9a7c09['xFyJO']);for(const _0xbdfdd6 of skillsToRemove){const _0x10bb40=_0x9a7c09[_0x31ca2b(0xbb)](join,_0x492510,_0xbdfdd6);_0x9a7c09[_0x31ca2b(0xab)](existsSync,_0x10bb40)&&(await rm(_0x10bb40,{'recursive':!![]}),console[_0x31ca2b(0x80)](_0x31ca2b(0xb0)+_0xbdfdd6),_0x5c3e58=!![]);}const _0x452550=join(getOpencodeConfigDir(_0x31ca2b(0x9a)),_0x9a7c09[_0x31ca2b(0xb3)]);await removeOpencodePluginConfig(_0x452550)&&(console[_0x31ca2b(0x80)](_0x9a7c09[_0x31ca2b(0xa6)]),_0x5c3e58=!![]);const _0x4411e3=_0x9a7c09[_0x31ca2b(0xbb)](join,getOpencodeConfigDir('user'),_0x9a7c09['zcnwY']);await _0x9a7c09['fQblx'](removeOpencodePluginConfig,_0x4411e3)&&(console[_0x31ca2b(0x80)](_0x9a7c09['tifea']),_0x5c3e58=!![]);const _0x376055=await uninstallClaudePlugin();_0x376055&&(console['log'](_0x9a7c09['fDVkj']),_0x5c3e58=!![]);const _0x4cd3f0=await _0x9a7c09['XnXLw'](uninstallClaudePlugin,_0x9a7c09[_0x31ca2b(0xac)]);_0x4cd3f0&&(console['log'](_0x9a7c09[_0x31ca2b(0x8a)]),_0x5c3e58=!![]);const _0x4d2bc4=await _0x9a7c09['DrFXz'](removeMarketplace);_0x4d2bc4&&(console['log'](_0x31ca2b(0xbc)),_0x5c3e58=!![]),_0x5c3e58?console[_0x31ca2b(0x80)](_0x9a7c09['ZPJsF']):console[_0x31ca2b(0x80)]('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ const _0x1cade7=_0x3912;(function(_0x596813,_0x570e21){const _0xce5c86=_0x3912,_0xb73c59=_0x596813();while(!![]){try{const _0x7e8988=parseInt(_0xce5c86(0x16f))/0x1+parseInt(_0xce5c86(0x171))/0x2*(-parseInt(_0xce5c86(0x16c))/0x3)+-parseInt(_0xce5c86(0x170))/0x4+-parseInt(_0xce5c86(0x18b))/0x5*(parseInt(_0xce5c86(0x178))/0x6)+parseInt(_0xce5c86(0x166))/0x7+parseInt(_0xce5c86(0x16e))/0x8*(-parseInt(_0xce5c86(0x172))/0x9)+-parseInt(_0xce5c86(0x189))/0xa*(parseInt(_0xce5c86(0x164))/0xb);if(_0x7e8988===_0x570e21)break;else _0xb73c59['push'](_0xb73c59['shift']());}catch(_0x589181){_0xb73c59['push'](_0xb73c59['shift']());}}}(_0x5c92,0xd19f9));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';function _0x3912(_0x569125,_0x433c4d){_0x569125=_0x569125-0x15f;const _0x5c9253=_0x5c92();let _0x39123f=_0x5c9253[_0x569125];return _0x39123f;}import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x5c92(){const _0x1571f0=['wSQaC','cgrjj','log','pGpTR','ignore','lhdxb','wWSty','@ranger-testing/opencode-plugin','claude','project','platform','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','plugin','CzVwr','length','10eSEfqN','filter','45foBZOz','laVEF','user','error','feature-tracker','Nothing\x20to\x20clean\x20up.\x0a','✓\x20Removed\x20user\x20skill:\x20','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','vNDkc','jgmxM','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','close','e2e-test-recommender','marketplace','XJiMH','string','7724365HOJfaX','MRTCQ','10198272QwJpBm','✓\x20Removed\x20trailhead\x20marketplace','Gbost','gGHPk','bug-bash','replace','123LhuDlK','vhcYn','2013272xxPlqw','1528123wPeqVY','1539908EkushQ','33738vgsEah','9hTtujs','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','MPOSM','\x0a✅\x20Cleanup\x20complete!\x0a','stringify','utf-8','63948wPilZD','Ofipa'];_0x5c92=function(){return _0x1571f0;};return _0x5c92();}import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x1cade7(0x18f),_0x1cade7(0x16a),_0x1cade7(0x160)],opencodePluginName=_0x1cade7(0x181);function parseJsonc(_0x12396a){const _0x2f2176=_0x1cade7,_0x1a9ede=_0x12396a[_0x2f2176(0x16b)](/\/\*[\s\S]*?\*\//g,''),_0x28de11=_0x1a9ede[_0x2f2176(0x16b)](/^\s*\/\/.*$/gm,''),_0x503b8e=_0x28de11['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x503b8e);}async function removeOpencodePluginConfig(_0x478a7d){const _0x2d992a=_0x1cade7,_0x22dcfa={'lhdxb':function(_0x19d3e7,_0x37b095){return _0x19d3e7!==_0x37b095;},'XkUqZ':_0x2d992a(0x177),'QrPxn':function(_0x29612f,_0xf6a8df){return _0x29612f(_0xf6a8df);},'Gbost':function(_0x59f6a8,_0x47f903){return _0x59f6a8===_0x47f903;},'Ofipa':function(_0x39202f,_0xff02cd,_0x6dd68f){return _0x39202f(_0xff02cd,_0x6dd68f);},'gGHPk':function(_0x3be5a7,_0x4f6b81){return _0x3be5a7+_0x4f6b81;}};if(!existsSync(_0x478a7d))return![];let _0x9a7db5;try{const _0xc008e8=await readFile(_0x478a7d,_0x22dcfa['XkUqZ']);_0x9a7db5=_0x22dcfa['QrPxn'](parseJsonc,_0xc008e8);}catch{return![];}const _0xbbd764=Array['isArray'](_0x9a7db5[_0x2d992a(0x186)])?_0x9a7db5[_0x2d992a(0x186)]:[];if(_0xbbd764[_0x2d992a(0x188)]===0x0)return![];const _0x11cb1d=_0xbbd764[_0x2d992a(0x18a)](_0x4b4f51=>{const _0xfcd229=_0x2d992a;if(typeof _0x4b4f51!==_0xfcd229(0x163))return!![];return _0x22dcfa[_0xfcd229(0x17f)](_0x4b4f51,opencodePluginName);});if(_0x22dcfa[_0x2d992a(0x168)](_0x11cb1d['length'],_0xbbd764['length']))return![];return _0x11cb1d[_0x2d992a(0x188)]===0x0?delete _0x9a7db5[_0x2d992a(0x186)]:_0x9a7db5[_0x2d992a(0x186)]=_0x11cb1d,await _0x22dcfa[_0x2d992a(0x179)](writeFile,_0x478a7d,_0x22dcfa[_0x2d992a(0x169)](JSON[_0x2d992a(0x176)](_0x9a7db5,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x111ee5){const _0x3720eb=_0x1cade7,_0x2ccbd7={'eVLOI':function(_0x1daa45,_0x29298a){return _0x1daa45(_0x29298a);},'NdNzA':'plugin','laVEF':'--scope','Kmdgm':function(_0x1ebd50,_0x42e74b,_0x3379bc,_0x37c7a5){return _0x1ebd50(_0x42e74b,_0x3379bc,_0x37c7a5);},'vNDkc':_0x3720eb(0x17e),'vhcYn':function(_0xf5463a){return _0xf5463a();}};return new Promise(_0x5c854e=>{const _0x54b91d=_0x3720eb,_0x28922c=[_0x2ccbd7['NdNzA'],'uninstall','ranger@trailhead'];_0x111ee5&&_0x28922c['push'](_0x2ccbd7[_0x54b91d(0x18c)],_0x111ee5);const _0x1cda7e=_0x2ccbd7['Kmdgm'](spawn,_0x54b91d(0x182),_0x28922c,{'stdio':[_0x2ccbd7[_0x54b91d(0x193)],_0x54b91d(0x17e),'ignore'],'cwd':_0x111ee5?_0x2ccbd7[_0x54b91d(0x16d)](getProjectRoot):undefined,'shell':process[_0x54b91d(0x184)]==='win32'});_0x1cda7e['on']('close',_0x27b1a0=>{_0x5c854e(_0x27b1a0===0x0);}),_0x1cda7e['on'](_0x54b91d(0x18e),()=>{_0x2ccbd7['eVLOI'](_0x5c854e,![]);});});}async function removeMarketplace(){const _0x4a37af=_0x1cade7,_0x29e006={'XJiMH':function(_0x28097d,_0x111e31,_0x2e7e82,_0x3355df){return _0x28097d(_0x111e31,_0x2e7e82,_0x3355df);},'jgmxM':'plugin','FVKbB':'trailhead','CzVwr':'ignore','QTfxS':function(_0x27297a,_0x593f47){return _0x27297a===_0x593f47;},'AeZMC':_0x4a37af(0x15f),'zZRzC':_0x4a37af(0x18e)};return new Promise(_0x1ead6d=>{const _0x1f5b46=_0x4a37af,_0x387e20={'WfNTZ':function(_0x54fbb0,_0x355481){return _0x54fbb0(_0x355481);}},_0x318ed9=_0x29e006[_0x1f5b46(0x162)](spawn,'claude',[_0x29e006[_0x1f5b46(0x194)],_0x1f5b46(0x161),'remove',_0x29e006['FVKbB']],{'stdio':[_0x29e006[_0x1f5b46(0x187)],'ignore','ignore'],'shell':_0x29e006['QTfxS'](process[_0x1f5b46(0x184)],'win32')});_0x318ed9['on'](_0x29e006['AeZMC'],_0x19d5d8=>{_0x1ead6d(_0x19d5d8===0x0);}),_0x318ed9['on'](_0x29e006['zZRzC'],()=>{_0x387e20['WfNTZ'](_0x1ead6d,![]);});});}export async function clean(){const _0x162b09=_0x1cade7,_0x11480f={'bGBaL':function(_0x2558ed){return _0x2558ed();},'cgrjj':function(_0x337235,_0x1d0ce4){return _0x337235(_0x1d0ce4);},'MRTCQ':function(_0x1279a2){return _0x1279a2();},'pGpTR':_0x162b09(0x183),'wWSty':function(_0xda81e8,_0x20397e,_0x1d4703){return _0xda81e8(_0x20397e,_0x1d4703);},'wSQaC':_0x162b09(0x18d),'HjyZJ':'opencode.json','MPOSM':function(_0x537199,_0x5f3b45){return _0x537199(_0x5f3b45);},'NJxft':_0x162b09(0x173),'QsQAT':_0x162b09(0x167),'SqdNv':_0x162b09(0x175)};console['log']('\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a');let _0x3ec225=![];try{await _0x11480f['bGBaL'](deleteAllCredentials),console[_0x162b09(0x17c)]('✓\x20Removed\x20stored\x20credentials'),_0x3ec225=!![];}catch{}const _0x572dc0=getCacheFile();existsSync(_0x572dc0)&&(await _0x11480f[_0x162b09(0x17b)](rm,_0x572dc0),_0x3ec225=!![]);const _0x58ca4f=getRangerDir();_0x11480f['cgrjj'](existsSync,_0x58ca4f)&&(await rm(_0x58ca4f,{'recursive':!![]}),console[_0x162b09(0x17c)]('✓\x20Removed\x20.ranger/\x20directory'),_0x3ec225=!![]);const _0x39d533=_0x11480f[_0x162b09(0x165)](getProjectSkillsDir);for(const _0x5bc329 of skillsToRemove){const _0x4dfcc0=join(_0x39d533,_0x5bc329);existsSync(_0x4dfcc0)&&(await rm(_0x4dfcc0,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x5bc329),_0x3ec225=!![]);}const _0x3681b8=getUserSkillsDir();for(const _0x154be2 of skillsToRemove){const _0x38a672=join(_0x3681b8,_0x154be2);existsSync(_0x38a672)&&(await rm(_0x38a672,{'recursive':!![]}),console['log'](_0x162b09(0x191)+_0x154be2),_0x3ec225=!![]);}const _0x3bd53b=_0x11480f[_0x162b09(0x17b)](getOpencodeSkillsDir,_0x11480f[_0x162b09(0x17d)]);for(const _0x1be5e7 of skillsToRemove){const _0x197d70=_0x11480f[_0x162b09(0x180)](join,_0x3bd53b,_0x1be5e7);existsSync(_0x197d70)&&(await _0x11480f['wWSty'](rm,_0x197d70,{'recursive':!![]}),console[_0x162b09(0x17c)](_0x162b09(0x192)+_0x1be5e7),_0x3ec225=!![]);}const _0x543579=getOpencodeSkillsDir(_0x11480f['wSQaC']);for(const _0x291413 of skillsToRemove){const _0x4c4b3b=_0x11480f['wWSty'](join,_0x543579,_0x291413);existsSync(_0x4c4b3b)&&(await rm(_0x4c4b3b,{'recursive':!![]}),console['log'](_0x162b09(0x195)+_0x291413),_0x3ec225=!![]);}const _0x5d17c=join(getOpencodeConfigDir('project'),_0x11480f['HjyZJ']);await _0x11480f['cgrjj'](removeOpencodePluginConfig,_0x5d17c)&&(console[_0x162b09(0x17c)]('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x3ec225=!![]);const _0xe7a664=join(_0x11480f['MPOSM'](getOpencodeConfigDir,_0x11480f[_0x162b09(0x17a)]),'opencode.json');await _0x11480f['MPOSM'](removeOpencodePluginConfig,_0xe7a664)&&(console[_0x162b09(0x17c)](_0x162b09(0x185)),_0x3ec225=!![]);const _0x58fd78=await uninstallClaudePlugin();_0x58fd78&&(console[_0x162b09(0x17c)](_0x11480f['NJxft']),_0x3ec225=!![]);const _0x8371e=await _0x11480f[_0x162b09(0x174)](uninstallClaudePlugin,_0x11480f['pGpTR']);_0x8371e&&(console[_0x162b09(0x17c)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'),_0x3ec225=!![]);const _0x924c5a=await removeMarketplace();_0x924c5a&&(console['log'](_0x11480f['QsQAT']),_0x3ec225=!![]),_0x3ec225?console['log'](_0x11480f['SqdNv']):console['log'](_0x162b09(0x190));}
@@ -1 +1 @@
1
- function _0x46ed(_0x5a02d1,_0x3c6b42){_0x5a02d1=_0x5a02d1-0xf3;const _0x16e1a6=_0x16e1();let _0x46ed3b=_0x16e1a6[_0x5a02d1];return _0x46ed3b;}const _0xfe1c9=_0x46ed;(function(_0x31787e,_0x8ef39b){const _0x48254f=_0x46ed,_0x2aa9af=_0x31787e();while(!![]){try{const _0x5dcc2e=-parseInt(_0x48254f(0x11c))/0x1+-parseInt(_0x48254f(0x11f))/0x2*(-parseInt(_0x48254f(0x10e))/0x3)+-parseInt(_0x48254f(0x11d))/0x4+-parseInt(_0x48254f(0xfa))/0x5*(-parseInt(_0x48254f(0x123))/0x6)+parseInt(_0x48254f(0x112))/0x7+parseInt(_0x48254f(0x109))/0x8*(-parseInt(_0x48254f(0x108))/0x9)+-parseInt(_0x48254f(0x104))/0xa*(parseInt(_0x48254f(0x124))/0xb);if(_0x5dcc2e===_0x8ef39b)break;else _0x2aa9af['push'](_0x2aa9af['shift']());}catch(_0x3c5e88){_0x2aa9af['push'](_0x2aa9af['shift']());}}}(_0x16e1,0x83541));import{existsSync}from'fs';import{loadSettings,saveSettings,getNestedValue,setNestedValue,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=['headless',_0xfe1c9(0x117)];function parseLocalValue(_0x5733e6,_0xf2111d){const _0x71dc4b=_0xfe1c9,_0x96d022={'UMWkU':function(_0x248c5b,_0x2a255a){return _0x248c5b===_0x2a255a;},'gdVqb':'true'};if(BOOLEAN_KEYS[_0x71dc4b(0x11b)](_0x5733e6)){if(_0x96d022['UMWkU'](_0xf2111d,_0x96d022['gdVqb']))return!![];if(_0xf2111d==='false')return![];throw new Error(_0x71dc4b(0xf3)+_0x5733e6+_0x71dc4b(0xff));}return _0xf2111d;}function parseOverrideValue(_0x22e7de){const _0x50d216=_0xfe1c9,_0x1bdf3b={'bYWoR':'true','rBgCw':function(_0x16c689,_0x3af897){return _0x16c689===_0x3af897;},'XRrQu':function(_0x1dcff4,_0x3c6c79){return _0x1dcff4(_0x3c6c79);}};if(_0x22e7de===_0x1bdf3b[_0x50d216(0x107)])return!![];if(_0x1bdf3b[_0x50d216(0x10f)](_0x22e7de,'false'))return![];if(_0x22e7de==='null')return null;if(_0x22e7de===_0x50d216(0x105))return undefined;if(/^-?\d+$/[_0x50d216(0x115)](_0x22e7de)){const _0x409463=Number(_0x22e7de);if(Number['isSafeInteger'](_0x409463))return _0x409463;}if(/^-?\d+\.\d+$/['test'](_0x22e7de)){const _0x43420d=_0x1bdf3b['XRrQu'](Number,_0x22e7de);if(!Number['isNaN'](_0x43420d))return _0x43420d;}const _0x4c910b=_0x22e7de['trim']();if(_0x4c910b['startsWith']('{')&&_0x4c910b['endsWith']('}')||_0x4c910b['startsWith']('[')&&_0x4c910b['endsWith'](']'))try{return JSON[_0x50d216(0xf7)](_0x4c910b);}catch{}return _0x22e7de;}async function resolveProfileTarget(_0x3ba8a1){const _0x146468=_0xfe1c9,_0x123eee={'RPXUT':function(_0x26130c,_0x56537e){return _0x26130c(_0x56537e);},'RUcSD':function(_0x5a3950,_0x5543e9){return _0x5a3950(_0x5543e9);},'QklNB':'cloud'},_0x25a777=_0x123eee['RPXUT'](existsSync,_0x123eee['RUcSD'](getEnvDir,_0x3ba8a1));let _0x1579f8=![];try{const _0x5a5869=await _0x123eee['RUcSD'](fetchCloudProfile,_0x3ba8a1);_0x1579f8=_0x123eee['RPXUT'](Boolean,_0x5a5869);}catch{}if(_0x1579f8)return{'kind':_0x123eee['QklNB'],'alsoExistsElsewhere':_0x25a777};if(_0x25a777)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error(_0x146468(0x118)+_0x3ba8a1+_0x146468(0xfb)+_0x3ba8a1);}function printDualExistsHint(_0x954e73){const _0x3e2677=_0xfe1c9;console[_0x3e2677(0x10a)](_0x3e2677(0x120)+_0x954e73+_0x3e2677(0x10b));}function _0x16e1(){const _0xc1d792=['(not\x20set)','tCsfS','stringify','parse','YzTOe','cJVQq','27860xNIkfO','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','No\x20configuration\x20set\x20for\x20\x22','BvSaQ','bhvPh',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x20=\x20','eBVeQ','settings','qIvPB','40rZlYhJ','undefined','Cleared\x20local\x20overrides\x20for\x20\x22','bYWoR','194490VIIHXZ','88tWiJbw','log','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','\x20for\x20\x22','116553dTFNus','rBgCw','TzGqV','alsoExistsElsewhere','3955798SaRmQI','length','\x22\x20not\x20found','test','Set\x20','allowInsecureLocalhost','Profile\x20\x22','kind','object','includes','649042LWoPZf','659000uJCiKU','npLbf','14hHNwJJ','\x20\x20Note:\x20\x22','PhxKJ','cloud','1098cCgaWs','735141CYLVel','Invalid\x20value\x20for\x20'];_0x16e1=function(){return _0xc1d792;};return _0x16e1();}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x57ae02){const _0x196a2a=_0xfe1c9,_0x8a34fb={'bhvPh':function(_0x15fc30,_0x383df9,_0x380694){return _0x15fc30(_0x383df9,_0x380694);},'iDnqd':function(_0x9a8e61){return _0x9a8e61();},'BvSaQ':function(_0x5b274e,_0xec4423,_0x12dd05){return _0x5b274e(_0xec4423,_0x12dd05);},'npLbf':function(_0x1db2f8,_0x1cd440){return _0x1db2f8??_0x1cd440;}},_0xb586f7=await fetchCloudProfile(_0x57ae02),_0x19ef04=_0x8a34fb[_0x196a2a(0xfe)](readProfileOverrides,_0x8a34fb['iDnqd'](getProjectPath),_0x57ae02);return _0x8a34fb[_0x196a2a(0xfd)](mergeCloudProfileSettings,_0xb586f7?.[_0x196a2a(0x102)]??{},_0x8a34fb[_0x196a2a(0x11e)](_0x19ef04,undefined));}export async function configSet(_0x342b4e,_0x3f6739,_0x676217){const _0x3e0dbb=_0xfe1c9,_0x128678={'eBVeQ':'cloud','TzGqV':function(_0x58b2b2,_0x1ed52d){return _0x58b2b2(_0x1ed52d);},'cJVQq':function(_0x3ce307){return _0x3ce307();},'Nvhou':function(_0x95b50b,_0xabe834,_0x50825b,_0x22e6f8){return _0x95b50b(_0xabe834,_0x50825b,_0x22e6f8);},'rAlBl':function(_0x3f8705,_0x34aebe,_0x3da41b){return _0x3f8705(_0x34aebe,_0x3da41b);}},_0xba5330=await resolveProfileTarget(_0x342b4e);if(_0xba5330[_0x3e0dbb(0x119)]===_0x128678[_0x3e0dbb(0x101)]){if(_0xba5330[_0x3e0dbb(0x111)])printDualExistsHint(_0x342b4e);const _0x204f13=_0x128678['TzGqV'](parseOverrideValue,_0x676217);setProfileOverride(_0x128678[_0x3e0dbb(0xf9)](getProjectPath),_0x342b4e,_0x3f6739,_0x204f13),console[_0x3e0dbb(0x10a)]('Set\x20'+_0x3f6739+'\x20=\x20'+JSON[_0x3e0dbb(0xf6)](_0x204f13)+_0x3e0dbb(0x10d)+_0x342b4e+'\x22');return;}const _0x5aa18b=await _0x128678[_0x3e0dbb(0x110)](loadSettings,_0x342b4e),_0x125d99=parseLocalValue(_0x3f6739,_0x676217);_0x128678['Nvhou'](setNestedValue,_0x5aa18b,_0x3f6739,_0x125d99),await _0x128678['rAlBl'](saveSettings,_0x342b4e,_0x5aa18b),console[_0x3e0dbb(0x10a)](_0x3e0dbb(0x116)+_0x3f6739+_0x3e0dbb(0x100)+_0x125d99+'\x20for\x20\x22'+_0x342b4e+'\x22');}export async function configGet(_0x21c9b3,_0x519ce3){const _0x26e125=_0xfe1c9,_0x45be54={'SZLrr':function(_0x5b3d5f,_0x354f20){return _0x5b3d5f===_0x354f20;},'QGStj':_0x26e125(0x11a)},_0x3b75de=await resolveProfileTarget(_0x21c9b3);if(_0x45be54['SZLrr'](_0x3b75de['kind'],'cloud')){const _0x30ea4e=await loadEffectiveCloudSettings(_0x21c9b3),_0x4c1d07=getNestedValue(_0x30ea4e,_0x519ce3);if(_0x45be54['SZLrr'](_0x4c1d07,undefined))console['log'](_0x26e125(0xf4));else typeof _0x4c1d07===_0x45be54['QGStj']?console[_0x26e125(0x10a)](JSON[_0x26e125(0xf6)](_0x4c1d07,null,0x2)):console[_0x26e125(0x10a)](_0x4c1d07);return;}const _0x55c646=await loadSettings(_0x21c9b3),_0x14b661=getNestedValue(_0x55c646,_0x519ce3);if(_0x45be54['SZLrr'](_0x14b661,undefined))console[_0x26e125(0x10a)]('(not\x20set)');else typeof _0x14b661==='object'?console[_0x26e125(0x10a)](JSON[_0x26e125(0xf6)](_0x14b661,null,0x2)):console[_0x26e125(0x10a)](_0x14b661);}export async function configList(_0x583e2d){const _0x32c243=_0xfe1c9,_0x4262df={'bFrCi':function(_0x318eb5,_0x266350){return _0x318eb5(_0x266350);},'olgZX':function(_0x2bb195,_0x5c3453){return _0x2bb195(_0x5c3453);},'KKAMA':function(_0xa035ce,_0x1ecddb){return _0xa035ce===_0x1ecddb;},'wqQil':function(_0x25b8f7,_0x5057dc){return _0x25b8f7(_0x5057dc);}},_0x3cda34=await _0x4262df['bFrCi'](resolveProfileTarget,_0x583e2d);if(_0x3cda34['kind']===_0x32c243(0x122)){const _0x582eaf=await _0x4262df['olgZX'](loadEffectiveCloudSettings,_0x583e2d);if(!_0x582eaf||_0x4262df['KKAMA'](Object['keys'](_0x582eaf)[_0x32c243(0x113)],0x0)){console[_0x32c243(0x10a)]('No\x20configuration\x20set\x20for\x20\x22'+_0x583e2d+'\x22');return;}console[_0x32c243(0x10a)](JSON['stringify'](_0x582eaf,null,0x2));return;}const _0x4200e0=getSettingsPath(_0x583e2d);if(!existsSync(_0x4200e0)){console[_0x32c243(0x10a)](_0x32c243(0xfc)+_0x583e2d+'\x22');return;}const _0x278ca7=await loadSettings(_0x583e2d),_0xf79d5=_0x4262df['wqQil'](formatSettings,_0x278ca7);!_0xf79d5?console['log'](_0x32c243(0xfc)+_0x583e2d+'\x22'):console[_0x32c243(0x10a)](_0xf79d5);}export async function configUnset(_0x29c173,_0x3d40fd){const _0x5bc41f=_0xfe1c9,_0x5ee9e7={'YzTOe':function(_0x248ead,_0x2d9a21){return _0x248ead(_0x2d9a21);},'qIvPB':function(_0x3ca3d2,_0x132e13){return _0x3ca3d2(_0x132e13);}},_0x3e36e7=await resolveProfileTarget(_0x29c173);if(_0x3e36e7[_0x5bc41f(0x119)]==='cloud'){if(_0x3e36e7[_0x5bc41f(0x111)])_0x5ee9e7[_0x5bc41f(0xf8)](printDualExistsHint,_0x29c173);const _0x2b7a0c=unsetProfileOverride(getProjectPath(),_0x29c173,_0x3d40fd);_0x2b7a0c?console[_0x5bc41f(0x10a)]('Removed\x20'+_0x3d40fd+_0x5bc41f(0x10d)+_0x29c173+'\x22'):console['log']('Key\x20\x22'+_0x3d40fd+_0x5bc41f(0x114));return;}const _0x38d000=await _0x5ee9e7[_0x5bc41f(0x103)](loadSettings,_0x29c173),_0xcffe1c=deleteNestedValue(_0x38d000,_0x3d40fd);_0xcffe1c?(await saveSettings(_0x29c173,_0x38d000),console[_0x5bc41f(0x10a)]('Removed\x20'+_0x3d40fd)):console['log']('Key\x20\x22'+_0x3d40fd+'\x22\x20not\x20found');}export async function configReset(_0x2ad5cf){const _0x46e2ef=_0xfe1c9,_0x4100af={'tCsfS':function(_0x1c9a44,_0xe214be){return _0x1c9a44(_0xe214be);},'PhxKJ':function(_0x47226e,_0x242c07){return _0x47226e===_0x242c07;},'IIGlV':'cloud'},_0x2a9edf=await _0x4100af[_0x46e2ef(0xf5)](resolveProfileTarget,_0x2ad5cf);if(_0x4100af[_0x46e2ef(0x121)](_0x2a9edf['kind'],_0x4100af['IIGlV'])){resetProfileOverrides(getProjectPath(),_0x2ad5cf),console['log'](_0x46e2ef(0x106)+_0x2ad5cf+'\x22');return;}console['log']('\x22'+_0x2ad5cf+_0x46e2ef(0x10c)+_0x2ad5cf+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
1
+ const _0x4343d1=_0x1133;(function(_0x2d65cc,_0x50e81e){const _0x1cbbb6=_0x1133,_0x58aeb2=_0x2d65cc();while(!![]){try{const _0x24b0a4=-parseInt(_0x1cbbb6(0x18c))/0x1+parseInt(_0x1cbbb6(0x191))/0x2*(parseInt(_0x1cbbb6(0x184))/0x3)+parseInt(_0x1cbbb6(0x189))/0x4+parseInt(_0x1cbbb6(0x1b1))/0x5+-parseInt(_0x1cbbb6(0x1a9))/0x6+parseInt(_0x1cbbb6(0x1a7))/0x7+-parseInt(_0x1cbbb6(0x182))/0x8*(-parseInt(_0x1cbbb6(0x1a4))/0x9);if(_0x24b0a4===_0x50e81e)break;else _0x58aeb2['push'](_0x58aeb2['shift']());}catch(_0x22ac17){_0x58aeb2['push'](_0x58aeb2['shift']());}}}(_0x11f7,0xe3468));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';function _0x1133(_0x591d76,_0x348dd9){_0x591d76=_0x591d76-0x17c;const _0x11f70d=_0x11f7();let _0x1133a=_0x11f70d[_0x591d76];return _0x1133a;}const BOOLEAN_KEYS=[_0x4343d1(0x185),'allowInsecureLocalhost'];function parseLocalValue(_0x9b7aea,_0x284634){const _0x48e0be=_0x4343d1,_0x2de147={'NZmRU':function(_0x99aeb7,_0x2a75a2){return _0x99aeb7===_0x2a75a2;}};if(BOOLEAN_KEYS[_0x48e0be(0x1b4)](_0x9b7aea)){if(_0x2de147[_0x48e0be(0x1aa)](_0x284634,'true'))return!![];if(_0x284634==='false')return![];throw new Error(_0x48e0be(0x196)+_0x9b7aea+_0x48e0be(0x1a2));}return _0x284634;}function parseOverrideValue(_0x19257e){const _0x5c3c4e=_0x4343d1,_0x8fd4b2={'FfVzR':function(_0x1bde8f,_0x39bafb){return _0x1bde8f===_0x39bafb;},'yQuXL':_0x5c3c4e(0x1ab),'DZvXw':'false','PkQKK':'null','FIdLZ':function(_0xbcc118,_0x9bf43){return _0xbcc118(_0x9bf43);}};if(_0x8fd4b2['FfVzR'](_0x19257e,_0x8fd4b2['yQuXL']))return!![];if(_0x8fd4b2[_0x5c3c4e(0x199)](_0x19257e,_0x8fd4b2['DZvXw']))return![];if(_0x19257e===_0x8fd4b2['PkQKK'])return null;if(_0x19257e==='undefined')return undefined;if(/^-?\d+$/['test'](_0x19257e)){const _0x4275d5=_0x8fd4b2['FIdLZ'](Number,_0x19257e);if(Number['isSafeInteger'](_0x4275d5))return _0x4275d5;}if(/^-?\d+\.\d+$/['test'](_0x19257e)){const _0x446861=Number(_0x19257e);if(!Number[_0x5c3c4e(0x1b0)](_0x446861))return _0x446861;}const _0x22bfa4=_0x19257e['trim']();if(_0x22bfa4[_0x5c3c4e(0x1ad)]('{')&&_0x22bfa4['endsWith']('}')||_0x22bfa4['startsWith']('[')&&_0x22bfa4['endsWith'](']'))try{return JSON[_0x5c3c4e(0x19a)](_0x22bfa4);}catch{}return _0x19257e;}async function resolveProfileTarget(_0x9dcee3){const _0xec17eb=_0x4343d1,_0x142d73={'rLMrQ':function(_0x1a8019,_0x245e7d){return _0x1a8019(_0x245e7d);},'mFura':function(_0x4cf18f,_0x484789){return _0x4cf18f(_0x484789);},'XoEAl':'cloud','Lleey':_0xec17eb(0x17f)},_0x256d82=_0x142d73['rLMrQ'](existsSync,getEnvDir(_0x9dcee3));let _0x350a5e=![];try{const _0x5afb4b=await _0x142d73['mFura'](fetchCloudProfile,_0x9dcee3);_0x350a5e=Boolean(_0x5afb4b);}catch{}if(_0x350a5e)return{'kind':_0x142d73[_0xec17eb(0x17c)],'alsoExistsElsewhere':_0x256d82};if(_0x256d82)return{'kind':_0x142d73['Lleey'],'alsoExistsElsewhere':![]};throw new Error(_0xec17eb(0x1b2)+_0x9dcee3+_0xec17eb(0x19f)+_0x9dcee3);}function printDualExistsHint(_0x548fd8){console['log']('\x20\x20Note:\x20\x22'+_0x548fd8+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x28e590=_0x4343d1;return process[_0x28e590(0x18a)]();}async function loadEffectiveCloudSettings(_0x5f1971){const _0x466607=_0x4343d1,_0x4deed4={'aCJVh':function(_0x39ea3c,_0x37c382){return _0x39ea3c(_0x37c382);},'rwtep':function(_0xeb9ebd){return _0xeb9ebd();}},_0x189cde=await _0x4deed4[_0x466607(0x1a3)](fetchCloudProfile,_0x5f1971),_0x3adf44=readProfileOverrides(_0x4deed4[_0x466607(0x18d)](getProjectPath),_0x5f1971);return mergeCloudProfileSettings(_0x189cde?.[_0x466607(0x17d)]??{},_0x3adf44??undefined);}export async function configSet(_0xbb5401,_0x8acc0e,_0x474cbe){const _0x4468e3=_0x4343d1,_0x26ad8f={'YTiKJ':function(_0x26adf5,_0x1a5973){return _0x26adf5(_0x1a5973);},'lZHWw':'cloud','wNsBN':function(_0x1eb63a){return _0x1eb63a();}},_0x26c953=await _0x26ad8f[_0x4468e3(0x1a0)](resolveProfileTarget,_0xbb5401);if(_0x26c953[_0x4468e3(0x1b3)]===_0x26ad8f[_0x4468e3(0x188)]){if(_0x26c953[_0x4468e3(0x194)])printDualExistsHint(_0xbb5401);const _0x5cf888=_0x26ad8f['YTiKJ'](parseOverrideValue,_0x474cbe);setProfileOverride(_0x26ad8f['wNsBN'](getProjectPath),_0xbb5401,_0x8acc0e,_0x5cf888),console['log'](_0x4468e3(0x193)+_0x8acc0e+_0x4468e3(0x1a8)+JSON[_0x4468e3(0x18e)](_0x5cf888)+'\x20for\x20\x22'+_0xbb5401+'\x22');return;}const _0x265f78=parseLocalValue(_0x8acc0e,_0x474cbe);setProfileOverride(getProjectPath(),_0xbb5401,_0x8acc0e,_0x265f78),console[_0x4468e3(0x187)]('Set\x20'+_0x8acc0e+'\x20=\x20'+_0x265f78+'\x20for\x20\x22'+_0xbb5401+'\x22');}export async function configGet(_0x3e9b93,_0x25e93e){const _0x1924fa=_0x4343d1,_0xb754a3={'PyenQ':function(_0x33ccee,_0x57ebee){return _0x33ccee(_0x57ebee);},'UxUuf':function(_0x4088f4,_0xccdd50){return _0x4088f4===_0xccdd50;},'FfCbw':_0x1924fa(0x1af)},_0x28ae44=await _0xb754a3[_0x1924fa(0x186)](resolveProfileTarget,_0x3e9b93);if(_0x28ae44[_0x1924fa(0x1b3)]===_0x1924fa(0x18f)){const _0x14d12f=await _0xb754a3['PyenQ'](loadEffectiveCloudSettings,_0x3e9b93),_0x574261=getNestedValue(_0x14d12f,_0x25e93e);if(_0x574261===undefined)console[_0x1924fa(0x187)](_0x1924fa(0x19c));else _0xb754a3['UxUuf'](typeof _0x574261,_0x1924fa(0x1af))?console['log'](JSON['stringify'](_0x574261,null,0x2)):console['log'](_0x574261);return;}const _0x5b30cc=await loadSettings(_0x3e9b93),_0x32107d=getNestedValue(_0x5b30cc,_0x25e93e);if(_0x32107d===undefined)console['log'](_0x1924fa(0x19c));else _0xb754a3['UxUuf'](typeof _0x32107d,_0xb754a3[_0x1924fa(0x19b)])?console['log'](JSON[_0x1924fa(0x18e)](_0x32107d,null,0x2)):console['log'](_0x32107d);}function _0x11f7(){const _0x2539fc=['aCJVh','9okIDSo','Removed\x20','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','3084599BDZHPP','\x20=\x20','10738098sFrptV','NZmRU','true','bhroy','startsWith','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','object','isNaN','450425AZzeVA','Profile\x20\x22','kind','includes','XoEAl','settings','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','local','xXWBc','length','14622536ucMHFj','No\x20configuration\x20set\x20for\x20\x22','87mddoYd','headless','PyenQ','log','lZHWw','2517820YYfUdr','cwd','Key\x20\x22','1744207PPkdyb','rwtep','stringify','cloud','nsgIC','101848KCGNpB','FRvFx','Set\x20','alsoExistsElsewhere','Cleared\x20local\x20overrides\x20for\x20\x22','Invalid\x20value\x20for\x20','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','RMBJB','FfVzR','parse','FfCbw','(not\x20set)','\x20for\x20\x22','amaXa','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','YTiKJ','ywRPV',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22'];_0x11f7=function(){return _0x2539fc;};return _0x11f7();}export async function configList(_0x271b9b){const _0x59c964=_0x4343d1,_0x1e67a5={'awBpr':'cloud','FofSs':function(_0x2112a8,_0x1746be){return _0x2112a8(_0x1746be);},'ucwBS':function(_0x36ac0a,_0x3c742e){return _0x36ac0a===_0x3c742e;},'mqeWd':function(_0x37d547,_0x119ca5){return _0x37d547(_0x119ca5);},'FEqdf':function(_0x2da2d8,_0xffb351){return _0x2da2d8(_0xffb351);}},_0x341ffb=await resolveProfileTarget(_0x271b9b);if(_0x341ffb['kind']===_0x1e67a5['awBpr']){const _0x424003=await _0x1e67a5['FofSs'](loadEffectiveCloudSettings,_0x271b9b);if(!_0x424003||_0x1e67a5['ucwBS'](Object['keys'](_0x424003)[_0x59c964(0x181)],0x0)){console['log'](_0x59c964(0x183)+_0x271b9b+'\x22');return;}console['log'](JSON[_0x59c964(0x18e)](_0x424003,null,0x2));return;}const _0x5c3174=_0x1e67a5['mqeWd'](getSettingsPath,_0x271b9b);if(!_0x1e67a5['FEqdf'](existsSync,_0x5c3174)){console[_0x59c964(0x187)](_0x59c964(0x183)+_0x271b9b+'\x22');return;}const _0x397dd3=await loadSettings(_0x271b9b),_0x4fba46=formatSettings(_0x397dd3);!_0x4fba46?console[_0x59c964(0x187)](_0x59c964(0x183)+_0x271b9b+'\x22'):console[_0x59c964(0x187)](_0x4fba46);}export async function configUnset(_0x27ca5d,_0x41ea05){const _0x3d2561=_0x4343d1,_0x32ac3a={'FRvFx':function(_0xd7aaaa,_0x34cd9c){return _0xd7aaaa(_0x34cd9c);},'amaXa':_0x3d2561(0x18f),'ywRPV':function(_0x931acf,_0x2815e7,_0x4cf2a6,_0x44e157){return _0x931acf(_0x2815e7,_0x4cf2a6,_0x44e157);},'nsgIC':function(_0x4d42f3,_0xa5b83d,_0x10c252,_0x578447){return _0x4d42f3(_0xa5b83d,_0x10c252,_0x578447);},'QMLFK':function(_0x17088e,_0x455f04,_0x394843){return _0x17088e(_0x455f04,_0x394843);}},_0x4d6f73=await _0x32ac3a[_0x3d2561(0x192)](resolveProfileTarget,_0x27ca5d);if(_0x4d6f73['kind']===_0x32ac3a[_0x3d2561(0x19e)]){if(_0x4d6f73[_0x3d2561(0x194)])printDualExistsHint(_0x27ca5d);const _0x450249=_0x32ac3a[_0x3d2561(0x1a1)](unsetProfileOverride,getProjectPath(),_0x27ca5d,_0x41ea05);_0x450249?console[_0x3d2561(0x187)](_0x3d2561(0x1a5)+_0x41ea05+_0x3d2561(0x19d)+_0x27ca5d+'\x22'):console['log']('Key\x20\x22'+_0x41ea05+'\x22\x20not\x20found');return;}const _0x10fec0=_0x32ac3a[_0x3d2561(0x190)](unsetProfileOverride,getProjectPath(),_0x27ca5d,_0x41ea05);if(_0x10fec0){console['log']('Removed\x20'+_0x41ea05);return;}const _0x5af632=await loadSettings(_0x27ca5d),_0x3c9443=_0x32ac3a['QMLFK'](deleteNestedValue,_0x5af632,_0x41ea05);_0x3c9443?console['log'](_0x3d2561(0x18b)+_0x41ea05+_0x3d2561(0x17e)+_0x27ca5d+_0x3d2561(0x1a6)):console[_0x3d2561(0x187)]('Key\x20\x22'+_0x41ea05+'\x22\x20not\x20found');}export async function configReset(_0x373c51){const _0x4ca736=_0x4343d1,_0x1d6eab={'xXWBc':function(_0xad427a,_0x35661c){return _0xad427a(_0x35661c);},'RMBJB':_0x4ca736(0x18f),'bhroy':function(_0x717b89,_0x101d35,_0x28dcb2){return _0x717b89(_0x101d35,_0x28dcb2);}},_0x157e45=await _0x1d6eab[_0x4ca736(0x180)](resolveProfileTarget,_0x373c51);if(_0x157e45[_0x4ca736(0x1b3)]===_0x1d6eab[_0x4ca736(0x198)]){_0x1d6eab[_0x4ca736(0x1ac)](resetProfileOverrides,getProjectPath(),_0x373c51),console['log'](_0x4ca736(0x195)+_0x373c51+'\x22');return;}console['log']('\x22'+_0x373c51+_0x4ca736(0x197)+_0x373c51+_0x4ca736(0x1ae));}
@@ -1 +1 @@
1
- const _0xd10e3d=_0x4534;(function(_0x5e406b,_0x2d2379){const _0x2d028e=_0x4534,_0x4c7c3e=_0x5e406b();while(!![]){try{const _0x34070e=-parseInt(_0x2d028e(0x19e))/0x1*(parseInt(_0x2d028e(0x1a2))/0x2)+-parseInt(_0x2d028e(0x1a6))/0x3+-parseInt(_0x2d028e(0x1b0))/0x4*(parseInt(_0x2d028e(0x1ac))/0x5)+parseInt(_0x2d028e(0x1a1))/0x6+parseInt(_0x2d028e(0x1a8))/0x7*(parseInt(_0x2d028e(0x1ae))/0x8)+parseInt(_0x2d028e(0x1a4))/0x9*(parseInt(_0x2d028e(0x1a5))/0xa)+parseInt(_0x2d028e(0x1c1))/0xb;if(_0x34070e===_0x2d2379)break;else _0x4c7c3e['push'](_0x4c7c3e['shift']());}catch(_0x11afd7){_0x4c7c3e['push'](_0x4c7c3e['shift']());}}}(_0x1fab,0x5893a));import{readdir,stat}from'fs/promises';function _0x4534(_0x9e75a8,_0x3535f3){_0x9e75a8=_0x9e75a8-0x19b;const _0x1fab0d=_0x1fab();let _0x4534a0=_0x1fab0d[_0x9e75a8];return _0x4534a0;}import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';function _0x1fab(){const _0x318167=['CDWGS','.txt','settings.json','sessions','localeCompare','has','\x20\x20\x20\x20\x20\x20Session:\x20','\x20\x20\x20\x20\x20\x20Details:\x20','IDTOy','sessionUpdatedAt','name','13051863CVLofG','QFmos','environmentDetails','push','29fjlrQk','length','CPHCt','1122876QnkQwb','33414jYoPgF','\x0a*\x20=\x20active\x20profile','9RvbNvp','3974330SVzdkC','1349418BVWtxi','local','216517OlOiaI','sort','includes','map','5chxmrB','quoRg','24IqYzQv','isDirectory','2267144sjzGur','\x20[cloud]','startsWith','environmentKey','endsWith','log'];_0x1fab=function(){return _0x318167;};return _0x1fab();}import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0xd10e3d(0x1b9),'bug-bashes','reports',_0xd10e3d(0x1a7),'ci'];export async function getEnvNames(){const _0x22b085=_0xd10e3d,_0x20af88={'uMKwa':function(_0x5d86d4){return _0x5d86d4();},'pLsgl':function(_0x5e00f7,_0x59f16a,_0x29c31e){return _0x5e00f7(_0x59f16a,_0x29c31e);},'mipRM':function(_0x43244b,_0x2e4cca){return _0x43244b(_0x2e4cca);},'quoRg':function(_0x43ce41,_0x867ab5){return _0x43ce41(_0x867ab5);},'IDTOy':function(_0x28b033,_0x52e75a){return _0x28b033(_0x52e75a);},'zCcZb':function(_0x501f03,_0x4a99f0){return _0x501f03(_0x4a99f0);},'CPHCt':function(_0x5af94f,_0x918d13){return _0x5af94f(_0x918d13);},'CDWGS':function(_0x2f52d1,_0x4aca93){return _0x2f52d1(_0x4aca93);},'mGHwH':'legacy'},_0x4549b9=_0x20af88['uMKwa'](getRangerDir);if(!existsSync(_0x4549b9))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x17041a=await readActiveProfileName(),_0x40abdc=[],_0x3d0964={},_0x21f42b=_0x20af88['pLsgl'](join,_0x4549b9,'local');if(_0x20af88['mipRM'](existsSync,_0x21f42b)){const _0x4e3f84=await _0x20af88['quoRg'](readdir,_0x21f42b);for(const _0x1400b2 of _0x4e3f84){const _0xf0ad5e=join(_0x21f42b,_0x1400b2),_0x56c9c3=await _0x20af88[_0x22b085(0x1ad)](stat,_0xf0ad5e);_0x56c9c3[_0x22b085(0x1af)]()&&(_0x40abdc[_0x22b085(0x19d)](_0x1400b2),_0x3d0964[_0x1400b2]=_0x22b085(0x1a7));}}const _0x500b4c=join(_0x4549b9,'ci');if(_0x20af88['IDTOy'](existsSync,_0x500b4c)){const _0x28663d=await _0x20af88['IDTOy'](readdir,_0x500b4c);for(const _0x497495 of _0x28663d){const _0x376831=_0x20af88['pLsgl'](join,_0x500b4c,_0x497495),_0x402db0=await _0x20af88['zCcZb'](stat,_0x376831);_0x402db0[_0x22b085(0x1af)]()&&(_0x40abdc['push'](_0x497495),_0x3d0964[_0x497495]='ci');}}const _0x361234=await _0x20af88[_0x22b085(0x1a0)](readdir,_0x4549b9);for(const _0xc72163 of _0x361234){if(NON_ENV_DIRS[_0x22b085(0x1aa)](_0xc72163))continue;if(_0xc72163[_0x22b085(0x1b2)]('.'))continue;if(_0xc72163[_0x22b085(0x1b4)](_0x22b085(0x1b7)))continue;const _0x218abc=_0x20af88['pLsgl'](join,_0x4549b9,_0xc72163),_0x5362da=await _0x20af88[_0x22b085(0x1be)](stat,_0x218abc);_0x5362da[_0x22b085(0x1af)]()&&_0x20af88[_0x22b085(0x1b6)](existsSync,_0x20af88['pLsgl'](join,_0x218abc,_0x22b085(0x1b8)))&&(!_0x40abdc['includes'](_0xc72163)&&(_0x40abdc[_0x22b085(0x19d)](_0xc72163),_0x3d0964[_0xc72163]=_0x20af88['mGHwH']));}return{'envNames':_0x40abdc,'activeEnv':_0x17041a,'envTypes':_0x3d0964};}export async function envList(){const _0x14cdbf=_0xd10e3d,_0x3e4cb8={'kgqYK':function(_0x40d1bf,_0x416027){return _0x40d1bf===_0x416027;},'fOZRk':'\x0aNo\x20profiles\x20found.','GrEmC':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','UMbME':'\x0aLocal\x20Profiles:','dNBLa':function(_0x4ee1e7,_0x12709a){return _0x4ee1e7>_0x12709a;},'QFmos':'\x0aCloud\x20Profiles:','ZSMCn':'no\x20session'},{envNames:_0x47ad71,activeEnv:_0x56d66b,envTypes:_0x39c349}=await getEnvNames();let _0x654b8e=[];try{_0x654b8e=await listCloudProfiles();}catch{}if(_0x3e4cb8['kgqYK'](_0x47ad71[_0x14cdbf(0x19f)],0x0)&&_0x654b8e[_0x14cdbf(0x19f)]===0x0){console['log'](_0x3e4cb8['fOZRk']),console['log'](_0x3e4cb8['GrEmC']);return;}const _0x14b988=new Set(_0x654b8e[_0x14cdbf(0x1ab)](_0x452ed7=>_0x452ed7['name']));if(_0x47ad71[_0x14cdbf(0x19f)]>0x0){console[_0x14cdbf(0x1b5)](_0x3e4cb8['UMbME']);for(const _0x11f6d4 of _0x47ad71['sort']()){const _0x4543e8=_0x11f6d4===_0x56d66b&&!_0x14b988[_0x14cdbf(0x1bb)](_0x11f6d4),_0x28ef23=_0x39c349[_0x11f6d4]||'local',_0x253fb9=await loadSettings(_0x11f6d4),_0x2956fb=_0x28ef23==='legacy'?'':'\x20['+_0x28ef23+']';console[_0x14cdbf(0x1b5)]('\x20\x20'+(_0x4543e8?'*\x20':'\x20\x20')+_0x11f6d4+_0x2956fb),_0x253fb9['baseUrl']&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x253fb9['baseUrl']),_0x253fb9[_0x14cdbf(0x19c)]&&console[_0x14cdbf(0x1b5)](_0x14cdbf(0x1bd)+_0x253fb9['environmentDetails']);}}if(_0x3e4cb8['dNBLa'](_0x654b8e['length'],0x0)){console['log'](_0x3e4cb8[_0x14cdbf(0x19b)]);for(const _0x46e8c6 of _0x654b8e[_0x14cdbf(0x1a9)]((_0x20c521,_0x9eebf8)=>_0x20c521[_0x14cdbf(0x1c0)][_0x14cdbf(0x1ba)](_0x9eebf8[_0x14cdbf(0x1c0)]))){const _0x1d7c88=_0x3e4cb8['kgqYK'](_0x46e8c6[_0x14cdbf(0x1c0)],_0x56d66b),_0x5f9166=_0x46e8c6['environmentKey']?'\x20('+_0x46e8c6[_0x14cdbf(0x1b3)]+')':'',_0x5a7642=_0x46e8c6['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x46e8c6[_0x14cdbf(0x1bf)]+')':_0x3e4cb8['ZSMCn'];console['log']('\x20\x20'+(_0x1d7c88?'*\x20':'\x20\x20')+_0x46e8c6[_0x14cdbf(0x1c0)]+_0x14cdbf(0x1b1)+_0x5f9166),console['log'](_0x14cdbf(0x1bc)+_0x5a7642);}}_0x56d66b&&console[_0x14cdbf(0x1b5)](_0x14cdbf(0x1a3));}
1
+ const _0x4cb18e=_0x42d8;function _0x42d8(_0x4ef2a0,_0x31d99d){_0x4ef2a0=_0x4ef2a0-0x1c7;const _0x11b954=_0x11b9();let _0x42d8d6=_0x11b954[_0x4ef2a0];return _0x42d8d6;}(function(_0xdb812d,_0x1a3a51){const _0x110464=_0x42d8,_0x355d26=_0xdb812d();while(!![]){try{const _0x1fd3cd=-parseInt(_0x110464(0x1df))/0x1*(parseInt(_0x110464(0x1d5))/0x2)+-parseInt(_0x110464(0x1ca))/0x3+-parseInt(_0x110464(0x1ed))/0x4+-parseInt(_0x110464(0x1d6))/0x5+-parseInt(_0x110464(0x1e2))/0x6+-parseInt(_0x110464(0x1e9))/0x7+parseInt(_0x110464(0x1dd))/0x8;if(_0x1fd3cd===_0x1a3a51)break;else _0x355d26['push'](_0x355d26['shift']());}catch(_0x521b3e){_0x355d26['push'](_0x355d26['shift']());}}}(_0x11b9,0xb7b87));import{readdir,stat}from'fs/promises';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';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x4cb18e(0x1ea),'bug-bashes',_0x4cb18e(0x1d9),'local','ci'];export async function getEnvNames(){const _0x4245e7=_0x4cb18e,_0x30ca03={'tTGyy':function(_0x5d5b0d){return _0x5d5b0d();},'KyRCU':function(_0x4d5070,_0x242277,_0x25f044){return _0x4d5070(_0x242277,_0x25f044);},'ucMIE':_0x4245e7(0x1e0),'uvztj':function(_0x20453a,_0x4176be){return _0x20453a(_0x4176be);},'PZdCr':function(_0x4b17c5,_0x1a81a4){return _0x4b17c5(_0x1a81a4);},'JkOhV':function(_0xa44b14,_0x788fe3){return _0xa44b14(_0x788fe3);},'vRbab':function(_0x3c66ea,_0x12b33b){return _0x3c66ea(_0x12b33b);},'tTKsD':function(_0x1df6c0,_0x5715ca,_0x2088d8){return _0x1df6c0(_0x5715ca,_0x2088d8);},'HuNxo':'legacy'},_0x10556f=_0x30ca03[_0x4245e7(0x1de)](getRangerDir);if(!existsSync(_0x10556f))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x1b194d=await readActiveProfileName(),_0x278b73=[],_0x27b672={},_0x4b8220=_0x30ca03[_0x4245e7(0x1ce)](join,_0x10556f,_0x30ca03['ucMIE']);if(existsSync(_0x4b8220)){const _0x2c0f2f=await readdir(_0x4b8220);for(const _0x5e4e39 of _0x2c0f2f){const _0x1f4128=join(_0x4b8220,_0x5e4e39),_0x5b5d85=await _0x30ca03['uvztj'](stat,_0x1f4128);_0x5b5d85[_0x4245e7(0x1c9)]()&&(_0x278b73[_0x4245e7(0x1e5)](_0x5e4e39),_0x27b672[_0x5e4e39]=_0x30ca03['ucMIE']);}}const _0x2faca5=join(_0x10556f,'ci');if(_0x30ca03[_0x4245e7(0x1c8)](existsSync,_0x2faca5)){const _0x5afeb3=await _0x30ca03['JkOhV'](readdir,_0x2faca5);for(const _0x41bf81 of _0x5afeb3){const _0x91edec=_0x30ca03[_0x4245e7(0x1ce)](join,_0x2faca5,_0x41bf81),_0xf063e1=await _0x30ca03[_0x4245e7(0x1d3)](stat,_0x91edec);_0xf063e1['isDirectory']()&&(_0x278b73['push'](_0x41bf81),_0x27b672[_0x41bf81]='ci');}}const _0x548977=await readdir(_0x10556f);for(const _0x386432 of _0x548977){if(NON_ENV_DIRS['includes'](_0x386432))continue;if(_0x386432[_0x4245e7(0x1e3)]('.'))continue;if(_0x386432['endsWith'](_0x4245e7(0x1eb)))continue;const _0x32bfe6=join(_0x10556f,_0x386432),_0xf454ae=await _0x30ca03[_0x4245e7(0x1d3)](stat,_0x32bfe6);_0xf454ae['isDirectory']()&&_0x30ca03['vRbab'](existsSync,_0x30ca03['tTKsD'](join,_0x32bfe6,'settings.json'))&&(!_0x278b73['includes'](_0x386432)&&(_0x278b73['push'](_0x386432),_0x27b672[_0x386432]=_0x30ca03['HuNxo']));}return{'envNames':_0x278b73,'activeEnv':_0x1b194d,'envTypes':_0x27b672};}export async function envList(){const _0x4904de=_0x4cb18e,_0x704380={'Omkly':function(_0x25e000){return _0x25e000();},'YJxMH':function(_0xc3ba0c,_0x469aca){return _0xc3ba0c===_0x469aca;},'bywcp':_0x4904de(0x1cb),'TJBLC':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','oksNx':function(_0x3e2381,_0x391b07){return _0x3e2381>_0x391b07;},'CHhpe':'local','zCeCB':function(_0x28bbbd,_0x3c3e8e){return _0x28bbbd(_0x3c3e8e);},'hSuhI':'legacy','HAnLl':'\x0aCloud\x20Profiles:','HeQGS':function(_0x2a2f7a,_0x5edd86){return _0x2a2f7a===_0x5edd86;},'xdOvu':'no\x20session'},{envNames:_0x3192b9,activeEnv:_0x2397fd,envTypes:_0x383c3e}=await _0x704380[_0x4904de(0x1c7)](getEnvNames);let _0x53cbc2=[];try{_0x53cbc2=await _0x704380['Omkly'](listCloudProfiles);}catch{}if(_0x3192b9['length']===0x0&&_0x704380['YJxMH'](_0x53cbc2['length'],0x0)){console[_0x4904de(0x1db)](_0x704380[_0x4904de(0x1d4)]),console[_0x4904de(0x1db)](_0x704380['TJBLC']);return;}const _0x47c9a8=new Set(_0x53cbc2[_0x4904de(0x1d7)](_0x4a0575=>_0x4a0575[_0x4904de(0x1e8)]));if(_0x704380['oksNx'](_0x3192b9['length'],0x0)){console[_0x4904de(0x1db)](_0x4904de(0x1e4));for(const _0x32dd19 of _0x3192b9['sort']()){const _0x4cb202=_0x32dd19===_0x2397fd&&!_0x47c9a8[_0x4904de(0x1d0)](_0x32dd19),_0x3f3212=_0x383c3e[_0x32dd19]||_0x704380['CHhpe'],_0x5741a4=await _0x704380['zCeCB'](loadSettings,_0x32dd19),_0x5f17de=_0x3f3212===_0x704380['hSuhI']?'':'\x20['+_0x3f3212+']';console[_0x4904de(0x1db)]('\x20\x20'+(_0x4cb202?'*\x20':'\x20\x20')+_0x32dd19+_0x5f17de),_0x5741a4['baseUrl']&&console['log'](_0x4904de(0x1da)+_0x5741a4[_0x4904de(0x1cd)]),_0x5741a4['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x5741a4[_0x4904de(0x1e1)]);}}if(_0x53cbc2['length']>0x0){console['log'](_0x704380[_0x4904de(0x1e7)]);for(const _0x9541da of _0x53cbc2[_0x4904de(0x1cf)]((_0x264f64,_0x40e63c)=>_0x264f64[_0x4904de(0x1e8)][_0x4904de(0x1dc)](_0x40e63c[_0x4904de(0x1e8)]))){const _0x4f517b=_0x704380[_0x4904de(0x1d2)](_0x9541da[_0x4904de(0x1e8)],_0x2397fd),_0x5a9972=_0x9541da[_0x4904de(0x1d1)]?'\x20('+_0x9541da[_0x4904de(0x1d1)]+')':'',_0x329dc8=_0x9541da['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x9541da[_0x4904de(0x1cc)]+')':_0x704380[_0x4904de(0x1e6)];console[_0x4904de(0x1db)]('\x20\x20'+(_0x4f517b?'*\x20':'\x20\x20')+_0x9541da['name']+_0x4904de(0x1d8)+_0x5a9972),console[_0x4904de(0x1db)](_0x4904de(0x1ec)+_0x329dc8);}}_0x2397fd&&console[_0x4904de(0x1db)]('\x0a*\x20=\x20active\x20profile');}function _0x11b9(){const _0x2bb4fb=['log','localeCompare','47960040JQlVZL','tTGyy','45463ZVcsXQ','local','environmentDetails','5664540inikwy','startsWith','\x0aLocal\x20Profiles\x20(legacy):','push','xdOvu','HAnLl','name','6326460DekgwC','sessions','.txt','\x20\x20\x20\x20\x20\x20Session:\x20','327732ZaisJz','Omkly','PZdCr','isDirectory','4114164JLrevI','\x0aNo\x20profiles\x20found.','sessionUpdatedAt','baseUrl','KyRCU','sort','has','environmentKey','HeQGS','vRbab','bywcp','38yWEyQA','5387490rANJww','map','\x20[cloud]','reports','\x20\x20\x20\x20\x20\x20URL:\x20'];_0x11b9=function(){return _0x2bb4fb;};return _0x11b9();}
@@ -1 +1 @@
1
- const _0x3dcc19=_0x131a;(function(_0x34a7d3,_0x4f5350){const _0x2cae36=_0x131a,_0x189997=_0x34a7d3();while(!![]){try{const _0x534088=parseInt(_0x2cae36(0xf5))/0x1+-parseInt(_0x2cae36(0x1a5))/0x2+parseInt(_0x2cae36(0x176))/0x3+-parseInt(_0x2cae36(0xe0))/0x4+parseInt(_0x2cae36(0xf9))/0x5*(-parseInt(_0x2cae36(0x18a))/0x6)+-parseInt(_0x2cae36(0x14c))/0x7+parseInt(_0x2cae36(0xf1))/0x8;if(_0x534088===_0x4f5350)break;else _0x189997['push'](_0x189997['shift']());}catch(_0x531435){_0x189997['push'](_0x189997['shift']());}}}(_0xa8e7,0x24b58));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x3700c3 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='active-feature.txt',bold=_0x4153a6=>'\x1b[1m'+_0x4153a6+_0x3dcc19(0x115);function getGitRepoUrl(){const _0x1e71bf=_0x3dcc19,_0x55647c={'noJCk':_0x1e71bf(0x19f),'LAMgy':'pipe','btcMq':_0x1e71bf(0x119)};try{const _0x282b1e=execSync(_0x55647c['noJCk'],{'encoding':_0x1e71bf(0x168),'stdio':[_0x55647c['LAMgy'],_0x55647c[_0x1e71bf(0xc7)],'pipe']})[_0x1e71bf(0x11f)]();return _0x282b1e[_0x1e71bf(0x138)](/\.git$/,'')[_0x1e71bf(0x138)](/^git@github\.com:/,_0x55647c[_0x1e71bf(0xec)])[_0x1e71bf(0x138)](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x8db22a=_0x3dcc19,_0x5b28d1={'drWQm':function(_0x3e743c,_0x30ae10,_0x20514a){return _0x3e743c(_0x30ae10,_0x20514a);},'dNrUD':_0x8db22a(0x168),'EHyar':_0x8db22a(0x13b)};try{return _0x5b28d1['drWQm'](execSync,_0x8db22a(0x15c),{'encoding':_0x5b28d1[_0x8db22a(0x16d)],'stdio':[_0x5b28d1[_0x8db22a(0x10e)],_0x5b28d1[_0x8db22a(0x10e)],'pipe']})[_0x8db22a(0x11f)]();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x19456b=_0x3dcc19,_0x4122d9={'vxjqe':function(_0x217d03,_0x44c93d,_0x6eede8){return _0x217d03(_0x44c93d,_0x6eede8);}},_0x42f89d=_0x4122d9['vxjqe'](join,getRangerDir(),ACTIVE_FEATURE_FILE);if(!existsSync(_0x42f89d))return null;try{const _0x1d28bd=await readFile(_0x42f89d,_0x19456b(0x168));return _0x1d28bd[_0x19456b(0x11f)]()||null;}catch{return null;}}async function setActiveFeatureId(_0xcd7509){const _0x39cd6a={'jhign':function(_0x1a55aa,_0x11cb68){return _0x1a55aa(_0x11cb68);},'ZdrfO':'utf-8'},_0x28c5fb=getRangerDir(),_0x1e2f39=join(_0x28c5fb,ACTIVE_FEATURE_FILE);!_0x39cd6a['jhign'](existsSync,_0x28c5fb)&&await mkdir(_0x28c5fb,{'recursive':!![]}),await writeFile(_0x1e2f39,_0xcd7509,_0x39cd6a['ZdrfO']);}function getProgressDisplay(_0x4eeb7f){const _0x3b746d=_0x3dcc19,_0x9a20f={'QksJy':function(_0x3b1f41,_0x465f46){return _0x3b1f41===_0x465f46;},'JmvUw':function(_0x5223ce,_0x23faf5){return _0x5223ce*_0x23faf5;},'zQpKI':function(_0x4d9e9e,_0x9c85c2){return _0x4d9e9e/_0x9c85c2;},'LsfRi':function(_0x38537c,_0x3d1093){return _0x38537c+_0x3d1093;},'pMSDg':function(_0x2d07cc,_0x260071){return _0x2d07cc-_0x260071;},'DPfAE':function(_0x3be334,_0xbbc4be){return _0x3be334>_0xbbc4be;},'lRCgt':function(_0xb0aecc,_0x23e887){return _0xb0aecc>_0x23e887;}},_0x2d5cbb=_0x4eeb7f[_0x3b746d(0x133)]||0x0,_0x3ffe3f=_0x4eeb7f[_0x3b746d(0x199)]||0x0,_0x7ca17e=_0x4eeb7f['blockedItems']||0x0,_0x4e4849=_0x4eeb7f['incompleteItems']||0x0,_0x309952=_0x4eeb7f['pendingItems']||0x0,_0x81e7e=_0x2d5cbb+_0x3ffe3f+_0x7ca17e+_0x4e4849+_0x309952;if(_0x9a20f[_0x3b746d(0x143)](_0x81e7e,0x0))return'-';const _0x47be35=0xa,_0xb40333=Math['round'](_0x9a20f['JmvUw'](_0x9a20f['zQpKI'](_0x2d5cbb,_0x81e7e),_0x47be35)),_0x4eff1a=_0x9a20f['LsfRi']('█'[_0x3b746d(0x179)](_0xb40333),'░'[_0x3b746d(0x179)](_0x9a20f['pMSDg'](_0x47be35,_0xb40333))),_0x4bd112=[];if(_0x7ca17e>0x0)_0x4bd112['push'](_0x7ca17e+'\x20blocked');if(_0x4e4849>0x0)_0x4bd112['push'](_0x4e4849+_0x3b746d(0x163));if(_0x9a20f['DPfAE'](_0x3ffe3f,0x0))_0x4bd112[_0x3b746d(0xd0)](_0x3ffe3f+'\x20in\x20progress');const _0x4f50de=_0x9a20f[_0x3b746d(0x16c)](_0x4bd112[_0x3b746d(0xdb)],0x0)?'\x20('+_0x4bd112['join'](',\x20')+')':'';return _0x4eff1a+'\x20'+_0x2d5cbb+'/'+_0x81e7e+'\x20verified'+_0x4f50de;}function getCurrentSessionItems(_0x3e2afc,_0x17dd76){const _0x3b8329=_0x3dcc19;if(!_0x3e2afc[_0x3b8329(0xe1)])return _0x17dd76['filter'](_0x33122b=>!_0x33122b['sessionId']);return _0x17dd76['filter'](_0x43c3ab=>_0x43c3ab[_0x3b8329(0x18b)]===_0x3e2afc['currentSessionId']||!_0x43c3ab[_0x3b8329(0x18b)]);}function displayFeature(_0x328913,_0x4d5c9d){const _0x1a7713=_0x3dcc19,_0x401644={'DBQcb':_0x1a7713(0x17f),'cAtqN':function(_0x3659af,_0x650f84){return _0x3659af===_0x650f84;},'grSaC':_0x1a7713(0xfb),'pHdAn':'verified','tLBdG':_0x1a7713(0x13d),'oWtlu':function(_0x2e7812,_0x5aaa3e){return _0x2e7812===_0x5aaa3e;},'VTqxV':'verification_in_progress','vmbkb':function(_0x5045f3,_0x1beaee){return _0x5045f3>_0x1beaee;},'pqFzz':function(_0x584c0a,_0x3c3c3f){return _0x584c0a!==_0x3c3c3f;},'iZSEB':_0x1a7713(0x118),'ZPQvx':function(_0x2464a5,_0x4f049e){return _0x2464a5===_0x4f049e;},'ezpCw':function(_0x584dfb,_0x1e0ce6){return _0x584dfb===_0x1e0ce6;},'EoWOL':'approved','vafHN':function(_0x12c21f,_0xc5d89c){return _0x12c21f===_0xc5d89c;}};console['log']('\x0a'+_0x328913[_0x1a7713(0x140)]+'\x20('+_0x328913['dashboardUrl']+')');_0x328913['stats']&&console['log']('\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x328913[_0x1a7713(0x130)]));_0x328913['description']&&console['log'](_0x1a7713(0x122)+_0x328913[_0x1a7713(0xd7)]);_0x328913['gitRepoUrl']&&console[_0x1a7713(0x173)]('\x20\x20\x20Repository:\x20'+_0x328913[_0x1a7713(0x17e)]);_0x328913[_0x1a7713(0x147)]&&console[_0x1a7713(0x173)](_0x1a7713(0x1a4)+_0x328913[_0x1a7713(0x147)]);console['log'](_0x1a7713(0x156)+new Date(_0x328913['createdAt'])['toLocaleString']());_0x328913[_0x1a7713(0x114)]&&console['log'](_0x1a7713(0x196)+new Date(_0x328913[_0x1a7713(0x114)])['toLocaleString']());if(_0x4d5c9d&&_0x4d5c9d[_0x1a7713(0xdb)]>0x0){console[_0x1a7713(0x173)](_0x401644[_0x1a7713(0x190)]);for(let _0x56935a=0x0;_0x56935a<_0x4d5c9d['length'];_0x56935a++){const _0x2844d3=_0x4d5c9d[_0x56935a];let _0x2a84cf;if(_0x401644[_0x1a7713(0x137)](_0x2844d3['status'],_0x401644['grSaC'])&&_0x2844d3['terminalReason']===_0x1a7713(0xf0))_0x2a84cf='✅';else{if(_0x401644['cAtqN'](_0x2844d3['status'],_0x401644['pHdAn']))_0x2a84cf='🟢';else{if(_0x2844d3['status']===_0x401644['tLBdG'])_0x2a84cf='🟠';else{if(_0x401644['cAtqN'](_0x2844d3['status'],'blocked'))_0x2a84cf='🛑';else{if(_0x401644['cAtqN'](_0x2844d3['status'],'closed'))_0x2a84cf='⛔';else _0x401644[_0x1a7713(0x14a)](_0x2844d3[_0x1a7713(0xe2)],_0x401644[_0x1a7713(0x17d)])?_0x2a84cf='⏳':_0x2a84cf='⬜';}}}}const _0x3b8a8c=_0x401644[_0x1a7713(0x109)](_0x2844d3[_0x1a7713(0x14e)],0x1)?_0x1a7713(0x181)+_0x2844d3['version']+')':'',_0x457b87=_0x2844d3[_0x1a7713(0x14e)]>0x1&&_0x2844d3[_0x1a7713(0x117)]&&_0x401644['pqFzz'](_0x2844d3[_0x1a7713(0xe2)],_0x1a7713(0xfb))&&_0x401644[_0x1a7713(0x10c)](_0x2844d3['status'],_0x401644['pHdAn'])?'\x20[has\x20reviewer\x20feedback]':'';console['log'](_0x1a7713(0xe3)+(_0x56935a+0x1)+'.\x20'+_0x2a84cf+'\x20'+_0x2844d3['description']+_0x3b8a8c+_0x457b87);_0x401644['cAtqN'](_0x2844d3['status'],_0x401644[_0x1a7713(0xf6)])&&_0x2844d3[_0x1a7713(0xfe)]&&console[_0x1a7713(0x173)]('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0x2844d3[_0x1a7713(0xfe)]);_0x2844d3[_0x1a7713(0xe2)]===_0x1a7713(0x13d)&&_0x2844d3[_0x1a7713(0xd6)]&&console['log']('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x2844d3['incompleteReason']);if(_0x401644['ZPQvx'](_0x2844d3[_0x1a7713(0xe2)],_0x1a7713(0xfb))&&_0x401644['ezpCw'](_0x2844d3[_0x1a7713(0x127)],_0x401644['EoWOL']))console['log']('\x20\x20\x20\x20\x20\x20Approved');else _0x401644['vafHN'](_0x2844d3[_0x1a7713(0xe2)],_0x401644['grSaC'])&&_0x2844d3[_0x1a7713(0xef)]&&console['log'](_0x1a7713(0x18d)+_0x2844d3['canceledReason']);}}}export async function featureCreate(_0x241465,_0x342006){const _0x12e965=_0x3dcc19,_0x270408={'alQyS':function(_0x2d7148){return _0x2d7148();},'OGyIG':_0x12e965(0x178),'sWCtW':function(_0x21e20b,_0x469e0a){return _0x21e20b(_0x469e0a);},'koEFa':function(_0x4a34a9,_0xad23c3){return _0x4a34a9(_0xad23c3);}},{envNames:_0x58cbbf}=await _0x270408['alQyS'](getEnvNames);if(_0x58cbbf['length']===0x0&&!process[_0x12e965(0x15e)][_0x12e965(0xc8)]){let _0x3b0926=0x0;try{_0x3b0926=(await listCloudProfiles())[_0x12e965(0xdb)];}catch{_0x3b0926=0x1;}_0x3b0926===0x0&&console[_0x12e965(0x167)]('\x0a'+formatProfileRequiredMessage(_0x1f5049=>bold(_0x1f5049)));}const _0x1354e7=_0x342006['scenarios']?_0x342006[_0x12e965(0x132)][_0x12e965(0x177)](_0x2092a5=>_0x2092a5['trim']()):[],_0x1fb890=_0x270408['alQyS'](getGitRepoUrl),_0x400b75=getGitBranch();console['log'](_0x270408[_0x12e965(0x1a0)]);const _0x276060=await createFeature({'name':_0x241465,'description':_0x342006[_0x12e965(0xd7)],'checklist':_0x1354e7,'gitRepoUrl':_0x1fb890,'gitBranch':_0x400b75});await _0x270408['sWCtW'](setActiveFeatureId,_0x276060['id']),await _0x270408['koEFa'](tryStartCurrentSession,_0x276060['id']);const _0x55a468=process['env'][_0x12e965(0x158)];_0x55a468&&registerSession(_0x55a468,_0x276060['id']),console['log'](_0x12e965(0xca)+_0x276060['id']),displayFeature(_0x276060,_0x276060['checklistItems']),console['log']('\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review');}export async function featureList(_0x44d2f9){const _0x1c8063=_0x3dcc19,_0x54fdeb={'pInNb':function(_0x18523c){return _0x18523c();},'DedmT':'\x0aNo\x20feature\x20reviews\x20found.','sDhLB':function(_0x182d87,_0x5f008c){return _0x182d87>_0x5f008c;},'ucOyG':function(_0x58f6dd,_0x1b154c){return _0x58f6dd+_0x1b154c;},'UunaW':function(_0x472059,_0x90b19a){return _0x472059<_0x90b19a;},'wBWIQ':function(_0x251be7,_0x54ceb0){return _0x251be7!==_0x54ceb0;}},_0x4eb459={'limit':_0x44d2f9[_0x1c8063(0xd4)]??0xa,'offset':_0x44d2f9['offset']??0x0,'includeDeleted':_0x44d2f9[_0x1c8063(0xed)]};_0x44d2f9['currentBranch']&&(_0x4eb459['gitRepoUrl']=_0x54fdeb[_0x1c8063(0x13f)](getGitRepoUrl),_0x4eb459['gitBranch']=_0x54fdeb[_0x1c8063(0x13f)](getGitBranch));const _0x3c19dc=await listFeatures(_0x4eb459);if(_0x3c19dc[_0x1c8063(0x136)][_0x1c8063(0xdb)]===0x0){console[_0x1c8063(0x173)](_0x54fdeb[_0x1c8063(0x120)]);return;}const _0x1b3152=_0x54fdeb[_0x1c8063(0x183)](_0x3c19dc['totalCount'],_0x3c19dc[_0x1c8063(0x136)]['length'])?_0x1c8063(0x11b)+_0x3c19dc[_0x1c8063(0x136)][_0x1c8063(0xdb)]+_0x1c8063(0x175)+_0x3c19dc['totalCount']:_0x3c19dc[_0x1c8063(0x164)]+_0x1c8063(0x170);console['log']('\x0a'+_0x1b3152+':\x0a');for(const _0x5caab1 of _0x3c19dc[_0x1c8063(0x136)]){console[_0x1c8063(0x173)](''+_0x5caab1['name']),console['log']('\x20\x20\x20ID:\x20'+_0x5caab1['id']),_0x5caab1[_0x1c8063(0x130)]&&console[_0x1c8063(0x173)](_0x1c8063(0xe8)+getProgressDisplay(_0x5caab1['stats'])),_0x5caab1['gitBranch']&&console[_0x1c8063(0x173)]('\x20\x20\x20Branch:\x20'+_0x5caab1['gitBranch']),console['log'](_0x1c8063(0x156)+new Date(_0x5caab1['createdAt'])[_0x1c8063(0x104)]()),console[_0x1c8063(0x173)]('');}const _0x4caf8a=_0x4eb459['limit']??0xa,_0x12dd84=_0x54fdeb['ucOyG'](_0x4eb459[_0x1c8063(0x18e)]??0x0,_0x3c19dc['items']['length']);if(_0x54fdeb['UunaW'](_0x12dd84,_0x3c19dc[_0x1c8063(0x164)])){const _0x2e85f6=_0x54fdeb[_0x1c8063(0x184)](_0x4caf8a,0xa)?_0x1c8063(0x141)+_0x4caf8a:'',_0xc3d65d=_0x44d2f9['currentBranch']?_0x1c8063(0x106):'',_0x1e34ab=_0x44d2f9[_0x1c8063(0xed)]?'\x20--include-deleted':'';console[_0x1c8063(0x173)]('Next\x20page:\x20ranger\x20list\x20--offset\x20'+_0x12dd84+_0x2e85f6+_0xc3d65d+_0x1e34ab);}}export async function featureShow(_0x4f4bb5){const _0x1570a8=_0x3dcc19,_0x3f6b8c={'PHxdx':function(_0xee27f0,_0x176bad){return _0xee27f0(_0x176bad);}},_0x233e34=_0x4f4bb5||await getActiveFeatureId();if(!_0x233e34)throw new Error(_0x1570a8(0xea));const _0x553bc8=await _0x3f6b8c[_0x1570a8(0x16b)](getFeature,_0x233e34);displayFeature(_0x553bc8,_0x553bc8['checklistItems']);}export async function featureResume(_0xf55936){const _0x45d2f9=_0x3dcc19,_0x477b4c={'fZpqe':function(_0x5c4cf0,_0x3aedb2){return _0x5c4cf0(_0x3aedb2);},'vNDmu':function(_0x38566d,_0x48fa9b,_0x48cbcc){return _0x38566d(_0x48fa9b,_0x48cbcc);},'MuPOf':function(_0x163c73,_0x405d91,_0x13d642){return _0x163c73(_0x405d91,_0x13d642);},'HGBIF':function(_0x7a920b,_0x4d672b){return _0x7a920b(_0x4d672b);},'HvOuV':function(_0x4e31f3){return _0x4e31f3();},'JYYrI':function(_0x2d38e1){return _0x2d38e1();},'MtRDN':_0x45d2f9(0x12c),'tXjpA':function(_0x5288fc,_0x36cb04){return _0x5288fc||_0x36cb04;},'AUNvY':'\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','kiVOF':_0x45d2f9(0x16f),'zSnIr':function(_0x26f27c,_0xeb045a){return _0x26f27c===_0xeb045a;},'wokdQ':_0x45d2f9(0x11a),'oFxZl':_0x45d2f9(0xdf),'hohMa':'list','cohrh':function(_0x5d5cd7,_0xa14428){return _0x5d5cd7!==_0xa14428;},'WaSFl':function(_0x37b70d,_0x57061d){return _0x37b70d(_0x57061d);}};if(_0xf55936){const _0x31ae62=await _0x477b4c['fZpqe'](getFeature,_0xf55936);await setActiveFeatureId(_0x31ae62['id']);const _0x4280f2=getGitBranch();_0x4280f2&&_0x4280f2!==_0x31ae62[_0x45d2f9(0x147)]&&(await _0x477b4c['vNDmu'](updateFeature,_0x31ae62['id'],{'gitBranch':_0x4280f2}),console[_0x45d2f9(0x173)](_0x45d2f9(0xd9)+_0x4280f2));console['log'](_0x45d2f9(0x10b)+_0x31ae62['name']+'\x20('+_0x31ae62['id']+')'),await _0x477b4c[_0x45d2f9(0x19e)](tryStartCurrentSession,_0x31ae62['id']);const _0xafd0d0=process['env']['CLAUDE_SESSION_ID'];_0xafd0d0&&registerSession(_0xafd0d0,_0x31ae62['id']);_0x477b4c['MuPOf'](displayFeature,_0x31ae62,_0x31ae62[_0x45d2f9(0x1a1)]),await _0x477b4c[_0x45d2f9(0x135)](printFeedbackNudge,_0x31ae62['id']);return;}const _0x41e768=_0x477b4c['HvOuV'](getGitRepoUrl),_0x2ec4a9=_0x477b4c['JYYrI'](getGitBranch);if(!_0x41e768&&!_0x2ec4a9)throw new Error(_0x477b4c['MtRDN']);console['log']('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+_0x477b4c[_0x45d2f9(0xf4)](_0x41e768,'any')+'\x20/\x20'+(_0x2ec4a9||_0x45d2f9(0x15a))+_0x45d2f9(0xe7));const _0x3c24ae=await listFeatures({'gitRepoUrl':_0x41e768,'gitBranch':_0x2ec4a9}),_0x340ef8=_0x3c24ae[_0x45d2f9(0x136)]['filter'](_0x185e10=>_0x185e10['status']?_0x185e10['status']!==_0x45d2f9(0x107):!_0x185e10[_0x45d2f9(0x114)]);if(_0x340ef8[_0x45d2f9(0xdb)]===0x0){console['log'](_0x477b4c[_0x45d2f9(0xff)]),console[_0x45d2f9(0x173)](_0x477b4c[_0x45d2f9(0x193)]);return;}let _0x557afb;if(_0x477b4c[_0x45d2f9(0x197)](_0x340ef8[_0x45d2f9(0xdb)],0x1))_0x557afb=_0x340ef8[0x0];else{const _0xe2cdf3=process[_0x45d2f9(0x139)][_0x45d2f9(0x18f)]&&process[_0x45d2f9(0x149)]['isTTY'];if(!_0xe2cdf3){console[_0x45d2f9(0x173)](_0x477b4c[_0x45d2f9(0x159)]);for(const _0x1c65c7 of _0x340ef8){console['log']('\x20\x20'+_0x1c65c7['name']),console[_0x45d2f9(0x173)]('\x20\x20\x20\x20\x20ID:\x20'+_0x1c65c7['id']),_0x1c65c7['stats']&&console[_0x45d2f9(0x173)]('\x20\x20\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x1c65c7[_0x45d2f9(0x130)])),_0x1c65c7['gitBranch']&&console[_0x45d2f9(0x173)](_0x45d2f9(0x12f)+_0x1c65c7['gitBranch']);}throw new Error(_0x477b4c['oFxZl']);}const {selected:_0xd9a586}=await _0x3700c3['prompt']([{'type':_0x477b4c['hohMa'],'name':_0x45d2f9(0xd8),'message':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','choices':_0x340ef8['map'](_0xf31569=>({'name':_0xf31569['name']+'\x20('+_0xf31569['id']+')','value':_0xf31569['id']}))}]);_0x557afb=_0x340ef8[_0x45d2f9(0x116)](_0x142b79=>_0x142b79['id']===_0xd9a586);}await _0x477b4c[_0x45d2f9(0x135)](setActiveFeatureId,_0x557afb['id']);_0x2ec4a9&&_0x477b4c[_0x45d2f9(0x131)](_0x2ec4a9,_0x557afb[_0x45d2f9(0x147)])&&(await updateFeature(_0x557afb['id'],{'gitBranch':_0x2ec4a9}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x2ec4a9));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x557afb['name']+'\x20('+_0x557afb['id']+')'),await tryStartCurrentSession(_0x557afb['id']);const _0x12fe89=await _0x477b4c[_0x45d2f9(0x19e)](getFeature,_0x557afb['id']),_0x15cef2=process['env'][_0x45d2f9(0x158)];_0x15cef2&&registerSession(_0x15cef2,_0x12fe89['id']),displayFeature(_0x12fe89,_0x12fe89['checklistItems']),await _0x477b4c['WaSFl'](printFeedbackNudge,_0x12fe89['id']);}async function printFeedbackNudge(_0x9c7c34){const _0x3dce34=_0x3dcc19,_0x4dfc65={'vPjlE':function(_0x22d2f1,_0x99d754){return _0x22d2f1(_0x99d754);},'OgvBr':function(_0x3682fb,_0x380b9e){return _0x3682fb>_0x380b9e;}};try{const {items:_0x408b16}=await _0x4dfc65['vPjlE'](getActionItems,_0x9c7c34);let _0x2ab626=0x0,_0x2a0dc6=0x0;for(const _0x1cd58a of _0x408b16){const _0x40c61d=await getItemFeedback(_0x9c7c34,_0x1cd58a['id']);_0x4dfc65[_0x3dce34(0x166)](_0x40c61d['unaddressedComments'][_0x3dce34(0xdb)],0x0)&&(_0x2ab626+=_0x40c61d['unaddressedComments'][_0x3dce34(0xdb)],_0x2a0dc6++);}_0x4dfc65[_0x3dce34(0x166)](_0x2ab626,0x0)&&(console['log'](_0x3dce34(0x12d)+_0x2ab626+_0x3dce34(0xf7)+_0x2a0dc6+_0x3dce34(0xdc)),console['log']('\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'));}catch{}}async function tryStartCurrentSession(_0x26395a){const _0x7dae0c=_0x3dcc19;try{const {sessions:_0x3d94de}=await listFeatureSessions(_0x26395a),_0x3714cf=_0x3d94de['find'](_0x3a7358=>_0x3a7358[_0x7dae0c(0xe2)]===_0x7dae0c(0x13e));_0x3714cf&&(await startSession(_0x26395a,_0x3714cf['id']),console['log'](_0x7dae0c(0x171)+_0x3714cf[_0x7dae0c(0x105)]));}catch{}}export async function featureReport(_0x37f2b4,_0x285a25){const _0x1ef8cd=_0x3dcc19,_0x192872={'GcXNO':function(_0x1466a6){return _0x1466a6();},'dIoAl':_0x1ef8cd(0x112),'TTTdY':function(_0x8b196,_0x2fc263,_0x15bffb){return _0x8b196(_0x2fc263,_0x15bffb);},'epLTz':function(_0x1ba909,_0x1359e0,_0x28ead1,_0x372ed4){return _0x1ba909(_0x1359e0,_0x28ead1,_0x372ed4);},'mGlJO':function(_0xa5267d){return _0xa5267d();},'BWcOK':_0x1ef8cd(0xda),'QJqmw':function(_0x4e6a35,_0x195cc6){return _0x4e6a35(_0x195cc6);}},_0x26693c=_0x37f2b4||await _0x192872[_0x1ef8cd(0xc9)](getActiveFeatureId);if(!_0x26693c)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');console[_0x1ef8cd(0x173)](_0x192872['dIoAl']);const _0xabee46=await _0x192872['TTTdY'](getFeatureReportMarkdown,_0x26693c,{'style':_0x285a25['style']}),_0xaebf60=_0x285a25['output']||_0x192872['epLTz'](join,_0x192872['mGlJO'](getRangerDir),_0x192872['BWcOK'],_0x26693c+_0x1ef8cd(0x11c)),_0x347f1e=join(_0xaebf60,'..');!_0x192872['QJqmw'](existsSync,_0x347f1e)&&await mkdir(_0x347f1e,{'recursive':!![]}),await _0x192872['epLTz'](writeFile,_0xaebf60,_0xabee46,'utf-8'),console[_0x1ef8cd(0x173)](_0x1ef8cd(0x1a3)+_0xaebf60);}function getScenarioResult(_0x5cc532){const _0x1ecaa4=_0x3dcc19,_0x1f5a8b={'PQEjy':function(_0x2dd91e,_0x298260){return _0x2dd91e===_0x298260;},'HOyrS':'closed','OfvoR':function(_0x36e0f4,_0x19b232){return _0x36e0f4===_0x19b232;},'stqkg':'verification_in_progress','LqoGE':_0x1ecaa4(0xde)};if(_0x1f5a8b[_0x1ecaa4(0x185)](_0x5cc532[_0x1ecaa4(0xe2)],'closed'))return _0x5cc532['terminalReason']??_0x1f5a8b['HOyrS'];if(_0x1f5a8b[_0x1ecaa4(0x198)](_0x5cc532['status'],_0x1f5a8b[_0x1ecaa4(0x1a7)]))return _0x1f5a8b[_0x1ecaa4(0xe4)];return _0x5cc532[_0x1ecaa4(0xe2)];}function getScenarioRationale(_0x1fcf15,_0x50106c){const _0x36f7ca=_0x3dcc19,_0x2fc52d={'igHTH':'3|4|5|1|2|0'},_0x6de8f4=_0x2fc52d['igHTH'][_0x36f7ca(0x128)]('|');let _0x34b4e8=0x0;while(!![]){switch(_0x6de8f4[_0x34b4e8++]){case'0':return null;case'1':if(_0x1fcf15[_0x36f7ca(0xef)])return _0x1fcf15[_0x36f7ca(0xef)];continue;case'2':if(_0x1fcf15['notes'])return _0x1fcf15['notes'];continue;case'3':if(_0x50106c)return _0x50106c;continue;case'4':if(_0x1fcf15['blockedReason'])return _0x1fcf15['blockedReason'];continue;case'5':if(_0x1fcf15['incompleteReason'])return _0x1fcf15[_0x36f7ca(0xd6)];continue;}break;}}function _0x131a(_0x20c407,_0xc6d20e){_0x20c407=_0x20c407-0xc7;const _0xa8e758=_0xa8e7();let _0x131a3b=_0xa8e758[_0x20c407];return _0x131a3b;}export async function featureReportPrDescription(_0x3339fa,_0x5ccc39){const _0x12aee2=_0x3dcc19,_0x39a94d={'fMnkU':function(_0x4cddb0){return _0x4cddb0();},'owYVA':function(_0x27d6bb,_0xfbe1cc){return _0x27d6bb(_0xfbe1cc);},'SEpAI':function(_0xc094a9,_0x2b7578){return _0xc094a9===_0x2b7578;},'XBdFU':function(_0x2e0c8b,_0x939812){return _0x2e0c8b>_0x939812;},'WYARW':'\x0aAvailable\x20scenarios:','bIdfl':function(_0x39290a,_0x1a86e7){return _0x39290a+_0x1a86e7;},'Squyg':'\x0a❌\x20All\x20scenarios\x20were\x20excluded.'},_0x28c6f2=_0x3339fa||await _0x39a94d['fMnkU'](getActiveFeatureId);if(!_0x28c6f2)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');const _0x2c64eb=await _0x39a94d['owYVA'](getFeature,_0x28c6f2),_0x122ea6=_0x2c64eb[_0x12aee2(0x1a1)]||[],_0xf062bc=getCurrentSessionItems(_0x2c64eb,_0x122ea6);_0x39a94d[_0x12aee2(0x102)](_0xf062bc[_0x12aee2(0xdb)],0x0)&&(console['error']('\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.'),process['exit'](0x1));const _0xf2672e=_0x5ccc39[_0x12aee2(0x125)]??[],_0x1d15f1=_0xf2672e[_0x12aee2(0x121)](_0x289c97=>!Number[_0x12aee2(0x154)](_0x289c97)||_0x289c97<0x1||_0x289c97>_0xf062bc[_0x12aee2(0xdb)]);if(_0x39a94d['XBdFU'](_0x1d15f1['length'],0x0)){console[_0x12aee2(0x12e)](_0x12aee2(0x11e)+_0x1d15f1['join'](',\x20')),console['log'](_0x39a94d['WYARW']);for(let _0xb0c541=0x0;_0xb0c541<_0xf062bc['length'];_0xb0c541++){console['log']('\x20\x20'+_0x39a94d[_0x12aee2(0x111)](_0xb0c541,0x1)+'.\x20'+_0xf062bc[_0xb0c541]['description']);}process['exit'](0x1);}const _0x5e6091=new Set(_0xf2672e['map'](_0x195e8c=>_0x195e8c-0x1)),_0x1cc515=_0xf062bc[_0x12aee2(0x121)]((_0x332f1f,_0x41ee6b)=>!_0x5e6091[_0x12aee2(0x160)](_0x41ee6b));_0x39a94d[_0x12aee2(0x102)](_0x1cc515['length'],0x0)&&(console['error'](_0x39a94d['Squyg']),process[_0x12aee2(0x15d)](0x1));if(_0x5ccc39[_0x12aee2(0x14f)])await outputJsonReport(_0x28c6f2,_0x2c64eb,_0x1cc515);else{const _0x366b95=await getFeatureReportMarkdown(_0x28c6f2,{'itemIds':_0x1cc515['map'](_0xddd76c=>_0xddd76c['id'])});process[_0x12aee2(0x149)]['write'](_0x366b95[_0x12aee2(0x150)]()+'\x0a');}}async function outputJsonReport(_0x580462,_0x36c3a0,_0x5c87f2){const _0x3e6124=_0x3dcc19,_0x241c0d={'BtIey':function(_0x1ba93f,_0xce746f){return _0x1ba93f>_0xce746f;},'NWwMV':function(_0x3fb214,_0x239da1){return _0x3fb214(_0x239da1);},'MHwVx':function(_0x2bfd5b,_0x4d5561,_0x300ea0){return _0x2bfd5b(_0x4d5561,_0x300ea0);}},_0x1149b5=getApiBaseUrl(),_0x4c8f3f=await getFeatureReport(_0x580462),_0x3109a8=new Map(_0x4c8f3f['checklistItems'][_0x3e6124(0x177)](_0x3e391a=>[_0x3e391a['id'],_0x3e391a])),_0x2a876e=await Promise['all'](_0x5c87f2['map'](async _0x16f275=>{const _0x19fa62=_0x3e6124,_0x1bab8e=_0x3109a8['get'](_0x16f275['id']),_0x363697=_0x1bab8e?.[_0x19fa62(0x14d)]??null;let _0x14ecb5=[];if(_0x16f275['browserSessionId'])try{const {steps:_0x25cb92}=await getBrowserSessionSteps(_0x16f275['browserSessionId']);_0x241c0d['BtIey'](_0x25cb92[_0x19fa62(0xdb)],0x0)&&(_0x14ecb5=_0x25cb92[_0x19fa62(0x177)](_0x3e7b7d=>{const _0x5836dd=_0x19fa62,_0x4b8715=_0x3e7b7d[_0x5836dd(0x145)]['find'](_0x191dbe=>_0x191dbe['assetType']===_0x5836dd(0x19d)&&_0x191dbe['timing']===_0x5836dd(0x152))??_0x3e7b7d[_0x5836dd(0x145)]['find'](_0x385e39=>_0x385e39[_0x5836dd(0xee)]===_0x5836dd(0x19d));let _0x6d7ceb=null,_0x255d77=null;if(_0x4b8715){const _0x482cdc=_0x4b8715['storage'][_0x5836dd(0xcc)]['split']('/')['pop']();_0x6d7ceb=_0x1149b5+_0x5836dd(0x182)+_0x16f275['browserSessionId']+'/artifacts/'+_0x482cdc,_0x482cdc&&(_0x255d77=_0x482cdc[_0x5836dd(0x138)](/\.\w+$/,'')[_0x5836dd(0x138)](/^(key_)?\d+_/,'')[_0x5836dd(0x138)](/[-_]/g,'\x20'));}return{'description':_0x255d77||_0x3e7b7d[_0x5836dd(0xd7)]||_0x3e7b7d['stepName']||_0x5836dd(0x108)+_0x3e7b7d['position'],'screenshot':_0x6d7ceb,'is_key_step':_0x3e7b7d['isKeyStep']};}));}catch{}return _0x14ecb5[_0x19fa62(0xdb)]===0x0&&_0x363697?.[_0x19fa62(0x161)]&&(_0x14ecb5=_0x363697['screenshotUrls'][_0x19fa62(0x177)]((_0x36eec7,_0x39394d)=>({'description':'Screenshot\x20'+(_0x39394d+0x1),'screenshot':_0x36eec7,'is_key_step':![]}))),{'description':_0x16f275[_0x19fa62(0xd7)],'result':_0x241c0d['NWwMV'](getScenarioResult,_0x16f275),'rationale':_0x241c0d[_0x19fa62(0x18c)](getScenarioRationale,_0x16f275,_0x363697?.[_0x19fa62(0x16e)]),'steps':_0x14ecb5};})),_0x45b3d8={'url':_0x36c3a0[_0x3e6124(0x13c)],'scenarios':_0x2a876e};process['stdout'][_0x3e6124(0xfa)](JSON['stringify'](_0x45b3d8,null,0x2)+'\x0a');}export async function featureConcludeSession(_0x296b6c){const _0x48fca9=_0x3dcc19,_0x28fe06={'MuGha':function(_0x116c92){return _0x116c92();},'RwJwZ':'No\x20active\x20session\x20for\x20this\x20feature\x20review.','GXZqo':'Current\x20session\x20not\x20found.','HTEWP':function(_0x2f7fa9,_0x3c232d){return _0x2f7fa9===_0x3c232d;},'DDQCr':_0x48fca9(0x10a),'LCITk':_0x48fca9(0x123),'Iscuv':function(_0x3feb91,_0x485d9c){return _0x3feb91!==_0x485d9c;},'EWXcj':_0x48fca9(0xde),'acQby':'\x0aConcluding\x20session...'},_0x503e08=_0x296b6c||await _0x28fe06['MuGha'](getActiveFeatureId);if(!_0x503e08)throw new Error(_0x48fca9(0xea));const _0x90a7ec=await getFeature(_0x503e08);if(!_0x90a7ec[_0x48fca9(0xe1)])throw new Error(_0x28fe06[_0x48fca9(0x19a)]);const {sessions:_0xb75129}=await listFeatureSessions(_0x503e08),_0x8b9197=_0xb75129['find'](_0x4688e7=>_0x4688e7['id']===_0x90a7ec['currentSessionId']);if(!_0x8b9197)throw new Error(_0x28fe06[_0x48fca9(0xfc)]);if(_0x28fe06[_0x48fca9(0x1a6)](_0x8b9197['status'],_0x28fe06[_0x48fca9(0x113)])){console['log'](_0x28fe06['LCITk']);return;}if(_0x28fe06['Iscuv'](_0x8b9197[_0x48fca9(0xe2)],_0x28fe06['EWXcj']))throw new Error(_0x48fca9(0x191)+_0x8b9197['status']);console['log'](_0x28fe06[_0x48fca9(0x194)]),await concludeSession(_0x503e08,_0x90a7ec[_0x48fca9(0xe1)]),console[_0x48fca9(0x173)]('\x0a✅\x20Session\x20'+_0x8b9197[_0x48fca9(0x105)]+_0x48fca9(0x17b)),console['log']('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x56c8c1){const _0x340ed1=_0x3dcc19,_0x502ff4={'aXlXm':function(_0x2a95ac){return _0x2a95ac();},'yMpKd':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','VRSjl':function(_0x4f5ef7,_0x48439d){return _0x4f5ef7===_0x48439d;},'RhwRz':_0x340ed1(0x15f),'DkFFk':function(_0x17a19c,_0x3358fa){return _0x17a19c===_0x3358fa;},'iNFNe':'completed','LevFC':'in_progress'},_0x58b304=_0x56c8c1||await _0x502ff4[_0x340ed1(0x188)](getActiveFeatureId);if(!_0x58b304)throw new Error(_0x502ff4['yMpKd']);const _0x3ffd7c=await getFeature(_0x58b304);console[_0x340ed1(0x173)]('\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20'+_0x3ffd7c[_0x340ed1(0x140)]+'\x0a');const {sessions:_0xdbcce8}=await listFeatureSessions(_0x58b304);if(_0x502ff4[_0x340ed1(0x134)](_0xdbcce8[_0x340ed1(0xdb)],0x0)){console['log'](_0x502ff4[_0x340ed1(0x187)]);return;}for(const _0x3e2212 of _0xdbcce8){const _0x273c6f=_0x502ff4[_0x340ed1(0x172)](_0x3e2212['status'],_0x502ff4['iNFNe'])?'✅':_0x3e2212['status']===_0x502ff4['LevFC']?'🔄':'▶️';console['log'](_0x273c6f+_0x340ed1(0xe5)+_0x3e2212[_0x340ed1(0x105)]+'\x20('+_0x3e2212['id']+')'),console['log'](_0x340ed1(0x103)+_0x3e2212[_0x340ed1(0xe2)]),console[_0x340ed1(0x173)]('\x20\x20\x20Created:\x20'+new Date(_0x3e2212['createdAt'])['toLocaleString']()),_0x3e2212[_0x340ed1(0x114)]&&console['log'](_0x340ed1(0x196)+new Date(_0x3e2212['completedAt'])[_0x340ed1(0x151)]()),console['log']('');}}export async function featureAddScenario(_0x3fcbfc,_0x44179b){const _0x34fe0f=_0x3dcc19,_0x2e898a={'OmsMs':_0x34fe0f(0xea),'vvdTD':function(_0x24c25f,_0x2e6e4d){return _0x24c25f(_0x2e6e4d);},'MubnL':function(_0x48461e,_0x3cf2ea,_0x2c9d4a){return _0x48461e(_0x3cf2ea,_0x2c9d4a);}},_0x1735ff=_0x44179b||await getActiveFeatureId();if(!_0x1735ff)throw new Error(_0x2e898a['OmsMs']);const _0xb9705e=await _0x2e898a[_0x34fe0f(0x186)](getFeature,_0x1735ff);if(_0xb9705e[_0x34fe0f(0x15b)]&&!_0xb9705e['latestReview']['submittedAt'])throw new Error(_0x34fe0f(0x195)+_0xb9705e['dashboardUrl']);await _0x2e898a['MubnL'](createChecklistItem,_0x1735ff,_0x3fcbfc);const _0x50f16f=await getFeature(_0x1735ff);console[_0x34fe0f(0x173)]('\x0a✅\x20Scenario\x20added'),displayFeature(_0x50f16f,_0x50f16f[_0x34fe0f(0x1a1)]);}export async function featureEditScenario(_0x4345c0,_0x49c6f2){const _0x4503f3=_0x3dcc19,_0x3eb63a={'oVNQj':'Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','kBeYj':'Please\x20finish\x20your\x20review\x20first:','xIxZs':function(_0x1020a7,_0x3a3c78){return _0x1020a7===_0x3a3c78;},'zdLqq':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','uwxOe':'\x0aAvailable\x20scenarios:','BSvVu':function(_0xa79c5e,_0x35fd25){return _0xa79c5e<_0x35fd25;},'pmxkc':function(_0x174c9a,_0x5cfd80){return _0x174c9a+_0x5cfd80;},'vxZwJ':function(_0x5dd648,_0x2ea47d){return _0x5dd648-_0x2ea47d;},'NpRQW':function(_0x16246b,_0x3116ab){return _0x16246b<_0x3116ab;},'DOKkI':function(_0x4975b2,_0x2491fd){return _0x4975b2>=_0x2491fd;}},_0x271b26=_0x49c6f2['id']||await getActiveFeatureId();!_0x271b26&&(console['error']('\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.'),console[_0x4503f3(0x12e)](_0x3eb63a['oVNQj']),process['exit'](0x1));const _0x10a68c=await getFeature(_0x271b26);_0x10a68c['latestReview']&&!_0x10a68c[_0x4503f3(0x15b)][_0x4503f3(0x17a)]&&(console[_0x4503f3(0x12e)](_0x4503f3(0x192)),console[_0x4503f3(0x12e)](_0x3eb63a[_0x4503f3(0x153)]),console[_0x4503f3(0x12e)]('\x20\x20'+_0x10a68c['dashboardUrl']),process['exit'](0x1));const _0x167de7=_0x10a68c['checklistItems']||[];_0x3eb63a['xIxZs'](_0x167de7[_0x4503f3(0xdb)],0x0)&&(console[_0x4503f3(0x12e)](_0x3eb63a['zdLqq']),process[_0x4503f3(0x15d)](0x1));if(_0x49c6f2['scenario']===undefined){console['error'](_0x4503f3(0x129)),console['log'](_0x3eb63a['uwxOe']);for(let _0x3594c5=0x0;_0x3eb63a[_0x4503f3(0x174)](_0x3594c5,_0x167de7[_0x4503f3(0xdb)]);_0x3594c5++){console[_0x4503f3(0x173)]('\x20\x20'+_0x3eb63a[_0x4503f3(0xe6)](_0x3594c5,0x1)+'.\x20'+_0x167de7[_0x3594c5][_0x4503f3(0xd7)]);}process[_0x4503f3(0x15d)](0x1);}const _0x542dad=_0x3eb63a['vxZwJ'](_0x49c6f2[_0x4503f3(0x124)],0x1);if(_0x3eb63a[_0x4503f3(0x169)](_0x542dad,0x0)||_0x3eb63a[_0x4503f3(0x189)](_0x542dad,_0x167de7[_0x4503f3(0xdb)])){console[_0x4503f3(0x12e)]('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x49c6f2[_0x4503f3(0x124)]+_0x4503f3(0x100)+_0x167de7[_0x4503f3(0xdb)]+'\x20scenarios.'),console['log']('\x0aAvailable\x20scenarios:');for(let _0x2bf81f=0x0;_0x2bf81f<_0x167de7[_0x4503f3(0xdb)];_0x2bf81f++){console['log']('\x20\x20'+_0x3eb63a['pmxkc'](_0x2bf81f,0x1)+'.\x20'+_0x167de7[_0x2bf81f]['description']);}process[_0x4503f3(0x15d)](0x1);}const _0x5d515b=_0x167de7[_0x542dad];await updateChecklistItem(_0x271b26,_0x5d515b['id'],{'description':_0x4345c0});const _0x49b55e=await getFeature(_0x271b26);console['log']('\x0a✅\x20Scenario\x20updated'),displayFeature(_0x49b55e,_0x49b55e[_0x4503f3(0x1a1)]);}async function downloadFeedbackImage(_0x56865d,_0x5f1b49){const _0x580b17=_0x3dcc19,_0x585076={'JLVoO':_0x580b17(0x13a),'VFsaj':function(_0x153e34,_0xd4abad,_0x510341){return _0x153e34(_0xd4abad,_0x510341);}};try{const _0xd4674e=join(getRangerDir(),_0x585076[_0x580b17(0x180)]);await _0x585076['VFsaj'](mkdir,_0xd4674e,{'recursive':!![]});const _0x3bb87c=_0x585076['VFsaj'](join,_0xd4674e,_0x580b17(0x1a2)+_0x5f1b49+'.png'),_0x54303c=await fetch(_0x56865d);if(!_0x54303c['ok'])return null;const _0x27a0cc=Buffer['from'](await _0x54303c[_0x580b17(0x142)]());return await writeFile(_0x3bb87c,_0x27a0cc),_0x3bb87c;}catch{return null;}}export async function featureGetReview(_0x449435){const _0x237ec9=_0x3dcc19,_0x17d0dd={'bIpcT':function(_0x2110c2){return _0x2110c2();},'uutqs':_0x237ec9(0xea),'vJFfp':function(_0x549b8f,_0x4da0c8){return _0x549b8f(_0x4da0c8);},'LRbAC':function(_0x1f86b9,_0xb57359){return _0x1f86b9===_0xb57359;},'VWPiJ':_0x237ec9(0xd5),'SFLgy':function(_0x168729,_0x1f206b){return _0x168729>_0x1f206b;},'sORbJ':function(_0x4c6fef,_0x1a45b1,_0x33964a){return _0x4c6fef(_0x1a45b1,_0x33964a);},'UlJMd':'en-US','MvJdl':_0x237ec9(0xdd),'gtYlJ':'numeric','cSOGB':'\x20>\x20','FaKUH':function(_0x2b05da,_0x6620af){return _0x2b05da>=_0x6620af;},'JuzkX':function(_0x1a6dbf,_0x4ebf29){return _0x1a6dbf+_0x4ebf29;}},_0xdf8908=_0x449435||await _0x17d0dd[_0x237ec9(0xd2)](getActiveFeatureId);if(!_0xdf8908)throw new Error(_0x17d0dd[_0x237ec9(0x165)]);const _0x22218f=await getFeature(_0xdf8908),{items:_0x358069}=await _0x17d0dd['vJFfp'](getActionItems,_0xdf8908);console['log']('\x0a📋\x20Feedback\x20for:\x20'+_0x22218f['name']+'\x20('+_0x22218f['id']+')\x0a');if(_0x17d0dd['LRbAC'](_0x358069['length'],0x0)){console['log'](_0x17d0dd['VWPiJ']);return;}for(let _0x3480e4=0x0;_0x3480e4<_0x358069[_0x237ec9(0xdb)];_0x3480e4++){const _0x12cb81=_0x358069[_0x3480e4],_0x1e5100=_0x17d0dd['SFLgy'](_0x12cb81[_0x237ec9(0x14e)],0x1)?'\x20(v'+_0x12cb81['version']+')':'',_0x3a483e=await _0x17d0dd[_0x237ec9(0x11d)](getItemFeedback,_0xdf8908,_0x12cb81['id']);if(_0x17d0dd[_0x237ec9(0x155)](_0x3a483e[_0x237ec9(0xf3)][_0x237ec9(0xdb)],0x0)){console[_0x237ec9(0x173)]('Scenario\x20'+(_0x3480e4+0x1)+':\x20\x22'+_0x12cb81['description']+'\x22'+_0x1e5100+_0x237ec9(0x126)+_0x3a483e['unaddressedComments'][_0x237ec9(0xdb)]+'\x20unaddressed\x20comment(s)');for(const _0x588228 of _0x3a483e['unaddressedComments']){const _0x272f36=new Date(_0x588228[_0x237ec9(0x144)])['toLocaleDateString'](_0x17d0dd[_0x237ec9(0x14b)],{'month':_0x17d0dd[_0x237ec9(0xd3)],'day':_0x17d0dd['gtYlJ']}),_0x4bbc43=_0x588228['authorName']||_0x588228['authorEmail']||'Unknown';console[_0x237ec9(0x173)](_0x237ec9(0x16a)+_0x4bbc43+'\x20('+_0x272f36+'):\x20\x22'+_0x588228[_0x237ec9(0x110)]+'\x22');if(_0x588228[_0x237ec9(0xeb)]){const _0x279cfd=await downloadFeedbackImage(_0x588228['assetUrl'],_0x588228['id']);_0x279cfd&&console[_0x237ec9(0x173)](_0x237ec9(0xd1)+_0x279cfd);}if(_0x588228['domRef']){const _0x1b3509=_0x588228['domRef'][_0x237ec9(0x12b)]['split'](_0x17d0dd['cSOGB'])['pop']()?.['split'](':')[0x0]||_0x237ec9(0x148),_0x39626d=_0x588228['domRef']['textContent']?'\x20\x22'+_0x588228[_0x237ec9(0xcb)][_0x237ec9(0xf8)][_0x237ec9(0x146)](0x0,0x3c)+'\x22':'';console['log']('\x20\x20\x20\x20\x20🎯\x20Element:\x20<'+_0x1b3509+'>'+_0x39626d),console[_0x237ec9(0x173)]('\x20\x20\x20\x20\x20📋\x20Selector:\x20'+_0x588228['domRef']['selector']);}else{if(_0x588228['spatial']){const _0x518fba=_0x588228['spatial'][_0x237ec9(0xf2)];_0x588228[_0x237ec9(0xe9)]['type']===_0x237ec9(0x19c)&&_0x17d0dd['FaKUH'](_0x518fba['length'],0x2)?console[_0x237ec9(0x173)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20('+_0x518fba[0x0][_0x237ec9(0x19b)](0x2)+',\x20'+_0x518fba[0x1][_0x237ec9(0x19b)](0x2)+')'):console[_0x237ec9(0x173)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0x588228[_0x237ec9(0xe9)]['type']+_0x237ec9(0xfd)+_0x518fba['map'](_0x2759a9=>_0x2759a9[_0x237ec9(0x19b)](0x2))[_0x237ec9(0xcf)](',\x20')+']');}}}if(_0x3a483e[_0x237ec9(0x10f)]){console['log']('\x20\x20Expected\x20flow:');for(const _0x142db9 of _0x3a483e[_0x237ec9(0x10f)][_0x237ec9(0x128)]('\x0a')){console['log'](_0x237ec9(0xcd)+_0x142db9);}}}else console['log'](_0x237ec9(0x101)+_0x17d0dd[_0x237ec9(0xce)](_0x3480e4,0x1)+_0x237ec9(0x12a)+_0x12cb81[_0x237ec9(0xd7)]+'\x22'+_0x1e5100+_0x237ec9(0x17c)),console[_0x237ec9(0x173)](_0x237ec9(0x162));console[_0x237ec9(0x173)]('');}}export async function featureDelete(_0x2b98c5){const _0x2ed8fe=_0x3dcc19,_0x408143={'FpZGF':function(_0x1f6fd6,_0x136236){return _0x1f6fd6+_0x136236;}},_0x22123b=_0x2b98c5||await getActiveFeatureId();if(!_0x22123b)throw new Error(_0x2ed8fe(0xea));const _0x321c23=await getFeature(_0x22123b);await softDeleteFeature(_0x22123b),console['log']('\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20'+_0x321c23['name']+'\x20('+_0x22123b+')'),console[_0x2ed8fe(0x173)](_0x408143[_0x2ed8fe(0x10d)](_0x2ed8fe(0x157),_0x22123b));}export async function featureRestore(_0xfa5ad5){await restoreFeature(_0xfa5ad5);const _0x4833ce=await getFeature(_0xfa5ad5);console['log']('\x0a✅\x20Restored\x20feature\x20review:\x20'+_0x4833ce['name']+'\x20('+_0xfa5ad5+')'),displayFeature(_0x4833ce,_0x4833ce['checklistItems']);}function _0xa8e7(){const _0x50f5b4=['coordinates','unaddressedComments','tXjpA','258256FiFPDn','iZSEB','\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20','textContent','223595cesVCx','write','closed','GXZqo','\x20at\x20[','blockedReason','AUNvY','.\x20Feature\x20review\x20has\x20','Scenario\x20','SEpAI','\x20\x20\x20Status:\x20','toLocaleDateString','iteration','\x20--current-branch','verified','Step\x20','vmbkb','completed','\x0a✅\x20Resumed\x20feature\x20review:\x20','pqFzz','FpZGF','EHyar','canonicalFlow','content','bIdfl','\x0aGenerating\x20report...','DDQCr','completedAt','\x1b[0m','find','parentItemId','blocked','github.com/','\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','Showing\x20','.md','sORbJ','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','trim','DedmT','filter','\x20\x20\x20Description:\x20','\x0a✅\x20Session\x20is\x20already\x20completed.','scenario','excludeScenarios','\x20—\x20','terminalReason','split','\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.',':\x20\x22','selector','Not\x20in\x20a\x20git\x20repository.','\x0a⚠️\x20\x20','error','\x20\x20\x20\x20\x20Branch:\x20','stats','cohrh','scenarios','verifiedItems','VRSjl','HGBIF','items','cAtqN','replace','stdin','feedback-images','pipe','dashboardUrl','incomplete','ready','pInNb','name','\x20--limit\x20','arrayBuffer','QksJy','createdAt','assets','slice','gitBranch','element','stdout','oWtlu','UlJMd','2042362muqZQB','linkedSession','version','json','trimEnd','toLocaleString','after','kBeYj','isInteger','SFLgy','\x20\x20\x20Created:\x20','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','CLAUDE_SESSION_ID','wokdQ','any','latestReview','git\x20rev-parse\x20--abbrev-ref\x20HEAD','exit','env','No\x20sessions\x20found.','has','screenshotUrls','\x20\x20✅\x20No\x20feedback\x20to\x20address','\x20incomplete','totalCount','uutqs','OgvBr','warn','utf-8','NpRQW','\x20\x20💬\x20','PHxdx','lRCgt','dNrUD','agentResponse','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','\x20feature\x20review(s)\x20found','\x20\x20\x20▶️\x20Started\x20session\x20','DkFFk','log','BSvVu','\x20of\x20','134124WMSSfM','map','\x0aCreating\x20feature\x20review...','repeat','submittedAt','\x20concluded.','\x20—\x20no\x20comments','VTqxV','gitRepoUrl','\x0a\x20\x20\x20Scenarios:','JLVoO','\x20(v','/api/v1/mcp/browser-sessions/','sDhLB','wBWIQ','PQEjy','vvdTD','RhwRz','aXlXm','DOKkI','24sqTdxl','sessionId','MHwVx','\x20\x20\x20\x20\x20\x20Cancelled:\x20','offset','isTTY','DBQcb','Cannot\x20conclude\x20session\x20with\x20status:\x20','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','kiVOF','acQby','Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20','\x20\x20\x20Completed:\x20','zSnIr','OfvoR','verificationInProgressItems','RwJwZ','toFixed','point','screenshot','fZpqe','git\x20remote\x20get-url\x20origin','OGyIG','checklistItems','comment_','\x0a✅\x20Report\x20generated:\x20','\x20\x20\x20Branch:\x20','416946qxMooY','HTEWP','stqkg','LAMgy','RANGER_TEST_USERNAME','GcXNO','\x0a✅\x20Feature\x20review\x20created:\x20','domRef','location','\x20\x20\x20\x20','JuzkX','join','push','\x20\x20\x20\x20\x20📷\x20Screenshot:\x20','bIpcT','MvJdl','limit','No\x20scenarios\x20found.','incompleteReason','description','selected','\x20\x20\x20Updated\x20branch\x20to:\x20','reports','length','\x20scenario(s).','short','in_progress','Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','893692zUcohl','currentSessionId','status','\x20\x20\x20','LqoGE','\x20Session\x20','pmxkc','...','\x20\x20\x20Progress:\x20','spatial','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','assetUrl','btcMq','includeDeleted','assetType','canceledReason','approved','5999472kXQKuB'];_0xa8e7=function(){return _0x50f5b4;};return _0xa8e7();}
1
+ const _0x24d357=_0x50f1;(function(_0x3ffff7,_0x55ba8d){const _0x28bd5e=_0x50f1,_0x23d0a9=_0x3ffff7();while(!![]){try{const _0x2cbd94=parseInt(_0x28bd5e(0x177))/0x1*(parseInt(_0x28bd5e(0x138))/0x2)+-parseInt(_0x28bd5e(0x1cf))/0x3+-parseInt(_0x28bd5e(0x12f))/0x4*(parseInt(_0x28bd5e(0x1af))/0x5)+-parseInt(_0x28bd5e(0x18b))/0x6*(-parseInt(_0x28bd5e(0x19e))/0x7)+parseInt(_0x28bd5e(0x1ae))/0x8+parseInt(_0x28bd5e(0x1ba))/0x9*(parseInt(_0x28bd5e(0x193))/0xa)+parseInt(_0x28bd5e(0x132))/0xb;if(_0x2cbd94===_0x55ba8d)break;else _0x23d0a9['push'](_0x23d0a9['shift']());}catch(_0x3cf32d){_0x23d0a9['push'](_0x23d0a9['shift']());}}}(_0x4e83,0x9b97c));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x32f418 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';function _0x4e83(){const _0x3d5c1b=['0|5|3|1|2|4','Showing\x20','\x20scenario(s).','FfVUN','from','iteration','\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20','\x20in\x20progress','LxsqR','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','version','utf-8','pipe','\x20blocked','LaeAm','toLocaleString','efpmj','json','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','verified','\x20—\x20','7528etjjXa','numeric','FoxFX','14787289TCvirx','totalCount',':\x20\x22','wxfzr','prompt','push','2kSCARL','screenshotUrls','linkedSession','rhhvd','items','\x20\x20\x20Branch:\x20','selected','blockedReason','incompleteReason','canonicalFlow','CvTmO','\x20\x20\x20\x20\x20Progress:\x20','\x0a\x20\x20\x20Scenarios:','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','CLAUDE_SESSION_ID','checklistItems','domRef','RANGER_TEST_USERNAME','EsGKu','filter','assetUrl','\x0a❌\x20Invalid\x20scenario\x20index:\x20','spatial','scenario','limit','\x20of\x20','\x20\x20\x20Progress:\x20','\x20\x20\x20Repository:\x20','\x20\x20\x20\x20','\x1b[1m','\x20--current-branch','fyFGW','yxRxR','aVLLZ','exit','ieYiA','Screenshot\x20','latestReview','warn','in_progress','):\x20\x22','arrayBuffer','wCyHW','NWuGu','LFxCg','error','\x20Session\x20','\x0a✅\x20Scenario\x20added','zBOBd','qEKpr','GKbOg','\x0aCreating\x20feature\x20review...','closed','PLqIh','RdpVj','scenarios','reports','\x20\x20\x20Completed:\x20','North','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','\x20[has\x20reviewer\x20feedback]','LIfdF','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','5777CTRdkg','createdAt','\x20—\x20no\x20comments','No\x20scenarios\x20found.','unaddressedComments','yciUj','\x20concluded.','Not\x20in\x20a\x20git\x20repository.','terminalReason','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','approved','replace','pSsQs','/api/v1/mcp/browser-sessions/','completed','includeDeleted','qaDwI','screenshot','\x20\x20\x20','TxuyN','2502vKuIKv','canceledReason','\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','agentResponse','1|4|5|0|3|2','coordinates','\x20\x20\x20▶️\x20Started\x20session\x20','active-feature.txt','169250RLkFka','\x20\x20\x20\x20\x20Branch:\x20','...','pop','JytAy','.\x20Feature\x20review\x20has\x20','currentSessionId','hKEEB','IfFTA','Next\x20page:\x20ranger\x20list\x20--offset\x20','incompleteItems','11809vNveWs','FRVkL','\x20\x20\x20Updated\x20branch\x20to:\x20','sessionId','browserSessionId','stepName','DiGJX','env','has','rhwSJ','verification_in_progress','notes','ossGH','stringify','trim','dashboardUrl','4542728NKiQqI','3385MKAWHX','qTxoV','Please\x20finish\x20your\x20review\x20first:','xRjPL','FYPLP','UJBKc','\x20\x20\x20Created:\x20','\x20\x20\x20\x20\x20\x20Approved','PJSMG','dQTyC','vQdGi','18MgBlzs','log','map','mjqXf','WzfpX','isTTY','\x0a✅\x20Resumed\x20feature\x20review:\x20','blocked','git\x20rev-parse\x20--abbrev-ref\x20HEAD','toFixed','AwIXB','\x20\x20\x20ID:\x20','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','currentBranch','lxZjZ','gitBranch','gAFVF','completedAt','CKgxp','Cannot\x20conclude\x20session\x20with\x20status:\x20','HMwkl','2231472dYtBNe','pendingItems','\x20/\x20','\x20at\x20[','\x0a✅\x20Session\x20','Scenario\x20','offset','name','write','github.com/','assetType','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','\x20\x20\x20\x20\x20📋\x20Selector:\x20','guLad','\x0aAvailable\x20scenarios:','length','cOGZJ','No\x20active\x20session\x20for\x20this\x20feature\x20review.','psuBM','toLocaleDateString','\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20','vVBWR','parentItemId','status','description','stats','split','\x20feature\x20review(s)\x20found','submittedAt','LzDWL','\x20\x20Expected\x20flow:','\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20(','authorName','MGVuE','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','Current\x20session\x20not\x20found.','\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'];_0x4e83=function(){return _0x3d5c1b;};return _0x4e83();}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=_0x24d357(0x192),bold=_0x4887ec=>_0x24d357(0x155)+_0x4887ec+'\x1b[0m';function getGitRepoUrl(){const _0x4ce97c=_0x24d357,_0x1da8b6={'DolBx':'git\x20remote\x20get-url\x20origin','rhhvd':'pipe'};try{const _0x381d10=execSync(_0x1da8b6['DolBx'],{'encoding':'utf-8','stdio':[_0x4ce97c(0x126),_0x1da8b6[_0x4ce97c(0x13b)],_0x1da8b6['rhhvd']]})[_0x4ce97c(0x1ac)]();return _0x381d10[_0x4ce97c(0x182)](/\.git$/,'')[_0x4ce97c(0x182)](/^git@github\.com:/,_0x4ce97c(0x1d8))[_0x4ce97c(0x182)](/^https?:\/\//,'');}catch{return undefined;}}function _0x50f1(_0x424933,_0x4e77bf){_0x424933=_0x424933-0x118;const _0x4e8332=_0x4e83();let _0x50f155=_0x4e8332[_0x424933];return _0x50f155;}function getGitBranch(){const _0x476dfa=_0x24d357,_0x387bed={'EncHD':_0x476dfa(0x1c2),'qDrAc':_0x476dfa(0x125)};try{return execSync(_0x387bed['EncHD'],{'encoding':_0x387bed['qDrAc'],'stdio':[_0x476dfa(0x126),_0x476dfa(0x126),_0x476dfa(0x126)]})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x408c7d=_0x24d357,_0x5e2e8b={'fQuFl':function(_0x4c30be,_0x4887e5,_0x13cac9){return _0x4c30be(_0x4887e5,_0x13cac9);},'QrkwK':function(_0x2ed0b4){return _0x2ed0b4();},'LFxCg':'utf-8'},_0x29162b=_0x5e2e8b['fQuFl'](join,_0x5e2e8b['QrkwK'](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0x29162b))return null;try{const _0x4a9fa9=await _0x5e2e8b['fQuFl'](readFile,_0x29162b,_0x5e2e8b[_0x408c7d(0x164)]);return _0x4a9fa9['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x29f11b){const _0x18d059=_0x24d357,_0x353b6d={'dlUkp':function(_0x4f8f5f,_0x3dd47c,_0x2bba3d){return _0x4f8f5f(_0x3dd47c,_0x2bba3d);},'SLGDc':function(_0x4a607d,_0x4f302d){return _0x4a607d(_0x4f302d);},'gAFVF':function(_0xf1cf0b,_0x58a9f9,_0xd67b6d,_0x3f42dd){return _0xf1cf0b(_0x58a9f9,_0xd67b6d,_0x3f42dd);},'WpoVY':'utf-8'},_0x3a71bd=getRangerDir(),_0xff13e9=_0x353b6d['dlUkp'](join,_0x3a71bd,ACTIVE_FEATURE_FILE);!_0x353b6d['SLGDc'](existsSync,_0x3a71bd)&&await mkdir(_0x3a71bd,{'recursive':!![]}),await _0x353b6d[_0x18d059(0x1ca)](writeFile,_0xff13e9,_0x29f11b,_0x353b6d['WpoVY']);}function getProgressDisplay(_0x191095){const _0x3a7cd2=_0x24d357,_0x1cdbf7={'lxZjZ':function(_0x2073f2,_0x5b8e56){return _0x2073f2+_0x5b8e56;},'mdMig':function(_0x42c3b8,_0x38917a){return _0x42c3b8+_0x38917a;},'teNji':function(_0x114723,_0x5d9cc5){return _0x114723===_0x5d9cc5;},'UJBKc':function(_0x1825c1,_0x3d4dd6){return _0x1825c1*_0x3d4dd6;},'yxRxR':function(_0x2cc928,_0x36d205){return _0x2cc928-_0x36d205;},'PJSMG':function(_0x249072,_0x2ac006){return _0x249072>_0x2ac006;}},_0x3b8281=_0x191095['verifiedItems']||0x0,_0x5d6082=_0x191095['verificationInProgressItems']||0x0,_0x5de6ab=_0x191095['blockedItems']||0x0,_0x1d35d0=_0x191095[_0x3a7cd2(0x19d)]||0x0,_0x3cfd0d=_0x191095[_0x3a7cd2(0x1d0)]||0x0,_0x356c82=_0x1cdbf7[_0x3a7cd2(0x1c8)](_0x1cdbf7[_0x3a7cd2(0x1c8)](_0x1cdbf7['mdMig'](_0x3b8281,_0x5d6082),_0x5de6ab)+_0x1d35d0,_0x3cfd0d);if(_0x1cdbf7['teNji'](_0x356c82,0x0))return'-';const _0x43ef54=0xa,_0x1df4a4=Math['round'](_0x1cdbf7[_0x3a7cd2(0x1b4)](_0x3b8281/_0x356c82,_0x43ef54)),_0x1b193a=_0x1cdbf7[_0x3a7cd2(0x1c8)]('█'['repeat'](_0x1df4a4),'░'['repeat'](_0x1cdbf7[_0x3a7cd2(0x158)](_0x43ef54,_0x1df4a4))),_0x5c7b0c=[];if(_0x5de6ab>0x0)_0x5c7b0c['push'](_0x5de6ab+_0x3a7cd2(0x127));if(_0x1d35d0>0x0)_0x5c7b0c[_0x3a7cd2(0x137)](_0x1d35d0+'\x20incomplete');if(_0x1cdbf7[_0x3a7cd2(0x1b7)](_0x5d6082,0x0))_0x5c7b0c['push'](_0x5d6082+_0x3a7cd2(0x121));const _0x173efd=_0x1cdbf7['PJSMG'](_0x5c7b0c['length'],0x0)?'\x20('+_0x5c7b0c['join'](',\x20')+')':'';return _0x1b193a+'\x20'+_0x3b8281+'/'+_0x356c82+'\x20verified'+_0x173efd;}function getCurrentSessionItems(_0x523315,_0x3323e4){const _0x493324=_0x24d357;if(!_0x523315[_0x493324(0x199)])return _0x3323e4[_0x493324(0x14b)](_0x187248=>!_0x187248['sessionId']);return _0x3323e4['filter'](_0x2ad8af=>_0x2ad8af[_0x493324(0x1a1)]===_0x523315[_0x493324(0x199)]||!_0x2ad8af['sessionId']);}function displayFeature(_0xab87e5,_0xa4937){const _0x490e82=_0x24d357,_0x5c0f9c={'vVBWR':function(_0x29a565,_0x597940){return _0x29a565(_0x597940);},'vQdGi':function(_0x298981,_0x542064){return _0x298981>_0x542064;},'PWEjl':function(_0x10df9d,_0x430529){return _0x10df9d<_0x430529;},'xRjPL':_0x490e82(0x16c),'NGLZU':'approved','plMSb':function(_0x5c0aef,_0x5ac2cd){return _0x5c0aef===_0x5ac2cd;},'FfVUN':'incomplete','hgwhS':_0x490e82(0x1c1),'ieYiA':'verification_in_progress','GJNyt':function(_0x596a33,_0xcb5871){return _0x596a33>_0xcb5871;},'ivzyP':function(_0x579816,_0x2ba67b){return _0x579816!==_0x2ba67b;},'oezZn':'verified','rhwSJ':function(_0x5007fc,_0x1c49d5){return _0x5007fc===_0x1c49d5;},'Yvoex':function(_0x174760,_0x585eb0){return _0x174760===_0x585eb0;}};console[_0x490e82(0x1bb)]('\x0a'+_0xab87e5[_0x490e82(0x1d6)]+'\x20('+_0xab87e5[_0x490e82(0x1ad)]+')');_0xab87e5['stats']&&console[_0x490e82(0x1bb)]('\x20\x20\x20Progress:\x20'+_0x5c0f9c[_0x490e82(0x1e4)](getProgressDisplay,_0xab87e5['stats']));_0xab87e5[_0x490e82(0x1e7)]&&console['log']('\x20\x20\x20Description:\x20'+_0xab87e5[_0x490e82(0x1e7)]);_0xab87e5['gitRepoUrl']&&console[_0x490e82(0x1bb)](_0x490e82(0x153)+_0xab87e5['gitRepoUrl']);_0xab87e5['gitBranch']&&console[_0x490e82(0x1bb)](_0x490e82(0x13d)+_0xab87e5['gitBranch']);console[_0x490e82(0x1bb)]('\x20\x20\x20Created:\x20'+new Date(_0xab87e5[_0x490e82(0x178)])['toLocaleString']());_0xab87e5['completedAt']&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0xab87e5['completedAt'])[_0x490e82(0x129)]());if(_0xa4937&&_0x5c0f9c[_0x490e82(0x1b9)](_0xa4937['length'],0x0)){console['log'](_0x490e82(0x144));for(let _0x3ffc36=0x0;_0x5c0f9c['PWEjl'](_0x3ffc36,_0xa4937[_0x490e82(0x1de)]);_0x3ffc36++){const _0x292091=_0xa4937[_0x3ffc36];let _0xb9a2f9;if(_0x292091['status']===_0x5c0f9c[_0x490e82(0x1b2)]&&_0x292091[_0x490e82(0x17f)]===_0x5c0f9c['NGLZU'])_0xb9a2f9='✅';else{if(_0x292091['status']===_0x490e82(0x12d))_0xb9a2f9='🟢';else{if(_0x5c0f9c['plMSb'](_0x292091['status'],_0x5c0f9c['FfVUN']))_0xb9a2f9='🟠';else{if(_0x292091[_0x490e82(0x1e6)]===_0x5c0f9c['hgwhS'])_0xb9a2f9='🛑';else{if(_0x292091['status']==='closed')_0xb9a2f9='⛔';else _0x292091[_0x490e82(0x1e6)]===_0x5c0f9c[_0x490e82(0x15b)]?_0xb9a2f9='⏳':_0xb9a2f9='⬜';}}}}const _0x206ab1=_0x5c0f9c['GJNyt'](_0x292091['version'],0x1)?'\x20(v'+_0x292091['version']+')':'',_0x112186=_0x292091['version']>0x1&&_0x292091[_0x490e82(0x1e5)]&&_0x5c0f9c['ivzyP'](_0x292091['status'],_0x5c0f9c['xRjPL'])&&_0x292091['status']!==_0x5c0f9c['oezZn']?_0x490e82(0x174):'';console['log'](_0x490e82(0x189)+(_0x3ffc36+0x1)+'.\x20'+_0xb9a2f9+'\x20'+_0x292091['description']+_0x206ab1+_0x112186);_0x5c0f9c[_0x490e82(0x1a7)](_0x292091[_0x490e82(0x1e6)],_0x5c0f9c['hgwhS'])&&_0x292091[_0x490e82(0x13f)]&&console['log']('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0x292091['blockedReason']);_0x292091[_0x490e82(0x1e6)]===_0x5c0f9c[_0x490e82(0x11d)]&&_0x292091[_0x490e82(0x140)]&&console[_0x490e82(0x1bb)]('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x292091[_0x490e82(0x140)]);if(_0x292091[_0x490e82(0x1e6)]===_0x5c0f9c['xRjPL']&&_0x292091['terminalReason']===_0x490e82(0x181))console[_0x490e82(0x1bb)](_0x490e82(0x1b6));else _0x5c0f9c['Yvoex'](_0x292091[_0x490e82(0x1e6)],_0x490e82(0x16c))&&_0x292091[_0x490e82(0x18c)]&&console['log']('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0x292091['canceledReason']);}}}export async function featureCreate(_0x2bdca7,_0x3e4554){const _0x2f2fc5=_0x24d357,_0x1e8222={'CvTmO':function(_0x329532){return _0x329532();},'MbqdY':function(_0x38b831,_0x1200f4){return _0x38b831===_0x1200f4;},'EyscD':function(_0x3d5351,_0xd39390){return _0x3d5351(_0xd39390);},'MBFQR':function(_0x387f06,_0x5dc229,_0x24a17d){return _0x387f06(_0x5dc229,_0x24a17d);},'ossGH':function(_0x1b0b31,_0x5131e8,_0x330163){return _0x1b0b31(_0x5131e8,_0x330163);}},{envNames:_0x337eca}=await getEnvNames();if(_0x337eca['length']===0x0&&!process[_0x2f2fc5(0x1a5)][_0x2f2fc5(0x149)]){let _0x30d623=0x0;try{_0x30d623=(await _0x1e8222[_0x2f2fc5(0x142)](listCloudProfiles))['length'];}catch{_0x30d623=0x1;}_0x1e8222['MbqdY'](_0x30d623,0x0)&&console[_0x2f2fc5(0x15e)]('\x0a'+formatProfileRequiredMessage(_0x503db0=>bold(_0x503db0)));}const _0x364130=_0x3e4554['scenarios']?_0x3e4554[_0x2f2fc5(0x16f)]['map'](_0xa49a06=>_0xa49a06['trim']()):[],_0x11b503=_0x1e8222[_0x2f2fc5(0x142)](getGitRepoUrl),_0x3872dc=_0x1e8222['CvTmO'](getGitBranch);console['log'](_0x2f2fc5(0x16b));const _0x1fcf90=await createFeature({'name':_0x2bdca7,'description':_0x3e4554[_0x2f2fc5(0x1e7)],'checklist':_0x364130,'gitRepoUrl':_0x11b503,'gitBranch':_0x3872dc});await _0x1e8222['EyscD'](setActiveFeatureId,_0x1fcf90['id']),await tryStartCurrentSession(_0x1fcf90['id']);const _0x5c4896=process['env'][_0x2f2fc5(0x146)];_0x5c4896&&_0x1e8222['MBFQR'](registerSession,_0x5c4896,_0x1fcf90['id']),console[_0x2f2fc5(0x1bb)]('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x1fcf90['id']),_0x1e8222[_0x2f2fc5(0x1aa)](displayFeature,_0x1fcf90,_0x1fcf90['checklistItems']),console[_0x2f2fc5(0x1bb)](_0x2f2fc5(0x176));}export async function featureList(_0x3146b3){const _0x38c2ce=_0x24d357,_0x43b31b={'rEjer':function(_0x493d73){return _0x493d73();},'jWTVE':function(_0x40a185,_0x27ee5a){return _0x40a185===_0x27ee5a;},'oPBPk':'\x0aNo\x20feature\x20reviews\x20found.','aVLLZ':_0x38c2ce(0x11a),'efpmj':function(_0x54b281,_0x321522){return _0x54b281(_0x321522);},'FRVkL':function(_0x2a41fc,_0x58dc20){return _0x2a41fc!==_0x58dc20;}},_0x53e9ef={'limit':_0x3146b3['limit']??0xa,'offset':_0x3146b3['offset']??0x0,'includeDeleted':_0x3146b3[_0x38c2ce(0x186)]};_0x3146b3['currentBranch']&&(_0x53e9ef['gitRepoUrl']=getGitRepoUrl(),_0x53e9ef[_0x38c2ce(0x1c9)]=_0x43b31b['rEjer'](getGitBranch));const _0x565c33=await listFeatures(_0x53e9ef);if(_0x43b31b['jWTVE'](_0x565c33['items'][_0x38c2ce(0x1de)],0x0)){console['log'](_0x43b31b['oPBPk']);return;}const _0x4c8ad6=_0x565c33['totalCount']>_0x565c33['items']['length']?_0x38c2ce(0x11b)+_0x565c33[_0x38c2ce(0x13c)]['length']+_0x38c2ce(0x151)+_0x565c33[_0x38c2ce(0x133)]:_0x565c33['totalCount']+_0x38c2ce(0x1ea);console['log']('\x0a'+_0x4c8ad6+':\x0a');for(const _0x229080 of _0x565c33[_0x38c2ce(0x13c)]){const _0x5567a8=_0x43b31b[_0x38c2ce(0x159)][_0x38c2ce(0x1e9)]('|');let _0x2ba154=0x0;while(!![]){switch(_0x5567a8[_0x2ba154++]){case'0':console[_0x38c2ce(0x1bb)](''+_0x229080['name']);continue;case'1':_0x229080[_0x38c2ce(0x1c9)]&&console['log']('\x20\x20\x20Branch:\x20'+_0x229080['gitBranch']);continue;case'2':console['log'](_0x38c2ce(0x1b5)+new Date(_0x229080['createdAt'])[_0x38c2ce(0x1e2)]());continue;case'3':_0x229080['stats']&&console[_0x38c2ce(0x1bb)](_0x38c2ce(0x152)+_0x43b31b[_0x38c2ce(0x12a)](getProgressDisplay,_0x229080['stats']));continue;case'4':console['log']('');continue;case'5':console['log'](_0x38c2ce(0x1c5)+_0x229080['id']);continue;}break;}}const _0x540c14=_0x53e9ef[_0x38c2ce(0x150)]??0xa,_0x4729fc=(_0x53e9ef[_0x38c2ce(0x1d5)]??0x0)+_0x565c33['items']['length'];if(_0x4729fc<_0x565c33[_0x38c2ce(0x133)]){const _0x21a8ee=_0x43b31b[_0x38c2ce(0x19f)](_0x540c14,0xa)?'\x20--limit\x20'+_0x540c14:'',_0x2166e1=_0x3146b3[_0x38c2ce(0x1c7)]?_0x38c2ce(0x156):'',_0x5e79f4=_0x3146b3['includeDeleted']?'\x20--include-deleted':'';console['log'](_0x38c2ce(0x19c)+_0x4729fc+_0x21a8ee+_0x2166e1+_0x5e79f4);}}export async function featureShow(_0x3e8ec5){const _0x3c7780={'jqtFI':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review'},_0x58d156=_0x3e8ec5||await getActiveFeatureId();if(!_0x58d156)throw new Error(_0x3c7780['jqtFI']);const _0x464319=await getFeature(_0x58d156);displayFeature(_0x464319,_0x464319['checklistItems']);}export async function featureResume(_0x4ce80e){const _0x1a7426=_0x24d357,_0x3a4d81={'VTxzb':function(_0x2c391f){return _0x2c391f();},'GKbOg':function(_0x158743,_0x45c24e){return _0x158743(_0x45c24e);},'YIvSd':function(_0x239663,_0x40a60b,_0x53b5db){return _0x239663(_0x40a60b,_0x53b5db);},'North':function(_0x58a594){return _0x58a594();},'CnbIP':_0x1a7426(0x17e),'xtLsu':'any','wxfzr':function(_0x1f7966,_0x1d2621){return _0x1f7966===_0x1d2621;},'IoBgz':'Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','hKEEB':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','wCyHW':function(_0x4ef9fd,_0x4fc0e2){return _0x4ef9fd!==_0x4fc0e2;},'psuBM':function(_0x50f99f,_0x2fd2ed){return _0x50f99f(_0x2fd2ed);},'TxuyN':function(_0x2c8891,_0xea6c59,_0x5be473){return _0x2c8891(_0xea6c59,_0x5be473);}};if(_0x4ce80e){const _0x3e107d=await getFeature(_0x4ce80e);await setActiveFeatureId(_0x3e107d['id']);const _0x512cc0=_0x3a4d81['VTxzb'](getGitBranch);_0x512cc0&&_0x512cc0!==_0x3e107d[_0x1a7426(0x1c9)]&&(await updateFeature(_0x3e107d['id'],{'gitBranch':_0x512cc0}),console[_0x1a7426(0x1bb)](_0x1a7426(0x1a0)+_0x512cc0));console[_0x1a7426(0x1bb)](_0x1a7426(0x1c0)+_0x3e107d['name']+'\x20('+_0x3e107d['id']+')'),await _0x3a4d81[_0x1a7426(0x16a)](tryStartCurrentSession,_0x3e107d['id']);const _0x4822a5=process[_0x1a7426(0x1a5)]['CLAUDE_SESSION_ID'];_0x4822a5&&_0x3a4d81['YIvSd'](registerSession,_0x4822a5,_0x3e107d['id']);displayFeature(_0x3e107d,_0x3e107d[_0x1a7426(0x147)]),await _0x3a4d81['GKbOg'](printFeedbackNudge,_0x3e107d['id']);return;}const _0x330419=_0x3a4d81[_0x1a7426(0x172)](getGitRepoUrl),_0x1dca65=_0x3a4d81['VTxzb'](getGitBranch);if(!_0x330419&&!_0x1dca65)throw new Error(_0x3a4d81['CnbIP']);console[_0x1a7426(0x1bb)](_0x1a7426(0x119)+(_0x330419||_0x3a4d81['xtLsu'])+_0x1a7426(0x1d1)+(_0x1dca65||'any')+_0x1a7426(0x195));const _0x3f35b4=await listFeatures({'gitRepoUrl':_0x330419,'gitBranch':_0x1dca65}),_0x22ffed=_0x3f35b4['items'][_0x1a7426(0x14b)](_0x4182b0=>_0x4182b0[_0x1a7426(0x1e6)]?_0x4182b0[_0x1a7426(0x1e6)]!==_0x1a7426(0x12d):!_0x4182b0[_0x1a7426(0x1cb)]);if(_0x3a4d81[_0x1a7426(0x135)](_0x22ffed[_0x1a7426(0x1de)],0x0)){console[_0x1a7426(0x1bb)](_0x1a7426(0x1c6)),console[_0x1a7426(0x1bb)](_0x1a7426(0x180));return;}let _0x5c5179;if(_0x22ffed['length']===0x1)_0x5c5179=_0x22ffed[0x0];else{const _0x1dba5e=process['stdin']['isTTY']&&process['stdout'][_0x1a7426(0x1bf)];if(!_0x1dba5e){console['log']('\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:');for(const _0x4f2029 of _0x22ffed){console[_0x1a7426(0x1bb)]('\x20\x20'+_0x4f2029[_0x1a7426(0x1d6)]),console[_0x1a7426(0x1bb)]('\x20\x20\x20\x20\x20ID:\x20'+_0x4f2029['id']),_0x4f2029[_0x1a7426(0x1e8)]&&console[_0x1a7426(0x1bb)](_0x1a7426(0x143)+getProgressDisplay(_0x4f2029['stats'])),_0x4f2029[_0x1a7426(0x1c9)]&&console[_0x1a7426(0x1bb)](_0x1a7426(0x194)+_0x4f2029[_0x1a7426(0x1c9)]);}throw new Error(_0x3a4d81['IoBgz']);}const {selected:_0x310b70}=await _0x32f418[_0x1a7426(0x136)]([{'type':'list','name':_0x1a7426(0x13e),'message':_0x3a4d81[_0x1a7426(0x19a)],'choices':_0x22ffed[_0x1a7426(0x1bc)](_0x5041b4=>({'name':_0x5041b4['name']+'\x20('+_0x5041b4['id']+')','value':_0x5041b4['id']}))}]);_0x5c5179=_0x22ffed['find'](_0x91d30f=>_0x91d30f['id']===_0x310b70);}await _0x3a4d81[_0x1a7426(0x16a)](setActiveFeatureId,_0x5c5179['id']);_0x1dca65&&_0x3a4d81[_0x1a7426(0x162)](_0x1dca65,_0x5c5179[_0x1a7426(0x1c9)])&&(await updateFeature(_0x5c5179['id'],{'gitBranch':_0x1dca65}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x1dca65));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x5c5179[_0x1a7426(0x1d6)]+'\x20('+_0x5c5179['id']+')'),await _0x3a4d81[_0x1a7426(0x1e1)](tryStartCurrentSession,_0x5c5179['id']);const _0x527527=await getFeature(_0x5c5179['id']),_0x259e65=process['env'][_0x1a7426(0x146)];_0x259e65&&registerSession(_0x259e65,_0x527527['id']),_0x3a4d81[_0x1a7426(0x18a)](displayFeature,_0x527527,_0x527527[_0x1a7426(0x147)]),await printFeedbackNudge(_0x527527['id']);}async function printFeedbackNudge(_0x39bff1){const _0x443232=_0x24d357,_0x45b0e0={'JytAy':function(_0x40a059,_0x2463b6){return _0x40a059(_0x2463b6);},'jcvWc':function(_0xb6b19f,_0x4e123a){return _0xb6b19f>_0x4e123a;}};try{const {items:_0x3a0c88}=await _0x45b0e0[_0x443232(0x197)](getActionItems,_0x39bff1);let _0x377b2f=0x0,_0x179758=0x0;for(const _0xa59cd7 of _0x3a0c88){const _0x2bbbc8=await getItemFeedback(_0x39bff1,_0xa59cd7['id']);_0x45b0e0['jcvWc'](_0x2bbbc8[_0x443232(0x17b)]['length'],0x0)&&(_0x377b2f+=_0x2bbbc8['unaddressedComments']['length'],_0x179758++);}_0x377b2f>0x0&&(console[_0x443232(0x1bb)]('\x0a⚠️\x20\x20'+_0x377b2f+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x179758+_0x443232(0x11c)),console[_0x443232(0x1bb)]('\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'));}catch{}}async function tryStartCurrentSession(_0x88daee){const _0x574a30=_0x24d357,_0x5d56b6={'EqcGt':function(_0x37bac2,_0x4dfa29,_0x5ac92c){return _0x37bac2(_0x4dfa29,_0x5ac92c);}};try{const {sessions:_0x3f695f}=await listFeatureSessions(_0x88daee),_0x279e57=_0x3f695f['find'](_0x3428c8=>_0x3428c8['status']==='ready');_0x279e57&&(await _0x5d56b6['EqcGt'](startSession,_0x88daee,_0x279e57['id']),console[_0x574a30(0x1bb)](_0x574a30(0x191)+_0x279e57['iteration']));}catch{}}export async function featureReport(_0x4598b2,_0x2e56eb){const _0x575205=_0x24d357,_0x17c076={'pxgpB':function(_0x17c897){return _0x17c897();},'qTxoV':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','IfFTA':function(_0x228099,_0x3e952d,_0x32bd83,_0xef5f23){return _0x228099(_0x3e952d,_0x32bd83,_0xef5f23);},'qaDwI':function(_0x30b7cd){return _0x30b7cd();},'EtUky':_0x575205(0x170),'EsGKu':function(_0x4d3a97,_0x2f39ad,_0x45302d){return _0x4d3a97(_0x2f39ad,_0x45302d);},'auhCy':function(_0x3e0ae5,_0x4bf80f,_0xd7fe9d,_0x30629e){return _0x3e0ae5(_0x4bf80f,_0xd7fe9d,_0x30629e);}},_0x55ba14=_0x4598b2||await _0x17c076['pxgpB'](getActiveFeatureId);if(!_0x55ba14)throw new Error(_0x17c076[_0x575205(0x1b0)]);console[_0x575205(0x1bb)]('\x0aGenerating\x20report...');const _0x1e8d2a=await getFeatureReportMarkdown(_0x55ba14,{'style':_0x2e56eb['style']}),_0x19be0c=_0x2e56eb['output']||_0x17c076[_0x575205(0x19b)](join,_0x17c076[_0x575205(0x187)](getRangerDir),_0x17c076['EtUky'],_0x55ba14+'.md'),_0x241646=_0x17c076[_0x575205(0x14a)](join,_0x19be0c,'..');!existsSync(_0x241646)&&await _0x17c076[_0x575205(0x14a)](mkdir,_0x241646,{'recursive':!![]}),await _0x17c076['auhCy'](writeFile,_0x19be0c,_0x1e8d2a,_0x575205(0x125)),console[_0x575205(0x1bb)]('\x0a✅\x20Report\x20generated:\x20'+_0x19be0c);}function getScenarioResult(_0x55698b){const _0x329803=_0x24d357,_0x3ff30b={'LIfdF':function(_0xe1fb58,_0x54ce4b){return _0xe1fb58===_0x54ce4b;},'iyPuo':'closed','yCbKc':'in_progress'};if(_0x3ff30b[_0x329803(0x175)](_0x55698b[_0x329803(0x1e6)],_0x3ff30b['iyPuo']))return _0x55698b['terminalReason']??_0x329803(0x16c);if(_0x55698b['status']===_0x329803(0x1a8))return _0x3ff30b['yCbKc'];return _0x55698b['status'];}function getScenarioRationale(_0xf222c5,_0x379e5f){const _0x3e419b=_0x24d357,_0x4df157={'XMFpO':_0x3e419b(0x18f)},_0x558267=_0x4df157['XMFpO'][_0x3e419b(0x1e9)]('|');let _0x5ec274=0x0;while(!![]){switch(_0x558267[_0x5ec274++]){case'0':if(_0xf222c5['canceledReason'])return _0xf222c5['canceledReason'];continue;case'1':if(_0x379e5f)return _0x379e5f;continue;case'2':return null;case'3':if(_0xf222c5['notes'])return _0xf222c5[_0x3e419b(0x1a9)];continue;case'4':if(_0xf222c5[_0x3e419b(0x13f)])return _0xf222c5[_0x3e419b(0x13f)];continue;case'5':if(_0xf222c5[_0x3e419b(0x140)])return _0xf222c5[_0x3e419b(0x140)];continue;}break;}}export async function featureReportPrDescription(_0x2a1573,_0x1e9c4a){const _0x42d04e=_0x24d357,_0x329ec5={'HMwkl':function(_0x5dcc16){return _0x5dcc16();},'cOGZJ':_0x42d04e(0x12c),'pSsQs':function(_0x3ae8c3,_0x2f8bf1){return _0x3ae8c3===_0x2f8bf1;},'WzfpX':_0x42d04e(0x18d),'Nvotv':'\x0aAvailable\x20scenarios:','hAYUL':function(_0x31aa16,_0x41f94d){return _0x31aa16+_0x41f94d;},'GNokD':'\x0a❌\x20All\x20scenarios\x20were\x20excluded.'},_0x1deefc=_0x2a1573||await _0x329ec5[_0x42d04e(0x1ce)](getActiveFeatureId);if(!_0x1deefc)throw new Error(_0x329ec5[_0x42d04e(0x1df)]);const _0x553640=await getFeature(_0x1deefc),_0x4c322b=_0x553640['checklistItems']||[],_0x5cbec7=getCurrentSessionItems(_0x553640,_0x4c322b);_0x329ec5[_0x42d04e(0x183)](_0x5cbec7['length'],0x0)&&(console['error'](_0x329ec5[_0x42d04e(0x1be)]),process[_0x42d04e(0x15a)](0x1));const _0x18e921=_0x1e9c4a['excludeScenarios']??[],_0x31985a=_0x18e921[_0x42d04e(0x14b)](_0x5df255=>!Number['isInteger'](_0x5df255)||_0x5df255<0x1||_0x5df255>_0x5cbec7['length']);if(_0x31985a[_0x42d04e(0x1de)]>0x0){console[_0x42d04e(0x165)](_0x42d04e(0x123)+_0x31985a['join'](',\x20')),console[_0x42d04e(0x1bb)](_0x329ec5['Nvotv']);for(let _0x9b0d88=0x0;_0x9b0d88<_0x5cbec7['length'];_0x9b0d88++){console['log']('\x20\x20'+_0x329ec5['hAYUL'](_0x9b0d88,0x1)+'.\x20'+_0x5cbec7[_0x9b0d88]['description']);}process['exit'](0x1);}const _0xeb590f=new Set(_0x18e921[_0x42d04e(0x1bc)](_0x2186dd=>_0x2186dd-0x1)),_0x2a13da=_0x5cbec7[_0x42d04e(0x14b)]((_0x2c05c7,_0x1f9445)=>!_0xeb590f[_0x42d04e(0x1a6)](_0x1f9445));_0x2a13da[_0x42d04e(0x1de)]===0x0&&(console[_0x42d04e(0x165)](_0x329ec5['GNokD']),process['exit'](0x1));if(_0x1e9c4a[_0x42d04e(0x12b)])await outputJsonReport(_0x1deefc,_0x553640,_0x2a13da);else{const _0x26ccf8=await getFeatureReportMarkdown(_0x1deefc,{'itemIds':_0x2a13da['map'](_0x404c97=>_0x404c97['id'])});process['stdout'][_0x42d04e(0x1d7)](_0x26ccf8['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x235a44,_0xdf0dd2,_0xd8ae90){const _0x2da812=_0x24d357,_0x55d5d3={'YSqCy':function(_0x5e0ed1,_0xb5c459){return _0x5e0ed1>_0xb5c459;},'fesvJ':function(_0x7b8ee9,_0x46b74c){return _0x7b8ee9(_0x46b74c);},'dyoqF':function(_0x51c535){return _0x51c535();},'gWKsf':function(_0x54fba2,_0x2d2821){return _0x54fba2(_0x2d2821);},'JUbfe':function(_0x4a114d,_0x51192b){return _0x4a114d+_0x51192b;}},_0x1da074=_0x55d5d3['dyoqF'](getApiBaseUrl),_0x4fc319=await _0x55d5d3['gWKsf'](getFeatureReport,_0x235a44),_0x4e72a2=new Map(_0x4fc319['checklistItems']['map'](_0x1b352a=>[_0x1b352a['id'],_0x1b352a])),_0x5d1290=await Promise['all'](_0xd8ae90['map'](async _0x5e6fa1=>{const _0x3d6fd5=_0x50f1,_0x10e16b=_0x4e72a2['get'](_0x5e6fa1['id']),_0x1e5426=_0x10e16b?.[_0x3d6fd5(0x13a)]??null;let _0x21325b=[];if(_0x5e6fa1[_0x3d6fd5(0x1a2)])try{const {steps:_0x114821}=await getBrowserSessionSteps(_0x5e6fa1[_0x3d6fd5(0x1a2)]);_0x55d5d3['YSqCy'](_0x114821[_0x3d6fd5(0x1de)],0x0)&&(_0x21325b=_0x114821[_0x3d6fd5(0x1bc)](_0x71fc87=>{const _0x49711c=_0x3d6fd5,_0x4c53b4=_0x71fc87['assets']['find'](_0x26eb67=>_0x26eb67[_0x49711c(0x1d9)]===_0x49711c(0x188)&&_0x26eb67['timing']==='after')??_0x71fc87['assets']['find'](_0x4c5205=>_0x4c5205[_0x49711c(0x1d9)]===_0x49711c(0x188));let _0x4006d=null,_0x149350=null;if(_0x4c53b4){const _0x41e426=_0x4c53b4['storage']['location']['split']('/')[_0x49711c(0x196)]();_0x4006d=_0x1da074+_0x49711c(0x184)+_0x5e6fa1['browserSessionId']+'/artifacts/'+_0x41e426,_0x41e426&&(_0x149350=_0x41e426['replace'](/\.\w+$/,'')[_0x49711c(0x182)](/^(key_)?\d+_/,'')['replace'](/[-_]/g,'\x20'));}return{'description':_0x149350||_0x71fc87['description']||_0x71fc87[_0x49711c(0x1a3)]||'Step\x20'+_0x71fc87['position'],'screenshot':_0x4006d,'is_key_step':_0x71fc87['isKeyStep']};}));}catch{}return _0x21325b['length']===0x0&&_0x1e5426?.[_0x3d6fd5(0x139)]&&(_0x21325b=_0x1e5426['screenshotUrls'][_0x3d6fd5(0x1bc)]((_0x30f1cd,_0x31ec9d)=>({'description':_0x3d6fd5(0x15c)+(_0x31ec9d+0x1),'screenshot':_0x30f1cd,'is_key_step':![]}))),{'description':_0x5e6fa1['description'],'result':_0x55d5d3['fesvJ'](getScenarioResult,_0x5e6fa1),'rationale':getScenarioRationale(_0x5e6fa1,_0x1e5426?.[_0x3d6fd5(0x18e)]),'steps':_0x21325b};})),_0x172995={'url':_0xdf0dd2[_0x2da812(0x1ad)],'scenarios':_0x5d1290};process['stdout']['write'](_0x55d5d3['JUbfe'](JSON[_0x2da812(0x1ab)](_0x172995,null,0x2),'\x0a'));}export async function featureConcludeSession(_0x2280b6){const _0x53485f=_0x24d357,_0x4c7435={'AwIXB':function(_0x27c757,_0x4df0a4){return _0x27c757(_0x4df0a4);},'mbFrY':_0x53485f(0x118),'fyFGW':'completed','mjqXf':'\x0a✅\x20Session\x20is\x20already\x20completed.','WMSnF':'\x0aConcluding\x20session...'},_0x1c6dc8=_0x2280b6||await getActiveFeatureId();if(!_0x1c6dc8)throw new Error(_0x53485f(0x145));const _0x10082b=await _0x4c7435[_0x53485f(0x1c4)](getFeature,_0x1c6dc8);if(!_0x10082b[_0x53485f(0x199)])throw new Error(_0x53485f(0x1e0));const {sessions:_0x3b9c39}=await listFeatureSessions(_0x1c6dc8),_0x323f56=_0x3b9c39['find'](_0x2f193e=>_0x2f193e['id']===_0x10082b['currentSessionId']);if(!_0x323f56)throw new Error(_0x4c7435['mbFrY']);if(_0x323f56[_0x53485f(0x1e6)]===_0x4c7435[_0x53485f(0x157)]){console['log'](_0x4c7435[_0x53485f(0x1bd)]);return;}if(_0x323f56[_0x53485f(0x1e6)]!==_0x53485f(0x15f))throw new Error(_0x53485f(0x1cd)+_0x323f56[_0x53485f(0x1e6)]);console[_0x53485f(0x1bb)](_0x4c7435['WMSnF']),await concludeSession(_0x1c6dc8,_0x10082b['currentSessionId']),console[_0x53485f(0x1bb)](_0x53485f(0x1d3)+_0x323f56[_0x53485f(0x11f)]+_0x53485f(0x17d)),console[_0x53485f(0x1bb)]('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x1eb9f6){const _0x510adf=_0x24d357,_0x374dde={'EuWpR':function(_0x5c1014){return _0x5c1014();},'PLqIh':_0x510adf(0x12c),'NWuGu':function(_0x572761,_0x3b3181){return _0x572761(_0x3b3181);}},_0x21c25f=_0x1eb9f6||await _0x374dde['EuWpR'](getActiveFeatureId);if(!_0x21c25f)throw new Error(_0x374dde[_0x510adf(0x16d)]);const _0x5eb6c2=await _0x374dde['NWuGu'](getFeature,_0x21c25f);console[_0x510adf(0x1bb)](_0x510adf(0x120)+_0x5eb6c2[_0x510adf(0x1d6)]+'\x0a');const {sessions:_0x227d91}=await _0x374dde[_0x510adf(0x163)](listFeatureSessions,_0x21c25f);if(_0x227d91['length']===0x0){console['log']('No\x20sessions\x20found.');return;}for(const _0x364b65 of _0x227d91){const _0x3a34b2=_0x364b65[_0x510adf(0x1e6)]===_0x510adf(0x185)?'✅':_0x364b65[_0x510adf(0x1e6)]==='in_progress'?'🔄':'▶️';console[_0x510adf(0x1bb)](_0x3a34b2+_0x510adf(0x166)+_0x364b65[_0x510adf(0x11f)]+'\x20('+_0x364b65['id']+')'),console['log']('\x20\x20\x20Status:\x20'+_0x364b65['status']),console[_0x510adf(0x1bb)]('\x20\x20\x20Created:\x20'+new Date(_0x364b65[_0x510adf(0x178)])['toLocaleString']()),_0x364b65['completedAt']&&console[_0x510adf(0x1bb)](_0x510adf(0x171)+new Date(_0x364b65[_0x510adf(0x1cb)])['toLocaleString']()),console[_0x510adf(0x1bb)]('');}}export async function featureAddScenario(_0x53e11c,_0x54ae61){const _0x2f81ad=_0x24d357,_0x55638d={'DiGJX':function(_0x3941bf){return _0x3941bf();},'GHCoo':function(_0x3ffafd,_0x50c422,_0xbd55e6){return _0x3ffafd(_0x50c422,_0xbd55e6);},'LOQQp':function(_0x1bb9bb,_0x496e69){return _0x1bb9bb(_0x496e69);}},_0xac4ffc=_0x54ae61||await _0x55638d[_0x2f81ad(0x1a4)](getActiveFeatureId);if(!_0xac4ffc)throw new Error(_0x2f81ad(0x145));const _0x4b0dc3=await getFeature(_0xac4ffc);if(_0x4b0dc3[_0x2f81ad(0x15d)]&&!_0x4b0dc3['latestReview']['submittedAt'])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x4b0dc3[_0x2f81ad(0x1ad)]);await _0x55638d['GHCoo'](createChecklistItem,_0xac4ffc,_0x53e11c);const _0x283a75=await _0x55638d['LOQQp'](getFeature,_0xac4ffc);console[_0x2f81ad(0x1bb)](_0x2f81ad(0x167)),displayFeature(_0x283a75,_0x283a75['checklistItems']);}export async function featureEditScenario(_0x1da771,_0x3738b0){const _0x10aa4b=_0x24d357,_0x2d9ebf={'MGVuE':function(_0x277996){return _0x277996();},'QKYlt':'\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','HNFpg':'Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','klYQO':function(_0x5599f6,_0x340884){return _0x5599f6(_0x340884);},'dQTyC':function(_0x3dca38,_0xf8e7a4){return _0x3dca38===_0xf8e7a4;},'OTGDK':_0x10aa4b(0x173),'GztSh':_0x10aa4b(0x1dd),'PMZCM':function(_0x1da774,_0x58fd28){return _0x1da774+_0x58fd28;},'qEKpr':function(_0x3cb902,_0x433dae){return _0x3cb902-_0x433dae;},'CKgxp':function(_0x52509a,_0x293b8d){return _0x52509a+_0x293b8d;},'EKwUC':function(_0x568064,_0x107df3,_0x231b68,_0x3a080c){return _0x568064(_0x107df3,_0x231b68,_0x3a080c);},'cYABu':function(_0x437ca5,_0x4cc404,_0x1bb7f5){return _0x437ca5(_0x4cc404,_0x1bb7f5);}},_0x4fff97=_0x3738b0['id']||await _0x2d9ebf[_0x10aa4b(0x1f0)](getActiveFeatureId);!_0x4fff97&&(console['error'](_0x2d9ebf['QKYlt']),console['error'](_0x2d9ebf['HNFpg']),process[_0x10aa4b(0x15a)](0x1));const _0x3da1a9=await _0x2d9ebf['klYQO'](getFeature,_0x4fff97);_0x3da1a9[_0x10aa4b(0x15d)]&&!_0x3da1a9['latestReview'][_0x10aa4b(0x1eb)]&&(console['error'](_0x10aa4b(0x1da)),console[_0x10aa4b(0x165)](_0x10aa4b(0x1b1)),console[_0x10aa4b(0x165)]('\x20\x20'+_0x3da1a9['dashboardUrl']),process[_0x10aa4b(0x15a)](0x1));const _0x3c0394=_0x3da1a9[_0x10aa4b(0x147)]||[];_0x2d9ebf['dQTyC'](_0x3c0394[_0x10aa4b(0x1de)],0x0)&&(console['error'](_0x2d9ebf['OTGDK']),process[_0x10aa4b(0x15a)](0x1));if(_0x2d9ebf[_0x10aa4b(0x1b8)](_0x3738b0['scenario'],undefined)){console['error']('\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.'),console['log'](_0x2d9ebf['GztSh']);for(let _0x308240=0x0;_0x308240<_0x3c0394[_0x10aa4b(0x1de)];_0x308240++){console[_0x10aa4b(0x1bb)]('\x20\x20'+_0x2d9ebf['PMZCM'](_0x308240,0x1)+'.\x20'+_0x3c0394[_0x308240]['description']);}process[_0x10aa4b(0x15a)](0x1);}const _0x26f630=_0x2d9ebf[_0x10aa4b(0x169)](_0x3738b0[_0x10aa4b(0x14f)],0x1);if(_0x26f630<0x0||_0x26f630>=_0x3c0394[_0x10aa4b(0x1de)]){console['error'](_0x10aa4b(0x14d)+_0x3738b0['scenario']+_0x10aa4b(0x198)+_0x3c0394[_0x10aa4b(0x1de)]+'\x20scenarios.'),console['log']('\x0aAvailable\x20scenarios:');for(let _0xf5f409=0x0;_0xf5f409<_0x3c0394[_0x10aa4b(0x1de)];_0xf5f409++){console['log']('\x20\x20'+_0x2d9ebf[_0x10aa4b(0x1cc)](_0xf5f409,0x1)+'.\x20'+_0x3c0394[_0xf5f409][_0x10aa4b(0x1e7)]);}process[_0x10aa4b(0x15a)](0x1);}const _0x56bc76=_0x3c0394[_0x26f630];await _0x2d9ebf['EKwUC'](updateChecklistItem,_0x4fff97,_0x56bc76['id'],{'description':_0x1da771});const _0x81cbe=await _0x2d9ebf['klYQO'](getFeature,_0x4fff97);console[_0x10aa4b(0x1bb)]('\x0a✅\x20Scenario\x20updated'),_0x2d9ebf['cYABu'](displayFeature,_0x81cbe,_0x81cbe['checklistItems']);}async function downloadFeedbackImage(_0x608aac,_0x1ec51e){const _0x2409ca=_0x24d357,_0x2b2239={'YiITU':'feedback-images','FoxFX':function(_0xdfc907,_0x229236,_0x400188){return _0xdfc907(_0x229236,_0x400188);},'pzAlP':function(_0x2cb0f6,_0x11ee67){return _0x2cb0f6(_0x11ee67);}};try{const _0x40444f=join(getRangerDir(),_0x2b2239['YiITU']);await mkdir(_0x40444f,{'recursive':!![]});const _0x4537e0=_0x2b2239[_0x2409ca(0x131)](join,_0x40444f,'comment_'+_0x1ec51e+'.png'),_0x37efc6=await _0x2b2239['pzAlP'](fetch,_0x608aac);if(!_0x37efc6['ok'])return null;const _0x4ed454=Buffer[_0x2409ca(0x11e)](await _0x37efc6[_0x2409ca(0x161)]());return await _0x2b2239['FoxFX'](writeFile,_0x4537e0,_0x4ed454),_0x4537e0;}catch{return null;}}export async function featureGetReview(_0x5f18e6){const _0x312f0f=_0x24d357,_0x39c98d={'RdpVj':function(_0x591bf0){return _0x591bf0();},'guLad':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','FYPLP':_0x312f0f(0x17a),'yciUj':function(_0x59a31f,_0x4303ce){return _0x59a31f>_0x4303ce;},'CvsjS':'en-US','KRBfa':'point','LaeAm':function(_0x9d00e2,_0x3fa25e){return _0x9d00e2+_0x3fa25e;}},_0x3bed7b=_0x5f18e6||await _0x39c98d[_0x312f0f(0x16e)](getActiveFeatureId);if(!_0x3bed7b)throw new Error(_0x39c98d[_0x312f0f(0x1dc)]);const _0x2594ae=await getFeature(_0x3bed7b),{items:_0xce874f}=await getActionItems(_0x3bed7b);console[_0x312f0f(0x1bb)]('\x0a📋\x20Feedback\x20for:\x20'+_0x2594ae[_0x312f0f(0x1d6)]+'\x20('+_0x2594ae['id']+')\x0a');if(_0xce874f['length']===0x0){console[_0x312f0f(0x1bb)](_0x39c98d[_0x312f0f(0x1b3)]);return;}for(let _0x45fa13=0x0;_0x45fa13<_0xce874f[_0x312f0f(0x1de)];_0x45fa13++){const _0x115067=_0xce874f[_0x45fa13],_0x5b0ab1=_0x39c98d[_0x312f0f(0x17c)](_0x115067[_0x312f0f(0x124)],0x1)?'\x20(v'+_0x115067[_0x312f0f(0x124)]+')':'',_0x4d0cde=await getItemFeedback(_0x3bed7b,_0x115067['id']);if(_0x4d0cde['unaddressedComments'][_0x312f0f(0x1de)]>0x0){console[_0x312f0f(0x1bb)](_0x312f0f(0x1d4)+(_0x45fa13+0x1)+_0x312f0f(0x134)+_0x115067['description']+'\x22'+_0x5b0ab1+_0x312f0f(0x12e)+_0x4d0cde[_0x312f0f(0x17b)]['length']+'\x20unaddressed\x20comment(s)');for(const _0x1589e2 of _0x4d0cde[_0x312f0f(0x17b)]){const _0x1896fb=new Date(_0x1589e2['createdAt'])['toLocaleDateString'](_0x39c98d['CvsjS'],{'month':'short','day':_0x312f0f(0x130)}),_0x2f73c5=_0x1589e2[_0x312f0f(0x1ef)]||_0x1589e2['authorEmail']||'Unknown';console['log']('\x20\x20💬\x20'+_0x2f73c5+'\x20('+_0x1896fb+_0x312f0f(0x160)+_0x1589e2['content']+'\x22');if(_0x1589e2['assetUrl']){const _0x2f3876=await downloadFeedbackImage(_0x1589e2[_0x312f0f(0x14c)],_0x1589e2['id']);_0x2f3876&&console[_0x312f0f(0x1bb)]('\x20\x20\x20\x20\x20📷\x20Screenshot:\x20'+_0x2f3876);}if(_0x1589e2[_0x312f0f(0x148)]){const _0xadd8aa=_0x1589e2[_0x312f0f(0x148)]['selector'][_0x312f0f(0x1e9)]('\x20>\x20')['pop']()?.[_0x312f0f(0x1e9)](':')[0x0]||'element',_0x1b16ed=_0x1589e2['domRef']['textContent']?'\x20\x22'+_0x1589e2[_0x312f0f(0x148)]['textContent']['slice'](0x0,0x3c)+'\x22':'';console[_0x312f0f(0x1bb)](_0x312f0f(0x1f1)+_0xadd8aa+'>'+_0x1b16ed),console['log'](_0x312f0f(0x1db)+_0x1589e2[_0x312f0f(0x148)]['selector']);}else{if(_0x1589e2['spatial']){const _0x2108d7=_0x1589e2[_0x312f0f(0x14e)][_0x312f0f(0x190)];_0x1589e2[_0x312f0f(0x14e)]['type']===_0x39c98d['KRBfa']&&_0x2108d7['length']>=0x2?console[_0x312f0f(0x1bb)](_0x312f0f(0x1ee)+_0x2108d7[0x0]['toFixed'](0x2)+',\x20'+_0x2108d7[0x1][_0x312f0f(0x1c3)](0x2)+')'):console[_0x312f0f(0x1bb)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0x1589e2['spatial']['type']+_0x312f0f(0x1d2)+_0x2108d7['map'](_0x4b19d4=>_0x4b19d4[_0x312f0f(0x1c3)](0x2))['join'](',\x20')+']');}}}if(_0x4d0cde[_0x312f0f(0x141)]){console[_0x312f0f(0x1bb)](_0x312f0f(0x1ed));for(const _0x2fd090 of _0x4d0cde[_0x312f0f(0x141)]['split']('\x0a')){console['log'](_0x312f0f(0x154)+_0x2fd090);}}}else console['log']('Scenario\x20'+_0x39c98d[_0x312f0f(0x128)](_0x45fa13,0x1)+_0x312f0f(0x134)+_0x115067['description']+'\x22'+_0x5b0ab1+_0x312f0f(0x179)),console['log']('\x20\x20✅\x20No\x20feedback\x20to\x20address');console['log']('');}}export async function featureDelete(_0x2a2f25){const _0x1d999f=_0x24d357,_0x5f5cdd={'EfSHv':_0x1d999f(0x145),'VKwMj':function(_0x2ff31c,_0x42cbdc){return _0x2ff31c(_0x42cbdc);},'aYoUS':function(_0x188a04,_0x642039){return _0x188a04+_0x642039;},'zBOBd':'\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20'},_0x45a35e=_0x2a2f25||await getActiveFeatureId();if(!_0x45a35e)throw new Error(_0x5f5cdd['EfSHv']);const _0x2cae14=await getFeature(_0x45a35e);await _0x5f5cdd['VKwMj'](softDeleteFeature,_0x45a35e),console['log'](_0x1d999f(0x1e3)+_0x2cae14['name']+'\x20('+_0x45a35e+')'),console[_0x1d999f(0x1bb)](_0x5f5cdd['aYoUS'](_0x5f5cdd[_0x1d999f(0x168)],_0x45a35e));}export async function featureRestore(_0x3167b9){const _0xec319e=_0x24d357,_0x231f31={'LxsqR':function(_0x4c1fa9,_0x8a8a08){return _0x4c1fa9(_0x8a8a08);},'LzDWL':function(_0x38d15a,_0x5aabc8){return _0x38d15a(_0x5aabc8);}};await _0x231f31[_0xec319e(0x122)](restoreFeature,_0x3167b9);const _0x43bc72=await _0x231f31[_0xec319e(0x1ec)](getFeature,_0x3167b9);console[_0xec319e(0x1bb)]('\x0a✅\x20Restored\x20feature\x20review:\x20'+_0x43bc72['name']+'\x20('+_0x3167b9+')'),displayFeature(_0x43bc72,_0x43bc72['checklistItems']);}