@ranger-testing/ranger-cli 2.1.3 → 2.1.4

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 (66) 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/setup/claude.js +1 -1
  25. package/build/commands/setup/opencode.js +1 -1
  26. package/build/commands/setupCi.js +1 -1
  27. package/build/commands/skillup.js +1 -1
  28. package/build/commands/start.js +1 -1
  29. package/build/commands/status.js +1 -1
  30. package/build/commands/update.js +1 -1
  31. package/build/commands/updateEnv.js +1 -1
  32. package/build/commands/useEnv.js +1 -1
  33. package/build/commands/utils/activeProfile.js +1 -1
  34. package/build/commands/utils/browserSessionsApi.js +1 -1
  35. package/build/commands/utils/claudeConfig.js +1 -1
  36. package/build/commands/utils/claudePlugin.js +1 -1
  37. package/build/commands/utils/crypto.js +1 -1
  38. package/build/commands/utils/desirePathLog.js +1 -1
  39. package/build/commands/utils/deviceAuth.js +1 -1
  40. package/build/commands/utils/environment.js +1 -1
  41. package/build/commands/utils/featureApi.js +1 -1
  42. package/build/commands/utils/featureReportGenerator.js +1 -1
  43. package/build/commands/utils/fixWebmDuration.js +1 -1
  44. package/build/commands/utils/git.js +1 -1
  45. package/build/commands/utils/keychain.js +1 -1
  46. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  47. package/build/commands/utils/mcpImageBase64.js +1 -1
  48. package/build/commands/utils/model.js +1 -1
  49. package/build/commands/utils/opencodeConfig.js +1 -1
  50. package/build/commands/utils/profileMessages.js +1 -1
  51. package/build/commands/utils/profileSetupBanner.js +1 -1
  52. package/build/commands/utils/rangerConfig.js +1 -1
  53. package/build/commands/utils/rangerRoot.js +1 -1
  54. package/build/commands/utils/reportGenerator.js +1 -1
  55. package/build/commands/utils/retry.js +1 -1
  56. package/build/commands/utils/sessionCache.js +1 -1
  57. package/build/commands/utils/settings.js +1 -1
  58. package/build/commands/utils/skillContent.js +1 -1
  59. package/build/commands/utils/skills.js +1 -1
  60. package/build/commands/utils/telemetry.js +1 -1
  61. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  62. package/build/commands/utils/userApi.js +1 -1
  63. package/build/commands/utils/version.js +1 -1
  64. package/build/commands/verifyFeature.js +1 -1
  65. package/build/commands/verifyInBrowser.js +1 -1
  66. package/package.json +2 -2
