@ranger-testing/ranger-cli 3.1.6-alpha.aca5f9c-53 → 3.1.7-alpha.62f152a-54

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 (86) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.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 -1
  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 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  71. package/build/commands/utils/sessionCache.js +1 -1
  72. package/build/commands/utils/settings.js +1 -1
  73. package/build/commands/utils/skillContent.js +1 -1
  74. package/build/commands/utils/skills.js +1 -1
  75. package/build/commands/utils/stitchWebmFiles.js +1 -1
  76. package/build/commands/utils/telemetry.js +1 -1
  77. package/build/commands/utils/tokenRefresh.js +1 -1
  78. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  79. package/build/commands/utils/tunnelClient.js +1 -1
  80. package/build/commands/utils/userApi.js +1 -1
  81. package/build/commands/utils/version.js +1 -1
  82. package/build/commands/verifyFeature.js +1 -1
  83. package/build/commands/verifyFeatureCli.js +1 -1
  84. package/build/commands/verifyFeatureNovaCli.js +1 -1
  85. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  86. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0xe4ce29,_0x3d7cf3){const _0xa3da43=_0x2836,_0x475f0a=_0xe4ce29();while(!![]){try{const _0x144c88=parseInt(_0xa3da43(0x1c3))/0x1*(parseInt(_0xa3da43(0x212))/0x2)+parseInt(_0xa3da43(0x1e9))/0x3+parseInt(_0xa3da43(0x1fe))/0x4+parseInt(_0xa3da43(0x1d6))/0x5+parseInt(_0xa3da43(0x22a))/0x6*(-parseInt(_0xa3da43(0x21f))/0x7)+-parseInt(_0xa3da43(0x1bb))/0x8+-parseInt(_0xa3da43(0x235))/0x9;if(_0x144c88===_0x3d7cf3)break;else _0x475f0a['push'](_0x475f0a['shift']());}catch(_0x12359d){_0x475f0a['push'](_0x475f0a['shift']());}}}(_0x1a7b,0xf1c22));import{readdir,rm}from'fs/promises';function _0x2836(_0x35f9fc,_0x5a6160){_0x35f9fc=_0x35f9fc-0x1ac;const _0x1a7bc2=_0x1a7b();let _0x2836ea=_0x1a7bc2[_0x35f9fc];return _0x2836ea;}import{join}from'path';import{existsSync}from'fs';import _0x2b71a3 from'inquirer';function _0x1a7b(){const _0x4413df=['AFaIS','list','retry','TrHlR','log','DlRZh','yTxyZ','HEAD','name','6054388VVbbXu','xqbUp','profile.add.autoRouted','input','DeVfr','\x20\x20Did\x20you\x20mean\x20','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','prompt','trackPhaseEnd','\x0a✓\x20Profile\x20\x27','ERkpX','error','✓\x20Profile\x20\x27','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','lajQo','some','Found\x20auth\x20environment\x20\x27','isTTY','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','YIxyV','50822SArXNS','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','profile.add.autoRouteSkipped','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','url','TypeError','SSGEk','cdpEndpoint','startsWith','http://','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','pwfCf','42fBGeXF','ZmMvG','test','\x20--url\x20','QTdrF','JFivS','khMGp','\x0a\x20\x20Auth\x20environment\x20\x22','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','TzoMP','exit','911622GQikwB','ixoPh','VJYlH','RAnEi','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','yes','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','Use\x20','XRmUP','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','\x20Configured\x20envs:\x20','14320134njbmsn','XSNhz','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','baseUrl','\x27\x20to\x20the\x20cloud?','\x27\x20matching\x20','isElectron','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','message','\x22:\x20','boTnm','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','\x27\x20created\x20(no\x20session).\x0a','egKqa','no_auth_config','\x20--skip-auth\x0a','skipAuth','indexOf','\x27\x20created.\x0a','7055544MDwAJd','status','beREe','hUeCB','trim','BKmsG','xDRBN','zTsai','69WQZgGY','\x0a🌐\x20Profile\x20Setup\x0a','stdout','kEilj','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','DZarU','isProtocolError','✓\x20Cloud\x20profile\x20\x27','KWEAc','gDhkw','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','cwd','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','no_match','\x20\x20Set\x20active\x20profile:\x20','2917980urbejO','Continue\x20anyway','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','keys','env_not_found','Ryljw','setupHeader','length','authEnv','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','environments','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x20\x20https://docs.ranger.net/main/concepts/profiles','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','fetch\x20failed','YAZOo','rbjYD','1573143qIkxBo','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','includes','saveToCloud','setupHeaders','EZePF','origin','action','force','What\x20would\x20you\x20like\x20to\x20do?','join','http://localhost:3000'];_0x1a7b=function(){return _0x4413df;};return _0x1a7b();}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';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x299297=_0x2836;if(!process[_0x299297(0x1c5)][_0x299297(0x20f)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x529afd){const _0x12a9a1=_0x2836,_0x5585ef={'tQwDO':function(_0xd0565c,_0x41a45d){return _0xd0565c<_0x41a45d;},'TrHlR':function(_0x441b57,_0xcfbb12){return _0x441b57===_0xcfbb12;},'KWEAc':_0x12a9a1(0x218),'qgxmu':_0x12a9a1(0x1e6)};try{const _0xe5a2c8=new AbortController(),_0x59bfa5=setTimeout(()=>_0xe5a2c8['abort'](),0x1388),_0x5592bc={'method':_0x12a9a1(0x1fc),'signal':_0xe5a2c8['signal'],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i['test'](_0x529afd)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x3b918a=await fetch(_0x529afd,_0x5592bc);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x59bfa5);if(_0x5585ef['tQwDO'](_0x3b918a[_0x12a9a1(0x1bc)],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x3b918a[_0x12a9a1(0x1bc)]};}catch(_0x198b15){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x4e8a04=_0x198b15,_0xabd8b4=_0x4e8a04['message']||String(_0x198b15),_0x1d0e36=_0xabd8b4['includes']('Invalid\x20URL')||_0x5585ef[_0x12a9a1(0x1f8)](_0x4e8a04[_0x12a9a1(0x1fd)],_0x5585ef[_0x12a9a1(0x1cd)])||_0xabd8b4[_0x12a9a1(0x1eb)](_0x5585ef['qgxmu']);return{'ok':![],'error':_0xabd8b4,'isProtocolError':_0x1d0e36};}}async function sweepOrphanLocalProfile(_0x17939c,_0x1c4f04,_0x34d8ae){const _0x13bad1=_0x2836,_0x288f01={'AYehI':function(_0xf57b5a,_0x53f042){return _0xf57b5a(_0x53f042);},'boTnm':function(_0x985d73,_0x3c4d8a,_0x1ed60f){return _0x985d73(_0x3c4d8a,_0x1ed60f);}},_0x9fcfd0=join(_0x1c4f04,'local'),_0x311a1d=join(_0x9fcfd0,_0x17939c);existsSync(_0x311a1d)&&(_0x34d8ae&&await isPathGitTracked(_0x311a1d)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x311a1d+_0x13bad1(0x21d)):(await rm(_0x311a1d,{'recursive':!![],'force':!![]}),console[_0x13bad1(0x1f9)](_0x13bad1(0x1e3)+_0x311a1d)));if(existsSync(_0x9fcfd0)){let _0x7eea84=[];try{_0x7eea84=await _0x288f01['AYehI'](readdir,_0x9fcfd0);}catch{return;}const _0xe059c0='.tmp-'+_0x17939c+'-';for(const _0x454ad9 of _0x7eea84){if(!_0x454ad9[_0x13bad1(0x21b)](_0xe059c0))continue;const _0x82f2e0=join(_0x9fcfd0,_0x454ad9);await _0x288f01[_0x13bad1(0x1b2)](rm,_0x82f2e0,{'recursive':!![],'force':!![]}),console['log'](_0x13bad1(0x1e3)+_0x82f2e0);}}}async function sweepOrphansBestEffort(_0x45bf32){const _0x36ee55=_0x2836,_0xa8178={'DVtKr':function(_0x3c8c29,_0x4c4a4e,_0x526e86,_0x407195){return _0x3c8c29(_0x4c4a4e,_0x526e86,_0x407195);},'UBRke':function(_0x3fa05f){return _0x3fa05f();},'GlMqZ':function(_0x2f64f0){return _0x2f64f0();},'JFivS':function(_0x3e962d,_0x498bf8,_0x1faaeb,_0x31ced9){return _0x3e962d(_0x498bf8,_0x1faaeb,_0x31ced9);},'kEilj':function(_0x502815,_0x1a0d8a){return _0x502815 instanceof _0x1a0d8a;}};try{await _0xa8178['DVtKr'](sweepOrphanLocalProfile,_0x45bf32,_0xa8178['UBRke'](getRangerHomeDir),![]);const _0x25c294=_0xa8178['GlMqZ'](getRangerDir);_0x25c294!==getRangerHomeDir()&&await _0xa8178[_0x36ee55(0x224)](sweepOrphanLocalProfile,_0x45bf32,_0x25c294,!![]);}catch(_0x36d6ef){console[_0x36ee55(0x1f9)](_0x36ee55(0x230)+(_0xa8178[_0x36ee55(0x1c6)](_0x36d6ef,Error)?_0x36d6ef[_0x36ee55(0x1b0)]:String(_0x36d6ef))+').');}}async function markActive(_0xf73eed){const _0x37c922=_0x2836;try{await writeActiveProfileName(_0xf73eed),console[_0x37c922(0x1f9)](_0x37c922(0x1d5)+_0xf73eed);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0xd3209e,_0x55afb4,_0x317fba,_0x5365c3,_0x405dd7){const _0x153200=_0x2836,_0x29344f={'bxrFR':function(_0x12b55c,_0x3f9679){return _0x12b55c instanceof _0x3f9679;},'gDhkw':function(_0x425aad,_0x1ec39c){return _0x425aad===_0x1ec39c;},'nUOqi':_0x153200(0x215),'PSRIU':_0x153200(0x1b6),'DZarU':function(_0x30f99,_0x508235){return _0x30f99+_0x508235;},'YAZOo':_0x153200(0x204),'ZmMvG':_0x153200(0x1da),'ixoPh':_0x153200(0x1d4),'egKqa':'confirm','pwfCf':_0x153200(0x227),'RtslG':function(_0x4825fc,_0x2d232c,_0x2efe85,_0x5daf0e){return _0x4825fc(_0x2d232c,_0x2efe85,_0x5daf0e);},'owyDT':_0x153200(0x200)};let _0x20ce71;try{_0x20ce71=await fetchAuthConfig();}catch(_0x58a94c){return _0x405dd7?.[_0x153200(0x206)](_0x153200(0x215),{'reason':_0x153200(0x1b6),'profileName':_0xd3209e}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x29344f['bxrFR'](_0x58a94c,Error)?_0x58a94c['message']:String(_0x58a94c))),![];}if((!_0x20ce71||!_0x20ce71['environments']||_0x29344f[_0x153200(0x1ce)](Object['keys'](_0x20ce71[_0x153200(0x1e1)])[_0x153200(0x1dd)],0x0))&&!_0x317fba[_0x153200(0x1de)]){if(_0x5365c3)return await captureEnvLessProfile(_0xd3209e,_0x55afb4,_0x317fba,_0x405dd7);return _0x405dd7?.['trackPhaseEnd'](_0x29344f['nUOqi'],{'reason':_0x29344f['PSRIU'],'profileName':_0xd3209e}),console['error'](_0x29344f[_0x153200(0x1ca)](_0x29344f['DZarU'](_0x29344f[_0x153200(0x1ca)](_0x29344f[_0x153200(0x1ca)]('\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\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a'+(_0x153200(0x216)+_0xd3209e+_0x153200(0x222)+_0x55afb4+_0x153200(0x1b7)),'\x0a'),_0x29344f[_0x153200(0x1e7)]),_0x153200(0x210))),![];}let _0x5d79a4;if(_0x317fba[_0x153200(0x1de)]){if(!_0x20ce71?.['environments']?.[_0x317fba['authEnv']]){const _0x59d5ef=Object['keys'](_0x20ce71?.[_0x153200(0x1e1)]??{});return _0x405dd7?.[_0x153200(0x206)](_0x29344f['nUOqi'],{'reason':_0x29344f[_0x153200(0x220)],'profileName':_0xd3209e}),console[_0x153200(0x209)](_0x153200(0x226)+_0x317fba[_0x153200(0x1de)]+'\x22\x20not\x20found.'+(_0x59d5ef['length']?_0x153200(0x234)+_0x59d5ef[_0x153200(0x1f3)](',\x20')+'.':_0x153200(0x1ae))),![];}_0x5d79a4=_0x317fba['authEnv'];}else _0x5d79a4=matchAuthEnvironment(_0x55afb4,_0x20ce71);if(!_0x5d79a4)return _0x405dd7?.['trackPhaseEnd'](_0x29344f['nUOqi'],{'reason':_0x29344f[_0x153200(0x22b)],'profileName':_0xd3209e}),console['error'](_0x153200(0x1e2)+_0x55afb4+_0x153200(0x1b3)+Object[_0x153200(0x1d9)](_0x20ce71?.[_0x153200(0x1e1)]??{})['join'](',\x20')+'.'),![];const _0x286eba=_0x20ce71?.[_0x153200(0x1e1)]?.[_0x5d79a4],_0x1d56ca=_0x286eba?.['domains']??[];if(_0x5365c3&&!_0x317fba[_0x153200(0x22f)]){const {saveToCloud:_0x42de8b}=await _0x2b71a3[_0x153200(0x205)]([{'type':_0x29344f[_0x153200(0x1b5)],'name':_0x153200(0x1ec),'message':_0x153200(0x20e)+_0x5d79a4+_0x153200(0x1ac)+_0x55afb4+'\x0a\x20\x20(domains:\x20'+_0x1d56ca['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0xd3209e+_0x153200(0x239),'default':!![]}]);if(!_0x42de8b)return _0x405dd7?.['trackPhaseEnd'](_0x153200(0x215),{'reason':'user_declined','profileName':_0xd3209e}),console['error'](_0x29344f[_0x153200(0x21e)]),![];}const _0x30cea3=_0x1d56ca[_0x153200(0x20d)](_0x1ded45=>{const _0x586f32=_0x153200;try{return new URL(_0x1ded45)[_0x586f32(0x1ef)]===new URL(_0x55afb4)['origin'];}catch{return![];}}),_0x491d50={};!_0x30cea3&&(_0x491d50[_0x153200(0x238)]=_0x55afb4);try{await _0x29344f['RtslG'](createCloudProfile,_0xd3209e,_0x5d79a4,{'settings':_0x491d50}),warnCloudProfileSharedInOrg();}catch(_0x31ec3e){if(_0x31ec3e instanceof ApiError&&_0x31ec3e[_0x153200(0x1bc)]===0x199){console[_0x153200(0x209)](_0x29344f['DZarU']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0xd3209e+_0x153200(0x20b),_0x153200(0x1af)+_0xd3209e));throw _0x31ec3e;}throw _0x31ec3e;}return console[_0x153200(0x1f9)](_0x29344f[_0x153200(0x1ca)]('✓\x20Profile\x20\x27'+_0xd3209e+_0x153200(0x1ba),_0x153200(0x237)+_0xd3209e)),await sweepOrphansBestEffort(_0xd3209e),_0x405dd7?.['trackPhaseEnd'](_0x29344f['owyDT'],{'envKey':_0x5d79a4,'profileName':_0xd3209e}),!![];}async function createUnconfiguredCloudProfile(_0x368974,_0xb6a6c1){const _0x18b54a=_0x2836,_0x46f4c7={'qmNxE':function(_0x2480d5,_0x136566){return _0x2480d5 instanceof _0x136566;},'HYwCU':function(_0x25058e,_0x92fd3e){return _0x25058e===_0x92fd3e;},'rbjYD':function(_0x286ce5,_0x2d5112){return _0x286ce5+_0x2d5112;}};try{await createCloudProfile(_0x368974,undefined,{'settings':_0xb6a6c1}),warnCloudProfileSharedInOrg();}catch(_0x978fa){_0x46f4c7['qmNxE'](_0x978fa,ApiError)&&_0x46f4c7['HYwCU'](_0x978fa[_0x18b54a(0x1bc)],0x199)&&console['error'](_0x46f4c7[_0x18b54a(0x1e8)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x368974+_0x18b54a(0x20b),_0x18b54a(0x1af)+_0x368974));throw _0x978fa;}}async function captureEnvLessProfile(_0x270470,_0x40f13a,_0x51ce11,_0x103469){const _0x209869=_0x2836,_0x5b44cd={'KyBhX':'confirm','mGoou':'capture','XRmUP':'user_declined','XSNhz':function(_0x885a17,_0x207f68){return _0x885a17+_0x207f68;},'VUcXA':function(_0x5e8f9a,_0x58544b){return _0x5e8f9a>_0x58544b;},'DlRZh':function(_0x28c002,_0x47342a,_0x4ae56f){return _0x28c002(_0x47342a,_0x4ae56f);},'iUSJQ':function(_0x58c237,_0x179595){return _0x58c237>_0x179595;},'YIxyV':function(_0x454241,_0x2b3360){return _0x454241(_0x2b3360);}};if(!_0x51ce11[_0x209869(0x22f)]){const {capture:_0x101764}=await _0x2b71a3['prompt']([{'type':_0x5b44cd['KyBhX'],'name':_0x5b44cd['mGoou'],'message':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','default':!![]}]);if(!_0x101764)return _0x103469?.[_0x209869(0x206)](_0x209869(0x215),{'reason':_0x5b44cd[_0x209869(0x232)],'profileName':_0x270470}),console[_0x209869(0x209)](_0x5b44cd[_0x209869(0x236)](_0x209869(0x1cf),_0x209869(0x22e))),![];}const _0xd19664={};if(_0x51ce11['setupHeader'])for(const _0x8a2089 of _0x51ce11['setupHeader']){const _0x298e3c=_0x8a2089[_0x209869(0x1b9)](':');if(_0x298e3c===-0x1)continue;_0xd19664[_0x8a2089['slice'](0x0,_0x298e3c)['trim']()]=_0x8a2089['slice'](_0x298e3c+0x1)[_0x209869(0x1bf)]();}const _0x491abf={'baseUrl':_0x40f13a};_0x5b44cd['VUcXA'](Object[_0x209869(0x1d9)](_0xd19664)[_0x209869(0x1dd)],0x0)&&(_0x491abf[_0x209869(0x1ed)]=_0xd19664);let _0x20d192;try{_0x20d192=await createCloudProfile(_0x270470,undefined,{'settings':_0x491abf}),warnCloudProfileSharedInOrg();}catch(_0x10a886){_0x10a886 instanceof ApiError&&_0x10a886[_0x209869(0x1bc)]===0x199&&console['error'](_0x5b44cd[_0x209869(0x236)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x270470+_0x209869(0x20b),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x270470));throw _0x10a886;}return await _0x5b44cd[_0x209869(0x1fa)](manualBrowserLogin,_0x20d192,{'key':'','domains':[_0x40f13a],'setupHeaders':_0x5b44cd['iUSJQ'](Object[_0x209869(0x1d9)](_0xd19664)['length'],0x0)?_0xd19664:undefined}),console['log'](_0x209869(0x207)+_0x270470+_0x209869(0x213)+(_0x209869(0x237)+_0x270470)),await _0x5b44cd[_0x209869(0x211)](sweepOrphansBestEffort,_0x270470),_0x103469?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':null,'profileName':_0x270470}),!![];}export async function addEnv(_0x3783a6,_0x556e73={},_0x3c7251){const _0x4b8bf5=_0x2836,_0x24b971={'lajQo':function(_0xe26bbb,_0x4326b3){return _0xe26bbb+_0x4326b3;},'EZePF':function(_0x469158,_0x452501){return _0x469158+_0x452501;},'KgcgA':function(_0x3c59c1,_0x204c52){return _0x3c59c1+_0x204c52;},'RAnEi':_0x4b8bf5(0x1c9),'cyhvG':_0x4b8bf5(0x1e4),'TzoMP':function(_0x575170,_0x165614){return _0x575170===_0x165614;},'TEAMD':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','beREe':_0x4b8bf5(0x1ea),'MsFIY':function(_0x348b61){return _0x348b61();},'VJYlH':_0x4b8bf5(0x1e5),'Ryljw':function(_0xebb997,_0x294895,_0x307a17,_0x26a95b,_0x32dbe3){return _0xebb997(_0x294895,_0x307a17,_0x26a95b,_0x32dbe3);},'yfpLs':_0x4b8bf5(0x21a),'AFaIS':_0x4b8bf5(0x1ad),'SSGEk':function(_0x29c1e8,_0x56697c){return _0x29c1e8 instanceof _0x56697c;},'QTdrF':function(_0x191f7f,_0xaea797){return _0x191f7f(_0xaea797);},'KXpYW':function(_0x210667,_0x33a49d){return _0x210667>_0x33a49d;},'yTxyZ':function(_0x4d8d55,_0x5c39d5,_0x20292a){return _0x4d8d55(_0x5c39d5,_0x20292a);},'DeVfr':function(_0x3e308f,_0x4965d2){return _0x3e308f+_0x4965d2;},'BKmsG':_0x4b8bf5(0x1c4),'ppwMI':_0x4b8bf5(0x1c8),'mRnvQ':_0x4b8bf5(0x201),'xqbUp':_0x4b8bf5(0x214),'khMGp':_0x4b8bf5(0x1f6),'ryQBB':_0x4b8bf5(0x1f2),'hUeCB':_0x4b8bf5(0x1d7),'zTsai':'continue','xDRBN':'use_suggestion','IpngU':function(_0x5a0f40,_0x32b606,_0x2df96b,_0x53abbf,_0x567e5b,_0x5965f8){return _0x5a0f40(_0x32b606,_0x2df96b,_0x53abbf,_0x567e5b,_0x5965f8);},'ERkpX':function(_0x41910d,_0x151860){return _0x41910d(_0x151860);}};_0x556e73['ci']&&(console['error'](_0x24b971[_0x4b8bf5(0x20c)](_0x24b971[_0x4b8bf5(0x20c)](_0x24b971[_0x4b8bf5(0x1ee)](_0x24b971['KgcgA'](_0x24b971[_0x4b8bf5(0x1ee)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x0a'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x24b971[_0x4b8bf5(0x22d)]),'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x24b971['cyhvG'])),process[_0x4b8bf5(0x229)](0x1));const _0x1d908b={};if(_0x556e73[_0x4b8bf5(0x1dc)])for(const _0x223f83 of _0x556e73['setupHeader']){const _0x4d5d89=_0x223f83['indexOf'](':');if(_0x4d5d89===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x223f83+_0x4b8bf5(0x1d3));const _0x51b33a=_0x223f83['slice'](0x0,_0x4d5d89)['trim'](),_0x1ba71b=_0x223f83['slice'](_0x4d5d89+0x1)[_0x4b8bf5(0x1bf)]();_0x1d908b[_0x51b33a]=_0x1ba71b;}if(_0x556e73[_0x4b8bf5(0x21a)]!==undefined&&_0x24b971[_0x4b8bf5(0x228)](_0x556e73[_0x4b8bf5(0x21a)][_0x4b8bf5(0x1bf)](),''))throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x556e73['cdpEndpoint']&&_0x556e73['url'])throw new Error(_0x24b971['TEAMD']);if(_0x556e73[_0x4b8bf5(0x1de)]&&_0x556e73['skipAuth'])throw new Error(_0x24b971[_0x4b8bf5(0x1bd)]);if(_0x556e73['authEnv']&&_0x556e73[_0x4b8bf5(0x21a)])throw new Error(_0x4b8bf5(0x1d8));const _0x46347d=Boolean(_0x556e73[_0x4b8bf5(0x21a)]),_0x307f93=_0x24b971['MsFIY'](isInteractive);if(!_0x307f93&&!_0x556e73[_0x4b8bf5(0x217)]&&!_0x46347d&&!_0x556e73[_0x4b8bf5(0x1b8)])throw new Error(_0x24b971[_0x4b8bf5(0x22c)]);if(_0x46347d){const _0x1a6bfa=_0x556e73[_0x4b8bf5(0x21a)];console[_0x4b8bf5(0x1f9)](_0x4b8bf5(0x1df)),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1a6bfa);const _0x3cda6e={'cdpEndpoint':_0x1a6bfa,'isElectron':!![]};Object[_0x4b8bf5(0x1d9)](_0x1d908b)['length']>0x0&&(_0x3cda6e[_0x4b8bf5(0x1ed)]=_0x1d908b);await createUnconfiguredCloudProfile(_0x3783a6,_0x3cda6e);try{_0x24b971[_0x4b8bf5(0x1db)](setProfileOverride,process['cwd'](),_0x3783a6,_0x24b971['yfpLs'],_0x1a6bfa),setProfileOverride(process[_0x4b8bf5(0x1d1)](),_0x3783a6,_0x24b971[_0x4b8bf5(0x1f5)],!![]);}catch(_0x422ecc){console[_0x4b8bf5(0x209)](_0x4b8bf5(0x1c7)+(_0x24b971[_0x4b8bf5(0x219)](_0x422ecc,Error)?_0x422ecc[_0x4b8bf5(0x1b0)]:String(_0x422ecc)));}console['log'](_0x4b8bf5(0x1cc)+_0x3783a6+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x3783a6),await _0x24b971['QTdrF'](markActive,_0x3783a6);return;}if(_0x556e73['skipAuth']){const _0x490f01={};_0x556e73[_0x4b8bf5(0x217)]&&(_0x490f01['baseUrl']=_0x556e73[_0x4b8bf5(0x217)]);_0x24b971['KXpYW'](Object[_0x4b8bf5(0x1d9)](_0x1d908b)['length'],0x0)&&(_0x490f01['setupHeaders']=_0x1d908b);await _0x24b971[_0x4b8bf5(0x1fb)](createUnconfiguredCloudProfile,_0x3783a6,_0x490f01),console[_0x4b8bf5(0x1f9)](_0x24b971[_0x4b8bf5(0x202)](_0x4b8bf5(0x20a)+_0x3783a6+_0x4b8bf5(0x1b4),_0x4b8bf5(0x233)+_0x3783a6+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x3783a6),await _0x24b971['QTdrF'](markActive,_0x3783a6);return;}if(_0x556e73['url']){const _0x841424=_0x556e73[_0x4b8bf5(0x217)],_0x3caff3=await _0x24b971['QTdrF'](checkUrlReachability,_0x841424);if(!_0x3caff3['ok']&&!_0x556e73[_0x4b8bf5(0x1f1)])throw new Error('Could\x20not\x20reach\x20'+_0x841424+':\x20'+_0x3caff3['error']+_0x4b8bf5(0x1d2));!_0x3caff3['ok']&&_0x556e73[_0x4b8bf5(0x1f1)]&&console[_0x4b8bf5(0x1f9)]('⚠\x20Could\x20not\x20reach\x20'+_0x841424+':\x20'+_0x3caff3[_0x4b8bf5(0x209)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x24b971[_0x4b8bf5(0x1c0)]),console[_0x4b8bf5(0x1f9)](_0x24b971['ppwMI']),console['log'](_0x4b8bf5(0x1e0));let _0xe55f16='',_0x5fd7a7=![];while(!![]){const _0x164608=await _0x2b71a3[_0x4b8bf5(0x205)]([{'type':_0x24b971['mRnvQ'],'name':'baseUrl','message':_0x5fd7a7?_0x24b971[_0x4b8bf5(0x1ff)]:_0x4b8bf5(0x1d0),'default':_0xe55f16||_0x4b8bf5(0x1f4)}]);_0xe55f16=_0x164608[_0x4b8bf5(0x238)];const _0x2e85c7=await checkUrlReachability(_0xe55f16);if(_0x2e85c7['ok'])break;const _0x1c3162=/^[a-zA-Z][\w+.-]*:\/\//[_0x4b8bf5(0x221)](_0xe55f16),_0x261ff9=_0x2e85c7[_0x4b8bf5(0x1cb)]&&!_0x1c3162,_0x567573=_0x261ff9?_0x4b8bf5(0x21c)+_0xe55f16:null;_0x5fd7a7=!![],console[_0x4b8bf5(0x1f9)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0xe55f16+':\x20'+_0x2e85c7[_0x4b8bf5(0x209)]);_0x567573&&console['log'](_0x4b8bf5(0x203)+_0x567573+'?');const {action:_0x589e10}=await _0x2b71a3['prompt']([{'type':_0x24b971[_0x4b8bf5(0x225)],'name':_0x4b8bf5(0x1f0),'message':_0x24b971['ryQBB'],'choices':[..._0x567573?[{'name':_0x4b8bf5(0x231)+_0x567573,'value':'use_suggestion'}]:[],{'name':'Enter\x20a\x20different\x20URL','value':_0x4b8bf5(0x1f7)},{'name':_0x24b971[_0x4b8bf5(0x1be)],'value':_0x24b971[_0x4b8bf5(0x1c2)]}]}]);if(_0x589e10===_0x24b971[_0x4b8bf5(0x1c1)]&&_0x567573){_0xe55f16=_0x567573;const _0x476e7b=await _0x24b971[_0x4b8bf5(0x223)](checkUrlReachability,_0xe55f16);if(_0x476e7b['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0xe55f16+':\x20'+_0x476e7b[_0x4b8bf5(0x209)]);}else{if(_0x24b971['TzoMP'](_0x589e10,_0x24b971['zTsai']))break;}}_0x556e73={..._0x556e73,'url':_0xe55f16};}let _0x1bb654=![];try{_0x1bb654=await _0x24b971['IpngU'](tryAutoRouteCloudProfile,_0x3783a6,_0x556e73[_0x4b8bf5(0x217)],_0x556e73,_0x307f93,_0x3c7251);}catch(_0x5b7569){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x3783a6+_0x4b8bf5(0x1b1)+(_0x5b7569 instanceof Error?_0x5b7569['message']:String(_0x5b7569))),process['exit'](0x1);}!_0x1bb654&&process[_0x4b8bf5(0x229)](0x1),await _0x24b971[_0x4b8bf5(0x208)](markActive,_0x3783a6);}
