@ranger-testing/ranger-cli 3.1.6-alpha.4de822b-51 → 3.1.6-alpha.cbf7608-55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/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/build/skills/ranger/SKILL.md +1 -0
  87. package/package.json +14 -5
@@ -1 +1 @@
1
- function _0xfe3b(_0x5eefa9,_0x1be87e){_0x5eefa9=_0x5eefa9-0xa7;const _0x54305e=_0x5430();let _0xfe3b09=_0x54305e[_0x5eefa9];return _0xfe3b09;}const _0x44fd4d=_0xfe3b;(function(_0x28de94,_0x43538c){const _0x146390=_0xfe3b,_0xa74839=_0x28de94();while(!![]){try{const _0x568b2d=parseInt(_0x146390(0xcc))/0x1+parseInt(_0x146390(0xdc))/0x2*(-parseInt(_0x146390(0xf8))/0x3)+parseInt(_0x146390(0x100))/0x4+-parseInt(_0x146390(0xb0))/0x5*(-parseInt(_0x146390(0xfe))/0x6)+parseInt(_0x146390(0xc1))/0x7*(-parseInt(_0x146390(0xf5))/0x8)+parseInt(_0x146390(0xc2))/0x9*(-parseInt(_0x146390(0x119))/0xa)+-parseInt(_0x146390(0xfd))/0xb*(-parseInt(_0x146390(0xbb))/0xc);if(_0x568b2d===_0x43538c)break;else _0xa74839['push'](_0xa74839['shift']());}catch(_0x45ab86){_0xa74839['push'](_0xa74839['shift']());}}}(_0x5430,0xd94ca));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x31a510 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';function _0x5430(){const _0x58ddb3=['syjza','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','authEnv','capture','⚠\x20Could\x20not\x20reach\x20','VSJWT','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','isTTY','length','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','error','wNIjN','Invalid\x20URL','kYcRm','trackPhaseEnd','use_suggestion','profile.add.autoRouteSkipped','rxEoC','\x20\x20Did\x20you\x20mean\x20','setupHeaders','kdTKP','5360210CfgRIf','force','setupHeader','environments','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','includes','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','Could\x20not\x20reach\x20','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','profile.add.autoRouted','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','\x0a✓\x20Profile\x20\x27','no_auth_config','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','Enter\x20a\x20different\x20URL','XcbJq','\x27\x20created\x20(CDP).','tMnsK','HzZhy','KxgXp','exit','isElectron','fckpr','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','cwd','DRWQB','AAfkX','\x27\x20created.\x0a','PRlqY','yes','1354550ZWmpZE','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','gjkRO','isProtocolError','vMFQn','message','\x27\x20to\x20the\x20cloud?','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','abort','ysFNR','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','12kpQoAO','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','saveToCloud','some','knVPW','manual','91DxHTEQ','27VndZoi','continue','tiBrM','EcGSP','http://localhost:3000','AgOTk','hVTSa','join','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','signal','1441500Oqzmvv','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','clXeS','\x27\x20created\x20(no\x20session).\x0a','aTwiY','Invalid\x20--setup-header\x20format:\x20\x22','prompt','TypeError','✓\x20Profile\x20\x27','env','slice','\x0a\x20\x20A\x20profile\x20named\x20\x22','DxkBv',')\x0a\x20\x20Save\x20\x27','\x0a🌐\x20Profile\x20Setup\x0a','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','2UvdIjv','OSgEL','cdpEndpoint','mlotr','status','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','origin','url','dRjvW','XsubD','fzGtc','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','HEAD','Continue\x20anyway','log','keys','HTTP\x20','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','\x20\x20https://docs.ranger.net/main/concepts/profiles','skipAuth','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','vfUrL','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','baseUrl','VMLSP','166336BFSauq','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','bTrBA','1409217EwtJwu','warn','vWloS','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','local','14763903hVaOoN','6IogHSZ','trim','734292oaSUzJ','user_declined','taSQm'];_0x5430=function(){return _0x58ddb3;};return _0x5430();}import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x44fd4d(0xa9);function warnCloudProfileSharedInOrg(){const _0x5c5dd0=_0x44fd4d;if(!process['stdout'][_0x5c5dd0(0x10b)])return;console[_0x5c5dd0(0xf9)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x346853){const _0x5644c2=_0x44fd4d,_0x3aeaa4={'tiBrM':function(_0x4d7464,_0x8c6d80,_0x2e8a66){return _0x4d7464(_0x8c6d80,_0x2e8a66);},'gjkRO':_0x5644c2(0xe8),'JDggJ':_0x5644c2(0xc0),'DxkBv':function(_0x6fed86,_0x5051bb,_0x3daef5){return _0x6fed86(_0x5051bb,_0x3daef5);},'DRWQB':function(_0x5223c5,_0x337bfb){return _0x5223c5<_0x337bfb;},'syjza':function(_0x5b3d91,_0x917aee){return _0x5b3d91(_0x917aee);},'VQKvc':_0x5644c2(0xd3)};try{const _0x20fdd9=new AbortController(),_0x4ba2fd=_0x3aeaa4[_0x5644c2(0xc4)](setTimeout,()=>_0x20fdd9[_0x5644c2(0xb8)](),0x1388),_0x1d41db={'method':_0x3aeaa4[_0x5644c2(0xb2)],'signal':_0x20fdd9[_0x5644c2(0xcb)],'redirect':_0x3aeaa4['JDggJ']};/^https:\/\/localhost(:\d+)?/i['test'](_0x346853)&&(process[_0x5644c2(0xd5)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x4016d8=await _0x3aeaa4[_0x5644c2(0xd8)](fetch,_0x346853,_0x1d41db);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x4ba2fd);if(_0x3aeaa4[_0x5644c2(0xab)](_0x4016d8[_0x5644c2(0xe0)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x5644c2(0xec)+_0x4016d8[_0x5644c2(0xe0)]};}catch(_0x55192b){delete process[_0x5644c2(0xd5)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x4102c4=_0x55192b,_0x52754a=_0x4102c4['message']||_0x3aeaa4[_0x5644c2(0x103)](String,_0x55192b),_0x13068a=_0x52754a[_0x5644c2(0x11e)](_0x5644c2(0x110))||_0x4102c4['name']===_0x3aeaa4['VQKvc']||_0x52754a[_0x5644c2(0x11e)]('fetch\x20failed');return{'ok':![],'error':_0x52754a,'isProtocolError':_0x13068a};}}async function sweepOrphanLocalProfile(_0x504e42,_0x541fac,_0x3a2a5a){const _0x2a16a7=_0x44fd4d,_0x5003ff={'RnrXl':_0x2a16a7(0xfc),'USsrM':function(_0x1096dc,_0x44e42b){return _0x1096dc(_0x44e42b);}},_0x39341b=join(_0x541fac,_0x5003ff['RnrXl']),_0x3ad916=join(_0x39341b,_0x504e42);existsSync(_0x3ad916)&&(_0x3a2a5a&&await isPathGitTracked(_0x3ad916)?console['log'](_0x2a16a7(0xcd)+_0x3ad916+_0x2a16a7(0xbc)):(await rm(_0x3ad916,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x3ad916)));if(_0x5003ff['USsrM'](existsSync,_0x39341b)){let _0x4900a2=[];try{_0x4900a2=await readdir(_0x39341b);}catch{return;}const _0x24ab10='.tmp-'+_0x504e42+'-';for(const _0x382bfa of _0x4900a2){if(!_0x382bfa['startsWith'](_0x24ab10))continue;const _0x596d07=join(_0x39341b,_0x382bfa);await rm(_0x596d07,{'recursive':!![],'force':!![]}),console['log'](_0x2a16a7(0x11f)+_0x596d07);}}}async function sweepOrphansBestEffort(_0x6ca856){const _0xa2aeef=_0x44fd4d,_0x15dbb1={'taSQm':function(_0xd03256,_0x507f8a,_0x2bfaef,_0x5776d0){return _0xd03256(_0x507f8a,_0x2bfaef,_0x5776d0);},'OZlLv':function(_0x477a6c){return _0x477a6c();},'niBOM':function(_0x485128,_0x51dc26){return _0x485128!==_0x51dc26;},'RUvuA':function(_0x2ac72a){return _0x2ac72a();},'IRSnK':function(_0x5cc333,_0x200277){return _0x5cc333(_0x200277);}};try{await _0x15dbb1[_0xa2aeef(0x102)](sweepOrphanLocalProfile,_0x6ca856,_0x15dbb1['OZlLv'](getRangerHomeDir),![]);const _0x45688d=getRangerDir();_0x15dbb1['niBOM'](_0x45688d,_0x15dbb1['RUvuA'](getRangerHomeDir))&&await sweepOrphanLocalProfile(_0x6ca856,_0x45688d,!![]);}catch(_0x1834f7){console['log'](_0xa2aeef(0x11d)+(_0x1834f7 instanceof Error?_0x1834f7[_0xa2aeef(0xb5)]:_0x15dbb1['IRSnK'](String,_0x1834f7))+').');}}async function markActive(_0x1b403b){const _0x58ccca=_0x44fd4d;try{await writeActiveProfileName(_0x1b403b),console[_0x58ccca(0xea)]('\x20\x20Set\x20active\x20profile:\x20'+_0x1b403b);}catch{console[_0x58ccca(0xea)]('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0x14d237,_0x26feb7,_0x138915,_0x483892,_0xe24359){const _0x5a0b19=_0x44fd4d,_0x3e2e0d={'GvvZG':function(_0x32b36a,_0x5825df){return _0x32b36a===_0x5825df;},'knVPW':function(_0x246200){return _0x246200();},'ysFNR':'profile.add.autoRouteSkipped','mlotr':function(_0x45bf49,_0x1720a4){return _0x45bf49 instanceof _0x1720a4;},'WJdNB':function(_0x428e43,_0x333dcf,_0x2536e0,_0x375b4f,_0x3688b7){return _0x428e43(_0x333dcf,_0x2536e0,_0x375b4f,_0x3688b7);},'VaLZu':function(_0x1b729d,_0x3991b2){return _0x1b729d+_0x3991b2;},'Kpnzo':function(_0x1e7882,_0x2de9b6){return _0x1e7882+_0x2de9b6;},'kibJv':_0x5a0b19(0x127),'bTrBA':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','tMnsK':'env_not_found','clXeS':function(_0x231e91,_0x24b284){return _0x231e91+_0x24b284;},'GsOvK':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','eApGs':'no_match','VkSjA':_0x5a0b19(0xbd),'OSgEL':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','kYcRm':function(_0x453245,_0x964cf9){return _0x453245(_0x964cf9);},'JwiTs':_0x5a0b19(0x123)};let _0x24d3c8;try{_0x24d3c8=await _0x3e2e0d[_0x5a0b19(0xbf)](fetchAuthConfig);}catch(_0x527e47){return _0xe24359?.['trackPhaseEnd'](_0x3e2e0d[_0x5a0b19(0xb9)],{'reason':_0x5a0b19(0x126),'profileName':_0x14d237}),console[_0x5a0b19(0x10e)](_0x5a0b19(0x10a)+(_0x3e2e0d['mlotr'](_0x527e47,Error)?_0x527e47['message']:String(_0x527e47))),![];}if((!_0x24d3c8||!_0x24d3c8['environments']||Object['keys'](_0x24d3c8['environments'])[_0x5a0b19(0x10c)]===0x0)&&!_0x138915[_0x5a0b19(0x106)]){if(_0x483892)return await _0x3e2e0d['WJdNB'](captureEnvLessProfile,_0x14d237,_0x26feb7,_0x138915,_0xe24359);return _0xe24359?.[_0x5a0b19(0x112)](_0x3e2e0d[_0x5a0b19(0xb9)],{'reason':_0x5a0b19(0x126),'profileName':_0x14d237}),console[_0x5a0b19(0x10e)](_0x3e2e0d['VaLZu'](_0x3e2e0d['Kpnzo']('\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')+_0x3e2e0d['kibJv']+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x14d237+'\x20--url\x20'+_0x26feb7+'\x20--skip-auth\x0a')+'\x0a',_0x5a0b19(0xf0))+_0x3e2e0d[_0x5a0b19(0xf7)]),![];}let _0x19bfc7;if(_0x138915[_0x5a0b19(0x106)]){if(!_0x24d3c8?.['environments']?.[_0x138915[_0x5a0b19(0x106)]]){const _0xf8b888=Object['keys'](_0x24d3c8?.[_0x5a0b19(0x11c)]??{});return _0xe24359?.[_0x5a0b19(0x112)](_0x3e2e0d['ysFNR'],{'reason':_0x3e2e0d[_0x5a0b19(0x12b)],'profileName':_0x14d237}),console['error'](_0x3e2e0d[_0x5a0b19(0xce)]('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x138915['authEnv']+'\x22\x20not\x20found.',_0xf8b888['length']?'\x20Configured\x20envs:\x20'+_0xf8b888[_0x5a0b19(0xc9)](',\x20')+'.':_0x3e2e0d['GsOvK'])),![];}_0x19bfc7=_0x138915['authEnv'];}else _0x19bfc7=matchAuthEnvironment(_0x26feb7,_0x24d3c8);if(!_0x19bfc7)return _0xe24359?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x3e2e0d['eApGs'],'profileName':_0x14d237}),console[_0x5a0b19(0x10e)](_0x5a0b19(0xe7)+_0x26feb7+_0x5a0b19(0xba)+Object['keys'](_0x24d3c8?.[_0x5a0b19(0x11c)]??{})[_0x5a0b19(0xc9)](',\x20')+'.'),![];const _0x2fde74=_0x24d3c8?.['environments']?.[_0x19bfc7],_0x243fa0=_0x2fde74?.['domains']??[];if(_0x483892&&!_0x138915['yes']){const {saveToCloud:_0x503455}=await _0x31a510[_0x5a0b19(0xd2)]([{'type':'confirm','name':_0x3e2e0d['VkSjA'],'message':'Found\x20auth\x20environment\x20\x27'+_0x19bfc7+'\x27\x20matching\x20'+_0x26feb7+'\x0a\x20\x20(domains:\x20'+_0x243fa0[_0x5a0b19(0xc9)](',\x20')+_0x5a0b19(0xd9)+_0x14d237+_0x5a0b19(0xb6),'default':!![]}]);if(!_0x503455)return _0xe24359?.['trackPhaseEnd'](_0x3e2e0d[_0x5a0b19(0xb9)],{'reason':_0x5a0b19(0x101),'profileName':_0x14d237}),console['error'](_0x3e2e0d[_0x5a0b19(0xdd)]),![];}const _0x197cda=_0x243fa0[_0x5a0b19(0xbe)](_0x5ecbc8=>{const _0x2cf98d=_0x5a0b19;try{return _0x3e2e0d['GvvZG'](new URL(_0x5ecbc8)['origin'],new URL(_0x26feb7)[_0x2cf98d(0xe2)]);}catch{return![];}}),_0x2ee321={};!_0x197cda&&(_0x2ee321[_0x5a0b19(0xf3)]=_0x26feb7);try{await createCloudProfile(_0x14d237,_0x19bfc7,{'settings':_0x2ee321}),_0x3e2e0d[_0x5a0b19(0xbf)](warnCloudProfileSharedInOrg);}catch(_0x394ffd){if(_0x3e2e0d[_0x5a0b19(0xdf)](_0x394ffd,ApiError)&&_0x394ffd['status']===0x199){console[_0x5a0b19(0x10e)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x14d237+_0x5a0b19(0xca)+(_0x5a0b19(0xf2)+_0x14d237));throw _0x394ffd;}throw _0x394ffd;}return console[_0x5a0b19(0xea)](_0x5a0b19(0xd4)+_0x14d237+_0x5a0b19(0xad)+(_0x5a0b19(0xb7)+_0x14d237)),await _0x3e2e0d[_0x5a0b19(0x111)](sweepOrphansBestEffort,_0x14d237),_0xe24359?.[_0x5a0b19(0x112)](_0x3e2e0d['JwiTs'],{'envKey':_0x19bfc7,'profileName':_0x14d237}),!![];}async function createUnconfiguredCloudProfile(_0x49f3ad,_0x1de777){const _0x29516d=_0x44fd4d;try{await createCloudProfile(_0x49f3ad,undefined,{'settings':_0x1de777}),warnCloudProfileSharedInOrg();}catch(_0xa643d9){_0xa643d9 instanceof ApiError&&_0xa643d9[_0x29516d(0xe0)]===0x199&&console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x49f3ad+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x49f3ad));throw _0xa643d9;}}async function captureEnvLessProfile(_0x4c143c,_0x5f43b3,_0x2ead48,_0x7d43cd){const _0x3df234=_0x44fd4d,_0x316008={'vfUrL':'confirm','xuZRr':_0x3df234(0xe1),'fckpr':function(_0x439d04,_0x355110){return _0x439d04+_0x355110;},'AAfkX':function(_0x47c116,_0x533b8d){return _0x47c116>_0x533b8d;},'GsYYB':function(_0xa83ec7,_0x73b8d5){return _0xa83ec7 instanceof _0x73b8d5;},'EcGSP':function(_0x142748,_0x537512,_0x2b8585){return _0x142748(_0x537512,_0x2b8585);},'Fygta':function(_0x2cb8ee,_0x5ba61f){return _0x2cb8ee>_0x5ba61f;},'HzZhy':function(_0x5d03ff,_0x213a4b){return _0x5d03ff(_0x213a4b);},'EkCKJ':'profile.add.autoRouted'};if(!_0x2ead48[_0x3df234(0xaf)]){const {capture:_0x26fef8}=await _0x31a510['prompt']([{'type':_0x316008[_0x3df234(0xf1)],'name':_0x3df234(0x107),'message':_0x316008['xuZRr'],'default':!![]}]);if(!_0x26fef8)return _0x7d43cd?.[_0x3df234(0x112)](_0x3df234(0x114),{'reason':_0x3df234(0x101),'profileName':_0x4c143c}),console['error'](_0x3df234(0xfb)+_0x3df234(0x124)),![];}const _0x7e0cac={};if(_0x2ead48['setupHeader'])for(const _0x5a0aca of _0x2ead48[_0x3df234(0x11b)]){const _0x825fb7=_0x5a0aca['indexOf'](':');if(_0x825fb7===-0x1)continue;_0x7e0cac[_0x5a0aca[_0x3df234(0xd6)](0x0,_0x825fb7)['trim']()]=_0x5a0aca[_0x3df234(0xd6)](_0x316008[_0x3df234(0xa8)](_0x825fb7,0x1))['trim']();}const _0x465575={'baseUrl':_0x5f43b3};_0x316008[_0x3df234(0xac)](Object[_0x3df234(0xeb)](_0x7e0cac)[_0x3df234(0x10c)],0x0)&&(_0x465575['setupHeaders']=_0x7e0cac);let _0x51973a;try{_0x51973a=await createCloudProfile(_0x4c143c,undefined,{'settings':_0x465575}),warnCloudProfileSharedInOrg();}catch(_0x44ff30){_0x316008['GsYYB'](_0x44ff30,ApiError)&&_0x44ff30['status']===0x199&&console['error'](_0x3df234(0xd7)+_0x4c143c+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x4c143c));throw _0x44ff30;}return await _0x316008[_0x3df234(0xc5)](manualBrowserLogin,_0x51973a,{'key':'','domains':[_0x5f43b3],'setupHeaders':_0x316008['Fygta'](Object['keys'](_0x7e0cac)['length'],0x0)?_0x7e0cac:undefined}),console[_0x3df234(0xea)](_0x3df234(0x125)+_0x4c143c+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x4c143c)),await _0x316008[_0x3df234(0x12c)](sweepOrphansBestEffort,_0x4c143c),_0x7d43cd?.['trackPhaseEnd'](_0x316008['EkCKJ'],{'envKey':null,'profileName':_0x4c143c}),!![];}export async function addEnv(_0x40a4e1,_0xd3e0b7={},_0x5c601e){const _0x259c0d=_0x44fd4d,_0x56ed91={'vWloS':function(_0x1448a9,_0x497f1a){return _0x1448a9+_0x497f1a;},'hraNx':function(_0x595837,_0x123503){return _0x595837+_0x123503;},'aTwiY':_0x259c0d(0x105),'oGGOx':'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','ARyAk':'To\x20set\x20up\x20a\x20profile,\x20run:\x0a','NcKps':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','LCDzF':_0x259c0d(0x121),'AgOTk':function(_0x567777,_0x159215){return _0x567777===_0x159215;},'HckAE':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','hVTSa':_0x259c0d(0xb1),'QcBlT':function(_0x2307b2){return _0x2307b2();},'rxEoC':'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','lALKT':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','kdTKP':function(_0x43f6d7,_0x54ef33){return _0x43f6d7>_0x54ef33;},'XsubD':function(_0x21518e,_0x514f52,_0x8c32c8){return _0x21518e(_0x514f52,_0x8c32c8);},'cpTnj':'cdpEndpoint','fzGtc':function(_0x106133,_0x55ef15,_0x5a5577,_0x473994,_0x594223){return _0x106133(_0x55ef15,_0x5a5577,_0x473994,_0x594223);},'eOCTZ':function(_0x35f958,_0x59e329){return _0x35f958 instanceof _0x59e329;},'VMLSP':function(_0x56695b,_0x43b35f){return _0x56695b(_0x43b35f);},'BmFXZ':function(_0x1cf04d,_0x21901d){return _0x1cf04d(_0x21901d);},'wNIjN':'input','KxgXp':_0x259c0d(0xf3),'VSJWT':_0x259c0d(0xed),'ZczSh':function(_0xe47c05,_0x15a01b){return _0xe47c05||_0x15a01b;},'XcbJq':'action','dRjvW':'use_suggestion','eJbTY':'retry','PRlqY':_0x259c0d(0xc3),'vMFQn':function(_0x2a106b,_0x27070b){return _0x2a106b===_0x27070b;}};_0xd3e0b7['ci']&&(console['error'](_0x56ed91['vWloS'](_0x56ed91[_0x259c0d(0xfa)](_0x56ed91['hraNx'](_0x56ed91[_0x259c0d(0xd0)]+_0x56ed91['oGGOx'],'\x0a')+_0x56ed91['ARyAk'],_0x56ed91['NcKps'])+'\x0a'+_0x56ed91['LCDzF'],_0x259c0d(0xee))),process['exit'](0x1));const _0x151bb7={};if(_0xd3e0b7[_0x259c0d(0x11b)])for(const _0x386008 of _0xd3e0b7['setupHeader']){const _0xbf5992=_0x386008['indexOf'](':');if(_0x56ed91[_0x259c0d(0xc7)](_0xbf5992,-0x1))throw new Error(_0x259c0d(0xd1)+_0x386008+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0xb4fd7c=_0x386008['slice'](0x0,_0xbf5992)[_0x259c0d(0xff)](),_0x2f1206=_0x386008['slice'](_0xbf5992+0x1)[_0x259c0d(0xff)]();_0x151bb7[_0xb4fd7c]=_0x2f1206;}if(_0xd3e0b7['cdpEndpoint']!==undefined&&_0xd3e0b7[_0x259c0d(0xde)][_0x259c0d(0xff)]()==='')throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0xd3e0b7[_0x259c0d(0xde)]&&_0xd3e0b7[_0x259c0d(0xe3)])throw new Error(_0x56ed91['HckAE']);if(_0xd3e0b7['authEnv']&&_0xd3e0b7[_0x259c0d(0xef)])throw new Error(_0x56ed91[_0x259c0d(0xc8)]);if(_0xd3e0b7['authEnv']&&_0xd3e0b7[_0x259c0d(0xde)])throw new Error(_0x259c0d(0x122));const _0x299b89=Boolean(_0xd3e0b7[_0x259c0d(0xde)]),_0xd9351b=_0x56ed91['QcBlT'](isInteractive);if(!_0xd9351b&&!_0xd3e0b7['url']&&!_0x299b89&&!_0xd3e0b7[_0x259c0d(0xef)])throw new Error(_0x56ed91[_0x259c0d(0x115)]);if(_0x299b89){const _0x32f2eb=_0xd3e0b7[_0x259c0d(0xde)];console['log'](_0x56ed91['lALKT']),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x32f2eb);const _0x18bd3b={'cdpEndpoint':_0x32f2eb,'isElectron':!![]};_0x56ed91[_0x259c0d(0x118)](Object['keys'](_0x151bb7)[_0x259c0d(0x10c)],0x0)&&(_0x18bd3b[_0x259c0d(0x117)]=_0x151bb7);await _0x56ed91[_0x259c0d(0xe5)](createUnconfiguredCloudProfile,_0x40a4e1,_0x18bd3b);try{setProfileOverride(process[_0x259c0d(0xaa)](),_0x40a4e1,_0x56ed91['cpTnj'],_0x32f2eb),_0x56ed91[_0x259c0d(0xe6)](setProfileOverride,process['cwd'](),_0x40a4e1,_0x259c0d(0xa7),!![]);}catch(_0x51a81f){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x56ed91['eOCTZ'](_0x51a81f,Error)?_0x51a81f['message']:_0x56ed91[_0x259c0d(0xf4)](String,_0x51a81f)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x40a4e1+_0x259c0d(0x12a)),await sweepOrphansBestEffort(_0x40a4e1),await _0x56ed91['BmFXZ'](markActive,_0x40a4e1);return;}if(_0xd3e0b7['skipAuth']){const _0x64138f={};_0xd3e0b7['url']&&(_0x64138f['baseUrl']=_0xd3e0b7[_0x259c0d(0xe3)]);_0x56ed91['kdTKP'](Object['keys'](_0x151bb7)[_0x259c0d(0x10c)],0x0)&&(_0x64138f[_0x259c0d(0x117)]=_0x151bb7);await createUnconfiguredCloudProfile(_0x40a4e1,_0x64138f),console['log']('✓\x20Profile\x20\x27'+_0x40a4e1+_0x259c0d(0xcf)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x40a4e1+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x40a4e1),await markActive(_0x40a4e1);return;}if(_0xd3e0b7['url']){const _0x47ce8e=_0xd3e0b7[_0x259c0d(0xe3)],_0x11d5c6=await checkUrlReachability(_0x47ce8e);if(!_0x11d5c6['ok']&&!_0xd3e0b7['force'])throw new Error(_0x259c0d(0x120)+_0x47ce8e+':\x20'+_0x11d5c6['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x11d5c6['ok']&&_0xd3e0b7[_0x259c0d(0x11a)]&&console['log'](_0x259c0d(0x108)+_0x47ce8e+':\x20'+_0x11d5c6['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x259c0d(0xea)](_0x259c0d(0xda)),console['log'](_0x259c0d(0x104)),console[_0x259c0d(0xea)](_0x259c0d(0x10d));let _0x3ee2b2='',_0x5b8f5a=![];while(!![]){const _0xfdb7f8=await _0x31a510[_0x259c0d(0xd2)]([{'type':_0x56ed91[_0x259c0d(0x10f)],'name':_0x56ed91[_0x259c0d(0x12d)],'message':_0x5b8f5a?_0x56ed91[_0x259c0d(0x109)]:_0x259c0d(0xf6),'default':_0x56ed91['ZczSh'](_0x3ee2b2,_0x259c0d(0xc6))}]);_0x3ee2b2=_0xfdb7f8[_0x259c0d(0xf3)];const _0x34dff9=await checkUrlReachability(_0x3ee2b2);if(_0x34dff9['ok'])break;const _0x15b31f=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x3ee2b2),_0x2f5d8e=_0x34dff9[_0x259c0d(0xb3)]&&!_0x15b31f,_0x54a547=_0x2f5d8e?'http://'+_0x3ee2b2:null;_0x5b8f5a=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x3ee2b2+':\x20'+_0x34dff9['error']);_0x54a547&&console[_0x259c0d(0xea)](_0x259c0d(0x116)+_0x54a547+'?');const {action:_0x5acbcb}=await _0x31a510[_0x259c0d(0xd2)]([{'type':'list','name':_0x56ed91[_0x259c0d(0x129)],'message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x54a547?[{'name':'Use\x20'+_0x54a547,'value':_0x56ed91[_0x259c0d(0xe4)]}]:[],{'name':_0x259c0d(0x128),'value':_0x56ed91['eJbTY']},{'name':_0x259c0d(0xe9),'value':_0x56ed91[_0x259c0d(0xae)]}]}]);if(_0x56ed91[_0x259c0d(0xc7)](_0x5acbcb,_0x259c0d(0x113))&&_0x54a547){_0x3ee2b2=_0x54a547;const _0x4c7d1d=await checkUrlReachability(_0x3ee2b2);if(_0x4c7d1d['ok'])break;console['log'](_0x259c0d(0xdb)+_0x3ee2b2+':\x20'+_0x4c7d1d['error']);}else{if(_0x56ed91[_0x259c0d(0xb4)](_0x5acbcb,'continue'))break;}}_0xd3e0b7={..._0xd3e0b7,'url':_0x3ee2b2};}let _0x10b921=![];try{_0x10b921=await tryAutoRouteCloudProfile(_0x40a4e1,_0xd3e0b7['url'],_0xd3e0b7,_0xd9351b,_0x5c601e);}catch(_0x4c58d2){console[_0x259c0d(0x10e)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x40a4e1+'\x22:\x20'+(_0x4c58d2 instanceof Error?_0x4c58d2['message']:String(_0x4c58d2))),process[_0x259c0d(0x12e)](0x1);}!_0x10b921&&process['exit'](0x1),await markActive(_0x40a4e1);}
1
+ const _0x291f8f=_0x3bb8;(function(_0x7a8304,_0x146abc){const _0x2eced4=_0x3bb8,_0x4a0ab6=_0x7a8304();while(!![]){try{const _0x272bbe=-parseInt(_0x2eced4(0x1a0))/0x1+parseInt(_0x2eced4(0x1a9))/0x2+-parseInt(_0x2eced4(0x1ef))/0x3+-parseInt(_0x2eced4(0x208))/0x4+-parseInt(_0x2eced4(0x1c9))/0x5*(-parseInt(_0x2eced4(0x192))/0x6)+-parseInt(_0x2eced4(0x1a8))/0x7*(parseInt(_0x2eced4(0x1cb))/0x8)+parseInt(_0x2eced4(0x1ed))/0x9;if(_0x272bbe===_0x146abc)break;else _0x4a0ab6['push'](_0x4a0ab6['shift']());}catch(_0x5beebb){_0x4a0ab6['push'](_0x4a0ab6['shift']());}}}(_0x1a99,0xe4a06));import{readdir,rm}from'fs/promises';function _0x3bb8(_0x5a7230,_0x634641){_0x5a7230=_0x5a7230-0x188;const _0x1a995b=_0x1a99();let _0x3bb8ed=_0x1a995b[_0x5a7230];return _0x3bb8ed;}function _0x1a99(){const _0x4131a3=['1174016uJGLEf','action','\x20\x20https://docs.ranger.net/main/concepts/profiles','\x0a\x20\x20(domains:\x20','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','qiGWi','retry','\x20\x20Did\x20you\x20mean\x20','8967luubRd','338948SYEwXT','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','dXWvv','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','Enter\x20a\x20different\x20URL','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','Could\x20not\x20reach\x20','\x27\x20to\x20the\x20cloud?','mSFil','\x20Configured\x20envs:\x20','\x20--url\x20','message','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','zNYan','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','HTTP\x20','tOUIm','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','JTFHO','skipAuth','What\x20would\x20you\x20like\x20to\x20do?','Ktfwf','indexOf','TFLvL','yHCXk','length','\x0a\x20\x20Could\x20not\x20reach\x20','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','error','\x22\x20not\x20found.','200630kstqGA','authEnv','5136NglVxE','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','input','name','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','EyDRp','ncaxP','trackPhaseEnd','env','YLZOl','profile.add.autoRouted','keys','JgsfR','IEPWe','capture','exit','`\x20again\x20without\x20--skip-auth.','rxaGb','rtHVU','qezAn','mhcCj','nZUbF','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','prompt','unRSo','join','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','use_suggestion','dYPkL','adLqY','yes','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','\x20\x20Set\x20active\x20profile:\x20','xtcyu','39903939eApLai','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','5426247prwHRK','baseUrl','url','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','Pzaix','\x27\x20matching\x20','confirm','\x27\x20created.\x0a','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','log','Jldtd','saveToCloud','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','eSESg','uOiLC','JfAxO','jdcmk','HEAD','setupHeader','.tmp-','abort','Use\x20','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','no_auth_config','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','6508672jzrIQO','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','local','includes','fetch\x20failed','http://localhost:3000','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','profile.add.autoRouteSkipped','cwd','LtMBO','isTTY','cdpEndpoint','Found\x20auth\x20environment\x20\x27','kRzNr','setupHeaders','domains','✓\x20Profile\x20\x27','264vqvmAc','environments','trim','OedeB','NODE_TLS_REJECT_UNAUTHORIZED','\x0a\x20\x20A\x20profile\x20named\x20\x22','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','slice','continue','✓\x20Cloud\x20profile\x20\x27','cjPXo','ktWIR','\x0a\x20\x20Auth\x20environment\x20\x22','status'];_0x1a99=function(){return _0x4131a3;};return _0x1a99();}import{join}from'path';import{existsSync}from'fs';import _0x474d25 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x291f8f(0x1cf);function warnCloudProfileSharedInOrg(){const _0x1e06f8=_0x291f8f;if(!process['stdout'][_0x1e06f8(0x18b)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x519e35){const _0x3fce2a=_0x291f8f,_0x2dd9a1={'IMCEn':function(_0x1acffb,_0xbe5bd,_0x2f6f1d){return _0x1acffb(_0xbe5bd,_0x2f6f1d);},'dbbtG':'manual','SPgoO':function(_0x2fb95b,_0x26549d,_0x33bc67){return _0x2fb95b(_0x26549d,_0x33bc67);},'McIuO':function(_0x4c213b,_0x192408){return _0x4c213b(_0x192408);},'HnkXC':'Invalid\x20URL','SuHzh':function(_0x56a460,_0x5f08b6){return _0x56a460===_0x5f08b6;},'BdWsi':_0x3fce2a(0x20c)};try{const _0x1d229a=new AbortController(),_0x1d52d1=_0x2dd9a1['IMCEn'](setTimeout,()=>_0x1d229a[_0x3fce2a(0x203)](),0x1388),_0x25be4f={'method':_0x3fce2a(0x200),'signal':_0x1d229a['signal'],'redirect':_0x2dd9a1['dbbtG']};/^https:\/\/localhost(:\d+)?/i['test'](_0x519e35)&&(process[_0x3fce2a(0x1d3)][_0x3fce2a(0x196)]='0');const _0x44c88c=await _0x2dd9a1['SPgoO'](fetch,_0x519e35,_0x25be4f);delete process[_0x3fce2a(0x1d3)][_0x3fce2a(0x196)],_0x2dd9a1['McIuO'](clearTimeout,_0x1d52d1);if(_0x44c88c[_0x3fce2a(0x19f)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0x3fce2a(0x1b9)+_0x44c88c[_0x3fce2a(0x19f)]};}catch(_0x2797b9){delete process[_0x3fce2a(0x1d3)][_0x3fce2a(0x196)];const _0x1ab042=_0x2797b9,_0x309043=_0x1ab042[_0x3fce2a(0x1b5)]||_0x2dd9a1['McIuO'](String,_0x2797b9),_0x282f77=_0x309043['includes'](_0x2dd9a1['HnkXC'])||_0x2dd9a1['SuHzh'](_0x1ab042[_0x3fce2a(0x1ce)],'TypeError')||_0x309043[_0x3fce2a(0x20b)](_0x2dd9a1['BdWsi']);return{'ok':![],'error':_0x309043,'isProtocolError':_0x282f77};}}async function sweepOrphanLocalProfile(_0x33a2fe,_0x22714e,_0x1437f8){const _0x423ea0=_0x291f8f,_0x4fb2cf={'qezAn':function(_0x5cf4cb,_0x590dd1,_0x1fa07e){return _0x5cf4cb(_0x590dd1,_0x1fa07e);},'JfAxO':_0x423ea0(0x20a),'OWXGc':function(_0x12808b,_0x328e50){return _0x12808b(_0x328e50);},'Jldtd':function(_0x192883,_0x186916){return _0x192883(_0x186916);}},_0x41df12=_0x4fb2cf[_0x423ea0(0x1de)](join,_0x22714e,_0x4fb2cf[_0x423ea0(0x1fe)]),_0x5e3826=join(_0x41df12,_0x33a2fe);existsSync(_0x5e3826)&&(_0x1437f8&&await _0x4fb2cf['OWXGc'](isPathGitTracked,_0x5e3826)?console[_0x423ea0(0x1f8)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x5e3826+_0x423ea0(0x1c6)):(await _0x4fb2cf[_0x423ea0(0x1de)](rm,_0x5e3826,{'recursive':!![],'force':!![]}),console[_0x423ea0(0x1f8)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x5e3826)));if(_0x4fb2cf[_0x423ea0(0x1f9)](existsSync,_0x41df12)){let _0x51e6b6=[];try{_0x51e6b6=await readdir(_0x41df12);}catch{return;}const _0x3172ce=_0x423ea0(0x202)+_0x33a2fe+'-';for(const _0x3c937f of _0x51e6b6){if(!_0x3c937f['startsWith'](_0x3172ce))continue;const _0xeceb41=join(_0x41df12,_0x3c937f);await _0x4fb2cf[_0x423ea0(0x1de)](rm,_0xeceb41,{'recursive':!![],'force':!![]}),console[_0x423ea0(0x1f8)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0xeceb41);}}}async function sweepOrphansBestEffort(_0x2614dc){const _0x598e59=_0x291f8f,_0x2e1f21={'jdcmk':function(_0x362808,_0x39c514){return _0x362808 instanceof _0x39c514;}};try{await sweepOrphanLocalProfile(_0x2614dc,getRangerHomeDir(),![]);const _0x2e6804=getRangerDir();_0x2e6804!==getRangerHomeDir()&&await sweepOrphanLocalProfile(_0x2614dc,_0x2e6804,!![]);}catch(_0x3019f9){console[_0x598e59(0x1f8)](_0x598e59(0x1ae)+(_0x2e1f21[_0x598e59(0x1ff)](_0x3019f9,Error)?_0x3019f9[_0x598e59(0x1b5)]:String(_0x3019f9))+').');}}async function markActive(_0x333274){const _0x5da9d2=_0x291f8f,_0x2252d2={'tOUIm':_0x5da9d2(0x1f7)};try{await writeActiveProfileName(_0x333274),console['log'](_0x5da9d2(0x1eb)+_0x333274);}catch{console[_0x5da9d2(0x1f8)](_0x2252d2[_0x5da9d2(0x1ba)]);}}async function tryAutoRouteCloudProfile(_0x34750f,_0x37b928,_0x2bedc0,_0x39164d,_0xf1d95b){const _0x606e68=_0x291f8f,_0xf014d0={'OedeB':function(_0x1eb6bf,_0x4eab68){return _0x1eb6bf===_0x4eab68;},'JgsfR':'profile.add.autoRouteSkipped','TAoHC':function(_0x7881a0,_0x2a5203,_0x2a496f,_0xebd37c,_0x1fc974){return _0x7881a0(_0x2a5203,_0x2a496f,_0xebd37c,_0x1fc974);},'xvqTA':'no_auth_config','eSESg':function(_0x584515,_0x1a4b33){return _0x584515+_0x1a4b33;},'qiGWi':_0x606e68(0x1bb),'zNYan':_0x606e68(0x1e1),'cjPXo':'env_not_found','yHCXk':_0x606e68(0x1a4),'ycDmw':_0x606e68(0x1fa),'EyDRp':_0x606e68(0x1f2),'xtcyu':function(_0x2a07aa,_0x7f93f5,_0x1fcbe2,_0x57ebe2){return _0x2a07aa(_0x7f93f5,_0x1fcbe2,_0x57ebe2);},'kRzNr':function(_0x461437,_0xa8f5ac){return _0x461437 instanceof _0xa8f5ac;},'IEPWe':function(_0x13a57f,_0x318760){return _0x13a57f===_0x318760;},'OahXI':function(_0x2452b2,_0x4caed1){return _0x2452b2+_0x4caed1;},'TCNsq':function(_0x22b50e,_0x4aa9d5){return _0x22b50e(_0x4aa9d5);}};let _0x38c6af;try{_0x38c6af=await fetchAuthConfig();}catch(_0x4713d7){return _0xf1d95b?.[_0x606e68(0x1d2)](_0xf014d0[_0x606e68(0x1d7)],{'reason':_0x606e68(0x206),'profileName':_0x34750f}),console[_0x606e68(0x1c7)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x4713d7 instanceof Error?_0x4713d7[_0x606e68(0x1b5)]:String(_0x4713d7))),![];}if((!_0x38c6af||!_0x38c6af['environments']||Object[_0x606e68(0x1d6)](_0x38c6af['environments'])['length']===0x0)&&!_0x2bedc0['authEnv']){if(_0x39164d)return await _0xf014d0['TAoHC'](captureEnvLessProfile,_0x34750f,_0x37b928,_0x2bedc0,_0xf1d95b);return _0xf1d95b?.['trackPhaseEnd'](_0xf014d0['JgsfR'],{'reason':_0xf014d0['xvqTA'],'profileName':_0x34750f}),console[_0x606e68(0x1c7)](_0xf014d0['eSESg'](_0xf014d0[_0x606e68(0x1fc)]('\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')+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x34750f+_0x606e68(0x1b4)+_0x37b928+'\x20--skip-auth\x0a')+'\x0a'+_0xf014d0[_0x606e68(0x1a5)],_0xf014d0[_0x606e68(0x1b7)])),![];}let _0x2f9ade;if(_0x2bedc0[_0x606e68(0x1ca)]){if(!_0x38c6af?.[_0x606e68(0x193)]?.[_0x2bedc0[_0x606e68(0x1ca)]]){const _0x2d51d7=Object[_0x606e68(0x1d6)](_0x38c6af?.['environments']??{});return _0xf1d95b?.['trackPhaseEnd'](_0xf014d0['JgsfR'],{'reason':_0xf014d0[_0x606e68(0x19c)],'profileName':_0x34750f}),console[_0x606e68(0x1c7)](_0xf014d0['eSESg'](_0x606e68(0x19e)+_0x2bedc0[_0x606e68(0x1ca)]+_0x606e68(0x1c8),_0x2d51d7[_0x606e68(0x1c3)]?_0x606e68(0x1b3)+_0x2d51d7['join'](',\x20')+'.':_0xf014d0[_0x606e68(0x1c2)])),![];}_0x2f9ade=_0x2bedc0['authEnv'];}else _0x2f9ade=matchAuthEnvironment(_0x37b928,_0x38c6af);if(!_0x2f9ade)return _0xf1d95b?.[_0x606e68(0x1d2)](_0xf014d0['JgsfR'],{'reason':'no_match','profileName':_0x34750f}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x37b928+_0x606e68(0x20e)+Object[_0x606e68(0x1d6)](_0x38c6af?.[_0x606e68(0x193)]??{})[_0x606e68(0x1e4)](',\x20')+'.'),![];const _0x2564dc=_0x38c6af?.[_0x606e68(0x193)]?.[_0x2f9ade],_0x333b89=_0x2564dc?.[_0x606e68(0x190)]??[];if(_0x39164d&&!_0x2bedc0[_0x606e68(0x1e9)]){const {saveToCloud:_0x54d385}=await _0x474d25['prompt']([{'type':'confirm','name':_0xf014d0['ycDmw'],'message':_0x606e68(0x18d)+_0x2f9ade+_0x606e68(0x1f4)+_0x37b928+_0x606e68(0x1a3)+_0x333b89[_0x606e68(0x1e4)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x34750f+_0x606e68(0x1b1),'default':!![]}]);if(!_0x54d385)return _0xf1d95b?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':'user_declined','profileName':_0x34750f}),console[_0x606e68(0x1c7)](_0xf014d0[_0x606e68(0x1d0)]),![];}const _0x1ad065=_0x333b89['some'](_0x1e875b=>{const _0x177b70=_0x606e68;try{return _0xf014d0[_0x177b70(0x195)](new URL(_0x1e875b)['origin'],new URL(_0x37b928)['origin']);}catch{return![];}}),_0x4876be={};!_0x1ad065&&(_0x4876be['baseUrl']=_0x37b928);try{await _0xf014d0[_0x606e68(0x1ec)](createCloudProfile,_0x34750f,_0x2f9ade,{'settings':_0x4876be}),warnCloudProfileSharedInOrg();}catch(_0x78e449){if(_0xf014d0[_0x606e68(0x18e)](_0x78e449,ApiError)&&_0xf014d0[_0x606e68(0x1d8)](_0x78e449[_0x606e68(0x19f)],0x199)){console['error'](_0xf014d0[_0x606e68(0x1fc)](_0x606e68(0x197)+_0x34750f+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x34750f));throw _0x78e449;}throw _0x78e449;}return console['log'](_0xf014d0['OahXI'](_0x606e68(0x191)+_0x34750f+_0x606e68(0x1f6),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x34750f)),await _0xf014d0['TCNsq'](sweepOrphansBestEffort,_0x34750f),_0xf1d95b?.['trackPhaseEnd'](_0x606e68(0x1d5),{'envKey':_0x2f9ade,'profileName':_0x34750f}),!![];}async function createUnconfiguredCloudProfile(_0x1c5e96,_0x295cc6){const _0x20a15a=_0x291f8f,_0x155119={'nZUbF':function(_0x57cd55){return _0x57cd55();},'dXWvv':function(_0x3ffc3e,_0x3948eb){return _0x3ffc3e+_0x3948eb;}};try{await createCloudProfile(_0x1c5e96,undefined,{'settings':_0x295cc6}),_0x155119[_0x20a15a(0x1e0)](warnCloudProfileSharedInOrg);}catch(_0x1c1323){_0x1c1323 instanceof ApiError&&_0x1c1323['status']===0x199&&console['error'](_0x155119[_0x20a15a(0x1ab)](_0x20a15a(0x197)+_0x1c5e96+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x20a15a(0x1cc)+_0x1c5e96));throw _0x1c1323;}}async function captureEnvLessProfile(_0x564c3b,_0x1222af,_0x27b5a7,_0x3518ae){const _0x4e2664=_0x291f8f,_0x3508c5={'rtHVU':_0x4e2664(0x1d9),'afmKq':_0x4e2664(0x209),'ffyZv':_0x4e2664(0x188),'JqXYn':function(_0x47c9e4,_0x1b9294){return _0x47c9e4===_0x1b9294;},'gJmGa':function(_0x399b4f,_0x4db029){return _0x399b4f+_0x4db029;},'iWaGW':function(_0x2cae1a){return _0x2cae1a();},'RtSbV':_0x4e2664(0x1d5)};if(!_0x27b5a7['yes']){const {capture:_0x270634}=await _0x474d25['prompt']([{'type':_0x4e2664(0x1f5),'name':_0x3508c5[_0x4e2664(0x1dd)],'message':_0x3508c5['afmKq'],'default':!![]}]);if(!_0x270634)return _0x3518ae?.[_0x4e2664(0x1d2)](_0x3508c5['ffyZv'],{'reason':'user_declined','profileName':_0x564c3b}),console[_0x4e2664(0x1c7)](_0x4e2664(0x1e5)+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x4a5020={};if(_0x27b5a7[_0x4e2664(0x201)])for(const _0x52c14e of _0x27b5a7[_0x4e2664(0x201)]){const _0x3c5593=_0x52c14e[_0x4e2664(0x1c0)](':');if(_0x3508c5['JqXYn'](_0x3c5593,-0x1))continue;_0x4a5020[_0x52c14e[_0x4e2664(0x199)](0x0,_0x3c5593)['trim']()]=_0x52c14e['slice'](_0x3508c5['gJmGa'](_0x3c5593,0x1))[_0x4e2664(0x194)]();}const _0x4d5935={'baseUrl':_0x1222af};Object[_0x4e2664(0x1d6)](_0x4a5020)['length']>0x0&&(_0x4d5935['setupHeaders']=_0x4a5020);let _0x13a056;try{_0x13a056=await createCloudProfile(_0x564c3b,undefined,{'settings':_0x4d5935}),_0x3508c5['iWaGW'](warnCloudProfileSharedInOrg);}catch(_0x13538e){_0x13538e instanceof ApiError&&_0x13538e[_0x4e2664(0x19f)]===0x199&&console['error'](_0x4e2664(0x197)+_0x564c3b+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x4e2664(0x1cc)+_0x564c3b));throw _0x13538e;}return await manualBrowserLogin(_0x13a056,{'key':'','domains':[_0x1222af],'setupHeaders':Object['keys'](_0x4a5020)['length']>0x0?_0x4a5020:undefined}),console[_0x4e2664(0x1f8)]('\x0a✓\x20Profile\x20\x27'+_0x564c3b+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x564c3b)),await sweepOrphansBestEffort(_0x564c3b),_0x3518ae?.[_0x4e2664(0x1d2)](_0x3508c5['RtSbV'],{'envKey':null,'profileName':_0x564c3b}),!![];}export async function addEnv(_0x1c2670,_0x1118b0={},_0x4a692d){const _0x4e05a9=_0x291f8f,_0x438549={'ncaxP':function(_0x110fbd,_0x22512a){return _0x110fbd+_0x22512a;},'uHJaR':_0x4e05a9(0x1ee),'NlLbG':_0x4e05a9(0x207),'unRSo':_0x4e05a9(0x1a2),'WOrOn':function(_0x1f99e2,_0x17b414){return _0x1f99e2===_0x17b414;},'mhcCj':function(_0x44ed8d,_0x36052c){return _0x44ed8d!==_0x36052c;},'ktWIR':_0x4e05a9(0x1af),'JTFHO':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','JlcCW':_0x4e05a9(0x1aa),'Ktfwf':function(_0x11a5bb,_0x31a63c,_0x3ab376,_0x1bfcfe,_0x43cdff){return _0x11a5bb(_0x31a63c,_0x3ab376,_0x1bfcfe,_0x43cdff);},'AUSdu':'isElectron','uOiLC':function(_0x407fdf,_0x4dbaa3){return _0x407fdf(_0x4dbaa3);},'sFYOB':function(_0x4284fa,_0x2304da){return _0x4284fa(_0x2304da);},'YLZOl':function(_0x42eb3a,_0x39b5ac,_0x44af6f){return _0x42eb3a(_0x39b5ac,_0x44af6f);},'NkzbG':function(_0x1936a5,_0x4953fe){return _0x1936a5(_0x4953fe);},'LtMBO':'\x0a🌐\x20Profile\x20Setup\x0a','Pzaix':_0x4e05a9(0x205),'sZUbt':_0x4e05a9(0x1f0),'mSFil':_0x4e05a9(0x198),'rxaGb':function(_0x5d9cab,_0x23dcf1){return _0x5d9cab||_0x23dcf1;},'dYPkL':_0x4e05a9(0x1ad),'adLqY':'Continue\x20anyway','OYvzL':function(_0x382247,_0x169731){return _0x382247===_0x169731;},'WWiNt':_0x4e05a9(0x19a),'woFfy':function(_0x3792a6,_0x491e00,_0x350f28,_0x23e12a,_0x1b4bcc,_0xabc48){return _0x3792a6(_0x491e00,_0x350f28,_0x23e12a,_0x1b4bcc,_0xabc48);},'TFLvL':function(_0x47245b,_0x3fe4e2){return _0x47245b(_0x3fe4e2);}};_0x1118b0['ci']&&(console[_0x4e05a9(0x1c7)](_0x438549[_0x4e05a9(0x1d1)](_0x438549['ncaxP'](_0x438549[_0x4e05a9(0x1d1)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'+_0x4e05a9(0x1c5),'\x0a')+_0x438549['uHJaR']+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a',_0x438549['NlLbG']),_0x438549[_0x4e05a9(0x1e3)])),process[_0x4e05a9(0x1da)](0x1));const _0x2ec69a={};if(_0x1118b0[_0x4e05a9(0x201)])for(const _0x143c71 of _0x1118b0['setupHeader']){const _0x11ab23=_0x143c71['indexOf'](':');if(_0x438549['WOrOn'](_0x11ab23,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x143c71+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x4b00ee=_0x143c71['slice'](0x0,_0x11ab23)[_0x4e05a9(0x194)](),_0x279bbe=_0x143c71[_0x4e05a9(0x199)](_0x438549['ncaxP'](_0x11ab23,0x1))['trim']();_0x2ec69a[_0x4b00ee]=_0x279bbe;}if(_0x438549[_0x4e05a9(0x1df)](_0x1118b0['cdpEndpoint'],undefined)&&_0x1118b0['cdpEndpoint']['trim']()==='')throw new Error(_0x438549[_0x4e05a9(0x19d)]);if(_0x1118b0[_0x4e05a9(0x18c)]&&_0x1118b0['url'])throw new Error(_0x438549[_0x4e05a9(0x1bc)]);if(_0x1118b0[_0x4e05a9(0x1ca)]&&_0x1118b0[_0x4e05a9(0x1bd)])throw new Error('--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.');if(_0x1118b0['authEnv']&&_0x1118b0['cdpEndpoint'])throw new Error(_0x4e05a9(0x1ac));const _0x238b30=Boolean(_0x1118b0['cdpEndpoint']),_0x57dfc1=isInteractive();if(!_0x57dfc1&&!_0x1118b0['url']&&!_0x238b30&&!_0x1118b0[_0x4e05a9(0x1bd)])throw new Error('Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000');if(_0x238b30){const _0x4435cb=_0x1118b0['cdpEndpoint'];console[_0x4e05a9(0x1f8)](_0x438549['JlcCW']),console[_0x4e05a9(0x1f8)](_0x4e05a9(0x1ea)+_0x4435cb);const _0x217ed9={'cdpEndpoint':_0x4435cb,'isElectron':!![]};Object['keys'](_0x2ec69a)['length']>0x0&&(_0x217ed9[_0x4e05a9(0x18f)]=_0x2ec69a);await createUnconfiguredCloudProfile(_0x1c2670,_0x217ed9);try{_0x438549[_0x4e05a9(0x1bf)](setProfileOverride,process[_0x4e05a9(0x189)](),_0x1c2670,_0x4e05a9(0x18c),_0x4435cb),_0x438549['Ktfwf'](setProfileOverride,process['cwd'](),_0x1c2670,_0x438549['AUSdu'],!![]);}catch(_0x1b0655){console[_0x4e05a9(0x1c7)](_0x4e05a9(0x1b8)+(_0x1b0655 instanceof Error?_0x1b0655[_0x4e05a9(0x1b5)]:_0x438549[_0x4e05a9(0x1fd)](String,_0x1b0655)));}console[_0x4e05a9(0x1f8)](_0x4e05a9(0x19b)+_0x1c2670+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x1c2670),await _0x438549['sFYOB'](markActive,_0x1c2670);return;}if(_0x1118b0['skipAuth']){const _0x426c94={};_0x1118b0['url']&&(_0x426c94[_0x4e05a9(0x1f0)]=_0x1118b0[_0x4e05a9(0x1f1)]);Object[_0x4e05a9(0x1d6)](_0x2ec69a)['length']>0x0&&(_0x426c94[_0x4e05a9(0x18f)]=_0x2ec69a);await _0x438549[_0x4e05a9(0x1d4)](createUnconfiguredCloudProfile,_0x1c2670,_0x426c94),console[_0x4e05a9(0x1f8)](_0x4e05a9(0x191)+_0x1c2670+'\x27\x20created\x20(no\x20session).\x0a'+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x1c2670+_0x4e05a9(0x1db))),await sweepOrphansBestEffort(_0x1c2670),await markActive(_0x1c2670);return;}if(_0x1118b0[_0x4e05a9(0x1f1)]){const _0x138b26=_0x1118b0['url'],_0x14a8fa=await _0x438549['NkzbG'](checkUrlReachability,_0x138b26);if(!_0x14a8fa['ok']&&!_0x1118b0['force'])throw new Error(_0x4e05a9(0x1b0)+_0x138b26+':\x20'+_0x14a8fa['error']+_0x4e05a9(0x1b6));!_0x14a8fa['ok']&&_0x1118b0['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x138b26+':\x20'+_0x14a8fa['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x4e05a9(0x1f8)](_0x438549[_0x4e05a9(0x18a)]),console['log'](_0x438549[_0x4e05a9(0x1f3)]),console[_0x4e05a9(0x1f8)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x5b1979='',_0xe2518=![];while(!![]){const _0x6e83d9=await _0x474d25[_0x4e05a9(0x1e2)]([{'type':_0x4e05a9(0x1cd),'name':_0x438549['sZUbt'],'message':_0xe2518?_0x4e05a9(0x1fb):_0x438549[_0x4e05a9(0x1b2)],'default':_0x438549[_0x4e05a9(0x1dc)](_0x5b1979,_0x4e05a9(0x20d))}]);_0x5b1979=_0x6e83d9['baseUrl'];const _0x484917=await checkUrlReachability(_0x5b1979);if(_0x484917['ok'])break;const _0x34f2b3=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x5b1979),_0x2bf5d5=_0x484917['isProtocolError']&&!_0x34f2b3,_0x36a9f0=_0x2bf5d5?'http://'+_0x5b1979:null;_0xe2518=!![],console['log'](_0x4e05a9(0x1c4)+_0x5b1979+':\x20'+_0x484917['error']);_0x36a9f0&&console[_0x4e05a9(0x1f8)](_0x4e05a9(0x1a7)+_0x36a9f0+'?');const {action:_0x38965e}=await _0x474d25['prompt']([{'type':'list','name':_0x4e05a9(0x1a1),'message':_0x4e05a9(0x1be),'choices':[..._0x36a9f0?[{'name':_0x4e05a9(0x204)+_0x36a9f0,'value':_0x4e05a9(0x1e6)}]:[],{'name':_0x438549[_0x4e05a9(0x1e7)],'value':_0x4e05a9(0x1a6)},{'name':_0x438549[_0x4e05a9(0x1e8)],'value':'continue'}]}]);if(_0x38965e==='use_suggestion'&&_0x36a9f0){_0x5b1979=_0x36a9f0;const _0x447329=await _0x438549['NkzbG'](checkUrlReachability,_0x5b1979);if(_0x447329['ok'])break;console[_0x4e05a9(0x1f8)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x5b1979+':\x20'+_0x447329['error']);}else{if(_0x438549['OYvzL'](_0x38965e,_0x438549['WWiNt']))break;}}_0x1118b0={..._0x1118b0,'url':_0x5b1979};}let _0x5d5c50=![];try{_0x5d5c50=await _0x438549['woFfy'](tryAutoRouteCloudProfile,_0x1c2670,_0x1118b0['url'],_0x1118b0,_0x57dfc1,_0x4a692d);}catch(_0x3e452d){console[_0x4e05a9(0x1c7)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x1c2670+'\x22:\x20'+(_0x3e452d instanceof Error?_0x3e452d[_0x4e05a9(0x1b5)]:_0x438549[_0x4e05a9(0x1c1)](String,_0x3e452d))),process[_0x4e05a9(0x1da)](0x1);}!_0x5d5c50&&process['exit'](0x1),await markActive(_0x1c2670);}
@@ -1 +1 @@
1
- function _0x4a24(_0x387c7b,_0x2f38c1){_0x387c7b=_0x387c7b-0x1de;var _0x413cfa=_0x413c();var _0x4a2466=_0x413cfa[_0x387c7b];return _0x4a2466;}(function(_0x13b805,_0x40ceca){var _0x47be13=_0x4a24,_0x2438e6=_0x13b805();while(!![]){try{var _0x30d60a=-parseInt(_0x47be13(0x1e8))/0x1*(-parseInt(_0x47be13(0x1de))/0x2)+parseInt(_0x47be13(0x1e6))/0x3*(-parseInt(_0x47be13(0x1e7))/0x4)+-parseInt(_0x47be13(0x1df))/0x5+-parseInt(_0x47be13(0x1e0))/0x6+parseInt(_0x47be13(0x1e1))/0x7*(parseInt(_0x47be13(0x1e9))/0x8)+-parseInt(_0x47be13(0x1ea))/0x9+-parseInt(_0x47be13(0x1eb))/0xa*(-parseInt(_0x47be13(0x1e5))/0xb);if(_0x30d60a===_0x40ceca)break;else _0x2438e6['push'](_0x2438e6['shift']());}catch(_0x55e9d7){_0x2438e6['push'](_0x2438e6['shift']());}}}(_0x413c,0x41195));export async function authEncrypt(_0x4e804a){var _0x23ca3f=_0x4a24,_0x45405d={'nPlIQ':function(_0x254296,_0x37294a){return _0x254296+_0x37294a;},'RQvuA':'ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','uAMAQ':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console['error'](_0x45405d[_0x23ca3f(0x1e3)](_0x45405d['nPlIQ'](_0x45405d[_0x23ca3f(0x1e3)](_0x45405d['RQvuA']+'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','\x0a'),'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a')+_0x23ca3f(0x1e4)+_0x45405d[_0x23ca3f(0x1e2)]),process['exit'](0x1);}function _0x413c(){var _0x181533=['90GlMJrZ','44078Cgmmcd','881570lRZURp','2550372ATYTgv','108507XGEwhx','uAMAQ','nPlIQ','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','800602FnPpKI','912147WieDEY','4uZclyX','21EbhsSE','136LNCBgI','1883736wXuRik'];_0x413c=function(){return _0x181533;};return _0x413c();}
1
+ function _0x4d6d(){var _0x1534f0=['4476185vSMltv','177DGAxQT','320451XPKvsF','error','gUQdT','2585241lDcQGF','30xVYZKH','2586CjpjcC','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','KKeEq','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','tQUiC','433264GreWQY','122124NpISAk','2744976LrFodZ','hXvsq'];_0x4d6d=function(){return _0x1534f0;};return _0x4d6d();}function _0x2cc0(_0x4567ea,_0x416f70){_0x4567ea=_0x4567ea-0x9f;var _0x4d6d64=_0x4d6d();var _0x2cc0cd=_0x4d6d64[_0x4567ea];return _0x2cc0cd;}(function(_0x2d40e3,_0xefe5c8){var _0x48ef0a=_0x2cc0,_0x1c01de=_0x2d40e3();while(!![]){try{var _0x11a851=-parseInt(_0x48ef0a(0xaa))/0x1*(parseInt(_0x48ef0a(0x9f))/0x2)+-parseInt(_0x48ef0a(0xab))/0x3+parseInt(_0x48ef0a(0xa5))/0x4+-parseInt(_0x48ef0a(0xaf))/0x5*(parseInt(_0x48ef0a(0xa6))/0x6)+parseInt(_0x48ef0a(0xa9))/0x7+parseInt(_0x48ef0a(0xa7))/0x8+-parseInt(_0x48ef0a(0xae))/0x9;if(_0x11a851===_0xefe5c8)break;else _0x1c01de['push'](_0x1c01de['shift']());}catch(_0x5e7b01){_0x1c01de['push'](_0x1c01de['shift']());}}}(_0x4d6d,0x546f2));export async function authEncrypt(_0x549861){var _0x596fc2=_0x2cc0,_0x124ba3={'tQUiC':function(_0xe063b6,_0x271232){return _0xe063b6+_0x271232;},'FlbKR':function(_0x77c605,_0x1e9f3e){return _0x77c605+_0x1e9f3e;},'GKiJc':function(_0xebf0d5,_0x138bbc){return _0xebf0d5+_0x138bbc;},'TjXrW':function(_0x3e1e9c,_0x3b321d){return _0x3e1e9c+_0x3b321d;},'daUAD':'ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','gUQdT':_0x596fc2(0xa0),'hXvsq':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','FKhLd':_0x596fc2(0xa1),'KAHWj':_0x596fc2(0xa3),'KKeEq':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console[_0x596fc2(0xac)](_0x124ba3[_0x596fc2(0xa4)](_0x124ba3['tQUiC'](_0x124ba3['FlbKR'](_0x124ba3['GKiJc'](_0x124ba3['TjXrW'](_0x124ba3['daUAD'],_0x124ba3[_0x596fc2(0xad)]),'\x0a')+_0x124ba3[_0x596fc2(0xa8)],_0x124ba3['FKhLd']),'\x0a'),_0x124ba3['KAHWj'])+_0x124ba3[_0x596fc2(0xa2)]),process['exit'](0x1);}
@@ -1 +1 @@
1
- const _0x21421c=_0x3c6e;function _0x3c6e(_0x383a94,_0x2d3609){_0x383a94=_0x383a94-0x87;const _0x2e1841=_0x2e18();let _0x3c6e16=_0x2e1841[_0x383a94];return _0x3c6e16;}function _0x2e18(){const _0x2ec911=['NyZoa','stringify','--scope','ignore','hfnRP','push','603FJUeLY','LRcMo','nfPoU','6726635TWUogT','usvsT','HWxjs','ranger','gKwbu','SucSJ','FGCFY','log','GCtiv','e2e-test-recommender','IjDKc','opencode.json','uRfWv','8xTccBN','6221105TWoeFI','project','vJZsl','utf-8','claude','✓\x20Removed\x20user\x20skill:\x20','✓\x20Removed\x20trailhead\x20marketplace','pmpLC','7cBLoBj','length','618465RtugIR','marketplace','platform','mIQOX','5518242YfDTAZ','ranger@trailhead','HYnLO','replace','LCliO','2776662FTISry','plugin','cQsJi','LUDSR','qQOOi','remove','zFHXz','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','3544LrRkMY','50KHxpNP','3042968qEAWUb','JuJZv','parse','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','UAWtP'];_0x2e18=function(){return _0x2ec911;};return _0x2e18();}(function(_0x2ada5a,_0x4c1fe4){const _0x541dee=_0x3c6e,_0x1d61f5=_0x2ada5a();while(!![]){try{const _0x48746e=parseInt(_0x541dee(0x90))/0x1*(-parseInt(_0x541dee(0xbc))/0x2)+parseInt(_0x541dee(0xab))/0x3+-parseInt(_0x541dee(0xbe))/0x4+-parseInt(_0x541dee(0x93))/0x5+parseInt(_0x541dee(0xb4))/0x6*(parseInt(_0x541dee(0xa9))/0x7)+-parseInt(_0x541dee(0xa0))/0x8*(-parseInt(_0x541dee(0xaf))/0x9)+parseInt(_0x541dee(0xbd))/0xa*(parseInt(_0x541dee(0xa1))/0xb);if(_0x48746e===_0x4c1fe4)break;else _0x1d61f5['push'](_0x1d61f5['shift']());}catch(_0xee55a){_0x1d61f5['push'](_0x1d61f5['shift']());}}}(_0x2e18,0xe455c));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x21421c(0x96),'feature-tracker','bug-bash',_0x21421c(0x9c)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x1dc6f9){const _0x423388=_0x21421c,_0x53a865=_0x1dc6f9[_0x423388(0xb2)](/\/\*[\s\S]*?\*\//g,''),_0x4f93e9=_0x53a865['replace'](/^\s*\/\/.*$/gm,''),_0x2f4f66=_0x4f93e9['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x423388(0x87)](_0x2f4f66);}async function removeOpencodePluginConfig(_0x13a969){const _0x48a8bc=_0x21421c,_0x23f37b={'hfnRP':function(_0x3677c5,_0x3379f6){return _0x3677c5(_0x3379f6);},'HWxjs':function(_0xe51fd2,_0x546b56,_0x1e762c){return _0xe51fd2(_0x546b56,_0x1e762c);},'zFHXz':function(_0x1769f3,_0x1328a3){return _0x1769f3===_0x1328a3;}};if(!_0x23f37b[_0x48a8bc(0x8e)](existsSync,_0x13a969))return![];let _0x3b76af;try{const _0x36f8e6=await _0x23f37b[_0x48a8bc(0x95)](readFile,_0x13a969,_0x48a8bc(0xa4));_0x3b76af=parseJsonc(_0x36f8e6);}catch{return![];}const _0x481315=Array['isArray'](_0x3b76af['plugin'])?_0x3b76af['plugin']:[];if(_0x23f37b[_0x48a8bc(0xba)](_0x481315[_0x48a8bc(0xaa)],0x0))return![];const _0xdb85e0=_0x481315['filter'](_0x36d3ae=>{if(typeof _0x36d3ae!=='string')return!![];return _0x36d3ae!==opencodePluginName;});if(_0xdb85e0['length']===_0x481315['length'])return![];return _0xdb85e0['length']===0x0?delete _0x3b76af['plugin']:_0x3b76af['plugin']=_0xdb85e0,await _0x23f37b['HWxjs'](writeFile,_0x13a969,JSON[_0x48a8bc(0x8b)](_0x3b76af,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x12db58){const _0x22a7bf=_0x21421c,_0x2e8f8a={'wxNUS':function(_0x2e145e,_0x1676e0){return _0x2e145e(_0x1676e0);},'HYnLO':function(_0x3fd693,_0x43c561){return _0x3fd693===_0x43c561;},'mIQOX':'uninstall','YcBKE':_0x22a7bf(0xb0),'SucSJ':function(_0x3c2ceb,_0x2239df,_0x137e10,_0x33ea9b){return _0x3c2ceb(_0x2239df,_0x137e10,_0x33ea9b);},'eBfza':_0x22a7bf(0xa5),'LUDSR':'ignore','UAWtP':function(_0x49841b){return _0x49841b();},'QfMIj':'win32'};return new Promise(_0x4a6c70=>{const _0x2d67c8=_0x22a7bf,_0x1f5ed5=['plugin',_0x2e8f8a[_0x2d67c8(0xae)],_0x2e8f8a['YcBKE']];_0x12db58&&_0x1f5ed5[_0x2d67c8(0x8f)](_0x2d67c8(0x8c),_0x12db58);const _0x3c1a31=_0x2e8f8a[_0x2d67c8(0x98)](spawn,_0x2e8f8a['eBfza'],_0x1f5ed5,{'stdio':['ignore',_0x2e8f8a[_0x2d67c8(0xb7)],'ignore'],'cwd':_0x12db58?_0x2e8f8a[_0x2d67c8(0x89)](getProjectRoot):undefined,'shell':_0x2e8f8a[_0x2d67c8(0xb1)](process[_0x2d67c8(0xad)],_0x2e8f8a['QfMIj'])});_0x3c1a31['on']('close',_0x300868=>{_0x2e8f8a['wxNUS'](_0x4a6c70,_0x2e8f8a['HYnLO'](_0x300868,0x0));}),_0x3c1a31['on']('error',()=>{_0x4a6c70(![]);});});}async function removeMarketplace(){const _0x448339=_0x21421c,_0x39c0d2={'HJMmZ':function(_0x6f63eb,_0x280212,_0x1c666f,_0x22e3df){return _0x6f63eb(_0x280212,_0x1c666f,_0x22e3df);},'kcayw':_0x448339(0xa5),'qQOOi':'trailhead','GCtiv':_0x448339(0x8d),'gKwbu':function(_0x277445,_0x590891){return _0x277445===_0x590891;},'LCliO':'close','LvaMU':'error'};return new Promise(_0x3cbdb3=>{const _0x33106e=_0x448339,_0x379b44={'teGdc':function(_0x532be4,_0x5b1d60){return _0x532be4(_0x5b1d60);}},_0x41b502=_0x39c0d2['HJMmZ'](spawn,_0x39c0d2['kcayw'],[_0x33106e(0xb5),_0x33106e(0xac),_0x33106e(0xb9),_0x39c0d2[_0x33106e(0xb8)]],{'stdio':[_0x39c0d2[_0x33106e(0x9b)],_0x39c0d2['GCtiv'],_0x39c0d2[_0x33106e(0x9b)]],'shell':_0x39c0d2[_0x33106e(0x97)](process[_0x33106e(0xad)],'win32')});_0x41b502['on'](_0x39c0d2[_0x33106e(0xb3)],_0x546e37=>{_0x3cbdb3(_0x546e37===0x0);}),_0x41b502['on'](_0x39c0d2['LvaMU'],()=>{_0x379b44['teGdc'](_0x3cbdb3,![]);});});}export async function clean(){const _0x8c0ac4=_0x21421c,_0x34525c={'uRfWv':function(_0x8c91ef){return _0x8c91ef();},'IjDKc':function(_0x331c7a,_0x16593d){return _0x331c7a(_0x16593d);},'tQGMp':function(_0x20486e,_0x4fb523,_0x19bc3c){return _0x20486e(_0x4fb523,_0x19bc3c);},'LRcMo':function(_0x2e5767,_0x248f0d){return _0x2e5767(_0x248f0d);},'FGCFY':function(_0x18b4f8,_0x1e328f,_0xb1ce20){return _0x18b4f8(_0x1e328f,_0xb1ce20);},'cQsJi':'user','DlCUS':function(_0x53b458,_0x5a6265,_0x3643f2){return _0x53b458(_0x5a6265,_0x3643f2);},'pmpLC':function(_0x4b17c2,_0x2ae667){return _0x4b17c2(_0x2ae667);},'KLsvo':function(_0x59e3d4,_0x51fff2){return _0x59e3d4(_0x51fff2);},'nfPoU':'opencode.json','NyZoa':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','vJZsl':function(_0x276b2a,_0x44ecf6){return _0x276b2a(_0x44ecf6);},'JuJZv':'\x0a✅\x20Cleanup\x20complete!\x0a','usvsT':'Nothing\x20to\x20clean\x20up.\x0a'};console[_0x8c0ac4(0x9a)]('\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a');let _0x564a60=![];try{await _0x34525c[_0x8c0ac4(0x9f)](deleteAllCredentials),console[_0x8c0ac4(0x9a)]('✓\x20Removed\x20stored\x20credentials'),_0x564a60=!![];}catch{}const _0x5f49fd=_0x34525c[_0x8c0ac4(0x9f)](getCacheFile);_0x34525c[_0x8c0ac4(0x9d)](existsSync,_0x5f49fd)&&(await rm(_0x5f49fd),_0x564a60=!![]);const _0x5833f9=_0x34525c[_0x8c0ac4(0x9f)](getRangerDir);existsSync(_0x5833f9)&&(await rm(_0x5833f9,{'recursive':!![]}),console[_0x8c0ac4(0x9a)]('✓\x20Removed\x20.ranger/\x20directory'),_0x564a60=!![]);const _0x16dd04=_0x34525c['uRfWv'](getProjectSkillsDir);for(const _0x48aa75 of skillsToRemove){const _0x46e757=join(_0x16dd04,_0x48aa75);existsSync(_0x46e757)&&(await _0x34525c['tQGMp'](rm,_0x46e757,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x48aa75),_0x564a60=!![]);}const _0x56f2f8=_0x34525c[_0x8c0ac4(0x9f)](getUserSkillsDir);for(const _0x5151f0 of skillsToRemove){const _0x2c5549=join(_0x56f2f8,_0x5151f0);_0x34525c[_0x8c0ac4(0x91)](existsSync,_0x2c5549)&&(await rm(_0x2c5549,{'recursive':!![]}),console['log'](_0x8c0ac4(0xa6)+_0x5151f0),_0x564a60=!![]);}const _0x14ae64=_0x34525c[_0x8c0ac4(0x91)](getOpencodeSkillsDir,_0x8c0ac4(0xa2));for(const _0x586d22 of skillsToRemove){const _0x294a36=_0x34525c[_0x8c0ac4(0x99)](join,_0x14ae64,_0x586d22);_0x34525c['LRcMo'](existsSync,_0x294a36)&&(await rm(_0x294a36,{'recursive':!![]}),console[_0x8c0ac4(0x9a)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x586d22),_0x564a60=!![]);}const _0x3044ad=getOpencodeSkillsDir(_0x34525c[_0x8c0ac4(0xb6)]);for(const _0x675e6e of skillsToRemove){const _0x2b90de=join(_0x3044ad,_0x675e6e);_0x34525c['LRcMo'](existsSync,_0x2b90de)&&(await rm(_0x2b90de,{'recursive':!![]}),console[_0x8c0ac4(0x9a)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x675e6e),_0x564a60=!![]);}const _0x1220c2=_0x34525c['DlCUS'](join,_0x34525c[_0x8c0ac4(0xa8)](getOpencodeConfigDir,_0x8c0ac4(0xa2)),_0x8c0ac4(0x9e));await _0x34525c['KLsvo'](removeOpencodePluginConfig,_0x1220c2)&&(console[_0x8c0ac4(0x9a)](_0x8c0ac4(0xbb)),_0x564a60=!![]);const _0x4c04cf=_0x34525c[_0x8c0ac4(0x99)](join,getOpencodeConfigDir(_0x34525c[_0x8c0ac4(0xb6)]),_0x34525c[_0x8c0ac4(0x92)]);await removeOpencodePluginConfig(_0x4c04cf)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x564a60=!![]);const _0x32ca8f=await uninstallClaudePlugin();_0x32ca8f&&(console['log'](_0x34525c[_0x8c0ac4(0x8a)]),_0x564a60=!![]);const _0x757a8d=await _0x34525c[_0x8c0ac4(0xa3)](uninstallClaudePlugin,_0x8c0ac4(0xa2));_0x757a8d&&(console['log'](_0x8c0ac4(0x88)),_0x564a60=!![]);const _0x3533fc=await _0x34525c[_0x8c0ac4(0x9f)](removeMarketplace);_0x3533fc&&(console['log'](_0x8c0ac4(0xa7)),_0x564a60=!![]),_0x564a60?console[_0x8c0ac4(0x9a)](_0x34525c[_0x8c0ac4(0xbf)]):console[_0x8c0ac4(0x9a)](_0x34525c[_0x8c0ac4(0x94)]);}
1
+ (function(_0x364c33,_0x3749d0){const _0x2367fe=_0x3d5f,_0x5bfa77=_0x364c33();while(!![]){try{const _0x5b5a37=-parseInt(_0x2367fe(0x98))/0x1*(-parseInt(_0x2367fe(0x7e))/0x2)+parseInt(_0x2367fe(0x6c))/0x3+parseInt(_0x2367fe(0x76))/0x4+-parseInt(_0x2367fe(0x97))/0x5+parseInt(_0x2367fe(0x6a))/0x6+parseInt(_0x2367fe(0x6e))/0x7+parseInt(_0x2367fe(0x7b))/0x8*(-parseInt(_0x2367fe(0x95))/0x9);if(_0x5b5a37===_0x3749d0)break;else _0x5bfa77['push'](_0x5bfa77['shift']());}catch(_0x386cdd){_0x5bfa77['push'](_0x5bfa77['shift']());}}}(_0x7447,0x4802d));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';function _0x7447(){const _0x11a721=['plugin','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','marketplace','trailhead','764888NvPpMF','claude','JXPAA','230226BPCxnJ','BxPtG','RSeYN','project','oRTnW','error','DBoDF','Mcfnr','NcnLC','akiTA','qqdly','filter','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','zHdwO','bUwOY','remove','✓\x20Removed\x20user\x20skill:\x20','✓\x20Removed\x20trailhead\x20marketplace','parse','Qgwim','drDtK','sDoRF','uninstall','90VdTgjt','HwgRH','1204510dMlAqg','2LeEXdx','fRiTW','Nothing\x20to\x20clean\x20up.\x0a','✓\x20Removed\x20.ranger/\x20directory','✓\x20Removed\x20project\x20skill:\x20','replace','length','etqSn','ranger@trailhead','XTasY','3004164eIQdtW','QEZYJ','532902pxRjLW','oZTUP','1813434QxaWJu','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','ZdWTW','log','SLQMv','win32','ignore','oKMjm','1297412wpLMrR'];_0x7447=function(){return _0x11a721;};return _0x7447();}import{existsSync}from'fs';function _0x3d5f(_0x5010d8,_0x47dbc9){_0x5010d8=_0x5010d8-0x64;const _0x744718=_0x7447();let _0x3d5f61=_0x744718[_0x5010d8];return _0x3d5f61;}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','feature-tracker','bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x392504){const _0x595429=_0x3d5f,_0x5a67ae=_0x392504['replace'](/\/\*[\s\S]*?\*\//g,''),_0x2221e6=_0x5a67ae[_0x595429(0x65)](/^\s*\/\/.*$/gm,''),_0x2b103e=_0x2221e6[_0x595429(0x65)](/,\s*([}\]])/g,'$1');return JSON[_0x595429(0x90)](_0x2b103e);}async function removeOpencodePluginConfig(_0x388523){const _0x35610e=_0x3d5f,_0x2b6ec3={'yYFmn':function(_0x2f1fa7,_0x340edd){return _0x2f1fa7!==_0x340edd;},'NkHfU':'string','twKRk':function(_0x4ccb21,_0x5560a9){return _0x4ccb21(_0x5560a9);},'RNeRq':function(_0x2d9efc,_0x5dbb98){return _0x2d9efc(_0x5dbb98);},'nmSEs':function(_0x40d65e,_0x573029){return _0x40d65e===_0x573029;},'qqdly':function(_0x2cc1ed,_0x2db6ab,_0x4c8190){return _0x2cc1ed(_0x2db6ab,_0x4c8190);}};if(!_0x2b6ec3['twKRk'](existsSync,_0x388523))return![];let _0x15f19d;try{const _0x66b576=await readFile(_0x388523,'utf-8');_0x15f19d=_0x2b6ec3['RNeRq'](parseJsonc,_0x66b576);}catch{return![];}const _0x52452c=Array['isArray'](_0x15f19d[_0x35610e(0x77)])?_0x15f19d['plugin']:[];if(_0x2b6ec3['nmSEs'](_0x52452c['length'],0x0))return![];const _0x3af7b6=_0x52452c[_0x35610e(0x89)](_0x5489f5=>{if(_0x2b6ec3['yYFmn'](typeof _0x5489f5,_0x2b6ec3['NkHfU']))return!![];return _0x5489f5!==opencodePluginName;});if(_0x3af7b6[_0x35610e(0x66)]===_0x52452c['length'])return![];return _0x3af7b6[_0x35610e(0x66)]===0x0?delete _0x15f19d[_0x35610e(0x77)]:_0x15f19d[_0x35610e(0x77)]=_0x3af7b6,await _0x2b6ec3[_0x35610e(0x88)](writeFile,_0x388523,JSON['stringify'](_0x15f19d,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x41e19c){const _0x35f2be=_0x3d5f,_0x3f290b={'nghdK':function(_0x5f42ed,_0x4a3f92){return _0x5f42ed(_0x4a3f92);},'QSrrr':_0x35f2be(0x94),'DBoDF':_0x35f2be(0x68),'mNbGW':'--scope','JlWSF':function(_0xb7c89,_0x3c6777,_0x578040,_0x4b02fd){return _0xb7c89(_0x3c6777,_0x578040,_0x4b02fd);},'oKMjm':_0x35f2be(0x7c),'ynFIc':_0x35f2be(0x74),'PeymD':function(_0x3b58a7,_0x3ecbe1){return _0x3b58a7===_0x3ecbe1;},'NcnLC':_0x35f2be(0x73),'bUwOY':'close','bcKUJ':'error'};return new Promise(_0x5ca947=>{const _0xfd4e49=_0x35f2be,_0x1a08b1={'Mcfnr':function(_0x59efe4,_0x1c54a9){return _0x3f290b['nghdK'](_0x59efe4,_0x1c54a9);}},_0x36af3f=[_0xfd4e49(0x77),_0x3f290b['QSrrr'],_0x3f290b[_0xfd4e49(0x84)]];_0x41e19c&&_0x36af3f['push'](_0x3f290b['mNbGW'],_0x41e19c);const _0x5b4a5a=_0x3f290b['JlWSF'](spawn,_0x3f290b[_0xfd4e49(0x75)],_0x36af3f,{'stdio':['ignore',_0x3f290b['ynFIc'],'ignore'],'cwd':_0x41e19c?getProjectRoot():undefined,'shell':_0x3f290b['PeymD'](process['platform'],_0x3f290b[_0xfd4e49(0x86)])});_0x5b4a5a['on'](_0x3f290b[_0xfd4e49(0x8c)],_0x1b1a96=>{_0x5ca947(_0x1b1a96===0x0);}),_0x5b4a5a['on'](_0x3f290b['bcKUJ'],()=>{const _0x425fa8=_0xfd4e49;_0x1a08b1[_0x425fa8(0x85)](_0x5ca947,![]);});});}async function removeMarketplace(){const _0x10045a=_0x3d5f,_0x203e3b={'TvyRV':function(_0x29b07d,_0x220ce1){return _0x29b07d===_0x220ce1;},'SLQMv':function(_0x21884f,_0x5c4f9a,_0x15beb1,_0x4c5f19){return _0x21884f(_0x5c4f9a,_0x15beb1,_0x4c5f19);},'sDoRF':'claude','akiTA':'plugin','RSeYN':_0x10045a(0x79),'nFhcA':_0x10045a(0x8d),'oRTnW':_0x10045a(0x74),'BxPtG':_0x10045a(0x73),'oZTUP':_0x10045a(0x83)};return new Promise(_0x186296=>{const _0x24a93c=_0x10045a,_0x4c1f29=_0x203e3b[_0x24a93c(0x72)](spawn,_0x203e3b[_0x24a93c(0x93)],[_0x203e3b[_0x24a93c(0x87)],_0x203e3b[_0x24a93c(0x80)],_0x203e3b['nFhcA'],_0x24a93c(0x7a)],{'stdio':[_0x203e3b[_0x24a93c(0x82)],_0x24a93c(0x74),'ignore'],'shell':process['platform']===_0x203e3b[_0x24a93c(0x7f)]});_0x4c1f29['on']('close',_0x3ea228=>{_0x186296(_0x203e3b['TvyRV'](_0x3ea228,0x0));}),_0x4c1f29['on'](_0x203e3b[_0x24a93c(0x6d)],()=>{_0x186296(![]);});});}export async function clean(){const _0x434fce=_0x3d5f,_0x2d4e50={'etqSn':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','Qgwim':'✓\x20Removed\x20stored\x20credentials','fRiTW':function(_0x1c6554){return _0x1c6554();},'XTasY':function(_0x11f7bc,_0xdea873){return _0x11f7bc(_0xdea873);},'Vastt':function(_0xff5201,_0x3a481d,_0x459c49){return _0xff5201(_0x3a481d,_0x459c49);},'rJhsG':_0x434fce(0x9b),'JXPAA':function(_0xefd814){return _0xefd814();},'QEZYJ':function(_0x16c4fd,_0x1bc714){return _0x16c4fd(_0x1bc714);},'zHdwO':function(_0x27578d,_0x4685e3,_0x4d1c38){return _0x27578d(_0x4685e3,_0x4d1c38);},'HwgRH':function(_0x58add1,_0x3b7f2f,_0x22190d){return _0x58add1(_0x3b7f2f,_0x22190d);},'ZdWTW':'user','WLMNp':function(_0x5d70dc,_0x45ce05,_0x565393){return _0x5d70dc(_0x45ce05,_0x565393);},'CmdtC':function(_0xcd5eea,_0x302849){return _0xcd5eea(_0x302849);},'SCsok':'opencode.json','drDtK':function(_0x412402,_0xd15940,_0x2a36ac){return _0x412402(_0xd15940,_0x2a36ac);},'NVutN':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','RjGyH':function(_0xd55069){return _0xd55069();},'dZpBC':_0x434fce(0x9a)};console[_0x434fce(0x71)](_0x2d4e50[_0x434fce(0x67)]);let _0x5e226e=![];try{await deleteAllCredentials(),console[_0x434fce(0x71)](_0x2d4e50[_0x434fce(0x91)]),_0x5e226e=!![];}catch{}const _0x51eda4=_0x2d4e50['fRiTW'](getCacheFile);existsSync(_0x51eda4)&&(await _0x2d4e50['XTasY'](rm,_0x51eda4),_0x5e226e=!![]);const _0x387c26=_0x2d4e50['fRiTW'](getRangerDir);_0x2d4e50[_0x434fce(0x69)](existsSync,_0x387c26)&&(await _0x2d4e50['Vastt'](rm,_0x387c26,{'recursive':!![]}),console[_0x434fce(0x71)](_0x2d4e50['rJhsG']),_0x5e226e=!![]);const _0x51f128=_0x2d4e50[_0x434fce(0x7d)](getProjectSkillsDir);for(const _0x3a92aa of skillsToRemove){const _0x351e3f=_0x2d4e50['Vastt'](join,_0x51f128,_0x3a92aa);_0x2d4e50['QEZYJ'](existsSync,_0x351e3f)&&(await rm(_0x351e3f,{'recursive':!![]}),console['log'](_0x434fce(0x64)+_0x3a92aa),_0x5e226e=!![]);}const _0x1bc6b8=_0x2d4e50[_0x434fce(0x99)](getUserSkillsDir);for(const _0x55a9e5 of skillsToRemove){const _0x4de271=_0x2d4e50[_0x434fce(0x8b)](join,_0x1bc6b8,_0x55a9e5);_0x2d4e50[_0x434fce(0x6b)](existsSync,_0x4de271)&&(await rm(_0x4de271,{'recursive':!![]}),console[_0x434fce(0x71)](_0x434fce(0x8e)+_0x55a9e5),_0x5e226e=!![]);}const _0x48a9c4=getOpencodeSkillsDir('project');for(const _0x54ceb2 of skillsToRemove){const _0x133a47=_0x2d4e50['zHdwO'](join,_0x48a9c4,_0x54ceb2);existsSync(_0x133a47)&&(await _0x2d4e50[_0x434fce(0x96)](rm,_0x133a47,{'recursive':!![]}),console[_0x434fce(0x71)](_0x434fce(0x78)+_0x54ceb2),_0x5e226e=!![]);}const _0x57b8e1=getOpencodeSkillsDir(_0x2d4e50[_0x434fce(0x70)]);for(const _0x178fc0 of skillsToRemove){const _0x2a2aa4=_0x2d4e50['WLMNp'](join,_0x57b8e1,_0x178fc0);_0x2d4e50['CmdtC'](existsSync,_0x2a2aa4)&&(await rm(_0x2a2aa4,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x178fc0),_0x5e226e=!![]);}const _0x52246b=join(getOpencodeConfigDir(_0x434fce(0x81)),_0x2d4e50['SCsok']);await removeOpencodePluginConfig(_0x52246b)&&(console[_0x434fce(0x71)]('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x5e226e=!![]);const _0xb8ab7b=_0x2d4e50[_0x434fce(0x92)](join,getOpencodeConfigDir(_0x2d4e50['ZdWTW']),_0x2d4e50['SCsok']);await _0x2d4e50[_0x434fce(0x6b)](removeOpencodePluginConfig,_0xb8ab7b)&&(console['log'](_0x2d4e50['NVutN']),_0x5e226e=!![]);const _0x1f1465=await _0x2d4e50['RjGyH'](uninstallClaudePlugin);_0x1f1465&&(console['log'](_0x434fce(0x6f)),_0x5e226e=!![]);const _0x50e5c8=await uninstallClaudePlugin(_0x434fce(0x81));_0x50e5c8&&(console[_0x434fce(0x71)](_0x434fce(0x8a)),_0x5e226e=!![]);const _0x12b4fd=await _0x2d4e50['RjGyH'](removeMarketplace);_0x12b4fd&&(console[_0x434fce(0x71)](_0x434fce(0x8f)),_0x5e226e=!![]),_0x5e226e?console[_0x434fce(0x71)]('\x0a✅\x20Cleanup\x20complete!\x0a'):console['log'](_0x2d4e50['dZpBC']);}
@@ -1 +1 @@
1
- const _0x5da504=_0x593a;(function(_0x50e23e,_0x31074e){const _0x5b3602=_0x593a,_0x5c48ef=_0x50e23e();while(!![]){try{const _0x1480ba=parseInt(_0x5b3602(0x151))/0x1*(parseInt(_0x5b3602(0x15c))/0x2)+-parseInt(_0x5b3602(0x152))/0x3+-parseInt(_0x5b3602(0x160))/0x4+-parseInt(_0x5b3602(0x16a))/0x5*(parseInt(_0x5b3602(0x162))/0x6)+parseInt(_0x5b3602(0x16e))/0x7*(-parseInt(_0x5b3602(0x139))/0x8)+-parseInt(_0x5b3602(0x16b))/0x9*(parseInt(_0x5b3602(0x161))/0xa)+parseInt(_0x5b3602(0x14a))/0xb*(parseInt(_0x5b3602(0x16d))/0xc);if(_0x1480ba===_0x31074e)break;else _0x5c48ef['push'](_0x5c48ef['shift']());}catch(_0x5aa52b){_0x5c48ef['push'](_0x5c48ef['shift']());}}}(_0x501f,0x4759d));function _0x501f(){const _0x32b0c0=['85430ojKATZ','6660uXJCrw','TQLZc','448140bBlSCF','3374uZDGsA','cqePg','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','\x20for\x20\x22','stringify','7528cTcUUy','local','tDgUs','log','false','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','headless','Vewsn','alsoExistsElsewhere','isNaN','LuhdZ','keys','endsWith','zgbNW','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','DLxLn','\x20=\x20','517kYuqlJ','kind','cwd','\x22\x20not\x20found','(not\x20set)','WMUGZ','forceLogin','270918mLFSke','1337556CMrarE','No\x20configuration\x20set\x20for\x20\x22','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','vkawJ','iCGGZ','test',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','rsCDt','xGFtz','RKDXM','2QBYMzs','startsWith','true','trim','2190496DyuIcR','2260AOiztr','42pRoHeu','includes','cloud','object','Key\x20\x22','knsSu','null','kDrLq'];_0x501f=function(){return _0x32b0c0;};return _0x501f();}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=[_0x5da504(0x13f),'allowInsecureLocalhost',_0x5da504(0x150)];function parseLocalValue(_0xe99d7e,_0x75f30d){const _0x209997=_0x5da504,_0x5186fc={'yLAwT':function(_0x135105,_0x500f22){return _0x135105===_0x500f22;},'Vewsn':function(_0x1e3dca,_0x49e9fa){return _0x1e3dca===_0x49e9fa;},'fkWOw':'false'};if(BOOLEAN_KEYS[_0x209997(0x163)](_0xe99d7e)){if(_0x5186fc['yLAwT'](_0x75f30d,_0x209997(0x15e)))return!![];if(_0x5186fc[_0x209997(0x140)](_0x75f30d,_0x5186fc['fkWOw']))return![];throw new Error('Invalid\x20value\x20for\x20'+_0xe99d7e+_0x209997(0x158));}return _0x75f30d;}function _0x593a(_0x19035a,_0x304bf1){_0x19035a=_0x19035a-0x136;const _0x501f3e=_0x501f();let _0x593acd=_0x501f3e[_0x19035a];return _0x593acd;}function parseOverrideValue(_0x2a2492){const _0x4bd763=_0x5da504,_0x51486b={'QVPgc':'true','LuhdZ':function(_0x24fe8a,_0x28b50e){return _0x24fe8a===_0x28b50e;},'fXZHg':_0x4bd763(0x13d),'dCZEr':function(_0x33d61,_0x3cdb12){return _0x33d61===_0x3cdb12;},'zgbNW':'undefined'};if(_0x2a2492===_0x51486b['QVPgc'])return!![];if(_0x51486b[_0x4bd763(0x143)](_0x2a2492,_0x51486b['fXZHg']))return![];if(_0x51486b[_0x4bd763(0x143)](_0x2a2492,_0x4bd763(0x168)))return null;if(_0x51486b['dCZEr'](_0x2a2492,_0x51486b[_0x4bd763(0x146)]))return undefined;if(/^-?\d+$/[_0x4bd763(0x157)](_0x2a2492)){const _0xb82aef=Number(_0x2a2492);if(Number['isSafeInteger'](_0xb82aef))return _0xb82aef;}if(/^-?\d+\.\d+$/[_0x4bd763(0x157)](_0x2a2492)){const _0x141b6d=Number(_0x2a2492);if(!Number[_0x4bd763(0x142)](_0x141b6d))return _0x141b6d;}const _0x23d8e6=_0x2a2492[_0x4bd763(0x15f)]();if(_0x23d8e6['startsWith']('{')&&_0x23d8e6[_0x4bd763(0x145)]('}')||_0x23d8e6[_0x4bd763(0x15d)]('[')&&_0x23d8e6['endsWith'](']'))try{return JSON['parse'](_0x23d8e6);}catch{}return _0x2a2492;}async function resolveProfileTarget(_0x293b8e){const _0x342980=_0x5da504,_0x573521={'iCGGZ':function(_0x1a717b,_0xe34ab8){return _0x1a717b(_0xe34ab8);}},_0x46db04=_0x573521['iCGGZ'](existsSync,_0x573521[_0x342980(0x156)](getEnvDir,_0x293b8e));let _0xd36107=![];try{const _0xd5c31=await fetchCloudProfile(_0x293b8e);_0xd36107=Boolean(_0xd5c31);}catch{}if(_0xd36107)return{'kind':_0x342980(0x164),'alsoExistsElsewhere':_0x46db04};if(_0x46db04)return{'kind':_0x342980(0x13a),'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x293b8e+_0x342980(0x13e)+_0x293b8e);}function printDualExistsHint(_0x2f59b9){const _0x474198=_0x5da504;console['log']('\x20\x20Note:\x20\x22'+_0x2f59b9+_0x474198(0x147));}function getProjectPath(){const _0x488262=_0x5da504;return process[_0x488262(0x14c)]();}async function loadEffectiveCloudSettings(_0x78b0ba){const _0x1728ff=_0x5da504,_0x11b5fa={'WMUGZ':function(_0x1bd6b9,_0x41e7fa,_0x257e31){return _0x1bd6b9(_0x41e7fa,_0x257e31);},'rsCDt':function(_0x1cf8b8,_0x59aef5,_0x2ff381){return _0x1cf8b8(_0x59aef5,_0x2ff381);},'tDgUs':function(_0x1e39cd,_0x25a184){return _0x1e39cd??_0x25a184;}},_0x46a0eb=await fetchCloudProfile(_0x78b0ba),_0x48f7b1=_0x11b5fa[_0x1728ff(0x14f)](readProfileOverrides,getProjectPath(),_0x78b0ba);return _0x11b5fa[_0x1728ff(0x159)](mergeCloudProfileSettings,_0x46a0eb?.['settings']??{},_0x11b5fa[_0x1728ff(0x13b)](_0x48f7b1,undefined));}export async function configSet(_0x1b597a,_0x40b002,_0x10d917){const _0x21e78c=_0x5da504,_0x48b76b={'HIihX':function(_0x24a905){return _0x24a905();},'MtrPt':function(_0x18c2d0,_0x5a3d58,_0x32e499){return _0x18c2d0(_0x5a3d58,_0x32e499);}},_0x5730cf=await resolveProfileTarget(_0x1b597a);if(_0x5730cf['kind']==='cloud'){if(_0x5730cf[_0x21e78c(0x141)])printDualExistsHint(_0x1b597a);const _0xad8c1a=parseOverrideValue(_0x10d917);setProfileOverride(_0x48b76b['HIihX'](getProjectPath),_0x1b597a,_0x40b002,_0xad8c1a),console['log']('Set\x20'+_0x40b002+_0x21e78c(0x149)+JSON['stringify'](_0xad8c1a)+_0x21e78c(0x137)+_0x1b597a+'\x22');return;}const _0x1a8da1=_0x48b76b['MtrPt'](parseLocalValue,_0x40b002,_0x10d917);setProfileOverride(getProjectPath(),_0x1b597a,_0x40b002,_0x1a8da1),console[_0x21e78c(0x13c)]('Set\x20'+_0x40b002+_0x21e78c(0x149)+_0x1a8da1+'\x20for\x20\x22'+_0x1b597a+'\x22');}export async function configGet(_0xb2c5fb,_0x2a1eaa){const _0x3614e0=_0x5da504,_0x1fe93a={'TQLZc':function(_0x2b01a4,_0x2eb433){return _0x2b01a4(_0x2eb433);},'vkawJ':function(_0x214303,_0x2d3f0e){return _0x214303===_0x2d3f0e;},'knsSu':_0x3614e0(0x165),'kaVrY':function(_0x4ad4c4,_0x505c35){return _0x4ad4c4(_0x505c35);},'LUpKk':function(_0x2d3562,_0xfd1003,_0x198b2f){return _0x2d3562(_0xfd1003,_0x198b2f);}},_0x185d8d=await _0x1fe93a[_0x3614e0(0x16c)](resolveProfileTarget,_0xb2c5fb);if(_0x185d8d['kind']==='cloud'){const _0x596368=await loadEffectiveCloudSettings(_0xb2c5fb),_0x3c5700=getNestedValue(_0x596368,_0x2a1eaa);if(_0x1fe93a[_0x3614e0(0x155)](_0x3c5700,undefined))console[_0x3614e0(0x13c)](_0x3614e0(0x14e));else _0x1fe93a['vkawJ'](typeof _0x3c5700,_0x1fe93a[_0x3614e0(0x167)])?console[_0x3614e0(0x13c)](JSON[_0x3614e0(0x138)](_0x3c5700,null,0x2)):console['log'](_0x3c5700);return;}const _0xa9bfb8=await _0x1fe93a['kaVrY'](loadSettings,_0xb2c5fb),_0x4a040d=_0x1fe93a['LUpKk'](getNestedValue,_0xa9bfb8,_0x2a1eaa);if(_0x1fe93a['vkawJ'](_0x4a040d,undefined))console['log']('(not\x20set)');else typeof _0x4a040d==='object'?console[_0x3614e0(0x13c)](JSON['stringify'](_0x4a040d,null,0x2)):console['log'](_0x4a040d);}export async function configList(_0x487d95){const _0x483897=_0x5da504,_0xa9d45e={'lIiKc':function(_0x51c71f,_0x2d3c83){return _0x51c71f===_0x2d3c83;},'hgmSK':'cloud','RKDXM':function(_0x594bbd,_0x4c5fcf){return _0x594bbd(_0x4c5fcf);}},_0x612ce2=await resolveProfileTarget(_0x487d95);if(_0xa9d45e['lIiKc'](_0x612ce2[_0x483897(0x14b)],_0xa9d45e['hgmSK'])){const _0x178911=await _0xa9d45e['RKDXM'](loadEffectiveCloudSettings,_0x487d95);if(!_0x178911||_0xa9d45e['lIiKc'](Object[_0x483897(0x144)](_0x178911)['length'],0x0)){console[_0x483897(0x13c)]('No\x20configuration\x20set\x20for\x20\x22'+_0x487d95+'\x22');return;}console['log'](JSON[_0x483897(0x138)](_0x178911,null,0x2));return;}const _0x1bc9f2=getSettingsPath(_0x487d95);if(!existsSync(_0x1bc9f2)){console[_0x483897(0x13c)]('No\x20configuration\x20set\x20for\x20\x22'+_0x487d95+'\x22');return;}const _0x5726f5=await loadSettings(_0x487d95),_0x2af822=_0xa9d45e[_0x483897(0x15b)](formatSettings,_0x5726f5);!_0x2af822?console[_0x483897(0x13c)](_0x483897(0x153)+_0x487d95+'\x22'):console['log'](_0x2af822);}export async function configUnset(_0x28537a,_0x5f3a3e){const _0xb3839f=_0x5da504,_0x5e93d9={'OpGfp':'cloud','xGFtz':function(_0x3325ed,_0x26b80b,_0x1f0c76,_0xe12f67){return _0x3325ed(_0x26b80b,_0x1f0c76,_0xe12f67);},'lOfRG':function(_0x392ae6){return _0x392ae6();},'pmNrN':function(_0x3ec850,_0x56e48e,_0x3be1f0,_0x478c60){return _0x3ec850(_0x56e48e,_0x3be1f0,_0x478c60);},'cqePg':function(_0x51eb49,_0x38ea04){return _0x51eb49(_0x38ea04);},'kDrLq':function(_0x31362f,_0x2e0c8f,_0x399493){return _0x31362f(_0x2e0c8f,_0x399493);}},_0x3238fd=await resolveProfileTarget(_0x28537a);if(_0x3238fd['kind']===_0x5e93d9['OpGfp']){if(_0x3238fd['alsoExistsElsewhere'])printDualExistsHint(_0x28537a);const _0x10ff65=_0x5e93d9[_0xb3839f(0x15a)](unsetProfileOverride,_0x5e93d9['lOfRG'](getProjectPath),_0x28537a,_0x5f3a3e);_0x10ff65?console[_0xb3839f(0x13c)]('Removed\x20'+_0x5f3a3e+_0xb3839f(0x137)+_0x28537a+'\x22'):console[_0xb3839f(0x13c)]('Key\x20\x22'+_0x5f3a3e+'\x22\x20not\x20found');return;}const _0x2965b2=_0x5e93d9['pmNrN'](unsetProfileOverride,getProjectPath(),_0x28537a,_0x5f3a3e);if(_0x2965b2){console['log']('Removed\x20'+_0x5f3a3e);return;}const _0x26a352=await _0x5e93d9[_0xb3839f(0x16f)](loadSettings,_0x28537a),_0x280fc4=_0x5e93d9[_0xb3839f(0x169)](deleteNestedValue,_0x26a352,_0x5f3a3e);_0x280fc4?console[_0xb3839f(0x13c)](_0xb3839f(0x166)+_0x5f3a3e+_0xb3839f(0x136)+_0x28537a+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console['log'](_0xb3839f(0x166)+_0x5f3a3e+_0xb3839f(0x14d));}export async function configReset(_0x323d13){const _0xe2bdad=_0x5da504,_0x42e12e={'ziKfk':function(_0x2d328a,_0x1616c7){return _0x2d328a(_0x1616c7);},'gPwQT':function(_0x34a0e3,_0x3d4e26){return _0x34a0e3===_0x3d4e26;},'flUGI':_0xe2bdad(0x164),'DLxLn':function(_0x29a0f0,_0x178506,_0x20885d){return _0x29a0f0(_0x178506,_0x20885d);}},_0x22ae51=await _0x42e12e['ziKfk'](resolveProfileTarget,_0x323d13);if(_0x42e12e['gPwQT'](_0x22ae51[_0xe2bdad(0x14b)],_0x42e12e['flUGI'])){_0x42e12e[_0xe2bdad(0x148)](resetProfileOverrides,getProjectPath(),_0x323d13),console[_0xe2bdad(0x13c)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x323d13+'\x22');return;}console['log']('\x22'+_0x323d13+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x323d13+_0xe2bdad(0x154));}
1
+ const _0x59d069=_0x2e89;function _0x2e89(_0x29e18c,_0x5e5d40){_0x29e18c=_0x29e18c-0x12c;const _0x213c2e=_0x213c();let _0x2e891f=_0x213c2e[_0x29e18c];return _0x2e891f;}(function(_0xc47005,_0x1102c8){const _0x45f7fa=_0x2e89,_0x19828b=_0xc47005();while(!![]){try{const _0x5972f6=parseInt(_0x45f7fa(0x13a))/0x1*(parseInt(_0x45f7fa(0x15a))/0x2)+parseInt(_0x45f7fa(0x143))/0x3*(-parseInt(_0x45f7fa(0x134))/0x4)+-parseInt(_0x45f7fa(0x148))/0x5*(parseInt(_0x45f7fa(0x152))/0x6)+-parseInt(_0x45f7fa(0x157))/0x7+parseInt(_0x45f7fa(0x151))/0x8+parseInt(_0x45f7fa(0x15f))/0x9+parseInt(_0x45f7fa(0x153))/0xa;if(_0x5972f6===_0x1102c8)break;else _0x19828b['push'](_0x19828b['shift']());}catch(_0x1e2fba){_0x19828b['push'](_0x19828b['shift']());}}}(_0x213c,0xc004c));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';function _0x213c(){const _0x4306ad=['5298704SaTVUB','329694lNjuZG','13021030sUVefq','YEzEd','keys','stringify','1903853bzJzTg','Key\x20\x22','gvbJz','136mqDzZO','undefined','cloud','fKwQd','NqAjP','3818016toLPFT','rsKyP','cqKVL','true','Removed\x20','(not\x20set)','tIKsT','log','HfgXo','\x20=\x20','Cleared\x20local\x20overrides\x20for\x20\x22','alsoExistsElsewhere','bQQLt','68iAjBnB','ctwSu','Invalid\x20value\x20for\x20','ZYjbA','isSafeInteger','ichAt','6565pLRVIz','test','No\x20configuration\x20set\x20for\x20\x22','FXdhE','false','headless','null','includes','kind','90489stIdOR','isNaN','\x20for\x20\x22','QDggf','EjFXx','115fJWTYD','sdLvW','\x20\x20Note:\x20\x22','PreBI','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','XCdyA','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','forceLogin','iSQAQ'];_0x213c=function(){return _0x4306ad;};return _0x213c();}import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x59d069(0x13f),'allowInsecureLocalhost',_0x59d069(0x14f)];function parseLocalValue(_0x50e7fa,_0x26a0c6){const _0x2e4baa=_0x59d069;if(BOOLEAN_KEYS[_0x2e4baa(0x141)](_0x50e7fa)){if(_0x26a0c6===_0x2e4baa(0x162))return!![];if(_0x26a0c6===_0x2e4baa(0x13e))return![];throw new Error(_0x2e4baa(0x136)+_0x50e7fa+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x26a0c6;}function parseOverrideValue(_0x3c1c42){const _0x497f9f=_0x59d069,_0x1068b8={'ctwSu':function(_0x4d7bc6,_0x167139){return _0x4d7bc6===_0x167139;},'OQPLK':function(_0x3a78b2,_0x1a6adb){return _0x3a78b2===_0x1a6adb;},'bQQLt':function(_0x1032bf,_0x1304f5){return _0x1032bf(_0x1304f5);}};if(_0x1068b8['ctwSu'](_0x3c1c42,'true'))return!![];if(_0x1068b8[_0x497f9f(0x135)](_0x3c1c42,_0x497f9f(0x13e)))return![];if(_0x1068b8['OQPLK'](_0x3c1c42,_0x497f9f(0x140)))return null;if(_0x3c1c42===_0x497f9f(0x15b))return undefined;if(/^-?\d+$/[_0x497f9f(0x13b)](_0x3c1c42)){const _0x381977=Number(_0x3c1c42);if(Number[_0x497f9f(0x138)](_0x381977))return _0x381977;}if(/^-?\d+\.\d+$/[_0x497f9f(0x13b)](_0x3c1c42)){const _0x443273=_0x1068b8[_0x497f9f(0x133)](Number,_0x3c1c42);if(!Number[_0x497f9f(0x144)](_0x443273))return _0x443273;}const _0xfbace2=_0x3c1c42['trim']();if(_0xfbace2['startsWith']('{')&&_0xfbace2['endsWith']('}')||_0xfbace2['startsWith']('[')&&_0xfbace2['endsWith'](']'))try{return JSON['parse'](_0xfbace2);}catch{}return _0x3c1c42;}async function resolveProfileTarget(_0x5a7c9f){const _0x57f706=_0x59d069,_0x32f045={'iSQAQ':function(_0x3ced10,_0x3475c9){return _0x3ced10(_0x3475c9);},'mpdwR':function(_0x35c11f,_0xd709de){return _0x35c11f(_0xd709de);},'SXCUe':'cloud'},_0x137230=_0x32f045[_0x57f706(0x150)](existsSync,_0x32f045['mpdwR'](getEnvDir,_0x5a7c9f));let _0x1c3c83=![];try{const _0x157724=await fetchCloudProfile(_0x5a7c9f);_0x1c3c83=Boolean(_0x157724);}catch{}if(_0x1c3c83)return{'kind':_0x32f045['SXCUe'],'alsoExistsElsewhere':_0x137230};if(_0x137230)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x5a7c9f+_0x57f706(0x14c)+_0x5a7c9f);}function printDualExistsHint(_0x1102d6){const _0x32bb6e=_0x59d069;console['log'](_0x32bb6e(0x14a)+_0x1102d6+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x3b6430){const _0x41f55a=_0x59d069,_0x1e074e={'FXdhE':function(_0x19eb20,_0x52cd20){return _0x19eb20(_0x52cd20);},'iFlOb':function(_0x37ed51){return _0x37ed51();},'QDggf':function(_0x39601,_0x164f72){return _0x39601??_0x164f72;}},_0xde29a9=await _0x1e074e[_0x41f55a(0x13d)](fetchCloudProfile,_0x3b6430),_0x1033c4=readProfileOverrides(_0x1e074e['iFlOb'](getProjectPath),_0x3b6430);return mergeCloudProfileSettings(_0xde29a9?.['settings']??{},_0x1e074e[_0x41f55a(0x146)](_0x1033c4,undefined));}export async function configSet(_0x42f3b8,_0x39bc22,_0x13b92c){const _0x3f7414=_0x59d069,_0x4497d7={'YEzEd':function(_0x31fd31,_0x366542){return _0x31fd31(_0x366542);},'EjFXx':function(_0x49e179,_0xd4f559){return _0x49e179===_0xd4f559;},'tIKsT':function(_0x36c1e1,_0x221590){return _0x36c1e1(_0x221590);},'sdLvW':function(_0x1e8b2a){return _0x1e8b2a();},'PreBI':function(_0x731072,_0x365fae,_0x2258fc){return _0x731072(_0x365fae,_0x2258fc);}},_0x35b38a=await _0x4497d7[_0x3f7414(0x154)](resolveProfileTarget,_0x42f3b8);if(_0x4497d7[_0x3f7414(0x147)](_0x35b38a['kind'],'cloud')){if(_0x35b38a['alsoExistsElsewhere'])printDualExistsHint(_0x42f3b8);const _0x2543a6=_0x4497d7[_0x3f7414(0x12d)](parseOverrideValue,_0x13b92c);setProfileOverride(_0x4497d7[_0x3f7414(0x149)](getProjectPath),_0x42f3b8,_0x39bc22,_0x2543a6),console[_0x3f7414(0x12e)]('Set\x20'+_0x39bc22+_0x3f7414(0x130)+JSON['stringify'](_0x2543a6)+'\x20for\x20\x22'+_0x42f3b8+'\x22');return;}const _0x1c9f1b=_0x4497d7[_0x3f7414(0x14b)](parseLocalValue,_0x39bc22,_0x13b92c);setProfileOverride(_0x4497d7['sdLvW'](getProjectPath),_0x42f3b8,_0x39bc22,_0x1c9f1b),console['log']('Set\x20'+_0x39bc22+'\x20=\x20'+_0x1c9f1b+_0x3f7414(0x145)+_0x42f3b8+'\x22');}export async function configGet(_0x5ac288,_0x3ae5a4){const _0x42c701=_0x59d069,_0x5e861c={'FEdKV':function(_0x1fadd2,_0xc08e71){return _0x1fadd2(_0xc08e71);},'JMuwr':_0x42c701(0x15c),'NqAjP':function(_0x648ce2,_0x22d602,_0x38d156){return _0x648ce2(_0x22d602,_0x38d156);},'HfgXo':function(_0x59cc24,_0x5f54cb){return _0x59cc24===_0x5f54cb;},'fKwQd':'object'},_0x4c85be=await _0x5e861c['FEdKV'](resolveProfileTarget,_0x5ac288);if(_0x4c85be['kind']===_0x5e861c['JMuwr']){const _0x2f7130=await loadEffectiveCloudSettings(_0x5ac288),_0x4f1c3b=_0x5e861c[_0x42c701(0x15e)](getNestedValue,_0x2f7130,_0x3ae5a4);if(_0x5e861c[_0x42c701(0x12f)](_0x4f1c3b,undefined))console['log'](_0x42c701(0x12c));else _0x5e861c[_0x42c701(0x12f)](typeof _0x4f1c3b,_0x5e861c[_0x42c701(0x15d)])?console['log'](JSON['stringify'](_0x4f1c3b,null,0x2)):console[_0x42c701(0x12e)](_0x4f1c3b);return;}const _0x5f215d=await loadSettings(_0x5ac288),_0x1da07a=getNestedValue(_0x5f215d,_0x3ae5a4);if(_0x5e861c[_0x42c701(0x12f)](_0x1da07a,undefined))console['log'](_0x42c701(0x12c));else typeof _0x1da07a==='object'?console['log'](JSON[_0x42c701(0x156)](_0x1da07a,null,0x2)):console[_0x42c701(0x12e)](_0x1da07a);}export async function configList(_0x1773a5){const _0x479856=_0x59d069,_0x18084f={'ichAt':function(_0x4b64e2,_0x149c6f){return _0x4b64e2(_0x149c6f);},'cqKVL':'cloud','gvbJz':function(_0x4638b6,_0x46b1f5){return _0x4638b6(_0x46b1f5);},'FHrAW':function(_0x282d48,_0x4cd596){return _0x282d48(_0x4cd596);}},_0x45bb6e=await _0x18084f[_0x479856(0x139)](resolveProfileTarget,_0x1773a5);if(_0x45bb6e[_0x479856(0x142)]===_0x18084f[_0x479856(0x161)]){const _0x557b46=await loadEffectiveCloudSettings(_0x1773a5);if(!_0x557b46||Object[_0x479856(0x155)](_0x557b46)['length']===0x0){console[_0x479856(0x12e)](_0x479856(0x13c)+_0x1773a5+'\x22');return;}console['log'](JSON['stringify'](_0x557b46,null,0x2));return;}const _0x3eb336=getSettingsPath(_0x1773a5);if(!_0x18084f[_0x479856(0x159)](existsSync,_0x3eb336)){console[_0x479856(0x12e)](_0x479856(0x13c)+_0x1773a5+'\x22');return;}const _0x131653=await _0x18084f['FHrAW'](loadSettings,_0x1773a5),_0x46d1cc=formatSettings(_0x131653);!_0x46d1cc?console['log'](_0x479856(0x13c)+_0x1773a5+'\x22'):console['log'](_0x46d1cc);}export async function configUnset(_0x31ef6c,_0x3aa139){const _0x1c1753=_0x59d069,_0x356ae9={'uDBcx':function(_0x1a9a79,_0x3545d5){return _0x1a9a79(_0x3545d5);},'BomwP':function(_0x5bf314,_0x1d6145){return _0x5bf314===_0x1d6145;},'oPUmZ':'cloud','iBKhs':function(_0xe4c370){return _0xe4c370();},'ZYjbA':function(_0x548253,_0x4f39a9,_0x5e02a1,_0x864fb3){return _0x548253(_0x4f39a9,_0x5e02a1,_0x864fb3);},'rsKyP':function(_0x4fa473){return _0x4fa473();},'KwwYz':function(_0x24ddae,_0x367b79,_0x445cb6){return _0x24ddae(_0x367b79,_0x445cb6);}},_0x3a2582=await _0x356ae9['uDBcx'](resolveProfileTarget,_0x31ef6c);if(_0x356ae9['BomwP'](_0x3a2582[_0x1c1753(0x142)],_0x356ae9['oPUmZ'])){if(_0x3a2582[_0x1c1753(0x132)])printDualExistsHint(_0x31ef6c);const _0xd6b51c=unsetProfileOverride(_0x356ae9['iBKhs'](getProjectPath),_0x31ef6c,_0x3aa139);_0xd6b51c?console['log']('Removed\x20'+_0x3aa139+_0x1c1753(0x145)+_0x31ef6c+'\x22'):console[_0x1c1753(0x12e)]('Key\x20\x22'+_0x3aa139+'\x22\x20not\x20found');return;}const _0x243c1a=_0x356ae9[_0x1c1753(0x137)](unsetProfileOverride,_0x356ae9[_0x1c1753(0x160)](getProjectPath),_0x31ef6c,_0x3aa139);if(_0x243c1a){console['log'](_0x1c1753(0x163)+_0x3aa139);return;}const _0x35ec8e=await loadSettings(_0x31ef6c),_0x7f23ae=_0x356ae9['KwwYz'](deleteNestedValue,_0x35ec8e,_0x3aa139);_0x7f23ae?console[_0x1c1753(0x12e)](_0x1c1753(0x158)+_0x3aa139+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x31ef6c+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x1c1753(0x12e)](_0x1c1753(0x158)+_0x3aa139+'\x22\x20not\x20found');}export async function configReset(_0x4dc06f){const _0x24c204=_0x59d069,_0x4b1d3c={'zYPJX':function(_0x42d0c3,_0x3a6545){return _0x42d0c3===_0x3a6545;},'XCdyA':function(_0x5767e8){return _0x5767e8();}},_0x42e1c3=await resolveProfileTarget(_0x4dc06f);if(_0x4b1d3c['zYPJX'](_0x42e1c3[_0x24c204(0x142)],_0x24c204(0x15c))){resetProfileOverrides(_0x4b1d3c[_0x24c204(0x14d)](getProjectPath),_0x4dc06f),console[_0x24c204(0x12e)](_0x24c204(0x131)+_0x4dc06f+'\x22');return;}console['log']('\x22'+_0x4dc06f+_0x24c204(0x14e)+_0x4dc06f+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -1 +1 @@
1
- (function(_0x4e83da,_0x402f10){const _0x1b286b=_0x2f92,_0x3dc5af=_0x4e83da();while(!![]){try{const _0x52f418=parseInt(_0x1b286b(0x197))/0x1*(-parseInt(_0x1b286b(0x19e))/0x2)+-parseInt(_0x1b286b(0x1a8))/0x3+-parseInt(_0x1b286b(0x194))/0x4+parseInt(_0x1b286b(0x199))/0x5+-parseInt(_0x1b286b(0x1a0))/0x6+parseInt(_0x1b286b(0x19b))/0x7+parseInt(_0x1b286b(0x1a1))/0x8*(parseInt(_0x1b286b(0x19c))/0x9);if(_0x52f418===_0x402f10)break;else _0x3dc5af['push'](_0x3dc5af['shift']());}catch(_0x1d6a42){_0x3dc5af['push'](_0x3dc5af['shift']());}}}(_0x5650,0xbefdf));import _0x2a77f4 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x5650(){const _0x554ceb=['\x22\x20to\x20confirm\x20deletion:','174942YbtSMF','\x22\x20not\x20found.','1085772InJYIn','6266888EBkiJb','input','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','confirmation','log','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','XPzeH','3605154mchicg','4168404nzUyKL','Cloud\x20profile\x20\x22','yes','11OZGUJt','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','6408920oyCuSs','prompt','9245313GBHdFw','18bupNcQ'];_0x5650=function(){return _0x554ceb;};return _0x5650();}import{isInteractive}from'./utils/cloudProfileSession.js';function _0x2f92(_0x4e4b9b,_0x1e1732){_0x4e4b9b=_0x4e4b9b-0x194;const _0x56507c=_0x5650();let _0x2f92ff=_0x56507c[_0x4e4b9b];return _0x2f92ff;}import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x4d6937,_0x3eafd9={}){const _0x4edf13=_0x2f92,_0x4b1430={'pxlvf':function(_0x4b476b,_0x4e0c2c){return _0x4b476b(_0x4e0c2c);},'XPzeH':function(_0x47ebbc){return _0x47ebbc();},'BnEeS':_0x4edf13(0x1a2),'OBIvf':_0x4edf13(0x1a6)},_0x5a3ad0=await _0x4b1430['pxlvf'](fetchCloudProfile,_0x4d6937);if(!_0x5a3ad0)throw new Error(_0x4edf13(0x195)+_0x4d6937+_0x4edf13(0x19f));if(!_0x3eafd9[_0x4edf13(0x196)]&&!_0x4b1430[_0x4edf13(0x1a7)](isInteractive))throw new Error(_0x4edf13(0x1a3));console[_0x4edf13(0x1a5)](_0x4edf13(0x198)+_0x4d6937+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x3eafd9[_0x4edf13(0x196)]){const {confirmation:_0x199858}=await _0x2a77f4[_0x4edf13(0x19a)]([{'type':_0x4b1430['BnEeS'],'name':_0x4edf13(0x1a4),'message':'Type\x20\x22'+_0x4d6937+_0x4edf13(0x19d)}]);if(_0x199858!==_0x4d6937)throw new Error(_0x4b1430['OBIvf']);}await _0x4b1430['pxlvf'](deleteCloudProfile,_0x4d6937),resetProfileOverrides(process['cwd'](),_0x4d6937),clearLastProfile(process['cwd'](),_0x4d6937),console[_0x4edf13(0x1a5)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x4d6937+'\x22.');}
1
+ (function(_0x553919,_0x462574){const _0x1538e1=_0x3181,_0x471d4f=_0x553919();while(!![]){try{const _0x2c7e5=-parseInt(_0x1538e1(0x121))/0x1*(parseInt(_0x1538e1(0x126))/0x2)+-parseInt(_0x1538e1(0x11d))/0x3+parseInt(_0x1538e1(0x127))/0x4+parseInt(_0x1538e1(0x122))/0x5*(parseInt(_0x1538e1(0x123))/0x6)+-parseInt(_0x1538e1(0x11a))/0x7*(-parseInt(_0x1538e1(0x128))/0x8)+-parseInt(_0x1538e1(0x120))/0x9+-parseInt(_0x1538e1(0x117))/0xa*(-parseInt(_0x1538e1(0x119))/0xb);if(_0x2c7e5===_0x462574)break;else _0x471d4f['push'](_0x471d4f['shift']());}catch(_0x4de3bb){_0x471d4f['push'](_0x471d4f['shift']());}}}(_0x3874,0x97d7b));function _0x3874(){const _0x7588c3=['2740buEVKl','input','20746hMnVlB','175hzywgy','log','prompt','994896qRVTnB','yes','\x22\x20to\x20confirm\x20deletion:','3317733iZURtp','12942LAILWq','440xPrxBG','22056PswyMa','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','cwd','74YLPCsJ','3798972iQVrGg','3544lQlypN','VXJzb'];_0x3874=function(){return _0x7588c3;};return _0x3874();}import _0x1540bf from'inquirer';function _0x3181(_0x4a493f,_0x2b6f6a){_0x4a493f=_0x4a493f-0x117;const _0x3874d1=_0x3874();let _0x31812f=_0x3874d1[_0x4a493f];return _0x31812f;}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x235a12,_0x4011f6={}){const _0x37c60f=_0x3181,_0x150d82={'FuvsD':_0x37c60f(0x118),'tpMjM':function(_0x29ab20,_0x34d964){return _0x29ab20!==_0x34d964;},'yaGtj':'Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','VXJzb':function(_0x126903,_0x1245fd,_0x238cb6){return _0x126903(_0x1245fd,_0x238cb6);}},_0x2a9b52=await fetchCloudProfile(_0x235a12);if(!_0x2a9b52)throw new Error('Cloud\x20profile\x20\x22'+_0x235a12+'\x22\x20not\x20found.');if(!_0x4011f6[_0x37c60f(0x11e)]&&!isInteractive())throw new Error(_0x37c60f(0x124));console['log']('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x235a12+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x4011f6['yes']){const {confirmation:_0x29e63d}=await _0x1540bf[_0x37c60f(0x11c)]([{'type':_0x150d82['FuvsD'],'name':'confirmation','message':'Type\x20\x22'+_0x235a12+_0x37c60f(0x11f)}]);if(_0x150d82['tpMjM'](_0x29e63d,_0x235a12))throw new Error(_0x150d82['yaGtj']);}await deleteCloudProfile(_0x235a12),_0x150d82[_0x37c60f(0x129)](resetProfileOverrides,process[_0x37c60f(0x125)](),_0x235a12),clearLastProfile(process['cwd'](),_0x235a12),console[_0x37c60f(0x11b)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x235a12+'\x22.');}
@@ -1 +1 @@
1
- function _0x5c12(){const _0x863e17=['316zqKbmy','sessionUpdatedAt','local','7DduJWx','no\x20session','FJEyf','DunFm','5083014ptDUpr','ABCIQ','length','xrtNd','error','legacy','KKkYK','includes','FBbBe','push','Fihac','endsWith','OnEnI','3VqLkYY','\x20\x20\x20\x20\x20\x20Details:\x20','sort','zBAKY','3632VHYZKY','6407532MzeoCA','baseUrl','bug-bashes','\x20\x20\x20\x20Session:\x20','11zdFZmy','isDirectory','get','Ywxms','KBngx','fIfBa','name','profiles','environmentDetails','2591702DJSqHP','fOEAC','bkZcK','30945oPQgdN','(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','357904QGJmVR','log','\x0aLocal\x20Profiles\x20(legacy):','6561MpKaqv','\x0a\x20\x20','localeCompare','12519980DVswQo'];_0x5c12=function(){return _0x863e17;};return _0x5c12();}function _0x5b4c(_0x3b258d,_0x331fde){_0x3b258d=_0x3b258d-0x1f2;const _0x5c12aa=_0x5c12();let _0x5b4c6b=_0x5c12aa[_0x3b258d];return _0x5b4c6b;}const _0x2c7be3=_0x5b4c;(function(_0x3c0236,_0x4b5be4){const _0x2e1ac3=_0x5b4c,_0x5b3ad7=_0x3c0236();while(!![]){try{const _0x481858=-parseInt(_0x2e1ac3(0x213))/0x1+parseInt(_0x2e1ac3(0x20e))/0x2*(parseInt(_0x2e1ac3(0x1fc))/0x3)+-parseInt(_0x2e1ac3(0x21a))/0x4*(parseInt(_0x2e1ac3(0x211))/0x5)+-parseInt(_0x2e1ac3(0x221))/0x6*(parseInt(_0x2e1ac3(0x21d))/0x7)+parseInt(_0x2e1ac3(0x200))/0x8*(parseInt(_0x2e1ac3(0x216))/0x9)+parseInt(_0x2e1ac3(0x219))/0xa+parseInt(_0x2e1ac3(0x205))/0xb*(-parseInt(_0x2e1ac3(0x201))/0xc);if(_0x481858===_0x4b5be4)break;else _0x5b3ad7['push'](_0x5b3ad7['shift']());}catch(_0x44d767){_0x5b3ad7['push'](_0x5b3ad7['shift']());}}}(_0x5c12,0x9ee62));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',_0x2c7be3(0x203),'reports',_0x2c7be3(0x21c),'ci'];export function shouldGroupByEnvironment(_0x3b43bc){return _0x3b43bc['some'](_0x538d53=>_0x538d53['environmentKey']);}export function groupCloudProfilesByEnvironment(_0x403805){const _0x1a3dec=_0x2c7be3,_0x759895={'RjhUl':function(_0xe9f89d,_0x529d3e){return _0xe9f89d===_0x529d3e;}},_0x3373a5=new Map();for(const _0x1856e5 of _0x403805){const _0x49e209=_0x1856e5['environmentKey']??null,_0x328d18=_0x3373a5['get'](_0x49e209);if(_0x328d18)_0x328d18['push'](_0x1856e5);else _0x3373a5['set'](_0x49e209,[_0x1856e5]);}const _0x3799b3=[..._0x3373a5['keys']()][_0x1a3dec(0x1fe)]((_0x2ccb1d,_0x3b1363)=>{const _0x553639=_0x1a3dec;if(_0x759895['RjhUl'](_0x2ccb1d,null))return 0x1;if(_0x3b1363===null)return-0x1;return _0x2ccb1d[_0x553639(0x218)](_0x3b1363);});return _0x3799b3['map'](_0x133b1c=>({'environmentKey':_0x133b1c,'profiles':_0x3373a5[_0x1a3dec(0x207)](_0x133b1c)['sort']((_0x147aa3,_0x331989)=>_0x147aa3['name'][_0x1a3dec(0x218)](_0x331989[_0x1a3dec(0x20b)]))}));}export async function getEnvNames(){const _0x3e2db3=_0x2c7be3,_0x301e02={'uQljH':function(_0x1c8aab){return _0x1c8aab();},'sGrdy':function(_0x4841c4,_0x23fc77,_0xd09063){return _0x4841c4(_0x23fc77,_0xd09063);},'KIeuP':function(_0x32c285,_0x5a2cf3){return _0x32c285(_0x5a2cf3);},'YXVDP':'local','ABCIQ':function(_0xaecc87,_0x221213){return _0xaecc87(_0x221213);},'DunFm':function(_0x1b30d9,_0x339646,_0x7abc53){return _0x1b30d9(_0x339646,_0x7abc53);},'FBbBe':function(_0x590188,_0x2b5451){return _0x590188(_0x2b5451);},'Fihac':'.txt','WUzPP':_0x3e2db3(0x1f4)},_0x58f528=_0x301e02['uQljH'](getRangerDir);if(!existsSync(_0x58f528))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x174d09=await readActiveProfileName(),_0x339bac=[],_0x45b1db={},_0x4f5742=_0x301e02['sGrdy'](join,_0x58f528,_0x3e2db3(0x21c));if(existsSync(_0x4f5742)){const _0x334c2d=await readdir(_0x4f5742);for(const _0x3d97c7 of _0x334c2d){const _0x56a184=join(_0x4f5742,_0x3d97c7),_0x5f5361=await _0x301e02['KIeuP'](stat,_0x56a184);_0x5f5361['isDirectory']()&&(_0x339bac[_0x3e2db3(0x1f8)](_0x3d97c7),_0x45b1db[_0x3d97c7]=_0x301e02['YXVDP']);}}const _0x135196=join(_0x58f528,'ci');if(_0x301e02['ABCIQ'](existsSync,_0x135196)){const _0x238c30=await _0x301e02['ABCIQ'](readdir,_0x135196);for(const _0x37c6e0 of _0x238c30){const _0x2413ea=_0x301e02['DunFm'](join,_0x135196,_0x37c6e0),_0x2451b7=await stat(_0x2413ea);_0x2451b7['isDirectory']()&&(_0x339bac[_0x3e2db3(0x1f8)](_0x37c6e0),_0x45b1db[_0x37c6e0]='ci');}}const _0x553ff2=await _0x301e02[_0x3e2db3(0x1f7)](readdir,_0x58f528);for(const _0x5062a5 of _0x553ff2){if(NON_ENV_DIRS[_0x3e2db3(0x1f6)](_0x5062a5))continue;if(_0x5062a5['startsWith']('.'))continue;if(_0x5062a5[_0x3e2db3(0x1fa)](_0x301e02[_0x3e2db3(0x1f9)]))continue;const _0x13432c=_0x301e02[_0x3e2db3(0x220)](join,_0x58f528,_0x5062a5),_0x59dac2=await _0x301e02[_0x3e2db3(0x222)](stat,_0x13432c);_0x59dac2[_0x3e2db3(0x206)]()&&existsSync(join(_0x13432c,'settings.json'))&&(!_0x339bac[_0x3e2db3(0x1f6)](_0x5062a5)&&(_0x339bac[_0x3e2db3(0x1f8)](_0x5062a5),_0x45b1db[_0x5062a5]=_0x301e02['WUzPP']));}return{'envNames':_0x339bac,'activeEnv':_0x174d09,'envTypes':_0x45b1db};}export async function envList(){const _0x4d553f=_0x2c7be3,_0x48dbd9={'fIfBa':_0x4d553f(0x21e),'OnEnI':function(_0x8f4731,_0x4cbfdf){return _0x8f4731(_0x4cbfdf);},'Ywxms':function(_0x215daa,_0x6f73b0){return _0x215daa===_0x6f73b0;},'fOEAC':'\x0aNo\x20profiles\x20found.','bkZcK':function(_0x4a6343,_0x42baa5){return _0x4a6343===_0x42baa5;},'pyjqg':'local','zBAKY':'legacy','KBngx':'\x0aCloud\x20Profiles\x20(by\x20environment):','FJEyf':'\x20\x20\x20\x20','xrtNd':'\x0aCloud\x20Profiles:','KKkYK':function(_0x440357,_0x1046a2,_0x2575a6){return _0x440357(_0x1046a2,_0x2575a6);}},{envNames:_0x30acb7,activeEnv:_0x2e6f81,envTypes:_0x96ca7b}=await getEnvNames();let _0x1e0b42=[];const _0x1c80cc=await getToken();if(_0x1c80cc)try{_0x1e0b42=await listCloudProfiles();}catch(_0x5db2ca){console[_0x4d553f(0x1f3)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x5db2ca instanceof Error?_0x5db2ca['message']:_0x48dbd9[_0x4d553f(0x1fb)](String,_0x5db2ca)));}if(_0x48dbd9[_0x4d553f(0x208)](_0x30acb7['length'],0x0)&&_0x48dbd9[_0x4d553f(0x208)](_0x1e0b42['length'],0x0)){console['log'](_0x48dbd9[_0x4d553f(0x20f)]),console['log']('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x148c28=new Set(_0x1e0b42['map'](_0x464983=>_0x464983[_0x4d553f(0x20b)]));if(_0x30acb7['length']>0x0){console[_0x4d553f(0x214)](_0x4d553f(0x215));for(const _0x1e6620 of _0x30acb7[_0x4d553f(0x1fe)]()){const _0x17fef1=_0x48dbd9[_0x4d553f(0x210)](_0x1e6620,_0x2e6f81)&&!_0x148c28['has'](_0x1e6620),_0x3ad29e=_0x96ca7b[_0x1e6620]||_0x48dbd9['pyjqg'],_0xd622c1=await _0x48dbd9[_0x4d553f(0x1fb)](loadSettings,_0x1e6620),_0x19ead3=_0x3ad29e===_0x48dbd9[_0x4d553f(0x1ff)]?'':'\x20['+_0x3ad29e+']';console['log']('\x20\x20'+(_0x17fef1?'*\x20':'\x20\x20')+_0x1e6620+_0x19ead3),_0xd622c1[_0x4d553f(0x202)]&&console[_0x4d553f(0x214)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0xd622c1['baseUrl']),_0xd622c1[_0x4d553f(0x20d)]&&console['log'](_0x4d553f(0x1fd)+_0xd622c1[_0x4d553f(0x20d)]);}}const _0x57ea1b=(_0x6c2b7e,_0x3fab86)=>{const _0x1a3e02=_0x4d553f,_0x226be2=_0x6c2b7e[_0x1a3e02(0x20b)]===_0x2e6f81,_0xb18b37=_0x6c2b7e[_0x1a3e02(0x21b)]?'cached\x20(updated\x20'+_0x6c2b7e['sessionUpdatedAt']+')':_0x48dbd9[_0x1a3e02(0x20a)];console[_0x1a3e02(0x214)](''+_0x3fab86+(_0x226be2?'*\x20':'\x20\x20')+_0x6c2b7e[_0x1a3e02(0x20b)]),console[_0x1a3e02(0x214)](_0x3fab86+_0x1a3e02(0x204)+_0xb18b37);};if(_0x1e0b42[_0x4d553f(0x223)]>0x0){if(shouldGroupByEnvironment(_0x1e0b42)){console[_0x4d553f(0x214)](_0x48dbd9[_0x4d553f(0x209)]);for(const _0x483356 of groupCloudProfilesByEnvironment(_0x1e0b42)){const _0x1ce0ad=_0x483356['environmentKey']??_0x4d553f(0x212);console[_0x4d553f(0x214)](_0x4d553f(0x217)+_0x1ce0ad);for(const _0x3e2f9d of _0x483356[_0x4d553f(0x20c)]){_0x57ea1b(_0x3e2f9d,_0x48dbd9[_0x4d553f(0x21f)]);}}}else{console[_0x4d553f(0x214)](_0x48dbd9[_0x4d553f(0x1f2)]);for(const _0x4e5cd9 of[..._0x1e0b42][_0x4d553f(0x1fe)]((_0xbdc34c,_0x537359)=>_0xbdc34c['name']['localeCompare'](_0x537359['name']))){_0x48dbd9[_0x4d553f(0x1f5)](_0x57ea1b,_0x4e5cd9,'\x20\x20');}}}_0x2e6f81&&console[_0x4d553f(0x214)]('\x0a*\x20=\x20active\x20profile');}
1
+ const _0x462d0a=_0x3c00;(function(_0x2ae554,_0x1b00b4){const _0x25a4a5=_0x3c00,_0x555c46=_0x2ae554();while(!![]){try{const _0x532a1e=parseInt(_0x25a4a5(0x9e))/0x1+parseInt(_0x25a4a5(0xad))/0x2*(-parseInt(_0x25a4a5(0xb3))/0x3)+parseInt(_0x25a4a5(0x98))/0x4*(parseInt(_0x25a4a5(0xa0))/0x5)+parseInt(_0x25a4a5(0xa4))/0x6*(-parseInt(_0x25a4a5(0xa3))/0x7)+-parseInt(_0x25a4a5(0xa9))/0x8*(-parseInt(_0x25a4a5(0xa5))/0x9)+-parseInt(_0x25a4a5(0xbd))/0xa+parseInt(_0x25a4a5(0x9b))/0xb*(parseInt(_0x25a4a5(0xa8))/0xc);if(_0x532a1e===_0x1b00b4)break;else _0x555c46['push'](_0x555c46['shift']());}catch(_0x2916fd){_0x555c46['push'](_0x555c46['shift']());}}}(_0x4f7c,0xcf3f7));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 _0x3c00(_0x12a0cb,_0x4de359){_0x12a0cb=_0x12a0cb-0x8e;const _0x4f7c12=_0x4f7c();let _0x3c0035=_0x4f7c12[_0x12a0cb];return _0x3c0035;}const NON_ENV_DIRS=['sessions','bug-bashes',_0x462d0a(0x90),'local','ci'];export function shouldGroupByEnvironment(_0x5c18a2){const _0x1b4886=_0x462d0a;return _0x5c18a2[_0x1b4886(0xbe)](_0x58f0b2=>_0x58f0b2[_0x1b4886(0x9c)]);}export function groupCloudProfilesByEnvironment(_0x2cd0fd){const _0x4e7293=_0x462d0a,_0x60283f={'YjtGp':function(_0x5ad5ff,_0x15814d){return _0x5ad5ff===_0x15814d;},'opKQj':function(_0x54922a,_0x3c11c8){return _0x54922a===_0x3c11c8;}},_0x31e1a3=new Map();for(const _0x40b898 of _0x2cd0fd){const _0x5166b9=_0x40b898[_0x4e7293(0x9c)]??null,_0x33b942=_0x31e1a3['get'](_0x5166b9);if(_0x33b942)_0x33b942['push'](_0x40b898);else _0x31e1a3[_0x4e7293(0xa2)](_0x5166b9,[_0x40b898]);}const _0x482945=[..._0x31e1a3['keys']()]['sort']((_0x530437,_0x25958e)=>{const _0x12aaa5=_0x4e7293;if(_0x60283f['YjtGp'](_0x530437,null))return 0x1;if(_0x60283f[_0x12aaa5(0xaf)](_0x25958e,null))return-0x1;return _0x530437['localeCompare'](_0x25958e);});return _0x482945[_0x4e7293(0x8e)](_0x290c10=>({'environmentKey':_0x290c10,'profiles':_0x31e1a3[_0x4e7293(0xb9)](_0x290c10)['sort']((_0x9d32cd,_0x3612d7)=>_0x9d32cd['name'][_0x4e7293(0x99)](_0x3612d7[_0x4e7293(0x92)]))}));}export async function getEnvNames(){const _0x2d9919=_0x462d0a,_0x38f110={'FdHHQ':function(_0x31a322,_0x241d1d,_0x4b025b){return _0x31a322(_0x241d1d,_0x4b025b);},'Khhwo':function(_0x30eba4,_0x55a3d8){return _0x30eba4(_0x55a3d8);},'SKNhd':function(_0x15ddc7,_0x3b480,_0x223fe1){return _0x15ddc7(_0x3b480,_0x223fe1);},'SlVCP':'local','qOhip':function(_0xb3e5df,_0x6a68a6){return _0xb3e5df(_0x6a68a6);},'NOYWU':'.txt','NqqRh':_0x2d9919(0x94)},_0x5f0087=getRangerDir();if(!existsSync(_0x5f0087))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x5c417f=await readActiveProfileName(),_0x475736=[],_0x176229={},_0xdaf119=_0x38f110[_0x2d9919(0xbc)](join,_0x5f0087,'local');if(existsSync(_0xdaf119)){const _0x1b4cc8=await _0x38f110[_0x2d9919(0xb1)](readdir,_0xdaf119);for(const _0x2b1ff3 of _0x1b4cc8){const _0x3a7052=_0x38f110[_0x2d9919(0xae)](join,_0xdaf119,_0x2b1ff3),_0x363e0c=await _0x38f110['Khhwo'](stat,_0x3a7052);_0x363e0c[_0x2d9919(0xb6)]()&&(_0x475736[_0x2d9919(0x95)](_0x2b1ff3),_0x176229[_0x2b1ff3]=_0x38f110['SlVCP']);}}const _0x31185b=_0x38f110[_0x2d9919(0xbc)](join,_0x5f0087,'ci');if(existsSync(_0x31185b)){const _0x73f0f9=await readdir(_0x31185b);for(const _0x149399 of _0x73f0f9){const _0x369524=_0x38f110[_0x2d9919(0xbc)](join,_0x31185b,_0x149399),_0x562a41=await _0x38f110['qOhip'](stat,_0x369524);_0x562a41['isDirectory']()&&(_0x475736['push'](_0x149399),_0x176229[_0x149399]='ci');}}const _0x240532=await readdir(_0x5f0087);for(const _0x4cbb50 of _0x240532){if(NON_ENV_DIRS[_0x2d9919(0xa7)](_0x4cbb50))continue;if(_0x4cbb50['startsWith']('.'))continue;if(_0x4cbb50['endsWith'](_0x38f110['NOYWU']))continue;const _0x42ced3=_0x38f110[_0x2d9919(0xae)](join,_0x5f0087,_0x4cbb50),_0x33d4cc=await stat(_0x42ced3);_0x33d4cc[_0x2d9919(0xb6)]()&&_0x38f110[_0x2d9919(0x9a)](existsSync,_0x38f110['SKNhd'](join,_0x42ced3,'settings.json'))&&(!_0x475736[_0x2d9919(0xa7)](_0x4cbb50)&&(_0x475736[_0x2d9919(0x95)](_0x4cbb50),_0x176229[_0x4cbb50]=_0x38f110[_0x2d9919(0xb7)]));}return{'envNames':_0x475736,'activeEnv':_0x5c417f,'envTypes':_0x176229};}function _0x4f7c(){const _0x5766e6=['108TLQPiH','48AePfHE','length','profiles','KCzBZ','2FouyTp','SKNhd','opKQj','\x20\x20\x20\x20Session:\x20','Khhwo','hiIOY','131289ImIZKF','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','has','isDirectory','NqqRh','\x20\x20\x20\x20\x20\x20Details:\x20','get','dmwki','\x0a\x20\x20','FdHHQ','12927300IjdYnV','some','wqdXe','\x0aCloud\x20Profiles:','map','message','reports','log','name','dNbar','legacy','push','(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','\x20\x20\x20\x20','78244zdSvbl','localeCompare','qOhip','245597SyNnqO','environmentKey','environmentDetails','1025787GMUMfT','sort','385cnNCMp','\x0aCloud\x20Profiles\x20(by\x20environment):','set','7jEvFoW','7603842aKQfcV','1079640RkhxKr','\x0aLocal\x20Profiles\x20(legacy):','includes'];_0x4f7c=function(){return _0x5766e6;};return _0x4f7c();}export async function envList(){const _0x3cdbff=_0x462d0a,_0x35bee0={'yBBDb':function(_0x3e4e0b,_0xb49466){return _0x3e4e0b===_0xb49466;},'yAWuO':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','hiIOY':function(_0x41299c,_0x2d0273){return _0x41299c>_0x2d0273;},'lYoLe':function(_0x488c3a,_0x590c08){return _0x488c3a===_0x590c08;},'KCzBZ':function(_0x48096d,_0x3b46bf){return _0x48096d(_0x3b46bf);},'dNbar':_0x3cdbff(0x94),'dgVze':_0x3cdbff(0xa1),'FTBMa':_0x3cdbff(0x96),'dmwki':function(_0x1b5273,_0x5dea83,_0x5bd957){return _0x1b5273(_0x5dea83,_0x5bd957);},'wqdXe':_0x3cdbff(0x97),'mjZbB':_0x3cdbff(0xc0),'fotsA':function(_0x364708,_0x12b9dd,_0x12cea1){return _0x364708(_0x12b9dd,_0x12cea1);}},{envNames:_0x41b85e,activeEnv:_0x591028,envTypes:_0x4412dd}=await getEnvNames();let _0x17907b=[];const _0x579b82=await getToken();if(_0x579b82)try{_0x17907b=await listCloudProfiles();}catch(_0x25ff17){console['error'](_0x3cdbff(0xb4)+(_0x25ff17 instanceof Error?_0x25ff17[_0x3cdbff(0x8f)]:String(_0x25ff17)));}if(_0x35bee0['yBBDb'](_0x41b85e['length'],0x0)&&_0x17907b[_0x3cdbff(0xaa)]===0x0){console[_0x3cdbff(0x91)]('\x0aNo\x20profiles\x20found.'),console[_0x3cdbff(0x91)](_0x35bee0['yAWuO']);return;}const _0x290576=new Set(_0x17907b['map'](_0x3abd56=>_0x3abd56['name']));if(_0x35bee0[_0x3cdbff(0xb2)](_0x41b85e['length'],0x0)){console['log'](_0x3cdbff(0xa6));for(const _0x434c45 of _0x41b85e[_0x3cdbff(0x9f)]()){const _0x349124=_0x35bee0['lYoLe'](_0x434c45,_0x591028)&&!_0x290576[_0x3cdbff(0xb5)](_0x434c45),_0x1020f5=_0x4412dd[_0x434c45]||'local',_0x47bcfd=await _0x35bee0[_0x3cdbff(0xac)](loadSettings,_0x434c45),_0x27414a=_0x1020f5===_0x35bee0[_0x3cdbff(0x93)]?'':'\x20['+_0x1020f5+']';console[_0x3cdbff(0x91)]('\x20\x20'+(_0x349124?'*\x20':'\x20\x20')+_0x434c45+_0x27414a),_0x47bcfd['baseUrl']&&console[_0x3cdbff(0x91)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x47bcfd['baseUrl']),_0x47bcfd[_0x3cdbff(0x9d)]&&console['log'](_0x3cdbff(0xb8)+_0x47bcfd['environmentDetails']);}}const _0x1fad50=(_0x580a00,_0xc17808)=>{const _0x2ad071=_0x3cdbff,_0x174c11=_0x580a00['name']===_0x591028,_0x289e0f=_0x580a00['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x580a00['sessionUpdatedAt']+')':'no\x20session';console['log'](''+_0xc17808+(_0x174c11?'*\x20':'\x20\x20')+_0x580a00[_0x2ad071(0x92)]),console['log'](_0xc17808+_0x2ad071(0xb0)+_0x289e0f);};if(_0x17907b[_0x3cdbff(0xaa)]>0x0){if(_0x35bee0['KCzBZ'](shouldGroupByEnvironment,_0x17907b)){console[_0x3cdbff(0x91)](_0x35bee0['dgVze']);for(const _0x3bdb2e of groupCloudProfilesByEnvironment(_0x17907b)){const _0xd8c1a=_0x3bdb2e[_0x3cdbff(0x9c)]??_0x35bee0['FTBMa'];console['log'](_0x3cdbff(0xbb)+_0xd8c1a);for(const _0xb97311 of _0x3bdb2e[_0x3cdbff(0xab)]){_0x35bee0[_0x3cdbff(0xba)](_0x1fad50,_0xb97311,_0x35bee0[_0x3cdbff(0xbf)]);}}}else{console[_0x3cdbff(0x91)](_0x35bee0['mjZbB']);for(const _0x950ba0 of[..._0x17907b]['sort']((_0x475c46,_0x228ee2)=>_0x475c46[_0x3cdbff(0x92)]['localeCompare'](_0x228ee2[_0x3cdbff(0x92)]))){_0x35bee0['fotsA'](_0x1fad50,_0x950ba0,'\x20\x20');}}}_0x591028&&console['log']('\x0a*\x20=\x20active\x20profile');}