@@ -1 +1 @@
1
- (function(_0x566d37,_0x5e0284){const _0x553e0c=_0x36d3,_0x304930=_0x566d37();while(!![]){try{const _0x359925=-parseInt(_0x553e0c(0x14b))/0x1*(parseInt(_0x553e0c(0x138))/0x2)+-parseInt(_0x553e0c(0x13c))/0x3+parseInt(_0x553e0c(0x157))/0x4+-parseInt(_0x553e0c(0x155))/0x5*(-parseInt(_0x553e0c(0x154))/0x6)+-parseInt(_0x553e0c(0x134))/0x7+parseInt(_0x553e0c(0x143))/0x8*(-parseInt(_0x553e0c(0x14f))/0x9)+-parseInt(_0x553e0c(0x15f))/0xa*(-parseInt(_0x553e0c(0x139))/0xb);if(_0x359925===_0x5e0284)break;else _0x304930['push'](_0x304930['shift']());}catch(_0x4c6a6b){_0x304930['push'](_0x304930['shift']());}}}(_0xd18b,0x6b6df));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x36d3(_0xcb5743,_0x186c21){_0xcb5743=_0xcb5743-0x134;const _0xd18b69=_0xd18b();let _0x36d373=_0xd18b69[_0xcb5743];return _0x36d373;}import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getEnvDir,isEnvCi}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x1a1154,_0x766891){const _0x17b922=_0x36d3,_0x3fc2aa={'TAwWD':_0x17b922(0x15c),'CBdKg':function(_0x3aacb0){return _0x3aacb0();},'EUhHm':function(_0x2acd2b,_0x47e10d,_0x2aae1b){return _0x2acd2b(_0x47e10d,_0x2aae1b);},'FrGKj':function(_0x4992a3,_0x3429a4,_0x4c4aa7){return _0x4992a3(_0x3429a4,_0x4c4aa7);},'DQzkM':function(_0x208101,_0x368a53){return _0x208101(_0x368a53);},'ltPjF':function(_0xb866c5,_0x633a7c,_0x2fb311){return _0xb866c5(_0x633a7c,_0x2fb311);},'oteNY':_0x17b922(0x13e),'bRAPk':function(_0x35bea6,_0x3a5e6d){return _0x35bea6===_0x3a5e6d;},'QsGdi':function(_0x16446f,_0x4ac68e){return _0x16446f(_0x4ac68e);},'LARyp':'browser_auth','mfuiS':'\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','rfsVo':function(_0x5a3c97,_0x345d5d){return _0x5a3c97||_0x345d5d;},'EAFUB':_0x17b922(0x14e),'ZBQuT':_0x17b922(0x15a),'yWVeM':_0x17b922(0x149)},_0x2955ac=getEnvDir(_0x1a1154),_0x321151=_0x3fc2aa[_0x17b922(0x13f)](join,_0x2955ac,_0x17b922(0x145)),_0xdbe559=_0x3fc2aa['FrGKj'](join,_0x2955ac,'auth.json'),_0x639e7d=_0xdbe559+_0x17b922(0x141),_0x109e51=process['stdin']['isTTY']&&process[_0x17b922(0x15e)]['isTTY'];if(!_0x109e51)throw new Error('Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git');if(!_0x3fc2aa[_0x17b922(0x135)](existsSync,_0x2955ac))throw new Error('Profile\x20\x22'+_0x1a1154+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x1a1154);if(!existsSync(_0x321151))throw new Error(_0x17b922(0x150)+_0x321151+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x1a1154);const _0x31b58f=await _0x3fc2aa[_0x17b922(0x140)](readFile,_0x321151,_0x3fc2aa['oteNY']),_0x589bc2=JSON[_0x17b922(0x15d)](_0x31b58f),_0x582d03=_0x3fc2aa[_0x17b922(0x156)](typeof _0x589bc2[_0x17b922(0x158)],_0x17b922(0x159))?_0x589bc2[_0x17b922(0x158)]:undefined,_0x4940cd=existsSync(_0xdbe559),_0x242851=_0x3fc2aa['QsGdi'](isEnvCi,_0x1a1154);_0x766891?.['trackPhaseStart'](_0x3fc2aa['LARyp']),console['log']('\x0a📋\x20Authentication\x20Update'),console[_0x17b922(0x144)](_0x17b922(0x13d)),console['log'](_0x3fc2aa['mfuiS']),console['log'](_0x17b922(0x152));const _0x2d28f5=await chromium['launch']({'headless':![]}),_0x19942f=_0x4940cd?{'storageState':_0xdbe559}:{};let _0x381041=null;try{_0x381041=await _0x2d28f5['newContext'](_0x19942f),await addProfileSetupBanner(_0x381041);const _0x4dce69=await _0x381041['newPage']();await _0x4dce69['goto'](_0x3fc2aa['rfsVo'](_0x582d03,_0x3fc2aa['EAFUB'])),await new Promise(_0x552a71=>{const _0x5f3441=_0x17b922;_0x4dce69['on'](_0x5f3441(0x136),async()=>{const _0x56afe7=_0x5f3441;try{console[_0x56afe7(0x144)](_0x3fc2aa['TAwWD']),await _0x381041?.[_0x56afe7(0x15b)]({'path':_0xdbe559}),_0x3fc2aa[_0x56afe7(0x137)](_0x552a71);}catch{_0x3fc2aa[_0x56afe7(0x137)](_0x552a71);}});});}finally{_0x381041&&await _0x381041[_0x17b922(0x136)]()[_0x17b922(0x13b)](()=>{}),await _0x2d28f5[_0x17b922(0x136)]()[_0x17b922(0x13b)](()=>{});}if(_0x242851){const _0x18c79e=await readFile(_0xdbe559,_0x17b922(0x13e)),_0x54de93=await getToken();if(!_0x54de93)console['error'](_0x17b922(0x147)),console['log'](_0x17b922(0x14d)+_0xdbe559);else{const _0x1d99bf=encrypt(_0x18c79e,_0x54de93);await _0x3fc2aa[_0x17b922(0x153)](writeFile,_0x639e7d,_0x1d99bf),await unlink(_0xdbe559),console['log']('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x639e7d),console[_0x17b922(0x144)](_0x17b922(0x151)),console['log'](_0x3fc2aa[_0x17b922(0x13a)]);}}else console['log'](_0x17b922(0x14d)+_0xdbe559);_0x766891?.['trackPhaseEnd'](_0x3fc2aa[_0x17b922(0x14a)]),_0x766891?.['trackPhaseStart'](_0x3fc2aa[_0x17b922(0x142)]),_0x589bc2[_0x17b922(0x148)]=_0x589bc2[_0x17b922(0x148)]||{},_0x589bc2['browser'][_0x17b922(0x146)]=_0x589bc2['browser'][_0x17b922(0x146)]||{},_0x589bc2[_0x17b922(0x148)]['contextOptions'][_0x17b922(0x15b)]=_0xdbe559,await writeFile(_0x321151,JSON['stringify'](_0x589bc2,null,0x2)),console['log']('✓\x20Updated\x20config:\x20'+_0x321151),_0x766891?.[_0x17b922(0x14c)](_0x17b922(0x149)),console['log']('\x0a✅\x20Profile\x20\x22'+_0x1a1154+'\x22\x20authentication\x20updated');}function _0xd18b(){const _0x2c47d9=['about:blank','1357218GbHgBd','Config\x20not\x20found\x20at\x20','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','FrGKj','11112OQmUlU','1720UHSJix','bRAPk','892516hcSUll','baseUrl','string','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','storageState','Saving\x20authentication\x20state...','parse','stdout','17807410uqQNcg','5831007RoplJk','DQzkM','close','CBdKg','2HMQfHK','11YXNvtt','ZBQuT','catch','599697ahMVTO','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','utf-8','EUhHm','ltPjF','.enc','yWVeM','40nDhRJk','log','settings.json','contextOptions','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','browser','config_write','LARyp','414017QoIsrH','trackPhaseEnd','✓\x20Auth\x20state\x20saved\x20to:\x20'];_0xd18b=function(){return _0x2c47d9;};return _0xd18b();}
1
+ (function(_0x2df373,_0x516b05){const _0x3b3642=_0xf019,_0x4e2623=_0x2df373();while(!![]){try{const _0x30cfab=parseInt(_0x3b3642(0x216))/0x1*(-parseInt(_0x3b3642(0x1f1))/0x2)+parseInt(_0x3b3642(0x20d))/0x3+parseInt(_0x3b3642(0x202))/0x4*(parseInt(_0x3b3642(0x1fd))/0x5)+-parseInt(_0x3b3642(0x20f))/0x6*(-parseInt(_0x3b3642(0x1f3))/0x7)+parseInt(_0x3b3642(0x200))/0x8+-parseInt(_0x3b3642(0x218))/0x9+-parseInt(_0x3b3642(0x205))/0xa;if(_0x30cfab===_0x516b05)break;else _0x4e2623['push'](_0x4e2623['shift']());}catch(_0x1c9e47){_0x4e2623['push'](_0x4e2623['shift']());}}}(_0x4078,0x1d212));import{writeFile,readFile,unlink}from'fs/promises';function _0x4078(){const _0x4b8ed8=['log','goto','utf-8','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','550281Wyqtqx','contextOptions','1219956gWlzdB','catch','storageState','stdout','✓\x20Auth\x20state\x20saved\x20to:\x20','isTTY','trackPhaseStart','6379UzgMFh','eLzOG','2137482mujfNL','\x0a✅\x20Profile\x20\x22','stdin','60qjrXsL','newPage','7FPzrDq','nMBhY','\x22\x20authentication\x20updated','newContext','browser_auth','browser','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','RFZMD','moEYs','10mPXfRt','config_write','close','1791712PRoavp','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','46492HAjuRc','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','tZhcL','857810GUVOBz','.enc','JieAE','string'];_0x4078=function(){return _0x4b8ed8;};return _0x4078();}import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';function _0xf019(_0x49ae4e,_0x3e0222){_0x49ae4e=_0x49ae4e-0x1ef;const _0x4078b5=_0x4078();let _0xf019e5=_0x4078b5[_0x49ae4e];return _0xf019e5;}import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getEnvDir,isEnvCi}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x20193a,_0x412a14){const _0x86e0dd=_0xf019,_0x408c82={'JieAE':'Saving\x20authentication\x20state...','ihqQr':_0x86e0dd(0x1ff),'cZNrV':function(_0x50db65,_0x257979){return _0x50db65(_0x257979);},'RFZMD':'settings.json','hngHD':'auth.json','moEYs':function(_0x1eb9be,_0x1c7654){return _0x1eb9be(_0x1c7654);},'effTL':function(_0x17b09c,_0x2e1580,_0x1b9d4a){return _0x17b09c(_0x2e1580,_0x1b9d4a);},'eLzOG':function(_0x413661,_0x3286a5){return _0x413661===_0x3286a5;},'tZhcL':_0x86e0dd(0x208),'rMMoP':_0x86e0dd(0x1f7),'BddtH':'\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','dPpdn':function(_0x15b15b,_0x552381){return _0x15b15b||_0x552381;},'kADVg':'about:blank','XXIOn':_0x86e0dd(0x20b),'ZOvEK':function(_0x677854){return _0x677854();},'qxKJt':_0x86e0dd(0x1f9),'nMBhY':_0x86e0dd(0x201),'aQctG':'\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.'},_0x347e70=_0x408c82['cZNrV'](getEnvDir,_0x20193a),_0x5322f2=join(_0x347e70,_0x408c82[_0x86e0dd(0x1fb)]),_0x27af35=join(_0x347e70,_0x408c82['hngHD']),_0xc6b002=_0x27af35+_0x86e0dd(0x206),_0x59a1d1=process[_0x86e0dd(0x1f0)][_0x86e0dd(0x214)]&&process[_0x86e0dd(0x212)]['isTTY'];if(!_0x59a1d1)throw new Error('Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git');if(!_0x408c82['cZNrV'](existsSync,_0x347e70))throw new Error('Profile\x20\x22'+_0x20193a+_0x86e0dd(0x203)+_0x20193a);if(!_0x408c82['moEYs'](existsSync,_0x5322f2))throw new Error('Config\x20not\x20found\x20at\x20'+_0x5322f2+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x20193a);const _0x596414=await _0x408c82['effTL'](readFile,_0x5322f2,'utf-8'),_0x33f05a=JSON['parse'](_0x596414),_0x436905=_0x408c82[_0x86e0dd(0x217)](typeof _0x33f05a['baseUrl'],_0x408c82[_0x86e0dd(0x204)])?_0x33f05a['baseUrl']:undefined,_0x20e780=_0x408c82['moEYs'](existsSync,_0x27af35),_0xe64b1=isEnvCi(_0x20193a);_0x412a14?.[_0x86e0dd(0x215)](_0x408c82['rMMoP']),console['log']('\x0a📋\x20Authentication\x20Update'),console[_0x86e0dd(0x209)](_0x408c82['BddtH']),console[_0x86e0dd(0x209)](_0x86e0dd(0x20c)),console['log'](_0x86e0dd(0x1fa));const _0x34829c=await chromium['launch']({'headless':![]}),_0x4360c0=_0x20e780?{'storageState':_0x27af35}:{};let _0x24bd28=null;try{_0x24bd28=await _0x34829c[_0x86e0dd(0x1f6)](_0x4360c0),await _0x408c82[_0x86e0dd(0x1fc)](addProfileSetupBanner,_0x24bd28);const _0xb27e31=await _0x24bd28[_0x86e0dd(0x1f2)]();await _0xb27e31[_0x86e0dd(0x20a)](_0x408c82['dPpdn'](_0x436905,_0x408c82['kADVg'])),await new Promise(_0x3a14a8=>{_0xb27e31['on'](_0x408c82['ihqQr'],async()=>{const _0x18f7ac=_0xf019;try{console[_0x18f7ac(0x209)](_0x408c82[_0x18f7ac(0x207)]),await _0x24bd28?.[_0x18f7ac(0x211)]({'path':_0x27af35}),_0x3a14a8();}catch{_0x3a14a8();}});});}finally{_0x24bd28&&await _0x24bd28[_0x86e0dd(0x1ff)]()[_0x86e0dd(0x210)](()=>{}),await _0x34829c[_0x86e0dd(0x1ff)]()['catch'](()=>{});}if(_0xe64b1){const _0x422466=await readFile(_0x27af35,_0x408c82['XXIOn']),_0x354ab5=await _0x408c82['ZOvEK'](getToken);if(!_0x354ab5)console['error'](_0x408c82['qxKJt']),console['log'](_0x86e0dd(0x213)+_0x27af35);else{const _0x5dd6e6=encrypt(_0x422466,_0x354ab5);await writeFile(_0xc6b002,_0x5dd6e6),await unlink(_0x27af35),console['log']('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0xc6b002),console['log'](_0x408c82[_0x86e0dd(0x1f4)]),console[_0x86e0dd(0x209)](_0x408c82['aQctG']);}}else console[_0x86e0dd(0x209)](_0x86e0dd(0x213)+_0x27af35);_0x412a14?.['trackPhaseEnd']('browser_auth'),_0x412a14?.[_0x86e0dd(0x215)](_0x86e0dd(0x1fe)),_0x33f05a['browser']=_0x33f05a[_0x86e0dd(0x1f8)]||{},_0x33f05a[_0x86e0dd(0x1f8)]['contextOptions']=_0x33f05a[_0x86e0dd(0x1f8)][_0x86e0dd(0x20e)]||{},_0x33f05a[_0x86e0dd(0x1f8)]['contextOptions']['storageState']=_0x27af35,await writeFile(_0x5322f2,JSON['stringify'](_0x33f05a,null,0x2)),console[_0x86e0dd(0x209)]('✓\x20Updated\x20config:\x20'+_0x5322f2),_0x412a14?.['trackPhaseEnd']('config_write'),console[_0x86e0dd(0x209)](_0x86e0dd(0x1ef)+_0x20193a+_0x86e0dd(0x1f5));}
@@ -1 +1 @@
1
- (function(_0x207308,_0x3faebc){const _0x494cfc=_0x4d14,_0x1e2807=_0x207308();while(!![]){try{const _0x17c9b0=parseInt(_0x494cfc(0x144))/0x1+-parseInt(_0x494cfc(0x140))/0x2*(-parseInt(_0x494cfc(0x149))/0x3)+-parseInt(_0x494cfc(0x13d))/0x4*(parseInt(_0x494cfc(0x148))/0x5)+parseInt(_0x494cfc(0x142))/0x6*(parseInt(_0x494cfc(0x145))/0x7)+parseInt(_0x494cfc(0x14a))/0x8*(parseInt(_0x494cfc(0x143))/0x9)+-parseInt(_0x494cfc(0x13f))/0xa*(parseInt(_0x494cfc(0x13e))/0xb)+parseInt(_0x494cfc(0x14b))/0xc*(-parseInt(_0x494cfc(0x147))/0xd);if(_0x17c9b0===_0x3faebc)break;else _0x1e2807['push'](_0x1e2807['shift']());}catch(_0x56da4b){_0x1e2807['push'](_0x1e2807['shift']());}}}(_0x645a,0x8f76d));function _0x645a(){const _0x5021e0=['905261oeSmay','oDYfG','13mANtRZ','200775nSsXOJ','84MRozTL','116744qcVBOH','4557288hTfahB','tLOTk','\x0a✓\x20Now\x20using\x20profile\x20\x22','8KmGFfS','12532146FlTuPh','10iIBpGb','2476yZpFPZ','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','48cQsAGl','279aKIZad','665368gepsaB'];_0x645a=function(){return _0x5021e0;};return _0x645a();}import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x4d14(_0x348cc1,_0x1b7378){_0x348cc1=_0x348cc1-0x13d;const _0x645ad0=_0x645a();let _0x4d146f=_0x645ad0[_0x348cc1];return _0x4d146f;}export async function useEnv(_0x29b8ed){const _0x1abe4f=_0x4d14,_0x55f604={'tLOTk':function(_0x5beda7,_0xf76305){return _0x5beda7(_0xf76305);},'oDYfG':'settings.json'},_0x108950=_0x55f604[_0x1abe4f(0x14c)](getEnvDir,_0x29b8ed),_0x1f607f=join(_0x108950,_0x55f604[_0x1abe4f(0x146)]);if(!existsSync(_0x108950))throw new Error('Profile\x20\x22'+_0x29b8ed+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x29b8ed);if(!_0x55f604['tLOTk'](existsSync,_0x1f607f))throw new Error('Config\x20not\x20found\x20at\x20'+_0x1f607f+_0x1abe4f(0x141)+_0x29b8ed);await writeActiveProfileName(_0x29b8ed),console['log'](_0x1abe4f(0x14d)+_0x29b8ed+'\x22');}
1
+ (function(_0x40db3a,_0x23a7ab){const _0x269ab4=_0x3068,_0x25fed8=_0x40db3a();while(!![]){try{const _0x5b58aa=-parseInt(_0x269ab4(0x11f))/0x1*(parseInt(_0x269ab4(0x11c))/0x2)+parseInt(_0x269ab4(0x122))/0x3*(parseInt(_0x269ab4(0x11a))/0x4)+-parseInt(_0x269ab4(0x11d))/0x5+parseInt(_0x269ab4(0x118))/0x6*(-parseInt(_0x269ab4(0x11e))/0x7)+parseInt(_0x269ab4(0x117))/0x8+parseInt(_0x269ab4(0x124))/0x9+parseInt(_0x269ab4(0x123))/0xa;if(_0x5b58aa===_0x23a7ab)break;else _0x25fed8['push'](_0x25fed8['shift']());}catch(_0x31d1fa){_0x25fed8['push'](_0x25fed8['shift']());}}}(_0x3120,0x963f3));import{join}from'path';function _0x3068(_0x23ec1e,_0x2b568c){_0x23ec1e=_0x23ec1e-0x117;const _0x3120e2=_0x3120();let _0x3068e7=_0x3120e2[_0x23ec1e];return _0x3068e7;}import{existsSync}from'fs';function _0x3120(){const _0x14ed62=['862862KMYOEM','34842LrXHJL','xTiDP','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','9xMweLo','13597920XjoRjz','9006579HNtzVl','3762568lJkqIg','48ggzzLC','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','57556ccqrHo','log','40RQKJln','2878160ukPZcp'];_0x3120=function(){return _0x14ed62;};return _0x3120();}import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x234a5b){const _0x9b66b5=_0x3068,_0x44cb07={'OaLIy':function(_0x3f5b62,_0x35cf9e){return _0x3f5b62(_0x35cf9e);},'NsBCa':function(_0xd49341,_0x1508e2,_0x171480){return _0xd49341(_0x1508e2,_0x171480);},'xTiDP':function(_0x195c6a,_0x53f2f6){return _0x195c6a(_0x53f2f6);}},_0x188e5d=_0x44cb07['OaLIy'](getEnvDir,_0x234a5b),_0x3a8de5=_0x44cb07['NsBCa'](join,_0x188e5d,'settings.json');if(!_0x44cb07[_0x9b66b5(0x120)](existsSync,_0x188e5d))throw new Error('Profile\x20\x22'+_0x234a5b+_0x9b66b5(0x119)+_0x234a5b);if(!_0x44cb07['OaLIy'](existsSync,_0x3a8de5))throw new Error('Config\x20not\x20found\x20at\x20'+_0x3a8de5+_0x9b66b5(0x121)+_0x234a5b);await writeActiveProfileName(_0x234a5b),console[_0x9b66b5(0x11b)]('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x234a5b+'\x22');}
@@ -1 +1 @@
1
- function _0x557d(_0x5a9b55,_0x2596f8){_0x5a9b55=_0x5a9b55-0x6d;const _0x135611=_0x1356();let _0x557df4=_0x135611[_0x5a9b55];return _0x557df4;}const _0xf079df=_0x557d;(function(_0x106811,_0x20cd5b){const _0x2dbba1=_0x557d,_0x5db8f8=_0x106811();while(!![]){try{const _0x198621=-parseInt(_0x2dbba1(0x82))/0x1*(-parseInt(_0x2dbba1(0x7e))/0x2)+parseInt(_0x2dbba1(0x72))/0x3*(parseInt(_0x2dbba1(0x71))/0x4)+parseInt(_0x2dbba1(0x76))/0x5+-parseInt(_0x2dbba1(0x70))/0x6+-parseInt(_0x2dbba1(0x73))/0x7*(-parseInt(_0x2dbba1(0x6f))/0x8)+parseInt(_0x2dbba1(0x79))/0x9*(-parseInt(_0x2dbba1(0x80))/0xa)+-parseInt(_0x2dbba1(0x6e))/0xb*(parseInt(_0x2dbba1(0x78))/0xc);if(_0x198621===_0x20cd5b)break;else _0x5db8f8['push'](_0x5db8f8['shift']());}catch(_0x3f322e){_0x5db8f8['push'](_0x5db8f8['shift']());}}}(_0x1356,0x47613));import{existsSync}from'fs';import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE=_0xf079df(0x75),LEGACY_ACTIVE_ENV_FILE=_0xf079df(0x7f);function getActiveProfilePath(){const _0x43ade2=_0xf079df,_0x4dc3a6={'TDWjd':function(_0x3ad963,_0xbf7a4f,_0x12b101){return _0x3ad963(_0xbf7a4f,_0x12b101);}};return _0x4dc3a6[_0x43ade2(0x74)](join,getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x27c1f9=_0xf079df,_0x22db3b={'KzzFR':function(_0x356754){return _0x356754();}};return join(_0x22db3b[_0x27c1f9(0x6d)](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x17212e=_0xf079df,_0x592b28={'fFumS':function(_0x23c024){return _0x23c024();},'ImpSp':function(_0x163f45,_0x9a0039){return _0x163f45(_0x9a0039);},'OMQZt':'utf-8','OFHOn':function(_0x3cb7b1){return _0x3cb7b1();},'rWXPF':function(_0x5d4714,_0x29932d,_0x4f0b81){return _0x5d4714(_0x29932d,_0x4f0b81);},'bISpq':function(_0x57b48e,_0x169bc9,_0xdd857a,_0x3642f2){return _0x57b48e(_0x169bc9,_0xdd857a,_0x3642f2);},'DCTds':function(_0x6a794c,_0x2abb52){return _0x6a794c(_0x2abb52);}},_0x1c342e=_0x592b28['fFumS'](getLegacyActiveEnvPath);if(!_0x592b28[_0x17212e(0x77)](existsSync,_0x1c342e))return null;let _0x471d2b=null;try{_0x471d2b=(await readFile(_0x1c342e,_0x592b28['OMQZt']))['trim']()||null;}catch{_0x471d2b=null;}if(!_0x471d2b)return null;const _0x2c0d78=_0x592b28[_0x17212e(0x7c)](getActiveProfilePath);try{await _0x592b28['rWXPF'](rename,_0x1c342e,_0x2c0d78);}catch{try{const _0x47f6dd=getRangerDir();await mkdir(_0x47f6dd,{'recursive':!![]}),await _0x592b28['bISpq'](writeFile,_0x2c0d78,_0x471d2b,'utf-8'),await _0x592b28['DCTds'](unlink,_0x1c342e);}catch{}}return _0x471d2b;}function _0x1356(){const _0x44da2d=['KzzFR','119042TsgTFC','2096kebfDP','1937940iWGtrr','24egoMPX','84501QKHRpx','5369RhkgNM','TDWjd','active-profile.txt','2517740DGzqpW','ImpSp','564tKLOqa','685935jDovZn','clcBw','BTeKQ','OFHOn','trim','12UyeDlL','active-env.txt','10NoHvNp','qxzYX','54451PYruRC'];_0x1356=function(){return _0x44da2d;};return _0x1356();}export async function readActiveProfileName(){const _0x366115=_0xf079df,_0x208a0e={'aEZzV':function(_0x41ddf3){return _0x41ddf3();},'clcBw':function(_0x5b4cb4){return _0x5b4cb4();}},_0x120310=_0x208a0e['aEZzV'](getActiveProfilePath);if(existsSync(_0x120310))try{return(await readFile(_0x120310,'utf-8'))[_0x366115(0x7d)]()||null;}catch{return null;}return await _0x208a0e[_0x366115(0x7a)](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0xf16f59){const _0x32bad9=_0xf079df,_0x3d160d={'qxzYX':function(_0x1c03bf){return _0x1c03bf();},'BTeKQ':function(_0x30c70b,_0x1ab2bb,_0x4be984){return _0x30c70b(_0x1ab2bb,_0x4be984);},'JYcmo':function(_0x427567,_0x3177e1,_0x31495b,_0x27560f){return _0x427567(_0x3177e1,_0x31495b,_0x27560f);},'mOjLm':function(_0x18a047){return _0x18a047();}},_0x4203f6=_0x3d160d[_0x32bad9(0x81)](getRangerDir);await _0x3d160d[_0x32bad9(0x7b)](mkdir,_0x4203f6,{'recursive':!![]});const _0x3e4ef2=_0x3d160d[_0x32bad9(0x81)](getActiveProfilePath);await _0x3d160d['JYcmo'](writeFile,_0x3e4ef2,_0xf16f59,'utf-8');const _0x564507=_0x3d160d['mOjLm'](getLegacyActiveEnvPath);if(existsSync(_0x564507))try{await unlink(_0x564507);}catch{}}export async function migrateActiveProfileFile(){const _0xd67467={'NuRKF':function(_0x2fcded){return _0x2fcded();}},_0x2debd8=await _0xd67467['NuRKF'](migrateLegacyActiveEnv);return _0x2debd8!==null;}
1
+ const _0x145c5c=_0x514c;(function(_0x2d59ae,_0x1fa26d){const _0x28f075=_0x514c,_0x38e2fd=_0x2d59ae();while(!![]){try{const _0x122b39=parseInt(_0x28f075(0x14e))/0x1+-parseInt(_0x28f075(0x140))/0x2*(-parseInt(_0x28f075(0x14c))/0x3)+-parseInt(_0x28f075(0x13c))/0x4+-parseInt(_0x28f075(0x14d))/0x5+-parseInt(_0x28f075(0x13e))/0x6+parseInt(_0x28f075(0x142))/0x7+parseInt(_0x28f075(0x14f))/0x8;if(_0x122b39===_0x1fa26d)break;else _0x38e2fd['push'](_0x38e2fd['shift']());}catch(_0x9c70a5){_0x38e2fd['push'](_0x38e2fd['shift']());}}}(_0x4cf3,0x5e92c));import{existsSync}from'fs';import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';function _0x4cf3(){const _0x66e0e5=['7374ZLpmPR','qQXpD','3620127IjgkjQ','HWrkh','utf-8','TIctm','aybgW','pSPdG','biTzt','VUNZP','wquOM','active-profile.txt','390LvfwlZ','3695620EbWaYn','398279tjsMyW','3563376fNEFzd','YPfVE','trim','2148372wgtXBv','active-env.txt','1059498Dygcvk','Dikzu'];_0x4cf3=function(){return _0x66e0e5;};return _0x4cf3();}import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE=_0x145c5c(0x14b),LEGACY_ACTIVE_ENV_FILE=_0x145c5c(0x13d);function getActiveProfilePath(){const _0x40a8d1={'xVZIJ':function(_0x4c4278,_0x30b61f,_0x32cbc8){return _0x4c4278(_0x30b61f,_0x32cbc8);}};return _0x40a8d1['xVZIJ'](join,getRangerDir(),ACTIVE_PROFILE_FILE);}function _0x514c(_0x2c4a83,_0x1e88c5){_0x2c4a83=_0x2c4a83-0x13a;const _0x4cf3af=_0x4cf3();let _0x514c59=_0x4cf3af[_0x2c4a83];return _0x514c59;}function getLegacyActiveEnvPath(){const _0x5bcb76=_0x145c5c,_0x375f2d={'Dikzu':function(_0x4aed9d,_0x1d4ad1,_0xe858a5){return _0x4aed9d(_0x1d4ad1,_0xe858a5);},'HWrkh':function(_0x553c20){return _0x553c20();}};return _0x375f2d[_0x5bcb76(0x13f)](join,_0x375f2d[_0x5bcb76(0x143)](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x45ed64=_0x145c5c,_0x30cf70={'RqsOm':function(_0xb903e1,_0x1e8544){return _0xb903e1(_0x1e8544);},'YPfVE':function(_0x407037,_0x533aa0,_0x2233e7){return _0x407037(_0x533aa0,_0x2233e7);},'aybgW':'utf-8','TIctm':function(_0x30105a){return _0x30105a();},'biTzt':function(_0x30e6df){return _0x30e6df();},'wBFAH':function(_0x3b0d88,_0x5c46ac,_0x805cef,_0x7414eb){return _0x3b0d88(_0x5c46ac,_0x805cef,_0x7414eb);},'sNbBs':function(_0x4f7664,_0x408835){return _0x4f7664(_0x408835);}},_0x505721=getLegacyActiveEnvPath();if(!_0x30cf70['RqsOm'](existsSync,_0x505721))return null;let _0xd7ced9=null;try{_0xd7ced9=(await _0x30cf70[_0x45ed64(0x13a)](readFile,_0x505721,_0x30cf70[_0x45ed64(0x146)]))[_0x45ed64(0x13b)]()||null;}catch{_0xd7ced9=null;}if(!_0xd7ced9)return null;const _0x2b6f44=_0x30cf70[_0x45ed64(0x145)](getActiveProfilePath);try{await rename(_0x505721,_0x2b6f44);}catch{try{const _0x4a8a21=_0x30cf70[_0x45ed64(0x148)](getRangerDir);await mkdir(_0x4a8a21,{'recursive':!![]}),await _0x30cf70['wBFAH'](writeFile,_0x2b6f44,_0xd7ced9,_0x45ed64(0x144)),await _0x30cf70['sNbBs'](unlink,_0x505721);}catch{}}return _0xd7ced9;}export async function readActiveProfileName(){const _0x4b49c3=_0x145c5c,_0x273146={'pSPdG':function(_0x45a240,_0x187137,_0x3ca048){return _0x45a240(_0x187137,_0x3ca048);},'qQXpD':_0x4b49c3(0x144),'yPVll':function(_0x5073bc){return _0x5073bc();}},_0x52f687=getActiveProfilePath();if(existsSync(_0x52f687))try{return(await _0x273146[_0x4b49c3(0x147)](readFile,_0x52f687,_0x273146[_0x4b49c3(0x141)]))[_0x4b49c3(0x13b)]()||null;}catch{return null;}return await _0x273146['yPVll'](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x2e8e5b){const _0x3c8cf0=_0x145c5c,_0x4de85d={'VUNZP':function(_0x15fb70){return _0x15fb70();},'wquOM':function(_0x1a063f,_0x397860,_0x3dca61,_0x416892){return _0x1a063f(_0x397860,_0x3dca61,_0x416892);},'mRJpL':function(_0x2cda32,_0x4a5012){return _0x2cda32(_0x4a5012);}},_0x16f9a7=_0x4de85d[_0x3c8cf0(0x149)](getRangerDir);await mkdir(_0x16f9a7,{'recursive':!![]});const _0x474d8c=_0x4de85d['VUNZP'](getActiveProfilePath);await _0x4de85d[_0x3c8cf0(0x14a)](writeFile,_0x474d8c,_0x2e8e5b,_0x3c8cf0(0x144));const _0x2d6542=_0x4de85d[_0x3c8cf0(0x149)](getLegacyActiveEnvPath);if(_0x4de85d['mRJpL'](existsSync,_0x2d6542))try{await unlink(_0x2d6542);}catch{}}export async function migrateActiveProfileFile(){const _0xf8a869=await migrateLegacyActiveEnv();return _0xf8a869!==null;}
@@ -1 +1 @@
1
- (function(_0x1b00fe,_0x4da7d1){const _0x15f707=_0x3391,_0x10f76f=_0x1b00fe();while(!![]){try{const _0x3eb2d4=parseInt(_0x15f707(0x1c9))/0x1+-parseInt(_0x15f707(0x19f))/0x2*(-parseInt(_0x15f707(0x1d2))/0x3)+parseInt(_0x15f707(0x1db))/0x4+-parseInt(_0x15f707(0x207))/0x5*(parseInt(_0x15f707(0x1f1))/0x6)+-parseInt(_0x15f707(0x20b))/0x7*(-parseInt(_0x15f707(0x19d))/0x8)+parseInt(_0x15f707(0x189))/0x9*(-parseInt(_0x15f707(0x20c))/0xa)+parseInt(_0x15f707(0x1d4))/0xb;if(_0x3eb2d4===_0x4da7d1)break;else _0x10f76f['push'](_0x10f76f['shift']());}catch(_0xfb6cbb){_0x10f76f['push'](_0x10f76f['shift']());}}}(_0x26a5,0x5f2f8));const _0x5c8722=(function(){const _0xa3f19f=_0x3391,_0x32ffe1={'kLIGX':function(_0x3aa0e4,_0x8cc879){return _0x3aa0e4!==_0x8cc879;},'pKUxe':_0xa3f19f(0x1bc),'MnEwI':_0xa3f19f(0x211),'zdgVZ':_0xa3f19f(0x1d9),'kGgFO':function(_0x529d78,_0x10d1c3){return _0x529d78!==_0x10d1c3;},'VCZbD':_0xa3f19f(0x1a6),'CZzrA':'NjcOD'};let _0x1a322a=!![];return function(_0x2170a6,_0x27bbcb){const _0x4eaa3c=_0xa3f19f;if(_0x32ffe1[_0x4eaa3c(0x213)](_0x32ffe1['VCZbD'],_0x32ffe1[_0x4eaa3c(0x1b3)])){const _0x1c5154=_0x1a322a?function(){const _0xb5688d=_0x4eaa3c;if(_0x32ffe1['kLIGX'](_0x32ffe1[_0xb5688d(0x1a8)],_0x32ffe1[_0xb5688d(0x199)])){if(_0x27bbcb){const _0x48fa34=_0x27bbcb['apply'](_0x2170a6,arguments);return _0x27bbcb=null,_0x48fa34;}}else{const _0x34756b=_0x48bdc2?function(){const _0x796d99=_0xb5688d;if(_0x58f846){const _0xce71d3=_0x59e2c3[_0x796d99(0x1f3)](_0x1f4e22,arguments);return _0x3035a9=null,_0xce71d3;}}:function(){};return _0x45ca31=![],_0x34756b;}}:function(){};return _0x1a322a=![],_0x1c5154;}else throw new _0x78e6c0(_0x32ffe1[_0x4eaa3c(0x208)]);};}()),_0x32b7dd=_0x5c8722(this,function(){const _0x4b37f8=_0x3391,_0x2fe876={'RazNa':_0x4b37f8(0x19a)};return _0x32b7dd[_0x4b37f8(0x200)]()['search'](_0x2fe876[_0x4b37f8(0x1bb)])[_0x4b37f8(0x200)]()[_0x4b37f8(0x19b)](_0x32b7dd)[_0x4b37f8(0x1de)](_0x4b37f8(0x19a));});_0x32b7dd();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x536f8b){const _0x5ba1d9=_0x3391,_0x1b27a7={'ayGpF':_0x5ba1d9(0x19a),'oiQJV':function(_0xa84a9c){return _0xa84a9c();},'LLilJ':_0x5ba1d9(0x1a2),'oygNQ':_0x5ba1d9(0x1c8),'bzlZQ':_0x5ba1d9(0x1d9),'nEjKD':function(_0x52a3bd){return _0x52a3bd();},'KmjTo':_0x5ba1d9(0x18a),'FnLrF':_0x5ba1d9(0x1d0)},_0x33086b=await _0x1b27a7[_0x5ba1d9(0x18f)](getToken);if(!_0x33086b){if(_0x1b27a7[_0x5ba1d9(0x190)]===_0x1b27a7[_0x5ba1d9(0x205)])return _0x202fe2(_0x44901e,_0x133ab8,'application/zip');else throw new Error(_0x1b27a7['bzlZQ']);}const _0x27980b=_0x1b27a7[_0x5ba1d9(0x188)](getApiBaseUrl),_0x17bf79=await fetch(_0x27980b+_0x5ba1d9(0x1e8),{'method':_0x5ba1d9(0x1cd),'headers':{'Authorization':_0x5ba1d9(0x212)+_0x33086b,'Content-Type':_0x1b27a7['KmjTo']},'body':JSON[_0x5ba1d9(0x1c3)]({'environmentName':_0x536f8b?.[_0x5ba1d9(0x1d8)],'settings':_0x536f8b?.[_0x5ba1d9(0x1da)],'task':_0x536f8b?.[_0x5ba1d9(0x1f6)],'url':_0x536f8b?.[_0x5ba1d9(0x195)],'featureId':_0x536f8b?.[_0x5ba1d9(0x1c6)],'checklistItemId':_0x536f8b?.['checklistItemId']})});if(!_0x17bf79['ok']){if(_0x1b27a7[_0x5ba1d9(0x1f9)]!==_0x5ba1d9(0x1d0))return _0xa19f13[_0x5ba1d9(0x200)]()[_0x5ba1d9(0x1de)](bUgjbA['ayGpF'])[_0x5ba1d9(0x200)]()['constructor'](_0x25cff9)[_0x5ba1d9(0x1de)](bUgjbA[_0x5ba1d9(0x1b0)]);else{const _0x2f88e6=await _0x17bf79['text']();throw new Error(_0x5ba1d9(0x1d5)+_0x2f88e6);}}return _0x17bf79[_0x5ba1d9(0x1a1)]();}export async function updateBrowserSession(_0x3d9bd3,_0x55021c){const _0x73f567=_0x3391,_0x29c962={'hKXAo':_0x73f567(0x1d9),'mzvai':function(_0x1599b7){return _0x1599b7();},'PkICg':function(_0x5bac7a,_0x194c3d,_0x5be6f2){return _0x5bac7a(_0x194c3d,_0x5be6f2);},'aDspo':_0x73f567(0x18a),'nLbeW':_0x73f567(0x20a)};return _0x29c962['PkICg'](withRetry,async()=>{const _0x3a5021=_0x73f567,_0x2a430e=await getToken();if(!_0x2a430e)throw new Error(_0x29c962[_0x3a5021(0x1ce)]);const _0x2dec78=_0x29c962[_0x3a5021(0x1fe)](getApiBaseUrl),_0x3165f6=await _0x29c962[_0x3a5021(0x1dc)](fetch,_0x2dec78+'/api/v1/mcp/browser-sessions/'+_0x3d9bd3,{'method':_0x3a5021(0x1af),'headers':{'Authorization':_0x3a5021(0x212)+_0x2a430e,'Content-Type':_0x29c962[_0x3a5021(0x18c)]},'body':JSON[_0x3a5021(0x1c3)](_0x55021c)});if(!_0x3165f6['ok']){const _0x2fe6d5=await _0x3165f6[_0x3a5021(0x1e2)]();throw new Error(_0x3a5021(0x1a5)+_0x2fe6d5);}return _0x3165f6[_0x3a5021(0x1a1)]();},{'label':_0x29c962[_0x73f567(0x20f)]});}export async function getBrowserSession(_0x32919d){const _0x509bfd=_0x3391,_0x291dd3={'ScXCB':function(_0x2579e9){return _0x2579e9();},'JQtkz':_0x509bfd(0x1d9),'JKZys':function(_0x28944f,_0x1a2900,_0x14af5c){return _0x28944f(_0x1a2900,_0x14af5c);},'FAydJ':'GET','FOkDc':function(_0x5cdba5,_0x203f10){return _0x5cdba5===_0x203f10;},'IMAto':_0x509bfd(0x1f7),'yaPxD':_0x509bfd(0x18b)},_0x30a9c0=await _0x291dd3['ScXCB'](getToken);if(!_0x30a9c0)throw new Error(_0x291dd3[_0x509bfd(0x1c2)]);const _0x2db8dd=_0x291dd3['ScXCB'](getApiBaseUrl),_0x4b605f=await _0x291dd3[_0x509bfd(0x214)](fetch,_0x2db8dd+_0x509bfd(0x1f2)+_0x32919d,{'method':_0x291dd3[_0x509bfd(0x1dd)],'headers':{'Authorization':'Bearer\x20'+_0x30a9c0}});if(!_0x4b605f['ok']){if(_0x291dd3[_0x509bfd(0x18e)](_0x291dd3[_0x509bfd(0x196)],_0x291dd3[_0x509bfd(0x201)])){const _0x37f6a6=_0x1325c7(_0x1719d8);return'https://trace.playwright.dev/?trace='+_0x37f6a6;}else{const _0x4cbd6b=await _0x4b605f[_0x509bfd(0x1e2)]();throw new Error(_0x509bfd(0x1e9)+_0x4cbd6b);}}return _0x4b605f[_0x509bfd(0x1a1)]();}function _0x3391(_0x505152,_0x3da808){_0x505152=_0x505152-0x187;const _0x730589=_0x26a5();let _0x32b7dd=_0x730589[_0x505152];if(_0x3391['DElIuI']===undefined){var _0x5c8722=function(_0x411863){const _0x5ca59d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x58c743='',_0x19c19c='',_0x519d1d=_0x58c743+_0x5c8722;for(let _0x5ded4b=0x0,_0x195f59,_0x2918be,_0x542473=0x0;_0x2918be=_0x411863['charAt'](_0x542473++);~_0x2918be&&(_0x195f59=_0x5ded4b%0x4?_0x195f59*0x40+_0x2918be:_0x2918be,_0x5ded4b++%0x4)?_0x58c743+=_0x519d1d['charCodeAt'](_0x542473+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x195f59>>(-0x2*_0x5ded4b&0x6)):_0x5ded4b:0x0){_0x2918be=_0x5ca59d['indexOf'](_0x2918be);}for(let _0x93dbda=0x0,_0x426560=_0x58c743['length'];_0x93dbda<_0x426560;_0x93dbda++){_0x19c19c+='%'+('00'+_0x58c743['charCodeAt'](_0x93dbda)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x19c19c);};_0x3391['uNSOIq']=_0x5c8722,_0x3391['uWnhsB']={},_0x3391['DElIuI']=!![];}const _0x26a5c3=_0x730589[0x0],_0x339146=_0x505152+_0x26a5c3,_0x1c28c0=_0x3391['uWnhsB'][_0x339146];if(!_0x1c28c0){const _0x48bdc2=function(_0x3af2f1){this['EDBvbI']=_0x3af2f1,this['HaoEjn']=[0x1,0x0,0x0],this['XoyrRL']=function(){return'newState';},this['cRHTLr']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['WwINHP']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x48bdc2['prototype']['rrBMuu']=function(){const _0x1e4cc8=new RegExp(this['cRHTLr']+this['WwINHP']),_0x5726e1=_0x1e4cc8['test'](this['XoyrRL']['toString']())?--this['HaoEjn'][0x1]:--this['HaoEjn'][0x0];return this['dXlfxD'](_0x5726e1);},_0x48bdc2['prototype']['dXlfxD']=function(_0x2b5930){if(!Boolean(~_0x2b5930))return _0x2b5930;return this['dfEIQp'](this['EDBvbI']);},_0x48bdc2['prototype']['dfEIQp']=function(_0x45ca31){for(let _0x58f846=0x0,_0x290b9a=this['HaoEjn']['length'];_0x58f846<_0x290b9a;_0x58f846++){this['HaoEjn']['push'](Math['round'](Math['random']())),_0x290b9a=this['HaoEjn']['length'];}return _0x45ca31(this['HaoEjn'][0x0]);},new _0x48bdc2(_0x3391)['rrBMuu'](),_0x32b7dd=_0x3391['uNSOIq'](_0x32b7dd),_0x3391['uWnhsB'][_0x339146]=_0x32b7dd;}else _0x32b7dd=_0x1c28c0;return _0x32b7dd;}export async function getUploadUrls(_0x55c6c3,_0x37fc44,_0x40148d,_0x1229da){const _0x4ede0e=_0x3391,_0x4b2cea={'jrtfl':function(_0x35e4a6,_0x42fa4e){return _0x35e4a6===_0x42fa4e;},'qPQfB':'zMewo','tueLz':_0x4ede0e(0x1d9),'LrQXx':function(_0x471114){return _0x471114();},'NSVRl':function(_0x2096fb,_0x538e17,_0x4ffb73){return _0x2096fb(_0x538e17,_0x4ffb73);},'EmscH':_0x4ede0e(0x18a),'CtWWs':function(_0x1ee1c4,_0x3ac773){return _0x1ee1c4!==_0x3ac773;},'quAGp':function(_0x1be1d8,_0x3092d4){return _0x1be1d8!==_0x3092d4;},'CxovJ':function(_0x2d4e41,_0x3ecc58){return _0x2d4e41!==_0x3ecc58;}},_0x16e9cf=await getToken();if(!_0x16e9cf){if(_0x4b2cea[_0x4ede0e(0x1e3)](_0x4ede0e(0x1ea),_0x4b2cea[_0x4ede0e(0x1e5)]))throw new Error(_0x4b2cea[_0x4ede0e(0x1c5)]);else{const _0x34c98e=_0x57c587['apply'](_0x1696d0,arguments);return _0x126511=null,_0x34c98e;}}const _0x325055=_0x4b2cea[_0x4ede0e(0x19e)](getApiBaseUrl),_0xf0e157=await _0x4b2cea['NSVRl'](fetch,_0x325055+_0x4ede0e(0x1f2)+_0x55c6c3+_0x4ede0e(0x1ec),{'method':_0x4ede0e(0x1cd),'headers':{'Authorization':_0x4ede0e(0x212)+_0x16e9cf,'Content-Type':_0x4b2cea[_0x4ede0e(0x1a0)]},'body':JSON[_0x4ede0e(0x1c3)]({'filename':_0x37fc44,'filetype':_0x40148d,..._0x4b2cea[_0x4ede0e(0x1cf)](_0x1229da?.[_0x4ede0e(0x191)],undefined)&&{'size':_0x1229da[_0x4ede0e(0x191)]},..._0x4b2cea[_0x4ede0e(0x1ca)](_0x1229da?.['checksum'],undefined)&&{'checksum':_0x1229da[_0x4ede0e(0x1fa)]},..._0x4b2cea[_0x4ede0e(0x1ff)](_0x1229da?.['metadata'],undefined)&&{'metadata':_0x1229da['metadata']}})});if(!_0xf0e157['ok']){const _0x5c9145=await _0xf0e157['text']();throw new Error(_0x4ede0e(0x1c7)+_0x5c9145);}return _0xf0e157[_0x4ede0e(0x1a1)]();}export async function uploadFile(_0x12e11d,_0x239e90,_0x164118){const _0x17aade=_0x3391,_0x1f33c5={'YMSsd':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','JCxSd':_0x17aade(0x202),'xHoLD':function(_0x539f91,_0x459218){return _0x539f91!==_0x459218;},'HvohB':_0x17aade(0x1b1),'KXKqK':_0x17aade(0x1eb)},_0x9d0bf4=await fetch(_0x12e11d,{'method':_0x1f33c5[_0x17aade(0x1ba)],'headers':{'Content-Type':_0x164118,'Content-Length':_0x239e90['length'][_0x17aade(0x200)]()},'body':_0x239e90});if(!_0x9d0bf4['ok']){if(_0x1f33c5[_0x17aade(0x1e6)](_0x1f33c5[_0x17aade(0x1c1)],_0x1f33c5[_0x17aade(0x1ed)])){const _0x2c210a=await _0x9d0bf4[_0x17aade(0x1e2)]();throw new Error(_0x17aade(0x1bd)+_0x2c210a);}else throw new _0x4639a3(_0x1f33c5['YMSsd']);}}export async function uploadTrace(_0x15c7cb,_0x42e224){const _0x377f87=_0x3391,_0xdc8f12={'gOqJc':function(_0x1deafa,_0x2c8d23,_0x1dbed2,_0x4ea5f7){return _0x1deafa(_0x2c8d23,_0x1dbed2,_0x4ea5f7);},'fULad':'application/zip'};return _0xdc8f12['gOqJc'](uploadFile,_0x15c7cb,_0x42e224,_0xdc8f12[_0x377f87(0x1b2)]);}export async function uploadConversation(_0xdbe894,_0x469c4b){const _0x547612=_0x3391,_0x37af3a={'VJVKy':function(_0x4b2343,_0x5dab85,_0x57e95f,_0x453768){return _0x4b2343(_0x5dab85,_0x57e95f,_0x453768);},'fmEQC':'application/jsonl'};return _0x37af3a[_0x547612(0x197)](uploadFile,_0xdbe894,_0x469c4b,_0x37af3a['fmEQC']);}function _0x26a5(){const _0x4e0212=['tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','C2v0DgLUz3m','nJeXmZGWD0vxAK1M','ugTjq2C','rKf5zeO','C2vHCMnO','yujIqvi','Bgnivxq','Cg9wCfq','Dgv4Da','ANj0zMW','Aw1Hz2uVCg5N','CvbrzKi','EeHVteq','zfn4vxK','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','EK1LD28','EeDXrwe','l3vWBg9Hzc11CMXZ','s1HlCuS','A2P3wNe','y051r1e','qvjOz3i','nNPLExDmAW','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','yxbWBhK','t3PMseC','q3HZCMO','DgfZAW','D0Tjtwm','Ew1TqKq','rM5mCKy','y2HLy2TZDw0','z3zWC1q','z0n6CMO','BvLgq1q','BxP2ywK','q3HVDKO','Dg9tDhjPBMC','EwfqEeq','ufvu','A0L4CgW','l3n0zxbZ','B3LNtLe','uffQwvK','mJGYnZu5nwn5uKHNtG','EMrNvLO','ruviu3K','DxbKyxrLqNjVD3nLCLnLC3nPB24','nJq3odCXvNHTy01m','ntm0odmWAu12zMjc','vNfIqxy','zfbhEgy','BKXIzvC','verjsgi','ExHPD3G','qMvHCMvYia','A0DNrK8','sKTAExm','t25OzhG','BKvQs0q','nZjyuNrcAKS','yxbWBgLJyxrPB24VANnVBG','CenJEgC','yurZCg8','Exz6uwe','rK9Rrgm','B2LrsLy','teXPBeO','C2L6zq','r3L1yK4','s3DcyM4','ufryvM4','DxjS','su1bDg8','vKPws3K','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','tw5fD0K','kcGOlISPkYKRksSK','y29UC3rYDwn0B3i','rvbSEva','oe9lDwnQwa','thjrwhG','mtaYuMfOtg1S','rw1Zy0G','ANnVBG','DKL1DeS','wLHureW','DMLKzw8VD2vIBq','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','rhDequ0','A2jhvNG','CeTvEgu','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','yMfZzty0','zwrvBhK','EfLjr0C','yxjcB1i','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','uefuq0G','yxLhCey','DNH4suG','zLvmywq','q1P6CKe','D3nTDgG','ue53uwW','rwvIqwK','sKzTEha','zgLNzxn0','Bxfoz3q','sKn4u2q','uMf6tMe','weveswK','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','Efz1ENG','v1zcEK0','l3n0zxbZlW','shzVAei','sLf0A3O','C3rYAw5NAwz5','DKLSrMm','DhvLthO','zMvHDhvYzuLK','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','sefeCeq','ntq1nZCZCM9AtKXA','Cxvbr3a','Axb2vgy','Bwq1','ue9tva','AeTyqw8','q3rxv3m','tvfYD24','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','mJa3ntDIBfDtv2O','l2fZC2v0CW','mJyZmtq1m1HbBxvsBa','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','zNzqsuO','C2vZC2LVBLrVA2vU','zw52AxjVBM1LBNroyw1L'];_0x26a5=function(){return _0x4e0212;};return _0x26a5();}export async function uploadScreenshot(_0x411e6e,_0x4d03cd){const _0x8cdcd5=_0x3391,_0xb92ad1={'PNwQl':_0x8cdcd5(0x1e4)};return uploadFile(_0x411e6e,_0x4d03cd,_0xb92ad1[_0x8cdcd5(0x1b5)]);}export async function uploadVideo(_0x26ca02,_0x5f4f4c){const _0xe356e1=_0x3391,_0x561cb0={'TDIHb':function(_0x40bbe2,_0x2960a5,_0x5d403b,_0x251cfd){return _0x40bbe2(_0x2960a5,_0x5d403b,_0x251cfd);},'arBoR':_0xe356e1(0x1a4)};return _0x561cb0[_0xe356e1(0x210)](uploadFile,_0x26ca02,_0x5f4f4c,_0x561cb0[_0xe356e1(0x1ad)]);}export function buildTraceViewerUrl(_0x397b04){const _0x29a2c5=_0x3391,_0xc385bb={'kJVqy':function(_0x2c5499,_0x50b8ae){return _0x2c5499(_0x50b8ae);}},_0x2c3b96=_0xc385bb['kJVqy'](encodeURIComponent,_0x397b04);return _0x29a2c5(0x1ae)+_0x2c3b96;}export async function getProxySessionToken(){const _0x25e0de=_0x3391,_0x5ab64d={'VqbAv':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','xYIGG':function(_0x8eb500){return _0x8eb500();},'xVuzx':function(_0x4df1ff,_0x299f16){return _0x4df1ff===_0x299f16;},'ARhgr':_0x25e0de(0x1a3),'gvpsT':function(_0x5a8516,_0x4348e0,_0x594814){return _0x5a8516(_0x4348e0,_0x594814);},'EebAi':'POST'},_0x33c0b4=await _0x5ab64d['xYIGG'](getToken);if(!_0x33c0b4){if(_0x5ab64d[_0x25e0de(0x1be)](_0x5ab64d[_0x25e0de(0x1f0)],_0x25e0de(0x1ab)))throw new _0x47b7ef(_0x5ab64d[_0x25e0de(0x20d)]);else throw new Error(_0x5ab64d[_0x25e0de(0x20d)]);}const _0x1b2005=_0x5ab64d[_0x25e0de(0x1ac)](getApiBaseUrl),_0x87c507=await _0x5ab64d[_0x25e0de(0x1fb)](fetch,_0x1b2005+_0x25e0de(0x1a9),{'method':_0x5ab64d[_0x25e0de(0x1b6)],'headers':{'Authorization':_0x25e0de(0x212)+_0x33c0b4}});if(!_0x87c507['ok']){const _0x2f2faf=await _0x87c507[_0x25e0de(0x1e2)]();throw new Error('Failed\x20to\x20get\x20proxy\x20session\x20token:\x20'+_0x2f2faf);}const _0x804dbf=await _0x87c507['json']();return _0x804dbf[_0x25e0de(0x1d7)];}export function computeChecksum(_0x4595ad){const _0x4b429b=_0x3391,_0x477712={'wsmth':function(_0x49053b,_0x37c5ec){return _0x49053b(_0x37c5ec);},'EPlyP':_0x4b429b(0x1cc),'WVBzM':_0x4b429b(0x1aa)};return _0x477712[_0x4b429b(0x1b4)](createHash,_0x477712[_0x4b429b(0x19c)])['update'](_0x4595ad)[_0x4b429b(0x1b8)](_0x477712[_0x4b429b(0x1bf)]);}export async function createVerificationStep(_0x4fa3e8,_0x4e7324){const _0x3abc00=_0x3391,_0x17009c={'lcHUt':function(_0x1239b3,_0x27b297,_0x42cdbc,_0x143c17){return _0x1239b3(_0x27b297,_0x42cdbc,_0x143c17);},'poVpT':_0x3abc00(0x1e4),'dSxUy':function(_0x546430){return _0x546430();},'ipvTf':_0x3abc00(0x1d9),'Onhdx':function(_0x2538a4){return _0x2538a4();},'iKeJt':_0x3abc00(0x1cd),'aBbAR':_0x3abc00(0x18a),'Cxsrj':function(_0x1a02d1,_0xfcb07d){return _0x1a02d1!==_0xfcb07d;},'dPGxf':_0x3abc00(0x209)},_0x2e52a1=await _0x17009c[_0x3abc00(0x1e7)](getToken);if(!_0x2e52a1)throw new Error(_0x17009c[_0x3abc00(0x1cb)]);const _0x47d9da=_0x17009c[_0x3abc00(0x187)](getApiBaseUrl),_0x3f7d8e=await fetch(_0x47d9da+_0x3abc00(0x1f2)+_0x4fa3e8+_0x3abc00(0x204),{'method':_0x17009c['iKeJt'],'headers':{'Authorization':'Bearer\x20'+_0x2e52a1,'Content-Type':_0x17009c[_0x3abc00(0x1df)]},'body':JSON[_0x3abc00(0x1c3)](_0x4e7324)});if(!_0x3f7d8e['ok']){if(_0x17009c[_0x3abc00(0x1f5)](_0x17009c[_0x3abc00(0x20e)],_0x17009c[_0x3abc00(0x20e)]))return _0x17009c[_0x3abc00(0x1e0)](_0x4416bc,_0x415171,_0x226c80,_0x17009c[_0x3abc00(0x1e1)]);else{const _0x1edb13=await _0x3f7d8e['text']();throw new Error(_0x3abc00(0x1d1)+_0x1edb13);}}return _0x3f7d8e[_0x3abc00(0x1a1)]();}export async function createStepAsset(_0x2ffa45,_0x3423e7,_0x651364){const _0x2fd441=_0x3391,_0x2ea41b={'cNuGQ':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','gCzrj':function(_0x2b4e54){return _0x2b4e54();},'OzfHG':_0x2fd441(0x18a),'kbGVx':function(_0x372e40,_0x45923e){return _0x372e40===_0x45923e;},'PTXVn':_0x2fd441(0x193),'vIlFc':_0x2fd441(0x192)},_0x537fda=await getToken();if(!_0x537fda)throw new Error(_0x2ea41b[_0x2fd441(0x1ef)]);const _0x3e9a80=_0x2ea41b[_0x2fd441(0x1fc)](getApiBaseUrl),_0xfbe76e=await fetch(_0x3e9a80+_0x2fd441(0x1f2)+_0x2ffa45+_0x2fd441(0x1c0)+_0x3423e7+_0x2fd441(0x1d3),{'method':'POST','headers':{'Authorization':_0x2fd441(0x212)+_0x537fda,'Content-Type':_0x2ea41b[_0x2fd441(0x1f4)]},'body':JSON['stringify'](_0x651364)});if(!_0xfbe76e['ok']){if(_0x2ea41b[_0x2fd441(0x1a7)](_0x2ea41b[_0x2fd441(0x194)],_0x2ea41b[_0x2fd441(0x1c4)]))throw new _0x506775(_0x2ea41b[_0x2fd441(0x1ef)]);else{const _0x5a7a62=await _0xfbe76e[_0x2fd441(0x1e2)]();throw new Error(_0x2fd441(0x198)+_0x5a7a62);}}return _0xfbe76e[_0x2fd441(0x1a1)]();}export async function updateVerificationStep(_0x22c7b0,_0x36f389,_0x4091df){const _0xd1ce64=_0x3391,_0x3127e6={'RvPHQ':function(_0x56c46e,_0x32ec90,_0x2a7ee4,_0x2b0ff9){return _0x56c46e(_0x32ec90,_0x2a7ee4,_0x2b0ff9);},'PQjYY':'video/webm','fvPIJ':function(_0x39721f){return _0x39721f();},'kjwZq':_0xd1ce64(0x203),'mqNgt':'BYfBb','JFmxp':_0xd1ce64(0x1d9),'ymmBD':function(_0x4bc2b9,_0x449578,_0x4d9106){return _0x4bc2b9(_0x449578,_0x4d9106);},'mYFCT':'PATCH','yvzQa':_0xd1ce64(0x18a)},_0x1b96ed=await _0x3127e6[_0xd1ce64(0x1d6)](getToken);if(!_0x1b96ed){if(_0x3127e6[_0xd1ce64(0x1ee)]===_0x3127e6[_0xd1ce64(0x1b9)])return _0x3127e6['RvPHQ'](_0x266f84,_0x15a222,_0x568555,_0x3127e6[_0xd1ce64(0x206)]);else throw new Error(_0x3127e6[_0xd1ce64(0x1b7)]);}const _0x209502=getApiBaseUrl(),_0x283977=await _0x3127e6[_0xd1ce64(0x1f8)](fetch,_0x209502+_0xd1ce64(0x1f2)+_0x22c7b0+_0xd1ce64(0x1c0)+_0x36f389,{'method':_0x3127e6[_0xd1ce64(0x1fd)],'headers':{'Authorization':'Bearer\x20'+_0x1b96ed,'Content-Type':_0x3127e6[_0xd1ce64(0x18d)]},'body':JSON[_0xd1ce64(0x1c3)](_0x4091df)});if(!_0x283977['ok']){const _0x35f115=await _0x283977[_0xd1ce64(0x1e2)]();throw new Error('Failed\x20to\x20update\x20verification\x20step:\x20'+_0x35f115);}}
1
+ (function(_0xe09270,_0x267107){const _0x7363e8=_0x5bc8,_0xbd9183=_0xe09270();while(!![]){try{const _0x20d288=parseInt(_0x7363e8(0x1c9))/0x1*(-parseInt(_0x7363e8(0x1b0))/0x2)+parseInt(_0x7363e8(0x19e))/0x3+parseInt(_0x7363e8(0x1ad))/0x4+-parseInt(_0x7363e8(0x1de))/0x5+parseInt(_0x7363e8(0x19c))/0x6+parseInt(_0x7363e8(0x1ef))/0x7*(parseInt(_0x7363e8(0x1fb))/0x8)+-parseInt(_0x7363e8(0x203))/0x9*(parseInt(_0x7363e8(0x1d2))/0xa);if(_0x20d288===_0x267107)break;else _0xbd9183['push'](_0xbd9183['shift']());}catch(_0x4d686d){_0xbd9183['push'](_0xbd9183['shift']());}}}(_0x16b6,0x262ea));const _0x5a3068=(function(){let _0x2a24d5=!![];return function(_0x9f5088,_0x2e48cb){const _0x205469=_0x2a24d5?function(){const _0x16ba87=_0x5bc8;if(_0x2e48cb){const _0x23b2ff=_0x2e48cb[_0x16ba87(0x1d5)](_0x9f5088,arguments);return _0x2e48cb=null,_0x23b2ff;}}:function(){};return _0x2a24d5=![],_0x205469;};}()),_0x5bd3db=_0x5a3068(this,function(){const _0x154ebf=_0x5bc8,_0x1d44ee={'MhoVP':_0x154ebf(0x1f7)};return _0x5bd3db[_0x154ebf(0x1e1)]()[_0x154ebf(0x1ac)](_0x154ebf(0x1f7))[_0x154ebf(0x1e1)]()[_0x154ebf(0x1a3)](_0x5bd3db)[_0x154ebf(0x1ac)](_0x1d44ee[_0x154ebf(0x191)]);});_0x5bd3db();function _0x5bc8(_0x4e8c3a,_0x536f98){_0x4e8c3a=_0x4e8c3a-0x191;const _0x2e19bf=_0x16b6();let _0x5bd3db=_0x2e19bf[_0x4e8c3a];if(_0x5bc8['ApautN']===undefined){var _0x5a3068=function(_0x478f61){const _0x2405c1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x49f900='',_0x171225='',_0x1d8b67=_0x49f900+_0x5a3068;for(let _0x19f4f1=0x0,_0x62d197,_0x21c861,_0x10f6e3=0x0;_0x21c861=_0x478f61['charAt'](_0x10f6e3++);~_0x21c861&&(_0x62d197=_0x19f4f1%0x4?_0x62d197*0x40+_0x21c861:_0x21c861,_0x19f4f1++%0x4)?_0x49f900+=_0x1d8b67['charCodeAt'](_0x10f6e3+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x62d197>>(-0x2*_0x19f4f1&0x6)):_0x19f4f1:0x0){_0x21c861=_0x2405c1['indexOf'](_0x21c861);}for(let _0x234a1f=0x0,_0x380e4e=_0x49f900['length'];_0x234a1f<_0x380e4e;_0x234a1f++){_0x171225+='%'+('00'+_0x49f900['charCodeAt'](_0x234a1f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x171225);};_0x5bc8['rGLxLR']=_0x5a3068,_0x5bc8['gwvVRx']={},_0x5bc8['ApautN']=!![];}const _0x16b617=_0x2e19bf[0x0],_0x5bc8f7=_0x4e8c3a+_0x16b617,_0x33adbb=_0x5bc8['gwvVRx'][_0x5bc8f7];if(!_0x33adbb){const _0x14e069=function(_0x437c4e){this['svdLdq']=_0x437c4e,this['YLwXcP']=[0x1,0x0,0x0],this['LMjTWr']=function(){return'newState';},this['caVQni']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['caZSPy']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x14e069['prototype']['dCVytA']=function(){const _0x115522=new RegExp(this['caVQni']+this['caZSPy']),_0x20367d=_0x115522['test'](this['LMjTWr']['toString']())?--this['YLwXcP'][0x1]:--this['YLwXcP'][0x0];return this['KATQED'](_0x20367d);},_0x14e069['prototype']['KATQED']=function(_0x7c5268){if(!Boolean(~_0x7c5268))return _0x7c5268;return this['NLFqPF'](this['svdLdq']);},_0x14e069['prototype']['NLFqPF']=function(_0x29032f){for(let _0x2b49c9=0x0,_0x94c755=this['YLwXcP']['length'];_0x2b49c9<_0x94c755;_0x2b49c9++){this['YLwXcP']['push'](Math['round'](Math['random']())),_0x94c755=this['YLwXcP']['length'];}return _0x29032f(this['YLwXcP'][0x0]);},new _0x14e069(_0x5bc8)['dCVytA'](),_0x5bd3db=_0x5bc8['rGLxLR'](_0x5bd3db),_0x5bc8['gwvVRx'][_0x5bc8f7]=_0x5bd3db;}else _0x5bd3db=_0x33adbb;return _0x5bd3db;}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x344d30){const _0x87ab92=_0x5bc8,_0x49173c={'JCThX':_0x87ab92(0x1a1),'olPvJ':function(_0x4a4d93,_0x37c799){return _0x4a4d93===_0x37c799;},'SzNQy':'FNDYf','CXyDl':function(_0x1c3dad){return _0x1c3dad();},'UZisS':function(_0x2fc3d3,_0x4a5bb5,_0x3259e9){return _0x2fc3d3(_0x4a5bb5,_0x3259e9);},'vOLtj':_0x87ab92(0x195),'nxvvV':_0x87ab92(0x1c3),'wJpcP':function(_0x1d158c,_0x58e5e3){return _0x1d158c!==_0x58e5e3;},'BmGCI':_0x87ab92(0x1cb)},_0x535e0b=await getToken();if(!_0x535e0b){if(_0x49173c[_0x87ab92(0x1fd)](_0x49173c[_0x87ab92(0x197)],_0x87ab92(0x1ee)))throw new _0x35ee7b(_0x49173c[_0x87ab92(0x1b6)]);else throw new Error(_0x87ab92(0x1a1));}const _0x189843=_0x49173c['CXyDl'](getApiBaseUrl),_0x160202=await _0x49173c['UZisS'](fetch,_0x189843+_0x87ab92(0x1ca),{'method':_0x49173c['vOLtj'],'headers':{'Authorization':_0x87ab92(0x204)+_0x535e0b,'Content-Type':_0x49173c[_0x87ab92(0x1fe)]},'body':JSON['stringify']({'environmentName':_0x344d30?.[_0x87ab92(0x1b4)],'settings':_0x344d30?.['settings'],'task':_0x344d30?.['task'],'url':_0x344d30?.[_0x87ab92(0x1b7)],'featureId':_0x344d30?.[_0x87ab92(0x1cf)],'checklistItemId':_0x344d30?.[_0x87ab92(0x202)]})});if(!_0x160202['ok']){if(_0x49173c[_0x87ab92(0x1df)](_0x49173c['BmGCI'],'QtEMx'))throw new _0x5d4b39(_0x87ab92(0x1a1));else{const _0x36034a=await _0x160202[_0x87ab92(0x1f0)]();throw new Error(_0x87ab92(0x1cc)+_0x36034a);}}return _0x160202[_0x87ab92(0x1ed)]();}export async function updateBrowserSession(_0x3dda1b,_0x1c73e0){const _0x3197e4=_0x5bc8,_0x51d9d3={'FzrkX':function(_0x33a2ca,_0x1f8758,_0x235de4,_0x306700){return _0x33a2ca(_0x1f8758,_0x235de4,_0x306700);},'vfWIp':function(_0x76178c,_0xb88be8,_0x12c9a1,_0x41817e){return _0x76178c(_0xb88be8,_0x12c9a1,_0x41817e);},'XjLho':_0x3197e4(0x1d0),'JlKVV':function(_0x41203b,_0xe34529){return _0x41203b===_0xe34529;},'KeopA':_0x3197e4(0x19b),'ABYhi':function(_0x221b4c){return _0x221b4c();},'Ieott':function(_0x5abb53,_0x42b986,_0x1df732){return _0x5abb53(_0x42b986,_0x1df732);},'tGZVS':_0x3197e4(0x1d7),'wnfnQ':'application/json','zvOGC':function(_0x3401ef,_0xf4f15){return _0x3401ef!==_0xf4f15;},'BXyTB':_0x3197e4(0x1fc),'rVvJh':_0x3197e4(0x1f5),'OoBah':function(_0x1a933f,_0x5252e5,_0x2bc0a8){return _0x1a933f(_0x5252e5,_0x2bc0a8);},'ofiAN':'updateBrowserSession'};return _0x51d9d3[_0x3197e4(0x1d6)](withRetry,async()=>{const _0x14f043=_0x3197e4,_0x42674e={'FSFUX':function(_0x461535,_0x152918,_0x19eeb3,_0x1ecbcc){const _0x37512b=_0x5bc8;return _0x51d9d3[_0x37512b(0x1f2)](_0x461535,_0x152918,_0x19eeb3,_0x1ecbcc);},'XxLyD':function(_0xe36224,_0xc79ff,_0x21ebbb,_0x1ebacd){const _0x3789e8=_0x5bc8;return _0x51d9d3[_0x3789e8(0x1f4)](_0xe36224,_0xc79ff,_0x21ebbb,_0x1ebacd);},'pWKlQ':_0x51d9d3[_0x14f043(0x1dd)]};if(_0x51d9d3[_0x14f043(0x1c4)](_0x51d9d3[_0x14f043(0x1d3)],_0x51d9d3[_0x14f043(0x1d3)])){const _0x3fa01f=await _0x51d9d3[_0x14f043(0x1d8)](getToken);if(!_0x3fa01f)throw new Error(_0x14f043(0x1a1));const _0x32d06d=_0x51d9d3['ABYhi'](getApiBaseUrl),_0x5c5b97=await _0x51d9d3[_0x14f043(0x1c2)](fetch,_0x32d06d+_0x14f043(0x1bd)+_0x3dda1b,{'method':_0x51d9d3['tGZVS'],'headers':{'Authorization':_0x14f043(0x204)+_0x3fa01f,'Content-Type':_0x51d9d3['wnfnQ']},'body':JSON[_0x14f043(0x1b8)](_0x1c73e0)});if(!_0x5c5b97['ok']){if(_0x51d9d3[_0x14f043(0x1ce)](_0x51d9d3[_0x14f043(0x192)],_0x51d9d3[_0x14f043(0x1ff)])){const _0x463664=await _0x5c5b97[_0x14f043(0x1f0)]();throw new Error(_0x14f043(0x1a7)+_0x463664);}else return _0x42674e['FSFUX'](_0xc17028,_0x2f2b7e,_0x26f4fa,_0x14f043(0x1c5));}return _0x5c5b97[_0x14f043(0x1ed)]();}else return _0x42674e[_0x14f043(0x1dc)](_0x1dd55f,_0x2e9b18,_0x2fa9f2,_0x42674e[_0x14f043(0x1e6)]);},{'label':_0x51d9d3[_0x3197e4(0x1d4)]});}export async function getBrowserSession(_0x4db1da){const _0x401a4d=_0x5bc8,_0x5a7007={'BaLJe':function(_0x50f340,_0x35ae60){return _0x50f340(_0x35ae60);},'bVymg':_0x401a4d(0x1b3),'OzXEa':'base64','kqGqD':function(_0x33ed1a,_0x272b39){return _0x33ed1a===_0x272b39;},'OzWCL':'jdXzY','eVbPu':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','WSyQw':function(_0x21242c){return _0x21242c();},'fEoMg':function(_0x5cf24f,_0x18e218,_0x3bc7ba){return _0x5cf24f(_0x18e218,_0x3bc7ba);},'LkFwL':function(_0x5acfee,_0x46260f){return _0x5acfee!==_0x46260f;},'zdhww':'kCljO'},_0x43f9fa=await getToken();if(!_0x43f9fa){if(_0x5a7007[_0x401a4d(0x1db)](_0x401a4d(0x1eb),_0x5a7007['OzWCL']))return _0x5a7007[_0x401a4d(0x1e4)](_0x26db6c,_0x5a7007[_0x401a4d(0x1aa)])[_0x401a4d(0x200)](_0x145caf)[_0x401a4d(0x1e8)](_0x5a7007[_0x401a4d(0x1b9)]);else throw new Error(_0x5a7007[_0x401a4d(0x1c8)]);}const _0x4d46b9=_0x5a7007[_0x401a4d(0x1ab)](getApiBaseUrl),_0x19f852=await _0x5a7007[_0x401a4d(0x199)](fetch,_0x4d46b9+'/api/v1/mcp/browser-sessions/'+_0x4db1da,{'method':_0x401a4d(0x1a9),'headers':{'Authorization':_0x401a4d(0x204)+_0x43f9fa}});if(!_0x19f852['ok']){if(_0x5a7007['LkFwL'](_0x5a7007['zdhww'],'tpaea')){const _0x3b63d8=await _0x19f852[_0x401a4d(0x1f0)]();throw new Error(_0x401a4d(0x198)+_0x3b63d8);}else throw new _0x19943d(_0x401a4d(0x1a1));}return _0x19f852[_0x401a4d(0x1ed)]();}export async function getUploadUrls(_0x3f4be8,_0x4d7277,_0x455750,_0x5c0de5){const _0x3f58f6=_0x5bc8,_0x4bb125={'wiatF':function(_0x52ef58,_0x5c7202,_0x30a016,_0x523343){return _0x52ef58(_0x5c7202,_0x30a016,_0x523343);},'gXBPo':_0x3f58f6(0x1c0),'dbpnN':function(_0x4a0926){return _0x4a0926();},'ERjNQ':function(_0x414280,_0x92545a){return _0x414280!==_0x92545a;},'eyqxq':'xXZcJ','eqWRo':'uHBaJ','HTEEt':_0x3f58f6(0x1a1),'IGPSk':function(_0x43ecd5){return _0x43ecd5();},'guKFR':function(_0x1324e4,_0x14008d,_0x19f04d){return _0x1324e4(_0x14008d,_0x19f04d);},'AmbpM':'POST','hLCWx':function(_0x5e92ae,_0x25d6f6){return _0x5e92ae!==_0x25d6f6;}},_0x431eff=await _0x4bb125[_0x3f58f6(0x1b5)](getToken);if(!_0x431eff){if(_0x4bb125[_0x3f58f6(0x1e3)](_0x4bb125[_0x3f58f6(0x1c7)],_0x4bb125['eqWRo']))throw new Error(_0x4bb125['HTEEt']);else return _0x4bb125['wiatF'](_0x3c0381,_0x10e734,_0x3f0588,_0x4bb125['gXBPo']);}const _0xfb38b=_0x4bb125[_0x3f58f6(0x1a4)](getApiBaseUrl),_0x15ad54=await _0x4bb125[_0x3f58f6(0x1ea)](fetch,_0xfb38b+_0x3f58f6(0x1bd)+_0x3f4be8+_0x3f58f6(0x1a0),{'method':_0x4bb125[_0x3f58f6(0x1e0)],'headers':{'Authorization':'Bearer\x20'+_0x431eff,'Content-Type':_0x3f58f6(0x1c3)},'body':JSON['stringify']({'filename':_0x4d7277,'filetype':_0x455750,..._0x4bb125['hLCWx'](_0x5c0de5?.['size'],undefined)&&{'size':_0x5c0de5[_0x3f58f6(0x1a6)]},..._0x4bb125[_0x3f58f6(0x1e3)](_0x5c0de5?.['checksum'],undefined)&&{'checksum':_0x5c0de5[_0x3f58f6(0x196)]},..._0x5c0de5?.[_0x3f58f6(0x1f6)]!==undefined&&{'metadata':_0x5c0de5[_0x3f58f6(0x1f6)]}})});if(!_0x15ad54['ok']){const _0x4d34c2=await _0x15ad54[_0x3f58f6(0x1f0)]();throw new Error(_0x3f58f6(0x1f8)+_0x4d34c2);}return _0x15ad54['json']();}export async function uploadFile(_0x4e80bf,_0x8d12ef,_0x74af87){const _0x57d72a=_0x5bc8,_0x178cfb={'pEXjo':'PUT'},_0x5e1360=await fetch(_0x4e80bf,{'method':_0x178cfb[_0x57d72a(0x205)],'headers':{'Content-Type':_0x74af87,'Content-Length':_0x8d12ef[_0x57d72a(0x1b1)][_0x57d72a(0x1e1)]()},'body':_0x8d12ef});if(!_0x5e1360['ok']){const _0x1584db=await _0x5e1360[_0x57d72a(0x1f0)]();throw new Error(_0x57d72a(0x1ba)+_0x1584db);}}export async function uploadTrace(_0x4c7a52,_0x5e0c68){const _0x5498bf=_0x5bc8,_0x290598={'tmOvG':function(_0x2fade8,_0x18ea31,_0x24427c,_0x17a455){return _0x2fade8(_0x18ea31,_0x24427c,_0x17a455);},'tfAWi':_0x5498bf(0x1d0)};return _0x290598['tmOvG'](uploadFile,_0x4c7a52,_0x5e0c68,_0x290598[_0x5498bf(0x1bf)]);}export async function uploadConversation(_0x2a6ac4,_0x684ea){const _0x26ced6=_0x5bc8,_0x3dab67={'qiphg':function(_0x5f4d7d,_0x5e2efa,_0x2211fa,_0x40f1f3){return _0x5f4d7d(_0x5e2efa,_0x2211fa,_0x40f1f3);},'VuYzK':_0x26ced6(0x201)};return _0x3dab67[_0x26ced6(0x1b2)](uploadFile,_0x2a6ac4,_0x684ea,_0x3dab67[_0x26ced6(0x19d)]);}export async function uploadScreenshot(_0x2a1f47,_0x1fc45f){const _0x394c0d=_0x5bc8,_0x2165bd={'guyxE':_0x394c0d(0x1c0)};return uploadFile(_0x2a1f47,_0x1fc45f,_0x2165bd[_0x394c0d(0x1bc)]);}export async function uploadVideo(_0x2a6253,_0x4559a0){const _0xe6e701=_0x5bc8,_0x35f3ec={'LNqYH':function(_0x267d54,_0x54d731,_0x54b991,_0x1fb77c){return _0x267d54(_0x54d731,_0x54b991,_0x1fb77c);},'kxrGG':_0xe6e701(0x1c5)};return _0x35f3ec['LNqYH'](uploadFile,_0x2a6253,_0x4559a0,_0x35f3ec['kxrGG']);}export function buildTraceViewerUrl(_0x2f616f){const _0x4ccc75=_0x5bc8,_0xcdb0a6={'VOUem':function(_0x250450,_0x304e33){return _0x250450(_0x304e33);}},_0xab7e13=_0xcdb0a6['VOUem'](encodeURIComponent,_0x2f616f);return _0x4ccc75(0x1da)+_0xab7e13;}export async function getProxySessionToken(){const _0x2141c5=_0x5bc8,_0x1e364f={'LJSSc':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','mujft':function(_0x189ec7,_0x139ae7){return _0x189ec7===_0x139ae7;},'WXuvM':_0x2141c5(0x1d1),'aMzgH':function(_0x33ce87){return _0x33ce87();},'gFKUk':function(_0x1def9f,_0xcbe74a,_0x5dc2e4){return _0x1def9f(_0xcbe74a,_0x5dc2e4);}},_0x39fd58=await getToken();if(!_0x39fd58){if(_0x1e364f[_0x2141c5(0x1e7)](_0x1e364f[_0x2141c5(0x1f1)],_0x1e364f[_0x2141c5(0x1f1)]))throw new Error(_0x1e364f[_0x2141c5(0x1a5)]);else throw new _0xbdff8(_0x1e364f[_0x2141c5(0x1a5)]);}const _0x4526ee=_0x1e364f[_0x2141c5(0x1c1)](getApiBaseUrl),_0x2d0f20=await _0x1e364f[_0x2141c5(0x1cd)](fetch,_0x4526ee+_0x2141c5(0x1e5),{'method':_0x2141c5(0x195),'headers':{'Authorization':_0x2141c5(0x204)+_0x39fd58}});if(!_0x2d0f20['ok']){const _0x24bfa5=await _0x2d0f20[_0x2141c5(0x1f0)]();throw new Error(_0x2141c5(0x194)+_0x24bfa5);}const _0x42db3e=await _0x2d0f20[_0x2141c5(0x1ed)]();return _0x42db3e[_0x2141c5(0x193)];}function _0x16b6(){const _0x253693=['y2HLy2TSAxn0sxrLBuLK','nde0Bez1v2DI','qMvHCMvYia','CevyAM8','twHVvLa','qLH5vei','C2vZC2LVBLrVA2vU','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','ue9tva','y2HLy2TZDw0','u3PouxK','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','zKvVtwC','yMfZzty0','uuXNywq','mte4ote3mfr2C0vJuG','vNvzEKS','nZyYodKXCe1tDwfP','whrrvvK','l3vWBg9Hzc11CMXZ','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','y29UC3rYDwn0B3i','suDqu2S','tePtu2m','C2L6zq','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','wKTPv3C','r0vu','yLz5BwC','v1n5uxC','C2vHCMnO','mte4nte0ohLby0zlEG','EfrfDhG','shrJsuC','mLPLs2rTAq','BgvUz3rO','CwLWAgC','Bwq1','zw52AxjVBM1LBNroyw1L','zgjWBK4','sKnuAfG','DxjS','C3rYAw5NAwz5','t3Pyrwe','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','qMzjExC','z3v5Eeu','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','sfHVB1K','Dgzbv2K','Aw1Hz2uVCg5N','yu16z0G','swvVDhq','yxbWBgLJyxrPB24VANnVBG','sMXlvLy','DMLKzw8VD2vIBq','D3vqDhu','zxLXEhe','zvzIuhu','nta5nJD4tLbYDhi','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','uxrftxG','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','z0zlvwS','ENzpr0m','zMvHDhvYzuLK','yxbWBgLJyxrPB24VEMLW','yuTYyxK','mtiXodKWrNHKEfzO','s2vVCee','B2zPqu4','yxbWBhK','t29cywG','uefuq0G','qujzAgK','ruPfqum','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','A3fhCuq','whHmEuq','wgPmAg8','nZu0mdv6wxrnqxq','D0PWy1a','qw1ICe0','Dg9tDhjPBMC','CMHqz1m','rvjQtLe','qMfmsMu','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','CfDlBfe','BxvQzNq','zgLNzxn0','rgX5wLi','z3vlrLi','DgDRsgS','B3jAB2y','ANnVBG','EMTYAha','nteXn294DwLZwG','Dgv4Da','v1H1DK0','rNPYA1G','thb1CuO','DMzxsxa','ENnUuwO','Bwv0ywrHDge','kcGOlISPkYKRksSK','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','EKfJzha','l3n0zxbZ','mZC2B2vHDLHJ','s25SyMe','B2XqDKO','BNH2DLy','CLz2sMG','DxbKyxrL','yxbWBgLJyxrPB24VANnVBMW'];_0x16b6=function(){return _0x253693;};return _0x16b6();}export function computeChecksum(_0x2eb373){const _0x4c8902=_0x5bc8,_0x31398a={'tCHUH':_0x4c8902(0x1b3),'wuPtu':_0x4c8902(0x19a)};return createHash(_0x31398a['tCHUH'])['update'](_0x2eb373)[_0x4c8902(0x1e8)](_0x31398a[_0x4c8902(0x1c6)]);}export async function createVerificationStep(_0x54a879,_0x3d2494){const _0x3ea300=_0x5bc8,_0x2bdd37={'HXooY':_0x3ea300(0x1a1),'orZof':function(_0x25fe0b){return _0x25fe0b();},'MFDFV':'POST','CiLXA':_0x3ea300(0x1c3),'FDiQe':_0x3ea300(0x1e9)},_0x2b4382=await getToken();if(!_0x2b4382)throw new Error(_0x2bdd37[_0x3ea300(0x1be)]);const _0x30ecad=_0x2bdd37[_0x3ea300(0x1ec)](getApiBaseUrl),_0x48319d=await fetch(_0x30ecad+_0x3ea300(0x1bd)+_0x54a879+_0x3ea300(0x1fa),{'method':_0x2bdd37['MFDFV'],'headers':{'Authorization':_0x3ea300(0x204)+_0x2b4382,'Content-Type':_0x2bdd37['CiLXA']},'body':JSON[_0x3ea300(0x1b8)](_0x3d2494)});if(!_0x48319d['ok']){if(_0x3ea300(0x1e9)===_0x2bdd37['FDiQe']){const _0x9f02ea=await _0x48319d['text']();throw new Error('Failed\x20to\x20create\x20verification\x20step:\x20'+_0x9f02ea);}else{const _0x10ee6a=_0x14e069?function(){if(_0x2b49c9){const _0x12da8f=_0x9c564b['apply'](_0x550b80,arguments);return _0x12d0c1=null,_0x12da8f;}}:function(){};return _0x29032f=![],_0x10ee6a;}}return _0x48319d[_0x3ea300(0x1ed)]();}export async function createStepAsset(_0x1c36e8,_0x2dd1b5,_0x38ef1a){const _0x15272a=_0x5bc8,_0x84d981={'XtQUY':_0x15272a(0x1a1),'BfIyw':function(_0x34d66a,_0x1c43b3,_0x186eb9){return _0x34d66a(_0x1c43b3,_0x186eb9);},'HIRsz':'POST','YEZlx':_0x15272a(0x1c3)},_0x524d63=await getToken();if(!_0x524d63)throw new Error(_0x84d981[_0x15272a(0x19f)]);const _0x3158b3=getApiBaseUrl(),_0x4d813e=await _0x84d981[_0x15272a(0x1bb)](fetch,_0x3158b3+_0x15272a(0x1bd)+_0x1c36e8+'/steps/'+_0x2dd1b5+'/assets',{'method':_0x84d981['HIRsz'],'headers':{'Authorization':_0x15272a(0x204)+_0x524d63,'Content-Type':_0x84d981['YEZlx']},'body':JSON['stringify'](_0x38ef1a)});if(!_0x4d813e['ok']){const _0x2960fa=await _0x4d813e[_0x15272a(0x1f0)]();throw new Error(_0x15272a(0x1a2)+_0x2960fa);}return _0x4d813e[_0x15272a(0x1ed)]();}export async function updateVerificationStep(_0x14c00d,_0x2d458f,_0x29093b){const _0xf3a3c9=_0x5bc8,_0x479e30={'ZKiWw':function(_0xf8a1f5){return _0xf8a1f5();},'zAcdp':_0xf3a3c9(0x1a1),'FDQEv':function(_0xb5d826,_0x279097,_0xf6f5dc){return _0xb5d826(_0x279097,_0xf6f5dc);},'LpuqJ':_0xf3a3c9(0x1d7),'HtcIG':_0xf3a3c9(0x1c3),'xTEtx':function(_0x2b06b4,_0x188192){return _0x2b06b4!==_0x188192;},'rhPgS':'orxVb','qWaNu':_0xf3a3c9(0x1d9)},_0xea0155=await _0x479e30['ZKiWw'](getToken);if(!_0xea0155)throw new Error(_0x479e30[_0xf3a3c9(0x1f9)]);const _0x3bf56f=_0x479e30[_0xf3a3c9(0x1a8)](getApiBaseUrl),_0x49340c=await _0x479e30['FDQEv'](fetch,_0x3bf56f+'/api/v1/mcp/browser-sessions/'+_0x14c00d+'/steps/'+_0x2d458f,{'method':_0x479e30[_0xf3a3c9(0x1f3)],'headers':{'Authorization':_0xf3a3c9(0x204)+_0xea0155,'Content-Type':_0x479e30[_0xf3a3c9(0x1af)]},'body':JSON['stringify'](_0x29093b)});if(!_0x49340c['ok']){if(_0x479e30[_0xf3a3c9(0x1ae)](_0x479e30[_0xf3a3c9(0x1e2)],_0x479e30['qWaNu'])){const _0x5e6ba0=await _0x49340c[_0xf3a3c9(0x1f0)]();throw new Error('Failed\x20to\x20update\x20verification\x20step:\x20'+_0x5e6ba0);}else{if(_0x4744e6){const _0x4ca392=_0x69d7db[_0xf3a3c9(0x1d5)](_0x2ee716,arguments);return _0x109bf4=null,_0x4ca392;}}}}
@@ -1 +1 @@
1
- (function(_0x429eea,_0x430212){const _0x4a83b3=_0x2107,_0x38e013=_0x429eea();while(!![]){try{const _0x14cb49=-parseInt(_0x4a83b3(0x1c8))/0x1*(-parseInt(_0x4a83b3(0x1cb))/0x2)+-parseInt(_0x4a83b3(0x1cd))/0x3*(parseInt(_0x4a83b3(0x1cf))/0x4)+parseInt(_0x4a83b3(0x1d8))/0x5+-parseInt(_0x4a83b3(0x1da))/0x6+-parseInt(_0x4a83b3(0x1d9))/0x7+parseInt(_0x4a83b3(0x1de))/0x8+-parseInt(_0x4a83b3(0x1c4))/0x9;if(_0x14cb49===_0x430212)break;else _0x38e013['push'](_0x38e013['shift']());}catch(_0x1d7d92){_0x38e013['push'](_0x38e013['shift']());}}}(_0x5319,0x26d9e));import{homedir}from'os';import{join,dirname,parse}from'path';function _0x2107(_0xbbc11d,_0x8877b5){_0xbbc11d=_0xbbc11d-0x1c3;const _0x531929=_0x5319();let _0x21072d=_0x531929[_0xbbc11d];return _0x21072d;}import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0x15f4be=_0x2107,_0x302338={'eOfBx':function(_0x111957){return _0x111957();}};return process[_0x15f4be(0x1d5)]['CLAUDE_CONFIG_DIR']||join(_0x302338['eOfBx'](homedir),_0x15f4be(0x1ce));}export function getUserSkillsDir(){const _0x42e785=_0x2107;return join(getClaudeConfigDir(),_0x42e785(0x1c6));}export function getProjectRoot(){const _0x2cc94b=_0x2107,_0x213a15={'xoxIg':function(_0x40ca6f,_0x5657a4){return _0x40ca6f!==_0x5657a4;},'OufsV':function(_0x4f924f,_0x16363e,_0x8136c6){return _0x4f924f(_0x16363e,_0x8136c6);},'tLuiy':'.claude','LtHbz':function(_0x5a2ee6,_0x26d686){return _0x5a2ee6(_0x26d686);},'eXbVk':_0x2cc94b(0x1ca),'edLYE':function(_0x3c98bb,_0x562174){return _0x3c98bb(_0x562174);}};let _0x228a85=process['cwd']();const _0x445f3d=parse(_0x228a85)[_0x2cc94b(0x1c3)];while(_0x213a15['xoxIg'](_0x228a85,_0x445f3d)){if(existsSync(_0x213a15[_0x2cc94b(0x1d4)](join,_0x228a85,_0x213a15[_0x2cc94b(0x1e1)])))return _0x228a85;if(_0x213a15[_0x2cc94b(0x1df)](existsSync,_0x213a15[_0x2cc94b(0x1d4)](join,_0x228a85,_0x213a15['eXbVk'])))return _0x228a85;_0x228a85=_0x213a15['edLYE'](dirname,_0x228a85);}return process[_0x2cc94b(0x1e3)]();}function _0x5319(){const _0x5d722a=['parse','1045760llyGLf','1725213ABspTQ','97014HSDIqR','ranger','cJuJg','settings.json','1595080DJIMoZ','LtHbz','tCAwO','tLuiy','JyznA','cwd','enrJi','iUKNC','root','1900440KdCsxn','lcyFF','skills','SlfSh','45454gUQgTN','DeBxx','.git','14KBpAFb','data-mcp-server','40197NJYpur','.claude','28OuvANB','user','mcpServers','utf-8','cXeAu','OufsV','env','NGhJH'];_0x5319=function(){return _0x5d722a;};return _0x5319();}export function getProjectSkillsDir(){const _0x4fa1e3=_0x2107,_0x1cc441={'iUKNC':function(_0x47d9bf,_0x44ce91,_0x4875b8,_0x2b620e){return _0x47d9bf(_0x44ce91,_0x4875b8,_0x2b620e);},'enrJi':'.claude','JyznA':'skills'};return _0x1cc441[_0x4fa1e3(0x1e5)](join,getProjectRoot(),_0x1cc441[_0x4fa1e3(0x1e4)],_0x1cc441[_0x4fa1e3(0x1e2)]);}export function getSkillsDir(_0x58cd8a){const _0x355832=_0x2107,_0x4aefb8={'nWDfo':function(_0x2c6c4c,_0x496a54){return _0x2c6c4c===_0x496a54;}};return _0x4aefb8['nWDfo'](_0x58cd8a,_0x355832(0x1d0))?getUserSkillsDir():getProjectSkillsDir();}export function getSettingsPath(){const _0x380749=_0x2107,_0x450684={'SlfSh':function(_0x216c14,_0x327178,_0x48f3f7){return _0x216c14(_0x327178,_0x48f3f7);},'NGhJH':_0x380749(0x1dd)};return _0x450684[_0x380749(0x1c7)](join,getClaudeConfigDir(),_0x450684[_0x380749(0x1d6)]);}export async function loadClaudeSettings(){const _0x7c3472=_0x2107,_0xc979d0={'gveci':function(_0x3ad6c7,_0x5d34a2){return _0x3ad6c7(_0x5d34a2);},'tCAwO':'utf-8'},_0x396569=getSettingsPath();if(!_0xc979d0['gveci'](existsSync,_0x396569))return{};try{const _0x4bde14=await readFile(_0x396569,_0xc979d0[_0x7c3472(0x1e0)]);return JSON[_0x7c3472(0x1d7)](_0x4bde14);}catch{return{};}}export async function saveClaudeSettings(_0x3fab42){const _0x2e48c8=_0x2107,_0x5ec01f={'cXeAu':function(_0x584efe,_0x1f43dd,_0x5d78f1){return _0x584efe(_0x1f43dd,_0x5d78f1);},'cJuJg':function(_0x2c1ad1,_0x31756e,_0xc964f5,_0x5c0e63){return _0x2c1ad1(_0x31756e,_0xc964f5,_0x5c0e63);}},_0x21a5f7=getSettingsPath(),_0x55f1a9=getClaudeConfigDir();!existsSync(_0x55f1a9)&&await _0x5ec01f[_0x2e48c8(0x1d3)](mkdir,_0x55f1a9,{'recursive':!![]}),await _0x5ec01f[_0x2e48c8(0x1dc)](writeFile,_0x21a5f7,JSON['stringify'](_0x3fab42,null,0x2)+'\x0a',_0x2e48c8(0x1d2));}export function hasRangerServerInSettings(_0x7c8add){const _0x3a3042={'VDqYw':function(_0x12a864,_0x3e6c61){return _0x12a864!==_0x3e6c61;}};return _0x3a3042['VDqYw'](_0x7c8add['mcpServers']?.['ranger'],undefined);}export function setRangerServerInSettings(_0x2bcbfa){const _0x190fb1=_0x2107,_0x43ff05={'lcyFF':_0x190fb1(0x1db),'DeBxx':'@ranger-testing/ranger-cli'};!_0x2bcbfa['mcpServers']&&(_0x2bcbfa['mcpServers']={}),_0x2bcbfa[_0x190fb1(0x1d1)][_0x43ff05[_0x190fb1(0x1c5)]]={'command':'npx','args':[_0x43ff05[_0x190fb1(0x1c9)],_0x190fb1(0x1cc)]};}
1
+ (function(_0x7d06d9,_0x5b1973){const _0x54b1a2=_0x2660,_0x2d480c=_0x7d06d9();while(!![]){try{const _0x470f9c=parseInt(_0x54b1a2(0x13a))/0x1*(parseInt(_0x54b1a2(0x135))/0x2)+-parseInt(_0x54b1a2(0x14e))/0x3*(parseInt(_0x54b1a2(0x149))/0x4)+parseInt(_0x54b1a2(0x14d))/0x5+-parseInt(_0x54b1a2(0x152))/0x6*(-parseInt(_0x54b1a2(0x144))/0x7)+-parseInt(_0x54b1a2(0x14b))/0x8*(parseInt(_0x54b1a2(0x13f))/0x9)+-parseInt(_0x54b1a2(0x148))/0xa*(-parseInt(_0x54b1a2(0x141))/0xb)+-parseInt(_0x54b1a2(0x13b))/0xc*(parseInt(_0x54b1a2(0x142))/0xd);if(_0x470f9c===_0x5b1973)break;else _0x2d480c['push'](_0x2d480c['shift']());}catch(_0x19dab4){_0x2d480c['push'](_0x2d480c['shift']());}}}(_0x744e,0x8424b));import{homedir}from'os';import{join,dirname,parse}from'path';import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0x580b5e=_0x2660;return process[_0x580b5e(0x146)][_0x580b5e(0x137)]||join(homedir(),_0x580b5e(0x13d));}export function getUserSkillsDir(){return join(getClaudeConfigDir(),'skills');}export function getProjectRoot(){const _0x468d09=_0x2660,_0x34c477={'RrRPy':function(_0x54b614,_0x4172e0){return _0x54b614(_0x4172e0);},'mzsEK':function(_0x9ff760,_0x1ace61){return _0x9ff760!==_0x1ace61;},'dUnUq':function(_0x593044,_0x2217aa,_0x38bfee){return _0x593044(_0x2217aa,_0x38bfee);},'ulUmW':'.claude','ZHztb':function(_0x225baf,_0x1df43d,_0x38890d){return _0x225baf(_0x1df43d,_0x38890d);},'lLcnt':'.git','YfpQL':function(_0x470490,_0x2bda48){return _0x470490(_0x2bda48);}};let _0x5a8395=process[_0x468d09(0x147)]();const _0x1dcbe9=_0x34c477[_0x468d09(0x14a)](parse,_0x5a8395)['root'];while(_0x34c477['mzsEK'](_0x5a8395,_0x1dcbe9)){if(existsSync(_0x34c477[_0x468d09(0x13c)](join,_0x5a8395,_0x34c477['ulUmW'])))return _0x5a8395;if(existsSync(_0x34c477['ZHztb'](join,_0x5a8395,_0x34c477[_0x468d09(0x14c)])))return _0x5a8395;_0x5a8395=_0x34c477['YfpQL'](dirname,_0x5a8395);}return process[_0x468d09(0x147)]();}export function getProjectSkillsDir(){const _0x4420b6=_0x2660,_0xb21a91={'ZzJsv':function(_0x10fd2f,_0x115279,_0x199159,_0x1cd9ae){return _0x10fd2f(_0x115279,_0x199159,_0x1cd9ae);},'iOROd':function(_0x116f82){return _0x116f82();},'NAomS':_0x4420b6(0x139)};return _0xb21a91[_0x4420b6(0x136)](join,_0xb21a91['iOROd'](getProjectRoot),_0x4420b6(0x13d),_0xb21a91['NAomS']);}export function getSkillsDir(_0x4f7c3d){const _0x2f8ef1=_0x2660,_0x46288c={'VOgok':function(_0x38b92b,_0x3eb270){return _0x38b92b===_0x3eb270;}};return _0x46288c['VOgok'](_0x4f7c3d,_0x2f8ef1(0x143))?getUserSkillsDir():getProjectSkillsDir();}function _0x2660(_0x268e39,_0x4946f3){_0x268e39=_0x268e39-0x133;const _0x744eb3=_0x744e();let _0x266093=_0x744eb3[_0x268e39];return _0x266093;}export function getSettingsPath(){const _0x33b1d8=_0x2660,_0x2f0384={'uoLJw':'settings.json'};return join(getClaudeConfigDir(),_0x2f0384[_0x33b1d8(0x14f)]);}function _0x744e(){const _0xd2f43f=['skills','1JYQKCH','1584588dslrNk','dUnUq','.claude','mHRFo','1561959oxddxY','ranger','575311rakRWy','117uXYpQR','user','2412599nTfqKh','utf-8','env','cwd','100iBiPBg','8LqtGyn','RrRPy','8HrHaog','lLcnt','2514305JhnHJW','513114aJErgu','uoLJw','stringify','DDrPe','6odUtQy','GOPEw','mcpServers','1749598QPYSdr','ZzJsv','CLAUDE_CONFIG_DIR','olqYF'];_0x744e=function(){return _0xd2f43f;};return _0x744e();}export async function loadClaudeSettings(){const _0x490166=_0x2660,_0x493e40={'olqYF':function(_0x1ea88a,_0xafb605,_0x4fb183){return _0x1ea88a(_0xafb605,_0x4fb183);}},_0x587d96=getSettingsPath();if(!existsSync(_0x587d96))return{};try{const _0x21a840=await _0x493e40[_0x490166(0x138)](readFile,_0x587d96,_0x490166(0x145));return JSON['parse'](_0x21a840);}catch{return{};}}export async function saveClaudeSettings(_0x5c1811){const _0x3493e0=_0x2660,_0x548490={'oHaVo':function(_0x432674){return _0x432674();},'mHRFo':function(_0x79a4e4,_0x599f78){return _0x79a4e4(_0x599f78);},'sVbRy':function(_0x9131e,_0x5cd89d,_0x188e1b){return _0x9131e(_0x5cd89d,_0x188e1b);},'DDrPe':function(_0x4e92f2,_0x1b270e){return _0x4e92f2+_0x1b270e;}},_0x342bfa=_0x548490['oHaVo'](getSettingsPath),_0x5c8d07=getClaudeConfigDir();!_0x548490[_0x3493e0(0x13e)](existsSync,_0x5c8d07)&&await _0x548490['sVbRy'](mkdir,_0x5c8d07,{'recursive':!![]}),await writeFile(_0x342bfa,_0x548490[_0x3493e0(0x151)](JSON[_0x3493e0(0x150)](_0x5c1811,null,0x2),'\x0a'),_0x3493e0(0x145));}export function hasRangerServerInSettings(_0x1194aa){const _0x4884d0=_0x2660,_0x2255bb={'GLpmd':_0x4884d0(0x140)};return _0x1194aa['mcpServers']?.[_0x2255bb['GLpmd']]!==undefined;}export function setRangerServerInSettings(_0x1a486f){const _0x5c4e14=_0x2660,_0x4856ea={'YgVdn':'@ranger-testing/ranger-cli','GOPEw':'data-mcp-server'};!_0x1a486f[_0x5c4e14(0x134)]&&(_0x1a486f[_0x5c4e14(0x134)]={}),_0x1a486f[_0x5c4e14(0x134)][_0x5c4e14(0x140)]={'command':'npx','args':[_0x4856ea['YgVdn'],_0x4856ea[_0x5c4e14(0x133)]]};}
@@ -1 +1 @@
1
- (function(_0x2b431d,_0x338cc2){const _0x5bd3e8=_0x33f0,_0x34d979=_0x2b431d();while(!![]){try{const _0x4ae1e0=-parseInt(_0x5bd3e8(0x192))/0x1*(-parseInt(_0x5bd3e8(0x18c))/0x2)+parseInt(_0x5bd3e8(0x183))/0x3+parseInt(_0x5bd3e8(0x1a4))/0x4+-parseInt(_0x5bd3e8(0x199))/0x5+parseInt(_0x5bd3e8(0x19b))/0x6*(-parseInt(_0x5bd3e8(0x19e))/0x7)+parseInt(_0x5bd3e8(0x188))/0x8*(parseInt(_0x5bd3e8(0x19d))/0x9)+parseInt(_0x5bd3e8(0x1a0))/0xa*(-parseInt(_0x5bd3e8(0x196))/0xb);if(_0x4ae1e0===_0x338cc2)break;else _0x34d979['push'](_0x34d979['shift']());}catch(_0x2220ae){_0x34d979['push'](_0x34d979['shift']());}}}(_0x4fc0,0xe0c65));import{spawn}from'child_process';export function runClaudeCommand(_0x12b2f5,_0x570017){const _0x415716=_0x33f0,_0x11bf9a={'mjxlT':function(_0x1c8736,_0x40fa86){return _0x1c8736===_0x40fa86;},'JTjpo':function(_0x4d81be,_0x5dcc23){return _0x4d81be(_0x5dcc23);},'kvFZz':_0x415716(0x187),'BtcXy':'inherit','vFYAH':function(_0x36643b,_0x494d5d,_0x3019e5,_0x2f17b1){return _0x36643b(_0x494d5d,_0x3019e5,_0x2f17b1);},'xsRrf':_0x415716(0x193),'mUDrk':_0x415716(0x19a),'nWnoi':'close','XuGWc':_0x415716(0x18b)};return new Promise(_0x650426=>{const _0x4a35e7=_0x415716,_0x1ce63a=_0x570017?.['captureOutput']?_0x11bf9a['kvFZz']:_0x11bf9a['BtcXy'],_0xeee3ab=_0x11bf9a[_0x4a35e7(0x184)](spawn,_0x11bf9a['xsRrf'],_0x12b2f5,{'stdio':_0x1ce63a});let _0x21fcea='';_0x570017?.[_0x4a35e7(0x1a1)]&&_0xeee3ab['stdout']&&_0xeee3ab['stdout']['on'](_0x11bf9a[_0x4a35e7(0x19c)],_0x34868c=>{_0x21fcea+=_0x34868c['toString']();}),_0x570017?.['captureOutput']&&_0xeee3ab['stderr']&&_0xeee3ab['stderr']['on']('data',_0x2f9dbe=>{const _0x47e1ed=_0x4a35e7;_0x21fcea+=_0x2f9dbe[_0x47e1ed(0x1a3)]();}),_0xeee3ab['on'](_0x11bf9a[_0x4a35e7(0x18e)],_0x239806=>{const _0x26c9c3=_0x4a35e7;_0x11bf9a[_0x26c9c3(0x18a)](_0x239806,0x0)?_0x11bf9a[_0x26c9c3(0x18d)](_0x650426,{'success':!![],'output':_0x21fcea}):_0x11bf9a[_0x26c9c3(0x18d)](_0x650426,{'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x239806,'output':_0x21fcea});}),_0xeee3ab['on'](_0x11bf9a['XuGWc'],_0xfcb402=>{const _0x2d58ac=_0x4a35e7;_0x650426({'success':![],'error':_0xfcb402[_0x2d58ac(0x195)]});});});}export async function isMarketplaceAdded(_0x4421b0){const _0x3ffaf7=_0x33f0,_0x5cd26d={'pPhec':function(_0x5e462c,_0x23c2c6,_0xe3a064){return _0x5e462c(_0x23c2c6,_0xe3a064);},'eahfG':_0x3ffaf7(0x189),'MMfIj':_0x3ffaf7(0x182)},_0xae7d81=await _0x5cd26d['pPhec'](runClaudeCommand,[_0x5cd26d['eahfG'],_0x5cd26d['MMfIj'],_0x3ffaf7(0x19f)],{'captureOutput':!![]});if(!_0xae7d81['success']||!_0xae7d81['output'])return![];return _0xae7d81[_0x3ffaf7(0x18f)]['includes'](_0x4421b0);}function _0x4fc0(){const _0x5c53bc=['250nTWKOc','captureOutput','includes','toString','6873372XxkDzJ','enabled','match','marketplace','3514656IXxJJn','vFYAH','[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','version','pipe','6098120VgXLRU','plugin','mjxlT','error','218002PeDCOp','JTjpo','nWnoi','output','nPzqb','TNNRl','1zfxFST','claude','znPGK','message','376123meojsK','success','scope','7034270wqRYqO','data','8046420TpwXWI','mUDrk','18jdzrHp','7osFzwF','list'];_0x4fc0=function(){return _0x5c53bc;};return _0x4fc0();}function _0x33f0(_0x33ca71,_0x3c9b0c){_0x33ca71=_0x33ca71-0x181;const _0x4fc0b8=_0x4fc0();let _0x33f089=_0x4fc0b8[_0x33ca71];return _0x33f089;}export async function isPluginInstalled(_0x57833a){const _0x8821f0=_0x33f0,_0x434df3={'iWoee':function(_0x609787,_0x5a7b93,_0x31d2be){return _0x609787(_0x5a7b93,_0x31d2be);}},_0x433557=await _0x434df3['iWoee'](runClaudeCommand,['plugin',_0x8821f0(0x19f)],{'captureOutput':!![]});if(!_0x433557[_0x8821f0(0x197)]||!_0x433557['output'])return![];return _0x433557['output'][_0x8821f0(0x1a2)](_0x57833a);}export async function getPluginInfo(_0x7deeca){const _0x124cb0=_0x33f0,_0x5afcf3={'nPzqb':function(_0x4e4573,_0x55eaa0,_0x520730){return _0x4e4573(_0x55eaa0,_0x520730);},'znPGK':'plugin','TNNRl':_0x124cb0(0x19f),'XbftT':function(_0x33ccd3,_0x44e003){return _0x33ccd3===_0x44e003;}},_0x50136a=await _0x5afcf3[_0x124cb0(0x190)](runClaudeCommand,[_0x5afcf3[_0x124cb0(0x194)],_0x5afcf3[_0x124cb0(0x191)]],{'captureOutput':!![]});if(!_0x50136a['success']||!_0x50136a[_0x124cb0(0x18f)])return null;if(!_0x50136a[_0x124cb0(0x18f)][_0x124cb0(0x1a2)](_0x7deeca))return null;const _0x1832b0={'name':_0x7deeca},_0x4a8bf1=_0x50136a[_0x124cb0(0x18f)]['match'](new RegExp(_0x7deeca+_0x124cb0(0x185),'i'));_0x4a8bf1&&(_0x1832b0[_0x124cb0(0x198)]=_0x4a8bf1[0x1]['toLowerCase']());const _0x4108ef=_0x50136a[_0x124cb0(0x18f)][_0x124cb0(0x181)](new RegExp(_0x7deeca+'[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','i'));_0x4108ef&&(_0x1832b0[_0x124cb0(0x186)]=_0x4108ef[0x1]);const _0x655fc4=_0x50136a[_0x124cb0(0x18f)]['match'](new RegExp(_0x7deeca+'[\x5cs\x5cS]*?(enabled|disabled)','i'));return _0x655fc4&&(_0x1832b0['enabled']=_0x5afcf3['XbftT'](_0x655fc4[0x1]['toLowerCase'](),_0x124cb0(0x1a5))),_0x1832b0;}
1
+ (function(_0x54e996,_0x58aebb){const _0x19adc9=_0xf69f,_0x471bd8=_0x54e996();while(!![]){try{const _0x63a93c=parseInt(_0x19adc9(0xf3))/0x1+parseInt(_0x19adc9(0xee))/0x2+parseInt(_0x19adc9(0xf8))/0x3*(-parseInt(_0x19adc9(0xe7))/0x4)+parseInt(_0x19adc9(0xf6))/0x5*(parseInt(_0x19adc9(0xe1))/0x6)+-parseInt(_0x19adc9(0xed))/0x7*(-parseInt(_0x19adc9(0xec))/0x8)+-parseInt(_0x19adc9(0xf5))/0x9*(parseInt(_0x19adc9(0xf0))/0xa)+-parseInt(_0x19adc9(0xe6))/0xb;if(_0x63a93c===_0x58aebb)break;else _0x471bd8['push'](_0x471bd8['shift']());}catch(_0x569b7c){_0x471bd8['push'](_0x471bd8['shift']());}}}(_0x1e35,0x36e23));import{spawn}from'child_process';function _0xf69f(_0x42dc26,_0x746ad2){_0x42dc26=_0x42dc26-0xe0;const _0x1e35ec=_0x1e35();let _0xf69f12=_0x1e35ec[_0x42dc26];return _0xf69f12;}export function runClaudeCommand(_0x141e85,_0x311b2b){const _0x357580=_0xf69f,_0xbb4ecc={'XJMBB':function(_0x3a7db0,_0x35a3f0){return _0x3a7db0===_0x35a3f0;},'AzoaN':function(_0xca388f,_0x7c1fa4){return _0xca388f(_0x7c1fa4);},'cahZZ':_0x357580(0xfb),'KbowI':'inherit','AiTFG':function(_0x569876,_0x457d9f,_0x426f3a,_0x32e8f3){return _0x569876(_0x457d9f,_0x426f3a,_0x32e8f3);},'LwWfN':'data'};return new Promise(_0x463673=>{const _0x38e8b0=_0x357580,_0x198a37=_0x311b2b?.['captureOutput']?_0xbb4ecc['cahZZ']:_0xbb4ecc['KbowI'],_0x52b7db=_0xbb4ecc['AiTFG'](spawn,_0x38e8b0(0xea),_0x141e85,{'stdio':_0x198a37});let _0x4f2e45='';_0x311b2b?.[_0x38e8b0(0xf1)]&&_0x52b7db[_0x38e8b0(0xf9)]&&_0x52b7db[_0x38e8b0(0xf9)]['on'](_0xbb4ecc['LwWfN'],_0x8846f8=>{const _0x2fb667=_0x38e8b0;_0x4f2e45+=_0x8846f8[_0x2fb667(0xef)]();}),_0x311b2b?.['captureOutput']&&_0x52b7db[_0x38e8b0(0xf7)]&&_0x52b7db[_0x38e8b0(0xf7)]['on']('data',_0x573dcf=>{_0x4f2e45+=_0x573dcf['toString']();}),_0x52b7db['on'](_0x38e8b0(0xe5),_0x21adb0=>{const _0x33ccae=_0x38e8b0;_0xbb4ecc[_0x33ccae(0xeb)](_0x21adb0,0x0)?_0xbb4ecc[_0x33ccae(0xe3)](_0x463673,{'success':!![],'output':_0x4f2e45}):_0xbb4ecc[_0x33ccae(0xe3)](_0x463673,{'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x21adb0,'output':_0x4f2e45});}),_0x52b7db['on']('error',_0x4c907a=>{const _0x2a9cbe=_0x38e8b0;_0xbb4ecc['AzoaN'](_0x463673,{'success':![],'error':_0x4c907a[_0x2a9cbe(0xf2)]});});});}export async function isMarketplaceAdded(_0x5d94ef){const _0x53ab78=_0xf69f,_0x58d5f2={'XhRrJ':_0x53ab78(0xe0),'ehNWL':_0x53ab78(0xfa),'gDWTu':_0x53ab78(0xe2)},_0x1db5e3=await runClaudeCommand([_0x58d5f2['XhRrJ'],_0x58d5f2['ehNWL'],_0x58d5f2[_0x53ab78(0xf4)]],{'captureOutput':!![]});if(!_0x1db5e3['success']||!_0x1db5e3[_0x53ab78(0xfc)])return![];return _0x1db5e3[_0x53ab78(0xfc)][_0x53ab78(0xe9)](_0x5d94ef);}export async function isPluginInstalled(_0x5146e1){const _0x568f10=_0xf69f,_0x29e761={'DInaz':function(_0x1bd25b,_0x53f502,_0x25948){return _0x1bd25b(_0x53f502,_0x25948);},'FZkOX':'plugin'},_0x2e6dbb=await _0x29e761['DInaz'](runClaudeCommand,[_0x29e761['FZkOX'],'list'],{'captureOutput':!![]});if(!_0x2e6dbb['success']||!_0x2e6dbb[_0x568f10(0xfc)])return![];return _0x2e6dbb['output'][_0x568f10(0xe9)](_0x5146e1);}export async function getPluginInfo(_0x2d117a){const _0x692821=_0xf69f,_0x5cbaaa={'KSeIq':_0x692821(0xe0),'TtPXC':function(_0x510989,_0x4f25b8){return _0x510989===_0x4f25b8;}},_0x3610b8=await runClaudeCommand([_0x5cbaaa['KSeIq'],'list'],{'captureOutput':!![]});if(!_0x3610b8['success']||!_0x3610b8[_0x692821(0xfc)])return null;if(!_0x3610b8[_0x692821(0xfc)][_0x692821(0xe9)](_0x2d117a))return null;const _0x1d6835={'name':_0x2d117a},_0x247ec6=_0x3610b8['output'][_0x692821(0xfe)](new RegExp(_0x2d117a+_0x692821(0xe8),'i'));_0x247ec6&&(_0x1d6835['scope']=_0x247ec6[0x1][_0x692821(0xff)]());const _0x4aaf47=_0x3610b8['output']['match'](new RegExp(_0x2d117a+'[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','i'));_0x4aaf47&&(_0x1d6835['version']=_0x4aaf47[0x1]);const _0x16cd2c=_0x3610b8[_0x692821(0xfc)][_0x692821(0xfe)](new RegExp(_0x2d117a+_0x692821(0xfd),'i'));return _0x16cd2c&&(_0x1d6835[_0x692821(0xe4)]=_0x5cbaaa['TtPXC'](_0x16cd2c[0x1]['toLowerCase'](),'enabled')),_0x1d6835;}function _0x1e35(){const _0x29b6b6=['output','[\x5cs\x5cS]*?(enabled|disabled)','match','toLowerCase','plugin','15096bAVvSj','list','AzoaN','enabled','close','6490660DjGTXk','489956ZrizEo','[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','includes','claude','XJMBB','302672zyCYjy','77kZkBux','810694kNycYi','toString','1457460euHNpJ','captureOutput','message','354305rJORON','gDWTu','27wweBOX','395RQbpLQ','stderr','3ANkQgW','stdout','marketplace','pipe'];_0x1e35=function(){return _0x29b6b6;};return _0x1e35();}
@@ -1 +1 @@
1
- (function(_0x578f83,_0xfdd524){const _0x53006e=_0x3a2e,_0x228787=_0x578f83();while(!![]){try{const _0x5dd173=parseInt(_0x53006e(0x98))/0x1+parseInt(_0x53006e(0x97))/0x2*(-parseInt(_0x53006e(0x99))/0x3)+-parseInt(_0x53006e(0x9f))/0x4*(parseInt(_0x53006e(0x94))/0x5)+-parseInt(_0x53006e(0x9b))/0x6*(-parseInt(_0x53006e(0x93))/0x7)+parseInt(_0x53006e(0x9d))/0x8*(parseInt(_0x53006e(0xa1))/0x9)+-parseInt(_0x53006e(0x9e))/0xa*(parseInt(_0x53006e(0x92))/0xb)+parseInt(_0x53006e(0xa0))/0xc;if(_0x5dd173===_0xfdd524)break;else _0x228787['push'](_0x228787['shift']());}catch(_0x111acd){_0x228787['push'](_0x228787['shift']());}}}(_0x3f1c,0x6ee89));import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM='aes-256-gcm',SALT='ranger-auth-encryption',KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x113f8e){const _0x5a7ec7={'QfDVa':function(_0xb9f94,_0x7b65e2,_0xee5d07,_0xce0685,_0x1e4170,_0xfd1be2){return _0xb9f94(_0x7b65e2,_0xee5d07,_0xce0685,_0x1e4170,_0xfd1be2);}};return _0x5a7ec7['QfDVa'](pbkdf2Sync,_0x113f8e,SALT,0x186a0,KEY_LENGTH,'sha256');}function _0x3a2e(_0xd52318,_0x48acb1){_0xd52318=_0xd52318-0x8e;const _0x3f1c9e=_0x3f1c();let _0x3a2e3c=_0x3f1c9e[_0xd52318];return _0x3a2e3c;}export function encrypt(_0x3d11ba,_0x40802a){const _0x1b7f2a=_0x3a2e,_0x80c07f={'pPmQr':function(_0x5a2cae,_0x1dd862){return _0x5a2cae(_0x1dd862);},'kYKTz':function(_0x27110f,_0x21d737){return _0x27110f(_0x21d737);},'NuxzF':function(_0x305e08,_0x173c5c,_0x55d81e,_0x4c910f){return _0x305e08(_0x173c5c,_0x55d81e,_0x4c910f);},'mIOEQ':'utf8'},_0x4fb3b2=_0x80c07f['pPmQr'](deriveKey,_0x40802a),_0xfbaa33=_0x80c07f[_0x1b7f2a(0x9c)](randomBytes,IV_LENGTH),_0x515a2f=_0x80c07f['NuxzF'](createCipheriv,ALGORITHM,_0x4fb3b2,_0xfbaa33),_0x4e27b3=Buffer['concat']([_0x515a2f[_0x1b7f2a(0x90)](_0x3d11ba,_0x80c07f[_0x1b7f2a(0x8f)]),_0x515a2f[_0x1b7f2a(0x8e)]()]),_0x40c7ec=_0x515a2f[_0x1b7f2a(0x96)]();return Buffer[_0x1b7f2a(0x9a)]([_0xfbaa33,_0x40c7ec,_0x4e27b3]);}export function decrypt(_0x3bb2ad,_0x1cd691){const _0x2e25b3=_0x3a2e,_0x3acdf5={'oZAbg':function(_0x23c3f2,_0x1aeb06){return _0x23c3f2(_0x1aeb06);},'pVpTf':function(_0x336d6b,_0x41c68d){return _0x336d6b+_0x41c68d;},'hWkkq':function(_0x7eee42,_0x3d4242,_0x33d9a6,_0x23df4d){return _0x7eee42(_0x3d4242,_0x33d9a6,_0x23df4d);}},_0xb66dce=_0x3acdf5['oZAbg'](deriveKey,_0x1cd691),_0x3bb043=_0x3bb2ad['subarray'](0x0,IV_LENGTH),_0x1203da=_0x3bb2ad['subarray'](IV_LENGTH,IV_LENGTH+TAG_LENGTH),_0x335791=_0x3bb2ad[_0x2e25b3(0x95)](_0x3acdf5['pVpTf'](IV_LENGTH,TAG_LENGTH)),_0x3b5d9e=_0x3acdf5['hWkkq'](createDecipheriv,ALGORITHM,_0xb66dce,_0x3bb043);return _0x3b5d9e[_0x2e25b3(0x91)](_0x1203da),_0x3b5d9e['update'](_0x335791)+_0x3b5d9e[_0x2e25b3(0x8e)]('utf8');}function _0x3f1c(){const _0x1548b3=['subarray','getAuthTag','1331516CGyNzq','839821uyRDoO','3PCZZYw','concat','47406gjxEKV','kYKTz','32sdhErh','4660MoLVlL','7388oetHxZ','6795924GEvqLt','314172SSLTNy','final','mIOEQ','update','setAuthTag','11033LNgTZh','392WdyOOo','1085TYnGrS'];_0x3f1c=function(){return _0x1548b3;};return _0x3f1c();}
1
+ const _0x99cabe=_0x3aeb;(function(_0x5710ae,_0xcbc891){const _0x5a06e2=_0x3aeb,_0xd0a25e=_0x5710ae();while(!![]){try{const _0x459da5=parseInt(_0x5a06e2(0x1b7))/0x1+-parseInt(_0x5a06e2(0x1bb))/0x2+parseInt(_0x5a06e2(0x1c5))/0x3+parseInt(_0x5a06e2(0x1c2))/0x4+-parseInt(_0x5a06e2(0x1ba))/0x5+-parseInt(_0x5a06e2(0x1bd))/0x6*(-parseInt(_0x5a06e2(0x1be))/0x7)+-parseInt(_0x5a06e2(0x1b9))/0x8*(parseInt(_0x5a06e2(0x1c1))/0x9);if(_0x459da5===_0xcbc891)break;else _0xd0a25e['push'](_0xd0a25e['shift']());}catch(_0x404260){_0xd0a25e['push'](_0xd0a25e['shift']());}}}(_0x5712,0x9c001));import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';function _0x5712(){const _0x29ebad=['getAuthTag','3316302yxBoam','FPNWk','concat','167407DbqVdK','setAuthTag','3411608GcZUhf','4448065LAPTDL','1635948aOedgB','aes-256-gcm','264vcBMzR','61180QTSNuW','update','subarray','9FmJvUF','4462456pJCHgN','ranger-auth-encryption'];_0x5712=function(){return _0x29ebad;};return _0x5712();}const ALGORITHM=_0x99cabe(0x1bc),SALT=_0x99cabe(0x1c3),KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x2f1759){const _0x544595={'SqMrZ':function(_0x899b15,_0x32824b,_0x1ce7f1,_0x4518f6,_0x4ef0e2,_0x483560){return _0x899b15(_0x32824b,_0x1ce7f1,_0x4518f6,_0x4ef0e2,_0x483560);}};return _0x544595['SqMrZ'](pbkdf2Sync,_0x2f1759,SALT,0x186a0,KEY_LENGTH,'sha256');}function _0x3aeb(_0x38d51d,_0x4b1d1c){_0x38d51d=_0x38d51d-0x1b5;const _0x571283=_0x5712();let _0x3aebaf=_0x571283[_0x38d51d];return _0x3aebaf;}export function encrypt(_0x6ab3b,_0x504f14){const _0x4f5b02=_0x99cabe,_0x3ca6cc={'BaQwq':'utf8'},_0x39bbc7=deriveKey(_0x504f14),_0x1513da=randomBytes(IV_LENGTH),_0x1e336c=createCipheriv(ALGORITHM,_0x39bbc7,_0x1513da),_0x2f2fe8=Buffer[_0x4f5b02(0x1b6)]([_0x1e336c[_0x4f5b02(0x1bf)](_0x6ab3b,_0x3ca6cc['BaQwq']),_0x1e336c['final']()]),_0x133352=_0x1e336c[_0x4f5b02(0x1c4)]();return Buffer[_0x4f5b02(0x1b6)]([_0x1513da,_0x133352,_0x2f2fe8]);}export function decrypt(_0x46e412,_0x573765){const _0x13e8bf=_0x99cabe,_0xba4b07={'FPNWk':function(_0x49274a,_0x5281e2){return _0x49274a(_0x5281e2);},'goztr':function(_0x56813a,_0x43bcaf){return _0x56813a+_0x43bcaf;},'JyfFl':function(_0x137eea,_0x48d799){return _0x137eea+_0x48d799;}},_0x1ff6cf=_0xba4b07[_0x13e8bf(0x1b5)](deriveKey,_0x573765),_0x2fb901=_0x46e412[_0x13e8bf(0x1c0)](0x0,IV_LENGTH),_0x4761cf=_0x46e412['subarray'](IV_LENGTH,_0xba4b07['goztr'](IV_LENGTH,TAG_LENGTH)),_0x3f3d46=_0x46e412['subarray'](_0xba4b07['JyfFl'](IV_LENGTH,TAG_LENGTH)),_0x5d6c01=createDecipheriv(ALGORITHM,_0x1ff6cf,_0x2fb901);return _0x5d6c01[_0x13e8bf(0x1b8)](_0x4761cf),_0x5d6c01[_0x13e8bf(0x1bf)](_0x3f3d46)+_0x5d6c01['final']('utf8');}
@@ -1 +1 @@
1
- const _0x8ceff4=_0x38d0;(function(_0x461695,_0xcc1fd6){const _0x107c58=_0x38d0,_0x417ce9=_0x461695();while(!![]){try{const _0x47a241=parseInt(_0x107c58(0x84))/0x1+parseInt(_0x107c58(0x9f))/0x2*(-parseInt(_0x107c58(0x8e))/0x3)+-parseInt(_0x107c58(0xa3))/0x4*(parseInt(_0x107c58(0xa7))/0x5)+-parseInt(_0x107c58(0x93))/0x6*(parseInt(_0x107c58(0x86))/0x7)+parseInt(_0x107c58(0x7a))/0x8+-parseInt(_0x107c58(0x94))/0x9*(-parseInt(_0x107c58(0x7c))/0xa)+parseInt(_0x107c58(0x8d))/0xb;if(_0x47a241===_0xcc1fd6)break;else _0x417ce9['push'](_0x417ce9['shift']());}catch(_0x4e3007){_0x417ce9['push'](_0x417ce9['shift']());}}}(_0x1692,0xf0e65));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set(['--token','-t',_0x8ceff4(0x99),_0x8ceff4(0x7e),_0x8ceff4(0x7b),'--key',_0x8ceff4(0x8c),'--pass',_0x8ceff4(0x8f),'--authorization','--header','--cookie','--credentials']),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function _0x1692(){const _0x3bd5ff=['544091dMmuvA','has_token','550319OztTuB','NuEpX','/api/v1/mcp/desire-path-logs','Bearer\x20','startsWith','has','--password','29438750MUIRdE','3KPDWFJ','--auth','application/json','NRhcd','Invalid\x20values','42dmBiTh','11466aRdAKQ','rawCommand','[desire-path]\x20Sending\x20log\x20to\x20','unknown_argument','stringify','--secret','slice','push','stdout','includes','ZhgTn','2795422ocbNkA','isTTY','errorMessage','featureId','808uxDfgY','[REDACTED]','syntax_error','error','30340loJHeG','Unknown\x20argument','DXlpH','sessionId','5136272yiccfM','--apikey','2340ZlgGBF','toLowerCase','--api-key','indexOf','POST','catch','DEBUG','[desire-path]\x20Payload:\x20'];_0x1692=function(){return _0x3bd5ff;};return _0x1692();}function _0x38d0(_0x1285a6,_0x3b4940){_0x1285a6=_0x1285a6-0x79;const _0x1692a9=_0x1692();let _0x38d0fb=_0x1692a9[_0x1285a6];return _0x38d0fb;}function looksLikeToken(_0x5f1db4){return TOKEN_PATTERNS['some'](_0x28e1f7=>_0x28e1f7['test'](_0x5f1db4));}export function sanitizeArgs(_0x229688){const _0x3f47aa=_0x8ceff4,_0x23c43d={'JxqBr':function(_0x1b620b,_0x2fefb9){return _0x1b620b!==_0x2fefb9;},'mDKoQ':_0x3f47aa(0xa4)},_0x2f8cae=[];let _0x22e619=![];for(let _0x5bc663=0x0;_0x5bc663<_0x229688['length'];_0x5bc663++){const _0x1a8491=_0x229688[_0x5bc663];if(_0x22e619){_0x2f8cae[_0x3f47aa(0x9b)](_0x3f47aa(0xa4)),_0x22e619=![];continue;}if(_0x1a8491['startsWith']('--')||_0x1a8491[_0x3f47aa(0x8a)]('-')){const _0x5cdac5=_0x1a8491[_0x3f47aa(0x7f)]('=');if(_0x23c43d['JxqBr'](_0x5cdac5,-0x1)){const _0x24116b=_0x1a8491[_0x3f47aa(0x9a)](0x0,_0x5cdac5)[_0x3f47aa(0x7d)]();if(SENSITIVE_FLAGS['has'](_0x24116b)){_0x2f8cae['push'](_0x1a8491['slice'](0x0,_0x5cdac5)+'=[REDACTED]');continue;}}else{const _0x45fb02=_0x1a8491[_0x3f47aa(0x7d)]();SENSITIVE_FLAGS[_0x3f47aa(0x8b)](_0x45fb02)&&(_0x22e619=!![]);}_0x2f8cae['push'](_0x1a8491);}else looksLikeToken(_0x1a8491)?_0x2f8cae['push'](_0x23c43d['mDKoQ']):_0x2f8cae['push'](_0x1a8491);}return _0x2f8cae['join']('\x20');}export async function logDesirePath(_0x51f2bd){const _0x19ec7e=_0x8ceff4,_0x567bcc={'ZhgTn':function(_0x54e3fd){return _0x54e3fd();},'YpHMF':_0x19ec7e(0x85),'DXlpH':function(_0x53bb24,_0x13bb60,_0x1fe3bd){return _0x53bb24(_0x13bb60,_0x1fe3bd);}};try{const _0x2a5247=await getToken()[_0x19ec7e(0x81)](()=>null),_0x4beae8=_0x567bcc[_0x19ec7e(0x9e)](getApiBaseUrl),_0x3a54cf=getCurrentVersion(),_0x45abed=_0x2a5247?_0x567bcc['YpHMF']:'no_token',_0x1c30bc={..._0x51f2bd['metadata'],'authStatus':_0x45abed,'isTty':process[_0x19ec7e(0x9c)][_0x19ec7e(0xa0)]??![]},_0x5891ea={'Content-Type':_0x19ec7e(0x90)};_0x2a5247&&(_0x5891ea['Authorization']=_0x19ec7e(0x89)+_0x2a5247);const _0x42921a={'rawCommand':_0x51f2bd[_0x19ec7e(0x95)],'errorMessage':_0x51f2bd[_0x19ec7e(0xa1)],'errorType':_0x51f2bd['errorType'],'featureId':_0x51f2bd[_0x19ec7e(0xa2)],'sessionId':_0x51f2bd[_0x19ec7e(0x79)],'metadata':_0x1c30bc,'cliVersion':_0x3a54cf};process['env'][_0x19ec7e(0x82)]&&(console[_0x19ec7e(0xa6)](_0x19ec7e(0x96)+_0x4beae8+_0x19ec7e(0x88)),console[_0x19ec7e(0xa6)](_0x19ec7e(0x83)+JSON['stringify'](_0x42921a,null,0x2))),await _0x567bcc[_0x19ec7e(0xa9)](fetch,_0x4beae8+_0x19ec7e(0x88),{'method':_0x19ec7e(0x80),'headers':_0x5891ea,'body':JSON[_0x19ec7e(0x98)](_0x42921a)});}catch(_0x2fb23e){process['env']['DEBUG']&&console[_0x19ec7e(0xa6)]('[desire-path]\x20Failed\x20to\x20send:\x20'+_0x2fb23e);}}export function getErrorType(_0x54f8f9,_0x24468a){const _0x38387f=_0x8ceff4,_0x30d19d={'NOPbJ':'unknown','NuEpX':'unknown_command','NRhcd':_0x38387f(0x97),'fswEK':'missing_required_argument'};if(_0x24468a)return'runtime_error';if(!_0x54f8f9)return _0x30d19d['NOPbJ'];if(_0x54f8f9['includes']('Unknown\x20command'))return _0x30d19d[_0x38387f(0x87)];if(_0x54f8f9['includes'](_0x38387f(0xa8)))return _0x30d19d[_0x38387f(0x91)];if(_0x54f8f9[_0x38387f(0x9d)]('Not\x20enough\x20non-option\x20arguments'))return _0x30d19d['fswEK'];if(_0x54f8f9['includes'](_0x38387f(0x92)))return'invalid_option_value';if(_0x54f8f9[_0x38387f(0x9d)]('Missing\x20required\x20argument'))return'missing_option';return _0x38387f(0xa5);}
1
+ const _0x516fd2=_0x434a;function _0x434a(_0x7da800,_0x31cb7c){_0x7da800=_0x7da800-0x14b;const _0x42cab0=_0x42ca();let _0x434aa9=_0x42cab0[_0x7da800];return _0x434aa9;}(function(_0x2ad685,_0x392bb0){const _0xce0ec4=_0x434a,_0x46f498=_0x2ad685();while(!![]){try{const _0x5b8e00=parseInt(_0xce0ec4(0x153))/0x1+-parseInt(_0xce0ec4(0x15b))/0x2*(-parseInt(_0xce0ec4(0x165))/0x3)+-parseInt(_0xce0ec4(0x14b))/0x4*(-parseInt(_0xce0ec4(0x14c))/0x5)+-parseInt(_0xce0ec4(0x174))/0x6+parseInt(_0xce0ec4(0x14d))/0x7*(parseInt(_0xce0ec4(0x17e))/0x8)+-parseInt(_0xce0ec4(0x16f))/0x9+-parseInt(_0xce0ec4(0x159))/0xa*(-parseInt(_0xce0ec4(0x16b))/0xb);if(_0x5b8e00===_0x392bb0)break;else _0x46f498['push'](_0x46f498['shift']());}catch(_0x5b0e0e){_0x46f498['push'](_0x46f498['shift']());}}}(_0x42ca,0xaf6a7));import{getToken}from'./keychain.js';function _0x42ca(){const _0x50be5f=['Authorization','rawCommand','isTTY','11515599FscFWR','join','cJvvJ','invalid_option_value','--apikey','827586DPhHqn','=[REDACTED]','error','push','--auth','[desire-path]\x20Payload:\x20','toLowerCase','RMQYA','[desire-path]\x20Sending\x20log\x20to\x20','Invalid\x20values','8QidmOH','metadata','8HRIbpt','1448575YkQoMg','4666879gJNQOn','missing_option','test','errorMessage','kpQeS','errorType','581918GukPgk','--secret','[desire-path]\x20Failed\x20to\x20send:\x20','[REDACTED]','sugUu','no_token','5640wbthmA','some','16pxwzKh','slice','--cookie','has_token','Bearer\x20','uVPum','DEBUG','catch','stdout','WjaUX','58146hpXuDM','syntax_error','--pass','includes','/api/v1/mcp/desire-path-logs','indexOf','2981gPkKHa'];_0x42ca=function(){return _0x50be5f;};return _0x42ca();}import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set(['--token','-t',_0x516fd2(0x154),'--api-key',_0x516fd2(0x173),'--key','--password',_0x516fd2(0x167),_0x516fd2(0x178),'--authorization','--header',_0x516fd2(0x15d),'--credentials']),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0xe8a834){const _0x4e68f9=_0x516fd2;return TOKEN_PATTERNS[_0x4e68f9(0x15a)](_0x3b471a=>_0x3b471a[_0x4e68f9(0x14f)](_0xe8a834));}export function sanitizeArgs(_0x213ae8){const _0x41a092=_0x516fd2,_0xf02ebe={'cJvvJ':_0x41a092(0x156),'sugUu':function(_0x1eed2f,_0x50e783){return _0x1eed2f!==_0x50e783;},'DmMGg':function(_0xe26eb3,_0x213563){return _0xe26eb3(_0x213563);}},_0x94da9c=[];let _0x1b5486=![];for(let _0x4d35b0=0x0;_0x4d35b0<_0x213ae8['length'];_0x4d35b0++){const _0x406d42=_0x213ae8[_0x4d35b0];if(_0x1b5486){_0x94da9c[_0x41a092(0x177)](_0xf02ebe['cJvvJ']),_0x1b5486=![];continue;}if(_0x406d42['startsWith']('--')||_0x406d42['startsWith']('-')){const _0x2dc0f4=_0x406d42[_0x41a092(0x16a)]('=');if(_0xf02ebe[_0x41a092(0x157)](_0x2dc0f4,-0x1)){const _0x353581=_0x406d42[_0x41a092(0x15c)](0x0,_0x2dc0f4)[_0x41a092(0x17a)]();if(SENSITIVE_FLAGS['has'](_0x353581)){_0x94da9c['push'](_0x406d42[_0x41a092(0x15c)](0x0,_0x2dc0f4)+_0x41a092(0x175));continue;}}else{const _0xf0ca1=_0x406d42[_0x41a092(0x17a)]();SENSITIVE_FLAGS['has'](_0xf0ca1)&&(_0x1b5486=!![]);}_0x94da9c[_0x41a092(0x177)](_0x406d42);}else _0xf02ebe['DmMGg'](looksLikeToken,_0x406d42)?_0x94da9c['push'](_0xf02ebe[_0x41a092(0x171)]):_0x94da9c[_0x41a092(0x177)](_0x406d42);}return _0x94da9c[_0x41a092(0x170)]('\x20');}export async function logDesirePath(_0x513fd8){const _0x418dc5=_0x516fd2,_0x3f3006={'RMQYA':function(_0x47a19f){return _0x47a19f();},'OIHkw':function(_0x2c63cd){return _0x2c63cd();},'almqh':'application/json','KWgaC':_0x418dc5(0x16c),'ThVBB':function(_0x1368ee,_0x217a85,_0x5ce375){return _0x1368ee(_0x217a85,_0x5ce375);},'dYxol':'POST'};try{const _0x22bebc=await _0x3f3006['RMQYA'](getToken)[_0x418dc5(0x162)](()=>null),_0x1f7bf9=_0x3f3006[_0x418dc5(0x17b)](getApiBaseUrl),_0x3389b3=_0x3f3006['OIHkw'](getCurrentVersion),_0x2fe333=_0x22bebc?_0x418dc5(0x15e):_0x418dc5(0x158),_0x215901={..._0x513fd8[_0x418dc5(0x17f)],'authStatus':_0x2fe333,'isTty':process[_0x418dc5(0x163)][_0x418dc5(0x16e)]??![]},_0x1f37c3={'Content-Type':_0x3f3006['almqh']};_0x22bebc&&(_0x1f37c3[_0x3f3006['KWgaC']]=_0x418dc5(0x15f)+_0x22bebc);const _0x41dded={'rawCommand':_0x513fd8[_0x418dc5(0x16d)],'errorMessage':_0x513fd8[_0x418dc5(0x150)],'errorType':_0x513fd8[_0x418dc5(0x152)],'featureId':_0x513fd8['featureId'],'sessionId':_0x513fd8['sessionId'],'metadata':_0x215901,'cliVersion':_0x3389b3};process['env'][_0x418dc5(0x161)]&&(console[_0x418dc5(0x176)](_0x418dc5(0x17c)+_0x1f7bf9+'/api/v1/mcp/desire-path-logs'),console[_0x418dc5(0x176)](_0x418dc5(0x179)+JSON['stringify'](_0x41dded,null,0x2))),await _0x3f3006['ThVBB'](fetch,_0x1f7bf9+_0x418dc5(0x169),{'method':_0x3f3006['dYxol'],'headers':_0x1f37c3,'body':JSON['stringify'](_0x41dded)});}catch(_0x34d077){process['env'][_0x418dc5(0x161)]&&console['error'](_0x418dc5(0x155)+_0x34d077);}}export function getErrorType(_0x3833a8,_0x5fc1c2){const _0x3dcd18=_0x516fd2,_0x276003={'kpQeS':'unknown','TnNto':'Unknown\x20argument','kcIXO':'Not\x20enough\x20non-option\x20arguments','WjaUX':'missing_required_argument','OwfRL':_0x3dcd18(0x172),'uELxk':'Missing\x20required\x20argument','uVPum':_0x3dcd18(0x166)};if(_0x5fc1c2)return'runtime_error';if(!_0x3833a8)return _0x276003[_0x3dcd18(0x151)];if(_0x3833a8[_0x3dcd18(0x168)]('Unknown\x20command'))return'unknown_command';if(_0x3833a8[_0x3dcd18(0x168)](_0x276003['TnNto']))return'unknown_argument';if(_0x3833a8['includes'](_0x276003['kcIXO']))return _0x276003[_0x3dcd18(0x164)];if(_0x3833a8['includes'](_0x3dcd18(0x17d)))return _0x276003['OwfRL'];if(_0x3833a8[_0x3dcd18(0x168)](_0x276003['uELxk']))return _0x3dcd18(0x14e);return _0x276003[_0x3dcd18(0x160)];}
@@ -1 +1 @@
1
- const _0x2cde13=_0x8740;(function(_0x1d6ca8,_0x4dd920){const _0x3b9991=_0x8740,_0x52e88b=_0x1d6ca8();while(!![]){try{const _0x3350ef=parseInt(_0x3b9991(0x14a))/0x1*(parseInt(_0x3b9991(0x126))/0x2)+parseInt(_0x3b9991(0x12f))/0x3+parseInt(_0x3b9991(0x139))/0x4+-parseInt(_0x3b9991(0x14b))/0x5+parseInt(_0x3b9991(0x12c))/0x6+-parseInt(_0x3b9991(0x11f))/0x7+-parseInt(_0x3b9991(0x120))/0x8;if(_0x3350ef===_0x4dd920)break;else _0x52e88b['push'](_0x52e88b['shift']());}catch(_0x5ddd17){_0x52e88b['push'](_0x52e88b['shift']());}}}(_0x44c6,0x951c4));import{exec}from'child_process';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0x2cde13(0x13d),WORKOS_TOKEN_URL='https://api.workos.com/user_management/authenticate';function _0x44c6(){const _0x4b4694=['iVoAT','Failed\x20to\x20create\x20organization:\x20','\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','user_code','oexpJ','VVAMP','CLI\x20Key','NAHHs','xVTdo','json','interval','Failed\x20to\x20refresh\x20token\x20with\x20org:\x20','Code:\x20','darwin','email','tNzOu','stdout','log','length','firstName','afuPx','2578625dqsyfj','4142096wZBkju','verification_uri_complete','QdScn','status','token','GET','39652DwngfV','/api-keys','application/json','ExxpV','name','Device\x20authorization\x20timed\x20out','3590700mRuAoe','\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','Provisioning\x20API\x20key...','106680rYgpXp','error','qfcIe','ClkVF','application/x-www-form-urlencoded','platform','FljYd','UeUjQ','authorization_pending','text','3058260WSAyaM','refresh_token','error_description','KvzRX','https://api.workos.com/user_management/authorize/device','LUazW','mcp:write','GhTZl','access_token','Failed\x20to\x20provision\x20API\x20key:\x20','Invalid\x20JWT\x20format','stringify','vnIWT','split','write','WHXjw','Setting\x20up\x20your\x20organization...','17GkyaAL','1193620XEpANh','bpjbT'];_0x44c6=function(){return _0x4b4694;};return _0x44c6();}export async function requestDeviceCode(_0x32c830){const _0x2dc212=_0x2cde13,_0x3703d0={'ClkVF':function(_0x1db115,_0x31033e,_0x432d7b){return _0x1db115(_0x31033e,_0x432d7b);}},_0x5d568d=await _0x3703d0[_0x2dc212(0x132)](fetch,WORKOS_DEVICE_AUTH_URL,{'method':'POST','headers':{'Content-Type':_0x2dc212(0x133)},'body':new URLSearchParams({'client_id':_0x32c830})});if(!_0x5d568d['ok']){const _0x1381ba=await _0x5d568d['text']();throw new Error('Failed\x20to\x20request\x20device\x20code:\x20'+_0x5d568d['status']+'\x20'+_0x1381ba);}return _0x5d568d[_0x2dc212(0x156)]();}function _0x8740(_0x372eb4,_0x1acd94){_0x372eb4=_0x372eb4-0x116;const _0x44c619=_0x44c6();let _0x8740ae=_0x44c619[_0x372eb4];return _0x8740ae;}export async function pollForTokens(_0x14acf9,_0x1b3af8,_0x56eca6,_0x40eca1){const _0x4e2c27=_0x2cde13,_0x123a3c={'VHkHK':function(_0x1a619d,_0x35ec2e){return _0x1a619d+_0x35ec2e;},'afuPx':function(_0xf5b734,_0x362dc0){return _0xf5b734*_0x362dc0;},'FcdER':function(_0x2baa12,_0x4cae88){return _0x2baa12*_0x4cae88;},'FljYd':function(_0x565137,_0x4b6338){return _0x565137(_0x4b6338);},'rwBFL':'POST','vnIWT':_0x4e2c27(0x133),'FTdFz':'Authentication\x20failed'},_0x1d7988=_0x123a3c['VHkHK'](Date['now'](),_0x123a3c[_0x4e2c27(0x11e)](_0x40eca1,0x3e8));let _0xe115a0=_0x123a3c['FcdER'](_0x56eca6,0x3e8);while(Date['now']()<_0x1d7988){await _0x123a3c[_0x4e2c27(0x135)](sleep,_0xe115a0);const _0x2b64b8=await fetch(WORKOS_TOKEN_URL,{'method':_0x123a3c['rwBFL'],'headers':{'Content-Type':_0x123a3c[_0x4e2c27(0x145)]},'body':new URLSearchParams({'client_id':_0x14acf9,'device_code':_0x1b3af8,'grant_type':'urn:ietf:params:oauth:grant-type:device_code'})});if(_0x2b64b8['ok'])return _0x2b64b8['json']();const _0x356319=await _0x2b64b8['json']();if(_0x356319['error']===_0x4e2c27(0x137))continue;if(_0x356319['error']==='slow_down'){_0xe115a0+=0x3e8;continue;}throw new Error(_0x356319[_0x4e2c27(0x13b)]||_0x356319[_0x4e2c27(0x130)]||_0x123a3c['FTdFz']);}throw new Error(_0x4e2c27(0x12b));}async function fetchUserProfile(_0x2d9858){const _0x34a520=_0x2cde13,_0x3140fd={'ExxpV':function(_0x4448f0,_0x21bd10,_0x5227c1){return _0x4448f0(_0x21bd10,_0x5227c1);}},_0x58aeb4=getApiBaseUrl();try{const _0x4c22fb=await _0x3140fd[_0x34a520(0x129)](fetch,_0x58aeb4+'/organization/me',{'method':_0x34a520(0x125),'headers':{'workos-token':_0x2d9858}});if(_0x4c22fb['ok'])return _0x4c22fb[_0x34a520(0x156)]();}catch{}return null;}function buildKeyName(_0x9456b1,_0x3cf988){const _0x4169b7=_0x2cde13,_0x328dc8={'NAHHs':function(_0x9149b6,_0x4050c2){return _0x9149b6===_0x4050c2;},'LUazW':function(_0x28d009,_0x4821c0){return _0x28d009+_0x4821c0;}},_0x587ac6=_0x3cf988['filter'](_0x51f3f7=>_0x51f3f7['name']===_0x9456b1||_0x51f3f7[_0x4169b7(0x12a)]['startsWith'](_0x9456b1+'\x20('));if(_0x328dc8[_0x4169b7(0x154)](_0x587ac6[_0x4169b7(0x11c)],0x0))return _0x9456b1;return _0x9456b1+'\x20('+_0x328dc8[_0x4169b7(0x13e)](_0x587ac6['length'],0x1)+')';}export async function provisionApiKey(_0x11077e){const _0xafcdf2=_0x2cde13,_0x1afe2e={'HJPSg':'application/json','VVAMP':_0xafcdf2(0x153),'nYmpr':function(_0x2b8812,_0x78b3df,_0x38c146){return _0x2b8812(_0x78b3df,_0x38c146);},'hsjlC':function(_0x3231ed,_0xf5c4d2,_0x2968ac){return _0x3231ed(_0xf5c4d2,_0x2968ac);},'GhTZl':_0xafcdf2(0x13f)},_0x49cf45=getApiBaseUrl(),_0x3f13d7={'Content-Type':_0x1afe2e['HJPSg'],'workos-token':_0x11077e},_0x5d61c7=await fetchUserProfile(_0x11077e),_0x5a041a=_0x5d61c7?.[_0xafcdf2(0x11d)]||_0x5d61c7?.[_0xafcdf2(0x118)]?.['split']('@')[0x0],_0x23d9e2=_0x5a041a?_0x5a041a+'\x27s\x20CLI\x20Key':_0x1afe2e[_0xafcdf2(0x152)];let _0x128dea=[];try{const _0x3dc0fa=await _0x1afe2e['nYmpr'](fetch,_0x49cf45+'/api-keys',{'method':_0xafcdf2(0x125),'headers':_0x3f13d7});if(_0x3dc0fa['ok']){const _0x4ac793=await _0x3dc0fa['json']();_0x128dea=_0x4ac793['apiKeys'];}}catch{}const _0x4f3026=_0x1afe2e['nYmpr'](buildKeyName,_0x23d9e2,_0x128dea),_0x2a9c03=await _0x1afe2e['hsjlC'](fetch,_0x49cf45+_0xafcdf2(0x127),{'method':'POST','headers':_0x3f13d7,'body':JSON[_0xafcdf2(0x144)]({'name':_0x4f3026,'scope':_0x1afe2e[_0xafcdf2(0x140)]})});if(!_0x2a9c03['ok']){const _0x5d975e=await _0x2a9c03[_0xafcdf2(0x138)]();throw new Error(_0xafcdf2(0x142)+_0x2a9c03[_0xafcdf2(0x123)]+'\x20'+_0x5d975e);}const _0x395601=await _0x2a9c03[_0xafcdf2(0x156)]();return _0x395601['apiKey'][_0xafcdf2(0x124)];}export function openBrowser(_0x2279cd){const _0x4ddc11=_0x2cde13,_0x36d931={'xVTdo':_0x4ddc11(0x117),'bpjbT':function(_0xdd27f8,_0x17985c){return _0xdd27f8===_0x17985c;},'tvcpu':'start'},_0xd9b069=process[_0x4ddc11(0x134)],_0x2b96ff=_0xd9b069===_0x36d931[_0x4ddc11(0x155)]?'open':_0x36d931[_0x4ddc11(0x14c)](_0xd9b069,'win32')?_0x36d931['tvcpu']:'xdg-open';exec(_0x2b96ff+'\x20'+JSON['stringify'](_0x2279cd));}function decodeJwtPayload(_0x43884d){const _0x3de853=_0x2cde13,_0x4be1e3={'gTwdo':function(_0xde8f50,_0x20b0ea){return _0xde8f50!==_0x20b0ea;},'iVoAT':_0x3de853(0x143)},_0x24d0de=_0x43884d[_0x3de853(0x146)]('.');if(_0x4be1e3['gTwdo'](_0x24d0de[_0x3de853(0x11c)],0x3))throw new Error(_0x4be1e3[_0x3de853(0x14d)]);const _0x3e6443=Buffer['from'](_0x24d0de[0x1],'base64url')['toString']('utf-8');return JSON['parse'](_0x3e6443);}async function selfServeSignup(_0xe414da){const _0xc170b0=_0x2cde13,_0x1263f3={'hCcwZ':function(_0x340dd6,_0x589016,_0x27b06e){return _0x340dd6(_0x589016,_0x27b06e);},'WHXjw':_0xc170b0(0x128)},_0x3e85ae=getApiBaseUrl(),_0x34f6da=await _0x1263f3['hCcwZ'](fetch,_0x3e85ae+'/organization/self-serve-signup',{'method':'POST','headers':{'Content-Type':_0x1263f3[_0xc170b0(0x148)],'workos-token':_0xe414da}});if(!_0x34f6da['ok']){const _0x1d771d=await _0x34f6da['text']();throw new Error(_0xc170b0(0x14e)+_0x34f6da[_0xc170b0(0x123)]+'\x20'+_0x1d771d);}return _0x34f6da[_0xc170b0(0x156)]();}async function refreshTokenWithOrg(_0x309091,_0x1817de,_0x1ba312){const _0x552ca8=_0x2cde13,_0x3acabc={'qfcIe':function(_0x5792b0,_0x3437c4,_0x4c1df9){return _0x5792b0(_0x3437c4,_0x4c1df9);},'KvzRX':'POST','oexpJ':_0x552ca8(0x13a)},_0x1a3bb8=await _0x3acabc[_0x552ca8(0x131)](fetch,WORKOS_TOKEN_URL,{'method':_0x3acabc[_0x552ca8(0x13c)],'headers':{'Content-Type':_0x552ca8(0x133)},'body':new URLSearchParams({'client_id':_0x309091,'grant_type':_0x3acabc[_0x552ca8(0x151)],'refresh_token':_0x1817de,'organization_id':_0x1ba312})});if(!_0x1a3bb8['ok']){const _0x3bf269=await _0x1a3bb8['text']();throw new Error(_0x552ca8(0x158)+_0x1a3bb8['status']+'\x20'+_0x3bf269);}return _0x1a3bb8[_0x552ca8(0x156)]();}export async function runDeviceAuthFlow(){const _0x3037d9=_0x2cde13,_0x4d3d3f={'tNzOu':function(_0x3bcd36,_0x132022){return _0x3bcd36(_0x132022);},'UeUjQ':_0x3037d9(0x14f),'QdScn':function(_0x45ae0f,_0x310aff,_0x225430,_0x1f5cec,_0x5557b1){return _0x45ae0f(_0x310aff,_0x225430,_0x1f5cec,_0x5557b1);},'cdSum':_0x3037d9(0x149)},_0x45778b=getCurrentEnvironment(),_0x1b8711=ENVIRONMENT_CONFIGS[_0x45778b]['workosClientId'],_0x5e3420=await _0x4d3d3f['tNzOu'](requestDeviceCode,_0x1b8711);console[_0x3037d9(0x11b)](_0x3037d9(0x12d)),console['log'](_0x4d3d3f[_0x3037d9(0x136)]),_0x4d3d3f['tNzOu'](openBrowser,_0x5e3420['verification_uri_complete']),console['log']('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x5e3420[_0x3037d9(0x121)]),console[_0x3037d9(0x11b)](_0x3037d9(0x116)+_0x5e3420[_0x3037d9(0x150)]+'\x0a'),process[_0x3037d9(0x11a)][_0x3037d9(0x147)]('Waiting\x20for\x20authentication...');let _0xc71265=await _0x4d3d3f[_0x3037d9(0x122)](pollForTokens,_0x1b8711,_0x5e3420['device_code'],_0x5e3420[_0x3037d9(0x157)],_0x5e3420['expires_in']);console['log']('\x20✓');const _0x289ef0=_0x4d3d3f['tNzOu'](decodeJwtPayload,_0xc71265[_0x3037d9(0x141)]);if(!_0x289ef0['org_id']){process['stdout'][_0x3037d9(0x147)](_0x4d3d3f['cdSum']);const {organizationId:_0x28edfb}=await _0x4d3d3f[_0x3037d9(0x119)](selfServeSignup,_0xc71265[_0x3037d9(0x141)]);_0xc71265=await refreshTokenWithOrg(_0x1b8711,_0xc71265['refresh_token'],_0x28edfb),console['log']('\x20✓');}process[_0x3037d9(0x11a)]['write'](_0x3037d9(0x12e));const _0x5535a7=await _0x4d3d3f['tNzOu'](provisionApiKey,_0xc71265['access_token']);return console[_0x3037d9(0x11b)]('\x20✓'),await storeToken(_0x5535a7),_0xc71265['refresh_token']&&await storeRefreshToken(_0xc71265['refresh_token']),_0x5535a7;}function sleep(_0x2aa73e){return new Promise(_0x3ed6aa=>setTimeout(_0x3ed6aa,_0x2aa73e));}
1
+ const _0x20de01=_0x431a;(function(_0x3398c4,_0x2050a3){const _0xfc5f28=_0x431a,_0x4b69a4=_0x3398c4();while(!![]){try{const _0x3f6bd4=-parseInt(_0xfc5f28(0xc2))/0x1+parseInt(_0xfc5f28(0xd2))/0x2+parseInt(_0xfc5f28(0x103))/0x3+parseInt(_0xfc5f28(0xcb))/0x4+-parseInt(_0xfc5f28(0xbe))/0x5*(parseInt(_0xfc5f28(0xfc))/0x6)+-parseInt(_0xfc5f28(0x104))/0x7+parseInt(_0xfc5f28(0xd4))/0x8*(parseInt(_0xfc5f28(0xe7))/0x9);if(_0x3f6bd4===_0x2050a3)break;else _0x4b69a4['push'](_0x4b69a4['shift']());}catch(_0x3a81e3){_0x4b69a4['push'](_0x4b69a4['shift']());}}}(_0x5b7b,0xad401));import{exec}from'child_process';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0x20de01(0xc3),WORKOS_TOKEN_URL='https://api.workos.com/user_management/authenticate';export async function requestDeviceCode(_0x24298a){const _0x2c60da=_0x20de01,_0x226d02=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':_0x2c60da(0xf4),'headers':{'Content-Type':_0x2c60da(0xe3)},'body':new URLSearchParams({'client_id':_0x24298a})});if(!_0x226d02['ok']){const _0x30ffef=await _0x226d02['text']();throw new Error(_0x2c60da(0x108)+_0x226d02[_0x2c60da(0xc7)]+'\x20'+_0x30ffef);}return _0x226d02['json']();}export async function pollForTokens(_0x42dc00,_0x46d55e,_0x139218,_0x397322){const _0x10e10e=_0x20de01,_0x46dd5d={'aoUtJ':function(_0x316f36,_0x1a3882){return _0x316f36+_0x1a3882;},'RINBA':function(_0x130838,_0x12320a){return _0x130838*_0x12320a;},'OOTrb':function(_0x295c7a,_0x37fb58){return _0x295c7a(_0x37fb58);},'ioHWQ':function(_0x5e1c52,_0x47c3e5,_0xbfb9a){return _0x5e1c52(_0x47c3e5,_0xbfb9a);},'oEFKs':_0x10e10e(0xf4),'ayiAc':_0x10e10e(0xe3),'vzeJZ':_0x10e10e(0xfe),'WiIyA':function(_0x5abdb2,_0x2f002b){return _0x5abdb2===_0x2f002b;},'MxOxx':'slow_down','XsceR':_0x10e10e(0xf8),'TxWKJ':_0x10e10e(0xe0)},_0x7e2437=_0x46dd5d[_0x10e10e(0xe6)](Date[_0x10e10e(0xe1)](),_0x397322*0x3e8);let _0x835419=_0x46dd5d[_0x10e10e(0xec)](_0x139218,0x3e8);while(Date['now']()<_0x7e2437){await _0x46dd5d[_0x10e10e(0xc5)](sleep,_0x835419);const _0x377a6e=await _0x46dd5d['ioHWQ'](fetch,WORKOS_TOKEN_URL,{'method':_0x46dd5d[_0x10e10e(0x105)],'headers':{'Content-Type':_0x46dd5d[_0x10e10e(0xc0)]},'body':new URLSearchParams({'client_id':_0x42dc00,'device_code':_0x46d55e,'grant_type':_0x46dd5d[_0x10e10e(0xd6)]})});if(_0x377a6e['ok'])return _0x377a6e['json']();const _0x383839=await _0x377a6e[_0x10e10e(0xda)]();if(_0x383839[_0x10e10e(0xd9)]==='authorization_pending')continue;if(_0x46dd5d[_0x10e10e(0x102)](_0x383839['error'],_0x46dd5d['MxOxx'])){_0x835419+=0x3e8;continue;}throw new Error(_0x383839['error_description']||_0x383839['error']||_0x46dd5d['XsceR']);}throw new Error(_0x46dd5d[_0x10e10e(0xdb)]);}async function fetchUserProfile(_0x3dc63d){const _0x5627a0={'BIFJJ':function(_0x56d298){return _0x56d298();},'jfbDQ':function(_0x51d1dc,_0x257323,_0x5e6ec2){return _0x51d1dc(_0x257323,_0x5e6ec2);}},_0x6962d4=_0x5627a0['BIFJJ'](getApiBaseUrl);try{const _0x5ac650=await _0x5627a0['jfbDQ'](fetch,_0x6962d4+'/organization/me',{'method':'GET','headers':{'workos-token':_0x3dc63d}});if(_0x5ac650['ok'])return _0x5ac650['json']();}catch{}return null;}function buildKeyName(_0x1e3a1f,_0x105a6d){const _0x59d463=_0x20de01,_0xb5cf83={'jIseg':function(_0x3b9f4c,_0x3e1e00){return _0x3b9f4c===_0x3e1e00;},'pJigm':function(_0x295ec5,_0x1688fe){return _0x295ec5+_0x1688fe;}},_0x40c730=_0x105a6d[_0x59d463(0xcf)](_0x2c12fe=>_0x2c12fe['name']===_0x1e3a1f||_0x2c12fe[_0x59d463(0xe8)][_0x59d463(0xf6)](_0x1e3a1f+'\x20('));if(_0xb5cf83[_0x59d463(0xdf)](_0x40c730[_0x59d463(0xce)],0x0))return _0x1e3a1f;return _0x1e3a1f+'\x20('+_0xb5cf83['pJigm'](_0x40c730['length'],0x1)+')';}export async function provisionApiKey(_0x46a654){const _0x13b4f5=_0x20de01,_0x533b89={'WeWAk':function(_0x27ef79){return _0x27ef79();},'rGUqw':_0x13b4f5(0xd3),'rCpBQ':function(_0x3b16e2,_0x564186){return _0x3b16e2(_0x564186);},'zkxDx':function(_0x10cbbd,_0x546764,_0x5c4aee){return _0x10cbbd(_0x546764,_0x5c4aee);},'mVmKZ':_0x13b4f5(0xed),'xwXXQ':function(_0x4dc64e,_0x4d43c0,_0x4265fc){return _0x4dc64e(_0x4d43c0,_0x4265fc);},'tSQBT':function(_0x9fd3af,_0x2e3fa7,_0x44309b){return _0x9fd3af(_0x2e3fa7,_0x44309b);},'HBobn':_0x13b4f5(0xca)},_0x2be100=_0x533b89[_0x13b4f5(0xe5)](getApiBaseUrl),_0x2a4a96={'Content-Type':_0x533b89[_0x13b4f5(0xdc)],'workos-token':_0x46a654},_0x5cc356=await _0x533b89[_0x13b4f5(0x106)](fetchUserProfile,_0x46a654),_0x291329=_0x5cc356?.[_0x13b4f5(0xfb)]||_0x5cc356?.[_0x13b4f5(0xf7)]?.['split']('@')[0x0],_0x3d82f8=_0x291329?_0x291329+_0x13b4f5(0xcd):_0x13b4f5(0x100);let _0x25be45=[];try{const _0x5873b0=await _0x533b89['zkxDx'](fetch,_0x2be100+'/api-keys',{'method':_0x533b89[_0x13b4f5(0xd7)],'headers':_0x2a4a96});if(_0x5873b0['ok']){const _0x50f8f1=await _0x5873b0[_0x13b4f5(0xda)]();_0x25be45=_0x50f8f1['apiKeys'];}}catch{}const _0x24e539=_0x533b89[_0x13b4f5(0xc8)](buildKeyName,_0x3d82f8,_0x25be45),_0x2033fc=await _0x533b89['tSQBT'](fetch,_0x2be100+'/api-keys',{'method':_0x13b4f5(0xf4),'headers':_0x2a4a96,'body':JSON['stringify']({'name':_0x24e539,'scope':_0x533b89['HBobn']})});if(!_0x2033fc['ok']){const _0x191398=await _0x2033fc['text']();throw new Error(_0x13b4f5(0xfd)+_0x2033fc[_0x13b4f5(0xc7)]+'\x20'+_0x191398);}const _0x59fe11=await _0x2033fc['json']();return _0x59fe11[_0x13b4f5(0xf5)][_0x13b4f5(0xf2)];}function _0x431a(_0x115af4,_0x268479){_0x115af4=_0x115af4-0xbe;const _0x5b7b93=_0x5b7b();let _0x431a55=_0x5b7b93[_0x115af4];return _0x431a55;}export function openBrowser(_0x5dc104){const _0xbf163d=_0x20de01,_0x832f28={'dQrtl':'darwin','GXEpU':'win32','wffqN':'start','beliD':'xdg-open','oGAyx':function(_0x44aa37,_0x227de9){return _0x44aa37(_0x227de9);}},_0x310ba3=process['platform'],_0x591e3c=_0x310ba3===_0x832f28['dQrtl']?_0xbf163d(0xff):_0x310ba3===_0x832f28['GXEpU']?_0x832f28['wffqN']:_0x832f28['beliD'];_0x832f28[_0xbf163d(0xfa)](exec,_0x591e3c+'\x20'+JSON[_0xbf163d(0xd5)](_0x5dc104));}function decodeJwtPayload(_0x4a2612){const _0x20b5fe=_0x20de01,_0x28b60e=_0x4a2612['split']('.');if(_0x28b60e[_0x20b5fe(0xce)]!==0x3)throw new Error('Invalid\x20JWT\x20format');const _0x35855c=Buffer[_0x20b5fe(0xf3)](_0x28b60e[0x1],_0x20b5fe(0xe2))[_0x20b5fe(0xf0)]('utf-8');return JSON[_0x20b5fe(0x107)](_0x35855c);}function _0x5b7b(){const _0x58c77f=['Failed\x20to\x20provision\x20API\x20key:\x20','urn:ietf:params:oauth:grant-type:device_code','open','CLI\x20Key','Provisioning\x20API\x20key...','WiIyA','2129223sUQhPs','5172790jVKyKQ','oEFKs','rCpBQ','parse','Failed\x20to\x20request\x20device\x20code:\x20','5ebJwlB','hfhpJ','ayiAc','stdout','329355VsYGFZ','https://api.workos.com/user_management/authorize/device','user_code','OOTrb','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20','status','xwXXQ','verification_uri_complete','mcp:write','3776368OpeJnb','write','\x27s\x20CLI\x20Key','length','filter','\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','NMnuP','674936MobSyS','application/json','13896HqENIx','stringify','vzeJZ','mVmKZ','\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','error','json','TxWKJ','rGUqw','pUGtZ','slmvj','jIseg','Device\x20authorization\x20timed\x20out','now','base64url','application/x-www-form-urlencoded','device_code','WeWAk','aoUtJ','207kjVJxu','name','refresh_token','log','access_token','RINBA','GET','workosClientId','/organization/self-serve-signup','toString','syBEC','token','from','POST','apiKey','startsWith','email','Authentication\x20failed','Failed\x20to\x20create\x20organization:\x20','oGAyx','firstName','1519764scMAul'];_0x5b7b=function(){return _0x58c77f;};return _0x5b7b();}async function selfServeSignup(_0x559de2){const _0x180421=_0x20de01,_0x492c48={'VtYDo':'application/json'},_0x556a5e=getApiBaseUrl(),_0x25980b=await fetch(_0x556a5e+_0x180421(0xef),{'method':_0x180421(0xf4),'headers':{'Content-Type':_0x492c48['VtYDo'],'workos-token':_0x559de2}});if(!_0x25980b['ok']){const _0x1b2e82=await _0x25980b['text']();throw new Error(_0x180421(0xf9)+_0x25980b['status']+'\x20'+_0x1b2e82);}return _0x25980b[_0x180421(0xda)]();}async function refreshTokenWithOrg(_0x4850d2,_0x3140b6,_0x58c20b){const _0x1946af=_0x20de01,_0x4b7233={'YgkId':'POST','hfhpJ':'application/x-www-form-urlencoded','pUGtZ':'refresh_token'},_0x28fe67=await fetch(WORKOS_TOKEN_URL,{'method':_0x4b7233['YgkId'],'headers':{'Content-Type':_0x4b7233[_0x1946af(0xbf)]},'body':new URLSearchParams({'client_id':_0x4850d2,'grant_type':_0x4b7233[_0x1946af(0xdd)],'refresh_token':_0x3140b6,'organization_id':_0x58c20b})});if(!_0x28fe67['ok']){const _0x33ca17=await _0x28fe67['text']();throw new Error('Failed\x20to\x20refresh\x20token\x20with\x20org:\x20'+_0x28fe67['status']+'\x20'+_0x33ca17);}return _0x28fe67[_0x1946af(0xda)]();}export async function runDeviceAuthFlow(){const _0x2b422c=_0x20de01,_0x157e46={'syBEC':_0x2b422c(0xd8),'Tgidj':_0x2b422c(0xd0),'slmvj':function(_0x54f1ee,_0xe6b6c2,_0x313a4d,_0x1a1d6b,_0x51a7c0){return _0x54f1ee(_0xe6b6c2,_0x313a4d,_0x1a1d6b,_0x51a7c0);},'HvShU':function(_0x341419,_0x438309){return _0x341419(_0x438309);},'NMnuP':_0x2b422c(0x101),'HwfIg':function(_0xb7cdf8,_0x2d538e){return _0xb7cdf8(_0x2d538e);}},_0x22fa29=getCurrentEnvironment(),_0x138cae=ENVIRONMENT_CONFIGS[_0x22fa29][_0x2b422c(0xee)],_0x4e706c=await requestDeviceCode(_0x138cae);console['log'](_0x157e46[_0x2b422c(0xf1)]),console[_0x2b422c(0xea)](_0x157e46['Tgidj']),openBrowser(_0x4e706c['verification_uri_complete']),console['log'](_0x2b422c(0xc6)+_0x4e706c[_0x2b422c(0xc9)]),console[_0x2b422c(0xea)]('Code:\x20'+_0x4e706c[_0x2b422c(0xc4)]+'\x0a'),process[_0x2b422c(0xc1)]['write']('Waiting\x20for\x20authentication...');let _0x521c2d=await _0x157e46[_0x2b422c(0xde)](pollForTokens,_0x138cae,_0x4e706c[_0x2b422c(0xe4)],_0x4e706c['interval'],_0x4e706c['expires_in']);console['log']('\x20✓');const _0x475379=_0x157e46['HvShU'](decodeJwtPayload,_0x521c2d[_0x2b422c(0xeb)]);if(!_0x475379['org_id']){process['stdout'][_0x2b422c(0xcc)]('Setting\x20up\x20your\x20organization...');const {organizationId:_0x3f9791}=await selfServeSignup(_0x521c2d['access_token']);_0x521c2d=await refreshTokenWithOrg(_0x138cae,_0x521c2d[_0x2b422c(0xe9)],_0x3f9791),console['log']('\x20✓');}process[_0x2b422c(0xc1)][_0x2b422c(0xcc)](_0x157e46[_0x2b422c(0xd1)]);const _0x1f1dc6=await provisionApiKey(_0x521c2d['access_token']);return console['log']('\x20✓'),await storeToken(_0x1f1dc6),_0x521c2d['refresh_token']&&await _0x157e46['HwfIg'](storeRefreshToken,_0x521c2d[_0x2b422c(0xe9)]),_0x1f1dc6;}function sleep(_0x5951b6){return new Promise(_0x24443d=>setTimeout(_0x24443d,_0x5951b6));}
@@ -1 +1 @@
1
- function _0x3047(){const _0x216d40=['481105nUyzyl','kclGS','client_01J9CBYM2DKWV9HM17D95Z540K','38haWODB','42QdaTtm','local','2488MoxNUb','13734KBdMvX','aiProxyUrl','10mtncWB','http://localhost:8090','apiBaseUrl','https://ai-proxy-716115358910.us-central1.run.app','241261NWehon','22206140NYZqQy','123039mwxRnE','http://localhost:8080','2479012ZdljVZ','5117IJweFY'];_0x3047=function(){return _0x216d40;};return _0x3047();}const _0x4fa7ac=_0x3dd8;(function(_0x5403c7,_0x5be541){const _0x131cce=_0x3dd8,_0x5e35b6=_0x5403c7();while(!![]){try{const _0x11ebd8=-parseInt(_0x131cce(0x88))/0x1+-parseInt(_0x131cce(0x91))/0x2*(-parseInt(_0x131cce(0x95))/0x3)+-parseInt(_0x131cce(0x8c))/0x4+-parseInt(_0x131cce(0x8e))/0x5*(parseInt(_0x131cce(0x92))/0x6)+parseInt(_0x131cce(0x8d))/0x7*(-parseInt(_0x131cce(0x94))/0x8)+parseInt(_0x131cce(0x8a))/0x9+parseInt(_0x131cce(0x97))/0xa*(parseInt(_0x131cce(0x89))/0xb);if(_0x11ebd8===_0x5be541)break;else _0x5e35b6['push'](_0x5e35b6['shift']());}catch(_0xcbde3){_0x5e35b6['push'](_0x5e35b6['shift']());}}}(_0x3047,0x57473));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':'https://api.ranger.net','workosClientId':'client_01J9CBYM7M5ZETCF7G6614DXR2','aiProxyUrl':_0x4fa7ac(0x9a)},'staging':{'apiBaseUrl':'https://api.staging.ranger.net','workosClientId':_0x4fa7ac(0x90),'aiProxyUrl':'https://ai-proxy-301751771437.us-central1.run.app'},'local':{'apiBaseUrl':_0x4fa7ac(0x8b),'workosClientId':'client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl':_0x4fa7ac(0x98)}};export const DEFAULT_ENVIRONMENT='prod';export function isValidEnvironment(_0x56c7e4){const _0x9504d2=_0x4fa7ac,_0x2fda39={'QTFMJ':'staging','aNclS':_0x9504d2(0x93)};return _0x56c7e4==='prod'||_0x56c7e4===_0x2fda39['QTFMJ']||_0x56c7e4===_0x2fda39['aNclS'];}function _0x3dd8(_0x5514c5,_0xfc038d){_0x5514c5=_0x5514c5-0x88;const _0x3047dd=_0x3047();let _0x3dd80d=_0x3047dd[_0x5514c5];return _0x3dd80d;}export function getCurrentEnvironment(){const _0x5a404b=process['env']['RANGER_CLI_ENV'];if(_0x5a404b&&isValidEnvironment(_0x5a404b))return _0x5a404b;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0x18db53=_0x4fa7ac;return ENVIRONMENT_CONFIGS[getCurrentEnvironment()][_0x18db53(0x99)];}export function getAiProxyUrl(){const _0x2caf4c=_0x4fa7ac,_0x238c87={'kclGS':function(_0xa0dddc){return _0xa0dddc();}};return ENVIRONMENT_CONFIGS[_0x238c87[_0x2caf4c(0x8f)](getCurrentEnvironment)][_0x2caf4c(0x96)];}
1
+ const _0x4656f8=_0x5cb7;(function(_0x3680ba,_0x4eee3a){const _0x1dd907=_0x5cb7,_0x266c65=_0x3680ba();while(!![]){try{const _0x419c41=parseInt(_0x1dd907(0x114))/0x1+-parseInt(_0x1dd907(0x117))/0x2+-parseInt(_0x1dd907(0x106))/0x3*(parseInt(_0x1dd907(0x105))/0x4)+parseInt(_0x1dd907(0x118))/0x5*(-parseInt(_0x1dd907(0x113))/0x6)+-parseInt(_0x1dd907(0x104))/0x7*(parseInt(_0x1dd907(0x10a))/0x8)+parseInt(_0x1dd907(0x112))/0x9*(-parseInt(_0x1dd907(0x111))/0xa)+parseInt(_0x1dd907(0x110))/0xb*(parseInt(_0x1dd907(0x108))/0xc);if(_0x419c41===_0x4eee3a)break;else _0x266c65['push'](_0x266c65['shift']());}catch(_0x45520e){_0x266c65['push'](_0x266c65['shift']());}}}(_0x44c0,0x2c9ab));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':_0x4656f8(0x116),'workosClientId':'client_01J9CBYM7M5ZETCF7G6614DXR2','aiProxyUrl':_0x4656f8(0x10b)},'staging':{'apiBaseUrl':'https://api.staging.ranger.net','workosClientId':_0x4656f8(0x10e),'aiProxyUrl':_0x4656f8(0x103)},'local':{'apiBaseUrl':'http://localhost:8080','workosClientId':'client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl':'http://localhost:8090'}};function _0x5cb7(_0x5996db,_0xb8199e){_0x5996db=_0x5996db-0x102;const _0x44c07b=_0x44c0();let _0x5cb7b5=_0x44c07b[_0x5996db];return _0x5cb7b5;}export const DEFAULT_ENVIRONMENT=_0x4656f8(0x102);function _0x44c0(){const _0x4885f0=['393468tZpHKy','eStMA','16gishWN','https://ai-proxy-716115358910.us-central1.run.app','aiProxyUrl','env','client_01J9CBYM2DKWV9HM17D95Z540K','staging','363OolqbX','10MpTWxL','3161475cAaSMT','798zKqtfj','313485cgrzSm','GrHph','https://api.ranger.net','202024JwTSyZ','4855RYxkHX','prod','https://ai-proxy-301751771437.us-central1.run.app','1092742alAAzL','4GpEYxN','957543RnLYON','ZgPHI'];_0x44c0=function(){return _0x4885f0;};return _0x44c0();}export function isValidEnvironment(_0x5d6a00){const _0x55e870=_0x4656f8,_0x224e49={'eStMA':function(_0x3da6ff,_0x5c7871){return _0x3da6ff===_0x5c7871;},'GrHph':'prod','ZgPHI':_0x55e870(0x10f)};return _0x224e49[_0x55e870(0x109)](_0x5d6a00,_0x224e49[_0x55e870(0x115)])||_0x5d6a00===_0x224e49[_0x55e870(0x107)]||_0x5d6a00==='local';}export function getCurrentEnvironment(){const _0x5b3289=_0x4656f8,_0x1b53fa={'aVwzM':function(_0x1b4459,_0x3bf4af){return _0x1b4459(_0x3bf4af);}},_0x3f920e=process[_0x5b3289(0x10d)]['RANGER_CLI_ENV'];if(_0x3f920e&&_0x1b53fa['aVwzM'](isValidEnvironment,_0x3f920e))return _0x3f920e;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0x5f5b44={'OcoMe':function(_0x600d16){return _0x600d16();}};return ENVIRONMENT_CONFIGS[_0x5f5b44['OcoMe'](getCurrentEnvironment)]['apiBaseUrl'];}export function getAiProxyUrl(){const _0x4da94f=_0x4656f8;return ENVIRONMENT_CONFIGS[getCurrentEnvironment()][_0x4da94f(0x10c)];}
@@ -1 +1 @@
1
- (function(_0x19831e,_0x20ef54){const _0x52a81a=_0x34d1,_0x2c3da5=_0x19831e();while(!![]){try{const _0x57a825=-parseInt(_0x52a81a(0xb0))/0x1+-parseInt(_0x52a81a(0xa6))/0x2*(-parseInt(_0x52a81a(0xbf))/0x3)+-parseInt(_0x52a81a(0xcf))/0x4*(parseInt(_0x52a81a(0xba))/0x5)+parseInt(_0x52a81a(0xb1))/0x6*(-parseInt(_0x52a81a(0xaf))/0x7)+parseInt(_0x52a81a(0x96))/0x8+-parseInt(_0x52a81a(0xc3))/0x9*(parseInt(_0x52a81a(0xbd))/0xa)+-parseInt(_0x52a81a(0xbb))/0xb*(-parseInt(_0x52a81a(0xdd))/0xc);if(_0x57a825===_0x20ef54)break;else _0x2c3da5['push'](_0x2c3da5['shift']());}catch(_0x12c9c7){_0x2c3da5['push'](_0x2c3da5['shift']());}}}(_0x3a24,0x46b14));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';export async function createFeature(_0x4ad860){const _0x14f847=_0x34d1,_0x254aa8={'hMIOQ':function(_0x5a0b3c,_0x27cf8b,_0x1def38){return _0x5a0b3c(_0x27cf8b,_0x1def38);},'iCscx':_0x14f847(0xd3)},_0x599451=await getToken();if(!_0x599451)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x1ef8b3=getApiBaseUrl(),_0x1bc8e8=await _0x254aa8['hMIOQ'](fetch,_0x1ef8b3+_0x14f847(0x9d),{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x599451,'Content-Type':_0x254aa8['iCscx']},'body':JSON[_0x14f847(0xa3)](_0x4ad860)});if(!_0x1bc8e8['ok']){const _0x29cf22=await _0x1bc8e8[_0x14f847(0xa2)]();throw new Error(_0x14f847(0xda)+_0x29cf22);}return _0x1bc8e8['json']();}export async function listFeatures(_0xf3b198){const _0xc79581=_0x34d1,_0xde3172={'QvYQm':function(_0x31788d){return _0x31788d();},'SbTcT':_0xc79581(0xde),'xwczD':function(_0x5990b1){return _0x5990b1();},'ZpkZJ':_0xc79581(0xd7),'CSwSu':'limit','ddYpu':_0xc79581(0xd0),'YDzpe':_0xc79581(0xd1),'nyuAL':_0xc79581(0xa1),'RmkQP':'GET'},_0x4285b5=await _0xde3172[_0xc79581(0xc8)](getToken);if(!_0x4285b5)throw new Error(_0xde3172['SbTcT']);const _0x69b3d3=_0xde3172['xwczD'](getApiBaseUrl),_0x33f13f=new URLSearchParams();if(_0xf3b198?.[_0xc79581(0xd7)])_0x33f13f['set'](_0xde3172[_0xc79581(0xb8)],_0xf3b198[_0xc79581(0xd7)]);if(_0xf3b198?.[_0xc79581(0xa7)])_0x33f13f['set'](_0xc79581(0xa7),_0xf3b198['gitBranch']);if(_0xf3b198?.[_0xc79581(0xca)])_0x33f13f[_0xc79581(0xb3)](_0xde3172['CSwSu'],_0xf3b198[_0xc79581(0xca)]['toString']());if(_0xf3b198?.[_0xc79581(0xd0)])_0x33f13f[_0xc79581(0xb3)](_0xde3172[_0xc79581(0xce)],_0xf3b198[_0xc79581(0xd0)][_0xc79581(0x9e)]());if(_0xf3b198?.[_0xc79581(0xd1)])_0x33f13f['set'](_0xde3172[_0xc79581(0xad)],_0xde3172['nyuAL']);const _0x356664=_0x69b3d3+'/api/v1/mcp/features'+(_0x33f13f[_0xc79581(0x9e)]()?'?'+_0x33f13f['toString']():''),_0x21f86e=await fetch(_0x356664,{'method':_0xde3172['RmkQP'],'headers':{'Authorization':_0xc79581(0xd9)+_0x4285b5}});if(!_0x21f86e['ok']){const _0x42e805=await _0x21f86e[_0xc79581(0xa2)]();throw new Error('Failed\x20to\x20list\x20feature\x20reviews:\x20'+_0x42e805);}return _0x21f86e['json']();}export async function getFeature(_0x40e797){const _0x222529=_0x34d1,_0x373b1e={'UaVmN':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]'},_0x16da8a=await getToken();if(!_0x16da8a)throw new Error(_0x373b1e[_0x222529(0xd5)]);const _0xbcc205=getApiBaseUrl(),_0x7fc40=await fetch(_0xbcc205+'/api/v1/mcp/features/'+_0x40e797,{'method':'GET','headers':{'Authorization':'Bearer\x20'+_0x16da8a}});if(!_0x7fc40['ok']){const _0x4b5900=await _0x7fc40[_0x222529(0xa2)]();throw new Error(_0x222529(0x98)+_0x4b5900);}return _0x7fc40['json']();}export async function updateFeature(_0x43eba5,_0x36360a){const _0x4b436e=_0x34d1,_0x57f1a4={'mtfyD':function(_0x4274f0){return _0x4274f0();},'HzIxp':function(_0x4b8ea5,_0x2b0e8a,_0x5101a4){return _0x4b8ea5(_0x2b0e8a,_0x5101a4);}},_0x55deea=await _0x57f1a4['mtfyD'](getToken);if(!_0x55deea)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x2bc55d=_0x57f1a4['mtfyD'](getApiBaseUrl),_0x38c177=await _0x57f1a4['HzIxp'](fetch,_0x2bc55d+'/api/v1/mcp/features/'+_0x43eba5,{'method':_0x4b436e(0xc7),'headers':{'Authorization':'Bearer\x20'+_0x55deea,'Content-Type':'application/json'},'body':JSON[_0x4b436e(0xa3)](_0x36360a)});if(!_0x38c177['ok']){const _0xde69fe=await _0x38c177[_0x4b436e(0xa2)]();throw new Error('Failed\x20to\x20update\x20feature\x20review:\x20'+_0xde69fe);}return _0x38c177['json']();}export async function createChecklistItem(_0x10649c,_0x2a0bd0,_0x4e764c){const _0x1b5089=_0x34d1,_0x43964e={'FNUlj':function(_0x23e9ff){return _0x23e9ff();},'rzHmf':_0x1b5089(0xde),'GbJOH':function(_0x10e0e5,_0x39038c,_0x42978e){return _0x10e0e5(_0x39038c,_0x42978e);},'AnyqS':'POST','MoTIc':'application/json'},_0x497d44=await _0x43964e[_0x1b5089(0x9b)](getToken);if(!_0x497d44)throw new Error(_0x43964e['rzHmf']);const _0x49cf03=getApiBaseUrl(),_0x36ac34=await _0x43964e['GbJOH'](fetch,_0x49cf03+_0x1b5089(0x97)+_0x10649c+'/checklist',{'method':_0x43964e['AnyqS'],'headers':{'Authorization':_0x1b5089(0xd9)+_0x497d44,'Content-Type':_0x43964e['MoTIc']},'body':JSON['stringify']({'description':_0x2a0bd0,'position':_0x4e764c})});if(!_0x36ac34['ok']){const _0x3dd051=await _0x36ac34['text']();throw new Error('Failed\x20to\x20create\x20scenario:\x20'+_0x3dd051);}return _0x36ac34[_0x1b5089(0xd4)]();}export async function updateChecklistItem(_0x5bc30a,_0x45bad7,_0x1ca87e){const _0x1ae1ee=_0x34d1,_0x2cb293={'jykMD':function(_0x206793){return _0x206793();},'NqbJS':_0x1ae1ee(0xcd)};return withRetry(async()=>{const _0x19a00b=_0x1ae1ee,_0x4c2855=await getToken();if(!_0x4c2855)throw new Error(_0x19a00b(0xde));const _0x3f8418=_0x2cb293[_0x19a00b(0x9f)](getApiBaseUrl),_0x3f3684=await fetch(_0x3f8418+'/api/v1/mcp/features/'+_0x5bc30a+_0x19a00b(0xcb)+_0x45bad7,{'method':'PATCH','headers':{'Authorization':_0x19a00b(0xd9)+_0x4c2855,'Content-Type':_0x19a00b(0xd3)},'body':JSON[_0x19a00b(0xa3)](_0x1ca87e)});if(!_0x3f3684['ok']){const _0x5da59a=await _0x3f3684[_0x19a00b(0xa2)]();throw new Error(_0x19a00b(0xc0)+_0x5da59a);}return _0x3f3684[_0x19a00b(0xd4)]();},{'label':_0x2cb293['NqbJS']});}export async function getFeatureReport(_0x17ad95){const _0x5c39ad=_0x34d1,_0x420420={'sBuEN':_0x5c39ad(0xde),'UAdtM':function(_0x4d38f4,_0x53a1e2,_0x368ddf){return _0x4d38f4(_0x53a1e2,_0x368ddf);}},_0x5eef95=await getToken();if(!_0x5eef95)throw new Error(_0x420420[_0x5c39ad(0xb7)]);const _0x197fb7=getApiBaseUrl(),_0x1a8649=await _0x420420[_0x5c39ad(0xe1)](fetch,_0x197fb7+'/api/v1/mcp/features/'+_0x17ad95+_0x5c39ad(0xa0),{'method':_0x5c39ad(0xb9),'headers':{'Authorization':_0x5c39ad(0xd9)+_0x5eef95}});if(!_0x1a8649['ok']){const _0x518bf2=await _0x1a8649[_0x5c39ad(0xa2)]();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report:\x20'+_0x518bf2);}return _0x1a8649['json']();}export async function getFeatureReportMarkdown(_0x22e38e,_0x226e7f){const _0x4dae7f=_0x34d1,_0x28fd8c={'hzsMx':function(_0x596ea9){return _0x596ea9();},'Wpmhj':function(_0x20469a,_0x554b98){return _0x20469a(_0x554b98);},'YYeML':_0x4dae7f(0xa4),'HbzFF':'sessionId','TnTNq':function(_0x25e801,_0x34bdf5,_0x1910a8){return _0x25e801(_0x34bdf5,_0x1910a8);}},_0x8d2bc3=await _0x28fd8c[_0x4dae7f(0xd8)](getToken);if(!_0x8d2bc3)throw new Error(_0x4dae7f(0xde));const _0x14912c=getApiBaseUrl(),_0x4526ff=new URLSearchParams(),_0x2587b0=(_0x226e7f?.[_0x4dae7f(0xa4)]?.['length']??0x0)>0x0,_0x552e4a=_0x28fd8c['Wpmhj'](Boolean,_0x226e7f?.[_0x4dae7f(0xc9)]);_0x2587b0&&_0x226e7f?.[_0x4dae7f(0xa4)]&&_0x4526ff['set'](_0x28fd8c[_0x4dae7f(0xb2)],_0x226e7f['itemIds'][_0x4dae7f(0xcc)](','));_0x552e4a&&_0x226e7f?.['sessionId']&&_0x4526ff['set'](_0x28fd8c['HbzFF'],_0x226e7f['sessionId']);!_0x2587b0&&!_0x552e4a&&_0x226e7f?.['style']&&_0x4526ff[_0x4dae7f(0xb3)]('style',_0x226e7f['style']);const _0x5456a6=_0x14912c+_0x4dae7f(0x97)+_0x22e38e+_0x4dae7f(0xac),_0xf1e9ed=''+_0x5456a6+(_0x4526ff[_0x4dae7f(0x9e)]()?'?'+_0x4526ff[_0x4dae7f(0x9e)]():''),_0x561134=await _0x28fd8c[_0x4dae7f(0xb6)](fetch,_0xf1e9ed,{'method':_0x4dae7f(0xb9),'headers':{'Authorization':_0x4dae7f(0xd9)+_0x8d2bc3}});if(!_0x561134['ok']){const _0x29a6d=await _0x561134['text']();throw new Error(_0x4dae7f(0xb5)+_0x29a6d);}return _0x561134[_0x4dae7f(0xa2)]();}function _0x34d1(_0x30f0ae,_0x40789d){_0x30f0ae=_0x30f0ae-0x96;const _0x3a247b=_0x3a24();let _0x34d1e1=_0x3a247b[_0x30f0ae];return _0x34d1e1;}export async function listFeatureSessions(_0x70c1ad){const _0xc0744a=_0x34d1,_0x2bd992={'HZEAR':function(_0x5a35a4){return _0x5a35a4();},'wGXNu':function(_0x1af67e){return _0x1af67e();},'nzoGY':function(_0x32c1c5,_0x268887,_0x268a01){return _0x32c1c5(_0x268887,_0x268a01);}},_0x2d7717=await _0x2bd992[_0xc0744a(0xa8)](getToken);if(!_0x2d7717)throw new Error(_0xc0744a(0xde));const _0x29e8a5=_0x2bd992['wGXNu'](getApiBaseUrl),_0x360a71=await _0x2bd992[_0xc0744a(0xc6)](fetch,_0x29e8a5+'/api/v1/mcp/features/'+_0x70c1ad+_0xc0744a(0xdc),{'method':_0xc0744a(0xb9),'headers':{'Authorization':'Bearer\x20'+_0x2d7717}});if(!_0x360a71['ok']){const _0x5ed126=await _0x360a71['text']();throw new Error(_0xc0744a(0xdb)+_0x5ed126);}return _0x360a71['json']();}export async function startSession(_0x1d5a8a,_0xae1c24){const _0xb00346=_0x34d1,_0x5ae116={'GhXKl':function(_0x5ca539){return _0x5ca539();},'qDwuj':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','ifKWu':'POST'},_0xc220cf=await _0x5ae116['GhXKl'](getToken);if(!_0xc220cf)throw new Error(_0x5ae116['qDwuj']);const _0x2f8077=_0x5ae116[_0xb00346(0xd2)](getApiBaseUrl),_0x2be898=await fetch(_0x2f8077+'/api/v1/mcp/features/'+_0x1d5a8a+'/sessions/'+_0xae1c24+_0xb00346(0xbe),{'method':_0x5ae116[_0xb00346(0xc4)],'headers':{'Authorization':_0xb00346(0xd9)+_0xc220cf}});if(!_0x2be898['ok']){const _0x5b443c=await _0x2be898[_0xb00346(0xa2)]();throw new Error(_0xb00346(0xab)+_0x5b443c);}return _0x2be898[_0xb00346(0xd4)]();}function _0x3a24(){const _0x3821f4=['GET','75KEpMRy','1408rHTGxE','/comments/address','10aRKmbI','/start','127047iaJesW','Failed\x20to\x20update\x20scenario:\x20','Failed\x20to\x20get\x20item\x20feedback:\x20','WSYTV','2883429cjIIhy','ifKWu','BYJAD','nzoGY','PATCH','QvYQm','sessionId','limit','/checklist/','join','updateChecklistItem','ddYpu','42788rQjipO','offset','includeDeleted','GhXKl','application/json','json','UaVmN','DDtuH','gitRepoUrl','hzsMx','Bearer\x20','Failed\x20to\x20create\x20feature\x20review:\x20','Failed\x20to\x20list\x20sessions:\x20','/sessions','92328QBvRqJ','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20','uVvrg','UAdtM','cZOMC','2036504lRiviT','/api/v1/mcp/features/','Failed\x20to\x20get\x20feature\x20review:\x20','/feedback','/conclude','FNUlj','/action-items','/api/v1/mcp/features','toString','jykMD','/report','true','text','stringify','itemIds','POST','12cZVVuf','gitBranch','HZEAR','OsQNc','Failed\x20to\x20get\x20action\x20items:\x20','Failed\x20to\x20start\x20session:\x20','/report/markdown','YDzpe','/sessions/','7vaTBAD','503358fzWuch','1318434cQoUqH','YYeML','set','BogeX','Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20','TnTNq','sBuEN','ZpkZJ'];_0x3a24=function(){return _0x3821f4;};return _0x3a24();}export async function concludeSession(_0x38cb3e,_0x2c3df){const _0x4e18ba=_0x34d1,_0x301dda={'uVvrg':_0x4e18ba(0xa5)},_0x5a819a=await getToken();if(!_0x5a819a)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3a47d0=getApiBaseUrl(),_0x56ea73=await fetch(_0x3a47d0+'/api/v1/mcp/features/'+_0x38cb3e+_0x4e18ba(0xae)+_0x2c3df+_0x4e18ba(0x9a),{'method':_0x301dda[_0x4e18ba(0xe0)],'headers':{'Authorization':'Bearer\x20'+_0x5a819a}});if(!_0x56ea73['ok']){const _0x3b3b54=await _0x56ea73[_0x4e18ba(0xa2)]();throw new Error('Failed\x20to\x20conclude\x20session:\x20'+_0x3b3b54);}return _0x56ea73['json']();}export async function getActionItems(_0x5d3f32){const _0x5341df=_0x34d1,_0x25caaa={'OsQNc':function(_0x7ae5ff){return _0x7ae5ff();},'ysevm':_0x5341df(0xde),'NcFwZ':function(_0x2084fa,_0x3e5af4,_0x57f632){return _0x2084fa(_0x3e5af4,_0x57f632);},'XdUmF':'GET'},_0x36f409=await _0x25caaa[_0x5341df(0xa9)](getToken);if(!_0x36f409)throw new Error(_0x25caaa['ysevm']);const _0x46a162=getApiBaseUrl(),_0x255fec=await _0x25caaa['NcFwZ'](fetch,_0x46a162+'/api/v1/mcp/features/'+_0x5d3f32+_0x5341df(0x9c),{'method':_0x25caaa['XdUmF'],'headers':{'Authorization':'Bearer\x20'+_0x36f409}});if(!_0x255fec['ok']){const _0x51a7d9=await _0x255fec['text']();throw new Error(_0x5341df(0xaa)+_0x51a7d9);}return _0x255fec['json']();}export async function getItemFeedback(_0x20ec14,_0x153924){const _0x3fa139=_0x34d1,_0x1e108={'cZOMC':function(_0x5c8295){return _0x5c8295();},'BYJAD':_0x3fa139(0xde),'ZdxlN':'GET'},_0x53ede6=await _0x1e108[_0x3fa139(0xe2)](getToken);if(!_0x53ede6)throw new Error(_0x1e108[_0x3fa139(0xc5)]);const _0x352e88=getApiBaseUrl(),_0xd2cf59=await fetch(_0x352e88+_0x3fa139(0x97)+_0x20ec14+'/checklist-items/'+_0x153924+_0x3fa139(0x99),{'method':_0x1e108['ZdxlN'],'headers':{'Authorization':_0x3fa139(0xd9)+_0x53ede6}});if(!_0xd2cf59['ok']){const _0x5c59b2=await _0xd2cf59[_0x3fa139(0xa2)]();throw new Error(_0x3fa139(0xc1)+_0x5c59b2);}return _0xd2cf59[_0x3fa139(0xd4)]();}export async function markCommentsAddressed(_0x5ea331,_0x25b07c,_0x39c66a){const _0x31911f=_0x34d1,_0x3b9a2c={'rkpbi':_0x31911f(0xde),'GKWyY':function(_0x570e2a){return _0x570e2a();},'WSYTV':'POST'},_0x46f104=await getToken();if(!_0x46f104)throw new Error(_0x3b9a2c['rkpbi']);const _0x521a68=_0x3b9a2c['GKWyY'](getApiBaseUrl),_0x106966=await fetch(_0x521a68+'/api/v1/mcp/features/'+_0x5ea331+_0x31911f(0xbc),{'method':_0x3b9a2c[_0x31911f(0xc2)],'headers':{'Authorization':'Bearer\x20'+_0x46f104,'Content-Type':'application/json'},'body':JSON['stringify']({'checklistItemId':_0x25b07c,'commentIds':_0x39c66a})});if(!_0x106966['ok']){const _0x20f99b=await _0x106966['text']();throw new Error(_0x31911f(0xdf)+_0x20f99b);}}export async function softDeleteFeature(_0x4f3543){const _0x2a5451=_0x34d1,_0x3233da=await getToken();if(!_0x3233da)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3897a7=getApiBaseUrl(),_0x3079e9=await fetch(_0x3897a7+'/api/v1/mcp/features/'+_0x4f3543,{'method':'DELETE','headers':{'Authorization':_0x2a5451(0xd9)+_0x3233da}});if(!_0x3079e9['ok']){const _0x2dfecf=await _0x3079e9[_0x2a5451(0xa2)]();throw new Error('Failed\x20to\x20delete\x20feature\x20review:\x20'+_0x2dfecf);}}export async function restoreFeature(_0x57359b){const _0x194c7d=_0x34d1,_0x173e60={'DDtuH':_0x194c7d(0xde),'HFaUx':function(_0x40bc08){return _0x40bc08();},'Coduu':function(_0x4a5ce1,_0x2e7a5a,_0x2e951e){return _0x4a5ce1(_0x2e7a5a,_0x2e951e);},'BogeX':'POST'},_0xd34ebd=await getToken();if(!_0xd34ebd)throw new Error(_0x173e60[_0x194c7d(0xd6)]);const _0x13e614=_0x173e60['HFaUx'](getApiBaseUrl),_0x5567ef=await _0x173e60['Coduu'](fetch,_0x13e614+_0x194c7d(0x97)+_0x57359b+'/restore',{'method':_0x173e60[_0x194c7d(0xb4)],'headers':{'Authorization':_0x194c7d(0xd9)+_0xd34ebd}});if(!_0x5567ef['ok']){const _0x967fd6=await _0x5567ef['text']();throw new Error('Failed\x20to\x20restore\x20feature\x20review:\x20'+_0x967fd6);}}
1
+ (function(_0xcf4fc9,_0xe41f8){const _0x1508cc=_0x2895,_0x401260=_0xcf4fc9();while(!![]){try{const _0x3429d9=parseInt(_0x1508cc(0x1fc))/0x1+parseInt(_0x1508cc(0x1ee))/0x2*(parseInt(_0x1508cc(0x1e0))/0x3)+-parseInt(_0x1508cc(0x20e))/0x4+parseInt(_0x1508cc(0x214))/0x5*(parseInt(_0x1508cc(0x1fe))/0x6)+parseInt(_0x1508cc(0x1e1))/0x7*(parseInt(_0x1508cc(0x1ff))/0x8)+-parseInt(_0x1508cc(0x21e))/0x9*(parseInt(_0x1508cc(0x208))/0xa)+-parseInt(_0x1508cc(0x20f))/0xb;if(_0x3429d9===_0xe41f8)break;else _0x401260['push'](_0x401260['shift']());}catch(_0x58c6df){_0x401260['push'](_0x401260['shift']());}}}(_0x2a3c,0x68a3b));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';export async function createFeature(_0x4591a6){const _0x14961c=_0x2895,_0x3ffe0a={'GrMhb':function(_0x5ccfb0){return _0x5ccfb0();},'WRUGp':_0x14961c(0x1ef),'BQJYG':_0x14961c(0x1f3)},_0x204614=await _0x3ffe0a['GrMhb'](getToken);if(!_0x204614)throw new Error(_0x3ffe0a['WRUGp']);const _0x56c20b=_0x3ffe0a[_0x14961c(0x209)](getApiBaseUrl),_0x2cc166=await fetch(_0x56c20b+_0x14961c(0x21a),{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x204614,'Content-Type':_0x3ffe0a[_0x14961c(0x200)]},'body':JSON[_0x14961c(0x219)](_0x4591a6)});if(!_0x2cc166['ok']){const _0x1f7569=await _0x2cc166[_0x14961c(0x1fa)]();throw new Error(_0x14961c(0x1e8)+_0x1f7569);}return _0x2cc166['json']();}export async function listFeatures(_0x1fe28b){const _0x34c82b=_0x2895,_0x2300c3={'ibbmI':function(_0x50a767){return _0x50a767();},'SQRKn':'gitRepoUrl','tvCYo':'gitBranch','BPyQg':'limit','TpAzY':'offset','MeiPJ':'true'},_0x5a3198=await getToken();if(!_0x5a3198)throw new Error(_0x34c82b(0x1ef));const _0x22d379=_0x2300c3['ibbmI'](getApiBaseUrl),_0x1374e0=new URLSearchParams();if(_0x1fe28b?.[_0x34c82b(0x21f)])_0x1374e0['set'](_0x2300c3['SQRKn'],_0x1fe28b[_0x34c82b(0x21f)]);if(_0x1fe28b?.[_0x34c82b(0x221)])_0x1374e0['set'](_0x2300c3[_0x34c82b(0x1e6)],_0x1fe28b[_0x34c82b(0x221)]);if(_0x1fe28b?.['limit'])_0x1374e0[_0x34c82b(0x206)](_0x2300c3['BPyQg'],_0x1fe28b['limit'][_0x34c82b(0x216)]());if(_0x1fe28b?.['offset'])_0x1374e0[_0x34c82b(0x206)](_0x2300c3[_0x34c82b(0x1df)],_0x1fe28b[_0x34c82b(0x218)][_0x34c82b(0x216)]());if(_0x1fe28b?.[_0x34c82b(0x1fb)])_0x1374e0['set'](_0x34c82b(0x1fb),_0x2300c3['MeiPJ']);const _0x2df2d3=_0x22d379+_0x34c82b(0x21a)+(_0x1374e0['toString']()?'?'+_0x1374e0[_0x34c82b(0x216)]():''),_0x3975bf=await fetch(_0x2df2d3,{'method':_0x34c82b(0x1e7),'headers':{'Authorization':'Bearer\x20'+_0x5a3198}});if(!_0x3975bf['ok']){const _0x1db441=await _0x3975bf['text']();throw new Error('Failed\x20to\x20list\x20feature\x20reviews:\x20'+_0x1db441);}return _0x3975bf[_0x34c82b(0x223)]();}export async function getFeature(_0x2dc781){const _0x223e8b=_0x2895,_0x598153={'qauno':function(_0x2cc9b5){return _0x2cc9b5();}},_0xf8aeba=await _0x598153[_0x223e8b(0x1f5)](getToken);if(!_0xf8aeba)throw new Error(_0x223e8b(0x1ef));const _0x21299d=_0x598153['qauno'](getApiBaseUrl),_0x3ef685=await fetch(_0x21299d+_0x223e8b(0x1f2)+_0x2dc781,{'method':_0x223e8b(0x1e7),'headers':{'Authorization':_0x223e8b(0x1f1)+_0xf8aeba}});if(!_0x3ef685['ok']){const _0x326663=await _0x3ef685['text']();throw new Error(_0x223e8b(0x1f4)+_0x326663);}return _0x3ef685[_0x223e8b(0x223)]();}function _0x2a3c(){const _0x20afff=['uFkkl','TpAzY','45ifkskA','35cWwMww','vcsof','Failed\x20to\x20get\x20item\x20feedback:\x20','Failed\x20to\x20conclude\x20session:\x20','tbgRY','tvCYo','GET','Failed\x20to\x20create\x20feature\x20review:\x20','/action-items','AXEiB','Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20','itemIds','/sessions/','38726nvTdVa','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','AMFCE','Bearer\x20','/api/v1/mcp/features/','application/json','Failed\x20to\x20get\x20feature\x20review:\x20','qauno','/checklist/','aXGdV','vtXuf','vcuKt','text','includeDeleted','585208PnfEJy','SYZDp','68658qBSFWH','1223656IPDJJN','BQJYG','ZdDVa','sessionId','Failed\x20to\x20get\x20feature\x20review\x20report:\x20','ZTBRQ','BZlrj','set','TTqQe','352270QumQrZ','GrMhb','Failed\x20to\x20start\x20session:\x20','/feedback','/checklist','WjTGJ','489484VXYpLL','13852443jJWICL','style','aOKfg','/checklist-items/','/sessions','105dTCjix','/start','toString','POST','offset','stringify','/api/v1/mcp/features','UTOOE','PATCH','NODUZ','18VNupqi','gitRepoUrl','Failed\x20to\x20create\x20scenario:\x20','gitBranch','/report','json','eegkC','HZXNE','join'];_0x2a3c=function(){return _0x20afff;};return _0x2a3c();}export async function updateFeature(_0x1ed5b6,_0x5a319a){const _0x32b78b=_0x2895,_0x4be10a={'hoqzG':function(_0x2107d8){return _0x2107d8();},'AXEiB':'PATCH','uFkkl':_0x32b78b(0x1f3)},_0x46ed3d=await _0x4be10a['hoqzG'](getToken);if(!_0x46ed3d)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x4e2892=_0x4be10a['hoqzG'](getApiBaseUrl),_0x3be5da=await fetch(_0x4e2892+_0x32b78b(0x1f2)+_0x1ed5b6,{'method':_0x4be10a[_0x32b78b(0x1ea)],'headers':{'Authorization':'Bearer\x20'+_0x46ed3d,'Content-Type':_0x4be10a[_0x32b78b(0x1de)]},'body':JSON[_0x32b78b(0x219)](_0x5a319a)});if(!_0x3be5da['ok']){const _0x1003d1=await _0x3be5da[_0x32b78b(0x1fa)]();throw new Error('Failed\x20to\x20update\x20feature\x20review:\x20'+_0x1003d1);}return _0x3be5da['json']();}export async function createChecklistItem(_0x374c44,_0x35ad24,_0xb44964){const _0x177c91=_0x2895,_0x3e34a5={'lejRS':function(_0x11e052){return _0x11e052();},'qeTZu':_0x177c91(0x217),'WjTGJ':_0x177c91(0x1f3)},_0x340a3f=await getToken();if(!_0x340a3f)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x2d81c6=_0x3e34a5['lejRS'](getApiBaseUrl),_0x4d6240=await fetch(_0x2d81c6+'/api/v1/mcp/features/'+_0x374c44+_0x177c91(0x20c),{'method':_0x3e34a5['qeTZu'],'headers':{'Authorization':'Bearer\x20'+_0x340a3f,'Content-Type':_0x3e34a5[_0x177c91(0x20d)]},'body':JSON['stringify']({'description':_0x35ad24,'position':_0xb44964})});if(!_0x4d6240['ok']){const _0x45d389=await _0x4d6240['text']();throw new Error(_0x177c91(0x220)+_0x45d389);}return _0x4d6240['json']();}export async function updateChecklistItem(_0x1fbf53,_0x198f9e,_0x10c22e){const _0x52b912=_0x2895,_0x4ef78c={'mIQhG':function(_0x414fd4){return _0x414fd4();},'enSxJ':_0x52b912(0x1ef),'PindD':'updateChecklistItem'};return withRetry(async()=>{const _0x22bcfb=_0x52b912,_0x2c2b72=await _0x4ef78c['mIQhG'](getToken);if(!_0x2c2b72)throw new Error(_0x4ef78c['enSxJ']);const _0x27d017=getApiBaseUrl(),_0x2a7b65=await fetch(_0x27d017+'/api/v1/mcp/features/'+_0x1fbf53+_0x22bcfb(0x1f6)+_0x198f9e,{'method':_0x22bcfb(0x21c),'headers':{'Authorization':_0x22bcfb(0x1f1)+_0x2c2b72,'Content-Type':'application/json'},'body':JSON[_0x22bcfb(0x219)](_0x10c22e)});if(!_0x2a7b65['ok']){const _0x44f513=await _0x2a7b65['text']();throw new Error('Failed\x20to\x20update\x20scenario:\x20'+_0x44f513);}return _0x2a7b65[_0x22bcfb(0x223)]();},{'label':_0x4ef78c['PindD']});}export async function getFeatureReport(_0x14f378){const _0x28b417=_0x2895,_0x1aa2d2=await getToken();if(!_0x1aa2d2)throw new Error(_0x28b417(0x1ef));const _0x238880=getApiBaseUrl(),_0x9d4461=await fetch(_0x238880+_0x28b417(0x1f2)+_0x14f378+_0x28b417(0x222),{'method':'GET','headers':{'Authorization':_0x28b417(0x1f1)+_0x1aa2d2}});if(!_0x9d4461['ok']){const _0x4690ac=await _0x9d4461['text']();throw new Error(_0x28b417(0x203)+_0x4690ac);}return _0x9d4461['json']();}export async function getFeatureReportMarkdown(_0x5e3d84,_0x5f1855){const _0x28b39f=_0x2895,_0x86ef42={'XXZUB':_0x28b39f(0x1ef),'Aenwo':'sessionId','IWESc':function(_0x35e27e,_0x519b02){return _0x35e27e&&_0x519b02;},'dBHoG':'style','SYZDp':function(_0x47a9ac,_0x267ff6,_0x4d598d){return _0x47a9ac(_0x267ff6,_0x4d598d);},'vtXuf':'GET'},_0x117f22=await getToken();if(!_0x117f22)throw new Error(_0x86ef42['XXZUB']);const _0x16d7b4=getApiBaseUrl(),_0x4ec7c3=new URLSearchParams(),_0x363eb=(_0x5f1855?.[_0x28b39f(0x1ec)]?.['length']??0x0)>0x0,_0x5694bd=Boolean(_0x5f1855?.['sessionId']);_0x363eb&&_0x5f1855?.[_0x28b39f(0x1ec)]&&_0x4ec7c3['set'](_0x28b39f(0x1ec),_0x5f1855['itemIds'][_0x28b39f(0x1dd)](','));_0x5694bd&&_0x5f1855?.['sessionId']&&_0x4ec7c3[_0x28b39f(0x206)](_0x86ef42['Aenwo'],_0x5f1855[_0x28b39f(0x202)]);_0x86ef42['IWESc'](!_0x363eb,!_0x5694bd)&&_0x5f1855?.[_0x28b39f(0x210)]&&_0x4ec7c3[_0x28b39f(0x206)](_0x86ef42['dBHoG'],_0x5f1855['style']);const _0x5e8efd=_0x16d7b4+_0x28b39f(0x1f2)+_0x5e3d84+'/report/markdown',_0x59d332=''+_0x5e8efd+(_0x4ec7c3[_0x28b39f(0x216)]()?'?'+_0x4ec7c3['toString']():''),_0xad6a72=await _0x86ef42[_0x28b39f(0x1fd)](fetch,_0x59d332,{'method':_0x86ef42[_0x28b39f(0x1f8)],'headers':{'Authorization':'Bearer\x20'+_0x117f22}});if(!_0xad6a72['ok']){const _0x27edaa=await _0xad6a72['text']();throw new Error(_0x28b39f(0x1eb)+_0x27edaa);}return _0xad6a72[_0x28b39f(0x1fa)]();}export async function listFeatureSessions(_0x40b5b1){const _0x4b39d6=_0x2895,_0x158ac2={'NODUZ':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','AMFCE':function(_0x1e08ed){return _0x1e08ed();},'UUNqX':function(_0x138ff3,_0x594e57,_0x49b11c){return _0x138ff3(_0x594e57,_0x49b11c);},'RiWEW':_0x4b39d6(0x1e7)},_0x3d494e=await getToken();if(!_0x3d494e)throw new Error(_0x158ac2[_0x4b39d6(0x21d)]);const _0x2ab596=_0x158ac2[_0x4b39d6(0x1f0)](getApiBaseUrl),_0x5490ad=await _0x158ac2['UUNqX'](fetch,_0x2ab596+'/api/v1/mcp/features/'+_0x40b5b1+_0x4b39d6(0x213),{'method':_0x158ac2['RiWEW'],'headers':{'Authorization':_0x4b39d6(0x1f1)+_0x3d494e}});if(!_0x5490ad['ok']){const _0x43e5d1=await _0x5490ad[_0x4b39d6(0x1fa)]();throw new Error('Failed\x20to\x20list\x20sessions:\x20'+_0x43e5d1);}return _0x5490ad[_0x4b39d6(0x223)]();}function _0x2895(_0x1b9ba3,_0x32420a){_0x1b9ba3=_0x1b9ba3-0x1dd;const _0x2a3c7c=_0x2a3c();let _0x289520=_0x2a3c7c[_0x1b9ba3];return _0x289520;}export async function startSession(_0xde29c5,_0x2e47fa){const _0x64ef71=_0x2895,_0x101573={'aXGdV':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','UTOOE':function(_0x3961b9){return _0x3961b9();},'eegkC':function(_0x51c12a,_0x533fa9,_0x255fbf){return _0x51c12a(_0x533fa9,_0x255fbf);},'tbgRY':_0x64ef71(0x217)},_0x1ff784=await getToken();if(!_0x1ff784)throw new Error(_0x101573[_0x64ef71(0x1f7)]);const _0x1af1b4=_0x101573[_0x64ef71(0x21b)](getApiBaseUrl),_0x4d147e=await _0x101573[_0x64ef71(0x224)](fetch,_0x1af1b4+_0x64ef71(0x1f2)+_0xde29c5+'/sessions/'+_0x2e47fa+_0x64ef71(0x215),{'method':_0x101573[_0x64ef71(0x1e5)],'headers':{'Authorization':'Bearer\x20'+_0x1ff784}});if(!_0x4d147e['ok']){const _0x2c848c=await _0x4d147e[_0x64ef71(0x1fa)]();throw new Error(_0x64ef71(0x20a)+_0x2c848c);}return _0x4d147e[_0x64ef71(0x223)]();}export async function concludeSession(_0x1a2237,_0x555b3a){const _0x52288a=_0x2895,_0x20ebd1={'gNgXb':function(_0x5d5fe7){return _0x5d5fe7();},'vcsof':function(_0x3bb70e){return _0x3bb70e();},'kunsv':function(_0x470abd,_0xd6f0f3,_0x2d3edd){return _0x470abd(_0xd6f0f3,_0x2d3edd);}},_0x4fbc97=await _0x20ebd1['gNgXb'](getToken);if(!_0x4fbc97)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x54febf=_0x20ebd1[_0x52288a(0x1e2)](getApiBaseUrl),_0x8a89ba=await _0x20ebd1['kunsv'](fetch,_0x54febf+'/api/v1/mcp/features/'+_0x1a2237+_0x52288a(0x1ed)+_0x555b3a+'/conclude',{'method':_0x52288a(0x217),'headers':{'Authorization':'Bearer\x20'+_0x4fbc97}});if(!_0x8a89ba['ok']){const _0x2137f7=await _0x8a89ba['text']();throw new Error(_0x52288a(0x1e4)+_0x2137f7);}return _0x8a89ba[_0x52288a(0x223)]();}export async function getActionItems(_0x247200){const _0x250cab=_0x2895,_0x30bf09={'HZXNE':function(_0x47e4a5){return _0x47e4a5();},'vcuKt':function(_0x670b8b){return _0x670b8b();},'aUVEu':_0x250cab(0x1e7)},_0xd98a15=await _0x30bf09[_0x250cab(0x225)](getToken);if(!_0xd98a15)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3bde47=_0x30bf09[_0x250cab(0x1f9)](getApiBaseUrl),_0x2a7710=await fetch(_0x3bde47+'/api/v1/mcp/features/'+_0x247200+_0x250cab(0x1e9),{'method':_0x30bf09['aUVEu'],'headers':{'Authorization':_0x250cab(0x1f1)+_0xd98a15}});if(!_0x2a7710['ok']){const _0xb633c3=await _0x2a7710['text']();throw new Error('Failed\x20to\x20get\x20action\x20items:\x20'+_0xb633c3);}return _0x2a7710['json']();}export async function getItemFeedback(_0x3020fb,_0x4e1df7){const _0x224432=_0x2895,_0x52db1d={'TTqQe':_0x224432(0x1ef)},_0x7dc54d=await getToken();if(!_0x7dc54d)throw new Error(_0x52db1d[_0x224432(0x207)]);const _0x5e4f74=getApiBaseUrl(),_0x148daa=await fetch(_0x5e4f74+_0x224432(0x1f2)+_0x3020fb+_0x224432(0x212)+_0x4e1df7+_0x224432(0x20b),{'method':_0x224432(0x1e7),'headers':{'Authorization':_0x224432(0x1f1)+_0x7dc54d}});if(!_0x148daa['ok']){const _0x134bba=await _0x148daa[_0x224432(0x1fa)]();throw new Error(_0x224432(0x1e3)+_0x134bba);}return _0x148daa['json']();}export async function markCommentsAddressed(_0x14a484,_0x350738,_0x31864b){const _0x37e2e4=_0x2895,_0x3c039a={'dAKDz':function(_0xef1b0c){return _0xef1b0c();},'aOKfg':function(_0x239f42,_0x427c64,_0x1dd31c){return _0x239f42(_0x427c64,_0x1dd31c);},'BZlrj':'POST'},_0x221fb7=await getToken();if(!_0x221fb7)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3a35e6=_0x3c039a['dAKDz'](getApiBaseUrl),_0x3c52b6=await _0x3c039a[_0x37e2e4(0x211)](fetch,_0x3a35e6+'/api/v1/mcp/features/'+_0x14a484+'/comments/address',{'method':_0x3c039a[_0x37e2e4(0x205)],'headers':{'Authorization':'Bearer\x20'+_0x221fb7,'Content-Type':_0x37e2e4(0x1f3)},'body':JSON[_0x37e2e4(0x219)]({'checklistItemId':_0x350738,'commentIds':_0x31864b})});if(!_0x3c52b6['ok']){const _0x4af97c=await _0x3c52b6['text']();throw new Error('Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20'+_0x4af97c);}}export async function softDeleteFeature(_0x30069e){const _0x2f3122=_0x2895,_0x485c65={'ADTcd':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','ZdDVa':function(_0x3fa406){return _0x3fa406();},'DkItA':function(_0x2958dd,_0x551e80,_0x21ee2c){return _0x2958dd(_0x551e80,_0x21ee2c);},'heAXL':'DELETE'},_0x4b7cf6=await getToken();if(!_0x4b7cf6)throw new Error(_0x485c65['ADTcd']);const _0x1fdecd=_0x485c65[_0x2f3122(0x201)](getApiBaseUrl),_0x438093=await _0x485c65['DkItA'](fetch,_0x1fdecd+_0x2f3122(0x1f2)+_0x30069e,{'method':_0x485c65['heAXL'],'headers':{'Authorization':'Bearer\x20'+_0x4b7cf6}});if(!_0x438093['ok']){const _0x16fa34=await _0x438093['text']();throw new Error('Failed\x20to\x20delete\x20feature\x20review:\x20'+_0x16fa34);}}export async function restoreFeature(_0x1478c4){const _0x2cb038=_0x2895,_0x1e115f={'RJvMc':function(_0x31f72e){return _0x31f72e();},'ZTBRQ':_0x2cb038(0x217)},_0x134306=await _0x1e115f['RJvMc'](getToken);if(!_0x134306)throw new Error(_0x2cb038(0x1ef));const _0x51399f=_0x1e115f['RJvMc'](getApiBaseUrl),_0xbe83c1=await fetch(_0x51399f+'/api/v1/mcp/features/'+_0x1478c4+'/restore',{'method':_0x1e115f[_0x2cb038(0x204)],'headers':{'Authorization':'Bearer\x20'+_0x134306}});if(!_0xbe83c1['ok']){const _0x38cb6a=await _0xbe83c1['text']();throw new Error('Failed\x20to\x20restore\x20feature\x20review:\x20'+_0x38cb6a);}}