1
+ (function(_0x439cf8,_0xe18756){const _0x672e38=_0x16fe,_0x456c8a=_0x439cf8();while(!![]){try{const _0x49bbc0=parseInt(_0x672e38(0x131))/0x1*(-parseInt(_0x672e38(0x153))/0x2)+-parseInt(_0x672e38(0x18f))/0x3+parseInt(_0x672e38(0x160))/0x4+-parseInt(_0x672e38(0x1b0))/0x5*(parseInt(_0x672e38(0x18b))/0x6)+-parseInt(_0x672e38(0x15a))/0x7*(-parseInt(_0x672e38(0x1a4))/0x8)+parseInt(_0x672e38(0x169))/0x9*(-parseInt(_0x672e38(0x17c))/0xa)+parseInt(_0x672e38(0x14a))/0xb;if(_0x49bbc0===_0xe18756)break;else _0x456c8a['push'](_0x456c8a['shift']());}catch(_0x50759b){_0x456c8a['push'](_0x456c8a['shift']());}}}(_0x1270,0x482a0));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x42e4ef 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';function _0x16fe(_0x3c21fd,_0x5c104f){_0x3c21fd=_0x3c21fd-0x12e;const _0x127016=_0x1270();let _0x16fe60=_0x127016[_0x3c21fd];return _0x16fe60;}import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x142cf1=_0x16fe;if(!process[_0x142cf1(0x1a0)]['isTTY'])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x2f587b){const _0x5d109a=_0x16fe,_0x3b34e5={'VKEHL':'HEAD','zgKha':function(_0x579516,_0x4e5cbb){return _0x579516(_0x4e5cbb);},'YHUwa':_0x5d109a(0x15e),'yRqsR':'fetch\x20failed'};try{const _0x23f3ef=new AbortController(),_0x4aea5d=setTimeout(()=>_0x23f3ef[_0x5d109a(0x175)](),0x1388),_0x108589={'method':_0x3b34e5[_0x5d109a(0x17e)],'signal':_0x23f3ef[_0x5d109a(0x147)],'redirect':_0x5d109a(0x15d)};/^https:\/\/localhost(:\d+)?/i[_0x5d109a(0x19b)](_0x2f587b)&&(process[_0x5d109a(0x192)][_0x5d109a(0x168)]='0');const _0x5f3b5b=await fetch(_0x2f587b,_0x108589);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x4aea5d);if(_0x5f3b5b[_0x5d109a(0x138)]<0x190)return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x5f3b5b['status']};}catch(_0x46b05a){delete process[_0x5d109a(0x192)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x2bde66=_0x46b05a,_0x2fd408=_0x2bde66['message']||_0x3b34e5['zgKha'](String,_0x46b05a),_0x4014bb=_0x2fd408[_0x5d109a(0x17b)](_0x5d109a(0x1ac))||_0x2bde66['name']===_0x3b34e5[_0x5d109a(0x188)]||_0x2fd408[_0x5d109a(0x17b)](_0x3b34e5['yRqsR']);return{'ok':![],'error':_0x2fd408,'isProtocolError':_0x4014bb};}}async function sweepOrphanLocalProfile(_0x4bc023,_0x4884cd,_0x41c123){const _0x3ec6c9=_0x16fe,_0x1e15d4={'JDEoR':'local','gQncA':function(_0x226587,_0x4c9ac2,_0x3104bf){return _0x226587(_0x4c9ac2,_0x3104bf);},'TsJbh':function(_0x242122,_0x46fb2a){return _0x242122(_0x46fb2a);}},_0x164191=join(_0x4884cd,_0x1e15d4[_0x3ec6c9(0x15c)]),_0x2e14b8=join(_0x164191,_0x4bc023);existsSync(_0x2e14b8)&&(_0x41c123&&await isPathGitTracked(_0x2e14b8)?console[_0x3ec6c9(0x130)](_0x3ec6c9(0x16c)+_0x2e14b8+_0x3ec6c9(0x18a)):(await _0x1e15d4[_0x3ec6c9(0x150)](rm,_0x2e14b8,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x2e14b8)));if(_0x1e15d4[_0x3ec6c9(0x15f)](existsSync,_0x164191)){let _0x49d939=[];try{_0x49d939=await readdir(_0x164191);}catch{return;}const _0x2b6463=_0x3ec6c9(0x136)+_0x4bc023+'-';for(const _0x197b99 of _0x49d939){if(!_0x197b99[_0x3ec6c9(0x19f)](_0x2b6463))continue;const _0x19e04f=join(_0x164191,_0x197b99);await rm(_0x19e04f,{'recursive':!![],'force':!![]}),console[_0x3ec6c9(0x130)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x19e04f);}}}async function sweepOrphansBestEffort(_0x1bc2e5){const _0x55e7ad=_0x16fe,_0x218436={'GDfce':function(_0x30d841){return _0x30d841();},'srdNg':function(_0x3e166a){return _0x3e166a();},'ZccML':function(_0x373ff3,_0x3bc932){return _0x373ff3!==_0x3bc932;},'KycqC':function(_0x144af0,_0x4795db){return _0x144af0 instanceof _0x4795db;},'vaaAv':function(_0x382fb5,_0x869e93){return _0x382fb5(_0x869e93);}};try{await sweepOrphanLocalProfile(_0x1bc2e5,_0x218436['GDfce'](getRangerHomeDir),![]);const _0x1cc009=_0x218436[_0x55e7ad(0x182)](getRangerDir);_0x218436['ZccML'](_0x1cc009,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x1bc2e5,_0x1cc009,!![]);}catch(_0x4f9525){console['log'](_0x55e7ad(0x144)+(_0x218436[_0x55e7ad(0x17d)](_0x4f9525,Error)?_0x4f9525[_0x55e7ad(0x193)]:_0x218436['vaaAv'](String,_0x4f9525))+').');}}function _0x1270(){const _0x5bde6a=['6rpcLtO','\x0a✓\x20Profile\x20\x27','\x20Configured\x20envs:\x20','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','748710GfjXQD','VEAqd','authEnv','env','message','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','NvMwb','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','NOIFN','setupHeader','KpQXz','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','test','env_not_found','trackPhaseEnd','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','startsWith','stdout','ciMVc','isProtocolError','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','1934392MTriIw','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x20--url\x20','environments','cwd','WYtmO','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','KeVoz','Invalid\x20URL','no_match','continue','xsFXB','2380505YFhhmO','LhZYt','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','keys','profile.add.autoRouted','prompt','ThnPv','trim','log','11rSPzLs','slice','\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\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','Found\x20auth\x20environment\x20\x27','.tmp-','Use\x20','status','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','dSWOA','kDCqN','JLDlf','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','origin','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','tPQRV','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','Enter\x20a\x20different\x20URL','QTCUN','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','xzNVQ','MgqvO','signal','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','cdpEndpoint','5402540ctqSkd','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x27\x20created\x20(CDP).','SMITt','setupHeaders','XpwNz','gQncA','baseUrl','use_suggestion','5482vMyLnw','yes','DPwxM','\x0a\x20\x20A\x20profile\x20named\x20\x22','BJPSg','skipAuth','bPboJ','7gIzpLL','\x20\x20https://docs.ranger.net/main/concepts/profiles','JDEoR','manual','TypeError','TsJbh','1508288FxrNoY','profile.add.autoRouteSkipped','lKcXG','\x0a\x20\x20(domains:\x20','Omztm','flOos','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','NODE_TLS_REJECT_UNAUTHORIZED','135AKXtxM','no_auth_config','url','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','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','isElectron','exit','length','list','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','iKFrx','CaTDE','abort','YyiJh','YctTj','http://','error','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','includes','39070NVHBkT','KycqC','VKEHL','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','indexOf','RraHm','srdNg','DuuNT','CFlpJ','\x22\x20not\x20found.','uexPs','pLMNu','YHUwa','PpZYD','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'];_0x1270=function(){return _0x5bde6a;};return _0x1270();}async function markActive(_0xf8114d){const _0x55c020=_0x16fe,_0x43a74f={'gdXYr':function(_0xf0f94b,_0x98e9b8){return _0xf0f94b(_0x98e9b8);},'xzNVQ':_0x55c020(0x172)};try{await _0x43a74f['gdXYr'](writeActiveProfileName,_0xf8114d),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0xf8114d);}catch{console[_0x55c020(0x130)](_0x43a74f[_0x55c020(0x145)]);}}async function tryAutoRouteCloudProfile(_0x2e941d,_0x51d836,_0x2802c9,_0x79ecd8,_0x3beaf1){const _0x1c18b4=_0x16fe,_0x1c6051={'lKcXG':_0x1c18b4(0x16a),'JLDlf':function(_0xc4f61d,_0x40f066){return _0xc4f61d instanceof _0x40f066;},'NvMwb':_0x1c18b4(0x161),'RraHm':function(_0x2fb0ea,_0x2cb0c8){return _0x2fb0ea+_0x2cb0c8;},'BJPSg':function(_0x95e039,_0x4b72dc){return _0x95e039+_0x4b72dc;},'Omztm':_0x1c18b4(0x133),'NOIFN':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','dSWOA':_0x1c18b4(0x19a),'KpQXz':_0x1c18b4(0x19c),'gKdwg':function(_0x1b6ad3,_0xaae490){return _0x1b6ad3+_0xaae490;},'bPboJ':function(_0x4780d1,_0x291e8c,_0x4edde7){return _0x4780d1(_0x291e8c,_0x4edde7);},'AAwor':'confirm','CFlpJ':function(_0xe32d27,_0x5c73b3,_0x328038,_0x535cc3){return _0xe32d27(_0x5c73b3,_0x328038,_0x535cc3);},'XpwNz':function(_0x3f8671,_0x2de470){return _0x3f8671===_0x2de470;},'QTCUN':function(_0x10b9e7,_0x204528){return _0x10b9e7(_0x204528);}};let _0xe1e9b2;try{_0xe1e9b2=await fetchAuthConfig();}catch(_0x1031e7){return _0x3beaf1?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x1c6051[_0x1c18b4(0x162)],'profileName':_0x2e941d}),console['error'](_0x1c18b4(0x167)+(_0x1c6051[_0x1c18b4(0x13c)](_0x1031e7,Error)?_0x1031e7[_0x1c18b4(0x193)]:String(_0x1031e7))),![];}if((!_0xe1e9b2||!_0xe1e9b2['environments']||Object[_0x1c18b4(0x1b3)](_0xe1e9b2[_0x1c18b4(0x1a7)])['length']===0x0)&&!_0x2802c9[_0x1c18b4(0x191)]){if(_0x79ecd8)return await captureEnvLessProfile(_0x2e941d,_0x51d836,_0x2802c9,_0x3beaf1);return _0x3beaf1?.[_0x1c18b4(0x19d)](_0x1c6051[_0x1c18b4(0x195)],{'reason':_0x1c6051['lKcXG'],'profileName':_0x2e941d}),console['error'](_0x1c6051[_0x1c18b4(0x181)](_0x1c6051[_0x1c18b4(0x157)](_0x1c6051[_0x1c18b4(0x181)](_0x1c6051[_0x1c18b4(0x164)],'\x0a')+_0x1c6051[_0x1c18b4(0x197)]+(_0x1c18b4(0x194)+_0x2e941d+_0x1c18b4(0x1a6)+_0x51d836+'\x20--skip-auth\x0a'),'\x0a')+'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a',_0x1c6051[_0x1c18b4(0x13a)])),![];}let _0x4d8abd;if(_0x2802c9['authEnv']){if(!_0xe1e9b2?.[_0x1c18b4(0x1a7)]?.[_0x2802c9['authEnv']]){const _0x26f699=Object['keys'](_0xe1e9b2?.[_0x1c18b4(0x1a7)]??{});return _0x3beaf1?.[_0x1c18b4(0x19d)](_0x1c6051[_0x1c18b4(0x195)],{'reason':_0x1c6051[_0x1c18b4(0x199)],'profileName':_0x2e941d}),console['error'](_0x1c6051['gKdwg']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x2802c9[_0x1c18b4(0x191)]+_0x1c18b4(0x185),_0x26f699['length']?_0x1c18b4(0x18d)+_0x26f699['join'](',\x20')+'.':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.')),![];}_0x4d8abd=_0x2802c9['authEnv'];}else _0x4d8abd=_0x1c6051[_0x1c18b4(0x159)](matchAuthEnvironment,_0x51d836,_0xe1e9b2);if(!_0x4d8abd)return _0x3beaf1?.[_0x1c18b4(0x19d)]('profile.add.autoRouteSkipped',{'reason':_0x1c18b4(0x1ad),'profileName':_0x2e941d}),console[_0x1c18b4(0x179)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x51d836+_0x1c18b4(0x1aa)+Object[_0x1c18b4(0x1b3)](_0xe1e9b2?.['environments']??{})['join'](',\x20')+'.'),![];const _0x2bd03c=_0xe1e9b2?.[_0x1c18b4(0x1a7)]?.[_0x4d8abd],_0x1dede5=_0x2bd03c?.['domains']??[];if(_0x79ecd8&&!_0x2802c9[_0x1c18b4(0x154)]){const {saveToCloud:_0xede296}=await _0x42e4ef['prompt']([{'type':_0x1c6051['AAwor'],'name':'saveToCloud','message':_0x1c18b4(0x135)+_0x4d8abd+'\x27\x20matching\x20'+_0x51d836+_0x1c18b4(0x163)+_0x1dede5['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x2e941d+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0xede296)return _0x3beaf1?.[_0x1c18b4(0x19d)](_0x1c6051[_0x1c18b4(0x195)],{'reason':'user_declined','profileName':_0x2e941d}),console['error'](_0x1c18b4(0x134)),![];}const _0x1c4cce=_0x1dede5['some'](_0x1f5f58=>{const _0x5d30d3=_0x1c18b4;try{return new URL(_0x1f5f58)[_0x5d30d3(0x13e)]===new URL(_0x51d836)['origin'];}catch{return![];}}),_0x1c7769={};!_0x1c4cce&&(_0x1c7769['baseUrl']=_0x51d836);try{await _0x1c6051[_0x1c18b4(0x184)](createCloudProfile,_0x2e941d,_0x4d8abd,{'settings':_0x1c7769}),warnCloudProfileSharedInOrg();}catch(_0x4fd48b){if(_0x4fd48b instanceof ApiError&&_0x1c6051[_0x1c18b4(0x14f)](_0x4fd48b[_0x1c18b4(0x138)],0x199)){console[_0x1c18b4(0x179)](_0x1c18b4(0x156)+_0x2e941d+_0x1c18b4(0x13f)+(_0x1c18b4(0x1a3)+_0x2e941d));throw _0x4fd48b;}throw _0x4fd48b;}return console['log'](_0x1c6051[_0x1c18b4(0x181)]('✓\x20Profile\x20\x27'+_0x2e941d+'\x27\x20created.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x2e941d)),await _0x1c6051[_0x1c18b4(0x143)](sweepOrphansBestEffort,_0x2e941d),_0x3beaf1?.['trackPhaseEnd'](_0x1c18b4(0x1b4),{'envKey':_0x4d8abd,'profileName':_0x2e941d}),!![];}async function createUnconfiguredCloudProfile(_0xa33e6f,_0x1807de){const _0xf43bac=_0x16fe,_0xd60127={'iKFrx':function(_0xf6dda3,_0x8312e4,_0x544e77,_0x2650ba){return _0xf6dda3(_0x8312e4,_0x544e77,_0x2650ba);},'xHYni':function(_0x26d9ea,_0x135f57){return _0x26d9ea===_0x135f57;}};try{await _0xd60127[_0xf43bac(0x173)](createCloudProfile,_0xa33e6f,undefined,{'settings':_0x1807de}),warnCloudProfileSharedInOrg();}catch(_0x13a887){_0x13a887 instanceof ApiError&&_0xd60127['xHYni'](_0x13a887[_0xf43bac(0x138)],0x199)&&console[_0xf43bac(0x179)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0xa33e6f+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0xf43bac(0x1a3)+_0xa33e6f));throw _0x13a887;}}async function captureEnvLessProfile(_0x24b365,_0x499a2c,_0x1bd371,_0x14bd4d){const _0xa79aaa=_0x16fe,_0x279fc6={'VEAqd':'confirm','UBDHq':_0xa79aaa(0x14b),'phHhs':_0xa79aaa(0x161),'DPwxM':'user_declined','VNKbp':function(_0x3576a5,_0x55463f){return _0x3576a5===_0x55463f;},'KRCQf':function(_0x182d3e,_0x4127f0){return _0x182d3e+_0x4127f0;},'ThnPv':function(_0x3a088e,_0x116edf){return _0x3a088e>_0x116edf;},'KeVoz':function(_0x2a6c79,_0x535252,_0x2d44c2,_0x5b7db6){return _0x2a6c79(_0x535252,_0x2d44c2,_0x5b7db6);},'flOos':function(_0x3d8e19,_0x4d2d64){return _0x3d8e19 instanceof _0x4d2d64;},'WYtmO':function(_0x28b427,_0x252b81,_0x4257ee){return _0x28b427(_0x252b81,_0x4257ee);},'kwlnJ':function(_0x18b944,_0xf3f3c5){return _0x18b944(_0xf3f3c5);}};if(!_0x1bd371['yes']){const {capture:_0x5a424d}=await _0x42e4ef['prompt']([{'type':_0x279fc6[_0xa79aaa(0x190)],'name':'capture','message':_0x279fc6['UBDHq'],'default':!![]}]);if(!_0x5a424d)return _0x14bd4d?.['trackPhaseEnd'](_0x279fc6['phHhs'],{'reason':_0x279fc6[_0xa79aaa(0x155)],'profileName':_0x24b365}),console['error'](_0xa79aaa(0x148)+_0xa79aaa(0x18e)),![];}const _0x59a0e2={};if(_0x1bd371[_0xa79aaa(0x198)])for(const _0x77c5fd of _0x1bd371['setupHeader']){const _0xdde94c=_0x77c5fd[_0xa79aaa(0x180)](':');if(_0x279fc6['VNKbp'](_0xdde94c,-0x1))continue;_0x59a0e2[_0x77c5fd[_0xa79aaa(0x132)](0x0,_0xdde94c)[_0xa79aaa(0x12f)]()]=_0x77c5fd['slice'](_0x279fc6['KRCQf'](_0xdde94c,0x1))[_0xa79aaa(0x12f)]();}const _0x17d4ff={'baseUrl':_0x499a2c};_0x279fc6[_0xa79aaa(0x12e)](Object['keys'](_0x59a0e2)[_0xa79aaa(0x170)],0x0)&&(_0x17d4ff['setupHeaders']=_0x59a0e2);let _0x5d9c71;try{_0x5d9c71=await _0x279fc6[_0xa79aaa(0x1ab)](createCloudProfile,_0x24b365,undefined,{'settings':_0x17d4ff}),warnCloudProfileSharedInOrg();}catch(_0xd839a7){_0x279fc6[_0xa79aaa(0x165)](_0xd839a7,ApiError)&&_0xd839a7[_0xa79aaa(0x138)]===0x199&&console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x24b365+_0xa79aaa(0x13f)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x24b365));throw _0xd839a7;}return await _0x279fc6[_0xa79aaa(0x1a9)](manualBrowserLogin,_0x5d9c71,{'key':'','domains':[_0x499a2c],'setupHeaders':Object[_0xa79aaa(0x1b3)](_0x59a0e2)['length']>0x0?_0x59a0e2:undefined}),console['log'](_0xa79aaa(0x18c)+_0x24b365+_0xa79aaa(0x166)+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x24b365)),await _0x279fc6['kwlnJ'](sweepOrphansBestEffort,_0x24b365),_0x14bd4d?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':null,'profileName':_0x24b365}),!![];}export async function addEnv(_0x1ae65c,_0x458502={},_0x33c474){const _0x2e3f25=_0x16fe,_0x3e0f7f={'tPQRV':function(_0x1a7750,_0x504001){return _0x1a7750+_0x504001;},'HTgmy':function(_0x540c6e,_0x3f11f0){return _0x540c6e+_0x3f11f0;},'NlMAp':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','PpZYD':_0x2e3f25(0x139),'jMXZn':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ciMVc':_0x2e3f25(0x15b),'MgqvO':function(_0x4bb289,_0x1a1c14){return _0x4bb289===_0x1a1c14;},'DuuNT':_0x2e3f25(0x1b2),'KwFBo':function(_0x49c67d){return _0x49c67d();},'XPNSZ':_0x2e3f25(0x17a),'pLMNu':function(_0x3b79fa,_0x250892){return _0x3b79fa>_0x250892;},'LhZYt':function(_0x30d865,_0x5bb1e1){return _0x30d865(_0x5bb1e1);},'YctTj':function(_0x41de38,_0x3115cd){return _0x41de38(_0x3115cd);},'xsFXB':function(_0x4bb3e0,_0x1ee0fc,_0x5aa63d){return _0x4bb3e0(_0x1ee0fc,_0x5aa63d);},'LOTsS':function(_0x33684b,_0x33816b){return _0x33684b(_0x33816b);},'uexPs':_0x2e3f25(0x196),'lQTER':'input','LIBjO':_0x2e3f25(0x13d),'CaTDE':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','SMITt':'What\x20would\x20you\x20like\x20to\x20do?','kDCqN':_0x2e3f25(0x142),'YyiJh':'continue'};_0x458502['ci']&&(console['error'](_0x3e0f7f[_0x2e3f25(0x140)](_0x3e0f7f[_0x2e3f25(0x140)](_0x3e0f7f[_0x2e3f25(0x140)](_0x3e0f7f['HTgmy'](_0x3e0f7f['HTgmy'](_0x3e0f7f['NlMAp'],_0x3e0f7f[_0x2e3f25(0x189)]),'\x0a'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x3e0f7f['jMXZn'])+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x3e0f7f[_0x2e3f25(0x1a1)])),process['exit'](0x1));const _0x5a25ef={};if(_0x458502[_0x2e3f25(0x198)])for(const _0xac1be of _0x458502['setupHeader']){const _0x211612=_0xac1be[_0x2e3f25(0x180)](':');if(_0x3e0f7f['MgqvO'](_0x211612,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0xac1be+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x31113b=_0xac1be[_0x2e3f25(0x132)](0x0,_0x211612)['trim'](),_0x584f11=_0xac1be[_0x2e3f25(0x132)](_0x211612+0x1)[_0x2e3f25(0x12f)]();_0x5a25ef[_0x31113b]=_0x584f11;}if(_0x458502[_0x2e3f25(0x149)]!==undefined&&_0x458502[_0x2e3f25(0x149)]['trim']()==='')throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x458502[_0x2e3f25(0x149)]&&_0x458502[_0x2e3f25(0x16b)])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(_0x458502[_0x2e3f25(0x191)]&&_0x458502['skipAuth'])throw new Error(_0x2e3f25(0x141));if(_0x458502[_0x2e3f25(0x191)]&&_0x458502['cdpEndpoint'])throw new Error(_0x3e0f7f[_0x2e3f25(0x183)]);const _0x32c05c=Boolean(_0x458502['cdpEndpoint']),_0x46a2d2=_0x3e0f7f['KwFBo'](isInteractive);if(!_0x46a2d2&&!_0x458502[_0x2e3f25(0x16b)]&&!_0x32c05c&&!_0x458502['skipAuth'])throw new Error(_0x2e3f25(0x16d));if(_0x32c05c){const _0x42116d=_0x458502['cdpEndpoint'];console['log'](_0x3e0f7f['XPNSZ']),console['log'](_0x2e3f25(0x19e)+_0x42116d);const _0x41d816={'cdpEndpoint':_0x42116d,'isElectron':!![]};_0x3e0f7f[_0x2e3f25(0x187)](Object[_0x2e3f25(0x1b3)](_0x5a25ef)['length'],0x0)&&(_0x41d816[_0x2e3f25(0x14e)]=_0x5a25ef);await createUnconfiguredCloudProfile(_0x1ae65c,_0x41d816);try{setProfileOverride(process[_0x2e3f25(0x1a8)](),_0x1ae65c,_0x2e3f25(0x149),_0x42116d),setProfileOverride(process['cwd'](),_0x1ae65c,_0x2e3f25(0x16e),!![]);}catch(_0x47ae7a){console['error'](_0x2e3f25(0x17f)+(_0x47ae7a instanceof Error?_0x47ae7a[_0x2e3f25(0x193)]:String(_0x47ae7a)));}console[_0x2e3f25(0x130)]('✓\x20Cloud\x20profile\x20\x27'+_0x1ae65c+_0x2e3f25(0x14c)),await _0x3e0f7f['LhZYt'](sweepOrphansBestEffort,_0x1ae65c),await _0x3e0f7f['YctTj'](markActive,_0x1ae65c);return;}if(_0x458502[_0x2e3f25(0x158)]){const _0x4a8323={};_0x458502[_0x2e3f25(0x16b)]&&(_0x4a8323['baseUrl']=_0x458502[_0x2e3f25(0x16b)]);_0x3e0f7f['pLMNu'](Object['keys'](_0x5a25ef)[_0x2e3f25(0x170)],0x0)&&(_0x4a8323[_0x2e3f25(0x14e)]=_0x5a25ef);await _0x3e0f7f[_0x2e3f25(0x1af)](createUnconfiguredCloudProfile,_0x1ae65c,_0x4a8323),console['log']('✓\x20Profile\x20\x27'+_0x1ae65c+'\x27\x20created\x20(no\x20session).\x0a'+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x1ae65c+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x1ae65c),await _0x3e0f7f['LOTsS'](markActive,_0x1ae65c);return;}if(_0x458502[_0x2e3f25(0x16b)]){const _0x4f20fc=_0x458502['url'],_0x3e7cb4=await checkUrlReachability(_0x4f20fc);if(!_0x3e7cb4['ok']&&!_0x458502['force'])throw new Error('Could\x20not\x20reach\x20'+_0x4f20fc+':\x20'+_0x3e7cb4['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x3e7cb4['ok']&&_0x458502['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x4f20fc+':\x20'+_0x3e7cb4['error']+'\x20(continuing\x20with\x20--force)');}else{console['log']('\x0a🌐\x20Profile\x20Setup\x0a'),console['log'](_0x2e3f25(0x1a5)),console[_0x2e3f25(0x130)](_0x3e0f7f[_0x2e3f25(0x186)]);let _0x58e069='',_0x14af3c=![];while(!![]){const _0x4d7b31=await _0x42e4ef[_0x2e3f25(0x1b5)]([{'type':_0x3e0f7f['lQTER'],'name':'baseUrl','message':_0x14af3c?_0x3e0f7f['LIBjO']:_0x3e0f7f[_0x2e3f25(0x174)],'default':_0x58e069||'http://localhost:3000'}]);_0x58e069=_0x4d7b31[_0x2e3f25(0x151)];const _0x490fe7=await checkUrlReachability(_0x58e069);if(_0x490fe7['ok'])break;const _0x43a5f2=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x58e069),_0x132704=_0x490fe7[_0x2e3f25(0x1a2)]&&!_0x43a5f2,_0x331e11=_0x132704?_0x2e3f25(0x178)+_0x58e069:null;_0x14af3c=!![],console[_0x2e3f25(0x130)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x58e069+':\x20'+_0x490fe7['error']);_0x331e11&&console[_0x2e3f25(0x130)]('\x20\x20Did\x20you\x20mean\x20'+_0x331e11+'?');const {action:_0x273c42}=await _0x42e4ef[_0x2e3f25(0x1b5)]([{'type':_0x2e3f25(0x171),'name':'action','message':_0x3e0f7f[_0x2e3f25(0x14d)],'choices':[..._0x331e11?[{'name':_0x2e3f25(0x137)+_0x331e11,'value':_0x2e3f25(0x152)}]:[],{'name':_0x3e0f7f[_0x2e3f25(0x13b)],'value':'retry'},{'name':'Continue\x20anyway','value':_0x3e0f7f[_0x2e3f25(0x176)]}]}]);if(_0x3e0f7f[_0x2e3f25(0x146)](_0x273c42,_0x2e3f25(0x152))&&_0x331e11){_0x58e069=_0x331e11;const _0x4b3d9d=await _0x3e0f7f[_0x2e3f25(0x177)](checkUrlReachability,_0x58e069);if(_0x4b3d9d['ok'])break;console[_0x2e3f25(0x130)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x58e069+':\x20'+_0x4b3d9d['error']);}else{if(_0x273c42===_0x2e3f25(0x1ae))break;}}_0x458502={..._0x458502,'url':_0x58e069};}let _0x5951e0=![];try{_0x5951e0=await tryAutoRouteCloudProfile(_0x1ae65c,_0x458502[_0x2e3f25(0x16b)],_0x458502,_0x46a2d2,_0x33c474);}catch(_0x1d796a){console[_0x2e3f25(0x179)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x1ae65c+'\x22:\x20'+(_0x1d796a instanceof Error?_0x1d796a[_0x2e3f25(0x193)]:_0x3e0f7f['YctTj'](String,_0x1d796a))),process['exit'](0x1);}!_0x5951e0&&process[_0x2e3f25(0x16f)](0x1),await _0x3e0f7f[_0x2e3f25(0x1b1)](markActive,_0x1ae65c);}
@@ -1 +1 @@
1
- function _0x386b(){var _0x5ee645=['5110260DBHeuA','8745219zNXLDU','493788xEbdxd','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','EzvIg','13294CKvlGK','exit','318UsZTBg','40QZNNxx','418732upHyBg','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','zsBcy','\x20\x20https://docs.ranger.net/main/concepts/profiles','989244VUpUkI','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','5186237EeYAMW','8BavNrV','CSkRm','qBxuj'];_0x386b=function(){return _0x5ee645;};return _0x386b();}function _0x8cb0(_0x4e7c1d,_0x588548){_0x4e7c1d=_0x4e7c1d-0xc8;var _0x386b18=_0x386b();var _0x8cb01e=_0x386b18[_0x4e7c1d];return _0x8cb01e;}(function(_0x596e2f,_0x4d90bc){var _0x11589c=_0x8cb0,_0x16d8d6=_0x596e2f();while(!![]){try{var _0xc1ed2f=parseInt(_0x11589c(0xd8))/0x1+-parseInt(_0x11589c(0xd4))/0x2*(-parseInt(_0x11589c(0xd6))/0x3)+-parseInt(_0x11589c(0xd1))/0x4*(parseInt(_0x11589c(0xd7))/0x5)+parseInt(_0x11589c(0xc9))/0x6+-parseInt(_0x11589c(0xcb))/0x7*(-parseInt(_0x11589c(0xcc))/0x8)+-parseInt(_0x11589c(0xd0))/0x9+parseInt(_0x11589c(0xcf))/0xa;if(_0xc1ed2f===_0x4d90bc)break;else _0x16d8d6['push'](_0x16d8d6['shift']());}catch(_0x1784e6){_0x16d8d6['push'](_0x16d8d6['shift']());}}}(_0x386b,0x8dce6));export async function authEncrypt(_0x436b7f){var _0x132da8=_0x8cb0,_0x8d7e63={'CSkRm':function(_0x3e01cc,_0x5c685c){return _0x3e01cc+_0x5c685c;},'qBxuj':function(_0x248c2c,_0x3ad4b4){return _0x248c2c+_0x3ad4b4;},'EzvIg':_0x132da8(0xd2),'BfHin':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','zsBcy':_0x132da8(0xc8)};console['error'](_0x8d7e63[_0x132da8(0xcd)](_0x8d7e63[_0x132da8(0xcd)](_0x8d7e63['qBxuj'](_0x8d7e63[_0x132da8(0xce)](_0x8d7e63[_0x132da8(0xce)](_0x132da8(0xca)+_0x132da8(0xd9),'\x0a')+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x8d7e63[_0x132da8(0xd3)]),'\x0a'),_0x8d7e63['BfHin']),_0x8d7e63[_0x132da8(0xda)])),process[_0x132da8(0xd5)](0x1);}
1
+ (function(_0x3fddb5,_0x156d9f){var _0x2bd0c4=_0x21b6,_0xdce481=_0x3fddb5();while(!![]){try{var _0x5e5189=-parseInt(_0x2bd0c4(0x123))/0x1+-parseInt(_0x2bd0c4(0x11a))/0x2+parseInt(_0x2bd0c4(0x119))/0x3+-parseInt(_0x2bd0c4(0x11f))/0x4*(parseInt(_0x2bd0c4(0x11c))/0x5)+-parseInt(_0x2bd0c4(0x125))/0x6+-parseInt(_0x2bd0c4(0x118))/0x7+parseInt(_0x2bd0c4(0x11e))/0x8;if(_0x5e5189===_0x156d9f)break;else _0xdce481['push'](_0xdce481['shift']());}catch(_0x23bace){_0xdce481['push'](_0xdce481['shift']());}}}(_0x4ddb,0xc61ea));function _0x4ddb(){var _0x2551a0=['9332ilOvAI','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','exit','1557499cWvXwK','\x20\x20https://docs.ranger.net/main/concepts/profiles','1462446wmbJdl','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','7595476ssljZb','2566641pezcWD','2007078pOiiSv','mymwU','155fZyIuc','Rvwhc','31344968szkGDY'];_0x4ddb=function(){return _0x2551a0;};return _0x4ddb();}function _0x21b6(_0x888a46,_0x26874a){_0x888a46=_0x888a46-0x117;var _0x4ddb03=_0x4ddb();var _0x21b6bd=_0x4ddb03[_0x888a46];return _0x21b6bd;}export async function authEncrypt(_0x7ff074){var _0x404969=_0x21b6,_0x3be018={'Rvwhc':function(_0x5506a1,_0x593a0b){return _0x5506a1+_0x593a0b;},'mymwU':_0x404969(0x117),'kCRxZ':_0x404969(0x120)};console['error'](_0x3be018[_0x404969(0x11d)](_0x3be018[_0x404969(0x11d)](_0x3be018['Rvwhc'](_0x3be018[_0x404969(0x11b)],_0x3be018['kCRxZ'])+'\x0a'+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x404969(0x121),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+_0x404969(0x124)),process[_0x404969(0x122)](0x1);}
@@ -1 +1 @@
1
- const _0x1ca61e=_0x2880;(function(_0x570da4,_0x20ce8d){const _0x30fc59=_0x2880,_0x586888=_0x570da4();while(!![]){try{const _0x333134=parseInt(_0x30fc59(0xbd))/0x1*(parseInt(_0x30fc59(0xe0))/0x2)+parseInt(_0x30fc59(0xc0))/0x3*(-parseInt(_0x30fc59(0xd1))/0x4)+parseInt(_0x30fc59(0xeb))/0x5*(-parseInt(_0x30fc59(0xc2))/0x6)+parseInt(_0x30fc59(0xcc))/0x7+-parseInt(_0x30fc59(0xc8))/0x8+parseInt(_0x30fc59(0xb9))/0x9+parseInt(_0x30fc59(0xc4))/0xa;if(_0x333134===_0x20ce8d)break;else _0x586888['push'](_0x586888['shift']());}catch(_0x3ee311){_0x586888['push'](_0x586888['shift']());}}}(_0x24d8,0x3dd33));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x2880(_0x55102f,_0x158dd3){_0x55102f=_0x55102f-0xb2;const _0x24d866=_0x24d8();let _0x2880fb=_0x24d866[_0x55102f];return _0x2880fb;}function _0x24d8(){const _0x4ba79c=['fJTrP','YmNvs','KihPK','848208ytIocR','jPWSv','lDxKg','\x0a✅\x20Cleanup\x20complete!\x0a','38003Cpftej','LWEby','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','trailhead','push','4SdlZyc','plugin','DuGLP','--scope','close','XUSZT','TKLgh','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','StYzs','log','fncPT','UziTI','SvcYE','parse','cCkQk','115042yqxrrM','yPNnS','@ranger-testing/opencode-plugin','YAcOe','IAQfQ','user','claude','sHXwZ','feature-tracker','TOjtW','platform','10TRuzMd','ignore','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','e2e-test-recommender','CAHZE','stringify','OgxSH','replace','864099tFjJYm','AWBdw','uninstall','length','1tJgEOK','filter','OCQDl','1387329UgYfkh','project','880662AiAUCm','Hbpch','9562970XYtrEd'];_0x24d8=function(){return _0x4ba79c;};return _0x24d8();}import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x1ca61e(0xe8),'bug-bash',_0x1ca61e(0xb4)],opencodePluginName=_0x1ca61e(0xe2);function parseJsonc(_0x3deff6){const _0x2c16e4=_0x1ca61e,_0x27cfd1=_0x3deff6['replace'](/\/\*[\s\S]*?\*\//g,''),_0x117f4e=_0x27cfd1[_0x2c16e4(0xb8)](/^\s*\/\/.*$/gm,''),_0x96777e=_0x117f4e['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x2c16e4(0xde)](_0x96777e);}async function removeOpencodePluginConfig(_0x73bc1f){const _0x69efa8=_0x1ca61e,_0x2cadaa={'fJTrP':'string','GieIY':function(_0x56cc5c,_0x2e7a9c){return _0x56cc5c!==_0x2e7a9c;},'yPNnS':function(_0x2d1b99,_0x1d928c){return _0x2d1b99(_0x1d928c);},'fncPT':'utf-8','ACIgx':function(_0x55c258,_0x5bbb05){return _0x55c258(_0x5bbb05);},'yzLwG':function(_0x475550,_0x3f0da1){return _0x475550===_0x3f0da1;},'lvqWO':function(_0x500fd7,_0x25733d){return _0x500fd7===_0x25733d;},'DuGLP':function(_0x31b013,_0x259697){return _0x31b013===_0x259697;},'OgxSH':function(_0xa1d224,_0x377ea9){return _0xa1d224+_0x377ea9;}};if(!_0x2cadaa[_0x69efa8(0xe1)](existsSync,_0x73bc1f))return![];let _0xf44527;try{const _0x49be5c=await readFile(_0x73bc1f,_0x2cadaa[_0x69efa8(0xdb)]);_0xf44527=_0x2cadaa['ACIgx'](parseJsonc,_0x49be5c);}catch{return![];}const _0x2a85ab=Array['isArray'](_0xf44527[_0x69efa8(0xd2)])?_0xf44527['plugin']:[];if(_0x2cadaa['yzLwG'](_0x2a85ab['length'],0x0))return![];const _0x487f61=_0x2a85ab[_0x69efa8(0xbe)](_0x1d4660=>{const _0x237f63=_0x69efa8;if(typeof _0x1d4660!==_0x2cadaa[_0x237f63(0xc5)])return!![];return _0x2cadaa['GieIY'](_0x1d4660,opencodePluginName);});if(_0x2cadaa['lvqWO'](_0x487f61['length'],_0x2a85ab[_0x69efa8(0xbc)]))return![];return _0x2cadaa[_0x69efa8(0xd3)](_0x487f61[_0x69efa8(0xbc)],0x0)?delete _0xf44527['plugin']:_0xf44527['plugin']=_0x487f61,await writeFile(_0x73bc1f,_0x2cadaa[_0x69efa8(0xb7)](JSON[_0x69efa8(0xb6)](_0xf44527,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x3a3f99){const _0x312a23=_0x1ca61e,_0x17b221={'OCQDl':function(_0x3da2b4,_0x4254f2){return _0x3da2b4===_0x4254f2;},'StYzs':function(_0x12b41c,_0x3a2cdd){return _0x12b41c(_0x3a2cdd);},'huKkn':_0x312a23(0xbb),'QAYyi':'ranger@trailhead','Watlu':function(_0x31127b){return _0x31127b();},'NHFcT':'win32','SvcYE':_0x312a23(0xd5),'MlvLV':'error'};return new Promise(_0x20d97f=>{const _0x25860a=_0x312a23,_0xd20f47={'mqfjX':function(_0xd86227,_0x4ad886){const _0xac0c35=_0x2880;return _0x17b221[_0xac0c35(0xbf)](_0xd86227,_0x4ad886);},'CAHZE':function(_0x4206c7,_0x8447ab){const _0x55dbe0=_0x2880;return _0x17b221[_0x55dbe0(0xd9)](_0x4206c7,_0x8447ab);}},_0x45c84f=['plugin',_0x17b221['huKkn'],_0x17b221['QAYyi']];_0x3a3f99&&_0x45c84f[_0x25860a(0xd0)](_0x25860a(0xd4),_0x3a3f99);const _0x596da2=spawn(_0x25860a(0xe6),_0x45c84f,{'stdio':['ignore','ignore','ignore'],'cwd':_0x3a3f99?_0x17b221['Watlu'](getProjectRoot):undefined,'shell':process[_0x25860a(0xea)]===_0x17b221['NHFcT']});_0x596da2['on'](_0x17b221[_0x25860a(0xdd)],_0x27cd2e=>{_0x20d97f(_0xd20f47['mqfjX'](_0x27cd2e,0x0));}),_0x596da2['on'](_0x17b221['MlvLV'],()=>{const _0x2e2e79=_0x25860a;_0xd20f47[_0x2e2e79(0xb5)](_0x20d97f,![]);});});}async function removeMarketplace(){const _0x15bea4=_0x1ca61e,_0x17079d={'AWBdw':_0x15bea4(0xe6),'YAcOe':'marketplace','JlGmP':'remove','UziTI':_0x15bea4(0xb2),'YmNvs':'win32'};return new Promise(_0x480d5d=>{const _0x3b4994=_0x15bea4,_0x4a44a2=spawn(_0x17079d[_0x3b4994(0xba)],['plugin',_0x17079d[_0x3b4994(0xe3)],_0x17079d['JlGmP'],_0x3b4994(0xcf)],{'stdio':[_0x17079d['UziTI'],_0x17079d['UziTI'],_0x17079d[_0x3b4994(0xdc)]],'shell':process['platform']===_0x17079d[_0x3b4994(0xc6)]});_0x4a44a2['on']('close',_0x1af020=>{_0x480d5d(_0x1af020===0x0);}),_0x4a44a2['on']('error',()=>{_0x480d5d(![]);});});}export async function clean(){const _0x155224=_0x1ca61e,_0x49880d={'vkVML':_0x155224(0xce),'cCkQk':'✓\x20Removed\x20stored\x20credentials','jPWSv':function(_0x13fe8d){return _0x13fe8d();},'hgBjs':function(_0x4f6f1a,_0x6492b8){return _0x4f6f1a(_0x6492b8);},'OGKeI':function(_0x3918b2,_0x52d05d,_0x26dc7b){return _0x3918b2(_0x52d05d,_0x26dc7b);},'XUSZT':function(_0x219675,_0xe70210,_0x5f0fa2){return _0x219675(_0xe70210,_0x5f0fa2);},'kYUoP':function(_0x3e138d,_0x1ac38a){return _0x3e138d(_0x1ac38a);},'wPEvI':function(_0x17c562,_0x6e5478,_0x4d9e8a){return _0x17c562(_0x6e5478,_0x4d9e8a);},'LWEby':'user','OKdkS':function(_0x524dd1,_0x5a5ef0,_0x1958fe){return _0x524dd1(_0x5a5ef0,_0x1958fe);},'TKLgh':function(_0x453a4d,_0xa2ca00,_0x32f40b){return _0x453a4d(_0xa2ca00,_0x32f40b);},'sHXwZ':function(_0x194936,_0x12040b){return _0x194936(_0x12040b);},'KihPK':'project','IAQfQ':'opencode.json','lDxKg':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','TOjtW':function(_0x16a205,_0x5648d7){return _0x16a205(_0x5648d7);},'Hbpch':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'};console['log'](_0x49880d['vkVML']);let _0x180f65=![];try{await deleteAllCredentials(),console[_0x155224(0xda)](_0x49880d[_0x155224(0xdf)]),_0x180f65=!![];}catch{}const _0x51376b=_0x49880d[_0x155224(0xc9)](getCacheFile);existsSync(_0x51376b)&&(await _0x49880d['hgBjs'](rm,_0x51376b),_0x180f65=!![]);const _0x2e6c4a=_0x49880d['jPWSv'](getRangerDir);existsSync(_0x2e6c4a)&&(await _0x49880d['OGKeI'](rm,_0x2e6c4a,{'recursive':!![]}),console['log']('✓\x20Removed\x20.ranger/\x20directory'),_0x180f65=!![]);const _0x1bcc22=getProjectSkillsDir();for(const _0x152caf of skillsToRemove){const _0x107e64=join(_0x1bcc22,_0x152caf);existsSync(_0x107e64)&&(await rm(_0x107e64,{'recursive':!![]}),console[_0x155224(0xda)]('✓\x20Removed\x20project\x20skill:\x20'+_0x152caf),_0x180f65=!![]);}const _0x28e706=getUserSkillsDir();for(const _0x274cfb of skillsToRemove){const _0x394655=join(_0x28e706,_0x274cfb);existsSync(_0x394655)&&(await _0x49880d[_0x155224(0xd6)](rm,_0x394655,{'recursive':!![]}),console[_0x155224(0xda)]('✓\x20Removed\x20user\x20skill:\x20'+_0x274cfb),_0x180f65=!![]);}const _0x443ce4=_0x49880d['kYUoP'](getOpencodeSkillsDir,'project');for(const _0x2ede15 of skillsToRemove){const _0x57d776=join(_0x443ce4,_0x2ede15);existsSync(_0x57d776)&&(await _0x49880d['wPEvI'](rm,_0x57d776,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x2ede15),_0x180f65=!![]);}const _0xf1a09f=getOpencodeSkillsDir(_0x49880d[_0x155224(0xcd)]);for(const _0x4b1ece of skillsToRemove){const _0x3a2bbc=join(_0xf1a09f,_0x4b1ece);existsSync(_0x3a2bbc)&&(await _0x49880d['OKdkS'](rm,_0x3a2bbc,{'recursive':!![]}),console['log'](_0x155224(0xb3)+_0x4b1ece),_0x180f65=!![]);}const _0x2b90ce=_0x49880d[_0x155224(0xd7)](join,_0x49880d[_0x155224(0xe7)](getOpencodeConfigDir,_0x49880d[_0x155224(0xc7)]),_0x49880d[_0x155224(0xe4)]);await removeOpencodePluginConfig(_0x2b90ce)&&(console['log'](_0x49880d[_0x155224(0xca)]),_0x180f65=!![]);const _0x4998c5=join(_0x49880d[_0x155224(0xe9)](getOpencodeConfigDir,_0x155224(0xe5)),_0x49880d['IAQfQ']);await _0x49880d[_0x155224(0xe7)](removeOpencodePluginConfig,_0x4998c5)&&(console[_0x155224(0xda)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x180f65=!![]);const _0x166228=await uninstallClaudePlugin();_0x166228&&(console[_0x155224(0xda)](_0x49880d[_0x155224(0xc3)]),_0x180f65=!![]);const _0x177345=await _0x49880d['hgBjs'](uninstallClaudePlugin,_0x155224(0xc1));_0x177345&&(console['log'](_0x155224(0xd8)),_0x180f65=!![]);const _0x271907=await removeMarketplace();_0x271907&&(console[_0x155224(0xda)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x180f65=!![]),_0x180f65?console['log'](_0x155224(0xcb)):console[_0x155224(0xda)]('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ const _0x16243c=_0x553d;(function(_0x723264,_0x2fae8f){const _0x17ddcb=_0x553d,_0x52babc=_0x723264();while(!![]){try{const _0x4ec83b=-parseInt(_0x17ddcb(0x1f4))/0x1*(parseInt(_0x17ddcb(0x1fb))/0x2)+-parseInt(_0x17ddcb(0x1e4))/0x3*(parseInt(_0x17ddcb(0x208))/0x4)+parseInt(_0x17ddcb(0x20d))/0x5*(parseInt(_0x17ddcb(0x1f7))/0x6)+-parseInt(_0x17ddcb(0x209))/0x7+parseInt(_0x17ddcb(0x205))/0x8+-parseInt(_0x17ddcb(0x1f5))/0x9+parseInt(_0x17ddcb(0x20b))/0xa*(parseInt(_0x17ddcb(0x1ec))/0xb);if(_0x4ec83b===_0x2fae8f)break;else _0x52babc['push'](_0x52babc['shift']());}catch(_0x43aceb){_0x52babc['push'](_0x52babc['shift']());}}}(_0x5acb,0x49ba3));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x553d(_0x1bec0c,_0x26a7fc){_0x1bec0c=_0x1bec0c-0x1e1;const _0x5acb21=_0x5acb();let _0x553d6d=_0x5acb21[_0x1bec0c];return _0x553d6d;}import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x5acb(){const _0x1e5f16=['log','49330rpvPjP','819828meHMKb','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','164046WvuvUP','ehbEf','--scope','PFKee','22Qaqzfs','XEgLK','ranger','xMiwG','Nothing\x20to\x20clean\x20up.\x0a','uninstall','rcuXT','qoUXH','replace','Abfyl','1733800RZSPXt','win32','error','8TTijXs','2245957olMWfy','kzstw','20CUHdZQ','Qfnxi','15ENOmAq','user','length','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','TOfyJ','GUcYx','UbPZj','nlECJ','close','ignore','mClfx','✓\x20Removed\x20project\x20skill:\x20','plugin','MELgN','fFbsT','816537qglzXo','HYMYf','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','WADJn','claude','✓\x20Removed\x20.ranger/\x20directory','OaJSP','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','8261935CdkzZf','push','zJJBL','stringify','IjBvc','KFNUH','EfbEY'];_0x5acb=function(){return _0x1e5f16;};return _0x5acb();}import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x16243c(0x1fd),'feature-tracker','bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x3ab0f3){const _0x5757d0=_0x16243c,_0x51dfdc=_0x3ab0f3[_0x5757d0(0x203)](/\/\*[\s\S]*?\*\//g,''),_0x9864b1=_0x51dfdc['replace'](/^\s*\/\/.*$/gm,''),_0x3373a0=_0x9864b1[_0x5757d0(0x203)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x3373a0);}async function removeOpencodePluginConfig(_0x4aa928){const _0x223218=_0x16243c,_0x562e6c={'kYUlk':function(_0x157cbe,_0xbdceb1){return _0x157cbe!==_0xbdceb1;},'EfbEY':function(_0x429b67,_0x55c236){return _0x429b67(_0x55c236);},'xDrFu':function(_0x4f0c9f,_0x53531b){return _0x4f0c9f===_0x53531b;},'Abfyl':function(_0x24d83b,_0x3d2804,_0x53abc4){return _0x24d83b(_0x3d2804,_0x53abc4);},'IjBvc':function(_0x14b8b2,_0x2b8ff1){return _0x14b8b2+_0x2b8ff1;}};if(!_0x562e6c[_0x223218(0x1f2)](existsSync,_0x4aa928))return![];let _0x26a9c0;try{const _0xf9bb88=await readFile(_0x4aa928,'utf-8');_0x26a9c0=parseJsonc(_0xf9bb88);}catch{return![];}const _0x1c535b=Array['isArray'](_0x26a9c0[_0x223218(0x1e1)])?_0x26a9c0[_0x223218(0x1e1)]:[];if(_0x562e6c['xDrFu'](_0x1c535b[_0x223218(0x20f)],0x0))return![];const _0x5ecdc9=_0x1c535b['filter'](_0x43eb34=>{if(typeof _0x43eb34!=='string')return!![];return _0x562e6c['kYUlk'](_0x43eb34,opencodePluginName);});if(_0x562e6c['xDrFu'](_0x5ecdc9['length'],_0x1c535b['length']))return![];return _0x562e6c['xDrFu'](_0x5ecdc9[_0x223218(0x20f)],0x0)?delete _0x26a9c0['plugin']:_0x26a9c0[_0x223218(0x1e1)]=_0x5ecdc9,await _0x562e6c[_0x223218(0x204)](writeFile,_0x4aa928,_0x562e6c[_0x223218(0x1f0)](JSON[_0x223218(0x1ef)](_0x26a9c0,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x3c58b1){const _0x405917=_0x16243c,_0x2e0e66={'GUcYx':'plugin','fFbsT':_0x405917(0x200),'kzstw':'ranger@trailhead','incEC':_0x405917(0x1e8),'ixcFS':_0x405917(0x216),'CFzYQ':function(_0x231655){return _0x231655();},'HYMYf':_0x405917(0x206),'knERL':_0x405917(0x215)};return new Promise(_0x43d0e3=>{const _0x5cd32c=_0x405917,_0x3c0620=[_0x2e0e66[_0x5cd32c(0x212)],_0x2e0e66[_0x5cd32c(0x1e3)],_0x2e0e66[_0x5cd32c(0x20a)]];_0x3c58b1&&_0x3c0620[_0x5cd32c(0x1ed)](_0x5cd32c(0x1f9),_0x3c58b1);const _0x1ea966=spawn(_0x2e0e66['incEC'],_0x3c0620,{'stdio':[_0x2e0e66['ixcFS'],_0x2e0e66['ixcFS'],_0x5cd32c(0x216)],'cwd':_0x3c58b1?_0x2e0e66['CFzYQ'](getProjectRoot):undefined,'shell':process['platform']===_0x2e0e66[_0x5cd32c(0x1e5)]});_0x1ea966['on'](_0x2e0e66['knERL'],_0x3bce51=>{_0x43d0e3(_0x3bce51===0x0);}),_0x1ea966['on'](_0x5cd32c(0x207),()=>{_0x43d0e3(![]);});});}async function removeMarketplace(){const _0x58896a={'OaJSP':function(_0x4dbb1b,_0x50cf6e){return _0x4dbb1b===_0x50cf6e;},'GLLvd':'claude','MELgN':'marketplace','yvbLs':'remove','KFNUH':'trailhead','hpEnt':'ignore','nlECJ':'close'};return new Promise(_0x585dbd=>{const _0x2b95fa=_0x553d,_0x32e271=spawn(_0x58896a['GLLvd'],['plugin',_0x58896a[_0x2b95fa(0x1e2)],_0x58896a['yvbLs'],_0x58896a[_0x2b95fa(0x1f1)]],{'stdio':['ignore',_0x2b95fa(0x216),_0x58896a['hpEnt']],'shell':_0x58896a['OaJSP'](process['platform'],_0x2b95fa(0x206))});_0x32e271['on'](_0x58896a[_0x2b95fa(0x214)],_0x211fd3=>{const _0x3d537b=_0x2b95fa;_0x585dbd(_0x58896a[_0x3d537b(0x1ea)](_0x211fd3,0x0));}),_0x32e271['on'](_0x2b95fa(0x207),()=>{_0x585dbd(![]);});});}export async function clean(){const _0x4c0c56=_0x16243c,_0x1ea0d8={'jUUeI':_0x4c0c56(0x1e6),'zJJBL':function(_0x51ff13){return _0x51ff13();},'Qfnxi':function(_0x1cb9e2){return _0x1cb9e2();},'ehbEf':function(_0xcdcaca,_0x37a0fe){return _0xcdcaca(_0x37a0fe);},'TOfyJ':function(_0x307f57,_0x33fa13,_0x40e84e){return _0x307f57(_0x33fa13,_0x40e84e);},'UbPZj':_0x4c0c56(0x1e9),'WADJn':function(_0x38766a,_0x4317d7,_0x24ad94){return _0x38766a(_0x4317d7,_0x24ad94);},'rcuXT':'project','tbVRC':_0x4c0c56(0x20e),'qoUXH':function(_0x4c4466,_0x600434){return _0x4c4466(_0x600434);},'QoJcD':function(_0x1d36a0,_0x430cfc,_0x44ee12){return _0x1d36a0(_0x430cfc,_0x44ee12);},'XEgLK':function(_0x3241c5,_0x3c15cb){return _0x3241c5(_0x3c15cb);},'PFKee':_0x4c0c56(0x210),'xMiwG':'opencode.json','Srjhu':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','mClfx':_0x4c0c56(0x1f6),'FyXzF':'\x0a✅\x20Cleanup\x20complete!\x0a'};console[_0x4c0c56(0x1f3)](_0x1ea0d8['jUUeI']);let _0x2a963f=![];try{await deleteAllCredentials(),console['log']('✓\x20Removed\x20stored\x20credentials'),_0x2a963f=!![];}catch{}const _0x151139=_0x1ea0d8[_0x4c0c56(0x1ee)](getCacheFile);existsSync(_0x151139)&&(await rm(_0x151139),_0x2a963f=!![]);const _0x1a5b13=_0x1ea0d8[_0x4c0c56(0x20c)](getRangerDir);_0x1ea0d8[_0x4c0c56(0x1f8)](existsSync,_0x1a5b13)&&(await _0x1ea0d8['TOfyJ'](rm,_0x1a5b13,{'recursive':!![]}),console[_0x4c0c56(0x1f3)](_0x1ea0d8[_0x4c0c56(0x213)]),_0x2a963f=!![]);const _0x155707=getProjectSkillsDir();for(const _0x5107f1 of skillsToRemove){const _0x36eb61=join(_0x155707,_0x5107f1);existsSync(_0x36eb61)&&(await _0x1ea0d8[_0x4c0c56(0x1e7)](rm,_0x36eb61,{'recursive':!![]}),console['log'](_0x4c0c56(0x218)+_0x5107f1),_0x2a963f=!![]);}const _0x1a5d3c=_0x1ea0d8[_0x4c0c56(0x1ee)](getUserSkillsDir);for(const _0x5ae4e1 of skillsToRemove){const _0x1385d1=_0x1ea0d8['TOfyJ'](join,_0x1a5d3c,_0x5ae4e1);existsSync(_0x1385d1)&&(await rm(_0x1385d1,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x5ae4e1),_0x2a963f=!![]);}const _0x1d2d66=getOpencodeSkillsDir(_0x1ea0d8[_0x4c0c56(0x201)]);for(const _0x14ca82 of skillsToRemove){const _0x249432=_0x1ea0d8['TOfyJ'](join,_0x1d2d66,_0x14ca82);existsSync(_0x249432)&&(await rm(_0x249432,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x14ca82),_0x2a963f=!![]);}const _0x334fd0=getOpencodeSkillsDir(_0x1ea0d8['tbVRC']);for(const _0x1134f0 of skillsToRemove){const _0x2e537d=join(_0x334fd0,_0x1134f0);_0x1ea0d8[_0x4c0c56(0x202)](existsSync,_0x2e537d)&&(await _0x1ea0d8['QoJcD'](rm,_0x2e537d,{'recursive':!![]}),console[_0x4c0c56(0x1f3)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x1134f0),_0x2a963f=!![]);}const _0x2b2b5f=join(_0x1ea0d8[_0x4c0c56(0x1fc)](getOpencodeConfigDir,_0x1ea0d8['rcuXT']),'opencode.json');await _0x1ea0d8[_0x4c0c56(0x1f8)](removeOpencodePluginConfig,_0x2b2b5f)&&(console[_0x4c0c56(0x1f3)](_0x1ea0d8[_0x4c0c56(0x1fa)]),_0x2a963f=!![]);const _0x597674=_0x1ea0d8[_0x4c0c56(0x211)](join,_0x1ea0d8['XEgLK'](getOpencodeConfigDir,_0x4c0c56(0x20e)),_0x1ea0d8[_0x4c0c56(0x1fe)]);await _0x1ea0d8['ehbEf'](removeOpencodePluginConfig,_0x597674)&&(console['log'](_0x1ea0d8['Srjhu']),_0x2a963f=!![]);const _0x47565b=await uninstallClaudePlugin();_0x47565b&&(console[_0x4c0c56(0x1f3)](_0x4c0c56(0x1eb)),_0x2a963f=!![]);const _0x301614=await uninstallClaudePlugin(_0x1ea0d8['rcuXT']);_0x301614&&(console[_0x4c0c56(0x1f3)](_0x1ea0d8[_0x4c0c56(0x217)]),_0x2a963f=!![]);const _0x1c004c=await _0x1ea0d8['zJJBL'](removeMarketplace);_0x1c004c&&(console[_0x4c0c56(0x1f3)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x2a963f=!![]),_0x2a963f?console['log'](_0x1ea0d8['FyXzF']):console['log'](_0x4c0c56(0x1ff));}
@@ -1 +1 @@
1
- const _0x576a7e=_0x444d;(function(_0x52d19e,_0x2e0fd2){const _0x5c396c=_0x444d,_0x4b7cad=_0x52d19e();while(!![]){try{const _0x944ba4=-parseInt(_0x5c396c(0x1f3))/0x1*(-parseInt(_0x5c396c(0x208))/0x2)+parseInt(_0x5c396c(0x1f1))/0x3+parseInt(_0x5c396c(0x1fc))/0x4+-parseInt(_0x5c396c(0x20b))/0x5+-parseInt(_0x5c396c(0x20e))/0x6*(parseInt(_0x5c396c(0x1f7))/0x7)+parseInt(_0x5c396c(0x217))/0x8+parseInt(_0x5c396c(0x213))/0x9*(-parseInt(_0x5c396c(0x1ee))/0xa);if(_0x944ba4===_0x2e0fd2)break;else _0x4b7cad['push'](_0x4b7cad['shift']());}catch(_0xb3e289){_0x4b7cad['push'](_0x4b7cad['shift']());}}}(_0x2f6a,0xaf8b5));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x576a7e(0x200),_0x576a7e(0x209),_0x576a7e(0x1ff)];function parseLocalValue(_0x2bc58a,_0x2cc529){const _0x1cbb7b=_0x576a7e,_0x5be45a={'tFmNb':function(_0xf9d30f,_0x315eea){return _0xf9d30f===_0x315eea;},'FJTqo':'false'};if(BOOLEAN_KEYS[_0x1cbb7b(0x1ef)](_0x2bc58a)){if(_0x2cc529==='true')return!![];if(_0x5be45a[_0x1cbb7b(0x210)](_0x2cc529,_0x5be45a['FJTqo']))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x2bc58a+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x2cc529;}function parseOverrideValue(_0x11dc7f){const _0x1c25e6=_0x576a7e,_0x435818={'NwLgO':function(_0x43661f,_0x5a8b40){return _0x43661f===_0x5a8b40;},'APhKd':_0x1c25e6(0x215),'OpxIL':'undefined','BrZHO':function(_0x264d77,_0x2884ca){return _0x264d77(_0x2884ca);}};if(_0x435818[_0x1c25e6(0x1fe)](_0x11dc7f,_0x435818['APhKd']))return!![];if(_0x11dc7f===_0x1c25e6(0x216))return![];if(_0x11dc7f===_0x1c25e6(0x204))return null;if(_0x435818[_0x1c25e6(0x1fe)](_0x11dc7f,_0x435818[_0x1c25e6(0x211)]))return undefined;if(/^-?\d+$/['test'](_0x11dc7f)){const _0xf2411b=_0x435818[_0x1c25e6(0x1f8)](Number,_0x11dc7f);if(Number['isSafeInteger'](_0xf2411b))return _0xf2411b;}if(/^-?\d+\.\d+$/['test'](_0x11dc7f)){const _0x46ef15=_0x435818['BrZHO'](Number,_0x11dc7f);if(!Number['isNaN'](_0x46ef15))return _0x46ef15;}const _0xaf7eb3=_0x11dc7f[_0x1c25e6(0x21d)]();if(_0xaf7eb3[_0x1c25e6(0x1fd)]('{')&&_0xaf7eb3['endsWith']('}')||_0xaf7eb3['startsWith']('[')&&_0xaf7eb3['endsWith'](']'))try{return JSON['parse'](_0xaf7eb3);}catch{}return _0x11dc7f;}async function resolveProfileTarget(_0x1fce55){const _0x899b32=_0x576a7e,_0x111085={'WHEmn':function(_0x3343cb,_0x5a79f9){return _0x3343cb(_0x5a79f9);},'onQNs':function(_0xd457d0,_0x4c0b1b){return _0xd457d0(_0x4c0b1b);},'YMRdZ':'local'},_0xd5c76e=existsSync(_0x111085['WHEmn'](getEnvDir,_0x1fce55));let _0x2afba2=![];try{const _0x54b784=await _0x111085['onQNs'](fetchCloudProfile,_0x1fce55);_0x2afba2=Boolean(_0x54b784);}catch{}if(_0x2afba2)return{'kind':'cloud','alsoExistsElsewhere':_0xd5c76e};if(_0xd5c76e)return{'kind':_0x111085[_0x899b32(0x1f5)],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x1fce55+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x1fce55);}function _0x444d(_0x5aa33b,_0x418bd9){_0x5aa33b=_0x5aa33b-0x1ee;const _0x2f6a0e=_0x2f6a();let _0x444d48=_0x2f6a0e[_0x5aa33b];return _0x444d48;}function printDualExistsHint(_0x1e7f92){const _0x11be7a=_0x576a7e;console['log'](_0x11be7a(0x207)+_0x1e7f92+_0x11be7a(0x21e));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x2376d7){const _0x39304b={'WlZtk':function(_0x37a189,_0x14bb39){return _0x37a189(_0x14bb39);}},_0x1fe291=await _0x39304b['WlZtk'](fetchCloudProfile,_0x2376d7),_0x2eae20=readProfileOverrides(getProjectPath(),_0x2376d7);return mergeCloudProfileSettings(_0x1fe291?.['settings']??{},_0x2eae20??undefined);}function _0x2f6a(){const _0x151f44=['BrZHO','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','length','kind','3825776JXIrkG','startsWith','NwLgO','forceLogin','headless','Key\x20\x22','object','(not\x20set)','null','No\x20configuration\x20set\x20for\x20\x22','piVAo','\x20\x20Note:\x20\x22','2zjuUAE','allowInsecureLocalhost','KjflE','6902080lDOcJN','rsHsU','Removed\x20','18wcAnqV','Dffiy','tFmNb','OpxIL','cloud','3132306HlEnTy','yUXBp','true','false','3190984RVHrWw','\x20for\x20\x22','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','WYOue','psmOp','Set\x20','trim','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','20ikumvj','includes','log','3860340vFWwon','\x20=\x20','419201neXVox','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','YMRdZ','stringify','620165AbvFTA'];_0x2f6a=function(){return _0x151f44;};return _0x2f6a();}export async function configSet(_0x309910,_0x3b9d00,_0x5c3b0f){const _0x56f87b=_0x576a7e,_0x3b844c={'HAGDr':function(_0x4444f2,_0x423791){return _0x4444f2(_0x423791);},'rsHsU':function(_0x277adf,_0x4626c6){return _0x277adf===_0x4626c6;},'CRUIu':_0x56f87b(0x212),'faojP':function(_0x1e2898,_0x5bab33,_0x340bea,_0xfc88f9,_0x4a8bee){return _0x1e2898(_0x5bab33,_0x340bea,_0xfc88f9,_0x4a8bee);},'YRPuL':function(_0x4dd68e,_0x394ef9,_0x417eca){return _0x4dd68e(_0x394ef9,_0x417eca);},'piVAo':function(_0xf4e50d){return _0xf4e50d();}},_0x4114b5=await _0x3b844c['HAGDr'](resolveProfileTarget,_0x309910);if(_0x3b844c[_0x56f87b(0x20c)](_0x4114b5['kind'],_0x3b844c['CRUIu'])){if(_0x4114b5['alsoExistsElsewhere'])printDualExistsHint(_0x309910);const _0x2cc762=parseOverrideValue(_0x5c3b0f);_0x3b844c['faojP'](setProfileOverride,getProjectPath(),_0x309910,_0x3b9d00,_0x2cc762),console['log'](_0x56f87b(0x21c)+_0x3b9d00+_0x56f87b(0x1f2)+JSON[_0x56f87b(0x1f6)](_0x2cc762)+_0x56f87b(0x218)+_0x309910+'\x22');return;}const _0xe96074=_0x3b844c['YRPuL'](parseLocalValue,_0x3b9d00,_0x5c3b0f);setProfileOverride(_0x3b844c[_0x56f87b(0x206)](getProjectPath),_0x309910,_0x3b9d00,_0xe96074),console['log'](_0x56f87b(0x21c)+_0x3b9d00+'\x20=\x20'+_0xe96074+_0x56f87b(0x218)+_0x309910+'\x22');}export async function configGet(_0x3aa5c1,_0x4273a0){const _0x178c66=_0x576a7e,_0xccd180={'WYOue':function(_0x26d79f,_0x3d8c95){return _0x26d79f(_0x3d8c95);},'gAyaq':function(_0x2215d2,_0x105fa2){return _0x2215d2===_0x105fa2;},'htIRz':'cloud','yUXBp':function(_0x697c58,_0x14d82e,_0x528099){return _0x697c58(_0x14d82e,_0x528099);}},_0x2e35c5=await _0xccd180['WYOue'](resolveProfileTarget,_0x3aa5c1);if(_0xccd180['gAyaq'](_0x2e35c5[_0x178c66(0x1fb)],_0xccd180['htIRz'])){const _0x142971=await _0xccd180[_0x178c66(0x21a)](loadEffectiveCloudSettings,_0x3aa5c1),_0x48342c=_0xccd180[_0x178c66(0x214)](getNestedValue,_0x142971,_0x4273a0);if(_0x48342c===undefined)console[_0x178c66(0x1f0)]('(not\x20set)');else typeof _0x48342c==='object'?console['log'](JSON['stringify'](_0x48342c,null,0x2)):console['log'](_0x48342c);return;}const _0xc40574=await loadSettings(_0x3aa5c1),_0x2084fc=getNestedValue(_0xc40574,_0x4273a0);if(_0x2084fc===undefined)console[_0x178c66(0x1f0)](_0x178c66(0x203));else typeof _0x2084fc===_0x178c66(0x202)?console['log'](JSON[_0x178c66(0x1f6)](_0x2084fc,null,0x2)):console['log'](_0x2084fc);}export async function configList(_0x114c0e){const _0x19aebc=_0x576a7e,_0x5e5e40={'psmOp':function(_0xe29cea,_0x399b2a){return _0xe29cea===_0x399b2a;},'hYRGa':function(_0x3e9cc1,_0x24e659){return _0x3e9cc1(_0x24e659);},'KjflE':function(_0x82741f,_0x261229){return _0x82741f===_0x261229;}},_0x1a600f=await resolveProfileTarget(_0x114c0e);if(_0x5e5e40[_0x19aebc(0x21b)](_0x1a600f[_0x19aebc(0x1fb)],'cloud')){const _0x2ce7d9=await _0x5e5e40['hYRGa'](loadEffectiveCloudSettings,_0x114c0e);if(!_0x2ce7d9||_0x5e5e40[_0x19aebc(0x20a)](Object['keys'](_0x2ce7d9)[_0x19aebc(0x1fa)],0x0)){console[_0x19aebc(0x1f0)]('No\x20configuration\x20set\x20for\x20\x22'+_0x114c0e+'\x22');return;}console['log'](JSON['stringify'](_0x2ce7d9,null,0x2));return;}const _0x63a802=getSettingsPath(_0x114c0e);if(!existsSync(_0x63a802)){console['log'](_0x19aebc(0x205)+_0x114c0e+'\x22');return;}const _0x2f65bf=await loadSettings(_0x114c0e),_0x4794fc=_0x5e5e40['hYRGa'](formatSettings,_0x2f65bf);!_0x4794fc?console['log'](_0x19aebc(0x205)+_0x114c0e+'\x22'):console[_0x19aebc(0x1f0)](_0x4794fc);}export async function configUnset(_0x47a13b,_0x51a1dd){const _0x346346=_0x576a7e,_0x3c9cf5={'Dffiy':function(_0x771758,_0x29b4b9){return _0x771758(_0x29b4b9);},'zXMuZ':function(_0x2e0dc6,_0x41e65e){return _0x2e0dc6===_0x41e65e;}},_0x2b6589=await _0x3c9cf5['Dffiy'](resolveProfileTarget,_0x47a13b);if(_0x3c9cf5['zXMuZ'](_0x2b6589['kind'],_0x346346(0x212))){if(_0x2b6589['alsoExistsElsewhere'])_0x3c9cf5['Dffiy'](printDualExistsHint,_0x47a13b);const _0x211df2=unsetProfileOverride(getProjectPath(),_0x47a13b,_0x51a1dd);_0x211df2?console[_0x346346(0x1f0)]('Removed\x20'+_0x51a1dd+_0x346346(0x218)+_0x47a13b+'\x22'):console[_0x346346(0x1f0)](_0x346346(0x201)+_0x51a1dd+'\x22\x20not\x20found');return;}const _0x1718c8=unsetProfileOverride(getProjectPath(),_0x47a13b,_0x51a1dd);if(_0x1718c8){console[_0x346346(0x1f0)](_0x346346(0x20d)+_0x51a1dd);return;}const _0x261da9=await _0x3c9cf5[_0x346346(0x20f)](loadSettings,_0x47a13b),_0x38f405=deleteNestedValue(_0x261da9,_0x51a1dd);_0x38f405?console['log']('Key\x20\x22'+_0x51a1dd+_0x346346(0x1f4)+_0x47a13b+_0x346346(0x219)):console[_0x346346(0x1f0)]('Key\x20\x22'+_0x51a1dd+'\x22\x20not\x20found');}export async function configReset(_0x2b3519){const _0x469edf=_0x576a7e,_0x304a1f={'grnyI':function(_0x3db1e1,_0x1071e3){return _0x3db1e1===_0x1071e3;},'pmMjn':function(_0x4c31fd){return _0x4c31fd();}},_0x6993dc=await resolveProfileTarget(_0x2b3519);if(_0x304a1f['grnyI'](_0x6993dc[_0x469edf(0x1fb)],'cloud')){resetProfileOverrides(_0x304a1f['pmMjn'](getProjectPath),_0x2b3519),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x2b3519+'\x22');return;}console[_0x469edf(0x1f0)]('\x22'+_0x2b3519+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x2b3519+_0x469edf(0x1f9));}
1
+ const _0x453696=_0x2b20;(function(_0x5f00cc,_0x53835e){const _0x55fde6=_0x2b20,_0x16377e=_0x5f00cc();while(!![]){try{const _0x490d57=-parseInt(_0x55fde6(0xf0))/0x1+-parseInt(_0x55fde6(0xf8))/0x2+parseInt(_0x55fde6(0xfe))/0x3+-parseInt(_0x55fde6(0x103))/0x4*(parseInt(_0x55fde6(0xec))/0x5)+parseInt(_0x55fde6(0x101))/0x6*(-parseInt(_0x55fde6(0xee))/0x7)+-parseInt(_0x55fde6(0xf1))/0x8+parseInt(_0x55fde6(0xe0))/0x9;if(_0x490d57===_0x53835e)break;else _0x16377e['push'](_0x16377e['shift']());}catch(_0x1b485c){_0x16377e['push'](_0x16377e['shift']());}}}(_0x547e,0x58faa));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x453696(0x104),'allowInsecureLocalhost',_0x453696(0x109)];function parseLocalValue(_0x1620cb,_0x31d85b){const _0x75e49c=_0x453696,_0x2993df={'pgZTD':function(_0x5df8ab,_0x488c5f){return _0x5df8ab===_0x488c5f;},'xVASb':_0x75e49c(0xdb)};if(BOOLEAN_KEYS[_0x75e49c(0x105)](_0x1620cb)){if(_0x31d85b===_0x75e49c(0x100))return!![];if(_0x2993df['pgZTD'](_0x31d85b,_0x2993df[_0x75e49c(0xf6)]))return![];throw new Error(_0x75e49c(0xe7)+_0x1620cb+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x31d85b;}function parseOverrideValue(_0x50df2a){const _0x28f0e0=_0x453696,_0x526c79={'GWpdU':'true','CQxsa':function(_0x36de15,_0x516f70){return _0x36de15===_0x516f70;},'hZHxO':_0x28f0e0(0xeb),'jRGzM':_0x28f0e0(0xdc),'RcLor':function(_0xf7441f,_0x39b3b5){return _0xf7441f(_0x39b3b5);}};if(_0x50df2a===_0x526c79['GWpdU'])return!![];if(_0x526c79[_0x28f0e0(0xed)](_0x50df2a,_0x28f0e0(0xdb)))return![];if(_0x50df2a===_0x526c79['hZHxO'])return null;if(_0x526c79[_0x28f0e0(0xed)](_0x50df2a,_0x526c79['jRGzM']))return undefined;if(/^-?\d+$/['test'](_0x50df2a)){const _0x27546e=_0x526c79['RcLor'](Number,_0x50df2a);if(Number[_0x28f0e0(0xe5)](_0x27546e))return _0x27546e;}if(/^-?\d+\.\d+$/[_0x28f0e0(0xef)](_0x50df2a)){const _0x4d5a0e=Number(_0x50df2a);if(!Number[_0x28f0e0(0xf2)](_0x4d5a0e))return _0x4d5a0e;}const _0x187fd7=_0x50df2a['trim']();if(_0x187fd7[_0x28f0e0(0xe2)]('{')&&_0x187fd7[_0x28f0e0(0xdd)]('}')||_0x187fd7[_0x28f0e0(0xe2)]('[')&&_0x187fd7[_0x28f0e0(0xdd)](']'))try{return JSON['parse'](_0x187fd7);}catch{}return _0x50df2a;}function _0x547e(){const _0x5b97ab=['forceLogin','Key\x20\x22','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','\x20\x20Note:\x20\x22','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','kHwNY','false','undefined','endsWith','stringify','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','22267242VDDQlb','cloud','startsWith','keys','kind','isSafeInteger','No\x20configuration\x20set\x20for\x20\x22','Invalid\x20value\x20for\x20','MYrkn','Set\x20','FizTn','null','38435hpaCxw','CQxsa','2168957fodCpg','test','686572uIEARw','1711768LzlKEr','isNaN','Profile\x20\x22','object','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','xVASb','EGvsA','728166vXtnAs','KWOFA','fyayL','tvybt','Removed\x20','local','539064tMpFXh','\x20for\x20\x22','true','6qKjieW','zvtBx','372HNEFyC','headless','includes','oYPRy','log','NwIap'];_0x547e=function(){return _0x5b97ab;};return _0x547e();}function _0x2b20(_0x3d7217,_0x4dba72){_0x3d7217=_0x3d7217-0xd9;const _0x547e58=_0x547e();let _0x2b206f=_0x547e58[_0x3d7217];return _0x2b206f;}async function resolveProfileTarget(_0x54007a){const _0x2e89f9=_0x453696,_0x2637f5={'wvIGr':function(_0x441e27,_0x301e2d){return _0x441e27(_0x301e2d);},'oYPRy':_0x2e89f9(0xe1)},_0x379b6d=_0x2637f5['wvIGr'](existsSync,getEnvDir(_0x54007a));let _0x359d6e=![];try{const _0x2ecc8c=await fetchCloudProfile(_0x54007a);_0x359d6e=Boolean(_0x2ecc8c);}catch{}if(_0x359d6e)return{'kind':_0x2637f5[_0x2e89f9(0x106)],'alsoExistsElsewhere':_0x379b6d};if(_0x379b6d)return{'kind':_0x2e89f9(0xfd),'alsoExistsElsewhere':![]};throw new Error(_0x2e89f9(0xf3)+_0x54007a+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x54007a);}function printDualExistsHint(_0x3c4fdb){const _0x5551a4=_0x453696;console[_0x5551a4(0x107)](_0x5551a4(0x10c)+_0x3c4fdb+_0x5551a4(0x10b));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x3137eb){const _0x302b65=_0x453696,_0x2558c4={'NwIap':function(_0x34573e,_0xcbecf1,_0x4547a8){return _0x34573e(_0xcbecf1,_0x4547a8);}},_0x29b9d6=await fetchCloudProfile(_0x3137eb),_0x25f2b8=readProfileOverrides(getProjectPath(),_0x3137eb);return _0x2558c4[_0x302b65(0x108)](mergeCloudProfileSettings,_0x29b9d6?.['settings']??{},_0x25f2b8??undefined);}export async function configSet(_0x179fc2,_0x3b02fa,_0x33fe51){const _0x23b418=_0x453696,_0x16c426={'fyayL':function(_0x55d1b0,_0x8b020d){return _0x55d1b0(_0x8b020d);},'tvybt':function(_0x1d2acf,_0x2a02e6){return _0x1d2acf===_0x2a02e6;},'VKaaQ':'cloud','bdSJc':function(_0x544c0a,_0x4c7a81,_0x3c274b,_0x37f16b,_0x1dd9f3){return _0x544c0a(_0x4c7a81,_0x3c274b,_0x37f16b,_0x1dd9f3);}},_0x50654e=await _0x16c426[_0x23b418(0xfa)](resolveProfileTarget,_0x179fc2);if(_0x16c426[_0x23b418(0xfb)](_0x50654e['kind'],_0x16c426['VKaaQ'])){if(_0x50654e['alsoExistsElsewhere'])printDualExistsHint(_0x179fc2);const _0x425043=parseOverrideValue(_0x33fe51);setProfileOverride(getProjectPath(),_0x179fc2,_0x3b02fa,_0x425043),console['log']('Set\x20'+_0x3b02fa+'\x20=\x20'+JSON['stringify'](_0x425043)+'\x20for\x20\x22'+_0x179fc2+'\x22');return;}const _0x198115=parseLocalValue(_0x3b02fa,_0x33fe51);_0x16c426['bdSJc'](setProfileOverride,getProjectPath(),_0x179fc2,_0x3b02fa,_0x198115),console[_0x23b418(0x107)](_0x23b418(0xe9)+_0x3b02fa+'\x20=\x20'+_0x198115+_0x23b418(0xff)+_0x179fc2+'\x22');}export async function configGet(_0x34a007,_0x5eba12){const _0x504332=_0x453696,_0x2e0073={'EGvsA':function(_0x5ebc79,_0x5df230){return _0x5ebc79===_0x5df230;},'FizTn':function(_0x3b6c03,_0x2957e0){return _0x3b6c03===_0x2957e0;},'OFtrU':_0x504332(0xf4)},_0x1dac22=await resolveProfileTarget(_0x34a007);if(_0x1dac22['kind']===_0x504332(0xe1)){const _0x2d8f81=await loadEffectiveCloudSettings(_0x34a007),_0x3497e2=getNestedValue(_0x2d8f81,_0x5eba12);if(_0x2e0073[_0x504332(0xf7)](_0x3497e2,undefined))console[_0x504332(0x107)]('(not\x20set)');else typeof _0x3497e2===_0x504332(0xf4)?console[_0x504332(0x107)](JSON[_0x504332(0xde)](_0x3497e2,null,0x2)):console[_0x504332(0x107)](_0x3497e2);return;}const _0x4e9ef1=await loadSettings(_0x34a007),_0x1f51af=getNestedValue(_0x4e9ef1,_0x5eba12);if(_0x1f51af===undefined)console['log']('(not\x20set)');else _0x2e0073[_0x504332(0xea)](typeof _0x1f51af,_0x2e0073['OFtrU'])?console['log'](JSON['stringify'](_0x1f51af,null,0x2)):console[_0x504332(0x107)](_0x1f51af);}export async function configList(_0x4d413c){const _0x24cf8e=_0x453696,_0x2f0f8d={'yXpAz':function(_0x37b1fa,_0x5c176a){return _0x37b1fa(_0x5c176a);},'KWOFA':function(_0x3595cb,_0x4f5e4a){return _0x3595cb===_0x4f5e4a;},'Fnsfb':function(_0x51202f,_0x4d0e08){return _0x51202f(_0x4d0e08);},'zvtBx':function(_0x5a1efd,_0x33f461){return _0x5a1efd(_0x33f461);}},_0x2f7eba=await _0x2f0f8d['yXpAz'](resolveProfileTarget,_0x4d413c);if(_0x2f0f8d[_0x24cf8e(0xf9)](_0x2f7eba[_0x24cf8e(0xe4)],_0x24cf8e(0xe1))){const _0x23acbd=await loadEffectiveCloudSettings(_0x4d413c);if(!_0x23acbd||Object[_0x24cf8e(0xe3)](_0x23acbd)['length']===0x0){console['log'](_0x24cf8e(0xe6)+_0x4d413c+'\x22');return;}console[_0x24cf8e(0x107)](JSON[_0x24cf8e(0xde)](_0x23acbd,null,0x2));return;}const _0x46902d=_0x2f0f8d['Fnsfb'](getSettingsPath,_0x4d413c);if(!existsSync(_0x46902d)){console[_0x24cf8e(0x107)](_0x24cf8e(0xe6)+_0x4d413c+'\x22');return;}const _0x193d25=await loadSettings(_0x4d413c),_0x4901c2=_0x2f0f8d[_0x24cf8e(0x102)](formatSettings,_0x193d25);!_0x4901c2?console[_0x24cf8e(0x107)]('No\x20configuration\x20set\x20for\x20\x22'+_0x4d413c+'\x22'):console[_0x24cf8e(0x107)](_0x4901c2);}export async function configUnset(_0x4239b3,_0x196b4b){const _0x248b2d=_0x453696,_0x24cca9={'MYrkn':function(_0x42be8a,_0x1cd2ca){return _0x42be8a(_0x1cd2ca);},'eiLZL':function(_0x3c9c7c,_0xf112e9){return _0x3c9c7c===_0xf112e9;},'TNKJw':function(_0x1458ea,_0x34b0ff,_0x26de4a,_0x365acb){return _0x1458ea(_0x34b0ff,_0x26de4a,_0x365acb);},'BRZLA':function(_0x4e05ec,_0x589a30){return _0x4e05ec(_0x589a30);}},_0x212fc7=await _0x24cca9[_0x248b2d(0xe8)](resolveProfileTarget,_0x4239b3);if(_0x24cca9['eiLZL'](_0x212fc7[_0x248b2d(0xe4)],'cloud')){if(_0x212fc7['alsoExistsElsewhere'])printDualExistsHint(_0x4239b3);const _0x16d35b=unsetProfileOverride(getProjectPath(),_0x4239b3,_0x196b4b);_0x16d35b?console[_0x248b2d(0x107)](_0x248b2d(0xfc)+_0x196b4b+'\x20for\x20\x22'+_0x4239b3+'\x22'):console['log']('Key\x20\x22'+_0x196b4b+'\x22\x20not\x20found');return;}const _0x20a117=_0x24cca9['TNKJw'](unsetProfileOverride,getProjectPath(),_0x4239b3,_0x196b4b);if(_0x20a117){console['log'](_0x248b2d(0xfc)+_0x196b4b);return;}const _0x3590bf=await _0x24cca9['BRZLA'](loadSettings,_0x4239b3),_0x47f945=deleteNestedValue(_0x3590bf,_0x196b4b);_0x47f945?console['log']('Key\x20\x22'+_0x196b4b+_0x248b2d(0xd9)+_0x4239b3+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x248b2d(0x107)](_0x248b2d(0x10a)+_0x196b4b+'\x22\x20not\x20found');}export async function configReset(_0x297138){const _0x588dc3=_0x453696,_0x3b981f={'kHwNY':function(_0x23b70f,_0x71b6bb){return _0x23b70f(_0x71b6bb);},'BEBAU':'cloud'},_0x51785=await _0x3b981f[_0x588dc3(0xda)](resolveProfileTarget,_0x297138);if(_0x51785[_0x588dc3(0xe4)]===_0x3b981f['BEBAU']){resetProfileOverrides(getProjectPath(),_0x297138),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x297138+'\x22');return;}console[_0x588dc3(0x107)]('\x22'+_0x297138+_0x588dc3(0xdf)+_0x297138+_0x588dc3(0xf5));}
@@ -1 +1 @@
1
- (function(_0xd856b9,_0x134a3c){const _0x4fe3a4=_0x2794,_0xa4c366=_0xd856b9();while(!![]){try{const _0x43b581=-parseInt(_0x4fe3a4(0x14a))/0x1*(parseInt(_0x4fe3a4(0x154))/0x2)+parseInt(_0x4fe3a4(0x153))/0x3+-parseInt(_0x4fe3a4(0x15a))/0x4*(-parseInt(_0x4fe3a4(0x15b))/0x5)+parseInt(_0x4fe3a4(0x14b))/0x6+-parseInt(_0x4fe3a4(0x14d))/0x7+-parseInt(_0x4fe3a4(0x152))/0x8*(-parseInt(_0x4fe3a4(0x14e))/0x9)+-parseInt(_0x4fe3a4(0x151))/0xa;if(_0x43b581===_0x134a3c)break;else _0xa4c366['push'](_0xa4c366['shift']());}catch(_0x248345){_0xa4c366['push'](_0xa4c366['shift']());}}}(_0x4ef2,0xa66ff));function _0x4ef2(){const _0xa64608=['cwd','959668AQeWQt','20STJdEJ','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','427vmVHXK','5402694rRmfqB','Cloud\x20profile\x20\x22','2979802GcEbpN','9ruBhqn','RUSYF','\x22\x20for\x20everyone\x20in\x20your\x20organization.','12859390SUAkip','5054344JrskaL','1637355EzKWVw','3018xBOjqZ','CIDvW','jYKEs','prompt','✓\x20Deleted\x20cloud\x20profile\x20\x22'];_0x4ef2=function(){return _0xa64608;};return _0x4ef2();}import _0x2f0b3c from'inquirer';function _0x2794(_0x3e9c0c,_0x56b659){_0x3e9c0c=_0x3e9c0c-0x14a;const _0x4ef252=_0x4ef2();let _0x2794dd=_0x4ef252[_0x3e9c0c];return _0x2794dd;}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x29e73a,_0x551500={}){const _0x306ce5=_0x2794,_0x5f3bdd={'CIDvW':function(_0x2926f1,_0xd727c3){return _0x2926f1(_0xd727c3);},'RUSYF':function(_0x4fe050){return _0x4fe050();},'jrrFb':function(_0x553734,_0xe219ff){return _0x553734!==_0xe219ff;},'oLFds':'Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','jYKEs':function(_0x27f7a4,_0x20ebdc,_0x194646){return _0x27f7a4(_0x20ebdc,_0x194646);}},_0x31aedd=await _0x5f3bdd[_0x306ce5(0x155)](fetchCloudProfile,_0x29e73a);if(!_0x31aedd)throw new Error(_0x306ce5(0x14c)+_0x29e73a+'\x22\x20not\x20found.');if(!_0x551500['yes']&&!_0x5f3bdd[_0x306ce5(0x14f)](isInteractive))throw new Error(_0x306ce5(0x15c));console['log']('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x29e73a+_0x306ce5(0x150));if(!_0x551500['yes']){const {confirmation:_0x432622}=await _0x2f0b3c[_0x306ce5(0x157)]([{'type':'input','name':'confirmation','message':'Type\x20\x22'+_0x29e73a+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x5f3bdd['jrrFb'](_0x432622,_0x29e73a))throw new Error(_0x5f3bdd['oLFds']);}await deleteCloudProfile(_0x29e73a),_0x5f3bdd[_0x306ce5(0x156)](resetProfileOverrides,process[_0x306ce5(0x159)](),_0x29e73a),_0x5f3bdd[_0x306ce5(0x156)](clearLastProfile,process['cwd'](),_0x29e73a),console['log'](_0x306ce5(0x158)+_0x29e73a+'\x22.');}
1
+ function _0x2d83(){const _0xf5e396=['\x22\x20to\x20confirm\x20deletion:','pnzbA','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','6198625hhzkNl','WnXOW','104UMfjcK','500564cCiPKJ','yes','36nIcAFS','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','input','9035298FgFNhP','12140408hSjtcg','188776Nziddv','285909OGXhPi','nIWMH','2233593yjZlNf','prompt','log'];_0x2d83=function(){return _0xf5e396;};return _0x2d83();}(function(_0x4830f2,_0x79c1bf){const _0x1911f0=_0x4842,_0x23d616=_0x4830f2();while(!![]){try{const _0x4bb981=-parseInt(_0x1911f0(0x101))/0x1+parseInt(_0x1911f0(0xfa))/0x2+-parseInt(_0x1911f0(0xef))/0x3*(parseInt(_0x1911f0(0xfc))/0x4)+-parseInt(_0x1911f0(0xf7))/0x5+parseInt(_0x1911f0(0xff))/0x6+-parseInt(_0x1911f0(0x100))/0x7+-parseInt(_0x1911f0(0xf9))/0x8*(-parseInt(_0x1911f0(0xf1))/0x9);if(_0x4bb981===_0x79c1bf)break;else _0x23d616['push'](_0x23d616['shift']());}catch(_0x3fe4af){_0x23d616['push'](_0x23d616['shift']());}}}(_0x2d83,0xead66));import _0x51827f from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x4842(_0x1dceef,_0x4abb40){_0x1dceef=_0x1dceef-0xef;const _0x2d83f8=_0x2d83();let _0x4842d3=_0x2d83f8[_0x1dceef];return _0x4842d3;}import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x3526be,_0x55525c={}){const _0x44236a=_0x4842,_0x1c24eb={'nIWMH':function(_0x1ef438,_0x55a96f){return _0x1ef438(_0x55a96f);},'gxYyl':_0x44236a(0xfd),'pnzbA':function(_0x16f796,_0x156110){return _0x16f796!==_0x156110;},'WnXOW':function(_0x3f98d0,_0x3c2027,_0x5a2caa){return _0x3f98d0(_0x3c2027,_0x5a2caa);},'dUVTk':function(_0x1a74ec,_0x31d656,_0x3304c9){return _0x1a74ec(_0x31d656,_0x3304c9);}},_0x5bddf=await _0x1c24eb[_0x44236a(0xf0)](fetchCloudProfile,_0x3526be);if(!_0x5bddf)throw new Error('Cloud\x20profile\x20\x22'+_0x3526be+'\x22\x20not\x20found.');if(!_0x55525c[_0x44236a(0xfb)]&&!isInteractive())throw new Error(_0x1c24eb['gxYyl']);console[_0x44236a(0xf3)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x3526be+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x55525c[_0x44236a(0xfb)]){const {confirmation:_0xa0e933}=await _0x51827f[_0x44236a(0xf2)]([{'type':_0x44236a(0xfe),'name':'confirmation','message':'Type\x20\x22'+_0x3526be+_0x44236a(0xf4)}]);if(_0x1c24eb[_0x44236a(0xf5)](_0xa0e933,_0x3526be))throw new Error(_0x44236a(0xf6));}await deleteCloudProfile(_0x3526be),_0x1c24eb[_0x44236a(0xf8)](resetProfileOverrides,process['cwd'](),_0x3526be),_0x1c24eb['dUVTk'](clearLastProfile,process['cwd'](),_0x3526be),console[_0x44236a(0xf3)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x3526be+'\x22.');}
@@ -1 +1 @@
1
- const _0x3ca113=_0x21b7;(function(_0x5adefb,_0x464b40){const _0x968cc7=_0x21b7,_0x62a4cd=_0x5adefb();while(!![]){try{const _0x5f01ec=-parseInt(_0x968cc7(0x156))/0x1*(parseInt(_0x968cc7(0x157))/0x2)+-parseInt(_0x968cc7(0x14a))/0x3*(-parseInt(_0x968cc7(0x15a))/0x4)+parseInt(_0x968cc7(0x168))/0x5+parseInt(_0x968cc7(0x170))/0x6*(parseInt(_0x968cc7(0x14f))/0x7)+-parseInt(_0x968cc7(0x175))/0x8*(parseInt(_0x968cc7(0x174))/0x9)+-parseInt(_0x968cc7(0x14b))/0xa*(parseInt(_0x968cc7(0x177))/0xb)+parseInt(_0x968cc7(0x14c))/0xc*(parseInt(_0x968cc7(0x15b))/0xd);if(_0x5f01ec===_0x464b40)break;else _0x62a4cd['push'](_0x62a4cd['shift']());}catch(_0x4539fb){_0x62a4cd['push'](_0x62a4cd['shift']());}}}(_0x356e,0x3e951));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';function _0x21b7(_0x5da836,_0x5e1eb9){_0x5da836=_0x5da836-0x14a;const _0x356ec7=_0x356e();let _0x21b7a2=_0x356ec7[_0x5da836];return _0x21b7a2;}const NON_ENV_DIRS=['sessions','bug-bashes',_0x3ca113(0x15d),_0x3ca113(0x14e),'ci'];export function shouldGroupByEnvironment(_0x4b9631){const _0x5a8d28=_0x3ca113;return _0x4b9631[_0x5a8d28(0x15e)](_0x5791b4=>_0x5791b4['environmentKey']);}export function groupCloudProfilesByEnvironment(_0xc26da9){const _0x38ce66=_0x3ca113,_0x2e0fb4={'BpqQf':function(_0x5a4a53,_0x77ea79){return _0x5a4a53===_0x77ea79;}},_0x5e5122=new Map();for(const _0x1f1bbe of _0xc26da9){const _0x418601=_0x1f1bbe['environmentKey']??null,_0x3da45e=_0x5e5122[_0x38ce66(0x17c)](_0x418601);if(_0x3da45e)_0x3da45e[_0x38ce66(0x154)](_0x1f1bbe);else _0x5e5122[_0x38ce66(0x163)](_0x418601,[_0x1f1bbe]);}const _0x39412d=[..._0x5e5122['keys']()]['sort']((_0x5c7890,_0x143ab9)=>{const _0x3bd147=_0x38ce66;if(_0x2e0fb4[_0x3bd147(0x17d)](_0x5c7890,null))return 0x1;if(_0x143ab9===null)return-0x1;return _0x5c7890[_0x3bd147(0x161)](_0x143ab9);});return _0x39412d[_0x38ce66(0x178)](_0x416b5c=>({'environmentKey':_0x416b5c,'profiles':_0x5e5122['get'](_0x416b5c)['sort']((_0x56e245,_0x3d930e)=>_0x56e245['name'][_0x38ce66(0x161)](_0x3d930e[_0x38ce66(0x158)]))}));}export async function getEnvNames(){const _0x57d82d=_0x3ca113,_0x3eff40={'syhDv':function(_0x330f89,_0x4f44f6){return _0x330f89(_0x4f44f6);},'REubT':_0x57d82d(0x14e),'kfrHi':function(_0x63b7eb,_0x3a063d){return _0x63b7eb(_0x3a063d);},'dkGWM':function(_0x20d893,_0x37e76f,_0x4995c4){return _0x20d893(_0x37e76f,_0x4995c4);},'qEYuk':_0x57d82d(0x159)},_0x42af62=getRangerDir();if(!_0x3eff40[_0x57d82d(0x16a)](existsSync,_0x42af62))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x3bc10e=await readActiveProfileName(),_0x1049ac=[],_0x216cfc={},_0xed4260=join(_0x42af62,_0x3eff40[_0x57d82d(0x16c)]);if(_0x3eff40['kfrHi'](existsSync,_0xed4260)){const _0x4a9cc0=await readdir(_0xed4260);for(const _0x11db27 of _0x4a9cc0){const _0x5b0ba2=join(_0xed4260,_0x11db27),_0x123a95=await stat(_0x5b0ba2);_0x123a95[_0x57d82d(0x15c)]()&&(_0x1049ac[_0x57d82d(0x154)](_0x11db27),_0x216cfc[_0x11db27]=_0x3eff40[_0x57d82d(0x16c)]);}}const _0x1f66ac=join(_0x42af62,'ci');if(_0x3eff40[_0x57d82d(0x16a)](existsSync,_0x1f66ac)){const _0x4f0c95=await readdir(_0x1f66ac);for(const _0xa9fa48 of _0x4f0c95){const _0x4c507b=_0x3eff40['dkGWM'](join,_0x1f66ac,_0xa9fa48),_0x579893=await _0x3eff40['syhDv'](stat,_0x4c507b);_0x579893[_0x57d82d(0x15c)]()&&(_0x1049ac[_0x57d82d(0x154)](_0xa9fa48),_0x216cfc[_0xa9fa48]='ci');}}const _0x3f5de0=await readdir(_0x42af62);for(const _0x276067 of _0x3f5de0){if(NON_ENV_DIRS['includes'](_0x276067))continue;if(_0x276067[_0x57d82d(0x16f)]('.'))continue;if(_0x276067[_0x57d82d(0x17e)]('.txt'))continue;const _0x4dc4a5=join(_0x42af62,_0x276067),_0x43f9af=await stat(_0x4dc4a5);_0x43f9af[_0x57d82d(0x15c)]()&&existsSync(join(_0x4dc4a5,_0x57d82d(0x176)))&&(!_0x1049ac[_0x57d82d(0x153)](_0x276067)&&(_0x1049ac['push'](_0x276067),_0x216cfc[_0x276067]=_0x3eff40[_0x57d82d(0x155)]));}return{'envNames':_0x1049ac,'activeEnv':_0x3bc10e,'envTypes':_0x216cfc};}function _0x356e(){const _0x29e970=['get','BpqQf','endsWith','3rSvjUR','50XDbxKO','110076XURZhQ','sort','local','1665342dpbyai','profiles','\x0a*\x20=\x20active\x20profile','LeGOO','includes','push','qEYuk','357ONrZQq','2378GxEiYu','name','legacy','190612qzzyct','494AHJCMA','isDirectory','reports','some','\x20\x20\x20\x20Session:\x20','length','localeCompare','log','set','\x20\x20\x20\x20','environmentDetails','\x0aCloud\x20Profiles:','AcsdH','1844280KzOmKN','PWUkC','syhDv','\x20\x20\x20\x20\x20\x20URL:\x20','REubT','error','\x0aNo\x20profiles\x20found.','startsWith','6FrhSHI','TBPJv','LqfMt','NEIJe','5364CtirYZ','952rMbuil','settings.json','552761ZmaWKi','map','cached\x20(updated\x20','baseUrl','has'];_0x356e=function(){return _0x29e970;};return _0x356e();}export async function envList(){const _0x521d5e=_0x3ca113,_0xf17600={'NEIJe':function(_0xdf76e8,_0x4c7854){return _0xdf76e8===_0x4c7854;},'TBPJv':'no\x20session','kdEwu':function(_0x4bf186){return _0x4bf186();},'loNIy':function(_0x220661){return _0x220661();},'AcsdH':function(_0x45cc4e,_0x288753){return _0x45cc4e instanceof _0x288753;},'PWUkC':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','LeGOO':'\x0aLocal\x20Profiles\x20(legacy):','fHriV':'legacy','LqfMt':'\x0aCloud\x20Profiles\x20(by\x20environment):','EOygO':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','dpNLE':_0x521d5e(0x166),'HMvRF':function(_0x37e06f,_0x5abc80,_0x41cab6){return _0x37e06f(_0x5abc80,_0x41cab6);}},{envNames:_0x1fd3a2,activeEnv:_0x452e75,envTypes:_0x52a3eb}=await _0xf17600['kdEwu'](getEnvNames);let _0x36ecbb=[];const _0x1da7fb=await getToken();if(_0x1da7fb)try{_0x36ecbb=await _0xf17600['loNIy'](listCloudProfiles);}catch(_0xb6247f){console[_0x521d5e(0x16d)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0xf17600[_0x521d5e(0x167)](_0xb6247f,Error)?_0xb6247f['message']:String(_0xb6247f)));}if(_0x1fd3a2[_0x521d5e(0x160)]===0x0&&_0xf17600[_0x521d5e(0x173)](_0x36ecbb['length'],0x0)){console[_0x521d5e(0x162)](_0x521d5e(0x16e)),console[_0x521d5e(0x162)](_0xf17600[_0x521d5e(0x169)]);return;}const _0x2d3e9d=new Set(_0x36ecbb['map'](_0x161f90=>_0x161f90['name']));if(_0x1fd3a2[_0x521d5e(0x160)]>0x0){console[_0x521d5e(0x162)](_0xf17600[_0x521d5e(0x152)]);for(const _0x5e62ec of _0x1fd3a2['sort']()){const _0x9c2aa1=_0x5e62ec===_0x452e75&&!_0x2d3e9d[_0x521d5e(0x17b)](_0x5e62ec),_0x2c80aa=_0x52a3eb[_0x5e62ec]||'local',_0x55dad2=await loadSettings(_0x5e62ec),_0x1f742b=_0x2c80aa===_0xf17600['fHriV']?'':'\x20['+_0x2c80aa+']';console['log']('\x20\x20'+(_0x9c2aa1?'*\x20':'\x20\x20')+_0x5e62ec+_0x1f742b),_0x55dad2['baseUrl']&&console['log'](_0x521d5e(0x16b)+_0x55dad2[_0x521d5e(0x17a)]),_0x55dad2['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x55dad2[_0x521d5e(0x165)]);}}const _0x564cc7=(_0x162b05,_0x460fa9)=>{const _0x4d2e27=_0x521d5e,_0x317806=_0xf17600[_0x4d2e27(0x173)](_0x162b05[_0x4d2e27(0x158)],_0x452e75),_0x42c7b5=_0x162b05['sessionUpdatedAt']?_0x4d2e27(0x179)+_0x162b05['sessionUpdatedAt']+')':_0xf17600[_0x4d2e27(0x171)];console['log'](''+_0x460fa9+(_0x317806?'*\x20':'\x20\x20')+_0x162b05[_0x4d2e27(0x158)]),console[_0x4d2e27(0x162)](_0x460fa9+_0x4d2e27(0x15f)+_0x42c7b5);};if(_0x36ecbb['length']>0x0){if(shouldGroupByEnvironment(_0x36ecbb)){console[_0x521d5e(0x162)](_0xf17600[_0x521d5e(0x172)]);for(const _0x1e1d58 of groupCloudProfilesByEnvironment(_0x36ecbb)){const _0xbececc=_0x1e1d58['environmentKey']??_0xf17600['EOygO'];console['log']('\x0a\x20\x20'+_0xbececc);for(const _0x388e97 of _0x1e1d58[_0x521d5e(0x150)]){_0x564cc7(_0x388e97,_0x521d5e(0x164));}}}else{console[_0x521d5e(0x162)](_0xf17600['dpNLE']);for(const _0x193f39 of[..._0x36ecbb][_0x521d5e(0x14d)]((_0x4af2b0,_0x26b819)=>_0x4af2b0[_0x521d5e(0x158)]['localeCompare'](_0x26b819['name']))){_0xf17600['HMvRF'](_0x564cc7,_0x193f39,'\x20\x20');}}}_0x452e75&&console[_0x521d5e(0x162)](_0x521d5e(0x151));}
1
+ const _0x416b38=_0x5ab7;(function(_0x3f4285,_0x3e8c31){const _0x2c9b46=_0x5ab7,_0x17812e=_0x3f4285();while(!![]){try{const _0x20b27b=parseInt(_0x2c9b46(0xb6))/0x1+parseInt(_0x2c9b46(0xc5))/0x2+-parseInt(_0x2c9b46(0xad))/0x3+parseInt(_0x2c9b46(0xc9))/0x4+-parseInt(_0x2c9b46(0xbf))/0x5*(-parseInt(_0x2c9b46(0xa6))/0x6)+-parseInt(_0x2c9b46(0xbd))/0x7+-parseInt(_0x2c9b46(0xb7))/0x8*(parseInt(_0x2c9b46(0xc4))/0x9);if(_0x20b27b===_0x3e8c31)break;else _0x17812e['push'](_0x17812e['shift']());}catch(_0x5892af){_0x17812e['push'](_0x17812e['shift']());}}}(_0x4e7e,0x4a061));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=['sessions','bug-bashes',_0x416b38(0xa4),_0x416b38(0xb1),'ci'];function _0x4e7e(){const _0x3da397=['266226ByzXMf','291304jqYPjk','tBZhR','gfWPo','AjnDN','\x0aNo\x20profiles\x20found.','cached\x20(updated\x20','2555868WnBhON','name','8285XCitYQ','\x20\x20\x20\x20','hgwKm','environmentDetails','.txt','9aSSTVw','928930TWVpkG','get','sessionUpdatedAt','vNAWN','1292940mmKQLB','Run:\x20ranger\x20profile\x20add\x20<profile-name>','environmentKey','\x0a*\x20=\x20active\x20profile','CEdlT','\x20\x20\x20\x20Session:\x20','has','error','reports','localeCompare','186mLbOSf','profiles','LwsVc','\x0a\x20\x20','sort','odbbD','OfyVr','1201665ePEdND','message','eLItN','push','local','includes','log','gerbS','length'];_0x4e7e=function(){return _0x3da397;};return _0x4e7e();}export function shouldGroupByEnvironment(_0x319bf3){const _0x2e707e=_0x416b38;return _0x319bf3['some'](_0x5dfaaf=>_0x5dfaaf[_0x2e707e(0x9e)]);}export function groupCloudProfilesByEnvironment(_0x573b00){const _0x2cb06c=_0x416b38,_0xd0f009=new Map();for(const _0x123919 of _0x573b00){const _0x4f466e=_0x123919['environmentKey']??null,_0x793d38=_0xd0f009['get'](_0x4f466e);if(_0x793d38)_0x793d38['push'](_0x123919);else _0xd0f009['set'](_0x4f466e,[_0x123919]);}const _0x5f5c5a=[..._0xd0f009['keys']()][_0x2cb06c(0xaa)]((_0x1a68d2,_0x5ebd82)=>{if(_0x1a68d2===null)return 0x1;if(_0x5ebd82===null)return-0x1;return _0x1a68d2['localeCompare'](_0x5ebd82);});return _0x5f5c5a['map'](_0x3e78ae=>({'environmentKey':_0x3e78ae,'profiles':_0xd0f009[_0x2cb06c(0xc6)](_0x3e78ae)['sort']((_0x4b3e56,_0x4c18f6)=>_0x4b3e56['name'][_0x2cb06c(0xa5)](_0x4c18f6[_0x2cb06c(0xbe)]))}));}function _0x5ab7(_0x1a2170,_0x2cf009){_0x1a2170=_0x1a2170-0x9d;const _0x4e7e92=_0x4e7e();let _0x5ab778=_0x4e7e92[_0x1a2170];return _0x5ab778;}export async function getEnvNames(){const _0x364b00=_0x416b38,_0x33af17={'gfWPo':function(_0x10e556,_0x2f07e4){return _0x10e556(_0x2f07e4);},'PeFLZ':function(_0x3dc843){return _0x3dc843();},'odbbD':function(_0x463c8b,_0x563ac3){return _0x463c8b(_0x563ac3);},'CwTsQ':'local','CEdlT':function(_0x5a11e1,_0x652f78,_0x3bd26f){return _0x5a11e1(_0x652f78,_0x3bd26f);},'vNAWN':function(_0x1f61db,_0xe19dd3){return _0x1f61db(_0xe19dd3);},'eLItN':function(_0x1ff143,_0x3cede6,_0x6dc50){return _0x1ff143(_0x3cede6,_0x6dc50);},'LwsVc':_0x364b00(0xc3),'fbjso':'settings.json'},_0x14ccc4=getRangerDir();if(!_0x33af17['gfWPo'](existsSync,_0x14ccc4))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x2dca24=await _0x33af17['PeFLZ'](readActiveProfileName),_0x2844a6=[],_0x59bbc5={},_0x49fc81=join(_0x14ccc4,_0x364b00(0xb1));if(existsSync(_0x49fc81)){const _0x524f77=await _0x33af17[_0x364b00(0xab)](readdir,_0x49fc81);for(const _0x49ebf9 of _0x524f77){const _0x381ef3=join(_0x49fc81,_0x49ebf9),_0x5078e3=await _0x33af17[_0x364b00(0xb9)](stat,_0x381ef3);_0x5078e3['isDirectory']()&&(_0x2844a6['push'](_0x49ebf9),_0x59bbc5[_0x49ebf9]=_0x33af17['CwTsQ']);}}const _0x291624=_0x33af17[_0x364b00(0xa0)](join,_0x14ccc4,'ci');if(existsSync(_0x291624)){const _0x4476fc=await _0x33af17[_0x364b00(0xc8)](readdir,_0x291624);for(const _0x2a0b53 of _0x4476fc){const _0x249ed9=_0x33af17[_0x364b00(0xaf)](join,_0x291624,_0x2a0b53),_0x24186c=await stat(_0x249ed9);_0x24186c['isDirectory']()&&(_0x2844a6[_0x364b00(0xb0)](_0x2a0b53),_0x59bbc5[_0x2a0b53]='ci');}}const _0xd777ae=await readdir(_0x14ccc4);for(const _0x50b59b of _0xd777ae){if(NON_ENV_DIRS[_0x364b00(0xb2)](_0x50b59b))continue;if(_0x50b59b['startsWith']('.'))continue;if(_0x50b59b['endsWith'](_0x33af17[_0x364b00(0xa8)]))continue;const _0x3c67bd=_0x33af17[_0x364b00(0xaf)](join,_0x14ccc4,_0x50b59b),_0x12fb87=await _0x33af17['odbbD'](stat,_0x3c67bd);_0x12fb87['isDirectory']()&&existsSync(_0x33af17[_0x364b00(0xa0)](join,_0x3c67bd,_0x33af17['fbjso']))&&(!_0x2844a6[_0x364b00(0xb2)](_0x50b59b)&&(_0x2844a6[_0x364b00(0xb0)](_0x50b59b),_0x59bbc5[_0x50b59b]='legacy'));}return{'envNames':_0x2844a6,'activeEnv':_0x2dca24,'envTypes':_0x59bbc5};}export async function envList(){const _0x56aa22=_0x416b38,_0x20d551={'dMdvg':function(_0x5e135b){return _0x5e135b();},'gerbS':function(_0x59afe0,_0x24f562){return _0x59afe0===_0x24f562;},'hgwKm':function(_0x156ec6,_0x191881){return _0x156ec6===_0x191881;},'AjnDN':_0x56aa22(0x9d),'hXsYD':function(_0x46f994,_0x3671e9){return _0x46f994>_0x3671e9;},'mMtRj':'\x0aLocal\x20Profiles\x20(legacy):','igKqU':_0x56aa22(0xb1),'MNkbi':'legacy','OfyVr':function(_0x4e6348,_0x50a647){return _0x4e6348>_0x50a647;},'IiuaF':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','tBZhR':function(_0x2a2fd6,_0x58ba2c,_0x15ebe7){return _0x2a2fd6(_0x58ba2c,_0x15ebe7);},'lrweu':_0x56aa22(0xc0)},{envNames:_0x178e92,activeEnv:_0x49a849,envTypes:_0x4c1420}=await _0x20d551['dMdvg'](getEnvNames);let _0x5db0e1=[];const _0x2f8740=await getToken();if(_0x2f8740)try{_0x5db0e1=await listCloudProfiles();}catch(_0x1f8638){console[_0x56aa22(0xa3)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x1f8638 instanceof Error?_0x1f8638[_0x56aa22(0xae)]:String(_0x1f8638)));}if(_0x20d551[_0x56aa22(0xb4)](_0x178e92[_0x56aa22(0xb5)],0x0)&&_0x20d551[_0x56aa22(0xc1)](_0x5db0e1[_0x56aa22(0xb5)],0x0)){console[_0x56aa22(0xb3)](_0x56aa22(0xbb)),console['log'](_0x20d551[_0x56aa22(0xba)]);return;}const _0x1dba54=new Set(_0x5db0e1['map'](_0x2366c1=>_0x2366c1[_0x56aa22(0xbe)]));if(_0x20d551['hXsYD'](_0x178e92['length'],0x0)){console['log'](_0x20d551['mMtRj']);for(const _0x425a4d of _0x178e92['sort']()){const _0x1559c4=_0x425a4d===_0x49a849&&!_0x1dba54[_0x56aa22(0xa2)](_0x425a4d),_0x269188=_0x4c1420[_0x425a4d]||_0x20d551['igKqU'],_0x55bf7b=await loadSettings(_0x425a4d),_0x57ba9e=_0x269188===_0x20d551['MNkbi']?'':'\x20['+_0x269188+']';console[_0x56aa22(0xb3)]('\x20\x20'+(_0x1559c4?'*\x20':'\x20\x20')+_0x425a4d+_0x57ba9e),_0x55bf7b['baseUrl']&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x55bf7b['baseUrl']),_0x55bf7b['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x55bf7b[_0x56aa22(0xc2)]);}}const _0x4d2384=(_0x542be7,_0x191403)=>{const _0x2c63ab=_0x56aa22,_0x3ca4bc=_0x542be7[_0x2c63ab(0xbe)]===_0x49a849,_0x1961f1=_0x542be7['sessionUpdatedAt']?_0x2c63ab(0xbc)+_0x542be7[_0x2c63ab(0xc7)]+')':'no\x20session';console['log'](''+_0x191403+(_0x3ca4bc?'*\x20':'\x20\x20')+_0x542be7[_0x2c63ab(0xbe)]),console['log'](_0x191403+_0x2c63ab(0xa1)+_0x1961f1);};if(_0x20d551[_0x56aa22(0xac)](_0x5db0e1[_0x56aa22(0xb5)],0x0)){if(shouldGroupByEnvironment(_0x5db0e1)){console[_0x56aa22(0xb3)]('\x0aCloud\x20Profiles\x20(by\x20environment):');for(const _0x563852 of groupCloudProfilesByEnvironment(_0x5db0e1)){const _0x4eab31=_0x563852['environmentKey']??_0x20d551['IiuaF'];console['log'](_0x56aa22(0xa9)+_0x4eab31);for(const _0x106a92 of _0x563852[_0x56aa22(0xa7)]){_0x20d551['tBZhR'](_0x4d2384,_0x106a92,_0x20d551['lrweu']);}}}else{console['log']('\x0aCloud\x20Profiles:');for(const _0x29bf85 of[..._0x5db0e1]['sort']((_0x47310b,_0x5a2554)=>_0x47310b[_0x56aa22(0xbe)]['localeCompare'](_0x5a2554['name']))){_0x20d551[_0x56aa22(0xb8)](_0x4d2384,_0x29bf85,'\x20\x20');}}}_0x49a849&&console['log'](_0x56aa22(0x9f));}