@ranger-testing/ranger-cli 3.1.7-alpha.62f152a-54 → 3.1.7-alpha.9dea9f8-61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  71. package/build/commands/utils/sessionCache.js +1 -1
  72. package/build/commands/utils/settings.js +1 -1
  73. package/build/commands/utils/skillContent.js +1 -1
  74. package/build/commands/utils/skills.js +1 -1
  75. package/build/commands/utils/stitchWebmFiles.js +1 -1
  76. package/build/commands/utils/telemetry.js +1 -1
  77. package/build/commands/utils/tokenRefresh.js +1 -1
  78. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  79. package/build/commands/utils/tunnelClient.js +1 -1
  80. package/build/commands/utils/userApi.js +1 -1
  81. package/build/commands/utils/version.js +1 -1
  82. package/build/commands/verifyFeature.js +1 -1
  83. package/build/commands/verifyFeatureCli.js +1 -1
  84. package/build/commands/verifyFeatureNovaCli.js +1 -1
  85. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  86. package/package.json +2 -5
@@ -1 +1 @@
1
- (function(_0x439cf8,_0xe18756){const _0x672e38=_0x16fe,_0x456c8a=_0x439cf8();while(!![]){try{const _0x49bbc0=parseInt(_0x672e38(0x131))/0x1*(-parseInt(_0x672e38(0x153))/0x2)+-parseInt(_0x672e38(0x18f))/0x3+parseInt(_0x672e38(0x160))/0x4+-parseInt(_0x672e38(0x1b0))/0x5*(parseInt(_0x672e38(0x18b))/0x6)+-parseInt(_0x672e38(0x15a))/0x7*(-parseInt(_0x672e38(0x1a4))/0x8)+parseInt(_0x672e38(0x169))/0x9*(-parseInt(_0x672e38(0x17c))/0xa)+parseInt(_0x672e38(0x14a))/0xb;if(_0x49bbc0===_0xe18756)break;else _0x456c8a['push'](_0x456c8a['shift']());}catch(_0x50759b){_0x456c8a['push'](_0x456c8a['shift']());}}}(_0x1270,0x482a0));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x42e4ef from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';function _0x16fe(_0x3c21fd,_0x5c104f){_0x3c21fd=_0x3c21fd-0x12e;const _0x127016=_0x1270();let _0x16fe60=_0x127016[_0x3c21fd];return _0x16fe60;}import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x142cf1=_0x16fe;if(!process[_0x142cf1(0x1a0)]['isTTY'])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x2f587b){const _0x5d109a=_0x16fe,_0x3b34e5={'VKEHL':'HEAD','zgKha':function(_0x579516,_0x4e5cbb){return _0x579516(_0x4e5cbb);},'YHUwa':_0x5d109a(0x15e),'yRqsR':'fetch\x20failed'};try{const _0x23f3ef=new AbortController(),_0x4aea5d=setTimeout(()=>_0x23f3ef[_0x5d109a(0x175)](),0x1388),_0x108589={'method':_0x3b34e5[_0x5d109a(0x17e)],'signal':_0x23f3ef[_0x5d109a(0x147)],'redirect':_0x5d109a(0x15d)};/^https:\/\/localhost(:\d+)?/i[_0x5d109a(0x19b)](_0x2f587b)&&(process[_0x5d109a(0x192)][_0x5d109a(0x168)]='0');const _0x5f3b5b=await fetch(_0x2f587b,_0x108589);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x4aea5d);if(_0x5f3b5b[_0x5d109a(0x138)]<0x190)return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x5f3b5b['status']};}catch(_0x46b05a){delete process[_0x5d109a(0x192)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x2bde66=_0x46b05a,_0x2fd408=_0x2bde66['message']||_0x3b34e5['zgKha'](String,_0x46b05a),_0x4014bb=_0x2fd408[_0x5d109a(0x17b)](_0x5d109a(0x1ac))||_0x2bde66['name']===_0x3b34e5[_0x5d109a(0x188)]||_0x2fd408[_0x5d109a(0x17b)](_0x3b34e5['yRqsR']);return{'ok':![],'error':_0x2fd408,'isProtocolError':_0x4014bb};}}async function sweepOrphanLocalProfile(_0x4bc023,_0x4884cd,_0x41c123){const _0x3ec6c9=_0x16fe,_0x1e15d4={'JDEoR':'local','gQncA':function(_0x226587,_0x4c9ac2,_0x3104bf){return _0x226587(_0x4c9ac2,_0x3104bf);},'TsJbh':function(_0x242122,_0x46fb2a){return _0x242122(_0x46fb2a);}},_0x164191=join(_0x4884cd,_0x1e15d4[_0x3ec6c9(0x15c)]),_0x2e14b8=join(_0x164191,_0x4bc023);existsSync(_0x2e14b8)&&(_0x41c123&&await isPathGitTracked(_0x2e14b8)?console[_0x3ec6c9(0x130)](_0x3ec6c9(0x16c)+_0x2e14b8+_0x3ec6c9(0x18a)):(await _0x1e15d4[_0x3ec6c9(0x150)](rm,_0x2e14b8,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x2e14b8)));if(_0x1e15d4[_0x3ec6c9(0x15f)](existsSync,_0x164191)){let _0x49d939=[];try{_0x49d939=await readdir(_0x164191);}catch{return;}const _0x2b6463=_0x3ec6c9(0x136)+_0x4bc023+'-';for(const _0x197b99 of _0x49d939){if(!_0x197b99[_0x3ec6c9(0x19f)](_0x2b6463))continue;const _0x19e04f=join(_0x164191,_0x197b99);await rm(_0x19e04f,{'recursive':!![],'force':!![]}),console[_0x3ec6c9(0x130)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x19e04f);}}}async function sweepOrphansBestEffort(_0x1bc2e5){const _0x55e7ad=_0x16fe,_0x218436={'GDfce':function(_0x30d841){return _0x30d841();},'srdNg':function(_0x3e166a){return _0x3e166a();},'ZccML':function(_0x373ff3,_0x3bc932){return _0x373ff3!==_0x3bc932;},'KycqC':function(_0x144af0,_0x4795db){return _0x144af0 instanceof _0x4795db;},'vaaAv':function(_0x382fb5,_0x869e93){return _0x382fb5(_0x869e93);}};try{await sweepOrphanLocalProfile(_0x1bc2e5,_0x218436['GDfce'](getRangerHomeDir),![]);const _0x1cc009=_0x218436[_0x55e7ad(0x182)](getRangerDir);_0x218436['ZccML'](_0x1cc009,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x1bc2e5,_0x1cc009,!![]);}catch(_0x4f9525){console['log'](_0x55e7ad(0x144)+(_0x218436[_0x55e7ad(0x17d)](_0x4f9525,Error)?_0x4f9525[_0x55e7ad(0x193)]:_0x218436['vaaAv'](String,_0x4f9525))+').');}}function _0x1270(){const _0x5bde6a=['6rpcLtO','\x0a✓\x20Profile\x20\x27','\x20Configured\x20envs:\x20','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','748710GfjXQD','VEAqd','authEnv','env','message','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','NvMwb','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','NOIFN','setupHeader','KpQXz','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','test','env_not_found','trackPhaseEnd','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','startsWith','stdout','ciMVc','isProtocolError','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','1934392MTriIw','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x20--url\x20','environments','cwd','WYtmO','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','KeVoz','Invalid\x20URL','no_match','continue','xsFXB','2380505YFhhmO','LhZYt','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','keys','profile.add.autoRouted','prompt','ThnPv','trim','log','11rSPzLs','slice','\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','Found\x20auth\x20environment\x20\x27','.tmp-','Use\x20','status','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','dSWOA','kDCqN','JLDlf','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','origin','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','tPQRV','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','Enter\x20a\x20different\x20URL','QTCUN','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','xzNVQ','MgqvO','signal','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','cdpEndpoint','5402540ctqSkd','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x27\x20created\x20(CDP).','SMITt','setupHeaders','XpwNz','gQncA','baseUrl','use_suggestion','5482vMyLnw','yes','DPwxM','\x0a\x20\x20A\x20profile\x20named\x20\x22','BJPSg','skipAuth','bPboJ','7gIzpLL','\x20\x20https://docs.ranger.net/main/concepts/profiles','JDEoR','manual','TypeError','TsJbh','1508288FxrNoY','profile.add.autoRouteSkipped','lKcXG','\x0a\x20\x20(domains:\x20','Omztm','flOos','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','NODE_TLS_REJECT_UNAUTHORIZED','135AKXtxM','no_auth_config','url','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','isElectron','exit','length','list','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','iKFrx','CaTDE','abort','YyiJh','YctTj','http://','error','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','includes','39070NVHBkT','KycqC','VKEHL','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','indexOf','RraHm','srdNg','DuuNT','CFlpJ','\x22\x20not\x20found.','uexPs','pLMNu','YHUwa','PpZYD','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'];_0x1270=function(){return _0x5bde6a;};return _0x1270();}async function markActive(_0xf8114d){const _0x55c020=_0x16fe,_0x43a74f={'gdXYr':function(_0xf0f94b,_0x98e9b8){return _0xf0f94b(_0x98e9b8);},'xzNVQ':_0x55c020(0x172)};try{await _0x43a74f['gdXYr'](writeActiveProfileName,_0xf8114d),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0xf8114d);}catch{console[_0x55c020(0x130)](_0x43a74f[_0x55c020(0x145)]);}}async function tryAutoRouteCloudProfile(_0x2e941d,_0x51d836,_0x2802c9,_0x79ecd8,_0x3beaf1){const _0x1c18b4=_0x16fe,_0x1c6051={'lKcXG':_0x1c18b4(0x16a),'JLDlf':function(_0xc4f61d,_0x40f066){return _0xc4f61d instanceof _0x40f066;},'NvMwb':_0x1c18b4(0x161),'RraHm':function(_0x2fb0ea,_0x2cb0c8){return _0x2fb0ea+_0x2cb0c8;},'BJPSg':function(_0x95e039,_0x4b72dc){return _0x95e039+_0x4b72dc;},'Omztm':_0x1c18b4(0x133),'NOIFN':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','dSWOA':_0x1c18b4(0x19a),'KpQXz':_0x1c18b4(0x19c),'gKdwg':function(_0x1b6ad3,_0xaae490){return _0x1b6ad3+_0xaae490;},'bPboJ':function(_0x4780d1,_0x291e8c,_0x4edde7){return _0x4780d1(_0x291e8c,_0x4edde7);},'AAwor':'confirm','CFlpJ':function(_0xe32d27,_0x5c73b3,_0x328038,_0x535cc3){return _0xe32d27(_0x5c73b3,_0x328038,_0x535cc3);},'XpwNz':function(_0x3f8671,_0x2de470){return _0x3f8671===_0x2de470;},'QTCUN':function(_0x10b9e7,_0x204528){return _0x10b9e7(_0x204528);}};let _0xe1e9b2;try{_0xe1e9b2=await fetchAuthConfig();}catch(_0x1031e7){return _0x3beaf1?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x1c6051[_0x1c18b4(0x162)],'profileName':_0x2e941d}),console['error'](_0x1c18b4(0x167)+(_0x1c6051[_0x1c18b4(0x13c)](_0x1031e7,Error)?_0x1031e7[_0x1c18b4(0x193)]:String(_0x1031e7))),![];}if((!_0xe1e9b2||!_0xe1e9b2['environments']||Object[_0x1c18b4(0x1b3)](_0xe1e9b2[_0x1c18b4(0x1a7)])['length']===0x0)&&!_0x2802c9[_0x1c18b4(0x191)]){if(_0x79ecd8)return await captureEnvLessProfile(_0x2e941d,_0x51d836,_0x2802c9,_0x3beaf1);return _0x3beaf1?.[_0x1c18b4(0x19d)](_0x1c6051[_0x1c18b4(0x195)],{'reason':_0x1c6051['lKcXG'],'profileName':_0x2e941d}),console['error'](_0x1c6051[_0x1c18b4(0x181)](_0x1c6051[_0x1c18b4(0x157)](_0x1c6051[_0x1c18b4(0x181)](_0x1c6051[_0x1c18b4(0x164)],'\x0a')+_0x1c6051[_0x1c18b4(0x197)]+(_0x1c18b4(0x194)+_0x2e941d+_0x1c18b4(0x1a6)+_0x51d836+'\x20--skip-auth\x0a'),'\x0a')+'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a',_0x1c6051[_0x1c18b4(0x13a)])),![];}let _0x4d8abd;if(_0x2802c9['authEnv']){if(!_0xe1e9b2?.[_0x1c18b4(0x1a7)]?.[_0x2802c9['authEnv']]){const _0x26f699=Object['keys'](_0xe1e9b2?.[_0x1c18b4(0x1a7)]??{});return _0x3beaf1?.[_0x1c18b4(0x19d)](_0x1c6051[_0x1c18b4(0x195)],{'reason':_0x1c6051[_0x1c18b4(0x199)],'profileName':_0x2e941d}),console['error'](_0x1c6051['gKdwg']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x2802c9[_0x1c18b4(0x191)]+_0x1c18b4(0x185),_0x26f699['length']?_0x1c18b4(0x18d)+_0x26f699['join'](',\x20')+'.':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.')),![];}_0x4d8abd=_0x2802c9['authEnv'];}else _0x4d8abd=_0x1c6051[_0x1c18b4(0x159)](matchAuthEnvironment,_0x51d836,_0xe1e9b2);if(!_0x4d8abd)return _0x3beaf1?.[_0x1c18b4(0x19d)]('profile.add.autoRouteSkipped',{'reason':_0x1c18b4(0x1ad),'profileName':_0x2e941d}),console[_0x1c18b4(0x179)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x51d836+_0x1c18b4(0x1aa)+Object[_0x1c18b4(0x1b3)](_0xe1e9b2?.['environments']??{})['join'](',\x20')+'.'),![];const _0x2bd03c=_0xe1e9b2?.[_0x1c18b4(0x1a7)]?.[_0x4d8abd],_0x1dede5=_0x2bd03c?.['domains']??[];if(_0x79ecd8&&!_0x2802c9[_0x1c18b4(0x154)]){const {saveToCloud:_0xede296}=await _0x42e4ef['prompt']([{'type':_0x1c6051['AAwor'],'name':'saveToCloud','message':_0x1c18b4(0x135)+_0x4d8abd+'\x27\x20matching\x20'+_0x51d836+_0x1c18b4(0x163)+_0x1dede5['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x2e941d+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0xede296)return _0x3beaf1?.[_0x1c18b4(0x19d)](_0x1c6051[_0x1c18b4(0x195)],{'reason':'user_declined','profileName':_0x2e941d}),console['error'](_0x1c18b4(0x134)),![];}const _0x1c4cce=_0x1dede5['some'](_0x1f5f58=>{const _0x5d30d3=_0x1c18b4;try{return new URL(_0x1f5f58)[_0x5d30d3(0x13e)]===new URL(_0x51d836)['origin'];}catch{return![];}}),_0x1c7769={};!_0x1c4cce&&(_0x1c7769['baseUrl']=_0x51d836);try{await _0x1c6051[_0x1c18b4(0x184)](createCloudProfile,_0x2e941d,_0x4d8abd,{'settings':_0x1c7769}),warnCloudProfileSharedInOrg();}catch(_0x4fd48b){if(_0x4fd48b instanceof ApiError&&_0x1c6051[_0x1c18b4(0x14f)](_0x4fd48b[_0x1c18b4(0x138)],0x199)){console[_0x1c18b4(0x179)](_0x1c18b4(0x156)+_0x2e941d+_0x1c18b4(0x13f)+(_0x1c18b4(0x1a3)+_0x2e941d));throw _0x4fd48b;}throw _0x4fd48b;}return console['log'](_0x1c6051[_0x1c18b4(0x181)]('✓\x20Profile\x20\x27'+_0x2e941d+'\x27\x20created.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x2e941d)),await _0x1c6051[_0x1c18b4(0x143)](sweepOrphansBestEffort,_0x2e941d),_0x3beaf1?.['trackPhaseEnd'](_0x1c18b4(0x1b4),{'envKey':_0x4d8abd,'profileName':_0x2e941d}),!![];}async function createUnconfiguredCloudProfile(_0xa33e6f,_0x1807de){const _0xf43bac=_0x16fe,_0xd60127={'iKFrx':function(_0xf6dda3,_0x8312e4,_0x544e77,_0x2650ba){return _0xf6dda3(_0x8312e4,_0x544e77,_0x2650ba);},'xHYni':function(_0x26d9ea,_0x135f57){return _0x26d9ea===_0x135f57;}};try{await _0xd60127[_0xf43bac(0x173)](createCloudProfile,_0xa33e6f,undefined,{'settings':_0x1807de}),warnCloudProfileSharedInOrg();}catch(_0x13a887){_0x13a887 instanceof ApiError&&_0xd60127['xHYni'](_0x13a887[_0xf43bac(0x138)],0x199)&&console[_0xf43bac(0x179)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0xa33e6f+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0xf43bac(0x1a3)+_0xa33e6f));throw _0x13a887;}}async function captureEnvLessProfile(_0x24b365,_0x499a2c,_0x1bd371,_0x14bd4d){const _0xa79aaa=_0x16fe,_0x279fc6={'VEAqd':'confirm','UBDHq':_0xa79aaa(0x14b),'phHhs':_0xa79aaa(0x161),'DPwxM':'user_declined','VNKbp':function(_0x3576a5,_0x55463f){return _0x3576a5===_0x55463f;},'KRCQf':function(_0x182d3e,_0x4127f0){return _0x182d3e+_0x4127f0;},'ThnPv':function(_0x3a088e,_0x116edf){return _0x3a088e>_0x116edf;},'KeVoz':function(_0x2a6c79,_0x535252,_0x2d44c2,_0x5b7db6){return _0x2a6c79(_0x535252,_0x2d44c2,_0x5b7db6);},'flOos':function(_0x3d8e19,_0x4d2d64){return _0x3d8e19 instanceof _0x4d2d64;},'WYtmO':function(_0x28b427,_0x252b81,_0x4257ee){return _0x28b427(_0x252b81,_0x4257ee);},'kwlnJ':function(_0x18b944,_0xf3f3c5){return _0x18b944(_0xf3f3c5);}};if(!_0x1bd371['yes']){const {capture:_0x5a424d}=await _0x42e4ef['prompt']([{'type':_0x279fc6[_0xa79aaa(0x190)],'name':'capture','message':_0x279fc6['UBDHq'],'default':!![]}]);if(!_0x5a424d)return _0x14bd4d?.['trackPhaseEnd'](_0x279fc6['phHhs'],{'reason':_0x279fc6[_0xa79aaa(0x155)],'profileName':_0x24b365}),console['error'](_0xa79aaa(0x148)+_0xa79aaa(0x18e)),![];}const _0x59a0e2={};if(_0x1bd371[_0xa79aaa(0x198)])for(const _0x77c5fd of _0x1bd371['setupHeader']){const _0xdde94c=_0x77c5fd[_0xa79aaa(0x180)](':');if(_0x279fc6['VNKbp'](_0xdde94c,-0x1))continue;_0x59a0e2[_0x77c5fd[_0xa79aaa(0x132)](0x0,_0xdde94c)[_0xa79aaa(0x12f)]()]=_0x77c5fd['slice'](_0x279fc6['KRCQf'](_0xdde94c,0x1))[_0xa79aaa(0x12f)]();}const _0x17d4ff={'baseUrl':_0x499a2c};_0x279fc6[_0xa79aaa(0x12e)](Object['keys'](_0x59a0e2)[_0xa79aaa(0x170)],0x0)&&(_0x17d4ff['setupHeaders']=_0x59a0e2);let _0x5d9c71;try{_0x5d9c71=await _0x279fc6[_0xa79aaa(0x1ab)](createCloudProfile,_0x24b365,undefined,{'settings':_0x17d4ff}),warnCloudProfileSharedInOrg();}catch(_0xd839a7){_0x279fc6[_0xa79aaa(0x165)](_0xd839a7,ApiError)&&_0xd839a7[_0xa79aaa(0x138)]===0x199&&console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x24b365+_0xa79aaa(0x13f)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x24b365));throw _0xd839a7;}return await _0x279fc6[_0xa79aaa(0x1a9)](manualBrowserLogin,_0x5d9c71,{'key':'','domains':[_0x499a2c],'setupHeaders':Object[_0xa79aaa(0x1b3)](_0x59a0e2)['length']>0x0?_0x59a0e2:undefined}),console['log'](_0xa79aaa(0x18c)+_0x24b365+_0xa79aaa(0x166)+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x24b365)),await _0x279fc6['kwlnJ'](sweepOrphansBestEffort,_0x24b365),_0x14bd4d?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':null,'profileName':_0x24b365}),!![];}export async function addEnv(_0x1ae65c,_0x458502={},_0x33c474){const _0x2e3f25=_0x16fe,_0x3e0f7f={'tPQRV':function(_0x1a7750,_0x504001){return _0x1a7750+_0x504001;},'HTgmy':function(_0x540c6e,_0x3f11f0){return _0x540c6e+_0x3f11f0;},'NlMAp':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','PpZYD':_0x2e3f25(0x139),'jMXZn':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ciMVc':_0x2e3f25(0x15b),'MgqvO':function(_0x4bb289,_0x1a1c14){return _0x4bb289===_0x1a1c14;},'DuuNT':_0x2e3f25(0x1b2),'KwFBo':function(_0x49c67d){return _0x49c67d();},'XPNSZ':_0x2e3f25(0x17a),'pLMNu':function(_0x3b79fa,_0x250892){return _0x3b79fa>_0x250892;},'LhZYt':function(_0x30d865,_0x5bb1e1){return _0x30d865(_0x5bb1e1);},'YctTj':function(_0x41de38,_0x3115cd){return _0x41de38(_0x3115cd);},'xsFXB':function(_0x4bb3e0,_0x1ee0fc,_0x5aa63d){return _0x4bb3e0(_0x1ee0fc,_0x5aa63d);},'LOTsS':function(_0x33684b,_0x33816b){return _0x33684b(_0x33816b);},'uexPs':_0x2e3f25(0x196),'lQTER':'input','LIBjO':_0x2e3f25(0x13d),'CaTDE':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','SMITt':'What\x20would\x20you\x20like\x20to\x20do?','kDCqN':_0x2e3f25(0x142),'YyiJh':'continue'};_0x458502['ci']&&(console['error'](_0x3e0f7f[_0x2e3f25(0x140)](_0x3e0f7f[_0x2e3f25(0x140)](_0x3e0f7f[_0x2e3f25(0x140)](_0x3e0f7f['HTgmy'](_0x3e0f7f['HTgmy'](_0x3e0f7f['NlMAp'],_0x3e0f7f[_0x2e3f25(0x189)]),'\x0a'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x3e0f7f['jMXZn'])+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x3e0f7f[_0x2e3f25(0x1a1)])),process['exit'](0x1));const _0x5a25ef={};if(_0x458502[_0x2e3f25(0x198)])for(const _0xac1be of _0x458502['setupHeader']){const _0x211612=_0xac1be[_0x2e3f25(0x180)](':');if(_0x3e0f7f['MgqvO'](_0x211612,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0xac1be+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x31113b=_0xac1be[_0x2e3f25(0x132)](0x0,_0x211612)['trim'](),_0x584f11=_0xac1be[_0x2e3f25(0x132)](_0x211612+0x1)[_0x2e3f25(0x12f)]();_0x5a25ef[_0x31113b]=_0x584f11;}if(_0x458502[_0x2e3f25(0x149)]!==undefined&&_0x458502[_0x2e3f25(0x149)]['trim']()==='')throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x458502[_0x2e3f25(0x149)]&&_0x458502[_0x2e3f25(0x16b)])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');if(_0x458502[_0x2e3f25(0x191)]&&_0x458502['skipAuth'])throw new Error(_0x2e3f25(0x141));if(_0x458502[_0x2e3f25(0x191)]&&_0x458502['cdpEndpoint'])throw new Error(_0x3e0f7f[_0x2e3f25(0x183)]);const _0x32c05c=Boolean(_0x458502['cdpEndpoint']),_0x46a2d2=_0x3e0f7f['KwFBo'](isInteractive);if(!_0x46a2d2&&!_0x458502[_0x2e3f25(0x16b)]&&!_0x32c05c&&!_0x458502['skipAuth'])throw new Error(_0x2e3f25(0x16d));if(_0x32c05c){const _0x42116d=_0x458502['cdpEndpoint'];console['log'](_0x3e0f7f['XPNSZ']),console['log'](_0x2e3f25(0x19e)+_0x42116d);const _0x41d816={'cdpEndpoint':_0x42116d,'isElectron':!![]};_0x3e0f7f[_0x2e3f25(0x187)](Object[_0x2e3f25(0x1b3)](_0x5a25ef)['length'],0x0)&&(_0x41d816[_0x2e3f25(0x14e)]=_0x5a25ef);await createUnconfiguredCloudProfile(_0x1ae65c,_0x41d816);try{setProfileOverride(process[_0x2e3f25(0x1a8)](),_0x1ae65c,_0x2e3f25(0x149),_0x42116d),setProfileOverride(process['cwd'](),_0x1ae65c,_0x2e3f25(0x16e),!![]);}catch(_0x47ae7a){console['error'](_0x2e3f25(0x17f)+(_0x47ae7a instanceof Error?_0x47ae7a[_0x2e3f25(0x193)]:String(_0x47ae7a)));}console[_0x2e3f25(0x130)]('✓\x20Cloud\x20profile\x20\x27'+_0x1ae65c+_0x2e3f25(0x14c)),await _0x3e0f7f['LhZYt'](sweepOrphansBestEffort,_0x1ae65c),await _0x3e0f7f['YctTj'](markActive,_0x1ae65c);return;}if(_0x458502[_0x2e3f25(0x158)]){const _0x4a8323={};_0x458502[_0x2e3f25(0x16b)]&&(_0x4a8323['baseUrl']=_0x458502[_0x2e3f25(0x16b)]);_0x3e0f7f['pLMNu'](Object['keys'](_0x5a25ef)[_0x2e3f25(0x170)],0x0)&&(_0x4a8323[_0x2e3f25(0x14e)]=_0x5a25ef);await _0x3e0f7f[_0x2e3f25(0x1af)](createUnconfiguredCloudProfile,_0x1ae65c,_0x4a8323),console['log']('✓\x20Profile\x20\x27'+_0x1ae65c+'\x27\x20created\x20(no\x20session).\x0a'+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x1ae65c+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x1ae65c),await _0x3e0f7f['LOTsS'](markActive,_0x1ae65c);return;}if(_0x458502[_0x2e3f25(0x16b)]){const _0x4f20fc=_0x458502['url'],_0x3e7cb4=await checkUrlReachability(_0x4f20fc);if(!_0x3e7cb4['ok']&&!_0x458502['force'])throw new Error('Could\x20not\x20reach\x20'+_0x4f20fc+':\x20'+_0x3e7cb4['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x3e7cb4['ok']&&_0x458502['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x4f20fc+':\x20'+_0x3e7cb4['error']+'\x20(continuing\x20with\x20--force)');}else{console['log']('\x0a🌐\x20Profile\x20Setup\x0a'),console['log'](_0x2e3f25(0x1a5)),console[_0x2e3f25(0x130)](_0x3e0f7f[_0x2e3f25(0x186)]);let _0x58e069='',_0x14af3c=![];while(!![]){const _0x4d7b31=await _0x42e4ef[_0x2e3f25(0x1b5)]([{'type':_0x3e0f7f['lQTER'],'name':'baseUrl','message':_0x14af3c?_0x3e0f7f['LIBjO']:_0x3e0f7f[_0x2e3f25(0x174)],'default':_0x58e069||'http://localhost:3000'}]);_0x58e069=_0x4d7b31[_0x2e3f25(0x151)];const _0x490fe7=await checkUrlReachability(_0x58e069);if(_0x490fe7['ok'])break;const _0x43a5f2=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x58e069),_0x132704=_0x490fe7[_0x2e3f25(0x1a2)]&&!_0x43a5f2,_0x331e11=_0x132704?_0x2e3f25(0x178)+_0x58e069:null;_0x14af3c=!![],console[_0x2e3f25(0x130)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x58e069+':\x20'+_0x490fe7['error']);_0x331e11&&console[_0x2e3f25(0x130)]('\x20\x20Did\x20you\x20mean\x20'+_0x331e11+'?');const {action:_0x273c42}=await _0x42e4ef[_0x2e3f25(0x1b5)]([{'type':_0x2e3f25(0x171),'name':'action','message':_0x3e0f7f[_0x2e3f25(0x14d)],'choices':[..._0x331e11?[{'name':_0x2e3f25(0x137)+_0x331e11,'value':_0x2e3f25(0x152)}]:[],{'name':_0x3e0f7f[_0x2e3f25(0x13b)],'value':'retry'},{'name':'Continue\x20anyway','value':_0x3e0f7f[_0x2e3f25(0x176)]}]}]);if(_0x3e0f7f[_0x2e3f25(0x146)](_0x273c42,_0x2e3f25(0x152))&&_0x331e11){_0x58e069=_0x331e11;const _0x4b3d9d=await _0x3e0f7f[_0x2e3f25(0x177)](checkUrlReachability,_0x58e069);if(_0x4b3d9d['ok'])break;console[_0x2e3f25(0x130)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x58e069+':\x20'+_0x4b3d9d['error']);}else{if(_0x273c42===_0x2e3f25(0x1ae))break;}}_0x458502={..._0x458502,'url':_0x58e069};}let _0x5951e0=![];try{_0x5951e0=await tryAutoRouteCloudProfile(_0x1ae65c,_0x458502[_0x2e3f25(0x16b)],_0x458502,_0x46a2d2,_0x33c474);}catch(_0x1d796a){console[_0x2e3f25(0x179)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x1ae65c+'\x22:\x20'+(_0x1d796a instanceof Error?_0x1d796a[_0x2e3f25(0x193)]:_0x3e0f7f['YctTj'](String,_0x1d796a))),process['exit'](0x1);}!_0x5951e0&&process[_0x2e3f25(0x16f)](0x1),await _0x3e0f7f[_0x2e3f25(0x1b1)](markActive,_0x1ae65c);}
1
+ const _0x3e0415=_0x7663;(function(_0x24169d,_0x115e63){const _0x5f1346=_0x7663,_0x191d9d=_0x24169d();while(!![]){try{const _0x234e38=-parseInt(_0x5f1346(0x12e))/0x1*(parseInt(_0x5f1346(0x15b))/0x2)+parseInt(_0x5f1346(0x116))/0x3+parseInt(_0x5f1346(0x172))/0x4+-parseInt(_0x5f1346(0x11e))/0x5+-parseInt(_0x5f1346(0x11c))/0x6+parseInt(_0x5f1346(0xf9))/0x7*(parseInt(_0x5f1346(0x136))/0x8)+-parseInt(_0x5f1346(0x16f))/0x9*(-parseInt(_0x5f1346(0x148))/0xa);if(_0x234e38===_0x115e63)break;else _0x191d9d['push'](_0x191d9d['shift']());}catch(_0x193147){_0x191d9d['push'](_0x191d9d['shift']());}}}(_0x9ac9,0xce98c));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x5db0d0 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=_0x3e0415(0x107);function warnCloudProfileSharedInOrg(){const _0x4db9ab=_0x3e0415;if(!process[_0x4db9ab(0x16d)][_0x4db9ab(0x118)])return;console[_0x4db9ab(0x11a)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x4c15be){const _0x78ec40=_0x3e0415,_0x444b6b={'EfJvZ':function(_0x4738ed,_0x330338,_0x1f441f){return _0x4738ed(_0x330338,_0x1f441f);},'gruwK':function(_0x5c8d57,_0x58361c){return _0x5c8d57(_0x58361c);},'yGoGh':_0x78ec40(0x114),'dcxzd':function(_0x1e212e,_0x319ff0){return _0x1e212e===_0x319ff0;},'vIWEj':_0x78ec40(0x131)};try{const _0x2ec9fd=new AbortController(),_0x3b82d2=setTimeout(()=>_0x2ec9fd['abort'](),0x1388),_0x14ba70={'method':'HEAD','signal':_0x2ec9fd['signal'],'redirect':_0x78ec40(0xef)};/^https:\/\/localhost(:\d+)?/i[_0x78ec40(0x127)](_0x4c15be)&&(process[_0x78ec40(0x104)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x194d86=await _0x444b6b[_0x78ec40(0xf2)](fetch,_0x4c15be,_0x14ba70);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x3b82d2);if(_0x194d86[_0x78ec40(0x120)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0x78ec40(0x16e)+_0x194d86[_0x78ec40(0x120)]};}catch(_0x494112){delete process[_0x78ec40(0x104)][_0x78ec40(0x168)];const _0x5d55a6=_0x494112,_0x2c3530=_0x5d55a6['message']||_0x444b6b[_0x78ec40(0x128)](String,_0x494112),_0x3ef5dc=_0x2c3530[_0x78ec40(0xfa)](_0x444b6b[_0x78ec40(0x174)])||_0x444b6b['dcxzd'](_0x5d55a6['name'],_0x444b6b[_0x78ec40(0xfc)])||_0x2c3530[_0x78ec40(0xfa)](_0x78ec40(0x119));return{'ok':![],'error':_0x2c3530,'isProtocolError':_0x3ef5dc};}}async function sweepOrphanLocalProfile(_0x2b7a5e,_0x8fe636,_0x2ec7eb){const _0x208379=_0x3e0415,_0x1e4580={'yQVAC':function(_0x4f04ed,_0x247873){return _0x4f04ed(_0x247873);},'VOyHM':function(_0x5702c0,_0x1fc024,_0x1a5d53){return _0x5702c0(_0x1fc024,_0x1a5d53);}},_0x1168d7=join(_0x8fe636,'local'),_0x4c8f08=join(_0x1168d7,_0x2b7a5e);_0x1e4580['yQVAC'](existsSync,_0x4c8f08)&&(_0x2ec7eb&&await isPathGitTracked(_0x4c8f08)?console[_0x208379(0xf3)](_0x208379(0x151)+_0x4c8f08+_0x208379(0x164)):(await _0x1e4580[_0x208379(0x13c)](rm,_0x4c8f08,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x4c8f08)));if(existsSync(_0x1168d7)){let _0x1c4c4e=[];try{_0x1c4c4e=await _0x1e4580['yQVAC'](readdir,_0x1168d7);}catch{return;}const _0x9cf2a=_0x208379(0x10f)+_0x2b7a5e+'-';for(const _0x3fc5a3 of _0x1c4c4e){if(!_0x3fc5a3['startsWith'](_0x9cf2a))continue;const _0x2cee10=_0x1e4580['VOyHM'](join,_0x1168d7,_0x3fc5a3);await rm(_0x2cee10,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x2cee10);}}}async function sweepOrphansBestEffort(_0x5f0302){const _0x512a37=_0x3e0415,_0x26f14b={'jyxQV':function(_0x5ab3c4){return _0x5ab3c4();},'EBjdJ':function(_0x22a00d){return _0x22a00d();},'NLhTS':function(_0x1979f3,_0x36090a){return _0x1979f3!==_0x36090a;},'QhkbN':function(_0x1b4272,_0x1a9924){return _0x1b4272 instanceof _0x1a9924;},'CSAnX':function(_0x6a8747,_0x595d2a){return _0x6a8747(_0x595d2a);}};try{await sweepOrphanLocalProfile(_0x5f0302,_0x26f14b['jyxQV'](getRangerHomeDir),![]);const _0x2f4f6b=_0x26f14b[_0x512a37(0x101)](getRangerDir);_0x26f14b['NLhTS'](_0x2f4f6b,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x5f0302,_0x2f4f6b,!![]);}catch(_0x141d44){console['log'](_0x512a37(0x123)+(_0x26f14b['QhkbN'](_0x141d44,Error)?_0x141d44['message']:_0x26f14b[_0x512a37(0x122)](String,_0x141d44))+').');}}function _0x7663(_0x462783,_0x4ee5d6){_0x462783=_0x462783-0xec;const _0x9ac93f=_0x9ac9();let _0x7663c5=_0x9ac93f[_0x462783];return _0x7663c5;}function _0x9ac9(){const _0x731011=['\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','\x0a\x20\x20Could\x20not\x20reach\x20','confirm','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','test','gruwK',')\x0a\x20\x20Save\x20\x27','trim','rayQM','\x20\x20Set\x20active\x20profile:\x20','isElectron','801796uDircV','LOXfH','trackPhaseEnd','TypeError','EfPCj','authEnv','cDAxF','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','424JHCqXx','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','\x20(continuing\x20with\x20--force)','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','Gvtjt','url','VOyHM','opmoV','profile.add.autoRouteSkipped','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','yBwGP','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x27\x20created\x20(no\x20session).\x0a','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','TdySr','HWojZ','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x27\x20to\x20the\x20cloud?','170270Uiiowx','user_declined','✓\x20Profile\x20\x27','fjwjA','\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','ZBPXB','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','domains','retry','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','setupHeaders','jStpT','\x27\x20created\x20(CDP).','cwd','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','vpRCr','join','environments','eqIHZ','4wQoRtf','list','use_suggestion','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x0a\x20\x20(domains:\x20','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','message','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','PxRta','\x0a\x20\x20A\x20profile\x20named\x20\x22','skipAuth','NODE_TLS_REJECT_UNAUTHORIZED','input','\x20--skip-auth\x0a','yes','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','stdout','HTTP\x20','1260fmttlR','error','Continue\x20anyway','5092924gOmpYy','vixSN','yGoGh','cdpEndpoint','slice','XuHmx','no_match','manual','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','profile.add.autoRouted','EfJvZ','log','CEyUq','zDkxw','no_auth_config','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','79219JfgxAw','includes','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','vIWEj','xMECC','DHGYG','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','fORrt','EBjdJ','Use\x20','Found\x20auth\x20environment\x20\x27','env','prompt','\x20Configured\x20envs:\x20','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','exit','origin','\x0a\x20\x20Auth\x20environment\x20\x22','keys','FfZLY','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','rcDiZ','.tmp-','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','force','RMrEl','setupHeader','Invalid\x20URL','What\x20would\x20you\x20like\x20to\x20do?','1095903vtbyVd','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','isTTY','fetch\x20failed','warn','IUmpd','8112618gVRUSm','indexOf','4100990dMuNyg','length','status','saveToCloud','CSAnX'];_0x9ac9=function(){return _0x731011;};return _0x9ac9();}async function markActive(_0x26ea80){const _0x5b0752=_0x3e0415,_0x449d0b={'LOXfH':function(_0x36a8b5,_0x3262d2){return _0x36a8b5(_0x3262d2);},'IUmpd':_0x5b0752(0x126)};try{await _0x449d0b[_0x5b0752(0x12f)](writeActiveProfileName,_0x26ea80),console['log'](_0x5b0752(0x12c)+_0x26ea80);}catch{console['log'](_0x449d0b[_0x5b0752(0x11b)]);}}async function tryAutoRouteCloudProfile(_0x290e60,_0x33ae39,_0x3e3f86,_0x22d055,_0x2b1609){const _0x14dde2=_0x3e0415,_0x466e79={'zDkxw':'profile.add.autoRouteSkipped','AIOFo':function(_0x5add89,_0x17c731){return _0x5add89 instanceof _0x17c731;},'GQeEd':function(_0x10cc85,_0x56a7b6){return _0x10cc85(_0x56a7b6);},'cDAxF':function(_0x236ff7,_0x4228b4){return _0x236ff7===_0x4228b4;},'oTaZi':'no_auth_config','vixSN':function(_0x1beea4,_0x5b3ab9){return _0x1beea4+_0x5b3ab9;},'PxRta':_0x14dde2(0x163),'rayQM':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','fORrt':'env_not_found','EfPCj':function(_0x57c234,_0x13e85a){return _0x57c234+_0x13e85a;},'aOkvK':_0x14dde2(0x121),'DHGYG':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','Eestm':function(_0xadf284,_0x47c160,_0x33d68d,_0xaf81b5){return _0xadf284(_0x47c160,_0x33d68d,_0xaf81b5);},'SKwUr':function(_0x2b0cbb){return _0x2b0cbb();},'PZtBt':function(_0x57ab7e,_0x4f3a93){return _0x57ab7e===_0x4f3a93;}};let _0x5ab913;try{_0x5ab913=await fetchAuthConfig();}catch(_0x16e507){return _0x2b1609?.['trackPhaseEnd'](_0x466e79['zDkxw'],{'reason':_0x14dde2(0xf6),'profileName':_0x290e60}),console[_0x14dde2(0x170)](_0x14dde2(0x16c)+(_0x466e79['AIOFo'](_0x16e507,Error)?_0x16e507[_0x14dde2(0x161)]:_0x466e79['GQeEd'](String,_0x16e507))),![];}if((!_0x5ab913||!_0x5ab913[_0x14dde2(0x159)]||_0x466e79[_0x14dde2(0x134)](Object['keys'](_0x5ab913[_0x14dde2(0x159)])[_0x14dde2(0x11f)],0x0))&&!_0x3e3f86[_0x14dde2(0x133)]){if(_0x22d055)return await captureEnvLessProfile(_0x290e60,_0x33ae39,_0x3e3f86,_0x2b1609);return _0x2b1609?.[_0x14dde2(0x130)](_0x466e79[_0x14dde2(0xf5)],{'reason':_0x466e79['oTaZi'],'profileName':_0x290e60}),console[_0x14dde2(0x170)](_0x466e79['vixSN'](_0x466e79['vixSN'](_0x466e79['vixSN'](_0x14dde2(0x14c),'\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'+_0x290e60+'\x20--url\x20'+_0x33ae39+_0x14dde2(0x16a))+'\x0a',_0x466e79[_0x14dde2(0x165)]),_0x466e79[_0x14dde2(0x12b)])),![];}let _0x29cb32;if(_0x3e3f86['authEnv']){if(!_0x5ab913?.['environments']?.[_0x3e3f86['authEnv']]){const _0xf5d3bd=Object[_0x14dde2(0x10b)](_0x5ab913?.['environments']??{});return _0x2b1609?.['trackPhaseEnd'](_0x14dde2(0x13e),{'reason':_0x466e79[_0x14dde2(0x100)],'profileName':_0x290e60}),console['error'](_0x466e79[_0x14dde2(0x132)](_0x14dde2(0x10a)+_0x3e3f86['authEnv']+'\x22\x20not\x20found.',_0xf5d3bd[_0x14dde2(0x11f)]?_0x14dde2(0x106)+_0xf5d3bd['join'](',\x20')+'.':_0x14dde2(0x135))),![];}_0x29cb32=_0x3e3f86['authEnv'];}else _0x29cb32=matchAuthEnvironment(_0x33ae39,_0x5ab913);if(!_0x29cb32)return _0x2b1609?.['trackPhaseEnd'](_0x14dde2(0x13e),{'reason':_0x14dde2(0xee),'profileName':_0x290e60}),console[_0x14dde2(0x170)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x33ae39+'.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20'+Object[_0x14dde2(0x10b)](_0x5ab913?.[_0x14dde2(0x159)]??{})[_0x14dde2(0x158)](',\x20')+'.'),![];const _0x17eac0=_0x5ab913?.[_0x14dde2(0x159)]?.[_0x29cb32],_0x272af4=_0x17eac0?.[_0x14dde2(0x14f)]??[];if(_0x22d055&&!_0x3e3f86[_0x14dde2(0x16b)]){const {saveToCloud:_0x57621d}=await _0x5db0d0['prompt']([{'type':_0x14dde2(0x125),'name':_0x466e79['aOkvK'],'message':_0x14dde2(0x103)+_0x29cb32+'\x27\x20matching\x20'+_0x33ae39+_0x14dde2(0x15f)+_0x272af4['join'](',\x20')+_0x14dde2(0x129)+_0x290e60+_0x14dde2(0x147),'default':!![]}]);if(!_0x57621d)return _0x2b1609?.[_0x14dde2(0x130)]('profile.add.autoRouteSkipped',{'reason':'user_declined','profileName':_0x290e60}),console[_0x14dde2(0x170)](_0x466e79[_0x14dde2(0xfe)]),![];}const _0x57730d=_0x272af4['some'](_0x2982f7=>{const _0x6b9fb9=_0x14dde2;try{return new URL(_0x2982f7)[_0x6b9fb9(0x109)]===new URL(_0x33ae39)['origin'];}catch{return![];}}),_0xcdc149={};!_0x57730d&&(_0xcdc149['baseUrl']=_0x33ae39);try{await _0x466e79['Eestm'](createCloudProfile,_0x290e60,_0x29cb32,{'settings':_0xcdc149}),_0x466e79['SKwUr'](warnCloudProfileSharedInOrg);}catch(_0x54bbd1){if(_0x54bbd1 instanceof ApiError&&_0x466e79['PZtBt'](_0x54bbd1[_0x14dde2(0x120)],0x199)){console[_0x14dde2(0x170)](_0x14dde2(0x166)+_0x290e60+_0x14dde2(0x160)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x290e60));throw _0x54bbd1;}throw _0x54bbd1;}return console[_0x14dde2(0xf3)](_0x466e79[_0x14dde2(0x173)](_0x14dde2(0x14a)+_0x290e60+'\x27\x20created.\x0a',_0x14dde2(0xf7)+_0x290e60)),await _0x466e79['GQeEd'](sweepOrphansBestEffort,_0x290e60),_0x2b1609?.[_0x14dde2(0x130)]('profile.add.autoRouted',{'envKey':_0x29cb32,'profileName':_0x290e60}),!![];}async function createUnconfiguredCloudProfile(_0x16bc6b,_0x48306f){const _0x758c76=_0x3e0415,_0x23259f={'HHbOg':function(_0x3ea8b2,_0x48a4f0,_0x1d12c6,_0x497dec){return _0x3ea8b2(_0x48a4f0,_0x1d12c6,_0x497dec);},'vpRCr':function(_0x208fb8){return _0x208fb8();},'Lbajy':function(_0xf4f2ab,_0x3a4e0c){return _0xf4f2ab===_0x3a4e0c;}};try{await _0x23259f['HHbOg'](createCloudProfile,_0x16bc6b,undefined,{'settings':_0x48306f}),_0x23259f[_0x758c76(0x157)](warnCloudProfileSharedInOrg);}catch(_0x5db41b){_0x5db41b instanceof ApiError&&_0x23259f['Lbajy'](_0x5db41b[_0x758c76(0x120)],0x199)&&console[_0x758c76(0x170)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x16bc6b+_0x758c76(0x160)+(_0x758c76(0x139)+_0x16bc6b));throw _0x5db41b;}}async function captureEnvLessProfile(_0x3e1eaa,_0x471643,_0x4f5dcc,_0x21dbf4){const _0x572d93=_0x3e0415,_0x427e61={'Hmjue':_0x572d93(0x141),'ZBPXB':function(_0x3f8c9b,_0x45d5df){return _0x3f8c9b+_0x45d5df;},'fjwjA':function(_0xe6a3fb,_0x140f17){return _0xe6a3fb===_0x140f17;},'yBwGP':function(_0x40c6b7){return _0x40c6b7();},'HEscM':function(_0x4b660b,_0x1f37ea){return _0x4b660b+_0x1f37ea;},'XuHmx':function(_0x12b6dc,_0x9b3a7f){return _0x12b6dc>_0x9b3a7f;},'ZvpCw':function(_0x390c2d,_0x33821e){return _0x390c2d(_0x33821e);},'LqRis':_0x572d93(0xf1)};if(!_0x4f5dcc['yes']){const {capture:_0x2a442f}=await _0x5db0d0['prompt']([{'type':_0x572d93(0x125),'name':'capture','message':_0x427e61['Hmjue'],'default':!![]}]);if(!_0x2a442f)return _0x21dbf4?.[_0x572d93(0x130)](_0x572d93(0x13e),{'reason':_0x572d93(0x149),'profileName':_0x3e1eaa}),console['error'](_0x427e61['ZBPXB'](_0x572d93(0xf0),_0x572d93(0x137))),![];}const _0x461d99={};if(_0x4f5dcc['setupHeader'])for(const _0x5810c4 of _0x4f5dcc[_0x572d93(0x113)]){const _0x188b2b=_0x5810c4['indexOf'](':');if(_0x427e61[_0x572d93(0x14b)](_0x188b2b,-0x1))continue;_0x461d99[_0x5810c4[_0x572d93(0xec)](0x0,_0x188b2b)[_0x572d93(0x12a)]()]=_0x5810c4['slice'](_0x427e61[_0x572d93(0x14d)](_0x188b2b,0x1))[_0x572d93(0x12a)]();}const _0xe05587={'baseUrl':_0x471643};Object['keys'](_0x461d99)[_0x572d93(0x11f)]>0x0&&(_0xe05587[_0x572d93(0x152)]=_0x461d99);let _0x4e3942;try{_0x4e3942=await createCloudProfile(_0x3e1eaa,undefined,{'settings':_0xe05587}),_0x427e61[_0x572d93(0x140)](warnCloudProfileSharedInOrg);}catch(_0x150dde){_0x150dde instanceof ApiError&&_0x427e61['fjwjA'](_0x150dde[_0x572d93(0x120)],0x199)&&console['error'](_0x427e61['HEscM']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x3e1eaa+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x3e1eaa));throw _0x150dde;}return await manualBrowserLogin(_0x4e3942,{'key':'','domains':[_0x471643],'setupHeaders':_0x427e61[_0x572d93(0xed)](Object[_0x572d93(0x10b)](_0x461d99)[_0x572d93(0x11f)],0x0)?_0x461d99:undefined}),console[_0x572d93(0xf3)](_0x427e61[_0x572d93(0x14d)]('\x0a✓\x20Profile\x20\x27'+_0x3e1eaa+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a',_0x572d93(0xf7)+_0x3e1eaa)),await _0x427e61['ZvpCw'](sweepOrphansBestEffort,_0x3e1eaa),_0x21dbf4?.['trackPhaseEnd'](_0x427e61['LqRis'],{'envKey':null,'profileName':_0x3e1eaa}),!![];}export async function addEnv(_0x13cfbf,_0x1995f4={},_0x73a70a){const _0x235c26=_0x3e0415,_0x264c26={'SRJEj':function(_0x649eb,_0x3b413f){return _0x649eb+_0x3b413f;},'RMrEl':_0x235c26(0x162),'WrUaA':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','qSATj':_0x235c26(0x110),'eqIHZ':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','zgNhQ':_0x235c26(0x143),'pSkoK':'--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','JJPiU':function(_0x7bdea3,_0x52e367){return _0x7bdea3(_0x52e367);},'Gvtjt':'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','HWojZ':_0x235c26(0x146),'PRBvL':function(_0x518a9f,_0x1b353d){return _0x518a9f>_0x1b353d;},'YNYFk':function(_0x39a074,_0xe8f7a9,_0xf30088){return _0x39a074(_0xe8f7a9,_0xf30088);},'yHzwg':function(_0xcd0c84,_0x6adbd,_0x2b9b5a,_0x39ea1f,_0x30d056){return _0xcd0c84(_0x6adbd,_0x2b9b5a,_0x39ea1f,_0x30d056);},'TdySr':function(_0x3dc26b,_0x63e945){return _0x3dc26b instanceof _0x63e945;},'rcDiZ':function(_0x5456b6,_0x4f3b14){return _0x5456b6(_0x4f3b14);},'opmoV':function(_0x418ccb,_0x482625){return _0x418ccb(_0x482625);},'OahHb':'\x0a🌐\x20Profile\x20Setup\x0a','cVKAN':_0x235c26(0x15e),'YXEXz':'baseUrl','cpymm':_0x235c26(0x10d),'jStpT':'action','xMECC':_0x235c26(0x15d),'CEyUq':'Enter\x20a\x20different\x20URL','gPWKc':_0x235c26(0x150),'FfZLY':_0x235c26(0x171),'OnkAd':'continue','mcJyM':function(_0x377d90,_0x49393c,_0x577eba,_0x48a76f,_0x43c3c3,_0x334e3c){return _0x377d90(_0x49393c,_0x577eba,_0x48a76f,_0x43c3c3,_0x334e3c);}};_0x1995f4['ci']&&(console['error'](_0x264c26['SRJEj'](_0x264c26['SRJEj'](_0x235c26(0x117)+_0x235c26(0xff)+'\x0a'+_0x235c26(0xf8),_0x264c26[_0x235c26(0x112)])+'\x0a',_0x264c26['WrUaA'])+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x235c26(0x108)](0x1));const _0x56aa2a={};if(_0x1995f4['setupHeader'])for(const _0x103976 of _0x1995f4['setupHeader']){const _0x1fe8aa=_0x103976[_0x235c26(0x11d)](':');if(_0x1fe8aa===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x103976+_0x235c26(0x156));const _0x4d478f=_0x103976[_0x235c26(0xec)](0x0,_0x1fe8aa)['trim'](),_0x328380=_0x103976['slice'](_0x1fe8aa+0x1)['trim']();_0x56aa2a[_0x4d478f]=_0x328380;}if(_0x1995f4[_0x235c26(0x175)]!==undefined&&_0x1995f4[_0x235c26(0x175)][_0x235c26(0x12a)]()==='')throw new Error(_0x264c26['qSATj']);if(_0x1995f4[_0x235c26(0x175)]&&_0x1995f4[_0x235c26(0x13b)])throw new Error(_0x264c26[_0x235c26(0x15a)]);if(_0x1995f4[_0x235c26(0x133)]&&_0x1995f4[_0x235c26(0x167)])throw new Error(_0x264c26['zgNhQ']);if(_0x1995f4['authEnv']&&_0x1995f4[_0x235c26(0x175)])throw new Error(_0x264c26['pSkoK']);const _0x28e73a=_0x264c26['JJPiU'](Boolean,_0x1995f4[_0x235c26(0x175)]),_0x44f524=isInteractive();if(!_0x44f524&&!_0x1995f4[_0x235c26(0x13b)]&&!_0x28e73a&&!_0x1995f4['skipAuth'])throw new Error(_0x264c26[_0x235c26(0x13a)]);if(_0x28e73a){const _0x54926e=_0x1995f4['cdpEndpoint'];console['log'](_0x264c26[_0x235c26(0x145)]),console[_0x235c26(0xf3)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x54926e);const _0x59faa3={'cdpEndpoint':_0x54926e,'isElectron':!![]};_0x264c26['PRBvL'](Object['keys'](_0x56aa2a)[_0x235c26(0x11f)],0x0)&&(_0x59faa3['setupHeaders']=_0x56aa2a);await _0x264c26['YNYFk'](createUnconfiguredCloudProfile,_0x13cfbf,_0x59faa3);try{_0x264c26['yHzwg'](setProfileOverride,process['cwd'](),_0x13cfbf,'cdpEndpoint',_0x54926e),setProfileOverride(process[_0x235c26(0x155)](),_0x13cfbf,_0x235c26(0x12d),!![]);}catch(_0x3023ba){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x264c26[_0x235c26(0x144)](_0x3023ba,Error)?_0x3023ba['message']:String(_0x3023ba)));}console[_0x235c26(0xf3)]('✓\x20Cloud\x20profile\x20\x27'+_0x13cfbf+_0x235c26(0x154)),await sweepOrphansBestEffort(_0x13cfbf),await markActive(_0x13cfbf);return;}if(_0x1995f4[_0x235c26(0x167)]){const _0x87e752={};_0x1995f4[_0x235c26(0x13b)]&&(_0x87e752['baseUrl']=_0x1995f4[_0x235c26(0x13b)]);Object['keys'](_0x56aa2a)[_0x235c26(0x11f)]>0x0&&(_0x87e752[_0x235c26(0x152)]=_0x56aa2a);await _0x264c26['YNYFk'](createUnconfiguredCloudProfile,_0x13cfbf,_0x87e752),console['log']('✓\x20Profile\x20\x27'+_0x13cfbf+_0x235c26(0x142)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x13cfbf+'`\x20again\x20without\x20--skip-auth.')),await _0x264c26[_0x235c26(0x10e)](sweepOrphansBestEffort,_0x13cfbf),await _0x264c26[_0x235c26(0x13d)](markActive,_0x13cfbf);return;}if(_0x1995f4[_0x235c26(0x13b)]){const _0x567afe=_0x1995f4['url'],_0x379cbb=await _0x264c26[_0x235c26(0x13d)](checkUrlReachability,_0x567afe);if(!_0x379cbb['ok']&&!_0x1995f4[_0x235c26(0x111)])throw new Error('Could\x20not\x20reach\x20'+_0x567afe+':\x20'+_0x379cbb['error']+_0x235c26(0x13f));!_0x379cbb['ok']&&_0x1995f4['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x567afe+':\x20'+_0x379cbb['error']+_0x235c26(0x138));}else{console['log'](_0x264c26['OahHb']),console[_0x235c26(0xf3)](_0x264c26['cVKAN']),console[_0x235c26(0xf3)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x38eaee='',_0x29a9ab=![];while(!![]){const _0x16d563=await _0x5db0d0[_0x235c26(0x105)]([{'type':_0x235c26(0x169),'name':_0x264c26['YXEXz'],'message':_0x29a9ab?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0x264c26['cpymm'],'default':_0x38eaee||'http://localhost:3000'}]);_0x38eaee=_0x16d563['baseUrl'];const _0x2ee82b=await _0x264c26[_0x235c26(0x10e)](checkUrlReachability,_0x38eaee);if(_0x2ee82b['ok'])break;const _0x30d15b=/^[a-zA-Z][\w+.-]*:\/\//[_0x235c26(0x127)](_0x38eaee),_0xe8b03e=_0x2ee82b['isProtocolError']&&!_0x30d15b,_0x1c7e86=_0xe8b03e?'http://'+_0x38eaee:null;_0x29a9ab=!![],console['log'](_0x235c26(0x124)+_0x38eaee+':\x20'+_0x2ee82b[_0x235c26(0x170)]);_0x1c7e86&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x1c7e86+'?');const {action:_0x1ac2f1}=await _0x5db0d0[_0x235c26(0x105)]([{'type':_0x235c26(0x15c),'name':_0x264c26[_0x235c26(0x153)],'message':_0x235c26(0x115),'choices':[..._0x1c7e86?[{'name':_0x235c26(0x102)+_0x1c7e86,'value':_0x264c26['xMECC']}]:[],{'name':_0x264c26[_0x235c26(0xf4)],'value':_0x264c26['gPWKc']},{'name':_0x264c26[_0x235c26(0x10c)],'value':_0x264c26['OnkAd']}]}]);if(_0x1ac2f1===_0x264c26[_0x235c26(0xfd)]&&_0x1c7e86){_0x38eaee=_0x1c7e86;const _0x4a7615=await checkUrlReachability(_0x38eaee);if(_0x4a7615['ok'])break;console['log'](_0x235c26(0xfb)+_0x38eaee+':\x20'+_0x4a7615[_0x235c26(0x170)]);}else{if(_0x1ac2f1===_0x264c26['OnkAd'])break;}}_0x1995f4={..._0x1995f4,'url':_0x38eaee};}let _0x427cf7=![];try{_0x427cf7=await _0x264c26['mcJyM'](tryAutoRouteCloudProfile,_0x13cfbf,_0x1995f4['url'],_0x1995f4,_0x44f524,_0x73a70a);}catch(_0x4dae94){console['error'](_0x235c26(0x14e)+_0x13cfbf+'\x22:\x20'+(_0x264c26[_0x235c26(0x144)](_0x4dae94,Error)?_0x4dae94[_0x235c26(0x161)]:_0x264c26['JJPiU'](String,_0x4dae94))),process[_0x235c26(0x108)](0x1);}!_0x427cf7&&process[_0x235c26(0x108)](0x1),await _0x264c26[_0x235c26(0x13d)](markActive,_0x13cfbf);}
@@ -1 +1 @@
1
- (function(_0x3fddb5,_0x156d9f){var _0x2bd0c4=_0x21b6,_0xdce481=_0x3fddb5();while(!![]){try{var _0x5e5189=-parseInt(_0x2bd0c4(0x123))/0x1+-parseInt(_0x2bd0c4(0x11a))/0x2+parseInt(_0x2bd0c4(0x119))/0x3+-parseInt(_0x2bd0c4(0x11f))/0x4*(parseInt(_0x2bd0c4(0x11c))/0x5)+-parseInt(_0x2bd0c4(0x125))/0x6+-parseInt(_0x2bd0c4(0x118))/0x7+parseInt(_0x2bd0c4(0x11e))/0x8;if(_0x5e5189===_0x156d9f)break;else _0xdce481['push'](_0xdce481['shift']());}catch(_0x23bace){_0xdce481['push'](_0xdce481['shift']());}}}(_0x4ddb,0xc61ea));function _0x4ddb(){var _0x2551a0=['9332ilOvAI','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','exit','1557499cWvXwK','\x20\x20https://docs.ranger.net/main/concepts/profiles','1462446wmbJdl','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','7595476ssljZb','2566641pezcWD','2007078pOiiSv','mymwU','155fZyIuc','Rvwhc','31344968szkGDY'];_0x4ddb=function(){return _0x2551a0;};return _0x4ddb();}function _0x21b6(_0x888a46,_0x26874a){_0x888a46=_0x888a46-0x117;var _0x4ddb03=_0x4ddb();var _0x21b6bd=_0x4ddb03[_0x888a46];return _0x21b6bd;}export async function authEncrypt(_0x7ff074){var _0x404969=_0x21b6,_0x3be018={'Rvwhc':function(_0x5506a1,_0x593a0b){return _0x5506a1+_0x593a0b;},'mymwU':_0x404969(0x117),'kCRxZ':_0x404969(0x120)};console['error'](_0x3be018[_0x404969(0x11d)](_0x3be018[_0x404969(0x11d)](_0x3be018['Rvwhc'](_0x3be018[_0x404969(0x11b)],_0x3be018['kCRxZ'])+'\x0a'+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x404969(0x121),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+_0x404969(0x124)),process[_0x404969(0x122)](0x1);}
1
+ function _0x459f(){var _0x3a1bd8=['30tmBNOI','riZHN','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','58956sskElX','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','145146nDEUlC','1311540BoFpPe','18yqsJqB','617842uQKbSZ','30414sLviEb','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','4687697oTLouD','BTENC','4217936uVnWze'];_0x459f=function(){return _0x3a1bd8;};return _0x459f();}function _0x3304(_0xf1470b,_0x206c90){_0xf1470b=_0xf1470b-0xa3;var _0x459fae=_0x459f();var _0x330450=_0x459fae[_0xf1470b];return _0x330450;}(function(_0x351899,_0x449a6b){var _0x50d7eb=_0x3304,_0xe5bf2=_0x351899();while(!![]){try{var _0x2a61e6=parseInt(_0x50d7eb(0xac))/0x1+-parseInt(_0x50d7eb(0xad))/0x2+parseInt(_0x50d7eb(0xaa))/0x3+-parseInt(_0x50d7eb(0xa7))/0x4+-parseInt(_0x50d7eb(0xa4))/0x5*(parseInt(_0x50d7eb(0xa9))/0x6)+parseInt(_0x50d7eb(0xaf))/0x7+parseInt(_0x50d7eb(0xa3))/0x8*(-parseInt(_0x50d7eb(0xab))/0x9);if(_0x2a61e6===_0x449a6b)break;else _0xe5bf2['push'](_0xe5bf2['shift']());}catch(_0x279f0a){_0xe5bf2['push'](_0xe5bf2['shift']());}}}(_0x459f,0x78e0d));export async function authEncrypt(_0x184f09){var _0x3f151c=_0x3304,_0x2ce17e={'BTENC':function(_0xedb513,_0x1e5c27){return _0xedb513+_0x1e5c27;},'riZHN':_0x3f151c(0xa8),'JnSBo':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console['error'](_0x2ce17e['BTENC'](_0x2ce17e['BTENC'](_0x2ce17e['BTENC'](_0x2ce17e[_0x3f151c(0xb0)](_0x3f151c(0xae),'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a'),'\x0a'),'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),_0x3f151c(0xa6))+'\x0a'+_0x2ce17e[_0x3f151c(0xa5)]+_0x2ce17e['JnSBo']),process['exit'](0x1);}
@@ -1 +1 @@
1
- const _0x16243c=_0x553d;(function(_0x723264,_0x2fae8f){const _0x17ddcb=_0x553d,_0x52babc=_0x723264();while(!![]){try{const _0x4ec83b=-parseInt(_0x17ddcb(0x1f4))/0x1*(parseInt(_0x17ddcb(0x1fb))/0x2)+-parseInt(_0x17ddcb(0x1e4))/0x3*(parseInt(_0x17ddcb(0x208))/0x4)+parseInt(_0x17ddcb(0x20d))/0x5*(parseInt(_0x17ddcb(0x1f7))/0x6)+-parseInt(_0x17ddcb(0x209))/0x7+parseInt(_0x17ddcb(0x205))/0x8+-parseInt(_0x17ddcb(0x1f5))/0x9+parseInt(_0x17ddcb(0x20b))/0xa*(parseInt(_0x17ddcb(0x1ec))/0xb);if(_0x4ec83b===_0x2fae8f)break;else _0x52babc['push'](_0x52babc['shift']());}catch(_0x43aceb){_0x52babc['push'](_0x52babc['shift']());}}}(_0x5acb,0x49ba3));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x553d(_0x1bec0c,_0x26a7fc){_0x1bec0c=_0x1bec0c-0x1e1;const _0x5acb21=_0x5acb();let _0x553d6d=_0x5acb21[_0x1bec0c];return _0x553d6d;}import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x5acb(){const _0x1e5f16=['log','49330rpvPjP','819828meHMKb','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','164046WvuvUP','ehbEf','--scope','PFKee','22Qaqzfs','XEgLK','ranger','xMiwG','Nothing\x20to\x20clean\x20up.\x0a','uninstall','rcuXT','qoUXH','replace','Abfyl','1733800RZSPXt','win32','error','8TTijXs','2245957olMWfy','kzstw','20CUHdZQ','Qfnxi','15ENOmAq','user','length','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','TOfyJ','GUcYx','UbPZj','nlECJ','close','ignore','mClfx','✓\x20Removed\x20project\x20skill:\x20','plugin','MELgN','fFbsT','816537qglzXo','HYMYf','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','WADJn','claude','✓\x20Removed\x20.ranger/\x20directory','OaJSP','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','8261935CdkzZf','push','zJJBL','stringify','IjBvc','KFNUH','EfbEY'];_0x5acb=function(){return _0x1e5f16;};return _0x5acb();}import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x16243c(0x1fd),'feature-tracker','bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x3ab0f3){const _0x5757d0=_0x16243c,_0x51dfdc=_0x3ab0f3[_0x5757d0(0x203)](/\/\*[\s\S]*?\*\//g,''),_0x9864b1=_0x51dfdc['replace'](/^\s*\/\/.*$/gm,''),_0x3373a0=_0x9864b1[_0x5757d0(0x203)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x3373a0);}async function removeOpencodePluginConfig(_0x4aa928){const _0x223218=_0x16243c,_0x562e6c={'kYUlk':function(_0x157cbe,_0xbdceb1){return _0x157cbe!==_0xbdceb1;},'EfbEY':function(_0x429b67,_0x55c236){return _0x429b67(_0x55c236);},'xDrFu':function(_0x4f0c9f,_0x53531b){return _0x4f0c9f===_0x53531b;},'Abfyl':function(_0x24d83b,_0x3d2804,_0x53abc4){return _0x24d83b(_0x3d2804,_0x53abc4);},'IjBvc':function(_0x14b8b2,_0x2b8ff1){return _0x14b8b2+_0x2b8ff1;}};if(!_0x562e6c[_0x223218(0x1f2)](existsSync,_0x4aa928))return![];let _0x26a9c0;try{const _0xf9bb88=await readFile(_0x4aa928,'utf-8');_0x26a9c0=parseJsonc(_0xf9bb88);}catch{return![];}const _0x1c535b=Array['isArray'](_0x26a9c0[_0x223218(0x1e1)])?_0x26a9c0[_0x223218(0x1e1)]:[];if(_0x562e6c['xDrFu'](_0x1c535b[_0x223218(0x20f)],0x0))return![];const _0x5ecdc9=_0x1c535b['filter'](_0x43eb34=>{if(typeof _0x43eb34!=='string')return!![];return _0x562e6c['kYUlk'](_0x43eb34,opencodePluginName);});if(_0x562e6c['xDrFu'](_0x5ecdc9['length'],_0x1c535b['length']))return![];return _0x562e6c['xDrFu'](_0x5ecdc9[_0x223218(0x20f)],0x0)?delete _0x26a9c0['plugin']:_0x26a9c0[_0x223218(0x1e1)]=_0x5ecdc9,await _0x562e6c[_0x223218(0x204)](writeFile,_0x4aa928,_0x562e6c[_0x223218(0x1f0)](JSON[_0x223218(0x1ef)](_0x26a9c0,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x3c58b1){const _0x405917=_0x16243c,_0x2e0e66={'GUcYx':'plugin','fFbsT':_0x405917(0x200),'kzstw':'ranger@trailhead','incEC':_0x405917(0x1e8),'ixcFS':_0x405917(0x216),'CFzYQ':function(_0x231655){return _0x231655();},'HYMYf':_0x405917(0x206),'knERL':_0x405917(0x215)};return new Promise(_0x43d0e3=>{const _0x5cd32c=_0x405917,_0x3c0620=[_0x2e0e66[_0x5cd32c(0x212)],_0x2e0e66[_0x5cd32c(0x1e3)],_0x2e0e66[_0x5cd32c(0x20a)]];_0x3c58b1&&_0x3c0620[_0x5cd32c(0x1ed)](_0x5cd32c(0x1f9),_0x3c58b1);const _0x1ea966=spawn(_0x2e0e66['incEC'],_0x3c0620,{'stdio':[_0x2e0e66['ixcFS'],_0x2e0e66['ixcFS'],_0x5cd32c(0x216)],'cwd':_0x3c58b1?_0x2e0e66['CFzYQ'](getProjectRoot):undefined,'shell':process['platform']===_0x2e0e66[_0x5cd32c(0x1e5)]});_0x1ea966['on'](_0x2e0e66['knERL'],_0x3bce51=>{_0x43d0e3(_0x3bce51===0x0);}),_0x1ea966['on'](_0x5cd32c(0x207),()=>{_0x43d0e3(![]);});});}async function removeMarketplace(){const _0x58896a={'OaJSP':function(_0x4dbb1b,_0x50cf6e){return _0x4dbb1b===_0x50cf6e;},'GLLvd':'claude','MELgN':'marketplace','yvbLs':'remove','KFNUH':'trailhead','hpEnt':'ignore','nlECJ':'close'};return new Promise(_0x585dbd=>{const _0x2b95fa=_0x553d,_0x32e271=spawn(_0x58896a['GLLvd'],['plugin',_0x58896a[_0x2b95fa(0x1e2)],_0x58896a['yvbLs'],_0x58896a[_0x2b95fa(0x1f1)]],{'stdio':['ignore',_0x2b95fa(0x216),_0x58896a['hpEnt']],'shell':_0x58896a['OaJSP'](process['platform'],_0x2b95fa(0x206))});_0x32e271['on'](_0x58896a[_0x2b95fa(0x214)],_0x211fd3=>{const _0x3d537b=_0x2b95fa;_0x585dbd(_0x58896a[_0x3d537b(0x1ea)](_0x211fd3,0x0));}),_0x32e271['on'](_0x2b95fa(0x207),()=>{_0x585dbd(![]);});});}export async function clean(){const _0x4c0c56=_0x16243c,_0x1ea0d8={'jUUeI':_0x4c0c56(0x1e6),'zJJBL':function(_0x51ff13){return _0x51ff13();},'Qfnxi':function(_0x1cb9e2){return _0x1cb9e2();},'ehbEf':function(_0xcdcaca,_0x37a0fe){return _0xcdcaca(_0x37a0fe);},'TOfyJ':function(_0x307f57,_0x33fa13,_0x40e84e){return _0x307f57(_0x33fa13,_0x40e84e);},'UbPZj':_0x4c0c56(0x1e9),'WADJn':function(_0x38766a,_0x4317d7,_0x24ad94){return _0x38766a(_0x4317d7,_0x24ad94);},'rcuXT':'project','tbVRC':_0x4c0c56(0x20e),'qoUXH':function(_0x4c4466,_0x600434){return _0x4c4466(_0x600434);},'QoJcD':function(_0x1d36a0,_0x430cfc,_0x44ee12){return _0x1d36a0(_0x430cfc,_0x44ee12);},'XEgLK':function(_0x3241c5,_0x3c15cb){return _0x3241c5(_0x3c15cb);},'PFKee':_0x4c0c56(0x210),'xMiwG':'opencode.json','Srjhu':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','mClfx':_0x4c0c56(0x1f6),'FyXzF':'\x0a✅\x20Cleanup\x20complete!\x0a'};console[_0x4c0c56(0x1f3)](_0x1ea0d8['jUUeI']);let _0x2a963f=![];try{await deleteAllCredentials(),console['log']('✓\x20Removed\x20stored\x20credentials'),_0x2a963f=!![];}catch{}const _0x151139=_0x1ea0d8[_0x4c0c56(0x1ee)](getCacheFile);existsSync(_0x151139)&&(await rm(_0x151139),_0x2a963f=!![]);const _0x1a5b13=_0x1ea0d8[_0x4c0c56(0x20c)](getRangerDir);_0x1ea0d8[_0x4c0c56(0x1f8)](existsSync,_0x1a5b13)&&(await _0x1ea0d8['TOfyJ'](rm,_0x1a5b13,{'recursive':!![]}),console[_0x4c0c56(0x1f3)](_0x1ea0d8[_0x4c0c56(0x213)]),_0x2a963f=!![]);const _0x155707=getProjectSkillsDir();for(const _0x5107f1 of skillsToRemove){const _0x36eb61=join(_0x155707,_0x5107f1);existsSync(_0x36eb61)&&(await _0x1ea0d8[_0x4c0c56(0x1e7)](rm,_0x36eb61,{'recursive':!![]}),console['log'](_0x4c0c56(0x218)+_0x5107f1),_0x2a963f=!![]);}const _0x1a5d3c=_0x1ea0d8[_0x4c0c56(0x1ee)](getUserSkillsDir);for(const _0x5ae4e1 of skillsToRemove){const _0x1385d1=_0x1ea0d8['TOfyJ'](join,_0x1a5d3c,_0x5ae4e1);existsSync(_0x1385d1)&&(await rm(_0x1385d1,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x5ae4e1),_0x2a963f=!![]);}const _0x1d2d66=getOpencodeSkillsDir(_0x1ea0d8[_0x4c0c56(0x201)]);for(const _0x14ca82 of skillsToRemove){const _0x249432=_0x1ea0d8['TOfyJ'](join,_0x1d2d66,_0x14ca82);existsSync(_0x249432)&&(await rm(_0x249432,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x14ca82),_0x2a963f=!![]);}const _0x334fd0=getOpencodeSkillsDir(_0x1ea0d8['tbVRC']);for(const _0x1134f0 of skillsToRemove){const _0x2e537d=join(_0x334fd0,_0x1134f0);_0x1ea0d8[_0x4c0c56(0x202)](existsSync,_0x2e537d)&&(await _0x1ea0d8['QoJcD'](rm,_0x2e537d,{'recursive':!![]}),console[_0x4c0c56(0x1f3)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x1134f0),_0x2a963f=!![]);}const _0x2b2b5f=join(_0x1ea0d8[_0x4c0c56(0x1fc)](getOpencodeConfigDir,_0x1ea0d8['rcuXT']),'opencode.json');await _0x1ea0d8[_0x4c0c56(0x1f8)](removeOpencodePluginConfig,_0x2b2b5f)&&(console[_0x4c0c56(0x1f3)](_0x1ea0d8[_0x4c0c56(0x1fa)]),_0x2a963f=!![]);const _0x597674=_0x1ea0d8[_0x4c0c56(0x211)](join,_0x1ea0d8['XEgLK'](getOpencodeConfigDir,_0x4c0c56(0x20e)),_0x1ea0d8[_0x4c0c56(0x1fe)]);await _0x1ea0d8['ehbEf'](removeOpencodePluginConfig,_0x597674)&&(console['log'](_0x1ea0d8['Srjhu']),_0x2a963f=!![]);const _0x47565b=await uninstallClaudePlugin();_0x47565b&&(console[_0x4c0c56(0x1f3)](_0x4c0c56(0x1eb)),_0x2a963f=!![]);const _0x301614=await uninstallClaudePlugin(_0x1ea0d8['rcuXT']);_0x301614&&(console[_0x4c0c56(0x1f3)](_0x1ea0d8[_0x4c0c56(0x217)]),_0x2a963f=!![]);const _0x1c004c=await _0x1ea0d8['zJJBL'](removeMarketplace);_0x1c004c&&(console[_0x4c0c56(0x1f3)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x2a963f=!![]),_0x2a963f?console['log'](_0x1ea0d8['FyXzF']):console['log'](_0x4c0c56(0x1ff));}
1
+ const _0x4c5acc=_0x39a8;function _0x39a8(_0x17a583,_0x396972){_0x17a583=_0x17a583-0x1a6;const _0x2b1e33=_0x2b1e();let _0x39a853=_0x2b1e33[_0x17a583];return _0x39a853;}(function(_0x37aee6,_0xb8b4b6){const _0x4dd6ec=_0x39a8,_0x1c516d=_0x37aee6();while(!![]){try{const _0x2d602a=parseInt(_0x4dd6ec(0x1a8))/0x1+-parseInt(_0x4dd6ec(0x1b4))/0x2*(-parseInt(_0x4dd6ec(0x1bd))/0x3)+parseInt(_0x4dd6ec(0x1ba))/0x4+parseInt(_0x4dd6ec(0x1af))/0x5*(parseInt(_0x4dd6ec(0x1b3))/0x6)+-parseInt(_0x4dd6ec(0x1b5))/0x7+parseInt(_0x4dd6ec(0x1b8))/0x8+-parseInt(_0x4dd6ec(0x1b2))/0x9*(parseInt(_0x4dd6ec(0x1cc))/0xa);if(_0x2d602a===_0xb8b4b6)break;else _0x1c516d['push'](_0x1c516d['shift']());}catch(_0x3f218a){_0x1c516d['push'](_0x1c516d['shift']());}}}(_0x2b1e,0x450bb));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=['ranger','feature-tracker',_0x4c5acc(0x1d0),_0x4c5acc(0x1d3)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x478917){const _0xa2bc27=_0x4c5acc,_0x5d2c6c=_0x478917['replace'](/\/\*[\s\S]*?\*\//g,''),_0x429b56=_0x5d2c6c[_0xa2bc27(0x1b9)](/^\s*\/\/.*$/gm,''),_0x2e9726=_0x429b56[_0xa2bc27(0x1b9)](/,\s*([}\]])/g,'$1');return JSON[_0xa2bc27(0x1d1)](_0x2e9726);}async function removeOpencodePluginConfig(_0x39e8ed){const _0x53029f=_0x4c5acc,_0x2e531d={'Pqsok':function(_0x3ea771,_0x1257cf){return _0x3ea771!==_0x1257cf;},'bszUr':function(_0x2d445d,_0xa6db0a){return _0x2d445d(_0xa6db0a);},'kmIgi':function(_0x290108,_0x6daa4d,_0x29d799){return _0x290108(_0x6daa4d,_0x29d799);},'nocvj':'utf-8'};if(!_0x2e531d['bszUr'](existsSync,_0x39e8ed))return![];let _0x55ace7;try{const _0x5506f4=await _0x2e531d[_0x53029f(0x1c1)](readFile,_0x39e8ed,_0x2e531d[_0x53029f(0x1da)]);_0x55ace7=parseJsonc(_0x5506f4);}catch{return![];}const _0x35b15b=Array['isArray'](_0x55ace7['plugin'])?_0x55ace7[_0x53029f(0x1b1)]:[];if(_0x35b15b[_0x53029f(0x1aa)]===0x0)return![];const _0x304fbc=_0x35b15b[_0x53029f(0x1bb)](_0x404cb7=>{const _0x37c197=_0x53029f;if(typeof _0x404cb7!=='string')return!![];return _0x2e531d[_0x37c197(0x1c2)](_0x404cb7,opencodePluginName);});if(_0x304fbc['length']===_0x35b15b[_0x53029f(0x1aa)])return![];return _0x304fbc['length']===0x0?delete _0x55ace7[_0x53029f(0x1b1)]:_0x55ace7['plugin']=_0x304fbc,await _0x2e531d[_0x53029f(0x1c1)](writeFile,_0x39e8ed,JSON['stringify'](_0x55ace7,null,0x2)+'\x0a'),!![];}function _0x2b1e(){const _0xac16d9=['\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','claude','close','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','1045370eVAZPk','ACzrt','MMwpK','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','bug-bash','parse','XuHWz','e2e-test-recommender','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','✓\x20Removed\x20trailhead\x20marketplace','emXIC','pOUxY','win32','OuZPe','nocvj','khpAp','log','platform','RJOof','339325gHARzj','\x0a✅\x20Cleanup\x20complete!\x0a','length','xPGkG','YkHBs','tDyhN','ZBwcF','2088745PNdmkI','ignore','plugin','81QoOGWx','6JpQfjK','2FpNjmX','2002756OweZdj','✓\x20Removed\x20project\x20skill:\x20','jyWaI','922648KRydLH','replace','741056VZuJIU','filter','AISBl','1356249VWevUE','uPQzg','trailhead','project','kmIgi','Pqsok','user','jvREo','HxKRA','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','error'];_0x2b1e=function(){return _0xac16d9;};return _0x2b1e();}async function uninstallClaudePlugin(_0xab70f1){const _0x102bc2=_0x4c5acc,_0x3ed570={'ZBwcF':function(_0xe595cf,_0x2c41d6){return _0xe595cf(_0x2c41d6);},'owxbk':function(_0x381423,_0x51824d){return _0x381423(_0x51824d);},'YkHBs':'plugin','HxKRA':'ranger@trailhead','tJVrG':'--scope','UDEnZ':function(_0x54eeb6,_0x721c,_0x5b5240,_0x1239b7){return _0x54eeb6(_0x721c,_0x5b5240,_0x1239b7);},'UMCga':function(_0x477394){return _0x477394();},'RJOof':function(_0x5aa3c6,_0x1e8cc0){return _0x5aa3c6===_0x1e8cc0;},'sreqC':_0x102bc2(0x1ca),'rffLK':_0x102bc2(0x1c7)};return new Promise(_0x542909=>{const _0x1495a8=_0x102bc2,_0x2a0fac=[_0x3ed570[_0x1495a8(0x1ac)],'uninstall',_0x3ed570[_0x1495a8(0x1c5)]];_0xab70f1&&_0x2a0fac['push'](_0x3ed570['tJVrG'],_0xab70f1);const _0x350293=_0x3ed570['UDEnZ'](spawn,_0x1495a8(0x1c9),_0x2a0fac,{'stdio':['ignore',_0x1495a8(0x1b0),_0x1495a8(0x1b0)],'cwd':_0xab70f1?_0x3ed570['UMCga'](getProjectRoot):undefined,'shell':_0x3ed570[_0x1495a8(0x1a7)](process['platform'],'win32')});_0x350293['on'](_0x3ed570['sreqC'],_0x2b0bb5=>{const _0x3ebdeb=_0x1495a8;_0x3ed570[_0x3ebdeb(0x1ae)](_0x542909,_0x2b0bb5===0x0);}),_0x350293['on'](_0x3ed570['rffLK'],()=>{_0x3ed570['owxbk'](_0x542909,![]);});});}async function removeMarketplace(){const _0x2b02f5=_0x4c5acc,_0x4b1132={'xPGkG':function(_0x2930d3,_0x1ea54c,_0xa6440f,_0x415102){return _0x2930d3(_0x1ea54c,_0xa6440f,_0x415102);},'IEbTq':'plugin','jvREo':_0x2b02f5(0x1b0),'pOUxY':function(_0x3c52ca,_0x1ecafb){return _0x3c52ca===_0x1ecafb;},'ACzrt':'error'};return new Promise(_0x49901e=>{const _0x4a4c3a=_0x2b02f5,_0x589cf4=_0x4b1132[_0x4a4c3a(0x1ab)](spawn,'claude',[_0x4b1132['IEbTq'],'marketplace','remove',_0x4a4c3a(0x1bf)],{'stdio':[_0x4b1132['jvREo'],_0x4b1132[_0x4a4c3a(0x1c4)],_0x4a4c3a(0x1b0)],'shell':_0x4b1132[_0x4a4c3a(0x1d7)](process[_0x4a4c3a(0x1a6)],_0x4a4c3a(0x1d8))});_0x589cf4['on']('close',_0x47a21a=>{_0x49901e(_0x47a21a===0x0);}),_0x589cf4['on'](_0x4b1132[_0x4a4c3a(0x1cd)],()=>{_0x49901e(![]);});});}export async function clean(){const _0x576b62=_0x4c5acc,_0x1adc25={'XuHWz':_0x576b62(0x1c8),'emXIC':'✓\x20Removed\x20stored\x20credentials','MMwpK':function(_0x56d918){return _0x56d918();},'AISBl':function(_0x3cdc42,_0x4f1c4b){return _0x3cdc42(_0x4f1c4b);},'uPQzg':function(_0x11f17a,_0x48ec7f,_0x5b6b2a){return _0x11f17a(_0x48ec7f,_0x5b6b2a);},'lPLiI':'✓\x20Removed\x20.ranger/\x20directory','khpAp':function(_0xd2296d,_0x11555f){return _0xd2296d(_0x11555f);},'SEYUr':_0x576b62(0x1c3),'jyWaI':'opencode.json','JsgWd':_0x576b62(0x1d4),'OFbVi':function(_0x7a3edb,_0xe067cf){return _0x7a3edb(_0xe067cf);},'OuZPe':_0x576b62(0x1c6),'tDyhN':function(_0x4af384){return _0x4af384();},'KIvMI':_0x576b62(0x1d5),'DniXo':'Nothing\x20to\x20clean\x20up.\x0a'};console[_0x576b62(0x1dc)](_0x1adc25[_0x576b62(0x1d2)]);let _0x568ff3=![];try{await deleteAllCredentials(),console['log'](_0x1adc25[_0x576b62(0x1d6)]),_0x568ff3=!![];}catch{}const _0x6eeea0=_0x1adc25['MMwpK'](getCacheFile);existsSync(_0x6eeea0)&&(await rm(_0x6eeea0),_0x568ff3=!![]);const _0x6417cc=getRangerDir();_0x1adc25[_0x576b62(0x1bc)](existsSync,_0x6417cc)&&(await _0x1adc25[_0x576b62(0x1be)](rm,_0x6417cc,{'recursive':!![]}),console[_0x576b62(0x1dc)](_0x1adc25['lPLiI']),_0x568ff3=!![]);const _0x1bd7fe=getProjectSkillsDir();for(const _0x4493a0 of skillsToRemove){const _0x4010ce=join(_0x1bd7fe,_0x4493a0);existsSync(_0x4010ce)&&(await _0x1adc25['uPQzg'](rm,_0x4010ce,{'recursive':!![]}),console['log'](_0x576b62(0x1b6)+_0x4493a0),_0x568ff3=!![]);}const _0x4213d3=getUserSkillsDir();for(const _0x33dce7 of skillsToRemove){const _0x1f5495=join(_0x4213d3,_0x33dce7);_0x1adc25[_0x576b62(0x1bc)](existsSync,_0x1f5495)&&(await _0x1adc25[_0x576b62(0x1be)](rm,_0x1f5495,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x33dce7),_0x568ff3=!![]);}const _0x255d21=getOpencodeSkillsDir('project');for(const _0x433a23 of skillsToRemove){const _0x105d0b=join(_0x255d21,_0x433a23);_0x1adc25[_0x576b62(0x1db)](existsSync,_0x105d0b)&&(await rm(_0x105d0b,{'recursive':!![]}),console[_0x576b62(0x1dc)](_0x576b62(0x1cf)+_0x433a23),_0x568ff3=!![]);}const _0x156e59=getOpencodeSkillsDir(_0x1adc25['SEYUr']);for(const _0x412e0d of skillsToRemove){const _0xd041e0=_0x1adc25[_0x576b62(0x1be)](join,_0x156e59,_0x412e0d);_0x1adc25[_0x576b62(0x1db)](existsSync,_0xd041e0)&&(await _0x1adc25['uPQzg'](rm,_0xd041e0,{'recursive':!![]}),console[_0x576b62(0x1dc)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x412e0d),_0x568ff3=!![]);}const _0x2ba996=join(getOpencodeConfigDir('project'),_0x1adc25[_0x576b62(0x1b7)]);await removeOpencodePluginConfig(_0x2ba996)&&(console[_0x576b62(0x1dc)](_0x1adc25['JsgWd']),_0x568ff3=!![]);const _0x26c791=join(_0x1adc25['OFbVi'](getOpencodeConfigDir,'user'),_0x1adc25[_0x576b62(0x1b7)]);await _0x1adc25['OFbVi'](removeOpencodePluginConfig,_0x26c791)&&(console[_0x576b62(0x1dc)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x568ff3=!![]);const _0x2f72b2=await _0x1adc25[_0x576b62(0x1ce)](uninstallClaudePlugin);_0x2f72b2&&(console['log'](_0x576b62(0x1cb)),_0x568ff3=!![]);const _0x46fe12=await uninstallClaudePlugin(_0x576b62(0x1c0));_0x46fe12&&(console[_0x576b62(0x1dc)](_0x1adc25[_0x576b62(0x1d9)]),_0x568ff3=!![]);const _0x441aab=await _0x1adc25[_0x576b62(0x1ad)](removeMarketplace);_0x441aab&&(console['log'](_0x1adc25['KIvMI']),_0x568ff3=!![]),_0x568ff3?console['log'](_0x576b62(0x1a9)):console['log'](_0x1adc25['DniXo']);}
@@ -1 +1 @@
1
- const _0x453696=_0x2b20;(function(_0x5f00cc,_0x53835e){const _0x55fde6=_0x2b20,_0x16377e=_0x5f00cc();while(!![]){try{const _0x490d57=-parseInt(_0x55fde6(0xf0))/0x1+-parseInt(_0x55fde6(0xf8))/0x2+parseInt(_0x55fde6(0xfe))/0x3+-parseInt(_0x55fde6(0x103))/0x4*(parseInt(_0x55fde6(0xec))/0x5)+parseInt(_0x55fde6(0x101))/0x6*(-parseInt(_0x55fde6(0xee))/0x7)+-parseInt(_0x55fde6(0xf1))/0x8+parseInt(_0x55fde6(0xe0))/0x9;if(_0x490d57===_0x53835e)break;else _0x16377e['push'](_0x16377e['shift']());}catch(_0x1b485c){_0x16377e['push'](_0x16377e['shift']());}}}(_0x547e,0x58faa));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x453696(0x104),'allowInsecureLocalhost',_0x453696(0x109)];function parseLocalValue(_0x1620cb,_0x31d85b){const _0x75e49c=_0x453696,_0x2993df={'pgZTD':function(_0x5df8ab,_0x488c5f){return _0x5df8ab===_0x488c5f;},'xVASb':_0x75e49c(0xdb)};if(BOOLEAN_KEYS[_0x75e49c(0x105)](_0x1620cb)){if(_0x31d85b===_0x75e49c(0x100))return!![];if(_0x2993df['pgZTD'](_0x31d85b,_0x2993df[_0x75e49c(0xf6)]))return![];throw new Error(_0x75e49c(0xe7)+_0x1620cb+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x31d85b;}function parseOverrideValue(_0x50df2a){const _0x28f0e0=_0x453696,_0x526c79={'GWpdU':'true','CQxsa':function(_0x36de15,_0x516f70){return _0x36de15===_0x516f70;},'hZHxO':_0x28f0e0(0xeb),'jRGzM':_0x28f0e0(0xdc),'RcLor':function(_0xf7441f,_0x39b3b5){return _0xf7441f(_0x39b3b5);}};if(_0x50df2a===_0x526c79['GWpdU'])return!![];if(_0x526c79[_0x28f0e0(0xed)](_0x50df2a,_0x28f0e0(0xdb)))return![];if(_0x50df2a===_0x526c79['hZHxO'])return null;if(_0x526c79[_0x28f0e0(0xed)](_0x50df2a,_0x526c79['jRGzM']))return undefined;if(/^-?\d+$/['test'](_0x50df2a)){const _0x27546e=_0x526c79['RcLor'](Number,_0x50df2a);if(Number[_0x28f0e0(0xe5)](_0x27546e))return _0x27546e;}if(/^-?\d+\.\d+$/[_0x28f0e0(0xef)](_0x50df2a)){const _0x4d5a0e=Number(_0x50df2a);if(!Number[_0x28f0e0(0xf2)](_0x4d5a0e))return _0x4d5a0e;}const _0x187fd7=_0x50df2a['trim']();if(_0x187fd7[_0x28f0e0(0xe2)]('{')&&_0x187fd7[_0x28f0e0(0xdd)]('}')||_0x187fd7[_0x28f0e0(0xe2)]('[')&&_0x187fd7[_0x28f0e0(0xdd)](']'))try{return JSON['parse'](_0x187fd7);}catch{}return _0x50df2a;}function _0x547e(){const _0x5b97ab=['forceLogin','Key\x20\x22','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','\x20\x20Note:\x20\x22','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','kHwNY','false','undefined','endsWith','stringify','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','22267242VDDQlb','cloud','startsWith','keys','kind','isSafeInteger','No\x20configuration\x20set\x20for\x20\x22','Invalid\x20value\x20for\x20','MYrkn','Set\x20','FizTn','null','38435hpaCxw','CQxsa','2168957fodCpg','test','686572uIEARw','1711768LzlKEr','isNaN','Profile\x20\x22','object','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','xVASb','EGvsA','728166vXtnAs','KWOFA','fyayL','tvybt','Removed\x20','local','539064tMpFXh','\x20for\x20\x22','true','6qKjieW','zvtBx','372HNEFyC','headless','includes','oYPRy','log','NwIap'];_0x547e=function(){return _0x5b97ab;};return _0x547e();}function _0x2b20(_0x3d7217,_0x4dba72){_0x3d7217=_0x3d7217-0xd9;const _0x547e58=_0x547e();let _0x2b206f=_0x547e58[_0x3d7217];return _0x2b206f;}async function resolveProfileTarget(_0x54007a){const _0x2e89f9=_0x453696,_0x2637f5={'wvIGr':function(_0x441e27,_0x301e2d){return _0x441e27(_0x301e2d);},'oYPRy':_0x2e89f9(0xe1)},_0x379b6d=_0x2637f5['wvIGr'](existsSync,getEnvDir(_0x54007a));let _0x359d6e=![];try{const _0x2ecc8c=await fetchCloudProfile(_0x54007a);_0x359d6e=Boolean(_0x2ecc8c);}catch{}if(_0x359d6e)return{'kind':_0x2637f5[_0x2e89f9(0x106)],'alsoExistsElsewhere':_0x379b6d};if(_0x379b6d)return{'kind':_0x2e89f9(0xfd),'alsoExistsElsewhere':![]};throw new Error(_0x2e89f9(0xf3)+_0x54007a+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x54007a);}function printDualExistsHint(_0x3c4fdb){const _0x5551a4=_0x453696;console[_0x5551a4(0x107)](_0x5551a4(0x10c)+_0x3c4fdb+_0x5551a4(0x10b));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x3137eb){const _0x302b65=_0x453696,_0x2558c4={'NwIap':function(_0x34573e,_0xcbecf1,_0x4547a8){return _0x34573e(_0xcbecf1,_0x4547a8);}},_0x29b9d6=await fetchCloudProfile(_0x3137eb),_0x25f2b8=readProfileOverrides(getProjectPath(),_0x3137eb);return _0x2558c4[_0x302b65(0x108)](mergeCloudProfileSettings,_0x29b9d6?.['settings']??{},_0x25f2b8??undefined);}export async function configSet(_0x179fc2,_0x3b02fa,_0x33fe51){const _0x23b418=_0x453696,_0x16c426={'fyayL':function(_0x55d1b0,_0x8b020d){return _0x55d1b0(_0x8b020d);},'tvybt':function(_0x1d2acf,_0x2a02e6){return _0x1d2acf===_0x2a02e6;},'VKaaQ':'cloud','bdSJc':function(_0x544c0a,_0x4c7a81,_0x3c274b,_0x37f16b,_0x1dd9f3){return _0x544c0a(_0x4c7a81,_0x3c274b,_0x37f16b,_0x1dd9f3);}},_0x50654e=await _0x16c426[_0x23b418(0xfa)](resolveProfileTarget,_0x179fc2);if(_0x16c426[_0x23b418(0xfb)](_0x50654e['kind'],_0x16c426['VKaaQ'])){if(_0x50654e['alsoExistsElsewhere'])printDualExistsHint(_0x179fc2);const _0x425043=parseOverrideValue(_0x33fe51);setProfileOverride(getProjectPath(),_0x179fc2,_0x3b02fa,_0x425043),console['log']('Set\x20'+_0x3b02fa+'\x20=\x20'+JSON['stringify'](_0x425043)+'\x20for\x20\x22'+_0x179fc2+'\x22');return;}const _0x198115=parseLocalValue(_0x3b02fa,_0x33fe51);_0x16c426['bdSJc'](setProfileOverride,getProjectPath(),_0x179fc2,_0x3b02fa,_0x198115),console[_0x23b418(0x107)](_0x23b418(0xe9)+_0x3b02fa+'\x20=\x20'+_0x198115+_0x23b418(0xff)+_0x179fc2+'\x22');}export async function configGet(_0x34a007,_0x5eba12){const _0x504332=_0x453696,_0x2e0073={'EGvsA':function(_0x5ebc79,_0x5df230){return _0x5ebc79===_0x5df230;},'FizTn':function(_0x3b6c03,_0x2957e0){return _0x3b6c03===_0x2957e0;},'OFtrU':_0x504332(0xf4)},_0x1dac22=await resolveProfileTarget(_0x34a007);if(_0x1dac22['kind']===_0x504332(0xe1)){const _0x2d8f81=await loadEffectiveCloudSettings(_0x34a007),_0x3497e2=getNestedValue(_0x2d8f81,_0x5eba12);if(_0x2e0073[_0x504332(0xf7)](_0x3497e2,undefined))console[_0x504332(0x107)]('(not\x20set)');else typeof _0x3497e2===_0x504332(0xf4)?console[_0x504332(0x107)](JSON[_0x504332(0xde)](_0x3497e2,null,0x2)):console[_0x504332(0x107)](_0x3497e2);return;}const _0x4e9ef1=await loadSettings(_0x34a007),_0x1f51af=getNestedValue(_0x4e9ef1,_0x5eba12);if(_0x1f51af===undefined)console['log']('(not\x20set)');else _0x2e0073[_0x504332(0xea)](typeof _0x1f51af,_0x2e0073['OFtrU'])?console['log'](JSON['stringify'](_0x1f51af,null,0x2)):console[_0x504332(0x107)](_0x1f51af);}export async function configList(_0x4d413c){const _0x24cf8e=_0x453696,_0x2f0f8d={'yXpAz':function(_0x37b1fa,_0x5c176a){return _0x37b1fa(_0x5c176a);},'KWOFA':function(_0x3595cb,_0x4f5e4a){return _0x3595cb===_0x4f5e4a;},'Fnsfb':function(_0x51202f,_0x4d0e08){return _0x51202f(_0x4d0e08);},'zvtBx':function(_0x5a1efd,_0x33f461){return _0x5a1efd(_0x33f461);}},_0x2f7eba=await _0x2f0f8d['yXpAz'](resolveProfileTarget,_0x4d413c);if(_0x2f0f8d[_0x24cf8e(0xf9)](_0x2f7eba[_0x24cf8e(0xe4)],_0x24cf8e(0xe1))){const _0x23acbd=await loadEffectiveCloudSettings(_0x4d413c);if(!_0x23acbd||Object[_0x24cf8e(0xe3)](_0x23acbd)['length']===0x0){console['log'](_0x24cf8e(0xe6)+_0x4d413c+'\x22');return;}console[_0x24cf8e(0x107)](JSON[_0x24cf8e(0xde)](_0x23acbd,null,0x2));return;}const _0x46902d=_0x2f0f8d['Fnsfb'](getSettingsPath,_0x4d413c);if(!existsSync(_0x46902d)){console[_0x24cf8e(0x107)](_0x24cf8e(0xe6)+_0x4d413c+'\x22');return;}const _0x193d25=await loadSettings(_0x4d413c),_0x4901c2=_0x2f0f8d[_0x24cf8e(0x102)](formatSettings,_0x193d25);!_0x4901c2?console[_0x24cf8e(0x107)]('No\x20configuration\x20set\x20for\x20\x22'+_0x4d413c+'\x22'):console[_0x24cf8e(0x107)](_0x4901c2);}export async function configUnset(_0x4239b3,_0x196b4b){const _0x248b2d=_0x453696,_0x24cca9={'MYrkn':function(_0x42be8a,_0x1cd2ca){return _0x42be8a(_0x1cd2ca);},'eiLZL':function(_0x3c9c7c,_0xf112e9){return _0x3c9c7c===_0xf112e9;},'TNKJw':function(_0x1458ea,_0x34b0ff,_0x26de4a,_0x365acb){return _0x1458ea(_0x34b0ff,_0x26de4a,_0x365acb);},'BRZLA':function(_0x4e05ec,_0x589a30){return _0x4e05ec(_0x589a30);}},_0x212fc7=await _0x24cca9[_0x248b2d(0xe8)](resolveProfileTarget,_0x4239b3);if(_0x24cca9['eiLZL'](_0x212fc7[_0x248b2d(0xe4)],'cloud')){if(_0x212fc7['alsoExistsElsewhere'])printDualExistsHint(_0x4239b3);const _0x16d35b=unsetProfileOverride(getProjectPath(),_0x4239b3,_0x196b4b);_0x16d35b?console[_0x248b2d(0x107)](_0x248b2d(0xfc)+_0x196b4b+'\x20for\x20\x22'+_0x4239b3+'\x22'):console['log']('Key\x20\x22'+_0x196b4b+'\x22\x20not\x20found');return;}const _0x20a117=_0x24cca9['TNKJw'](unsetProfileOverride,getProjectPath(),_0x4239b3,_0x196b4b);if(_0x20a117){console['log'](_0x248b2d(0xfc)+_0x196b4b);return;}const _0x3590bf=await _0x24cca9['BRZLA'](loadSettings,_0x4239b3),_0x47f945=deleteNestedValue(_0x3590bf,_0x196b4b);_0x47f945?console['log']('Key\x20\x22'+_0x196b4b+_0x248b2d(0xd9)+_0x4239b3+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x248b2d(0x107)](_0x248b2d(0x10a)+_0x196b4b+'\x22\x20not\x20found');}export async function configReset(_0x297138){const _0x588dc3=_0x453696,_0x3b981f={'kHwNY':function(_0x23b70f,_0x71b6bb){return _0x23b70f(_0x71b6bb);},'BEBAU':'cloud'},_0x51785=await _0x3b981f[_0x588dc3(0xda)](resolveProfileTarget,_0x297138);if(_0x51785[_0x588dc3(0xe4)]===_0x3b981f['BEBAU']){resetProfileOverrides(getProjectPath(),_0x297138),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x297138+'\x22');return;}console[_0x588dc3(0x107)]('\x22'+_0x297138+_0x588dc3(0xdf)+_0x297138+_0x588dc3(0xf5));}
1
+ const _0x538cff=_0x2699;(function(_0x41fe8b,_0x2d4f85){const _0x3e5b0b=_0x2699,_0x4e300d=_0x41fe8b();while(!![]){try{const _0x49288c=-parseInt(_0x3e5b0b(0x21f))/0x1*(parseInt(_0x3e5b0b(0x215))/0x2)+parseInt(_0x3e5b0b(0x21e))/0x3+-parseInt(_0x3e5b0b(0x206))/0x4+parseInt(_0x3e5b0b(0x1f3))/0x5+parseInt(_0x3e5b0b(0x1f5))/0x6*(parseInt(_0x3e5b0b(0x226))/0x7)+parseInt(_0x3e5b0b(0x202))/0x8+-parseInt(_0x3e5b0b(0x228))/0x9*(parseInt(_0x3e5b0b(0x1fb))/0xa);if(_0x49288c===_0x2d4f85)break;else _0x4e300d['push'](_0x4e300d['shift']());}catch(_0x1b32ab){_0x4e300d['push'](_0x4e300d['shift']());}}}(_0x2a21,0x48fd3));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=[_0x538cff(0x1f8),'allowInsecureLocalhost',_0x538cff(0x208)];function parseLocalValue(_0x2ded15,_0x394791){const _0x14215f=_0x538cff,_0x4da701={'Xdczr':function(_0x49f0bf,_0x2e2df0){return _0x49f0bf===_0x2e2df0;},'CsFUk':_0x14215f(0x1f9),'qFcGB':'false'};if(BOOLEAN_KEYS['includes'](_0x2ded15)){if(_0x4da701['Xdczr'](_0x394791,_0x4da701[_0x14215f(0x209)]))return!![];if(_0x394791===_0x4da701[_0x14215f(0x1fa)])return![];throw new Error('Invalid\x20value\x20for\x20'+_0x2ded15+_0x14215f(0x227));}return _0x394791;}function parseOverrideValue(_0xf4f32){const _0x4a5fbc=_0x538cff,_0x5157bf={'ZqYno':_0x4a5fbc(0x1f9),'kYBua':function(_0x504963,_0x2cc233){return _0x504963===_0x2cc233;},'tIHrG':_0x4a5fbc(0x207),'DcuSB':'undefined'};if(_0xf4f32===_0x5157bf['ZqYno'])return!![];if(_0xf4f32==='false')return![];if(_0x5157bf['kYBua'](_0xf4f32,_0x5157bf[_0x4a5fbc(0x221)]))return null;if(_0xf4f32===_0x5157bf[_0x4a5fbc(0x21d)])return undefined;if(/^-?\d+$/['test'](_0xf4f32)){const _0x15a23c=Number(_0xf4f32);if(Number['isSafeInteger'](_0x15a23c))return _0x15a23c;}if(/^-?\d+\.\d+$/[_0x4a5fbc(0x20f)](_0xf4f32)){const _0x3f9634=Number(_0xf4f32);if(!Number['isNaN'](_0x3f9634))return _0x3f9634;}const _0x19a39f=_0xf4f32['trim']();if(_0x19a39f['startsWith']('{')&&_0x19a39f['endsWith']('}')||_0x19a39f[_0x4a5fbc(0x20b)]('[')&&_0x19a39f[_0x4a5fbc(0x224)](']'))try{return JSON['parse'](_0x19a39f);}catch{}return _0xf4f32;}function _0x2699(_0x371c23,_0x49fba8){_0x371c23=_0x371c23-0x1f3;const _0x2a21ef=_0x2a21();let _0x269981=_0x2a21ef[_0x371c23];return _0x269981;}function _0x2a21(){const _0x1b80c1=['startsWith','jPdNH','rTugV','kind','test','JeoxK','KzrCP','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','tMTFs','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','2230yKWWoP','Removed\x20','KjKJH','vGCtO','object','lTtmQ','cluis','log','DcuSB','9930fmsIwU','86VlsgRQ','\x20for\x20\x22','tIHrG','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','DkJJD','endsWith','\x20\x20Note:\x20\x22','7HBUXRO',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','24174FiEtxh','1038135gGFykq','Set\x20','2335266FmldMg','Cleared\x20local\x20overrides\x20for\x20\x22','Profile\x20\x22','headless','true','qFcGB','170JDwdMq','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','length','(not\x20set)','stringify','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','cloud','264856sMTYyp','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','\x22\x20not\x20found','RKYvv','770960IlejDx','null','forceLogin','CsFUk','gAaAv'];_0x2a21=function(){return _0x1b80c1;};return _0x2a21();}async function resolveProfileTarget(_0x331592){const _0xdc992f=_0x538cff,_0x11e7d2={'JeoxK':function(_0x23061a,_0x2974de){return _0x23061a(_0x2974de);},'fWLKj':function(_0x55a6da,_0x3272fa){return _0x55a6da(_0x3272fa);},'FEZtz':'cloud','lTtmQ':'local'},_0x582038=_0x11e7d2[_0xdc992f(0x210)](existsSync,_0x11e7d2['fWLKj'](getEnvDir,_0x331592));let _0x1cbd03=![];try{const _0x5fbd95=await fetchCloudProfile(_0x331592);_0x1cbd03=_0x11e7d2['JeoxK'](Boolean,_0x5fbd95);}catch{}if(_0x1cbd03)return{'kind':_0x11e7d2['FEZtz'],'alsoExistsElsewhere':_0x582038};if(_0x582038)return{'kind':_0x11e7d2[_0xdc992f(0x21a)],'alsoExistsElsewhere':![]};throw new Error(_0xdc992f(0x1f7)+_0x331592+_0xdc992f(0x214)+_0x331592);}function printDualExistsHint(_0x3ed841){const _0x4c7624=_0x538cff;console[_0x4c7624(0x21c)](_0x4c7624(0x225)+_0x3ed841+_0x4c7624(0x203));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x2f656a){const _0x551d16=_0x538cff,_0x20acf4={'RKYvv':function(_0x4228b0,_0x3215b2,_0x4ad6e3){return _0x4228b0(_0x3215b2,_0x4ad6e3);}},_0x7a7562=await fetchCloudProfile(_0x2f656a),_0xe41364=_0x20acf4[_0x551d16(0x205)](readProfileOverrides,getProjectPath(),_0x2f656a);return mergeCloudProfileSettings(_0x7a7562?.['settings']??{},_0xe41364??undefined);}export async function configSet(_0x3ba74e,_0x56abbd,_0x1465d8){const _0x392dd2=_0x538cff,_0x409969={'gAaAv':function(_0x4b06d6,_0x28a030){return _0x4b06d6(_0x28a030);},'vGCtO':function(_0x3891df,_0x3cbe95){return _0x3891df===_0x3cbe95;},'kleiH':function(_0x2257f8,_0x1eeeb2){return _0x2257f8(_0x1eeeb2);},'DkJJD':function(_0x28cbad,_0x4a3410,_0x3d5723){return _0x28cbad(_0x4a3410,_0x3d5723);}},_0x507bf0=await _0x409969[_0x392dd2(0x20a)](resolveProfileTarget,_0x3ba74e);if(_0x409969[_0x392dd2(0x218)](_0x507bf0[_0x392dd2(0x20e)],'cloud')){if(_0x507bf0['alsoExistsElsewhere'])_0x409969['kleiH'](printDualExistsHint,_0x3ba74e);const _0x4e2c87=parseOverrideValue(_0x1465d8);setProfileOverride(getProjectPath(),_0x3ba74e,_0x56abbd,_0x4e2c87),console['log'](_0x392dd2(0x1f4)+_0x56abbd+'\x20=\x20'+JSON['stringify'](_0x4e2c87)+_0x392dd2(0x220)+_0x3ba74e+'\x22');return;}const _0xb540ff=_0x409969[_0x392dd2(0x223)](parseLocalValue,_0x56abbd,_0x1465d8);setProfileOverride(getProjectPath(),_0x3ba74e,_0x56abbd,_0xb540ff),console[_0x392dd2(0x21c)]('Set\x20'+_0x56abbd+'\x20=\x20'+_0xb540ff+'\x20for\x20\x22'+_0x3ba74e+'\x22');}export async function configGet(_0x597af8,_0x8e268){const _0x12af60=_0x538cff,_0x2484a6={'KjKJH':function(_0x318b60,_0x42ac8b){return _0x318b60(_0x42ac8b);},'yXNfE':_0x12af60(0x201),'DyaKR':function(_0x5ebc3b,_0x29c2b4){return _0x5ebc3b(_0x29c2b4);},'EjGjp':_0x12af60(0x219),'viSnZ':function(_0x1a60d1,_0x3bc3d0){return _0x1a60d1===_0x3bc3d0;},'JtApb':function(_0x17bb53,_0x4d5a93){return _0x17bb53===_0x4d5a93;}},_0x538d36=await _0x2484a6[_0x12af60(0x217)](resolveProfileTarget,_0x597af8);if(_0x538d36['kind']===_0x2484a6['yXNfE']){const _0x456591=await _0x2484a6['DyaKR'](loadEffectiveCloudSettings,_0x597af8),_0x114d76=getNestedValue(_0x456591,_0x8e268);if(_0x114d76===undefined)console['log']('(not\x20set)');else typeof _0x114d76===_0x2484a6['EjGjp']?console['log'](JSON['stringify'](_0x114d76,null,0x2)):console[_0x12af60(0x21c)](_0x114d76);return;}const _0x509988=await loadSettings(_0x597af8),_0x5f1415=getNestedValue(_0x509988,_0x8e268);if(_0x2484a6['viSnZ'](_0x5f1415,undefined))console[_0x12af60(0x21c)](_0x12af60(0x1fe));else _0x2484a6['JtApb'](typeof _0x5f1415,'object')?console[_0x12af60(0x21c)](JSON['stringify'](_0x5f1415,null,0x2)):console['log'](_0x5f1415);}export async function configList(_0x100fa1){const _0x554de3=_0x538cff,_0x20c4b4={'teUul':function(_0x1b3e3a,_0x22dbdb){return _0x1b3e3a(_0x22dbdb);},'tMTFs':function(_0x1c3c1d,_0x46c897){return _0x1c3c1d===_0x46c897;},'TRpAV':function(_0x2ea446,_0x28c321){return _0x2ea446(_0x28c321);}},_0x4db8c1=await _0x20c4b4['teUul'](resolveProfileTarget,_0x100fa1);if(_0x20c4b4[_0x554de3(0x213)](_0x4db8c1['kind'],_0x554de3(0x201))){const _0x2f7137=await _0x20c4b4['TRpAV'](loadEffectiveCloudSettings,_0x100fa1);if(!_0x2f7137||Object['keys'](_0x2f7137)[_0x554de3(0x1fd)]===0x0){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x100fa1+'\x22');return;}console[_0x554de3(0x21c)](JSON[_0x554de3(0x1ff)](_0x2f7137,null,0x2));return;}const _0x399848=getSettingsPath(_0x100fa1);if(!existsSync(_0x399848)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x100fa1+'\x22');return;}const _0x254bd0=await loadSettings(_0x100fa1),_0x352b35=formatSettings(_0x254bd0);!_0x352b35?console[_0x554de3(0x21c)]('No\x20configuration\x20set\x20for\x20\x22'+_0x100fa1+'\x22'):console[_0x554de3(0x21c)](_0x352b35);}export async function configUnset(_0x150d7d,_0x49062f){const _0x146f4b=_0x538cff,_0x4d3fc9={'KzrCP':function(_0x125c59,_0x575b86){return _0x125c59(_0x575b86);},'cluis':_0x146f4b(0x201),'rTugV':function(_0x4ef54d){return _0x4ef54d();},'kYuZx':function(_0x31ee5c,_0x5c15aa){return _0x31ee5c(_0x5c15aa);}},_0x935cf6=await _0x4d3fc9[_0x146f4b(0x211)](resolveProfileTarget,_0x150d7d);if(_0x935cf6['kind']===_0x4d3fc9[_0x146f4b(0x21b)]){if(_0x935cf6['alsoExistsElsewhere'])_0x4d3fc9['KzrCP'](printDualExistsHint,_0x150d7d);const _0x4f4cac=unsetProfileOverride(getProjectPath(),_0x150d7d,_0x49062f);_0x4f4cac?console[_0x146f4b(0x21c)](_0x146f4b(0x216)+_0x49062f+'\x20for\x20\x22'+_0x150d7d+'\x22'):console[_0x146f4b(0x21c)]('Key\x20\x22'+_0x49062f+_0x146f4b(0x204));return;}const _0x12b330=unsetProfileOverride(_0x4d3fc9[_0x146f4b(0x20d)](getProjectPath),_0x150d7d,_0x49062f);if(_0x12b330){console['log'](_0x146f4b(0x216)+_0x49062f);return;}const _0x31dbd8=await _0x4d3fc9['kYuZx'](loadSettings,_0x150d7d),_0x8c2128=deleteNestedValue(_0x31dbd8,_0x49062f);_0x8c2128?console['log']('Key\x20\x22'+_0x49062f+_0x146f4b(0x222)+_0x150d7d+_0x146f4b(0x212)):console['log']('Key\x20\x22'+_0x49062f+_0x146f4b(0x204));}export async function configReset(_0x472153){const _0xa757be=_0x538cff,_0x138135={'jPdNH':function(_0x456355,_0x122ef0,_0x146eb7){return _0x456355(_0x122ef0,_0x146eb7);}},_0x351d57=await resolveProfileTarget(_0x472153);if(_0x351d57['kind']===_0xa757be(0x201)){_0x138135[_0xa757be(0x20c)](resetProfileOverrides,getProjectPath(),_0x472153),console[_0xa757be(0x21c)](_0xa757be(0x1f6)+_0x472153+'\x22');return;}console[_0xa757be(0x21c)]('\x22'+_0x472153+_0xa757be(0x200)+_0x472153+_0xa757be(0x1fc));}
@@ -1 +1 @@
1
- function _0x2d83(){const _0xf5e396=['\x22\x20to\x20confirm\x20deletion:','pnzbA','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','6198625hhzkNl','WnXOW','104UMfjcK','500564cCiPKJ','yes','36nIcAFS','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','input','9035298FgFNhP','12140408hSjtcg','188776Nziddv','285909OGXhPi','nIWMH','2233593yjZlNf','prompt','log'];_0x2d83=function(){return _0xf5e396;};return _0x2d83();}(function(_0x4830f2,_0x79c1bf){const _0x1911f0=_0x4842,_0x23d616=_0x4830f2();while(!![]){try{const _0x4bb981=-parseInt(_0x1911f0(0x101))/0x1+parseInt(_0x1911f0(0xfa))/0x2+-parseInt(_0x1911f0(0xef))/0x3*(parseInt(_0x1911f0(0xfc))/0x4)+-parseInt(_0x1911f0(0xf7))/0x5+parseInt(_0x1911f0(0xff))/0x6+-parseInt(_0x1911f0(0x100))/0x7+-parseInt(_0x1911f0(0xf9))/0x8*(-parseInt(_0x1911f0(0xf1))/0x9);if(_0x4bb981===_0x79c1bf)break;else _0x23d616['push'](_0x23d616['shift']());}catch(_0x3fe4af){_0x23d616['push'](_0x23d616['shift']());}}}(_0x2d83,0xead66));import _0x51827f from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x4842(_0x1dceef,_0x4abb40){_0x1dceef=_0x1dceef-0xef;const _0x2d83f8=_0x2d83();let _0x4842d3=_0x2d83f8[_0x1dceef];return _0x4842d3;}import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x3526be,_0x55525c={}){const _0x44236a=_0x4842,_0x1c24eb={'nIWMH':function(_0x1ef438,_0x55a96f){return _0x1ef438(_0x55a96f);},'gxYyl':_0x44236a(0xfd),'pnzbA':function(_0x16f796,_0x156110){return _0x16f796!==_0x156110;},'WnXOW':function(_0x3f98d0,_0x3c2027,_0x5a2caa){return _0x3f98d0(_0x3c2027,_0x5a2caa);},'dUVTk':function(_0x1a74ec,_0x31d656,_0x3304c9){return _0x1a74ec(_0x31d656,_0x3304c9);}},_0x5bddf=await _0x1c24eb[_0x44236a(0xf0)](fetchCloudProfile,_0x3526be);if(!_0x5bddf)throw new Error('Cloud\x20profile\x20\x22'+_0x3526be+'\x22\x20not\x20found.');if(!_0x55525c[_0x44236a(0xfb)]&&!isInteractive())throw new Error(_0x1c24eb['gxYyl']);console[_0x44236a(0xf3)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x3526be+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x55525c[_0x44236a(0xfb)]){const {confirmation:_0xa0e933}=await _0x51827f[_0x44236a(0xf2)]([{'type':_0x44236a(0xfe),'name':'confirmation','message':'Type\x20\x22'+_0x3526be+_0x44236a(0xf4)}]);if(_0x1c24eb[_0x44236a(0xf5)](_0xa0e933,_0x3526be))throw new Error(_0x44236a(0xf6));}await deleteCloudProfile(_0x3526be),_0x1c24eb[_0x44236a(0xf8)](resetProfileOverrides,process['cwd'](),_0x3526be),_0x1c24eb['dUVTk'](clearLastProfile,process['cwd'](),_0x3526be),console[_0x44236a(0xf3)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x3526be+'\x22.');}
1
+ (function(_0x203d4f,_0xb9b0f9){const _0x1ab393=_0x39a9,_0x52f87d=_0x203d4f();while(!![]){try{const _0x23a641=-parseInt(_0x1ab393(0x170))/0x1+parseInt(_0x1ab393(0x15f))/0x2*(parseInt(_0x1ab393(0x165))/0x3)+-parseInt(_0x1ab393(0x15e))/0x4*(parseInt(_0x1ab393(0x16e))/0x5)+parseInt(_0x1ab393(0x160))/0x6*(parseInt(_0x1ab393(0x161))/0x7)+-parseInt(_0x1ab393(0x171))/0x8*(parseInt(_0x1ab393(0x172))/0x9)+-parseInt(_0x1ab393(0x15c))/0xa*(parseInt(_0x1ab393(0x164))/0xb)+parseInt(_0x1ab393(0x15b))/0xc;if(_0x23a641===_0xb9b0f9)break;else _0x52f87d['push'](_0x52f87d['shift']());}catch(_0x17158c){_0x52f87d['push'](_0x52f87d['shift']());}}}(_0x57f7,0x924be));function _0x57f7(){const _0x55d4c4=['539572LuyfLY','17868yitgIJ','✓\x20Deleted\x20cloud\x20profile\x20\x22','Type\x20\x22','Cloud\x20profile\x20\x22','log','input','cwd','XOImR','\x22\x20not\x20found.','25YmVkTz','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','736542empsiW','5724632qklUXi','9epsdNO','dcbde','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','23962668kWIpsl','140pTojeB','BaUmr','535452WkRYsg','360tDqiPm','81222DWGJkD','175jTCGIH','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','confirmation'];_0x57f7=function(){return _0x55d4c4;};return _0x57f7();}import _0x462b85 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x39a9(_0x225ff5,_0x529f62){_0x225ff5=_0x225ff5-0x159;const _0x57f73c=_0x57f7();let _0x39a9a0=_0x57f73c[_0x225ff5];return _0x39a9a0;}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x21d844,_0xff6274={}){const _0x20e173=_0x39a9,_0x56e061={'kVfeI':function(_0xcb55e5,_0x53a1f9){return _0xcb55e5(_0x53a1f9);},'XOImR':_0x20e173(0x15a),'dcbde':_0x20e173(0x16a),'BaUmr':function(_0x48f7e4,_0x2b4a29,_0x33fee7){return _0x48f7e4(_0x2b4a29,_0x33fee7);}},_0x2c5e0b=await _0x56e061['kVfeI'](fetchCloudProfile,_0x21d844);if(!_0x2c5e0b)throw new Error(_0x20e173(0x168)+_0x21d844+_0x20e173(0x16d));if(!_0xff6274['yes']&&!isInteractive())throw new Error(_0x56e061[_0x20e173(0x16c)]);console['log'](_0x20e173(0x162)+_0x21d844+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0xff6274['yes']){const {confirmation:_0x45d1df}=await _0x462b85['prompt']([{'type':_0x56e061[_0x20e173(0x159)],'name':_0x20e173(0x163),'message':_0x20e173(0x167)+_0x21d844+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x45d1df!==_0x21d844)throw new Error(_0x20e173(0x16f));}await _0x56e061['kVfeI'](deleteCloudProfile,_0x21d844),_0x56e061[_0x20e173(0x15d)](resetProfileOverrides,process[_0x20e173(0x16b)](),_0x21d844),clearLastProfile(process['cwd'](),_0x21d844),console[_0x20e173(0x169)](_0x20e173(0x166)+_0x21d844+'\x22.');}
@@ -1 +1 @@
1
- const _0x416b38=_0x5ab7;(function(_0x3f4285,_0x3e8c31){const _0x2c9b46=_0x5ab7,_0x17812e=_0x3f4285();while(!![]){try{const _0x20b27b=parseInt(_0x2c9b46(0xb6))/0x1+parseInt(_0x2c9b46(0xc5))/0x2+-parseInt(_0x2c9b46(0xad))/0x3+parseInt(_0x2c9b46(0xc9))/0x4+-parseInt(_0x2c9b46(0xbf))/0x5*(-parseInt(_0x2c9b46(0xa6))/0x6)+-parseInt(_0x2c9b46(0xbd))/0x7+-parseInt(_0x2c9b46(0xb7))/0x8*(parseInt(_0x2c9b46(0xc4))/0x9);if(_0x20b27b===_0x3e8c31)break;else _0x17812e['push'](_0x17812e['shift']());}catch(_0x5892af){_0x17812e['push'](_0x17812e['shift']());}}}(_0x4e7e,0x4a061));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions','bug-bashes',_0x416b38(0xa4),_0x416b38(0xb1),'ci'];function _0x4e7e(){const _0x3da397=['266226ByzXMf','291304jqYPjk','tBZhR','gfWPo','AjnDN','\x0aNo\x20profiles\x20found.','cached\x20(updated\x20','2555868WnBhON','name','8285XCitYQ','\x20\x20\x20\x20','hgwKm','environmentDetails','.txt','9aSSTVw','928930TWVpkG','get','sessionUpdatedAt','vNAWN','1292940mmKQLB','Run:\x20ranger\x20profile\x20add\x20<profile-name>','environmentKey','\x0a*\x20=\x20active\x20profile','CEdlT','\x20\x20\x20\x20Session:\x20','has','error','reports','localeCompare','186mLbOSf','profiles','LwsVc','\x0a\x20\x20','sort','odbbD','OfyVr','1201665ePEdND','message','eLItN','push','local','includes','log','gerbS','length'];_0x4e7e=function(){return _0x3da397;};return _0x4e7e();}export function shouldGroupByEnvironment(_0x319bf3){const _0x2e707e=_0x416b38;return _0x319bf3['some'](_0x5dfaaf=>_0x5dfaaf[_0x2e707e(0x9e)]);}export function groupCloudProfilesByEnvironment(_0x573b00){const _0x2cb06c=_0x416b38,_0xd0f009=new Map();for(const _0x123919 of _0x573b00){const _0x4f466e=_0x123919['environmentKey']??null,_0x793d38=_0xd0f009['get'](_0x4f466e);if(_0x793d38)_0x793d38['push'](_0x123919);else _0xd0f009['set'](_0x4f466e,[_0x123919]);}const _0x5f5c5a=[..._0xd0f009['keys']()][_0x2cb06c(0xaa)]((_0x1a68d2,_0x5ebd82)=>{if(_0x1a68d2===null)return 0x1;if(_0x5ebd82===null)return-0x1;return _0x1a68d2['localeCompare'](_0x5ebd82);});return _0x5f5c5a['map'](_0x3e78ae=>({'environmentKey':_0x3e78ae,'profiles':_0xd0f009[_0x2cb06c(0xc6)](_0x3e78ae)['sort']((_0x4b3e56,_0x4c18f6)=>_0x4b3e56['name'][_0x2cb06c(0xa5)](_0x4c18f6[_0x2cb06c(0xbe)]))}));}function _0x5ab7(_0x1a2170,_0x2cf009){_0x1a2170=_0x1a2170-0x9d;const _0x4e7e92=_0x4e7e();let _0x5ab778=_0x4e7e92[_0x1a2170];return _0x5ab778;}export async function getEnvNames(){const _0x364b00=_0x416b38,_0x33af17={'gfWPo':function(_0x10e556,_0x2f07e4){return _0x10e556(_0x2f07e4);},'PeFLZ':function(_0x3dc843){return _0x3dc843();},'odbbD':function(_0x463c8b,_0x563ac3){return _0x463c8b(_0x563ac3);},'CwTsQ':'local','CEdlT':function(_0x5a11e1,_0x652f78,_0x3bd26f){return _0x5a11e1(_0x652f78,_0x3bd26f);},'vNAWN':function(_0x1f61db,_0xe19dd3){return _0x1f61db(_0xe19dd3);},'eLItN':function(_0x1ff143,_0x3cede6,_0x6dc50){return _0x1ff143(_0x3cede6,_0x6dc50);},'LwsVc':_0x364b00(0xc3),'fbjso':'settings.json'},_0x14ccc4=getRangerDir();if(!_0x33af17['gfWPo'](existsSync,_0x14ccc4))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x2dca24=await _0x33af17['PeFLZ'](readActiveProfileName),_0x2844a6=[],_0x59bbc5={},_0x49fc81=join(_0x14ccc4,_0x364b00(0xb1));if(existsSync(_0x49fc81)){const _0x524f77=await _0x33af17[_0x364b00(0xab)](readdir,_0x49fc81);for(const _0x49ebf9 of _0x524f77){const _0x381ef3=join(_0x49fc81,_0x49ebf9),_0x5078e3=await _0x33af17[_0x364b00(0xb9)](stat,_0x381ef3);_0x5078e3['isDirectory']()&&(_0x2844a6['push'](_0x49ebf9),_0x59bbc5[_0x49ebf9]=_0x33af17['CwTsQ']);}}const _0x291624=_0x33af17[_0x364b00(0xa0)](join,_0x14ccc4,'ci');if(existsSync(_0x291624)){const _0x4476fc=await _0x33af17[_0x364b00(0xc8)](readdir,_0x291624);for(const _0x2a0b53 of _0x4476fc){const _0x249ed9=_0x33af17[_0x364b00(0xaf)](join,_0x291624,_0x2a0b53),_0x24186c=await stat(_0x249ed9);_0x24186c['isDirectory']()&&(_0x2844a6[_0x364b00(0xb0)](_0x2a0b53),_0x59bbc5[_0x2a0b53]='ci');}}const _0xd777ae=await readdir(_0x14ccc4);for(const _0x50b59b of _0xd777ae){if(NON_ENV_DIRS[_0x364b00(0xb2)](_0x50b59b))continue;if(_0x50b59b['startsWith']('.'))continue;if(_0x50b59b['endsWith'](_0x33af17[_0x364b00(0xa8)]))continue;const _0x3c67bd=_0x33af17[_0x364b00(0xaf)](join,_0x14ccc4,_0x50b59b),_0x12fb87=await _0x33af17['odbbD'](stat,_0x3c67bd);_0x12fb87['isDirectory']()&&existsSync(_0x33af17[_0x364b00(0xa0)](join,_0x3c67bd,_0x33af17['fbjso']))&&(!_0x2844a6[_0x364b00(0xb2)](_0x50b59b)&&(_0x2844a6[_0x364b00(0xb0)](_0x50b59b),_0x59bbc5[_0x50b59b]='legacy'));}return{'envNames':_0x2844a6,'activeEnv':_0x2dca24,'envTypes':_0x59bbc5};}export async function envList(){const _0x56aa22=_0x416b38,_0x20d551={'dMdvg':function(_0x5e135b){return _0x5e135b();},'gerbS':function(_0x59afe0,_0x24f562){return _0x59afe0===_0x24f562;},'hgwKm':function(_0x156ec6,_0x191881){return _0x156ec6===_0x191881;},'AjnDN':_0x56aa22(0x9d),'hXsYD':function(_0x46f994,_0x3671e9){return _0x46f994>_0x3671e9;},'mMtRj':'\x0aLocal\x20Profiles\x20(legacy):','igKqU':_0x56aa22(0xb1),'MNkbi':'legacy','OfyVr':function(_0x4e6348,_0x50a647){return _0x4e6348>_0x50a647;},'IiuaF':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','tBZhR':function(_0x2a2fd6,_0x58ba2c,_0x15ebe7){return _0x2a2fd6(_0x58ba2c,_0x15ebe7);},'lrweu':_0x56aa22(0xc0)},{envNames:_0x178e92,activeEnv:_0x49a849,envTypes:_0x4c1420}=await _0x20d551['dMdvg'](getEnvNames);let _0x5db0e1=[];const _0x2f8740=await getToken();if(_0x2f8740)try{_0x5db0e1=await listCloudProfiles();}catch(_0x1f8638){console[_0x56aa22(0xa3)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x1f8638 instanceof Error?_0x1f8638[_0x56aa22(0xae)]:String(_0x1f8638)));}if(_0x20d551[_0x56aa22(0xb4)](_0x178e92[_0x56aa22(0xb5)],0x0)&&_0x20d551[_0x56aa22(0xc1)](_0x5db0e1[_0x56aa22(0xb5)],0x0)){console[_0x56aa22(0xb3)](_0x56aa22(0xbb)),console['log'](_0x20d551[_0x56aa22(0xba)]);return;}const _0x1dba54=new Set(_0x5db0e1['map'](_0x2366c1=>_0x2366c1[_0x56aa22(0xbe)]));if(_0x20d551['hXsYD'](_0x178e92['length'],0x0)){console['log'](_0x20d551['mMtRj']);for(const _0x425a4d of _0x178e92['sort']()){const _0x1559c4=_0x425a4d===_0x49a849&&!_0x1dba54[_0x56aa22(0xa2)](_0x425a4d),_0x269188=_0x4c1420[_0x425a4d]||_0x20d551['igKqU'],_0x55bf7b=await loadSettings(_0x425a4d),_0x57ba9e=_0x269188===_0x20d551['MNkbi']?'':'\x20['+_0x269188+']';console[_0x56aa22(0xb3)]('\x20\x20'+(_0x1559c4?'*\x20':'\x20\x20')+_0x425a4d+_0x57ba9e),_0x55bf7b['baseUrl']&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x55bf7b['baseUrl']),_0x55bf7b['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x55bf7b[_0x56aa22(0xc2)]);}}const _0x4d2384=(_0x542be7,_0x191403)=>{const _0x2c63ab=_0x56aa22,_0x3ca4bc=_0x542be7[_0x2c63ab(0xbe)]===_0x49a849,_0x1961f1=_0x542be7['sessionUpdatedAt']?_0x2c63ab(0xbc)+_0x542be7[_0x2c63ab(0xc7)]+')':'no\x20session';console['log'](''+_0x191403+(_0x3ca4bc?'*\x20':'\x20\x20')+_0x542be7[_0x2c63ab(0xbe)]),console['log'](_0x191403+_0x2c63ab(0xa1)+_0x1961f1);};if(_0x20d551[_0x56aa22(0xac)](_0x5db0e1[_0x56aa22(0xb5)],0x0)){if(shouldGroupByEnvironment(_0x5db0e1)){console[_0x56aa22(0xb3)]('\x0aCloud\x20Profiles\x20(by\x20environment):');for(const _0x563852 of groupCloudProfilesByEnvironment(_0x5db0e1)){const _0x4eab31=_0x563852['environmentKey']??_0x20d551['IiuaF'];console['log'](_0x56aa22(0xa9)+_0x4eab31);for(const _0x106a92 of _0x563852[_0x56aa22(0xa7)]){_0x20d551['tBZhR'](_0x4d2384,_0x106a92,_0x20d551['lrweu']);}}}else{console['log']('\x0aCloud\x20Profiles:');for(const _0x29bf85 of[..._0x5db0e1]['sort']((_0x47310b,_0x5a2554)=>_0x47310b[_0x56aa22(0xbe)]['localeCompare'](_0x5a2554['name']))){_0x20d551[_0x56aa22(0xb8)](_0x4d2384,_0x29bf85,'\x20\x20');}}}_0x49a849&&console['log'](_0x56aa22(0x9f));}
1
+ function _0x39cc(_0x162618,_0x15225a){_0x162618=_0x162618-0x10f;const _0x2295aa=_0x2295();let _0x39ccf6=_0x2295aa[_0x162618];return _0x39ccf6;}const _0x3b176e=_0x39cc;(function(_0x57ee4c,_0x474bab){const _0x13c5eb=_0x39cc,_0x21c2ec=_0x57ee4c();while(!![]){try{const _0x5576a7=parseInt(_0x13c5eb(0x147))/0x1*(-parseInt(_0x13c5eb(0x12f))/0x2)+parseInt(_0x13c5eb(0x13a))/0x3+-parseInt(_0x13c5eb(0x11e))/0x4*(parseInt(_0x13c5eb(0x135))/0x5)+parseInt(_0x13c5eb(0x13c))/0x6+parseInt(_0x13c5eb(0x116))/0x7+parseInt(_0x13c5eb(0x13b))/0x8*(parseInt(_0x13c5eb(0x126))/0x9)+-parseInt(_0x13c5eb(0x146))/0xa;if(_0x5576a7===_0x474bab)break;else _0x21c2ec['push'](_0x21c2ec['shift']());}catch(_0x2e419d){_0x21c2ec['push'](_0x21c2ec['shift']());}}}(_0x2295,0xcd3b7));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{fetchAuthConfig,fetchCloudProfile,listCloudProfiles}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{readProfileOverrides}from'./utils/projectsConfig.js';import{resolveProfileUrl}from'./utils/resolveProfileUrl.js';function _0x2295(){const _0x24726a=['profiles','OlDLn','8726fnglbd','\x0a\x20\x20','GDfOc','keys','cached\x20(updated\x20','environmentKey','2629135SHJXYx','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profile\x20\x22','CBMyO','endsWith','sort','3652260NPMBxY','251192YXhKrP','5125512udMSYC','Run:\x20ranger\x20profile\x20add\x20<profile-name>','get','length','environmentDetails','includes','localeCompare','QudvO','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','\x20\x20\x20\x20\x20\x20URL:\x20','14699040qIUGSy','29zUQvpj','hSBnI','ZqOhW','map','qQqeL','has','(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','DbtgT','baseUrlSource','all','name','gyyWM','GJyJw','isDirectory','\x0aCloud\x20Profiles:','WVBVN','HJMpy','legacy','4040589gDnUhp','log','.txt','set','authConfig','sessionUpdatedAt','\x22:\x20','message','4vebVQr','some','\x20\x20\x20\x20\x20\x20Details:\x20','cwd','ZhZmf','qVyso','baseUrl','local','90pxTcYR','PhzWi','jqTxW','bTsvl','push','lqezj','startsWith'];_0x2295=function(){return _0x24726a;};return _0x2295();}import{resolveEnvVars}from'./utils/settings.js';const NON_ENV_DIRS=['sessions','bug-bashes','reports',_0x3b176e(0x125),'ci'];export function shouldGroupByEnvironment(_0xd3a36f){const _0x10f939=_0x3b176e;return _0xd3a36f[_0x10f939(0x11f)](_0x1ce768=>_0x1ce768['environmentKey']);}export function groupCloudProfilesByEnvironment(_0xa9050c){const _0x1581ce=_0x3b176e,_0x385e80={'aUGyH':function(_0x123d6b,_0x1b6065){return _0x123d6b===_0x1b6065;}},_0x1f75f4=new Map();for(const _0xe5aee8 of _0xa9050c){const _0x363fa7=_0xe5aee8[_0x1581ce(0x134)]??null,_0x438287=_0x1f75f4[_0x1581ce(0x13e)](_0x363fa7);if(_0x438287)_0x438287[_0x1581ce(0x12a)](_0xe5aee8);else _0x1f75f4['set'](_0x363fa7,[_0xe5aee8]);}const _0x434a6f=[..._0x1f75f4[_0x1581ce(0x132)]()][_0x1581ce(0x139)]((_0x5e124a,_0x4f99d3)=>{const _0x504034=_0x1581ce;if(_0x385e80['aUGyH'](_0x5e124a,null))return 0x1;if(_0x4f99d3===null)return-0x1;return _0x5e124a[_0x504034(0x142)](_0x4f99d3);});return _0x434a6f[_0x1581ce(0x14a)](_0x11dfa=>({'environmentKey':_0x11dfa,'profiles':_0x1f75f4[_0x1581ce(0x13e)](_0x11dfa)['sort']((_0x251e32,_0x307316)=>_0x251e32['name'][_0x1581ce(0x142)](_0x307316['name']))}));}function expandString(_0x45cb8d){const _0x26215f=_0x3b176e,_0x124bbd={'GDfOc':function(_0x36b79b,_0x11455d){return _0x36b79b(_0x11455d);}};if(!_0x45cb8d)return undefined;return _0x124bbd[_0x26215f(0x131)](resolveEnvVars,_0x45cb8d);}function expandProfileOverrides(_0x111bf3){const _0x1fc80e=_0x3b176e,_0x200c27={'QudvO':function(_0x22b3be,_0x1cb648){return _0x22b3be(_0x1cb648);}};if(!_0x111bf3)return null;return{..._0x111bf3,'baseUrl':expandString(_0x111bf3[_0x1fc80e(0x124)]),'startPath':_0x200c27[_0x1fc80e(0x143)](expandString,_0x111bf3['startPath'])};}export function resolveCloudProfileListUrl(_0x2dbe43,_0x1c6516={}){const _0x58e25b=_0x3b176e,_0x4ee4f9={'bTyFu':function(_0x3233a1,_0xa2b63e){return _0x3233a1(_0xa2b63e);},'ttpwo':function(_0x1b520d,_0x291d57){return _0x1b520d(_0x291d57);},'ujZEK':function(_0xd77fd8,_0x519077){return _0xd77fd8(_0x519077);}},_0x418fd5=_0x2dbe43['settings']??{},_0x105c44=_0x1c6516[_0x58e25b(0x11a)]?resolveAuthEnvironmentLocally(_0x1c6516['authConfig'],_0x2dbe43['environmentKey']):null,_0x500fd0=_0x4ee4f9['bTyFu'](resolveProfileUrl,{'projectOverrides':_0x4ee4f9['ttpwo'](expandProfileOverrides,_0x1c6516['projectOverrides']??null),'cloudSettings':{'baseUrl':_0x4ee4f9['ujZEK'](expandString,_0x418fd5[_0x58e25b(0x124)]),'startPath':expandString(_0x418fd5['startPath'])},'authEnvironmentDomain':_0x105c44?.['domains']?.[0x0]});return{'baseUrl':_0x500fd0[_0x58e25b(0x124)],'source':_0x500fd0[_0x58e25b(0x14f)]};}async function loadCloudProfileListUrls(_0x1ffaa6){const _0x418dca=_0x3b176e,_0x3fd970={'OlDLn':function(_0x44a323,_0x4a9bc4){return _0x44a323(_0x4a9bc4);},'lqezj':function(_0x3f5492,_0x259721,_0xc5f5e4){return _0x3f5492(_0x259721,_0xc5f5e4);},'LbDok':function(_0x2f0be5,_0xdf6b76,_0x498250){return _0x2f0be5(_0xdf6b76,_0x498250);},'PhzWi':function(_0x298e55,_0x33aa8b){return _0x298e55===_0x33aa8b;}},_0x2285cc=new Map();if(_0x3fd970[_0x418dca(0x127)](_0x1ffaa6['length'],0x0))return _0x2285cc;const _0x45a400=await fetchAuthConfig();return await Promise[_0x418dca(0x150)](_0x1ffaa6['map'](async _0x1479d0=>{const _0x405951=_0x418dca;try{const _0x528349=await _0x3fd970[_0x405951(0x12e)](fetchCloudProfile,_0x1479d0['name']);if(!_0x528349)return;_0x2285cc[_0x405951(0x119)](_0x1479d0[_0x405951(0x151)],_0x3fd970[_0x405951(0x12b)](resolveCloudProfileListUrl,_0x528349,{'authConfig':_0x45a400,'projectOverrides':_0x3fd970['LbDok'](readProfileOverrides,process['cwd'](),_0x1479d0['name'])}));}catch(_0x4d84ad){console['error'](_0x405951(0x136)+_0x1479d0['name']+_0x405951(0x11c)+(_0x4d84ad instanceof Error?_0x4d84ad[_0x405951(0x11d)]:String(_0x4d84ad)));}})),_0x2285cc;}export async function getEnvNames(){const _0x34ff0b=_0x3b176e,_0xedc8d9={'UpLqZ':_0x34ff0b(0x125),'HJMpy':function(_0x3a991b,_0x1b3ede){return _0x3a991b(_0x1b3ede);},'fogoM':function(_0x1ad873,_0x3010fb){return _0x1ad873(_0x3010fb);},'ZJSxa':function(_0x1dff7c,_0x2599d9,_0x23152c){return _0x1dff7c(_0x2599d9,_0x23152c);},'tDrYH':function(_0x26d1df,_0x34bf5c){return _0x26d1df(_0x34bf5c);},'bEMWp':function(_0x4568b8,_0x5ec8f0){return _0x4568b8(_0x5ec8f0);},'GJyJw':_0x34ff0b(0x118),'ZqOhW':function(_0x595973,_0x54095f,_0xba7de9){return _0x595973(_0x54095f,_0xba7de9);}},_0x3cba29=getRangerDir();if(!existsSync(_0x3cba29))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x15a12f=await readActiveProfileName(),_0x1ec509=[],_0x3f55d3={},_0x57f5c3=join(_0x3cba29,_0xedc8d9['UpLqZ']);if(existsSync(_0x57f5c3)){const _0x308b6b=await _0xedc8d9[_0x34ff0b(0x114)](readdir,_0x57f5c3);for(const _0x31cc50 of _0x308b6b){const _0x59a3ac=join(_0x57f5c3,_0x31cc50),_0x463d0b=await _0xedc8d9['fogoM'](stat,_0x59a3ac);_0x463d0b[_0x34ff0b(0x111)]()&&(_0x1ec509[_0x34ff0b(0x12a)](_0x31cc50),_0x3f55d3[_0x31cc50]=_0x34ff0b(0x125));}}const _0x4f3e03=_0xedc8d9['ZJSxa'](join,_0x3cba29,'ci');if(_0xedc8d9['tDrYH'](existsSync,_0x4f3e03)){const _0x1c53da=await _0xedc8d9['bEMWp'](readdir,_0x4f3e03);for(const _0x581aae of _0x1c53da){const _0x565794=join(_0x4f3e03,_0x581aae),_0x1f81e8=await _0xedc8d9['tDrYH'](stat,_0x565794);_0x1f81e8[_0x34ff0b(0x111)]()&&(_0x1ec509[_0x34ff0b(0x12a)](_0x581aae),_0x3f55d3[_0x581aae]='ci');}}const _0x5bcefc=await readdir(_0x3cba29);for(const _0x4b021b of _0x5bcefc){if(NON_ENV_DIRS['includes'](_0x4b021b))continue;if(_0x4b021b[_0x34ff0b(0x12c)]('.'))continue;if(_0x4b021b[_0x34ff0b(0x138)](_0xedc8d9[_0x34ff0b(0x110)]))continue;const _0x164d32=join(_0x3cba29,_0x4b021b),_0xd4cbf3=await stat(_0x164d32);_0xd4cbf3['isDirectory']()&&existsSync(_0xedc8d9[_0x34ff0b(0x149)](join,_0x164d32,'settings.json'))&&(!_0x1ec509[_0x34ff0b(0x141)](_0x4b021b)&&(_0x1ec509[_0x34ff0b(0x12a)](_0x4b021b),_0x3f55d3[_0x4b021b]='legacy'));}return{'envNames':_0x1ec509,'activeEnv':_0x15a12f,'envTypes':_0x3f55d3};}export async function envList(){const _0x4ca39f=_0x3b176e,_0xe7b2f9={'qQqeL':'no\x20session','bzcOI':function(_0x136551){return _0x136551();},'qVyso':function(_0x5a9cfa){return _0x5a9cfa();},'CBMyO':function(_0x4d3c78,_0x18d6db){return _0x4d3c78 instanceof _0x18d6db;},'ZhZmf':function(_0x843be7,_0x3c754c){return _0x843be7===_0x3c754c;},'fStkr':'\x0aNo\x20profiles\x20found.','OLEdz':_0x4ca39f(0x13d),'jqTxW':function(_0x49ee8f,_0x2fd329){return _0x49ee8f(_0x2fd329);},'VpfQw':function(_0x57bcce,_0x9be456){return _0x57bcce(_0x9be456);},'gyyWM':function(_0x5a5898,_0x4092aa,_0x27da01){return _0x5a5898(_0x4092aa,_0x27da01);},'fofnI':function(_0x439955,_0x42c05d){return _0x439955===_0x42c05d;},'FanZh':function(_0x4d64ed,_0x3327a5){return _0x4d64ed>_0x3327a5;},'vDElX':function(_0xd36163,_0x393d53){return _0xd36163(_0x393d53);},'hSBnI':function(_0x3d37e3,_0xa9cc87){return _0x3d37e3(_0xa9cc87);},'bTsvl':_0x4ca39f(0x14d),'DbtgT':function(_0x1dc20b,_0x2b6528,_0x54c683){return _0x1dc20b(_0x2b6528,_0x54c683);},'qyPCK':'\x20\x20\x20\x20','WVBVN':_0x4ca39f(0x112)},{envNames:_0x32415a,activeEnv:_0x27e231,envTypes:_0x1cd532}=await getEnvNames();let _0x4541a2=[],_0x1ddd4e=new Map();const _0x210d1f=await _0xe7b2f9['bzcOI'](getToken);if(_0x210d1f)try{_0x4541a2=await _0xe7b2f9[_0x4ca39f(0x123)](listCloudProfiles),_0x1ddd4e=await loadCloudProfileListUrls(_0x4541a2);}catch(_0x40b464){console['error'](_0x4ca39f(0x144)+(_0xe7b2f9[_0x4ca39f(0x137)](_0x40b464,Error)?_0x40b464['message']:String(_0x40b464)));}if(_0x32415a[_0x4ca39f(0x13f)]===0x0&&_0xe7b2f9['ZhZmf'](_0x4541a2['length'],0x0)){console['log'](_0xe7b2f9['fStkr']),console[_0x4ca39f(0x117)](_0xe7b2f9['OLEdz']);return;}const _0x2aed63=new Set(_0x4541a2['map'](_0x331169=>_0x331169[_0x4ca39f(0x151)]));if(_0x32415a[_0x4ca39f(0x13f)]>0x0){console[_0x4ca39f(0x117)]('\x0aLocal\x20Profiles\x20(legacy):');for(const _0x55e9af of _0x32415a[_0x4ca39f(0x139)]()){const _0x1ae10e=_0xe7b2f9[_0x4ca39f(0x122)](_0x55e9af,_0x27e231)&&!_0x2aed63[_0x4ca39f(0x14c)](_0x55e9af),_0x8d85f4=_0x1cd532[_0x55e9af]||_0x4ca39f(0x125),_0x1df4fa=await _0xe7b2f9[_0x4ca39f(0x128)](loadSettings,_0x55e9af),_0x2a8757=_0xe7b2f9['VpfQw'](resolveProfileUrl,{'localSettingsBaseUrl':expandString(_0x1df4fa['baseUrl']),'projectOverrides':expandProfileOverrides(_0xe7b2f9[_0x4ca39f(0x10f)](readProfileOverrides,process[_0x4ca39f(0x121)](),_0x55e9af))}),_0x2e1a63=_0xe7b2f9['fofnI'](_0x8d85f4,_0x4ca39f(0x115))?'':'\x20['+_0x8d85f4+']';console[_0x4ca39f(0x117)]('\x20\x20'+(_0x1ae10e?'*\x20':'\x20\x20')+_0x55e9af+_0x2e1a63),_0x2a8757['baseUrl']&&console['log'](_0x4ca39f(0x145)+_0x2a8757[_0x4ca39f(0x124)]),_0x1df4fa[_0x4ca39f(0x140)]&&console['log'](_0x4ca39f(0x120)+_0x1df4fa['environmentDetails']);}}const _0x143e45=(_0x4e8b7d,_0x2e1baa)=>{const _0x41c128=_0x4ca39f,_0x3f2150=_0x4e8b7d['name']===_0x27e231,_0xdb6a61=_0x4e8b7d[_0x41c128(0x11b)]?_0x41c128(0x133)+_0x4e8b7d[_0x41c128(0x11b)]+')':_0xe7b2f9[_0x41c128(0x14b)],_0x42f6f0=_0x1ddd4e[_0x41c128(0x13e)](_0x4e8b7d['name']);console[_0x41c128(0x117)](''+_0x2e1baa+(_0x3f2150?'*\x20':'\x20\x20')+_0x4e8b7d[_0x41c128(0x151)]),_0x42f6f0?.[_0x41c128(0x124)]&&console['log'](_0x2e1baa+'\x20\x20\x20\x20URL:\x20'+_0x42f6f0[_0x41c128(0x124)]),console[_0x41c128(0x117)](_0x2e1baa+'\x20\x20\x20\x20Session:\x20'+_0xdb6a61);};if(_0xe7b2f9['FanZh'](_0x4541a2['length'],0x0)){if(_0xe7b2f9['vDElX'](shouldGroupByEnvironment,_0x4541a2)){console['log']('\x0aCloud\x20Profiles\x20(by\x20environment):');for(const _0x3e04af of _0xe7b2f9[_0x4ca39f(0x148)](groupCloudProfilesByEnvironment,_0x4541a2)){const _0x30f3cc=_0x3e04af['environmentKey']??_0xe7b2f9[_0x4ca39f(0x129)];console['log'](_0x4ca39f(0x130)+_0x30f3cc);for(const _0x139029 of _0x3e04af[_0x4ca39f(0x12d)]){_0xe7b2f9[_0x4ca39f(0x14e)](_0x143e45,_0x139029,_0xe7b2f9['qyPCK']);}}}else{console['log'](_0xe7b2f9[_0x4ca39f(0x113)]);for(const _0x58569d of[..._0x4541a2]['sort']((_0x4125d0,_0x3c9198)=>_0x4125d0['name'][_0x4ca39f(0x142)](_0x3c9198[_0x4ca39f(0x151)]))){_0x143e45(_0x58569d,'\x20\x20');}}}_0x27e231&&console['log']('\x0a*\x20=\x20active\x20profile');}