@ranger-testing/ranger-cli 2.5.4-alpha.8c24bb2-15 โ†’ 2.5.4-alpha.9360c2a-16

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 (78) 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/env.js +1 -1
  7. package/build/commands/feature.js +1 -1
  8. package/build/commands/hook.js +1 -1
  9. package/build/commands/hooks/autoPrompt.js +1 -1
  10. package/build/commands/hooks/disable.js +1 -1
  11. package/build/commands/hooks/enable.js +1 -1
  12. package/build/commands/hooks/exitPlanMode.js +1 -1
  13. package/build/commands/hooks/index.js +1 -1
  14. package/build/commands/hooks/output.js +1 -1
  15. package/build/commands/hooks/planReminder.js +1 -1
  16. package/build/commands/hooks/planStart.js +1 -1
  17. package/build/commands/hooks/postEdit.js +1 -1
  18. package/build/commands/hooks/preCompact.js +1 -1
  19. package/build/commands/hooks/sessionEnd.js +1 -1
  20. package/build/commands/hooks/sessionStart.js +1 -1
  21. package/build/commands/hooks/stopHook.js +1 -1
  22. package/build/commands/index.js +1 -1
  23. package/build/commands/login.js +1 -1
  24. package/build/commands/mcpBootstrap.js +1 -1
  25. package/build/commands/migrateProfile.js +1 -1
  26. package/build/commands/setup/claude.js +1 -1
  27. package/build/commands/setup/opencode.js +1 -1
  28. package/build/commands/setupCi.js +1 -1
  29. package/build/commands/skillup.js +1 -1
  30. package/build/commands/start.js +1 -1
  31. package/build/commands/status.js +1 -1
  32. package/build/commands/update.js +1 -1
  33. package/build/commands/updateEnv.js +1 -1
  34. package/build/commands/useEnv.js +1 -1
  35. package/build/commands/utils/activeProfile.js +1 -1
  36. package/build/commands/utils/agentEnv.js +1 -1
  37. package/build/commands/utils/browserSessionsApi.js +1 -1
  38. package/build/commands/utils/claudeConfig.js +1 -1
  39. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  40. package/build/commands/utils/claudePlugin.js +1 -1
  41. package/build/commands/utils/cloudProfile.js +1 -1
  42. package/build/commands/utils/cloudProfileSession.js +1 -1
  43. package/build/commands/utils/crypto.js +1 -1
  44. package/build/commands/utils/desirePathLog.js +1 -1
  45. package/build/commands/utils/deviceAuth.js +1 -1
  46. package/build/commands/utils/environment.js +1 -1
  47. package/build/commands/utils/featureApi.js +1 -1
  48. package/build/commands/utils/fixWebmDuration.js +1 -1
  49. package/build/commands/utils/gitTracked.js +1 -1
  50. package/build/commands/utils/keychain.js +1 -1
  51. package/build/commands/utils/legacyWarning.js +1 -1
  52. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  53. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  54. package/build/commands/utils/mcpImageBase64.js +1 -1
  55. package/build/commands/utils/model.js +1 -1
  56. package/build/commands/utils/opencodeConfig.js +1 -1
  57. package/build/commands/utils/playwrightCli.js +1 -1
  58. package/build/commands/utils/profileMessages.js +1 -1
  59. package/build/commands/utils/profileSetupBanner.js +1 -1
  60. package/build/commands/utils/projectsConfig.js +1 -1
  61. package/build/commands/utils/rangerConfig.js +1 -1
  62. package/build/commands/utils/rangerRoot.js +1 -1
  63. package/build/commands/utils/resolveProfileContext.js +1 -1
  64. package/build/commands/utils/resolveProfileUrl.js +1 -1
  65. package/build/commands/utils/retry.js +1 -1
  66. package/build/commands/utils/sessionCache.js +1 -1
  67. package/build/commands/utils/settings.js +1 -1
  68. package/build/commands/utils/skillContent.js +1 -1
  69. package/build/commands/utils/skills.js +1 -1
  70. package/build/commands/utils/stitchWebmFiles.js +1 -1
  71. package/build/commands/utils/telemetry.js +1 -1
  72. package/build/commands/utils/tokenRefresh.js +1 -1
  73. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  74. package/build/commands/utils/userApi.js +1 -1
  75. package/build/commands/utils/version.js +1 -1
  76. package/build/commands/verifyFeature.js +1 -1
  77. package/build/commands/verifyFeatureCli.js +1 -1
  78. package/package.json +3 -2
