@ranger-testing/ranger-cli 2.5.4 → 3.0.1-alpha.46ed70b-30

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 (87) 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/deleteProfile.js +1 -0
  8. package/build/commands/env.js +1 -1
  9. package/build/commands/feature.js +1 -1
  10. package/build/commands/hook.js +1 -1
  11. package/build/commands/hooks/autoPrompt.js +1 -1
  12. package/build/commands/hooks/disable.js +1 -1
  13. package/build/commands/hooks/enable.js +1 -1
  14. package/build/commands/hooks/exitPlanMode.js +1 -1
  15. package/build/commands/hooks/index.js +1 -1
  16. package/build/commands/hooks/output.js +1 -1
  17. package/build/commands/hooks/planReminder.js +1 -1
  18. package/build/commands/hooks/planStart.js +1 -1
  19. package/build/commands/hooks/postEdit.js +1 -1
  20. package/build/commands/hooks/preCompact.js +1 -1
  21. package/build/commands/hooks/sessionEnd.js +1 -1
  22. package/build/commands/hooks/sessionStart.js +1 -1
  23. package/build/commands/hooks/stopHook.js +1 -1
  24. package/build/commands/index.js +1 -1
  25. package/build/commands/login.js +1 -1
  26. package/build/commands/mcpBootstrap.js +1 -1
  27. package/build/commands/migrateProfile.js +1 -0
  28. package/build/commands/setup/claude.js +1 -1
  29. package/build/commands/setup/opencode.js +1 -1
  30. package/build/commands/setupCi.js +1 -1
  31. package/build/commands/skillup.js +1 -1
  32. package/build/commands/start.js +1 -1
  33. package/build/commands/status.js +1 -1
  34. package/build/commands/update.js +1 -1
  35. package/build/commands/updateEnv.js +1 -1
  36. package/build/commands/useEnv.js +1 -1
  37. package/build/commands/utils/activeProfile.js +1 -1
  38. package/build/commands/utils/agentEnv.js +1 -1
  39. package/build/commands/utils/browserSessionsApi.js +1 -1
  40. package/build/commands/utils/claudeConfig.js +1 -1
  41. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  42. package/build/commands/utils/claudePlugin.js +1 -1
  43. package/build/commands/utils/cloudProfile.js +1 -0
  44. package/build/commands/utils/cloudProfileSession.js +1 -0
  45. package/build/commands/utils/crypto.js +1 -1
  46. package/build/commands/utils/desirePathLog.js +1 -1
  47. package/build/commands/utils/deviceAuth.js +1 -1
  48. package/build/commands/utils/environment.js +1 -1
  49. package/build/commands/utils/featureApi.js +1 -1
  50. package/build/commands/utils/fixWebmDuration.js +1 -1
  51. package/build/commands/utils/gitTracked.js +1 -0
  52. package/build/commands/utils/keychain.js +1 -1
  53. package/build/commands/utils/legacyWarning.js +1 -0
  54. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  55. package/build/commands/utils/matchAuthEnvironment.js +1 -0
  56. package/build/commands/utils/mcpImageBase64.js +1 -1
  57. package/build/commands/utils/model.js +1 -1
  58. package/build/commands/utils/novaActCli.js +1 -0
  59. package/build/commands/utils/opencodeConfig.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -0
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -0
  67. package/build/commands/utils/resolveProfileContext.js +1 -0
  68. package/build/commands/utils/resolveProfileUrl.js +1 -0
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/sessionCache.js +1 -1
  71. package/build/commands/utils/settings.js +1 -1
  72. package/build/commands/utils/skillContent.js +1 -1
  73. package/build/commands/utils/skills.js +1 -1
  74. package/build/commands/utils/stitchWebmFiles.js +1 -1
  75. package/build/commands/utils/telemetry.js +1 -1
  76. package/build/commands/utils/tokenRefresh.js +1 -1
  77. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  78. package/build/commands/utils/userApi.js +1 -1
  79. package/build/commands/utils/version.js +1 -1
  80. package/build/commands/verifyFeature.js +1 -1
  81. package/build/commands/verifyFeatureCli.js +1 -1
  82. package/build/commands/verifyFeatureNovaCli.js +1 -0
  83. package/build/commands/verifyFeatureRangerwrightCli.js +1 -0
  84. package/build/skills/ranger/SKILL.md +36 -6
  85. package/build/skills/ranger/create.md +19 -0
  86. package/build/skills/ranger/verify.md +46 -7
  87. package/package.json +9 -3
