@ranger-testing/ranger-cli 2.2.4 → 2.2.5

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 (67) 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/stitchWebmFiles.js +1 -1
  61. package/build/commands/utils/telemetry.js +1 -1
  62. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  63. package/build/commands/utils/userApi.js +1 -1
  64. package/build/commands/utils/version.js +1 -1
  65. package/build/commands/verifyFeature.js +1 -1
  66. package/build/commands/verifyInBrowser.js +1 -1
  67. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x2ef841,_0x3950f4){const _0xc4deb0=_0x1888,_0xf392cf=_0x2ef841();while(!![]){try{const _0xe19056=parseInt(_0xc4deb0(0x159))/0x1*(parseInt(_0xc4deb0(0x149))/0x2)+-parseInt(_0xc4deb0(0x14b))/0x3*(-parseInt(_0xc4deb0(0x133))/0x4)+-parseInt(_0xc4deb0(0x148))/0x5*(-parseInt(_0xc4deb0(0x14a))/0x6)+-parseInt(_0xc4deb0(0x154))/0x7+parseInt(_0xc4deb0(0x163))/0x8*(-parseInt(_0xc4deb0(0x137))/0x9)+-parseInt(_0xc4deb0(0x141))/0xa*(parseInt(_0xc4deb0(0x15f))/0xb)+-parseInt(_0xc4deb0(0x144))/0xc*(-parseInt(_0xc4deb0(0x14c))/0xd);if(_0xe19056===_0x3950f4)break;else _0xf392cf['push'](_0xf392cf['shift']());}catch(_0x431ded){_0xf392cf['push'](_0xf392cf['shift']());}}}(_0x9b52,0xcac8a));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';function _0x1888(_0xe90776,_0x3eeac0){_0xe90776=_0xe90776-0x12f;const _0x9b52b4=_0x9b52();let _0x188885=_0x9b52b4[_0xe90776];return _0x188885;}import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';function _0x9b52(){const _0x3ef0ab=['\x0a📋\x20Authentication\x20Update','close','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','6682242NzPEGK','goto','string','.enc','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','1gddbhy','Config\x20not\x20found\x20at\x20','✓\x20Updated\x20config:\x20','\x0a✅\x20Profile\x20\x22','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','ATRKO','413512kKFVtU','storageState','newPage','parse','3936mGORed','config_write','browser','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','log','This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','contextOptions','8CgBRjx','trackPhaseEnd','BKmDd','rZVRl','15111fSZAyb','isTTY','catch','pEvUC','baseUrl','stdout','✓\x20Auth\x20state\x20saved\x20to:\x20','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','onBrR','MHRfE','440rCTZtT','vRXGT','SpdNW','15816fvEqxf','browser_auth','egZiP','Profile\x20\x22','20fHKQSO','181624JwBrgZ','1362726fRJwLn','2255793XFDyEq','17381obVltN','trackPhaseStart','settings.json','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.'];_0x9b52=function(){return _0x3ef0ab;};return _0x9b52();}import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x3e8bac,_0x41e947,_0x1d5289){const _0x3e368f=_0x1888,_0x37675f={'DjXpA':_0x3e368f(0x152),'SpdNW':function(_0x3f1313,_0x5c8532,_0x24724f){return _0x3f1313(_0x5c8532,_0x24724f);},'NruUj':_0x3e368f(0x14e),'rNEsB':function(_0x501a13,_0x4095a2,_0xb701f0){return _0x501a13(_0x4095a2,_0xb701f0);},'NpvwL':'auth.json','IhnGu':_0x3e368f(0x15d),'onBrR':function(_0x54aeff,_0xdcfcb5){return _0x54aeff(_0xdcfcb5);},'rZVRl':'utf-8','ATRKO':function(_0x590b12,_0x5a41bc){return _0x590b12===_0x5a41bc;},'rOTEd':function(_0x5c28b0,_0x437e32){return _0x5c28b0(_0x437e32);},'wYYht':_0x3e368f(0x14f),'MHRfE':_0x3e368f(0x166),'pEvUC':function(_0x53c7be,_0x39b162){return _0x53c7be(_0x39b162);},'FPUdJ':_0x3e368f(0x167),'JUSQN':function(_0x927e3e,_0x47c5e7,_0x53f8f6){return _0x927e3e(_0x47c5e7,_0x53f8f6);},'BKmDd':function(_0x24df95){return _0x24df95();},'vRXGT':function(_0xe7dd78,_0x1cbd65){return _0xe7dd78(_0x1cbd65);},'egZiP':_0x3e368f(0x145)},_0x4d927e=getEnvDir(_0x3e8bac),_0x28de2c=_0x37675f[_0x3e368f(0x143)](join,_0x4d927e,_0x37675f['NruUj']),_0x4fced9=_0x37675f['rNEsB'](join,_0x4d927e,_0x37675f['NpvwL']),_0x5c5265=_0x4fced9+_0x3e368f(0x157),_0x1af6b4=process['stdin']['isTTY']&&process[_0x3e368f(0x13c)][_0x3e368f(0x138)];if(!_0x1af6b4)throw new Error(_0x37675f['IhnGu']);if(!existsSync(_0x4d927e))throw new Error(_0x3e368f(0x147)+_0x3e8bac+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3e8bac);if(!_0x37675f[_0x3e368f(0x13f)](existsSync,_0x28de2c))throw new Error(_0x3e368f(0x15a)+_0x28de2c+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3e8bac);const _0x41f692=await readFile(_0x28de2c,_0x37675f[_0x3e368f(0x136)]),_0x54be8d=JSON[_0x3e368f(0x162)](_0x41f692),_0x36b90d=resolveEnvVars(_0x54be8d),_0x285092=_0x37675f[_0x3e368f(0x15e)](typeof _0x36b90d['baseUrl'],_0x3e368f(0x156))?_0x36b90d[_0x3e368f(0x13b)]:undefined,_0x4e415c=_0x37675f['onBrR'](existsSync,_0x4fced9),_0x5774f6=_0x37675f['rOTEd'](isEnvCi,_0x3e8bac);_0x41e947?.[_0x3e368f(0x14d)]('browser_auth'),console[_0x3e368f(0x130)](_0x3e368f(0x151)),console['log']('\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).'),console['log'](_0x37675f['wYYht']),console[_0x3e368f(0x130)](_0x37675f[_0x3e368f(0x140)]);const {launchOptions:_0x3153ea,contextOptions:_0x1b36ac}=_0x37675f['SpdNW'](buildBrowserOptionsFromSettings,_0x36b90d,{'headless':![],'storageStatePath':_0x4e415c?_0x4fced9:undefined}),_0x4f8c88=await chromium['launch'](_0x3153ea);let _0x191209=null;try{_0x191209=await _0x4f8c88['newContext'](_0x1b36ac),await _0x37675f[_0x3e368f(0x13a)](addProfileSetupBanner,_0x191209);const _0x22337d=await _0x191209[_0x3e368f(0x161)]();await _0x22337d[_0x3e368f(0x155)](_0x285092||'about:blank');let _0x47c8e2=![];await new Promise(_0x27276a=>{_0x22337d['on'](_0x37675f['DjXpA'],async()=>{const _0x756259=_0x1888;try{console[_0x756259(0x130)]('Saving\x20authentication\x20state...'),await _0x191209?.['storageState']({'path':_0x4fced9}),_0x47c8e2=!![];}catch{}_0x27276a();});});if(!_0x47c8e2){console['log'](_0x3e368f(0x150));!_0x36b90d['safeMode']&&(console[_0x3e368f(0x130)](_0x3e368f(0x131)),console[_0x3e368f(0x130)]('Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20'+_0x3e8bac+'\x20safeMode\x20true\x0a'));throw new Error(_0x37675f['FPUdJ']);}}finally{_0x191209&&await _0x191209['close']()[_0x3e368f(0x139)](()=>{}),await _0x4f8c88[_0x3e368f(0x152)]()['catch'](()=>{});}if(_0x5774f6){const _0x543713=await _0x37675f['JUSQN'](readFile,_0x4fced9,_0x37675f['rZVRl']),_0x4a06c3=await _0x37675f[_0x3e368f(0x135)](getToken);if(!_0x4a06c3)console['error'](_0x3e368f(0x12f)),console['log'](_0x3e368f(0x13d)+_0x4fced9);else{const _0x3cde30=encrypt(_0x543713,_0x4a06c3);await writeFile(_0x5c5265,_0x3cde30),await _0x37675f[_0x3e368f(0x142)](unlink,_0x4fced9),console[_0x3e368f(0x130)](_0x3e368f(0x158)+_0x5c5265),console[_0x3e368f(0x130)](_0x3e368f(0x153)),console[_0x3e368f(0x130)](_0x3e368f(0x13e));}}else console['log'](_0x3e368f(0x13d)+_0x4fced9);_0x41e947?.[_0x3e368f(0x134)](_0x37675f[_0x3e368f(0x146)]),_0x41e947?.['trackPhaseStart'](_0x3e368f(0x164)),_0x54be8d['browser']=_0x54be8d['browser']||{},_0x54be8d[_0x3e368f(0x165)][_0x3e368f(0x132)]=_0x54be8d[_0x3e368f(0x165)]['contextOptions']||{},_0x54be8d['browser']['contextOptions'][_0x3e368f(0x160)]=_0x4fced9,_0x37675f['ATRKO'](_0x1d5289?.['allowInsecureLocalhost'],!![])&&(_0x54be8d['allowInsecureLocalhost']=!![]),await writeFile(_0x28de2c,JSON['stringify'](_0x54be8d,null,0x2)),console['log'](_0x3e368f(0x15b)+_0x28de2c),_0x41e947?.[_0x3e368f(0x134)](_0x3e368f(0x164)),console[_0x3e368f(0x130)](_0x3e368f(0x15c)+_0x3e8bac+'\x22\x20authentication\x20updated');}