@@ -1 +1 @@
1
- (function(_0x57cb46,_0x1779b2){const _0x5cbb64=_0x1ccb,_0x39dfe5=_0x57cb46();while(!![]){try{const _0x226840=-parseInt(_0x5cbb64(0xe8))/0x1+parseInt(_0x5cbb64(0xb1))/0x2+-parseInt(_0x5cbb64(0x90))/0x3+parseInt(_0x5cbb64(0xa7))/0x4*(-parseInt(_0x5cbb64(0xfc))/0x5)+-parseInt(_0x5cbb64(0x113))/0x6*(parseInt(_0x5cbb64(0xbb))/0x7)+parseInt(_0x5cbb64(0x92))/0x8*(parseInt(_0x5cbb64(0xc3))/0x9)+parseInt(_0x5cbb64(0x104))/0xa;if(_0x226840===_0x1779b2)break;else _0x39dfe5['push'](_0x39dfe5['shift']());}catch(_0x24c1e0){_0x39dfe5['push'](_0x39dfe5['shift']());}}}(_0x2219,0xe2feb));import{readdir,rm}from'fs/promises';function _0x1ccb(_0x3f4d15,_0xb0fae2){_0x3f4d15=_0x3f4d15-0x86;const _0x2219d7=_0x2219();let _0x1ccbb7=_0x2219d7[_0x3f4d15];return _0x1ccbb7;}import{join}from'path';import{existsSync}from'fs';import _0x2dcd12 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';async function checkUrlReachability(_0x2e9668){const _0x2a4155=_0x1ccb,_0x11ef35={'txMRn':function(_0x31ccd9,_0xf7a979,_0x408367){return _0x31ccd9(_0xf7a979,_0x408367);},'axsfL':_0x2a4155(0x94),'ZDlLU':function(_0x56a192,_0x1022a8,_0x2080a4){return _0x56a192(_0x1022a8,_0x2080a4);},'UUNiW':function(_0x52e36,_0x34b9dd){return _0x52e36(_0x34b9dd);},'iAEex':_0x2a4155(0xbe),'KlFOH':'TypeError','csBgQ':_0x2a4155(0x8f)};try{const _0x212e5b=new AbortController(),_0x1c4d32=_0x11ef35[_0x2a4155(0x8e)](setTimeout,()=>_0x212e5b['abort'](),0x1388),_0x2eb8df={'method':_0x11ef35[_0x2a4155(0xf3)],'signal':_0x212e5b[_0x2a4155(0x96)],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i[_0x2a4155(0x9b)](_0x2e9668)&&(process['env'][_0x2a4155(0x111)]='0');const _0x340361=await _0x11ef35['ZDlLU'](fetch,_0x2e9668,_0x2eb8df);delete process[_0x2a4155(0xc7)]['NODE_TLS_REJECT_UNAUTHORIZED'],_0x11ef35['UUNiW'](clearTimeout,_0x1c4d32);if(_0x340361[_0x2a4155(0xd2)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0x2a4155(0xf6)+_0x340361[_0x2a4155(0xd2)]};}catch(_0x3604d8){delete process['env'][_0x2a4155(0x111)];const _0x2eb70c=_0x3604d8,_0x25d5dd=_0x2eb70c[_0x2a4155(0x88)]||_0x11ef35['UUNiW'](String,_0x3604d8),_0x1bc596=_0x25d5dd['includes'](_0x11ef35[_0x2a4155(0xde)])||_0x2eb70c['name']===_0x11ef35[_0x2a4155(0x8a)]||_0x25d5dd['includes'](_0x11ef35['csBgQ']);return{'ok':![],'error':_0x25d5dd,'isProtocolError':_0x1bc596};}}async function sweepOrphanLocalProfile(_0x5e5b82,_0xeabd0d,_0x1cbfc7){const _0x140367=_0x1ccb,_0x185369={'SoFXM':function(_0x10b09d,_0x1d374c,_0x290600){return _0x10b09d(_0x1d374c,_0x290600);},'hCjgR':function(_0x538460,_0x5e7b3a){return _0x538460(_0x5e7b3a);},'qgEKO':function(_0xb5b0c7,_0xd18ccc){return _0xb5b0c7(_0xd18ccc);},'pFxmR':function(_0x174c83,_0xc313b5,_0x1a0379){return _0x174c83(_0xc313b5,_0x1a0379);}},_0x4b5944=join(_0xeabd0d,'local'),_0x3e8b50=_0x185369[_0x140367(0xc9)](join,_0x4b5944,_0x5e5b82);_0x185369['hCjgR'](existsSync,_0x3e8b50)&&(_0x1cbfc7&&await isPathGitTracked(_0x3e8b50)?console['log'](_0x140367(0x8c)+_0x3e8b50+_0x140367(0x107)):(await rm(_0x3e8b50,{'recursive':!![],'force':!![]}),console[_0x140367(0x10f)](_0x140367(0xf4)+_0x3e8b50)));if(_0x185369['hCjgR'](existsSync,_0x4b5944)){let _0x89aa95=[];try{_0x89aa95=await _0x185369['qgEKO'](readdir,_0x4b5944);}catch{return;}const _0x23a033=_0x140367(0xb2)+_0x5e5b82+'-';for(const _0x407ac1 of _0x89aa95){if(!_0x407ac1['startsWith'](_0x23a033))continue;const _0x31ba5f=join(_0x4b5944,_0x407ac1);await _0x185369[_0x140367(0xeb)](rm,_0x31ba5f,{'recursive':!![],'force':!![]}),console['log'](_0x140367(0xf4)+_0x31ba5f);}}}async function sweepOrphansBestEffort(_0x440035){const _0xc56261=_0x1ccb,_0x217fb6={'hrKWm':function(_0x46d4d6){return _0x46d4d6();},'HvCFR':function(_0x553ae9,_0x53b556){return _0x553ae9!==_0x53b556;},'ZnBII':function(_0x426c61,_0x5826f2,_0x533f72,_0x2934bf){return _0x426c61(_0x5826f2,_0x533f72,_0x2934bf);},'sXZUY':function(_0x282eff,_0x5b8dc1){return _0x282eff(_0x5b8dc1);}};try{await sweepOrphanLocalProfile(_0x440035,_0x217fb6[_0xc56261(0xa5)](getRangerHomeDir),![]);const _0x142d42=getRangerDir();_0x217fb6[_0xc56261(0xa3)](_0x142d42,getRangerHomeDir())&&await _0x217fb6['ZnBII'](sweepOrphanLocalProfile,_0x440035,_0x142d42,!![]);}catch(_0x138f89){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x138f89 instanceof Error?_0x138f89[_0xc56261(0x88)]:_0x217fb6['sXZUY'](String,_0x138f89))+').');}}function _0x2219(){const _0x2d9354=['NODE_TLS_REJECT_UNAUTHORIZED','qEsLf','6lMjugY','kclsx','Continue\x20anyway','dLzxO','message','wzYau','KlFOH','\x27\x20to\x20the\x20cloud?','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','Invalid\x20--setup-header\x20format:\x20\x22','txMRn','fetch\x20failed','2728770xuwigC','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','16blepca','JaZwt','HEAD','profile.add.autoRouted','signal','FePJk','PQuEB','\x20\x20Did\x20you\x20mean\x20','Xgeql','test','What\x20would\x20you\x20like\x20to\x20do?','xrCQW','url','TwaaD','gKzkh','\x20--url\x20','kkoed','HvCFR','keys','hrKWm','\x20\x20Set\x20active\x20profile:\x20','4ccNraG','some','\x27\x20matching\x20','ZfHFa','setupHeader','kBUVw','xrBCT','length',')\x0a\x20\x20Save\x20\x27','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','1480024FaajiJ','.tmp-','\x0a\x20\x20Could\x20not\x20reach\x20','bnsnM','MgsgD','jHgTj','join','โš \x20Could\x20not\x20reach\x20','sHMnE','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','7350427YnHeDf','wtSaj','jvnDh','Invalid\x20URL','http://localhost:3000','yarPX','QTDMC','EYenb','1956807zxjItH','\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22','list','XcqtM','env','no_auth_config','SoFXM','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','exit','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','MBqnO','Ibpju','\x20(continuing\x20with\x20--force)','input','environments','status','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','Could\x20not\x20reach\x20','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','OuabX','imANl','yes','\x20\x20Next:\x20set\x20RANGER_TEST_USERNAME\x20/\x20RANGER_TEST_PASSWORD\x20and\x20run\x0a','bpbfQ','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','capture','iAEex','โœ“\x20Cloud\x20profile\x20\x27','\x20\x20\x20\x20\x20\x20\x20\x20`ranger\x20go\x20--profile\x20','YCyOG','Enter\x20a\x20different\x20URL','isElectron','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','profile.add.autoRouteSkipped','confirm','ePeOx','96128weuRni','setupHeaders','baseUrl','pFxmR','ayCTd','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','lJnxI','gUehO','DkwVS','retry','axsfL','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','trackPhaseEnd','HTTP\x20','error','nZdzE','krgql','use_suggestion','no_match','5243545yvivPo','\x0a๐ŸŒ\x20Profile\x20Setup\x0a','cwd','skipAuth','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','continue','yQAEn','trim','28594010ENlQoD','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','origin','\x20โ€”\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','force','\x27\x20created\x20(CDP).','aGFoN','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','cdpEndpoint','\x22:\x20','log','isTTY'];_0x2219=function(){return _0x2d9354;};return _0x2219();}async function markActive(_0x250ec2){const _0x184ba5=_0x1ccb,_0x2a0e0d={'dLzxO':function(_0x30b422,_0x170d77){return _0x30b422(_0x170d77);},'Ztueq':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await _0x2a0e0d[_0x184ba5(0x87)](writeActiveProfileName,_0x250ec2),console[_0x184ba5(0x10f)](_0x184ba5(0xa6)+_0x250ec2);}catch{console['log'](_0x2a0e0d['Ztueq']);}}async function tryAutoRouteCloudProfile(_0x447e81,_0x5878c9,_0x38354b,_0x5b3ef5,_0x368810){const _0x1920b3=_0x1ccb,_0x33210f={'sHMnE':function(_0x1f6e0c,_0x4ebbe8){return _0x1f6e0c===_0x4ebbe8;},'FePJk':_0x1920b3(0xc8),'Xgeql':function(_0x3f159e,_0x3fd1c1){return _0x3f159e instanceof _0x3fd1c1;},'yarPX':function(_0x246f33,_0x56d696){return _0x246f33(_0x56d696);},'aGFoN':function(_0x2d93e9,_0x161fb4){return _0x2d93e9===_0x161fb4;},'qEsLf':function(_0x32a397,_0x1ab38c,_0x5b74b6,_0x42ff68,_0x48c06c){return _0x32a397(_0x1ab38c,_0x5b74b6,_0x42ff68,_0x48c06c);},'krgql':function(_0x47ede0,_0x104a5c){return _0x47ede0+_0x104a5c;},'THoUJ':function(_0x296fec,_0x1041a7){return _0x296fec+_0x1041a7;},'yQAEn':'\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','MgsgD':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','jvnDh':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','JaZwt':_0x1920b3(0xfb),'TnWJD':'confirm','EYenb':'profile.add.autoRouteSkipped','DJpIi':_0x1920b3(0xd5),'ayCTd':function(_0x5bc77f,_0x46337d,_0x51345e,_0x45dea3){return _0x5bc77f(_0x46337d,_0x51345e,_0x45dea3);},'QTDMC':_0x1920b3(0x95)};let _0x128996;try{_0x128996=await fetchAuthConfig();}catch(_0x33322f){return _0x368810?.[_0x1920b3(0xf5)](_0x1920b3(0xe5),{'reason':_0x33210f[_0x1920b3(0x97)],'profileName':_0x447e81}),console['error'](_0x1920b3(0xdb)+(_0x33210f[_0x1920b3(0x9a)](_0x33322f,Error)?_0x33322f[_0x1920b3(0x88)]:_0x33210f[_0x1920b3(0xc0)](String,_0x33322f))),![];}if(!_0x128996||!_0x128996[_0x1920b3(0xd1)]||_0x33210f[_0x1920b3(0x10a)](Object['keys'](_0x128996['environments'])[_0x1920b3(0xae)],0x0)){if(_0x5b3ef5)return await _0x33210f[_0x1920b3(0x112)](captureEnvLessProfile,_0x447e81,_0x5878c9,_0x38354b,_0x368810);return _0x368810?.[_0x1920b3(0xf5)](_0x1920b3(0xe5),{'reason':_0x1920b3(0xc8),'profileName':_0x447e81}),console['error'](_0x33210f['krgql'](_0x33210f['THoUJ'](_0x33210f[_0x1920b3(0xf9)](_0x33210f[_0x1920b3(0x102)],'\x0a')+_0x33210f[_0x1920b3(0xb5)],'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x447e81+_0x1920b3(0xa1)+_0x5878c9+'\x20--skip-auth\x0a')+'\x0a'+_0x1920b3(0xba),_0x33210f[_0x1920b3(0xbd)])),![];}const _0x516b82=matchAuthEnvironment(_0x5878c9,_0x128996);if(!_0x516b82)return _0x368810?.[_0x1920b3(0xf5)](_0x1920b3(0xe5),{'reason':_0x33210f[_0x1920b3(0x93)],'profileName':_0x447e81}),console[_0x1920b3(0xf7)](_0x1920b3(0xdc)+_0x5878c9+'.\x20Configured\x20envs:\x20'+Object[_0x1920b3(0xa4)](_0x128996['environments'])[_0x1920b3(0xb7)](',\x20')+'.'),![];const _0x4551c1=_0x128996['environments'][_0x516b82],_0x4182ad=_0x4551c1?.['domains']??[];if(_0x5b3ef5&&!_0x38354b[_0x1920b3(0xd8)]){const {saveToCloud:_0x29a338}=await _0x2dcd12['prompt']([{'type':_0x33210f['TnWJD'],'name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x516b82+_0x1920b3(0xa9)+_0x5878c9+'\x0a\x20\x20(domains:\x20'+_0x4182ad[_0x1920b3(0xb7)](',\x20')+_0x1920b3(0xaf)+_0x447e81+_0x1920b3(0x8b),'default':!![]}]);if(!_0x29a338)return _0x368810?.[_0x1920b3(0xf5)](_0x33210f[_0x1920b3(0xc2)],{'reason':'user_declined','profileName':_0x447e81}),console['error'](_0x33210f['DJpIi']),![];}const _0x4c4f29=_0x4182ad[_0x1920b3(0xa8)](_0x409d86=>{const _0x53434d=_0x1920b3;try{return _0x33210f[_0x53434d(0xb9)](new URL(_0x409d86)[_0x53434d(0x106)],new URL(_0x5878c9)[_0x53434d(0x106)]);}catch{return![];}}),_0x28d251={};!_0x4c4f29&&(_0x28d251[_0x1920b3(0xea)]=_0x5878c9);try{await _0x33210f[_0x1920b3(0xec)](createCloudProfile,_0x447e81,_0x516b82,{'settings':_0x28d251});}catch(_0x17e423){if(_0x17e423 instanceof ApiError&&_0x17e423[_0x1920b3(0xd2)]===0x199){console[_0x1920b3(0xf7)]('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x447e81+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x17e423;}throw _0x17e423;}return console[_0x1920b3(0x10f)]('โœ“\x20Profile\x20\x27'+_0x447e81+'\x27\x20created.\x0a'+(_0x1920b3(0xed)+_0x447e81)),await _0x33210f[_0x1920b3(0xc0)](sweepOrphansBestEffort,_0x447e81),_0x368810?.[_0x1920b3(0xf5)](_0x33210f[_0x1920b3(0xc1)],{'envKey':_0x516b82,'profileName':_0x447e81}),!![];}async function createUnconfiguredCloudProfile(_0x20addb,_0x4358bf){const _0x1bdc91=_0x1ccb,_0x320df2={'oIGXQ':function(_0x3084b9,_0x122c82){return _0x3084b9 instanceof _0x122c82;}};try{await createCloudProfile(_0x20addb,undefined,{'settings':_0x4358bf});}catch(_0x130e1d){_0x320df2['oIGXQ'](_0x130e1d,ApiError)&&_0x130e1d['status']===0x199&&console[_0x1bdc91(0xf7)](_0x1bdc91(0xc4)+_0x20addb+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x130e1d;}}async function captureEnvLessProfile(_0x39e272,_0x1895c0,_0x364ba2,_0x1521af){const _0x151706=_0x1ccb,_0x130dc1={'MBqnO':_0x151706(0xe6),'hUaCL':_0x151706(0xdd),'YCyOG':function(_0x5cb051,_0x40e937){return _0x5cb051+_0x40e937;},'OuabX':function(_0xfd80d2,_0xab010a,_0x311619,_0x33aa8d){return _0xfd80d2(_0xab010a,_0x311619,_0x33aa8d);},'LLzjZ':function(_0x305a9c,_0x449fce){return _0x305a9c instanceof _0x449fce;},'PpMpP':function(_0x5db77c,_0xe07b64){return _0x5db77c===_0xe07b64;},'jHgTj':function(_0x2de723,_0x4336d4,_0x3fd26e){return _0x2de723(_0x4336d4,_0x3fd26e);},'cJkfR':function(_0x18b19a,_0x34dba6){return _0x18b19a>_0x34dba6;},'bpbfQ':function(_0x5240a6,_0x1fd886){return _0x5240a6+_0x1fd886;}};if(!_0x364ba2['yes']){const {capture:_0x480b48}=await _0x2dcd12['prompt']([{'type':_0x130dc1[_0x151706(0xcd)],'name':_0x130dc1['hUaCL'],'message':_0x151706(0xe4),'default':!![]}]);if(!_0x480b48)return _0x1521af?.['trackPhaseEnd'](_0x151706(0xe5),{'reason':'user_declined','profileName':_0x39e272}),console[_0x151706(0xf7)](_0x151706(0x10b)+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x1d7c67={};if(_0x364ba2['setupHeader'])for(const _0x2e1c96 of _0x364ba2['setupHeader']){const _0x57c77f=_0x2e1c96['indexOf'](':');if(_0x57c77f===-0x1)continue;_0x1d7c67[_0x2e1c96['slice'](0x0,_0x57c77f)['trim']()]=_0x2e1c96['slice'](_0x130dc1[_0x151706(0xe1)](_0x57c77f,0x1))[_0x151706(0x103)]();}const _0x5743d9={'baseUrl':_0x1895c0};Object[_0x151706(0xa4)](_0x1d7c67)['length']>0x0&&(_0x5743d9[_0x151706(0xe9)]=_0x1d7c67);let _0x4dd9ac;try{_0x4dd9ac=await _0x130dc1[_0x151706(0xd6)](createCloudProfile,_0x39e272,undefined,{'settings':_0x5743d9});}catch(_0x58c7fe){_0x130dc1['LLzjZ'](_0x58c7fe,ApiError)&&_0x130dc1['PpMpP'](_0x58c7fe['status'],0x199)&&console[_0x151706(0xf7)]('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x39e272+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x58c7fe;}return await _0x130dc1[_0x151706(0xb6)](manualBrowserLogin,_0x4dd9ac,{'key':'','domains':[_0x1895c0],'setupHeaders':_0x130dc1['cJkfR'](Object['keys'](_0x1d7c67)['length'],0x0)?_0x1d7c67:undefined}),console[_0x151706(0x10f)](_0x130dc1[_0x151706(0xda)]('\x0aโœ“\x20Profile\x20\x27'+_0x39e272+_0x151706(0x100),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x39e272)),await sweepOrphansBestEffort(_0x39e272),_0x1521af?.['trackPhaseEnd'](_0x151706(0x95),{'envKey':null,'profileName':_0x39e272}),!![];}export async function addEnv(_0x4fa0bd,_0x3d073b={},_0x56a1b3){const _0x2e6b85=_0x1ccb,_0x26c769={'lJnxI':function(_0x26d8d6,_0x179df6){return _0x26d8d6+_0x179df6;},'Pqabr':function(_0xd9e6b,_0x1f0bd8){return _0xd9e6b+_0x1f0bd8;},'ZfHFa':'To\x20set\x20up\x20a\x20profile,\x20run:\x0a','imANl':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','NUHuu':'\x20\x20https://docs.ranger.net/main/concepts/profiles','wtSaj':function(_0x2bea53,_0x36b018){return _0x2bea53===_0x36b018;},'EpyCD':_0x2e6b85(0xb0),'ePeOx':'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','Ibpju':'\x0a๐Ÿ”Œ\x20CDP\x20Profile\x20Setup\x0a','PQuEB':function(_0x3d6605,_0x2b73fb){return _0x3d6605>_0x2b73fb;},'FlDYW':function(_0x2473bf,_0x3e9edc,_0x3f6057){return _0x2473bf(_0x3e9edc,_0x3f6057);},'xrCQW':'cdpEndpoint','EdvDf':function(_0x3d3922,_0x9d17cd,_0x3f14cf,_0x56cb73,_0x1e8a3c){return _0x3d3922(_0x9d17cd,_0x3f14cf,_0x56cb73,_0x1e8a3c);},'bnsnM':function(_0x5af2f1,_0x22ccde){return _0x5af2f1(_0x22ccde);},'xrBCT':function(_0x164e3e,_0x31b467){return _0x164e3e(_0x31b467);},'gUehO':function(_0x455e38,_0x4dc206,_0x28ce7f){return _0x455e38(_0x4dc206,_0x28ce7f);},'EGviA':function(_0x148a25,_0x42e53f){return _0x148a25+_0x42e53f;},'wmtnA':function(_0x51d2e5,_0x4db55e){return _0x51d2e5(_0x4db55e);},'gKzkh':function(_0x131c32,_0x45616d){return _0x131c32(_0x45616d);},'wzYau':_0x2e6b85(0xfd),'TwaaD':_0x2e6b85(0xd3),'kclsx':_0x2e6b85(0x10c),'DkwVS':_0x2e6b85(0xd0),'zXcyw':'baseUrl','nZdzE':function(_0x9739e1,_0x419053){return _0x9739e1||_0x419053;},'syxtj':_0x2e6b85(0xc5),'SsXXR':'action','XcqtM':_0x2e6b85(0x9c),'kkoed':_0x2e6b85(0xe2),'FJiYd':_0x2e6b85(0x86),'kBUVw':_0x2e6b85(0x101),'WlzHE':function(_0x4edd42,_0x44f5a9){return _0x4edd42 instanceof _0x44f5a9;}};_0x3d073b['ci']&&(console[_0x2e6b85(0xf7)](_0x26c769[_0x2e6b85(0xef)](_0x26c769['Pqabr'](_0x2e6b85(0x91)+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'+'\x0a'+_0x26c769[_0x2e6b85(0xaa)]+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a')+_0x26c769[_0x2e6b85(0xd7)],_0x26c769['NUHuu'])),process['exit'](0x1));const _0x2dc22c={};if(_0x3d073b['setupHeader'])for(const _0x40826d of _0x3d073b[_0x2e6b85(0xab)]){const _0x1df92b=_0x40826d['indexOf'](':');if(_0x26c769[_0x2e6b85(0xbc)](_0x1df92b,-0x1))throw new Error(_0x2e6b85(0x8d)+_0x40826d+_0x2e6b85(0xcc));const _0x5cb754=_0x40826d['slice'](0x0,_0x1df92b)['trim'](),_0x5103c5=_0x40826d['slice'](_0x1df92b+0x1)['trim']();_0x2dc22c[_0x5cb754]=_0x5103c5;}if(_0x3d073b[_0x2e6b85(0x10d)]!==undefined&&_0x3d073b[_0x2e6b85(0x10d)]['trim']()==='')throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x3d073b[_0x2e6b85(0x10d)]&&_0x3d073b['url'])throw new Error(_0x26c769['EpyCD']);const _0x2e41b8=Boolean(_0x3d073b['cdpEndpoint']),_0x11af3c=process['stdin'][_0x2e6b85(0x110)]&&process['stdout'][_0x2e6b85(0x110)];if(!_0x11af3c&&!_0x3d073b['url']&&!_0x2e41b8&&!_0x3d073b[_0x2e6b85(0xff)])throw new Error(_0x26c769[_0x2e6b85(0xe7)]);if(_0x2e41b8){const _0x500b55=_0x3d073b[_0x2e6b85(0x10d)];console['log'](_0x26c769[_0x2e6b85(0xce)]),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x500b55);const _0x2fc88f={'cdpEndpoint':_0x500b55,'isElectron':!![]};_0x26c769[_0x2e6b85(0x98)](Object[_0x2e6b85(0xa4)](_0x2dc22c)['length'],0x0)&&(_0x2fc88f['setupHeaders']=_0x2dc22c);await _0x26c769['FlDYW'](createUnconfiguredCloudProfile,_0x4fa0bd,_0x2fc88f);try{setProfileOverride(process[_0x2e6b85(0xfe)](),_0x4fa0bd,_0x26c769[_0x2e6b85(0x9d)],_0x500b55),_0x26c769['EdvDf'](setProfileOverride,process['cwd'](),_0x4fa0bd,_0x2e6b85(0xe3),!![]);}catch(_0x5a57b1){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x5a57b1 instanceof Error?_0x5a57b1[_0x2e6b85(0x88)]:_0x26c769[_0x2e6b85(0xb4)](String,_0x5a57b1)));}console[_0x2e6b85(0x10f)](_0x2e6b85(0xdf)+_0x4fa0bd+_0x2e6b85(0x109)),await _0x26c769[_0x2e6b85(0xad)](sweepOrphansBestEffort,_0x4fa0bd),await markActive(_0x4fa0bd);return;}if(_0x3d073b[_0x2e6b85(0xff)]){const _0x18aab2={};_0x3d073b[_0x2e6b85(0x9e)]&&(_0x18aab2['baseUrl']=_0x3d073b['url']);Object['keys'](_0x2dc22c)['length']>0x0&&(_0x18aab2['setupHeaders']=_0x2dc22c);await _0x26c769[_0x2e6b85(0xf0)](createUnconfiguredCloudProfile,_0x4fa0bd,_0x18aab2),console['log'](_0x26c769['EGviA'](_0x26c769['lJnxI'](_0x2e6b85(0xdf)+_0x4fa0bd+'\x27\x20created\x20with\x20no\x20session.\x0a',_0x2e6b85(0xd9)),_0x2e6b85(0xe0)+_0x4fa0bd+'`\x0a')+'\x20\x20\x20\x20\x20\x20\x20\x20to\x20materialize\x20a\x20session\x20via\x20server-side\x20login.'),await sweepOrphansBestEffort(_0x4fa0bd),await _0x26c769['wmtnA'](markActive,_0x4fa0bd);return;}if(_0x3d073b[_0x2e6b85(0x9e)]){const _0x8c23ee=_0x3d073b[_0x2e6b85(0x9e)],_0x12f688=await _0x26c769[_0x2e6b85(0xa0)](checkUrlReachability,_0x8c23ee);if(!_0x12f688['ok']&&!_0x3d073b['force'])throw new Error(_0x2e6b85(0xd4)+_0x8c23ee+':\x20'+_0x12f688['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x12f688['ok']&&_0x3d073b[_0x2e6b85(0x108)]&&console['log'](_0x2e6b85(0xb8)+_0x8c23ee+':\x20'+_0x12f688['error']+_0x2e6b85(0xcf));}else{console['log'](_0x26c769[_0x2e6b85(0x89)]),console['log'](_0x26c769[_0x2e6b85(0x9f)]),console['log'](_0x26c769[_0x2e6b85(0x114)]);let _0x322f1a='',_0x34da02=![];while(!![]){const _0x107810=await _0x2dcd12['prompt']([{'type':_0x26c769[_0x2e6b85(0xf1)],'name':_0x26c769['zXcyw'],'message':_0x34da02?_0x2e6b85(0xca):_0x2e6b85(0xee),'default':_0x26c769[_0x2e6b85(0xf8)](_0x322f1a,_0x2e6b85(0xbf))}]);_0x322f1a=_0x107810['baseUrl'];const _0x515a41=await checkUrlReachability(_0x322f1a);if(_0x515a41['ok'])break;const _0x579109=/^[a-zA-Z][\w+.-]*:\/\//[_0x2e6b85(0x9b)](_0x322f1a),_0x4d5d8e=_0x515a41['isProtocolError']&&!_0x579109,_0xe6d345=_0x4d5d8e?'http://'+_0x322f1a:null;_0x34da02=!![],console[_0x2e6b85(0x10f)](_0x2e6b85(0xb3)+_0x322f1a+':\x20'+_0x515a41[_0x2e6b85(0xf7)]);_0xe6d345&&console[_0x2e6b85(0x10f)](_0x2e6b85(0x99)+_0xe6d345+'?');const {action:_0x47f4aa}=await _0x2dcd12['prompt']([{'type':_0x26c769['syxtj'],'name':_0x26c769['SsXXR'],'message':_0x26c769[_0x2e6b85(0xc6)],'choices':[..._0xe6d345?[{'name':'Use\x20'+_0xe6d345,'value':_0x2e6b85(0xfa)}]:[],{'name':_0x26c769[_0x2e6b85(0xa2)],'value':_0x2e6b85(0xf2)},{'name':_0x26c769['FJiYd'],'value':_0x26c769['kBUVw']}]}]);if(_0x26c769['wtSaj'](_0x47f4aa,_0x2e6b85(0xfa))&&_0xe6d345){_0x322f1a=_0xe6d345;const _0x5701f5=await checkUrlReachability(_0x322f1a);if(_0x5701f5['ok'])break;console['log'](_0x2e6b85(0x105)+_0x322f1a+':\x20'+_0x5701f5[_0x2e6b85(0xf7)]);}else{if(_0x26c769['wtSaj'](_0x47f4aa,_0x26c769[_0x2e6b85(0xac)]))break;}}_0x3d073b={..._0x3d073b,'url':_0x322f1a};}let _0x534787=![];try{_0x534787=await tryAutoRouteCloudProfile(_0x4fa0bd,_0x3d073b['url'],_0x3d073b,_0x11af3c,_0x56a1b3);}catch(_0x2729d3){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x4fa0bd+_0x2e6b85(0x10e)+(_0x26c769['WlzHE'](_0x2729d3,Error)?_0x2729d3[_0x2e6b85(0x88)]:String(_0x2729d3))),process[_0x2e6b85(0xcb)](0x1);}!_0x534787&&process['exit'](0x1),await markActive(_0x4fa0bd);}
1
+ (function(_0x97fe94,_0xadf1b2){const _0xd1687b=_0x26c0,_0x4078ec=_0x97fe94();while(!![]){try{const _0x207dae=parseInt(_0xd1687b(0xf0))/0x1*(-parseInt(_0xd1687b(0x8b))/0x2)+-parseInt(_0xd1687b(0xbf))/0x3*(-parseInt(_0xd1687b(0xff))/0x4)+-parseInt(_0xd1687b(0xab))/0x5+parseInt(_0xd1687b(0xa1))/0x6*(parseInt(_0xd1687b(0x9f))/0x7)+parseInt(_0xd1687b(0xc5))/0x8*(-parseInt(_0xd1687b(0x102))/0x9)+-parseInt(_0xd1687b(0x91))/0xa*(parseInt(_0xd1687b(0xc8))/0xb)+-parseInt(_0xd1687b(0xbd))/0xc*(-parseInt(_0xd1687b(0xca))/0xd);if(_0x207dae===_0xadf1b2)break;else _0x4078ec['push'](_0x4078ec['shift']());}catch(_0x2e1745){_0x4078ec['push'](_0x4078ec['shift']());}}}(_0x8300,0x50ad4));function _0x26c0(_0x5b95a0,_0x1484c3){_0x5b95a0=_0x5b95a0-0x7b;const _0x830040=_0x8300();let _0x26c05e=_0x830040[_0x5b95a0];return _0x26c05e;}import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x3f889f from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';function _0x8300(){const _0x1ceac5=['\x0a\x20\x20No\x20auth\x20env\x20matches\x20','82049DTuDlU','error','9893RAqVhJ','cdpEndpoint','QsENP','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','Eqhtu','\x27\x20matching\x20','NODE_TLS_REJECT_UNAUTHORIZED','FeiBp','continue','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','nptxi','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','djNkr','yes','trim','HTTP\x20','Enter\x20a\x20different\x20URL','yCFsA','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','zzEAQ','ZudFo','use_suggestion','startsWith','KSyuS','\x0a๐ŸŒ\x20Profile\x20Setup\x0a','stdin','tOgLH','โœ“\x20Cloud\x20profile\x20\x27','\x20--skip-auth\x0a','confirm','capture','\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','nQxYB','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','โœ“\x20Profile\x20\x27','aVyhx','fetch\x20failed','4zChVSp','Invalid\x20URL','lpvTM','\x27\x20to\x20the\x20cloud?','YLgaY','DQkmQ','xzWCF','log','indexOf','url','includes','saveToCloud','โš \x20Could\x20not\x20reach\x20','list','stdout','11180jVrjUq','XdUjl','GcOsM','18nZLFGw','gYMrv','cTvAD','\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.','\x20\x20Next:\x20ranger\x20go\x20--profile\x20',')\x0a\x20\x20Save\x20\x27','QRzfx','CBwhj','no_match','force','setupHeaders','.tmp-','keys','pxUPe','ZlUAf','\x0a\x20\x20(domains:\x20','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','161074aEpOZx','\x22:\x20','isProtocolError','\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22','knGmt','TPjSs','180dxSrra','manual','skipAuth','profile.add.autoRouteSkipped','THVtX','Continue\x20anyway','user_declined','ibLwy','status','SEQVa','\x27\x20created.\x0a','\x20(continuing\x20with\x20--force)','Could\x20not\x20reach\x20','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','7uzpAmA','mHlAM','2991192uSMdUv','\x0a๐Ÿ”Œ\x20CDP\x20Profile\x20Setup\x0a','GyMfi','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','IBmkc','AXYKk','hXCSR','length','isTTY','2292200nmiGEl','What\x20would\x20you\x20like\x20to\x20do?','PQwwb','HrBMQ','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','UIgyZ','irhKe','message','ofUuW','aBREf','setupHeader','environments','prompt','doNXA','cwd','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','MTlqo','origin','16284OmEPiy','http://','339zuWdqd','NtupD','trackPhaseEnd','Ryprp','\x20โ€”\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','EbYeK','2406968mFukQX','slice'];_0x8300=function(){return _0x1ceac5;};return _0x8300();}import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';async function checkUrlReachability(_0x1e2c63){const _0x5334b1=_0x26c0,_0x223af0={'djNkr':function(_0x491e50,_0x205623,_0x811f54){return _0x491e50(_0x205623,_0x811f54);},'MTlqo':'HEAD','nQxYB':function(_0x3ad550,_0x31a875){return _0x3ad550===_0x31a875;},'YLgaY':'TypeError','THVtX':_0x5334b1(0xef)};try{const _0x211013=new AbortController(),_0x148ce6=_0x223af0[_0x5334b1(0xd6)](setTimeout,()=>_0x211013['abort'](),0x1388),_0x3f845e={'method':_0x223af0[_0x5334b1(0xbb)],'signal':_0x211013['signal'],'redirect':_0x5334b1(0x92)};/^https:\/\/localhost(:\d+)?/i['test'](_0x1e2c63)&&(process['env'][_0x5334b1(0xd0)]='0');const _0x18af33=await fetch(_0x1e2c63,_0x3f845e);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x148ce6);if(_0x18af33[_0x5334b1(0x99)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0x5334b1(0xd9)+_0x18af33['status']};}catch(_0x45f8c3){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x1fceea=_0x45f8c3,_0x5a30ea=_0x1fceea['message']||String(_0x45f8c3),_0x4629dc=_0x5a30ea[_0x5334b1(0xfa)](_0x5334b1(0xf1))||_0x223af0[_0x5334b1(0xea)](_0x1fceea['name'],_0x223af0[_0x5334b1(0xf4)])||_0x5a30ea['includes'](_0x223af0[_0x5334b1(0x95)]);return{'ok':![],'error':_0x5a30ea,'isProtocolError':_0x4629dc};}}async function sweepOrphanLocalProfile(_0xe0d71a,_0xae8b5c,_0x3be3d7){const _0xa90fed=_0x26c0,_0x3d1efb={'xzWCF':function(_0x127178,_0x263560,_0x201340){return _0x127178(_0x263560,_0x201340);},'hXCSR':function(_0x462753,_0x33ad3e){return _0x462753(_0x33ad3e);},'QRzfx':function(_0x23abe1,_0x4cf58f,_0x124287){return _0x23abe1(_0x4cf58f,_0x124287);},'ZudFo':function(_0x165b8f,_0x5dcc75,_0x302227){return _0x165b8f(_0x5dcc75,_0x302227);}},_0x4bef75=_0x3d1efb[_0xa90fed(0xf6)](join,_0xae8b5c,'local'),_0x1a489e=join(_0x4bef75,_0xe0d71a);_0x3d1efb['hXCSR'](existsSync,_0x1a489e)&&(_0x3be3d7&&await _0x3d1efb[_0xa90fed(0xa8)](isPathGitTracked,_0x1a489e)?console[_0xa90fed(0xf7)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x1a489e+_0xa90fed(0xc3)):(await _0x3d1efb[_0xa90fed(0x80)](rm,_0x1a489e,{'recursive':!![],'force':!![]}),console['log'](_0xa90fed(0xdc)+_0x1a489e)));if(existsSync(_0x4bef75)){let _0x4da3e4=[];try{_0x4da3e4=await readdir(_0x4bef75);}catch{return;}const _0x2db5ef=_0xa90fed(0x85)+_0xe0d71a+'-';for(const _0x17db4f of _0x4da3e4){if(!_0x17db4f[_0xa90fed(0xe0)](_0x2db5ef))continue;const _0x323cf5=_0x3d1efb['xzWCF'](join,_0x4bef75,_0x17db4f);await _0x3d1efb[_0xa90fed(0xde)](rm,_0x323cf5,{'recursive':!![],'force':!![]}),console['log'](_0xa90fed(0xdc)+_0x323cf5);}}}async function sweepOrphansBestEffort(_0x53793c){const _0x48d25d=_0x26c0,_0x298867={'EbYeK':function(_0x2e1c99,_0xa0a0d5,_0x13416e,_0x1a61fb){return _0x2e1c99(_0xa0a0d5,_0x13416e,_0x1a61fb);},'neeMF':function(_0xa4aa38){return _0xa4aa38();},'lYAuv':function(_0x734ddd){return _0x734ddd();},'SaPtd':function(_0x2a0e58,_0x5912da){return _0x2a0e58 instanceof _0x5912da;},'yVHYT':function(_0x5522de,_0x112fec){return _0x5522de(_0x112fec);}};try{await _0x298867[_0x48d25d(0xc4)](sweepOrphanLocalProfile,_0x53793c,getRangerHomeDir(),![]);const _0x51539d=_0x298867['neeMF'](getRangerDir);_0x51539d!==_0x298867['lYAuv'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x53793c,_0x51539d,!![]);}catch(_0x1fa629){console[_0x48d25d(0xf7)](_0x48d25d(0xa5)+(_0x298867['SaPtd'](_0x1fa629,Error)?_0x1fa629['message']:_0x298867['yVHYT'](String,_0x1fa629))+').');}}async function markActive(_0x3d190e){const _0x5093c3=_0x26c0,_0x1ff6c9={'doNXA':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0x3d190e),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x3d190e);}catch{console['log'](_0x1ff6c9[_0x5093c3(0xb8)]);}}async function tryAutoRouteCloudProfile(_0x57ba4f,_0xd4f42b,_0x38c78d,_0x191e88,_0x22cdf1){const _0x4a3764=_0x26c0,_0x21d360={'FolRv':function(_0x188514){return _0x188514();},'irhKe':'profile.add.autoRouteSkipped','FeiBp':'no_auth_config','QsENP':function(_0x1cca14,_0x399f44){return _0x1cca14 instanceof _0x399f44;},'gYMrv':function(_0x14f149,_0x3d0d46){return _0x14f149===_0x3d0d46;},'ibLwy':function(_0xa5175d,_0x391fcf){return _0xa5175d+_0x391fcf;},'pxUPe':function(_0x323125,_0x311d32){return _0x323125+_0x311d32;},'NMtKX':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','HrBMQ':_0x4a3764(0xa4),'WwXFb':function(_0x23a246,_0x55b4f9,_0x4430aa){return _0x23a246(_0x55b4f9,_0x4430aa);},'GcOsM':'confirm','XdUjl':function(_0x2488c2,_0x159fd5,_0x5a08d4,_0x4ac982){return _0x2488c2(_0x159fd5,_0x5a08d4,_0x4ac982);},'tjtMq':function(_0x1d7427,_0x209394){return _0x1d7427+_0x209394;},'nptxi':'profile.add.autoRouted'};let _0x26883c;try{_0x26883c=await _0x21d360['FolRv'](fetchAuthConfig);}catch(_0x44fc80){return _0x22cdf1?.['trackPhaseEnd'](_0x21d360[_0x4a3764(0xb1)],{'reason':_0x21d360[_0x4a3764(0xd1)],'profileName':_0x57ba4f}),console['error'](_0x4a3764(0xba)+(_0x21d360[_0x4a3764(0xcc)](_0x44fc80,Error)?_0x44fc80[_0x4a3764(0xb2)]:String(_0x44fc80))),![];}if(!_0x26883c||!_0x26883c['environments']||_0x21d360[_0x4a3764(0x7b)](Object['keys'](_0x26883c[_0x4a3764(0xb6)])['length'],0x0)){if(_0x191e88)return await captureEnvLessProfile(_0x57ba4f,_0xd4f42b,_0x38c78d,_0x22cdf1);return _0x22cdf1?.[_0x4a3764(0xc1)](_0x21d360['irhKe'],{'reason':'no_auth_config','profileName':_0x57ba4f}),console['error'](_0x21d360[_0x4a3764(0x98)](_0x21d360['pxUPe'](_0x21d360[_0x4a3764(0x87)](_0x4a3764(0xe9)+'\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'+_0x57ba4f+'\x20--url\x20'+_0xd4f42b+_0x4a3764(0xe6)),'\x0a'),_0x21d360['NMtKX']),_0x21d360[_0x4a3764(0xae)])),![];}const _0x3f3021=_0x21d360['WwXFb'](matchAuthEnvironment,_0xd4f42b,_0x26883c);if(!_0x3f3021)return _0x22cdf1?.[_0x4a3764(0xc1)]('profile.add.autoRouteSkipped',{'reason':_0x4a3764(0x82),'profileName':_0x57ba4f}),console['error'](_0x4a3764(0xc7)+_0xd4f42b+'.\x20Configured\x20envs:\x20'+Object['keys'](_0x26883c[_0x4a3764(0xb6)])['join'](',\x20')+'.'),![];const _0x50708c=_0x26883c[_0x4a3764(0xb6)][_0x3f3021],_0x2d528c=_0x50708c?.['domains']??[];if(_0x191e88&&!_0x38c78d[_0x4a3764(0xd7)]){const {saveToCloud:_0x5e32dd}=await _0x3f889f['prompt']([{'type':_0x21d360[_0x4a3764(0x101)],'name':_0x4a3764(0xfb),'message':'Found\x20auth\x20environment\x20\x27'+_0x3f3021+_0x4a3764(0xcf)+_0xd4f42b+_0x4a3764(0x89)+_0x2d528c['join'](',\x20')+_0x4a3764(0x7f)+_0x57ba4f+_0x4a3764(0xf3),'default':!![]}]);if(!_0x5e32dd)return _0x22cdf1?.['trackPhaseEnd'](_0x21d360['irhKe'],{'reason':_0x4a3764(0x97),'profileName':_0x57ba4f}),console[_0x4a3764(0xc9)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x4e8228=_0x2d528c['some'](_0x2e8b77=>{const _0x285fe0=_0x4a3764;try{return new URL(_0x2e8b77)['origin']===new URL(_0xd4f42b)[_0x285fe0(0xbc)];}catch{return![];}}),_0xc714f9={};!_0x4e8228&&(_0xc714f9['baseUrl']=_0xd4f42b);try{await _0x21d360[_0x4a3764(0x100)](createCloudProfile,_0x57ba4f,_0x3f3021,{'settings':_0xc714f9});}catch(_0x2cd2e9){if(_0x2cd2e9 instanceof ApiError&&_0x21d360[_0x4a3764(0x7b)](_0x2cd2e9[_0x4a3764(0x99)],0x199)){console[_0x4a3764(0xc9)]('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x57ba4f+_0x4a3764(0x7d));throw _0x2cd2e9;}throw _0x2cd2e9;}return console[_0x4a3764(0xf7)](_0x21d360['tjtMq'](_0x4a3764(0xed)+_0x57ba4f+_0x4a3764(0x9b),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x57ba4f)),await sweepOrphansBestEffort(_0x57ba4f),_0x22cdf1?.[_0x4a3764(0xc1)](_0x21d360[_0x4a3764(0xd4)],{'envKey':_0x3f3021,'profileName':_0x57ba4f}),!![];}async function createUnconfiguredCloudProfile(_0x191f43,_0x2891d5){const _0x1a2a9c=_0x26c0,_0x52c43c={'UIgyZ':function(_0x57e71,_0x3ec73c,_0x5191a0,_0x2c91f1){return _0x57e71(_0x3ec73c,_0x5191a0,_0x2c91f1);},'cTvAD':function(_0x3e2554,_0x35e250){return _0x3e2554===_0x35e250;}};try{await _0x52c43c[_0x1a2a9c(0xb0)](createCloudProfile,_0x191f43,undefined,{'settings':_0x2891d5});}catch(_0x536c13){_0x536c13 instanceof ApiError&&_0x52c43c[_0x1a2a9c(0x7c)](_0x536c13['status'],0x199)&&console['error'](_0x1a2a9c(0x8e)+_0x191f43+_0x1a2a9c(0x7d));throw _0x536c13;}}async function captureEnvLessProfile(_0x2c838b,_0x849f5c,_0x354769,_0x3d006f){const _0x382ad8=_0x26c0,_0x595c3e={'aVyhx':_0x382ad8(0xe8),'tIqey':_0x382ad8(0xeb),'Uqcua':_0x382ad8(0x97),'tOgLH':function(_0x58af29,_0x2b2957){return _0x58af29+_0x2b2957;},'TPjSs':function(_0x4d3b4b,_0x453029,_0x23682b,_0x12ae9f){return _0x4d3b4b(_0x453029,_0x23682b,_0x12ae9f);},'Jdjaw':function(_0x5e19fd,_0x2e9984,_0x44bb50){return _0x5e19fd(_0x2e9984,_0x44bb50);},'byqsE':function(_0x3068b6,_0x4fd058){return _0x3068b6>_0x4fd058;}};if(!_0x354769['yes']){const {capture:_0x2f5ad1}=await _0x3f889f['prompt']([{'type':_0x382ad8(0xe7),'name':_0x595c3e[_0x382ad8(0xee)],'message':_0x595c3e['tIqey'],'default':!![]}]);if(!_0x2f5ad1)return _0x3d006f?.['trackPhaseEnd'](_0x382ad8(0x94),{'reason':_0x595c3e['Uqcua'],'profileName':_0x2c838b}),console[_0x382ad8(0xc9)](_0x595c3e[_0x382ad8(0xe4)](_0x382ad8(0x9e),_0x382ad8(0x8a))),![];}const _0x2cf331={};if(_0x354769[_0x382ad8(0xb5)])for(const _0x5cc510 of _0x354769[_0x382ad8(0xb5)]){const _0x4f3247=_0x5cc510[_0x382ad8(0xf8)](':');if(_0x4f3247===-0x1)continue;_0x2cf331[_0x5cc510[_0x382ad8(0xc6)](0x0,_0x4f3247)['trim']()]=_0x5cc510[_0x382ad8(0xc6)](_0x4f3247+0x1)[_0x382ad8(0xd8)]();}const _0x3be22a={'baseUrl':_0x849f5c};Object[_0x382ad8(0x86)](_0x2cf331)['length']>0x0&&(_0x3be22a[_0x382ad8(0x84)]=_0x2cf331);let _0x354d06;try{_0x354d06=await _0x595c3e[_0x382ad8(0x90)](createCloudProfile,_0x2c838b,undefined,{'settings':_0x3be22a});}catch(_0x454acc){_0x454acc instanceof ApiError&&_0x454acc['status']===0x199&&console['error'](_0x382ad8(0x8e)+_0x2c838b+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x454acc;}return await _0x595c3e['Jdjaw'](manualBrowserLogin,_0x354d06,{'key':'','domains':[_0x849f5c],'setupHeaders':_0x595c3e['byqsE'](Object[_0x382ad8(0x86)](_0x2cf331)[_0x382ad8(0xa9)],0x0)?_0x2cf331:undefined}),console[_0x382ad8(0xf7)](_0x595c3e[_0x382ad8(0xe4)]('\x0aโœ“\x20Profile\x20\x27'+_0x2c838b+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a',_0x382ad8(0x7e)+_0x2c838b)),await sweepOrphansBestEffort(_0x2c838b),_0x3d006f?.[_0x382ad8(0xc1)]('profile.add.autoRouted',{'envKey':null,'profileName':_0x2c838b}),!![];}export async function addEnv(_0x12a3f3,_0x2e5ef1={},_0x24f9e5){const _0x2991b8=_0x26c0,_0xdb39e1={'mHlAM':function(_0x17ff8e,_0x19930b){return _0x17ff8e+_0x19930b;},'GyMfi':function(_0x5407cb,_0x430bb7){return _0x5407cb+_0x430bb7;},'HxkKL':'To\x20set\x20up\x20a\x20profile,\x20run:\x0a','gzQFi':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','lpvTM':'\x20\x20https://docs.ranger.net/main/concepts/profiles','knGmt':function(_0x504aa1,_0x1b888d){return _0x504aa1!==_0x1b888d;},'oOMxc':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','KSyuS':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','DQkmQ':'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','CBwhj':_0x2991b8(0xa2),'Eqhtu':function(_0x2634c7,_0x599ae9){return _0x2634c7>_0x599ae9;},'ZOOsA':function(_0x2e2303,_0x1fe0ab,_0x54f85f){return _0x2e2303(_0x1fe0ab,_0x54f85f);},'ZlUAf':function(_0x382743,_0x483b28){return _0x382743(_0x483b28);},'aBREf':function(_0x3dbac3,_0xf5a01b){return _0x3dbac3>_0xf5a01b;},'sjwUX':function(_0x224d20,_0x110304,_0x2cd481){return _0x224d20(_0x110304,_0x2cd481);},'HSqdE':function(_0x43dfd5,_0x5de771){return _0x43dfd5(_0x5de771);},'ofUuW':_0x2991b8(0xe2),'NtupD':_0x2991b8(0xec),'pZwac':'input','AXYKk':'baseUrl','IBmkc':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','MzxMF':'http://localhost:3000','SEQVa':function(_0x3dc71a,_0x3cb65e){return _0x3dc71a(_0x3cb65e);},'DXsWD':_0x2991b8(0xfd),'zzEAQ':'action','Ryprp':_0x2991b8(0xdf),'qtIyS':_0x2991b8(0xda),'PQwwb':'retry','JuzMG':_0x2991b8(0xd2),'ogiqs':function(_0x74ed26,_0x2a1c06){return _0x74ed26(_0x2a1c06);},'yCFsA':function(_0x1ddf3d,_0x553c98,_0x149760,_0x10a1bb,_0x905c7d,_0x1bf077){return _0x1ddf3d(_0x553c98,_0x149760,_0x10a1bb,_0x905c7d,_0x1bf077);}};_0x2e5ef1['ci']&&(console['error'](_0xdb39e1[_0x2991b8(0xa0)](_0xdb39e1[_0x2991b8(0xa3)](_0xdb39e1['GyMfi'](_0xdb39e1['mHlAM'](_0x2991b8(0xd3)+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'+'\x0a',_0xdb39e1['HxkKL']),_0xdb39e1['gzQFi']),'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0xdb39e1[_0x2991b8(0xf2)])),process['exit'](0x1));const _0x4e23e3={};if(_0x2e5ef1['setupHeader'])for(const _0x3bace9 of _0x2e5ef1['setupHeader']){const _0x2a1f86=_0x3bace9['indexOf'](':');if(_0x2a1f86===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x3bace9+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x39e522=_0x3bace9['slice'](0x0,_0x2a1f86)[_0x2991b8(0xd8)](),_0x56de29=_0x3bace9['slice'](_0xdb39e1[_0x2991b8(0xa0)](_0x2a1f86,0x1))['trim']();_0x4e23e3[_0x39e522]=_0x56de29;}if(_0xdb39e1[_0x2991b8(0x8f)](_0x2e5ef1['cdpEndpoint'],undefined)&&_0x2e5ef1[_0x2991b8(0xcb)]['trim']()==='')throw new Error(_0xdb39e1['oOMxc']);if(_0x2e5ef1['cdpEndpoint']&&_0x2e5ef1[_0x2991b8(0xf9)])throw new Error(_0xdb39e1[_0x2991b8(0xe1)]);const _0x2b8dc1=Boolean(_0x2e5ef1[_0x2991b8(0xcb)]),_0xf33087=process[_0x2991b8(0xe3)]['isTTY']&&process[_0x2991b8(0xfe)][_0x2991b8(0xaa)];if(!_0xf33087&&!_0x2e5ef1[_0x2991b8(0xf9)]&&!_0x2b8dc1&&!_0x2e5ef1['skipAuth'])throw new Error(_0xdb39e1[_0x2991b8(0xf5)]);if(_0x2b8dc1){const _0x2f4e31=_0x2e5ef1[_0x2991b8(0xcb)];console['log'](_0xdb39e1[_0x2991b8(0x81)]),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x2f4e31);const _0x3d2daf={'cdpEndpoint':_0x2f4e31,'isElectron':!![]};_0xdb39e1[_0x2991b8(0xce)](Object['keys'](_0x4e23e3)['length'],0x0)&&(_0x3d2daf['setupHeaders']=_0x4e23e3);await _0xdb39e1['ZOOsA'](createUnconfiguredCloudProfile,_0x12a3f3,_0x3d2daf);try{setProfileOverride(process['cwd'](),_0x12a3f3,'cdpEndpoint',_0x2f4e31),setProfileOverride(process[_0x2991b8(0xb9)](),_0x12a3f3,'isElectron',!![]);}catch(_0x361931){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x361931 instanceof Error?_0x361931[_0x2991b8(0xb2)]:String(_0x361931)));}console[_0x2991b8(0xf7)](_0x2991b8(0xe5)+_0x12a3f3+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x12a3f3),await _0xdb39e1[_0x2991b8(0x88)](markActive,_0x12a3f3);return;}if(_0x2e5ef1[_0x2991b8(0x93)]){const _0x31e9ce={};_0x2e5ef1[_0x2991b8(0xf9)]&&(_0x31e9ce['baseUrl']=_0x2e5ef1[_0x2991b8(0xf9)]);_0xdb39e1[_0x2991b8(0xb4)](Object['keys'](_0x4e23e3)[_0x2991b8(0xa9)],0x0)&&(_0x31e9ce['setupHeaders']=_0x4e23e3);await _0xdb39e1['sjwUX'](createUnconfiguredCloudProfile,_0x12a3f3,_0x31e9ce),console[_0x2991b8(0xf7)](_0x2991b8(0xed)+_0x12a3f3+'\x27\x20created\x20(no\x20session).\x0a'+(_0x2991b8(0xd5)+_0x12a3f3+'`\x20again\x20without\x20--skip-auth.')),await _0xdb39e1['HSqdE'](sweepOrphansBestEffort,_0x12a3f3),await markActive(_0x12a3f3);return;}if(_0x2e5ef1[_0x2991b8(0xf9)]){const _0x4ecde6=_0x2e5ef1[_0x2991b8(0xf9)],_0x378c7a=await checkUrlReachability(_0x4ecde6);if(!_0x378c7a['ok']&&!_0x2e5ef1[_0x2991b8(0x83)])throw new Error(_0x2991b8(0x9d)+_0x4ecde6+':\x20'+_0x378c7a['error']+_0x2991b8(0xaf));!_0x378c7a['ok']&&_0x2e5ef1[_0x2991b8(0x83)]&&console[_0x2991b8(0xf7)](_0x2991b8(0xfc)+_0x4ecde6+':\x20'+_0x378c7a['error']+_0x2991b8(0x9c));}else{console['log'](_0xdb39e1[_0x2991b8(0xb3)]),console['log'](_0xdb39e1[_0x2991b8(0xc0)]),console['log'](_0x2991b8(0xcd));let _0x35983f='',_0x515578=![];while(!![]){const _0x265af6=await _0x3f889f['prompt']([{'type':_0xdb39e1['pZwac'],'name':_0xdb39e1[_0x2991b8(0xa7)],'message':_0x515578?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0xdb39e1[_0x2991b8(0xa6)],'default':_0x35983f||_0xdb39e1['MzxMF']}]);_0x35983f=_0x265af6['baseUrl'];const _0x2e6611=await _0xdb39e1['SEQVa'](checkUrlReachability,_0x35983f);if(_0x2e6611['ok'])break;const _0xb5cfcc=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x35983f),_0x1690bd=_0x2e6611[_0x2991b8(0x8d)]&&!_0xb5cfcc,_0x54d627=_0x1690bd?_0x2991b8(0xbe)+_0x35983f:null;_0x515578=!![],console[_0x2991b8(0xf7)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x35983f+':\x20'+_0x2e6611[_0x2991b8(0xc9)]);_0x54d627&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x54d627+'?');const {action:_0x9958d6}=await _0x3f889f[_0x2991b8(0xb7)]([{'type':_0xdb39e1['DXsWD'],'name':_0xdb39e1[_0x2991b8(0xdd)],'message':_0x2991b8(0xac),'choices':[..._0x54d627?[{'name':'Use\x20'+_0x54d627,'value':_0xdb39e1['Ryprp']}]:[],{'name':_0xdb39e1['qtIyS'],'value':_0xdb39e1[_0x2991b8(0xad)]},{'name':_0x2991b8(0x96),'value':_0xdb39e1['JuzMG']}]}]);if(_0x9958d6===_0xdb39e1[_0x2991b8(0xc2)]&&_0x54d627){_0x35983f=_0x54d627;const _0x5d8209=await _0xdb39e1['ogiqs'](checkUrlReachability,_0x35983f);if(_0x5d8209['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x35983f+':\x20'+_0x5d8209['error']);}else{if(_0x9958d6==='continue')break;}}_0x2e5ef1={..._0x2e5ef1,'url':_0x35983f};}let _0x268391=![];try{_0x268391=await _0xdb39e1[_0x2991b8(0xdb)](tryAutoRouteCloudProfile,_0x12a3f3,_0x2e5ef1['url'],_0x2e5ef1,_0xf33087,_0x24f9e5);}catch(_0x44e517){console[_0x2991b8(0xc9)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x12a3f3+_0x2991b8(0x8c)+(_0x44e517 instanceof Error?_0x44e517[_0x2991b8(0xb2)]:_0xdb39e1[_0x2991b8(0x9a)](String,_0x44e517))),process['exit'](0x1);}!_0x268391&&process['exit'](0x1),await _0xdb39e1['HSqdE'](markActive,_0x12a3f3);}
@@ -1 +1 @@
1
- (function(_0x9b9863,_0x1e064d){var _0x2162de=_0x13c0,_0x22e1ff=_0x9b9863();while(!![]){try{var _0x5bdb9f=-parseInt(_0x2162de(0x159))/0x1*(-parseInt(_0x2162de(0x162))/0x2)+parseInt(_0x2162de(0x15a))/0x3+parseInt(_0x2162de(0x156))/0x4+parseInt(_0x2162de(0x15f))/0x5*(parseInt(_0x2162de(0x15b))/0x6)+parseInt(_0x2162de(0x15e))/0x7+parseInt(_0x2162de(0x155))/0x8+-parseInt(_0x2162de(0x164))/0x9;if(_0x5bdb9f===_0x1e064d)break;else _0x22e1ff['push'](_0x22e1ff['shift']());}catch(_0x14dca7){_0x22e1ff['push'](_0x22e1ff['shift']());}}}(_0x130e,0x3bab6));export async function authEncrypt(_0x14089f){var _0x4809b6=_0x13c0,_0x56b860={'SDwNv':function(_0x4b64a6,_0x1bea46){return _0x4b64a6+_0x1bea46;},'yxCma':function(_0x4e2e26,_0x325481){return _0x4e2e26+_0x325481;},'iGnvG':_0x4809b6(0x158),'ocuPD':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','FRMRa':_0x4809b6(0x15d),'EfpKm':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console['error'](_0x56b860['SDwNv'](_0x56b860[_0x4809b6(0x15c)](_0x56b860['iGnvG']+_0x56b860[_0x4809b6(0x163)],'\x0a')+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x56b860['FRMRa'])+'\x0a'+_0x56b860[_0x4809b6(0x157)]+_0x4809b6(0x161)),process[_0x4809b6(0x160)](0x1);}function _0x13c0(_0x1f26e4,_0x33f115){_0x1f26e4=_0x1f26e4-0x155;var _0x130e16=_0x130e();var _0x13c049=_0x130e16[_0x1f26e4];return _0x13c049;}function _0x130e(){var _0x2893b0=['\x20\x20https://docs.ranger.net/main/concepts/profiles','85588yxQMLL','ocuPD','15885918HJgclQ','3473320gjVVJI','1477236IxgnoJ','EfpKm','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','3lesGkS','1190985VayNtv','225678pXFarh','yxCma','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','2658271bZqDhR','40WkxOEZ','exit'];_0x130e=function(){return _0x2893b0;};return _0x130e();}
1
+ function _0xe249(){var _0x262548=['12309jyoCjJ','error','233600FjdvBJ','156BcLTsE','66JkDaoK','RowsZ','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','6824sUdMbV','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','wUMBx','38725QpGUMn','6220GourRb','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','440398PYvKbU','928071MhxChP','hElgZ','723211wCiORY','1230kuKZHD','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ZvVGZ','ipmcV'];_0xe249=function(){return _0x262548;};return _0xe249();}(function(_0x80fc2a,_0x23a956){var _0x259852=_0x479f,_0x25d342=_0x80fc2a();while(!![]){try{var _0xadb8ec=parseInt(_0x259852(0x9d))/0x1+-parseInt(_0x259852(0x94))/0x2*(-parseInt(_0x259852(0x9e))/0x3)+-parseInt(_0x259852(0xa5))/0x4*(-parseInt(_0x259852(0x97))/0x5)+parseInt(_0x259852(0xa6))/0x6*(-parseInt(_0x259852(0x9a))/0x7)+-parseInt(_0x259852(0xa4))/0x8+-parseInt(_0x259852(0x9b))/0x9+-parseInt(_0x259852(0x98))/0xa*(parseInt(_0x259852(0xa2))/0xb);if(_0xadb8ec===_0x23a956)break;else _0x25d342['push'](_0x25d342['shift']());}catch(_0x19acd8){_0x25d342['push'](_0x25d342['shift']());}}}(_0xe249,0xdca73));function _0x479f(_0x5e5b37,_0x7abc5d){_0x5e5b37=_0x5e5b37-0x94;var _0xe2497f=_0xe249();var _0x479f87=_0xe2497f[_0x5e5b37];return _0x479f87;}export async function authEncrypt(_0x50adb7){var _0x101c20=_0x479f,_0x101f04={'SolmT':function(_0x407c76,_0x36f5f1){return _0x407c76+_0x36f5f1;},'ZvVGZ':function(_0x379b08,_0x17dddc){return _0x379b08+_0x17dddc;},'hElgZ':function(_0x394989,_0x107ce0){return _0x394989+_0x107ce0;},'ipmcV':_0x101c20(0x9f),'RowsZ':_0x101c20(0xa8),'wUMBx':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console[_0x101c20(0xa3)](_0x101f04['SolmT'](_0x101f04[_0x101c20(0xa0)](_0x101f04[_0x101c20(0x9c)](_0x101f04['SolmT'](_0x101c20(0x95),_0x101c20(0x99))+'\x0a',_0x101f04[_0x101c20(0xa1)]),_0x101f04[_0x101c20(0xa7)])+'\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+_0x101f04[_0x101c20(0x96)]),process['exit'](0x1);}
@@ -1 +1 @@
1
- const _0xc18fe5=_0x48e0;(function(_0x425b30,_0x463551){const _0x45febc=_0x48e0,_0x30b370=_0x425b30();while(!![]){try{const _0x17eeb7=parseInt(_0x45febc(0x149))/0x1+parseInt(_0x45febc(0x15b))/0x2+-parseInt(_0x45febc(0x161))/0x3+parseInt(_0x45febc(0x144))/0x4+-parseInt(_0x45febc(0x168))/0x5*(-parseInt(_0x45febc(0x140))/0x6)+-parseInt(_0x45febc(0x165))/0x7*(parseInt(_0x45febc(0x16a))/0x8)+parseInt(_0x45febc(0x151))/0x9*(parseInt(_0x45febc(0x15d))/0xa);if(_0x17eeb7===_0x463551)break;else _0x30b370['push'](_0x30b370['shift']());}catch(_0x4d93b1){_0x30b370['push'](_0x30b370['shift']());}}}(_0x2768,0xc9067));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x48e0(_0x5d7bcc,_0x5defa3){_0x5d7bcc=_0x5d7bcc-0x13d;const _0x276862=_0x2768();let _0x48e0cf=_0x276862[_0x5d7bcc];return _0x48e0cf;}import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x2768(){const _0x2cc1f8=['length','user','--scope','bFGSe','replace','close','bug-bash','fALYv','80464VNsXlB','PFrka','18400lavCCT','marketplace','โœ“\x20Removed\x20trailhead\x20marketplace','yBGfl','1309401jItDXF','log','stringify','czAMU','7uhZXCI','GwewY','rEIQj','54850SXayTG','error','6058616SumJNE','fzFxB','filter','LStax','utf-8','QrBZi','HrquN','โœ“\x20Removed\x20OpenCode\x20user\x20skill:\x20','platform','e2e-test-recommender','414mqmpas','RJllJ','Nothing\x20to\x20clean\x20up.\x0a','ranger','83304CzAUHv','ujffC','ILnbf','xyimZ','isArray','325205Bvluns','plugin','string','ignore','\x0aโœ…\x20Cleanup\x20complete!\x0a','fttZW','claude','remove','4275pLfaMp','RzeBf'];_0x2768=function(){return _0x2cc1f8;};return _0x2768();}import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0xc18fe5(0x143),'feature-tracker',_0xc18fe5(0x159),_0xc18fe5(0x13f)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x5879dd){const _0x5cb08=_0xc18fe5,_0x440a54=_0x5879dd[_0x5cb08(0x157)](/\/\*[\s\S]*?\*\//g,''),_0x8d6501=_0x440a54[_0x5cb08(0x157)](/^\s*\/\/.*$/gm,''),_0xeadee7=_0x8d6501[_0x5cb08(0x157)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0xeadee7);}async function removeOpencodePluginConfig(_0x2781a6){const _0x11fdb3=_0xc18fe5,_0x406f11={'ujffC':function(_0x5b8f6f,_0x972abc){return _0x5b8f6f!==_0x972abc;},'bWEUE':function(_0x5bdbad,_0x2ac4e5){return _0x5bdbad(_0x2ac4e5);},'HrquN':function(_0x1b3dde,_0x11cc08){return _0x1b3dde===_0x11cc08;},'cVAwh':function(_0xc1be57,_0x296b14,_0x1f34a0){return _0xc1be57(_0x296b14,_0x1f34a0);}};if(!existsSync(_0x2781a6))return![];let _0x5ccdf9;try{const _0x37f69=await readFile(_0x2781a6,_0x11fdb3(0x16e));_0x5ccdf9=_0x406f11['bWEUE'](parseJsonc,_0x37f69);}catch{return![];}const _0x23f942=Array[_0x11fdb3(0x148)](_0x5ccdf9['plugin'])?_0x5ccdf9[_0x11fdb3(0x14a)]:[];if(_0x23f942[_0x11fdb3(0x153)]===0x0)return![];const _0xba61db=_0x23f942[_0x11fdb3(0x16c)](_0x3569a9=>{const _0x3f94e6=_0x11fdb3;if(_0x406f11[_0x3f94e6(0x145)](typeof _0x3569a9,_0x3f94e6(0x14b)))return!![];return _0x3569a9!==opencodePluginName;});if(_0x406f11[_0x11fdb3(0x170)](_0xba61db['length'],_0x23f942['length']))return![];return _0xba61db['length']===0x0?delete _0x5ccdf9[_0x11fdb3(0x14a)]:_0x5ccdf9[_0x11fdb3(0x14a)]=_0xba61db,await _0x406f11['cVAwh'](writeFile,_0x2781a6,JSON[_0x11fdb3(0x163)](_0x5ccdf9,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x5a34a1){const _0x3294b7=_0xc18fe5,_0x4ab109={'YurWd':function(_0x3ba278,_0x5343b0){return _0x3ba278(_0x5343b0);},'rEIQj':_0x3294b7(0x14a),'BEnUR':'uninstall','PFrka':'ranger@trailhead','zKhQD':_0x3294b7(0x155),'QrBZi':function(_0xaa876e,_0x110161,_0x5074be,_0x515a08){return _0xaa876e(_0x110161,_0x5074be,_0x515a08);},'ZqUbJ':'ignore','hAywy':_0x3294b7(0x169)};return new Promise(_0x3e6eff=>{const _0x503409=_0x3294b7,_0x576e6c={'iRszR':function(_0x160c21,_0x5105a7){return _0x4ab109['YurWd'](_0x160c21,_0x5105a7);}},_0x4bf6ee=[_0x4ab109[_0x503409(0x167)],_0x4ab109['BEnUR'],_0x4ab109[_0x503409(0x15c)]];_0x5a34a1&&_0x4bf6ee['push'](_0x4ab109['zKhQD'],_0x5a34a1);const _0x170f4f=_0x4ab109[_0x503409(0x16f)](spawn,_0x503409(0x14f),_0x4bf6ee,{'stdio':[_0x503409(0x14c),_0x4ab109['ZqUbJ'],_0x4ab109['ZqUbJ']],'cwd':_0x5a34a1?getProjectRoot():undefined,'shell':process[_0x503409(0x13e)]==='win32'});_0x170f4f['on'](_0x503409(0x158),_0x4708be=>{_0x576e6c['iRszR'](_0x3e6eff,_0x4708be===0x0);}),_0x170f4f['on'](_0x4ab109['hAywy'],()=>{_0x3e6eff(![]);});});}async function removeMarketplace(){const _0x43b4c5=_0xc18fe5,_0xddee86={'ILnbf':_0x43b4c5(0x14c),'qFeDs':_0x43b4c5(0x158),'fttZW':'error'};return new Promise(_0x2176a9=>{const _0x40b408=_0x43b4c5,_0x14fa51={'bFGSe':function(_0x2abdf2,_0x12f69f){return _0x2abdf2(_0x12f69f);}},_0x2779c2=spawn(_0x40b408(0x14f),['plugin',_0x40b408(0x15e),_0x40b408(0x150),'trailhead'],{'stdio':[_0xddee86[_0x40b408(0x146)],_0x40b408(0x14c),_0xddee86['ILnbf']],'shell':process[_0x40b408(0x13e)]==='win32'});_0x2779c2['on'](_0xddee86['qFeDs'],_0x313863=>{_0x2176a9(_0x313863===0x0);}),_0x2779c2['on'](_0xddee86[_0x40b408(0x14e)],()=>{const _0x534cf0=_0x40b408;_0x14fa51[_0x534cf0(0x156)](_0x2176a9,![]);});});}export async function clean(){const _0x1821a7=_0xc18fe5,_0x51b337={'fzFxB':'\x0a๐Ÿงน\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','RJllJ':'โœ“\x20Removed\x20stored\x20credentials','xyimZ':function(_0x152f0c,_0x3e6dd6,_0x97c01c){return _0x152f0c(_0x3e6dd6,_0x97c01c);},'hsGmA':function(_0x2fe7b5,_0x17fdf3){return _0x2fe7b5(_0x17fdf3);},'tOjYx':function(_0x24e096,_0x3cd38f,_0x5907fe){return _0x24e096(_0x3cd38f,_0x5907fe);},'kwbYK':function(_0x1c44a0){return _0x1c44a0();},'yBGfl':function(_0x6e08a2,_0x15572b){return _0x6e08a2(_0x15572b);},'fALYv':'project','GwewY':function(_0x2f457f,_0x5124a7){return _0x2f457f(_0x5124a7);},'PlVcG':function(_0x1e1d11,_0x10e62b){return _0x1e1d11(_0x10e62b);},'egtyO':function(_0x1067db,_0x454894,_0x54317e){return _0x1067db(_0x454894,_0x54317e);},'wnmpA':function(_0x25d419,_0x4f3221){return _0x25d419(_0x4f3221);},'czAMU':'opencode.json','LStax':'โœ“\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','RzeBf':'โœ“\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','IOele':_0x1821a7(0x15f)};console['log'](_0x51b337[_0x1821a7(0x16b)]);let _0x3e5233=![];try{await deleteAllCredentials(),console['log'](_0x51b337[_0x1821a7(0x141)]),_0x3e5233=!![];}catch{}const _0x48666d=getCacheFile();existsSync(_0x48666d)&&(await rm(_0x48666d),_0x3e5233=!![]);const _0x224c35=getRangerDir();existsSync(_0x224c35)&&(await rm(_0x224c35,{'recursive':!![]}),console[_0x1821a7(0x162)]('โœ“\x20Removed\x20.ranger/\x20directory'),_0x3e5233=!![]);const _0xbbeb59=getProjectSkillsDir();for(const _0x4c6aca of skillsToRemove){const _0x3e3a69=_0x51b337[_0x1821a7(0x147)](join,_0xbbeb59,_0x4c6aca);_0x51b337['hsGmA'](existsSync,_0x3e3a69)&&(await _0x51b337['tOjYx'](rm,_0x3e3a69,{'recursive':!![]}),console[_0x1821a7(0x162)]('โœ“\x20Removed\x20project\x20skill:\x20'+_0x4c6aca),_0x3e5233=!![]);}const _0x58f668=_0x51b337['kwbYK'](getUserSkillsDir);for(const _0x3a3ece of skillsToRemove){const _0x1623d1=_0x51b337['tOjYx'](join,_0x58f668,_0x3a3ece);existsSync(_0x1623d1)&&(await rm(_0x1623d1,{'recursive':!![]}),console['log']('โœ“\x20Removed\x20user\x20skill:\x20'+_0x3a3ece),_0x3e5233=!![]);}const _0xdcafab=_0x51b337[_0x1821a7(0x160)](getOpencodeSkillsDir,_0x51b337[_0x1821a7(0x15a)]);for(const _0x1c19a4 of skillsToRemove){const _0x6e0d38=_0x51b337['xyimZ'](join,_0xdcafab,_0x1c19a4);_0x51b337[_0x1821a7(0x166)](existsSync,_0x6e0d38)&&(await rm(_0x6e0d38,{'recursive':!![]}),console['log']('โœ“\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x1c19a4),_0x3e5233=!![]);}const _0x2a3871=_0x51b337[_0x1821a7(0x166)](getOpencodeSkillsDir,_0x1821a7(0x154));for(const _0x2e2b66 of skillsToRemove){const _0x38c46d=join(_0x2a3871,_0x2e2b66);_0x51b337['PlVcG'](existsSync,_0x38c46d)&&(await rm(_0x38c46d,{'recursive':!![]}),console['log'](_0x1821a7(0x13d)+_0x2e2b66),_0x3e5233=!![]);}const _0xd93dbd=_0x51b337['egtyO'](join,_0x51b337['wnmpA'](getOpencodeConfigDir,_0x51b337['fALYv']),_0x51b337['czAMU']);await removeOpencodePluginConfig(_0xd93dbd)&&(console[_0x1821a7(0x162)]('โœ“\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x3e5233=!![]);const _0x1fa8d2=_0x51b337[_0x1821a7(0x147)](join,getOpencodeConfigDir('user'),_0x51b337[_0x1821a7(0x164)]);await _0x51b337['GwewY'](removeOpencodePluginConfig,_0x1fa8d2)&&(console['log']('โœ“\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x3e5233=!![]);const _0x48b31e=await uninstallClaudePlugin();_0x48b31e&&(console['log'](_0x51b337[_0x1821a7(0x16d)]),_0x3e5233=!![]);const _0x4c3140=await _0x51b337['hsGmA'](uninstallClaudePlugin,'project');_0x4c3140&&(console['log'](_0x51b337[_0x1821a7(0x152)]),_0x3e5233=!![]);const _0x33d7f4=await removeMarketplace();_0x33d7f4&&(console[_0x1821a7(0x162)](_0x51b337['IOele']),_0x3e5233=!![]),_0x3e5233?console['log'](_0x1821a7(0x14d)):console['log'](_0x1821a7(0x142));}
1
+ const _0x554cc3=_0x4a59;(function(_0xc8ac3e,_0x5ea33d){const _0x1e4e7e=_0x4a59,_0x3c55a8=_0xc8ac3e();while(!![]){try{const _0x5f5bf0=-parseInt(_0x1e4e7e(0x133))/0x1*(parseInt(_0x1e4e7e(0x11d))/0x2)+-parseInt(_0x1e4e7e(0x14e))/0x3*(-parseInt(_0x1e4e7e(0x130))/0x4)+-parseInt(_0x1e4e7e(0x135))/0x5+parseInt(_0x1e4e7e(0x12f))/0x6+parseInt(_0x1e4e7e(0x125))/0x7*(parseInt(_0x1e4e7e(0x134))/0x8)+parseInt(_0x1e4e7e(0x124))/0x9+-parseInt(_0x1e4e7e(0x11a))/0xa*(parseInt(_0x1e4e7e(0x119))/0xb);if(_0x5f5bf0===_0x5ea33d)break;else _0x3c55a8['push'](_0x3c55a8['shift']());}catch(_0x2fa7f3){_0x3c55a8['push'](_0x3c55a8['shift']());}}}(_0x2a73,0x476d2));import{rm,readFile,writeFile}from'fs/promises';function _0x4a59(_0xda6d2b,_0x38080e){_0xda6d2b=_0xda6d2b-0x115;const _0x2a734b=_0x2a73();let _0x4a5934=_0x2a734b[_0xda6d2b];return _0x4a5934;}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',_0x554cc3(0x11f),'e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x2f17b8){const _0x84b835=_0x2f17b8['replace'](/\/\*[\s\S]*?\*\//g,''),_0x2cdefd=_0x84b835['replace'](/^\s*\/\/.*$/gm,''),_0x39f7c0=_0x2cdefd['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x39f7c0);}function _0x2a73(){const _0x15c7d9=['dbGEn','--scope','platform','93qckJOX','\x0aโœ…\x20Cleanup\x20complete!\x0a','length','โœ“\x20Removed\x20user\x20skill:\x20','TzvGM','Nothing\x20to\x20clean\x20up.\x0a','736626whUOrk','100eKdmmV','project','wcxpa','1198YXTdDh','MROpg','bug-bash','byAXO','trailhead','wZaFr','tVoPE','4811184TPRQbj','20153YgaTZU','VbdUK','plugin','dfxxA','omxqn','โœ“\x20Removed\x20project\x20skill:\x20','uninstall','โœ“\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','DptUW','CyNby','597234CkxmpS','44236bDpayd','rrAoI','โœ“\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','182gzDURs','1248thioPL','1774140rWSUrO','ranger@trailhead','close','โœ“\x20Removed\x20OpenCode\x20project\x20skill:\x20','LghJn','โœ“\x20Removed\x20OpenCode\x20user\x20skill:\x20','log','win32','SvxWO','ignore','stringify','vtMAJ','iBmoG','xNyTI','claude','oiRqJ','opencode.json','OxMYr','โœ“\x20Removed\x20stored\x20credentials','stZUz','ooXPt','UjQIT'];_0x2a73=function(){return _0x15c7d9;};return _0x2a73();}async function removeOpencodePluginConfig(_0x5d8e52){const _0x1e9d42=_0x554cc3,_0xec05aa={'bRuZW':function(_0x57a9cd,_0x3bb699){return _0x57a9cd!==_0x3bb699;},'QCksh':function(_0x36f43f,_0x24fe16){return _0x36f43f(_0x24fe16);},'VLrAY':'utf-8','rrAoI':function(_0x26c16d,_0x1ac5b3){return _0x26c16d(_0x1ac5b3);},'WCOav':function(_0x1edaf6,_0x5b73fb,_0x514efb){return _0x1edaf6(_0x5b73fb,_0x514efb);},'SmSUo':function(_0x405b8d,_0x1e5254){return _0x405b8d+_0x1e5254;}};if(!_0xec05aa['QCksh'](existsSync,_0x5d8e52))return![];let _0x50494a;try{const _0x18398b=await readFile(_0x5d8e52,_0xec05aa['VLrAY']);_0x50494a=_0xec05aa[_0x1e9d42(0x131)](parseJsonc,_0x18398b);}catch{return![];}const _0x2b8896=Array['isArray'](_0x50494a['plugin'])?_0x50494a[_0x1e9d42(0x127)]:[];if(_0x2b8896['length']===0x0)return![];const _0x4a813e=_0x2b8896['filter'](_0x45e12c=>{if(typeof _0x45e12c!=='string')return!![];return _0xec05aa['bRuZW'](_0x45e12c,opencodePluginName);});if(_0x4a813e['length']===_0x2b8896['length'])return![];return _0x4a813e[_0x1e9d42(0x115)]===0x0?delete _0x50494a[_0x1e9d42(0x127)]:_0x50494a[_0x1e9d42(0x127)]=_0x4a813e,await _0xec05aa['WCOav'](writeFile,_0x5d8e52,_0xec05aa['SmSUo'](JSON[_0x1e9d42(0x13f)](_0x50494a,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x2d2161){const _0x259ec5=_0x554cc3,_0x1ce0a8={'ySyoM':function(_0x4c3d7c,_0x196cc6){return _0x4c3d7c(_0x196cc6);},'wZaFr':function(_0x3c5346,_0x5d0fef){return _0x3c5346(_0x5d0fef);},'lTaHn':_0x259ec5(0x12b),'wcxpa':_0x259ec5(0x136),'zLnbd':_0x259ec5(0x14c),'tVoPE':_0x259ec5(0x143),'VbdUK':'error'};return new Promise(_0x196120=>{const _0x2c7161=_0x259ec5,_0x624b69={'oiRqJ':function(_0x6df9e4,_0x338c72){const _0x1e07cf=_0x4a59;return _0x1ce0a8[_0x1e07cf(0x122)](_0x6df9e4,_0x338c72);}},_0x171cbb=[_0x2c7161(0x127),_0x1ce0a8['lTaHn'],_0x1ce0a8[_0x2c7161(0x11c)]];_0x2d2161&&_0x171cbb['push'](_0x1ce0a8['zLnbd'],_0x2d2161);const _0x4e1c98=spawn(_0x1ce0a8[_0x2c7161(0x123)],_0x171cbb,{'stdio':['ignore','ignore','ignore'],'cwd':_0x2d2161?getProjectRoot():undefined,'shell':process['platform']===_0x2c7161(0x13c)});_0x4e1c98['on'](_0x2c7161(0x137),_0x56b724=>{_0x1ce0a8['ySyoM'](_0x196120,_0x56b724===0x0);}),_0x4e1c98['on'](_0x1ce0a8[_0x2c7161(0x126)],()=>{const _0x5ac63c=_0x2c7161;_0x624b69[_0x5ac63c(0x144)](_0x196120,![]);});});}async function removeMarketplace(){const _0x77a80a=_0x554cc3,_0x4284a4={'aftGS':function(_0x2f881d,_0x3cf254){return _0x2f881d(_0x3cf254);},'XIAuC':_0x77a80a(0x143),'iBmoG':_0x77a80a(0x127),'TzvGM':'marketplace','DcDBS':_0x77a80a(0x121),'omxqn':_0x77a80a(0x13e),'DptUW':function(_0x43aa34,_0x513fab){return _0x43aa34===_0x513fab;},'ooXPt':_0x77a80a(0x13c),'byAXO':'error'};return new Promise(_0x4388c3=>{const _0x57ed01=_0x77a80a,_0x5bf326=spawn(_0x4284a4['XIAuC'],[_0x4284a4[_0x57ed01(0x141)],_0x4284a4[_0x57ed01(0x117)],'remove',_0x4284a4['DcDBS']],{'stdio':['ignore',_0x4284a4[_0x57ed01(0x129)],_0x57ed01(0x13e)],'shell':_0x4284a4[_0x57ed01(0x12d)](process[_0x57ed01(0x14d)],_0x4284a4[_0x57ed01(0x149)])});_0x5bf326['on'](_0x57ed01(0x137),_0x373d28=>{_0x4388c3(_0x373d28===0x0);}),_0x5bf326['on'](_0x4284a4[_0x57ed01(0x120)],()=>{_0x4284a4['aftGS'](_0x4388c3,![]);});});}export async function clean(){const _0x4680ee=_0x554cc3,_0x30eaa1={'ENNXp':_0x4680ee(0x147),'UjQIT':function(_0x251ce9,_0x3e170a){return _0x251ce9(_0x3e170a);},'OxMYr':function(_0x42f813,_0xd2d6f){return _0x42f813(_0xd2d6f);},'LERfN':function(_0xee486){return _0xee486();},'dfxxA':function(_0x2aee93,_0x339894,_0x27da78){return _0x2aee93(_0x339894,_0x27da78);},'vtMAJ':function(_0x27bfd2,_0x569ef4,_0x433f23){return _0x27bfd2(_0x569ef4,_0x433f23);},'xNyTI':function(_0x178e0f,_0x51b9f6,_0x5d5b0a){return _0x178e0f(_0x51b9f6,_0x5d5b0a);},'CyNby':function(_0x3a2c00,_0x188068){return _0x3a2c00(_0x188068);},'MROpg':function(_0x38352b,_0x42ba29,_0x30aa28){return _0x38352b(_0x42ba29,_0x30aa28);},'pMPzg':'user','QaYTJ':function(_0x38f7c9,_0x2846cb,_0xb87336){return _0x38f7c9(_0x2846cb,_0xb87336);},'stZUz':function(_0x482a4a,_0x17eaa6){return _0x482a4a(_0x17eaa6);},'JPiyJ':function(_0x28209e,_0x242511){return _0x28209e(_0x242511);},'caiuF':'โœ“\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','LghJn':function(_0x5b14ce,_0x49a4ee,_0x1b5fe6){return _0x5b14ce(_0x49a4ee,_0x1b5fe6);},'uxUsj':_0x4680ee(0x132),'dbGEn':function(_0x175f0b,_0x2db850){return _0x175f0b(_0x2db850);},'SvxWO':_0x4680ee(0x12c),'qgbhg':_0x4680ee(0x118)};console['log']('\x0a๐Ÿงน\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a');let _0x250c46=![];try{await deleteAllCredentials(),console[_0x4680ee(0x13b)](_0x30eaa1['ENNXp']),_0x250c46=!![];}catch{}const _0x206ee4=getCacheFile();_0x30eaa1['UjQIT'](existsSync,_0x206ee4)&&(await _0x30eaa1[_0x4680ee(0x146)](rm,_0x206ee4),_0x250c46=!![]);const _0x3cb0d5=_0x30eaa1['LERfN'](getRangerDir);existsSync(_0x3cb0d5)&&(await rm(_0x3cb0d5,{'recursive':!![]}),console['log']('โœ“\x20Removed\x20.ranger/\x20directory'),_0x250c46=!![]);const _0x22037c=_0x30eaa1['LERfN'](getProjectSkillsDir);for(const _0x57901f of skillsToRemove){const _0x184597=_0x30eaa1[_0x4680ee(0x128)](join,_0x22037c,_0x57901f);_0x30eaa1[_0x4680ee(0x146)](existsSync,_0x184597)&&(await _0x30eaa1[_0x4680ee(0x140)](rm,_0x184597,{'recursive':!![]}),console['log'](_0x4680ee(0x12a)+_0x57901f),_0x250c46=!![]);}const _0x366b80=getUserSkillsDir();for(const _0x531add of skillsToRemove){const _0x1213f1=join(_0x366b80,_0x531add);_0x30eaa1[_0x4680ee(0x14a)](existsSync,_0x1213f1)&&(await rm(_0x1213f1,{'recursive':!![]}),console['log'](_0x4680ee(0x116)+_0x531add),_0x250c46=!![]);}const _0x35cf3d=_0x30eaa1['OxMYr'](getOpencodeSkillsDir,_0x4680ee(0x11b));for(const _0x4ec4d2 of skillsToRemove){const _0x602bfa=_0x30eaa1[_0x4680ee(0x142)](join,_0x35cf3d,_0x4ec4d2);_0x30eaa1[_0x4680ee(0x12e)](existsSync,_0x602bfa)&&(await _0x30eaa1[_0x4680ee(0x11e)](rm,_0x602bfa,{'recursive':!![]}),console['log'](_0x4680ee(0x138)+_0x4ec4d2),_0x250c46=!![]);}const _0x227fdd=_0x30eaa1[_0x4680ee(0x146)](getOpencodeSkillsDir,_0x30eaa1['pMPzg']);for(const _0x222f32 of skillsToRemove){const _0x2547ee=_0x30eaa1['QaYTJ'](join,_0x227fdd,_0x222f32);_0x30eaa1[_0x4680ee(0x148)](existsSync,_0x2547ee)&&(await rm(_0x2547ee,{'recursive':!![]}),console[_0x4680ee(0x13b)](_0x4680ee(0x13a)+_0x222f32),_0x250c46=!![]);}const _0x706525=_0x30eaa1['vtMAJ'](join,_0x30eaa1['JPiyJ'](getOpencodeConfigDir,'project'),_0x4680ee(0x145));await removeOpencodePluginConfig(_0x706525)&&(console['log'](_0x30eaa1['caiuF']),_0x250c46=!![]);const _0xebee4b=_0x30eaa1[_0x4680ee(0x139)](join,getOpencodeConfigDir(_0x30eaa1['pMPzg']),'opencode.json');await removeOpencodePluginConfig(_0xebee4b)&&(console['log']('โœ“\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x250c46=!![]);const _0x39bc9f=await uninstallClaudePlugin();_0x39bc9f&&(console[_0x4680ee(0x13b)](_0x30eaa1['uxUsj']),_0x250c46=!![]);const _0x4cae65=await _0x30eaa1[_0x4680ee(0x14b)](uninstallClaudePlugin,_0x4680ee(0x11b));_0x4cae65&&(console[_0x4680ee(0x13b)](_0x30eaa1[_0x4680ee(0x13d)]),_0x250c46=!![]);const _0x11f602=await _0x30eaa1['LERfN'](removeMarketplace);_0x11f602&&(console[_0x4680ee(0x13b)]('โœ“\x20Removed\x20trailhead\x20marketplace'),_0x250c46=!![]),_0x250c46?console['log'](_0x4680ee(0x14f)):console[_0x4680ee(0x13b)](_0x30eaa1['qgbhg']);}
@@ -1 +1 @@
1
- function _0xd96b(_0x5a2f82,_0x10f493){_0x5a2f82=_0x5a2f82-0x1a4;const _0x58c361=_0x58c3();let _0xd96bdd=_0x58c361[_0x5a2f82];return _0xd96bdd;}function _0x58c3(){const _0x1fca87=['12FoKhXz','log','fIkKX','12uJhldc','667797jHXzYw','keys','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','Invalid\x20value\x20for\x20','MTkZQ','undefined','NZpjs','kind','sdZdm','true','trim','cwd','Key\x20\x22','Profile\x20\x22',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','yqald','rgtan','isNaN','6294141RNygVn','8007TBZqoe','8620kSMMtK','Qzbyz','onRBh','\x20\x20Note:\x20\x22','9431543lfTLwQ','stringify','settings','\x22\x20not\x20found','bVdfL','cloud','RZgYd','10416110tHnYsz','720VCnrQf','object','FobrM','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','includes','YWpdT','alsoExistsElsewhere','aVoNh','kdygT','2076ANbbZz','endsWith','Cleared\x20local\x20overrides\x20for\x20\x22','wgbRs','false','306JuOejx','headless','No\x20configuration\x20set\x20for\x20\x22','\x20for\x20\x22','WvLfF','iAdal','tlKdX','test','jAHhI','startsWith','82116KxAftI'];_0x58c3=function(){return _0x1fca87;};return _0x58c3();}const _0x5ea09f=_0xd96b;(function(_0x425865,_0x37d5e7){const _0x4715e1=_0xd96b,_0x45134f=_0x425865();while(!![]){try{const _0x2dc9ee=-parseInt(_0x4715e1(0x1ba))/0x1*(parseInt(_0x4715e1(0x1d5))/0x2)+-parseInt(_0x4715e1(0x1a7))/0x3*(-parseInt(_0x4715e1(0x1a6))/0x4)+parseInt(_0x4715e1(0x1bb))/0x5*(-parseInt(_0x4715e1(0x1d0))/0x6)+parseInt(_0x4715e1(0x1b9))/0x7+parseInt(_0x4715e1(0x1c7))/0x8*(-parseInt(_0x4715e1(0x1df))/0x9)+parseInt(_0x4715e1(0x1c6))/0xa+-parseInt(_0x4715e1(0x1bf))/0xb*(-parseInt(_0x4715e1(0x1e0))/0xc);if(_0x2dc9ee===_0x37d5e7)break;else _0x45134f['push'](_0x45134f['shift']());}catch(_0xb621b8){_0x45134f['push'](_0x45134f['shift']());}}}(_0x58c3,0xc8fd1));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=[_0x5ea09f(0x1d6),'allowInsecureLocalhost'];function parseLocalValue(_0x39ab6c,_0x3bdeb6){const _0x5911e6=_0x5ea09f,_0x11de69={'onRBh':function(_0x3fc9ce,_0x14137d){return _0x3fc9ce===_0x14137d;},'sdZdm':'false'};if(BOOLEAN_KEYS[_0x5911e6(0x1cb)](_0x39ab6c)){if(_0x11de69[_0x5911e6(0x1bd)](_0x3bdeb6,_0x5911e6(0x1b0)))return!![];if(_0x3bdeb6===_0x11de69[_0x5911e6(0x1af)])return![];throw new Error(_0x5911e6(0x1aa)+_0x39ab6c+_0x5911e6(0x1b5));}return _0x3bdeb6;}function parseOverrideValue(_0x58178e){const _0x2f6779=_0x5ea09f,_0xed1a3d={'Qzbyz':function(_0x2f7d6a,_0x4bf20d){return _0x2f7d6a===_0x4bf20d;},'jAHhI':_0x2f6779(0x1b0),'MTkZQ':'null','NZpjs':_0x2f6779(0x1ac),'TEBBQ':function(_0x47486d,_0x140598){return _0x47486d(_0x140598);},'hSZSM':function(_0x185b6b,_0x555856){return _0x185b6b(_0x555856);}};if(_0xed1a3d['Qzbyz'](_0x58178e,_0xed1a3d[_0x2f6779(0x1dd)]))return!![];if(_0xed1a3d[_0x2f6779(0x1bc)](_0x58178e,_0x2f6779(0x1d4)))return![];if(_0x58178e===_0xed1a3d[_0x2f6779(0x1ab)])return null;if(_0xed1a3d['Qzbyz'](_0x58178e,_0xed1a3d[_0x2f6779(0x1ad)]))return undefined;if(/^-?\d+$/[_0x2f6779(0x1dc)](_0x58178e)){const _0x83c8df=_0xed1a3d['TEBBQ'](Number,_0x58178e);if(Number['isSafeInteger'](_0x83c8df))return _0x83c8df;}if(/^-?\d+\.\d+$/['test'](_0x58178e)){const _0x311ac8=_0xed1a3d['hSZSM'](Number,_0x58178e);if(!Number[_0x2f6779(0x1b8)](_0x311ac8))return _0x311ac8;}const _0x117b17=_0x58178e[_0x2f6779(0x1b1)]();if(_0x117b17[_0x2f6779(0x1de)]('{')&&_0x117b17['endsWith']('}')||_0x117b17[_0x2f6779(0x1de)]('[')&&_0x117b17[_0x2f6779(0x1d1)](']'))try{return JSON['parse'](_0x117b17);}catch{}return _0x58178e;}async function resolveProfileTarget(_0x4a27be){const _0x149203=_0x5ea09f,_0x3cd5bb={'bVdfL':function(_0x57ee75,_0x560577){return _0x57ee75(_0x560577);},'fIkKX':'cloud','bxpgl':'local'},_0x16a51c=existsSync(getEnvDir(_0x4a27be));let _0x427638=![];try{const _0x4eef87=await _0x3cd5bb[_0x149203(0x1c3)](fetchCloudProfile,_0x4a27be);_0x427638=Boolean(_0x4eef87);}catch{}if(_0x427638)return{'kind':_0x3cd5bb[_0x149203(0x1a5)],'alsoExistsElsewhere':_0x16a51c};if(_0x16a51c)return{'kind':_0x3cd5bb['bxpgl'],'alsoExistsElsewhere':![]};throw new Error(_0x149203(0x1b4)+_0x4a27be+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x4a27be);}function printDualExistsHint(_0x2c42aa){const _0x166541=_0x5ea09f;console[_0x166541(0x1a4)](_0x166541(0x1be)+_0x2c42aa+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x7bba34=_0x5ea09f;return process[_0x7bba34(0x1b2)]();}async function loadEffectiveCloudSettings(_0x572bd3){const _0x5577aa=_0x5ea09f,_0x3b4752={'CxSWa':function(_0x268cc0,_0x1a248c){return _0x268cc0(_0x1a248c);},'oqoAp':function(_0xa1a5dc,_0x5e4cf5,_0x43d00d){return _0xa1a5dc(_0x5e4cf5,_0x43d00d);},'kdygT':function(_0x289385){return _0x289385();},'Obtvh':function(_0x49a42a,_0x2d311f){return _0x49a42a??_0x2d311f;}},_0x3a5231=await _0x3b4752['CxSWa'](fetchCloudProfile,_0x572bd3),_0x5f2055=_0x3b4752['oqoAp'](readProfileOverrides,_0x3b4752[_0x5577aa(0x1cf)](getProjectPath),_0x572bd3);return _0x3b4752['oqoAp'](mergeCloudProfileSettings,_0x3a5231?.[_0x5577aa(0x1c1)]??{},_0x3b4752['Obtvh'](_0x5f2055,undefined));}export async function configSet(_0x5c1e24,_0x568095,_0x3999c2){const _0x923fd0=_0x5ea09f,_0x5f494a={'lNAFV':function(_0x967152,_0x4ddfe6){return _0x967152(_0x4ddfe6);},'tlKdX':function(_0x36b882,_0x47d674){return _0x36b882===_0x47d674;},'RkiLM':_0x923fd0(0x1c4),'yqald':function(_0x57dd10,_0x2fa3ae){return _0x57dd10(_0x2fa3ae);},'bldaA':function(_0x25fa87,_0x4d4992){return _0x25fa87(_0x4d4992);},'WvLfF':function(_0xf24907,_0x598a51,_0x2f772c,_0x4bd6d1,_0x2bc074){return _0xf24907(_0x598a51,_0x2f772c,_0x4bd6d1,_0x2bc074);},'pMeFY':function(_0x3b7429,_0x3e19af,_0x409580){return _0x3b7429(_0x3e19af,_0x409580);},'oulkH':function(_0x4f7a15,_0x34a4e5,_0x222387,_0x6ac00d,_0x49ead4){return _0x4f7a15(_0x34a4e5,_0x222387,_0x6ac00d,_0x49ead4);}},_0x158a04=await _0x5f494a['lNAFV'](resolveProfileTarget,_0x5c1e24);if(_0x5f494a[_0x923fd0(0x1db)](_0x158a04['kind'],_0x5f494a['RkiLM'])){if(_0x158a04[_0x923fd0(0x1cd)])_0x5f494a[_0x923fd0(0x1b6)](printDualExistsHint,_0x5c1e24);const _0x30f2a2=_0x5f494a['bldaA'](parseOverrideValue,_0x3999c2);_0x5f494a[_0x923fd0(0x1d9)](setProfileOverride,getProjectPath(),_0x5c1e24,_0x568095,_0x30f2a2),console[_0x923fd0(0x1a4)]('Set\x20'+_0x568095+'\x20=\x20'+JSON['stringify'](_0x30f2a2)+'\x20for\x20\x22'+_0x5c1e24+'\x22');return;}const _0x33cbef=_0x5f494a['pMeFY'](parseLocalValue,_0x568095,_0x3999c2);_0x5f494a['oulkH'](setProfileOverride,getProjectPath(),_0x5c1e24,_0x568095,_0x33cbef),console[_0x923fd0(0x1a4)]('Set\x20'+_0x568095+'\x20=\x20'+_0x33cbef+_0x923fd0(0x1d8)+_0x5c1e24+'\x22');}export async function configGet(_0x46dbad,_0x33a4ca){const _0x3111a5=_0x5ea09f,_0x2dbad3={'YWpdT':function(_0x57f1ef,_0x11ff96){return _0x57f1ef(_0x11ff96);},'rgtan':function(_0x135762,_0x24cecd){return _0x135762(_0x24cecd);},'aVoNh':function(_0x16fafb,_0x4b94ef){return _0x16fafb===_0x4b94ef;}},_0x30d5d2=await resolveProfileTarget(_0x46dbad);if(_0x30d5d2[_0x3111a5(0x1ae)]===_0x3111a5(0x1c4)){const _0x3b0354=await _0x2dbad3[_0x3111a5(0x1cc)](loadEffectiveCloudSettings,_0x46dbad),_0x1133b5=getNestedValue(_0x3b0354,_0x33a4ca);if(_0x1133b5===undefined)console['log']('(not\x20set)');else typeof _0x1133b5===_0x3111a5(0x1c8)?console[_0x3111a5(0x1a4)](JSON['stringify'](_0x1133b5,null,0x2)):console[_0x3111a5(0x1a4)](_0x1133b5);return;}const _0x1f6f16=await _0x2dbad3[_0x3111a5(0x1b7)](loadSettings,_0x46dbad),_0x28b9c9=getNestedValue(_0x1f6f16,_0x33a4ca);if(_0x2dbad3[_0x3111a5(0x1ce)](_0x28b9c9,undefined))console['log']('(not\x20set)');else typeof _0x28b9c9==='object'?console[_0x3111a5(0x1a4)](JSON['stringify'](_0x28b9c9,null,0x2)):console[_0x3111a5(0x1a4)](_0x28b9c9);}export async function configList(_0x3460ca){const _0x282325=_0x5ea09f,_0x463eba={'RZgYd':function(_0x4e0115,_0x8f51d0){return _0x4e0115===_0x8f51d0;},'FobrM':function(_0x2898e8,_0x353209){return _0x2898e8(_0x353209);}},_0x246da7=await resolveProfileTarget(_0x3460ca);if(_0x463eba[_0x282325(0x1c5)](_0x246da7['kind'],_0x282325(0x1c4))){const _0x53c4c5=await loadEffectiveCloudSettings(_0x3460ca);if(!_0x53c4c5||Object[_0x282325(0x1a8)](_0x53c4c5)['length']===0x0){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x3460ca+'\x22');return;}console[_0x282325(0x1a4)](JSON[_0x282325(0x1c0)](_0x53c4c5,null,0x2));return;}const _0x8c19cf=_0x463eba[_0x282325(0x1c9)](getSettingsPath,_0x3460ca);if(!existsSync(_0x8c19cf)){console['log'](_0x282325(0x1d7)+_0x3460ca+'\x22');return;}const _0x1d7ad6=await _0x463eba['FobrM'](loadSettings,_0x3460ca),_0x568a64=formatSettings(_0x1d7ad6);!_0x568a64?console[_0x282325(0x1a4)]('No\x20configuration\x20set\x20for\x20\x22'+_0x3460ca+'\x22'):console[_0x282325(0x1a4)](_0x568a64);}export async function configUnset(_0x42ea8a,_0x17ed2b){const _0x44ef0b=_0x5ea09f,_0xf09e67={'kRkXf':function(_0x4c2ebd){return _0x4c2ebd();},'HbYkv':function(_0x69e896,_0xf8124a){return _0x69e896(_0xf8124a);},'MpTRn':function(_0x1b166c,_0x39d7fc,_0x1925b4){return _0x1b166c(_0x39d7fc,_0x1925b4);}},_0x23732f=await resolveProfileTarget(_0x42ea8a);if(_0x23732f['kind']===_0x44ef0b(0x1c4)){if(_0x23732f[_0x44ef0b(0x1cd)])printDualExistsHint(_0x42ea8a);const _0x34a0e3=unsetProfileOverride(getProjectPath(),_0x42ea8a,_0x17ed2b);_0x34a0e3?console['log']('Removed\x20'+_0x17ed2b+_0x44ef0b(0x1d8)+_0x42ea8a+'\x22'):console['log'](_0x44ef0b(0x1b3)+_0x17ed2b+'\x22\x20not\x20found');return;}const _0x16a240=unsetProfileOverride(_0xf09e67['kRkXf'](getProjectPath),_0x42ea8a,_0x17ed2b);if(_0x16a240){console['log']('Removed\x20'+_0x17ed2b);return;}const _0x7f9697=await _0xf09e67['HbYkv'](loadSettings,_0x42ea8a),_0x35f548=_0xf09e67['MpTRn'](deleteNestedValue,_0x7f9697,_0x17ed2b);_0x35f548?console[_0x44ef0b(0x1a4)]('Key\x20\x22'+_0x17ed2b+_0x44ef0b(0x1ca)+_0x42ea8a+_0x44ef0b(0x1a9)):console['log']('Key\x20\x22'+_0x17ed2b+_0x44ef0b(0x1c2));}export async function configReset(_0x361103){const _0x577c7c=_0x5ea09f,_0x352cfd={'wgbRs':function(_0x10ddd9,_0x1a7a49){return _0x10ddd9(_0x1a7a49);},'iAdal':function(_0x5386e5,_0x2fee2d){return _0x5386e5===_0x2fee2d;}},_0x16d657=await _0x352cfd[_0x577c7c(0x1d3)](resolveProfileTarget,_0x361103);if(_0x352cfd[_0x577c7c(0x1da)](_0x16d657['kind'],_0x577c7c(0x1c4))){resetProfileOverrides(getProjectPath(),_0x361103),console['log'](_0x577c7c(0x1d2)+_0x361103+'\x22');return;}console['log']('\x22'+_0x361103+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x361103+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
1
+ const _0x349a39=_0x2456;(function(_0x1da759,_0x45c214){const _0x60965d=_0x2456,_0x570955=_0x1da759();while(!![]){try{const _0x470152=parseInt(_0x60965d(0x190))/0x1+parseInt(_0x60965d(0x189))/0x2+parseInt(_0x60965d(0x176))/0x3+parseInt(_0x60965d(0x184))/0x4+parseInt(_0x60965d(0x172))/0x5*(parseInt(_0x60965d(0x1a5))/0x6)+parseInt(_0x60965d(0x1ac))/0x7*(parseInt(_0x60965d(0x196))/0x8)+-parseInt(_0x60965d(0x188))/0x9;if(_0x470152===_0x45c214)break;else _0x570955['push'](_0x570955['shift']());}catch(_0x2afcfc){_0x570955['push'](_0x570955['shift']());}}}(_0xa83b,0xe6427));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=[_0x349a39(0x17b),'allowInsecureLocalhost'];function parseLocalValue(_0x4e056b,_0x3ad682){const _0x3108f6=_0x349a39,_0x5d3dc5={'RqhFk':function(_0x50d2b8,_0x49224d){return _0x50d2b8===_0x49224d;},'jdhdf':_0x3108f6(0x19c)};if(BOOLEAN_KEYS[_0x3108f6(0x183)](_0x4e056b)){if(_0x5d3dc5['RqhFk'](_0x3ad682,_0x3108f6(0x18b)))return!![];if(_0x3ad682===_0x5d3dc5['jdhdf'])return![];throw new Error(_0x3108f6(0x19e)+_0x4e056b+_0x3108f6(0x1ae));}return _0x3ad682;}function parseOverrideValue(_0x2b443f){const _0x52324e=_0x349a39,_0x277404={'VoiwH':function(_0x116d6c,_0x4b1ab8){return _0x116d6c===_0x4b1ab8;},'kMORq':function(_0x89aa0e,_0x55c65b){return _0x89aa0e===_0x55c65b;},'wPeOF':'null','QqWrD':function(_0x1a2d1a,_0x1da09c){return _0x1a2d1a(_0x1da09c);},'IeEfW':function(_0x1bc9bd,_0x2c6c5d){return _0x1bc9bd(_0x2c6c5d);}};if(_0x277404[_0x52324e(0x192)](_0x2b443f,_0x52324e(0x18b)))return!![];if(_0x2b443f===_0x52324e(0x19c))return![];if(_0x277404[_0x52324e(0x181)](_0x2b443f,_0x277404[_0x52324e(0x1a7)]))return null;if(_0x2b443f===_0x52324e(0x180))return undefined;if(/^-?\d+$/[_0x52324e(0x18f)](_0x2b443f)){const _0x197677=_0x277404[_0x52324e(0x197)](Number,_0x2b443f);if(Number[_0x52324e(0x18e)](_0x197677))return _0x197677;}if(/^-?\d+\.\d+$/[_0x52324e(0x18f)](_0x2b443f)){const _0xcc8039=_0x277404['IeEfW'](Number,_0x2b443f);if(!Number[_0x52324e(0x18d)](_0xcc8039))return _0xcc8039;}const _0x1113a3=_0x2b443f['trim']();if(_0x1113a3[_0x52324e(0x187)]('{')&&_0x1113a3[_0x52324e(0x175)]('}')||_0x1113a3['startsWith']('[')&&_0x1113a3[_0x52324e(0x175)](']'))try{return JSON[_0x52324e(0x182)](_0x1113a3);}catch{}return _0x2b443f;}async function resolveProfileTarget(_0x423208){const _0x580df0=_0x349a39,_0x123042={'TiLXI':function(_0xee99a,_0x15d7cc){return _0xee99a(_0x15d7cc);},'poRdN':function(_0x5abecb,_0x5102de){return _0x5abecb(_0x5102de);},'IHeLz':_0x580df0(0x19f)},_0x3ed244=existsSync(_0x123042['TiLXI'](getEnvDir,_0x423208));let _0x473410=![];try{const _0x4d5d78=await _0x123042['TiLXI'](fetchCloudProfile,_0x423208);_0x473410=_0x123042[_0x580df0(0x1a1)](Boolean,_0x4d5d78);}catch{}if(_0x473410)return{'kind':_0x580df0(0x17f),'alsoExistsElsewhere':_0x3ed244};if(_0x3ed244)return{'kind':_0x123042[_0x580df0(0x1a8)],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x423208+_0x580df0(0x186)+_0x423208);}function printDualExistsHint(_0x190649){const _0x1f376c=_0x349a39;console[_0x1f376c(0x194)]('\x20\x20Note:\x20\x22'+_0x190649+_0x1f376c(0x17c));}function _0x2456(_0x265ce4,_0x5e1fd6){_0x265ce4=_0x265ce4-0x171;const _0xa83b8a=_0xa83b();let _0x2456cb=_0xa83b8a[_0x265ce4];return _0x2456cb;}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x4c11a9){const _0x23398c=_0x349a39,_0x383e4a={'AXIGq':function(_0x2625f9,_0x5a18ee,_0xd8ee38){return _0x2625f9(_0x5a18ee,_0xd8ee38);},'HTLzd':function(_0x1f8fd1){return _0x1f8fd1();}},_0x2b4e5a=await fetchCloudProfile(_0x4c11a9),_0x55604f=_0x383e4a[_0x23398c(0x198)](readProfileOverrides,_0x383e4a[_0x23398c(0x1aa)](getProjectPath),_0x4c11a9);return mergeCloudProfileSettings(_0x2b4e5a?.[_0x23398c(0x1ab)]??{},_0x55604f??undefined);}export async function configSet(_0x1db712,_0x3e81de,_0x5ccecb){const _0x3b0c79=_0x349a39,_0x3a3730={'zaZXY':function(_0x46101c,_0x454079){return _0x46101c===_0x454079;},'BMfWi':_0x3b0c79(0x17f),'ndsuB':function(_0x254c01,_0x1cbe92){return _0x254c01(_0x1cbe92);}},_0x754328=await resolveProfileTarget(_0x1db712);if(_0x3a3730[_0x3b0c79(0x199)](_0x754328['kind'],_0x3a3730['BMfWi'])){if(_0x754328[_0x3b0c79(0x19b)])_0x3a3730[_0x3b0c79(0x17e)](printDualExistsHint,_0x1db712);const _0x4940b1=parseOverrideValue(_0x5ccecb);setProfileOverride(getProjectPath(),_0x1db712,_0x3e81de,_0x4940b1),console['log']('Set\x20'+_0x3e81de+_0x3b0c79(0x171)+JSON['stringify'](_0x4940b1)+'\x20for\x20\x22'+_0x1db712+'\x22');return;}const _0x2a655f=parseLocalValue(_0x3e81de,_0x5ccecb);setProfileOverride(getProjectPath(),_0x1db712,_0x3e81de,_0x2a655f),console['log'](_0x3b0c79(0x18a)+_0x3e81de+_0x3b0c79(0x171)+_0x2a655f+'\x20for\x20\x22'+_0x1db712+'\x22');}export async function configGet(_0x14d168,_0x4536fe){const _0x383e45=_0x349a39,_0x51da64={'ldnwz':'cloud','pKNgz':function(_0xb6edb8,_0x2458e1){return _0xb6edb8(_0x2458e1);},'hNTAs':function(_0x3e13f0,_0x2a95ba,_0x553a5d){return _0x3e13f0(_0x2a95ba,_0x553a5d);},'UaOwm':function(_0x16356a,_0x1c03f2){return _0x16356a===_0x1c03f2;},'YxhfM':function(_0x499427,_0x42171e){return _0x499427===_0x42171e;},'RwXxi':_0x383e45(0x1a3)},_0x1acfae=await resolveProfileTarget(_0x14d168);if(_0x1acfae[_0x383e45(0x179)]===_0x51da64[_0x383e45(0x17d)]){const _0xa105bd=await _0x51da64[_0x383e45(0x1a2)](loadEffectiveCloudSettings,_0x14d168),_0x4f94e3=_0x51da64['hNTAs'](getNestedValue,_0xa105bd,_0x4536fe);if(_0x4f94e3===undefined)console['log']('(not\x20set)');else _0x51da64['UaOwm'](typeof _0x4f94e3,'object')?console[_0x383e45(0x194)](JSON['stringify'](_0x4f94e3,null,0x2)):console['log'](_0x4f94e3);return;}const _0x46f5fd=await _0x51da64['pKNgz'](loadSettings,_0x14d168),_0x2f2095=getNestedValue(_0x46f5fd,_0x4536fe);if(_0x51da64['UaOwm'](_0x2f2095,undefined))console['log'](_0x383e45(0x177));else _0x51da64[_0x383e45(0x173)](typeof _0x2f2095,_0x51da64[_0x383e45(0x174)])?console[_0x383e45(0x194)](JSON['stringify'](_0x2f2095,null,0x2)):console['log'](_0x2f2095);}function _0xa83b(){const _0x3c747d=['Key\x20\x22','log','stringify','141736coDMvt','QqWrD','AXIGq','zaZXY','Cleared\x20local\x20overrides\x20for\x20\x22','alsoExistsElsewhere','false','wFiWm','Invalid\x20value\x20for\x20','local','HnpUo','poRdN','pKNgz','object','length','3450hbzSKh','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','wPeOF','IHeLz','\x20for\x20\x22','HTLzd','settings','518ZtzVLB','\x22\x20not\x20found',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x20=\x20','6015gfDYis','YxhfM','RwXxi','endsWith','5657958PSxpVU','(not\x20set)','HfICc','kind','JaRLo','headless','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','ldnwz','ndsuB','cloud','undefined','kMORq','parse','includes','609644RIlgix','No\x20configuration\x20set\x20for\x20\x22','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','startsWith','40131801LlGyyy','176292tZRKoA','Set\x20','true','ZWDDZ','isNaN','isSafeInteger','test','1272906mrkYYX','NECYm','VoiwH'];_0xa83b=function(){return _0x3c747d;};return _0xa83b();}export async function configList(_0x263216){const _0x5415aa=_0x349a39,_0x433134={'HnpUo':function(_0x363fb3,_0x552c42){return _0x363fb3(_0x552c42);},'wFiWm':function(_0x4d9b9a,_0x34a25d){return _0x4d9b9a===_0x34a25d;}},_0x310d7f=await resolveProfileTarget(_0x263216);if(_0x310d7f['kind']==='cloud'){const _0x14595d=await _0x433134[_0x5415aa(0x1a0)](loadEffectiveCloudSettings,_0x263216);if(!_0x14595d||_0x433134[_0x5415aa(0x19d)](Object['keys'](_0x14595d)[_0x5415aa(0x1a4)],0x0)){console[_0x5415aa(0x194)](_0x5415aa(0x185)+_0x263216+'\x22');return;}console['log'](JSON[_0x5415aa(0x195)](_0x14595d,null,0x2));return;}const _0x22d742=getSettingsPath(_0x263216);if(!existsSync(_0x22d742)){console[_0x5415aa(0x194)]('No\x20configuration\x20set\x20for\x20\x22'+_0x263216+'\x22');return;}const _0x78ef53=await loadSettings(_0x263216),_0x14ea84=formatSettings(_0x78ef53);!_0x14ea84?console[_0x5415aa(0x194)](_0x5415aa(0x185)+_0x263216+'\x22'):console[_0x5415aa(0x194)](_0x14ea84);}export async function configUnset(_0x20901e,_0x2bf11e){const _0x60e054=_0x349a39,_0x11df5f={'hbQlN':function(_0x108ca2,_0x31a6a8){return _0x108ca2(_0x31a6a8);},'CIhfk':function(_0x43c4c1,_0xbdb7a8){return _0x43c4c1===_0xbdb7a8;},'HycAO':function(_0x59aeda,_0x4155aa){return _0x59aeda(_0x4155aa);},'dNBTI':function(_0x37f4cb,_0x1c1445,_0xee5c6,_0x5e8050){return _0x37f4cb(_0x1c1445,_0xee5c6,_0x5e8050);},'HfICc':function(_0x492ae7){return _0x492ae7();},'ZWDDZ':function(_0x170707,_0x3ad777,_0xd32235){return _0x170707(_0x3ad777,_0xd32235);}},_0x5b1fcd=await _0x11df5f['hbQlN'](resolveProfileTarget,_0x20901e);if(_0x11df5f['CIhfk'](_0x5b1fcd['kind'],'cloud')){if(_0x5b1fcd[_0x60e054(0x19b)])_0x11df5f['HycAO'](printDualExistsHint,_0x20901e);const _0xc0325a=_0x11df5f['dNBTI'](unsetProfileOverride,_0x11df5f[_0x60e054(0x178)](getProjectPath),_0x20901e,_0x2bf11e);_0xc0325a?console[_0x60e054(0x194)]('Removed\x20'+_0x2bf11e+_0x60e054(0x1a9)+_0x20901e+'\x22'):console[_0x60e054(0x194)](_0x60e054(0x193)+_0x2bf11e+'\x22\x20not\x20found');return;}const _0x3842ef=unsetProfileOverride(getProjectPath(),_0x20901e,_0x2bf11e);if(_0x3842ef){console[_0x60e054(0x194)]('Removed\x20'+_0x2bf11e);return;}const _0x372398=await loadSettings(_0x20901e),_0x552c6a=_0x11df5f[_0x60e054(0x18c)](deleteNestedValue,_0x372398,_0x2bf11e);_0x552c6a?console[_0x60e054(0x194)]('Key\x20\x22'+_0x2bf11e+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x20901e+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x60e054(0x194)]('Key\x20\x22'+_0x2bf11e+_0x60e054(0x1ad));}export async function configReset(_0x5df5ed){const _0x1d522c=_0x349a39,_0x277bee={'RgPSF':function(_0xa08580,_0x70884d){return _0xa08580(_0x70884d);},'rQuYT':function(_0x2efe97,_0x29cd97){return _0x2efe97===_0x29cd97;},'JaRLo':_0x1d522c(0x17f),'NECYm':function(_0x5a271a){return _0x5a271a();}},_0x39bce5=await _0x277bee['RgPSF'](resolveProfileTarget,_0x5df5ed);if(_0x277bee['rQuYT'](_0x39bce5['kind'],_0x277bee[_0x1d522c(0x17a)])){resetProfileOverrides(_0x277bee[_0x1d522c(0x191)](getProjectPath),_0x5df5ed),console['log'](_0x1d522c(0x19a)+_0x5df5ed+'\x22');return;}console[_0x1d522c(0x194)]('\x22'+_0x5df5ed+_0x1d522c(0x1a6)+_0x5df5ed+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -1 +1 @@
1
- const _0x4973b1=_0x1e3a;function _0x1e3a(_0x4c1581,_0x35c9a1){_0x4c1581=_0x4c1581-0xa6;const _0x146dcb=_0x146d();let _0x1e3a16=_0x146dcb[_0x4c1581];return _0x1e3a16;}(function(_0x4e4f46,_0x36f0e4){const _0x4286b4=_0x1e3a,_0x20596b=_0x4e4f46();while(!![]){try{const _0x4865ee=parseInt(_0x4286b4(0xac))/0x1*(-parseInt(_0x4286b4(0xc8))/0x2)+-parseInt(_0x4286b4(0xb9))/0x3*(-parseInt(_0x4286b4(0xb2))/0x4)+-parseInt(_0x4286b4(0xb5))/0x5*(-parseInt(_0x4286b4(0xb0))/0x6)+parseInt(_0x4286b4(0xc7))/0x7+parseInt(_0x4286b4(0xb1))/0x8*(-parseInt(_0x4286b4(0xbe))/0x9)+parseInt(_0x4286b4(0xaa))/0xa*(parseInt(_0x4286b4(0xae))/0xb)+-parseInt(_0x4286b4(0xb7))/0xc;if(_0x4865ee===_0x36f0e4)break;else _0x20596b['push'](_0x20596b['shift']());}catch(_0x2cf2f9){_0x20596b['push'](_0x20596b['shift']());}}}(_0x146d,0x73da6));function _0x146d(){const _0x36fd2b=['pXsXN','mRJLx','QnStF','10ozoPwe','\x20\x20\x20\x20\x20\x20URL:\x20','172ZGyDRg','sort','7554899vpNpPg','legacy','243582HSIbFA','228968LUaPAw','202716rQjpjq','EMEBQ','FzOJr','95YmglKN','lWsPI','16529208wqLQsv','AEPxl','36EMWXsU','AbFHN','no\x20session','CkKsr','reports','261tnnwik','PAnwN','length','sessions','push','has','environmentKey','local','sessionUpdatedAt','6310787MGJMpz','3324hwhbTs','log'];_0x146d=function(){return _0x36fd2b;};return _0x146d();}import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x4973b1(0xc1),'bug-bashes',_0x4973b1(0xbd),_0x4973b1(0xc5),'ci'];export async function getEnvNames(){const _0x49e42a=_0x4973b1,_0x2e6048={'PAnwN':function(_0x5db0be,_0x9bb2a7){return _0x5db0be(_0x9bb2a7);},'CkKsr':function(_0x102595){return _0x102595();},'lWsPI':_0x49e42a(0xc5),'hGqPE':function(_0x5cefbc,_0x372375){return _0x5cefbc(_0x372375);},'eqiky':function(_0x350d04,_0x524769,_0x5c6a14){return _0x350d04(_0x524769,_0x5c6a14);},'pXsXN':function(_0x40a046,_0x2a3f5b){return _0x40a046(_0x2a3f5b);},'eDkUN':'.txt','AEPxl':function(_0xd78ea2,_0x285f48,_0x300f47){return _0xd78ea2(_0x285f48,_0x300f47);},'jCtPc':function(_0x2b96c2,_0x5afcc5){return _0x2b96c2(_0x5afcc5);}},_0x1c3048=getRangerDir();if(!_0x2e6048[_0x49e42a(0xbf)](existsSync,_0x1c3048))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x594dbd=await _0x2e6048[_0x49e42a(0xbc)](readActiveProfileName),_0x5559b3=[],_0x1cee2b={},_0x21a915=join(_0x1c3048,_0x2e6048[_0x49e42a(0xb6)]);if(_0x2e6048['hGqPE'](existsSync,_0x21a915)){const _0x43a570=await readdir(_0x21a915);for(const _0x1ea81f of _0x43a570){const _0x2343f8=join(_0x21a915,_0x1ea81f),_0x294161=await stat(_0x2343f8);_0x294161['isDirectory']()&&(_0x5559b3[_0x49e42a(0xc2)](_0x1ea81f),_0x1cee2b[_0x1ea81f]=_0x2e6048['lWsPI']);}}const _0x450e75=_0x2e6048['eqiky'](join,_0x1c3048,'ci');if(existsSync(_0x450e75)){const _0x4b2284=await _0x2e6048[_0x49e42a(0xa7)](readdir,_0x450e75);for(const _0x3975ef of _0x4b2284){const _0x410531=join(_0x450e75,_0x3975ef),_0x46e4b7=await stat(_0x410531);_0x46e4b7['isDirectory']()&&(_0x5559b3[_0x49e42a(0xc2)](_0x3975ef),_0x1cee2b[_0x3975ef]='ci');}}const _0x372fe3=await readdir(_0x1c3048);for(const _0x14b260 of _0x372fe3){if(NON_ENV_DIRS['includes'](_0x14b260))continue;if(_0x14b260['startsWith']('.'))continue;if(_0x14b260['endsWith'](_0x2e6048['eDkUN']))continue;const _0x4de845=_0x2e6048[_0x49e42a(0xb8)](join,_0x1c3048,_0x14b260),_0x4f2e06=await stat(_0x4de845);_0x4f2e06['isDirectory']()&&_0x2e6048['jCtPc'](existsSync,_0x2e6048[_0x49e42a(0xb8)](join,_0x4de845,'settings.json'))&&(!_0x5559b3['includes'](_0x14b260)&&(_0x5559b3[_0x49e42a(0xc2)](_0x14b260),_0x1cee2b[_0x14b260]=_0x49e42a(0xaf)));}return{'envNames':_0x5559b3,'activeEnv':_0x594dbd,'envTypes':_0x1cee2b};}export async function envList(){const _0x1fd749=_0x4973b1,_0x3297b8={'ePFzf':function(_0xacddc2){return _0xacddc2();},'QnStF':function(_0x3eab13){return _0x3eab13();},'MJFPJ':function(_0x17b629,_0x2e3bdc){return _0x17b629===_0x2e3bdc;},'KojYO':'\x0aNo\x20profiles\x20found.','kKZXB':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','UwIrA':'\x0aLocal\x20Profiles:','AbFHN':function(_0x4ecb9f,_0x2045a7){return _0x4ecb9f===_0x2045a7;},'mRJLx':'local','MMLDg':function(_0x39e78a,_0x5b5d7d){return _0x39e78a===_0x5b5d7d;},'gzebV':function(_0x3cd9ee,_0x3e85c3){return _0x3cd9ee>_0x3e85c3;},'FzOJr':'\x0aCloud\x20Profiles:','EMEBQ':_0x1fd749(0xbb)},{envNames:_0x3efe10,activeEnv:_0x37c7bb,envTypes:_0x474268}=await _0x3297b8['ePFzf'](getEnvNames);let _0x3a236a=[];try{_0x3a236a=await _0x3297b8[_0x1fd749(0xa9)](listCloudProfiles);}catch{}if(_0x3efe10['length']===0x0&&_0x3297b8['MJFPJ'](_0x3a236a[_0x1fd749(0xc0)],0x0)){console['log'](_0x3297b8['KojYO']),console[_0x1fd749(0xa6)](_0x3297b8['kKZXB']);return;}const _0x4d477a=new Set(_0x3a236a['map'](_0x464970=>_0x464970['name']));if(_0x3efe10[_0x1fd749(0xc0)]>0x0){console['log'](_0x3297b8['UwIrA']);for(const _0xdafff7 of _0x3efe10['sort']()){const _0x378422=_0x3297b8[_0x1fd749(0xba)](_0xdafff7,_0x37c7bb)&&!_0x4d477a[_0x1fd749(0xc3)](_0xdafff7),_0x5df5ab=_0x474268[_0xdafff7]||_0x3297b8[_0x1fd749(0xa8)],_0xafc6e4=await loadSettings(_0xdafff7),_0x33ff32=_0x3297b8['MMLDg'](_0x5df5ab,_0x1fd749(0xaf))?'':'\x20['+_0x5df5ab+']';console[_0x1fd749(0xa6)]('\x20\x20'+(_0x378422?'*\x20':'\x20\x20')+_0xdafff7+_0x33ff32),_0xafc6e4['baseUrl']&&console[_0x1fd749(0xa6)](_0x1fd749(0xab)+_0xafc6e4['baseUrl']),_0xafc6e4['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0xafc6e4['environmentDetails']);}}if(_0x3297b8['gzebV'](_0x3a236a[_0x1fd749(0xc0)],0x0)){console['log'](_0x3297b8[_0x1fd749(0xb4)]);for(const _0x3afa87 of _0x3a236a[_0x1fd749(0xad)]((_0x3c967d,_0x5da7a2)=>_0x3c967d['name']['localeCompare'](_0x5da7a2['name']))){const _0x48410e=_0x3afa87['name']===_0x37c7bb,_0x2c7131=_0x3afa87[_0x1fd749(0xc4)]?'\x20('+_0x3afa87['environmentKey']+')':'',_0x7fa853=_0x3afa87['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x3afa87[_0x1fd749(0xc6)]+')':_0x3297b8[_0x1fd749(0xb3)];console['log']('\x20\x20'+(_0x48410e?'*\x20':'\x20\x20')+_0x3afa87['name']+'\x20[cloud]'+_0x2c7131),console[_0x1fd749(0xa6)]('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x7fa853);}}_0x37c7bb&&console[_0x1fd749(0xa6)]('\x0a*\x20=\x20active\x20profile');}
1
+ const _0x4befcb=_0x3695;function _0x3695(_0x505309,_0x242959){_0x505309=_0x505309-0xd0;const _0x389a20=_0x389a();let _0x36951c=_0x389a20[_0x505309];return _0x36951c;}(function(_0x35e88a,_0x2549d4){const _0x27ea16=_0x3695,_0xbb533e=_0x35e88a();while(!![]){try{const _0xec0066=-parseInt(_0x27ea16(0xfa))/0x1+parseInt(_0x27ea16(0xd1))/0x2+parseInt(_0x27ea16(0xe5))/0x3+-parseInt(_0x27ea16(0xe1))/0x4+-parseInt(_0x27ea16(0xe6))/0x5+-parseInt(_0x27ea16(0xf8))/0x6+-parseInt(_0x27ea16(0xe2))/0x7*(-parseInt(_0x27ea16(0xda))/0x8);if(_0xec0066===_0x2549d4)break;else _0xbb533e['push'](_0xbb533e['shift']());}catch(_0x603a19){_0xbb533e['push'](_0xbb533e['shift']());}}}(_0x389a,0x553bc));import{readdir,stat}from'fs/promises';function _0x389a(){const _0x570708=['isDirectory','Hgdrr','\x0a*\x20=\x20active\x20profile','UVzcx','\x20[cloud]','sessionUpdatedAt','TVIKJ','localeCompare','DRusQ','sessions','legacy','MCapV','dOhMk','dHGVX','Run:\x20ranger\x20profile\x20add\x20<profile-name>','sort','3234528HuIxJa','\x20\x20\x20\x20\x20\x20Session:\x20','96001eExfej','pHPxz','includes','\x20\x20\x20\x20\x20\x20Details:\x20','xEMtR','931852VTYgXC','.txt','endsWith','log','zNaWx','\x0aLocal\x20Profiles:','environmentKey','no\x20session','map','1048OMuWPs','ziQIG','QPsXG','length','cached\x20(updated\x20','lumGX','has','1403460NuBttl','48356fzWmWz','environmentDetails','name','1179087swoHcW','2144165xaTrjJ','RlFZk'];_0x389a=function(){return _0x570708;};return _0x389a();}import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x4befcb(0xf1),'bug-bashes','reports','local','ci'];export async function getEnvNames(){const _0xadef4b=_0x4befcb,_0x39bdfe={'hCcCw':function(_0x1f7f1f){return _0x1f7f1f();},'Hgdrr':function(_0xb06b8c,_0x3f4c2c,_0x5e9027){return _0xb06b8c(_0x3f4c2c,_0x5e9027);},'SyDEU':function(_0x5023a9,_0x208ce0){return _0x5023a9(_0x208ce0);},'RlFZk':function(_0x128fa2,_0x5227c5){return _0x128fa2(_0x5227c5);},'ziQIG':function(_0x2e6c6d,_0x554ce6){return _0x2e6c6d(_0x554ce6);},'zNaWx':function(_0x4f5ae1,_0xe796b2){return _0x4f5ae1(_0xe796b2);},'pHPxz':function(_0x4baaf7,_0x2b4547,_0x3b6e1d){return _0x4baaf7(_0x2b4547,_0x3b6e1d);},'lumGX':_0xadef4b(0xd2),'pPSgd':function(_0x375687,_0x1fc92e){return _0x375687(_0x1fc92e);},'DRusQ':'settings.json','MCapV':_0xadef4b(0xf2)},_0x44b4e7=_0x39bdfe['hCcCw'](getRangerDir);if(!existsSync(_0x44b4e7))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x3aa87e=await readActiveProfileName(),_0x415bd8=[],_0x2f4670={},_0x2f0ce6=_0x39bdfe['Hgdrr'](join,_0x44b4e7,'local');if(_0x39bdfe['SyDEU'](existsSync,_0x2f0ce6)){const _0xe1e40a=await _0x39bdfe['RlFZk'](readdir,_0x2f0ce6);for(const _0x5198e9 of _0xe1e40a){const _0x2a7885=join(_0x2f0ce6,_0x5198e9),_0x3f781e=await _0x39bdfe[_0xadef4b(0xdb)](stat,_0x2a7885);_0x3f781e[_0xadef4b(0xe8)]()&&(_0x415bd8['push'](_0x5198e9),_0x2f4670[_0x5198e9]='local');}}const _0x320c42=_0x39bdfe[_0xadef4b(0xe9)](join,_0x44b4e7,'ci');if(existsSync(_0x320c42)){const _0x1fabec=await _0x39bdfe[_0xadef4b(0xd5)](readdir,_0x320c42);for(const _0xd98f27 of _0x1fabec){const _0x57907d=_0x39bdfe[_0xadef4b(0xfb)](join,_0x320c42,_0xd98f27),_0x2d4871=await stat(_0x57907d);_0x2d4871['isDirectory']()&&(_0x415bd8['push'](_0xd98f27),_0x2f4670[_0xd98f27]='ci');}}const _0x1eb2e2=await _0x39bdfe[_0xadef4b(0xe7)](readdir,_0x44b4e7);for(const _0x16e237 of _0x1eb2e2){if(NON_ENV_DIRS[_0xadef4b(0xfc)](_0x16e237))continue;if(_0x16e237['startsWith']('.'))continue;if(_0x16e237[_0xadef4b(0xd3)](_0x39bdfe[_0xadef4b(0xdf)]))continue;const _0x4a38d1=_0x39bdfe['pHPxz'](join,_0x44b4e7,_0x16e237),_0x5d5756=await _0x39bdfe['pPSgd'](stat,_0x4a38d1);_0x5d5756[_0xadef4b(0xe8)]()&&existsSync(_0x39bdfe[_0xadef4b(0xe9)](join,_0x4a38d1,_0x39bdfe[_0xadef4b(0xf0)]))&&(!_0x415bd8['includes'](_0x16e237)&&(_0x415bd8['push'](_0x16e237),_0x2f4670[_0x16e237]=_0x39bdfe[_0xadef4b(0xf3)]));}return{'envNames':_0x415bd8,'activeEnv':_0x3aa87e,'envTypes':_0x2f4670};}export async function envList(){const _0x503df7=_0x4befcb,_0x14069e={'bjBMJ':function(_0x2c42fe){return _0x2c42fe();},'dOhMk':function(_0x47f936,_0x54f92d){return _0x47f936>_0x54f92d;},'QPsXG':'local','UVzcx':function(_0x1e302f,_0x3561c3){return _0x1e302f(_0x3561c3);},'PQnJZ':'legacy','xEMtR':'\x0aCloud\x20Profiles:','TVIKJ':function(_0x2ed808,_0x3b674c){return _0x2ed808===_0x3b674c;},'dHGVX':_0x503df7(0xd8)},{envNames:_0x344df0,activeEnv:_0x42b90e,envTypes:_0x253cf0}=await _0x14069e['bjBMJ'](getEnvNames);let _0x15dddf=[];try{_0x15dddf=await listCloudProfiles();}catch{}if(_0x344df0['length']===0x0&&_0x15dddf['length']===0x0){console['log']('\x0aNo\x20profiles\x20found.'),console[_0x503df7(0xd4)](_0x503df7(0xf6));return;}const _0x54d833=new Set(_0x15dddf[_0x503df7(0xd9)](_0x4c48ec=>_0x4c48ec[_0x503df7(0xe4)]));if(_0x14069e[_0x503df7(0xf4)](_0x344df0[_0x503df7(0xdd)],0x0)){console[_0x503df7(0xd4)](_0x503df7(0xd6));for(const _0xd7d33d of _0x344df0[_0x503df7(0xf7)]()){const _0xd1bded=_0xd7d33d===_0x42b90e&&!_0x54d833[_0x503df7(0xe0)](_0xd7d33d),_0x12e3d2=_0x253cf0[_0xd7d33d]||_0x14069e[_0x503df7(0xdc)],_0x39ef2f=await _0x14069e[_0x503df7(0xeb)](loadSettings,_0xd7d33d),_0x3e6991=_0x12e3d2===_0x14069e['PQnJZ']?'':'\x20['+_0x12e3d2+']';console[_0x503df7(0xd4)]('\x20\x20'+(_0xd1bded?'*\x20':'\x20\x20')+_0xd7d33d+_0x3e6991),_0x39ef2f['baseUrl']&&console[_0x503df7(0xd4)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x39ef2f['baseUrl']),_0x39ef2f[_0x503df7(0xe3)]&&console[_0x503df7(0xd4)](_0x503df7(0xfd)+_0x39ef2f['environmentDetails']);}}if(_0x15dddf[_0x503df7(0xdd)]>0x0){console['log'](_0x14069e[_0x503df7(0xd0)]);for(const _0x300eaa of _0x15dddf[_0x503df7(0xf7)]((_0x474006,_0x34e341)=>_0x474006[_0x503df7(0xe4)][_0x503df7(0xef)](_0x34e341['name']))){const _0x5892c7=_0x14069e[_0x503df7(0xee)](_0x300eaa[_0x503df7(0xe4)],_0x42b90e),_0x1fca0f=_0x300eaa[_0x503df7(0xd7)]?'\x20('+_0x300eaa[_0x503df7(0xd7)]+')':'',_0x2fbabd=_0x300eaa[_0x503df7(0xed)]?_0x503df7(0xde)+_0x300eaa[_0x503df7(0xed)]+')':_0x14069e[_0x503df7(0xf5)];console[_0x503df7(0xd4)]('\x20\x20'+(_0x5892c7?'*\x20':'\x20\x20')+_0x300eaa['name']+_0x503df7(0xec)+_0x1fca0f),console[_0x503df7(0xd4)](_0x503df7(0xf9)+_0x2fbabd);}}_0x42b90e&&console[_0x503df7(0xd4)](_0x503df7(0xea));}