@@ -1 +1 @@
1
- (function(_0x1e65e0,_0x3b23c9){const _0x2617e6=_0x409c,_0x457ae2=_0x1e65e0();while(!![]){try{const _0x213fe8=parseInt(_0x2617e6(0xe0))/0x1*(parseInt(_0x2617e6(0xc3))/0x2)+parseInt(_0x2617e6(0xd8))/0x3+parseInt(_0x2617e6(0x125))/0x4*(-parseInt(_0x2617e6(0xba))/0x5)+-parseInt(_0x2617e6(0x132))/0x6*(-parseInt(_0x2617e6(0xc4))/0x7)+-parseInt(_0x2617e6(0xf5))/0x8*(-parseInt(_0x2617e6(0xd1))/0x9)+parseInt(_0x2617e6(0x105))/0xa*(-parseInt(_0x2617e6(0x12b))/0xb)+-parseInt(_0x2617e6(0x110))/0xc;if(_0x213fe8===_0x3b23c9)break;else _0x457ae2['push'](_0x457ae2['shift']());}catch(_0x30dd83){_0x457ae2['push'](_0x457ae2['shift']());}}}(_0x58d8,0xa95bf));import{mkdir,writeFile,readFile,unlink,rm,mkdtemp,rename}from'fs/promises';import{join}from'path';import _0x4dbb64 from'inquirer';import{chromium}from'playwright';import{findExistingEnv,loadSettings}from'./utils/settings.js';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';function _0x409c(_0x496bad,_0x376467){_0x496bad=_0x496bad-0xb0;const _0x58d826=_0x58d8();let _0x409cba=_0x58d826[_0x496bad];return _0x409cba;}import{writeActiveProfileName}from'./utils/activeProfile.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';async function checkUrlReachability(_0x323df2){const _0x108aa8=_0x409c,_0x109c10={'OhRtV':function(_0x387d7f,_0xcafb61,_0x172154){return _0x387d7f(_0xcafb61,_0x172154);},'KGDjy':'HEAD','yrWTK':'manual','HSUXW':function(_0x3a98de,_0x4b2bb7){return _0x3a98de(_0x4b2bb7);},'NLBoA':_0x108aa8(0xd0),'MVgDw':function(_0x13ef12,_0x313a00){return _0x13ef12===_0x313a00;},'wWeHX':_0x108aa8(0xb3)};try{const _0x17d89e=new AbortController(),_0x4b1423=_0x109c10[_0x108aa8(0xc2)](setTimeout,()=>_0x17d89e['abort'](),0x1388),_0x450d13={'method':_0x109c10['KGDjy'],'signal':_0x17d89e['signal'],'redirect':_0x109c10['yrWTK']};/^https:\/\/localhost(:\d+)?/i[_0x108aa8(0x108)](_0x323df2)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x360efb=await fetch(_0x323df2,_0x450d13);delete process[_0x108aa8(0xbf)]['NODE_TLS_REJECT_UNAUTHORIZED'],_0x109c10['HSUXW'](clearTimeout,_0x4b1423);if(_0x360efb['status']<0x190)return{'ok':!![]};return{'ok':![],'error':_0x108aa8(0xf1)+_0x360efb['status']};}catch(_0x2e6c19){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x24e286=_0x2e6c19,_0x2f03fe=_0x24e286[_0x108aa8(0xf8)]||_0x109c10[_0x108aa8(0x12c)](String,_0x2e6c19),_0x341a64=_0x2f03fe['includes'](_0x109c10['NLBoA'])||_0x109c10['MVgDw'](_0x24e286[_0x108aa8(0xdb)],'TypeError')||_0x2f03fe[_0x108aa8(0xed)](_0x109c10['wWeHX']);return{'ok':![],'error':_0x2f03fe,'isProtocolError':_0x341a64};}}export async function addEnv(_0x3b1dac,_0x550d59={},_0x5c3aa1){const _0x5714c3=_0x409c,_0x396852={'rzKpx':'close','Ppkfo':'user','sekTg':function(_0x179e02,_0x2b5ba1,_0x193a7d,_0x3fa2c8){return _0x179e02(_0x2b5ba1,_0x193a7d,_0x3fa2c8);},'dHQsn':function(_0x193106,_0x56b60d){return _0x193106+_0x56b60d;},'WHseH':function(_0x2f5b26,_0x3b6d64,_0x52499b){return _0x2f5b26(_0x3b6d64,_0x52499b);},'JHCto':function(_0x55395e,_0x28e75d){return _0x55395e!==_0x28e75d;},'Gqutq':_0x5714c3(0x12e),'grUEZ':function(_0x321e11,_0x44fdd9,_0x55be4e){return _0x321e11(_0x44fdd9,_0x55be4e);},'mpEbN':function(_0x19b1b6,_0x434c74){return _0x19b1b6===_0x434c74;},'ljQAr':'confirm','divnj':'overwrite','rkjQy':_0x5714c3(0xc5),'fIbzP':_0x5714c3(0x106),'MKjoA':function(_0x3b7d4f,_0x3de76a){return _0x3b7d4f(_0x3de76a);},'RYOFr':_0x5714c3(0x10b),'SXyas':'\x20\x20Ranger\x20will\x20open\x20it\x20in\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20and\x20save\x20your\x20session.\x0a','oSNbB':'baseUrl','WtDbt':_0x5714c3(0xb1),'lXYAS':_0x5714c3(0xe1),'CkQzA':function(_0x4e78ab,_0x1bd660){return _0x4e78ab||_0x1bd660;},'RhQbh':function(_0x560a92,_0x7fea36){return _0x560a92(_0x7fea36);},'NoRho':_0x5714c3(0xf2),'IKZRi':_0x5714c3(0x107),'tLlqx':_0x5714c3(0xdf),'jWQiQ':'continue','akOxP':function(_0x454576,_0x23afae){return _0x454576===_0x23afae;},'ymNMD':_0x5714c3(0x12f),'TmlUs':function(_0x1fe122,_0x2c09b6){return _0x1fe122(_0x2c09b6);},'CndcK':function(_0x47fe2b,_0x4a843a){return _0x47fe2b===_0x4a843a;},'QjPVT':_0x5714c3(0xf9),'jpezy':function(_0x3e8b2f,_0x4bf73a){return _0x3e8b2f(_0x4bf73a);},'GBKsZ':function(_0x1e1081,_0x54d3fd,_0x25fe19){return _0x1e1081(_0x54d3fd,_0x25fe19);},'DXQiH':_0x5714c3(0x122),'ZSBnQ':_0x5714c3(0xe2),'oAuqg':'\x20\x20\x20A\x20browser\x20will\x20open.\x20Please\x20log\x20in\x20to\x20the\x20profile\x20you\x20want\x20to\x20test\x20so\x20Ranger\x20can\x20access\x20it.','hFkxi':'\x20\x20\x20When\x20done\x20logging\x20in,\x20close\x20the\x20browser\x20to\x20save\x20the\x20session.','qjNwX':_0x5714c3(0x119),'QAvhl':'--allow-insecure-localhost','Fzzbs':function(_0x3aea90,_0x4c59c9){return _0x3aea90||_0x4c59c9;},'nUXBg':_0x5714c3(0xc7),'AoEWo':_0x5714c3(0xcb),'jPaeT':'You\x20can\x20try\x20again\x20with\x20one\x20of:','dcFiR':'Browser\x20closed\x20before\x20authentication\x20was\x20saved.','aNPqa':function(_0x31bbde){return _0x31bbde();},'tkfsX':_0x5714c3(0xe5),'YVGAL':function(_0x91f294,_0x5d7191){return _0x91f294(_0x5d7191);},'fKHKD':_0x5714c3(0x130),'Rmame':function(_0x2dc0fb,_0x4e78a4,_0x457dd6){return _0x2dc0fb(_0x4e78a4,_0x457dd6);},'AlDWN':function(_0x370e73,_0x4d131f){return _0x370e73+_0x4d131f;},'sGmGM':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','ZcAJi':_0x5714c3(0x104),'XXzFo':'config_write','RHiFo':function(_0x234f0c,_0xcbbcce,_0x2f5569){return _0x234f0c(_0xcbbcce,_0x2f5569);},'TNRWa':function(_0x35b015,_0x32f82e){return _0x35b015(_0x32f82e);},'MKYeI':_0x5714c3(0xbe),'WWAWI':function(_0x7008bc,_0x589471,_0x2915ac){return _0x7008bc(_0x589471,_0x2915ac);}},_0x4ee75c=_0x550d59['ci']??![],_0x33327f=_0x4ee75c?'ci':_0x5714c3(0x121),_0xc43885=_0x550d59[_0x5714c3(0xb8)]===_0x396852['Ppkfo']?getRangerHomeDir():getRangerDir(),_0x38d099=_0x396852['sekTg'](join,_0xc43885,_0x33327f,_0x3b1dac),_0x9eeca8={};if(_0x550d59[_0x5714c3(0x116)])for(const _0x38232c of _0x550d59['setupHeader']){const _0x3e1531=_0x38232c['indexOf'](':');if(_0x3e1531===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x38232c+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x48fa74=_0x38232c[_0x5714c3(0xbc)](0x0,_0x3e1531)[_0x5714c3(0xb5)](),_0x9d0156=_0x38232c['slice'](_0x396852[_0x5714c3(0x120)](_0x3e1531,0x1))[_0x5714c3(0xb5)]();_0x9eeca8[_0x48fa74]=_0x9d0156;}const _0x3adcfd=_0x396852[_0x5714c3(0xcc)](join,_0xc43885,_0x33327f);if(_0x396852['JHCto'](_0x550d59['cdpEndpoint'],undefined)&&_0x550d59[_0x5714c3(0xc9)][_0x5714c3(0xb5)]()==='')throw new Error(_0x396852['Gqutq']);if(_0x550d59[_0x5714c3(0xc9)]&&_0x550d59['url'])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');if(_0x550d59['cdpEndpoint']&&_0x550d59['ci'])throw new Error('--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.');const _0x394d67=Boolean(_0x550d59[_0x5714c3(0xc9)]),_0x29fd85=!_0x550d59[_0x5714c3(0x11f)]&&!_0x394d67,_0x509f3a=process[_0x5714c3(0x11b)][_0x5714c3(0x102)]&&process['stdout']['isTTY'];if(!_0x509f3a&&!_0x550d59[_0x5714c3(0x114)]&&!_0x394d67)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');const _0x37960f=_0x396852['grUEZ'](findExistingEnv,_0x3b1dac,{'rangerDir':_0xc43885});let _0x52d69c=null;if(_0x37960f){if(!_0x509f3a)_0x52d69c=_0x37960f;else{if(_0x396852[_0x5714c3(0xec)](_0x37960f[_0x5714c3(0x10c)],_0x33327f)){const {overwrite:_0x26ed03}=await _0x4dbb64['prompt']([{'type':_0x396852[_0x5714c3(0x131)],'name':_0x396852['divnj'],'message':'Profile\x20\x22'+_0x3b1dac+'\x22\x20already\x20exists.\x20Overwrite?','default':![]}]);if(!_0x26ed03){console['log']('Aborted.');return;}_0x52d69c=_0x37960f;}else{const _0x463012=_0x396852[_0x5714c3(0xec)](_0x37960f[_0x5714c3(0x10c)],'legacy')?'root\x20(.ranger/)':_0x37960f[_0x5714c3(0x10c)];console['error'](_0x5714c3(0x10a)+_0x3b1dac+'\x22\x20already\x20exists\x20in\x20'+_0x463012+':\x20'+_0x37960f[_0x5714c3(0xc1)]),console['error']('\x20\x20\x20Creating\x20it\x20in\x20'+_0x33327f+'\x20would\x20shadow\x20the\x20existing\x20profile.');const {shouldReplace:_0x57d747}=await _0x4dbb64[_0x5714c3(0xd9)]([{'type':_0x5714c3(0xd4),'name':_0x5714c3(0x10f),'message':'Delete\x20existing\x20and\x20create\x20new\x20in\x20'+_0x33327f+'?','default':![]}]);if(!_0x57d747){console[_0x5714c3(0xcf)](_0x396852[_0x5714c3(0xd7)]);return;}_0x52d69c=_0x37960f;}}}_0x5c3aa1?.['trackPhaseStart'](_0x5714c3(0xf9));let _0x47f07e='';if(_0x394d67)console['log'](_0x396852[_0x5714c3(0xb4)]),console[_0x5714c3(0xcf)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x550d59['cdpEndpoint']),console['log'](_0x5714c3(0xfa));else{if(_0x550d59[_0x5714c3(0x114)]){_0x47f07e=_0x550d59['url'];const _0x5ff7e2=await _0x396852[_0x5714c3(0xde)](checkUrlReachability,_0x47f07e);if(!_0x5ff7e2['ok']&&!_0x550d59['force'])throw new Error('Could\x20not\x20reach\x20'+_0x47f07e+':\x20'+_0x5ff7e2[_0x5714c3(0x129)]+_0x5714c3(0xee));!_0x5ff7e2['ok']&&_0x550d59[_0x5714c3(0x128)]&&console[_0x5714c3(0xcf)](_0x5714c3(0xf3)+_0x47f07e+':\x20'+_0x5ff7e2['error']+_0x5714c3(0x103));}else{console['log'](_0x396852[_0x5714c3(0x11e)]),console[_0x5714c3(0xcf)](_0x5714c3(0x123)),console['log'](_0x396852[_0x5714c3(0x117)]);let _0x3cd0fa=![];while(!![]){const _0x27f66d=await _0x4dbb64[_0x5714c3(0xd9)]([{'type':'input','name':_0x396852[_0x5714c3(0xce)],'message':_0x3cd0fa?_0x396852['WtDbt']:_0x396852['lXYAS'],'default':_0x396852[_0x5714c3(0xfd)](_0x47f07e,_0x5714c3(0xbb))}]);_0x47f07e=_0x27f66d['baseUrl'];const _0x3952b9=await _0x396852[_0x5714c3(0xd2)](checkUrlReachability,_0x47f07e);if(_0x3952b9['ok'])break;const _0x4413d9=/^[a-zA-Z][\w+.-]*:\/\//[_0x5714c3(0x108)](_0x47f07e),_0x1f6d86=_0x3952b9['isProtocolError']&&!_0x4413d9,_0xce4183=_0x1f6d86?_0x5714c3(0x126)+_0x47f07e:null;_0x3cd0fa=!![],console['log'](_0x5714c3(0x10e)+_0x47f07e+':\x20'+_0x3952b9['error']);_0xce4183&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0xce4183+'?');const {action:_0xd66dff}=await _0x4dbb64['prompt']([{'type':_0x5714c3(0xe4),'name':_0x396852[_0x5714c3(0xb7)],'message':_0x396852[_0x5714c3(0xbd)],'choices':[..._0xce4183?[{'name':'Use\x20'+_0xce4183,'value':'use_suggestion'}]:[],{'name':_0x396852[_0x5714c3(0xfe)],'value':'retry'},{'name':_0x5714c3(0xe3),'value':_0x396852['jWQiQ']}]}]);if(_0x396852['akOxP'](_0xd66dff,_0x396852[_0x5714c3(0x10d)])&&_0xce4183){_0x47f07e=_0xce4183;const _0x5ecc62=await _0x396852['TmlUs'](checkUrlReachability,_0x47f07e);if(_0x5ecc62['ok'])break;console[_0x5714c3(0xcf)](_0x5714c3(0x12a)+_0x47f07e+':\x20'+_0x5ecc62['error']);}else{if(_0x396852[_0x5714c3(0x127)](_0xd66dff,_0x5714c3(0xb2)))break;}}}}_0x5c3aa1?.[_0x5714c3(0xda)](_0x396852['QjPVT']);const _0x3de90b={};if(_0x52d69c){const _0x5e73fd=await loadSettings(_0x3b1dac);Object[_0x5714c3(0xd6)](_0x3de90b,_0x5e73fd['setupHeaders']);}Object['assign'](_0x3de90b,_0x9eeca8),await _0x396852[_0x5714c3(0xcc)](mkdir,_0x3adcfd,{'recursive':!![]});const _0x34421b=await _0x396852['jpezy'](mkdtemp,_0x396852['WHseH'](join,_0x3adcfd,'.tmp-'+_0x3b1dac+'-')),_0x590349=_0x396852['GBKsZ'](join,_0x34421b,_0x5714c3(0x11d)),_0x386932=_0x396852['RhQbh'](Boolean,_0x47f07e)&&/^https:\/\/localhost(:\d+)?/i['test'](_0x47f07e);try{if(_0x29fd85){_0x5c3aa1?.[_0x5714c3(0xb9)](_0x396852['DXQiH']),console[_0x5714c3(0xcf)](_0x396852[_0x5714c3(0xd3)]),console['log'](_0x396852[_0x5714c3(0x112)]),console[_0x5714c3(0xcf)](_0x396852[_0x5714c3(0xe6)]);!_0x509f3a?(console['log'](_0x5714c3(0x11a)),console['log'](_0x396852[_0x5714c3(0xef)])):console['log']('');await new Promise(_0x604305=>setTimeout(_0x604305,0xbb8));const _0x252328=[];_0x550d59[_0x5714c3(0xca)]&&_0x252328[_0x5714c3(0xf6)](_0x5714c3(0xff));const _0x46bcba=_0x550d59['allowInsecureLocalhost']||_0x386932;_0x46bcba&&_0x252328[_0x5714c3(0xf6)](_0x396852[_0x5714c3(0xc6)]);const _0x123339=await chromium[_0x5714c3(0xf4)]({'headless':![],..._0x252328['length']>0x0?{'args':_0x252328}:{}});try{const _0x73bcda=Object['keys'](_0x3de90b)[_0x5714c3(0x111)]>0x0,_0x16865d={'ignoreHTTPSErrors':!![]};_0x73bcda&&(_0x16865d['extraHTTPHeaders']=_0x3de90b);const _0x25735f=await _0x123339['newContext'](_0x16865d);await addProfileSetupBanner(_0x25735f);const _0x323753=await _0x25735f['newPage']();await _0x323753[_0x5714c3(0xeb)](_0x396852['Fzzbs'](_0x47f07e,_0x396852['nUXBg']));let _0x55de33=![];await new Promise(_0x5525d8=>{const _0x2e912e={'OTsnM':'Saving\x20authentication\x20state...','BlKEl':function(_0x1790b8){return _0x1790b8();}};_0x323753['on'](_0x396852['rzKpx'],async()=>{const _0xabbcda=_0x409c;try{console['log'](_0x2e912e[_0xabbcda(0xfc)]),await _0x25735f['storageState']({'path':_0x590349}),_0x55de33=!![];}catch{}_0x2e912e[_0xabbcda(0x100)](_0x5525d8);});});if(!_0x55de33){console['log'](_0x396852['AoEWo']);!_0x550d59[_0x5714c3(0xca)]&&(console[_0x5714c3(0xcf)]('This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a'),console[_0x5714c3(0xcf)](_0x396852['jPaeT']),console[_0x5714c3(0xcf)]('\x20\x20ranger\x20profile\x20add\x20'+_0x3b1dac+'\x20--safe-mode\x20\x20\x20\x20(disables\x20browser\x20features\x20that\x20can\x20cause\x20crashes)'),console['log']('\x20\x20ranger\x20profile\x20add\x20'+_0x3b1dac+'\x20--skip-auth\x20\x20\x20\x20(skip\x20browser\x20auth\x20entirely)\x0a'));throw new Error(_0x396852[_0x5714c3(0xea)]);}}finally{await _0x123339['close']()['catch'](()=>{});}if(_0x4ee75c){const _0x5d4208=await readFile(_0x590349,_0x5714c3(0x124)),_0x65e9e4=await _0x396852[_0x5714c3(0x109)](getToken);if(!_0x65e9e4){console['error'](_0x396852['tkfsX']),await _0x396852[_0x5714c3(0xdc)](unlink,_0x590349)['catch'](()=>{});throw new Error(_0x396852[_0x5714c3(0x12d)]);}else{const _0x388cfb=_0x396852[_0x5714c3(0xc8)](encrypt,_0x5d4208,_0x65e9e4);await _0x396852[_0x5714c3(0x11c)](writeFile,_0x396852['AlDWN'](_0x590349,_0x5714c3(0x113)),_0x388cfb),await _0x396852[_0x5714c3(0x101)](unlink,_0x590349),console[_0x5714c3(0xcf)]('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x590349+_0x5714c3(0x113)),console[_0x5714c3(0xcf)](_0x396852[_0x5714c3(0x115)]),console['log'](_0x396852[_0x5714c3(0xb0)]);}}else console[_0x5714c3(0xcf)](_0x5714c3(0xdd)+_0x590349);_0x5c3aa1?.[_0x5714c3(0xda)](_0x396852['DXQiH']);}_0x5c3aa1?.[_0x5714c3(0xb9)](_0x396852['XXzFo']);const _0x2dba53={};_0x47f07e&&(_0x2dba53[_0x5714c3(0xf0)]=_0x47f07e);_0x550d59['cdpEndpoint']&&(_0x2dba53[_0x5714c3(0xc9)]=_0x550d59[_0x5714c3(0xc9)],_0x2dba53[_0x5714c3(0xe7)]=!![]);(_0x550d59[_0x5714c3(0x118)]||_0x386932)&&(_0x2dba53[_0x5714c3(0x118)]=!![]);_0x550d59['safeMode']&&(_0x2dba53['safeMode']=!![]);Object['keys'](_0x3de90b)['length']>0x0&&(_0x2dba53[_0x5714c3(0xcd)]=_0x3de90b);await writeFile(join(_0x34421b,_0x5714c3(0xe8)),JSON[_0x5714c3(0xd5)](_0x2dba53,null,0x2)),console['log'](_0x5714c3(0xb6)+join(_0x38d099,'settings.json'));if(_0x396852['mpEbN'](_0x52d69c?.[_0x5714c3(0x10c)],_0x33327f)){const _0x37f8cc=_0x52d69c['path']+'.backup-'+Date['now']();await _0x396852[_0x5714c3(0xc8)](rename,_0x52d69c[_0x5714c3(0xc1)],_0x37f8cc);try{await _0x396852['grUEZ'](rename,_0x34421b,_0x38d099);}catch(_0x2de28e){await _0x396852['RHiFo'](rename,_0x37f8cc,_0x52d69c['path']);throw _0x2de28e;}try{await rm(_0x37f8cc,{'recursive':!![]});}catch{console[_0x5714c3(0xcf)]('Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20backup\x20at\x20'+_0x37f8cc);}}else{await _0x396852['GBKsZ'](rename,_0x34421b,_0x38d099);if(_0x52d69c)try{await rm(_0x52d69c['path'],{'recursive':!![]}),console['log'](_0x5714c3(0xfb)+_0x52d69c[_0x5714c3(0xc1)]);}catch{console[_0x5714c3(0xcf)]('Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20at\x20'+_0x52d69c[_0x5714c3(0xc1)]);}}try{await _0x396852[_0x5714c3(0xf7)](writeActiveProfileName,_0x3b1dac),console[_0x5714c3(0xcf)]('\x20\x20Set\x20active\x20profile:\x20'+_0x3b1dac);}catch{console[_0x5714c3(0xcf)](_0x396852['MKYeI']);}_0x5c3aa1?.['trackPhaseEnd'](_0x396852[_0x5714c3(0xe9)]),console['log']('\x0a\x20\x20Profile\x20\x22'+_0x3b1dac+'\x22\x20configured');}catch(_0xeca34b){await _0x396852[_0x5714c3(0xc0)](rm,_0x34421b,{'recursive':!![],'force':!![]});throw _0xeca34b;}}function _0x58d8(){const _0x53aaa6=['Rmame','cdpEndpoint','safeMode','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','WHseH','setupHeaders','oSNbB','log','Invalid\x20URL','313515SdxHgh','RhQbh','ZSBnQ','confirm','stringify','assign','rkjQy','3204954URDPhs','prompt','trackPhaseEnd','name','YVGAL','✓\x20Auth\x20state\x20saved\x20to:\x20','MKjoA','Enter\x20a\x20different\x20URL','4GrfQfo','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','\x0a📋\x20Authentication\x20Setup','Continue\x20anyway','list','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','hFkxi','isElectron','settings.json','XXzFo','dcFiR','goto','mpEbN','includes','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','qjNwX','baseUrl','HTTP\x20','action','⚠\x20Could\x20not\x20reach\x20','launch','88iDSPap','push','TNRWa','message','url_setup','\x20\x20Make\x20sure\x20your\x20Electron\x20app\x20(or\x20browser)\x20is\x20running\x20with\x20remote\x20debugging\x20enabled.\x0a','Removed\x20existing\x20profile\x20at\x20','OTsnM','CkQzA','tLlqx','--disable-features=WebBluetooth','BlKEl','TmlUs','isTTY','\x20(continuing\x20with\x20--force)','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','170bIZIrY','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','What\x20would\x20you\x20like\x20to\x20do?','test','aNPqa','\x0a⚠️\x20\x20Profile\x20\x22','\x0a🌐\x20Profile\x20Setup\x0a','location','ymNMD','\x0a\x20\x20Could\x20not\x20reach\x20','shouldReplace','12321684TJppoQ','length','oAuqg','.enc','url','sGmGM','setupHeader','SXyas','allowInsecureLocalhost','\x20\x20\x20If\x20you\x20are\x20an\x20agent,\x20background\x20this\x20process\x20and\x20let\x20your\x20user\x20know\x20they\x20need\x20to\x20complete\x20browser\x20authentication.\x0a','\x0a\x20\x20\x20⚠\x20This\x20step\x20requires\x20human\x20interaction\x20in\x20a\x20browser.','stdin','grUEZ','auth.json','RYOFr','skipAuth','dHQsn','local','browser_auth','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','utf-8','1272uObCAe','http://','CndcK','force','error','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','126467XyZJim','HSUXW','fKHKD','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','use_suggestion','Missing\x20API\x20token;\x20aborting\x20CI\x20profile\x20creation.','ljQAr','12zDSVtU','ZcAJi','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','continue','fetch\x20failed','fIbzP','trim','✓\x20Created\x20settings:\x20','NoRho','scope','trackPhaseStart','15735PwtlGP','http://localhost:3000','slice','IKZRi','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','env','WWAWI','path','OhRtV','73574oTQCRC','4613161HrFABW','Aborted.','QAvhl','about:blank'];_0x58d8=function(){return _0x53aaa6;};return _0x58d8();}
1
+ const _0x4e2803=_0x515c;(function(_0xf4e871,_0x3878ef){const _0x1baf29=_0x515c,_0x2efcaf=_0xf4e871();while(!![]){try{const _0x104b73=parseInt(_0x1baf29(0x1a3))/0x1*(-parseInt(_0x1baf29(0x1ab))/0x2)+parseInt(_0x1baf29(0x1ce))/0x3*(parseInt(_0x1baf29(0x1b6))/0x4)+parseInt(_0x1baf29(0x1b8))/0x5+-parseInt(_0x1baf29(0x1e0))/0x6*(-parseInt(_0x1baf29(0x1ee))/0x7)+-parseInt(_0x1baf29(0x201))/0x8+parseInt(_0x1baf29(0x1ff))/0x9*(-parseInt(_0x1baf29(0x208))/0xa)+parseInt(_0x1baf29(0x1d4))/0xb;if(_0x104b73===_0x3878ef)break;else _0x2efcaf['push'](_0x2efcaf['shift']());}catch(_0x3babda){_0x2efcaf['push'](_0x2efcaf['shift']());}}}(_0x2499,0xebba0));function _0x2499(){const _0x5c8687=['manual','\x27\x20created.\x0a','\x27\x20to\x20the\x20cloud?','rBdbq','35jYLhns','Invalid\x20--setup-header\x20format:\x20\x22','hnvAC','startsWith','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','yes','trim','url','.\x20Configured\x20envs:\x20','bpTTz','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','length','message','ReUVJ','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x22:\x20','6588045vHlrgH','skipAuth','1307112brSEFD','Use\x20','ZBfCI','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','continue','XvypH','oeEiM','20fynLLF','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','use_suggestion','EbUoq','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','capture','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','stdout','NODE_TLS_REJECT_UNAUTHORIZED','LOmgH','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','signal','QWzXW','user_declined','setupHeaders','wMqpR','qyIci','\x0a\x20\x20Could\x20not\x20reach\x20','rhKgJ','xxypp','env','profile.add.autoRouted','jQnam','.tmp-','Invalid\x20URL','JnHpk','ZiVIV','profile.add.autoRouteSkipped','includes','fQcbe','269lVpgpE','fetch\x20failed','\x0a\x20\x20(domains:\x20','\x20--skip-auth\x0a','cwd','\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','FEBcO','7078bmbQup','keys','no_auth_config','test','eRmGg','error','QARRv','✓\x20Cloud\x20profile\x20\x27','OBBnm','HTTP\x20','environments','2913796UbGpPG','eldUs','3965030rbiNJk','abort','trackPhaseEnd','warn','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','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','kjEFM','slice','kJnVi','bZdJB','\x20(continuing\x20with\x20--force)','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','origin','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','ATIRh','eUeMO','UHoGZ','isElectron','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','force','rlhAe','3jSjwKF','HHRSX','✓\x20Profile\x20\x27','http://','\x20\x20https://docs.ranger.net/main/concepts/profiles','iKGoy','17581696XCnPew','\x20\x20Set\x20active\x20profile:\x20','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','Enter\x20a\x20different\x20URL','baseUrl','list','confirm','log','status','retry','prompt','name','510162YADrNc','no_match','setupHeader','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x27\x20created\x20(no\x20session).\x0a','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','cdpEndpoint','cFCqH','hPuIA','KnJuY'];_0x2499=function(){return _0x5c8687;};return _0x2499();}import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x48f2af 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{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';function _0x515c(_0x30ba3b,_0x5dcb35){_0x30ba3b=_0x30ba3b-0x191;const _0x249903=_0x2499();let _0x515c9f=_0x249903[_0x30ba3b];return _0x515c9f;}const CLOUD_PROFILE_SHARING_WARNING=_0x4e2803(0x1c4);function warnCloudProfileSharedInOrg(){const _0x1e3834=_0x4e2803;if(!process[_0x1e3834(0x20f)]['isTTY'])return;console[_0x1e3834(0x1bb)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x33594d){const _0x122205=_0x4e2803,_0x45123b={'nKjRG':_0x122205(0x1ea),'MfBAh':function(_0x4c9889,_0x5d3de0,_0x824d16){return _0x4c9889(_0x5d3de0,_0x824d16);},'YZCix':function(_0x15ca18,_0x54ec14){return _0x15ca18<_0x54ec14;},'ZUSmf':function(_0x3335f8,_0x25e629){return _0x3335f8(_0x25e629);},'VuBQQ':_0x122205(0x19d),'eldUs':'TypeError'};try{const _0x1a90bd=new AbortController(),_0x2dcdb1=setTimeout(()=>_0x1a90bd[_0x122205(0x1b9)](),0x1388),_0x17f027={'method':'HEAD','signal':_0x1a90bd[_0x122205(0x213)],'redirect':_0x45123b['nKjRG']};/^https:\/\/localhost(:\d+)?/i[_0x122205(0x1ae)](_0x33594d)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x3914fa=await _0x45123b['MfBAh'](fetch,_0x33594d,_0x17f027);delete process['env'][_0x122205(0x210)],clearTimeout(_0x2dcdb1);if(_0x45123b['YZCix'](_0x3914fa[_0x122205(0x1dc)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x122205(0x1b4)+_0x3914fa[_0x122205(0x1dc)]};}catch(_0x2fde01){delete process[_0x122205(0x199)][_0x122205(0x210)];const _0x23bfd2=_0x2fde01,_0x1d636e=_0x23bfd2['message']||_0x45123b['ZUSmf'](String,_0x2fde01),_0x5f2531=_0x1d636e[_0x122205(0x1a1)](_0x45123b['VuBQQ'])||_0x23bfd2[_0x122205(0x1df)]===_0x45123b[_0x122205(0x1b7)]||_0x1d636e[_0x122205(0x1a1)](_0x122205(0x1a4));return{'ok':![],'error':_0x1d636e,'isProtocolError':_0x5f2531};}}async function sweepOrphanLocalProfile(_0x253a7d,_0x2d055b,_0x2a0b42){const _0x4b7e45=_0x4e2803,_0x27f09c={'ecWXf':'local','evtxk':function(_0x2be20b,_0xa14860,_0x1d0f3c){return _0x2be20b(_0xa14860,_0x1d0f3c);},'mYyGG':function(_0x256572,_0x3f431f){return _0x256572(_0x3f431f);},'iKGoy':function(_0x9c70a2,_0x186eed,_0x107000){return _0x9c70a2(_0x186eed,_0x107000);},'pbKoh':function(_0x2718d1,_0x8c0e6f,_0x4af898){return _0x2718d1(_0x8c0e6f,_0x4af898);},'ZBfCI':function(_0x10745c,_0x4afeb3,_0x4afba8){return _0x10745c(_0x4afeb3,_0x4afba8);}},_0x3bc457=join(_0x2d055b,_0x27f09c['ecWXf']),_0xe224d2=_0x27f09c['evtxk'](join,_0x3bc457,_0x253a7d);_0x27f09c['mYyGG'](existsSync,_0xe224d2)&&(_0x2a0b42&&await isPathGitTracked(_0xe224d2)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0xe224d2+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await _0x27f09c[_0x4b7e45(0x1d3)](rm,_0xe224d2,{'recursive':!![],'force':!![]}),console[_0x4b7e45(0x1db)](_0x4b7e45(0x204)+_0xe224d2)));if(existsSync(_0x3bc457)){let _0x378848=[];try{_0x378848=await _0x27f09c['mYyGG'](readdir,_0x3bc457);}catch{return;}const _0x1308b3=_0x4b7e45(0x19c)+_0x253a7d+'-';for(const _0x4da1c4 of _0x378848){if(!_0x4da1c4[_0x4b7e45(0x1f1)](_0x1308b3))continue;const _0x5a37c4=_0x27f09c['pbKoh'](join,_0x3bc457,_0x4da1c4);await _0x27f09c[_0x4b7e45(0x203)](rm,_0x5a37c4,{'recursive':!![],'force':!![]}),console[_0x4b7e45(0x1db)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x5a37c4);}}}async function sweepOrphansBestEffort(_0x502007){const _0x18e032=_0x4e2803,_0x830765={'uHuyR':function(_0x548f15){return _0x548f15();},'VHIzl':function(_0x6810a2,_0x5c7cb5){return _0x6810a2!==_0x5c7cb5;},'HHRSX':function(_0x467545,_0x2ef5ed,_0x2572e2,_0x466ca5){return _0x467545(_0x2ef5ed,_0x2572e2,_0x466ca5);},'efqtI':function(_0x5d5e95,_0x230fbf){return _0x5d5e95 instanceof _0x230fbf;}};try{await sweepOrphanLocalProfile(_0x502007,getRangerHomeDir(),![]);const _0x14037c=_0x830765['uHuyR'](getRangerDir);_0x830765['VHIzl'](_0x14037c,_0x830765['uHuyR'](getRangerHomeDir))&&await _0x830765[_0x18e032(0x1cf)](sweepOrphanLocalProfile,_0x502007,_0x14037c,!![]);}catch(_0x47f4f5){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x830765['efqtI'](_0x47f4f5,Error)?_0x47f4f5[_0x18e032(0x1fb)]:String(_0x47f4f5))+').');}}async function markActive(_0x1c3f76){const _0x41678f=_0x4e2803;try{await writeActiveProfileName(_0x1c3f76),console[_0x41678f(0x1db)](_0x41678f(0x1d5)+_0x1c3f76);}catch{console['log'](_0x41678f(0x1bd));}}async function tryAutoRouteCloudProfile(_0x1aef37,_0x3fb195,_0x539947,_0x194d48,_0x4913b0){const _0x4e01c8=_0x4e2803,_0x18c870={'rlhAe':function(_0x163095,_0x59a5f6){return _0x163095===_0x59a5f6;},'OBBnm':function(_0x2b29a8){return _0x2b29a8();},'wMqpR':function(_0x2d6e8a,_0x12c1ca){return _0x2d6e8a instanceof _0x12c1ca;},'xxypp':function(_0x5cb095,_0x27e80f){return _0x5cb095===_0x27e80f;},'FpXQu':function(_0x7bc69d,_0xb5d0c7){return _0x7bc69d+_0xb5d0c7;},'pNNPL':function(_0x15be49,_0x35347e){return _0x15be49+_0x35347e;},'XvypH':function(_0x1c4f23,_0x368b82){return _0x1c4f23+_0x368b82;},'UHoGZ':function(_0x18bf17,_0x5e6170){return _0x18bf17+_0x5e6170;},'kdhAW':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','ZiVIV':function(_0x22db7d,_0x14f4de,_0x477422){return _0x22db7d(_0x14f4de,_0x477422);},'oeEiM':'profile.add.autoRouteSkipped','eRmGg':_0x4e01c8(0x1e1),'hnvAC':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','QlVLj':function(_0x2e8ce2){return _0x2e8ce2();},'kGwEf':function(_0x1e964b,_0x270c72){return _0x1e964b instanceof _0x270c72;},'ATIRh':_0x4e01c8(0x19a)};let _0x14cdf5;try{_0x14cdf5=await _0x18c870[_0x4e01c8(0x1b3)](fetchAuthConfig);}catch(_0xd5674e){return _0x4913b0?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':'no_auth_config','profileName':_0x1aef37}),console[_0x4e01c8(0x1b0)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x18c870[_0x4e01c8(0x194)](_0xd5674e,Error)?_0xd5674e[_0x4e01c8(0x1fb)]:String(_0xd5674e))),![];}if(!_0x14cdf5||!_0x14cdf5['environments']||_0x18c870[_0x4e01c8(0x198)](Object[_0x4e01c8(0x1ac)](_0x14cdf5['environments'])['length'],0x0)){if(_0x194d48)return await captureEnvLessProfile(_0x1aef37,_0x3fb195,_0x539947,_0x4913b0);return _0x4913b0?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x4e01c8(0x1ad),'profileName':_0x1aef37}),console[_0x4e01c8(0x1b0)](_0x18c870['FpXQu'](_0x18c870['pNNPL'](_0x18c870[_0x4e01c8(0x206)](_0x18c870[_0x4e01c8(0x1c9)](_0x4e01c8(0x1a8),'\x0a'),_0x18c870['kdhAW'])+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x1aef37+'\x20--url\x20'+_0x3fb195+_0x4e01c8(0x1a6))+'\x0a',_0x4e01c8(0x1d6)),_0x4e01c8(0x1e5))),![];}const _0x2a7246=_0x18c870[_0x4e01c8(0x19f)](matchAuthEnvironment,_0x3fb195,_0x14cdf5);if(!_0x2a7246)return _0x4913b0?.['trackPhaseEnd'](_0x18c870['oeEiM'],{'reason':_0x18c870[_0x4e01c8(0x1af)],'profileName':_0x1aef37}),console[_0x4e01c8(0x1b0)](_0x4e01c8(0x209)+_0x3fb195+_0x4e01c8(0x1f7)+Object['keys'](_0x14cdf5[_0x4e01c8(0x1b5)])['join'](',\x20')+'.'),![];const _0x5e46c4=_0x14cdf5['environments'][_0x2a7246],_0xde8ceb=_0x5e46c4?.['domains']??[];if(_0x194d48&&!_0x539947['yes']){const {saveToCloud:_0x544dd1}=await _0x48f2af['prompt']([{'type':'confirm','name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x2a7246+'\x27\x20matching\x20'+_0x3fb195+_0x4e01c8(0x1a5)+_0xde8ceb['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x1aef37+_0x4e01c8(0x1ec),'default':!![]}]);if(!_0x544dd1)return _0x4913b0?.[_0x4e01c8(0x1ba)](_0x18c870[_0x4e01c8(0x207)],{'reason':_0x4e01c8(0x192),'profileName':_0x1aef37}),console[_0x4e01c8(0x1b0)](_0x18c870[_0x4e01c8(0x1f0)]),![];}const _0x213813=_0xde8ceb['some'](_0x20f970=>{const _0x366277=_0x4e01c8;try{return _0x18c870[_0x366277(0x1cd)](new URL(_0x20f970)['origin'],new URL(_0x3fb195)[_0x366277(0x1c5)]);}catch{return![];}}),_0x484076={};!_0x213813&&(_0x484076['baseUrl']=_0x3fb195);try{await createCloudProfile(_0x1aef37,_0x2a7246,{'settings':_0x484076}),_0x18c870['QlVLj'](warnCloudProfileSharedInOrg);}catch(_0x26dda2){if(_0x18c870['kGwEf'](_0x26dda2,ApiError)&&_0x26dda2[_0x4e01c8(0x1dc)]===0x199){console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x1aef37+_0x4e01c8(0x1c6)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x1aef37));throw _0x26dda2;}throw _0x26dda2;}return console[_0x4e01c8(0x1db)](_0x18c870[_0x4e01c8(0x206)](_0x4e01c8(0x1d0)+_0x1aef37+_0x4e01c8(0x1eb),_0x4e01c8(0x1f3)+_0x1aef37)),await sweepOrphansBestEffort(_0x1aef37),_0x4913b0?.[_0x4e01c8(0x1ba)](_0x18c870[_0x4e01c8(0x1c7)],{'envKey':_0x2a7246,'profileName':_0x1aef37}),!![];}async function createUnconfiguredCloudProfile(_0x8b0a7f,_0x5a3a7c){const _0x24ac36=_0x4e2803,_0x16a330={'LOmgH':function(_0x21bbf5,_0x46168c){return _0x21bbf5===_0x46168c;}};try{await createCloudProfile(_0x8b0a7f,undefined,{'settings':_0x5a3a7c}),warnCloudProfileSharedInOrg();}catch(_0x4ecf27){_0x4ecf27 instanceof ApiError&&_0x16a330[_0x24ac36(0x211)](_0x4ecf27['status'],0x199)&&console[_0x24ac36(0x1b0)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x8b0a7f+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x8b0a7f));throw _0x4ecf27;}}async function captureEnvLessProfile(_0x5f0314,_0x2014f4,_0x32e9d0,_0x5a4c43){const _0x264386=_0x4e2803,_0x9fcc30={'wWFLE':_0x264386(0x1da),'fQcbe':function(_0x2c6165,_0x2176b5){return _0x2c6165+_0x2176b5;},'vvWkT':function(_0x42ac4f,_0x30a510){return _0x42ac4f===_0x30a510;},'wKZQw':function(_0x27e230,_0x271498,_0x45a453,_0x5e73b8){return _0x27e230(_0x271498,_0x45a453,_0x5e73b8);},'LPECv':function(_0x17497d,_0xc507bb,_0x2fed32){return _0x17497d(_0xc507bb,_0x2fed32);},'cxjZX':function(_0x5af354,_0x4c374f){return _0x5af354>_0x4c374f;},'QARRv':_0x264386(0x19a)};if(!_0x32e9d0[_0x264386(0x1f4)]){const {capture:_0x5a671f}=await _0x48f2af['prompt']([{'type':_0x9fcc30['wWFLE'],'name':_0x264386(0x20d),'message':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','default':!![]}]);if(!_0x5a671f)return _0x5a4c43?.['trackPhaseEnd'](_0x264386(0x1a0),{'reason':_0x264386(0x192),'profileName':_0x5f0314}),console[_0x264386(0x1b0)](_0x9fcc30[_0x264386(0x1a2)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a',_0x264386(0x212))),![];}const _0x33144={};if(_0x32e9d0[_0x264386(0x1e2)])for(const _0x115cdd of _0x32e9d0[_0x264386(0x1e2)]){const _0x121a67=_0x115cdd['indexOf'](':');if(_0x9fcc30['vvWkT'](_0x121a67,-0x1))continue;_0x33144[_0x115cdd['slice'](0x0,_0x121a67)[_0x264386(0x1f5)]()]=_0x115cdd['slice'](_0x9fcc30['fQcbe'](_0x121a67,0x1))[_0x264386(0x1f5)]();}const _0x3ada62={'baseUrl':_0x2014f4};Object['keys'](_0x33144)[_0x264386(0x1fa)]>0x0&&(_0x3ada62[_0x264386(0x193)]=_0x33144);let _0x423210;try{_0x423210=await _0x9fcc30['wKZQw'](createCloudProfile,_0x5f0314,undefined,{'settings':_0x3ada62}),warnCloudProfileSharedInOrg();}catch(_0x53d0fd){_0x53d0fd instanceof ApiError&&_0x53d0fd[_0x264386(0x1dc)]===0x199&&console[_0x264386(0x1b0)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x5f0314+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x5f0314));throw _0x53d0fd;}return await _0x9fcc30['LPECv'](manualBrowserLogin,_0x423210,{'key':'','domains':[_0x2014f4],'setupHeaders':_0x9fcc30['cxjZX'](Object[_0x264386(0x1ac)](_0x33144)['length'],0x0)?_0x33144:undefined}),console[_0x264386(0x1db)]('\x0a✓\x20Profile\x20\x27'+_0x5f0314+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x5f0314)),await sweepOrphansBestEffort(_0x5f0314),_0x5a4c43?.[_0x264386(0x1ba)](_0x9fcc30[_0x264386(0x1b1)],{'envKey':null,'profileName':_0x5f0314}),!![];}export async function addEnv(_0x200037,_0x448f15={},_0x6b4399){const _0x519e70=_0x4e2803,_0x1157ac={'hPuIA':function(_0x2c67e8,_0x645f58){return _0x2c67e8+_0x645f58;},'abDlY':function(_0x58db3a,_0x33f6f3){return _0x58db3a+_0x33f6f3;},'cFCqH':function(_0x2401af,_0x23ea27){return _0x2401af+_0x23ea27;},'zwUFu':_0x519e70(0x20c),'kjEFM':'To\x20set\x20up\x20a\x20profile,\x20run:\x0a','rBdbq':_0x519e70(0x20e),'bZdJB':_0x519e70(0x1fd),'jgucE':_0x519e70(0x1d2),'ReUVJ':function(_0x51889b,_0x3ea9df){return _0x51889b===_0x3ea9df;},'eUeMO':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','puaYV':function(_0x80f179,_0x23c2ca){return _0x80f179(_0x23c2ca);},'Enloa':_0x519e70(0x1be),'FEBcO':_0x519e70(0x1e3),'KnJuY':function(_0x1592bc,_0x589ef0,_0x233675){return _0x1592bc(_0x589ef0,_0x233675);},'kJnVi':function(_0x1b1247,_0x12c9e5,_0x1393b8,_0x2c8123,_0x3b127d){return _0x1b1247(_0x12c9e5,_0x1393b8,_0x2c8123,_0x3b127d);},'QHVLJ':_0x519e70(0x1ca),'qyIci':function(_0x4bcf1a,_0x4b683c){return _0x4bcf1a instanceof _0x4b683c;},'rhKgJ':function(_0x4ace06,_0x289cb4){return _0x4ace06(_0x289cb4);},'EbUoq':function(_0x3484c8,_0xf35df7){return _0x3484c8>_0xf35df7;},'QWzXW':function(_0xe07b2d,_0xd97a8e){return _0xe07b2d(_0xd97a8e);},'jQnam':'\x0a🌐\x20Profile\x20Setup\x0a','HDhgL':'baseUrl','JnHpk':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','XSdkB':_0x519e70(0x1f9),'uMSoz':'http://localhost:3000','RztFV':_0x519e70(0x1d7),'bpTTz':'Continue\x20anyway','DkvqG':_0x519e70(0x205),'GBUsK':_0x519e70(0x20a)};_0x448f15['ci']&&(console[_0x519e70(0x1b0)](_0x1157ac[_0x519e70(0x1e8)](_0x1157ac[_0x519e70(0x1e8)](_0x1157ac['abDlY'](_0x1157ac[_0x519e70(0x1e7)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a',_0x1157ac['zwUFu'])+'\x0a',_0x1157ac[_0x519e70(0x1bf)])+_0x1157ac[_0x519e70(0x1ed)],'\x0a'),_0x1157ac[_0x519e70(0x1c2)])+_0x1157ac['jgucE']),process['exit'](0x1));const _0xb2b0a9={};if(_0x448f15[_0x519e70(0x1e2)])for(const _0x1e78d1 of _0x448f15[_0x519e70(0x1e2)]){const _0x5f579c=_0x1e78d1['indexOf'](':');if(_0x1157ac['ReUVJ'](_0x5f579c,-0x1))throw new Error(_0x519e70(0x1ef)+_0x1e78d1+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x5d5544=_0x1e78d1['slice'](0x0,_0x5f579c)[_0x519e70(0x1f5)](),_0x5742cf=_0x1e78d1[_0x519e70(0x1c0)](_0x1157ac[_0x519e70(0x1e8)](_0x5f579c,0x1))['trim']();_0xb2b0a9[_0x5d5544]=_0x5742cf;}if(_0x448f15[_0x519e70(0x1e6)]!==undefined&&_0x448f15['cdpEndpoint']['trim']()==='')throw new Error(_0x1157ac[_0x519e70(0x1c8)]);if(_0x448f15[_0x519e70(0x1e6)]&&_0x448f15[_0x519e70(0x1f6)])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');const _0x5124e4=_0x1157ac['puaYV'](Boolean,_0x448f15[_0x519e70(0x1e6)]),_0x5e66e9=isInteractive();if(!_0x5e66e9&&!_0x448f15[_0x519e70(0x1f6)]&&!_0x5124e4&&!_0x448f15[_0x519e70(0x200)])throw new Error(_0x1157ac['Enloa']);if(_0x5124e4){const _0x422701=_0x448f15['cdpEndpoint'];console['log'](_0x1157ac[_0x519e70(0x1aa)]),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x422701);const _0x1e1e9a={'cdpEndpoint':_0x422701,'isElectron':!![]};Object[_0x519e70(0x1ac)](_0xb2b0a9)[_0x519e70(0x1fa)]>0x0&&(_0x1e1e9a[_0x519e70(0x193)]=_0xb2b0a9);await _0x1157ac[_0x519e70(0x1e9)](createUnconfiguredCloudProfile,_0x200037,_0x1e1e9a);try{_0x1157ac[_0x519e70(0x1c1)](setProfileOverride,process[_0x519e70(0x1a7)](),_0x200037,_0x519e70(0x1e6),_0x422701),setProfileOverride(process['cwd'](),_0x200037,_0x1157ac['QHVLJ'],!![]);}catch(_0x322573){console['error'](_0x519e70(0x1f2)+(_0x1157ac['qyIci'](_0x322573,Error)?_0x322573[_0x519e70(0x1fb)]:_0x1157ac['puaYV'](String,_0x322573)));}console['log'](_0x519e70(0x1b2)+_0x200037+'\x27\x20created\x20(CDP).'),await _0x1157ac['rhKgJ'](sweepOrphansBestEffort,_0x200037),await markActive(_0x200037);return;}if(_0x448f15['skipAuth']){const _0x14dcff={};_0x448f15['url']&&(_0x14dcff[_0x519e70(0x1d8)]=_0x448f15['url']);_0x1157ac[_0x519e70(0x20b)](Object[_0x519e70(0x1ac)](_0xb2b0a9)[_0x519e70(0x1fa)],0x0)&&(_0x14dcff[_0x519e70(0x193)]=_0xb2b0a9);await createUnconfiguredCloudProfile(_0x200037,_0x14dcff),console['log']('✓\x20Profile\x20\x27'+_0x200037+_0x519e70(0x1e4)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x200037+'`\x20again\x20without\x20--skip-auth.')),await _0x1157ac[_0x519e70(0x191)](sweepOrphansBestEffort,_0x200037),await markActive(_0x200037);return;}if(_0x448f15['url']){const _0x56dd84=_0x448f15[_0x519e70(0x1f6)],_0xf043d3=await checkUrlReachability(_0x56dd84);if(!_0xf043d3['ok']&&!_0x448f15['force'])throw new Error('Could\x20not\x20reach\x20'+_0x56dd84+':\x20'+_0xf043d3[_0x519e70(0x1b0)]+_0x519e70(0x1bc));!_0xf043d3['ok']&&_0x448f15[_0x519e70(0x1cc)]&&console[_0x519e70(0x1db)]('⚠\x20Could\x20not\x20reach\x20'+_0x56dd84+':\x20'+_0xf043d3['error']+_0x519e70(0x1c3));}else{console['log'](_0x1157ac[_0x519e70(0x19b)]),console[_0x519e70(0x1db)](_0x519e70(0x1cb)),console['log']('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x2e2d71='',_0x3b3d96=![];while(!![]){const _0x364fb1=await _0x48f2af['prompt']([{'type':'input','name':_0x1157ac['HDhgL'],'message':_0x3b3d96?_0x1157ac[_0x519e70(0x19e)]:_0x1157ac['XSdkB'],'default':_0x2e2d71||_0x1157ac['uMSoz']}]);_0x2e2d71=_0x364fb1[_0x519e70(0x1d8)];const _0x50bd42=await checkUrlReachability(_0x2e2d71);if(_0x50bd42['ok'])break;const _0x1d76e0=/^[a-zA-Z][\w+.-]*:\/\//[_0x519e70(0x1ae)](_0x2e2d71),_0x49ec8c=_0x50bd42['isProtocolError']&&!_0x1d76e0,_0x4f0c90=_0x49ec8c?_0x519e70(0x1d1)+_0x2e2d71:null;_0x3b3d96=!![],console[_0x519e70(0x1db)](_0x519e70(0x196)+_0x2e2d71+':\x20'+_0x50bd42[_0x519e70(0x1b0)]);_0x4f0c90&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x4f0c90+'?');const {action:_0x278e81}=await _0x48f2af[_0x519e70(0x1de)]([{'type':_0x519e70(0x1d9),'name':'action','message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x4f0c90?[{'name':_0x519e70(0x202)+_0x4f0c90,'value':'use_suggestion'}]:[],{'name':_0x1157ac['RztFV'],'value':_0x519e70(0x1dd)},{'name':_0x1157ac[_0x519e70(0x1f8)],'value':_0x1157ac['DkvqG']}]}]);if(_0x278e81===_0x1157ac['GBUsK']&&_0x4f0c90){_0x2e2d71=_0x4f0c90;const _0x54be1f=await _0x1157ac[_0x519e70(0x197)](checkUrlReachability,_0x2e2d71);if(_0x54be1f['ok'])break;console[_0x519e70(0x1db)](_0x519e70(0x1a9)+_0x2e2d71+':\x20'+_0x54be1f[_0x519e70(0x1b0)]);}else{if(_0x1157ac[_0x519e70(0x1fc)](_0x278e81,_0x1157ac['DkvqG']))break;}}_0x448f15={..._0x448f15,'url':_0x2e2d71};}let _0x533de3=![];try{_0x533de3=await tryAutoRouteCloudProfile(_0x200037,_0x448f15['url'],_0x448f15,_0x5e66e9,_0x6b4399);}catch(_0x59e15f){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x200037+_0x519e70(0x1fe)+(_0x1157ac[_0x519e70(0x195)](_0x59e15f,Error)?_0x59e15f[_0x519e70(0x1fb)]:String(_0x59e15f))),process['exit'](0x1);}!_0x533de3&&process['exit'](0x1),await markActive(_0x200037);}
@@ -1 +1 @@
1
- (function(_0x2fdb09,_0x11d51c){const _0x3a4618=_0x1a36,_0x528618=_0x2fdb09();while(!![]){try{const _0x11376a=-parseInt(_0x3a4618(0xa4))/0x1*(parseInt(_0x3a4618(0xad))/0x2)+parseInt(_0x3a4618(0xa0))/0x3+parseInt(_0x3a4618(0xaa))/0x4+-parseInt(_0x3a4618(0xa2))/0x5*(-parseInt(_0x3a4618(0xaf))/0x6)+-parseInt(_0x3a4618(0x9c))/0x7+parseInt(_0x3a4618(0xae))/0x8*(-parseInt(_0x3a4618(0xac))/0x9)+-parseInt(_0x3a4618(0xab))/0xa;if(_0x11376a===_0x11d51c)break;else _0x528618['push'](_0x528618['shift']());}catch(_0x1a1261){_0x528618['push'](_0x528618['shift']());}}}(_0x1aed,0x9cab1));import{readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';function _0x1aed(){const _0x3c839c=['No\x20auth.json\x20found\x20at\x20','\x0a✓\x20Encrypted\x20auth\x20saved\x20to:\x20','1035366iaiPSV','VEWFd','255BhwUjZ','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','2447saygcq','.enc','uALpK','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20with\x20authentication,\x20or\x20ranger\x20profile\x20update','log','4655812JVpxfN','2313950UlbRoP','5554935DPPUlx','16VbCyBH','8WHzBoK','3480MmzvMQ','201292JWwyAm','YLJzN'];_0x1aed=function(){return _0x3c839c;};return _0x1aed();}import{getEnvDir}from'./utils/settings.js';function _0x1a36(_0x157993,_0xab2c41){_0x157993=_0x157993-0x9c;const _0x1aed84=_0x1aed();let _0x1a3672=_0x1aed84[_0x157993];return _0x1a3672;}export async function authEncrypt(_0x2eb997){const _0x5253c9=_0x1a36,_0x21485a={'uALpK':function(_0x3f4164,_0x3f6f82){return _0x3f4164(_0x3f6f82);},'YLJzN':function(_0x194bec,_0x2e4b71){return _0x194bec(_0x2e4b71);},'VEWFd':function(_0x232c74,_0x40e60d,_0x3fdf5b){return _0x232c74(_0x40e60d,_0x3fdf5b);}},_0x1702ee=_0x21485a[_0x5253c9(0xa6)](getEnvDir,_0x2eb997),_0x235553=join(_0x1702ee,'auth.json'),_0x3e87a0=_0x235553+_0x5253c9(0xa5);if(!existsSync(_0x1702ee))throw new Error('Profile\x20\x22'+_0x2eb997+_0x5253c9(0xa3)+_0x2eb997);if(!_0x21485a[_0x5253c9(0x9d)](existsSync,_0x235553))throw new Error(_0x5253c9(0x9e)+_0x235553+_0x5253c9(0xa8));const _0x29c548=await getToken();if(!_0x29c548)throw new Error(_0x5253c9(0xa7));const _0x1f1d71=await readFile(_0x235553,'utf-8'),_0x43953a=_0x21485a[_0x5253c9(0xa1)](encrypt,_0x1f1d71,_0x29c548);await writeFile(_0x3e87a0,_0x43953a),console[_0x5253c9(0xa9)](_0x5253c9(0x9f)+_0x3e87a0),console[_0x5253c9(0xa9)]('\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.'),console[_0x5253c9(0xa9)]('\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.'),_0x21485a['YLJzN'](existsSync,_0x3e87a0)&&(console[_0x5253c9(0xa9)]('\x0a\x20\x20The\x20plaintext\x20auth.json\x20is\x20gitignored\x20for\x20security.'),console['log']('\x20\x20The\x20encrypted\x20auth.json.enc\x20can\x20be\x20committed.'));}
1
+ (function(_0x5de4e0,_0x209204){var _0x51aa23=_0x16ff,_0x3179ee=_0x5de4e0();while(!![]){try{var _0x2bc47c=parseInt(_0x51aa23(0x177))/0x1*(-parseInt(_0x51aa23(0x180))/0x2)+parseInt(_0x51aa23(0x17a))/0x3*(-parseInt(_0x51aa23(0x185))/0x4)+-parseInt(_0x51aa23(0x178))/0x5+-parseInt(_0x51aa23(0x17d))/0x6+-parseInt(_0x51aa23(0x176))/0x7+parseInt(_0x51aa23(0x181))/0x8*(-parseInt(_0x51aa23(0x179))/0x9)+parseInt(_0x51aa23(0x187))/0xa;if(_0x2bc47c===_0x209204)break;else _0x3179ee['push'](_0x3179ee['shift']());}catch(_0x343baa){_0x3179ee['push'](_0x3179ee['shift']());}}}(_0x31cc,0xb73ee));function _0x16ff(_0x56fc20,_0x13bc13){_0x56fc20=_0x56fc20-0x176;var _0x31cc6e=_0x31cc();var _0x16ffbf=_0x31cc6e[_0x56fc20];return _0x16ffbf;}function _0x31cc(){var _0x24e2ed=['ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','LXRQt','9970632vlDUQc','721562XbIOui','3630890ObAcbW','4774239SHpDds','94470HSOmWX','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','EbNCZ','6987642sVKOGT','gadBr','\x20\x20https://docs.ranger.net/main/concepts/profiles','4nYfjdv','8sOsJYt','zNeEN','error','ZeUyN','172cRIlVo','exit','73934000vPNtXD'];_0x31cc=function(){return _0x24e2ed;};return _0x31cc();}export async function authEncrypt(_0x550dac){var _0x4788e5=_0x16ff,_0x184f6b={'qtZId':function(_0x59b389,_0x2d9704){return _0x59b389+_0x2d9704;},'gadBr':function(_0x2b432b,_0x2bf7bd){return _0x2b432b+_0x2bf7bd;},'LXRQt':function(_0x4f1665,_0x29079a){return _0x4f1665+_0x29079a;},'HrYDr':_0x4788e5(0x188),'zNeEN':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','rrqAP':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ZeUyN':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','EbNCZ':_0x4788e5(0x17f)};console[_0x4788e5(0x183)](_0x184f6b['qtZId'](_0x184f6b[_0x4788e5(0x17e)](_0x184f6b[_0x4788e5(0x17e)](_0x184f6b[_0x4788e5(0x189)](_0x184f6b['HrYDr'],_0x184f6b[_0x4788e5(0x182)]),'\x0a'),_0x184f6b['rrqAP'])+_0x4788e5(0x17b)+'\x0a',_0x184f6b[_0x4788e5(0x184)])+_0x184f6b[_0x4788e5(0x17c)]),process[_0x4788e5(0x186)](0x1);}
@@ -1 +1 @@
1
- const _0x3fe56e=_0x43fd;(function(_0x112cee,_0x596709){const _0x29f1b7=_0x43fd,_0x454f74=_0x112cee();while(!![]){try{const _0x50a7f3=parseInt(_0x29f1b7(0xdd))/0x1*(parseInt(_0x29f1b7(0xdc))/0x2)+parseInt(_0x29f1b7(0xff))/0x3*(-parseInt(_0x29f1b7(0xda))/0x4)+-parseInt(_0x29f1b7(0xe1))/0x5*(-parseInt(_0x29f1b7(0xd5))/0x6)+parseInt(_0x29f1b7(0xec))/0x7*(-parseInt(_0x29f1b7(0xe8))/0x8)+parseInt(_0x29f1b7(0xfd))/0x9*(parseInt(_0x29f1b7(0xef))/0xa)+-parseInt(_0x29f1b7(0xe6))/0xb*(parseInt(_0x29f1b7(0x10e))/0xc)+-parseInt(_0x29f1b7(0xfc))/0xd;if(_0x50a7f3===_0x596709)break;else _0x454f74['push'](_0x454f74['shift']());}catch(_0x57366f){_0x454f74['push'](_0x454f74['shift']());}}}(_0x35f7,0xca032));function _0x35f7(){const _0x5dc3cd=['nxdTh','string','✓\x20Removed\x20stored\x20credentials','772mmTOzd','project','2jMVyyR','1569044oaTeqj','✓\x20Removed\x20user\x20skill:\x20','RdqwO','replace','30jmKxtg','QLabG','close','HeaAU','feature-tracker','1535413DBHUMc','noBKQ','16rPghUs','koOBF','platform','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','1090327shcRBD','filter','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','88710EWlrwT','nzewU','ranger@trailhead','bug-bash','pkOZf','akwPy','zpSLD','prlaD','e2e-test-recommender','plugin','pipe','error','claude','3819257vRbqmA','90PsbHfq','remove','297tWgBYt','jlJNh','UFjMl','PMVEz','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','length','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','AtqHG','win32','Equzl','log','JEyjd','NlGET','QhHCZ','IYIUM','24RjOEBM','\x0a✅\x20Cleanup\x20complete!\x0a','dWdlq','ScPoQ','tJZUZ','73272YJIvlt','✓\x20Removed\x20.ranger/\x20directory'];_0x35f7=function(){return _0x5dc3cd;};return _0x35f7();}import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';function _0x43fd(_0x4ead94,_0x45fd59){_0x4ead94=_0x4ead94-0xd2;const _0x35f7cb=_0x35f7();let _0x43fdd3=_0x35f7cb[_0x4ead94];return _0x43fdd3;}import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x3fe56e(0xe5),_0x3fe56e(0xf2),_0x3fe56e(0xf7)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x14427e){const _0x416cc6=_0x3fe56e,_0x4db217=_0x14427e['replace'](/\/\*[\s\S]*?\*\//g,''),_0x31e19c=_0x4db217[_0x416cc6(0xe0)](/^\s*\/\/.*$/gm,''),_0x438fec=_0x31e19c['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x438fec);}async function removeOpencodePluginConfig(_0x552ec9){const _0x29323e=_0x3fe56e,_0x300b82={'dWdlq':_0x29323e(0xd8),'jlJNh':function(_0x32c3e9,_0xf29790){return _0x32c3e9(_0xf29790);},'PMzpe':'utf-8','Uefuu':function(_0x87f5f3,_0xe7f38a){return _0x87f5f3(_0xe7f38a);},'kHzdX':function(_0x2a83d7,_0x4be4c9,_0x225c16){return _0x2a83d7(_0x4be4c9,_0x225c16);}};if(!_0x300b82[_0x29323e(0x100)](existsSync,_0x552ec9))return![];let _0x44090b;try{const _0x23ef6b=await readFile(_0x552ec9,_0x300b82['PMzpe']);_0x44090b=_0x300b82['Uefuu'](parseJsonc,_0x23ef6b);}catch{return![];}const _0xe5cdc8=Array['isArray'](_0x44090b[_0x29323e(0xf8)])?_0x44090b[_0x29323e(0xf8)]:[];if(_0xe5cdc8[_0x29323e(0x104)]===0x0)return![];const _0x555c8c=_0xe5cdc8[_0x29323e(0xed)](_0xfd70a6=>{const _0x2a96d6=_0x29323e;if(typeof _0xfd70a6!==_0x300b82[_0x2a96d6(0xd2)])return!![];return _0xfd70a6!==opencodePluginName;});if(_0x555c8c['length']===_0xe5cdc8[_0x29323e(0x104)])return![];return _0x555c8c['length']===0x0?delete _0x44090b[_0x29323e(0xf8)]:_0x44090b['plugin']=_0x555c8c,await _0x300b82['kHzdX'](writeFile,_0x552ec9,JSON['stringify'](_0x44090b,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x1fc935){const _0x321b8b=_0x3fe56e,_0x4ee2fb={'gcEOs':function(_0x5655da,_0x2a04b7){return _0x5655da(_0x2a04b7);},'nzewU':function(_0x26d88d,_0x3caba2){return _0x26d88d===_0x3caba2;},'tPsUc':function(_0x13d8f8,_0x4c66f9){return _0x13d8f8(_0x4c66f9);},'JEyjd':_0x321b8b(0xf8),'ScPoQ':function(_0x5e658f,_0x317af7,_0x288a33,_0x13f4ec){return _0x5e658f(_0x317af7,_0x288a33,_0x13f4ec);},'yhaar':'claude','eAycn':_0x321b8b(0x107),'akwPy':_0x321b8b(0xe3)};return new Promise(_0x1e98ad=>{const _0x4c8552=_0x321b8b,_0x3f42c8={'CTNAa':function(_0x54af25,_0x295a3e){return _0x4ee2fb['gcEOs'](_0x54af25,_0x295a3e);},'nxdTh':function(_0x39862f,_0x215304){const _0x13c436=_0x43fd;return _0x4ee2fb[_0x13c436(0xf0)](_0x39862f,_0x215304);},'NlGET':function(_0x2e2403,_0x5ee547){return _0x4ee2fb['tPsUc'](_0x2e2403,_0x5ee547);}},_0x36bb77=[_0x4ee2fb[_0x4c8552(0x10a)],'uninstall',_0x4c8552(0xf1)];_0x1fc935&&_0x36bb77['push']('--scope',_0x1fc935);const _0x592104=_0x4ee2fb[_0x4c8552(0xd3)](spawn,_0x4ee2fb['yhaar'],_0x36bb77,{'stdio':'pipe','shell':process[_0x4c8552(0xea)]===_0x4ee2fb['eAycn']});_0x592104['on'](_0x4ee2fb[_0x4c8552(0xf4)],_0x349ef8=>{const _0x46f67b=_0x4c8552;_0x3f42c8['CTNAa'](_0x1e98ad,_0x3f42c8[_0x46f67b(0xd7)](_0x349ef8,0x0));}),_0x592104['on'](_0x4c8552(0xfa),()=>{const _0x11c3c7=_0x4c8552;_0x3f42c8[_0x11c3c7(0x10b)](_0x1e98ad,![]);});});}async function removeMarketplace(){const _0x1f5b38=_0x3fe56e,_0x21daa2={'XnMLl':function(_0x362179,_0x16ac66){return _0x362179(_0x16ac66);},'sFxAr':function(_0x43e0ec,_0xc1a3e7){return _0x43e0ec===_0xc1a3e7;},'pkOZf':function(_0x4428ac,_0x2e6455,_0x405572,_0x1d8c7d){return _0x4428ac(_0x2e6455,_0x405572,_0x1d8c7d);},'NHLSS':_0x1f5b38(0xfb),'hEpbk':'marketplace','PdhLL':'trailhead','UFjMl':_0x1f5b38(0xf9),'Equzl':'win32','QhHCZ':'error'};return new Promise(_0x5b40e8=>{const _0x24fe29=_0x1f5b38,_0x4d2c67=_0x21daa2[_0x24fe29(0xf3)](spawn,_0x21daa2['NHLSS'],[_0x24fe29(0xf8),_0x21daa2['hEpbk'],_0x24fe29(0xfe),_0x21daa2['PdhLL']],{'stdio':_0x21daa2[_0x24fe29(0x101)],'shell':process['platform']===_0x21daa2[_0x24fe29(0x108)]});_0x4d2c67['on']('close',_0x4c0c63=>{_0x21daa2['XnMLl'](_0x5b40e8,_0x21daa2['sFxAr'](_0x4c0c63,0x0));}),_0x4d2c67['on'](_0x21daa2[_0x24fe29(0x10c)],()=>{_0x5b40e8(![]);});});}export async function clean(){const _0x305343=_0x3fe56e,_0x393ca7={'gdvtH':function(_0x4b9194){return _0x4b9194();},'prlaD':function(_0x1fa1c1,_0x51d888){return _0x1fa1c1(_0x51d888);},'SQTaM':function(_0x57f9f7){return _0x57f9f7();},'tJZUZ':function(_0x1f9ec9,_0x51d898,_0x226cd7){return _0x1f9ec9(_0x51d898,_0x226cd7);},'FCEWl':_0x305343(0xd6),'AtqHG':function(_0xcd7fae,_0x2513fb){return _0xcd7fae(_0x2513fb);},'koOBF':'project','tkQeN':function(_0x1f3f52,_0x5783ee,_0x341906){return _0x1f3f52(_0x5783ee,_0x341906);},'IYIUM':'user','noBKQ':function(_0x5c7a08,_0x76b366,_0x492e97){return _0x5c7a08(_0x76b366,_0x492e97);},'PMVEz':function(_0x2e05e1,_0x1c9c97){return _0x2e05e1(_0x1c9c97);},'RdqwO':_0x305343(0xee),'HeaAU':function(_0x41446b,_0x2c5059){return _0x41446b(_0x2c5059);},'DkIMy':'opencode.json','ENhor':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','zpSLD':function(_0x28571b){return _0x28571b();},'QLabG':_0x305343(0x10f)};console[_0x305343(0x109)](_0x305343(0x103));let _0xc26dbd=![];try{await deleteAllCredentials(),console['log'](_0x305343(0xd9)),_0xc26dbd=!![];}catch{}const _0x403bde=_0x393ca7['gdvtH'](getCacheFile);_0x393ca7['prlaD'](existsSync,_0x403bde)&&(await _0x393ca7[_0x305343(0xf6)](rm,_0x403bde),_0xc26dbd=!![]);const _0x4d528b=_0x393ca7['SQTaM'](getRangerDir);_0x393ca7[_0x305343(0xf6)](existsSync,_0x4d528b)&&(await _0x393ca7[_0x305343(0xd4)](rm,_0x4d528b,{'recursive':!![]}),console['log'](_0x393ca7['FCEWl']),_0xc26dbd=!![]);const _0x1a9a5c=getProjectSkillsDir();for(const _0x2f4bc6 of skillsToRemove){const _0xcb0687=join(_0x1a9a5c,_0x2f4bc6);_0x393ca7[_0x305343(0x106)](existsSync,_0xcb0687)&&(await _0x393ca7['tJZUZ'](rm,_0xcb0687,{'recursive':!![]}),console[_0x305343(0x109)]('✓\x20Removed\x20project\x20skill:\x20'+_0x2f4bc6),_0xc26dbd=!![]);}const _0x579769=getUserSkillsDir();for(const _0x87af67 of skillsToRemove){const _0x1a2f9f=join(_0x579769,_0x87af67);existsSync(_0x1a2f9f)&&(await rm(_0x1a2f9f,{'recursive':!![]}),console[_0x305343(0x109)](_0x305343(0xde)+_0x87af67),_0xc26dbd=!![]);}const _0x2281a4=getOpencodeSkillsDir(_0x393ca7[_0x305343(0xe9)]);for(const _0xd6134a of skillsToRemove){const _0x5cabb7=_0x393ca7['tJZUZ'](join,_0x2281a4,_0xd6134a);existsSync(_0x5cabb7)&&(await _0x393ca7['tkQeN'](rm,_0x5cabb7,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0xd6134a),_0xc26dbd=!![]);}const _0x57c88f=_0x393ca7[_0x305343(0x106)](getOpencodeSkillsDir,_0x393ca7[_0x305343(0x10d)]);for(const _0x3e21ac of skillsToRemove){const _0x126f4d=join(_0x57c88f,_0x3e21ac);_0x393ca7['prlaD'](existsSync,_0x126f4d)&&(await rm(_0x126f4d,{'recursive':!![]}),console[_0x305343(0x109)](_0x305343(0xeb)+_0x3e21ac),_0xc26dbd=!![]);}const _0x3f9721=_0x393ca7[_0x305343(0xe7)](join,_0x393ca7['AtqHG'](getOpencodeConfigDir,'project'),'opencode.json');await _0x393ca7['PMVEz'](removeOpencodePluginConfig,_0x3f9721)&&(console[_0x305343(0x109)](_0x393ca7[_0x305343(0xdf)]),_0xc26dbd=!![]);const _0x1bd865=_0x393ca7[_0x305343(0xe7)](join,_0x393ca7[_0x305343(0xe4)](getOpencodeConfigDir,_0x393ca7[_0x305343(0x10d)]),_0x393ca7['DkIMy']);await removeOpencodePluginConfig(_0x1bd865)&&(console['log'](_0x305343(0x105)),_0xc26dbd=!![]);const _0x395ddc=await uninstallClaudePlugin();_0x395ddc&&(console[_0x305343(0x109)](_0x393ca7['ENhor']),_0xc26dbd=!![]);const _0x3c47c8=await _0x393ca7[_0x305343(0x102)](uninstallClaudePlugin,_0x305343(0xdb));_0x3c47c8&&(console['log']('✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'),_0xc26dbd=!![]);const _0x15585d=await _0x393ca7[_0x305343(0xf5)](removeMarketplace);_0x15585d&&(console[_0x305343(0x109)]('✓\x20Removed\x20trailhead\x20marketplace'),_0xc26dbd=!![]),_0xc26dbd?console['log'](_0x393ca7[_0x305343(0xe2)]):console[_0x305343(0x109)]('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ const _0x5982e1=_0x5d86;(function(_0x3ded28,_0x57ff62){const _0x5c2165=_0x5d86,_0x2690d9=_0x3ded28();while(!![]){try{const _0x43e929=parseInt(_0x5c2165(0x1ac))/0x1+-parseInt(_0x5c2165(0x1b9))/0x2+parseInt(_0x5c2165(0x190))/0x3*(parseInt(_0x5c2165(0x1b2))/0x4)+parseInt(_0x5c2165(0x185))/0x5*(parseInt(_0x5c2165(0x193))/0x6)+parseInt(_0x5c2165(0x189))/0x7*(-parseInt(_0x5c2165(0x18b))/0x8)+-parseInt(_0x5c2165(0x1b8))/0x9*(-parseInt(_0x5c2165(0x19f))/0xa)+-parseInt(_0x5c2165(0x19d))/0xb*(parseInt(_0x5c2165(0x196))/0xc);if(_0x43e929===_0x57ff62)break;else _0x2690d9['push'](_0x2690d9['shift']());}catch(_0x3590c9){_0x2690d9['push'](_0x2690d9['shift']());}}}(_0x23b5,0x71ab6));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';function _0x23b5(){const _0x497d79=['✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','IGlyx','GZyJE','178940xGEGJR','BJrGQ','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','uPoFR','7jOpdYJ','✓\x20Removed\x20project\x20skill:\x20','1618416UgTlhY','parse','GupCK','Nothing\x20to\x20clean\x20up.\x0a','xXCPu','248871zlZSxU','log','stringify','18IaWrhr','cZyQf','win32','2664zVeqBd','HLiKe','PJwLl','isArray','project','mgmKG','✓\x20Removed\x20trailhead\x20marketplace','25003WDzHsx','ABhZg','8310vKrgFe','push','--scope','glKgv','EXxCK','yCMra','filter','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','bkyYB','IbtYe','error','yiojr','plugin','868920SLlhmn','rwNvj','AKtNn','remove','opencode.json','claude','40idRlpi','ranger','replace','bug-bash','e2e-test-recommender','\x0a✅\x20Cleanup\x20complete!\x0a','1692VjXwfX','1579168GqFiXn','ranger@trailhead','feature-tracker','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','platform'];_0x23b5=function(){return _0x497d79;};return _0x23b5();}import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x5982e1(0x1b3),_0x5982e1(0x17f),_0x5982e1(0x1b5),_0x5982e1(0x1b6)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x28bc2b){const _0x533d57=_0x5982e1,_0x3c0c64=_0x28bc2b['replace'](/\/\*[\s\S]*?\*\//g,''),_0x1c8add=_0x3c0c64['replace'](/^\s*\/\/.*$/gm,''),_0x160135=_0x1c8add[_0x533d57(0x1b4)](/,\s*([}\]])/g,'$1');return JSON[_0x533d57(0x18c)](_0x160135);}async function removeOpencodePluginConfig(_0x3b2196){const _0x1626cd=_0x5982e1,_0x206c87={'ytLSb':'string','BJrGQ':function(_0x2cfd3b,_0x2df40c){return _0x2cfd3b(_0x2df40c);},'GZyJE':function(_0x42ded5,_0x843fa8){return _0x42ded5===_0x843fa8;},'tqTwf':function(_0xf75096,_0x5d12de){return _0xf75096+_0x5d12de;}};if(!existsSync(_0x3b2196))return![];let _0x8ebaa4;try{const _0xcddc5a=await readFile(_0x3b2196,'utf-8');_0x8ebaa4=_0x206c87[_0x1626cd(0x186)](parseJsonc,_0xcddc5a);}catch{return![];}const _0x4d4467=Array[_0x1626cd(0x199)](_0x8ebaa4[_0x1626cd(0x1ab)])?_0x8ebaa4['plugin']:[];if(_0x4d4467['length']===0x0)return![];const _0x493925=_0x4d4467[_0x1626cd(0x1a5)](_0x5daf71=>{if(typeof _0x5daf71!==_0x206c87['ytLSb'])return!![];return _0x5daf71!==opencodePluginName;});if(_0x493925['length']===_0x4d4467['length'])return![];return _0x206c87[_0x1626cd(0x184)](_0x493925['length'],0x0)?delete _0x8ebaa4[_0x1626cd(0x1ab)]:_0x8ebaa4[_0x1626cd(0x1ab)]=_0x493925,await writeFile(_0x3b2196,_0x206c87['tqTwf'](JSON[_0x1626cd(0x192)](_0x8ebaa4,null,0x2),'\x0a')),!![];}function _0x5d86(_0x450acb,_0x52b8be){_0x450acb=_0x450acb-0x17e;const _0x23b594=_0x23b5();let _0x5d86cd=_0x23b594[_0x450acb];return _0x5d86cd;}async function uninstallClaudePlugin(_0x35ec2f){const _0x388a42=_0x5982e1,_0x196236={'yCMra':function(_0x486af0,_0x2d8fbf){return _0x486af0===_0x2d8fbf;},'EtyVL':_0x388a42(0x1ab),'rwNvj':'uninstall','aDNyX':_0x388a42(0x1a1),'yiojr':function(_0x59f9db,_0x13e046,_0x5c64f4,_0x288b1a){return _0x59f9db(_0x13e046,_0x5c64f4,_0x288b1a);},'fFUtM':'claude','flqPg':'ignore','glKgv':function(_0xed8aa9){return _0xed8aa9();},'aEOwZ':function(_0x113b48,_0xf705b){return _0x113b48===_0xf705b;},'ABhZg':_0x388a42(0x195),'AKtNn':'close'};return new Promise(_0x9afa0a=>{const _0x428fce=_0x388a42,_0x561ccc={'HLiKe':function(_0x4a169e,_0x33a8c6){const _0x1c11f7=_0x5d86;return _0x196236[_0x1c11f7(0x1a4)](_0x4a169e,_0x33a8c6);}},_0x463d71=[_0x196236['EtyVL'],_0x196236[_0x428fce(0x1ad)],_0x428fce(0x17e)];_0x35ec2f&&_0x463d71[_0x428fce(0x1a0)](_0x196236['aDNyX'],_0x35ec2f);const _0xc0c9c0=_0x196236[_0x428fce(0x1aa)](spawn,_0x196236['fFUtM'],_0x463d71,{'stdio':[_0x196236['flqPg'],'ignore','ignore'],'cwd':_0x35ec2f?_0x196236[_0x428fce(0x1a2)](getProjectRoot):undefined,'shell':_0x196236['aEOwZ'](process['platform'],_0x196236[_0x428fce(0x19e)])});_0xc0c9c0['on'](_0x196236[_0x428fce(0x1ae)],_0x4765ab=>{const _0x4e8b9a=_0x428fce;_0x9afa0a(_0x561ccc[_0x4e8b9a(0x197)](_0x4765ab,0x0));}),_0xc0c9c0['on'](_0x428fce(0x1a9),()=>{_0x9afa0a(![]);});});}async function removeMarketplace(){const _0x837fa={'mgmKG':'marketplace','ztphZ':'trailhead','Cmumy':function(_0x3b1523,_0x2a011f){return _0x3b1523===_0x2a011f;}};return new Promise(_0x2292d2=>{const _0x5e065=_0x5d86,_0x1f4892=spawn(_0x5e065(0x1b1),[_0x5e065(0x1ab),_0x837fa[_0x5e065(0x19b)],_0x5e065(0x1af),_0x837fa['ztphZ']],{'stdio':['ignore','ignore','ignore'],'shell':_0x837fa['Cmumy'](process[_0x5e065(0x181)],'win32')});_0x1f4892['on']('close',_0x1d9b20=>{_0x2292d2(_0x1d9b20===0x0);}),_0x1f4892['on'](_0x5e065(0x1a9),()=>{_0x2292d2(![]);});});}export async function clean(){const _0xcb46f8=_0x5982e1,_0x561533={'aJHoH':function(_0x2f181b,_0x588ef6){return _0x2f181b(_0x588ef6);},'dGJee':function(_0xe809e0){return _0xe809e0();},'bkyYB':function(_0x45b4bf,_0x2dea5c,_0x5abeb8){return _0x45b4bf(_0x2dea5c,_0x5abeb8);},'xXCPu':function(_0x20a12b){return _0x20a12b();},'bsXCB':function(_0x27c6c6,_0x16af26,_0x364f02){return _0x27c6c6(_0x16af26,_0x364f02);},'uPoFR':function(_0x3ab8a2,_0x278358){return _0x3ab8a2(_0x278358);},'Punek':function(_0x5d4f8b,_0x504184,_0x2cc227){return _0x5d4f8b(_0x504184,_0x2cc227);},'GupCK':_0xcb46f8(0x19a),'fDZBa':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','cZyQf':'user','hwqcU':_0xcb46f8(0x182),'IbtYe':function(_0x1c23b1){return _0x1c23b1();},'IGlyx':_0xcb46f8(0x180),'PJwLl':function(_0x48158c){return _0x48158c();},'EXxCK':_0xcb46f8(0x1b7)};console[_0xcb46f8(0x191)](_0xcb46f8(0x187));let _0x140324=![];try{await deleteAllCredentials(),console[_0xcb46f8(0x191)]('✓\x20Removed\x20stored\x20credentials'),_0x140324=!![];}catch{}const _0x55f0c1=getCacheFile();existsSync(_0x55f0c1)&&(await _0x561533['aJHoH'](rm,_0x55f0c1),_0x140324=!![]);const _0x451ba3=_0x561533['dGJee'](getRangerDir);existsSync(_0x451ba3)&&(await _0x561533[_0xcb46f8(0x1a7)](rm,_0x451ba3,{'recursive':!![]}),console['log']('✓\x20Removed\x20.ranger/\x20directory'),_0x140324=!![]);const _0x8fee98=getProjectSkillsDir();for(const _0x16e76b of skillsToRemove){const _0x17114b=join(_0x8fee98,_0x16e76b);_0x561533['aJHoH'](existsSync,_0x17114b)&&(await rm(_0x17114b,{'recursive':!![]}),console[_0xcb46f8(0x191)](_0xcb46f8(0x18a)+_0x16e76b),_0x140324=!![]);}const _0x2898ec=_0x561533[_0xcb46f8(0x18f)](getUserSkillsDir);for(const _0x2158d3 of skillsToRemove){const _0x1d5291=join(_0x2898ec,_0x2158d3);existsSync(_0x1d5291)&&(await rm(_0x1d5291,{'recursive':!![]}),console[_0xcb46f8(0x191)]('✓\x20Removed\x20user\x20skill:\x20'+_0x2158d3),_0x140324=!![]);}const _0x4a3c4e=getOpencodeSkillsDir(_0xcb46f8(0x19a));for(const _0x51374a of skillsToRemove){const _0x5c72a3=_0x561533['bsXCB'](join,_0x4a3c4e,_0x51374a);existsSync(_0x5c72a3)&&(await rm(_0x5c72a3,{'recursive':!![]}),console[_0xcb46f8(0x191)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x51374a),_0x140324=!![]);}const _0x45d02f=_0x561533[_0xcb46f8(0x188)](getOpencodeSkillsDir,'user');for(const _0x57a6eb of skillsToRemove){const _0x4a0161=_0x561533['Punek'](join,_0x45d02f,_0x57a6eb);existsSync(_0x4a0161)&&(await rm(_0x4a0161,{'recursive':!![]}),console[_0xcb46f8(0x191)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x57a6eb),_0x140324=!![]);}const _0x28a343=join(_0x561533[_0xcb46f8(0x188)](getOpencodeConfigDir,_0x561533[_0xcb46f8(0x18d)]),_0xcb46f8(0x1b0));await removeOpencodePluginConfig(_0x28a343)&&(console['log'](_0x561533['fDZBa']),_0x140324=!![]);const _0x4034c4=join(getOpencodeConfigDir(_0x561533[_0xcb46f8(0x194)]),_0xcb46f8(0x1b0));await removeOpencodePluginConfig(_0x4034c4)&&(console[_0xcb46f8(0x191)](_0x561533['hwqcU']),_0x140324=!![]);const _0xb6d9fa=await _0x561533[_0xcb46f8(0x1a8)](uninstallClaudePlugin);_0xb6d9fa&&(console[_0xcb46f8(0x191)](_0xcb46f8(0x1a6)),_0x140324=!![]);const _0x530a72=await uninstallClaudePlugin('project');_0x530a72&&(console['log'](_0x561533[_0xcb46f8(0x183)]),_0x140324=!![]);const _0x38998a=await _0x561533[_0xcb46f8(0x198)](removeMarketplace);_0x38998a&&(console['log'](_0xcb46f8(0x19c)),_0x140324=!![]),_0x140324?console['log'](_0x561533[_0xcb46f8(0x1a3)]):console['log'](_0xcb46f8(0x18e));}
@@ -1 +1 @@
1
- const _0x2a29cb=_0x5187;(function(_0x1b2859,_0x1566ce){const _0x43ab4c=_0x5187,_0x2bd312=_0x1b2859();while(!![]){try{const _0x44cfb8=parseInt(_0x43ab4c(0xef))/0x1*(parseInt(_0x43ab4c(0xf8))/0x2)+-parseInt(_0x43ab4c(0x107))/0x3*(parseInt(_0x43ab4c(0xff))/0x4)+-parseInt(_0x43ab4c(0xf4))/0x5*(parseInt(_0x43ab4c(0x10e))/0x6)+parseInt(_0x43ab4c(0x108))/0x7+-parseInt(_0x43ab4c(0x104))/0x8+-parseInt(_0x43ab4c(0xf2))/0x9*(-parseInt(_0x43ab4c(0x112))/0xa)+-parseInt(_0x43ab4c(0xf9))/0xb*(parseInt(_0x43ab4c(0xfb))/0xc);if(_0x44cfb8===_0x1566ce)break;else _0x2bd312['push'](_0x2bd312['shift']());}catch(_0x18c45f){_0x2bd312['push'](_0x2bd312['shift']());}}}(_0x13fe,0x4757f));import{existsSync}from'fs';import{loadSettings,saveSettings,getNestedValue,setNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';function _0x13fe(){const _0x10cd95=['3830080DIGQNX','Profile\x20\x22','stringify','37233nSolPV','3957583SypmNg','UEDSS','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','nTFVb','true','false','6ybvYxu','headless','No\x20configuration\x20set\x20for\x20\x22','JAPKH','70NzSADn','GpLmH','15CcQAFV','includes','(not\x20set)','485163PcbtcQ','\x22\x20not\x20found','298805xVLXOb','object','\x22\x20does\x20not\x20exist.','log','36020vdvcPW','1336423ExxPzV','EYzfC','12QcmGQx','Set\x20','arckW','TfTjn','84WigRZV','Key\x20\x22','Removed\x20','allowInsecureLocalhost','Invalid\x20value\x20for\x20'];_0x13fe=function(){return _0x10cd95;};return _0x13fe();}function _0x5187(_0x50a4ff,_0x1aeddb){_0x50a4ff=_0x50a4ff-0xef;const _0x13feed=_0x13fe();let _0x5187a3=_0x13feed[_0x50a4ff];return _0x5187a3;}const BOOLEAN_KEYS=[_0x2a29cb(0x10f),_0x2a29cb(0x102)];function parseValue(_0x47609c,_0x4d10a6){const _0x14f6d9=_0x2a29cb,_0x5d1d24={'arckW':function(_0x33f3ca,_0x9b7321){return _0x33f3ca===_0x9b7321;},'UEDSS':_0x14f6d9(0x10c)};if(BOOLEAN_KEYS[_0x14f6d9(0xf0)](_0x47609c)){if(_0x5d1d24[_0x14f6d9(0xfd)](_0x4d10a6,_0x5d1d24[_0x14f6d9(0x109)]))return!![];if(_0x4d10a6===_0x14f6d9(0x10d))return![];throw new Error(_0x14f6d9(0x103)+_0x47609c+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x4d10a6;}export async function configSet(_0x3881eb,_0x3fd8ea,_0x37968f){const _0x25caf4=_0x2a29cb,_0x2e7dab={'TfTjn':function(_0x4930b6,_0x4ca95e){return _0x4930b6(_0x4ca95e);},'nTFVb':function(_0x4654b0,_0x182477,_0x4ee7d3,_0x4f85bf){return _0x4654b0(_0x182477,_0x4ee7d3,_0x4f85bf);},'Fbgnf':function(_0xf62d0b,_0x5747af,_0x22ee73){return _0xf62d0b(_0x5747af,_0x22ee73);}},_0x5484c6=_0x2e7dab['TfTjn'](getEnvDir,_0x3881eb);if(!_0x2e7dab[_0x25caf4(0xfe)](existsSync,_0x5484c6))throw new Error(_0x25caf4(0x105)+_0x3881eb+_0x25caf4(0x10a)+_0x3881eb);const _0x1c9a19=await loadSettings(_0x3881eb),_0x33b12c=parseValue(_0x3fd8ea,_0x37968f);_0x2e7dab[_0x25caf4(0x10b)](setNestedValue,_0x1c9a19,_0x3fd8ea,_0x33b12c),await _0x2e7dab['Fbgnf'](saveSettings,_0x3881eb,_0x1c9a19),console[_0x25caf4(0xf7)](_0x25caf4(0xfc)+_0x3fd8ea+'\x20=\x20'+_0x33b12c);}export async function configGet(_0x435294,_0x373833){const _0x4def4a=_0x2a29cb,_0x4b0867={'GpLmH':function(_0x4e8521,_0x4f2762){return _0x4e8521(_0x4f2762);},'EYzfC':function(_0x2a487e,_0x2abc4b){return _0x2a487e===_0x2abc4b;}},_0x11e5d4=getEnvDir(_0x435294);if(!_0x4b0867['GpLmH'](existsSync,_0x11e5d4))throw new Error(_0x4def4a(0x105)+_0x435294+_0x4def4a(0xf6));const _0x2f35a6=await _0x4b0867[_0x4def4a(0x113)](loadSettings,_0x435294),_0x18c218=getNestedValue(_0x2f35a6,_0x373833);if(_0x4b0867[_0x4def4a(0xfa)](_0x18c218,undefined))console['log'](_0x4def4a(0xf1));else typeof _0x18c218===_0x4def4a(0xf5)?console['log'](JSON[_0x4def4a(0x106)](_0x18c218,null,0x2)):console['log'](_0x18c218);}export async function configList(_0x520fc){const _0x5401dd=_0x2a29cb,_0x32d951={'JAPKH':function(_0x396b66,_0x1571da){return _0x396b66(_0x1571da);},'DhsXv':function(_0x1c1021,_0x165f4e){return _0x1c1021(_0x165f4e);}},_0x44d868=_0x32d951[_0x5401dd(0x111)](getSettingsPath,_0x520fc);if(!_0x32d951['DhsXv'](existsSync,_0x44d868)){const _0x8c5fd0=_0x32d951['DhsXv'](getEnvDir,_0x520fc);if(!existsSync(_0x8c5fd0))throw new Error('Profile\x20\x22'+_0x520fc+'\x22\x20does\x20not\x20exist.');console[_0x5401dd(0xf7)](_0x5401dd(0x110)+_0x520fc+'\x22');return;}const _0x11a4d8=await loadSettings(_0x520fc),_0x3aaae4=formatSettings(_0x11a4d8);!_0x3aaae4?console['log'](_0x5401dd(0x110)+_0x520fc+'\x22'):console['log'](_0x3aaae4);}export async function configUnset(_0x309d43,_0x2c0595){const _0x4c0c67=_0x2a29cb,_0x3d6635={'BELFq':function(_0x16bfec,_0x2cfa38){return _0x16bfec(_0x2cfa38);}},_0x2f33bf=getEnvDir(_0x309d43);if(!existsSync(_0x2f33bf))throw new Error(_0x4c0c67(0x105)+_0x309d43+'\x22\x20does\x20not\x20exist.');const _0x30c2ab=await _0x3d6635['BELFq'](loadSettings,_0x309d43),_0x5f0dd6=deleteNestedValue(_0x30c2ab,_0x2c0595);_0x5f0dd6?(await saveSettings(_0x309d43,_0x30c2ab),console[_0x4c0c67(0xf7)](_0x4c0c67(0x101)+_0x2c0595)):console['log'](_0x4c0c67(0x100)+_0x2c0595+_0x4c0c67(0xf3));}
1
+ (function(_0x400840,_0x15d00f){const _0x596b7e=_0x52c9,_0x3c8fba=_0x400840();while(!![]){try{const _0xb3f85b=parseInt(_0x596b7e(0x18e))/0x1*(-parseInt(_0x596b7e(0x173))/0x2)+-parseInt(_0x596b7e(0x15d))/0x3+-parseInt(_0x596b7e(0x15f))/0x4*(parseInt(_0x596b7e(0x169))/0x5)+-parseInt(_0x596b7e(0x171))/0x6*(parseInt(_0x596b7e(0x186))/0x7)+parseInt(_0x596b7e(0x184))/0x8*(-parseInt(_0x596b7e(0x181))/0x9)+parseInt(_0x596b7e(0x180))/0xa+parseInt(_0x596b7e(0x16f))/0xb;if(_0xb3f85b===_0x15d00f)break;else _0x3c8fba['push'](_0x3c8fba['shift']());}catch(_0x3a5db2){_0x3c8fba['push'](_0x3c8fba['shift']());}}}(_0x476b,0xeeab4));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';function _0x476b(){const _0x5acb1e=['endsWith','Key\x20\x22','AGsXh','XTety','length','49430VYtqeC','675lPNlbo','log','\x20for\x20\x22','73456EnocTh','ybdmX','2158135vvtHdi','tDtnv','false','stringify','true','kind','Removed\x20','test','931943WCibQA','YfDFP','IaJIH','949710tzMUTI','tGDUo','35384YFrqHq','alsoExistsElsewhere','local','cloud','No\x20configuration\x20set\x20for\x20\x22','object','startsWith','trim',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x20=\x20','885UqVIcd','isSafeInteger','xjbKo','Invalid\x20value\x20for\x20','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','sCHbt','59405115mljKbY','XLgdc','18aSJTtw','WKlAu','2hebZor','Godrs','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','(not\x20set)','RLUOH','settings','keys'];_0x476b=function(){return _0x5acb1e;};return _0x476b();}import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless','allowInsecureLocalhost'];function parseLocalValue(_0x4822f9,_0x43a41b){const _0x19f986=_0x52c9,_0x47b42f={'XTety':function(_0x176d92,_0x53e1f){return _0x176d92===_0x53e1f;}};if(BOOLEAN_KEYS['includes'](_0x4822f9)){if(_0x43a41b===_0x19f986(0x18a))return!![];if(_0x47b42f[_0x19f986(0x17e)](_0x43a41b,_0x19f986(0x188)))return![];throw new Error(_0x19f986(0x16c)+_0x4822f9+_0x19f986(0x167));}return _0x43a41b;}function parseOverrideValue(_0x3f7953){const _0x30681b=_0x52c9,_0x7a5f90={'VwwHv':_0x30681b(0x18a),'Rchkm':function(_0x3526bd,_0x5f3820){return _0x3526bd===_0x5f3820;},'IaJIH':'undefined','OlkEs':function(_0x28b782,_0x177bb0){return _0x28b782(_0x177bb0);}};if(_0x3f7953===_0x7a5f90['VwwHv'])return!![];if(_0x3f7953===_0x30681b(0x188))return![];if(_0x3f7953==='null')return null;if(_0x7a5f90['Rchkm'](_0x3f7953,_0x7a5f90[_0x30681b(0x15c)]))return undefined;if(/^-?\d+$/[_0x30681b(0x18d)](_0x3f7953)){const _0x38f962=_0x7a5f90['OlkEs'](Number,_0x3f7953);if(Number[_0x30681b(0x16a)](_0x38f962))return _0x38f962;}if(/^-?\d+\.\d+$/[_0x30681b(0x18d)](_0x3f7953)){const _0xdb094b=Number(_0x3f7953);if(!Number['isNaN'](_0xdb094b))return _0xdb094b;}const _0x3fa14d=_0x3f7953[_0x30681b(0x166)]();if(_0x3fa14d['startsWith']('{')&&_0x3fa14d[_0x30681b(0x17b)]('}')||_0x3fa14d[_0x30681b(0x165)]('[')&&_0x3fa14d[_0x30681b(0x17b)](']'))try{return JSON['parse'](_0x3fa14d);}catch{}return _0x3f7953;}async function resolveProfileTarget(_0x5c2322){const _0x3776a9=_0x52c9,_0x232dda={'ZAgch':function(_0x2346d3,_0x3f2e44){return _0x2346d3(_0x3f2e44);},'DUHez':_0x3776a9(0x161)},_0x573119=existsSync(_0x232dda['ZAgch'](getEnvDir,_0x5c2322));let _0x5d3e04=![];try{const _0x323652=await fetchCloudProfile(_0x5c2322);_0x5d3e04=Boolean(_0x323652);}catch{}if(_0x5d3e04)return{'kind':'cloud','alsoExistsElsewhere':_0x573119};if(_0x573119)return{'kind':_0x232dda['DUHez'],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x5c2322+_0x3776a9(0x16d)+_0x5c2322);}function printDualExistsHint(_0x641bb5){const _0x361145=_0x52c9;console[_0x361145(0x182)]('\x20\x20Note:\x20\x22'+_0x641bb5+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function _0x52c9(_0x4b2d09,_0x358f5a){_0x4b2d09=_0x4b2d09-0x15b;const _0x476b1f=_0x476b();let _0x52c9a5=_0x476b1f[_0x4b2d09];return _0x52c9a5;}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x16e14f){const _0x5eba93=_0x52c9,_0x4e39d8={'RLUOH':function(_0x4066a9,_0x19f724){return _0x4066a9??_0x19f724;}},_0x160e55=await fetchCloudProfile(_0x16e14f),_0x3617a7=readProfileOverrides(getProjectPath(),_0x16e14f);return mergeCloudProfileSettings(_0x160e55?.[_0x5eba93(0x179)]??{},_0x4e39d8[_0x5eba93(0x178)](_0x3617a7,undefined));}export async function configSet(_0x127fd5,_0x5e7147,_0x4eff8d){const _0x356159=_0x52c9,_0xcf3b1c={'bZwMm':'cloud','wkqgE':function(_0x3dbf7a,_0x205048){return _0x3dbf7a(_0x205048);},'sCHbt':function(_0x4f0d81,_0x5107e0){return _0x4f0d81(_0x5107e0);},'tDtnv':function(_0x479dd1,_0x40de95,_0x375de2,_0x5ba577,_0x187efa){return _0x479dd1(_0x40de95,_0x375de2,_0x5ba577,_0x187efa);},'Iozkb':function(_0x2a398d){return _0x2a398d();}},_0x38d123=await resolveProfileTarget(_0x127fd5);if(_0x38d123[_0x356159(0x18b)]===_0xcf3b1c['bZwMm']){if(_0x38d123['alsoExistsElsewhere'])_0xcf3b1c['wkqgE'](printDualExistsHint,_0x127fd5);const _0x2ef1ba=_0xcf3b1c[_0x356159(0x16e)](parseOverrideValue,_0x4eff8d);_0xcf3b1c[_0x356159(0x187)](setProfileOverride,getProjectPath(),_0x127fd5,_0x5e7147,_0x2ef1ba),console['log']('Set\x20'+_0x5e7147+'\x20=\x20'+JSON[_0x356159(0x189)](_0x2ef1ba)+'\x20for\x20\x22'+_0x127fd5+'\x22');return;}const _0x2a1674=parseLocalValue(_0x5e7147,_0x4eff8d);setProfileOverride(_0xcf3b1c['Iozkb'](getProjectPath),_0x127fd5,_0x5e7147,_0x2a1674),console[_0x356159(0x182)]('Set\x20'+_0x5e7147+_0x356159(0x168)+_0x2a1674+_0x356159(0x183)+_0x127fd5+'\x22');}export async function configGet(_0x5f0f6b,_0x2134f0){const _0x52d7c6=_0x52c9,_0xc04a54={'TYXQQ':function(_0x53b500,_0x29bf00){return _0x53b500===_0x29bf00;},'hcANZ':'cloud','MBXNj':function(_0x421f76,_0x5b2719){return _0x421f76(_0x5b2719);},'Godrs':function(_0x5ea786,_0x55d2c8,_0x4bda94){return _0x5ea786(_0x55d2c8,_0x4bda94);},'kfQOn':function(_0x25a4f4,_0x217bb3){return _0x25a4f4===_0x217bb3;},'YfDFP':function(_0x295245,_0x340ae6){return _0x295245(_0x340ae6);},'AGsXh':_0x52d7c6(0x164)},_0x25e958=await resolveProfileTarget(_0x5f0f6b);if(_0xc04a54['TYXQQ'](_0x25e958['kind'],_0xc04a54['hcANZ'])){const _0x3aa047=await _0xc04a54['MBXNj'](loadEffectiveCloudSettings,_0x5f0f6b),_0x169789=_0xc04a54[_0x52d7c6(0x174)](getNestedValue,_0x3aa047,_0x2134f0);if(_0x169789===undefined)console['log'](_0x52d7c6(0x177));else _0xc04a54['kfQOn'](typeof _0x169789,_0x52d7c6(0x164))?console[_0x52d7c6(0x182)](JSON[_0x52d7c6(0x189)](_0x169789,null,0x2)):console[_0x52d7c6(0x182)](_0x169789);return;}const _0x53c9e2=await _0xc04a54[_0x52d7c6(0x15b)](loadSettings,_0x5f0f6b),_0x2cf399=_0xc04a54['Godrs'](getNestedValue,_0x53c9e2,_0x2134f0);if(_0xc04a54['kfQOn'](_0x2cf399,undefined))console[_0x52d7c6(0x182)](_0x52d7c6(0x177));else typeof _0x2cf399===_0xc04a54[_0x52d7c6(0x17d)]?console['log'](JSON[_0x52d7c6(0x189)](_0x2cf399,null,0x2)):console['log'](_0x2cf399);}export async function configList(_0x3f823b){const _0x4e9dc6=_0x52c9,_0x265fa2={'WKlAu':'cloud','XLgdc':function(_0x16076c,_0xefdbbb){return _0x16076c(_0xefdbbb);},'ZbAPo':function(_0x5d4139,_0x562e8a){return _0x5d4139===_0x562e8a;}},_0x283cbf=await resolveProfileTarget(_0x3f823b);if(_0x283cbf['kind']===_0x265fa2[_0x4e9dc6(0x172)]){const _0x35c655=await _0x265fa2['XLgdc'](loadEffectiveCloudSettings,_0x3f823b);if(!_0x35c655||_0x265fa2['ZbAPo'](Object[_0x4e9dc6(0x17a)](_0x35c655)[_0x4e9dc6(0x17f)],0x0)){console[_0x4e9dc6(0x182)](_0x4e9dc6(0x163)+_0x3f823b+'\x22');return;}console[_0x4e9dc6(0x182)](JSON[_0x4e9dc6(0x189)](_0x35c655,null,0x2));return;}const _0x265583=_0x265fa2[_0x4e9dc6(0x170)](getSettingsPath,_0x3f823b);if(!_0x265fa2['XLgdc'](existsSync,_0x265583)){console[_0x4e9dc6(0x182)]('No\x20configuration\x20set\x20for\x20\x22'+_0x3f823b+'\x22');return;}const _0x5385bb=await loadSettings(_0x3f823b),_0x29ef3c=_0x265fa2[_0x4e9dc6(0x170)](formatSettings,_0x5385bb);!_0x29ef3c?console[_0x4e9dc6(0x182)]('No\x20configuration\x20set\x20for\x20\x22'+_0x3f823b+'\x22'):console['log'](_0x29ef3c);}export async function configUnset(_0x4f5744,_0x84d1f){const _0x5f011c=_0x52c9,_0x1681d9={'ybdmX':function(_0x43c743){return _0x43c743();},'JmDGJ':function(_0x1dc6e2){return _0x1dc6e2();}},_0x17037e=await resolveProfileTarget(_0x4f5744);if(_0x17037e[_0x5f011c(0x18b)]===_0x5f011c(0x162)){if(_0x17037e[_0x5f011c(0x160)])printDualExistsHint(_0x4f5744);const _0x4e47f0=unsetProfileOverride(_0x1681d9[_0x5f011c(0x185)](getProjectPath),_0x4f5744,_0x84d1f);_0x4e47f0?console[_0x5f011c(0x182)](_0x5f011c(0x18c)+_0x84d1f+_0x5f011c(0x183)+_0x4f5744+'\x22'):console[_0x5f011c(0x182)](_0x5f011c(0x17c)+_0x84d1f+'\x22\x20not\x20found');return;}const _0x1a478b=unsetProfileOverride(_0x1681d9['JmDGJ'](getProjectPath),_0x4f5744,_0x84d1f);if(_0x1a478b){console[_0x5f011c(0x182)]('Removed\x20'+_0x84d1f);return;}const _0x387e2d=await loadSettings(_0x4f5744),_0x4046c4=deleteNestedValue(_0x387e2d,_0x84d1f);_0x4046c4?console['log'](_0x5f011c(0x17c)+_0x84d1f+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x4f5744+_0x5f011c(0x175)):console['log'](_0x5f011c(0x17c)+_0x84d1f+'\x22\x20not\x20found');}export async function configReset(_0x54fa65){const _0x1a78d0=_0x52c9,_0x5775f5={'xjbKo':function(_0xbcc16a,_0x105953){return _0xbcc16a(_0x105953);},'tGDUo':function(_0x4f8bf5,_0x4d9dc5){return _0x4f8bf5===_0x4d9dc5;},'KFuIP':_0x1a78d0(0x162),'uVnYr':function(_0x3dd83a){return _0x3dd83a();}},_0x38951b=await _0x5775f5[_0x1a78d0(0x16b)](resolveProfileTarget,_0x54fa65);if(_0x5775f5[_0x1a78d0(0x15e)](_0x38951b['kind'],_0x5775f5['KFuIP'])){resetProfileOverrides(_0x5775f5['uVnYr'](getProjectPath),_0x54fa65),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x54fa65+'\x22');return;}console['log']('\x22'+_0x54fa65+_0x1a78d0(0x176)+_0x54fa65+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -0,0 +1 @@
1
+ function _0x484e(_0x438294,_0x363c2f){_0x438294=_0x438294-0x184;const _0x56cb10=_0x56cb();let _0x484e70=_0x56cb10[_0x438294];return _0x484e70;}(function(_0x4b0c81,_0x29e6da){const _0xd3a971=_0x484e,_0x5e2912=_0x4b0c81();while(!![]){try{const _0x169cc1=-parseInt(_0xd3a971(0x192))/0x1+parseInt(_0xd3a971(0x191))/0x2+-parseInt(_0xd3a971(0x18d))/0x3+parseInt(_0xd3a971(0x18e))/0x4+-parseInt(_0xd3a971(0x18a))/0x5*(-parseInt(_0xd3a971(0x18f))/0x6)+parseInt(_0xd3a971(0x195))/0x7*(parseInt(_0xd3a971(0x197))/0x8)+parseInt(_0xd3a971(0x185))/0x9*(-parseInt(_0xd3a971(0x184))/0xa);if(_0x169cc1===_0x29e6da)break;else _0x5e2912['push'](_0x5e2912['shift']());}catch(_0x80d3da){_0x5e2912['push'](_0x5e2912['shift']());}}}(_0x56cb,0xa6b2f));function _0x56cb(){const _0x56ddc5=['cwd','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','SwuYt','10rNJtjm','log','prompt','892845qESZqj','4914288NFLwvZ','1240842suEvmw','confirmation','1283874aWsaNI','1038196QcfDzm','yes','\x22\x20for\x20everyone\x20in\x20your\x20organization.','1911TFEuRA','\x22\x20not\x20found.','27152hJTssG','476830wMfxGE','225ttSAPl','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.'];_0x56cb=function(){return _0x56ddc5;};return _0x56cb();}import _0x3997f7 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x540512,_0x4d21f4={}){const _0x386c83=_0x484e,_0x1e1e5d={'wrmJr':function(_0x1af81d,_0x20feac){return _0x1af81d(_0x20feac);},'oiVin':function(_0x29f63c){return _0x29f63c();},'MUIqN':'input','ZHhDr':_0x386c83(0x190),'SwuYt':function(_0x3dfba7,_0x298c5b){return _0x3dfba7(_0x298c5b);},'RmaLV':function(_0x42b66e,_0x199686,_0x5aec0a){return _0x42b66e(_0x199686,_0x5aec0a);}},_0x18e295=await _0x1e1e5d['wrmJr'](fetchCloudProfile,_0x540512);if(!_0x18e295)throw new Error('Cloud\x20profile\x20\x22'+_0x540512+_0x386c83(0x196));if(!_0x4d21f4[_0x386c83(0x193)]&&!_0x1e1e5d['oiVin'](isInteractive))throw new Error(_0x386c83(0x186));console[_0x386c83(0x18b)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x540512+_0x386c83(0x194));if(!_0x4d21f4['yes']){const {confirmation:_0x34ec29}=await _0x3997f7[_0x386c83(0x18c)]([{'type':_0x1e1e5d['MUIqN'],'name':_0x1e1e5d['ZHhDr'],'message':'Type\x20\x22'+_0x540512+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x34ec29!==_0x540512)throw new Error(_0x386c83(0x188));}await _0x1e1e5d[_0x386c83(0x189)](deleteCloudProfile,_0x540512),_0x1e1e5d['RmaLV'](resetProfileOverrides,process[_0x386c83(0x187)](),_0x540512),clearLastProfile(process[_0x386c83(0x187)](),_0x540512),console['log']('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x540512+'\x22.');}
@@ -1 +1 @@
1
- const _0x160dd0=_0x301f;function _0x35f2(){const _0x3741f6=['sort','isDirectory','\x0aProfiles:','yVxVg','2907110ucFZyb','2521068VmzZgn','7atzPwl','5295766KoljRN','5iKmWtd','249272UHkPNJ','push','local','settings.json','4922784LgvsFU','endsWith','\x20\x20\x20\x20\x20\x20Details:\x20','reports','8rsumQS','3732aflYWe','\x0a*\x20=\x20active\x20profile','sessions','48081bfNjAu','mTSQw','log','GvVZe','baseUrl','fUVdA','gXTZz','545667xwUQAF','includes','Run:\x20ranger\x20profile\x20add\x20<profile-name>','\x0aNo\x20profiles\x20found.','ufuzx','4XVfQAc'];_0x35f2=function(){return _0x3741f6;};return _0x35f2();}(function(_0x2f433e,_0xdc93e2){const _0x37337e=_0x301f,_0x3f1f49=_0x2f433e();while(!![]){try{const _0x5d230d=-parseInt(_0x37337e(0x18f))/0x1*(parseInt(_0x37337e(0x192))/0x2)+-parseInt(_0x37337e(0x183))/0x3*(-parseInt(_0x37337e(0x188))/0x4)+-parseInt(_0x37337e(0x191))/0x5*(-parseInt(_0x37337e(0x18e))/0x6)+-parseInt(_0x37337e(0x190))/0x7+parseInt(_0x37337e(0x19a))/0x8*(parseInt(_0x37337e(0x196))/0x9)+-parseInt(_0x37337e(0x18d))/0xa+parseInt(_0x37337e(0x19e))/0xb*(parseInt(_0x37337e(0x19b))/0xc);if(_0x5d230d===_0xdc93e2)break;else _0x3f1f49['push'](_0x3f1f49['shift']());}catch(_0x3e96b5){_0x3f1f49['push'](_0x3f1f49['shift']());}}}(_0x35f2,0x8fbb3));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';const NON_ENV_DIRS=[_0x160dd0(0x19d),'bug-bashes',_0x160dd0(0x199),'local','ci'];function _0x301f(_0x52f0ff,_0x39e84b){_0x52f0ff=_0x52f0ff-0x182;const _0x35f29f=_0x35f2();let _0x301f5e=_0x35f29f[_0x52f0ff];return _0x301f5e;}export async function getEnvNames(){const _0x2c5423=_0x160dd0,_0x235624={'yVxVg':function(_0x1d7030,_0x38083a,_0x2a6d74){return _0x1d7030(_0x38083a,_0x2a6d74);},'fUVdA':'local','gXTZz':function(_0x107869,_0x2d9bd5){return _0x107869(_0x2d9bd5);},'mTSQw':function(_0x2ed62f,_0x22c6ee){return _0x2ed62f(_0x22c6ee);},'NGDEy':function(_0x462eef,_0x30b74f,_0x2d0bf2){return _0x462eef(_0x30b74f,_0x2d0bf2);},'GvVZe':function(_0x13e5b3,_0x3c96ba){return _0x13e5b3(_0x3c96ba);},'PfJti':function(_0x21b7c3,_0x4ff575){return _0x21b7c3(_0x4ff575);},'xyEtD':'legacy'},_0x2a5f8a=getRangerDir();if(!existsSync(_0x2a5f8a))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x237eb1=await readActiveProfileName(),_0x90e1d1=[],_0x85a408={},_0x14abed=_0x235624[_0x2c5423(0x18c)](join,_0x2a5f8a,_0x235624[_0x2c5423(0x1a3)]);if(existsSync(_0x14abed)){const _0x2efa2a=await _0x235624[_0x2c5423(0x182)](readdir,_0x14abed);for(const _0x3ce8b7 of _0x2efa2a){const _0x27fb2b=join(_0x14abed,_0x3ce8b7),_0x179298=await _0x235624[_0x2c5423(0x19f)](stat,_0x27fb2b);_0x179298['isDirectory']()&&(_0x90e1d1['push'](_0x3ce8b7),_0x85a408[_0x3ce8b7]=_0x235624[_0x2c5423(0x1a3)]);}}const _0x675a6a=_0x235624['NGDEy'](join,_0x2a5f8a,'ci');if(_0x235624[_0x2c5423(0x182)](existsSync,_0x675a6a)){const _0x297ea2=await _0x235624[_0x2c5423(0x1a1)](readdir,_0x675a6a);for(const _0x4cc119 of _0x297ea2){const _0x3cf11f=join(_0x675a6a,_0x4cc119),_0x5c1819=await _0x235624['PfJti'](stat,_0x3cf11f);_0x5c1819[_0x2c5423(0x18a)]()&&(_0x90e1d1[_0x2c5423(0x193)](_0x4cc119),_0x85a408[_0x4cc119]='ci');}}const _0x3dd3ac=await readdir(_0x2a5f8a);for(const _0x10266d of _0x3dd3ac){if(NON_ENV_DIRS[_0x2c5423(0x184)](_0x10266d))continue;if(_0x10266d['startsWith']('.'))continue;if(_0x10266d[_0x2c5423(0x197)]('.txt'))continue;const _0x4b17ba=join(_0x2a5f8a,_0x10266d),_0x34a941=await stat(_0x4b17ba);_0x34a941[_0x2c5423(0x18a)]()&&existsSync(join(_0x4b17ba,_0x2c5423(0x195)))&&(!_0x90e1d1['includes'](_0x10266d)&&(_0x90e1d1[_0x2c5423(0x193)](_0x10266d),_0x85a408[_0x10266d]=_0x235624['xyEtD']));}return{'envNames':_0x90e1d1,'activeEnv':_0x237eb1,'envTypes':_0x85a408};}export async function envList(){const _0x3d206f=_0x160dd0,_0x184933={'TlyTQ':function(_0x1dcd3f,_0x349a15){return _0x1dcd3f===_0x349a15;},'Pbqss':_0x3d206f(0x186),'cptmg':_0x3d206f(0x185),'ufuzx':_0x3d206f(0x18b),'KIJbm':function(_0x2c6d4b,_0x2a15fd){return _0x2c6d4b===_0x2a15fd;}},{envNames:_0x27d013,activeEnv:_0x3d6b2c,envTypes:_0x18d6ab}=await getEnvNames();if(_0x184933['TlyTQ'](_0x27d013['length'],0x0)){console['log'](_0x184933['Pbqss']),console[_0x3d206f(0x1a0)](_0x184933['cptmg']);return;}console[_0x3d206f(0x1a0)](_0x184933[_0x3d206f(0x187)]);for(const _0x514d17 of _0x27d013[_0x3d206f(0x189)]()){const _0x211527=_0x184933['TlyTQ'](_0x514d17,_0x3d6b2c),_0x2cac56=_0x18d6ab[_0x514d17]||_0x3d206f(0x194),_0x29157e=await loadSettings(_0x514d17),_0x36dcca=_0x184933['KIJbm'](_0x2cac56,'legacy')?'':'\x20['+_0x2cac56+']';console[_0x3d206f(0x1a0)]('\x20\x20'+(_0x211527?'*\x20':'\x20\x20')+_0x514d17+_0x36dcca),_0x29157e[_0x3d206f(0x1a2)]&&console[_0x3d206f(0x1a0)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x29157e[_0x3d206f(0x1a2)]),_0x29157e['environmentDetails']&&console[_0x3d206f(0x1a0)](_0x3d206f(0x198)+_0x29157e['environmentDetails']);}_0x3d6b2c&&console['log'](_0x3d206f(0x19c));}
1
+ function _0x19a5(_0x31277,_0x5c5285){_0x31277=_0x31277-0x117;const _0x37d7cb=_0x37d7();let _0x19a57a=_0x37d7cb[_0x31277];return _0x19a57a;}const _0x2620c2=_0x19a5;(function(_0x2b7f8a,_0x7aed86){const _0x2e92e5=_0x19a5,_0x4d01d=_0x2b7f8a();while(!![]){try{const _0xd46a83=-parseInt(_0x2e92e5(0x126))/0x1*(-parseInt(_0x2e92e5(0x120))/0x2)+parseInt(_0x2e92e5(0x12b))/0x3*(parseInt(_0x2e92e5(0x13a))/0x4)+parseInt(_0x2e92e5(0x12f))/0x5*(-parseInt(_0x2e92e5(0x131))/0x6)+-parseInt(_0x2e92e5(0x11f))/0x7+-parseInt(_0x2e92e5(0x118))/0x8*(parseInt(_0x2e92e5(0x11a))/0x9)+-parseInt(_0x2e92e5(0x117))/0xa+parseInt(_0x2e92e5(0x12c))/0xb;if(_0xd46a83===_0x7aed86)break;else _0x4d01d['push'](_0x4d01d['shift']());}catch(_0x5ae280){_0x4d01d['push'](_0x4d01d['shift']());}}}(_0x37d7,0xe74d3));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{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x2620c2(0x12d),_0x2620c2(0x129),'reports',_0x2620c2(0x11d),'ci'];export async function getEnvNames(){const _0x4ca72d=_0x2620c2,_0xd1b210={'GIFwa':function(_0x80674,_0x4fa846,_0x2231f9){return _0x80674(_0x4fa846,_0x2231f9);},'WWckT':_0x4ca72d(0x11d),'JcJfY':function(_0x23af55,_0x13c01c){return _0x23af55(_0x13c01c);},'edOTC':function(_0x468d7b,_0x43652c){return _0x468d7b(_0x43652c);},'fjxNb':_0x4ca72d(0x12e)},_0x5482f2=getRangerDir();if(!existsSync(_0x5482f2))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x49bf18=await readActiveProfileName(),_0xdbad2b=[],_0x1e2a90={},_0xf9142e=_0xd1b210[_0x4ca72d(0x138)](join,_0x5482f2,_0xd1b210['WWckT']);if(_0xd1b210['JcJfY'](existsSync,_0xf9142e)){const _0x30b186=await readdir(_0xf9142e);for(const _0x508abc of _0x30b186){const _0xfc7f0c=join(_0xf9142e,_0x508abc),_0x3a21fd=await stat(_0xfc7f0c);_0x3a21fd[_0x4ca72d(0x130)]()&&(_0xdbad2b[_0x4ca72d(0x125)](_0x508abc),_0x1e2a90[_0x508abc]='local');}}const _0x16712a=_0xd1b210[_0x4ca72d(0x138)](join,_0x5482f2,'ci');if(_0xd1b210['JcJfY'](existsSync,_0x16712a)){const _0x45a1f5=await readdir(_0x16712a);for(const _0x5dfd6e of _0x45a1f5){const _0x48fc39=join(_0x16712a,_0x5dfd6e),_0x5d0282=await _0xd1b210[_0x4ca72d(0x132)](stat,_0x48fc39);_0x5d0282['isDirectory']()&&(_0xdbad2b[_0x4ca72d(0x125)](_0x5dfd6e),_0x1e2a90[_0x5dfd6e]='ci');}}const _0x444063=await _0xd1b210[_0x4ca72d(0x135)](readdir,_0x5482f2);for(const _0x2586ed of _0x444063){if(NON_ENV_DIRS[_0x4ca72d(0x13c)](_0x2586ed))continue;if(_0x2586ed['startsWith']('.'))continue;if(_0x2586ed['endsWith'](_0xd1b210[_0x4ca72d(0x11c)]))continue;const _0x237cfd=join(_0x5482f2,_0x2586ed),_0xbf56fa=await stat(_0x237cfd);_0xbf56fa[_0x4ca72d(0x130)]()&&existsSync(_0xd1b210['GIFwa'](join,_0x237cfd,'settings.json'))&&(!_0xdbad2b[_0x4ca72d(0x13c)](_0x2586ed)&&(_0xdbad2b[_0x4ca72d(0x125)](_0x2586ed),_0x1e2a90[_0x2586ed]=_0x4ca72d(0x133)));}return{'envNames':_0xdbad2b,'activeEnv':_0x49bf18,'envTypes':_0x1e2a90};}export async function envList(){const _0x209031=_0x2620c2,_0x2b5fa5={'pksTF':function(_0xf92c19){return _0xf92c19();},'SeZmJ':function(_0x563883){return _0x563883();},'bSSPn':function(_0x503c30,_0x42842a){return _0x503c30===_0x42842a;},'cJoqU':function(_0x3b9590,_0x9bb4db){return _0x3b9590>_0x9bb4db;},'ZcHoE':'\x0aLocal\x20Profiles\x20(legacy):','LHhkx':'local','lsjPy':_0x209031(0x11e),'GBesp':function(_0x2a1d9c,_0x1ddc7c){return _0x2a1d9c===_0x1ddc7c;}},{envNames:_0x93963,activeEnv:_0x15e67f,envTypes:_0x1bba91}=await getEnvNames();let _0x1c04e9=[];const _0x37f9b6=await _0x2b5fa5['pksTF'](getToken);if(_0x37f9b6)try{_0x1c04e9=await _0x2b5fa5['SeZmJ'](listCloudProfiles);}catch(_0x609cfd){console[_0x209031(0x128)](_0x209031(0x123)+(_0x609cfd instanceof Error?_0x609cfd['message']:String(_0x609cfd)));}if(_0x2b5fa5[_0x209031(0x12a)](_0x93963['length'],0x0)&&_0x2b5fa5[_0x209031(0x12a)](_0x1c04e9[_0x209031(0x139)],0x0)){console[_0x209031(0x127)](_0x209031(0x121)),console[_0x209031(0x127)]('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0xe25110=new Set(_0x1c04e9['map'](_0xc2178b=>_0xc2178b[_0x209031(0x13b)]));if(_0x2b5fa5[_0x209031(0x134)](_0x93963[_0x209031(0x139)],0x0)){console['log'](_0x2b5fa5['ZcHoE']);for(const _0x385653 of _0x93963[_0x209031(0x136)]()){const _0xbd3b99=_0x385653===_0x15e67f&&!_0xe25110['has'](_0x385653),_0x1bd927=_0x1bba91[_0x385653]||_0x2b5fa5['LHhkx'],_0x388edb=await loadSettings(_0x385653),_0x261096=_0x1bd927==='legacy'?'':'\x20['+_0x1bd927+']';console[_0x209031(0x127)]('\x20\x20'+(_0xbd3b99?'*\x20':'\x20\x20')+_0x385653+_0x261096),_0x388edb['baseUrl']&&console[_0x209031(0x127)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x388edb['baseUrl']),_0x388edb[_0x209031(0x119)]&&console[_0x209031(0x127)](_0x209031(0x11b)+_0x388edb['environmentDetails']);}}if(_0x2b5fa5['cJoqU'](_0x1c04e9['length'],0x0)){console['log'](_0x2b5fa5[_0x209031(0x137)]);for(const _0x177523 of _0x1c04e9['sort']((_0xdae0e8,_0x371587)=>_0xdae0e8['name'][_0x209031(0x13d)](_0x371587['name']))){const _0x4b0e0c=_0x2b5fa5['GBesp'](_0x177523[_0x209031(0x13b)],_0x15e67f),_0x7bf4f0=_0x177523[_0x209031(0x124)]?'\x20('+_0x177523[_0x209031(0x124)]+')':'',_0x41e900=_0x177523['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x177523['sessionUpdatedAt']+')':'no\x20session';console[_0x209031(0x127)]('\x20\x20'+(_0x4b0e0c?'*\x20':'\x20\x20')+_0x177523['name']+_0x209031(0x122)+_0x7bf4f0),console[_0x209031(0x127)]('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x41e900);}}_0x15e67f&&console[_0x209031(0x127)]('\x0a*\x20=\x20active\x20profile');}function _0x37d7(){const _0x51e40b=['\x0aCloud\x20Profiles:','5721296YYvhxt','32VuWvlP','\x0aNo\x20profiles\x20found.','\x20[cloud]','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','environmentKey','push','106034lYYndJ','log','error','bug-bashes','bSSPn','31695MVDphp','26101581RpoBMk','sessions','.txt','925zrfYfb','isDirectory','31962wKykoR','edOTC','legacy','cJoqU','JcJfY','sort','lsjPy','GIFwa','length','352gjOzBS','name','includes','localeCompare','16442650GRztkR','1136qUyVZk','environmentDetails','38322GGmcfK','\x20\x20\x20\x20\x20\x20Details:\x20','fjxNb','local'];_0x37d7=function(){return _0x51e40b;};return _0x37d7();}
@@ -1 +1 @@
1
- const _0x5ccc84=_0x4e5e;(function(_0x1d7d6a,_0x2876a6){const _0x34c9e0=_0x4e5e,_0x3f6a49=_0x1d7d6a();while(!![]){try{const _0x138357=-parseInt(_0x34c9e0(0xa4))/0x1+parseInt(_0x34c9e0(0x107))/0x2*(parseInt(_0x34c9e0(0xc3))/0x3)+parseInt(_0x34c9e0(0xed))/0x4+-parseInt(_0x34c9e0(0x111))/0x5*(parseInt(_0x34c9e0(0x11e))/0x6)+-parseInt(_0x34c9e0(0x115))/0x7*(-parseInt(_0x34c9e0(0x106))/0x8)+-parseInt(_0x34c9e0(0x130))/0x9+parseInt(_0x34c9e0(0x131))/0xa;if(_0x138357===_0x2876a6)break;else _0x3f6a49['push'](_0x3f6a49['shift']());}catch(_0x93185c){_0x3f6a49['push'](_0x3f6a49['shift']());}}}(_0x3995,0x3325a));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x3c4e02 from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReport,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.js';import{getBrowserSessionSteps}from'./utils/browserSessionsApi.js';import{getApiBaseUrl}from'./utils/environment.js';import{getRangerDir}from'./utils/rangerRoot.js';import{registerSession}from'./utils/sessionCache.js';import{getEnvNames}from'./env.js';import{formatProfileRequiredMessage}from'./utils/profileMessages.js';const ACTIVE_FEATURE_FILE=_0x5ccc84(0x141),bold=_0x8e1747=>_0x5ccc84(0xad)+_0x8e1747+_0x5ccc84(0xc4);function getGitRepoUrl(){const _0x6baccf=_0x5ccc84,_0x1525f8={'NClhD':'pipe'};try{const _0x3bbd4b=execSync(_0x6baccf(0xb8),{'encoding':_0x6baccf(0xc1),'stdio':[_0x6baccf(0xd1),_0x1525f8['NClhD'],_0x1525f8[_0x6baccf(0xcf)]]})[_0x6baccf(0x15c)]();return _0x3bbd4b['replace'](/\.git$/,'')['replace'](/^git@github\.com:/,'github.com/')['replace'](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x45efff=_0x5ccc84,_0x309fdc={'FMsmm':function(_0x38fd20,_0x41e9d7,_0x88a6db){return _0x38fd20(_0x41e9d7,_0x88a6db);},'rNQNG':'pipe'};try{return _0x309fdc['FMsmm'](execSync,'git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x45efff(0xc1),'stdio':[_0x309fdc[_0x45efff(0x160)],_0x309fdc[_0x45efff(0x160)],_0x309fdc['rNQNG']]})[_0x45efff(0x15c)]();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x434b6d=_0x5ccc84,_0x252ec2={'JqdmV':function(_0x1284c1,_0x54620e,_0x59a17b){return _0x1284c1(_0x54620e,_0x59a17b);},'Zbtjl':function(_0xefe4c9){return _0xefe4c9();},'HklAG':function(_0x2b91ed,_0x51991c,_0x21c5b7){return _0x2b91ed(_0x51991c,_0x21c5b7);},'yluAJ':_0x434b6d(0xc1)},_0x356ade=_0x252ec2[_0x434b6d(0x78)](join,_0x252ec2['Zbtjl'](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0x356ade))return null;try{const _0x1e4ac3=await _0x252ec2[_0x434b6d(0xe6)](readFile,_0x356ade,_0x252ec2[_0x434b6d(0x149)]);return _0x1e4ac3['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x560a40){const _0x3d311f=_0x5ccc84,_0x576da9={'MumEu':function(_0x45283b){return _0x45283b();},'TjRlp':function(_0x3638e1,_0x53ba20,_0x25344d){return _0x3638e1(_0x53ba20,_0x25344d);},'fkphW':function(_0x278668,_0x2fd36e){return _0x278668(_0x2fd36e);}},_0x149510=_0x576da9[_0x3d311f(0x15d)](getRangerDir),_0x294c64=_0x576da9['TjRlp'](join,_0x149510,ACTIVE_FEATURE_FILE);!_0x576da9[_0x3d311f(0xd4)](existsSync,_0x149510)&&await mkdir(_0x149510,{'recursive':!![]}),await writeFile(_0x294c64,_0x560a40,'utf-8');}function _0x4e5e(_0x5aa5dc,_0x3741f7){_0x5aa5dc=_0x5aa5dc-0x70;const _0x399529=_0x3995();let _0x4e5e09=_0x399529[_0x5aa5dc];return _0x4e5e09;}function getProgressDisplay(_0x16008f){const _0x43518d=_0x5ccc84,_0x28deee={'etBsP':function(_0x1ad7a5,_0x3463ce){return _0x1ad7a5+_0x3463ce;},'rBLKm':function(_0x5b4c47,_0x4623e7){return _0x5b4c47===_0x4623e7;},'EpqYs':function(_0x1d95b0,_0x218ac8){return _0x1d95b0*_0x218ac8;},'FqFpC':function(_0x46a5a9,_0x482ff3){return _0x46a5a9+_0x482ff3;},'gVrUJ':function(_0x639b7c,_0x2564d1){return _0x639b7c>_0x2564d1;},'wtCFm':function(_0x26a423,_0x335928){return _0x26a423>_0x335928;},'VVSip':function(_0x3d36f0,_0x4c9f90){return _0x3d36f0>_0x4c9f90;}},_0x47c324=_0x16008f['verifiedItems']||0x0,_0x538b3f=_0x16008f[_0x43518d(0x136)]||0x0,_0x56ced2=_0x16008f['blockedItems']||0x0,_0x551f6a=_0x16008f[_0x43518d(0xbf)]||0x0,_0x994d7d=_0x16008f['pendingItems']||0x0,_0x3c627f=_0x28deee[_0x43518d(0x9e)](_0x28deee['etBsP'](_0x28deee[_0x43518d(0x9e)](_0x47c324+_0x538b3f,_0x56ced2),_0x551f6a),_0x994d7d);if(_0x28deee[_0x43518d(0xfd)](_0x3c627f,0x0))return'-';const _0x4f5b0f=0xa,_0x3f9109=Math['round'](_0x28deee['EpqYs'](_0x47c324/_0x3c627f,_0x4f5b0f)),_0x305dc4=_0x28deee['FqFpC']('█'[_0x43518d(0x152)](_0x3f9109),'░'[_0x43518d(0x152)](_0x4f5b0f-_0x3f9109)),_0x5a4cc0=[];if(_0x28deee['gVrUJ'](_0x56ced2,0x0))_0x5a4cc0['push'](_0x56ced2+_0x43518d(0x145));if(_0x28deee['wtCFm'](_0x551f6a,0x0))_0x5a4cc0['push'](_0x551f6a+_0x43518d(0xae));if(_0x28deee['VVSip'](_0x538b3f,0x0))_0x5a4cc0[_0x43518d(0x12a)](_0x538b3f+'\x20in\x20progress');const _0x3ae0f5=_0x28deee['gVrUJ'](_0x5a4cc0['length'],0x0)?'\x20('+_0x5a4cc0['join'](',\x20')+')':'';return _0x305dc4+'\x20'+_0x47c324+'/'+_0x3c627f+'\x20verified'+_0x3ae0f5;}function getCurrentSessionItems(_0xb226b3,_0x286f85){const _0x442363=_0x5ccc84;if(!_0xb226b3[_0x442363(0x144)])return _0x286f85['filter'](_0x22840e=>!_0x22840e['sessionId']);return _0x286f85['filter'](_0x28fb69=>_0x28fb69[_0x442363(0x119)]===_0xb226b3['currentSessionId']||!_0x28fb69[_0x442363(0x119)]);}function displayFeature(_0x2bb8de,_0xc469da){const _0xc67079=_0x5ccc84,_0x2d79b2={'EYSur':function(_0x35788a,_0x2a721b){return _0x35788a(_0x2a721b);},'huLLw':'\x0a\x20\x20\x20Scenarios:','mwZhW':_0xc67079(0xf9),'Oltgt':function(_0x275f4b,_0x155f94){return _0x275f4b===_0x155f94;},'iDfbZ':'verified','OJdTq':'incomplete','gFyPs':'verification_in_progress','UTXmJ':function(_0x26db8a,_0x3f1ed1){return _0x26db8a!==_0x3f1ed1;},'tavCr':_0xc67079(0xbe),'OOEuN':function(_0x287e6d,_0x5d6cba){return _0x287e6d===_0x5d6cba;},'tlqaR':function(_0x27f20b,_0x459b07){return _0x27f20b===_0x459b07;},'WHuqk':'approved'};console['log']('\x0a'+_0x2bb8de[_0xc67079(0x162)]+'\x20('+_0x2bb8de[_0xc67079(0xd0)]+')');_0x2bb8de[_0xc67079(0xb2)]&&console[_0xc67079(0x153)]('\x20\x20\x20Progress:\x20'+_0x2d79b2[_0xc67079(0x12e)](getProgressDisplay,_0x2bb8de['stats']));_0x2bb8de[_0xc67079(0xbc)]&&console['log'](_0xc67079(0xbb)+_0x2bb8de['description']);_0x2bb8de['gitRepoUrl']&&console['log'](_0xc67079(0x13e)+_0x2bb8de['gitRepoUrl']);_0x2bb8de['gitBranch']&&console['log']('\x20\x20\x20Branch:\x20'+_0x2bb8de['gitBranch']);console[_0xc67079(0x153)](_0xc67079(0xab)+new Date(_0x2bb8de[_0xc67079(0xe3)])[_0xc67079(0xac)]());_0x2bb8de[_0xc67079(0x74)]&&console[_0xc67079(0x153)]('\x20\x20\x20Completed:\x20'+new Date(_0x2bb8de[_0xc67079(0x74)])['toLocaleString']());if(_0xc469da&&_0xc469da['length']>0x0){console[_0xc67079(0x153)](_0x2d79b2[_0xc67079(0x87)]);for(let _0x35c828=0x0;_0x35c828<_0xc469da['length'];_0x35c828++){const _0x179125=_0xc469da[_0x35c828];let _0x5a62ae;if(_0x179125['status']===_0x2d79b2[_0xc67079(0x14e)]&&_0x2d79b2['Oltgt'](_0x179125['terminalReason'],'approved'))_0x5a62ae='✅';else{if(_0x179125['status']===_0x2d79b2[_0xc67079(0x150)])_0x5a62ae='🟢';else{if(_0x179125[_0xc67079(0xc5)]===_0x2d79b2['OJdTq'])_0x5a62ae='🟠';else{if(_0x179125['status']===_0xc67079(0xd5))_0x5a62ae='🛑';else{if(_0x179125[_0xc67079(0xc5)]===_0x2d79b2[_0xc67079(0x14e)])_0x5a62ae='⛔';else _0x179125[_0xc67079(0xc5)]===_0x2d79b2[_0xc67079(0x13b)]?_0x5a62ae='⏳':_0x5a62ae='⬜';}}}}const _0x4a2e49=_0x179125[_0xc67079(0x148)]>0x1?_0xc67079(0xf0)+_0x179125['version']+')':'',_0x15b35c=_0x179125[_0xc67079(0x148)]>0x1&&_0x179125['parentItemId']&&_0x2d79b2[_0xc67079(0xaa)](_0x179125['status'],'closed')&&_0x179125[_0xc67079(0xc5)]!==_0xc67079(0xe4)?_0x2d79b2['tavCr']:'';console['log']('\x20\x20\x20'+(_0x35c828+0x1)+'.\x20'+_0x5a62ae+'\x20'+_0x179125[_0xc67079(0xbc)]+_0x4a2e49+_0x15b35c);_0x2d79b2['OOEuN'](_0x179125['status'],_0xc67079(0xd5))&&_0x179125['blockedReason']&&console[_0xc67079(0x153)]('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0x179125['blockedReason']);_0x2d79b2['tlqaR'](_0x179125['status'],_0x2d79b2['OJdTq'])&&_0x179125[_0xc67079(0xc9)]&&console['log'](_0xc67079(0x125)+_0x179125['incompleteReason']);if(_0x2d79b2['Oltgt'](_0x179125['status'],'closed')&&_0x2d79b2['tlqaR'](_0x179125['terminalReason'],_0x2d79b2['WHuqk']))console['log']('\x20\x20\x20\x20\x20\x20Approved');else _0x179125[_0xc67079(0xc5)]===_0x2d79b2['mwZhW']&&_0x179125[_0xc67079(0xca)]&&console['log']('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0x179125['canceledReason']);}}}export async function featureCreate(_0x17f7de,_0x83acc9){const _0x39c171=_0x5ccc84,_0x1b9f0e={'NdRZT':function(_0x5356b6){return _0x5356b6();},'Nipcs':function(_0xab9b4b,_0xb4dcc6){return _0xab9b4b(_0xb4dcc6);},'jEmof':function(_0x33558b){return _0x33558b();},'rOliH':'\x0aCreating\x20feature\x20review...','GFONK':function(_0x106eac,_0x3c8cbf){return _0x106eac(_0x3c8cbf);},'IAeYE':function(_0x1f3098,_0x272ab7,_0x121831){return _0x1f3098(_0x272ab7,_0x121831);}},{envNames:_0x4abff2}=await _0x1b9f0e[_0x39c171(0xdd)](getEnvNames);_0x4abff2['length']===0x0&&console[_0x39c171(0xb5)]('\x0a'+_0x1b9f0e['Nipcs'](formatProfileRequiredMessage,_0x59c7f1=>bold(_0x59c7f1)));const _0x1f1b2e=_0x83acc9[_0x39c171(0x92)]?_0x83acc9[_0x39c171(0x92)][_0x39c171(0xf2)](_0x1cc694=>_0x1cc694['trim']()):[],_0x3f7ab9=getGitRepoUrl(),_0xe42535=_0x1b9f0e[_0x39c171(0xf1)](getGitBranch);console[_0x39c171(0x153)](_0x1b9f0e[_0x39c171(0x12b)]);const _0x43a28b=await _0x1b9f0e[_0x39c171(0x8c)](createFeature,{'name':_0x17f7de,'description':_0x83acc9['description'],'checklist':_0x1f1b2e,'gitRepoUrl':_0x3f7ab9,'gitBranch':_0xe42535});await setActiveFeatureId(_0x43a28b['id']),await tryStartCurrentSession(_0x43a28b['id']);const _0x1f3972=process['env']['CLAUDE_SESSION_ID'];_0x1f3972&&_0x1b9f0e[_0x39c171(0xd6)](registerSession,_0x1f3972,_0x43a28b['id']),console[_0x39c171(0x153)](_0x39c171(0x81)+_0x43a28b['id']),_0x1b9f0e[_0x39c171(0xd6)](displayFeature,_0x43a28b,_0x43a28b[_0x39c171(0x117)]),console['log'](_0x39c171(0xee));}export async function featureList(_0x48c49e){const _0x337a5b=_0x5ccc84,_0x1600ee={'JkRKO':function(_0xfee8f4,_0x3b5047){return _0xfee8f4===_0x3b5047;},'WIDMl':function(_0x1af9f1,_0x64ec41){return _0x1af9f1(_0x64ec41);},'QpAEB':function(_0x4bd541,_0x5d3372){return _0x4bd541+_0x5d3372;},'IRRVg':function(_0x19c787,_0x164349){return _0x19c787<_0x164349;},'VtuTa':function(_0x437e4b,_0x166ee9){return _0x437e4b!==_0x166ee9;},'Dfzdx':'\x20--current-branch'},_0x26b3ea={'limit':_0x48c49e['limit']??0xa,'offset':_0x48c49e[_0x337a5b(0xa0)]??0x0,'includeDeleted':_0x48c49e['includeDeleted']};_0x48c49e['currentBranch']&&(_0x26b3ea['gitRepoUrl']=getGitRepoUrl(),_0x26b3ea['gitBranch']=getGitBranch());const _0x2c569a=await listFeatures(_0x26b3ea);if(_0x1600ee[_0x337a5b(0xcc)](_0x2c569a['items']['length'],0x0)){console[_0x337a5b(0x153)]('\x0aNo\x20feature\x20reviews\x20found.');return;}const _0x4c73ed=_0x2c569a[_0x337a5b(0x94)]>_0x2c569a[_0x337a5b(0x158)]['length']?_0x337a5b(0x11c)+_0x2c569a[_0x337a5b(0x158)]['length']+'\x20of\x20'+_0x2c569a[_0x337a5b(0x94)]:_0x2c569a[_0x337a5b(0x94)]+_0x337a5b(0x11f);console['log']('\x0a'+_0x4c73ed+':\x0a');for(const _0x338180 of _0x2c569a[_0x337a5b(0x158)]){const _0x304ba3=_0x337a5b(0x12c)['split']('|');let _0x2c194b=0x0;while(!![]){switch(_0x304ba3[_0x2c194b++]){case'0':_0x338180[_0x337a5b(0x151)]&&console['log']('\x20\x20\x20Branch:\x20'+_0x338180[_0x337a5b(0x151)]);continue;case'1':console[_0x337a5b(0x153)]('\x20\x20\x20Created:\x20'+new Date(_0x338180[_0x337a5b(0xe3)])[_0x337a5b(0xbd)]());continue;case'2':console[_0x337a5b(0x153)](''+_0x338180['name']);continue;case'3':console[_0x337a5b(0x153)](_0x337a5b(0x11b)+_0x338180['id']);continue;case'4':_0x338180['stats']&&console[_0x337a5b(0x153)](_0x337a5b(0x139)+_0x1600ee['WIDMl'](getProgressDisplay,_0x338180['stats']));continue;case'5':console[_0x337a5b(0x153)]('');continue;}break;}}const _0x58fdb9=_0x26b3ea[_0x337a5b(0x102)]??0xa,_0x336adb=_0x1600ee[_0x337a5b(0x15b)](_0x26b3ea[_0x337a5b(0xa0)]??0x0,_0x2c569a[_0x337a5b(0x158)]['length']);if(_0x1600ee[_0x337a5b(0xe7)](_0x336adb,_0x2c569a['totalCount'])){const _0x4099fb=_0x1600ee[_0x337a5b(0x13f)](_0x58fdb9,0xa)?'\x20--limit\x20'+_0x58fdb9:'',_0x1e0dd4=_0x48c49e[_0x337a5b(0xdf)]?_0x1600ee['Dfzdx']:'',_0x5dee40=_0x48c49e['includeDeleted']?_0x337a5b(0x135):'';console['log']('Next\x20page:\x20ranger\x20list\x20--offset\x20'+_0x336adb+_0x4099fb+_0x1e0dd4+_0x5dee40);}}export async function featureShow(_0x2fd802){const _0x5668ef=_0x5ccc84,_0x15ef57={'pZXQW':function(_0x17a768){return _0x17a768();}},_0x42f53d=_0x2fd802||await _0x15ef57[_0x5668ef(0xda)](getActiveFeatureId);if(!_0x42f53d)throw new Error(_0x5668ef(0x96));const _0x2c5a18=await getFeature(_0x42f53d);displayFeature(_0x2c5a18,_0x2c5a18[_0x5668ef(0x117)]);}export async function featureResume(_0x424312){const _0x2bdccf=_0x5ccc84,_0x3c0fcd={'mYimd':function(_0x51c417,_0x1d05dc){return _0x51c417(_0x1d05dc);},'DiEAN':function(_0x9d503b,_0xa9825f){return _0x9d503b(_0xa9825f);},'amsXT':function(_0x140a44){return _0x140a44();},'NGDlL':function(_0x27fc26,_0x50207f){return _0x27fc26!==_0x50207f;},'NWtbA':function(_0x5544da,_0x17590d,_0x2fb711){return _0x5544da(_0x17590d,_0x2fb711);},'lGiaF':function(_0x322d31,_0xbd2d81,_0x1b1965){return _0x322d31(_0xbd2d81,_0x1b1965);},'cUPWM':function(_0x243d86,_0x2b9c81){return _0x243d86(_0x2b9c81);},'ulTLn':function(_0x2a6065){return _0x2a6065();},'NiEaY':_0x2bdccf(0x126),'YeapK':_0x2bdccf(0x82),'tWxHg':function(_0x322986,_0x2ec4aa){return _0x322986(_0x2ec4aa);},'VYNLT':_0x2bdccf(0x146),'YaEHY':_0x2bdccf(0xb9),'iykzt':_0x2bdccf(0xb6)};if(_0x424312){const _0x8da21d=await _0x3c0fcd['mYimd'](getFeature,_0x424312);await _0x3c0fcd[_0x2bdccf(0x7d)](setActiveFeatureId,_0x8da21d['id']);const _0x18e754=_0x3c0fcd[_0x2bdccf(0x85)](getGitBranch);_0x18e754&&_0x3c0fcd[_0x2bdccf(0x7a)](_0x18e754,_0x8da21d[_0x2bdccf(0x151)])&&(await _0x3c0fcd['NWtbA'](updateFeature,_0x8da21d['id'],{'gitBranch':_0x18e754}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x18e754));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x8da21d[_0x2bdccf(0x162)]+'\x20('+_0x8da21d['id']+')'),await _0x3c0fcd[_0x2bdccf(0x8f)](tryStartCurrentSession,_0x8da21d['id']);const _0x522192=process['env'][_0x2bdccf(0xa3)];_0x522192&&_0x3c0fcd['lGiaF'](registerSession,_0x522192,_0x8da21d['id']);_0x3c0fcd['NWtbA'](displayFeature,_0x8da21d,_0x8da21d[_0x2bdccf(0x117)]),await _0x3c0fcd[_0x2bdccf(0x14c)](printFeedbackNudge,_0x8da21d['id']);return;}const _0x462396=_0x3c0fcd['ulTLn'](getGitRepoUrl),_0x22906b=getGitBranch();if(!_0x462396&&!_0x22906b)throw new Error(_0x3c0fcd['NiEaY']);console['log'](_0x2bdccf(0xf6)+(_0x462396||_0x3c0fcd[_0x2bdccf(0xa9)])+'\x20/\x20'+(_0x22906b||_0x3c0fcd[_0x2bdccf(0xa9)])+_0x2bdccf(0xfa));const _0x4bcea2=await _0x3c0fcd[_0x2bdccf(0x80)](listFeatures,{'gitRepoUrl':_0x462396,'gitBranch':_0x22906b}),_0x172afb=_0x4bcea2['items'][_0x2bdccf(0x134)](_0x52b0a8=>_0x52b0a8['status']?_0x52b0a8['status']!=='verified':!_0x52b0a8['completedAt']);if(_0x172afb[_0x2bdccf(0xd2)]===0x0){console['log'](_0x3c0fcd['VYNLT']),console[_0x2bdccf(0x153)](_0x2bdccf(0xd7));return;}let _0x4b91ec;if(_0x172afb[_0x2bdccf(0xd2)]===0x1)_0x4b91ec=_0x172afb[0x0];else{const _0xb43e29=process[_0x2bdccf(0xb7)][_0x2bdccf(0x159)]&&process[_0x2bdccf(0x10c)]['isTTY'];if(!_0xb43e29){console['log']('\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:');for(const _0x50a3a2 of _0x172afb){console['log']('\x20\x20'+_0x50a3a2['name']),console['log'](_0x2bdccf(0x8d)+_0x50a3a2['id']),_0x50a3a2['stats']&&console['log'](_0x2bdccf(0x7e)+getProgressDisplay(_0x50a3a2['stats'])),_0x50a3a2['gitBranch']&&console['log'](_0x2bdccf(0xdb)+_0x50a3a2[_0x2bdccf(0x151)]);}throw new Error(_0x3c0fcd['YaEHY']);}const {selected:_0x1e941d}=await _0x3c4e02['prompt']([{'type':_0x3c0fcd[_0x2bdccf(0x8b)],'name':'selected','message':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','choices':_0x172afb['map'](_0x281d3e=>({'name':_0x281d3e['name']+'\x20('+_0x281d3e['id']+')','value':_0x281d3e['id']}))}]);_0x4b91ec=_0x172afb[_0x2bdccf(0x73)](_0x55ba87=>_0x55ba87['id']===_0x1e941d);}await _0x3c0fcd[_0x2bdccf(0x8f)](setActiveFeatureId,_0x4b91ec['id']);_0x22906b&&_0x22906b!==_0x4b91ec['gitBranch']&&(await updateFeature(_0x4b91ec['id'],{'gitBranch':_0x22906b}),console[_0x2bdccf(0x153)](_0x2bdccf(0x13c)+_0x22906b));console['log'](_0x2bdccf(0xc8)+_0x4b91ec['name']+'\x20('+_0x4b91ec['id']+')'),await tryStartCurrentSession(_0x4b91ec['id']);const _0x16f497=await getFeature(_0x4b91ec['id']),_0x222365=process['env']['CLAUDE_SESSION_ID'];_0x222365&&_0x3c0fcd['lGiaF'](registerSession,_0x222365,_0x16f497['id']),_0x3c0fcd['lGiaF'](displayFeature,_0x16f497,_0x16f497[_0x2bdccf(0x117)]),await printFeedbackNudge(_0x16f497['id']);}async function printFeedbackNudge(_0x5d3f0d){const _0x1f393b=_0x5ccc84,_0x320a13={'PXecu':function(_0x2cec2e,_0x59257d){return _0x2cec2e(_0x59257d);},'iyXSl':function(_0x5449b5,_0x44991e,_0x3311fd){return _0x5449b5(_0x44991e,_0x3311fd);},'SpJft':function(_0x54fb2c,_0x4bd081){return _0x54fb2c>_0x4bd081;}};try{const {items:_0x423850}=await _0x320a13['PXecu'](getActionItems,_0x5d3f0d);let _0x416917=0x0,_0x387e1d=0x0;for(const _0x4f2a90 of _0x423850){const _0x2b3046=await _0x320a13['iyXSl'](getItemFeedback,_0x5d3f0d,_0x4f2a90['id']);_0x2b3046[_0x1f393b(0x123)][_0x1f393b(0xd2)]>0x0&&(_0x416917+=_0x2b3046[_0x1f393b(0x123)][_0x1f393b(0xd2)],_0x387e1d++);}_0x320a13['SpJft'](_0x416917,0x0)&&(console['log'](_0x1f393b(0xe1)+_0x416917+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x387e1d+'\x20scenario(s).'),console['log'](_0x1f393b(0xa5)));}catch{}}async function tryStartCurrentSession(_0x597215){const _0xd0d54f=_0x5ccc84,_0xf2fb32={'oJGcb':function(_0x837383,_0x42bdce){return _0x837383(_0x42bdce);},'cZIar':function(_0x389951,_0x385533,_0x56c185){return _0x389951(_0x385533,_0x56c185);}};try{const {sessions:_0x262fc3}=await _0xf2fb32[_0xd0d54f(0x91)](listFeatureSessions,_0x597215),_0x4ac39a=_0x262fc3['find'](_0x2a81ed=>_0x2a81ed['status']===_0xd0d54f(0xea));_0x4ac39a&&(await _0xf2fb32['cZIar'](startSession,_0x597215,_0x4ac39a['id']),console['log'](_0xd0d54f(0xe2)+_0x4ac39a['iteration']));}catch{}}export async function featureReport(_0x3e7f34,_0x55ed3c){const _0x188164=_0x5ccc84,_0x3c0cb4={'uHGVA':_0x188164(0x143),'CbZRT':'\x0aGenerating\x20report...','izJum':function(_0x1d7571,_0x373aa0,_0x5a46f6){return _0x1d7571(_0x373aa0,_0x5a46f6);},'nmLid':function(_0x1347ae,_0x4dfd48,_0x308bdb,_0x241927){return _0x1347ae(_0x4dfd48,_0x308bdb,_0x241927);},'dvueM':function(_0x5039d1){return _0x5039d1();},'SdPfZ':_0x188164(0x113),'KoawY':function(_0xefb94d,_0x1cb99b,_0x403ebe){return _0xefb94d(_0x1cb99b,_0x403ebe);},'TxAJO':function(_0x701db3,_0x172d6e){return _0x701db3(_0x172d6e);}},_0x583568=_0x3e7f34||await getActiveFeatureId();if(!_0x583568)throw new Error(_0x3c0cb4['uHGVA']);console[_0x188164(0x153)](_0x3c0cb4['CbZRT']);const _0x380d6f=await _0x3c0cb4['izJum'](getFeatureReportMarkdown,_0x583568,{'style':_0x55ed3c['style']}),_0x56decf=_0x55ed3c[_0x188164(0xa7)]||_0x3c0cb4[_0x188164(0x10f)](join,_0x3c0cb4['dvueM'](getRangerDir),_0x3c0cb4['SdPfZ'],_0x583568+'.md'),_0x5b3b4f=_0x3c0cb4[_0x188164(0x99)](join,_0x56decf,'..');!_0x3c0cb4['TxAJO'](existsSync,_0x5b3b4f)&&await mkdir(_0x5b3b4f,{'recursive':!![]}),await writeFile(_0x56decf,_0x380d6f,'utf-8'),console[_0x188164(0x153)](_0x188164(0x147)+_0x56decf);}function getScenarioResult(_0x41f5fc){const _0x3b901a=_0x5ccc84,_0x32d411={'AqFTv':function(_0x42877f,_0x620b96){return _0x42877f===_0x620b96;},'TwYzT':'closed','UTyhA':_0x3b901a(0x118),'FDcmr':_0x3b901a(0x105)};if(_0x32d411['AqFTv'](_0x41f5fc['status'],_0x3b901a(0xf9)))return _0x41f5fc[_0x3b901a(0xe0)]??_0x32d411[_0x3b901a(0x93)];if(_0x32d411[_0x3b901a(0x128)](_0x41f5fc[_0x3b901a(0xc5)],_0x32d411['UTyhA']))return _0x32d411[_0x3b901a(0xf3)];return _0x41f5fc['status'];}function _0x3995(){const _0xbd3780=['write','\x20\x20\x20Repository:\x20','VtuTa','split','active-feature.txt','toFixed','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','currentSessionId','\x20blocked','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','\x0a✅\x20Report\x20generated:\x20','version','yluAJ','rkwQs','assetType','cUPWM','.png','mwZhW','domRef','iDfbZ','gitBranch','repeat','log','completed','json','KBMmJ','qKGJf','items','isTTY','RkKML','QpAEB','trim','MumEu','feedback-images','No\x20active\x20session\x20for\x20this\x20feature\x20review.','rNQNG','INokR','name','\x0a✅\x20Session\x20is\x20already\x20completed.','screenshotUrls','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','YVcwW','comment_','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','find','completedAt','Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20','osfgm','NDEVP','JqdmV','OEFlN','NGDlL','\x0a❌\x20Invalid\x20scenario\x20index:\x20','get','DiEAN','\x20\x20\x20\x20\x20Progress:\x20','\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20','tWxHg','\x0a✅\x20Feature\x20review\x20created:\x20','any','ESRfl','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','amsXT','mKQTK','huLLw','XiCZY','GQEEx','IOpnE','iykzt','GFONK','\x20\x20\x20\x20\x20ID:\x20','VhvWX','mYimd',':\x20\x22','oJGcb','scenarios','TwYzT','totalCount','storage','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','replace','\x20\x20\x20\x20\x20📋\x20Selector:\x20','KoawY','all','\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20(','\x0a📋\x20Feedback\x20for:\x20','HsHGR','etBsP','\x0aConcluding\x20session...','offset','EZqYN','\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20','CLAUDE_SESSION_ID','379204eOGUmX','\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.','authorEmail','output','has','YeapK','UTXmJ','\x20\x20\x20Created:\x20','toLocaleString','\x1b[1m','\x20incomplete','stepName','/artifacts/','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','stats','\x0aAvailable\x20scenarios:','\x20—\x20','warn','list','stdin','git\x20remote\x20get-url\x20origin','Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','\x20>\x20','\x20\x20\x20Description:\x20','description','toLocaleDateString','\x20[has\x20reviewer\x20feedback]','incompleteItems','\x20\x20\x20\x20','utf-8','join','6EtqDpe','\x1b[0m','status','short','jNbZg','\x0a✅\x20Resumed\x20feature\x20review:\x20','incompleteReason','canceledReason','OhteI','JkRKO','iteration','from','NClhD','dashboardUrl','pipe','length','timing','fkphW','blocked','IAeYE','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','vnYbT','/api/v1/mcp/browser-sessions/','pZXQW','\x20\x20\x20\x20\x20Branch:\x20','scenario','NdRZT','\x20\x20💬\x20','currentBranch','terminalReason','\x0a⚠️\x20\x20','\x20\x20\x20▶️\x20Started\x20session\x20','createdAt','verified','tMAti','HklAG','IRRVg','VcPhp','\x20scenarios.','ready','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','content','1319648MVVAUj','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','browserSessionId','\x20(v','jEmof','map','FDcmr','DqvKZ','notes','\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20','error','\x20\x20✅\x20No\x20feedback\x20to\x20address','closed','...','pop','oPXQW','rBLKm','mlIda','wIkgM','Scenario\x20','selector','limit','latestReview','canonicalFlow','in_progress','16rgfQmu','20708HyPcsE','kemjN','location','spatial','No\x20sessions\x20found.','stdout','Unknown','BcIJh','nmLid','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','5hugfnL','element','reports','jsRvJ','1250851sJrxwE','AFbnw','checklistItems','verification_in_progress','sessionId','dorGk','\x20\x20\x20ID:\x20','Showing\x20','ynZaJ','1034730HbmtPL','\x20feature\x20review(s)\x20found','\x20\x20\x20\x20\x20📍\x20Annotation:\x20','TvxPz','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','unaddressedComments','submittedAt','\x20\x20\x20\x20\x20\x20Incomplete:\x20','Not\x20in\x20a\x20git\x20repository.','textContent','AqFTv','slice','push','rOliH','2|3|4|0|1|5','screenshot','EYSur','RUIKM','2330415rBhLaG','3120860pwvbFO','Please\x20finish\x20your\x20review\x20first:','exit','filter','\x20--include-deleted','verificationInProgressItems','excludeScenarios','\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.','\x20\x20\x20Progress:\x20','blockedReason','gFyPs','\x20\x20\x20Updated\x20branch\x20to:\x20'];_0x3995=function(){return _0xbd3780;};return _0x3995();}function getScenarioRationale(_0x9dc01a,_0x143f36){const _0x24b301=_0x5ccc84,_0x4e4d1e='3|1|0|2|4|5'['split']('|');let _0x20c364=0x0;while(!![]){switch(_0x4e4d1e[_0x20c364++]){case'0':if(_0x9dc01a['incompleteReason'])return _0x9dc01a[_0x24b301(0xc9)];continue;case'1':if(_0x9dc01a[_0x24b301(0x13a)])return _0x9dc01a[_0x24b301(0x13a)];continue;case'2':if(_0x9dc01a[_0x24b301(0xca)])return _0x9dc01a[_0x24b301(0xca)];continue;case'3':if(_0x143f36)return _0x143f36;continue;case'4':if(_0x9dc01a[_0x24b301(0xf5)])return _0x9dc01a['notes'];continue;case'5':return null;}break;}}export async function featureReportPrDescription(_0x2701dd,_0x350dc9){const _0x5b1a0e=_0x5ccc84,_0x384d54={'NyElS':function(_0x20b643){return _0x20b643();},'HsHGR':function(_0x3c1bae,_0xbbfcab,_0x39a51b){return _0x3c1bae(_0xbbfcab,_0x39a51b);},'qKGJf':function(_0x5709da,_0x3dfce9){return _0x5709da===_0x3dfce9;},'TvxPz':function(_0x29a77c,_0x3780e3){return _0x29a77c>_0x3780e3;},'ESRfl':'\x0aAvailable\x20scenarios:','VZkxR':function(_0x1c0345,_0x22bdbb){return _0x1c0345<_0x22bdbb;}},_0x5ae0bf=_0x2701dd||await _0x384d54['NyElS'](getActiveFeatureId);if(!_0x5ae0bf)throw new Error(_0x5b1a0e(0x143));const _0x196d2d=await getFeature(_0x5ae0bf),_0x512bab=_0x196d2d[_0x5b1a0e(0x117)]||[],_0x25406f=_0x384d54[_0x5b1a0e(0x9d)](getCurrentSessionItems,_0x196d2d,_0x512bab);_0x384d54[_0x5b1a0e(0x157)](_0x25406f[_0x5b1a0e(0xd2)],0x0)&&(console[_0x5b1a0e(0xf7)]('\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.'),process['exit'](0x1));const _0x5edae7=_0x350dc9[_0x5b1a0e(0x137)]??[],_0x5abf6d=_0x5edae7[_0x5b1a0e(0x134)](_0x12b486=>!Number['isInteger'](_0x12b486)||_0x12b486<0x1||_0x12b486>_0x25406f[_0x5b1a0e(0xd2)]);if(_0x384d54[_0x5b1a0e(0x121)](_0x5abf6d['length'],0x0)){console['error'](_0x5b1a0e(0x165)+_0x5abf6d[_0x5b1a0e(0xc2)](',\x20')),console[_0x5b1a0e(0x153)](_0x384d54[_0x5b1a0e(0x83)]);for(let _0x92927b=0x0;_0x384d54['VZkxR'](_0x92927b,_0x25406f['length']);_0x92927b++){console['log']('\x20\x20'+(_0x92927b+0x1)+'.\x20'+_0x25406f[_0x92927b]['description']);}process['exit'](0x1);}const _0x379698=new Set(_0x5edae7['map'](_0x260332=>_0x260332-0x1)),_0x38538f=_0x25406f[_0x5b1a0e(0x134)]((_0x315196,_0x414838)=>!_0x379698[_0x5b1a0e(0xa8)](_0x414838));_0x384d54[_0x5b1a0e(0x157)](_0x38538f['length'],0x0)&&(console[_0x5b1a0e(0xf7)](_0x5b1a0e(0x72)),process[_0x5b1a0e(0x133)](0x1));if(_0x350dc9[_0x5b1a0e(0x155)])await outputJsonReport(_0x5ae0bf,_0x196d2d,_0x38538f);else{const _0x5d5d13=await _0x384d54[_0x5b1a0e(0x9d)](getFeatureReportMarkdown,_0x5ae0bf,{'itemIds':_0x38538f[_0x5b1a0e(0xf2)](_0x3e7578=>_0x3e7578['id'])});process[_0x5b1a0e(0x10c)][_0x5b1a0e(0x13d)](_0x5d5d13['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x1f2102,_0x3dcfc8,_0x2b291d){const _0x1eea6d=_0x5ccc84,_0x44763b={'Tuluw':function(_0x37b1ee,_0x5b27a3){return _0x37b1ee(_0x5b27a3);},'YFarC':function(_0x77a9a,_0x36a7f7){return _0x77a9a===_0x36a7f7;},'TvaQO':function(_0x273bcb,_0xc21b6f){return _0x273bcb(_0xc21b6f);}},_0x19f317=getApiBaseUrl(),_0x3bff3a=await _0x44763b['TvaQO'](getFeatureReport,_0x1f2102),_0x5db49a=new Map(_0x3bff3a[_0x1eea6d(0x117)][_0x1eea6d(0xf2)](_0x2ccbde=>[_0x2ccbde['id'],_0x2ccbde])),_0x1c9555=await Promise[_0x1eea6d(0x9a)](_0x2b291d['map'](async _0x395b12=>{const _0x2e4309=_0x1eea6d,_0x47774d=_0x5db49a[_0x2e4309(0x7c)](_0x395b12['id']),_0x1d8be2=_0x47774d?.['linkedSession']??null;let _0x57bce4=[];if(_0x395b12[_0x2e4309(0xef)])try{const {steps:_0x3eeba7}=await _0x44763b['Tuluw'](getBrowserSessionSteps,_0x395b12['browserSessionId']);_0x3eeba7[_0x2e4309(0xd2)]>0x0&&(_0x57bce4=_0x3eeba7['map'](_0x44913f=>{const _0x4e8c82=_0x2e4309,_0x8c3478=_0x44913f['assets'][_0x4e8c82(0x73)](_0x2852e7=>_0x2852e7[_0x4e8c82(0x14b)]===_0x4e8c82(0x12d)&&_0x2852e7[_0x4e8c82(0xd3)]==='after')??_0x44913f['assets']['find'](_0x343cd6=>_0x343cd6['assetType']==='screenshot');let _0x2a4e08=null,_0x2e1f78=null;if(_0x8c3478){const _0x194db1=_0x8c3478[_0x4e8c82(0x95)][_0x4e8c82(0x109)][_0x4e8c82(0x140)]('/')[_0x4e8c82(0xfb)]();_0x2a4e08=_0x19f317+_0x4e8c82(0xd9)+_0x395b12[_0x4e8c82(0xef)]+_0x4e8c82(0xb0)+_0x194db1,_0x194db1&&(_0x2e1f78=_0x194db1['replace'](/\.\w+$/,'')[_0x4e8c82(0x97)](/^(key_)?\d+_/,'')[_0x4e8c82(0x97)](/[-_]/g,'\x20'));}return{'description':_0x2e1f78||_0x44913f['description']||_0x44913f[_0x4e8c82(0xaf)]||'Step\x20'+_0x44913f['position'],'screenshot':_0x2a4e08,'is_key_step':_0x44913f['isKeyStep']};}));}catch{}return _0x44763b['YFarC'](_0x57bce4['length'],0x0)&&_0x1d8be2?.[_0x2e4309(0x164)]&&(_0x57bce4=_0x1d8be2[_0x2e4309(0x164)]['map']((_0xe892ee,_0x337ad5)=>({'description':'Screenshot\x20'+(_0x337ad5+0x1),'screenshot':_0xe892ee,'is_key_step':![]}))),{'description':_0x395b12['description'],'result':_0x44763b['Tuluw'](getScenarioResult,_0x395b12),'rationale':getScenarioRationale(_0x395b12,_0x1d8be2?.['agentResponse']),'steps':_0x57bce4};})),_0x774183={'url':_0x3dcfc8[_0x1eea6d(0xd0)],'scenarios':_0x1c9555};process['stdout'][_0x1eea6d(0x13d)](JSON['stringify'](_0x774183,null,0x2)+'\x0a');}export async function featureConcludeSession(_0x319674){const _0x1f1a27=_0x5ccc84,_0x2e9c61={'nfabf':function(_0xf7853d,_0x4dca16){return _0xf7853d(_0x4dca16);},'dorGk':_0x1f1a27(0x15f),'gfFOC':function(_0x4de3b0,_0x532de4){return _0x4de3b0(_0x532de4);},'fMdTN':'Current\x20session\x20not\x20found.','tMAti':_0x1f1a27(0x163),'OEFlN':function(_0x18cace,_0x42de00){return _0x18cace!==_0x42de00;},'mVNLl':'in_progress'},_0x4bd3f6=_0x319674||await getActiveFeatureId();if(!_0x4bd3f6)throw new Error(_0x1f1a27(0x96));const _0x13a42e=await _0x2e9c61['nfabf'](getFeature,_0x4bd3f6);if(!_0x13a42e[_0x1f1a27(0x144)])throw new Error(_0x2e9c61[_0x1f1a27(0x11a)]);const {sessions:_0x11df0f}=await _0x2e9c61['gfFOC'](listFeatureSessions,_0x4bd3f6),_0x5ea0a3=_0x11df0f['find'](_0x5b4e2c=>_0x5b4e2c['id']===_0x13a42e['currentSessionId']);if(!_0x5ea0a3)throw new Error(_0x2e9c61['fMdTN']);if(_0x5ea0a3['status']===_0x1f1a27(0x154)){console[_0x1f1a27(0x153)](_0x2e9c61[_0x1f1a27(0xe5)]);return;}if(_0x2e9c61[_0x1f1a27(0x79)](_0x5ea0a3['status'],_0x2e9c61['mVNLl']))throw new Error('Cannot\x20conclude\x20session\x20with\x20status:\x20'+_0x5ea0a3[_0x1f1a27(0xc5)]);console['log'](_0x1f1a27(0x9f)),await concludeSession(_0x4bd3f6,_0x13a42e['currentSessionId']),console['log']('\x0a✅\x20Session\x20'+_0x5ea0a3[_0x1f1a27(0xcd)]+'\x20concluded.'),console['log'](_0x1f1a27(0x138));}export async function featureSessions(_0x3f61df){const _0x4c1cf7=_0x5ccc84,_0x13abfb={'Rjqcd':function(_0x2abfd0){return _0x2abfd0();},'wIkgM':function(_0x10288a,_0x569c66){return _0x10288a(_0x569c66);},'IjeVt':_0x4c1cf7(0x154)},_0x2a7d49=_0x3f61df||await _0x13abfb['Rjqcd'](getActiveFeatureId);if(!_0x2a7d49)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');const _0x3be47c=await getFeature(_0x2a7d49);console['log'](_0x4c1cf7(0xa2)+_0x3be47c['name']+'\x0a');const {sessions:_0x132fce}=await _0x13abfb[_0x4c1cf7(0xff)](listFeatureSessions,_0x2a7d49);if(_0x132fce['length']===0x0){console['log'](_0x4c1cf7(0x10b));return;}for(const _0x213e1d of _0x132fce){const _0x4a1f6d=_0x213e1d['status']===_0x13abfb['IjeVt']?'✅':_0x213e1d['status']===_0x4c1cf7(0x105)?'🔄':'▶️';console['log'](_0x4a1f6d+'\x20Session\x20'+_0x213e1d[_0x4c1cf7(0xcd)]+'\x20('+_0x213e1d['id']+')'),console[_0x4c1cf7(0x153)]('\x20\x20\x20Status:\x20'+_0x213e1d['status']),console['log']('\x20\x20\x20Created:\x20'+new Date(_0x213e1d[_0x4c1cf7(0xe3)])['toLocaleString']()),_0x213e1d[_0x4c1cf7(0x74)]&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x213e1d[_0x4c1cf7(0x74)])['toLocaleString']()),console[_0x4c1cf7(0x153)]('');}}export async function featureAddScenario(_0x4f7dd9,_0x2b9229){const _0x15e48c=_0x5ccc84,_0x3ee17b={'dUmTZ':function(_0x4470f5){return _0x4470f5();},'GQEEx':function(_0x24ad60,_0x4709be){return _0x24ad60(_0x4709be);}},_0x55b367=_0x2b9229||await _0x3ee17b['dUmTZ'](getActiveFeatureId);if(!_0x55b367)throw new Error(_0x15e48c(0x96));const _0x3b39e9=await _0x3ee17b['GQEEx'](getFeature,_0x55b367);if(_0x3b39e9['latestReview']&&!_0x3b39e9['latestReview'][_0x15e48c(0x124)])throw new Error(_0x15e48c(0x75)+_0x3b39e9[_0x15e48c(0xd0)]);await createChecklistItem(_0x55b367,_0x4f7dd9);const _0x2b9ee9=await _0x3ee17b[_0x15e48c(0x89)](getFeature,_0x55b367);console['log']('\x0a✅\x20Scenario\x20added'),displayFeature(_0x2b9ee9,_0x2b9ee9[_0x15e48c(0x117)]);}export async function featureEditScenario(_0x27a49f,_0x552480){const _0x2c570b=_0x5ccc84,_0x455efd={'oPXQW':'\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','tnBLE':_0x2c570b(0xb1),'uaiHG':function(_0xc61f45,_0x7532e6){return _0xc61f45(_0x7532e6);},'mlIda':_0x2c570b(0x122),'NYqlt':function(_0x51e36f,_0x159682){return _0x51e36f===_0x159682;},'vnYbT':'\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','VWWoz':function(_0x27f338,_0x306cea){return _0x27f338<_0x306cea;},'EZqYN':function(_0x5b19f0,_0x4a6706){return _0x5b19f0+_0x4a6706;},'YVcwW':function(_0xb89011,_0x2df9be){return _0xb89011-_0x2df9be;},'fjUtk':function(_0x474981,_0xb65e4e){return _0x474981>=_0xb65e4e;},'KBMmJ':function(_0x1b2260,_0x426550){return _0x1b2260+_0x426550;},'uHlsw':function(_0xf7af1d,_0x436c8d,_0x2dc625){return _0xf7af1d(_0x436c8d,_0x2dc625);}},_0x15e1c3=_0x552480['id']||await getActiveFeatureId();!_0x15e1c3&&(console['error'](_0x455efd[_0x2c570b(0xfc)]),console[_0x2c570b(0xf7)](_0x455efd['tnBLE']),process['exit'](0x1));const _0x20c0ba=await _0x455efd['uaiHG'](getFeature,_0x15e1c3);_0x20c0ba[_0x2c570b(0x103)]&&!_0x20c0ba[_0x2c570b(0x103)]['submittedAt']&&(console[_0x2c570b(0xf7)](_0x455efd[_0x2c570b(0xfe)]),console[_0x2c570b(0xf7)](_0x2c570b(0x132)),console[_0x2c570b(0xf7)]('\x20\x20'+_0x20c0ba[_0x2c570b(0xd0)]),process['exit'](0x1));const _0x9167d1=_0x20c0ba['checklistItems']||[];_0x455efd['NYqlt'](_0x9167d1[_0x2c570b(0xd2)],0x0)&&(console[_0x2c570b(0xf7)](_0x2c570b(0x110)),process['exit'](0x1));if(_0x552480[_0x2c570b(0xdc)]===undefined){console[_0x2c570b(0xf7)](_0x455efd[_0x2c570b(0xd8)]),console['log']('\x0aAvailable\x20scenarios:');for(let _0xddc6d9=0x0;_0x455efd['VWWoz'](_0xddc6d9,_0x9167d1[_0x2c570b(0xd2)]);_0xddc6d9++){console[_0x2c570b(0x153)]('\x20\x20'+_0x455efd[_0x2c570b(0xa1)](_0xddc6d9,0x1)+'.\x20'+_0x9167d1[_0xddc6d9][_0x2c570b(0xbc)]);}process['exit'](0x1);}const _0xdb1bd8=_0x455efd[_0x2c570b(0x70)](_0x552480['scenario'],0x1);if(_0xdb1bd8<0x0||_0x455efd['fjUtk'](_0xdb1bd8,_0x9167d1['length'])){console['error'](_0x2c570b(0x7b)+_0x552480[_0x2c570b(0xdc)]+'.\x20Feature\x20review\x20has\x20'+_0x9167d1['length']+_0x2c570b(0xe9)),console[_0x2c570b(0x153)](_0x2c570b(0xb3));for(let _0x44ca67=0x0;_0x455efd['VWWoz'](_0x44ca67,_0x9167d1[_0x2c570b(0xd2)]);_0x44ca67++){console['log']('\x20\x20'+_0x455efd[_0x2c570b(0x156)](_0x44ca67,0x1)+'.\x20'+_0x9167d1[_0x44ca67]['description']);}process[_0x2c570b(0x133)](0x1);}const _0x541667=_0x9167d1[_0xdb1bd8];await updateChecklistItem(_0x15e1c3,_0x541667['id'],{'description':_0x27a49f});const _0x4e4bb9=await _0x455efd['uaiHG'](getFeature,_0x15e1c3);console['log']('\x0a✅\x20Scenario\x20updated'),_0x455efd['uHlsw'](displayFeature,_0x4e4bb9,_0x4e4bb9['checklistItems']);}async function downloadFeedbackImage(_0x5bd1d0,_0x39a7c6){const _0x5eb4d8=_0x5ccc84,_0x1158d0={'DqvKZ':function(_0x45f636,_0x25855e,_0x1a8cd8){return _0x45f636(_0x25855e,_0x1a8cd8);},'mKQTK':function(_0x278fb7){return _0x278fb7();},'ynZaJ':_0x5eb4d8(0x15e),'RkKML':function(_0x1f154b,_0xfb67d3,_0x53fcb6){return _0x1f154b(_0xfb67d3,_0x53fcb6);},'IOpnE':function(_0x2900fa,_0x4f0fee){return _0x2900fa(_0x4f0fee);}};try{const _0x5b24b2=_0x1158d0[_0x5eb4d8(0xf4)](join,_0x1158d0[_0x5eb4d8(0x86)](getRangerDir),_0x1158d0[_0x5eb4d8(0x11d)]);await mkdir(_0x5b24b2,{'recursive':!![]});const _0xc0c7a1=_0x1158d0[_0x5eb4d8(0x15a)](join,_0x5b24b2,_0x5eb4d8(0x71)+_0x39a7c6+_0x5eb4d8(0x14d)),_0x18c715=await _0x1158d0[_0x5eb4d8(0x8a)](fetch,_0x5bd1d0);if(!_0x18c715['ok'])return null;const _0x39b1e4=Buffer[_0x5eb4d8(0xce)](await _0x18c715['arrayBuffer']());return await _0x1158d0[_0x5eb4d8(0xf4)](writeFile,_0xc0c7a1,_0x39b1e4),_0xc0c7a1;}catch{return null;}}export async function featureGetReview(_0x334bbd){const _0x5e3af8=_0x5ccc84,_0x53dbb8={'VcPhp':function(_0x54810e){return _0x54810e();},'rkwQs':_0x5e3af8(0x96),'UYHYE':function(_0x56fcec,_0x4ed33d){return _0x56fcec(_0x4ed33d);},'osfgm':function(_0x2b786b,_0x4635f2){return _0x2b786b(_0x4635f2);},'kemjN':function(_0x5b330e,_0x10aa1c){return _0x5b330e>_0x10aa1c;},'IFgJb':function(_0x411bdc,_0x18a20b,_0x2c3de8){return _0x411bdc(_0x18a20b,_0x2c3de8);},'INokR':function(_0x4d5bb4,_0x3257f5){return _0x4d5bb4+_0x3257f5;},'sCbia':'en-US','XiCZY':'numeric','AFbnw':_0x5e3af8(0x10d),'jNbZg':_0x5e3af8(0xba),'BcIJh':_0x5e3af8(0x112),'jsRvJ':function(_0x4c0602,_0x267b2e){return _0x4c0602===_0x267b2e;},'qfyNh':'point'},_0x13486f=_0x334bbd||await _0x53dbb8[_0x5e3af8(0xe8)](getActiveFeatureId);if(!_0x13486f)throw new Error(_0x53dbb8[_0x5e3af8(0x14a)]);const _0x53f3fb=await _0x53dbb8['UYHYE'](getFeature,_0x13486f),{items:_0x3a96b3}=await _0x53dbb8[_0x5e3af8(0x76)](getActionItems,_0x13486f);console['log'](_0x5e3af8(0x9c)+_0x53f3fb['name']+'\x20('+_0x53f3fb['id']+')\x0a');if(_0x3a96b3[_0x5e3af8(0xd2)]===0x0){console['log']('No\x20scenarios\x20found.');return;}for(let _0x525741=0x0;_0x525741<_0x3a96b3['length'];_0x525741++){const _0x9e77b4=_0x3a96b3[_0x525741],_0x16918b=_0x53dbb8['kemjN'](_0x9e77b4[_0x5e3af8(0x148)],0x1)?'\x20(v'+_0x9e77b4[_0x5e3af8(0x148)]+')':'',_0x4931b3=await _0x53dbb8['IFgJb'](getItemFeedback,_0x13486f,_0x9e77b4['id']);if(_0x53dbb8[_0x5e3af8(0x108)](_0x4931b3[_0x5e3af8(0x123)][_0x5e3af8(0xd2)],0x0)){console['log'](_0x5e3af8(0x100)+_0x53dbb8[_0x5e3af8(0x161)](_0x525741,0x1)+_0x5e3af8(0x90)+_0x9e77b4[_0x5e3af8(0xbc)]+'\x22'+_0x16918b+_0x5e3af8(0xb4)+_0x4931b3['unaddressedComments']['length']+'\x20unaddressed\x20comment(s)');for(const _0x4dc86f of _0x4931b3[_0x5e3af8(0x123)]){const _0x4f6338=new Date(_0x4dc86f[_0x5e3af8(0xe3)])['toLocaleDateString'](_0x53dbb8['sCbia'],{'month':_0x5e3af8(0xc6),'day':_0x53dbb8[_0x5e3af8(0x88)]}),_0x8964a=_0x4dc86f['authorName']||_0x4dc86f[_0x5e3af8(0xa6)]||_0x53dbb8[_0x5e3af8(0x116)];console[_0x5e3af8(0x153)](_0x5e3af8(0xde)+_0x8964a+'\x20('+_0x4f6338+'):\x20\x22'+_0x4dc86f[_0x5e3af8(0xec)]+'\x22');if(_0x4dc86f['assetUrl']){const _0x45721d=await _0x53dbb8['IFgJb'](downloadFeedbackImage,_0x4dc86f['assetUrl'],_0x4dc86f['id']);_0x45721d&&console['log']('\x20\x20\x20\x20\x20📷\x20Screenshot:\x20'+_0x45721d);}if(_0x4dc86f[_0x5e3af8(0x14f)]){const _0x1691fd=_0x4dc86f['domRef'][_0x5e3af8(0x101)][_0x5e3af8(0x140)](_0x53dbb8[_0x5e3af8(0xc7)])['pop']()?.[_0x5e3af8(0x140)](':')[0x0]||_0x53dbb8[_0x5e3af8(0x10e)],_0xa29c5d=_0x4dc86f['domRef'][_0x5e3af8(0x127)]?'\x20\x22'+_0x4dc86f['domRef']['textContent'][_0x5e3af8(0x129)](0x0,0x3c)+'\x22':'';console['log'](_0x5e3af8(0x84)+_0x1691fd+'>'+_0xa29c5d),console[_0x5e3af8(0x153)](_0x5e3af8(0x98)+_0x4dc86f[_0x5e3af8(0x14f)]['selector']);}else{if(_0x4dc86f[_0x5e3af8(0x10a)]){const _0x121f30=_0x4dc86f[_0x5e3af8(0x10a)]['coordinates'];_0x53dbb8[_0x5e3af8(0x114)](_0x4dc86f[_0x5e3af8(0x10a)]['type'],_0x53dbb8['qfyNh'])&&_0x121f30['length']>=0x2?console['log'](_0x5e3af8(0x9b)+_0x121f30[0x0][_0x5e3af8(0x142)](0x2)+',\x20'+_0x121f30[0x1][_0x5e3af8(0x142)](0x2)+')'):console['log'](_0x5e3af8(0x120)+_0x4dc86f[_0x5e3af8(0x10a)]['type']+'\x20at\x20['+_0x121f30['map'](_0x2601cd=>_0x2601cd[_0x5e3af8(0x142)](0x2))[_0x5e3af8(0xc2)](',\x20')+']');}}}if(_0x4931b3[_0x5e3af8(0x104)]){console[_0x5e3af8(0x153)]('\x20\x20Expected\x20flow:');for(const _0x4058b1 of _0x4931b3[_0x5e3af8(0x104)]['split']('\x0a')){console[_0x5e3af8(0x153)](_0x5e3af8(0xc0)+_0x4058b1);}}}else console[_0x5e3af8(0x153)]('Scenario\x20'+(_0x525741+0x1)+_0x5e3af8(0x90)+_0x9e77b4['description']+'\x22'+_0x16918b+'\x20—\x20no\x20comments'),console[_0x5e3af8(0x153)](_0x5e3af8(0xf8));console['log']('');}}export async function featureDelete(_0x189a7b){const _0x15f4f3=_0x5ccc84,_0x20f768={'OhteI':function(_0xa76016,_0x4fa9a7){return _0xa76016(_0x4fa9a7);},'NDEVP':_0x15f4f3(0xeb)},_0x5cea3b=_0x189a7b||await getActiveFeatureId();if(!_0x5cea3b)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x1a1633=await getFeature(_0x5cea3b);await _0x20f768[_0x15f4f3(0xcb)](softDeleteFeature,_0x5cea3b),console['log'](_0x15f4f3(0x7f)+_0x1a1633[_0x15f4f3(0x162)]+'\x20('+_0x5cea3b+')'),console[_0x15f4f3(0x153)](_0x20f768[_0x15f4f3(0x77)]+_0x5cea3b);}export async function featureRestore(_0x146ca6){const _0x5c0b62=_0x5ccc84,_0x200e94={'VhvWX':function(_0x1434cb,_0x41eb0d){return _0x1434cb(_0x41eb0d);},'RUIKM':function(_0x442574,_0x36bb19,_0x17323b){return _0x442574(_0x36bb19,_0x17323b);}};await _0x200e94[_0x5c0b62(0x8e)](restoreFeature,_0x146ca6);const _0x3a5213=await getFeature(_0x146ca6);console[_0x5c0b62(0x153)]('\x0a✅\x20Restored\x20feature\x20review:\x20'+_0x3a5213['name']+'\x20('+_0x146ca6+')'),_0x200e94[_0x5c0b62(0x12f)](displayFeature,_0x3a5213,_0x3a5213[_0x5c0b62(0x117)]);}
1
+ const _0xb6b994=_0x3a40;(function(_0x302f7a,_0x42475d){const _0x40932f=_0x3a40,_0x34f6ee=_0x302f7a();while(!![]){try{const _0x3d97b1=parseInt(_0x40932f(0x23c))/0x1+-parseInt(_0x40932f(0x1ce))/0x2*(parseInt(_0x40932f(0x223))/0x3)+parseInt(_0x40932f(0x1ea))/0x4*(-parseInt(_0x40932f(0x1bf))/0x5)+-parseInt(_0x40932f(0x27f))/0x6*(parseInt(_0x40932f(0x272))/0x7)+parseInt(_0x40932f(0x1c1))/0x8*(parseInt(_0x40932f(0x29f))/0x9)+-parseInt(_0x40932f(0x1ef))/0xa*(-parseInt(_0x40932f(0x241))/0xb)+parseInt(_0x40932f(0x22f))/0xc*(parseInt(_0x40932f(0x24e))/0xd);if(_0x3d97b1===_0x42475d)break;else _0x34f6ee['push'](_0x34f6ee['shift']());}catch(_0x39d95a){_0x34f6ee['push'](_0x34f6ee['shift']());}}}(_0x4b9b,0x77050));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';function _0x4b9b(){const _0x5094fd=['Current\x20session\x20not\x20found.',':\x20\x22','verificationInProgressItems','zLmzO','wlIIW','\x20\x20\x20Progress:\x20','\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20(','\x20of\x20','6143028Gdqupc','trim','gitBranch','description','...','comment_','/api/v1/mcp/browser-sessions/','/artifacts/','IXULi','WyyfH','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','umhkE','YERYw','266925GABGBO','\x20/\x20','\x20\x20\x20Branch:\x20','map','PcLCG','1001Yzupid','items','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','hFdGH','yjjqU','qfyGX','LyUpB','trcqN','trimEnd','\x20—\x20no\x20comments','blockedItems','toLocaleString','vggIm','26uWnDOD','textContent','gZENg','\x0a✅\x20Report\x20generated:\x20','Blxgr','KBMhK','imDIF','4|1|2|0|3|5','WFPpU','PnqvI','ZyjJH','\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.','output','iZDVO','\x20concluded.','push','\x20\x20\x20Updated\x20branch\x20to:\x20','join','completedAt','currentBranch','BbcRJ','iteration','WoQkd','prompt','OPIgj','after','approved','\x0a✅\x20Restored\x20feature\x20review:\x20','location','assetType','eizfA','FKKBb','eSBUI','hZWTW','status','exit','126399lMpIMi','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','NFIFK','QeJvC','completed','find','\x0a✅\x20Session\x20','OtGCt','stdout','Step\x20','\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20','\x20\x20\x20\x20\x20Progress:\x20','WTDJc','72rGVzDn','rmCAc','CfTUT','UVxKF','jpIpo','\x0a📋\x20Feedback\x20for:\x20','UfwIC','version','replace','blockedReason','UrcZA','qRAxm','\x20\x20\x20\x20\x20Branch:\x20','\x20\x20\x20\x20\x20📍\x20Annotation:\x20','Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','terminalReason','\x20incomplete','canceledReason','currentSessionId','assets','blocked','\x0a✅\x20Session\x20is\x20already\x20completed.','\x0aAvailable\x20scenarios:','Cannot\x20conclude\x20session\x20with\x20status:\x20','utf-8','domRef','latestReview','selected','\x20Session\x20','list','\x20unaddressed\x20comment(s)','QMhpg','369jhDutB','\x20scenario(s).','ufiUK','btmJu','CmgvQ','checklistItems','HzHWz','Yzchb','limit','canonicalFlow','\x0a✅\x20Scenario\x20updated','\x20\x20\x20Status:\x20','screenshotUrls','\x20\x20\x20Repository:\x20','\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','\x20\x20\x20\x20\x20\x20Blocked:\x20','oPigy','\x20\x20✅\x20No\x20feedback\x20to\x20address','includeDeleted','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','XDdIP','length','gitRepoUrl','35JFerop','gcRQH','84184gooqTa','jOKTI','selector','repeat','\x0aCreating\x20feature\x20review...','closed','\x1b[1m','browserSessionId','CLAUDE_SESSION_ID','pipe','\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20','\x20--include-deleted','\x20(v','4AEwULS','\x20\x20\x20\x20\x20📷\x20Screenshot:\x20','UPFqA','AmTPd','TvRzg','isInteger','\x20\x20\x20\x20\x20\x20Cancelled:\x20','vmDWe','sLtSP','\x20>\x20','sessionId','verification_in_progress','jIgIx','totalCount','LJMeC','spatial','.md','git\x20remote\x20get-url\x20origin','incomplete','hRzMp','eFSLK','stringify','mXcnw','stats','Fjmzu','filter','Showing\x20','xyvjt','519212PHdVPM','oPgkA','zUIsJ','iiRpV','stepName','34050tSVlnb','log','phQTF','No\x20scenarios\x20found.','\x20\x20\x20Completed:\x20','\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','\x20\x20\x20','toFixed','RANGER_TEST_USERNAME','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','SUrOC','env','createdAt','scenario','submittedAt','VPhYO','excludeScenarios','hfnDf','in_progress','RENeS','\x0aGenerating\x20report...','No\x20sessions\x20found.','dashboardUrl','write','\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20','toLocaleDateString','coordinates','RJcQk','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','\x0a\x20\x20\x20Scenarios:','\x20feature\x20review(s)\x20found','xRYTB','LIOOf','numeric','isKeyStep','\x20\x20\x20▶️\x20Started\x20session\x20','\x20\x20\x20Created:\x20','\x20—\x20','QglxR','error','QiyzR','CAvoN','\x20\x20\x20\x20\x20📋\x20Selector:\x20','yWzIY','xMhLh','incompleteReason','\x0a❌\x20Invalid\x20scenario\x20index:\x20','HKeqG','element','isTTY','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','name','628878BZGRUt','Not\x20in\x20a\x20git\x20repository.','Scenario\x20','EhDwD'];_0x4b9b=function(){return _0x5094fd;};return _0x4b9b();}import _0x814486 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=_0x54cf50=>_0xb6b994(0x1c7)+_0x54cf50+'\x1b[0m';function getGitRepoUrl(){const _0x2bfef6=_0xb6b994,_0x338e89={'ruzkw':function(_0x476464,_0x1a0b53,_0x448f04){return _0x476464(_0x1a0b53,_0x448f04);},'Yzchb':_0x2bfef6(0x1ca),'WyyfH':'github.com/'};try{const _0x5656ad=_0x338e89['ruzkw'](execSync,_0x2bfef6(0x1df),{'encoding':_0x2bfef6(0x297),'stdio':[_0x338e89[_0x2bfef6(0x2a6)],_0x338e89['Yzchb'],_0x2bfef6(0x1ca)]})[_0x2bfef6(0x230)]();return _0x5656ad['replace'](/\.git$/,'')[_0x2bfef6(0x287)](/^git@github\.com:/,_0x338e89[_0x2bfef6(0x238)])['replace'](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x32c566=_0xb6b994,_0x132914={'vlOko':function(_0x2fe88b,_0x28f0a7,_0xfb7f03){return _0x2fe88b(_0x28f0a7,_0xfb7f03);},'NFIFK':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','hfnDf':'utf-8','uxUuC':'pipe'};try{return _0x132914['vlOko'](execSync,_0x132914[_0x32c566(0x274)],{'encoding':_0x132914[_0x32c566(0x200)],'stdio':[_0x32c566(0x1ca),_0x132914['uxUuC'],'pipe']})[_0x32c566(0x230)]();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x245721=_0xb6b994,_0x151dbe={'CmgvQ':function(_0xb2b480,_0x4fdf9b,_0x1a0dda){return _0xb2b480(_0x4fdf9b,_0x1a0dda);},'Kttgh':_0x245721(0x297)},_0x4485c4=_0x151dbe[_0x245721(0x2a3)](join,getRangerDir(),ACTIVE_FEATURE_FILE);if(!existsSync(_0x4485c4))return null;try{const _0x12288e=await _0x151dbe[_0x245721(0x2a3)](readFile,_0x4485c4,_0x151dbe['Kttgh']);return _0x12288e['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x290fd5){const _0x1b2cbf=_0xb6b994,_0x1ee248={'rmCAc':function(_0x33fa5d,_0x49dbfe,_0x4f97aa){return _0x33fa5d(_0x49dbfe,_0x4f97aa);}},_0x4fa51f=getRangerDir(),_0x1c8ab4=_0x1ee248[_0x1b2cbf(0x280)](join,_0x4fa51f,ACTIVE_FEATURE_FILE);!existsSync(_0x4fa51f)&&await mkdir(_0x4fa51f,{'recursive':!![]}),await writeFile(_0x1c8ab4,_0x290fd5,'utf-8');}function getProgressDisplay(_0x1be3d6){const _0x35041a=_0xb6b994,_0x5a3556={'AmTPd':function(_0x31782b,_0x45d0a8){return _0x31782b+_0x45d0a8;},'wascB':function(_0x370ed6,_0x1881a5){return _0x370ed6+_0x1881a5;},'gcRQH':function(_0x13468a,_0x19259b){return _0x13468a===_0x19259b;},'hFdGH':function(_0x256c38,_0x7aa31e){return _0x256c38-_0x7aa31e;},'hRzMp':function(_0x524781,_0x59b2f1){return _0x524781>_0x59b2f1;},'Blxgr':function(_0x24cdd8,_0x686a6){return _0x24cdd8>_0x686a6;}},_0x252769=_0x1be3d6['verifiedItems']||0x0,_0x484bcf=_0x1be3d6[_0x35041a(0x229)]||0x0,_0x473ea3=_0x1be3d6[_0x35041a(0x24b)]||0x0,_0x5f5026=_0x1be3d6['incompleteItems']||0x0,_0x338b4f=_0x1be3d6['pendingItems']||0x0,_0x43bb86=_0x5a3556[_0x35041a(0x1d1)](_0x5a3556['wascB'](_0x252769,_0x484bcf)+_0x473ea3,_0x5f5026)+_0x338b4f;if(_0x5a3556[_0x35041a(0x1c0)](_0x43bb86,0x0))return'-';const _0x11023e=0xa,_0x36d8ef=Math['round'](_0x252769/_0x43bb86*_0x11023e),_0x12272b='█'[_0x35041a(0x1c4)](_0x36d8ef)+'░'[_0x35041a(0x1c4)](_0x5a3556[_0x35041a(0x244)](_0x11023e,_0x36d8ef)),_0x32eda5=[];if(_0x5a3556[_0x35041a(0x1e1)](_0x473ea3,0x0))_0x32eda5[_0x35041a(0x25d)](_0x473ea3+'\x20blocked');if(_0x5a3556[_0x35041a(0x252)](_0x5f5026,0x0))_0x32eda5[_0x35041a(0x25d)](_0x5f5026+_0x35041a(0x28f));if(_0x484bcf>0x0)_0x32eda5[_0x35041a(0x25d)](_0x484bcf+'\x20in\x20progress');const _0x2d2679=_0x32eda5[_0x35041a(0x1bd)]>0x0?'\x20('+_0x32eda5['join'](',\x20')+')':'';return _0x12272b+'\x20'+_0x252769+'/'+_0x43bb86+'\x20verified'+_0x2d2679;}function getCurrentSessionItems(_0x36878c,_0x3e138d){const _0x54bfa2=_0xb6b994;if(!_0x36878c['currentSessionId'])return _0x3e138d[_0x54bfa2(0x1e7)](_0x414a8a=>!_0x414a8a['sessionId']);return _0x3e138d['filter'](_0x579799=>_0x579799[_0x54bfa2(0x1d8)]===_0x36878c['currentSessionId']||!_0x579799[_0x54bfa2(0x1d8)]);}function displayFeature(_0x30598f,_0x4a8077){const _0x1df763=_0xb6b994,_0x3aaba9={'OtGCt':function(_0x2a3850,_0x1851f9){return _0x2a3850(_0x1851f9);},'jpIpo':_0x1df763(0x20c),'AMceJ':function(_0x443f46,_0x1bdedd){return _0x443f46<_0x1bdedd;},'wlIIW':function(_0x4cb392,_0x59317f){return _0x4cb392===_0x59317f;},'hZWTW':_0x1df763(0x1c6),'vggIm':function(_0x23dc0a,_0xc3b8a8){return _0x23dc0a===_0xc3b8a8;},'SUrOC':'verified','imiDW':function(_0x36af1e,_0x108c0a){return _0x36af1e===_0x108c0a;},'ftubc':'verification_in_progress','obMWz':function(_0x1322b3,_0x1d752c){return _0x1322b3>_0x1d752c;},'trcqN':'\x20[has\x20reviewer\x20feedback]','xRYTB':function(_0x122ac2,_0x475955){return _0x122ac2+_0x475955;}};console['log']('\x0a'+_0x30598f[_0x1df763(0x222)]+'\x20('+_0x30598f['dashboardUrl']+')');_0x30598f[_0x1df763(0x1e5)]&&console[_0x1df763(0x1f0)](_0x1df763(0x22c)+_0x3aaba9[_0x1df763(0x279)](getProgressDisplay,_0x30598f['stats']));_0x30598f['description']&&console[_0x1df763(0x1f0)]('\x20\x20\x20Description:\x20'+_0x30598f[_0x1df763(0x232)]);_0x30598f['gitRepoUrl']&&console[_0x1df763(0x1f0)](_0x1df763(0x2ac)+_0x30598f[_0x1df763(0x1be)]);_0x30598f[_0x1df763(0x231)]&&console['log']('\x20\x20\x20Branch:\x20'+_0x30598f['gitBranch']);console['log']('\x20\x20\x20Created:\x20'+new Date(_0x30598f[_0x1df763(0x1fb)])[_0x1df763(0x24c)]());_0x30598f['completedAt']&&console[_0x1df763(0x1f0)](_0x1df763(0x1f3)+new Date(_0x30598f[_0x1df763(0x260)])['toLocaleString']());if(_0x4a8077&&_0x4a8077[_0x1df763(0x1bd)]>0x0){console[_0x1df763(0x1f0)](_0x3aaba9[_0x1df763(0x283)]);for(let _0x2aba73=0x0;_0x3aaba9['AMceJ'](_0x2aba73,_0x4a8077['length']);_0x2aba73++){const _0x46bcc4=_0x4a8077[_0x2aba73];let _0x303888;if(_0x3aaba9[_0x1df763(0x22b)](_0x46bcc4[_0x1df763(0x270)],_0x3aaba9[_0x1df763(0x26f)])&&_0x3aaba9[_0x1df763(0x24d)](_0x46bcc4[_0x1df763(0x28e)],'approved'))_0x303888='✅';else{if(_0x46bcc4['status']===_0x3aaba9['SUrOC'])_0x303888='🟢';else{if(_0x3aaba9['imiDW'](_0x46bcc4[_0x1df763(0x270)],_0x1df763(0x1e0)))_0x303888='🟠';else{if(_0x46bcc4[_0x1df763(0x270)]===_0x1df763(0x293))_0x303888='🛑';else{if(_0x46bcc4[_0x1df763(0x270)]==='closed')_0x303888='⛔';else _0x46bcc4['status']===_0x3aaba9['ftubc']?_0x303888='⏳':_0x303888='⬜';}}}}const _0x51d9f1=_0x46bcc4[_0x1df763(0x286)]>0x1?'\x20(v'+_0x46bcc4['version']+')':'',_0x3e3233=_0x3aaba9['obMWz'](_0x46bcc4['version'],0x1)&&_0x46bcc4['parentItemId']&&_0x46bcc4['status']!=='closed'&&_0x46bcc4['status']!==_0x3aaba9[_0x1df763(0x1f9)]?_0x3aaba9[_0x1df763(0x248)]:'';console[_0x1df763(0x1f0)](_0x1df763(0x1f5)+_0x3aaba9[_0x1df763(0x20e)](_0x2aba73,0x1)+'.\x20'+_0x303888+'\x20'+_0x46bcc4['description']+_0x51d9f1+_0x3e3233);_0x46bcc4[_0x1df763(0x270)]===_0x1df763(0x293)&&_0x46bcc4[_0x1df763(0x288)]&&console[_0x1df763(0x1f0)](_0x1df763(0x2ae)+_0x46bcc4['blockedReason']);_0x46bcc4[_0x1df763(0x270)]==='incomplete'&&_0x46bcc4['incompleteReason']&&console['log']('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x46bcc4[_0x1df763(0x21c)]);if(_0x46bcc4[_0x1df763(0x270)]==='closed'&&_0x3aaba9['imiDW'](_0x46bcc4[_0x1df763(0x28e)],_0x1df763(0x268)))console['log']('\x20\x20\x20\x20\x20\x20Approved');else _0x46bcc4['status']===_0x1df763(0x1c6)&&_0x46bcc4['canceledReason']&&console[_0x1df763(0x1f0)](_0x1df763(0x1d4)+_0x46bcc4[_0x1df763(0x290)]);}}}export async function featureCreate(_0xf0b2f0,_0x3cb173){const _0x147791=_0xb6b994,_0x5980e4={'QglxR':function(_0x455943,_0x5f27c1){return _0x455943===_0x5f27c1;},'uyGZz':function(_0x15b39f,_0x442607){return _0x15b39f(_0x442607);},'WoQkd':function(_0x5054ee){return _0x5054ee();},'PkxYe':function(_0x2e409e){return _0x2e409e();},'Bzrhq':function(_0x3755cc,_0x1dd9e8,_0x13dd9e){return _0x3755cc(_0x1dd9e8,_0x13dd9e);}},{envNames:_0x47c255}=await getEnvNames();if(_0x5980e4['QglxR'](_0x47c255[_0x147791(0x1bd)],0x0)&&!process['env'][_0x147791(0x1f7)]){let _0x5d76b4=0x0;try{_0x5d76b4=(await listCloudProfiles())['length'];}catch{_0x5d76b4=0x1;}_0x5980e4[_0x147791(0x215)](_0x5d76b4,0x0)&&console['warn']('\x0a'+_0x5980e4['uyGZz'](formatProfileRequiredMessage,_0x8e1072=>bold(_0x8e1072)));}const _0x49bb27=_0x3cb173['scenarios']?_0x3cb173['scenarios'][_0x147791(0x23f)](_0xdc2f93=>_0xdc2f93[_0x147791(0x230)]()):[],_0x6af99e=_0x5980e4[_0x147791(0x264)](getGitRepoUrl),_0x4fda84=_0x5980e4['PkxYe'](getGitBranch);console['log'](_0x147791(0x1c5));const _0x613bfe=await createFeature({'name':_0xf0b2f0,'description':_0x3cb173[_0x147791(0x232)],'checklist':_0x49bb27,'gitRepoUrl':_0x6af99e,'gitBranch':_0x4fda84});await setActiveFeatureId(_0x613bfe['id']),await _0x5980e4['uyGZz'](tryStartCurrentSession,_0x613bfe['id']);const _0x32d59b=process['env']['CLAUDE_SESSION_ID'];_0x32d59b&&registerSession(_0x32d59b,_0x613bfe['id']),console[_0x147791(0x1f0)]('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x613bfe['id']),_0x5980e4['Bzrhq'](displayFeature,_0x613bfe,_0x613bfe['checklistItems']),console['log']('\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review');}export async function featureList(_0x40e88c){const _0x18c221=_0xb6b994,_0x51bc68={'eizfA':function(_0x26a2c7){return _0x26a2c7();},'LyUpB':function(_0x41f3ac,_0x19a614){return _0x41f3ac===_0x19a614;},'jOKTI':function(_0x5e7441,_0xf52736){return _0x5e7441>_0xf52736;},'UPFqA':'\x20--current-branch','fAWUA':_0x18c221(0x1cc)},_0x3438f5={'limit':_0x40e88c['limit']??0xa,'offset':_0x40e88c['offset']??0x0,'includeDeleted':_0x40e88c[_0x18c221(0x2b1)]};_0x40e88c['currentBranch']&&(_0x3438f5['gitRepoUrl']=_0x51bc68[_0x18c221(0x26c)](getGitRepoUrl),_0x3438f5[_0x18c221(0x231)]=_0x51bc68['eizfA'](getGitBranch));const _0x23e646=await listFeatures(_0x3438f5);if(_0x51bc68[_0x18c221(0x247)](_0x23e646['items'][_0x18c221(0x1bd)],0x0)){console['log']('\x0aNo\x20feature\x20reviews\x20found.');return;}const _0x5f7bb0=_0x51bc68[_0x18c221(0x1c2)](_0x23e646[_0x18c221(0x1db)],_0x23e646[_0x18c221(0x242)][_0x18c221(0x1bd)])?_0x18c221(0x1e8)+_0x23e646['items'][_0x18c221(0x1bd)]+_0x18c221(0x22e)+_0x23e646['totalCount']:_0x23e646['totalCount']+_0x18c221(0x20d);console[_0x18c221(0x1f0)]('\x0a'+_0x5f7bb0+':\x0a');for(const _0x3b3bac of _0x23e646[_0x18c221(0x242)]){console['log'](''+_0x3b3bac['name']),console[_0x18c221(0x1f0)]('\x20\x20\x20ID:\x20'+_0x3b3bac['id']),_0x3b3bac[_0x18c221(0x1e5)]&&console[_0x18c221(0x1f0)]('\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x3b3bac[_0x18c221(0x1e5)])),_0x3b3bac['gitBranch']&&console[_0x18c221(0x1f0)](_0x18c221(0x23e)+_0x3b3bac['gitBranch']),console[_0x18c221(0x1f0)](_0x18c221(0x213)+new Date(_0x3b3bac[_0x18c221(0x1fb)])['toLocaleDateString']()),console['log']('');}const _0x33cb6b=_0x3438f5[_0x18c221(0x2a7)]??0xa,_0x2c7579=(_0x3438f5['offset']??0x0)+_0x23e646[_0x18c221(0x242)]['length'];if(_0x2c7579<_0x23e646['totalCount']){const _0x30e926=_0x33cb6b!==0xa?'\x20--limit\x20'+_0x33cb6b:'',_0x1329b0=_0x40e88c[_0x18c221(0x261)]?_0x51bc68[_0x18c221(0x1d0)]:'',_0x51de01=_0x40e88c['includeDeleted']?_0x51bc68['fAWUA']:'';console['log']('Next\x20page:\x20ranger\x20list\x20--offset\x20'+_0x2c7579+_0x30e926+_0x1329b0+_0x51de01);}}export async function featureShow(_0x53f4d4){const _0x7ef92=_0xb6b994,_0x44c0bb={'yQLDF':function(_0x2d45b6){return _0x2d45b6();},'qfyGX':function(_0x331e69,_0x51aad5,_0x4ff620){return _0x331e69(_0x51aad5,_0x4ff620);}},_0x3889bb=_0x53f4d4||await _0x44c0bb['yQLDF'](getActiveFeatureId);if(!_0x3889bb)throw new Error(_0x7ef92(0x1bb));const _0x27090e=await getFeature(_0x3889bb);_0x44c0bb[_0x7ef92(0x246)](displayFeature,_0x27090e,_0x27090e[_0x7ef92(0x2a4)]);}export async function featureResume(_0x2e5b32){const _0x26a554=_0xb6b994,_0x1f3f40={'PcLCG':function(_0x21f249,_0x5ccde6){return _0x21f249(_0x5ccde6);},'UVxKF':function(_0x48049d){return _0x48049d();},'zUIsJ':function(_0x2cd5bb,_0x7eb986){return _0x2cd5bb!==_0x7eb986;},'kOpdu':function(_0x685f5,_0x40f7be,_0x594b17){return _0x685f5(_0x40f7be,_0x594b17);},'FKKBb':function(_0x22bc99,_0x5ddf09,_0x405f38){return _0x22bc99(_0x5ddf09,_0x405f38);},'YERYw':function(_0x38a3f8){return _0x38a3f8();},'qRAxm':function(_0x2f6895,_0x331d31){return _0x2f6895&&_0x331d31;},'ufiUK':function(_0x408fc5,_0xc38690){return _0x408fc5||_0xc38690;},'PnqvI':'any','hvMQF':function(_0x4589dd,_0x3551a0){return _0x4589dd===_0x3551a0;},'LIOOf':'Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','YIosi':_0x26a554(0x29c),'QMhpg':_0x26a554(0x29a),'zLmzO':function(_0x4e55f5,_0x483a99){return _0x4e55f5(_0x483a99);}};if(_0x2e5b32){const _0x58a23f=await _0x1f3f40['PcLCG'](getFeature,_0x2e5b32);await _0x1f3f40[_0x26a554(0x240)](setActiveFeatureId,_0x58a23f['id']);const _0x1782db=_0x1f3f40[_0x26a554(0x282)](getGitBranch);_0x1782db&&_0x1f3f40[_0x26a554(0x1ec)](_0x1782db,_0x58a23f[_0x26a554(0x231)])&&(await _0x1f3f40['kOpdu'](updateFeature,_0x58a23f['id'],{'gitBranch':_0x1782db}),console[_0x26a554(0x1f0)]('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x1782db));console[_0x26a554(0x1f0)]('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x58a23f['name']+'\x20('+_0x58a23f['id']+')'),await _0x1f3f40['PcLCG'](tryStartCurrentSession,_0x58a23f['id']);const _0x213274=process['env']['CLAUDE_SESSION_ID'];_0x213274&&_0x1f3f40[_0x26a554(0x26d)](registerSession,_0x213274,_0x58a23f['id']);_0x1f3f40['kOpdu'](displayFeature,_0x58a23f,_0x58a23f[_0x26a554(0x2a4)]),await printFeedbackNudge(_0x58a23f['id']);return;}const _0x33b485=_0x1f3f40[_0x26a554(0x23b)](getGitRepoUrl),_0x30848d=getGitBranch();if(_0x1f3f40[_0x26a554(0x28a)](!_0x33b485,!_0x30848d))throw new Error(_0x26a554(0x224));console[_0x26a554(0x1f0)](_0x26a554(0x207)+_0x1f3f40[_0x26a554(0x2a1)](_0x33b485,_0x1f3f40[_0x26a554(0x257)])+_0x26a554(0x23d)+_0x1f3f40['ufiUK'](_0x30848d,_0x1f3f40[_0x26a554(0x257)])+_0x26a554(0x233));const _0xd93ed9=await listFeatures({'gitRepoUrl':_0x33b485,'gitBranch':_0x30848d}),_0x17382f=_0xd93ed9['items']['filter'](_0x441ae4=>_0x441ae4['status']?_0x441ae4[_0x26a554(0x270)]!=='verified':!_0x441ae4['completedAt']);if(_0x17382f['length']===0x0){console['log'](_0x26a554(0x239)),console['log']('Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review');return;}let _0x365a6c;if(_0x1f3f40['hvMQF'](_0x17382f['length'],0x1))_0x365a6c=_0x17382f[0x0];else{const _0x305356=process['stdin'][_0x26a554(0x220)]&&process[_0x26a554(0x27a)]['isTTY'];if(!_0x305356){console[_0x26a554(0x1f0)](_0x26a554(0x2ad));for(const _0x575c7d of _0x17382f){console[_0x26a554(0x1f0)]('\x20\x20'+_0x575c7d['name']),console[_0x26a554(0x1f0)]('\x20\x20\x20\x20\x20ID:\x20'+_0x575c7d['id']),_0x575c7d[_0x26a554(0x1e5)]&&console['log'](_0x26a554(0x27d)+_0x1f3f40['PcLCG'](getProgressDisplay,_0x575c7d[_0x26a554(0x1e5)])),_0x575c7d[_0x26a554(0x231)]&&console[_0x26a554(0x1f0)](_0x26a554(0x28b)+_0x575c7d[_0x26a554(0x231)]);}throw new Error(_0x1f3f40[_0x26a554(0x20f)]);}const {selected:_0xf22d9}=await _0x814486[_0x26a554(0x265)]([{'type':_0x1f3f40['YIosi'],'name':_0x1f3f40[_0x26a554(0x29e)],'message':_0x26a554(0x28d),'choices':_0x17382f[_0x26a554(0x23f)](_0x1c373d=>({'name':_0x1c373d['name']+'\x20('+_0x1c373d['id']+')','value':_0x1c373d['id']}))}]);_0x365a6c=_0x17382f['find'](_0x3337bf=>_0x3337bf['id']===_0xf22d9);}await setActiveFeatureId(_0x365a6c['id']);_0x30848d&&_0x30848d!==_0x365a6c[_0x26a554(0x231)]&&(await _0x1f3f40[_0x26a554(0x26d)](updateFeature,_0x365a6c['id'],{'gitBranch':_0x30848d}),console['log'](_0x26a554(0x25e)+_0x30848d));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x365a6c['name']+'\x20('+_0x365a6c['id']+')'),await tryStartCurrentSession(_0x365a6c['id']);const _0x359be1=await _0x1f3f40[_0x26a554(0x22a)](getFeature,_0x365a6c['id']),_0x40d199=process[_0x26a554(0x1fa)][_0x26a554(0x1c9)];_0x40d199&&registerSession(_0x40d199,_0x359be1['id']),displayFeature(_0x359be1,_0x359be1[_0x26a554(0x2a4)]),await _0x1f3f40['PcLCG'](printFeedbackNudge,_0x359be1['id']);}async function printFeedbackNudge(_0x18bf13){const _0x2d2c33=_0xb6b994,_0x1d62bc={'iZDVO':function(_0x3175ec,_0x361b50){return _0x3175ec(_0x361b50);},'hGDNi':function(_0x2efd2d,_0x47e302){return _0x2efd2d>_0x47e302;},'eSBUI':_0x2d2c33(0x259)};try{const {items:_0x2bc089}=await _0x1d62bc[_0x2d2c33(0x25b)](getActionItems,_0x18bf13);let _0x5db95c=0x0,_0x507c6b=0x0;for(const _0xd8f578 of _0x2bc089){const _0x21bf5e=await getItemFeedback(_0x18bf13,_0xd8f578['id']);_0x1d62bc['hGDNi'](_0x21bf5e['unaddressedComments']['length'],0x0)&&(_0x5db95c+=_0x21bf5e['unaddressedComments']['length'],_0x507c6b++);}_0x1d62bc['hGDNi'](_0x5db95c,0x0)&&(console[_0x2d2c33(0x1f0)]('\x0a⚠️\x20\x20'+_0x5db95c+_0x2d2c33(0x1cb)+_0x507c6b+_0x2d2c33(0x2a0)),console[_0x2d2c33(0x1f0)](_0x1d62bc[_0x2d2c33(0x26e)]));}catch{}}async function tryStartCurrentSession(_0xfca693){const _0x8c4c11=_0xb6b994,_0x33e129={'vGBkp':function(_0x23240a,_0x1bc310){return _0x23240a(_0x1bc310);}};try{const {sessions:_0x2824c}=await _0x33e129['vGBkp'](listFeatureSessions,_0xfca693),_0x24010e=_0x2824c[_0x8c4c11(0x277)](_0x11d03b=>_0x11d03b[_0x8c4c11(0x270)]==='ready');_0x24010e&&(await startSession(_0xfca693,_0x24010e['id']),console['log'](_0x8c4c11(0x212)+_0x24010e[_0x8c4c11(0x263)]));}catch{}}export async function featureReport(_0x4b1100,_0x5a06a1){const _0x2e7606=_0xb6b994,_0x549826={'umhkE':_0x2e7606(0x273),'yWzIY':'reports','CfTUT':function(_0x1b65a8,_0x4a9f0c,_0x1ecc29){return _0x1b65a8(_0x4a9f0c,_0x1ecc29);},'vmDWe':function(_0xa7cf07,_0x4870c9,_0x3abd36,_0x4ee858){return _0xa7cf07(_0x4870c9,_0x3abd36,_0x4ee858);},'wYjdp':'utf-8'},_0x733555=_0x4b1100||await getActiveFeatureId();if(!_0x733555)throw new Error(_0x549826[_0x2e7606(0x23a)]);console['log'](_0x2e7606(0x203));const _0x1fec69=await getFeatureReportMarkdown(_0x733555,{'style':_0x5a06a1['style']}),_0x3e259c=_0x5a06a1[_0x2e7606(0x25a)]||join(getRangerDir(),_0x549826[_0x2e7606(0x21a)],_0x733555+_0x2e7606(0x1de)),_0x3c36dd=join(_0x3e259c,'..');!existsSync(_0x3c36dd)&&await _0x549826[_0x2e7606(0x281)](mkdir,_0x3c36dd,{'recursive':!![]}),await _0x549826[_0x2e7606(0x1d5)](writeFile,_0x3e259c,_0x1fec69,_0x549826['wYjdp']),console[_0x2e7606(0x1f0)](_0x2e7606(0x251)+_0x3e259c);}function getScenarioResult(_0x475cef){const _0x38197e=_0xb6b994,_0xc5da83={'OPIgj':function(_0x480a90,_0x39de1c){return _0x480a90===_0x39de1c;},'noQhx':_0x38197e(0x1d9)};if(_0xc5da83['OPIgj'](_0x475cef['status'],_0x38197e(0x1c6)))return _0x475cef['terminalReason']??'closed';if(_0xc5da83[_0x38197e(0x266)](_0x475cef[_0x38197e(0x270)],_0xc5da83['noQhx']))return _0x38197e(0x201);return _0x475cef[_0x38197e(0x270)];}function getScenarioRationale(_0x2047a7,_0x70f27c){const _0x5efcd5=_0xb6b994,_0x1f0db7={'UfwIC':_0x5efcd5(0x255)},_0x2a072a=_0x1f0db7[_0x5efcd5(0x285)]['split']('|');let _0x2794ae=0x0;while(!![]){switch(_0x2a072a[_0x2794ae++]){case'0':if(_0x2047a7[_0x5efcd5(0x290)])return _0x2047a7['canceledReason'];continue;case'1':if(_0x2047a7[_0x5efcd5(0x288)])return _0x2047a7['blockedReason'];continue;case'2':if(_0x2047a7['incompleteReason'])return _0x2047a7[_0x5efcd5(0x21c)];continue;case'3':if(_0x2047a7['notes'])return _0x2047a7['notes'];continue;case'4':if(_0x70f27c)return _0x70f27c;continue;case'5':return null;}break;}}export async function featureReportPrDescription(_0xa3b920,_0x1cd3d5){const _0x137e23=_0xb6b994,_0x32294f={'QeJvC':function(_0x28dabe){return _0x28dabe();},'eFSLK':_0x137e23(0x273),'oPgkA':function(_0x320238,_0x4b13a9,_0x3b5a53){return _0x320238(_0x4b13a9,_0x3b5a53);},'HzHWz':function(_0x501c82,_0x5ca2b9){return _0x501c82===_0x5ca2b9;},'xMhLh':function(_0x4f2e33,_0x21fad6){return _0x4f2e33>_0x21fad6;},'Dfmiz':_0x137e23(0x295),'BbcRJ':function(_0x258395,_0x28b004){return _0x258395+_0x28b004;},'CAvoN':_0x137e23(0x1f8),'wooOQ':function(_0x2af08e,_0x5aa720,_0x16aed6,_0x2482cb){return _0x2af08e(_0x5aa720,_0x16aed6,_0x2482cb);}},_0x182a4b=_0xa3b920||await _0x32294f[_0x137e23(0x275)](getActiveFeatureId);if(!_0x182a4b)throw new Error(_0x32294f[_0x137e23(0x1e2)]);const _0x1f2c85=await getFeature(_0x182a4b),_0xeb071d=_0x1f2c85[_0x137e23(0x2a4)]||[],_0x31861d=_0x32294f[_0x137e23(0x1eb)](getCurrentSessionItems,_0x1f2c85,_0xeb071d);_0x32294f[_0x137e23(0x2a5)](_0x31861d['length'],0x0)&&(console['error'](_0x137e23(0x1f4)),process['exit'](0x1));const _0x30749b=_0x1cd3d5[_0x137e23(0x1ff)]??[],_0x4fdeda=_0x30749b[_0x137e23(0x1e7)](_0x382652=>!Number[_0x137e23(0x1d3)](_0x382652)||_0x382652<0x1||_0x382652>_0x31861d[_0x137e23(0x1bd)]);if(_0x32294f[_0x137e23(0x21b)](_0x4fdeda[_0x137e23(0x1bd)],0x0)){console['error'](_0x137e23(0x221)+_0x4fdeda[_0x137e23(0x25f)](',\x20')),console['log'](_0x32294f['Dfmiz']);for(let _0x40e50f=0x0;_0x40e50f<_0x31861d[_0x137e23(0x1bd)];_0x40e50f++){console[_0x137e23(0x1f0)]('\x20\x20'+_0x32294f[_0x137e23(0x262)](_0x40e50f,0x1)+'.\x20'+_0x31861d[_0x40e50f]['description']);}process['exit'](0x1);}const _0x4281d4=new Set(_0x30749b[_0x137e23(0x23f)](_0x274b94=>_0x274b94-0x1)),_0x167ec0=_0x31861d['filter']((_0x933166,_0x5930a9)=>!_0x4281d4['has'](_0x5930a9));_0x32294f['HzHWz'](_0x167ec0['length'],0x0)&&(console[_0x137e23(0x216)](_0x32294f[_0x137e23(0x218)]),process[_0x137e23(0x271)](0x1));if(_0x1cd3d5['json'])await _0x32294f['wooOQ'](outputJsonReport,_0x182a4b,_0x1f2c85,_0x167ec0);else{const _0x4232d5=await _0x32294f[_0x137e23(0x1eb)](getFeatureReportMarkdown,_0x182a4b,{'itemIds':_0x167ec0['map'](_0x32c817=>_0x32c817['id'])});process['stdout']['write'](_0x4232d5[_0x137e23(0x249)]()+'\x0a');}}async function outputJsonReport(_0x11033a,_0x4803f8,_0x5436eb){const _0x14134d=_0xb6b994,_0x1ef1bd={'Ilbse':function(_0x420435,_0x41aa61){return _0x420435(_0x41aa61);},'sLtSP':function(_0x1f590c,_0x956370){return _0x1f590c>_0x956370;},'KBMhK':function(_0x455cd7,_0x4d6bf3){return _0x455cd7===_0x4d6bf3;},'QBRcE':function(_0x29231a,_0x3b81e9){return _0x29231a(_0x3b81e9);},'CrvfQ':function(_0x572b48,_0x50c1bd,_0x1a3245){return _0x572b48(_0x50c1bd,_0x1a3245);},'nWRjn':function(_0x296e98){return _0x296e98();},'bvVNU':function(_0x1b657e,_0x448e30){return _0x1b657e+_0x448e30;}},_0x507c3f=_0x1ef1bd['nWRjn'](getApiBaseUrl),_0x30854f=await getFeatureReport(_0x11033a),_0x94ebc3=new Map(_0x30854f['checklistItems'][_0x14134d(0x23f)](_0xb86ca0=>[_0xb86ca0['id'],_0xb86ca0])),_0x4efcc1=await Promise['all'](_0x5436eb[_0x14134d(0x23f)](async _0x54fbd3=>{const _0x46e64b=_0x14134d,_0x559310=_0x94ebc3['get'](_0x54fbd3['id']),_0x1e3c4e=_0x559310?.['linkedSession']??null;let _0x4fdb9e=[];if(_0x54fbd3['browserSessionId'])try{const {steps:_0x15b6ca}=await _0x1ef1bd['Ilbse'](getBrowserSessionSteps,_0x54fbd3[_0x46e64b(0x1c8)]);_0x1ef1bd[_0x46e64b(0x1d6)](_0x15b6ca['length'],0x0)&&(_0x4fdb9e=_0x15b6ca['map'](_0x71959c=>{const _0x2f21e7=_0x46e64b,_0x2c08c8=_0x71959c['assets'][_0x2f21e7(0x277)](_0x354e37=>_0x354e37[_0x2f21e7(0x26b)]==='screenshot'&&_0x354e37['timing']===_0x2f21e7(0x267))??_0x71959c[_0x2f21e7(0x292)][_0x2f21e7(0x277)](_0x25a75a=>_0x25a75a['assetType']==='screenshot');let _0x3034d0=null,_0x3fd945=null;if(_0x2c08c8){const _0x585a47=_0x2c08c8['storage'][_0x2f21e7(0x26a)]['split']('/')['pop']();_0x3034d0=_0x507c3f+_0x2f21e7(0x235)+_0x54fbd3[_0x2f21e7(0x1c8)]+_0x2f21e7(0x236)+_0x585a47,_0x585a47&&(_0x3fd945=_0x585a47[_0x2f21e7(0x287)](/\.\w+$/,'')['replace'](/^(key_)?\d+_/,'')[_0x2f21e7(0x287)](/[-_]/g,'\x20'));}return{'description':_0x3fd945||_0x71959c['description']||_0x71959c[_0x2f21e7(0x1ee)]||_0x2f21e7(0x27b)+_0x71959c['position'],'screenshot':_0x3034d0,'is_key_step':_0x71959c[_0x2f21e7(0x211)]};}));}catch{}return _0x1ef1bd[_0x46e64b(0x253)](_0x4fdb9e['length'],0x0)&&_0x1e3c4e?.['screenshotUrls']&&(_0x4fdb9e=_0x1e3c4e[_0x46e64b(0x2ab)][_0x46e64b(0x23f)]((_0x57df4a,_0x289401)=>({'description':'Screenshot\x20'+(_0x289401+0x1),'screenshot':_0x57df4a,'is_key_step':![]}))),{'description':_0x54fbd3['description'],'result':_0x1ef1bd['QBRcE'](getScenarioResult,_0x54fbd3),'rationale':_0x1ef1bd['CrvfQ'](getScenarioRationale,_0x54fbd3,_0x1e3c4e?.['agentResponse']),'steps':_0x4fdb9e};})),_0x4cbab6={'url':_0x4803f8[_0x14134d(0x205)],'scenarios':_0x4efcc1};process[_0x14134d(0x27a)][_0x14134d(0x206)](_0x1ef1bd['bvVNU'](JSON[_0x14134d(0x1e3)](_0x4cbab6,null,0x2),'\x0a'));}function _0x3a40(_0x45cb12,_0x336545){_0x45cb12=_0x45cb12-0x1bb;const _0x4b9beb=_0x4b9b();let _0x3a40cb=_0x4b9beb[_0x45cb12];return _0x3a40cb;}export async function featureConcludeSession(_0x2c8053){const _0x4dda95=_0xb6b994,_0x5e0f0f={'gYGuM':function(_0x22460b){return _0x22460b();},'RJcQk':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','EtSLQ':_0x4dda95(0x227),'QiyzR':function(_0x2bf986,_0x406025){return _0x2bf986===_0x406025;},'btmJu':_0x4dda95(0x294),'EJhki':function(_0x53f7ef,_0x323bbd){return _0x53f7ef!==_0x323bbd;},'gZENg':function(_0xb59fa4,_0x2cba64,_0x5ac63d){return _0xb59fa4(_0x2cba64,_0x5ac63d);}},_0x3eecc2=_0x2c8053||await _0x5e0f0f['gYGuM'](getActiveFeatureId);if(!_0x3eecc2)throw new Error(_0x5e0f0f[_0x4dda95(0x20a)]);const _0x124119=await getFeature(_0x3eecc2);if(!_0x124119[_0x4dda95(0x291)])throw new Error('No\x20active\x20session\x20for\x20this\x20feature\x20review.');const {sessions:_0x3caf8d}=await listFeatureSessions(_0x3eecc2),_0x3bf68f=_0x3caf8d['find'](_0x3552e9=>_0x3552e9['id']===_0x124119[_0x4dda95(0x291)]);if(!_0x3bf68f)throw new Error(_0x5e0f0f['EtSLQ']);if(_0x5e0f0f[_0x4dda95(0x217)](_0x3bf68f['status'],'completed')){console['log'](_0x5e0f0f[_0x4dda95(0x2a2)]);return;}if(_0x5e0f0f['EJhki'](_0x3bf68f['status'],'in_progress'))throw new Error(_0x4dda95(0x296)+_0x3bf68f[_0x4dda95(0x270)]);console['log']('\x0aConcluding\x20session...'),await _0x5e0f0f[_0x4dda95(0x250)](concludeSession,_0x3eecc2,_0x124119[_0x4dda95(0x291)]),console['log'](_0x4dda95(0x278)+_0x3bf68f['iteration']+_0x4dda95(0x25c)),console['log']('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x32f305){const _0x33bebb=_0xb6b994,_0x141f28={'VPhYO':_0x33bebb(0x273),'EhDwD':function(_0x10abea,_0x54a53d){return _0x10abea(_0x54a53d);},'ZyjJH':_0x33bebb(0x204),'imDIF':_0x33bebb(0x276)},_0x17b784=_0x32f305||await getActiveFeatureId();if(!_0x17b784)throw new Error(_0x141f28[_0x33bebb(0x1fe)]);const _0x336e9c=await _0x141f28[_0x33bebb(0x226)](getFeature,_0x17b784);console['log']('\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20'+_0x336e9c[_0x33bebb(0x222)]+'\x0a');const {sessions:_0x5a5cbe}=await _0x141f28['EhDwD'](listFeatureSessions,_0x17b784);if(_0x5a5cbe['length']===0x0){console['log'](_0x141f28[_0x33bebb(0x258)]);return;}for(const _0x37257e of _0x5a5cbe){const _0x2f0563=_0x37257e[_0x33bebb(0x270)]===_0x141f28[_0x33bebb(0x254)]?'✅':_0x37257e[_0x33bebb(0x270)]===_0x33bebb(0x201)?'🔄':'▶️';console[_0x33bebb(0x1f0)](_0x2f0563+_0x33bebb(0x29b)+_0x37257e['iteration']+'\x20('+_0x37257e['id']+')'),console[_0x33bebb(0x1f0)](_0x33bebb(0x2aa)+_0x37257e[_0x33bebb(0x270)]),console[_0x33bebb(0x1f0)](_0x33bebb(0x213)+new Date(_0x37257e[_0x33bebb(0x1fb)])[_0x33bebb(0x24c)]()),_0x37257e[_0x33bebb(0x260)]&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x37257e[_0x33bebb(0x260)])[_0x33bebb(0x24c)]()),console[_0x33bebb(0x1f0)]('');}}export async function featureAddScenario(_0x2c06e4,_0x5554b4){const _0x2b1fa5=_0xb6b994,_0x1b16eb={'Cdwlo':function(_0x4ac68b,_0x2eec38,_0x76b9c8){return _0x4ac68b(_0x2eec38,_0x76b9c8);},'UrcZA':function(_0x2eccec,_0x6edaf,_0x3f2e96){return _0x2eccec(_0x6edaf,_0x3f2e96);}},_0x106c06=_0x5554b4||await getActiveFeatureId();if(!_0x106c06)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x53d225=await getFeature(_0x106c06);if(_0x53d225[_0x2b1fa5(0x299)]&&!_0x53d225['latestReview'][_0x2b1fa5(0x1fd)])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x53d225[_0x2b1fa5(0x205)]);await _0x1b16eb['Cdwlo'](createChecklistItem,_0x106c06,_0x2c06e4);const _0x41852f=await getFeature(_0x106c06);console[_0x2b1fa5(0x1f0)]('\x0a✅\x20Scenario\x20added'),_0x1b16eb[_0x2b1fa5(0x289)](displayFeature,_0x41852f,_0x41852f['checklistItems']);}export async function featureEditScenario(_0x2b8eaa,_0x1a5113){const _0x2a4dd7=_0xb6b994,_0x42dfb9={'XDdIP':'\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','QRscJ':function(_0x59e70d,_0x5d202b){return _0x59e70d(_0x5d202b);},'jobPT':'\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','LNPbq':'Please\x20finish\x20your\x20review\x20first:','mXcnw':function(_0x3f8746,_0x2c7ad9){return _0x3f8746===_0x2c7ad9;},'hLrPP':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','oPigy':'\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','IXULi':function(_0x403bf1,_0x44133c){return _0x403bf1+_0x44133c;},'yjjqU':function(_0x2dafb6,_0x205fe2){return _0x2dafb6-_0x205fe2;},'WFPpU':function(_0x52dcc0,_0x560f76){return _0x52dcc0<_0x560f76;},'UNwxg':function(_0x337941,_0x518f07){return _0x337941>=_0x518f07;},'HKeqG':function(_0x429f14,_0x1862a3,_0x57c6a5,_0x4e91d8){return _0x429f14(_0x1862a3,_0x57c6a5,_0x4e91d8);},'Fjmzu':function(_0x5e07c1,_0x4ff67b,_0x2e176b){return _0x5e07c1(_0x4ff67b,_0x2e176b);}},_0x59e324=_0x1a5113['id']||await getActiveFeatureId();!_0x59e324&&(console[_0x2a4dd7(0x216)](_0x42dfb9[_0x2a4dd7(0x1bc)]),console['error'](_0x2a4dd7(0x243)),process['exit'](0x1));const _0x1daedf=await _0x42dfb9['QRscJ'](getFeature,_0x59e324);_0x1daedf[_0x2a4dd7(0x299)]&&!_0x1daedf['latestReview'][_0x2a4dd7(0x1fd)]&&(console[_0x2a4dd7(0x216)](_0x42dfb9['jobPT']),console[_0x2a4dd7(0x216)](_0x42dfb9['LNPbq']),console[_0x2a4dd7(0x216)]('\x20\x20'+_0x1daedf['dashboardUrl']),process[_0x2a4dd7(0x271)](0x1));const _0x3345a3=_0x1daedf[_0x2a4dd7(0x2a4)]||[];_0x42dfb9['mXcnw'](_0x3345a3['length'],0x0)&&(console['error'](_0x42dfb9['hLrPP']),process[_0x2a4dd7(0x271)](0x1));if(_0x42dfb9[_0x2a4dd7(0x1e4)](_0x1a5113['scenario'],undefined)){console[_0x2a4dd7(0x216)](_0x42dfb9[_0x2a4dd7(0x2af)]),console[_0x2a4dd7(0x1f0)]('\x0aAvailable\x20scenarios:');for(let _0x43083c=0x0;_0x43083c<_0x3345a3['length'];_0x43083c++){console['log']('\x20\x20'+_0x42dfb9[_0x2a4dd7(0x237)](_0x43083c,0x1)+'.\x20'+_0x3345a3[_0x43083c]['description']);}process[_0x2a4dd7(0x271)](0x1);}const _0x38fb3e=_0x42dfb9[_0x2a4dd7(0x245)](_0x1a5113[_0x2a4dd7(0x1fc)],0x1);if(_0x42dfb9[_0x2a4dd7(0x256)](_0x38fb3e,0x0)||_0x42dfb9['UNwxg'](_0x38fb3e,_0x3345a3['length'])){console['error'](_0x2a4dd7(0x21d)+_0x1a5113['scenario']+'.\x20Feature\x20review\x20has\x20'+_0x3345a3[_0x2a4dd7(0x1bd)]+'\x20scenarios.'),console['log']('\x0aAvailable\x20scenarios:');for(let _0x1bbcb3=0x0;_0x1bbcb3<_0x3345a3[_0x2a4dd7(0x1bd)];_0x1bbcb3++){console['log']('\x20\x20'+_0x42dfb9[_0x2a4dd7(0x237)](_0x1bbcb3,0x1)+'.\x20'+_0x3345a3[_0x1bbcb3]['description']);}process[_0x2a4dd7(0x271)](0x1);}const _0x241fb6=_0x3345a3[_0x38fb3e];await _0x42dfb9[_0x2a4dd7(0x21e)](updateChecklistItem,_0x59e324,_0x241fb6['id'],{'description':_0x2b8eaa});const _0x366e0e=await _0x42dfb9['QRscJ'](getFeature,_0x59e324);console[_0x2a4dd7(0x1f0)](_0x2a4dd7(0x2a9)),_0x42dfb9[_0x2a4dd7(0x1e6)](displayFeature,_0x366e0e,_0x366e0e[_0x2a4dd7(0x2a4)]);}async function downloadFeedbackImage(_0x239aa0,_0x1c73db){const _0x5a3146=_0xb6b994,_0x23c31f={'jIgIx':'feedback-images'};try{const _0xf8b5c3=join(getRangerDir(),_0x23c31f[_0x5a3146(0x1da)]);await mkdir(_0xf8b5c3,{'recursive':!![]});const _0xa1e7c7=join(_0xf8b5c3,_0x5a3146(0x234)+_0x1c73db+'.png'),_0x2277b0=await fetch(_0x239aa0);if(!_0x2277b0['ok'])return null;const _0x373be5=Buffer['from'](await _0x2277b0['arrayBuffer']());return await writeFile(_0xa1e7c7,_0x373be5),_0xa1e7c7;}catch{return null;}}export async function featureGetReview(_0x336715){const _0x47cf30=_0xb6b994,_0x4fb357={'RENeS':function(_0x4e56ea,_0x164136,_0x3ac06c){return _0x4e56ea(_0x164136,_0x3ac06c);},'Jrxro':function(_0x1a605d,_0x165af9){return _0x1a605d>_0x165af9;},'TvRzg':function(_0x3f7455,_0x51f831){return _0x3f7455+_0x51f831;},'uVVgC':'en-US','phQTF':'Unknown','mUuGE':function(_0x3cf866,_0x2ac3d){return _0x3cf866+_0x2ac3d;}},_0x32da25=_0x336715||await getActiveFeatureId();if(!_0x32da25)throw new Error(_0x47cf30(0x1bb));const _0x1b734f=await getFeature(_0x32da25),{items:_0x4a1185}=await getActionItems(_0x32da25);console['log'](_0x47cf30(0x284)+_0x1b734f['name']+'\x20('+_0x1b734f['id']+')\x0a');if(_0x4a1185['length']===0x0){console['log'](_0x47cf30(0x1f2));return;}for(let _0x30dbe2=0x0;_0x30dbe2<_0x4a1185['length'];_0x30dbe2++){const _0x330eb9=_0x4a1185[_0x30dbe2],_0x5a5b33=_0x330eb9[_0x47cf30(0x286)]>0x1?_0x47cf30(0x1cd)+_0x330eb9['version']+')':'',_0x2642b5=await _0x4fb357[_0x47cf30(0x202)](getItemFeedback,_0x32da25,_0x330eb9['id']);if(_0x4fb357['Jrxro'](_0x2642b5['unaddressedComments'][_0x47cf30(0x1bd)],0x0)){console[_0x47cf30(0x1f0)](_0x47cf30(0x225)+_0x4fb357[_0x47cf30(0x1d2)](_0x30dbe2,0x1)+':\x20\x22'+_0x330eb9['description']+'\x22'+_0x5a5b33+_0x47cf30(0x214)+_0x2642b5['unaddressedComments']['length']+_0x47cf30(0x29d));for(const _0x3981f8 of _0x2642b5['unaddressedComments']){const _0x44e210=new Date(_0x3981f8[_0x47cf30(0x1fb)])[_0x47cf30(0x208)](_0x4fb357['uVVgC'],{'month':'short','day':_0x47cf30(0x210)}),_0x21871a=_0x3981f8['authorName']||_0x3981f8['authorEmail']||_0x4fb357[_0x47cf30(0x1f1)];console['log']('\x20\x20💬\x20'+_0x21871a+'\x20('+_0x44e210+'):\x20\x22'+_0x3981f8['content']+'\x22');if(_0x3981f8['assetUrl']){const _0x8749d5=await downloadFeedbackImage(_0x3981f8['assetUrl'],_0x3981f8['id']);_0x8749d5&&console['log'](_0x47cf30(0x1cf)+_0x8749d5);}if(_0x3981f8['domRef']){const _0x1abdac=_0x3981f8[_0x47cf30(0x298)][_0x47cf30(0x1c3)]['split'](_0x47cf30(0x1d7))['pop']()?.['split'](':')[0x0]||_0x47cf30(0x21f),_0x4c937a=_0x3981f8['domRef'][_0x47cf30(0x24f)]?'\x20\x22'+_0x3981f8[_0x47cf30(0x298)][_0x47cf30(0x24f)]['slice'](0x0,0x3c)+'\x22':'';console[_0x47cf30(0x1f0)](_0x47cf30(0x20b)+_0x1abdac+'>'+_0x4c937a),console['log'](_0x47cf30(0x219)+_0x3981f8['domRef']['selector']);}else{if(_0x3981f8['spatial']){const _0x4d1e1b=_0x3981f8[_0x47cf30(0x1dd)][_0x47cf30(0x209)];_0x3981f8[_0x47cf30(0x1dd)]['type']==='point'&&_0x4d1e1b['length']>=0x2?console['log'](_0x47cf30(0x22d)+_0x4d1e1b[0x0][_0x47cf30(0x1f6)](0x2)+',\x20'+_0x4d1e1b[0x1]['toFixed'](0x2)+')'):console['log'](_0x47cf30(0x28c)+_0x3981f8[_0x47cf30(0x1dd)]['type']+'\x20at\x20['+_0x4d1e1b[_0x47cf30(0x23f)](_0x43e507=>_0x43e507['toFixed'](0x2))[_0x47cf30(0x25f)](',\x20')+']');}}}if(_0x2642b5[_0x47cf30(0x2a8)]){console['log']('\x20\x20Expected\x20flow:');for(const _0x13190d of _0x2642b5['canonicalFlow']['split']('\x0a')){console[_0x47cf30(0x1f0)]('\x20\x20\x20\x20'+_0x13190d);}}}else console[_0x47cf30(0x1f0)]('Scenario\x20'+_0x4fb357['mUuGE'](_0x30dbe2,0x1)+_0x47cf30(0x228)+_0x330eb9[_0x47cf30(0x232)]+'\x22'+_0x5a5b33+_0x47cf30(0x24a)),console[_0x47cf30(0x1f0)](_0x47cf30(0x2b0));console[_0x47cf30(0x1f0)]('');}}export async function featureDelete(_0x33152d){const _0x320f34=_0xb6b994,_0x1597d4={'WTDJc':function(_0x545fc2){return _0x545fc2();},'iiRpV':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','LJMeC':function(_0x180dbb,_0x2c9286){return _0x180dbb(_0x2c9286);}},_0x5ba6c1=_0x33152d||await _0x1597d4[_0x320f34(0x27e)](getActiveFeatureId);if(!_0x5ba6c1)throw new Error(_0x1597d4[_0x320f34(0x1ed)]);const _0x588c32=await _0x1597d4[_0x320f34(0x1dc)](getFeature,_0x5ba6c1);await _0x1597d4[_0x320f34(0x1dc)](softDeleteFeature,_0x5ba6c1),console[_0x320f34(0x1f0)](_0x320f34(0x27c)+_0x588c32[_0x320f34(0x222)]+'\x20('+_0x5ba6c1+')'),console[_0x320f34(0x1f0)]('\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20'+_0x5ba6c1);}export async function featureRestore(_0x3a46d0){const _0x585c71=_0xb6b994,_0x4ece80={'mqUjM':function(_0x495bdb,_0x5b1c0c){return _0x495bdb(_0x5b1c0c);},'xyvjt':function(_0x2b3588,_0x56e465,_0x30cf56){return _0x2b3588(_0x56e465,_0x30cf56);}};await _0x4ece80['mqUjM'](restoreFeature,_0x3a46d0);const _0x122f83=await getFeature(_0x3a46d0);console['log'](_0x585c71(0x269)+_0x122f83[_0x585c71(0x222)]+'\x20('+_0x3a46d0+')'),_0x4ece80[_0x585c71(0x1e9)](displayFeature,_0x122f83,_0x122f83[_0x585c71(0x2a4)]);}