1
+ (function(_0x16c361,_0x4acc45){const _0x2c7811=_0x34ec,_0x46923b=_0x16c361();while(!![]){try{const _0x50676e=-parseInt(_0x2c7811(0x1d4))/0x1+parseInt(_0x2c7811(0x1b2))/0x2+-parseInt(_0x2c7811(0x1ba))/0x3*(-parseInt(_0x2c7811(0x1b3))/0x4)+-parseInt(_0x2c7811(0x1cb))/0x5+parseInt(_0x2c7811(0x1ab))/0x6*(-parseInt(_0x2c7811(0x1c4))/0x7)+-parseInt(_0x2c7811(0x1ad))/0x8+parseInt(_0x2c7811(0x1d7))/0x9*(parseInt(_0x2c7811(0x1b7))/0xa);if(_0x50676e===_0x4acc45)break;else _0x46923b['push'](_0x46923b['shift']());}catch(_0x2fe6c0){_0x46923b['push'](_0x46923b['shift']());}}}(_0x55c3,0x2799a));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';function _0x34ec(_0x1e8736,_0x5619f1){_0x1e8736=_0x1e8736-0x1aa;const _0x55c339=_0x55c3();let _0x34ece4=_0x55c339[_0x1e8736];return _0x34ece4;}import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';function _0x55c3(){const _0xf1660=['config_write','GZzGn','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','✓\x20Auth\x20state\x20saved\x20to:\x20','FXfQu','This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','isTTY','1917167QSWRwH','\x0a✅\x20Profile\x20\x22','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','trackPhaseEnd','parse','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','contextOptions','342400tCNiqf','browser','Saving\x20authentication\x20state...','close','jpyen','storageState','✓\x20Updated\x20config:\x20','\x0a📋\x20Authentication\x20Update','hhzsJ','39743csWMbN','sAIqR','bTEOX','18OGnUxJ','Profile\x20\x22','xKNzH','settings.json','newContext','6koXneC','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','1536464UUUHlL','baseUrl','utf-8','log','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','25024RKMJAO','2872HoZOhi','AbCWD','klWUG','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','2158130JoQlnF','YdsxE','\x20safeMode\x20true\x0a','1221hzcVke','allowInsecureLocalhost','newPage'];_0x55c3=function(){return _0xf1660;};return _0x55c3();}export async function updateEnv(_0x18c2f8,_0x2cd452,_0xf405e7){const _0x25c4c6=_0x34ec,_0xdebe9b={'gzeFI':_0x25c4c6(0x1cd),'GZzGn':function(_0xd233fb){return _0xd233fb();},'zCNjA':function(_0xae06fd,_0x43a534){return _0xae06fd+_0x43a534;},'OMxpe':'.enc','AbCWD':_0x25c4c6(0x1af),'jpyen':function(_0x8d66bf,_0x5cc739){return _0x8d66bf(_0x5cc739);},'xKNzH':function(_0x4c8a56,_0x1a2d94){return _0x4c8a56===_0x1a2d94;},'IvLKQ':'string','VsbEA':_0x25c4c6(0x1d2),'TNYLs':function(_0x28b156,_0x304c69){return _0x28b156||_0x304c69;},'EcrwK':'about:blank','TCImu':_0x25c4c6(0x1b1),'hhzsJ':_0x25c4c6(0x1c2),'klWUG':'Browser\x20closed\x20before\x20authentication\x20was\x20saved.','sAIqR':function(_0x32eff6,_0x3eaa2a,_0x3dddf2){return _0x32eff6(_0x3eaa2a,_0x3dddf2);},'FXfQu':'\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','bTEOX':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','YdsxE':_0x25c4c6(0x1bd)},_0x14415b=getEnvDir(_0x18c2f8),_0x3238b6=join(_0x14415b,_0x25c4c6(0x1da)),_0x340b04=join(_0x14415b,'auth.json'),_0x30a87a=_0xdebe9b['zCNjA'](_0x340b04,_0xdebe9b['OMxpe']),_0x42eb38=process['stdin']['isTTY']&&process['stdout'][_0x25c4c6(0x1c3)];if(!_0x42eb38)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(!existsSync(_0x14415b))throw new Error(_0x25c4c6(0x1d8)+_0x18c2f8+_0x25c4c6(0x1c6)+_0x18c2f8);if(!existsSync(_0x3238b6))throw new Error('Config\x20not\x20found\x20at\x20'+_0x3238b6+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x18c2f8);const _0x4be442=await readFile(_0x3238b6,_0xdebe9b[_0x25c4c6(0x1b4)]),_0x2e567e=JSON[_0x25c4c6(0x1c8)](_0x4be442),_0x1ae753=_0xdebe9b[_0x25c4c6(0x1cf)](resolveEnvVars,_0x2e567e),_0x5630cb=_0xdebe9b[_0x25c4c6(0x1d9)](typeof _0x1ae753[_0x25c4c6(0x1ae)],_0xdebe9b['IvLKQ'])?_0x1ae753['baseUrl']:undefined,_0x2a6c4c=existsSync(_0x340b04),_0x4f8d24=isEnvCi(_0x18c2f8);_0x2cd452?.['trackPhaseStart']('browser_auth'),console[_0x25c4c6(0x1b0)](_0xdebe9b['VsbEA']),console[_0x25c4c6(0x1b0)](_0x25c4c6(0x1b6)),console['log'](_0x25c4c6(0x1c9)),console['log'](_0x25c4c6(0x1ac));const {launchOptions:_0x350ebd,contextOptions:_0x59b7a8}=buildBrowserOptionsFromSettings(_0x1ae753,{'headless':![],'storageStatePath':_0x2a6c4c?_0x340b04:undefined}),_0x1a6d37=await chromium['launch'](_0x350ebd);let _0x5793b4=null;try{_0x5793b4=await _0x1a6d37[_0x25c4c6(0x1aa)](_0x59b7a8),await addProfileSetupBanner(_0x5793b4);const _0xb7e78a=await _0x5793b4[_0x25c4c6(0x1bc)]();await _0xb7e78a['goto'](_0xdebe9b['TNYLs'](_0x5630cb,_0xdebe9b['EcrwK']));let _0x449cc0=![];await new Promise(_0x53f2a7=>{_0xb7e78a['on']('close',async()=>{const _0x405f10=_0x34ec;try{console['log'](_0xdebe9b['gzeFI']),await _0x5793b4?.[_0x405f10(0x1d0)]({'path':_0x340b04}),_0x449cc0=!![];}catch{}_0xdebe9b[_0x405f10(0x1be)](_0x53f2a7);});});if(!_0x449cc0){console[_0x25c4c6(0x1b0)](_0xdebe9b['TCImu']);!_0x1ae753['safeMode']&&(console[_0x25c4c6(0x1b0)](_0xdebe9b[_0x25c4c6(0x1d3)]),console[_0x25c4c6(0x1b0)]('Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20'+_0x18c2f8+_0x25c4c6(0x1b9)));throw new Error(_0xdebe9b[_0x25c4c6(0x1b5)]);}}finally{_0x5793b4&&await _0x5793b4[_0x25c4c6(0x1ce)]()['catch'](()=>{}),await _0x1a6d37[_0x25c4c6(0x1ce)]()['catch'](()=>{});}if(_0x4f8d24){const _0x3d58b7=await _0xdebe9b[_0x25c4c6(0x1d5)](readFile,_0x340b04,_0x25c4c6(0x1af)),_0x328a5f=await getToken();if(!_0x328a5f)console['error'](_0xdebe9b[_0x25c4c6(0x1c1)]),console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x340b04);else{const _0x2584e7=encrypt(_0x3d58b7,_0x328a5f);await writeFile(_0x30a87a,_0x2584e7),await _0xdebe9b['jpyen'](unlink,_0x340b04),console[_0x25c4c6(0x1b0)]('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x30a87a),console[_0x25c4c6(0x1b0)](_0xdebe9b[_0x25c4c6(0x1d6)]),console['log'](_0x25c4c6(0x1bf));}}else console[_0x25c4c6(0x1b0)](_0x25c4c6(0x1c0)+_0x340b04);_0x2cd452?.['trackPhaseEnd']('browser_auth'),_0x2cd452?.['trackPhaseStart'](_0xdebe9b[_0x25c4c6(0x1b8)]),_0x2e567e['browser']=_0x2e567e['browser']||{},_0x2e567e[_0x25c4c6(0x1cc)][_0x25c4c6(0x1ca)]=_0x2e567e['browser']['contextOptions']||{},_0x2e567e[_0x25c4c6(0x1cc)]['contextOptions']['storageState']=_0x340b04,_0xf405e7?.['allowInsecureLocalhost']===!![]&&(_0x2e567e[_0x25c4c6(0x1bb)]=!![]),await writeFile(_0x3238b6,JSON['stringify'](_0x2e567e,null,0x2)),console['log'](_0x25c4c6(0x1d1)+_0x3238b6),_0x2cd452?.[_0x25c4c6(0x1c7)](_0xdebe9b[_0x25c4c6(0x1b8)]),console[_0x25c4c6(0x1b0)](_0x25c4c6(0x1c5)+_0x18c2f8+'\x22\x20authentication\x20updated');}
@@ -1 +1 @@
1
- (function(_0x43bb61,_0x2f1638){const _0x1dcea6=_0x4a1f,_0x4e7013=_0x43bb61();while(!![]){try{const _0x1ec064=parseInt(_0x1dcea6(0x193))/0x1*(parseInt(_0x1dcea6(0x199))/0x2)+-parseInt(_0x1dcea6(0x194))/0x3+-parseInt(_0x1dcea6(0x190))/0x4+parseInt(_0x1dcea6(0x19d))/0x5*(-parseInt(_0x1dcea6(0x196))/0x6)+-parseInt(_0x1dcea6(0x197))/0x7+-parseInt(_0x1dcea6(0x192))/0x8*(-parseInt(_0x1dcea6(0x198))/0x9)+parseInt(_0x1dcea6(0x19c))/0xa;if(_0x1ec064===_0x2f1638)break;else _0x4e7013['push'](_0x4e7013['shift']());}catch(_0x2ca6c0){_0x4e7013['push'](_0x4e7013['shift']());}}}(_0x5a78,0x5d170));function _0x5a78(){const _0x30de89=['9aWQBdp','4vCjiqz','log','settings.json','5158390dlygcX','856955RJcMvU','1265832MYZipp','\x0a✓\x20Now\x20using\x20profile\x20\x22','212144jBHCkc','181938AcKlVL','8265UNDuWM','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','6hDBfih','240331eGYsTP'];_0x5a78=function(){return _0x30de89;};return _0x5a78();}import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';function _0x4a1f(_0x5963cc,_0x2ad08d){_0x5963cc=_0x5963cc-0x190;const _0x5a789f=_0x5a78();let _0x4a1f17=_0x5a789f[_0x5963cc];return _0x4a1f17;}import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x5bf449){const _0x3b1076=_0x4a1f,_0x180e66={'rpPIW':_0x3b1076(0x19b),'JBHzA':function(_0x18aed2,_0x582afa){return _0x18aed2(_0x582afa);}},_0x37e723=getEnvDir(_0x5bf449),_0x4e5556=join(_0x37e723,_0x180e66['rpPIW']);if(!existsSync(_0x37e723))throw new Error('Profile\x20\x22'+_0x5bf449+_0x3b1076(0x195)+_0x5bf449);if(!existsSync(_0x4e5556))throw new Error('Config\x20not\x20found\x20at\x20'+_0x4e5556+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x5bf449);await _0x180e66['JBHzA'](writeActiveProfileName,_0x5bf449),console[_0x3b1076(0x19a)](_0x3b1076(0x191)+_0x5bf449+'\x22');}
1
+ (function(_0x558a1a,_0xd6888a){const _0x12508f=_0x3deb,_0x51fefe=_0x558a1a();while(!![]){try{const _0x444764=parseInt(_0x12508f(0x16c))/0x1*(parseInt(_0x12508f(0x167))/0x2)+-parseInt(_0x12508f(0x170))/0x3+parseInt(_0x12508f(0x16a))/0x4*(parseInt(_0x12508f(0x16d))/0x5)+parseInt(_0x12508f(0x163))/0x6+-parseInt(_0x12508f(0x16b))/0x7*(parseInt(_0x12508f(0x164))/0x8)+-parseInt(_0x12508f(0x162))/0x9*(parseInt(_0x12508f(0x169))/0xa)+parseInt(_0x12508f(0x168))/0xb;if(_0x444764===_0xd6888a)break;else _0x51fefe['push'](_0x51fefe['shift']());}catch(_0x2e13cc){_0x51fefe['push'](_0x51fefe['shift']());}}}(_0x6791,0x5fd93));import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';function _0x6791(){const _0x3bcbf5=['361029JvoxJo','207WVMjsc','365790cphcPy','200leuVKc','NXGsY','XtZfQ','3566oFuLvx','5926525iCELln','315730vWJvoE','604xoMPPN','127435SygzXA','196IDhJZS','24670Xqhriz','log','settings.json'];_0x6791=function(){return _0x3bcbf5;};return _0x6791();}import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x3deb(_0x40b575,_0xa1e2fd){_0x40b575=_0x40b575-0x162;const _0x6791bb=_0x6791();let _0x3debcd=_0x6791bb[_0x40b575];return _0x3debcd;}export async function useEnv(_0x5e47f4){const _0x3b97cd=_0x3deb,_0x5ee027={'XtZfQ':function(_0x44ab3b,_0x42fd50){return _0x44ab3b(_0x42fd50);},'NXGsY':function(_0x1045eb,_0x5bba35,_0x4dd8b3){return _0x1045eb(_0x5bba35,_0x4dd8b3);},'kyUYP':function(_0x2db53a,_0x53c89a){return _0x2db53a(_0x53c89a);}},_0x23c338=_0x5ee027[_0x3b97cd(0x166)](getEnvDir,_0x5e47f4),_0x5cad83=_0x5ee027[_0x3b97cd(0x165)](join,_0x23c338,_0x3b97cd(0x16f));if(!existsSync(_0x23c338))throw new Error('Profile\x20\x22'+_0x5e47f4+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x5e47f4);if(!_0x5ee027['kyUYP'](existsSync,_0x5cad83))throw new Error('Config\x20not\x20found\x20at\x20'+_0x5cad83+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x5e47f4);await writeActiveProfileName(_0x5e47f4),console[_0x3b97cd(0x16e)]('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x5e47f4+'\x22');}
@@ -1 +1 @@
1
- const _0x3755b6=_0x3050;(function(_0x4b3e9d,_0x593b97){const _0x56ac10=_0x3050,_0x14d409=_0x4b3e9d();while(!![]){try{const _0x25e33c=-parseInt(_0x56ac10(0x1e4))/0x1+parseInt(_0x56ac10(0x1da))/0x2*(parseInt(_0x56ac10(0x1d6))/0x3)+parseInt(_0x56ac10(0x1d9))/0x4+parseInt(_0x56ac10(0x1e1))/0x5*(-parseInt(_0x56ac10(0x1e2))/0x6)+parseInt(_0x56ac10(0x1d1))/0x7*(-parseInt(_0x56ac10(0x1e0))/0x8)+-parseInt(_0x56ac10(0x1dc))/0x9*(-parseInt(_0x56ac10(0x1d2))/0xa)+-parseInt(_0x56ac10(0x1e3))/0xb*(-parseInt(_0x56ac10(0x1db))/0xc);if(_0x25e33c===_0x593b97)break;else _0x14d409['push'](_0x14d409['shift']());}catch(_0x2c8202){_0x14d409['push'](_0x14d409['shift']());}}}(_0x3d2e,0xecdc8));import{existsSync}from'fs';import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';function _0x3050(_0x25220d,_0x382f77){_0x25220d=_0x25220d-0x1cf;const _0x3d2e86=_0x3d2e();let _0x30505e=_0x3d2e86[_0x25220d];return _0x30505e;}import{join}from'path';import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE=_0x3755b6(0x1d5),LEGACY_ACTIVE_ENV_FILE='active-env.txt';function getActiveProfilePath(){const _0x48a2f0=_0x3755b6,_0x5a62df={'UBoiZ':function(_0x5ea174){return _0x5ea174();}};return join(_0x5a62df[_0x48a2f0(0x1d8)](getRangerDir),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){return join(getRangerDir(),LEGACY_ACTIVE_ENV_FILE);}function _0x3d2e(){const _0x361a77=['TSedC','UBoiZ','5247228ZRfOun','4kwCWDa','540YcojYG','342QygQZt','utf-8','WRoGE','JdqJs','264AzSWEN','7824550gRMjfF','6nGOOPk','141031LYYKdD','765996qsPAJe','YbdiF','trim','mNdGH','91070qRWoNW','436440LVoACo','pjrho','gmpzu','active-profile.txt','274794ehWihx'];_0x3d2e=function(){return _0x361a77;};return _0x3d2e();}async function migrateLegacyActiveEnv(){const _0x442e51=_0x3755b6,_0x3f1854={'rBOaF':function(_0x29510c){return _0x29510c();},'mNdGH':function(_0x318650,_0x5986d5,_0x57242f){return _0x318650(_0x5986d5,_0x57242f);},'xFXje':'utf-8','pjrho':function(_0x6ca990,_0x5c33c4,_0x12120b,_0x15e039){return _0x6ca990(_0x5c33c4,_0x12120b,_0x15e039);}},_0x567b9b=_0x3f1854['rBOaF'](getLegacyActiveEnvPath);if(!existsSync(_0x567b9b))return null;let _0x314bd7=null;try{_0x314bd7=(await _0x3f1854[_0x442e51(0x1d0)](readFile,_0x567b9b,_0x3f1854['xFXje']))[_0x442e51(0x1cf)]()||null;}catch{_0x314bd7=null;}if(!_0x314bd7)return null;const _0x4439d9=_0x3f1854['rBOaF'](getActiveProfilePath);try{await _0x3f1854[_0x442e51(0x1d0)](rename,_0x567b9b,_0x4439d9);}catch{try{const _0x2e68ed=getRangerDir();await _0x3f1854[_0x442e51(0x1d0)](mkdir,_0x2e68ed,{'recursive':!![]}),await _0x3f1854[_0x442e51(0x1d3)](writeFile,_0x4439d9,_0x314bd7,_0x442e51(0x1dd)),await unlink(_0x567b9b);}catch{}}return _0x314bd7;}export async function readActiveProfileName(){const _0x5eb21d=_0x3755b6,_0x3a0ec0={'iRYeb':_0x5eb21d(0x1dd),'WRoGE':function(_0x1de181){return _0x1de181();}},_0x2e1448=getActiveProfilePath();if(existsSync(_0x2e1448))try{return(await readFile(_0x2e1448,_0x3a0ec0['iRYeb']))[_0x5eb21d(0x1cf)]()||null;}catch{return null;}return await _0x3a0ec0[_0x5eb21d(0x1de)](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x168a7a){const _0x21a7c2=_0x3755b6,_0x2de0fe={'JdqJs':function(_0x19cc41){return _0x19cc41();},'TSedC':function(_0x306448,_0x35a043,_0x25c0af){return _0x306448(_0x35a043,_0x25c0af);},'gmpzu':function(_0x2b3a79,_0x560142){return _0x2b3a79(_0x560142);}},_0x35eddf=_0x2de0fe['JdqJs'](getRangerDir);await _0x2de0fe[_0x21a7c2(0x1d7)](mkdir,_0x35eddf,{'recursive':!![]});const _0x3c7f43=_0x2de0fe[_0x21a7c2(0x1df)](getActiveProfilePath);await writeFile(_0x3c7f43,_0x168a7a,_0x21a7c2(0x1dd));const _0x236035=_0x2de0fe[_0x21a7c2(0x1df)](getLegacyActiveEnvPath);if(existsSync(_0x236035))try{await _0x2de0fe[_0x21a7c2(0x1d4)](unlink,_0x236035);}catch{}}export async function migrateActiveProfileFile(){const _0x52dc18=_0x3755b6,_0x569c60={'YbdiF':function(_0x43be9c,_0x25f3b9){return _0x43be9c!==_0x25f3b9;}},_0x313b2a=await migrateLegacyActiveEnv();return _0x569c60[_0x52dc18(0x1e5)](_0x313b2a,null);}
1
+ const _0x20b877=_0x25d7;(function(_0x447d84,_0x323e5d){const _0x2c4794=_0x25d7,_0x1cac0d=_0x447d84();while(!![]){try{const _0x1f8836=-parseInt(_0x2c4794(0x157))/0x1+-parseInt(_0x2c4794(0x154))/0x2+-parseInt(_0x2c4794(0x155))/0x3+-parseInt(_0x2c4794(0x163))/0x4+-parseInt(_0x2c4794(0x15d))/0x5+-parseInt(_0x2c4794(0x165))/0x6*(-parseInt(_0x2c4794(0x15b))/0x7)+-parseInt(_0x2c4794(0x159))/0x8*(-parseInt(_0x2c4794(0x164))/0x9);if(_0x1f8836===_0x323e5d)break;else _0x1cac0d['push'](_0x1cac0d['shift']());}catch(_0x44f9c3){_0x1cac0d['push'](_0x1cac0d['shift']());}}}(_0x5d2b,0x918a3));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=_0x20b877(0x158),LEGACY_ACTIVE_ENV_FILE='active-env.txt';function getActiveProfilePath(){const _0x4aab21={'sMcCz':function(_0x437de1,_0x157e38,_0x3d58b9){return _0x437de1(_0x157e38,_0x3d58b9);},'xRZcJ':function(_0x26dfcb){return _0x26dfcb();}};return _0x4aab21['sMcCz'](join,_0x4aab21['xRZcJ'](getRangerDir),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x40c648=_0x20b877,_0x20a6c1={'EBBUt':function(_0x4be00c){return _0x4be00c();}};return join(_0x20a6c1[_0x40c648(0x15a)](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}function _0x5d2b(){const _0x4b5fc1=['8544lhqZWr','luOBV','963146wNWDrk','2435181vQdoNE','ygWBU','772235YhVHxM','active-profile.txt','8XCcCvL','EBBUt','1099QOTzZa','rNUGO','2585285Vkmxqe','ixKSM','DhiJl','utf-8','KQVUD','trim','259856chIxoH','27181071DyEqjS'];_0x5d2b=function(){return _0x4b5fc1;};return _0x5d2b();}function _0x25d7(_0x35d019,_0x78e63e){_0x35d019=_0x35d019-0x153;const _0x5d2bc3=_0x5d2b();let _0x25d7f5=_0x5d2bc3[_0x35d019];return _0x25d7f5;}async function migrateLegacyActiveEnv(){const _0x44255c=_0x20b877,_0x3cacbd={'KQVUD':function(_0x371636){return _0x371636();},'rNUGO':function(_0xd2a4b4,_0x38717a){return _0xd2a4b4(_0x38717a);},'ygWBU':function(_0x9f415d,_0x3eb14a,_0x5d9009){return _0x9f415d(_0x3eb14a,_0x5d9009);},'ixKSM':_0x44255c(0x160),'KtGTz':function(_0x204c70,_0x5736bf,_0x15ba2b,_0x5e6977){return _0x204c70(_0x5736bf,_0x15ba2b,_0x5e6977);},'OYNbI':function(_0x3d432d,_0x579325){return _0x3d432d(_0x579325);}},_0x1937c1=_0x3cacbd[_0x44255c(0x161)](getLegacyActiveEnvPath);if(!_0x3cacbd[_0x44255c(0x15c)](existsSync,_0x1937c1))return null;let _0x31c805=null;try{_0x31c805=(await _0x3cacbd[_0x44255c(0x156)](readFile,_0x1937c1,_0x3cacbd[_0x44255c(0x15e)]))[_0x44255c(0x162)]()||null;}catch{_0x31c805=null;}if(!_0x31c805)return null;const _0x27e474=getActiveProfilePath();try{await rename(_0x1937c1,_0x27e474);}catch{try{const _0x1bd9dc=getRangerDir();await _0x3cacbd['ygWBU'](mkdir,_0x1bd9dc,{'recursive':!![]}),await _0x3cacbd['KtGTz'](writeFile,_0x27e474,_0x31c805,_0x3cacbd[_0x44255c(0x15e)]),await _0x3cacbd['OYNbI'](unlink,_0x1937c1);}catch{}}return _0x31c805;}export async function readActiveProfileName(){const _0x4ff7e6=_0x20b877,_0x174f78={'DhiJl':_0x4ff7e6(0x160)},_0x2c2a63=getActiveProfilePath();if(existsSync(_0x2c2a63))try{return(await readFile(_0x2c2a63,_0x174f78[_0x4ff7e6(0x15f)]))['trim']()||null;}catch{return null;}return await migrateLegacyActiveEnv();}export async function writeActiveProfileName(_0x43d9df){const _0x518015=_0x20b877,_0x3374f6={'luOBV':function(_0x58ec52){return _0x58ec52();},'LkabC':function(_0x5cd1ed,_0xe01386){return _0x5cd1ed(_0xe01386);}},_0x395905=_0x3374f6[_0x518015(0x153)](getRangerDir);await mkdir(_0x395905,{'recursive':!![]});const _0x3e40ff=getActiveProfilePath();await writeFile(_0x3e40ff,_0x43d9df,_0x518015(0x160));const _0x149b07=getLegacyActiveEnvPath();if(existsSync(_0x149b07))try{await _0x3374f6['LkabC'](unlink,_0x149b07);}catch{}}export async function migrateActiveProfileFile(){const _0x5c768a=await migrateLegacyActiveEnv();return _0x5c768a!==null;}
@@ -1 +1 @@
1
- (function(_0x380a99,_0x146ce8){const _0x5352c0=_0x1ff3,_0x3f4345=_0x380a99();while(!![]){try{const _0x4cada6=-parseInt(_0x5352c0(0x182))/0x1*(parseInt(_0x5352c0(0x168))/0x2)+parseInt(_0x5352c0(0x166))/0x3+parseInt(_0x5352c0(0x149))/0x4+parseInt(_0x5352c0(0x18d))/0x5+parseInt(_0x5352c0(0x161))/0x6*(parseInt(_0x5352c0(0x172))/0x7)+parseInt(_0x5352c0(0x176))/0x8*(-parseInt(_0x5352c0(0x1b9))/0x9)+parseInt(_0x5352c0(0x185))/0xa*(-parseInt(_0x5352c0(0x18e))/0xb);if(_0x4cada6===_0x146ce8)break;else _0x3f4345['push'](_0x3f4345['shift']());}catch(_0x303d66){_0x3f4345['push'](_0x3f4345['shift']());}}}(_0x2698,0x8876f));const _0x26a83f=(function(){const _0x4a60c3=_0x1ff3,_0x5763ae={'jbKtp':_0x4a60c3(0x15b),'JhceO':function(_0x5a70dc,_0x78a93f,_0x409f65,_0x56b9fe){return _0x5a70dc(_0x78a93f,_0x409f65,_0x56b9fe);},'DUJjP':_0x4a60c3(0x194),'KRtOB':'EJssv','Mucaq':function(_0x578265,_0x49d990){return _0x578265!==_0x49d990;},'iemeY':_0x4a60c3(0x14d),'OtXfd':_0x4a60c3(0x1ab)};let _0xce4e90=!![];return function(_0x21d916,_0x5ca215){const _0x45f62b=_0x4a60c3,_0xbde7c2={'JVnAR':_0x5763ae['jbKtp'],'EyVXu':function(_0x55e937,_0xdf7150,_0x47428b,_0x4e49b5){const _0xd0d19d=_0x1ff3;return _0x5763ae[_0xd0d19d(0x1ae)](_0x55e937,_0xdf7150,_0x47428b,_0x4e49b5);},'vpAvn':_0x5763ae[_0x45f62b(0x165)],'nWcBb':_0x5763ae[_0x45f62b(0x1b5)],'srDWw':function(_0x2787b4,_0x1cb83e){const _0x5417e7=_0x45f62b;return _0x5763ae[_0x5417e7(0x14b)](_0x2787b4,_0x1cb83e);},'uxGUm':_0x5763ae[_0x45f62b(0x145)]};if(_0x5763ae[_0x45f62b(0x13c)]!==_0x5763ae[_0x45f62b(0x13c)])throw new _0x446cc7(_0xbde7c2['JVnAR']);else{const _0x7bfd51=_0xce4e90?function(){const _0x327780=_0x45f62b,_0x370228={'dnCbY':function(_0x419060,_0x1df0c6,_0x27a357,_0x1b5502){const _0x1d28a6=_0x1ff3;return _0xbde7c2[_0x1d28a6(0x17f)](_0x419060,_0x1df0c6,_0x27a357,_0x1b5502);},'oiFUI':_0xbde7c2[_0x327780(0x13e)]};if(_0xbde7c2[_0x327780(0x13a)]===_0xbde7c2['nWcBb']){if(_0x5ca215){if(_0xbde7c2['srDWw'](_0x327780(0x14d),_0xbde7c2[_0x327780(0x1b7)]))throw new _0x40b1e9(_0xbde7c2[_0x327780(0x150)]);else{const _0x316081=_0x5ca215[_0x327780(0x152)](_0x21d916,arguments);return _0x5ca215=null,_0x316081;}}}else return _0x370228[_0x327780(0x175)](_0x1fa6e4,_0x1ac71a,_0x26f0de,_0x370228[_0x327780(0x1c4)]);}:function(){};return _0xce4e90=![],_0x7bfd51;}};}()),_0x404eae=_0x26a83f(this,function(){const _0x10b8ac=_0x1ff3,_0x45a79c={'wQnWF':_0x10b8ac(0x188)};return _0x404eae['toString']()[_0x10b8ac(0x179)](_0x45a79c[_0x10b8ac(0x13b)])[_0x10b8ac(0x174)]()[_0x10b8ac(0x15f)](_0x404eae)[_0x10b8ac(0x179)](_0x45a79c[_0x10b8ac(0x13b)]);});_0x404eae();import{getToken}from'./keychain.js';function _0x2698(){const _0x292b7b=['rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','txvJyxe','rKPjthK','tLzTAg0','rKHxrgO','t3jwENC','sLzUqvi','rNjoENu','yxbWBhK','yNrLBu4','zeLuB0e','y1Pqy3q','DK1izLu','y2rIzxq','vK9cthq','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','y2HLy2TSAxn0sxrLBuLK','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','yxbWBgLJyxrPB24VANnVBG','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','uuryDKO','y29UC3rYDwn0B3i','Aw1Hz2uVCg5N','nK1Tze1MBa','CvzXqwK','uM9Xuhu','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','rfvkALa','mJaZmtq3n1LNy2TeBa','vurTuvi','mJm0ntaYB3bYzhny','CfrrBxu','D3rRuM0','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','DfPwBKS','qw1zyK0','Dgv4Da','zw52AxjVBM1LBNroyw1L','ANnVBG','A1vyvwy','mZm4ndmXmuXABxbtCW','s0zfCfK','Dg9tDhjPBMC','zg5dyLK','ogPKAwjztW','DxbKyxrL','vNnVrKC','C2vHCMnO','DhjTEhu','u0vhD1u','l3n0zxbZ','BuzJrfi','EercDNG','rxLwwhu','rgX1uKK','DMLKzw8VD2vIBq','ouzdywvQra','DuzusLO','uhPcqLO','mta0ntCWmfLQB2HXyG','qMvHCMvYia','yxbWBgLJyxrPB24VEMLW','kcGOlISPkYKRksSK','Cfz4B2O','qMfwC0S','D2rXuhm','z3zYCLi','ndy0mdu4mhLAwwX4wq','mJjOq0HeCNK','vwnKtfG','zgLNzxn0','v0Dzs00','DxbKyxrLqNjVD3nLCLnLC3nPB24','DunkBK4','yxbWBgLJyxrPB24VANnVBMW','u2vgwLy','teHnwgq','qw5HENO','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','wxL5yKi','AMD2qwq','l3vWBg9Hzc11CMXZ','r0vu','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','rKXAufq','t0jSEge','AMPgEwG','z0nNDg0','DxjS','yxPhyMe','ELnJrvC','sLneu00','BgvUz3rO','Cxr0z3u','uhbOwhi','C2L6zq','AgXeC1i','EwjmBKy','y2HLy2TZDw0','EM1yzfu','sMHJzu8','uefuq0G','l2fZC2v0CW','BKTkv2C','ue9tva','Bhzezxi','sgfMDgS','s1j0t0i','tuvMBxy','DxHhvw0','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','nZK2mJq2mKzgwefIsq','Bwv0ywrHDge','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','s2L3s1O','thrWq0q','sgzIwhG','DgfZAW','B3nYqNu','A09UzMm','suv3B2y','CKzTCwq','B2LgvuK','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','tMj5s3a','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','BLLZCvi','EKjusvq','weXbsu4','BLDJqMi','D1fUv0y','t3ryzMq','zMvHDhvYzuLK','DNbbDM4','q1v1se4','DeHZBxC','qvDAENG','C3rYAw5NAwz5','uufMu08','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','AwvTzvK','qKLpExe','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','l3n0zxbZlW','mJq3nZmXmLHLz1nzqG'];_0x2698=function(){return _0x292b7b;};return _0x2698();}import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x9922f0){const _0x4cd6e6=_0x1ff3,_0x4641de={'mAgSO':function(_0x41229a,_0x2e6698,_0xee3499,_0x3b5ab5){return _0x41229a(_0x2e6698,_0xee3499,_0x3b5ab5);},'VsoFG':_0x4cd6e6(0x160),'UcdLX':function(_0x3eed58){return _0x3eed58();},'xefKd':function(_0xa095a7,_0x3aedbc){return _0xa095a7===_0x3aedbc;},'VOBLt':_0x4cd6e6(0x193),'wtkRm':_0x4cd6e6(0x15b),'azGba':function(_0x3a836b){return _0x3a836b();},'SeFZV':function(_0x19aa7f,_0x529dc1,_0x15ca6b){return _0x19aa7f(_0x529dc1,_0x15ca6b);},'NFwMI':_0x4cd6e6(0x1b2),'mFcDR':_0x4cd6e6(0x15c),'tHsmw':function(_0x16f872,_0x345bd3){return _0x16f872!==_0x345bd3;},'AmYbM':_0x4cd6e6(0x1a4),'aDOhA':_0x4cd6e6(0x1c6)},_0x52d916=await _0x4641de[_0x4cd6e6(0x18f)](getToken);if(!_0x52d916){if(_0x4641de['xefKd'](_0x4641de[_0x4cd6e6(0x158)],_0x4641de[_0x4cd6e6(0x158)]))throw new Error(_0x4641de[_0x4cd6e6(0x16a)]);else{const _0xc9e50d=_0xaff6ef[_0x4cd6e6(0x152)](_0x4a6f79,arguments);return _0x4ce326=null,_0xc9e50d;}}const _0x2a93fb=_0x4641de[_0x4cd6e6(0x1a3)](getApiBaseUrl),_0x5d3204=await _0x4641de[_0x4cd6e6(0x195)](fetch,_0x2a93fb+_0x4cd6e6(0x1bb),{'method':_0x4641de['NFwMI'],'headers':{'Authorization':_0x4cd6e6(0x186)+_0x52d916,'Content-Type':_0x4641de[_0x4cd6e6(0x17d)]},'body':JSON[_0x4cd6e6(0x142)]({'environmentName':_0x9922f0?.[_0x4cd6e6(0x16f)],'settings':_0x9922f0?.['settings'],'task':_0x9922f0?.[_0x4cd6e6(0x1bf)],'url':_0x9922f0?.[_0x4cd6e6(0x1a2)],'featureId':_0x9922f0?.[_0x4cd6e6(0x13d)],'checklistItemId':_0x9922f0?.[_0x4cd6e6(0x15a)]})});if(!_0x5d3204['ok']){if(_0x4641de[_0x4cd6e6(0x140)](_0x4641de[_0x4cd6e6(0x16d)],_0x4641de['aDOhA'])){const _0x27afa5=await _0x5d3204['text']();throw new Error('Failed\x20to\x20create\x20browser\x20session:\x20'+_0x27afa5);}else return _0x4641de['mAgSO'](_0x2db71b,_0x53f3fe,_0x4f40fd,_0x4641de[_0x4cd6e6(0x178)]);}return _0x5d3204[_0x4cd6e6(0x170)]();}export async function updateBrowserSession(_0x1a6a32,_0x1c3b2a){const _0x4d1323=_0x1ff3,_0x3d22a2={'QAfSO':function(_0x309770){return _0x309770();},'LtpCD':_0x4d1323(0x15b),'pVxoj':function(_0x4acb37,_0xd59698,_0x41cfd4){return _0x4acb37(_0xd59698,_0x41cfd4);},'XXaWN':_0x4d1323(0x192)};return _0x3d22a2[_0x4d1323(0x189)](withRetry,async()=>{const _0x3f0552=_0x4d1323,_0x316bd0=await _0x3d22a2[_0x3f0552(0x143)](getToken);if(!_0x316bd0)throw new Error(_0x3d22a2[_0x3f0552(0x1bd)]);const _0x591724=_0x3d22a2[_0x3f0552(0x143)](getApiBaseUrl),_0x7a58a4=await _0x3d22a2['pVxoj'](fetch,_0x591724+_0x3f0552(0x164)+_0x1a6a32,{'method':_0x3f0552(0x1af),'headers':{'Authorization':'Bearer\x20'+_0x316bd0,'Content-Type':_0x3f0552(0x15c)},'body':JSON[_0x3f0552(0x142)](_0x1c3b2a)});if(!_0x7a58a4['ok']){const _0xbdb8e=await _0x7a58a4[_0x3f0552(0x16e)]();throw new Error(_0x3f0552(0x14a)+_0xbdb8e);}return _0x7a58a4[_0x3f0552(0x170)]();},{'label':_0x3d22a2['XXaWN']});}export async function getBrowserSession(_0x2165b5){const _0x571fd2=_0x1ff3,_0xab215e={'UtTeh':_0x571fd2(0x15b),'uFTJZ':function(_0x51ee0a){return _0x51ee0a();},'nYsqR':function(_0x116c76,_0x4374ab,_0x584bf5){return _0x116c76(_0x4374ab,_0x584bf5);}},_0x307056=await getToken();if(!_0x307056)throw new Error(_0xab215e['UtTeh']);const _0x22e61b=_0xab215e[_0x571fd2(0x183)](getApiBaseUrl),_0x1cceb5=await _0xab215e[_0x571fd2(0x1c8)](fetch,_0x22e61b+_0x571fd2(0x164)+_0x2165b5,{'method':_0x571fd2(0x19c),'headers':{'Authorization':'Bearer\x20'+_0x307056}});if(!_0x1cceb5['ok']){const _0x4aa662=await _0x1cceb5[_0x571fd2(0x16e)]();throw new Error(_0x571fd2(0x1c7)+_0x4aa662);}return _0x1cceb5['json']();}export async function getUploadUrls(_0x540c00,_0x1330b0,_0x2447cc,_0x3b8379){const _0x4af1b3=_0x1ff3,_0x2d6ea7={'BrrHx':function(_0x31065f,_0x55f10b,_0x2d4548,_0xe5f015){return _0x31065f(_0x55f10b,_0x2d4548,_0xe5f015);},'KVrSG':'video/webm','SEGwU':function(_0x58c0f9){return _0x58c0f9();},'wdqPs':function(_0x30ecf5,_0xe44f72){return _0x30ecf5!==_0xe44f72;},'AWZzx':'OqODU','CUuHN':_0x4af1b3(0x171),'FHWDj':_0x4af1b3(0x15b),'RoqPu':function(_0x1b63f1,_0x2bd53b,_0x538b9e){return _0x1b63f1(_0x2bd53b,_0x538b9e);},'hlDsR':_0x4af1b3(0x1b2),'zBTIT':function(_0x42b58f,_0xc7ac4){return _0x42b58f!==_0xc7ac4;},'trmxu':function(_0xd1240,_0x4fa65b){return _0xd1240!==_0x4fa65b;},'BaVsK':function(_0x5c326b,_0x5517e3){return _0x5c326b!==_0x5517e3;},'FrNzu':_0x4af1b3(0x14c),'KFEpY':_0x4af1b3(0x1a0)},_0x293a77=await _0x2d6ea7[_0x4af1b3(0x17b)](getToken);if(!_0x293a77){if(_0x2d6ea7[_0x4af1b3(0x18b)](_0x2d6ea7[_0x4af1b3(0x141)],_0x2d6ea7[_0x4af1b3(0x13f)]))throw new Error(_0x2d6ea7[_0x4af1b3(0x14e)]);else return _0x2d6ea7['BrrHx'](_0x346843,_0x81ee77,_0x2f07e7,_0x2d6ea7['KVrSG']);}const _0x3bf448=_0x2d6ea7[_0x4af1b3(0x17b)](getApiBaseUrl),_0x181fe9=await _0x2d6ea7[_0x4af1b3(0x163)](fetch,_0x3bf448+_0x4af1b3(0x164)+_0x540c00+_0x4af1b3(0x19b),{'method':_0x2d6ea7[_0x4af1b3(0x1aa)],'headers':{'Authorization':_0x4af1b3(0x186)+_0x293a77,'Content-Type':'application/json'},'body':JSON[_0x4af1b3(0x142)]({'filename':_0x1330b0,'filetype':_0x2447cc,..._0x2d6ea7[_0x4af1b3(0x138)](_0x3b8379?.[_0x4af1b3(0x1a9)],undefined)&&{'size':_0x3b8379['size']},..._0x2d6ea7[_0x4af1b3(0x17a)](_0x3b8379?.[_0x4af1b3(0x1ac)],undefined)&&{'checksum':_0x3b8379['checksum']},..._0x2d6ea7[_0x4af1b3(0x18a)](_0x3b8379?.['metadata'],undefined)&&{'metadata':_0x3b8379[_0x4af1b3(0x1ba)]}})});if(!_0x181fe9['ok']){if(_0x2d6ea7[_0x4af1b3(0x138)](_0x2d6ea7[_0x4af1b3(0x151)],_0x2d6ea7[_0x4af1b3(0x173)])){const _0x33ee10=await _0x181fe9[_0x4af1b3(0x16e)]();throw new Error(_0x4af1b3(0x147)+_0x33ee10);}else return _0x2d6ea7['BrrHx'](_0x5697be,_0x2f0803,_0x34c1ad,'application/zip');}return _0x181fe9[_0x4af1b3(0x170)]();}export async function uploadFile(_0x3f2ee3,_0x40ffa3,_0x12985f){const _0x1822f2=_0x1ff3,_0x3e19e4={'pTQmu':function(_0xfb7677,_0x4a72a1,_0x439c67){return _0xfb7677(_0x4a72a1,_0x439c67);},'kOnfc':'PUT'},_0x4de097=await _0x3e19e4[_0x1822f2(0x169)](fetch,_0x3f2ee3,{'method':_0x3e19e4[_0x1822f2(0x1c1)],'headers':{'Content-Type':_0x12985f,'Content-Length':_0x40ffa3[_0x1822f2(0x1a6)]['toString']()},'body':_0x40ffa3});if(!_0x4de097['ok']){const _0x30c6c4=await _0x4de097[_0x1822f2(0x16e)]();throw new Error(_0x1822f2(0x15d)+_0x30c6c4);}}export async function uploadTrace(_0x5c4ba9,_0x4cb685){const _0x2d5ce4=_0x1ff3,_0x1b745d={'qGqYW':function(_0x134c00,_0x425269,_0x4e150b,_0x4f5267){return _0x134c00(_0x425269,_0x4e150b,_0x4f5267);},'nKJWg':_0x2d5ce4(0x187)};return _0x1b745d['qGqYW'](uploadFile,_0x5c4ba9,_0x4cb685,_0x1b745d[_0x2d5ce4(0x1b1)]);}export async function uploadConversation(_0x27bd9c,_0x4d3555){const _0x1764e0=_0x1ff3,_0x4555c6={'DluRI':function(_0x47d37a,_0xe44bf3,_0x1a73c9,_0x552783){return _0x47d37a(_0xe44bf3,_0x1a73c9,_0x552783);},'PphXr':_0x1764e0(0x194)};return _0x4555c6[_0x1764e0(0x180)](uploadFile,_0x27bd9c,_0x4d3555,_0x4555c6[_0x1764e0(0x1a8)]);}export async function uploadScreenshot(_0x3d0492,_0x12f501){const _0x41fd17=_0x1ff3,_0x54836d={'vMHfU':function(_0x260cf6,_0x5c4525,_0x4a33b2,_0x22886c){return _0x260cf6(_0x5c4525,_0x4a33b2,_0x22886c);},'rFmqd':_0x41fd17(0x160)};return _0x54836d[_0x41fd17(0x156)](uploadFile,_0x3d0492,_0x12f501,_0x54836d[_0x41fd17(0x1c3)]);}export async function uploadVideo(_0x550975,_0x432e39){const _0xaae368=_0x1ff3,_0x5422e2={'LHMXd':function(_0x396140,_0x899ecb,_0x577661,_0x39d543){return _0x396140(_0x899ecb,_0x577661,_0x39d543);},'qUIBC':_0xaae368(0x181)};return _0x5422e2[_0xaae368(0x196)](uploadFile,_0x550975,_0x432e39,_0x5422e2['qUIBC']);}export function buildTraceViewerUrl(_0x4c5c9d){const _0x3525bc=_0x1ff3,_0x29097e={'osrBu':function(_0x2f1b74,_0x30e80e){return _0x2f1b74(_0x30e80e);}},_0x38f92f=_0x29097e[_0x3525bc(0x1c0)](encodeURIComponent,_0x4c5c9d);return _0x3525bc(0x198)+_0x38f92f;}export async function getProxySessionToken(){const _0x5c5743=_0x1ff3,_0x48296f={'gCgtm':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','jfcUo':function(_0x4295c1,_0x171bf1){return _0x4295c1===_0x171bf1;},'IEwof':_0x5c5743(0x14f),'OBlxa':_0x5c5743(0x155),'JSDSM':function(_0x1b0821,_0x446172,_0x4b9d09){return _0x1b0821(_0x446172,_0x4b9d09);},'BPRQx':'POST'},_0x395e69=await getToken();if(!_0x395e69){if(_0x48296f['jfcUo'](_0x48296f[_0x5c5743(0x1c2)],_0x48296f[_0x5c5743(0x19f)]))throw new _0x581c47(_0x48296f['gCgtm']);else throw new Error(_0x48296f[_0x5c5743(0x1a1)]);}const _0x1f42ff=getApiBaseUrl(),_0x46c87c=await _0x48296f[_0x5c5743(0x1a5)](fetch,_0x1f42ff+_0x5c5743(0x1c5),{'method':_0x48296f['BPRQx'],'headers':{'Authorization':'Bearer\x20'+_0x395e69}});if(!_0x46c87c['ok']){const _0xec56e5=await _0x46c87c['text']();throw new Error(_0x5c5743(0x19d)+_0xec56e5);}const _0x4ea065=await _0x46c87c[_0x5c5743(0x170)]();return _0x4ea065['sessionToken'];}export function computeChecksum(_0x4b2386){const _0x9c5c06=_0x1ff3,_0x21ee48={'lvDer':function(_0x4cfee5,_0x3edecf){return _0x4cfee5(_0x3edecf);},'Anazz':'md5'};return _0x21ee48[_0x9c5c06(0x1b3)](createHash,_0x21ee48[_0x9c5c06(0x197)])[_0x9c5c06(0x177)](_0x4b2386)[_0x9c5c06(0x190)]('base64');}export async function createVerificationStep(_0x2e2a84,_0x4e7364){const _0x5de95d=_0x1ff3,_0xf337dc={'BIOyq':function(_0x5aad64){return _0x5aad64();},'gvrrR':_0x5de95d(0x1b2),'dIToA':_0x5de95d(0x15c)},_0x4e5fe2=await _0xf337dc[_0x5de95d(0x146)](getToken);if(!_0x4e5fe2)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x412231=_0xf337dc[_0x5de95d(0x146)](getApiBaseUrl),_0x166d13=await fetch(_0x412231+_0x5de95d(0x164)+_0x2e2a84+'/steps',{'method':_0xf337dc[_0x5de95d(0x18c)],'headers':{'Authorization':_0x5de95d(0x186)+_0x4e5fe2,'Content-Type':_0xf337dc[_0x5de95d(0x154)]},'body':JSON[_0x5de95d(0x142)](_0x4e7364)});if(!_0x166d13['ok']){const _0x44277e=await _0x166d13['text']();throw new Error(_0x5de95d(0x144)+_0x44277e);}return _0x166d13[_0x5de95d(0x170)]();}export async function createStepAsset(_0xf7aea4,_0x57c34c,_0x50b0f1){const _0x461bde=_0x1ff3,_0x2de76e={'HfbXx':function(_0x36d248){return _0x36d248();},'cdbet':'POST','btemN':_0x461bde(0x15c)},_0x27d23c=await _0x2de76e[_0x461bde(0x1be)](getToken);if(!_0x27d23c)throw new Error(_0x461bde(0x15b));const _0x2d0b3e=_0x2de76e[_0x461bde(0x1be)](getApiBaseUrl),_0x37291e=await fetch(_0x2d0b3e+_0x461bde(0x164)+_0xf7aea4+_0x461bde(0x148)+_0x57c34c+_0x461bde(0x1b0),{'method':_0x2de76e[_0x461bde(0x157)],'headers':{'Authorization':_0x461bde(0x186)+_0x27d23c,'Content-Type':_0x2de76e[_0x461bde(0x153)]},'body':JSON[_0x461bde(0x142)](_0x50b0f1)});if(!_0x37291e['ok']){const _0x20fd44=await _0x37291e[_0x461bde(0x16e)]();throw new Error(_0x461bde(0x159)+_0x20fd44);}return _0x37291e[_0x461bde(0x170)]();}export async function updateVerificationStep(_0x71b84a,_0x8b5600,_0x3e2282){const _0x3da457=_0x1ff3,_0xc930f8={'Creqs':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','QuJgP':function(_0x131ebc,_0x1d9012){return _0x131ebc(_0x1d9012);},'qVqAi':function(_0x5d5fc3){return _0x5d5fc3();},'zmXdU':function(_0x3a5338,_0x4092dc){return _0x3a5338===_0x4092dc;},'jgvAd':_0x3da457(0x16c),'PzBBZ':_0x3da457(0x1bc),'qttgu':function(_0x493518){return _0x493518();},'MEfmv':function(_0x4784a0,_0xd82a3f,_0x8f3ab3){return _0x4784a0(_0xd82a3f,_0x8f3ab3);},'YyybB':_0x3da457(0x1af),'FLZPT':_0x3da457(0x15c),'Haftk':function(_0x2c94db,_0x5eba91){return _0x2c94db===_0x5eba91;},'QDXvJ':_0x3da457(0x17e)},_0x1e6d29=await _0xc930f8[_0x3da457(0x162)](getToken);if(!_0x1e6d29){if(_0xc930f8[_0x3da457(0x1ad)](_0xc930f8[_0x3da457(0x19a)],_0xc930f8[_0x3da457(0x184)]))throw new _0x3d3ba6(_0xc930f8['Creqs']);else throw new Error(_0xc930f8['Creqs']);}const _0xca7527=_0xc930f8[_0x3da457(0x1a7)](getApiBaseUrl),_0x2a91c7=await _0xc930f8[_0x3da457(0x1b6)](fetch,_0xca7527+_0x3da457(0x164)+_0x71b84a+_0x3da457(0x148)+_0x8b5600,{'method':_0xc930f8[_0x3da457(0x199)],'headers':{'Authorization':_0x3da457(0x186)+_0x1e6d29,'Content-Type':_0xc930f8[_0x3da457(0x19e)]},'body':JSON[_0x3da457(0x142)](_0x3e2282)});if(!_0x2a91c7['ok']){if(_0xc930f8[_0x3da457(0x1b4)](_0xc930f8[_0x3da457(0x15e)],_0xc930f8[_0x3da457(0x15e)])){const _0x22117c=await _0x2a91c7['text']();throw new Error(_0x3da457(0x16b)+_0x22117c);}else{const _0x30ab70=_0xc930f8['QuJgP'](_0x497048,_0x3de654);return _0x3da457(0x198)+_0x30ab70;}}}function _0x1ff3(_0x5a45df,_0x138ba6){_0x5a45df=_0x5a45df-0x138;const _0x26d5ef=_0x2698();let _0x404eae=_0x26d5ef[_0x5a45df];if(_0x1ff3['bCbixG']===undefined){var _0x26a83f=function(_0x142f99){const _0x1ce654='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x52a5fa='',_0x4aa929='',_0x2e6405=_0x52a5fa+_0x26a83f;for(let _0x594055=0x0,_0x307c01,_0x50176e,_0x3fc9de=0x0;_0x50176e=_0x142f99['charAt'](_0x3fc9de++);~_0x50176e&&(_0x307c01=_0x594055%0x4?_0x307c01*0x40+_0x50176e:_0x50176e,_0x594055++%0x4)?_0x52a5fa+=_0x2e6405['charCodeAt'](_0x3fc9de+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x307c01>>(-0x2*_0x594055&0x6)):_0x594055:0x0){_0x50176e=_0x1ce654['indexOf'](_0x50176e);}for(let _0x3e782d=0x0,_0x381b1c=_0x52a5fa['length'];_0x3e782d<_0x381b1c;_0x3e782d++){_0x4aa929+='%'+('00'+_0x52a5fa['charCodeAt'](_0x3e782d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4aa929);};_0x1ff3['KTiakY']=_0x26a83f,_0x1ff3['HMeuww']={},_0x1ff3['bCbixG']=!![];}const _0x2698c2=_0x26d5ef[0x0],_0x1ff3b8=_0x5a45df+_0x2698c2,_0x340d51=_0x1ff3['HMeuww'][_0x1ff3b8];if(!_0x340d51){const _0x26bfbf=function(_0x4de276){this['wyhoxK']=_0x4de276,this['YYdtqd']=[0x1,0x0,0x0],this['jyhBUX']=function(){return'newState';},this['HOZiWe']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['BXznLZ']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x26bfbf['prototype']['yUzHrl']=function(){const _0x4661f3=new RegExp(this['HOZiWe']+this['BXznLZ']),_0x2979a9=_0x4661f3['test'](this['jyhBUX']['toString']())?--this['YYdtqd'][0x1]:--this['YYdtqd'][0x0];return this['CzmsRR'](_0x2979a9);},_0x26bfbf['prototype']['CzmsRR']=function(_0x129c44){if(!Boolean(~_0x129c44))return _0x129c44;return this['swWzGi'](this['wyhoxK']);},_0x26bfbf['prototype']['swWzGi']=function(_0x47463f){for(let _0x419e65=0x0,_0x219e60=this['YYdtqd']['length'];_0x419e65<_0x219e60;_0x419e65++){this['YYdtqd']['push'](Math['round'](Math['random']())),_0x219e60=this['YYdtqd']['length'];}return _0x47463f(this['YYdtqd'][0x0]);},new _0x26bfbf(_0x1ff3)['yUzHrl'](),_0x404eae=_0x1ff3['KTiakY'](_0x404eae),_0x1ff3['HMeuww'][_0x1ff3b8]=_0x404eae;}else _0x404eae=_0x340d51;return _0x404eae;}export async function getBrowserSessionSteps(_0x5e5d56){const _0x39f23d=_0x1ff3,_0x183457={'XAyxK':function(_0x2d8825){return _0x2d8825();},'UDmQR':function(_0x2e81f3){return _0x2e81f3();},'roFDa':function(_0x3c9494,_0x50d3cf,_0x5d6f56){return _0x3c9494(_0x50d3cf,_0x5d6f56);},'WGYKM':function(_0x16dc01,_0x27daa0){return _0x16dc01===_0x27daa0;}},_0x4fd0cf=await _0x183457['XAyxK'](getToken);if(!_0x4fd0cf)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x4c6cd5=_0x183457[_0x39f23d(0x167)](getApiBaseUrl),_0x3d9119=await _0x183457['roFDa'](fetch,_0x4c6cd5+_0x39f23d(0x164)+_0x5e5d56+_0x39f23d(0x17c),{'method':_0x39f23d(0x19c),'headers':{'Authorization':_0x39f23d(0x186)+_0x4fd0cf}});if(!_0x3d9119['ok']){if(_0x183457[_0x39f23d(0x191)](_0x39f23d(0x139),_0x39f23d(0x139))){const _0x5eae1a=await _0x3d9119[_0x39f23d(0x16e)]();throw new Error(_0x39f23d(0x1b8)+_0x5eae1a);}else throw new _0x155976(_0x39f23d(0x15b));}return _0x3d9119[_0x39f23d(0x170)]();}
1
+ (function(_0x33151e,_0x1213d1){const _0x4abe91=_0x3b46,_0x26a087=_0x33151e();while(!![]){try{const _0x2e83d7=parseInt(_0x4abe91(0x23c))/0x1+-parseInt(_0x4abe91(0x1e3))/0x2+parseInt(_0x4abe91(0x22b))/0x3+parseInt(_0x4abe91(0x21e))/0x4*(parseInt(_0x4abe91(0x1fc))/0x5)+-parseInt(_0x4abe91(0x1fd))/0x6*(parseInt(_0x4abe91(0x22e))/0x7)+-parseInt(_0x4abe91(0x1ec))/0x8+parseInt(_0x4abe91(0x218))/0x9;if(_0x2e83d7===_0x1213d1)break;else _0x26a087['push'](_0x26a087['shift']());}catch(_0x23dab1){_0x26a087['push'](_0x26a087['shift']());}}}(_0xd974,0xf012a));const _0x1a3339=(function(){let _0x2dbaca=!![];return function(_0x1e7591,_0x25ac5d){const _0x287b0e=_0x2dbaca?function(){const _0x533d86=_0x3b46;if(_0x25ac5d){const _0x3d4a9b=_0x25ac5d[_0x533d86(0x1da)](_0x1e7591,arguments);return _0x25ac5d=null,_0x3d4a9b;}}:function(){};return _0x2dbaca=![],_0x287b0e;};}()),_0x54f5c2=_0x1a3339(this,function(){const _0x4ea908=_0x3b46,_0x5caa96={'ZOKOO':_0x4ea908(0x1f0)};return _0x54f5c2['toString']()['search'](_0x4ea908(0x1f0))[_0x4ea908(0x23a)]()[_0x4ea908(0x211)](_0x54f5c2)[_0x4ea908(0x1f7)](_0x5caa96['ZOKOO']);});_0x54f5c2();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0x3b46(_0x308f49,_0xb73823){_0x308f49=_0x308f49-0x1d3;const _0x2202d9=_0xd974();let _0x54f5c2=_0x2202d9[_0x308f49];if(_0x3b46['tBvZwU']===undefined){var _0x1a3339=function(_0x25c204){const _0x2f3aca='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x31086e='',_0x280970='',_0x54bf24=_0x31086e+_0x1a3339;for(let _0x1b4033=0x0,_0x22e62f,_0x24b772,_0x4cf994=0x0;_0x24b772=_0x25c204['charAt'](_0x4cf994++);~_0x24b772&&(_0x22e62f=_0x1b4033%0x4?_0x22e62f*0x40+_0x24b772:_0x24b772,_0x1b4033++%0x4)?_0x31086e+=_0x54bf24['charCodeAt'](_0x4cf994+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x22e62f>>(-0x2*_0x1b4033&0x6)):_0x1b4033:0x0){_0x24b772=_0x2f3aca['indexOf'](_0x24b772);}for(let _0x103675=0x0,_0x3e9499=_0x31086e['length'];_0x103675<_0x3e9499;_0x103675++){_0x280970+='%'+('00'+_0x31086e['charCodeAt'](_0x103675)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x280970);};_0x3b46['QhpAGP']=_0x1a3339,_0x3b46['sJWURC']={},_0x3b46['tBvZwU']=!![];}const _0xd9744e=_0x2202d9[0x0],_0x3b46cb=_0x308f49+_0xd9744e,_0x1f3def=_0x3b46['sJWURC'][_0x3b46cb];if(!_0x1f3def){const _0xa4c91a=function(_0x575440){this['krQbXw']=_0x575440,this['cKcSAh']=[0x1,0x0,0x0],this['AmeoHM']=function(){return'newState';},this['ppNtPI']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['lcLztG']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0xa4c91a['prototype']['npNEEe']=function(){const _0x313d7e=new RegExp(this['ppNtPI']+this['lcLztG']),_0x493b9a=_0x313d7e['test'](this['AmeoHM']['toString']())?--this['cKcSAh'][0x1]:--this['cKcSAh'][0x0];return this['rccZRN'](_0x493b9a);},_0xa4c91a['prototype']['rccZRN']=function(_0x372f4c){if(!Boolean(~_0x372f4c))return _0x372f4c;return this['DiEWxc'](this['krQbXw']);},_0xa4c91a['prototype']['DiEWxc']=function(_0x32fd11){for(let _0x48dd61=0x0,_0x11a704=this['cKcSAh']['length'];_0x48dd61<_0x11a704;_0x48dd61++){this['cKcSAh']['push'](Math['round'](Math['random']())),_0x11a704=this['cKcSAh']['length'];}return _0x32fd11(this['cKcSAh'][0x0]);},new _0xa4c91a(_0x3b46)['npNEEe'](),_0x54f5c2=_0x3b46['QhpAGP'](_0x54f5c2),_0x3b46['sJWURC'][_0x3b46cb]=_0x54f5c2;}else _0x54f5c2=_0x1f3def;return _0x54f5c2;}import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x386f40){const _0x63957f=_0x3b46,_0xb3b649={'BtNxe':function(_0x1e9552,_0x4edefb,_0x4129c6,_0x212d7f){return _0x1e9552(_0x4edefb,_0x4129c6,_0x212d7f);},'ekexq':_0x63957f(0x23b),'khYFK':'IpHOV','qovAC':_0x63957f(0x203),'zdlTY':_0x63957f(0x212),'meFQA':function(_0xe5d2d8){return _0xe5d2d8();},'BsgRu':function(_0x5603c4,_0x483f10,_0x6d3dc5){return _0x5603c4(_0x483f10,_0x6d3dc5);},'cqdPs':_0x63957f(0x23f),'aIBUH':_0x63957f(0x1d6),'QBReW':function(_0x480867,_0x38eb65){return _0x480867!==_0x38eb65;},'fdKHf':_0x63957f(0x20b),'tIdXo':_0x63957f(0x1d3)},_0x275f74=await getToken();if(!_0x275f74){if(_0xb3b649[_0x63957f(0x21b)]===_0xb3b649[_0x63957f(0x1e7)]){const _0x534fb4=_0xa4c91a?function(){if(_0x48dd61){const _0x39315a=_0x67f542['apply'](_0x33be77,arguments);return _0x3f4079=null,_0x39315a;}}:function(){};return _0x32fd11=![],_0x534fb4;}else throw new Error(_0xb3b649['zdlTY']);}const _0x1605a7=_0xb3b649[_0x63957f(0x1d9)](getApiBaseUrl),_0x2d7e50=await _0xb3b649[_0x63957f(0x231)](fetch,_0x1605a7+_0x63957f(0x220),{'method':_0xb3b649[_0x63957f(0x20c)],'headers':{'Authorization':_0x63957f(0x236)+_0x275f74,'Content-Type':_0xb3b649[_0x63957f(0x21c)]},'body':JSON[_0x63957f(0x1fa)]({'environmentName':_0x386f40?.['environmentName'],'settings':_0x386f40?.[_0x63957f(0x245)],'task':_0x386f40?.[_0x63957f(0x235)],'url':_0x386f40?.['url'],'featureId':_0x386f40?.[_0x63957f(0x1f9)],'checklistItemId':_0x386f40?.['checklistItemId']})});if(!_0x2d7e50['ok']){if(_0xb3b649[_0x63957f(0x1ed)](_0xb3b649['fdKHf'],_0xb3b649['tIdXo'])){const _0x541d05=await _0x2d7e50[_0x63957f(0x225)]();throw new Error(_0x63957f(0x200)+_0x541d05);}else return _0xb3b649[_0x63957f(0x22d)](_0x248061,_0x5188b6,_0x3cd266,_0xb3b649[_0x63957f(0x1d4)]);}return _0x2d7e50[_0x63957f(0x214)]();}export async function updateBrowserSession(_0x272476,_0x382579){const _0x1be6b3=_0x3b46,_0x2d552e={'jGOLZ':function(_0xa7974c,_0x3f0c52){return _0xa7974c(_0x3f0c52);},'pnqrp':function(_0x5b39fb){return _0x5b39fb();},'SZolS':function(_0xc23c66,_0x4aaabe,_0x4a150a){return _0xc23c66(_0x4aaabe,_0x4a150a);},'qckYj':_0x1be6b3(0x210),'UzWWp':_0x1be6b3(0x1d6),'hLafV':function(_0x3c67a9,_0x2f9053,_0x190865){return _0x3c67a9(_0x2f9053,_0x190865);}};return _0x2d552e[_0x1be6b3(0x237)](withRetry,async()=>{const _0x3f9a57=_0x1be6b3;if('tUbKy'!==_0x3f9a57(0x1f3)){const _0x1be6fe=await _0x2d552e['pnqrp'](getToken);if(!_0x1be6fe)throw new Error(_0x3f9a57(0x212));const _0x2df501=_0x2d552e[_0x3f9a57(0x23e)](getApiBaseUrl),_0x14d097=await _0x2d552e[_0x3f9a57(0x1f6)](fetch,_0x2df501+_0x3f9a57(0x222)+_0x272476,{'method':_0x2d552e[_0x3f9a57(0x22f)],'headers':{'Authorization':_0x3f9a57(0x236)+_0x1be6fe,'Content-Type':_0x2d552e[_0x3f9a57(0x208)]},'body':JSON[_0x3f9a57(0x1fa)](_0x382579)});if(!_0x14d097['ok']){const _0x3799b2=await _0x14d097[_0x3f9a57(0x225)]();throw new Error(_0x3f9a57(0x1f5)+_0x3799b2);}return _0x14d097[_0x3f9a57(0x214)]();}else{const _0x4b0b9f=_0x2d552e[_0x3f9a57(0x241)](_0x32aa61,_0x25a9d4);return _0x3f9a57(0x20d)+_0x4b0b9f;}},{'label':'updateBrowserSession'});}export async function getBrowserSession(_0x47880d){const _0x389574=_0x3b46,_0x4afbb4={'iABPr':function(_0xb12cd2){return _0xb12cd2();},'dUZfH':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','TjvWu':function(_0x101573,_0x6868df,_0x2cab1f){return _0x101573(_0x6868df,_0x2cab1f);},'BxDzr':'GET'},_0x2d3d5a=await _0x4afbb4[_0x389574(0x1f8)](getToken);if(!_0x2d3d5a)throw new Error(_0x4afbb4[_0x389574(0x207)]);const _0x5de6b5=getApiBaseUrl(),_0x3bfc7c=await _0x4afbb4[_0x389574(0x244)](fetch,_0x5de6b5+_0x389574(0x222)+_0x47880d,{'method':_0x4afbb4['BxDzr'],'headers':{'Authorization':_0x389574(0x236)+_0x2d3d5a}});if(!_0x3bfc7c['ok']){const _0x3b680f=await _0x3bfc7c[_0x389574(0x225)]();throw new Error(_0x389574(0x21f)+_0x3b680f);}return _0x3bfc7c['json']();}export async function getUploadUrls(_0x4df437,_0x1bb937,_0x2b1d52,_0x4eab62){const _0x398466=_0x3b46,_0x32f3c6={'Iozbc':_0x398466(0x1f0),'ffOwp':function(_0x367bb3){return _0x367bb3();},'VmTmm':_0x398466(0x212),'lYISx':function(_0x2a709c,_0x4e3a3f,_0x3cb396){return _0x2a709c(_0x4e3a3f,_0x3cb396);},'fLbzk':function(_0x1050e6,_0x3351f9){return _0x1050e6!==_0x3351f9;},'lkxwS':function(_0x213232,_0x4d7b2e){return _0x213232!==_0x4d7b2e;},'EkZtv':function(_0x1aadbe,_0x22ef42){return _0x1aadbe!==_0x22ef42;},'XgVlJ':_0x398466(0x24b)},_0x4c3035=await _0x32f3c6[_0x398466(0x248)](getToken);if(!_0x4c3035)throw new Error(_0x32f3c6[_0x398466(0x1f1)]);const _0x1f1017=_0x32f3c6[_0x398466(0x248)](getApiBaseUrl),_0x1967ca=await _0x32f3c6[_0x398466(0x213)](fetch,_0x1f1017+_0x398466(0x222)+_0x4df437+_0x398466(0x216),{'method':'POST','headers':{'Authorization':_0x398466(0x236)+_0x4c3035,'Content-Type':'application/json'},'body':JSON[_0x398466(0x1fa)]({'filename':_0x1bb937,'filetype':_0x2b1d52,..._0x32f3c6[_0x398466(0x223)](_0x4eab62?.[_0x398466(0x1de)],undefined)&&{'size':_0x4eab62[_0x398466(0x1de)]},..._0x32f3c6[_0x398466(0x1ee)](_0x4eab62?.['checksum'],undefined)&&{'checksum':_0x4eab62[_0x398466(0x1d7)]},..._0x32f3c6[_0x398466(0x1ff)](_0x4eab62?.[_0x398466(0x227)],undefined)&&{'metadata':_0x4eab62[_0x398466(0x227)]}})});if(!_0x1967ca['ok']){if(_0x32f3c6['EkZtv'](_0x32f3c6[_0x398466(0x1e5)],_0x398466(0x24b)))return _0x36a58a['toString']()[_0x398466(0x1f7)](FnEIJf[_0x398466(0x22a)])[_0x398466(0x23a)]()[_0x398466(0x211)](_0x26b450)['search'](FnEIJf[_0x398466(0x22a)]);else{const _0x20ac36=await _0x1967ca['text']();throw new Error(_0x398466(0x21a)+_0x20ac36);}}return _0x1967ca[_0x398466(0x214)]();}export async function uploadFile(_0x57d6b0,_0x110583,_0x28a2b5){const _0x23c272=_0x3b46,_0xf90ef2={'bjWDg':function(_0xb4c305,_0x22880f,_0x35af44){return _0xb4c305(_0x22880f,_0x35af44);},'GQlsn':_0x23c272(0x20e)},_0x52c1de=await _0xf90ef2[_0x23c272(0x229)](fetch,_0x57d6b0,{'method':_0xf90ef2['GQlsn'],'headers':{'Content-Type':_0x28a2b5,'Content-Length':_0x110583[_0x23c272(0x219)]['toString']()},'body':_0x110583});if(!_0x52c1de['ok']){const _0x4ed9db=await _0x52c1de[_0x23c272(0x225)]();throw new Error(_0x23c272(0x228)+_0x4ed9db);}}function _0xd974(){const _0x144f4c=['mJmYnJy2nhfwwKT3sG','C2vZC2LVBLrVA2vU','wgDwBeO','zhnKBgi','Cw92qum','v3Pru0S','wejsBxC','s1bftwG','sgzhsw0','mtq2otK2mtzpzfryzwq','uujszvC','BgT4D1m','yNrRugO','kcGOlISPkYKRksSK','vM1uBw0','y0LuC3e','CMrIzha','Aw1Hz2uVCg5N','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','u1PVBfm','C2vHCMnO','Aufcuhi','zMvHDhvYzuLK','C3rYAw5NAwz5','Bw1WAge','nZqZndG3mezpDfvfuq','nJz2yuTsuxi','CMvYAMq','rwTADhy','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','l3n0zxbZlW','s2nfChK','D2DvwMm','Ce1VzKS','sxnjt1i','AuTTuvq','zfvAzKG','vxPxv3a','u3zrs0q','BKrhCM8','uevZyLa','y3fKuhm','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','ufvu','l3n0zxbZ','uefuq0G','y29UC3rYDwn0B3i','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','BfLju3G','ANnVBG','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','l3vWBg9Hzc11CMXZ','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','mtiWmtm4ntDRy012wvu','BgvUz3rO','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','A2HzrKS','yuLcvuG','tNjJDu0','nev5ExnmyW','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','BMzoEfu','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','zKXIEMS','zMvju2K','Dgv4Da','CMvhCu0','Bwv0ywrHDge','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','yMPxrgC','sw96yMm','mZq3mZi1ouriv0TXra','sNLmqKq','qNroEgu','nZu4mdKZAg1WquPz','CwnRwwO','CgH2Awy','qNnNuNu','EgvPuhG','yxbWBgLJyxrPB24VANnVBMW','zNDMwfG','DgfZAW','qMvHCMvYia','AeXHzLy','yMfZzty0','y1PhB1q','Dg9tDhjPBMC','DMLKzw8VD2vIBq','mte5ntGXmwPuq0X6Ba','DLfUDey','Cg5XCNa','ue9tva','Bwq1','AKDptfO','l2fZC2v0CW','r0vu','vgP2v3u','C2v0DgLUz3m','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','yxbWBgLJyxrPB24VEMLW','zMzpD3a','uhLnvuC','ue5JEwO','D1vRDLa','zg1Jq1a','zwTLEhe','rNLTExq','yxbWBgLJyxrPB24VANnVBG','y2HLy2TZDw0','y2XmqNa','Bwvguue','yxbWBhK','yuLUEe0','AM5QEMq','vgrcve8','C2L6zq','DxbKyxrL','EKXxqu8','y1rnqNK','D01KC3q'];_0xd974=function(){return _0x144f4c;};return _0xd974();}export async function uploadTrace(_0x2bc17a,_0x40c747){const _0x56ae7a=_0x3b46,_0x227d55={'rerjd':function(_0x2bb002,_0x4e3956,_0x50aafe,_0x3e7ae9){return _0x2bb002(_0x4e3956,_0x50aafe,_0x3e7ae9);},'rILtY':_0x56ae7a(0x247)};return _0x227d55[_0x56ae7a(0x1fe)](uploadFile,_0x2bc17a,_0x40c747,_0x227d55['rILtY']);}export async function uploadConversation(_0x198558,_0x3d9ea7){const _0x52e547=_0x3b46,_0x1444c4={'egqkH':function(_0xe51c16,_0x48d3df,_0x3e6420,_0x5efe84){return _0xe51c16(_0x48d3df,_0x3e6420,_0x5efe84);},'btkPj':_0x52e547(0x233)};return _0x1444c4['egqkH'](uploadFile,_0x198558,_0x3d9ea7,_0x1444c4[_0x52e547(0x1ef)]);}export async function uploadScreenshot(_0x47defd,_0x2a62c8){const _0x290742=_0x3b46,_0x268ed3={'cITsq':function(_0x2c0266,_0x4271a5,_0x11f0bd,_0x5a37f5){return _0x2c0266(_0x4271a5,_0x11f0bd,_0x5a37f5);},'feISi':_0x290742(0x1f4)};return _0x268ed3[_0x290742(0x1f2)](uploadFile,_0x47defd,_0x2a62c8,_0x268ed3[_0x290742(0x224)]);}export async function uploadVideo(_0x2dca51,_0x1658b0){const _0x5385c9=_0x3b46,_0x464449={'KcEpy':function(_0x2d9329,_0x28fd68,_0x5be98e,_0x454d9b){return _0x2d9329(_0x28fd68,_0x5be98e,_0x454d9b);},'iKmQT':_0x5385c9(0x23b)};return _0x464449[_0x5385c9(0x202)](uploadFile,_0x2dca51,_0x1658b0,_0x464449[_0x5385c9(0x206)]);}export function buildTraceViewerUrl(_0x558187){const _0x36cfca=_0x3b46,_0x4014ad={'reGqM':function(_0x1691e2,_0x1070cf){return _0x1691e2(_0x1070cf);}},_0x56efdb=_0x4014ad[_0x36cfca(0x226)](encodeURIComponent,_0x558187);return _0x36cfca(0x20d)+_0x56efdb;}export async function getProxySessionToken(){const _0x832dfc=_0x3b46,_0x2e56d7={'TdBTO':function(_0x1fe6cc){return _0x1fe6cc();},'XBRmw':function(_0x18a4f2,_0x209f7d,_0x2f818e){return _0x18a4f2(_0x209f7d,_0x2f818e);},'HfGIm':_0x832dfc(0x23f)},_0x2d7b97=await getToken();if(!_0x2d7b97)throw new Error(_0x832dfc(0x212));const _0x1dbe3b=_0x2e56d7[_0x832dfc(0x1dd)](getApiBaseUrl),_0x47aee9=await _0x2e56d7[_0x832dfc(0x1e9)](fetch,_0x1dbe3b+'/api/v1/mcp/proxy-session',{'method':_0x2e56d7[_0x832dfc(0x1eb)],'headers':{'Authorization':'Bearer\x20'+_0x2d7b97}});if(!_0x47aee9['ok']){const _0x3fab0b=await _0x47aee9[_0x832dfc(0x225)]();throw new Error(_0x832dfc(0x217)+_0x3fab0b);}const _0x2cbe27=await _0x47aee9[_0x832dfc(0x214)]();return _0x2cbe27[_0x832dfc(0x1e4)];}export function computeChecksum(_0x1e1ae8){const _0x11f987=_0x3b46,_0x2e3105={'zLWAO':function(_0x3f4da6,_0x54674a){return _0x3f4da6(_0x54674a);}};return _0x2e3105[_0x11f987(0x1e0)](createHash,_0x11f987(0x240))[_0x11f987(0x1df)](_0x1e1ae8)['digest'](_0x11f987(0x238));}export async function createVerificationStep(_0x55c787,_0x3de28f){const _0x5390d3=_0x3b46,_0x34cf3b={'PNcyj':function(_0x17f38a,_0x13e47c,_0x3ecf44){return _0x17f38a(_0x13e47c,_0x3ecf44);},'JyLBD':_0x5390d3(0x1d6)},_0x37a688=await getToken();if(!_0x37a688)throw new Error(_0x5390d3(0x212));const _0x289327=getApiBaseUrl(),_0x3cc763=await _0x34cf3b[_0x5390d3(0x24a)](fetch,_0x289327+_0x5390d3(0x222)+_0x55c787+_0x5390d3(0x20f),{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x37a688,'Content-Type':_0x34cf3b[_0x5390d3(0x22c)]},'body':JSON['stringify'](_0x3de28f)});if(!_0x3cc763['ok']){const _0x13e1c9=await _0x3cc763[_0x5390d3(0x225)]();throw new Error(_0x5390d3(0x246)+_0x13e1c9);}return _0x3cc763[_0x5390d3(0x214)]();}export async function createStepAsset(_0x1b3226,_0x4c3092,_0x1f7361){const _0x20d025=_0x3b46,_0x3a8dd5={'nfNxU':function(_0x3a1a34){return _0x3a1a34();},'pMofK':function(_0x38c0d5,_0x36988a){return _0x38c0d5!==_0x36988a;},'phvif':'cTPPh','IsIOR':_0x20d025(0x249),'xeiPx':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','NrcuM':function(_0x135854,_0x137e27,_0x544e53){return _0x135854(_0x137e27,_0x544e53);},'fwfXX':_0x20d025(0x23f),'cTMBy':_0x20d025(0x1d6)},_0xf60283=await _0x3a8dd5[_0x20d025(0x221)](getToken);if(!_0xf60283){if(_0x3a8dd5[_0x20d025(0x204)](_0x3a8dd5[_0x20d025(0x230)],_0x3a8dd5[_0x20d025(0x205)]))throw new Error(_0x3a8dd5[_0x20d025(0x232)]);else throw new _0x20089c(_0x20d025(0x212));}const _0x19fd44=_0x3a8dd5[_0x20d025(0x221)](getApiBaseUrl),_0x85e40f=await _0x3a8dd5[_0x20d025(0x21d)](fetch,_0x19fd44+'/api/v1/mcp/browser-sessions/'+_0x1b3226+_0x20d025(0x201)+_0x4c3092+_0x20d025(0x242),{'method':_0x3a8dd5[_0x20d025(0x234)],'headers':{'Authorization':_0x20d025(0x236)+_0xf60283,'Content-Type':_0x3a8dd5[_0x20d025(0x1e1)]},'body':JSON[_0x20d025(0x1fa)](_0x1f7361)});if(!_0x85e40f['ok']){const _0x2e2ae9=await _0x85e40f[_0x20d025(0x225)]();throw new Error('Failed\x20to\x20create\x20step\x20asset:\x20'+_0x2e2ae9);}return _0x85e40f[_0x20d025(0x214)]();}export async function updateVerificationStep(_0x11e9fc,_0x3cd67d,_0x26326c){const _0x21f1c8=_0x3b46,_0x4be9bd={'Fymyt':_0x21f1c8(0x212),'PQuEp':function(_0x7c1c3){return _0x7c1c3();},'mmpha':function(_0xb2c604,_0x5423f7){return _0xb2c604===_0x5423f7;},'jnjzd':_0x21f1c8(0x1ea),'cZGoT':function(_0x15264a,_0x9513c9,_0x249763){return _0x15264a(_0x9513c9,_0x249763);},'dsdlb':_0x21f1c8(0x210),'wMdst':_0x21f1c8(0x1d6)},_0x5ca492=await _0x4be9bd['PQuEp'](getToken);if(!_0x5ca492){if(_0x4be9bd[_0x21f1c8(0x1fb)](_0x4be9bd['jnjzd'],_0x4be9bd[_0x21f1c8(0x1dc)]))throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');else throw new _0x13c667(_0x4be9bd[_0x21f1c8(0x1d5)]);}const _0x38fe92=_0x4be9bd['PQuEp'](getApiBaseUrl),_0x2f0759=await _0x4be9bd[_0x21f1c8(0x239)](fetch,_0x38fe92+'/api/v1/mcp/browser-sessions/'+_0x11e9fc+_0x21f1c8(0x201)+_0x3cd67d,{'method':_0x4be9bd[_0x21f1c8(0x1e6)],'headers':{'Authorization':_0x21f1c8(0x236)+_0x5ca492,'Content-Type':_0x4be9bd[_0x21f1c8(0x1e2)]},'body':JSON[_0x21f1c8(0x1fa)](_0x26326c)});if(!_0x2f0759['ok']){const _0x5b3e97=await _0x2f0759[_0x21f1c8(0x225)]();throw new Error('Failed\x20to\x20update\x20verification\x20step:\x20'+_0x5b3e97);}}export async function getBrowserSessionSteps(_0x1fb7cd){const _0x11c19c=_0x3b46,_0x52fa6e={'SvQKD':function(_0x536ebc,_0x144ba7,_0x3d9a3b,_0x36ee64){return _0x536ebc(_0x144ba7,_0x3d9a3b,_0x36ee64);},'clLBp':function(_0x2e0c8d,_0x520790){return _0x2e0c8d===_0x520790;},'nDGro':_0x11c19c(0x1e8),'aInxM':_0x11c19c(0x212),'vQntF':function(_0x2c3b89,_0x32aaef,_0x1e2075){return _0x2c3b89(_0x32aaef,_0x1e2075);}},_0x5bef5f=await getToken();if(!_0x5bef5f){if(_0x52fa6e[_0x11c19c(0x1d8)](_0x52fa6e[_0x11c19c(0x20a)],_0x52fa6e[_0x11c19c(0x20a)]))throw new Error(_0x52fa6e[_0x11c19c(0x1db)]);else return _0x52fa6e[_0x11c19c(0x209)](_0x4c7814,_0x2ad640,_0x1ce3dd,_0x11c19c(0x1f4));}const _0x27073e=getApiBaseUrl(),_0x1f4796=await _0x52fa6e[_0x11c19c(0x23d)](fetch,_0x27073e+_0x11c19c(0x222)+_0x1fb7cd+_0x11c19c(0x20f),{'method':_0x11c19c(0x243),'headers':{'Authorization':_0x11c19c(0x236)+_0x5bef5f}});if(!_0x1f4796['ok']){const _0x2f6fa8=await _0x1f4796[_0x11c19c(0x225)]();throw new Error(_0x11c19c(0x215)+_0x2f6fa8);}return _0x1f4796[_0x11c19c(0x214)]();}
@@ -1 +1 @@
1
- function _0x5c96(_0x4747a8,_0x1753a0){_0x4747a8=_0x4747a8-0x9f;const _0x22a991=_0x22a9();let _0x5c9635=_0x22a991[_0x4747a8];return _0x5c9635;}function _0x22a9(){const _0x2f6e96=['3432243JCWRtg','70GPWDOL','pWgth','utf-8','stringify','tYnps','5322712zQjcna','user','CLAUDE_CONFIG_DIR','361215QzQtuh','QCnZD','PZHDg','1975GYtvTm','83056vhaHYc','kuNNk','.claude','parse','env','srlfn','root','skills','NDNhQ','1402QrUQzJ','IwVph','cwd','7922620RimmlR','217ATjJNb','Fjipu','4690878JvYKtX'];_0x22a9=function(){return _0x2f6e96;};return _0x22a9();}(function(_0x3b882b,_0x5e6fde){const _0x57b0f7=_0x5c96,_0x545c04=_0x3b882b();while(!![]){try{const _0x9861ac=parseInt(_0x57b0f7(0xae))/0x1*(parseInt(_0x57b0f7(0xb8))/0x2)+-parseInt(_0x57b0f7(0xa2))/0x3+parseInt(_0x57b0f7(0xa8))/0x4+-parseInt(_0x57b0f7(0xbb))/0x5+parseInt(_0x57b0f7(0xa1))/0x6+-parseInt(_0x57b0f7(0x9f))/0x7*(-parseInt(_0x57b0f7(0xaf))/0x8)+-parseInt(_0x57b0f7(0xab))/0x9*(parseInt(_0x57b0f7(0xa3))/0xa);if(_0x9861ac===_0x5e6fde)break;else _0x545c04['push'](_0x545c04['shift']());}catch(_0x5a71c9){_0x545c04['push'](_0x545c04['shift']());}}}(_0x22a9,0xc592a));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 _0x5663f1=_0x5c96,_0x5ae226={'kuNNk':function(_0x4fd53f,_0x7e8654,_0x23f747){return _0x4fd53f(_0x7e8654,_0x23f747);},'pWgth':_0x5663f1(0xb1)};return process[_0x5663f1(0xb3)][_0x5663f1(0xaa)]||_0x5ae226[_0x5663f1(0xb0)](join,homedir(),_0x5ae226[_0x5663f1(0xa4)]);}export function getUserSkillsDir(){const _0x138ec2=_0x5c96,_0x14f7fb={'HXikb':_0x138ec2(0xb6)};return join(getClaudeConfigDir(),_0x14f7fb['HXikb']);}export function getProjectRoot(){const _0x5a7b87=_0x5c96,_0x3e4452={'TjMQQ':function(_0x1d27ec,_0x35f7c0){return _0x1d27ec!==_0x35f7c0;},'RkfAu':function(_0x4a7e80,_0x5d18da){return _0x4a7e80(_0x5d18da);},'tYnps':function(_0x2c09c6,_0x241cef){return _0x2c09c6(_0x241cef);}};let _0x1fc2ed=process[_0x5a7b87(0xba)]();const _0x5343d2=parse(_0x1fc2ed)[_0x5a7b87(0xb5)];while(_0x3e4452['TjMQQ'](_0x1fc2ed,_0x5343d2)){if(existsSync(join(_0x1fc2ed,_0x5a7b87(0xb1))))return _0x1fc2ed;if(_0x3e4452['RkfAu'](existsSync,join(_0x1fc2ed,'.git')))return _0x1fc2ed;_0x1fc2ed=_0x3e4452[_0x5a7b87(0xa7)](dirname,_0x1fc2ed);}return process['cwd']();}export function getProjectSkillsDir(){const _0x5879c3=_0x5c96,_0x4241e0={'IwVph':function(_0x5d80de){return _0x5d80de();}};return join(_0x4241e0[_0x5879c3(0xb9)](getProjectRoot),_0x5879c3(0xb1),'skills');}export function getSkillsDir(_0x2c92fd){const _0x19c252=_0x5c96,_0x4b2f91={'Fjipu':_0x19c252(0xa9),'pzwVv':function(_0x327d99){return _0x327d99();}};return _0x2c92fd===_0x4b2f91[_0x19c252(0xa0)]?_0x4b2f91['pzwVv'](getUserSkillsDir):getProjectSkillsDir();}export function getSettingsPath(){return join(getClaudeConfigDir(),'settings.json');}export async function loadClaudeSettings(){const _0x741272=_0x5c96,_0x4345b6={'QCnZD':function(_0x5c8867,_0x12cd16,_0x33bc76){return _0x5c8867(_0x12cd16,_0x33bc76);},'PZHDg':'utf-8'},_0x50d5ca=getSettingsPath();if(!existsSync(_0x50d5ca))return{};try{const _0x261b65=await _0x4345b6[_0x741272(0xac)](readFile,_0x50d5ca,_0x4345b6[_0x741272(0xad)]);return JSON[_0x741272(0xb2)](_0x261b65);}catch{return{};}}export async function saveClaudeSettings(_0x182bfa){const _0x9074f6=_0x5c96,_0x59c3ca={'qClNu':function(_0x3a2fdb){return _0x3a2fdb();},'NDNhQ':function(_0x295a4c,_0x568a6d){return _0x295a4c(_0x568a6d);},'IWCPy':function(_0x179f94,_0x34000d,_0x15d9aa){return _0x179f94(_0x34000d,_0x15d9aa);},'srlfn':function(_0x4c9ede,_0x2efba7){return _0x4c9ede+_0x2efba7;},'attnD':_0x9074f6(0xa5)},_0x49d76c=_0x59c3ca['qClNu'](getSettingsPath),_0xcfb16b=getClaudeConfigDir();!_0x59c3ca[_0x9074f6(0xb7)](existsSync,_0xcfb16b)&&await _0x59c3ca['IWCPy'](mkdir,_0xcfb16b,{'recursive':!![]}),await writeFile(_0x49d76c,_0x59c3ca[_0x9074f6(0xb4)](JSON[_0x9074f6(0xa6)](_0x182bfa,null,0x2),'\x0a'),_0x59c3ca['attnD']);}
1
+ (function(_0x6580ca,_0x3c9a73){const _0x30a92a=_0x280e,_0x399948=_0x6580ca();while(!![]){try{const _0x1d57c5=parseInt(_0x30a92a(0x143))/0x1+parseInt(_0x30a92a(0x148))/0x2*(parseInt(_0x30a92a(0x145))/0x3)+-parseInt(_0x30a92a(0x150))/0x4+parseInt(_0x30a92a(0x14c))/0x5*(-parseInt(_0x30a92a(0x139))/0x6)+-parseInt(_0x30a92a(0x130))/0x7+parseInt(_0x30a92a(0x132))/0x8*(parseInt(_0x30a92a(0x14b))/0x9)+-parseInt(_0x30a92a(0x14a))/0xa*(parseInt(_0x30a92a(0x147))/0xb);if(_0x1d57c5===_0x3c9a73)break;else _0x399948['push'](_0x399948['shift']());}catch(_0x13e099){_0x399948['push'](_0x399948['shift']());}}}(_0x50ce,0xb36d6));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 _0x3163a3=_0x280e,_0x5d0a37={'FSMWq':function(_0x261988){return _0x261988();}};return process[_0x3163a3(0x131)][_0x3163a3(0x14f)]||join(_0x5d0a37['FSMWq'](homedir),'.claude');}export function getUserSkillsDir(){const _0x776c77=_0x280e,_0x3f3bcb={'hzimq':function(_0x4e352e){return _0x4e352e();}};return join(_0x3f3bcb['hzimq'](getClaudeConfigDir),_0x776c77(0x137));}function _0x50ce(){const _0x431ce0=['root','CLAUDE_CONFIG_DIR','4643612sIxVwG','1750140asvWEA','env','577648dCcggD','Unokj','gXkLh','tjuaJ','bmbEi','skills','parse','3004998Utowbz','.claude','settings.json','utf-8','BCCLO','KZzBd','stringify','vrDtw','mgwVk','.git','1231297PeBEAJ','eOBRc','3633261iLbEVO','XfMns','55EPNpDc','2UFCpQc','cwd','457860eLSxJL','54nnDFjQ','5DMtTrg','JvpPj'];_0x50ce=function(){return _0x431ce0;};return _0x50ce();}export function getProjectRoot(){const _0x2223ae=_0x280e,_0x35e676={'oHbNH':function(_0x3a3ef5,_0x34b6d6){return _0x3a3ef5(_0x34b6d6);},'vrDtw':_0x2223ae(0x13a),'ALmXI':function(_0x1eb0c3,_0xd10d56,_0x57809d){return _0x1eb0c3(_0xd10d56,_0x57809d);},'xiBGW':_0x2223ae(0x142)};let _0x1095ba=process[_0x2223ae(0x149)]();const _0x83667a=_0x35e676['oHbNH'](parse,_0x1095ba)[_0x2223ae(0x14e)];while(_0x1095ba!==_0x83667a){if(existsSync(join(_0x1095ba,_0x35e676[_0x2223ae(0x140)])))return _0x1095ba;if(existsSync(_0x35e676['ALmXI'](join,_0x1095ba,_0x35e676['xiBGW'])))return _0x1095ba;_0x1095ba=dirname(_0x1095ba);}return process['cwd']();}export function getProjectSkillsDir(){const _0x4956ad=_0x280e,_0x36e600={'nhIXk':function(_0x257176,_0x2ad8ab,_0x3bfe88,_0x3247b7){return _0x257176(_0x2ad8ab,_0x3bfe88,_0x3247b7);},'XfMns':'.claude','bmbEi':_0x4956ad(0x137)};return _0x36e600['nhIXk'](join,getProjectRoot(),_0x36e600[_0x4956ad(0x146)],_0x36e600[_0x4956ad(0x136)]);}export function getSkillsDir(_0x1e3c02){const _0x248d46=_0x280e,_0x27ecc3={'JvpPj':function(_0x15ea7a,_0x1d8f48){return _0x15ea7a===_0x1d8f48;},'MZViU':'user','YjASf':function(_0x450197){return _0x450197();}};return _0x27ecc3[_0x248d46(0x14d)](_0x1e3c02,_0x27ecc3['MZViU'])?_0x27ecc3['YjASf'](getUserSkillsDir):getProjectSkillsDir();}function _0x280e(_0x391ce8,_0x279127){_0x391ce8=_0x391ce8-0x130;const _0x50cec5=_0x50ce();let _0x280e7e=_0x50cec5[_0x391ce8];return _0x280e7e;}export function getSettingsPath(){const _0xa09341=_0x280e,_0x2e28fd={'mgwVk':function(_0x56dfff,_0x122202,_0x320385){return _0x56dfff(_0x122202,_0x320385);},'tjuaJ':function(_0x3e4a06){return _0x3e4a06();},'BCCLO':_0xa09341(0x13b)};return _0x2e28fd[_0xa09341(0x141)](join,_0x2e28fd[_0xa09341(0x135)](getClaudeConfigDir),_0x2e28fd[_0xa09341(0x13d)]);}export async function loadClaudeSettings(){const _0x5c819f=_0x280e,_0x1049c1={'IgjWO':function(_0x5ed375){return _0x5ed375();},'eOBRc':function(_0xc676ae,_0x45200a){return _0xc676ae(_0x45200a);},'Unokj':function(_0x50fe51,_0x5afa54,_0x18fff1){return _0x50fe51(_0x5afa54,_0x18fff1);},'KZzBd':_0x5c819f(0x13c)},_0x14b0fc=_0x1049c1['IgjWO'](getSettingsPath);if(!_0x1049c1[_0x5c819f(0x144)](existsSync,_0x14b0fc))return{};try{const _0x3387d7=await _0x1049c1[_0x5c819f(0x133)](readFile,_0x14b0fc,_0x1049c1[_0x5c819f(0x13e)]);return JSON[_0x5c819f(0x138)](_0x3387d7);}catch{return{};}}export async function saveClaudeSettings(_0x44aab7){const _0x40ca05=_0x280e,_0x1cc46d={'AGopV':function(_0x199fc0){return _0x199fc0();},'mYZms':function(_0x421f4a,_0x1aa4c9){return _0x421f4a(_0x1aa4c9);},'gXkLh':function(_0x4736cd,_0x341633,_0xde937e,_0x25a48c){return _0x4736cd(_0x341633,_0xde937e,_0x25a48c);}},_0x1a023e=_0x1cc46d['AGopV'](getSettingsPath),_0x396705=getClaudeConfigDir();!_0x1cc46d['mYZms'](existsSync,_0x396705)&&await mkdir(_0x396705,{'recursive':!![]}),await _0x1cc46d[_0x40ca05(0x134)](writeFile,_0x1a023e,JSON[_0x40ca05(0x13f)](_0x44aab7,null,0x2)+'\x0a','utf-8');}
@@ -1 +1 @@
1
- (function(_0xe6377d,_0x3e9784){const _0x3a710d=_0x4c00,_0x496405=_0xe6377d();while(!![]){try{const _0x44b9c3=-parseInt(_0x3a710d(0x17e))/0x1*(parseInt(_0x3a710d(0x167))/0x2)+-parseInt(_0x3a710d(0x164))/0x3*(parseInt(_0x3a710d(0x168))/0x4)+parseInt(_0x3a710d(0x165))/0x5+-parseInt(_0x3a710d(0x181))/0x6+parseInt(_0x3a710d(0x17b))/0x7+parseInt(_0x3a710d(0x178))/0x8*(-parseInt(_0x3a710d(0x170))/0x9)+parseInt(_0x3a710d(0x16b))/0xa;if(_0x44b9c3===_0x3e9784)break;else _0x496405['push'](_0x496405['shift']());}catch(_0x1f1f52){_0x496405['push'](_0x496405['shift']());}}}(_0x2524,0x5e457));function _0x2524(){const _0x541ad4=['[\x5cs\x5cS]*?(enabled|disabled)','2805138nhdcEJ','hLPWq','output','1917bIXQcX','error','IkuLN','4580886jgXVmC','3jKupKn','1633430mDrcjb','version','446qKHclt','1362256qSVQkd','success','inherit','15271320PiJHjP','enabled','stderr','stdout','includes','873yLwwxh','toLowerCase','list','[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','plugin','VEFde','match','ApXUD','27784KkKWFP','captureOutput'];_0x2524=function(){return _0x541ad4;};return _0x2524();}function _0x4c00(_0x383cd1,_0x27e0e3){_0x383cd1=_0x383cd1-0x164;const _0x2524fb=_0x2524();let _0x4c0038=_0x2524fb[_0x383cd1];return _0x4c0038;}import{spawn}from'child_process';export function runClaudeCommand(_0x278f7a,_0x1b9cce){const _0x46d976=_0x4c00,_0x53f29c={'IkuLN':function(_0x2ee51f,_0x528a6d){return _0x2ee51f===_0x528a6d;},'zSJzp':'claude','erKUz':'data','EwGEs':'close','hLPWq':_0x46d976(0x17f)};return new Promise(_0x1b166d=>{const _0x305b4c=_0x46d976,_0x4c7a5e=_0x1b9cce?.[_0x305b4c(0x179)]?'pipe':_0x305b4c(0x16a),_0x52b3e7=spawn(_0x53f29c['zSJzp'],_0x278f7a,{'stdio':_0x4c7a5e});let _0x4e06df='';_0x1b9cce?.[_0x305b4c(0x179)]&&_0x52b3e7[_0x305b4c(0x16e)]&&_0x52b3e7['stdout']['on'](_0x53f29c['erKUz'],_0x53e426=>{_0x4e06df+=_0x53e426['toString']();}),_0x1b9cce?.['captureOutput']&&_0x52b3e7[_0x305b4c(0x16d)]&&_0x52b3e7['stderr']['on']('data',_0x44f089=>{_0x4e06df+=_0x44f089['toString']();}),_0x52b3e7['on'](_0x53f29c['EwGEs'],_0x949b4e=>{const _0x10d51f=_0x305b4c;_0x53f29c[_0x10d51f(0x180)](_0x949b4e,0x0)?_0x1b166d({'success':!![],'output':_0x4e06df}):_0x1b166d({'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x949b4e,'output':_0x4e06df});}),_0x52b3e7['on'](_0x53f29c[_0x305b4c(0x17c)],_0x548bb8=>{_0x1b166d({'success':![],'error':_0x548bb8['message']});});});}export async function isMarketplaceAdded(_0xb8c8c5){const _0x2491e9=_0x4c00,_0x5b04e4={'qjgKP':function(_0x8af1a1,_0xadb37f,_0x315f88){return _0x8af1a1(_0xadb37f,_0x315f88);},'VEFde':'marketplace'},_0x5a3d02=await _0x5b04e4['qjgKP'](runClaudeCommand,['plugin',_0x5b04e4[_0x2491e9(0x175)],_0x2491e9(0x172)],{'captureOutput':!![]});if(!_0x5a3d02['success']||!_0x5a3d02[_0x2491e9(0x17d)])return![];return _0x5a3d02[_0x2491e9(0x17d)]['includes'](_0xb8c8c5);}export async function isPluginInstalled(_0x2ddc28){const _0x35e4f5=_0x4c00,_0x313b2b={'ApXUD':function(_0x21454e,_0x270942,_0x224d1c){return _0x21454e(_0x270942,_0x224d1c);},'xtOkT':'plugin'},_0x3f9b06=await _0x313b2b[_0x35e4f5(0x177)](runClaudeCommand,[_0x313b2b['xtOkT'],'list'],{'captureOutput':!![]});if(!_0x3f9b06[_0x35e4f5(0x169)]||!_0x3f9b06[_0x35e4f5(0x17d)])return![];return _0x3f9b06['output'][_0x35e4f5(0x16f)](_0x2ddc28);}export async function getPluginInfo(_0x33a83b){const _0x22ebb7=_0x4c00,_0x41c9d6={'yZShi':_0x22ebb7(0x16c)},_0x5a9144=await runClaudeCommand([_0x22ebb7(0x174),_0x22ebb7(0x172)],{'captureOutput':!![]});if(!_0x5a9144[_0x22ebb7(0x169)]||!_0x5a9144['output'])return null;if(!_0x5a9144[_0x22ebb7(0x17d)]['includes'](_0x33a83b))return null;const _0x2913e5={'name':_0x33a83b},_0x3c469f=_0x5a9144['output']['match'](new RegExp(_0x33a83b+'[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','i'));_0x3c469f&&(_0x2913e5['scope']=_0x3c469f[0x1][_0x22ebb7(0x171)]());const _0x39ebd6=_0x5a9144['output']['match'](new RegExp(_0x33a83b+_0x22ebb7(0x173),'i'));_0x39ebd6&&(_0x2913e5[_0x22ebb7(0x166)]=_0x39ebd6[0x1]);const _0x2aeb98=_0x5a9144['output'][_0x22ebb7(0x176)](new RegExp(_0x33a83b+_0x22ebb7(0x17a),'i'));return _0x2aeb98&&(_0x2913e5['enabled']=_0x2aeb98[0x1]['toLowerCase']()===_0x41c9d6['yZShi']),_0x2913e5;}
1
+ function _0x3bd2(){const _0x1e0bf9=['inherit','scope','Command\x20exited\x20with\x20code\x20','wEjTl','[\x5cs\x5cS]*?(enabled|disabled)','7bfGepZ','136320CRaPuo','list','NBeVu','TbBbS','message','plugin','33sOMMRi','error','toLowerCase','1007455XgzZqR','close','757696hMFGfu','683112tNFIGQ','2576910ZkReGK','stderr','success','39925zVDYWM','match','3800DrdCMO','output','rpXck','atuQo','captureOutput','vvRHv','9aFYNwN','[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','gZfWo','boUmV'];_0x3bd2=function(){return _0x1e0bf9;};return _0x3bd2();}(function(_0x3af28a,_0x5dfe25){const _0x343567=_0x1c18,_0x4c789b=_0x3af28a();while(!![]){try{const _0x58734d=-parseInt(_0x343567(0x194))/0x1+-parseInt(_0x343567(0x196))/0x2*(parseInt(_0x343567(0x18a))/0x3)+-parseInt(_0x343567(0x190))/0x4+parseInt(_0x343567(0x18d))/0x5+parseInt(_0x343567(0x184))/0x6*(-parseInt(_0x343567(0x183))/0x7)+-parseInt(_0x343567(0x18f))/0x8+-parseInt(_0x343567(0x17a))/0x9*(-parseInt(_0x343567(0x191))/0xa);if(_0x58734d===_0x5dfe25)break;else _0x4c789b['push'](_0x4c789b['shift']());}catch(_0x38f02f){_0x4c789b['push'](_0x4c789b['shift']());}}}(_0x3bd2,0x1ae43));function _0x1c18(_0x370968,_0xb36b39){_0x370968=_0x370968-0x179;const _0x3bd2ba=_0x3bd2();let _0x1c1885=_0x3bd2ba[_0x370968];return _0x1c1885;}import{spawn}from'child_process';export function runClaudeCommand(_0xe36c16,_0x2f956b){const _0x3a45f8=_0x1c18,_0x44189e={'DnRql':function(_0x19d6ac,_0x2443b3){return _0x19d6ac(_0x2443b3);},'boUmV':function(_0x2f143c,_0x24905c){return _0x2f143c(_0x24905c);},'TSIkv':_0x3a45f8(0x17e),'NvWSq':function(_0x3574e0,_0x419489,_0xd9e068,_0xc5bfb2){return _0x3574e0(_0x419489,_0xd9e068,_0xc5bfb2);},'TbBbS':'claude','vvRHv':'data','AKUhN':_0x3a45f8(0x18e),'BrOFh':_0x3a45f8(0x18b)};return new Promise(_0x34b600=>{const _0x39d2fa=_0x3a45f8,_0x3d9d43={'wEjTl':function(_0x9723da,_0x5370bb){return _0x9723da(_0x5370bb);}},_0x2349f8=_0x2f956b?.['captureOutput']?'pipe':_0x44189e['TSIkv'],_0x15153d=_0x44189e['NvWSq'](spawn,_0x44189e[_0x39d2fa(0x187)],_0xe36c16,{'stdio':_0x2349f8});let _0x49ad68='';_0x2f956b?.[_0x39d2fa(0x19a)]&&_0x15153d['stdout']&&_0x15153d['stdout']['on']('data',_0xe0e12d=>{_0x49ad68+=_0xe0e12d['toString']();}),_0x2f956b?.[_0x39d2fa(0x19a)]&&_0x15153d[_0x39d2fa(0x192)]&&_0x15153d[_0x39d2fa(0x192)]['on'](_0x44189e[_0x39d2fa(0x179)],_0xd2e231=>{_0x49ad68+=_0xd2e231['toString']();}),_0x15153d['on'](_0x44189e['AKUhN'],_0x478aaa=>{const _0x5973bb=_0x39d2fa;_0x478aaa===0x0?_0x44189e['DnRql'](_0x34b600,{'success':!![],'output':_0x49ad68}):_0x44189e[_0x5973bb(0x17d)](_0x34b600,{'success':![],'error':_0x5973bb(0x180)+_0x478aaa,'output':_0x49ad68});}),_0x15153d['on'](_0x44189e['BrOFh'],_0x4634b6=>{const _0xce46cc=_0x39d2fa;_0x3d9d43[_0xce46cc(0x181)](_0x34b600,{'success':![],'error':_0x4634b6[_0xce46cc(0x188)]});});});}export async function isMarketplaceAdded(_0x3ba800){const _0x1901db=_0x1c18,_0xe52c47={'NBeVu':'marketplace','rpXck':_0x1901db(0x185)},_0x35af1c=await runClaudeCommand(['plugin',_0xe52c47[_0x1901db(0x186)],_0xe52c47[_0x1901db(0x198)]],{'captureOutput':!![]});if(!_0x35af1c[_0x1901db(0x193)]||!_0x35af1c['output'])return![];return _0x35af1c['output']['includes'](_0x3ba800);}export async function isPluginInstalled(_0x560ec1){const _0x8461fe=_0x1c18,_0x3fa2db={'gZfWo':_0x8461fe(0x189)},_0x4bc217=await runClaudeCommand([_0x3fa2db[_0x8461fe(0x17c)],'list'],{'captureOutput':!![]});if(!_0x4bc217['success']||!_0x4bc217['output'])return![];return _0x4bc217[_0x8461fe(0x197)]['includes'](_0x560ec1);}export async function getPluginInfo(_0xb9fc6){const _0x12cdf1=_0x1c18,_0x13e219={'atuQo':function(_0x3d0932,_0x403af3){return _0x3d0932===_0x403af3;}},_0x2cdd86=await runClaudeCommand([_0x12cdf1(0x189),_0x12cdf1(0x185)],{'captureOutput':!![]});if(!_0x2cdd86[_0x12cdf1(0x193)]||!_0x2cdd86['output'])return null;if(!_0x2cdd86[_0x12cdf1(0x197)]['includes'](_0xb9fc6))return null;const _0x57f216={'name':_0xb9fc6},_0x43d779=_0x2cdd86[_0x12cdf1(0x197)][_0x12cdf1(0x195)](new RegExp(_0xb9fc6+_0x12cdf1(0x17b),'i'));_0x43d779&&(_0x57f216[_0x12cdf1(0x17f)]=_0x43d779[0x1][_0x12cdf1(0x18c)]());const _0x37f086=_0x2cdd86[_0x12cdf1(0x197)]['match'](new RegExp(_0xb9fc6+'[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','i'));_0x37f086&&(_0x57f216['version']=_0x37f086[0x1]);const _0x4e7cfe=_0x2cdd86['output'][_0x12cdf1(0x195)](new RegExp(_0xb9fc6+_0x12cdf1(0x182),'i'));return _0x4e7cfe&&(_0x57f216['enabled']=_0x13e219[_0x12cdf1(0x199)](_0x4e7cfe[0x1]['toLowerCase'](),'enabled')),_0x57f216;}
@@ -1 +1 @@
1
- const _0x3d28a4=_0x2956;(function(_0x3d9381,_0x12268d){const _0xd241ae=_0x2956,_0x1bbe98=_0x3d9381();while(!![]){try{const _0x150615=-parseInt(_0xd241ae(0x112))/0x1+parseInt(_0xd241ae(0x11a))/0x2*(-parseInt(_0xd241ae(0x11b))/0x3)+parseInt(_0xd241ae(0x11f))/0x4*(parseInt(_0xd241ae(0x115))/0x5)+parseInt(_0xd241ae(0x124))/0x6+parseInt(_0xd241ae(0x116))/0x7*(parseInt(_0xd241ae(0x121))/0x8)+parseInt(_0xd241ae(0x114))/0x9+parseInt(_0xd241ae(0x123))/0xa*(parseInt(_0xd241ae(0x120))/0xb);if(_0x150615===_0x12268d)break;else _0x1bbe98['push'](_0x1bbe98['shift']());}catch(_0x18d08a){_0x1bbe98['push'](_0x1bbe98['shift']());}}}(_0x1212,0x84f23));function _0x1212(){const _0x25f67a=['sha256','aes-256-gcm','20902dcdMRq','93fMTbBj','ihRtg','utf8','concat','1175092URSvQz','77qyciTr','5104vhLrYE','final','238160jzdYJo','2550732HHmNcN','EbzZp','sxjUq','subarray','353131HtkZEx','setAuthTag','1640646lNMhff','5MloUXf','1687vAGVCU','XXqyj'];_0x1212=function(){return _0x25f67a;};return _0x1212();}import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM=_0x3d28a4(0x119),SALT='ranger-auth-encryption',KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x55ad31){const _0x30395b=_0x3d28a4,_0x30a3f3={'ihRtg':_0x30395b(0x118)};return pbkdf2Sync(_0x55ad31,SALT,0x186a0,KEY_LENGTH,_0x30a3f3[_0x30395b(0x11c)]);}function _0x2956(_0x3e95da,_0x391730){_0x3e95da=_0x3e95da-0x10f;const _0x1212dc=_0x1212();let _0x29568e=_0x1212dc[_0x3e95da];return _0x29568e;}export function encrypt(_0x10d6c8,_0x13c733){const _0x13c23e=_0x3d28a4,_0x464a0e={'EbzZp':function(_0x56dde0,_0x5d91aa){return _0x56dde0(_0x5d91aa);},'sxjUq':function(_0x521946,_0x84ee06){return _0x521946(_0x84ee06);},'SSUNi':function(_0x5e84a8,_0x579b0f,_0x15cbe7,_0xd66782){return _0x5e84a8(_0x579b0f,_0x15cbe7,_0xd66782);},'ItsVg':_0x13c23e(0x11d)},_0x11e2b1=_0x464a0e[_0x13c23e(0x10f)](deriveKey,_0x13c733),_0x453c91=_0x464a0e[_0x13c23e(0x110)](randomBytes,IV_LENGTH),_0x44ace2=_0x464a0e['SSUNi'](createCipheriv,ALGORITHM,_0x11e2b1,_0x453c91),_0x4f5fb8=Buffer['concat']([_0x44ace2['update'](_0x10d6c8,_0x464a0e['ItsVg']),_0x44ace2[_0x13c23e(0x122)]()]),_0x13a56c=_0x44ace2['getAuthTag']();return Buffer[_0x13c23e(0x11e)]([_0x453c91,_0x13a56c,_0x4f5fb8]);}export function decrypt(_0x36fdb7,_0x3edf53){const _0x4252b3=_0x3d28a4,_0x3804af={'XXqyj':function(_0xdd862,_0x33932b,_0x52d255,_0x117fbb){return _0xdd862(_0x33932b,_0x52d255,_0x117fbb);}},_0x1c53c1=deriveKey(_0x3edf53),_0x20b76c=_0x36fdb7['subarray'](0x0,IV_LENGTH),_0x486e5b=_0x36fdb7[_0x4252b3(0x111)](IV_LENGTH,IV_LENGTH+TAG_LENGTH),_0x4741a5=_0x36fdb7['subarray'](IV_LENGTH+TAG_LENGTH),_0x536700=_0x3804af[_0x4252b3(0x117)](createDecipheriv,ALGORITHM,_0x1c53c1,_0x20b76c);return _0x536700[_0x4252b3(0x113)](_0x486e5b),_0x536700['update'](_0x4741a5)+_0x536700['final']('utf8');}
1
+ const _0x11a9fa=_0x7ebd;(function(_0x19e981,_0x205d73){const _0x3118ea=_0x7ebd,_0x1c24ef=_0x19e981();while(!![]){try{const _0x4cff0a=-parseInt(_0x3118ea(0xf1))/0x1*(-parseInt(_0x3118ea(0xee))/0x2)+parseInt(_0x3118ea(0xfc))/0x3+-parseInt(_0x3118ea(0xf0))/0x4+parseInt(_0x3118ea(0xef))/0x5*(parseInt(_0x3118ea(0xed))/0x6)+-parseInt(_0x3118ea(0x101))/0x7+parseInt(_0x3118ea(0xfe))/0x8+-parseInt(_0x3118ea(0xf2))/0x9;if(_0x4cff0a===_0x205d73)break;else _0x1c24ef['push'](_0x1c24ef['shift']());}catch(_0x4215bc){_0x1c24ef['push'](_0x1c24ef['shift']());}}}(_0x5a9f,0x553f6));import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM=_0x11a9fa(0xfa),SALT=_0x11a9fa(0xff),KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;function _0x7ebd(_0x2c6d50,_0x49f91f){_0x2c6d50=_0x2c6d50-0xec;const _0x5a9f40=_0x5a9f();let _0x7ebd5b=_0x5a9f40[_0x2c6d50];return _0x7ebd5b;}function _0x5a9f(){const _0x1af90e=['utf8','95262gsQPET','176RniCyZ','115zeFJWA','1859544mSvTvg','7461lzahyE','10043622uBhFom','zDAss','setAuthTag','hMEVr','mpskL','update','ucDHB','SVmzX','aes-256-gcm','final','2001510ZXgAlw','concat','3054120PTOcDU','ranger-auth-encryption','subarray','984592bnjJLw'];_0x5a9f=function(){return _0x1af90e;};return _0x5a9f();}export function deriveKey(_0x3e1292){const _0x4e9328=_0x11a9fa,_0x87e339={'mpskL':function(_0x52c71a,_0xe77782,_0x1c8ff8,_0x505211,_0x4ec989,_0x3c600a){return _0x52c71a(_0xe77782,_0x1c8ff8,_0x505211,_0x4ec989,_0x3c600a);},'LbmyM':'sha256'};return _0x87e339[_0x4e9328(0xf6)](pbkdf2Sync,_0x3e1292,SALT,0x186a0,KEY_LENGTH,_0x87e339['LbmyM']);}export function encrypt(_0x1d6564,_0x531b54){const _0x36cd73=_0x11a9fa,_0x3682e6={'SVmzX':function(_0x1d2c6d,_0x417cfb){return _0x1d2c6d(_0x417cfb);},'hMEVr':function(_0x5c93b2,_0x10b957,_0x2857a8,_0x1760fc){return _0x5c93b2(_0x10b957,_0x2857a8,_0x1760fc);},'zVnBg':_0x36cd73(0xec)},_0x4e1ea3=deriveKey(_0x531b54),_0x26d5b2=_0x3682e6[_0x36cd73(0xf9)](randomBytes,IV_LENGTH),_0x4724f0=_0x3682e6[_0x36cd73(0xf5)](createCipheriv,ALGORITHM,_0x4e1ea3,_0x26d5b2),_0x347711=Buffer['concat']([_0x4724f0[_0x36cd73(0xf7)](_0x1d6564,_0x3682e6['zVnBg']),_0x4724f0['final']()]),_0x30026b=_0x4724f0['getAuthTag']();return Buffer[_0x36cd73(0xfd)]([_0x26d5b2,_0x30026b,_0x347711]);}export function decrypt(_0x41eb94,_0x155643){const _0x45b1e9=_0x11a9fa,_0x13dc20={'sXDjb':function(_0x2277f6,_0x286059){return _0x2277f6+_0x286059;},'pXkbX':function(_0x2ee1d7,_0xf06b23){return _0x2ee1d7+_0xf06b23;},'ucDHB':function(_0x167de8,_0x172929){return _0x167de8+_0x172929;},'zDAss':_0x45b1e9(0xec)},_0x349911=deriveKey(_0x155643),_0x14670f=_0x41eb94[_0x45b1e9(0x100)](0x0,IV_LENGTH),_0x369de2=_0x41eb94['subarray'](IV_LENGTH,_0x13dc20['sXDjb'](IV_LENGTH,TAG_LENGTH)),_0x59786b=_0x41eb94['subarray'](_0x13dc20['pXkbX'](IV_LENGTH,TAG_LENGTH)),_0x55a943=createDecipheriv(ALGORITHM,_0x349911,_0x14670f);return _0x55a943[_0x45b1e9(0xf4)](_0x369de2),_0x13dc20[_0x45b1e9(0xf8)](_0x55a943['update'](_0x59786b),_0x55a943[_0x45b1e9(0xfb)](_0x13dc20[_0x45b1e9(0xf3)]));}
@@ -1 +1 @@
1
- function _0x4c7a(_0x190d92,_0x36e1a7){_0x190d92=_0x190d92-0x175;const _0x509d57=_0x509d();let _0x4c7a29=_0x509d57[_0x190d92];return _0x4c7a29;}const _0x1e40d3=_0x4c7a;(function(_0x17070b,_0xafcf99){const _0x784140=_0x4c7a,_0x54752f=_0x17070b();while(!![]){try{const _0x1f3483=-parseInt(_0x784140(0x17e))/0x1*(-parseInt(_0x784140(0x19b))/0x2)+-parseInt(_0x784140(0x19d))/0x3+parseInt(_0x784140(0x18e))/0x4+-parseInt(_0x784140(0x177))/0x5+parseInt(_0x784140(0x195))/0x6*(parseInt(_0x784140(0x190))/0x7)+parseInt(_0x784140(0x175))/0x8+-parseInt(_0x784140(0x19f))/0x9;if(_0x1f3483===_0xafcf99)break;else _0x54752f['push'](_0x54752f['shift']());}catch(_0x3c72cc){_0x54752f['push'](_0x54752f['shift']());}}}(_0x509d,0x912a9));import{getToken}from'./keychain.js';function _0x509d(){const _0x7f52f9=['91CjdMQq','Missing\x20required\x20argument','unknown','has_token','[REDACTED]','153798xMwwLx','errorMessage','PKUIs','has','--password','stdout','2izLIKy','errorType','1023516ttmxHZ','startsWith','7799751SyDEIX','2908984WOwYIy','BufIh','1820960cEWMcR','Not\x20enough\x20non-option\x20arguments','some','--key','--header','--apikey','/api/v1/mcp/desire-path-logs','1175131qQLDdY','--api-key','missing_required_argument','test','push','syntax_error','catch','unknown_argument','no_token','application/json','join','slice','wsFtU','includes','jMEVg','--pass','1178484XlymCr','--auth'];_0x509d=function(){return _0x7f52f9;};return _0x509d();}import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set(['--token','-t','--secret',_0x1e40d3(0x17f),_0x1e40d3(0x17c),_0x1e40d3(0x17a),_0x1e40d3(0x199),_0x1e40d3(0x18d),_0x1e40d3(0x18f),'--authorization',_0x1e40d3(0x17b),'--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 looksLikeToken(_0x26a1d4){const _0x1131ab=_0x1e40d3;return TOKEN_PATTERNS[_0x1131ab(0x179)](_0xa32256=>_0xa32256[_0x1131ab(0x181)](_0x26a1d4));}export function sanitizeArgs(_0x2c9faa){const _0x2df44d=_0x1e40d3,_0x59182b={'BufIh':_0x2df44d(0x194),'VoYMm':function(_0x13757e,_0x1df9d4){return _0x13757e(_0x1df9d4);}},_0x4c3d2b=[];let _0x2c903d=![];for(let _0x1f0f8d=0x0;_0x1f0f8d<_0x2c9faa['length'];_0x1f0f8d++){const _0x32faa1=_0x2c9faa[_0x1f0f8d];if(_0x2c903d){_0x4c3d2b['push'](_0x59182b[_0x2df44d(0x176)]),_0x2c903d=![];continue;}if(_0x32faa1[_0x2df44d(0x19e)]('--')||_0x32faa1['startsWith']('-')){const _0x452a63=_0x32faa1['indexOf']('=');if(_0x452a63!==-0x1){const _0x33b7f1=_0x32faa1['slice'](0x0,_0x452a63)['toLowerCase']();if(SENSITIVE_FLAGS[_0x2df44d(0x198)](_0x33b7f1)){_0x4c3d2b[_0x2df44d(0x182)](_0x32faa1[_0x2df44d(0x189)](0x0,_0x452a63)+'=[REDACTED]');continue;}}else{const _0x15e849=_0x32faa1['toLowerCase']();SENSITIVE_FLAGS['has'](_0x15e849)&&(_0x2c903d=!![]);}_0x4c3d2b['push'](_0x32faa1);}else _0x59182b['VoYMm'](looksLikeToken,_0x32faa1)?_0x4c3d2b[_0x2df44d(0x182)](_0x59182b[_0x2df44d(0x176)]):_0x4c3d2b['push'](_0x32faa1);}return _0x4c3d2b[_0x2df44d(0x188)]('\x20');}export async function logDesirePath(_0x399463){const _0x43c0d3=_0x1e40d3,_0x2e1740={'PgbEG':_0x43c0d3(0x186),'jMEVg':'Authorization','wsFtU':'POST'};try{const _0xc49841=await getToken()[_0x43c0d3(0x184)](()=>null),_0x224e1b=getApiBaseUrl(),_0x537824=getCurrentVersion(),_0x294531=_0xc49841?_0x43c0d3(0x193):_0x2e1740['PgbEG'],_0x5db3ac={..._0x399463['metadata'],'authStatus':_0x294531,'isTty':process[_0x43c0d3(0x19a)]['isTTY']??![]},_0x4a1bdc={'Content-Type':_0x43c0d3(0x187)};_0xc49841&&(_0x4a1bdc[_0x2e1740[_0x43c0d3(0x18c)]]='Bearer\x20'+_0xc49841);const _0x450137={'rawCommand':_0x399463['rawCommand'],'errorMessage':_0x399463[_0x43c0d3(0x196)],'errorType':_0x399463[_0x43c0d3(0x19c)],'featureId':_0x399463['featureId'],'sessionId':_0x399463['sessionId'],'metadata':_0x5db3ac,'cliVersion':_0x537824};process['env']['DEBUG']&&(console['error']('[desire-path]\x20Sending\x20log\x20to\x20'+_0x224e1b+_0x43c0d3(0x17d)),console['error']('[desire-path]\x20Payload:\x20'+JSON['stringify'](_0x450137,null,0x2))),await fetch(_0x224e1b+'/api/v1/mcp/desire-path-logs',{'method':_0x2e1740[_0x43c0d3(0x18a)],'headers':_0x4a1bdc,'body':JSON['stringify'](_0x450137)});}catch(_0x5d2e85){process['env']['DEBUG']&&console['error']('[desire-path]\x20Failed\x20to\x20send:\x20'+_0x5d2e85);}}export function getErrorType(_0x189806,_0x369e13){const _0x433eba=_0x1e40d3,_0x3696a7={'UUhTw':'runtime_error','uCSmt':_0x433eba(0x192),'PKUIs':_0x433eba(0x180),'WtXFE':'Invalid\x20values','ALyyj':'missing_option','ltPCy':_0x433eba(0x183)};if(_0x369e13)return _0x3696a7['UUhTw'];if(!_0x189806)return _0x3696a7['uCSmt'];if(_0x189806['includes']('Unknown\x20command'))return'unknown_command';if(_0x189806[_0x433eba(0x18b)]('Unknown\x20argument'))return _0x433eba(0x185);if(_0x189806['includes'](_0x433eba(0x178)))return _0x3696a7[_0x433eba(0x197)];if(_0x189806['includes'](_0x3696a7['WtXFE']))return'invalid_option_value';if(_0x189806['includes'](_0x433eba(0x191)))return _0x3696a7['ALyyj'];return _0x3696a7['ltPCy'];}
1
+ function _0x5816(_0x1e8f8e,_0x5770d9){_0x1e8f8e=_0x1e8f8e-0x64;const _0x13fc0d=_0x13fc();let _0x5816c1=_0x13fc0d[_0x1e8f8e];return _0x5816c1;}const _0x5ca023=_0x5816;(function(_0x202327,_0x2d725c){const _0x3c77af=_0x5816,_0x3baccf=_0x202327();while(!![]){try{const _0x104d8e=-parseInt(_0x3c77af(0x64))/0x1+parseInt(_0x3c77af(0x8f))/0x2+parseInt(_0x3c77af(0x77))/0x3*(-parseInt(_0x3c77af(0x67))/0x4)+-parseInt(_0x3c77af(0x8a))/0x5*(-parseInt(_0x3c77af(0x88))/0x6)+parseInt(_0x3c77af(0x8d))/0x7*(-parseInt(_0x3c77af(0x6b))/0x8)+parseInt(_0x3c77af(0x6c))/0x9*(-parseInt(_0x3c77af(0x93))/0xa)+-parseInt(_0x3c77af(0x90))/0xb*(-parseInt(_0x3c77af(0x9d))/0xc);if(_0x104d8e===_0x2d725c)break;else _0x3baccf['push'](_0x3baccf['shift']());}catch(_0x14490f){_0x3baccf['push'](_0x3baccf['shift']());}}}(_0x13fc,0xe3387));function _0x13fc(){const _0x223dac=['some','test','Not\x20enough\x20non-option\x20arguments','[REDACTED]','toLowerCase','MVSKa','push','5863470GGLSEP','Unknown\x20argument','5ywksXu','eVuCr','--header','7SMNIOy','gfsfo','2112228qjEfpg','11kRampK','[desire-path]\x20Sending\x20log\x20to\x20','missing_required_argument','156010uvoftv','slice','featureId','=[REDACTED]','--cookie','IeTHg','[desire-path]\x20Failed\x20to\x20send:\x20','rawCommand','runtime_error','DEBUG','18807372WCGvYN','1222017IaadnA','cgCak','has','3560260yZSJBh','length','7|3|5|1|0|4|2|6','/api/v1/mcp/desire-path-logs','1217896tadpjd','234FiRKBW','--api-key','TBKAg','--apikey','includes','dFXHc','errorMessage','FxxGq','qVhzQ','cdvwD','join','3LKoVww','split','Bearer\x20','invalid_option_value','env','iAqiF','stringify','catch','--password','dGOqy'];_0x13fc=function(){return _0x223dac;};return _0x13fc();}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set(['--token','-t','--secret',_0x5ca023(0x6d),_0x5ca023(0x6f),'--key',_0x5ca023(0x7f),'--pass','--auth','--authorization',_0x5ca023(0x8c),_0x5ca023(0x97),'--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(_0x262d8e){const _0xea6432=_0x5ca023;return TOKEN_PATTERNS[_0xea6432(0x81)](_0x2a42e7=>_0x2a42e7[_0xea6432(0x82)](_0x262d8e));}export function sanitizeArgs(_0x429b6f){const _0x9f0314=_0x5ca023,_0x590c17={'MVSKa':function(_0x28e7c2,_0xd62632){return _0x28e7c2<_0xd62632;},'qVhzQ':function(_0x24f591,_0x1ca3ff){return _0x24f591!==_0x1ca3ff;},'yvFPM':function(_0x94984f,_0x1c9d4c){return _0x94984f(_0x1c9d4c);},'gfsfo':'[REDACTED]'},_0x9054ed=[];let _0x219ffa=![];for(let _0x3a4a5b=0x0;_0x590c17[_0x9f0314(0x86)](_0x3a4a5b,_0x429b6f[_0x9f0314(0x68)]);_0x3a4a5b++){const _0x3e2d2f=_0x429b6f[_0x3a4a5b];if(_0x219ffa){_0x9054ed['push'](_0x9f0314(0x84)),_0x219ffa=![];continue;}if(_0x3e2d2f['startsWith']('--')||_0x3e2d2f['startsWith']('-')){const _0x4afeb9=_0x3e2d2f['indexOf']('=');if(_0x590c17[_0x9f0314(0x74)](_0x4afeb9,-0x1)){const _0x2d13f0=_0x3e2d2f['slice'](0x0,_0x4afeb9)[_0x9f0314(0x85)]();if(SENSITIVE_FLAGS['has'](_0x2d13f0)){_0x9054ed[_0x9f0314(0x87)](_0x3e2d2f[_0x9f0314(0x94)](0x0,_0x4afeb9)+_0x9f0314(0x96));continue;}}else{const _0x387d42=_0x3e2d2f[_0x9f0314(0x85)]();SENSITIVE_FLAGS[_0x9f0314(0x66)](_0x387d42)&&(_0x219ffa=!![]);}_0x9054ed[_0x9f0314(0x87)](_0x3e2d2f);}else _0x590c17['yvFPM'](looksLikeToken,_0x3e2d2f)?_0x9054ed[_0x9f0314(0x87)](_0x590c17[_0x9f0314(0x8e)]):_0x9054ed[_0x9f0314(0x87)](_0x3e2d2f);}return _0x9054ed[_0x9f0314(0x76)]('\x20');}export async function logDesirePath(_0x27b550){const _0x3e4c1a=_0x5ca023,_0x12d801={'eVuCr':function(_0x3068bc){return _0x3068bc();},'bqObp':'application/json'};try{const _0x10e0b1=await getToken()[_0x3e4c1a(0x7e)](()=>null),_0x16b9c3=getApiBaseUrl(),_0x171f42=_0x12d801[_0x3e4c1a(0x8b)](getCurrentVersion),_0x432307=_0x10e0b1?'has_token':'no_token',_0x1ba5ef={..._0x27b550['metadata'],'authStatus':_0x432307,'isTty':process['stdout']['isTTY']??![]},_0x2660e7={'Content-Type':_0x12d801['bqObp']};_0x10e0b1&&(_0x2660e7['Authorization']=_0x3e4c1a(0x79)+_0x10e0b1);const _0x4cf2eb={'rawCommand':_0x27b550[_0x3e4c1a(0x9a)],'errorMessage':_0x27b550[_0x3e4c1a(0x72)],'errorType':_0x27b550['errorType'],'featureId':_0x27b550[_0x3e4c1a(0x95)],'sessionId':_0x27b550['sessionId'],'metadata':_0x1ba5ef,'cliVersion':_0x171f42};process[_0x3e4c1a(0x7b)][_0x3e4c1a(0x9c)]&&(console['error'](_0x3e4c1a(0x91)+_0x16b9c3+_0x3e4c1a(0x6a)),console['error']('[desire-path]\x20Payload:\x20'+JSON['stringify'](_0x4cf2eb,null,0x2))),await fetch(_0x16b9c3+_0x3e4c1a(0x6a),{'method':'POST','headers':_0x2660e7,'body':JSON[_0x3e4c1a(0x7d)](_0x4cf2eb)});}catch(_0x7ed078){process[_0x3e4c1a(0x7b)]['DEBUG']&&console['error'](_0x3e4c1a(0x99)+_0x7ed078);}}export function getErrorType(_0x1a648d,_0x500ec2){const _0x3690bb=_0x5ca023,_0x1e47dc={'cdvwD':_0x3690bb(0x69),'cgCak':_0x3690bb(0x83),'IeTHg':_0x3690bb(0x92),'TBKAg':'unknown_argument','JMLxi':'Missing\x20required\x20argument','sPAyH':'missing_option','dFXHc':'unknown','FxxGq':'Unknown\x20command','dGOqy':'unknown_command','kPHTS':'syntax_error','iAqiF':_0x3690bb(0x9b)},_0x2a1e6a=_0x1e47dc[_0x3690bb(0x75)][_0x3690bb(0x78)]('|');let _0xc420cb=0x0;while(!![]){switch(_0x2a1e6a[_0xc420cb++]){case'0':if(_0x1a648d['includes'](_0x1e47dc[_0x3690bb(0x65)]))return _0x1e47dc[_0x3690bb(0x98)];continue;case'1':if(_0x1a648d['includes'](_0x3690bb(0x89)))return _0x1e47dc[_0x3690bb(0x6e)];continue;case'2':if(_0x1a648d[_0x3690bb(0x70)](_0x1e47dc['JMLxi']))return _0x1e47dc['sPAyH'];continue;case'3':if(!_0x1a648d)return _0x1e47dc[_0x3690bb(0x71)];continue;case'4':if(_0x1a648d['includes']('Invalid\x20values'))return _0x3690bb(0x7a);continue;case'5':if(_0x1a648d['includes'](_0x1e47dc[_0x3690bb(0x73)]))return _0x1e47dc[_0x3690bb(0x80)];continue;case'6':return _0x1e47dc['kPHTS'];case'7':if(_0x500ec2)return _0x1e47dc[_0x3690bb(0x7c)];continue;}break;}}
@@ -1 +1 @@
1
- (function(_0x200c21,_0x2051b3){const _0x3696cd=_0x1508,_0x403085=_0x200c21();while(!![]){try{const _0x109365=parseInt(_0x3696cd(0x188))/0x1+-parseInt(_0x3696cd(0x19e))/0x2*(parseInt(_0x3696cd(0x198))/0x3)+-parseInt(_0x3696cd(0x16f))/0x4+-parseInt(_0x3696cd(0x185))/0x5*(parseInt(_0x3696cd(0x173))/0x6)+parseInt(_0x3696cd(0x167))/0x7*(-parseInt(_0x3696cd(0x163))/0x8)+-parseInt(_0x3696cd(0x191))/0x9+-parseInt(_0x3696cd(0x179))/0xa*(-parseInt(_0x3696cd(0x16b))/0xb);if(_0x109365===_0x2051b3)break;else _0x403085['push'](_0x403085['shift']());}catch(_0x5a88ac){_0x403085['push'](_0x403085['shift']());}}}(_0x4e83,0xd0141));import{exec}from'child_process';import _0x5d69d1 from'inquirer';function _0x4e83(){const _0x528ce4=['status','Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','1554ZDHYFN','selected','toString','stdout','length','error_description','31266560ctWAjW','start','bqwug','split','tkWhk','error','/organization/my-memberships','json','access_token','application/json','plczG','refresh_token','28205WCkgfG','Failed\x20to\x20provision\x20API\x20key:\x20','log','145014WHVFxV','KNJNz','write','slow_down','/organization/self-serve-signup','Authentication\x20failed','HzdaS','darwin','verification_uri_complete','8952462LPMOqL','application/x-www-form-urlencoded','email','isTTY','tMjXg','platform','Setting\x20up\x20your\x20organization...','21kxHaSv','Failed\x20to\x20fetch\x20memberships:\x20','filter','memberships','upXdg','organizationId','357874CyIDiV','\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','name','QePZp','CELHt','stdin','aeBzF','stringify','tvcbs','cvjjC','Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','apiKeys','utf-8','\x27s\x20CLI\x20Key','xdg-open','360DILQrO','POST','list','text','54943DCrCdR','Waiting\x20for\x20authentication...','parse','token','22ANawrp','/api-keys','Invalid\x20JWT\x20format','mnvqz','5938144jJUwgJ','Provisioning\x20API\x20key...'];_0x4e83=function(){return _0x528ce4;};return _0x4e83();}import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL='https://api.workos.com/user_management/authorize/device',WORKOS_TOKEN_URL='https://api.workos.com/user_management/authenticate';export async function requestDeviceCode(_0x46bf6c){const _0x10feb9=_0x1508,_0x1cb887={'bbMjf':function(_0x234416,_0x571aff,_0x3fb4db){return _0x234416(_0x571aff,_0x3fb4db);},'sSzAd':'POST'},_0x396a2d=await _0x1cb887['bbMjf'](fetch,WORKOS_DEVICE_AUTH_URL,{'method':_0x1cb887['sSzAd'],'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':new URLSearchParams({'client_id':_0x46bf6c})});if(!_0x396a2d['ok']){const _0x5a6f14=await _0x396a2d[_0x10feb9(0x166)]();throw new Error('Failed\x20to\x20request\x20device\x20code:\x20'+_0x396a2d['status']+'\x20'+_0x5a6f14);}return _0x396a2d['json']();}export async function pollForTokens(_0x29ac9f,_0x665bcb,_0x355bb1,_0x469efc){const _0x4e024a=_0x1508,_0x9d8698={'bFdOh':function(_0x3608a1,_0x3ac0ad){return _0x3608a1*_0x3ac0ad;},'sNIvr':function(_0x10f31d,_0x30e574){return _0x10f31d<_0x30e574;},'drNWD':function(_0x111a38,_0x1e3606){return _0x111a38(_0x1e3606);},'Kshbq':'POST','ULUuR':_0x4e024a(0x192),'plczG':function(_0x55d001,_0x42ea2f){return _0x55d001===_0x42ea2f;},'tabZm':'authorization_pending','MyJQu':_0x4e024a(0x18d)},_0xf1db42=Date['now']()+_0x9d8698['bFdOh'](_0x469efc,0x3e8);let _0x13b29e=_0x355bb1*0x3e8;while(_0x9d8698['sNIvr'](Date['now'](),_0xf1db42)){await _0x9d8698['drNWD'](sleep,_0x13b29e);const _0x522c3e=await fetch(WORKOS_TOKEN_URL,{'method':_0x9d8698['Kshbq'],'headers':{'Content-Type':_0x9d8698['ULUuR']},'body':new URLSearchParams({'client_id':_0x29ac9f,'device_code':_0x665bcb,'grant_type':'urn:ietf:params:oauth:grant-type:device_code'})});if(_0x522c3e['ok'])return _0x522c3e['json']();const _0x4d968c=await _0x522c3e[_0x4e024a(0x180)]();if(_0x9d8698[_0x4e024a(0x183)](_0x4d968c[_0x4e024a(0x17e)],_0x9d8698['tabZm']))continue;if(_0x4d968c[_0x4e024a(0x17e)]===_0x4e024a(0x18b)){_0x13b29e+=0x3e8;continue;}throw new Error(_0x4d968c[_0x4e024a(0x178)]||_0x4d968c['error']||_0x9d8698['MyJQu']);}throw new Error('Device\x20authorization\x20timed\x20out');}async function fetchUserProfile(_0x233d87){const _0x140a16=_0x1508,_0x22e6fc={'KNJNz':function(_0x1eb431){return _0x1eb431();}},_0x2efe81=_0x22e6fc[_0x140a16(0x189)](getApiBaseUrl);try{const _0x629e9=await fetch(_0x2efe81+'/organization/me',{'method':'GET','headers':{'workos-token':_0x233d87}});if(_0x629e9['ok'])return _0x629e9['json']();}catch{}return null;}function buildKeyName(_0x571c9c,_0x527800){const _0x46dc62=_0x1508,_0x47b73b={'tMjXg':function(_0xc7b51,_0xb32488){return _0xc7b51===_0xb32488;},'DljOS':function(_0xf51953,_0x5ae81e){return _0xf51953+_0x5ae81e;}},_0x18f518=_0x527800[_0x46dc62(0x19a)](_0x19f05a=>_0x19f05a['name']===_0x571c9c||_0x19f05a[_0x46dc62(0x1a0)]['startsWith'](_0x571c9c+'\x20('));if(_0x47b73b[_0x46dc62(0x195)](_0x18f518[_0x46dc62(0x177)],0x0))return _0x571c9c;return _0x571c9c+'\x20('+_0x47b73b['DljOS'](_0x18f518[_0x46dc62(0x177)],0x1)+')';}export async function provisionApiKey(_0x4610bf){const _0xed35d8=_0x1508,_0x537cf1={'aeBzF':'application/json','Uqnia':function(_0xfbe7bb,_0x5a9976,_0x5f4866){return _0xfbe7bb(_0x5a9976,_0x5f4866);},'DAymy':'GET','tvcbs':_0xed35d8(0x164),'cvjjC':'mcp:write'},_0x47af24=getApiBaseUrl(),_0x55b44c={'Content-Type':_0x537cf1[_0xed35d8(0x15a)],'workos-token':_0x4610bf},_0x565333=await fetchUserProfile(_0x4610bf),_0x52adcf=_0x565333?.['firstName']||_0x565333?.[_0xed35d8(0x193)]?.[_0xed35d8(0x17c)]('@')[0x0],_0x491778=_0x52adcf?_0x52adcf+_0xed35d8(0x161):'CLI\x20Key';let _0x821c55=[];try{const _0x541489=await _0x537cf1['Uqnia'](fetch,_0x47af24+_0xed35d8(0x16c),{'method':_0x537cf1['DAymy'],'headers':_0x55b44c});if(_0x541489['ok']){const _0x1299ad=await _0x541489[_0xed35d8(0x180)]();_0x821c55=_0x1299ad[_0xed35d8(0x15f)];}}catch{}const _0x369b5f=buildKeyName(_0x491778,_0x821c55),_0x34a6ec=await _0x537cf1['Uqnia'](fetch,_0x47af24+_0xed35d8(0x16c),{'method':_0x537cf1[_0xed35d8(0x15c)],'headers':_0x55b44c,'body':JSON['stringify']({'name':_0x369b5f,'scope':_0x537cf1[_0xed35d8(0x15d)]})});if(!_0x34a6ec['ok']){const _0x2c356c=await _0x34a6ec['text']();throw new Error(_0xed35d8(0x186)+_0x34a6ec[_0xed35d8(0x171)]+'\x20'+_0x2c356c);}const _0x9e8a2b=await _0x34a6ec['json']();return _0x9e8a2b['apiKey'][_0xed35d8(0x16a)];}function _0x1508(_0x4de2ec,_0x2b67a3){_0x4de2ec=_0x4de2ec-0x158;const _0x4e8324=_0x4e83();let _0x15082a=_0x4e8324[_0x4de2ec];return _0x15082a;}export function openBrowser(_0x48b1ac){const _0x437897=_0x1508,_0x19aced={'nQWci':function(_0x3cd9ac,_0x30be7d){return _0x3cd9ac===_0x30be7d;},'HsVsg':'open','eFOcq':function(_0x23e314,_0x4906e5){return _0x23e314===_0x4906e5;},'unVtb':'win32'},_0x172ad5=process[_0x437897(0x196)],_0x5963b2=_0x19aced['nQWci'](_0x172ad5,_0x437897(0x18f))?_0x19aced['HsVsg']:_0x19aced['eFOcq'](_0x172ad5,_0x19aced['unVtb'])?_0x437897(0x17a):_0x437897(0x162);exec(_0x5963b2+'\x20'+JSON[_0x437897(0x15b)](_0x48b1ac));}function decodeJwtPayload(_0xe77bc7){const _0x45a113=_0x1508,_0x13eb55=_0xe77bc7[_0x45a113(0x17c)]('.');if(_0x13eb55['length']!==0x3)throw new Error(_0x45a113(0x16d));const _0x15fd8a=Buffer['from'](_0x13eb55[0x1],'base64url')[_0x45a113(0x175)](_0x45a113(0x160));return JSON[_0x45a113(0x169)](_0x15fd8a);}async function selfServeSignup(_0x382789){const _0x2786a6=_0x1508,_0x4b6e85={'uhmmZ':_0x2786a6(0x164)},_0x2a4a2a=getApiBaseUrl(),_0x9e1d9a=await fetch(_0x2a4a2a+_0x2786a6(0x18c),{'method':_0x4b6e85['uhmmZ'],'headers':{'Content-Type':_0x2786a6(0x182),'workos-token':_0x382789}});if(!_0x9e1d9a['ok']){const _0x5dcd23=await _0x9e1d9a['text']();throw new Error('Failed\x20to\x20create\x20organization:\x20'+_0x9e1d9a['status']+'\x20'+_0x5dcd23);}return _0x9e1d9a[_0x2786a6(0x180)]();}async function fetchMyMemberships(_0x5c3e02){const _0x417819=_0x1508,_0x380830=getApiBaseUrl(),_0x38de6e=await fetch(_0x380830+_0x417819(0x17f),{'method':'GET','headers':{'workos-token':_0x5c3e02}});if(!_0x38de6e['ok']){const _0x5174c2=await _0x38de6e['text']();throw new Error(_0x417819(0x199)+_0x38de6e[_0x417819(0x171)]+'\x20'+_0x5174c2);}const _0x239b63=await _0x38de6e['json']();return _0x239b63[_0x417819(0x19b)];}async function refreshTokenWithOrg(_0x2fa1a5,_0x4d53d5,_0x5d360b){const _0x2ac40c=_0x1508,_0x37ff69={'HzdaS':function(_0x2bf0f6,_0x30a690,_0x2a643a){return _0x2bf0f6(_0x30a690,_0x2a643a);}},_0x10f746=await _0x37ff69[_0x2ac40c(0x18e)](fetch,WORKOS_TOKEN_URL,{'method':_0x2ac40c(0x164),'headers':{'Content-Type':_0x2ac40c(0x192)},'body':new URLSearchParams({'client_id':_0x2fa1a5,'grant_type':_0x2ac40c(0x184),'refresh_token':_0x4d53d5,'organization_id':_0x5d360b})});if(!_0x10f746['ok']){const _0x5162d0=await _0x10f746['text']();throw new Error('Failed\x20to\x20refresh\x20token\x20with\x20org:\x20'+_0x10f746[_0x2ac40c(0x171)]+'\x20'+_0x5162d0);}return _0x10f746[_0x2ac40c(0x180)]();}export async function runDeviceAuthFlow(){const _0x3781f0=_0x1508,_0x38cf44={'CELHt':function(_0x4c533d,_0x1cbf5f){return _0x4c533d(_0x1cbf5f);},'mnvqz':function(_0x53ff8e,_0x2c1aaa){return _0x53ff8e===_0x2c1aaa;},'upXdg':_0x3781f0(0x197),'bqwug':_0x3781f0(0x15e),'ZYDDl':_0x3781f0(0x172),'QePZp':'Select\x20an\x20organization:','tkWhk':_0x3781f0(0x170)},_0x14535a=getCurrentEnvironment(),_0x2a8022=ENVIRONMENT_CONFIGS[_0x14535a]['workosClientId'],_0x816c1f=await requestDeviceCode(_0x2a8022);console['log'](_0x3781f0(0x19f)),console[_0x3781f0(0x187)]('\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a'),openBrowser(_0x816c1f['verification_uri_complete']),console['log']('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x816c1f[_0x3781f0(0x190)]),console[_0x3781f0(0x187)]('Code:\x20'+_0x816c1f['user_code']+'\x0a'),process['stdout'][_0x3781f0(0x18a)](_0x3781f0(0x168));let _0x1a09db=await pollForTokens(_0x2a8022,_0x816c1f['device_code'],_0x816c1f['interval'],_0x816c1f['expires_in']);console[_0x3781f0(0x187)]('\x20✓');const _0x34da86=_0x38cf44['CELHt'](decodeJwtPayload,_0x1a09db[_0x3781f0(0x181)]);if(!_0x34da86['org_id']){const _0x364917=await _0x38cf44[_0x3781f0(0x158)](fetchMyMemberships,_0x1a09db['access_token']);let _0x28e67c;if(_0x38cf44[_0x3781f0(0x16e)](_0x364917['length'],0x0)){process[_0x3781f0(0x176)][_0x3781f0(0x18a)](_0x38cf44[_0x3781f0(0x19c)]);const _0x27cf5e=await _0x38cf44[_0x3781f0(0x158)](selfServeSignup,_0x1a09db[_0x3781f0(0x181)]);_0x28e67c=_0x27cf5e[_0x3781f0(0x19d)],console[_0x3781f0(0x187)]('\x20✓');}else{if(_0x364917['length']===0x1)_0x28e67c=_0x364917[0x0]['organizationId'],console['log']('Using\x20organization:\x20'+_0x364917[0x0]['name']);else{const _0x3d0b99=process[_0x3781f0(0x159)][_0x3781f0(0x194)]&&process[_0x3781f0(0x176)][_0x3781f0(0x194)];if(!_0x3d0b99)throw new Error(_0x38cf44[_0x3781f0(0x17b)]+_0x38cf44['ZYDDl']);const {selected:_0x5b9966}=await _0x5d69d1['prompt']([{'type':_0x3781f0(0x165),'name':_0x3781f0(0x174),'message':_0x38cf44[_0x3781f0(0x1a1)],'choices':_0x364917['map'](_0x3a0197=>({'name':_0x3a0197[_0x3781f0(0x1a0)],'value':_0x3a0197['organizationId']}))}]);_0x28e67c=_0x5b9966;}}_0x1a09db=await refreshTokenWithOrg(_0x2a8022,_0x1a09db[_0x3781f0(0x184)],_0x28e67c);}process[_0x3781f0(0x176)][_0x3781f0(0x18a)](_0x38cf44[_0x3781f0(0x17d)]);const _0x4a11f2=await provisionApiKey(_0x1a09db[_0x3781f0(0x181)]);return console[_0x3781f0(0x187)]('\x20✓'),await _0x38cf44[_0x3781f0(0x158)](storeToken,_0x4a11f2),_0x1a09db['refresh_token']&&await storeRefreshToken(_0x1a09db[_0x3781f0(0x184)]),_0x4a11f2;}function sleep(_0x4a0cda){return new Promise(_0x3cddda=>setTimeout(_0x3cddda,_0x4a0cda));}
1
+ const _0xa9c91a=_0x4df6;(function(_0x13d8d1,_0xf32060){const _0x27827a=_0x4df6,_0x27e3d2=_0x13d8d1();while(!![]){try{const _0x7bff16=parseInt(_0x27827a(0xdb))/0x1*(-parseInt(_0x27827a(0xcd))/0x2)+-parseInt(_0x27827a(0xf1))/0x3+parseInt(_0x27827a(0xf3))/0x4*(-parseInt(_0x27827a(0xc5))/0x5)+parseInt(_0x27827a(0xaa))/0x6+-parseInt(_0x27827a(0xb3))/0x7+parseInt(_0x27827a(0xb2))/0x8*(-parseInt(_0x27827a(0xc6))/0x9)+parseInt(_0x27827a(0xd7))/0xa;if(_0x7bff16===_0xf32060)break;else _0x27e3d2['push'](_0x27e3d2['shift']());}catch(_0x1463bd){_0x27e3d2['push'](_0x27e3d2['shift']());}}}(_0xfee2,0xe7448));import{exec}from'child_process';import _0x53e485 from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0xa9c91a(0xf0),WORKOS_TOKEN_URL=_0xa9c91a(0xbe);export async function requestDeviceCode(_0x177dfe){const _0x4df6d6=_0xa9c91a,_0x429db4={'pOGDC':_0x4df6d6(0xe1),'grvwM':'application/x-www-form-urlencoded'},_0x54c22c=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':_0x429db4[_0x4df6d6(0xa4)],'headers':{'Content-Type':_0x429db4['grvwM']},'body':new URLSearchParams({'client_id':_0x177dfe})});if(!_0x54c22c['ok']){const _0x2a7b60=await _0x54c22c[_0x4df6d6(0xbf)]();throw new Error(_0x4df6d6(0xa6)+_0x54c22c['status']+'\x20'+_0x2a7b60);}return _0x54c22c[_0x4df6d6(0xe3)]();}export async function pollForTokens(_0x4d8294,_0x749364,_0xde59ac,_0x31dd15){const _0x2ca027=_0xa9c91a,_0x35b33b={'WvxgA':function(_0x431a62,_0x5415a9){return _0x431a62*_0x5415a9;},'DWVyh':function(_0x40421a,_0x1f6ab8){return _0x40421a<_0x1f6ab8;},'ztmZe':function(_0x6d4bd5,_0x409890){return _0x6d4bd5(_0x409890);},'HBdPJ':function(_0x572983,_0x47b179,_0x11b14f){return _0x572983(_0x47b179,_0x11b14f);},'gqYku':'POST','AtOob':'application/x-www-form-urlencoded','Xzauo':function(_0x54b29c,_0x2a7888){return _0x54b29c===_0x2a7888;},'SMeBP':_0x2ca027(0xc2)},_0x68c31d=Date[_0x2ca027(0xd0)]()+_0x35b33b['WvxgA'](_0x31dd15,0x3e8);let _0x3e051e=_0x35b33b['WvxgA'](_0xde59ac,0x3e8);while(_0x35b33b['DWVyh'](Date[_0x2ca027(0xd0)](),_0x68c31d)){await _0x35b33b[_0x2ca027(0xdd)](sleep,_0x3e051e);const _0x57a477=await _0x35b33b['HBdPJ'](fetch,WORKOS_TOKEN_URL,{'method':_0x35b33b[_0x2ca027(0xef)],'headers':{'Content-Type':_0x35b33b['AtOob']},'body':new URLSearchParams({'client_id':_0x4d8294,'device_code':_0x749364,'grant_type':'urn:ietf:params:oauth:grant-type:device_code'})});if(_0x57a477['ok'])return _0x57a477[_0x2ca027(0xe3)]();const _0x22177c=await _0x57a477[_0x2ca027(0xe3)]();if(_0x35b33b['Xzauo'](_0x22177c['error'],'authorization_pending'))continue;if(_0x22177c[_0x2ca027(0xe8)]===_0x2ca027(0xb9)){_0x3e051e+=0x3e8;continue;}throw new Error(_0x22177c[_0x2ca027(0xf4)]||_0x22177c[_0x2ca027(0xe8)]||_0x35b33b[_0x2ca027(0xc4)]);}throw new Error('Device\x20authorization\x20timed\x20out');}async function fetchUserProfile(_0x3d046e){const _0x2ae851=_0xa9c91a,_0x275841={'fqnWS':function(_0x5d29a1){return _0x5d29a1();},'tPfMZ':function(_0x3cc3bb,_0x21cc62,_0x3a1bb4){return _0x3cc3bb(_0x21cc62,_0x3a1bb4);},'nKYcX':'GET'},_0x2cac76=_0x275841['fqnWS'](getApiBaseUrl);try{const _0xa98b0e=await _0x275841[_0x2ae851(0xf6)](fetch,_0x2cac76+_0x2ae851(0xb8),{'method':_0x275841[_0x2ae851(0xd6)],'headers':{'workos-token':_0x3d046e}});if(_0xa98b0e['ok'])return _0xa98b0e[_0x2ae851(0xe3)]();}catch{}return null;}function _0xfee2(){const _0x277d72=['tzWeD','/organization/self-serve-signup','https://api.workos.com/user_management/authenticate','text','Failed\x20to\x20create\x20organization:\x20','isTTY','Authentication\x20failed','refresh_token','SMeBP','1160aXxrKf','7965SPNJAY','length','stdout','\x27s\x20CLI\x20Key','access_token','/api-keys','device_code','12BWCWBg','Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','WiViz','now','selected','ebWUj','VuRIr','stringify','\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','nKYcX','39935570NKZIJk','rloed','write','apiKey','57601LrAXIe','xexZN','ztmZe','uUAzm','toString','vPYqU','POST','IXItE','json','interval','organizationId','darwin','log','error','startsWith','wHnox','org_id','CLI\x20Key','/organization/my-memberships','name','gqYku','https://api.workos.com/user_management/authorize/device','1642119XDKymj','Provisioning\x20API\x20key...','13224xsNmIj','error_description','status','tPfMZ','split','zzhCd','\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','pOGDC','qXAcY','Failed\x20to\x20request\x20device\x20code:\x20','expires_in','workosClientId','Using\x20organization:\x20','8137272LOVnJO','Failed\x20to\x20provision\x20API\x20key:\x20','Invalid\x20JWT\x20format','bOOcl','Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','Qlkgp','verification_uri_complete','WioGB','15464uCqTAw','7222747FDBNsH','user_code','giwej','uqfKb','Failed\x20to\x20fetch\x20memberships:\x20','/organization/me','slow_down','win32','filter'];_0xfee2=function(){return _0x277d72;};return _0xfee2();}function buildKeyName(_0x3ad139,_0x1e3970){const _0x4d0f1b=_0xa9c91a,_0x27d356=_0x1e3970[_0x4d0f1b(0xbb)](_0x106d56=>_0x106d56[_0x4d0f1b(0xee)]===_0x3ad139||_0x106d56['name'][_0x4d0f1b(0xe9)](_0x3ad139+'\x20('));if(_0x27d356['length']===0x0)return _0x3ad139;return _0x3ad139+'\x20('+(_0x27d356['length']+0x1)+')';}export async function provisionApiKey(_0x5ef831){const _0x539fb2=_0xa9c91a,_0x2becb1={'uUAzm':function(_0x24380a){return _0x24380a();},'IXItE':'application/json','wHnox':function(_0x4b2009,_0x3dca5c){return _0x4b2009(_0x3dca5c);},'vPYqU':function(_0x4aca29,_0x5ba703,_0x2a908f){return _0x4aca29(_0x5ba703,_0x2a908f);},'giwej':'GET','WioGB':'mcp:write'},_0x4937c2=_0x2becb1[_0x539fb2(0xde)](getApiBaseUrl),_0x59cbff={'Content-Type':_0x2becb1[_0x539fb2(0xe2)],'workos-token':_0x5ef831},_0x14153a=await _0x2becb1[_0x539fb2(0xea)](fetchUserProfile,_0x5ef831),_0x3252c2=_0x14153a?.['firstName']||_0x14153a?.['email']?.[_0x539fb2(0xf7)]('@')[0x0],_0x34e075=_0x3252c2?_0x3252c2+_0x539fb2(0xc9):_0x539fb2(0xec);let _0x131c9b=[];try{const _0x22ddef=await _0x2becb1[_0x539fb2(0xe0)](fetch,_0x4937c2+'/api-keys',{'method':_0x2becb1[_0x539fb2(0xb5)],'headers':_0x59cbff});if(_0x22ddef['ok']){const _0x2b442f=await _0x22ddef[_0x539fb2(0xe3)]();_0x131c9b=_0x2b442f['apiKeys'];}}catch{}const _0x1e0a9c=buildKeyName(_0x34e075,_0x131c9b),_0x5bf389=await _0x2becb1[_0x539fb2(0xe0)](fetch,_0x4937c2+_0x539fb2(0xcb),{'method':_0x539fb2(0xe1),'headers':_0x59cbff,'body':JSON[_0x539fb2(0xd4)]({'name':_0x1e0a9c,'scope':_0x2becb1[_0x539fb2(0xb1)]})});if(!_0x5bf389['ok']){const _0x2e6599=await _0x5bf389[_0x539fb2(0xbf)]();throw new Error(_0x539fb2(0xab)+_0x5bf389[_0x539fb2(0xf5)]+'\x20'+_0x2e6599);}const _0x4ce554=await _0x5bf389[_0x539fb2(0xe3)]();return _0x4ce554[_0x539fb2(0xda)]['token'];}export function openBrowser(_0x169c90){const _0x4d7acc=_0xa9c91a,_0x16da42={'jmOBH':function(_0x2df525,_0x26f47b){return _0x2df525===_0x26f47b;},'rdNRf':'xdg-open','zzhCd':function(_0x440e76,_0x4e5ae6){return _0x440e76(_0x4e5ae6);}},_0x4c06db=process['platform'],_0x900242=_0x16da42['jmOBH'](_0x4c06db,_0x4d7acc(0xe6))?'open':_0x4c06db===_0x4d7acc(0xba)?'start':_0x16da42['rdNRf'];_0x16da42[_0x4d7acc(0xf8)](exec,_0x900242+'\x20'+JSON[_0x4d7acc(0xd4)](_0x169c90));}function decodeJwtPayload(_0x1f16ac){const _0x1e33e8=_0xa9c91a,_0x533b24={'tzWeD':function(_0x41e63d,_0x4fa06f){return _0x41e63d!==_0x4fa06f;},'uqfKb':_0x1e33e8(0xac),'bOOcl':'utf-8'},_0x1ac6a7=_0x1f16ac['split']('.');if(_0x533b24[_0x1e33e8(0xbc)](_0x1ac6a7[_0x1e33e8(0xc7)],0x3))throw new Error(_0x533b24[_0x1e33e8(0xb6)]);const _0x3c5b8e=Buffer['from'](_0x1ac6a7[0x1],'base64url')[_0x1e33e8(0xdf)](_0x533b24[_0x1e33e8(0xad)]);return JSON['parse'](_0x3c5b8e);}async function selfServeSignup(_0x4469a9){const _0x115e41=_0xa9c91a,_0x179f2b={'LhFFU':function(_0x283f55){return _0x283f55();},'Qlkgp':_0x115e41(0xe1)},_0x5ceeba=_0x179f2b['LhFFU'](getApiBaseUrl),_0x37c10c=await fetch(_0x5ceeba+_0x115e41(0xbd),{'method':_0x179f2b[_0x115e41(0xaf)],'headers':{'Content-Type':'application/json','workos-token':_0x4469a9}});if(!_0x37c10c['ok']){const _0x5df055=await _0x37c10c[_0x115e41(0xbf)]();throw new Error(_0x115e41(0xc0)+_0x37c10c['status']+'\x20'+_0x5df055);}return _0x37c10c[_0x115e41(0xe3)]();}function _0x4df6(_0x329110,_0x2e28ff){_0x329110=_0x329110-0xa3;const _0xfee292=_0xfee2();let _0x4df690=_0xfee292[_0x329110];return _0x4df690;}async function fetchMyMemberships(_0x367615){const _0x5dd7e8=_0xa9c91a,_0x287a2d={'FATcg':function(_0x14b50f){return _0x14b50f();},'WiViz':function(_0x263f43,_0x3db272,_0xca7eb3){return _0x263f43(_0x3db272,_0xca7eb3);},'Mybfr':'GET'},_0x508fd5=_0x287a2d['FATcg'](getApiBaseUrl),_0x5d891d=await _0x287a2d[_0x5dd7e8(0xcf)](fetch,_0x508fd5+_0x5dd7e8(0xed),{'method':_0x287a2d['Mybfr'],'headers':{'workos-token':_0x367615}});if(!_0x5d891d['ok']){const _0x5a45cd=await _0x5d891d[_0x5dd7e8(0xbf)]();throw new Error(_0x5dd7e8(0xb7)+_0x5d891d[_0x5dd7e8(0xf5)]+'\x20'+_0x5a45cd);}const _0x387336=await _0x5d891d['json']();return _0x387336['memberships'];}async function refreshTokenWithOrg(_0x1c1728,_0x41546b,_0x48925e){const _0x198e81=_0xa9c91a,_0x909002={'GFWXV':'application/x-www-form-urlencoded'},_0xf33f63=await fetch(WORKOS_TOKEN_URL,{'method':'POST','headers':{'Content-Type':_0x909002['GFWXV']},'body':new URLSearchParams({'client_id':_0x1c1728,'grant_type':'refresh_token','refresh_token':_0x41546b,'organization_id':_0x48925e})});if(!_0xf33f63['ok']){const _0x2daef8=await _0xf33f63['text']();throw new Error('Failed\x20to\x20refresh\x20token\x20with\x20org:\x20'+_0xf33f63[_0x198e81(0xf5)]+'\x20'+_0x2daef8);}return _0xf33f63[_0x198e81(0xe3)]();}export async function runDeviceAuthFlow(){const _0x263de1=_0xa9c91a,_0x491232={'qXAcY':function(_0x31b10e,_0xc7d1e6){return _0x31b10e(_0xc7d1e6);},'wWhBQ':_0x263de1(0xa3),'SRtiI':function(_0x48fc6d,_0xe9382e,_0x1337a0,_0x1a8b4b,_0x2e1a3c){return _0x48fc6d(_0xe9382e,_0x1337a0,_0x1a8b4b,_0x2e1a3c);},'xexZN':'Setting\x20up\x20your\x20organization...','VuRIr':function(_0x20322d,_0x363e9a){return _0x20322d(_0x363e9a);},'rloed':function(_0x1fcf93,_0x26947f){return _0x1fcf93===_0x26947f;},'ebWUj':_0x263de1(0xce),'etATH':'list','NXowb':_0x263de1(0xd1),'gNtKu':_0x263de1(0xf2)},_0x3b7bb5=getCurrentEnvironment(),_0x4cbf0e=ENVIRONMENT_CONFIGS[_0x3b7bb5][_0x263de1(0xa8)],_0x3a184e=await _0x491232[_0x263de1(0xa5)](requestDeviceCode,_0x4cbf0e);console[_0x263de1(0xe7)](_0x263de1(0xd5)),console['log'](_0x491232['wWhBQ']),openBrowser(_0x3a184e[_0x263de1(0xb0)]),console['log']('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x3a184e['verification_uri_complete']),console[_0x263de1(0xe7)]('Code:\x20'+_0x3a184e[_0x263de1(0xb4)]+'\x0a'),process[_0x263de1(0xc8)]['write']('Waiting\x20for\x20authentication...');let _0x1fa621=await _0x491232['SRtiI'](pollForTokens,_0x4cbf0e,_0x3a184e[_0x263de1(0xcc)],_0x3a184e[_0x263de1(0xe4)],_0x3a184e[_0x263de1(0xa7)]);console[_0x263de1(0xe7)]('\x20✓');const _0x2800fc=_0x491232['qXAcY'](decodeJwtPayload,_0x1fa621['access_token']);if(!_0x2800fc[_0x263de1(0xeb)]){const _0x15808f=await _0x491232['qXAcY'](fetchMyMemberships,_0x1fa621['access_token']);let _0x55ae97;if(_0x15808f['length']===0x0){process[_0x263de1(0xc8)][_0x263de1(0xd9)](_0x491232[_0x263de1(0xdc)]);const _0x4ffc84=await _0x491232[_0x263de1(0xd3)](selfServeSignup,_0x1fa621[_0x263de1(0xca)]);_0x55ae97=_0x4ffc84['organizationId'],console['log']('\x20✓');}else{if(_0x491232[_0x263de1(0xd8)](_0x15808f['length'],0x1))_0x55ae97=_0x15808f[0x0][_0x263de1(0xe5)],console[_0x263de1(0xe7)](_0x263de1(0xa9)+_0x15808f[0x0][_0x263de1(0xee)]);else{const _0x38279a=process['stdin'][_0x263de1(0xc1)]&&process['stdout']['isTTY'];if(!_0x38279a)throw new Error(_0x491232[_0x263de1(0xd2)]+_0x263de1(0xae));const {selected:_0x42fc6d}=await _0x53e485['prompt']([{'type':_0x491232['etATH'],'name':_0x491232['NXowb'],'message':'Select\x20an\x20organization:','choices':_0x15808f['map'](_0x26b384=>({'name':_0x26b384[_0x263de1(0xee)],'value':_0x26b384['organizationId']}))}]);_0x55ae97=_0x42fc6d;}}_0x1fa621=await refreshTokenWithOrg(_0x4cbf0e,_0x1fa621[_0x263de1(0xc3)],_0x55ae97);}process['stdout']['write'](_0x491232['gNtKu']);const _0x57773e=await provisionApiKey(_0x1fa621['access_token']);return console[_0x263de1(0xe7)]('\x20✓'),await storeToken(_0x57773e),_0x1fa621[_0x263de1(0xc3)]&&await storeRefreshToken(_0x1fa621[_0x263de1(0xc3)]),_0x57773e;}function sleep(_0x1f54bd){return new Promise(_0x1898be=>setTimeout(_0x1898be,_0x1f54bd));}
@@ -1 +1 @@
1
- function _0x29b0(){const _0x2c7994=['https://api.staging.ranger.net','8526455jkFLdh','31442160xqniKz','32wawWMP','aiProxyUrl','107702LfWJwU','FjEiY','local','apiBaseUrl','http://localhost:8090','878450cVDnjw','client_01J9CBYM2DKWV9HM17D95Z540K','4075692xJTXgt','env','28VwkUeA','48FyarvJ','prod','ZRcaH','https://ai-proxy-301751771437.us-central1.run.app','921288DRuQpO','1161396QTdbbC','vEAjm'];_0x29b0=function(){return _0x2c7994;};return _0x29b0();}const _0x56712c=_0x31ae;(function(_0x1b1add,_0x9c8a2c){const _0x985e37=_0x31ae,_0x28fc71=_0x1b1add();while(!![]){try{const _0x33d850=parseInt(_0x985e37(0xb3))/0x1*(parseInt(_0x985e37(0xbc))/0x2)+-parseInt(_0x985e37(0xc1))/0x3+parseInt(_0x985e37(0xb1))/0x4*(parseInt(_0x985e37(0xb8))/0x5)+-parseInt(_0x985e37(0xba))/0x6+parseInt(_0x985e37(0xaf))/0x7+-parseInt(_0x985e37(0xbd))/0x8*(-parseInt(_0x985e37(0xac))/0x9)+-parseInt(_0x985e37(0xb0))/0xa;if(_0x33d850===_0x9c8a2c)break;else _0x28fc71['push'](_0x28fc71['shift']());}catch(_0x3802e5){_0x28fc71['push'](_0x28fc71['shift']());}}}(_0x29b0,0xbd3ab));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':'https://api.ranger.net','workosClientId':'client_01J9CBYM7M5ZETCF7G6614DXR2','aiProxyUrl':'https://ai-proxy-716115358910.us-central1.run.app'},'staging':{'apiBaseUrl':_0x56712c(0xae),'workosClientId':_0x56712c(0xb9),'aiProxyUrl':_0x56712c(0xc0)},'local':{'apiBaseUrl':'http://localhost:8080','workosClientId':_0x56712c(0xb9),'aiProxyUrl':_0x56712c(0xb7)}};export const DEFAULT_ENVIRONMENT='prod';function _0x31ae(_0x2547b1,_0x4e11e1){_0x2547b1=_0x2547b1-0xac;const _0x29b047=_0x29b0();let _0x31ae87=_0x29b047[_0x2547b1];return _0x31ae87;}export function isValidEnvironment(_0x28525e){const _0x1b14cf=_0x56712c,_0x2f0c88={'FjEiY':_0x1b14cf(0xbe),'ggIVf':'staging','vEAjm':function(_0x1fc5b0,_0x384e7e){return _0x1fc5b0===_0x384e7e;}};return _0x28525e===_0x2f0c88[_0x1b14cf(0xb4)]||_0x28525e===_0x2f0c88['ggIVf']||_0x2f0c88[_0x1b14cf(0xad)](_0x28525e,_0x1b14cf(0xb5));}export function getCurrentEnvironment(){const _0x4f5786=_0x56712c,_0x2271b1={'ZRcaH':function(_0x55429f,_0x5dce0a){return _0x55429f(_0x5dce0a);}},_0x52846f=process[_0x4f5786(0xbb)]['RANGER_CLI_ENV'];if(_0x52846f&&_0x2271b1[_0x4f5786(0xbf)](isValidEnvironment,_0x52846f))return _0x52846f;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0x1eb077=_0x56712c,_0x1b3647={'fNPbc':function(_0x2f1d99){return _0x2f1d99();}};return ENVIRONMENT_CONFIGS[_0x1b3647['fNPbc'](getCurrentEnvironment)][_0x1eb077(0xb6)];}export function getAiProxyUrl(){const _0x4756c7=_0x56712c;return ENVIRONMENT_CONFIGS[getCurrentEnvironment()][_0x4756c7(0xb2)];}
1
+ const _0x316a27=_0x4b0c;(function(_0x3a6ad7,_0x347c87){const _0x39f312=_0x4b0c,_0xc18b27=_0x3a6ad7();while(!![]){try{const _0x33cd92=parseInt(_0x39f312(0x19b))/0x1+parseInt(_0x39f312(0x1aa))/0x2*(-parseInt(_0x39f312(0x1a0))/0x3)+parseInt(_0x39f312(0x1a1))/0x4+-parseInt(_0x39f312(0x19d))/0x5*(-parseInt(_0x39f312(0x1ab))/0x6)+parseInt(_0x39f312(0x19e))/0x7*(-parseInt(_0x39f312(0x1a6))/0x8)+-parseInt(_0x39f312(0x1a9))/0x9+parseInt(_0x39f312(0x1a3))/0xa*(-parseInt(_0x39f312(0x1a8))/0xb);if(_0x33cd92===_0x347c87)break;else _0xc18b27['push'](_0xc18b27['shift']());}catch(_0x2fb15a){_0xc18b27['push'](_0xc18b27['shift']());}}}(_0x2ffc,0x389f0));function _0x2ffc(){const _0x505590=['2120860FXnpIa','546lOoKBt','staging','29907sikSTX','867372eCwQSR','prod','50aJavJf','https://api.ranger.net','env','24712CeTqhZ','http://localhost:8090','229735luctqI','1262304bgkEqh','46vGGOXT','6XAiUgk','UHjRT','RANGER_CLI_ENV','client_01J9CBYM2DKWV9HM17D95Z540K','305815uamrxh','apiBaseUrl'];_0x2ffc=function(){return _0x505590;};return _0x2ffc();}export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':_0x316a27(0x1a4),'workosClientId':'client_01J9CBYM7M5ZETCF7G6614DXR2','aiProxyUrl':'https://ai-proxy-716115358910.us-central1.run.app'},'staging':{'apiBaseUrl':'https://api.staging.ranger.net','workosClientId':_0x316a27(0x19a),'aiProxyUrl':'https://ai-proxy-301751771437.us-central1.run.app'},'local':{'apiBaseUrl':'http://localhost:8080','workosClientId':'client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl':_0x316a27(0x1a7)}};export const DEFAULT_ENVIRONMENT='prod';export function isValidEnvironment(_0xc31265){const _0x51e688=_0x316a27,_0x97bb63={'IxNkV':function(_0x49681f,_0x3b897b){return _0x49681f===_0x3b897b;},'GxThX':function(_0x587621,_0x593dfa){return _0x587621===_0x593dfa;},'nYYEn':'local'};return _0x97bb63['IxNkV'](_0xc31265,_0x51e688(0x1a2))||_0x97bb63['GxThX'](_0xc31265,_0x51e688(0x19f))||_0xc31265===_0x97bb63['nYYEn'];}export function getCurrentEnvironment(){const _0x2894a8=_0x316a27,_0x5760c9={'UHjRT':function(_0x38d774,_0x2be357){return _0x38d774(_0x2be357);}},_0x1b86d1=process[_0x2894a8(0x1a5)][_0x2894a8(0x199)];if(_0x1b86d1&&_0x5760c9[_0x2894a8(0x1ac)](isValidEnvironment,_0x1b86d1))return _0x1b86d1;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0xfb92a1=_0x316a27;return ENVIRONMENT_CONFIGS[getCurrentEnvironment()][_0xfb92a1(0x19c)];}function _0x4b0c(_0xfce1b,_0x4ac322){_0xfce1b=_0xfce1b-0x199;const _0x2ffc16=_0x2ffc();let _0x4b0caf=_0x2ffc16[_0xfce1b];return _0x4b0caf;}export function getAiProxyUrl(){const _0x5d94e9={'QVqIH':function(_0x4a9036){return _0x4a9036();}};return ENVIRONMENT_CONFIGS[_0x5d94e9['QVqIH'](getCurrentEnvironment)]['aiProxyUrl'];}
@@ -1 +1 @@
1
- function _0x3d67(){const _0x3fe8a5=['ccLHX','/checklist-items/','XGpsr','xrtxH','wRaLY','POtLk','10984LyUqto','/api/v1/mcp/features','CsOcw','limit','/checklist/','DWOca','GET','sessionId','KAcXO','itemIds','CJXlX','/start','Mqiqa','application/json','offset','text','EVMFl','51147lfwXxF','Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20','NtBme','dqROK','stringify','CrRzJ','/api/v1/mcp/features/','1359828PVuLDR','KkYrP','LATkV','json','/restore','RozyM','gitBranch','12PvlgRM','includeDeleted','message','toString','Failed\x20to\x20update\x20scenario:\x20','qWtkL','POST','\x0a\x0aUpgrade\x20your\x20plan:\x20','set','/action-items','bcyWA','Feature\x20limit\x20exceeded','/conclude','Failed\x20to\x20get\x20action\x20items:\x20','Failed\x20to\x20get\x20feature\x20review:\x20','bgCAO','hsNlE','1299192KEeYOp','status','style','IeQfj','qBVkf','7901500osGQtB','gitRepoUrl','Failed\x20to\x20list\x20sessions:\x20','Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20','3EvrgbA','2195732uDxXTO','oUleX','/sessions/','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','FzQyh','PATCH','BHdhA','774iwLykf','afHGs','Bearer\x20','/comments/address','/report/markdown','rXeiS','615485HmFxVe','https://dashboard.ranger.net/billing','lqgOw'];_0x3d67=function(){return _0x3fe8a5;};return _0x3d67();}(function(_0x2d4917,_0x5a1d5f){const _0xd6c91f=_0x53ea,_0x27be80=_0x2d4917();while(!![]){try{const _0x12363f=-parseInt(_0xd6c91f(0x1b7))/0x1*(parseInt(_0xd6c91f(0x1c5))/0x2)+parseInt(_0xd6c91f(0x18f))/0x3*(-parseInt(_0xd6c91f(0x1be))/0x4)+-parseInt(_0xd6c91f(0x19d))/0x5+-parseInt(_0xd6c91f(0x186))/0x6+parseInt(_0xd6c91f(0x190))/0x7+-parseInt(_0xd6c91f(0x1a6))/0x8*(-parseInt(_0xd6c91f(0x197))/0x9)+parseInt(_0xd6c91f(0x18b))/0xa;if(_0x12363f===_0x5a1d5f)break;else _0x27be80['push'](_0x27be80['shift']());}catch(_0x357de0){_0x27be80['push'](_0x27be80['shift']());}}}(_0x3d67,0x397ac));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';export async function createFeature(_0x299020){const _0x35ccbf=_0x53ea,_0x29db2b={'CrRzJ':function(_0x2de58a){return _0x2de58a();},'XGpsr':_0x35ccbf(0x193),'PDuRG':function(_0x459fb){return _0x459fb();},'xrtxH':function(_0x4079c8,_0x5923c5,_0x3fe716){return _0x4079c8(_0x5923c5,_0x3fe716);},'riMRh':'POST','IeQfj':function(_0xae0782,_0x390708){return _0xae0782===_0x390708;},'IpjAA':_0x35ccbf(0x19e),'OHcDt':_0x35ccbf(0x180)},_0x25b2e0=await _0x29db2b[_0x35ccbf(0x1bc)](getToken);if(!_0x25b2e0)throw new Error(_0x29db2b[_0x35ccbf(0x1a2)]);const _0x48ac92=_0x29db2b['PDuRG'](getApiBaseUrl),_0x386936=await _0x29db2b[_0x35ccbf(0x1a3)](fetch,_0x48ac92+_0x35ccbf(0x1a7),{'method':_0x29db2b['riMRh'],'headers':{'Authorization':'Bearer\x20'+_0x25b2e0,'Content-Type':'application/json'},'body':JSON[_0x35ccbf(0x1bb)](_0x299020)});if(!_0x386936['ok']){if(_0x29db2b[_0x35ccbf(0x189)](_0x386936[_0x35ccbf(0x187)],0x192)){const _0x1ade12=await _0x386936[_0x35ccbf(0x1c1)](),_0x1ffe31=_0x1ade12['billingUrl']||_0x29db2b['IpjAA'];throw new Error((_0x1ade12[_0x35ccbf(0x1c7)]||_0x29db2b['OHcDt'])+_0x35ccbf(0x17c)+_0x1ffe31);}const _0x9697ac=await _0x386936[_0x35ccbf(0x1b5)]();throw new Error('Failed\x20to\x20create\x20feature\x20review:\x20'+_0x9697ac);}return _0x386936['json']();}function _0x53ea(_0x4283b5,_0x3fb6c0){_0x4283b5=_0x4283b5-0x17c;const _0x3d676f=_0x3d67();let _0x53eadd=_0x3d676f[_0x4283b5];return _0x53eadd;}export async function listFeatures(_0x14e59f){const _0x1de0aa=_0x53ea,_0x22b6bb={'oUleX':function(_0xd8d98d){return _0xd8d98d();},'wRaLY':_0x1de0aa(0x1c4),'NtBme':'limit','DWOca':_0x1de0aa(0x1c6)},_0x26f642=await getToken();if(!_0x26f642)throw new Error(_0x1de0aa(0x193));const _0x5b2ca5=_0x22b6bb[_0x1de0aa(0x191)](getApiBaseUrl),_0x283bd1=new URLSearchParams();if(_0x14e59f?.['gitRepoUrl'])_0x283bd1[_0x1de0aa(0x17d)](_0x1de0aa(0x18c),_0x14e59f[_0x1de0aa(0x18c)]);if(_0x14e59f?.['gitBranch'])_0x283bd1['set'](_0x22b6bb[_0x1de0aa(0x1a4)],_0x14e59f[_0x1de0aa(0x1c4)]);if(_0x14e59f?.[_0x1de0aa(0x1a9)])_0x283bd1['set'](_0x22b6bb[_0x1de0aa(0x1b9)],_0x14e59f[_0x1de0aa(0x1a9)]['toString']());if(_0x14e59f?.[_0x1de0aa(0x1b4)])_0x283bd1[_0x1de0aa(0x17d)]('offset',_0x14e59f[_0x1de0aa(0x1b4)]['toString']());if(_0x14e59f?.['includeDeleted'])_0x283bd1[_0x1de0aa(0x17d)](_0x22b6bb[_0x1de0aa(0x1ab)],'true');const _0x21a985=_0x5b2ca5+_0x1de0aa(0x1a7)+(_0x283bd1[_0x1de0aa(0x1c8)]()?'?'+_0x283bd1[_0x1de0aa(0x1c8)]():''),_0x5dc5bf=await fetch(_0x21a985,{'method':'GET','headers':{'Authorization':_0x1de0aa(0x199)+_0x26f642}});if(!_0x5dc5bf['ok']){const _0x1851f2=await _0x5dc5bf['text']();throw new Error('Failed\x20to\x20list\x20feature\x20reviews:\x20'+_0x1851f2);}return _0x5dc5bf[_0x1de0aa(0x1c1)]();}export async function getFeature(_0x1bc931){const _0x5e26ed=_0x53ea,_0x5f5893={'Ygoux':function(_0x426a8a){return _0x426a8a();},'gLWDX':_0x5e26ed(0x193),'Mqiqa':function(_0x3c0cce){return _0x3c0cce();}},_0x53a12f=await _0x5f5893['Ygoux'](getToken);if(!_0x53a12f)throw new Error(_0x5f5893['gLWDX']);const _0x2014c2=_0x5f5893[_0x5e26ed(0x1b2)](getApiBaseUrl),_0xf6dfd5=await fetch(_0x2014c2+_0x5e26ed(0x1bd)+_0x1bc931,{'method':'GET','headers':{'Authorization':'Bearer\x20'+_0x53a12f}});if(!_0xf6dfd5['ok']){const _0x5d42cf=await _0xf6dfd5['text']();throw new Error(_0x5e26ed(0x183)+_0x5d42cf);}return _0xf6dfd5['json']();}export async function updateFeature(_0x4feed4,_0x1cd8ca){const _0x500cbf=_0x53ea,_0x561ffb={'CsOcw':_0x500cbf(0x193),'EVMFl':function(_0x4b60aa){return _0x4b60aa();},'afHGs':'application/json'},_0xd3a5a5=await getToken();if(!_0xd3a5a5)throw new Error(_0x561ffb[_0x500cbf(0x1a8)]);const _0x352ba7=_0x561ffb[_0x500cbf(0x1b6)](getApiBaseUrl),_0x4818ea=await fetch(_0x352ba7+_0x500cbf(0x1bd)+_0x4feed4,{'method':'PATCH','headers':{'Authorization':_0x500cbf(0x199)+_0xd3a5a5,'Content-Type':_0x561ffb[_0x500cbf(0x198)]},'body':JSON[_0x500cbf(0x1bb)](_0x1cd8ca)});if(!_0x4818ea['ok']){const _0x5ea684=await _0x4818ea['text']();throw new Error('Failed\x20to\x20update\x20feature\x20review:\x20'+_0x5ea684);}return _0x4818ea['json']();}export async function createChecklistItem(_0x2ad280,_0x1d42a7,_0x253e94){const _0x106a13=_0x53ea,_0x8767b9={'kkMPy':function(_0x406d3f){return _0x406d3f();},'qWtkL':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]'},_0x2b8bdd=await _0x8767b9['kkMPy'](getToken);if(!_0x2b8bdd)throw new Error(_0x8767b9[_0x106a13(0x1ca)]);const _0x4ff4b2=getApiBaseUrl(),_0x4c07dc=await fetch(_0x4ff4b2+_0x106a13(0x1bd)+_0x2ad280+'/checklist',{'method':_0x106a13(0x1cb),'headers':{'Authorization':_0x106a13(0x199)+_0x2b8bdd,'Content-Type':_0x106a13(0x1b3)},'body':JSON[_0x106a13(0x1bb)]({'description':_0x1d42a7,'position':_0x253e94})});if(!_0x4c07dc['ok']){const _0x46cf5f=await _0x4c07dc[_0x106a13(0x1b5)]();throw new Error('Failed\x20to\x20create\x20scenario:\x20'+_0x46cf5f);}return _0x4c07dc['json']();}export async function updateChecklistItem(_0x428e31,_0x2f7cf7,_0x44d146){const _0x1a54b7=_0x53ea,_0x2a4432={'swyXQ':_0x1a54b7(0x193),'bTGsf':function(_0x5091d5){return _0x5091d5();},'POtLk':_0x1a54b7(0x195),'nYvYI':_0x1a54b7(0x1b3),'QmLvk':'updateChecklistItem'};return withRetry(async()=>{const _0x407997=_0x1a54b7,_0x13785f=await getToken();if(!_0x13785f)throw new Error(_0x2a4432['swyXQ']);const _0x4ba757=_0x2a4432['bTGsf'](getApiBaseUrl),_0x179123=await fetch(_0x4ba757+_0x407997(0x1bd)+_0x428e31+_0x407997(0x1aa)+_0x2f7cf7,{'method':_0x2a4432[_0x407997(0x1a5)],'headers':{'Authorization':'Bearer\x20'+_0x13785f,'Content-Type':_0x2a4432['nYvYI']},'body':JSON['stringify'](_0x44d146)});if(!_0x179123['ok']){const _0x3c7514=await _0x179123['text']();throw new Error(_0x407997(0x1c9)+_0x3c7514);}return _0x179123[_0x407997(0x1c1)]();},{'label':_0x2a4432['QmLvk']});}export async function getFeatureReport(_0x420fc7){const _0x2895a5=_0x53ea,_0x18ff4e={'qvKev':function(_0x5796a5){return _0x5796a5();},'SVZKa':_0x2895a5(0x1ac)},_0x42149f=await _0x18ff4e['qvKev'](getToken);if(!_0x42149f)throw new Error(_0x2895a5(0x193));const _0x137401=getApiBaseUrl(),_0x2fffc7=await fetch(_0x137401+_0x2895a5(0x1bd)+_0x420fc7+'/report',{'method':_0x18ff4e['SVZKa'],'headers':{'Authorization':'Bearer\x20'+_0x42149f}});if(!_0x2fffc7['ok']){const _0x54840c=await _0x2fffc7['text']();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report:\x20'+_0x54840c);}return _0x2fffc7[_0x2895a5(0x1c1)]();}export async function getFeatureReportMarkdown(_0x2c9a0d,_0x1770a9){const _0x15de2=_0x53ea,_0x351b7b={'KkYrP':function(_0x493097){return _0x493097();},'LATkV':function(_0x341e28,_0xcce847){return _0x341e28&&_0xcce847;},'Sliuh':'style'},_0x5d9270=await _0x351b7b['KkYrP'](getToken);if(!_0x5d9270)throw new Error(_0x15de2(0x193));const _0x37e60e=_0x351b7b[_0x15de2(0x1bf)](getApiBaseUrl),_0x14acca=new URLSearchParams(),_0x389bfb=(_0x1770a9?.['itemIds']?.['length']??0x0)>0x0,_0x51eabb=Boolean(_0x1770a9?.['sessionId']);_0x389bfb&&_0x1770a9?.[_0x15de2(0x1af)]&&_0x14acca[_0x15de2(0x17d)](_0x15de2(0x1af),_0x1770a9['itemIds']['join'](','));_0x51eabb&&_0x1770a9?.[_0x15de2(0x1ad)]&&_0x14acca[_0x15de2(0x17d)](_0x15de2(0x1ad),_0x1770a9[_0x15de2(0x1ad)]);_0x351b7b[_0x15de2(0x1c0)](!_0x389bfb,!_0x51eabb)&&_0x1770a9?.[_0x15de2(0x188)]&&_0x14acca['set'](_0x351b7b['Sliuh'],_0x1770a9['style']);const _0x138677=_0x37e60e+'/api/v1/mcp/features/'+_0x2c9a0d+_0x15de2(0x19b),_0x384c10=''+_0x138677+(_0x14acca['toString']()?'?'+_0x14acca[_0x15de2(0x1c8)]():''),_0xb130d=await fetch(_0x384c10,{'method':_0x15de2(0x1ac),'headers':{'Authorization':_0x15de2(0x199)+_0x5d9270}});if(!_0xb130d['ok']){const _0x4e8146=await _0xb130d[_0x15de2(0x1b5)]();throw new Error(_0x15de2(0x18e)+_0x4e8146);}return _0xb130d[_0x15de2(0x1b5)]();}export async function listFeatureSessions(_0x5d68d9){const _0x363070=_0x53ea,_0x3cdbdb={'qBVkf':function(_0x5d1bde){return _0x5d1bde();},'BHdhA':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','CJXlX':function(_0x16f91b,_0x400c81,_0x18037f){return _0x16f91b(_0x400c81,_0x18037f);}},_0x57c127=await _0x3cdbdb[_0x363070(0x18a)](getToken);if(!_0x57c127)throw new Error(_0x3cdbdb[_0x363070(0x196)]);const _0x54caf1=getApiBaseUrl(),_0x36346e=await _0x3cdbdb[_0x363070(0x1b0)](fetch,_0x54caf1+'/api/v1/mcp/features/'+_0x5d68d9+'/sessions',{'method':_0x363070(0x1ac),'headers':{'Authorization':'Bearer\x20'+_0x57c127}});if(!_0x36346e['ok']){const _0x55a275=await _0x36346e['text']();throw new Error(_0x363070(0x18d)+_0x55a275);}return _0x36346e[_0x363070(0x1c1)]();}export async function startSession(_0x4a8c3b,_0x4c2a4b){const _0x1ae256=_0x53ea,_0x58d07c={'pkDBV':function(_0x5b255c){return _0x5b255c();},'dqROK':function(_0x5c08d6){return _0x5c08d6();},'pHsbV':function(_0x4a9b6b,_0x597991,_0x468f13){return _0x4a9b6b(_0x597991,_0x468f13);}},_0x909aad=await _0x58d07c['pkDBV'](getToken);if(!_0x909aad)throw new Error(_0x1ae256(0x193));const _0x1195fa=_0x58d07c[_0x1ae256(0x1ba)](getApiBaseUrl),_0xa7f001=await _0x58d07c['pHsbV'](fetch,_0x1195fa+_0x1ae256(0x1bd)+_0x4a8c3b+_0x1ae256(0x192)+_0x4c2a4b+_0x1ae256(0x1b1),{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x909aad}});if(!_0xa7f001['ok']){const _0xf5e46a=await _0xa7f001[_0x1ae256(0x1b5)]();throw new Error('Failed\x20to\x20start\x20session:\x20'+_0xf5e46a);}return _0xa7f001['json']();}export async function concludeSession(_0x484738,_0x445abc){const _0x6f713=_0x53ea,_0x3c5cdf={'Ivwjg':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','dIdse':function(_0x599e79){return _0x599e79();},'RozyM':function(_0x34ed26,_0x585003,_0x4b9189){return _0x34ed26(_0x585003,_0x4b9189);},'Nvybg':'POST'},_0xba94f7=await getToken();if(!_0xba94f7)throw new Error(_0x3c5cdf['Ivwjg']);const _0x2abe3c=_0x3c5cdf['dIdse'](getApiBaseUrl),_0x3a70bf=await _0x3c5cdf[_0x6f713(0x1c3)](fetch,_0x2abe3c+'/api/v1/mcp/features/'+_0x484738+_0x6f713(0x192)+_0x445abc+_0x6f713(0x181),{'method':_0x3c5cdf['Nvybg'],'headers':{'Authorization':'Bearer\x20'+_0xba94f7}});if(!_0x3a70bf['ok']){const _0x4262af=await _0x3a70bf[_0x6f713(0x1b5)]();throw new Error('Failed\x20to\x20conclude\x20session:\x20'+_0x4262af);}return _0x3a70bf['json']();}export async function getActionItems(_0x25bf5b){const _0x1d47d0=_0x53ea,_0x2880c6={'rXeiS':_0x1d47d0(0x193),'bcyWA':_0x1d47d0(0x1ac)},_0x51a3e9=await getToken();if(!_0x51a3e9)throw new Error(_0x2880c6[_0x1d47d0(0x19c)]);const _0x5f017a=getApiBaseUrl(),_0x1dde8d=await fetch(_0x5f017a+'/api/v1/mcp/features/'+_0x25bf5b+_0x1d47d0(0x17e),{'method':_0x2880c6[_0x1d47d0(0x17f)],'headers':{'Authorization':_0x1d47d0(0x199)+_0x51a3e9}});if(!_0x1dde8d['ok']){const _0x1acd79=await _0x1dde8d[_0x1d47d0(0x1b5)]();throw new Error(_0x1d47d0(0x182)+_0x1acd79);}return _0x1dde8d['json']();}export async function getItemFeedback(_0xaca6d6,_0x2482eb){const _0x26ae32=_0x53ea,_0x56dc50={'ccLHX':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]'},_0xf7b3d8=await getToken();if(!_0xf7b3d8)throw new Error(_0x56dc50[_0x26ae32(0x1a0)]);const _0x392bd5=getApiBaseUrl(),_0x552a8d=await fetch(_0x392bd5+_0x26ae32(0x1bd)+_0xaca6d6+_0x26ae32(0x1a1)+_0x2482eb+'/feedback',{'method':'GET','headers':{'Authorization':'Bearer\x20'+_0xf7b3d8}});if(!_0x552a8d['ok']){const _0x551bfe=await _0x552a8d[_0x26ae32(0x1b5)]();throw new Error('Failed\x20to\x20get\x20item\x20feedback:\x20'+_0x551bfe);}return _0x552a8d[_0x26ae32(0x1c1)]();}export async function markCommentsAddressed(_0x3da696,_0x34cc53,_0x1e0919){const _0x5006a4=_0x53ea,_0x45d41f={'bgCAO':_0x5006a4(0x193),'hsNlE':function(_0x4a2024){return _0x4a2024();},'FzQyh':function(_0x26e3a8,_0x2b8f9d,_0x4f234e){return _0x26e3a8(_0x2b8f9d,_0x4f234e);}},_0x2b6a9d=await getToken();if(!_0x2b6a9d)throw new Error(_0x45d41f[_0x5006a4(0x184)]);const _0x5d962b=_0x45d41f[_0x5006a4(0x185)](getApiBaseUrl),_0x4f88c6=await _0x45d41f[_0x5006a4(0x194)](fetch,_0x5d962b+_0x5006a4(0x1bd)+_0x3da696+_0x5006a4(0x19a),{'method':_0x5006a4(0x1cb),'headers':{'Authorization':'Bearer\x20'+_0x2b6a9d,'Content-Type':_0x5006a4(0x1b3)},'body':JSON[_0x5006a4(0x1bb)]({'checklistItemId':_0x34cc53,'commentIds':_0x1e0919})});if(!_0x4f88c6['ok']){const _0x2f9025=await _0x4f88c6[_0x5006a4(0x1b5)]();throw new Error(_0x5006a4(0x1b8)+_0x2f9025);}}export async function softDeleteFeature(_0x27973c){const _0x4ecd88=_0x53ea,_0x294a16={'lqgOw':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','KAcXO':function(_0xb1f4c6){return _0xb1f4c6();}},_0x289355=await getToken();if(!_0x289355)throw new Error(_0x294a16[_0x4ecd88(0x19f)]);const _0x4c37c0=_0x294a16[_0x4ecd88(0x1ae)](getApiBaseUrl),_0xc44a9a=await fetch(_0x4c37c0+'/api/v1/mcp/features/'+_0x27973c,{'method':'DELETE','headers':{'Authorization':_0x4ecd88(0x199)+_0x289355}});if(!_0xc44a9a['ok']){const _0x745449=await _0xc44a9a['text']();throw new Error('Failed\x20to\x20delete\x20feature\x20review:\x20'+_0x745449);}}export async function restoreFeature(_0x12b7da){const _0x148101=_0x53ea,_0x3d3d47={'XWmOj':function(_0x438237){return _0x438237();},'EztLy':function(_0x540b81,_0x374639,_0x2a54ed){return _0x540b81(_0x374639,_0x2a54ed);},'dBLIP':'POST'},_0x2c553f=await _0x3d3d47['XWmOj'](getToken);if(!_0x2c553f)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3a8ff1=getApiBaseUrl(),_0x28e434=await _0x3d3d47['EztLy'](fetch,_0x3a8ff1+'/api/v1/mcp/features/'+_0x12b7da+_0x148101(0x1c2),{'method':_0x3d3d47['dBLIP'],'headers':{'Authorization':'Bearer\x20'+_0x2c553f}});if(!_0x28e434['ok']){const _0x3f111c=await _0x28e434[_0x148101(0x1b5)]();throw new Error('Failed\x20to\x20restore\x20feature\x20review:\x20'+_0x3f111c);}}
1
+ (function(_0x2e6f57,_0x58d78c){const _0x2e7e14=_0x55ad,_0x1ee524=_0x2e6f57();while(!![]){try{const _0x34827a=parseInt(_0x2e7e14(0x1a8))/0x1*(-parseInt(_0x2e7e14(0x1b9))/0x2)+-parseInt(_0x2e7e14(0x1b7))/0x3+-parseInt(_0x2e7e14(0x1dc))/0x4*(parseInt(_0x2e7e14(0x1cf))/0x5)+parseInt(_0x2e7e14(0x1ab))/0x6*(-parseInt(_0x2e7e14(0x1b3))/0x7)+parseInt(_0x2e7e14(0x1a5))/0x8*(-parseInt(_0x2e7e14(0x1ce))/0x9)+parseInt(_0x2e7e14(0x1ca))/0xa+parseInt(_0x2e7e14(0x1d1))/0xb*(parseInt(_0x2e7e14(0x1a4))/0xc);if(_0x34827a===_0x58d78c)break;else _0x1ee524['push'](_0x1ee524['shift']());}catch(_0x3984ed){_0x1ee524['push'](_0x1ee524['shift']());}}}(_0x4d84,0xc13f1));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0x4d84(){const _0x533a32=['608456EQfkuO','stringify','oGJey','129377LcjBvB','AAWVG','toString','2075148DIfdZv','hAaEL','/api/v1/mcp/features','POlxA','https://dashboard.ranger.net/billing','MDOUf','bcABU','join','28SiDhvi','POST','json','Failed\x20to\x20delete\x20feature\x20review:\x20','863241cKaboV','/comments/address','4aluRPH','Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20','Failed\x20to\x20get\x20item\x20feedback:\x20','eprrx','GET','set','Failed\x20to\x20get\x20feature\x20review\x20report:\x20','application/json','Failed\x20to\x20conclude\x20session:\x20','Jwzsp','PATCH','updateChecklistItem','hNhmA','gitBranch','/report','JUghq','sessionId','9377640HrhmdV','text','rmufU','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','63mjsilJ','37670pjCVtf','WDAHP','11AtyMlU','itemIds','ryfMu','includeDeleted','Failed\x20to\x20restore\x20feature\x20review:\x20','JUFvx','DvhrB','/sessions','Failed\x20to\x20get\x20feature\x20review:\x20','nSdNT','yaBgp','48AHtNiT','limit','true','Bearer\x20','status','ozRLX','EDtct','Failed\x20to\x20update\x20scenario:\x20','message','obBgP','lCxaq','Failed\x20to\x20create\x20scenario:\x20','Failed\x20to\x20get\x20action\x20items:\x20','rKsJU','style','/api/v1/mcp/features/','28878156yRjZyS'];_0x4d84=function(){return _0x533a32;};return _0x4d84();}import{withRetry}from'./retry.js';export async function createFeature(_0x1a5de7){const _0x18b306=_0x55ad,_0x209cc8={'HKKCT':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','JUghq':function(_0x4726cb,_0x4dabd6,_0xe1229a){return _0x4726cb(_0x4dabd6,_0xe1229a);},'krEjz':'POST','hNhmA':_0x18b306(0x1c0),'oGJey':'Feature\x20limit\x20exceeded'},_0xcb7dcc=await getToken();if(!_0xcb7dcc)throw new Error(_0x209cc8['HKKCT']);const _0x166b82=getApiBaseUrl(),_0x549fb6=await _0x209cc8[_0x18b306(0x1c8)](fetch,_0x166b82+_0x18b306(0x1ad),{'method':_0x209cc8['krEjz'],'headers':{'Authorization':_0x18b306(0x1df)+_0xcb7dcc,'Content-Type':_0x209cc8[_0x18b306(0x1c5)]},'body':JSON[_0x18b306(0x1a6)](_0x1a5de7)});if(!_0x549fb6['ok']){if(_0x549fb6[_0x18b306(0x1e0)]===0x192){const _0x147b00=await _0x549fb6[_0x18b306(0x1b5)](),_0x47a195=_0x147b00['billingUrl']||_0x18b306(0x1af);throw new Error((_0x147b00[_0x18b306(0x1e4)]||_0x209cc8[_0x18b306(0x1a7)])+'\x0a\x0aUpgrade\x20your\x20plan:\x20'+_0x47a195);}const _0x49d211=await _0x549fb6[_0x18b306(0x1cb)]();throw new Error('Failed\x20to\x20create\x20feature\x20review:\x20'+_0x49d211);}return _0x549fb6['json']();}export async function listFeatures(_0x58be07){const _0x1c2453=_0x55ad,_0x1fb9ea={'UCYQE':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','HRTJm':'gitRepoUrl','WDAHP':_0x1c2453(0x1c6),'obBgP':'offset','rKsJU':_0x1c2453(0x1d4),'lCxaq':_0x1c2453(0x1de),'Ovwkd':function(_0x49af2a,_0x105347,_0x909890){return _0x49af2a(_0x105347,_0x909890);},'fBrlU':'GET'},_0x410c2b=await getToken();if(!_0x410c2b)throw new Error(_0x1fb9ea['UCYQE']);const _0x5682d7=getApiBaseUrl(),_0x244709=new URLSearchParams();if(_0x58be07?.['gitRepoUrl'])_0x244709[_0x1c2453(0x1be)](_0x1fb9ea['HRTJm'],_0x58be07['gitRepoUrl']);if(_0x58be07?.['gitBranch'])_0x244709[_0x1c2453(0x1be)](_0x1fb9ea[_0x1c2453(0x1d0)],_0x58be07['gitBranch']);if(_0x58be07?.['limit'])_0x244709[_0x1c2453(0x1be)]('limit',_0x58be07[_0x1c2453(0x1dd)][_0x1c2453(0x1aa)]());if(_0x58be07?.['offset'])_0x244709['set'](_0x1fb9ea[_0x1c2453(0x1e5)],_0x58be07['offset'][_0x1c2453(0x1aa)]());if(_0x58be07?.['includeDeleted'])_0x244709[_0x1c2453(0x1be)](_0x1fb9ea[_0x1c2453(0x1e9)],_0x1fb9ea[_0x1c2453(0x1e6)]);const _0x5630ed=_0x5682d7+'/api/v1/mcp/features'+(_0x244709['toString']()?'?'+_0x244709['toString']():''),_0x1e2691=await _0x1fb9ea['Ovwkd'](fetch,_0x5630ed,{'method':_0x1fb9ea['fBrlU'],'headers':{'Authorization':'Bearer\x20'+_0x410c2b}});if(!_0x1e2691['ok']){const _0x38b154=await _0x1e2691['text']();throw new Error('Failed\x20to\x20list\x20feature\x20reviews:\x20'+_0x38b154);}return _0x1e2691[_0x1c2453(0x1b5)]();}export async function getFeature(_0x58ad65){const _0x52821b=_0x55ad,_0x4501df={'QtFPT':function(_0x13ba6c){return _0x13ba6c();},'JhDlT':_0x52821b(0x1cd)},_0x3cf303=await _0x4501df['QtFPT'](getToken);if(!_0x3cf303)throw new Error(_0x4501df['JhDlT']);const _0x46003f=getApiBaseUrl(),_0x16aee9=await fetch(_0x46003f+_0x52821b(0x1a3)+_0x58ad65,{'method':_0x52821b(0x1bd),'headers':{'Authorization':'Bearer\x20'+_0x3cf303}});if(!_0x16aee9['ok']){const _0x41be0e=await _0x16aee9['text']();throw new Error(_0x52821b(0x1d9)+_0x41be0e);}return _0x16aee9[_0x52821b(0x1b5)]();}function _0x55ad(_0x5273ce,_0x3ef896){_0x5273ce=_0x5273ce-0x1a3;const _0x4d841c=_0x4d84();let _0x55ada5=_0x4d841c[_0x5273ce];return _0x55ada5;}export async function updateFeature(_0x848186,_0xcce040){const _0x5930cf=_0x55ad,_0x41b825={'AAWVG':_0x5930cf(0x1cd),'ryfMu':function(_0x5bf6dc,_0x182910,_0x23bbc5){return _0x5bf6dc(_0x182910,_0x23bbc5);},'eprrx':'PATCH'},_0x409fbe=await getToken();if(!_0x409fbe)throw new Error(_0x41b825[_0x5930cf(0x1a9)]);const _0x4160cb=getApiBaseUrl(),_0x1106c0=await _0x41b825[_0x5930cf(0x1d3)](fetch,_0x4160cb+_0x5930cf(0x1a3)+_0x848186,{'method':_0x41b825[_0x5930cf(0x1bc)],'headers':{'Authorization':_0x5930cf(0x1df)+_0x409fbe,'Content-Type':'application/json'},'body':JSON['stringify'](_0xcce040)});if(!_0x1106c0['ok']){const _0x4872c7=await _0x1106c0[_0x5930cf(0x1cb)]();throw new Error('Failed\x20to\x20update\x20feature\x20review:\x20'+_0x4872c7);}return _0x1106c0['json']();}export async function createChecklistItem(_0x2a96cf,_0x17015b,_0x501684){const _0x3e7795=_0x55ad,_0x5ccd2e={'TJsct':function(_0x5aa32c,_0x33dcd8,_0xce0b37){return _0x5aa32c(_0x33dcd8,_0xce0b37);},'IoRYs':'application/json'},_0x92df70=await getToken();if(!_0x92df70)throw new Error(_0x3e7795(0x1cd));const _0x331b77=getApiBaseUrl(),_0x7ad6fc=await _0x5ccd2e['TJsct'](fetch,_0x331b77+'/api/v1/mcp/features/'+_0x2a96cf+'/checklist',{'method':'POST','headers':{'Authorization':_0x3e7795(0x1df)+_0x92df70,'Content-Type':_0x5ccd2e['IoRYs']},'body':JSON[_0x3e7795(0x1a6)]({'description':_0x17015b,'position':_0x501684})});if(!_0x7ad6fc['ok']){const _0x1e6619=await _0x7ad6fc['text']();throw new Error(_0x3e7795(0x1e7)+_0x1e6619);}return _0x7ad6fc['json']();}export async function updateChecklistItem(_0x269b04,_0x2ea2b4,_0x55b8cb){const _0x578044=_0x55ad;return withRetry(async()=>{const _0x1814e0=_0x55ad,_0x561478=await getToken();if(!_0x561478)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0xe2aac9=getApiBaseUrl(),_0x5be5dd=await fetch(_0xe2aac9+'/api/v1/mcp/features/'+_0x269b04+'/checklist/'+_0x2ea2b4,{'method':_0x1814e0(0x1c3),'headers':{'Authorization':_0x1814e0(0x1df)+_0x561478,'Content-Type':_0x1814e0(0x1c0)},'body':JSON['stringify'](_0x55b8cb)});if(!_0x5be5dd['ok']){const _0x4baae7=await _0x5be5dd[_0x1814e0(0x1cb)]();throw new Error(_0x1814e0(0x1e3)+_0x4baae7);}return _0x5be5dd[_0x1814e0(0x1b5)]();},{'label':_0x578044(0x1c4)});}export async function getFeatureReport(_0x6e4a68){const _0x15c8f3=_0x55ad,_0x31ff58={'rmufU':_0x15c8f3(0x1cd),'nenTb':function(_0x1f3ecd){return _0x1f3ecd();},'nRzMx':function(_0x3dc9fd,_0x48b08a,_0x5da260){return _0x3dc9fd(_0x48b08a,_0x5da260);},'SGsuh':'GET'},_0x3484de=await getToken();if(!_0x3484de)throw new Error(_0x31ff58[_0x15c8f3(0x1cc)]);const _0x44afb7=_0x31ff58['nenTb'](getApiBaseUrl),_0x58787d=await _0x31ff58['nRzMx'](fetch,_0x44afb7+'/api/v1/mcp/features/'+_0x6e4a68+_0x15c8f3(0x1c7),{'method':_0x31ff58['SGsuh'],'headers':{'Authorization':'Bearer\x20'+_0x3484de}});if(!_0x58787d['ok']){const _0x4e108e=await _0x58787d['text']();throw new Error(_0x15c8f3(0x1bf)+_0x4e108e);}return _0x58787d[_0x15c8f3(0x1b5)]();}export async function getFeatureReportMarkdown(_0x529066,_0x5313ed){const _0x5576e8=_0x55ad,_0x54f49d={'fELac':function(_0x74ce8e){return _0x74ce8e();},'bykgd':function(_0x5e8df,_0x1a4b74){return _0x5e8df&&_0x1a4b74;},'DvhrB':'style','Jwzsp':'GET'},_0x3f1620=await getToken();if(!_0x3f1620)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x905dfd=_0x54f49d['fELac'](getApiBaseUrl),_0x18f5cb=new URLSearchParams(),_0xe84af=(_0x5313ed?.[_0x5576e8(0x1d2)]?.['length']??0x0)>0x0,_0x1a601f=Boolean(_0x5313ed?.['sessionId']);_0xe84af&&_0x5313ed?.['itemIds']&&_0x18f5cb['set'](_0x5576e8(0x1d2),_0x5313ed[_0x5576e8(0x1d2)][_0x5576e8(0x1b2)](','));_0x1a601f&&_0x5313ed?.[_0x5576e8(0x1c9)]&&_0x18f5cb['set']('sessionId',_0x5313ed['sessionId']);_0x54f49d['bykgd'](!_0xe84af,!_0x1a601f)&&_0x5313ed?.[_0x5576e8(0x1ea)]&&_0x18f5cb[_0x5576e8(0x1be)](_0x54f49d[_0x5576e8(0x1d7)],_0x5313ed['style']);const _0x2a8962=_0x905dfd+_0x5576e8(0x1a3)+_0x529066+'/report/markdown',_0x4aad4b=''+_0x2a8962+(_0x18f5cb[_0x5576e8(0x1aa)]()?'?'+_0x18f5cb['toString']():''),_0x31f66d=await fetch(_0x4aad4b,{'method':_0x54f49d[_0x5576e8(0x1c2)],'headers':{'Authorization':_0x5576e8(0x1df)+_0x3f1620}});if(!_0x31f66d['ok']){const _0x22bc8c=await _0x31f66d['text']();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20'+_0x22bc8c);}return _0x31f66d['text']();}export async function listFeatureSessions(_0x532963){const _0x1be012=_0x55ad,_0x20d80d={'POlxA':function(_0x3ad3a6){return _0x3ad3a6();},'ozRLX':_0x1be012(0x1cd),'lQffF':function(_0x4eba34,_0x2dbefc,_0x3787b0){return _0x4eba34(_0x2dbefc,_0x3787b0);}},_0x19c201=await _0x20d80d[_0x1be012(0x1ae)](getToken);if(!_0x19c201)throw new Error(_0x20d80d[_0x1be012(0x1e1)]);const _0x424899=getApiBaseUrl(),_0x5f16e1=await _0x20d80d['lQffF'](fetch,_0x424899+_0x1be012(0x1a3)+_0x532963+_0x1be012(0x1d8),{'method':'GET','headers':{'Authorization':'Bearer\x20'+_0x19c201}});if(!_0x5f16e1['ok']){const _0x502734=await _0x5f16e1[_0x1be012(0x1cb)]();throw new Error('Failed\x20to\x20list\x20sessions:\x20'+_0x502734);}return _0x5f16e1['json']();}export async function startSession(_0x178060,_0x2dad56){const _0x1eee86=_0x55ad,_0x27f7b0={'HjLVg':'POST'},_0x55f906=await getToken();if(!_0x55f906)throw new Error(_0x1eee86(0x1cd));const _0x5ac854=getApiBaseUrl(),_0x29016c=await fetch(_0x5ac854+_0x1eee86(0x1a3)+_0x178060+'/sessions/'+_0x2dad56+'/start',{'method':_0x27f7b0['HjLVg'],'headers':{'Authorization':'Bearer\x20'+_0x55f906}});if(!_0x29016c['ok']){const _0x565bcf=await _0x29016c[_0x1eee86(0x1cb)]();throw new Error('Failed\x20to\x20start\x20session:\x20'+_0x565bcf);}return _0x29016c[_0x1eee86(0x1b5)]();}export async function concludeSession(_0x16ea98,_0x38c260){const _0x12fcbe=_0x55ad,_0x3d3f6a={'Irxwg':_0x12fcbe(0x1cd),'YhmIK':function(_0x8ea817){return _0x8ea817();},'EDtct':function(_0x33b738,_0x575428,_0x18cae3){return _0x33b738(_0x575428,_0x18cae3);}},_0xfa5965=await getToken();if(!_0xfa5965)throw new Error(_0x3d3f6a['Irxwg']);const _0x379c7f=_0x3d3f6a['YhmIK'](getApiBaseUrl),_0xb662e5=await _0x3d3f6a[_0x12fcbe(0x1e2)](fetch,_0x379c7f+_0x12fcbe(0x1a3)+_0x16ea98+'/sessions/'+_0x38c260+'/conclude',{'method':'POST','headers':{'Authorization':_0x12fcbe(0x1df)+_0xfa5965}});if(!_0xb662e5['ok']){const _0x3ccfae=await _0xb662e5['text']();throw new Error(_0x12fcbe(0x1c1)+_0x3ccfae);}return _0xb662e5[_0x12fcbe(0x1b5)]();}export async function getActionItems(_0x15a19c){const _0x10209f=_0x55ad,_0x25386e={'RyOPZ':function(_0x4de8a8){return _0x4de8a8();},'yaBgp':'GET'},_0x550a00=await getToken();if(!_0x550a00)throw new Error(_0x10209f(0x1cd));const _0x576ded=_0x25386e['RyOPZ'](getApiBaseUrl),_0x559a85=await fetch(_0x576ded+_0x10209f(0x1a3)+_0x15a19c+'/action-items',{'method':_0x25386e[_0x10209f(0x1db)],'headers':{'Authorization':'Bearer\x20'+_0x550a00}});if(!_0x559a85['ok']){const _0x38d4ca=await _0x559a85['text']();throw new Error(_0x10209f(0x1e8)+_0x38d4ca);}return _0x559a85['json']();}export async function getItemFeedback(_0x10dcf3,_0x5740d9){const _0x4d5e7e=_0x55ad,_0xa91ec3={'hAaEL':function(_0x4cd5f2){return _0x4cd5f2();},'EBhxa':function(_0x2e0c90,_0x3c347a,_0x378c61){return _0x2e0c90(_0x3c347a,_0x378c61);}},_0x185ada=await getToken();if(!_0x185ada)throw new Error(_0x4d5e7e(0x1cd));const _0x2f403b=_0xa91ec3[_0x4d5e7e(0x1ac)](getApiBaseUrl),_0xefc83e=await _0xa91ec3['EBhxa'](fetch,_0x2f403b+_0x4d5e7e(0x1a3)+_0x10dcf3+'/checklist-items/'+_0x5740d9+'/feedback',{'method':'GET','headers':{'Authorization':_0x4d5e7e(0x1df)+_0x185ada}});if(!_0xefc83e['ok']){const _0x1a7d8b=await _0xefc83e[_0x4d5e7e(0x1cb)]();throw new Error(_0x4d5e7e(0x1bb)+_0x1a7d8b);}return _0xefc83e['json']();}export async function markCommentsAddressed(_0x1bedaa,_0x2f5d5f,_0x89e7cb){const _0x30becf=_0x55ad,_0x334a2f={'lJjVB':function(_0x13b096){return _0x13b096();},'MDOUf':_0x30becf(0x1cd),'pgoRX':function(_0x5b5e86,_0x16f428,_0x27175e){return _0x5b5e86(_0x16f428,_0x27175e);},'PAspn':_0x30becf(0x1b4),'iaPZG':'application/json'},_0x4a5a8f=await _0x334a2f['lJjVB'](getToken);if(!_0x4a5a8f)throw new Error(_0x334a2f[_0x30becf(0x1b0)]);const _0x2863df=_0x334a2f['lJjVB'](getApiBaseUrl),_0x43e468=await _0x334a2f['pgoRX'](fetch,_0x2863df+_0x30becf(0x1a3)+_0x1bedaa+_0x30becf(0x1b8),{'method':_0x334a2f['PAspn'],'headers':{'Authorization':_0x30becf(0x1df)+_0x4a5a8f,'Content-Type':_0x334a2f['iaPZG']},'body':JSON['stringify']({'checklistItemId':_0x2f5d5f,'commentIds':_0x89e7cb})});if(!_0x43e468['ok']){const _0x211675=await _0x43e468[_0x30becf(0x1cb)]();throw new Error(_0x30becf(0x1ba)+_0x211675);}}export async function softDeleteFeature(_0x42872b){const _0x313f7e=_0x55ad,_0x5b1f34={'JUFvx':function(_0x385e6e){return _0x385e6e();},'nSdNT':function(_0x4bea2c){return _0x4bea2c();},'bcABU':function(_0x72be35,_0x578c65,_0xc03bf6){return _0x72be35(_0x578c65,_0xc03bf6);}},_0x4e1ac3=await _0x5b1f34[_0x313f7e(0x1d6)](getToken);if(!_0x4e1ac3)throw new Error(_0x313f7e(0x1cd));const _0x3fc266=_0x5b1f34[_0x313f7e(0x1da)](getApiBaseUrl),_0x31fd43=await _0x5b1f34[_0x313f7e(0x1b1)](fetch,_0x3fc266+_0x313f7e(0x1a3)+_0x42872b,{'method':'DELETE','headers':{'Authorization':_0x313f7e(0x1df)+_0x4e1ac3}});if(!_0x31fd43['ok']){const _0x64fd89=await _0x31fd43['text']();throw new Error(_0x313f7e(0x1b6)+_0x64fd89);}}export async function restoreFeature(_0x453bfe){const _0x5b1787=_0x55ad,_0xbfb32b={'WyhUa':'POST'},_0xeaf7dd=await getToken();if(!_0xeaf7dd)throw new Error(_0x5b1787(0x1cd));const _0x2cba9c=getApiBaseUrl(),_0x1fa82a=await fetch(_0x2cba9c+_0x5b1787(0x1a3)+_0x453bfe+'/restore',{'method':_0xbfb32b['WyhUa'],'headers':{'Authorization':'Bearer\x20'+_0xeaf7dd}});if(!_0x1fa82a['ok']){const _0x5c9464=await _0x1fa82a[_0x5b1787(0x1cb)]();throw new Error(_0x5b1787(0x1d5)+_0x5c9464);}}