woozlit 2.1.4 → 2.2.0

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 (64) hide show
  1. package/README.md +28 -0
  2. package/dist/auth/login.js +1 -1
  3. package/dist/browser/index.js +1 -1
  4. package/dist/browser/server.js +1 -1
  5. package/dist/browser/tools.js +1 -1
  6. package/dist/chat/agent.js +1 -1
  7. package/dist/config/mcp.js +1 -1
  8. package/dist/config/settings.js +1 -1
  9. package/dist/discord/client.js +1 -1
  10. package/dist/discord/config.js +1 -1
  11. package/dist/discord/index.js +1 -1
  12. package/dist/discord/setup.js +1 -1
  13. package/dist/email/config.js +1 -1
  14. package/dist/email/index.js +1 -1
  15. package/dist/email/service.js +1 -1
  16. package/dist/email/setup.js +1 -1
  17. package/dist/github/api.js +1 -1
  18. package/dist/github/auth.js +1 -1
  19. package/dist/github/auto-setup.js +1 -1
  20. package/dist/github/index.js +1 -1
  21. package/dist/github/manual-setup.js +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/mcp-servers/computer-use.js +1 -1
  24. package/dist/services/bot-manager.js +1 -1
  25. package/dist/services/notifications.js +1 -1
  26. package/dist/services/voice-agent.js +1 -1
  27. package/dist/telegram/bot.js +1 -1
  28. package/dist/telegram/config.js +1 -1
  29. package/dist/telegram/index.js +1 -1
  30. package/dist/telegram/reminders.js +1 -1
  31. package/dist/telegram/setup.js +1 -1
  32. package/dist/tools/command.js +1 -1
  33. package/dist/tools/file.d.ts +8 -0
  34. package/dist/tools/file.js +1 -1
  35. package/dist/tools/git.js +1 -1
  36. package/dist/tools/index.d.ts +1 -1
  37. package/dist/tools/index.js +1 -1
  38. package/dist/tools/knowledge.d.ts +4 -0
  39. package/dist/tools/knowledge.js +1 -0
  40. package/dist/tools/mcp.js +1 -1
  41. package/dist/tools/network.js +1 -1
  42. package/dist/tools/project.js +1 -1
  43. package/dist/tools/rollback.js +1 -1
  44. package/dist/tools/rules.js +1 -1
  45. package/dist/tools/system.js +1 -1
  46. package/dist/twilio/config.js +1 -1
  47. package/dist/twilio/index.js +1 -1
  48. package/dist/twilio/server.js +1 -1
  49. package/dist/twilio/setup.js +1 -1
  50. package/dist/ui/output.js +1 -1
  51. package/dist/ui/select.js +1 -1
  52. package/dist/ui/themes.js +1 -1
  53. package/dist/utils/api.d.ts +1 -1
  54. package/dist/utils/api.js +1 -1
  55. package/dist/utils/chat-history.js +1 -1
  56. package/dist/utils/history.js +1 -1
  57. package/dist/utils/mcp-installer.js +1 -1
  58. package/dist/utils/platform.js +1 -1
  59. package/dist/utils/storage.d.ts +3 -0
  60. package/dist/utils/storage.js +1 -1
  61. package/dist/utils/update-check.js +1 -1
  62. package/dist/utils/updater.js +1 -1
  63. package/dist/verify_repro.js +1 -1
  64. package/package.json +1 -1
@@ -1 +1 @@
1
- const a7_0x306b19=a7_0x42bd;function a7_0x3dff(){const _0x20751a=['/project','join','chdir','name','text','ready','sendTyping','copy_file','channel','6CYrjnS','input','browser_fill','directory','send_input','parse','startsWith','!status','delete','attachments','/newchat','read_file_lines','branch','match','file_info','get','Changed\x20to:\x20','!cd\x20','search','read_json','open_in_editor','Failed\x20to\x20send\x20file:\x20','rename_file','username','list_directory','system','set','Cleared.','!project','write_json','messageCreate','clipboard_read','Exit:\x20','info','...','88UnRmhn','pattern','/files','reply','body','mentions','getBotToken','grep_recursive','assistant','\x0aModel:\x20','replace_in_files','pid','pids','!newchat','length','send','once','stderr','success','search_file','10781880mkxRnx','[Discord]\x20','args','slice','split','Tool\x20result\x20for\x20','tree','browser_open','Failed:\x20','version','/status','1788410zZpVxW','wait','has','4526838XoPOaW','browser_close','fetch_url','url','\x0aTree:\x0a','\x20bytes)\x20saved\x20to\x20','\x0a```\x0a','user','script','value','GuildMessages','delete_file','github_create_pr','git_add','size','command','528760tbugjI','github_read_file','DirectMessages','run_command','message','tag','content','upload_','git_log','5738WUnhGO','/run\x20','push','!clear','Guilds','MessageContent','replace','owner','\x0aProject:\x20','No\x20output','depth','extensions','git_diff','New\x20chat\x20session\x20started.','path','Saved:\x20','Unknown\x20tool:\x20','head','\x0a```','catch','git_branch','type','author','stringify','../github/api.js','94lbJusQ','patches','guildId','set_env','send_file','browser_screenshot','patch_file','title','git_status','from','cwd','56jxHaDb','entries','.\x20Try\x20again\x20or\x20skip.','selector','../browser/index.js','/clear','output','browser_click','arrayBuffer','base','branchName','[F]','6TTlVTt','[File\x20received:\x20','Channel','terminate','25148KgbvqC','edit_file','data','393323iaReYx','!run\x20','[Discord]\x20Connected\x20as\x20','substring','You\x20are\x20Woozlit\x20AI,\x20an\x20autonomous\x20agent\x20connected\x20via\x20Discord.\x20Complete\x20tasks\x20immediately.\x0a\x0aRULES:\x0a1.\x20Execute\x20tools\x20FIRST,\x20explain\x20NEVER.\x20Be\x20concise.\x0a2.\x20No\x20emojis.\x20Maximum\x201-2\x20sentences\x20for\x20final\x20responses.\x0a3.\x20Use\x20tool\x20blocks\x20to\x20execute\x20actions.\x0a\x0aTOOLS:\x0a-\x20run_command:\x20{command,\x20wait,\x20background}\x0a-\x20read_terminal:\x20{}\x0a-\x20send_input:\x20{input}\x0a-\x20terminate:\x20{}\x0a-\x20create_file:\x20{path,\x20content}\x0a-\x20read_file:\x20{path}\x0a-\x20list_directory:\x20{path}\x0a-\x20edit_file:\x20{path,\x20search,\x20replace}\x0a-\x20delete_file:\x20{path}\x0a-\x20rename_file:\x20{from,\x20to}\x0a-\x20copy_file:\x20{from,\x20to}\x0a-\x20file_info:\x20{path}\x0a-\x20read_file_lines:\x20{path,\x20start,\x20end}\x0a-\x20find_files:\x20{path,\x20pattern}\x0a-\x20search_directory:\x20{path,\x20pattern}\x0a-\x20send_file:\x20{path}\x20-\x20send\x20file\x20to\x20Discord\x0a-\x20git_status,\x20git_diff,\x20git_log,\x20git_add,\x20git_commit,\x20git_branch\x0a-\x20fetch_url:\x20{url}\x0a-\x20download_file:\x20{url,\x20path}\x0a-\x20get_env:\x20{name},\x20set_env:\x20{name,\x20value}\x0a-\x20get_system_info:\x20{}\x0a-\x20clipboard_read,\x20clipboard_write:\x20{text}\x0a-\x20tree:\x20{path,\x20depth}\x0a-\x20grep_recursive:\x20{path,\x20pattern}\x0a-\x20replace_in_files:\x20{path,\x20search,\x20replace}\x0a-\x20powershell_run:\x20{script}\x0a-\x20zip_files:\x20{files,\x20output},\x20unzip_files:\x20{path,\x20output}\x0a-\x20write_json:\x20{path,\x20data},\x20read_json:\x20{path}\x0a-\x20patch_file:\x20{path,\x20patches}\x0a-\x20open_in_editor:\x20{path}\x0a-\x20github_read_file,\x20github_create_pr,\x20github_create_branch\x0a-\x20browser_open,\x20browser_click,\x20browser_fill,\x20browser_screenshot,\x20browser_snapshot,\x20browser_close\x0a\x0aTOOL\x20FORMAT:\x0a```tool\x0a{\x22name\x22:\x22tool_name\x22,\x22args\x22:{\x22key\x22:\x22value\x22}}\x0a```','!files\x20','stdout','trim','repo','github_create_branch'];a7_0x3dff=function(){return _0x20751a;};return a7_0x3dff();}(function(_0x386f31,_0x5641ee){const _0x3d0bec=a7_0x42bd,_0x2c3d19=_0x386f31();while(!![]){try{const _0x564791=parseInt(_0x3d0bec(0x11b))/0x1*(parseInt(_0x3d0bec(0x134))/0x2)+-parseInt(_0x3d0bec(0xa3))/0x3*(-parseInt(_0x3d0bec(0xa7))/0x4)+parseInt(_0x3d0bec(0xff))/0x5*(-parseInt(_0x3d0bec(0xbd))/0x6)+parseInt(_0x3d0bec(0xaa))/0x7*(parseInt(_0x3d0bec(0x13f))/0x8)+-parseInt(_0x3d0bec(0x102))/0x9+parseInt(_0x3d0bec(0x112))/0xa*(-parseInt(_0x3d0bec(0xe0))/0xb)+parseInt(_0x3d0bec(0xf4))/0xc;if(_0x564791===_0x5641ee)break;else _0x2c3d19['push'](_0x2c3d19['shift']());}catch(_0x5080fe){_0x2c3d19['push'](_0x2c3d19['shift']());}}}(a7_0x3dff,0x46e61));function a7_0x42bd(_0x521f8d,_0x34812e){_0x521f8d=_0x521f8d-0xa0;const _0x3dfff7=a7_0x3dff();let _0x42bdb3=_0x3dfff7[_0x521f8d];return _0x42bdb3;}import{Client,GatewayIntentBits,ChannelType,Partials,AttachmentBuilder}from'discord.js';import{join,resolve,basename}from'path';import*as a7_0x3f22f4 from'./config.js';import*as a7_0x52a934 from'../ui/output.js';import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,readTerminalOutput,sendTerminalInput,terminateProcess,deleteFile,renameFile,copyFile,fileInfo,readFileLines,findFiles,searchDirectory}from'../tools/index.js';import{gitStatus,gitDiff,gitLog,gitAdd,gitCommit,gitBranch}from'../tools/git.js';import{fetchUrl,downloadFile as a7_0x1c493b}from'../tools/network.js';import{getEnv,setEnv,getSystemInfo,clipboardRead,clipboardWrite}from'../tools/system.js';import{tree,grepRecursive,replaceInFiles,openInEditor,zipFiles,unzipFiles,writeJson,readJson,patchFile,powershellRun}from'../tools/project.js';import{registerDiscordClient}from'../services/notifications.js';let client=null,isRunning=![];const chatHistories=new Map(),SYSTEM_PROMPT=a7_0x306b19(0xae);async function executeToolCall(_0x5545f6,_0x4fc17d,_0x3f590f){const _0x79e12d=a7_0x306b19;switch(_0x5545f6){case _0x79e12d(0x115):{const _0xe0758c=await runCommand(_0x4fc17d[_0x79e12d(0x111)],undefined,_0x4fc17d['background']||![],_0x4fc17d[_0x79e12d(0x100)]||0x7530);return _0xe0758c;}case'read_terminal':return readTerminalOutput(_0x4fc17d[_0x79e12d(0xeb)]);case _0x79e12d(0xc1):return sendTerminalInput(_0x4fc17d[_0x79e12d(0xbe)],_0x4fc17d['pid']);case _0x79e12d(0xa6):return terminateProcess(_0x4fc17d[_0x79e12d(0xeb)]);case'create_file':return createFile(_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d[_0x79e12d(0x118)]);case'read_file':return readFile(_0x4fc17d['path']);case _0x79e12d(0xd5):return listDirectory(_0x4fc17d[_0x79e12d(0x129)]||'.');case _0x79e12d(0xa8):return editFile(_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d['search'],_0x4fc17d[_0x79e12d(0x121)]);case _0x79e12d(0xf3):return searchFile(_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d[_0x79e12d(0xe1)]);case _0x79e12d(0x10d):return deleteFile(_0x4fc17d[_0x79e12d(0x129)]);case _0x79e12d(0xd3):return renameFile(_0x4fc17d[_0x79e12d(0x13d)]||_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d['to']);case _0x79e12d(0xbb):return copyFile(_0x4fc17d['from']||_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d['to']);case _0x79e12d(0xcb):return fileInfo(_0x4fc17d['path']);case _0x79e12d(0xc8):return readFileLines(_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d['start']||0x1,_0x4fc17d['end']||0x32);case'find_files':return findFiles(_0x4fc17d['path']||'.',_0x4fc17d[_0x79e12d(0xe1)]);case'search_directory':return searchDirectory(_0x4fc17d['path']||'.',_0x4fc17d[_0x79e12d(0xe1)]);case _0x79e12d(0x138):{try{const _0x5a553d=resolve(process[_0x79e12d(0x13e)](),_0x4fc17d[_0x79e12d(0x129)]);return await _0x3f590f('__Sending\x20file:\x20'+basename(_0x5a553d)+'__'),{'success':!![],'sent':!![],'note':'File\x20will\x20be\x20attached\x20separately'};}catch(_0x4188a0){return{'error':_0x79e12d(0xd2)+_0x4188a0};}}case _0x79e12d(0x13c):return gitStatus();case _0x79e12d(0x127):return gitDiff(_0x4fc17d[_0x79e12d(0x129)]);case _0x79e12d(0x11a):return gitLog(_0x4fc17d['count']||0xa);case _0x79e12d(0x10f):return gitAdd(_0x4fc17d[_0x79e12d(0x129)]||'.');case'git_commit':return gitCommit(_0x4fc17d[_0x79e12d(0x116)]);case _0x79e12d(0x12f):return gitBranch();case _0x79e12d(0x104):return fetchUrl(_0x4fc17d[_0x79e12d(0x105)]);case'download_file':return a7_0x1c493b(_0x4fc17d[_0x79e12d(0x105)],_0x4fc17d[_0x79e12d(0x129)]);case'get_env':return getEnv(_0x4fc17d[_0x79e12d(0xb7)]);case _0x79e12d(0x137):return setEnv(_0x4fc17d[_0x79e12d(0xb7)],_0x4fc17d['value']);case'get_system_info':return getSystemInfo();case _0x79e12d(0xdc):return clipboardRead();case'clipboard_write':return clipboardWrite(_0x4fc17d[_0x79e12d(0xb8)]);case _0x79e12d(0xfa):return tree(_0x4fc17d[_0x79e12d(0x129)]||'.',_0x4fc17d[_0x79e12d(0x125)]||0x3);case _0x79e12d(0xe7):return grepRecursive(_0x4fc17d[_0x79e12d(0x129)]||'.',_0x4fc17d[_0x79e12d(0xe1)],_0x4fc17d[_0x79e12d(0x126)]);case _0x79e12d(0xea):return replaceInFiles(_0x4fc17d[_0x79e12d(0x129)]||'.',_0x4fc17d[_0x79e12d(0xcf)],_0x4fc17d['replace'],_0x4fc17d['extensions']);case'powershell_run':return powershellRun(_0x4fc17d[_0x79e12d(0x10a)]||_0x4fc17d['command']);case'zip_files':return zipFiles(_0x4fc17d['files']||[_0x4fc17d[_0x79e12d(0x129)]],_0x4fc17d[_0x79e12d(0x145)]||'archive.zip');case'unzip_files':return unzipFiles(_0x4fc17d['path'],_0x4fc17d[_0x79e12d(0x145)]||'.');case _0x79e12d(0xda):return writeJson(_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d['data']);case _0x79e12d(0xd0):return readJson(_0x4fc17d[_0x79e12d(0x129)]);case _0x79e12d(0x13a):return patchFile(_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d[_0x79e12d(0x135)]);case _0x79e12d(0xd1):return openInEditor(_0x4fc17d[_0x79e12d(0x129)]);case _0x79e12d(0x113):{const {readFile:_0x5a692c}=await import(_0x79e12d(0x133));return _0x5a692c(_0x4fc17d[_0x79e12d(0x122)],_0x4fc17d['repo'],_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d[_0x79e12d(0xc9)]);}case _0x79e12d(0xb3):{const {createBranch:_0x2e371c}=await import('../github/api.js');return _0x2e371c(_0x4fc17d[_0x79e12d(0x122)],_0x4fc17d[_0x79e12d(0xb2)],_0x4fc17d[_0x79e12d(0xa1)],_0x4fc17d['fromBranch']);}case _0x79e12d(0x10e):{const {createPullRequest:_0x348232}=await import('../github/api.js');return _0x348232(_0x4fc17d[_0x79e12d(0x122)],_0x4fc17d[_0x79e12d(0xb2)],_0x4fc17d[_0x79e12d(0x13b)],_0x4fc17d[_0x79e12d(0x12c)],_0x4fc17d[_0x79e12d(0xa0)],_0x4fc17d[_0x79e12d(0xe4)]);}case _0x79e12d(0xfb):{const {browserOpen:_0x47069e,startBrowserServer:_0x41dd6d,isBrowserServerRunning:_0x28b496}=await import('../browser/index.js');if(!_0x28b496())await _0x41dd6d();return _0x47069e(_0x4fc17d[_0x79e12d(0x105)]);}case _0x79e12d(0x146):{const {browserClick:_0x27e9c6}=await import(_0x79e12d(0x143));return _0x27e9c6(_0x4fc17d['selector']);}case _0x79e12d(0xbf):{const {browserFill:_0x6c5db7}=await import(_0x79e12d(0x143));return _0x6c5db7(_0x4fc17d[_0x79e12d(0x142)],_0x4fc17d[_0x79e12d(0x10b)]);}case'browser_snapshot':{const {browserSnapshot:_0x464814}=await import('../browser/index.js');return _0x464814();}case _0x79e12d(0x139):{const {browserScreenshot:_0x2986af}=await import(_0x79e12d(0x143));return _0x2986af();}case _0x79e12d(0x103):{const {browserClose:_0x412f0d}=await import('../browser/index.js');return _0x412f0d();}default:return{'error':_0x79e12d(0x12b)+_0x5545f6};}}async function processDiscordAgentLoop(_0x143c08,_0xd83f7b,_0x27eb11,_0x51db0d){const _0x2de6bc=a7_0x306b19;let _0x1202bb=0x0;const _0x29d2f3=0x14;while(_0x1202bb<_0x29d2f3){_0x1202bb++;let _0x5d60c0='';try{const _0x51bdcf=await sendChatMessage(_0xd83f7b,_0x143c08,_0x33feea=>{_0x5d60c0+=_0x33feea;});_0x5d60c0=_0x51bdcf[_0x2de6bc(0x118)];}catch(_0x50c86b){await _0x27eb11(_0x2de6bc(0xfc)+(_0x50c86b[_0x2de6bc(0x116)]?.['substring'](0x0,0x64)||'Error'));return;}_0x143c08[_0x2de6bc(0x11d)]({'role':_0x2de6bc(0xe8),'content':_0x5d60c0});let _0x1b9f41=_0x5d60c0['match'](/```tool\s*([\s\S]*?)```/);if(!_0x1b9f41)_0x1b9f41=_0x5d60c0[_0x2de6bc(0xca)](/\*\*\*tool\s*([\s\S]*?)\*\*\*/);if(!_0x1b9f41)_0x1b9f41=_0x5d60c0[_0x2de6bc(0xca)](/```json\s*({[\s\S]*?"name"[\s\S]*?})\s*```/);if(!_0x1b9f41){let _0x179da6=_0x5d60c0[_0x2de6bc(0x121)](/<reasoning>[\s\S]*?<\/reasoning>/g,'')['replace'](/<text>|<\/text>/g,'')[_0x2de6bc(0x121)](/```tool[\s\S]*?```/g,'')[_0x2de6bc(0x121)](/\*\*\*tool[\s\S]*?\*\*\*/g,'')[_0x2de6bc(0x121)](/#{1,6}\s*/g,'')[_0x2de6bc(0xb1)]();if(_0x179da6){if(_0x179da6['length']>0x7d0){const _0x3977fe=_0x179da6[_0x2de6bc(0xca)](/[\s\S]{1,2000}/g)||[];for(const _0x56f29c of _0x3977fe)await _0x27eb11(_0x56f29c);}else await _0x27eb11(_0x179da6);}break;}try{const _0x46ae32=JSON[_0x2de6bc(0xc2)](_0x1b9f41[0x1]['trim']());a7_0x52a934[_0x2de6bc(0xde)]('[Discord]\x20Tool:\x20'+_0x46ae32['name']);const _0x5c4779=await executeToolCall(_0x46ae32[_0x2de6bc(0xb7)],_0x46ae32[_0x2de6bc(0xf6)],_0x27eb11);_0x46ae32['name']===_0x2de6bc(0x138)&&_0x46ae32[_0x2de6bc(0xf6)][_0x2de6bc(0x129)]&&await _0x51db0d(resolve(process[_0x2de6bc(0x13e)](),_0x46ae32[_0x2de6bc(0xf6)]['path'])),_0x143c08[_0x2de6bc(0x11d)]({'role':_0x2de6bc(0x109),'content':_0x2de6bc(0xf9)+_0x46ae32[_0x2de6bc(0xb7)]+':\x0a'+JSON[_0x2de6bc(0x132)](_0x5c4779,null,0x2)}),await new Promise(_0x5da042=>setTimeout(_0x5da042,0xc8));}catch(_0x5b3cb7){_0x143c08['push']({'role':_0x2de6bc(0x109),'content':'Tool\x20error:\x20'+_0x5b3cb7+_0x2de6bc(0x141)});}}}function getOrCreateHistory(_0x4646ce){const _0x102756=a7_0x306b19;return!chatHistories[_0x102756(0x101)](_0x4646ce)&&chatHistories[_0x102756(0xd7)](_0x4646ce,[{'role':_0x102756(0xd6),'content':SYSTEM_PROMPT}]),chatHistories[_0x102756(0xcc)](_0x4646ce);}export async function startBot(){const _0x4170cd=a7_0x306b19,_0x3326c7=a7_0x3f22f4[_0x4170cd(0xe6)]();if(!_0x3326c7)return![];if(isRunning)return!![];try{return client=new Client({'intents':[GatewayIntentBits[_0x4170cd(0x11f)],GatewayIntentBits[_0x4170cd(0x10c)],GatewayIntentBits[_0x4170cd(0x120)],GatewayIntentBits[_0x4170cd(0x114)]],'partials':[Partials[_0x4170cd(0xa5)]]}),client[_0x4170cd(0xf0)](_0x4170cd(0xb9),()=>{const _0x484107=_0x4170cd;a7_0x52a934[_0x484107(0xf2)](_0x484107(0xac)+client?.[_0x484107(0x109)]?.[_0x484107(0x117)]),isRunning=!![];if(client)registerDiscordClient(client);}),client['on'](_0x4170cd(0xdb),async _0x47101b=>{const _0x4eb7a5=_0x4170cd;if(_0x47101b[_0x4eb7a5(0x131)]['bot'])return;const _0x3e82e1=_0x47101b[_0x4eb7a5(0xbc)][_0x4eb7a5(0x130)]===ChannelType['DM'],_0x3c424a=client?.['user']&&_0x47101b[_0x4eb7a5(0xe5)][_0x4eb7a5(0x101)](client[_0x4eb7a5(0x109)]);if(!_0x3e82e1&&!_0x3c424a)return;const _0x39392d=_0x47101b['content'][_0x4eb7a5(0x121)](/<@!?[0-9]+>/g,'')[_0x4eb7a5(0xb1)](),_0x1c948e=_0x47101b[_0x4eb7a5(0x131)]['id'],_0x436dde=(_0x47101b[_0x4eb7a5(0x136)]||'dm')+'-'+_0x47101b['channelId']+'-'+_0x1c948e,_0x5cdbf1=async _0x33d90e=>{const _0x53be32=_0x4eb7a5;await _0x47101b[_0x53be32(0xbc)][_0x53be32(0xef)](_0x33d90e)[_0x53be32(0x12e)](()=>{});},_0x17ba4b=async _0x2ba4b7=>{const _0x41a038=_0x4eb7a5;try{const _0xdbb13c=new AttachmentBuilder(_0x2ba4b7);await _0x47101b[_0x41a038(0xbc)][_0x41a038(0xef)]({'files':[_0xdbb13c]});}catch{}};if(_0x39392d===_0x4eb7a5(0xc7)||_0x39392d===_0x4eb7a5(0xed)){chatHistories[_0x4eb7a5(0xc5)](_0x436dde),await _0x47101b[_0x4eb7a5(0xe3)](_0x4eb7a5(0x128));return;}if(_0x39392d===_0x4eb7a5(0x144)||_0x39392d===_0x4eb7a5(0x11e)){chatHistories[_0x4eb7a5(0xc5)](_0x436dde),await _0x47101b[_0x4eb7a5(0xe3)](_0x4eb7a5(0xd8));return;}if(_0x39392d===_0x4eb7a5(0xfe)||_0x39392d===_0x4eb7a5(0xc4)){const _0x135c39=readTerminalOutput(),_0x41cea6=_0x135c39[_0x4eb7a5(0xec)][_0x4eb7a5(0xee)]>0x0?'\x0aProcesses:\x20'+_0x135c39[_0x4eb7a5(0xec)][_0x4eb7a5(0xb5)](',\x20'):'';await _0x47101b['reply']('Dir:\x20'+process[_0x4eb7a5(0x13e)]()+_0x4eb7a5(0xe9)+getSelectedModel()+_0x41cea6);return;}if(_0x39392d===_0x4eb7a5(0xb4)||_0x39392d===_0x4eb7a5(0xd9)){const _0x4c94d5=gitStatus(),_0x3c1b36=tree('.',0x2),_0x4a477b=readJson('package.json');let _0x2896a6='Dir:\x20'+process[_0x4eb7a5(0x13e)]()+'\x0aModel:\x20'+getSelectedModel()+'\x0a';if(_0x4a477b['success']&&_0x4a477b[_0x4eb7a5(0xa9)]){const _0x40c311=_0x4a477b['data'];_0x2896a6+=_0x4eb7a5(0x123)+(_0x40c311[_0x4eb7a5(0xb7)]||'?')+'\x20v'+(_0x40c311[_0x4eb7a5(0xfd)]||'?')+'\x0a';}if(_0x4c94d5['success'])_0x2896a6+='\x0aGit:\x20'+(_0x4c94d5['output']||'Clean')+'\x0a';_0x3c1b36['success']&&_0x3c1b36['tree']&&(_0x2896a6+=_0x4eb7a5(0x106)+_0x3c1b36['tree'][_0x4eb7a5(0xf8)]('\x0a')['slice'](0x0,0xf)[_0x4eb7a5(0xb5)]('\x0a'));if(_0x2896a6[_0x4eb7a5(0xee)]>0x7d0)_0x2896a6=_0x2896a6[_0x4eb7a5(0xad)](0x0,0x7cd)+_0x4eb7a5(0xdf);await _0x47101b['reply'](_0x2896a6);return;}if(_0x39392d[_0x4eb7a5(0xc3)]('/files\x20')||_0x39392d[_0x4eb7a5(0xc3)](_0x4eb7a5(0xaf))||_0x39392d===_0x4eb7a5(0xe2)||_0x39392d==='!files'){const _0x3b66b3=_0x39392d['replace'](/^[!/]files\s*/,'')[_0x4eb7a5(0xb1)]()||'.',_0x164fdf=listDirectory(_0x3b66b3);if(_0x164fdf[_0x4eb7a5(0xf2)]&&_0x164fdf['entries']){const _0x5c6829=_0x164fdf[_0x4eb7a5(0x140)][_0x4eb7a5(0xf7)](0x0,0x1e)['map'](_0xaefe8b=>{const _0x48807a=_0x4eb7a5,_0x31396b=_0xaefe8b['type']===_0x48807a(0xc0)?'[D]':_0x48807a(0xa2);return _0x31396b+'\x20'+_0xaefe8b[_0x48807a(0xb7)];})[_0x4eb7a5(0xb5)]('\x0a');await _0x47101b[_0x4eb7a5(0xe3)](_0x3b66b3+':\x0a\x0a'+_0x5c6829);}else await _0x47101b[_0x4eb7a5(0xe3)](_0x164fdf[_0x4eb7a5(0x116)]);return;}if(_0x39392d[_0x4eb7a5(0xc3)](_0x4eb7a5(0x11c))||_0x39392d[_0x4eb7a5(0xc3)](_0x4eb7a5(0xab))){const _0x58333c=_0x39392d['replace'](/^[!/]run\s+/,'')[_0x4eb7a5(0xb1)]();if(!_0x58333c){await _0x47101b[_0x4eb7a5(0xe3)]('Usage:\x20/run\x20<command>');return;}await _0x47101b[_0x4eb7a5(0xbc)][_0x4eb7a5(0xba)]()['catch'](()=>{});const _0x22ee0f=await runCommand(_0x58333c,undefined,![],0x7530),_0x5a15db=(_0x22ee0f[_0x4eb7a5(0xb0)]||_0x22ee0f[_0x4eb7a5(0xf1)]||_0x4eb7a5(0x124))['substring'](0x0,0x76c);await _0x47101b['reply'](_0x4eb7a5(0xdd)+_0x22ee0f['exitCode']+_0x4eb7a5(0x108)+_0x5a15db+_0x4eb7a5(0x12d));return;}if(_0x39392d[_0x4eb7a5(0xc3)]('/cd\x20')||_0x39392d['startsWith'](_0x4eb7a5(0xce))){const _0x2527f4=_0x39392d[_0x4eb7a5(0x121)](/^[!/]cd\s+/,'')[_0x4eb7a5(0xb1)]();try{process[_0x4eb7a5(0xb6)](resolve(process[_0x4eb7a5(0x13e)](),_0x2527f4)),await _0x47101b[_0x4eb7a5(0xe3)](_0x4eb7a5(0xcd)+process[_0x4eb7a5(0x13e)]());}catch(_0xa1ca81){await _0x47101b['reply']('Failed:\x20'+_0xa1ca81);}return;}if(!_0x39392d)return;await _0x47101b[_0x4eb7a5(0xbc)][_0x4eb7a5(0xba)]()['catch'](()=>{});const _0x2355c6=getOrCreateHistory(_0x436dde);_0x2355c6[_0x4eb7a5(0x11d)]({'role':_0x4eb7a5(0x109),'content':_0x39392d}),a7_0x52a934[_0x4eb7a5(0xde)](_0x4eb7a5(0xf5)+_0x47101b[_0x4eb7a5(0x131)][_0x4eb7a5(0xd4)]+':\x20'+_0x39392d),await processDiscordAgentLoop(_0x2355c6,getSelectedModel(),_0x5cdbf1,_0x17ba4b);if(_0x47101b['attachments'][_0x4eb7a5(0x110)]>0x0)for(const [,_0x58a35f]of _0x47101b[_0x4eb7a5(0xc6)]){try{const _0x1203c4=await fetch(_0x58a35f[_0x4eb7a5(0x105)]),_0x3b518b=Buffer[_0x4eb7a5(0x13d)](await _0x1203c4[_0x4eb7a5(0x147)]()),_0x44be59=join(process[_0x4eb7a5(0x13e)](),_0x58a35f[_0x4eb7a5(0xb7)]||_0x4eb7a5(0x119)+Date['now']()),{writeFileSync:_0x46a15f}=await import('fs');_0x46a15f(_0x44be59,_0x3b518b),_0x2355c6['push']({'role':'user','content':_0x4eb7a5(0xa4)+_0x58a35f[_0x4eb7a5(0xb7)]+'\x20('+_0x3b518b['length']+_0x4eb7a5(0x107)+_0x44be59+']'}),await _0x47101b['reply'](_0x4eb7a5(0x12a)+_0x58a35f[_0x4eb7a5(0xb7)]);}catch{}}}),await client['login'](_0x3326c7),!![];}catch(_0x2c354c){return a7_0x52a934['error']('[Discord]\x20Failed\x20to\x20start:\x20'+_0x2c354c[_0x4170cd(0x116)]),![];}}export function stopBot(){client&&(client['destroy'](),client=null),isRunning=![];}export function isBotRunning(){return isRunning;}
1
+ const a7_0x11290b=a7_0x3ed2;(function(_0x1173fa,_0x3d078e){const _0x2442ea=a7_0x3ed2,_0x162e5d=_0x1173fa();while(!![]){try{const _0x3958a4=-parseInt(_0x2442ea(0x10c))/0x1+-parseInt(_0x2442ea(0xad))/0x2+-parseInt(_0x2442ea(0xd8))/0x3*(parseInt(_0x2442ea(0x102))/0x4)+parseInt(_0x2442ea(0xd3))/0x5+-parseInt(_0x2442ea(0x10e))/0x6+parseInt(_0x2442ea(0xde))/0x7*(parseInt(_0x2442ea(0xd1))/0x8)+parseInt(_0x2442ea(0x67))/0x9;if(_0x3958a4===_0x3d078e)break;else _0x162e5d['push'](_0x162e5d['shift']());}catch(_0x1e66ae){_0x162e5d['push'](_0x162e5d['shift']());}}}(a7_0x560a,0xc2ad5));import{Client,GatewayIntentBits,ChannelType,Partials,AttachmentBuilder}from'discord.js';import{join,resolve,basename}from'path';import*as a7_0x3ae594 from'./config.js';function a7_0x560a(){const _0x586168=['rename_file','open_in_editor','/clear','browser_snapshot','browser_screenshot','/run\x20','GuildMessages','Channel','once','path','read_json','channelId','\x0a```','bot','background','send','join','author','copy_file','[D]','search_directory','pid','get','terminate','fromBranch','branchName','info','attachments','\x0aTree:\x0a','fetch_url','get_env','search','guildId','success','tree','8uUqebm','browser_fill','You\x20are\x20Woozlit\x20AI,\x20an\x20autonomous\x20agent\x20connected\x20via\x20Discord.\x20Complete\x20tasks\x20immediately.\x0a\x0aRULES:\x0a1.\x20Execute\x20tools\x20FIRST,\x20explain\x20NEVER.\x20Be\x20concise.\x0a2.\x20No\x20emojis.\x20Maximum\x201-2\x20sentences\x20for\x20final\x20responses.\x0a3.\x20Use\x20tool\x20blocks\x20to\x20execute\x20actions.\x0a\x0aTOOLS:\x0a-\x20run_command:\x20{command,\x20wait,\x20background}\x0a-\x20read_terminal:\x20{}\x0a-\x20send_input:\x20{input}\x0a-\x20terminate:\x20{}\x0a-\x20create_file:\x20{path,\x20content}\x0a-\x20read_file:\x20{path}\x0a-\x20list_directory:\x20{path}\x0a-\x20edit_file:\x20{path,\x20search,\x20replace}\x0a-\x20delete_file:\x20{path}\x0a-\x20rename_file:\x20{from,\x20to}\x0a-\x20copy_file:\x20{from,\x20to}\x0a-\x20file_info:\x20{path}\x0a-\x20read_file_lines:\x20{path,\x20start,\x20end}\x0a-\x20find_files:\x20{path,\x20pattern}\x0a-\x20search_directory:\x20{path,\x20pattern}\x0a-\x20send_file:\x20{path}\x20-\x20send\x20file\x20to\x20Discord\x0a-\x20git_status,\x20git_diff,\x20git_log,\x20git_add,\x20git_commit,\x20git_branch\x0a-\x20fetch_url:\x20{url}\x0a-\x20download_file:\x20{url,\x20path}\x0a-\x20get_env:\x20{name},\x20set_env:\x20{name,\x20value}\x0a-\x20get_system_info:\x20{}\x0a-\x20clipboard_read,\x20clipboard_write:\x20{text}\x0a-\x20tree:\x20{path,\x20depth}\x0a-\x20grep_recursive:\x20{path,\x20pattern}\x0a-\x20replace_in_files:\x20{path,\x20search,\x20replace}\x0a-\x20powershell_run:\x20{script}\x0a-\x20zip_files:\x20{files,\x20output},\x20unzip_files:\x20{path,\x20output}\x0a-\x20write_json:\x20{path,\x20data},\x20read_json:\x20{path}\x0a-\x20patch_file:\x20{path,\x20patches}\x0a-\x20open_in_editor:\x20{path}\x0a-\x20github_read_file,\x20github_create_pr,\x20github_create_branch\x0a-\x20browser_open,\x20browser_click,\x20browser_fill,\x20browser_screenshot,\x20browser_snapshot,\x20browser_close\x0a\x0aTOOL\x20FORMAT:\x0a```tool\x0a{\x22name\x22:\x22tool_name\x22,\x22args\x22:{\x22key\x22:\x22value\x22}}\x0a```','reply','search_file','message','username','...','../github/api.js','powershell_run','1021539JAZFef','!status','1288524LSjcbp',':\x0a\x0a','chdir','branch','files','parse','MessageContent','read_file','has','arrayBuffer','16685442udVxzl','git_status','trim','stderr','assistant','Saved:\x20','!newchat','grep_recursive','!files','.\x20Try\x20again\x20or\x20skip.','end','url','/newchat','Cleared.','git_commit','tag','Exit:\x20','browser_close','length','set_env','Failed:\x20','args','file_info','login','entries','browser_open','../browser/index.js','write_json','value','substring','\x0a```\x0a','title','delete','Clean','patches','slice','git_log','list_directory','zip_files','extensions','replace','unzip_files','git_branch','match','patch_file','name','owner','type','Tool\x20error:\x20','DirectMessages','!files\x20','wait','\x0aProject:\x20','content','Unknown\x20tool:\x20','send_input','now','[Discord]\x20Tool:\x20','send_file','cwd','depth','\x20bytes)\x20saved\x20to\x20','push','startsWith','github_create_branch','New\x20chat\x20session\x20started.','repo','data','script','selector','3028734YVltVt','pids','File\x20will\x20be\x20attached\x20separately','start','[F]','input','sendTyping','system','catch','from','channel','read_file_lines','pattern','error','user','!run\x20','stringify','head','/files','[Discord]\x20','find_files','directory','!cd\x20','split','base','output','\x0aModel:\x20','[Discord]\x20Connected\x20as\x20','run_command','/status','Failed\x20to\x20send\x20file:\x20','command','size','/cd\x20','map','package.json','72stSnSg','version','5442945MecSwA','mentions','exitCode','create_file','!project','103206jmKVLb','/project','stdout','git_add','Tool\x20result\x20for\x20','No\x20output','524482xVpdDI'];a7_0x560a=function(){return _0x586168;};return a7_0x560a();}import*as a7_0x59554f from'../ui/output.js';import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,readTerminalOutput,sendTerminalInput,terminateProcess,deleteFile,renameFile,copyFile,fileInfo,readFileLines,findFiles,searchDirectory}from'../tools/index.js';import{gitStatus,gitDiff,gitLog,gitAdd,gitCommit,gitBranch}from'../tools/git.js';import{fetchUrl,downloadFile as a7_0x510ba5}from'../tools/network.js';import{getEnv,setEnv,getSystemInfo,clipboardRead,clipboardWrite}from'../tools/system.js';import{tree,grepRecursive,replaceInFiles,openInEditor,zipFiles,unzipFiles,writeJson,readJson,patchFile,powershellRun}from'../tools/project.js';import{registerDiscordClient}from'../services/notifications.js';let client=null,isRunning=![];const chatHistories=new Map(),SYSTEM_PROMPT=a7_0x11290b(0x104);function a7_0x3ed2(_0x449c2f,_0x3f0391){_0x449c2f=_0x449c2f-0x66;const _0x560aaf=a7_0x560a();let _0x3ed25d=_0x560aaf[_0x449c2f];return _0x3ed25d;}async function executeToolCall(_0x136817,_0x1a01c8,_0x394669){const _0x444412=a7_0x11290b;switch(_0x136817){case _0x444412(0xc9):{const _0x19c918=await runCommand(_0x1a01c8[_0x444412(0xcc)],undefined,_0x1a01c8[_0x444412(0xed)]||![],_0x1a01c8[_0x444412(0x9a)]||0x7530);return _0x19c918;}case'read_terminal':return readTerminalOutput(_0x1a01c8[_0x444412(0xf4)]);case _0x444412(0x9e):return sendTerminalInput(_0x1a01c8[_0x444412(0xb2)],_0x1a01c8[_0x444412(0xf4)]);case _0x444412(0xf6):return terminateProcess(_0x1a01c8[_0x444412(0xf4)]);case _0x444412(0xd6):return createFile(_0x1a01c8[_0x444412(0xe8)],_0x1a01c8[_0x444412(0x9c)]);case _0x444412(0x115):return readFile(_0x1a01c8[_0x444412(0xe8)]);case _0x444412(0x8c):return listDirectory(_0x1a01c8[_0x444412(0xe8)]||'.');case'edit_file':return editFile(_0x1a01c8[_0x444412(0xe8)],_0x1a01c8['search'],_0x1a01c8[_0x444412(0x8f)]);case _0x444412(0x106):return searchFile(_0x1a01c8[_0x444412(0xe8)],_0x1a01c8['pattern']);case'delete_file':return deleteFile(_0x1a01c8[_0x444412(0xe8)]);case _0x444412(0xdf):return renameFile(_0x1a01c8[_0x444412(0xb6)]||_0x1a01c8[_0x444412(0xe8)],_0x1a01c8['to']);case _0x444412(0xf1):return copyFile(_0x1a01c8[_0x444412(0xb6)]||_0x1a01c8['path'],_0x1a01c8['to']);case _0x444412(0x7d):return fileInfo(_0x1a01c8[_0x444412(0xe8)]);case _0x444412(0xb8):return readFileLines(_0x1a01c8[_0x444412(0xe8)],_0x1a01c8[_0x444412(0xb0)]||0x1,_0x1a01c8[_0x444412(0x71)]||0x32);case _0x444412(0xc1):return findFiles(_0x1a01c8[_0x444412(0xe8)]||'.',_0x1a01c8[_0x444412(0xb9)]);case _0x444412(0xf3):return searchDirectory(_0x1a01c8[_0x444412(0xe8)]||'.',_0x1a01c8[_0x444412(0xb9)]);case _0x444412(0xa1):{try{const _0x1b1f29=resolve(process[_0x444412(0xa2)](),_0x1a01c8[_0x444412(0xe8)]);return await _0x394669('__Sending\x20file:\x20'+basename(_0x1b1f29)+'__'),{'success':!![],'sent':!![],'note':_0x444412(0xaf)};}catch(_0x1b63f9){return{'error':_0x444412(0xcb)+_0x1b63f9};}}case _0x444412(0x68):return gitStatus();case'git_diff':return gitDiff(_0x1a01c8['path']);case _0x444412(0x8b):return gitLog(_0x1a01c8['count']||0xa);case _0x444412(0xdb):return gitAdd(_0x1a01c8[_0x444412(0xe8)]||'.');case _0x444412(0x75):return gitCommit(_0x1a01c8[_0x444412(0x107)]);case _0x444412(0x91):return gitBranch();case _0x444412(0xfc):return fetchUrl(_0x1a01c8[_0x444412(0x72)]);case'download_file':return a7_0x510ba5(_0x1a01c8['url'],_0x1a01c8[_0x444412(0xe8)]);case _0x444412(0xfd):return getEnv(_0x1a01c8[_0x444412(0x94)]);case _0x444412(0x7a):return setEnv(_0x1a01c8[_0x444412(0x94)],_0x1a01c8['value']);case'get_system_info':return getSystemInfo();case'clipboard_read':return clipboardRead();case'clipboard_write':return clipboardWrite(_0x1a01c8['text']);case'tree':return tree(_0x1a01c8[_0x444412(0xe8)]||'.',_0x1a01c8[_0x444412(0xa3)]||0x3);case _0x444412(0x6e):return grepRecursive(_0x1a01c8[_0x444412(0xe8)]||'.',_0x1a01c8[_0x444412(0xb9)],_0x1a01c8[_0x444412(0x8e)]);case'replace_in_files':return replaceInFiles(_0x1a01c8[_0x444412(0xe8)]||'.',_0x1a01c8[_0x444412(0xfe)],_0x1a01c8[_0x444412(0x8f)],_0x1a01c8[_0x444412(0x8e)]);case _0x444412(0x10b):return powershellRun(_0x1a01c8[_0x444412(0xab)]||_0x1a01c8['command']);case _0x444412(0x8d):return zipFiles(_0x1a01c8[_0x444412(0x112)]||[_0x1a01c8[_0x444412(0xe8)]],_0x1a01c8[_0x444412(0xc6)]||'archive.zip');case _0x444412(0x90):return unzipFiles(_0x1a01c8[_0x444412(0xe8)],_0x1a01c8[_0x444412(0xc6)]||'.');case _0x444412(0x82):return writeJson(_0x1a01c8['path'],_0x1a01c8['data']);case _0x444412(0xe9):return readJson(_0x1a01c8[_0x444412(0xe8)]);case _0x444412(0x93):return patchFile(_0x1a01c8[_0x444412(0xe8)],_0x1a01c8[_0x444412(0x89)]);case _0x444412(0xe0):return openInEditor(_0x1a01c8[_0x444412(0xe8)]);case'github_read_file':{const {readFile:_0x28f013}=await import(_0x444412(0x10a));return _0x28f013(_0x1a01c8[_0x444412(0x95)],_0x1a01c8['repo'],_0x1a01c8[_0x444412(0xe8)],_0x1a01c8[_0x444412(0x111)]);}case _0x444412(0xa7):{const {createBranch:_0x2f0cb7}=await import('../github/api.js');return _0x2f0cb7(_0x1a01c8[_0x444412(0x95)],_0x1a01c8[_0x444412(0xa9)],_0x1a01c8[_0x444412(0xf8)],_0x1a01c8[_0x444412(0xf7)]);}case'github_create_pr':{const {createPullRequest:_0x4869f1}=await import(_0x444412(0x10a));return _0x4869f1(_0x1a01c8[_0x444412(0x95)],_0x1a01c8['repo'],_0x1a01c8[_0x444412(0x86)],_0x1a01c8[_0x444412(0xbe)],_0x1a01c8[_0x444412(0xc5)],_0x1a01c8['body']);}case _0x444412(0x80):{const {browserOpen:_0x40527f,startBrowserServer:_0x32f366,isBrowserServerRunning:_0x395476}=await import(_0x444412(0x81));if(!_0x395476())await _0x32f366();return _0x40527f(_0x1a01c8['url']);}case'browser_click':{const {browserClick:_0x2abae4}=await import('../browser/index.js');return _0x2abae4(_0x1a01c8[_0x444412(0xac)]);}case _0x444412(0x103):{const {browserFill:_0x471644}=await import(_0x444412(0x81));return _0x471644(_0x1a01c8[_0x444412(0xac)],_0x1a01c8[_0x444412(0x83)]);}case _0x444412(0xe2):{const {browserSnapshot:_0x3cd5aa}=await import(_0x444412(0x81));return _0x3cd5aa();}case _0x444412(0xe3):{const {browserScreenshot:_0x601cd4}=await import(_0x444412(0x81));return _0x601cd4();}case _0x444412(0x78):{const {browserClose:_0x45abc1}=await import('../browser/index.js');return _0x45abc1();}default:return{'error':_0x444412(0x9d)+_0x136817};}}async function processDiscordAgentLoop(_0x4e8a92,_0x262736,_0x464a6e,_0x56ba90){const _0x39e4ee=a7_0x11290b;let _0x401b11=0x0;const _0x5f50f9=0x14;while(_0x401b11<_0x5f50f9){_0x401b11++;let _0x1a76ba='';try{const _0x9df16e=await sendChatMessage(_0x262736,_0x4e8a92,_0x31afb6=>{_0x1a76ba+=_0x31afb6;});_0x1a76ba=_0x9df16e[_0x39e4ee(0x9c)];}catch(_0x54d422){await _0x464a6e(_0x39e4ee(0x7b)+(_0x54d422[_0x39e4ee(0x107)]?.[_0x39e4ee(0x84)](0x0,0x64)||'Error'));return;}_0x4e8a92[_0x39e4ee(0xa5)]({'role':_0x39e4ee(0x6b),'content':_0x1a76ba});let _0x293d5f=_0x1a76ba[_0x39e4ee(0x92)](/```tool\s*([\s\S]*?)```/);if(!_0x293d5f)_0x293d5f=_0x1a76ba['match'](/\*\*\*tool\s*([\s\S]*?)\*\*\*/);if(!_0x293d5f)_0x293d5f=_0x1a76ba[_0x39e4ee(0x92)](/```json\s*({[\s\S]*?"name"[\s\S]*?})\s*```/);if(!_0x293d5f){let _0x2f1703=_0x1a76ba['replace'](/<reasoning>[\s\S]*?<\/reasoning>/g,'')[_0x39e4ee(0x8f)](/<text>|<\/text>/g,'')['replace'](/```tool[\s\S]*?```/g,'')[_0x39e4ee(0x8f)](/\*\*\*tool[\s\S]*?\*\*\*/g,'')[_0x39e4ee(0x8f)](/#{1,6}\s*/g,'')[_0x39e4ee(0x69)]();if(_0x2f1703){if(_0x2f1703[_0x39e4ee(0x79)]>0x7d0){const _0x355a3c=_0x2f1703['match'](/[\s\S]{1,2000}/g)||[];for(const _0x14edf0 of _0x355a3c)await _0x464a6e(_0x14edf0);}else await _0x464a6e(_0x2f1703);}break;}try{const _0x7b2c9f=JSON[_0x39e4ee(0x113)](_0x293d5f[0x1]['trim']());a7_0x59554f[_0x39e4ee(0xf9)](_0x39e4ee(0xa0)+_0x7b2c9f['name']);const _0x571cff=await executeToolCall(_0x7b2c9f[_0x39e4ee(0x94)],_0x7b2c9f[_0x39e4ee(0x7c)],_0x464a6e);_0x7b2c9f[_0x39e4ee(0x94)]==='send_file'&&_0x7b2c9f[_0x39e4ee(0x7c)][_0x39e4ee(0xe8)]&&await _0x56ba90(resolve(process[_0x39e4ee(0xa2)](),_0x7b2c9f[_0x39e4ee(0x7c)][_0x39e4ee(0xe8)])),_0x4e8a92[_0x39e4ee(0xa5)]({'role':_0x39e4ee(0xbb),'content':_0x39e4ee(0xdc)+_0x7b2c9f[_0x39e4ee(0x94)]+':\x0a'+JSON[_0x39e4ee(0xbd)](_0x571cff,null,0x2)}),await new Promise(_0x1ec02d=>setTimeout(_0x1ec02d,0xc8));}catch(_0x22b659){_0x4e8a92[_0x39e4ee(0xa5)]({'role':_0x39e4ee(0xbb),'content':_0x39e4ee(0x97)+_0x22b659+_0x39e4ee(0x70)});}}}function getOrCreateHistory(_0x15bdc5){const _0x32a79c=a7_0x11290b;return!chatHistories['has'](_0x15bdc5)&&chatHistories['set'](_0x15bdc5,[{'role':_0x32a79c(0xb4),'content':SYSTEM_PROMPT}]),chatHistories[_0x32a79c(0xf5)](_0x15bdc5);}export async function startBot(){const _0x42266a=a7_0x11290b,_0x380c72=a7_0x3ae594['getBotToken']();if(!_0x380c72)return![];if(isRunning)return!![];try{return client=new Client({'intents':[GatewayIntentBits['Guilds'],GatewayIntentBits[_0x42266a(0xe5)],GatewayIntentBits[_0x42266a(0x114)],GatewayIntentBits[_0x42266a(0x98)]],'partials':[Partials[_0x42266a(0xe6)]]}),client[_0x42266a(0xe7)]('ready',()=>{const _0x3bdee1=_0x42266a;a7_0x59554f[_0x3bdee1(0x100)](_0x3bdee1(0xc8)+client?.[_0x3bdee1(0xbb)]?.[_0x3bdee1(0x76)]),isRunning=!![];if(client)registerDiscordClient(client);}),client['on']('messageCreate',async _0x31e421=>{const _0x201516=_0x42266a;if(_0x31e421['author'][_0x201516(0xec)])return;const _0x5b689c=_0x31e421[_0x201516(0xb7)]['type']===ChannelType['DM'],_0xd89f54=client?.[_0x201516(0xbb)]&&_0x31e421[_0x201516(0xd4)][_0x201516(0x116)](client[_0x201516(0xbb)]);if(!_0x5b689c&&!_0xd89f54)return;const _0x37907a=_0x31e421[_0x201516(0x9c)][_0x201516(0x8f)](/<@!?[0-9]+>/g,'')['trim'](),_0x53ae96=_0x31e421[_0x201516(0xf0)]['id'],_0x5800e2=(_0x31e421[_0x201516(0xff)]||'dm')+'-'+_0x31e421[_0x201516(0xea)]+'-'+_0x53ae96,_0x2dd836=async _0x3f9d5c=>{const _0xc9e4aa=_0x201516;await _0x31e421[_0xc9e4aa(0xb7)]['send'](_0x3f9d5c)[_0xc9e4aa(0xb5)](()=>{});},_0x3799ba=async _0x264374=>{const _0x30ba77=_0x201516;try{const _0x1e927c=new AttachmentBuilder(_0x264374);await _0x31e421['channel'][_0x30ba77(0xee)]({'files':[_0x1e927c]});}catch{}};if(_0x37907a===_0x201516(0x73)||_0x37907a===_0x201516(0x6d)){chatHistories[_0x201516(0x87)](_0x5800e2),await _0x31e421[_0x201516(0x105)](_0x201516(0xa8));return;}if(_0x37907a===_0x201516(0xe1)||_0x37907a==='!clear'){chatHistories[_0x201516(0x87)](_0x5800e2),await _0x31e421[_0x201516(0x105)](_0x201516(0x74));return;}if(_0x37907a===_0x201516(0xca)||_0x37907a===_0x201516(0x10d)){const _0x402774=readTerminalOutput(),_0x3380b9=_0x402774[_0x201516(0xae)][_0x201516(0x79)]>0x0?'\x0aProcesses:\x20'+_0x402774[_0x201516(0xae)]['join'](',\x20'):'';await _0x31e421[_0x201516(0x105)]('Dir:\x20'+process['cwd']()+_0x201516(0xc7)+getSelectedModel()+_0x3380b9);return;}if(_0x37907a===_0x201516(0xd9)||_0x37907a===_0x201516(0xd7)){const _0x307628=gitStatus(),_0xad9206=tree('.',0x2),_0x4f7411=readJson(_0x201516(0xd0));let _0x3a4fee='Dir:\x20'+process[_0x201516(0xa2)]()+_0x201516(0xc7)+getSelectedModel()+'\x0a';if(_0x4f7411[_0x201516(0x100)]&&_0x4f7411['data']){const _0x19d405=_0x4f7411[_0x201516(0xaa)];_0x3a4fee+=_0x201516(0x9b)+(_0x19d405['name']||'?')+'\x20v'+(_0x19d405[_0x201516(0xd2)]||'?')+'\x0a';}if(_0x307628['success'])_0x3a4fee+='\x0aGit:\x20'+(_0x307628[_0x201516(0xc6)]||_0x201516(0x88))+'\x0a';_0xad9206[_0x201516(0x100)]&&_0xad9206[_0x201516(0x101)]&&(_0x3a4fee+=_0x201516(0xfb)+_0xad9206['tree'][_0x201516(0xc4)]('\x0a')[_0x201516(0x8a)](0x0,0xf)[_0x201516(0xef)]('\x0a'));if(_0x3a4fee[_0x201516(0x79)]>0x7d0)_0x3a4fee=_0x3a4fee[_0x201516(0x84)](0x0,0x7cd)+_0x201516(0x109);await _0x31e421[_0x201516(0x105)](_0x3a4fee);return;}if(_0x37907a[_0x201516(0xa6)]('/files\x20')||_0x37907a['startsWith'](_0x201516(0x99))||_0x37907a===_0x201516(0xbf)||_0x37907a===_0x201516(0x6f)){const _0x3057bd=_0x37907a['replace'](/^[!/]files\s*/,'')[_0x201516(0x69)]()||'.',_0x44f40f=listDirectory(_0x3057bd);if(_0x44f40f[_0x201516(0x100)]&&_0x44f40f[_0x201516(0x7f)]){const _0x4a2922=_0x44f40f[_0x201516(0x7f)][_0x201516(0x8a)](0x0,0x1e)[_0x201516(0xcf)](_0x7857a0=>{const _0x3720ef=_0x201516,_0x3f2f08=_0x7857a0[_0x3720ef(0x96)]===_0x3720ef(0xc2)?_0x3720ef(0xf2):_0x3720ef(0xb1);return _0x3f2f08+'\x20'+_0x7857a0['name'];})[_0x201516(0xef)]('\x0a');await _0x31e421[_0x201516(0x105)](_0x3057bd+_0x201516(0x10f)+_0x4a2922);}else await _0x31e421[_0x201516(0x105)](_0x44f40f['message']);return;}if(_0x37907a['startsWith'](_0x201516(0xe4))||_0x37907a[_0x201516(0xa6)](_0x201516(0xbc))){const _0x52ff8f=_0x37907a[_0x201516(0x8f)](/^[!/]run\s+/,'')['trim']();if(!_0x52ff8f){await _0x31e421['reply']('Usage:\x20/run\x20<command>');return;}await _0x31e421[_0x201516(0xb7)][_0x201516(0xb3)]()['catch'](()=>{});const _0x177984=await runCommand(_0x52ff8f,undefined,![],0x7530),_0x260ce2=(_0x177984[_0x201516(0xda)]||_0x177984[_0x201516(0x6a)]||_0x201516(0xdd))[_0x201516(0x84)](0x0,0x76c);await _0x31e421[_0x201516(0x105)](_0x201516(0x77)+_0x177984[_0x201516(0xd5)]+_0x201516(0x85)+_0x260ce2+_0x201516(0xeb));return;}if(_0x37907a[_0x201516(0xa6)](_0x201516(0xce))||_0x37907a[_0x201516(0xa6)](_0x201516(0xc3))){const _0x594ea1=_0x37907a[_0x201516(0x8f)](/^[!/]cd\s+/,'')[_0x201516(0x69)]();try{process[_0x201516(0x110)](resolve(process[_0x201516(0xa2)](),_0x594ea1)),await _0x31e421[_0x201516(0x105)]('Changed\x20to:\x20'+process['cwd']());}catch(_0x39a16b){await _0x31e421[_0x201516(0x105)](_0x201516(0x7b)+_0x39a16b);}return;}if(!_0x37907a)return;await _0x31e421[_0x201516(0xb7)][_0x201516(0xb3)]()[_0x201516(0xb5)](()=>{});const _0x19c88f=getOrCreateHistory(_0x5800e2);_0x19c88f[_0x201516(0xa5)]({'role':'user','content':_0x37907a}),a7_0x59554f[_0x201516(0xf9)](_0x201516(0xc0)+_0x31e421[_0x201516(0xf0)][_0x201516(0x108)]+':\x20'+_0x37907a),await processDiscordAgentLoop(_0x19c88f,getSelectedModel(),_0x2dd836,_0x3799ba);if(_0x31e421['attachments'][_0x201516(0xcd)]>0x0)for(const [,_0x4f04e4]of _0x31e421[_0x201516(0xfa)]){try{const _0x5393d2=await fetch(_0x4f04e4[_0x201516(0x72)]),_0x372f27=Buffer[_0x201516(0xb6)](await _0x5393d2[_0x201516(0x66)]()),_0x25b950=join(process['cwd'](),_0x4f04e4[_0x201516(0x94)]||'upload_'+Date[_0x201516(0x9f)]()),{writeFileSync:_0x401ef7}=await import('fs');_0x401ef7(_0x25b950,_0x372f27),_0x19c88f['push']({'role':_0x201516(0xbb),'content':'[File\x20received:\x20'+_0x4f04e4[_0x201516(0x94)]+'\x20('+_0x372f27[_0x201516(0x79)]+_0x201516(0xa4)+_0x25b950+']'}),await _0x31e421[_0x201516(0x105)](_0x201516(0x6c)+_0x4f04e4[_0x201516(0x94)]);}catch{}}}),await client[_0x42266a(0x7e)](_0x380c72),!![];}catch(_0xbc16ab){return a7_0x59554f[_0x42266a(0xba)]('[Discord]\x20Failed\x20to\x20start:\x20'+_0xbc16ab['message']),![];}}export function stopBot(){client&&(client['destroy'](),client=null),isRunning=![];}export function isBotRunning(){return isRunning;}
@@ -1 +1 @@
1
- const a8_0x1a0f56=a8_0x2631;(function(_0x23fb50,_0x2bb2eb){const _0x24b705=a8_0x2631,_0x1e9975=_0x23fb50();while(!![]){try{const _0x5a8bf0=-parseInt(_0x24b705(0xc9))/0x1+parseInt(_0x24b705(0xb4))/0x2*(parseInt(_0x24b705(0xc0))/0x3)+-parseInt(_0x24b705(0xc2))/0x4*(parseInt(_0x24b705(0xbd))/0x5)+-parseInt(_0x24b705(0xc5))/0x6+parseInt(_0x24b705(0xbf))/0x7*(-parseInt(_0x24b705(0xc6))/0x8)+-parseInt(_0x24b705(0xba))/0x9*(-parseInt(_0x24b705(0xbb))/0xa)+parseInt(_0x24b705(0xcb))/0xb*(parseInt(_0x24b705(0xb7))/0xc);if(_0x5a8bf0===_0x2bb2eb)break;else _0x1e9975['push'](_0x1e9975['shift']());}catch(_0xd65edf){_0x1e9975['push'](_0x1e9975['shift']());}}}(a8_0xe412,0xabb45));function a8_0x2631(_0x1e1397,_0x46471d){_0x1e1397=_0x1e1397-0xb0;const _0xe412c1=a8_0xe412();let _0x26314e=_0xe412c1[_0x1e1397];return _0x26314e;}import a8_0xaeacc from'conf';import a8_0x4abd58 from'crypto';const config=new a8_0xaeacc({'projectName':a8_0x1a0f56(0xb5),'defaults':{'botToken':'','commandPrefix':'!','enabled':![]}}),ENCRYPTION_KEY=a8_0x1a0f56(0xb6);function encrypt(_0x111fa0){const _0x314def=a8_0x1a0f56;if(!_0x111fa0)return'';const _0x3f5b21=a8_0x4abd58[_0x314def(0xbc)](0x10),_0x2cd81c=a8_0x4abd58['createHash'](_0x314def(0xb3))['update'](ENCRYPTION_KEY)['digest'](),_0xbb5c38=a8_0x4abd58[_0x314def(0xca)](_0x314def(0xbe),_0x2cd81c,_0x3f5b21);let _0x48d5e1=_0xbb5c38[_0x314def(0xb8)](_0x111fa0,'utf8',_0x314def(0xc4));return _0x48d5e1+=_0xbb5c38[_0x314def(0xb1)](_0x314def(0xc4)),_0x3f5b21[_0x314def(0xcc)](_0x314def(0xc4))+':'+_0x48d5e1;}function decrypt(_0xbb5c09){const _0x27f14f=a8_0x1a0f56;if(!_0xbb5c09)return'';try{const [_0x55a787,_0x541cb4]=_0xbb5c09[_0x27f14f(0xc1)](':');if(!_0x55a787||!_0x541cb4)return'';const _0x41db80=Buffer['from'](_0x55a787,_0x27f14f(0xc4)),_0x2e004c=a8_0x4abd58[_0x27f14f(0xb0)](_0x27f14f(0xb3))[_0x27f14f(0xb8)](ENCRYPTION_KEY)[_0x27f14f(0xc3)](),_0x5c57e6=a8_0x4abd58['createDecipheriv'](_0x27f14f(0xbe),_0x2e004c,_0x41db80);let _0x12a61e=_0x5c57e6['update'](_0x541cb4,_0x27f14f(0xc4),'utf8');return _0x12a61e+=_0x5c57e6[_0x27f14f(0xb1)](_0x27f14f(0xb9)),_0x12a61e;}catch{return'';}}export function setBotToken(_0x5b16f1){const _0x7a01d4=a8_0x1a0f56;config['set'](_0x7a01d4(0xc7),encrypt(_0x5b16f1));}export function getBotToken(){const _0x26facd=a8_0x1a0f56;return decrypt(config[_0x26facd(0xc8)](_0x26facd(0xc7)));}export function isEnabled(){return!!getBotToken();}function a8_0xe412(){const _0x2a4f89=['createHash','final','clear','sha256','44802GKRECo','woozlit-cli-discord','woozlit_discord_secure_key','12NineCK','update','utf8','45DEhhIr','2744710LozoKY','randomBytes','118545uXGffl','aes-256-cbc','14hfUrNV','108LrPAUs','split','56gmIpfD','digest','hex','2779362lXCmpM','3467560mtcrvY','botToken','get','387990ORzMEY','createCipheriv','6319973FIhuie','toString'];a8_0xe412=function(){return _0x2a4f89;};return a8_0xe412();}export function isConfigured(){return!!getBotToken();}export function clearConfig(){const _0x48cc2d=a8_0x1a0f56;config[_0x48cc2d(0xb2)]();}
1
+ const a8_0x59332c=a8_0x303e;(function(_0x418672,_0x21c36e){const _0x3c21a5=a8_0x303e,_0xfd98fd=_0x418672();while(!![]){try{const _0x3fd0ef=-parseInt(_0x3c21a5(0xb5))/0x1+-parseInt(_0x3c21a5(0xbe))/0x2+-parseInt(_0x3c21a5(0xcd))/0x3*(parseInt(_0x3c21a5(0xc5))/0x4)+-parseInt(_0x3c21a5(0xba))/0x5*(-parseInt(_0x3c21a5(0xcc))/0x6)+parseInt(_0x3c21a5(0xbb))/0x7*(parseInt(_0x3c21a5(0xd1))/0x8)+-parseInt(_0x3c21a5(0xd2))/0x9*(-parseInt(_0x3c21a5(0xc4))/0xa)+-parseInt(_0x3c21a5(0xce))/0xb*(-parseInt(_0x3c21a5(0xcb))/0xc);if(_0x3fd0ef===_0x21c36e)break;else _0xfd98fd['push'](_0xfd98fd['shift']());}catch(_0x3c2ee6){_0xfd98fd['push'](_0xfd98fd['shift']());}}}(a8_0x4f7a,0x4ab02));import a8_0x53a47d from'conf';import a8_0x2dd0f7 from'crypto';const config=new a8_0x53a47d({'projectName':a8_0x59332c(0xc9),'defaults':{'botToken':'','commandPrefix':'!','enabled':![]}}),ENCRYPTION_KEY=a8_0x59332c(0xcf);function encrypt(_0x31188c){const _0x3bd7ca=a8_0x59332c;if(!_0x31188c)return'';const _0x8e8c2d=a8_0x2dd0f7[_0x3bd7ca(0xc1)](0x10),_0x242cc6=a8_0x2dd0f7['createHash']('sha256')[_0x3bd7ca(0xb9)](ENCRYPTION_KEY)[_0x3bd7ca(0xc2)](),_0x2cb3fc=a8_0x2dd0f7[_0x3bd7ca(0xb7)]('aes-256-cbc',_0x242cc6,_0x8e8c2d);let _0xb3780=_0x2cb3fc[_0x3bd7ca(0xb9)](_0x31188c,'utf8',_0x3bd7ca(0xb8));return _0xb3780+=_0x2cb3fc[_0x3bd7ca(0xbd)](_0x3bd7ca(0xb8)),_0x8e8c2d['toString']('hex')+':'+_0xb3780;}function decrypt(_0x13ff21){const _0x6491df=a8_0x59332c;if(!_0x13ff21)return'';try{const [_0x4fef03,_0x392200]=_0x13ff21[_0x6491df(0xca)](':');if(!_0x4fef03||!_0x392200)return'';const _0x5680df=Buffer['from'](_0x4fef03,_0x6491df(0xb8)),_0xc42161=a8_0x2dd0f7[_0x6491df(0xc7)](_0x6491df(0xc8))['update'](ENCRYPTION_KEY)[_0x6491df(0xc2)](),_0x254c5c=a8_0x2dd0f7[_0x6491df(0xc0)](_0x6491df(0xb6),_0xc42161,_0x5680df);let _0x2d623c=_0x254c5c[_0x6491df(0xb9)](_0x392200,_0x6491df(0xb8),_0x6491df(0xc6));return _0x2d623c+=_0x254c5c[_0x6491df(0xbd)](_0x6491df(0xc6)),_0x2d623c;}catch{return'';}}export function setBotToken(_0x245f40){const _0xff497e=a8_0x59332c;config[_0xff497e(0xbc)](_0xff497e(0xc3),encrypt(_0x245f40));}function a8_0x4f7a(){const _0x3076ce=['clear','8QqWPLL','13743jCTtzY','588357lrfVFH','aes-256-cbc','createCipheriv','hex','update','328510vrwTOd','2175628Zdocxo','set','final','183764MlcRxg','get','createDecipheriv','randomBytes','digest','botToken','1130UmIXtd','17648oZtPiV','utf8','createHash','sha256','woozlit-cli-discord','split','3484068yzbVxd','36tRcHVN','321KihCqa','22KBBpmD','woozlit_discord_secure_key'];a8_0x4f7a=function(){return _0x3076ce;};return a8_0x4f7a();}export function getBotToken(){const _0x462b3a=a8_0x59332c;return decrypt(config[_0x462b3a(0xbf)](_0x462b3a(0xc3)));}export function isEnabled(){return!!getBotToken();}function a8_0x303e(_0x5b62cc,_0x4ea4dd){_0x5b62cc=_0x5b62cc-0xb5;const _0x4f7a49=a8_0x4f7a();let _0x303e57=_0x4f7a49[_0x5b62cc];return _0x303e57;}export function isConfigured(){return!!getBotToken();}export function clearConfig(){const _0x2df665=a8_0x59332c;config[_0x2df665(0xd0)]();}
@@ -1 +1 @@
1
- (function(_0x5d95f2,_0x458caf){var _0x307532=a9_0x5227,_0x22082=_0x5d95f2();while(!![]){try{var _0x28eb6b=-parseInt(_0x307532(0x15f))/0x1*(parseInt(_0x307532(0x162))/0x2)+parseInt(_0x307532(0x164))/0x3*(-parseInt(_0x307532(0x167))/0x4)+-parseInt(_0x307532(0x160))/0x5+parseInt(_0x307532(0x166))/0x6+parseInt(_0x307532(0x165))/0x7+parseInt(_0x307532(0x161))/0x8*(-parseInt(_0x307532(0x163))/0x9)+-parseInt(_0x307532(0x168))/0xa*(-parseInt(_0x307532(0x169))/0xb);if(_0x28eb6b===_0x458caf)break;else _0x22082['push'](_0x22082['shift']());}catch(_0x36b810){_0x22082['push'](_0x22082['shift']());}}}(a9_0x52b8,0x96ef6));export*from'./config.js';function a9_0x5227(_0x2bb9a9,_0x3f2579){_0x2bb9a9=_0x2bb9a9-0x15f;var _0x52b87a=a9_0x52b8();var _0x5227a1=_0x52b87a[_0x2bb9a9];return _0x5227a1;}function a9_0x52b8(){var _0x113d0b=['154297uCLNap','7rdeRtz','2427975iNDSwz','384976RUTPLM','234636GPHEEB','36miIsvA','3TBKnFu','4808496KTpRDL','2241474iokDVC','428836zflmDr','830fajeFQ'];a9_0x52b8=function(){return _0x113d0b;};return a9_0x52b8();}export{startBot,stopBot,isBotRunning}from'./client.js';export{setupDiscord}from'./setup.js';
1
+ function a9_0x463d(){var _0x24f237=['3469929XVslaU','474132cMiLML','10NctMpF','10cPotVg','63230ZbHcqQ','32834796kIEwsN','7fCyVse','6325443YMnjYO','9WYFVYV','1574392CMmTlu','1423796dplHrl','4zViEtQ'];a9_0x463d=function(){return _0x24f237;};return a9_0x463d();}(function(_0x275e60,_0xcd6a4e){var _0x1fe6b4=a9_0x2f78,_0x2ee064=_0x275e60();while(!![]){try{var _0xe20220=parseInt(_0x1fe6b4(0x1a2))/0x1*(parseInt(_0x1fe6b4(0x19e))/0x2)+parseInt(_0x1fe6b4(0x1a6))/0x3*(-parseInt(_0x1fe6b4(0x1a5))/0x4)+parseInt(_0x1fe6b4(0x1a8))/0x5*(-parseInt(_0x1fe6b4(0x1a7))/0x6)+parseInt(_0x1fe6b4(0x1a0))/0x7*(-parseInt(_0x1fe6b4(0x1a3))/0x8)+-parseInt(_0x1fe6b4(0x1a1))/0x9*(parseInt(_0x1fe6b4(0x19d))/0xa)+-parseInt(_0x1fe6b4(0x1a4))/0xb+parseInt(_0x1fe6b4(0x19f))/0xc;if(_0xe20220===_0xcd6a4e)break;else _0x2ee064['push'](_0x2ee064['shift']());}catch(_0x5d6876){_0x2ee064['push'](_0x2ee064['shift']());}}}(a9_0x463d,0xa549b));export*from'./config.js';function a9_0x2f78(_0x1bdd23,_0x590584){_0x1bdd23=_0x1bdd23-0x19d;var _0x463ddf=a9_0x463d();var _0x2f7815=_0x463ddf[_0x1bdd23];return _0x2f7815;}export{startBot,stopBot,isBotRunning}from'./client.js';export{setupDiscord}from'./setup.js';
@@ -1 +1 @@
1
- function a10_0x37f6(_0x3d02f9,_0x9740d4){_0x3d02f9=_0x3d02f9-0x117;const _0x149616=a10_0x1496();let _0x37f6c0=_0x149616[_0x3d02f9];return _0x37f6c0;}(function(_0x3b79f9,_0x36ea11){const _0x1023c6=a10_0x37f6,_0x2ced43=_0x3b79f9();while(!![]){try{const _0x286f97=parseInt(_0x1023c6(0x12a))/0x1+parseInt(_0x1023c6(0x12b))/0x2*(-parseInt(_0x1023c6(0x11d))/0x3)+parseInt(_0x1023c6(0x127))/0x4*(parseInt(_0x1023c6(0x123))/0x5)+-parseInt(_0x1023c6(0x117))/0x6+-parseInt(_0x1023c6(0x119))/0x7*(parseInt(_0x1023c6(0x11e))/0x8)+-parseInt(_0x1023c6(0x122))/0x9*(-parseInt(_0x1023c6(0x12c))/0xa)+-parseInt(_0x1023c6(0x11f))/0xb*(-parseInt(_0x1023c6(0x124))/0xc);if(_0x286f97===_0x36ea11)break;else _0x2ced43['push'](_0x2ced43['shift']());}catch(_0x1bcf64){_0x2ced43['push'](_0x2ced43['shift']());}}}(a10_0x1496,0x2525c));function a10_0x1496(){const _0x1791d4=['You\x20need\x20a\x20Bot\x20Token\x20from\x20the\x20Discord\x20Developer\x20Portal.','Token\x20seems\x20too\x20short','507340hysigf','Discord\x20configuration\x20saved!','length','153177LXRYOh','2408zqtNrr','464310RxGzOf','1571814wbaUdS','dim','56dKofxe','Bot\x20Token:','info','Setup\x20Woozlit\x20Discord\x20Bot','489gmkpBY','274816JjHTYN','4103286bpxFOe','setBotToken','Command\x20Prefix\x20(optional,\x20default\x20\x27!\x27):','45esgIWR','5xXIEER','12jvMyQK'];a10_0x1496=function(){return _0x1791d4;};return a10_0x1496();}import{input}from'@inquirer/prompts';import*as a10_0x5155b5 from'./config.js';import*as a10_0x2b4548 from'../ui/output.js';export async function setupDiscord(){const _0x41b1d0=a10_0x37f6;a10_0x2b4548['info'](_0x41b1d0(0x11c)),a10_0x2b4548[_0x41b1d0(0x118)](_0x41b1d0(0x125));const _0x204eb7=await input({'message':_0x41b1d0(0x11a),'validate':_0xefeb07=>_0xefeb07[_0x41b1d0(0x129)]>0xa?!![]:_0x41b1d0(0x126)}),_0x109abd=await input({'message':_0x41b1d0(0x121),'default':'!'});a10_0x5155b5[_0x41b1d0(0x120)](_0x204eb7),a10_0x2b4548['success'](_0x41b1d0(0x128)),a10_0x2b4548[_0x41b1d0(0x11b)]('Restart\x20the\x20CLI\x20to\x20start\x20the\x20Discord\x20Bot.');}
1
+ (function(_0x2a2a28,_0x19d368){const _0x1cb1eb=a10_0x542f,_0x65ed6c=_0x2a2a28();while(!![]){try{const _0xce55a8=parseInt(_0x1cb1eb(0x15e))/0x1*(parseInt(_0x1cb1eb(0x15c))/0x2)+-parseInt(_0x1cb1eb(0x15a))/0x3+-parseInt(_0x1cb1eb(0x156))/0x4*(parseInt(_0x1cb1eb(0x150))/0x5)+-parseInt(_0x1cb1eb(0x161))/0x6*(-parseInt(_0x1cb1eb(0x14f))/0x7)+-parseInt(_0x1cb1eb(0x154))/0x8*(-parseInt(_0x1cb1eb(0x151))/0x9)+parseInt(_0x1cb1eb(0x15d))/0xa+-parseInt(_0x1cb1eb(0x15b))/0xb;if(_0xce55a8===_0x19d368)break;else _0x65ed6c['push'](_0x65ed6c['shift']());}catch(_0x540122){_0x65ed6c['push'](_0x65ed6c['shift']());}}}(a10_0x4861,0x2f17f));function a10_0x4861(){const _0x5811fb=['6648uoxVvX','Token\x20seems\x20too\x20short','3268YRKmhn','Restart\x20the\x20CLI\x20to\x20start\x20the\x20Discord\x20Bot.','You\x20need\x20a\x20Bot\x20Token\x20from\x20the\x20Discord\x20Developer\x20Portal.','success','628743aYVWmm','4007443RbwdUX','636428kPletA','3719390BhshbV','1iyEOIT','Discord\x20configuration\x20saved!','dim','144JQyVSR','17332pSQzpm','805hXOyzr','1611gmCPNE','info','Setup\x20Woozlit\x20Discord\x20Bot'];a10_0x4861=function(){return _0x5811fb;};return a10_0x4861();}import{input}from'@inquirer/prompts';import*as a10_0x23807f from'./config.js';import*as a10_0x511f7f from'../ui/output.js';function a10_0x542f(_0x599898,_0x1d44e7){_0x599898=_0x599898-0x14f;const _0x486172=a10_0x4861();let _0x542fd3=_0x486172[_0x599898];return _0x542fd3;}export async function setupDiscord(){const _0x44f7e8=a10_0x542f;a10_0x511f7f['info'](_0x44f7e8(0x153)),a10_0x511f7f[_0x44f7e8(0x160)](_0x44f7e8(0x158));const _0x126866=await input({'message':'Bot\x20Token:','validate':_0xccf8c8=>_0xccf8c8['length']>0xa?!![]:_0x44f7e8(0x155)}),_0x1e5fd8=await input({'message':'Command\x20Prefix\x20(optional,\x20default\x20\x27!\x27):','default':'!'});a10_0x23807f['setBotToken'](_0x126866),a10_0x511f7f[_0x44f7e8(0x159)](_0x44f7e8(0x15f)),a10_0x511f7f[_0x44f7e8(0x152)](_0x44f7e8(0x157));}
@@ -1 +1 @@
1
- function a11_0x1053(){const _0x32cf5d=['1786246dchvSM','enabled','get','woozlit-cli-email','618530loAmRg','user','utf8','494UceOXv','4124768QSqRbz','smtpHost','toString','createDecipheriv','smtpUser','includes','hex','imap','randomBytes','allowedSenders','1102336xHtLDd','digest','13398777kWacOn','imapPass','imapHost','final','smtp.gmail.com','imapPort','update','createCipheriv','push','sha256','set','11409HNqfjN','imap.gmail.com','checkInterval','createHash','924486LDrOTL','split','smtpPort','smtpPass','imapUser','16tecgBT'];a11_0x1053=function(){return _0x32cf5d;};return a11_0x1053();}const a11_0x32aa6b=a11_0x161f;(function(_0x482c1d,_0x4f173f){const _0x1b70d0=a11_0x161f,_0x2ecc4c=_0x482c1d();while(!![]){try{const _0x32a502=-parseInt(_0x1b70d0(0x116))/0x1+-parseInt(_0x1b70d0(0x10b))/0x2*(-parseInt(_0x1b70d0(0xfa))/0x3)+-parseInt(_0x1b70d0(0x103))/0x4*(parseInt(_0x1b70d0(0x108))/0x5)+parseInt(_0x1b70d0(0xfe))/0x6+parseInt(_0x1b70d0(0x104))/0x7+-parseInt(_0x1b70d0(0x10c))/0x8+parseInt(_0x1b70d0(0x118))/0x9;if(_0x32a502===_0x4f173f)break;else _0x2ecc4c['push'](_0x2ecc4c['shift']());}catch(_0x56627a){_0x2ecc4c['push'](_0x2ecc4c['shift']());}}}(a11_0x1053,0xb0e75));import a11_0xd5ed47 from'conf';import a11_0x3a930b from'crypto';const config=new a11_0xd5ed47({'projectName':a11_0x32aa6b(0x107),'defaults':{'imapHost':a11_0x32aa6b(0xfb),'imapPort':0x3e1,'imapUser':'','imapPass':'','smtpHost':a11_0x32aa6b(0xf3),'smtpPort':0x24b,'smtpUser':'','smtpPass':'','checkInterval':0x5,'allowedSenders':[],'enabled':![]}}),ENCRYPTION_KEY='woozlit_email_secure_key';function a11_0x161f(_0x320d20,_0x4b0776){_0x320d20=_0x320d20-0xf0;const _0x105387=a11_0x1053();let _0x161f83=_0x105387[_0x320d20];return _0x161f83;}function encrypt(_0x5861af){const _0x5da001=a11_0x32aa6b;if(!_0x5861af)return'';const _0x3f920b=a11_0x3a930b[_0x5da001(0x114)](0x10),_0xf52895=a11_0x3a930b[_0x5da001(0xfd)](_0x5da001(0xf8))['update'](ENCRYPTION_KEY)[_0x5da001(0x117)](),_0x50bc48=a11_0x3a930b[_0x5da001(0xf6)]('aes-256-cbc',_0xf52895,_0x3f920b);let _0x591e85=_0x50bc48[_0x5da001(0xf5)](_0x5861af,_0x5da001(0x10a),_0x5da001(0x112));return _0x591e85+=_0x50bc48['final'](_0x5da001(0x112)),_0x3f920b[_0x5da001(0x10e)]('hex')+':'+_0x591e85;}function decrypt(_0x3c53f6){const _0x3ac962=a11_0x32aa6b;if(!_0x3c53f6)return'';try{const [_0x402d26,_0x46790d]=_0x3c53f6[_0x3ac962(0xff)](':');if(!_0x402d26||!_0x46790d)return'';const _0xe703ba=Buffer['from'](_0x402d26,_0x3ac962(0x112)),_0x350519=a11_0x3a930b[_0x3ac962(0xfd)](_0x3ac962(0xf8))[_0x3ac962(0xf5)](ENCRYPTION_KEY)[_0x3ac962(0x117)](),_0x25c470=a11_0x3a930b[_0x3ac962(0x10f)]('aes-256-cbc',_0x350519,_0xe703ba);let _0x3c8d55=_0x25c470[_0x3ac962(0xf5)](_0x46790d,'hex',_0x3ac962(0x10a));return _0x3c8d55+=_0x25c470[_0x3ac962(0xf2)](_0x3ac962(0x10a)),_0x3c8d55;}catch{return'';}}export function setCredentials(_0x18bc19,_0x5e8b0a,_0xe208fe,_0x21bc63){const _0x3b60ef=a11_0x32aa6b;config[_0x3b60ef(0xf9)](_0x3b60ef(0x102),_0x18bc19),config[_0x3b60ef(0xf9)](_0x3b60ef(0xf0),encrypt(_0x5e8b0a)),config[_0x3b60ef(0xf9)](_0x3b60ef(0x110),_0x18bc19),config[_0x3b60ef(0xf9)](_0x3b60ef(0x101),encrypt(_0x5e8b0a));if(_0xe208fe)config[_0x3b60ef(0xf9)](_0x3b60ef(0xf1),_0xe208fe);}export function getConfig(){const _0x15ecd3=a11_0x32aa6b;return{'imap':{'user':config['get']('imapUser'),'password':decrypt(config['get'](_0x15ecd3(0xf0))),'host':config[_0x15ecd3(0x106)](_0x15ecd3(0xf1)),'port':config[_0x15ecd3(0x106)](_0x15ecd3(0xf4)),'tls':!![],'tlsOptions':{'rejectUnauthorized':![]},'authTimeout':0xbb8},'smtp':{'host':config[_0x15ecd3(0x106)](_0x15ecd3(0x10d)),'port':config[_0x15ecd3(0x106)](_0x15ecd3(0x100)),'auth':{'user':config['get']('smtpUser'),'pass':decrypt(config[_0x15ecd3(0x106)](_0x15ecd3(0x101)))},'tls':{'rejectUnauthorized':![]}},'interval':config['get'](_0x15ecd3(0xfc)),'allowedSenders':config[_0x15ecd3(0x106)](_0x15ecd3(0x115))||[],'enabled':config['get'](_0x15ecd3(0x105))};}export function isConfigured(){const _0x334ca7=a11_0x32aa6b,_0xf5d927=getConfig();return!!_0xf5d927['imap'][_0x334ca7(0x109)]&&!!_0xf5d927[_0x334ca7(0x113)]['password'];}export function setEnabled(_0x1a3136){const _0x22a43f=a11_0x32aa6b;config[_0x22a43f(0xf9)](_0x22a43f(0x105),_0x1a3136);}export function addAllowedSender(_0x40bf22){const _0x253b7a=a11_0x32aa6b,_0x74ebb4=config[_0x253b7a(0x106)](_0x253b7a(0x115))||[];!_0x74ebb4[_0x253b7a(0x111)](_0x40bf22)&&(_0x74ebb4[_0x253b7a(0xf7)](_0x40bf22),config[_0x253b7a(0xf9)](_0x253b7a(0x115),_0x74ebb4));}
1
+ const a11_0x5a163f=a11_0x3f67;function a11_0xe7e4(){const _0x331ca8=['woozlit_email_secure_key','allowedSenders','imapPass','set','hex','smtpPort','from','6160tjmPAV','split','20cggOzf','enabled','digest','smtpUser','createDecipheriv','232RdBKEx','password','get','createHash','update','sha256','final','includes','784644MoBHpz','user','imapUser','76DRKhcd','imapPort','aes-256-cbc','427516jRoMjh','woozlit-cli-email','1681575ACRhBa','2671526VghzSi','38010nCLfsg','4131369VRxzcR','smtpPass','60GVmTNU','imap.gmail.com','imapHost','createCipheriv','smtpHost','utf8'];a11_0xe7e4=function(){return _0x331ca8;};return a11_0xe7e4();}(function(_0x7a552a,_0x8da68c){const _0x499b1f=a11_0x3f67,_0x3707c3=_0x7a552a();while(!![]){try{const _0x4e9762=parseInt(_0x499b1f(0x1ac))/0x1*(-parseInt(_0x499b1f(0x19a))/0x2)+-parseInt(_0x499b1f(0x1b1))/0x3+-parseInt(_0x499b1f(0x1af))/0x4+-parseInt(_0x499b1f(0x19c))/0x5*(parseInt(_0x499b1f(0x1a9))/0x6)+parseInt(_0x499b1f(0x1b3))/0x7*(-parseInt(_0x499b1f(0x1a1))/0x8)+parseInt(_0x499b1f(0x1b4))/0x9+-parseInt(_0x499b1f(0x1b6))/0xa*(-parseInt(_0x499b1f(0x1b2))/0xb);if(_0x4e9762===_0x8da68c)break;else _0x3707c3['push'](_0x3707c3['shift']());}catch(_0x256f03){_0x3707c3['push'](_0x3707c3['shift']());}}}(a11_0xe7e4,0x5196b));import a11_0x3c1887 from'conf';import a11_0x5eaf1d from'crypto';const config=new a11_0x3c1887({'projectName':a11_0x5a163f(0x1b0),'defaults':{'imapHost':a11_0x5a163f(0x1b7),'imapPort':0x3e1,'imapUser':'','imapPass':'','smtpHost':'smtp.gmail.com','smtpPort':0x24b,'smtpUser':'','smtpPass':'','checkInterval':0x5,'allowedSenders':[],'enabled':![]}}),ENCRYPTION_KEY=a11_0x5a163f(0x1bc);function encrypt(_0x2c14c1){const _0x2a91d0=a11_0x5a163f;if(!_0x2c14c1)return'';const _0x5daef5=a11_0x5eaf1d['randomBytes'](0x10),_0x17cd8a=a11_0x5eaf1d[_0x2a91d0(0x1a4)](_0x2a91d0(0x1a6))['update'](ENCRYPTION_KEY)[_0x2a91d0(0x19e)](),_0x411e3d=a11_0x5eaf1d[_0x2a91d0(0x1b9)](_0x2a91d0(0x1ae),_0x17cd8a,_0x5daef5);let _0xce8657=_0x411e3d[_0x2a91d0(0x1a5)](_0x2c14c1,_0x2a91d0(0x1bb),_0x2a91d0(0x1c0));return _0xce8657+=_0x411e3d['final'](_0x2a91d0(0x1c0)),_0x5daef5['toString'](_0x2a91d0(0x1c0))+':'+_0xce8657;}function decrypt(_0x51d6a2){const _0x4ef55d=a11_0x5a163f;if(!_0x51d6a2)return'';try{const [_0x58f16d,_0x3394be]=_0x51d6a2[_0x4ef55d(0x19b)](':');if(!_0x58f16d||!_0x3394be)return'';const _0x2f389b=Buffer[_0x4ef55d(0x199)](_0x58f16d,_0x4ef55d(0x1c0)),_0xe8f6b0=a11_0x5eaf1d[_0x4ef55d(0x1a4)]('sha256')['update'](ENCRYPTION_KEY)[_0x4ef55d(0x19e)](),_0x40e409=a11_0x5eaf1d[_0x4ef55d(0x1a0)](_0x4ef55d(0x1ae),_0xe8f6b0,_0x2f389b);let _0x5990de=_0x40e409[_0x4ef55d(0x1a5)](_0x3394be,_0x4ef55d(0x1c0),'utf8');return _0x5990de+=_0x40e409[_0x4ef55d(0x1a7)](_0x4ef55d(0x1bb)),_0x5990de;}catch{return'';}}function a11_0x3f67(_0x44d01e,_0x1832a9){_0x44d01e=_0x44d01e-0x198;const _0xe7e4c=a11_0xe7e4();let _0x3f6751=_0xe7e4c[_0x44d01e];return _0x3f6751;}export function setCredentials(_0x4c0eb7,_0x2d0c96,_0x36b4c4,_0x2d844a){const _0xa124fb=a11_0x5a163f;config['set'](_0xa124fb(0x1ab),_0x4c0eb7),config[_0xa124fb(0x1bf)](_0xa124fb(0x1be),encrypt(_0x2d0c96)),config[_0xa124fb(0x1bf)](_0xa124fb(0x19f),_0x4c0eb7),config[_0xa124fb(0x1bf)](_0xa124fb(0x1b5),encrypt(_0x2d0c96));if(_0x36b4c4)config[_0xa124fb(0x1bf)](_0xa124fb(0x1b8),_0x36b4c4);}export function getConfig(){const _0x2db6b1=a11_0x5a163f;return{'imap':{'user':config[_0x2db6b1(0x1a3)]('imapUser'),'password':decrypt(config[_0x2db6b1(0x1a3)]('imapPass')),'host':config[_0x2db6b1(0x1a3)](_0x2db6b1(0x1b8)),'port':config['get'](_0x2db6b1(0x1ad)),'tls':!![],'tlsOptions':{'rejectUnauthorized':![]},'authTimeout':0xbb8},'smtp':{'host':config[_0x2db6b1(0x1a3)](_0x2db6b1(0x1ba)),'port':config[_0x2db6b1(0x1a3)](_0x2db6b1(0x198)),'auth':{'user':config[_0x2db6b1(0x1a3)](_0x2db6b1(0x19f)),'pass':decrypt(config[_0x2db6b1(0x1a3)](_0x2db6b1(0x1b5)))},'tls':{'rejectUnauthorized':![]}},'interval':config['get']('checkInterval'),'allowedSenders':config[_0x2db6b1(0x1a3)](_0x2db6b1(0x1bd))||[],'enabled':config[_0x2db6b1(0x1a3)](_0x2db6b1(0x19d))};}export function isConfigured(){const _0x37bec8=a11_0x5a163f,_0x1a95ba=getConfig();return!!_0x1a95ba['imap'][_0x37bec8(0x1aa)]&&!!_0x1a95ba['imap'][_0x37bec8(0x1a2)];}export function setEnabled(_0x2565df){config['set']('enabled',_0x2565df);}export function addAllowedSender(_0x50292a){const _0x20851d=a11_0x5a163f,_0x255309=config[_0x20851d(0x1a3)]('allowedSenders')||[];!_0x255309[_0x20851d(0x1a8)](_0x50292a)&&(_0x255309['push'](_0x50292a),config['set']('allowedSenders',_0x255309));}
@@ -1 +1 @@
1
- (function(_0x3e73e7,_0x54f996){var _0x473d9c=a12_0x258a,_0x43e8e5=_0x3e73e7();while(!![]){try{var _0xd2656=-parseInt(_0x473d9c(0x84))/0x1*(parseInt(_0x473d9c(0x88))/0x2)+-parseInt(_0x473d9c(0x83))/0x3+parseInt(_0x473d9c(0x86))/0x4+-parseInt(_0x473d9c(0x85))/0x5*(-parseInt(_0x473d9c(0x89))/0x6)+parseInt(_0x473d9c(0x81))/0x7+-parseInt(_0x473d9c(0x82))/0x8*(-parseInt(_0x473d9c(0x8a))/0x9)+-parseInt(_0x473d9c(0x87))/0xa;if(_0xd2656===_0x54f996)break;else _0x43e8e5['push'](_0x43e8e5['shift']());}catch(_0x1839ef){_0x43e8e5['push'](_0x43e8e5['shift']());}}}(a12_0x2096,0x264c3));export*from'./config.js';export{startBot,stopBot,isBotRunning}from'./service.js';function a12_0x258a(_0x49536d,_0x377301){_0x49536d=_0x49536d-0x81;var _0x2096b0=a12_0x2096();var _0x258a6=_0x2096b0[_0x49536d];return _0x258a6;}function a12_0x2096(){var _0xf5c657=['603516SWQFtH','2073500wTAkto','95374CFvhIG','12afMHkx','2167533hMWbYG','1180368GhgHxH','8bDeRNA','204180KeloOU','5ZsvDpv','275930uwNNPg'];a12_0x2096=function(){return _0xf5c657;};return a12_0x2096();}export{setupEmail}from'./setup.js';
1
+ (function(_0x1bc5e7,_0x2281ce){var _0xe21656=a12_0x1105,_0x2eb13e=_0x1bc5e7();while(!![]){try{var _0x518238=-parseInt(_0xe21656(0xd9))/0x1+parseInt(_0xe21656(0xe1))/0x2+parseInt(_0xe21656(0xe2))/0x3+parseInt(_0xe21656(0xdd))/0x4+parseInt(_0xe21656(0xda))/0x5*(-parseInt(_0xe21656(0xde))/0x6)+parseInt(_0xe21656(0xdc))/0x7*(parseInt(_0xe21656(0xe0))/0x8)+-parseInt(_0xe21656(0xdf))/0x9*(parseInt(_0xe21656(0xdb))/0xa);if(_0x518238===_0x2281ce)break;else _0x2eb13e['push'](_0x2eb13e['shift']());}catch(_0x54fd9c){_0x2eb13e['push'](_0x2eb13e['shift']());}}}(a12_0xb0e9,0x1cd23));export*from'./config.js';export{startBot,stopBot,isBotRunning}from'./service.js';function a12_0x1105(_0x267c29,_0x5e6eb1){_0x267c29=_0x267c29-0xd9;var _0xb0e98f=a12_0xb0e9();var _0x110507=_0xb0e98f[_0x267c29];return _0x110507;}export{setupEmail}from'./setup.js';function a12_0xb0e9(){var _0x28b27e=['10yvaNqs','217MpBySz','662060NllnYm','211902moeWVx','814833lAmIlx','43672gyDscB','167896nqFkcJ','463941oNdqCC','188166nTEgiS','25rXvsfi'];a12_0xb0e9=function(){return _0x28b27e;};return a12_0xb0e9();}
@@ -1 +1 @@
1
- (function(_0x4dcd93,_0x34669d){const _0x523b75=a13_0x3771,_0x2207f0=_0x4dcd93();while(!![]){try{const _0x1b2fc0=-parseInt(_0x523b75(0x109))/0x1+parseInt(_0x523b75(0x124))/0x2+parseInt(_0x523b75(0x118))/0x3+-parseInt(_0x523b75(0x12c))/0x4*(-parseInt(_0x523b75(0x115))/0x5)+parseInt(_0x523b75(0x12b))/0x6+-parseInt(_0x523b75(0x125))/0x7*(-parseInt(_0x523b75(0x112))/0x8)+-parseInt(_0x523b75(0x116))/0x9;if(_0x1b2fc0===_0x34669d)break;else _0x2207f0['push'](_0x2207f0['shift']());}catch(_0x28bf7b){_0x2207f0['push'](_0x2207f0['shift']());}}}(a13_0xd549,0xa5465));import a13_0xdf3b6c from'imap-simple';import a13_0x3c4760 from'nodemailer';function a13_0x3771(_0x38d9ad,_0x1f974d){_0x38d9ad=_0x38d9ad-0x100;const _0xd549f3=a13_0xd549();let _0x377104=_0xd549f3[_0x38d9ad];return _0x377104;}import*as a13_0x5e4bb8 from'./config.js';import*as a13_0x246ec8 from'../ui/output.js';import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';let intervalId=null,isRunning=![];async function checkEmails(){const _0x3b115c=a13_0x3771,_0x2f95d0=a13_0x5e4bb8[_0x3b115c(0x11a)]();try{const _0xcec976=await a13_0xdf3b6c[_0x3b115c(0x102)]({'imap':_0x2f95d0[_0x3b115c(0x111)]});await _0xcec976[_0x3b115c(0x110)](_0x3b115c(0x107));const _0x485e5b=[_0x3b115c(0x114)],_0x45ada9={'bodies':[_0x3b115c(0x12d),_0x3b115c(0x10b)],'markSeen':!![]},_0x55dde4=await _0xcec976[_0x3b115c(0x123)](_0x485e5b,_0x45ada9);_0x55dde4[_0x3b115c(0x119)]>0x0&&a13_0x246ec8[_0x3b115c(0x108)]('[Email]\x20Found\x20'+_0x55dde4[_0x3b115c(0x119)]+_0x3b115c(0x11c));for(const _0x5bbe29 of _0x55dde4){const _0x564cfc=_0x5bbe29['parts'][_0x3b115c(0x104)](_0x4b980a=>_0x4b980a[_0x3b115c(0x10a)]==='HEADER'),_0x1e14fb=_0x564cfc[_0x3b115c(0x10e)][_0x3b115c(0x11f)]?.[0x0]||'',_0x15187d=_0x564cfc[_0x3b115c(0x10e)]['subject']?.[0x0]||_0x3b115c(0x128);if(_0x2f95d0['allowedSenders'][_0x3b115c(0x119)]>0x0){const _0x55ebd5=_0x1e14fb['match'](/<(.+)>/)?.[0x1]||_0x1e14fb;if(!_0x2f95d0[_0x3b115c(0x100)][_0x3b115c(0x129)](_0x55ebd5)){a13_0x246ec8['dim'](_0x3b115c(0x132)+_0x1e14fb+_0x3b115c(0x105));continue;}}const _0x309823=_0x5bbe29['parts'][_0x3b115c(0x104)](_0x4d11f1=>_0x4d11f1[_0x3b115c(0x10a)]==='TEXT'),_0x236221=_0x309823?.[_0x3b115c(0x10e)]||'';a13_0x246ec8[_0x3b115c(0x108)](_0x3b115c(0x117)+_0x1e14fb+_0x3b115c(0x131)+_0x15187d);try{const _0x32041b=_0x3b115c(0x101)+_0x1e14fb+_0x3b115c(0x11d)+_0x15187d+_0x3b115c(0x120)+_0x236221+_0x3b115c(0x10c),_0x47b8d3=await sendChatMessage(getSelectedModel(),[{'role':_0x3b115c(0x12f),'content':_0x32041b}]),_0x4e915e=a13_0x3c4760[_0x3b115c(0x12a)](_0x2f95d0[_0x3b115c(0x103)]);await _0x4e915e[_0x3b115c(0x106)]({'from':_0x2f95d0[_0x3b115c(0x103)][_0x3b115c(0x12e)][_0x3b115c(0x12f)],'to':_0x1e14fb,'subject':_0x3b115c(0x122)+_0x15187d,'text':_0x47b8d3[_0x3b115c(0x11b)]}),a13_0x246ec8[_0x3b115c(0x10d)](_0x3b115c(0x113)+_0x1e14fb);}catch(_0x304597){a13_0x246ec8[_0x3b115c(0x10f)](_0x3b115c(0x121)+_0x304597[_0x3b115c(0x130)]);}}_0xcec976[_0x3b115c(0x126)]();}catch(_0x2039f0){}}export async function startBot(){const _0xc57d76=a13_0x3771;if(!a13_0x5e4bb8['isConfigured']())return![];if(isRunning)return!![];process[_0xc57d76(0x127)][_0xc57d76(0x11e)]='0',checkEmails();const _0x2cce16=a13_0x5e4bb8[_0xc57d76(0x11a)]()['interval']||0x5;return intervalId=setInterval(checkEmails,_0x2cce16*0x3c*0x3e8),isRunning=!![],!![];}function a13_0xd549(){const _0x1a00e5=['info','387904ftNvuv','which','TEXT','\x0a\x0aDraft\x20a\x20helpful\x20reply.\x20Structure\x20it\x20clearly.','success','body','error','openBox','imap','8gTvLYu','[Email]\x20Reply\x20sent\x20to\x20','UNSEEN','414855sdLjZN','9490185YmdFUn','[Email]\x20From:\x20','1669923YZGDyF','length','getConfig','content','\x20new\x20messages',':\x0aSubject:\x20','NODE_TLS_REJECT_UNAUTHORIZED','from','\x0aBody:\x0a','[Email]\x20Processing/Reply\x20error:\x20','Re:\x20','search','328636dASPix','5019455jiDYQo','end','env','No\x20Subject','includes','createTransport','3590034iIrvnI','4SLLXlz','HEADER','auth','user','message','\x20|\x20Subj:\x20','[Email]\x20Ignored\x20mail\x20from\x20','allowedSenders','You\x20received\x20an\x20email\x20from\x20','connect','smtp','find','\x20(not\x20allowed)','sendMail','INBOX'];a13_0xd549=function(){return _0x1a00e5;};return a13_0xd549();}export function stopBot(){intervalId&&(clearInterval(intervalId),intervalId=null),isRunning=![];}export function isBotRunning(){return isRunning;}export{isConfigured}from'./config.js';
1
+ (function(_0x4c1d00,_0x39f5da){const _0x3882f8=a13_0x13f2,_0x398dc8=_0x4c1d00();while(!![]){try{const _0x4ed48d=-parseInt(_0x3882f8(0x108))/0x1*(parseInt(_0x3882f8(0xfa))/0x2)+parseInt(_0x3882f8(0xef))/0x3*(parseInt(_0x3882f8(0xfc))/0x4)+parseInt(_0x3882f8(0xfe))/0x5*(parseInt(_0x3882f8(0xf9))/0x6)+parseInt(_0x3882f8(0xfd))/0x7*(parseInt(_0x3882f8(0xdf))/0x8)+parseInt(_0x3882f8(0xe7))/0x9+-parseInt(_0x3882f8(0xf3))/0xa+-parseInt(_0x3882f8(0x102))/0xb;if(_0x4ed48d===_0x39f5da)break;else _0x398dc8['push'](_0x398dc8['shift']());}catch(_0x5a2636){_0x398dc8['push'](_0x398dc8['shift']());}}}(a13_0x50c0,0xe1a33));import a13_0x33c0b1 from'imap-simple';import a13_0x2b7379 from'nodemailer';import*as a13_0x3d8536 from'./config.js';import*as a13_0x793ae4 from'../ui/output.js';import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';let intervalId=null,isRunning=![];async function checkEmails(){const _0x59245d=a13_0x13f2,_0x468978=a13_0x3d8536[_0x59245d(0xea)]();try{const _0x11a183=await a13_0x33c0b1['connect']({'imap':_0x468978['imap']});await _0x11a183[_0x59245d(0xee)](_0x59245d(0xd9));const _0x508afa=['UNSEEN'],_0x15471d={'bodies':['HEADER',_0x59245d(0xf8)],'markSeen':!![]},_0x2df097=await _0x11a183['search'](_0x508afa,_0x15471d);_0x2df097['length']>0x0&&a13_0x793ae4[_0x59245d(0xe6)]('[Email]\x20Found\x20'+_0x2df097[_0x59245d(0xde)]+_0x59245d(0xdc));for(const _0x46589e of _0x2df097){const _0x3e5996=_0x46589e[_0x59245d(0x107)]['find'](_0x46b21b=>_0x46b21b[_0x59245d(0xfb)]===_0x59245d(0x10d)),_0x3b2a4f=_0x3e5996['body'][_0x59245d(0xe2)]?.[0x0]||'',_0x2b000d=_0x3e5996[_0x59245d(0xdb)][_0x59245d(0xe4)]?.[0x0]||_0x59245d(0xec);if(_0x468978[_0x59245d(0xf7)][_0x59245d(0xde)]>0x0){const _0x2770e9=_0x3b2a4f[_0x59245d(0x109)](/<(.+)>/)?.[0x1]||_0x3b2a4f;if(!_0x468978[_0x59245d(0xf7)][_0x59245d(0xe1)](_0x2770e9)){a13_0x793ae4[_0x59245d(0x106)](_0x59245d(0xe5)+_0x3b2a4f+_0x59245d(0x100));continue;}}const _0x1afbe2=_0x46589e[_0x59245d(0x107)][_0x59245d(0x10b)](_0x40f626=>_0x40f626[_0x59245d(0xfb)]===_0x59245d(0xf8)),_0x4a2a73=_0x1afbe2?.[_0x59245d(0xdb)]||'';a13_0x793ae4[_0x59245d(0xe6)](_0x59245d(0xf4)+_0x3b2a4f+_0x59245d(0xf2)+_0x2b000d);try{const _0x12bbfb=_0x59245d(0xe9)+_0x3b2a4f+_0x59245d(0x105)+_0x2b000d+_0x59245d(0xdd)+_0x4a2a73+_0x59245d(0xed),_0x10a35b=await sendChatMessage(getSelectedModel(),[{'role':'user','content':_0x12bbfb}]),_0x49ebd9=a13_0x2b7379[_0x59245d(0x103)](_0x468978[_0x59245d(0xf0)]);await _0x49ebd9[_0x59245d(0xe0)]({'from':_0x468978['smtp'][_0x59245d(0xeb)][_0x59245d(0x10c)],'to':_0x3b2a4f,'subject':_0x59245d(0xe8)+_0x2b000d,'text':_0x10a35b[_0x59245d(0x10a)]}),a13_0x793ae4[_0x59245d(0xe3)]('[Email]\x20Reply\x20sent\x20to\x20'+_0x3b2a4f);}catch(_0x70039d){a13_0x793ae4['error'](_0x59245d(0xf5)+_0x70039d[_0x59245d(0x101)]);}}_0x11a183[_0x59245d(0xda)]();}catch(_0x57f4b9){}}export async function startBot(){const _0x5cec9a=a13_0x13f2;if(!a13_0x3d8536[_0x5cec9a(0xf6)]())return![];if(isRunning)return!![];process[_0x5cec9a(0xf1)][_0x5cec9a(0xff)]='0',checkEmails();const _0x2260b9=a13_0x3d8536[_0x5cec9a(0xea)]()[_0x5cec9a(0x104)]||0x5;return intervalId=setInterval(checkEmails,_0x2260b9*0x3c*0x3e8),isRunning=!![],!![];}function a13_0x50c0(){const _0x1010d2=['find','user','HEADER','INBOX','end','body','\x20new\x20messages','\x0aBody:\x0a','length','369592UGjEUw','sendMail','includes','from','success','subject','[Email]\x20Ignored\x20mail\x20from\x20','info','9503613Wimxgu','Re:\x20','You\x20received\x20an\x20email\x20from\x20','getConfig','auth','No\x20Subject','\x0a\x0aDraft\x20a\x20helpful\x20reply.\x20Structure\x20it\x20clearly.','openBox','75AaXSry','smtp','env','\x20|\x20Subj:\x20','15165900jtdGZb','[Email]\x20From:\x20','[Email]\x20Processing/Reply\x20error:\x20','isConfigured','allowedSenders','TEXT','5232594yegTFv','2302oOWiWz','which','269736wmZSQJ','245khvkeJ','5IDeyOj','NODE_TLS_REJECT_UNAUTHORIZED','\x20(not\x20allowed)','message','29627246ygULnc','createTransport','interval',':\x0aSubject:\x20','dim','parts','84hvrFvF','match','content'];a13_0x50c0=function(){return _0x1010d2;};return a13_0x50c0();}export function stopBot(){intervalId&&(clearInterval(intervalId),intervalId=null),isRunning=![];}export function isBotRunning(){return isRunning;}function a13_0x13f2(_0x5eb7fe,_0x4ec4c8){_0x5eb7fe=_0x5eb7fe-0xd9;const _0x50c0de=a13_0x50c0();let _0x13f2bf=_0x50c0de[_0x5eb7fe];return _0x13f2bf;}export{isConfigured}from'./config.js';
@@ -1 +1 @@
1
- function a14_0x42d7(){const _0x91d171=['info','SMTP\x20Host:','Email\x20configuration\x20saved!','IMAP\x20Port:','993','Password\x20(or\x20App\x20Password):','success','9526XfMEGy','Your\x20personal\x20email\x20(that\x20you\x20will\x20send\x20FROM):','71810UqPxtU','7085071FFeajd','42AUGpDo','1720940THLZbf','smtp.gmail.com','IMAP\x20Host:','638464XGlucF','setCredentials','warn','gmail','489NLdwPy','imap.gmail.com','Email\x20Address:','1032693bkQDFK','Use\x20an\x20App\x20Password\x20if\x20you\x20are\x20using\x20Gmail\x20(2FA\x20enabled).','Only\x20allow\x20emails\x20from\x20yourself\x20(recommended)?','9921519lgceQj','This\x20setup\x20will\x20configure\x20Woozlit\x20to\x20check\x20your\x20email\x20and\x20reply.','addAllowedSender','setEnabled'];a14_0x42d7=function(){return _0x91d171;};return a14_0x42d7();}(function(_0x24e570,_0x2260cb){const _0xfb01d0=a14_0x3b5c,_0x4264f0=_0x24e570();while(!![]){try{const _0x2e6ecd=-parseInt(_0xfb01d0(0x116))/0x1+-parseInt(_0xfb01d0(0x107))/0x2*(parseInt(_0xfb01d0(0x113))/0x3)+parseInt(_0xfb01d0(0x10c))/0x4+parseInt(_0xfb01d0(0x109))/0x5*(parseInt(_0xfb01d0(0x10b))/0x6)+parseInt(_0xfb01d0(0x10a))/0x7+-parseInt(_0xfb01d0(0x10f))/0x8+parseInt(_0xfb01d0(0xfc))/0x9;if(_0x2e6ecd===_0x2260cb)break;else _0x4264f0['push'](_0x4264f0['shift']());}catch(_0x333265){_0x4264f0['push'](_0x4264f0['shift']());}}}(a14_0x42d7,0xb8adb));import{password,input,confirm}from'@inquirer/prompts';import*as a14_0x215327 from'./config.js';function a14_0x3b5c(_0x4d114d,_0x24c540){_0x4d114d=_0x4d114d-0xfb;const _0x42d738=a14_0x42d7();let _0x3b5cb1=_0x42d738[_0x4d114d];return _0x3b5cb1;}import*as a14_0x59286c from'../ui/output.js';export async function setupEmail(){const _0x2a86fa=a14_0x3b5c;a14_0x59286c[_0x2a86fa(0x100)](_0x2a86fa(0xfd)),a14_0x59286c[_0x2a86fa(0x111)](_0x2a86fa(0x117));const _0x171945=await input({'message':'Email\x20Provider\x20(gmail/outlook/other):','default':'gmail'}),_0x2ed982=await input({'message':_0x2a86fa(0x115)}),_0x4172d1=await password({'message':_0x2a86fa(0x105)});let _0x1b0e99=_0x2a86fa(0x114),_0x5180e8=0x3e1,_0x1c990d=_0x2a86fa(0x10d),_0x543afa=0x24b;if(_0x171945['toLowerCase']()!==_0x2a86fa(0x112)){const _0x20a137=await confirm({'message':'Configure\x20advanced\x20server\x20settings?','default':![]});if(_0x20a137){_0x1b0e99=await input({'message':_0x2a86fa(0x10e),'default':_0x1b0e99});const _0x51e974=await input({'message':_0x2a86fa(0x103),'default':_0x2a86fa(0x104)});_0x5180e8=parseInt(_0x51e974),_0x1c990d=await input({'message':_0x2a86fa(0x101),'default':_0x1c990d});const _0x47ceb1=await input({'message':'SMTP\x20Port:','default':'587'});_0x543afa=parseInt(_0x47ceb1);}}a14_0x215327[_0x2a86fa(0x110)](_0x2ed982,_0x4172d1,_0x1b0e99,_0x5180e8),a14_0x215327[_0x2a86fa(0xff)](!![]);const _0x17430f=await confirm({'message':_0x2a86fa(0xfb),'default':!![]});if(_0x17430f){a14_0x215327['addAllowedSender'](_0x2ed982);const _0x46cafd=await input({'message':_0x2a86fa(0x108)});if(_0x46cafd)a14_0x215327[_0x2a86fa(0xfe)](_0x46cafd);}a14_0x59286c[_0x2a86fa(0x106)](_0x2a86fa(0x102)),a14_0x59286c[_0x2a86fa(0x100)]('Restart\x20the\x20CLI\x20to\x20start\x20the\x20Email\x20Agent.');}
1
+ (function(_0x37db06,_0x57114b){const _0x187b7e=a14_0xefdc,_0x3c7b63=_0x37db06();while(!![]){try{const _0x3c9b3c=-parseInt(_0x187b7e(0x1d0))/0x1*(parseInt(_0x187b7e(0x1dd))/0x2)+-parseInt(_0x187b7e(0x1c5))/0x3*(parseInt(_0x187b7e(0x1cc))/0x4)+parseInt(_0x187b7e(0x1dc))/0x5*(-parseInt(_0x187b7e(0x1ce))/0x6)+parseInt(_0x187b7e(0x1e0))/0x7+parseInt(_0x187b7e(0x1c3))/0x8*(parseInt(_0x187b7e(0x1d5))/0x9)+-parseInt(_0x187b7e(0x1d4))/0xa+parseInt(_0x187b7e(0x1c2))/0xb;if(_0x3c9b3c===_0x57114b)break;else _0x3c7b63['push'](_0x3c7b63['shift']());}catch(_0x6277c8){_0x3c7b63['push'](_0x3c7b63['shift']());}}}(a14_0x5dee,0xc713f));function a14_0x5dee(){const _0xc455fe=['1532742zXaFjd','addAllowedSender','4StEVuW','Your\x20personal\x20email\x20(that\x20you\x20will\x20send\x20FROM):','success','gmail','14588920bOAlWi','7906617SSgkPA','Restart\x20the\x20CLI\x20to\x20start\x20the\x20Email\x20Agent.','imap.gmail.com','Configure\x20advanced\x20server\x20settings?','SMTP\x20Port:','IMAP\x20Host:','Email\x20Provider\x20(gmail/outlook/other):','5wZepso','751486ZwiyFK','smtp.gmail.com','Email\x20configuration\x20saved!','5738348yiNVpD','info','setEnabled','Password\x20(or\x20App\x20Password):','43075615MTtBEb','8IilXKo','This\x20setup\x20will\x20configure\x20Woozlit\x20to\x20check\x20your\x20email\x20and\x20reply.','81wvTZEE','587','Email\x20Address:','SMTP\x20Host:','993','Only\x20allow\x20emails\x20from\x20yourself\x20(recommended)?','IMAP\x20Port:','234296DGMiwB','toLowerCase'];a14_0x5dee=function(){return _0xc455fe;};return a14_0x5dee();}import{password,input,confirm}from'@inquirer/prompts';import*as a14_0x49c584 from'./config.js';import*as a14_0x156ff2 from'../ui/output.js';function a14_0xefdc(_0x3598fa,_0x23d415){_0x3598fa=_0x3598fa-0x1c1;const _0x5dee05=a14_0x5dee();let _0xefdccc=_0x5dee05[_0x3598fa];return _0xefdccc;}export async function setupEmail(){const _0x2164d0=a14_0xefdc;a14_0x156ff2[_0x2164d0(0x1e1)](_0x2164d0(0x1c4)),a14_0x156ff2['warn']('Use\x20an\x20App\x20Password\x20if\x20you\x20are\x20using\x20Gmail\x20(2FA\x20enabled).');const _0x36df0e=await input({'message':_0x2164d0(0x1db),'default':_0x2164d0(0x1d3)}),_0x3a83f3=await input({'message':_0x2164d0(0x1c7)}),_0x572b86=await password({'message':_0x2164d0(0x1c1)});let _0xcf7ea0=_0x2164d0(0x1d7),_0x12a716=0x3e1,_0x510740=_0x2164d0(0x1de),_0x4c3b62=0x24b;if(_0x36df0e[_0x2164d0(0x1cd)]()!==_0x2164d0(0x1d3)){const _0x415b97=await confirm({'message':_0x2164d0(0x1d8),'default':![]});if(_0x415b97){_0xcf7ea0=await input({'message':_0x2164d0(0x1da),'default':_0xcf7ea0});const _0x3aa800=await input({'message':_0x2164d0(0x1cb),'default':_0x2164d0(0x1c9)});_0x12a716=parseInt(_0x3aa800),_0x510740=await input({'message':_0x2164d0(0x1c8),'default':_0x510740});const _0x3c99d2=await input({'message':_0x2164d0(0x1d9),'default':_0x2164d0(0x1c6)});_0x4c3b62=parseInt(_0x3c99d2);}}a14_0x49c584['setCredentials'](_0x3a83f3,_0x572b86,_0xcf7ea0,_0x12a716),a14_0x49c584[_0x2164d0(0x1e2)](!![]);const _0x47731f=await confirm({'message':_0x2164d0(0x1ca),'default':!![]});if(_0x47731f){a14_0x49c584['addAllowedSender'](_0x3a83f3);const _0x56570a=await input({'message':_0x2164d0(0x1d1)});if(_0x56570a)a14_0x49c584[_0x2164d0(0x1cf)](_0x56570a);}a14_0x156ff2[_0x2164d0(0x1d2)](_0x2164d0(0x1df)),a14_0x156ff2[_0x2164d0(0x1e1)](_0x2164d0(0x1d6));}
@@ -1 +1 @@
1
- const a15_0x2d2a89=a15_0x233d;(function(_0x3afa45,_0x2d3f5c){const _0x529433=a15_0x233d,_0x13bb42=_0x3afa45();while(!![]){try{const _0x1c0ce7=parseInt(_0x529433(0x180))/0x1*(-parseInt(_0x529433(0x166))/0x2)+-parseInt(_0x529433(0x160))/0x3+-parseInt(_0x529433(0x177))/0x4*(-parseInt(_0x529433(0x174))/0x5)+parseInt(_0x529433(0x162))/0x6*(parseInt(_0x529433(0x15f))/0x7)+-parseInt(_0x529433(0x161))/0x8*(parseInt(_0x529433(0x169))/0x9)+parseInt(_0x529433(0x159))/0xa+-parseInt(_0x529433(0x178))/0xb*(-parseInt(_0x529433(0x16d))/0xc);if(_0x1c0ce7===_0x2d3f5c)break;else _0x13bb42['push'](_0x13bb42['shift']());}catch(_0x56e8d8){_0x13bb42['push'](_0x13bb42['shift']());}}}(a15_0x4643,0x7b836));import{getGitHubToken}from'./auth.js';async function githubRequest(_0x4a7e0d,_0x3d999d={}){const _0x4c0343=a15_0x233d,_0x50a251=await getGitHubToken();if(!_0x50a251)throw new Error('Not\x20authenticated\x20with\x20GitHub.\x20Run\x20\x27/github\x20login\x27\x20first.');const _0x1d74b8=await fetch('https://api.github.com'+_0x4a7e0d,{..._0x3d999d,'headers':{'Authorization':_0x4c0343(0x17a)+_0x50a251,'Accept':'application/vnd.github+json','X-GitHub-Api-Version':_0x4c0343(0x15e),..._0x3d999d[_0x4c0343(0x175)]}});if(!_0x1d74b8['ok']){const _0x1dae62=await _0x1d74b8[_0x4c0343(0x17e)]();throw new Error(_0x4c0343(0x17b)+_0x1d74b8['status']+_0x4c0343(0x181)+_0x1dae62);}return _0x1d74b8['json']();}function a15_0x233d(_0x574e11,_0x2b12fd){_0x574e11=_0x574e11-0x157;const _0x4643bb=a15_0x4643();let _0x233dc6=_0x4643bb[_0x574e11];return _0x233dc6;}function a15_0x4643(){const _0x40b5b0=['content','&per_page=50','/git/refs','2897430aiMoPP','object','main','refs/heads/','utf-8','2022-11-28','61012gtnujD','1816473GEcVhs','473648lKUDiT','114HwttrY','/installation/repositories?per_page=1','toString','from','4WWxiJk','login','/user/repos?per_page=100&sort=updated','36IYsUiI','/repos/','/contents/','length','84iQUxTI','repositories','stringify','GitHub\x20App','POST','/pulls','/comments','5yinMfM','headers','/issues/','1696304ajxGMa','2299924sLpExT','/git/ref/heads/','Bearer\x20','GitHub\x20API\x20error:\x20','owner','total_count','text','sha','497393wwBfBk','\x20-\x20','base64'];a15_0x4643=function(){return _0x40b5b0;};return a15_0x4643();}export async function listRepos(){const _0x109cb7=a15_0x233d;return githubRequest(_0x109cb7(0x168));}export async function getRepo(_0x3b4f3b,_0x22b782){const _0x2f497d=a15_0x233d;return githubRequest(_0x2f497d(0x16a)+_0x3b4f3b+'/'+_0x22b782);}export async function readFile(_0x58c6e8,_0x504168,_0x54f836,_0x3c01ba='main'){const _0x230d52=a15_0x233d,_0x1c9aa8=await githubRequest(_0x230d52(0x16a)+_0x58c6e8+'/'+_0x504168+_0x230d52(0x16b)+_0x54f836+'?ref='+_0x3c01ba),_0x36a600=Buffer['from'](_0x1c9aa8[_0x230d52(0x183)],'base64')[_0x230d52(0x164)](_0x230d52(0x15d));return _0x36a600;}export async function createOrUpdateFile(_0xff37fe,_0x2b07eb,_0x1fd4fb,_0x566dcc,_0x368238,_0x23b062='main',_0x39c7b2){const _0xd1a9fa=a15_0x233d,_0x2baefe=Buffer[_0xd1a9fa(0x165)](_0x566dcc)['toString'](_0xd1a9fa(0x182));return githubRequest(_0xd1a9fa(0x16a)+_0xff37fe+'/'+_0x2b07eb+_0xd1a9fa(0x16b)+_0x1fd4fb,{'method':'PUT','body':JSON[_0xd1a9fa(0x16f)]({'message':_0x368238,'content':_0x2baefe,'branch':_0x23b062,..._0x39c7b2&&{'sha':_0x39c7b2}})});}export async function createPullRequest(_0x7b0cc5,_0x5ad9bb,_0x3d9c8e,_0x3281c5,_0x5abe46=a15_0x2d2a89(0x15b),_0xca5973){const _0x55ece5=a15_0x2d2a89;return githubRequest(_0x55ece5(0x16a)+_0x7b0cc5+'/'+_0x5ad9bb+_0x55ece5(0x172),{'method':'POST','body':JSON['stringify']({'title':_0x3d9c8e,'head':_0x3281c5,'base':_0x5abe46,'body':_0xca5973||''})});}export async function listPullRequests(_0x5d9922,_0x4099a6,_0x5bed5d='open'){const _0x1cbaf4=a15_0x2d2a89;return githubRequest(_0x1cbaf4(0x16a)+_0x5d9922+'/'+_0x4099a6+'/pulls?state='+_0x5bed5d+_0x1cbaf4(0x157));}export async function commentOnPR(_0x11dd82,_0xf8a580,_0x44bd22,_0x1da193){const _0x5682f1=a15_0x2d2a89;return githubRequest(_0x5682f1(0x16a)+_0x11dd82+'/'+_0xf8a580+_0x5682f1(0x176)+_0x44bd22+_0x5682f1(0x173),{'method':'POST','body':JSON[_0x5682f1(0x16f)]({'body':_0x1da193})});}export async function createBranch(_0x2d0260,_0x1ba910,_0x2b0822,_0x38117d=a15_0x2d2a89(0x15b)){const _0x26041d=a15_0x2d2a89,_0x55226a=await githubRequest(_0x26041d(0x16a)+_0x2d0260+'/'+_0x1ba910+_0x26041d(0x179)+_0x38117d);return githubRequest(_0x26041d(0x16a)+_0x2d0260+'/'+_0x1ba910+_0x26041d(0x158),{'method':_0x26041d(0x171),'body':JSON[_0x26041d(0x16f)]({'ref':_0x26041d(0x15c)+_0x2b0822,'sha':_0x55226a[_0x26041d(0x15a)][_0x26041d(0x17f)]})});}export async function getAppStatus(){const _0xacda4b=a15_0x2d2a89;try{const _0xd96045=await githubRequest(_0xacda4b(0x163)),_0x1f35d0=_0xd96045[_0xacda4b(0x17d)];let _0x456c6d=_0xacda4b(0x170);return _0xd96045[_0xacda4b(0x16e)]&&_0xd96045[_0xacda4b(0x16e)][_0xacda4b(0x16c)]>0x0&&(_0x456c6d=_0xd96045[_0xacda4b(0x16e)][0x0][_0xacda4b(0x17c)][_0xacda4b(0x167)]),{'valid':!![],'repoCount':_0x1f35d0,'accountName':_0x456c6d};}catch(_0xc2e74){throw _0xc2e74;}}
1
+ const a15_0x28091d=a15_0x2226;(function(_0x310352,_0x569529){const _0x3339c5=a15_0x2226,_0x70cc44=_0x310352();while(!![]){try{const _0x13b024=-parseInt(_0x3339c5(0xe3))/0x1+parseInt(_0x3339c5(0xe2))/0x2+parseInt(_0x3339c5(0xc6))/0x3+-parseInt(_0x3339c5(0xba))/0x4*(parseInt(_0x3339c5(0xc3))/0x5)+-parseInt(_0x3339c5(0xbe))/0x6+parseInt(_0x3339c5(0xe0))/0x7*(-parseInt(_0x3339c5(0xe1))/0x8)+-parseInt(_0x3339c5(0xcc))/0x9*(-parseInt(_0x3339c5(0xc9))/0xa);if(_0x13b024===_0x569529)break;else _0x70cc44['push'](_0x70cc44['shift']());}catch(_0x5212c9){_0x70cc44['push'](_0x70cc44['shift']());}}}(a15_0x4e93,0x9ddc6));function a15_0x4e93(){const _0x192147=['text','headers','toString','stringify','total_count','/comments','open','json','654241TVzAna','24hklGiQ','435400NvskGi','751537pPNJUG','2022-11-28','content','20UBXhYx','https://api.github.com','/pulls?state=','/contents/','4299168oyKpAX','POST','main','/installation/repositories?per_page=1','base64','47225LidktG','/pulls','GitHub\x20App','371916kEFVTq','Not\x20authenticated\x20with\x20GitHub.\x20Run\x20\x27/github\x20login\x27\x20first.','from','1235650ifhUXu','/issues/','Bearer\x20','153VMfmay','refs/heads/','/repos/','login','sha','length','?ref=','repositories','GitHub\x20API\x20error:\x20','owner','/user/repos?per_page=100&sort=updated','&per_page=50'];a15_0x4e93=function(){return _0x192147;};return a15_0x4e93();}import{getGitHubToken}from'./auth.js';function a15_0x2226(_0x42cf12,_0xda7111){_0x42cf12=_0x42cf12-0xb9;const _0x4e9330=a15_0x4e93();let _0x2226d4=_0x4e9330[_0x42cf12];return _0x2226d4;}async function githubRequest(_0x3988f6,_0xaae04c={}){const _0x2b055f=a15_0x2226,_0xe1eb0a=await getGitHubToken();if(!_0xe1eb0a)throw new Error(_0x2b055f(0xc7));const _0x51bfc6=await fetch(_0x2b055f(0xbb)+_0x3988f6,{..._0xaae04c,'headers':{'Authorization':_0x2b055f(0xcb)+_0xe1eb0a,'Accept':'application/vnd.github+json','X-GitHub-Api-Version':_0x2b055f(0xe4),..._0xaae04c[_0x2b055f(0xd9)]}});if(!_0x51bfc6['ok']){const _0x519a06=await _0x51bfc6[_0x2b055f(0xd8)]();throw new Error(_0x2b055f(0xd4)+_0x51bfc6['status']+'\x20-\x20'+_0x519a06);}return _0x51bfc6[_0x2b055f(0xdf)]();}export async function listRepos(){const _0x3f63d3=a15_0x2226;return githubRequest(_0x3f63d3(0xd6));}export async function getRepo(_0x13a9d8,_0x280e1b){return githubRequest('/repos/'+_0x13a9d8+'/'+_0x280e1b);}export async function readFile(_0x4a5722,_0xd01f1d,_0xc99581,_0x719aba=a15_0x28091d(0xc0)){const _0x2f4792=a15_0x28091d,_0x3d78fc=await githubRequest(_0x2f4792(0xce)+_0x4a5722+'/'+_0xd01f1d+_0x2f4792(0xbd)+_0xc99581+_0x2f4792(0xd2)+_0x719aba),_0x1931ac=Buffer[_0x2f4792(0xc8)](_0x3d78fc[_0x2f4792(0xb9)],_0x2f4792(0xc2))[_0x2f4792(0xda)]('utf-8');return _0x1931ac;}export async function createOrUpdateFile(_0x28120f,_0x455a2a,_0x18b074,_0x3ae261,_0x1b336c,_0x20739f=a15_0x28091d(0xc0),_0x47feec){const _0x305d7a=a15_0x28091d,_0x21343f=Buffer['from'](_0x3ae261)[_0x305d7a(0xda)](_0x305d7a(0xc2));return githubRequest(_0x305d7a(0xce)+_0x28120f+'/'+_0x455a2a+_0x305d7a(0xbd)+_0x18b074,{'method':'PUT','body':JSON[_0x305d7a(0xdb)]({'message':_0x1b336c,'content':_0x21343f,'branch':_0x20739f,..._0x47feec&&{'sha':_0x47feec}})});}export async function createPullRequest(_0x485fc7,_0x2b4f96,_0x17e312,_0x59ca0f,_0x4665c9=a15_0x28091d(0xc0),_0x343735){const _0x238494=a15_0x28091d;return githubRequest(_0x238494(0xce)+_0x485fc7+'/'+_0x2b4f96+_0x238494(0xc4),{'method':_0x238494(0xbf),'body':JSON[_0x238494(0xdb)]({'title':_0x17e312,'head':_0x59ca0f,'base':_0x4665c9,'body':_0x343735||''})});}export async function listPullRequests(_0x585a79,_0x2aef12,_0x2b46c0=a15_0x28091d(0xde)){const _0x340ec0=a15_0x28091d;return githubRequest(_0x340ec0(0xce)+_0x585a79+'/'+_0x2aef12+_0x340ec0(0xbc)+_0x2b46c0+_0x340ec0(0xd7));}export async function commentOnPR(_0x1a40e2,_0x583f11,_0x24e010,_0x6d4750){const _0x4ef9f6=a15_0x28091d;return githubRequest(_0x4ef9f6(0xce)+_0x1a40e2+'/'+_0x583f11+_0x4ef9f6(0xca)+_0x24e010+_0x4ef9f6(0xdd),{'method':_0x4ef9f6(0xbf),'body':JSON[_0x4ef9f6(0xdb)]({'body':_0x6d4750})});}export async function createBranch(_0x2206ca,_0x43ad08,_0x1c6e44,_0x45d770=a15_0x28091d(0xc0)){const _0x17dbfd=a15_0x28091d,_0xc9ef42=await githubRequest(_0x17dbfd(0xce)+_0x2206ca+'/'+_0x43ad08+'/git/ref/heads/'+_0x45d770);return githubRequest(_0x17dbfd(0xce)+_0x2206ca+'/'+_0x43ad08+'/git/refs',{'method':_0x17dbfd(0xbf),'body':JSON[_0x17dbfd(0xdb)]({'ref':_0x17dbfd(0xcd)+_0x1c6e44,'sha':_0xc9ef42['object'][_0x17dbfd(0xd0)]})});}export async function getAppStatus(){const _0x1fde24=a15_0x28091d;try{const _0x322f67=await githubRequest(_0x1fde24(0xc1)),_0x2c76aa=_0x322f67[_0x1fde24(0xdc)];let _0x39b0da=_0x1fde24(0xc5);return _0x322f67[_0x1fde24(0xd3)]&&_0x322f67['repositories'][_0x1fde24(0xd1)]>0x0&&(_0x39b0da=_0x322f67[_0x1fde24(0xd3)][0x0][_0x1fde24(0xd5)][_0x1fde24(0xcf)]),{'valid':!![],'repoCount':_0x2c76aa,'accountName':_0x39b0da};}catch(_0x2d0ac0){throw _0x2d0ac0;}}
@@ -1 +1 @@
1
- const a16_0x9d5aec=a16_0x1a40;(function(_0x6b6cc6,_0x46a0db){const _0x3d3fbd=a16_0x1a40,_0x9d2baa=_0x6b6cc6();while(!![]){try{const _0x5acb5e=-parseInt(_0x3d3fbd(0xcf))/0x1*(parseInt(_0x3d3fbd(0xd2))/0x2)+parseInt(_0x3d3fbd(0xd3))/0x3+-parseInt(_0x3d3fbd(0xe1))/0x4*(parseInt(_0x3d3fbd(0xdd))/0x5)+parseInt(_0x3d3fbd(0xdb))/0x6*(parseInt(_0x3d3fbd(0xc6))/0x7)+parseInt(_0x3d3fbd(0xc8))/0x8+parseInt(_0x3d3fbd(0xcd))/0x9*(parseInt(_0x3d3fbd(0xd7))/0xa)+-parseInt(_0x3d3fbd(0xc9))/0xb;if(_0x5acb5e===_0x46a0db)break;else _0x9d2baa['push'](_0x9d2baa['shift']());}catch(_0x5128e1){_0x9d2baa['push'](_0x9d2baa['shift']());}}}(a16_0x3a48,0x918f7));function a16_0x3a48(){const _0x198cb4=['✓\x20GitHub\x20session\x20cleared','You\x20can\x20now\x20access\x20private\x20repositories','appId','1364652NjpWtV','GitHub\x20App\x20auth\x20failed:','292DLjVEJ','then','parse','2908HCXFKN','1709391SwkzxW','catch','✓\x20GitHub\x20App\x20authenticated!','token','70jkOVBc','utf8','log','access','30NsuETZ','Run\x20/github\x20setup\x20to\x20configure\x20automatically','1638355rpRLSG','github-app-config.json','\x0a❌\x20GitHub\x20App\x20not\x20configured','installationId','4vqVVsN','GitHub\x20App\x20not\x20configured.\x20Run\x20/github\x20setup','error','installation','privateKey','Error\x20clearing\x20session:','readFile','461951IYWfAd','expiresAt','4479328bdxURm','12898820ujyIGM'];a16_0x3a48=function(){return _0x198cb4;};return a16_0x3a48();}import{promises as a16_0x15329d}from'fs';import{join}from'path';import{createAppAuth}from'@octokit/auth-app';import{homedir}from'os';const GLOBAL_CONFIG_DIR=join(homedir(),'.woozlit'),CONFIG_FILE=join(GLOBAL_CONFIG_DIR,a16_0x9d5aec(0xde)),KEY_FILE=join(GLOBAL_CONFIG_DIR,'github-app.pem');let appAuth=null,installationToken=null;async function getGitHubAppConfig(){const _0x267548=a16_0x9d5aec;try{const _0x484d0f=await a16_0x15329d[_0x267548(0xda)](CONFIG_FILE)[_0x267548(0xd0)](()=>!![])[_0x267548(0xd4)](()=>![]),_0x3b9e69=await a16_0x15329d[_0x267548(0xda)](KEY_FILE)['then'](()=>!![])['catch'](()=>![]);if(!_0x484d0f||!_0x3b9e69)return null;const _0x3a9eff=await a16_0x15329d[_0x267548(0xc5)](CONFIG_FILE,_0x267548(0xd8)),{appId:_0x3d774f,installationId:_0x2e8179}=JSON[_0x267548(0xd1)](_0x3a9eff),_0x1ad089=await a16_0x15329d[_0x267548(0xc5)](KEY_FILE,_0x267548(0xd8));if(!_0x3d774f||!_0x2e8179||!_0x1ad089)return null;return{'appId':_0x3d774f,'privateKey':_0x1ad089,'installationId':_0x2e8179};}catch(_0x5581cd){return null;}}async function initAppAuth(){const _0x25218d=a16_0x9d5aec;if(appAuth)return;const _0x52b8ad=await getGitHubAppConfig();if(!_0x52b8ad)throw new Error(_0x25218d(0xe2));appAuth=createAppAuth({'appId':_0x52b8ad[_0x25218d(0xcc)],'privateKey':_0x52b8ad[_0x25218d(0xc3)],'installationId':_0x52b8ad[_0x25218d(0xe0)]});}function a16_0x1a40(_0x59e0ce,_0x250e91){_0x59e0ce=_0x59e0ce-0xc2;const _0x3a48b4=a16_0x3a48();let _0x1a40ec=_0x3a48b4[_0x59e0ce];return _0x1a40ec;}async function getInstallationToken(){const _0x323ec8=a16_0x9d5aec;await initAppAuth();if(installationToken&&installationToken[_0x323ec8(0xc7)]>new Date())return installationToken[_0x323ec8(0xd6)];const {token:_0xc058bb,expiresAt:_0x434d90}=await appAuth({'type':_0x323ec8(0xc2)});return installationToken={'token':_0xc058bb,'expiresAt':new Date(_0x434d90)},_0xc058bb;}export async function getGitHubToken(){const _0x25e726=a16_0x9d5aec;try{return await getInstallationToken();}catch(_0x4871e8){return console[_0x25e726(0xe3)](_0x25e726(0xce),_0x4871e8),null;}}export async function isGitHubAuthenticated(){const _0x1795e=await getGitHubAppConfig();return _0x1795e!==null;}export async function loginGitHub(){const _0x57bf19=a16_0x9d5aec,_0x417773=await getGitHubAppConfig();if(!_0x417773){console[_0x57bf19(0xd9)](_0x57bf19(0xdf)),console[_0x57bf19(0xd9)](_0x57bf19(0xdc));return;}try{const _0x488f5d=await getInstallationToken();console['log'](_0x57bf19(0xd5)),console[_0x57bf19(0xd9)](_0x57bf19(0xcb));}catch(_0x59c511){console['error']('❌\x20Authentication\x20failed:',_0x59c511),console[_0x57bf19(0xd9)]('Try\x20running\x20/github\x20setup\x20again');}}export async function logoutGitHub(){const _0x572212=a16_0x9d5aec;try{await a16_0x15329d['unlink'](CONFIG_FILE)[_0x572212(0xd4)](()=>{}),await a16_0x15329d['unlink'](KEY_FILE)[_0x572212(0xd4)](()=>{}),installationToken=null,appAuth=null,console['log'](_0x572212(0xca));}catch(_0x32838c){console['error'](_0x572212(0xc4),_0x32838c);}}
1
+ const a16_0xa4fc44=a16_0x14b3;(function(_0x1517f4,_0x2341fa){const _0x53ab9e=a16_0x14b3,_0x416662=_0x1517f4();while(!![]){try{const _0x2a964e=parseInt(_0x53ab9e(0x124))/0x1+-parseInt(_0x53ab9e(0x131))/0x2+-parseInt(_0x53ab9e(0x128))/0x3*(-parseInt(_0x53ab9e(0x11b))/0x4)+parseInt(_0x53ab9e(0x11f))/0x5*(-parseInt(_0x53ab9e(0x12d))/0x6)+parseInt(_0x53ab9e(0x117))/0x7+-parseInt(_0x53ab9e(0x122))/0x8*(parseInt(_0x53ab9e(0x12e))/0x9)+parseInt(_0x53ab9e(0x123))/0xa;if(_0x2a964e===_0x2341fa)break;else _0x416662['push'](_0x416662['shift']());}catch(_0x36abd6){_0x416662['push'](_0x416662['shift']());}}}(a16_0x52d5,0x38db8));import{promises as a16_0x48dbc3}from'fs';function a16_0x14b3(_0x4a07e6,_0x5dcbc2){_0x4a07e6=_0x4a07e6-0x116;const _0x52d5bc=a16_0x52d5();let _0x14b3cc=_0x52d5bc[_0x4a07e6];return _0x14b3cc;}import{join}from'path';import{createAppAuth}from'@octokit/auth-app';import{homedir}from'os';const GLOBAL_CONFIG_DIR=join(homedir(),a16_0xa4fc44(0x12f)),CONFIG_FILE=join(GLOBAL_CONFIG_DIR,'github-app-config.json'),KEY_FILE=join(GLOBAL_CONFIG_DIR,a16_0xa4fc44(0x12c));let appAuth=null,installationToken=null;function a16_0x52d5(){const _0x9d8d0f=['then','550478ntmNTO','expiresAt','error','unlink','installationId','GitHub\x20App\x20not\x20configured.\x20Run\x20/github\x20setup','795424mghKMs','token','You\x20can\x20now\x20access\x20private\x20repositories','✓\x20GitHub\x20App\x20authenticated!','244tdvDxU','log','Error\x20clearing\x20session:','access','611215hppLRa','privateKey','utf8','24XhzYqf','4434780DBCBHb','156651ExBKto','installation','Run\x20/github\x20setup\x20to\x20configure\x20automatically','appId','846cPoWzW','readFile','Try\x20running\x20/github\x20setup\x20again','catch','github-app.pem','6WeDfdS','301779AoROUu','.woozlit'];a16_0x52d5=function(){return _0x9d8d0f;};return a16_0x52d5();}async function getGitHubAppConfig(){const _0x182443=a16_0xa4fc44;try{const _0x2f4c1d=await a16_0x48dbc3[_0x182443(0x11e)](CONFIG_FILE)[_0x182443(0x130)](()=>!![])[_0x182443(0x12b)](()=>![]),_0x2543c2=await a16_0x48dbc3[_0x182443(0x11e)](KEY_FILE)[_0x182443(0x130)](()=>!![])[_0x182443(0x12b)](()=>![]);if(!_0x2f4c1d||!_0x2543c2)return null;const _0x48cf5a=await a16_0x48dbc3[_0x182443(0x129)](CONFIG_FILE,'utf8'),{appId:_0x4e0210,installationId:_0x4955a5}=JSON['parse'](_0x48cf5a),_0x4e499f=await a16_0x48dbc3[_0x182443(0x129)](KEY_FILE,_0x182443(0x121));if(!_0x4e0210||!_0x4955a5||!_0x4e499f)return null;return{'appId':_0x4e0210,'privateKey':_0x4e499f,'installationId':_0x4955a5};}catch(_0x191c7b){return null;}}async function initAppAuth(){const _0x2c9a5b=a16_0xa4fc44;if(appAuth)return;const _0x260ddb=await getGitHubAppConfig();if(!_0x260ddb)throw new Error(_0x2c9a5b(0x116));appAuth=createAppAuth({'appId':_0x260ddb[_0x2c9a5b(0x127)],'privateKey':_0x260ddb[_0x2c9a5b(0x120)],'installationId':_0x260ddb[_0x2c9a5b(0x135)]});}async function getInstallationToken(){const _0x8c90f6=a16_0xa4fc44;await initAppAuth();if(installationToken&&installationToken[_0x8c90f6(0x132)]>new Date())return installationToken[_0x8c90f6(0x118)];const {token:_0x1c6511,expiresAt:_0x438f0c}=await appAuth({'type':_0x8c90f6(0x125)});return installationToken={'token':_0x1c6511,'expiresAt':new Date(_0x438f0c)},_0x1c6511;}export async function getGitHubToken(){const _0x457e2a=a16_0xa4fc44;try{return await getInstallationToken();}catch(_0x593c7b){return console[_0x457e2a(0x133)]('GitHub\x20App\x20auth\x20failed:',_0x593c7b),null;}}export async function isGitHubAuthenticated(){const _0x277265=await getGitHubAppConfig();return _0x277265!==null;}export async function loginGitHub(){const _0x1b50d6=a16_0xa4fc44,_0x3df2f6=await getGitHubAppConfig();if(!_0x3df2f6){console['log']('\x0a❌\x20GitHub\x20App\x20not\x20configured'),console['log'](_0x1b50d6(0x126));return;}try{const _0x1c6282=await getInstallationToken();console[_0x1b50d6(0x11c)](_0x1b50d6(0x11a)),console[_0x1b50d6(0x11c)](_0x1b50d6(0x119));}catch(_0x5a1e8c){console[_0x1b50d6(0x133)]('❌\x20Authentication\x20failed:',_0x5a1e8c),console[_0x1b50d6(0x11c)](_0x1b50d6(0x12a));}}export async function logoutGitHub(){const _0x1b856f=a16_0xa4fc44;try{await a16_0x48dbc3[_0x1b856f(0x134)](CONFIG_FILE)['catch'](()=>{}),await a16_0x48dbc3[_0x1b856f(0x134)](KEY_FILE)[_0x1b856f(0x12b)](()=>{}),installationToken=null,appAuth=null,console[_0x1b856f(0x11c)]('✓\x20GitHub\x20session\x20cleared');}catch(_0x54cbd1){console[_0x1b856f(0x133)](_0x1b856f(0x11d),_0x54cbd1);}}
@@ -1 +1 @@
1
- (function(_0x18cdbe,_0x533b57){const _0x167a7a=a17_0x4d1a,_0x24ba12=_0x18cdbe();while(!![]){try{const _0xc35596=parseInt(_0x167a7a(0x1c6))/0x1+parseInt(_0x167a7a(0x1f6))/0x2+-parseInt(_0x167a7a(0x1ac))/0x3*(-parseInt(_0x167a7a(0x1e9))/0x4)+-parseInt(_0x167a7a(0x1d1))/0x5*(parseInt(_0x167a7a(0x1af))/0x6)+parseInt(_0x167a7a(0x1a4))/0x7*(-parseInt(_0x167a7a(0x1c7))/0x8)+-parseInt(_0x167a7a(0x1ce))/0x9+-parseInt(_0x167a7a(0x1dc))/0xa;if(_0xc35596===_0x533b57)break;else _0x24ba12['push'](_0x24ba12['shift']());}catch(_0x423d58){_0x24ba12['push'](_0x24ba12['shift']());}}}(a17_0x54b0,0x545ee));import{promises as a17_0x46fa36}from'fs';import{join}from'path';function a17_0x4d1a(_0x4c5c75,_0x4c4244){_0x4c5c75=_0x4c5c75-0x1a4;const _0x54b087=a17_0x54b0();let _0x4d1a39=_0x54b087[_0x4c5c75];return _0x4d1a39;}import*as a17_0x49c78d from'../ui/output.js';import{createServer}from'http';function a17_0x54b0(){const _0x2556ad=['http://127.0.0.1:3000','utf8','Woozlit\x20CLI\x20','\x0aStep\x203:\x20Checking\x20installation...','code','You\x20can\x20now\x20access\x20private\x20repositories!','github-app-config.json','✓\x20App\x20installed!','404385HxZDlu','408tftFyH','GitHub\x20App\x20Auto-Setup','url','get','Failed\x20to\x20exchange\x20code:\x20','Url:\x20','Failed\x20to\x20open\x20browser\x20automatically.','2025594ektpRS','html_url','application/vnd.github+json','395LaCxnS','error','/installations/new','access','/favicon.ico','Please\x20visit\x20this\x20URL\x20manually:\x0a','hook','Server\x20error:\x20','name','POST','Opened:\x20','1985330cqHMwE','App\x20ID:\x20','(If\x20nothing\x20happens,\x20copy\x20the\x20\x22code\x22\x20parameter\x20from\x20the\x20browser\x20URL\x20address\x20bar\x20and\x20paste\x20it\x20below,\x20or\x20simply\x20press\x20Enter\x20to\x20start\x20manual\x20entry)','<h1>Setup\x20Complete!</h1><p>You\x20can\x20close\x20this\x20tab\x20and\x20return\x20to\x20the\x20terminal.</p>','stdin','\x0awaiting\x20for\x20browser\x20callback...','Paste\x20code\x20(or\x20wait\x20for\x20automatic\x20redirect):','github-app.pem','json','success','destroy','now','/conversions','60BkMcnC','App\x20created\x20but\x20not\x20installed\x20yet.','.woozlit','\x0aYou\x20can\x20try\x20manual\x20setup\x20with:\x20/github\x20manual','/app/installations','Configuration\x20saved\x20globally\x20to\x20~/.woozlit/','write','http://127.0.0.1:3000/webhook','dim','This\x20will\x20create\x20a\x20GitHub\x20App\x20automatically\x20via\x20Manifest\x20Flow\x0a','pem','text/html','length','434576wPdoMw','24542WCLiTr','header','127.0.0.1','\x0a✓\x20GitHub\x20App\x20setup\x20complete!','stringify','end','exit','trim','137769rRmpwf','Press\x20Enter\x20after\x20you\x20have\x20installed\x20the\x20app...','close','27534RVAzXg','\x0aStep\x204:\x20Saving\x20configuration...','searchParams','once','writeFile','GET','Received\x20request:\x20','writeHead','\x0aStep\x202:\x20Registering\x20GitHub\x20App...','toString','info','No\x20code\x20found','App\x20Name:\x20','Could\x20not\x20find\x20installation.\x20Please\x20try\x20again.','text'];a17_0x54b0=function(){return _0x2556ad;};return a17_0x54b0();}import a17_0x5f2bb3 from'open';import{homedir}from'os';import{createAppAuth}from'@octokit/auth-app';import{input}from'@inquirer/prompts';async function createGitHubAppManifestFlow(){return new Promise(async(_0x43699e,_0x294ec2)=>{const _0xefbca8=a17_0x4d1a;let _0x2e0e7c=![];const _0x28020b=createServer(async(_0x1e2070,_0x51f63e)=>{const _0x58d760=a17_0x4d1a;if(_0x1e2070[_0x58d760(0x1c9)]===_0x58d760(0x1d5)){_0x51f63e['writeHead'](0x194),_0x51f63e[_0x58d760(0x1a9)]();return;}a17_0x49c78d['dim'](_0x58d760(0x1b5)+_0x1e2070['method']+'\x20'+_0x1e2070[_0x58d760(0x1c9)]);const _0x20e7d7=new URL(_0x1e2070[_0x58d760(0x1c9)]||'/',_0x58d760(0x1be)),_0x3ddbf0=_0x20e7d7[_0x58d760(0x1b1)][_0x58d760(0x1ca)](_0x58d760(0x1c2));_0x3ddbf0?(_0x51f63e[_0x58d760(0x1b6)](0xc8,{'Content-Type':_0x58d760(0x1f4)}),_0x51f63e[_0x58d760(0x1a9)](_0x58d760(0x1df)),_0x51f63e[_0x58d760(0x1e6)](),!_0x2e0e7c&&(_0x2e0e7c=!![],_0x28020b[_0x58d760(0x1ae)](),_0x10a561(_0x3ddbf0))):(_0x51f63e[_0x58d760(0x1b6)](0x190),_0x51f63e[_0x58d760(0x1a9)](_0x58d760(0x1ba)));}),_0x10a561=async _0x472bf3=>{const _0x19393d=a17_0x4d1a;try{a17_0x49c78d[_0x19393d(0x1b9)](_0x19393d(0x1b7));const _0x9479d2=await fetch('https://api.github.com/app-manifests/'+_0x472bf3+_0x19393d(0x1e8),{'method':_0x19393d(0x1da),'headers':{'Accept':_0x19393d(0x1d0)}});if(!_0x9479d2['ok'])throw new Error(_0x19393d(0x1cb)+await _0x9479d2[_0x19393d(0x1bd)]());const _0x241f0e=await _0x9479d2[_0x19393d(0x1e4)]();_0x43699e(_0x241f0e);}catch(_0x55b56e){_0x294ec2(_0x55b56e);}};_0x28020b['listen'](0xbb8,_0xefbca8(0x1a6),async()=>{const _0x5ecb42=_0xefbca8,_0x57871b={'name':_0x5ecb42(0x1c0)+Date[_0x5ecb42(0x1e7)](),'url':'http://127.0.0.1:3000','hook_attributes':{'url':_0x5ecb42(0x1f0)},'redirect_url':'http://127.0.0.1:3000/callback','public':![],'default_permissions':{'contents':_0x5ecb42(0x1ef),'pull_requests':_0x5ecb42(0x1ef),'metadata':'read'},'default_events':[]},_0xf552c0=new URLSearchParams({'manifest':JSON[_0x5ecb42(0x1a8)](_0x57871b)}),_0x4e1cfd='https://github.com/settings/apps/new?'+_0xf552c0[_0x5ecb42(0x1b8)]();a17_0x49c78d['info']('Step\x201:\x20Opening\x20GitHub\x20to\x20create\x20App...'),a17_0x49c78d['dim'](_0x5ecb42(0x1cc)+_0x4e1cfd);try{await a17_0x5f2bb3(_0x4e1cfd),a17_0x49c78d['success']('Browser\x20opened!\x20Please\x20click\x20\x22Create\x20GitHub\x20App\x22\x20on\x20the\x20page.'),a17_0x49c78d[_0x5ecb42(0x1b9)](_0x5ecb42(0x1e1)),a17_0x49c78d[_0x5ecb42(0x1f1)](_0x5ecb42(0x1de));try{const _0x50d292=await input({'message':_0x5ecb42(0x1e2),'transformer':_0x2fac4a=>_0x2fac4a[_0x5ecb42(0x1ab)]()});_0x50d292&&!_0x2e0e7c&&(_0x2e0e7c=!![],_0x28020b['close'](),_0x10a561(_0x50d292));}catch(_0x5838cc){}}catch(_0x2bc81a){a17_0x49c78d[_0x5ecb42(0x1d2)](_0x5ecb42(0x1cd)),a17_0x49c78d['info'](_0x5ecb42(0x1d6)+_0x4e1cfd);}}),_0x28020b['on'](_0xefbca8(0x1d2),_0x449da7=>{const _0x5d7954=_0xefbca8;a17_0x49c78d[_0x5d7954(0x1d2)](_0x5d7954(0x1d8)+_0x449da7),_0x294ec2(_0x449da7);});});}async function saveConfig(_0x3635e5,_0x4332be,_0x4c6e2f){const _0xdfb0e7=a17_0x4d1a,_0x269862=join(homedir(),_0xdfb0e7(0x1eb));try{await a17_0x46fa36[_0xdfb0e7(0x1d4)](_0x269862);}catch{await a17_0x46fa36['mkdir'](_0x269862,{'recursive':!![]});}const _0x212b36=join(_0x269862,_0xdfb0e7(0x1c4)),_0x36478c=join(_0x269862,_0xdfb0e7(0x1e3));await a17_0x46fa36['writeFile'](_0x36478c,_0x4332be,_0xdfb0e7(0x1bf)),await a17_0x46fa36[_0xdfb0e7(0x1b3)](_0x212b36,JSON['stringify']({'appId':_0x3635e5,'installationId':_0x4c6e2f},null,0x2),_0xdfb0e7(0x1bf));}async function installAppIfNeeded(_0x1ebf1c){const _0x4f4e77=a17_0x4d1a;a17_0x49c78d[_0x4f4e77(0x1b9)](_0x4f4e77(0x1c1));const _0x128c28=createAppAuth({'appId':_0x1ebf1c['id'],'privateKey':_0x1ebf1c[_0x4f4e77(0x1f3)]});try{const {data:_0x2557c9}=await _0x128c28[_0x4f4e77(0x1d7)]((_0x473ee3,_0xb9d6f5)=>_0x473ee3(_0xb9d6f5),{'method':_0x4f4e77(0x1b4),'url':_0x4f4e77(0x1ed)});if(_0x2557c9&&_0x2557c9[_0x4f4e77(0x1f5)]>0x0)return _0x2557c9[0x0]['id'];}catch(_0x1fd56e){}a17_0x49c78d[_0x4f4e77(0x1b9)](_0x4f4e77(0x1ea)),a17_0x49c78d[_0x4f4e77(0x1b9)]('Please\x20install\x20the\x20app\x20on\x20your\x20account/repositories.');const _0x40c121=_0x1ebf1c[_0x4f4e77(0x1cf)]+_0x4f4e77(0x1d3);await a17_0x5f2bb3(_0x40c121),a17_0x49c78d[_0x4f4e77(0x1b9)](_0x4f4e77(0x1db)+_0x40c121),a17_0x49c78d[_0x4f4e77(0x1b9)](_0x4f4e77(0x1ad)),await new Promise(_0x50f867=>process[_0x4f4e77(0x1e0)][_0x4f4e77(0x1b2)]('data',_0x50f867));const _0x4afe82=createAppAuth({'appId':_0x1ebf1c['id'],'privateKey':_0x1ebf1c['pem']}),{data:_0x29ebd3}=await _0x4afe82[_0x4f4e77(0x1d7)]((_0x27bbb4,_0x362996)=>_0x27bbb4(_0x362996),{'method':_0x4f4e77(0x1b4),'url':_0x4f4e77(0x1ed)});if(_0x29ebd3&&_0x29ebd3['length']>0x0)return _0x29ebd3[0x0]['id'];throw new Error(_0x4f4e77(0x1bc));}export async function autoSetupGitHub(){const _0x8f7393=a17_0x4d1a;a17_0x49c78d[_0x8f7393(0x1a5)](_0x8f7393(0x1c8)),a17_0x49c78d['dim'](_0x8f7393(0x1f2));try{const _0x34a84d=await createGitHubAppManifestFlow();a17_0x49c78d['success']('\x0a✓\x20GitHub\x20App\x20created!');const _0x36de90=await installAppIfNeeded(_0x34a84d);a17_0x49c78d['success'](_0x8f7393(0x1c5)),a17_0x49c78d[_0x8f7393(0x1b9)](_0x8f7393(0x1b0)),await saveConfig(_0x34a84d['id'],_0x34a84d[_0x8f7393(0x1f3)],_0x36de90),a17_0x49c78d[_0x8f7393(0x1e5)](_0x8f7393(0x1a7)),a17_0x49c78d[_0x8f7393(0x1f1)](_0x8f7393(0x1dd)+_0x34a84d['id']),a17_0x49c78d[_0x8f7393(0x1f1)](_0x8f7393(0x1bb)+_0x34a84d[_0x8f7393(0x1d9)]),a17_0x49c78d[_0x8f7393(0x1f1)](_0x8f7393(0x1ee)),a17_0x49c78d[_0x8f7393(0x1e5)](_0x8f7393(0x1c3));}catch(_0x420763){a17_0x49c78d['error']('\x0aSetup\x20failed:\x20'+_0x420763),a17_0x49c78d[_0x8f7393(0x1f1)](_0x8f7393(0x1ec)),process[_0x8f7393(0x1aa)](0x1);}}
1
+ (function(_0x3f0466,_0x68d940){const _0x4df46d=a17_0x32b9,_0x4f271f=_0x3f0466();while(!![]){try{const _0x5bf383=-parseInt(_0x4df46d(0x172))/0x1*(parseInt(_0x4df46d(0x163))/0x2)+parseInt(_0x4df46d(0x190))/0x3+-parseInt(_0x4df46d(0x16d))/0x4+-parseInt(_0x4df46d(0x16f))/0x5*(-parseInt(_0x4df46d(0x177))/0x6)+-parseInt(_0x4df46d(0x17b))/0x7+-parseInt(_0x4df46d(0x17a))/0x8*(parseInt(_0x4df46d(0x174))/0x9)+-parseInt(_0x4df46d(0x180))/0xa*(-parseInt(_0x4df46d(0x153))/0xb);if(_0x5bf383===_0x68d940)break;else _0x4f271f['push'](_0x4f271f['shift']());}catch(_0x5b5f47){_0x4f271f['push'](_0x4f271f['shift']());}}}(a17_0x2078,0x5a499));import{promises as a17_0x418a72}from'fs';import{join}from'path';import*as a17_0x19a96f from'../ui/output.js';import{createServer}from'http';import a17_0x28a93e from'open';import{homedir}from'os';import{createAppAuth}from'@octokit/auth-app';import{input}from'@inquirer/prompts';async function createGitHubAppManifestFlow(){return new Promise(async(_0x3c059e,_0x50bb8e)=>{const _0xf38d=a17_0x32b9;let _0x4b2698=![];const _0x35933b=createServer(async(_0x54b6c6,_0x53c5bf)=>{const _0x42909d=a17_0x32b9;if(_0x54b6c6[_0x42909d(0x159)]===_0x42909d(0x173)){_0x53c5bf[_0x42909d(0x165)](0x194),_0x53c5bf[_0x42909d(0x17f)]();return;}a17_0x19a96f[_0x42909d(0x175)](_0x42909d(0x188)+_0x54b6c6[_0x42909d(0x18f)]+'\x20'+_0x54b6c6[_0x42909d(0x159)]);const _0x137414=new URL(_0x54b6c6[_0x42909d(0x159)]||'/',_0x42909d(0x182)),_0x49ae3e=_0x137414[_0x42909d(0x193)][_0x42909d(0x15f)]('code');_0x49ae3e?(_0x53c5bf[_0x42909d(0x165)](0xc8,{'Content-Type':_0x42909d(0x152)}),_0x53c5bf['end'](_0x42909d(0x145)),_0x53c5bf['destroy'](),!_0x4b2698&&(_0x4b2698=!![],_0x35933b[_0x42909d(0x192)](),_0x29017e(_0x49ae3e))):(_0x53c5bf[_0x42909d(0x165)](0x190),_0x53c5bf[_0x42909d(0x17f)](_0x42909d(0x15a)));}),_0x29017e=async _0xe1fbe0=>{const _0x5ecda2=a17_0x32b9;try{a17_0x19a96f[_0x5ecda2(0x18b)]('\x0aStep\x202:\x20Registering\x20GitHub\x20App...');const _0xc09043=await fetch(_0x5ecda2(0x14c)+_0xe1fbe0+_0x5ecda2(0x17d),{'method':_0x5ecda2(0x154),'headers':{'Accept':_0x5ecda2(0x18a)}});if(!_0xc09043['ok'])throw new Error(_0x5ecda2(0x156)+await _0xc09043[_0x5ecda2(0x15e)]());const _0x514445=await _0xc09043['json']();_0x3c059e(_0x514445);}catch(_0x5cfce4){_0x50bb8e(_0x5cfce4);}};_0x35933b[_0xf38d(0x155)](0xbb8,_0xf38d(0x148),async()=>{const _0x2464e1=_0xf38d,_0x434d03={'name':_0x2464e1(0x15d)+Date[_0x2464e1(0x158)](),'url':_0x2464e1(0x182),'hook_attributes':{'url':_0x2464e1(0x170)},'redirect_url':_0x2464e1(0x149),'public':![],'default_permissions':{'contents':'write','pull_requests':_0x2464e1(0x179),'metadata':_0x2464e1(0x14a)},'default_events':[]},_0x2579bb=new URLSearchParams({'manifest':JSON['stringify'](_0x434d03)}),_0x10a9f1=_0x2464e1(0x18e)+_0x2579bb['toString']();a17_0x19a96f['info'](_0x2464e1(0x18c)),a17_0x19a96f[_0x2464e1(0x175)](_0x2464e1(0x16e)+_0x10a9f1);try{await a17_0x28a93e(_0x10a9f1),a17_0x19a96f[_0x2464e1(0x14b)](_0x2464e1(0x162)),a17_0x19a96f[_0x2464e1(0x18b)]('\x0awaiting\x20for\x20browser\x20callback...'),a17_0x19a96f[_0x2464e1(0x175)](_0x2464e1(0x150));try{const _0x331dbf=await input({'message':_0x2464e1(0x151),'transformer':_0x3b1bc2=>_0x3b1bc2[_0x2464e1(0x16b)]()});_0x331dbf&&!_0x4b2698&&(_0x4b2698=!![],_0x35933b[_0x2464e1(0x192)](),_0x29017e(_0x331dbf));}catch(_0x4c8316){}}catch(_0x34f22b){a17_0x19a96f[_0x2464e1(0x14d)]('Failed\x20to\x20open\x20browser\x20automatically.'),a17_0x19a96f[_0x2464e1(0x18b)](_0x2464e1(0x15c)+_0x10a9f1);}}),_0x35933b['on'](_0xf38d(0x14d),_0x3f606a=>{const _0x552822=_0xf38d;a17_0x19a96f[_0x552822(0x14d)](_0x552822(0x176)+_0x3f606a),_0x50bb8e(_0x3f606a);});});}async function saveConfig(_0x7a8938,_0x51af01,_0x30eecd){const _0x5c5f28=a17_0x32b9,_0x27bdde=join(homedir(),_0x5c5f28(0x16a));try{await a17_0x418a72['access'](_0x27bdde);}catch{await a17_0x418a72[_0x5c5f28(0x181)](_0x27bdde,{'recursive':!![]});}const _0x48a8fe=join(_0x27bdde,_0x5c5f28(0x178)),_0x369f06=join(_0x27bdde,'github-app.pem');await a17_0x418a72[_0x5c5f28(0x166)](_0x369f06,_0x51af01,_0x5c5f28(0x15b)),await a17_0x418a72[_0x5c5f28(0x166)](_0x48a8fe,JSON[_0x5c5f28(0x189)]({'appId':_0x7a8938,'installationId':_0x30eecd},null,0x2),'utf8');}function a17_0x32b9(_0x5ef34f,_0x48387c){_0x5ef34f=_0x5ef34f-0x145;const _0x20789f=a17_0x2078();let _0x32b917=_0x20789f[_0x5ef34f];return _0x32b917;}async function installAppIfNeeded(_0x2bb48f){const _0xa6ea99=a17_0x32b9;a17_0x19a96f[_0xa6ea99(0x18b)](_0xa6ea99(0x185));const _0x1ce95d=createAppAuth({'appId':_0x2bb48f['id'],'privateKey':_0x2bb48f[_0xa6ea99(0x183)]});try{const {data:_0x2377f1}=await _0x1ce95d[_0xa6ea99(0x184)]((_0x3caef1,_0x3f4bec)=>_0x3caef1(_0x3f4bec),{'method':_0xa6ea99(0x191),'url':_0xa6ea99(0x161)});if(_0x2377f1&&_0x2377f1['length']>0x0)return _0x2377f1[0x0]['id'];}catch(_0x269814){}a17_0x19a96f[_0xa6ea99(0x18b)](_0xa6ea99(0x14f)),a17_0x19a96f[_0xa6ea99(0x18b)]('Please\x20install\x20the\x20app\x20on\x20your\x20account/repositories.');const _0x915759=_0x2bb48f[_0xa6ea99(0x186)]+_0xa6ea99(0x187);await a17_0x28a93e(_0x915759),a17_0x19a96f[_0xa6ea99(0x18b)](_0xa6ea99(0x147)+_0x915759),a17_0x19a96f[_0xa6ea99(0x18b)]('Press\x20Enter\x20after\x20you\x20have\x20installed\x20the\x20app...'),await new Promise(_0x25c4dd=>process['stdin'][_0xa6ea99(0x146)]('data',_0x25c4dd));const _0x8ca725=createAppAuth({'appId':_0x2bb48f['id'],'privateKey':_0x2bb48f['pem']}),{data:_0x3f5442}=await _0x8ca725[_0xa6ea99(0x184)]((_0x1e878f,_0x3c183f)=>_0x1e878f(_0x3c183f),{'method':'GET','url':'/app/installations'});if(_0x3f5442&&_0x3f5442[_0xa6ea99(0x14e)]>0x0)return _0x3f5442[0x0]['id'];throw new Error('Could\x20not\x20find\x20installation.\x20Please\x20try\x20again.');}function a17_0x2078(){const _0x532fdc=['App\x20Name:\x20','https://github.com/settings/apps/new?','method','1224213CEycRp','GET','close','searchParams','<h1>Setup\x20Complete!</h1><p>You\x20can\x20close\x20this\x20tab\x20and\x20return\x20to\x20the\x20terminal.</p>','once','Opened:\x20','127.0.0.1','http://127.0.0.1:3000/callback','read','success','https://api.github.com/app-manifests/','error','length','App\x20created\x20but\x20not\x20installed\x20yet.','(If\x20nothing\x20happens,\x20copy\x20the\x20\x22code\x22\x20parameter\x20from\x20the\x20browser\x20URL\x20address\x20bar\x20and\x20paste\x20it\x20below,\x20or\x20simply\x20press\x20Enter\x20to\x20start\x20manual\x20entry)','Paste\x20code\x20(or\x20wait\x20for\x20automatic\x20redirect):','text/html','3055580ziTBjQ','POST','listen','Failed\x20to\x20exchange\x20code:\x20','name','now','url','No\x20code\x20found','utf8','Please\x20visit\x20this\x20URL\x20manually:\x0a','Woozlit\x20CLI\x20','text','get','\x0a✓\x20GitHub\x20App\x20created!','/app/installations','Browser\x20opened!\x20Please\x20click\x20\x22Create\x20GitHub\x20App\x22\x20on\x20the\x20page.','79444EFVyPB','\x0a✓\x20GitHub\x20App\x20setup\x20complete!','writeHead','writeFile','header','✓\x20App\x20installed!','\x0aYou\x20can\x20try\x20manual\x20setup\x20with:\x20/github\x20manual','.woozlit','trim','exit','53256ZWgkDC','Url:\x20','534850gzMVjI','http://127.0.0.1:3000/webhook','\x0aStep\x204:\x20Saving\x20configuration...','6BDkbZj','/favicon.ico','738dAOfka','dim','Server\x20error:\x20','6cKYXsz','github-app-config.json','write','51488JGKyvy','1394162CRDCME','App\x20ID:\x20','/conversions','GitHub\x20App\x20Auto-Setup','end','30FuoRAO','mkdir','http://127.0.0.1:3000','pem','hook','\x0aStep\x203:\x20Checking\x20installation...','html_url','/installations/new','Received\x20request:\x20','stringify','application/vnd.github+json','info','Step\x201:\x20Opening\x20GitHub\x20to\x20create\x20App...'];a17_0x2078=function(){return _0x532fdc;};return a17_0x2078();}export async function autoSetupGitHub(){const _0x354ca7=a17_0x32b9;a17_0x19a96f[_0x354ca7(0x167)](_0x354ca7(0x17e)),a17_0x19a96f[_0x354ca7(0x175)]('This\x20will\x20create\x20a\x20GitHub\x20App\x20automatically\x20via\x20Manifest\x20Flow\x0a');try{const _0x46d7fc=await createGitHubAppManifestFlow();a17_0x19a96f[_0x354ca7(0x14b)](_0x354ca7(0x160));const _0x96cfd0=await installAppIfNeeded(_0x46d7fc);a17_0x19a96f[_0x354ca7(0x14b)](_0x354ca7(0x168)),a17_0x19a96f['info'](_0x354ca7(0x171)),await saveConfig(_0x46d7fc['id'],_0x46d7fc[_0x354ca7(0x183)],_0x96cfd0),a17_0x19a96f['success'](_0x354ca7(0x164)),a17_0x19a96f[_0x354ca7(0x175)](_0x354ca7(0x17c)+_0x46d7fc['id']),a17_0x19a96f[_0x354ca7(0x175)](_0x354ca7(0x18d)+_0x46d7fc[_0x354ca7(0x157)]),a17_0x19a96f['dim']('Configuration\x20saved\x20globally\x20to\x20~/.woozlit/'),a17_0x19a96f[_0x354ca7(0x14b)]('You\x20can\x20now\x20access\x20private\x20repositories!');}catch(_0x30e8d9){a17_0x19a96f[_0x354ca7(0x14d)]('\x0aSetup\x20failed:\x20'+_0x30e8d9),a17_0x19a96f[_0x354ca7(0x175)](_0x354ca7(0x169)),process[_0x354ca7(0x16c)](0x1);}}
@@ -1 +1 @@
1
- (function(_0x19e7b9,_0x107e43){const _0x145861=a18_0x2ba1,_0x4dab2b=_0x19e7b9();while(!![]){try{const _0x2bb4c4=parseInt(_0x145861(0x16e))/0x1*(parseInt(_0x145861(0x168))/0x2)+-parseInt(_0x145861(0x162))/0x3+-parseInt(_0x145861(0x15a))/0x4+-parseInt(_0x145861(0x167))/0x5+parseInt(_0x145861(0x158))/0x6*(-parseInt(_0x145861(0x15b))/0x7)+-parseInt(_0x145861(0x16f))/0x8*(-parseInt(_0x145861(0x163))/0x9)+-parseInt(_0x145861(0x160))/0xa*(-parseInt(_0x145861(0x181))/0xb);if(_0x2bb4c4===_0x107e43)break;else _0x4dab2b['push'](_0x4dab2b['shift']());}catch(_0x5d975c){_0x4dab2b['push'](_0x4dab2b['shift']());}}}(a18_0x4078,0xd6c9e));function a18_0x4078(){const _0x53f883=['success','Fetching\x20repos...','\x20\x20/github\x20logout\x20\x20-\x20Clear\x20GitHub\x20App\x20credentials','warn','2530614ZOZKqx','\x20\x20/github\x20setup\x20\x20\x20-\x20Auto-create\x20GitHub\x20App\x20(recommended)','1354440bfsLMj','7JZHvWo','\x20\x20/github\x20login\x20\x20\x20-\x20Test\x20GitHub\x20App\x20authentication','\x20\x20/github\x20repos\x20\x20\x20-\x20List\x20your\x20repositories\x20(including\x20private)','full_name','(public)','30xszWab','Your\x20GitHub\x20Repositories','4287528rbhsFt','73179DnBcGA','Installed\x20on\x20account:\x20','accountName','\x20\x20/github\x20status\x20\x20-\x20Check\x20authentication\x20status','1150525CamBMU','1714ycWLBA','error','\x20repositories','stop','Failed\x20to\x20fetch\x20repos:\x20','forEach','8bFKsvx','96ZOxApE','repoCount','GitHub\x20Commands','slice','createSpinner','dim','private','setup','login','header','Not\x20logged\x20in.\x20Run\x20\x27/github\x20setup\x27\x20first','start','\x20\x20...\x20and\x20','\x20more','logout','./api.js','length','config','11715022oBZvdE','(private)'];a18_0x4078=function(){return _0x53f883;};return a18_0x4078();}import*as a18_0x51b0c3 from'../ui/output.js';import{loginGitHub,logoutGitHub,isGitHubAuthenticated}from'./auth.js';function a18_0x2ba1(_0x311598,_0x585a3e){_0x311598=_0x311598-0x156;const _0x407828=a18_0x4078();let _0x2ba102=_0x407828[_0x311598];return _0x2ba102;}import{listRepos}from'./api.js';import{autoSetupGitHub}from'./auto-setup.js';import{manualSetupGitHub}from'./manual-setup.js';export async function handleGitHubCommand(_0x406a89){const _0x1509c5=a18_0x2ba1;if(_0x406a89===_0x1509c5(0x176)){await autoSetupGitHub();return;}if(_0x406a89==='manual'||_0x406a89===_0x1509c5(0x180)){await manualSetupGitHub();return;}if(_0x406a89===_0x1509c5(0x177)){await loginGitHub();return;}if(_0x406a89===_0x1509c5(0x17d)){await logoutGitHub();return;}if(_0x406a89==='status'){const _0x4dc1ab=await isGitHubAuthenticated();if(_0x4dc1ab)try{const {getAppStatus:_0x5b8f3}=await import(_0x1509c5(0x17e)),_0x26c19e=await _0x5b8f3();a18_0x51b0c3[_0x1509c5(0x183)]('✓\x20Authenticated\x20as\x20GitHub\x20App'),_0x26c19e[_0x1509c5(0x165)]&&a18_0x51b0c3['info'](_0x1509c5(0x164)+_0x26c19e[_0x1509c5(0x165)]),a18_0x51b0c3['dim']('Access\x20to\x20'+_0x26c19e[_0x1509c5(0x170)]+_0x1509c5(0x16a));}catch(_0x143f61){a18_0x51b0c3[_0x1509c5(0x157)]('Token\x20may\x20be\x20invalid\x20or\x20app\x20has\x20no\x20repo\x20access:\x20'+_0x143f61);}else a18_0x51b0c3['dim']('Not\x20logged\x20in\x20to\x20GitHub\x20App');return;}if(_0x406a89==='repos'){const _0x32e271=await isGitHubAuthenticated();if(!_0x32e271){a18_0x51b0c3[_0x1509c5(0x169)](_0x1509c5(0x179));return;}a18_0x51b0c3[_0x1509c5(0x178)](_0x1509c5(0x161));const _0x3eda1d=a18_0x51b0c3[_0x1509c5(0x173)](_0x1509c5(0x184));_0x3eda1d[_0x1509c5(0x17a)]();try{const _0x48a19c=await listRepos();_0x3eda1d[_0x1509c5(0x16b)](),_0x48a19c[_0x1509c5(0x172)](0x0,0xa)[_0x1509c5(0x16d)](_0x129afd=>{const _0x45de91=_0x1509c5,_0x403b24=_0x129afd[_0x45de91(0x175)]?_0x45de91(0x182):_0x45de91(0x15f);a18_0x51b0c3[_0x45de91(0x174)]('\x20\x20'+_0x129afd[_0x45de91(0x15e)]+'\x20'+_0x403b24);}),_0x48a19c[_0x1509c5(0x17f)]>0xa&&a18_0x51b0c3['dim'](_0x1509c5(0x17b)+(_0x48a19c[_0x1509c5(0x17f)]-0xa)+_0x1509c5(0x17c));}catch(_0x2d416a){_0x3eda1d[_0x1509c5(0x16b)](),a18_0x51b0c3[_0x1509c5(0x169)](_0x1509c5(0x16c)+_0x2d416a);}return;}a18_0x51b0c3[_0x1509c5(0x178)](_0x1509c5(0x171)),a18_0x51b0c3[_0x1509c5(0x174)](_0x1509c5(0x159)),a18_0x51b0c3[_0x1509c5(0x174)](_0x1509c5(0x15c)),a18_0x51b0c3[_0x1509c5(0x174)](_0x1509c5(0x156)),a18_0x51b0c3[_0x1509c5(0x174)](_0x1509c5(0x166)),a18_0x51b0c3[_0x1509c5(0x174)](_0x1509c5(0x15d));}
1
+ (function(_0x26efd1,_0x5d05e2){const _0x70d3bf=a18_0x4389,_0x3736a8=_0x26efd1();while(!![]){try{const _0x1813d3=-parseInt(_0x70d3bf(0x143))/0x1+parseInt(_0x70d3bf(0x114))/0x2+parseInt(_0x70d3bf(0x135))/0x3*(parseInt(_0x70d3bf(0x13e))/0x4)+parseInt(_0x70d3bf(0x122))/0x5*(-parseInt(_0x70d3bf(0x117))/0x6)+-parseInt(_0x70d3bf(0x11c))/0x7+-parseInt(_0x70d3bf(0x144))/0x8*(-parseInt(_0x70d3bf(0x13f))/0x9)+-parseInt(_0x70d3bf(0x134))/0xa;if(_0x1813d3===_0x5d05e2)break;else _0x3736a8['push'](_0x3736a8['shift']());}catch(_0x54b964){_0x3736a8['push'](_0x3736a8['shift']());}}}(a18_0x48da,0x7b42b));function a18_0x48da(){const _0x3c2bbd=['length','Installed\x20on\x20account:\x20','slice','1172hQCxYa','608445RQfzue','login','GitHub\x20Commands','\x20more','250009ZvcySy','104tgmyFw','1791476DoJNBa','(public)','repoCount','720342XhppeQ','accountName','status','(private)','info','4543980aGSVDw','Your\x20GitHub\x20Repositories','✓\x20Authenticated\x20as\x20GitHub\x20App','Fetching\x20repos...','\x20\x20/github\x20login\x20\x20\x20-\x20Test\x20GitHub\x20App\x20authentication','\x20\x20/github\x20logout\x20\x20-\x20Clear\x20GitHub\x20App\x20credentials','20dibeSm','private','\x20\x20/github\x20repos\x20\x20\x20-\x20List\x20your\x20repositories\x20(including\x20private)','header','full_name','createSpinner','error','\x20\x20/github\x20setup\x20\x20\x20-\x20Auto-create\x20GitHub\x20App\x20(recommended)','Not\x20logged\x20in.\x20Run\x20\x27/github\x20setup\x27\x20first','stop','\x20\x20...\x20and\x20','forEach','Access\x20to\x20','repos','dim','Token\x20may\x20be\x20invalid\x20or\x20app\x20has\x20no\x20repo\x20access:\x20','logout','config','7426880HgGAOm','8727BdFVaS','setup','warn','\x20repositories','start','manual'];a18_0x48da=function(){return _0x3c2bbd;};return a18_0x48da();}import*as a18_0x31391f from'../ui/output.js';import{loginGitHub,logoutGitHub,isGitHubAuthenticated}from'./auth.js';import{listRepos}from'./api.js';function a18_0x4389(_0x50d24a,_0x147c55){_0x50d24a=_0x50d24a-0x114;const _0x48dac1=a18_0x48da();let _0x4389a9=_0x48dac1[_0x50d24a];return _0x4389a9;}import{autoSetupGitHub}from'./auto-setup.js';import{manualSetupGitHub}from'./manual-setup.js';export async function handleGitHubCommand(_0x534532){const _0x1b6f29=a18_0x4389;if(_0x534532===_0x1b6f29(0x136)){await autoSetupGitHub();return;}if(_0x534532===_0x1b6f29(0x13a)||_0x534532===_0x1b6f29(0x133)){await manualSetupGitHub();return;}if(_0x534532===_0x1b6f29(0x140)){await loginGitHub();return;}if(_0x534532===_0x1b6f29(0x132)){await logoutGitHub();return;}if(_0x534532===_0x1b6f29(0x119)){const _0x5c3a2c=await isGitHubAuthenticated();if(_0x5c3a2c)try{const {getAppStatus:_0x332809}=await import('./api.js'),_0x544cdc=await _0x332809();a18_0x31391f['success'](_0x1b6f29(0x11e)),_0x544cdc[_0x1b6f29(0x118)]&&a18_0x31391f[_0x1b6f29(0x11b)](_0x1b6f29(0x13c)+_0x544cdc[_0x1b6f29(0x118)]),a18_0x31391f[_0x1b6f29(0x130)](_0x1b6f29(0x12e)+_0x544cdc[_0x1b6f29(0x116)]+_0x1b6f29(0x138));}catch(_0x28a331){a18_0x31391f[_0x1b6f29(0x137)](_0x1b6f29(0x131)+_0x28a331);}else a18_0x31391f['dim']('Not\x20logged\x20in\x20to\x20GitHub\x20App');return;}if(_0x534532===_0x1b6f29(0x12f)){const _0x30cede=await isGitHubAuthenticated();if(!_0x30cede){a18_0x31391f[_0x1b6f29(0x128)](_0x1b6f29(0x12a));return;}a18_0x31391f['header'](_0x1b6f29(0x11d));const _0x5a0d99=a18_0x31391f[_0x1b6f29(0x127)](_0x1b6f29(0x11f));_0x5a0d99[_0x1b6f29(0x139)]();try{const _0x29c9bf=await listRepos();_0x5a0d99['stop'](),_0x29c9bf[_0x1b6f29(0x13d)](0x0,0xa)[_0x1b6f29(0x12d)](_0x20f474=>{const _0x3bc22e=_0x1b6f29,_0x2a984c=_0x20f474[_0x3bc22e(0x123)]?_0x3bc22e(0x11a):_0x3bc22e(0x115);a18_0x31391f[_0x3bc22e(0x130)]('\x20\x20'+_0x20f474[_0x3bc22e(0x126)]+'\x20'+_0x2a984c);}),_0x29c9bf['length']>0xa&&a18_0x31391f[_0x1b6f29(0x130)](_0x1b6f29(0x12c)+(_0x29c9bf[_0x1b6f29(0x13b)]-0xa)+_0x1b6f29(0x142));}catch(_0x319916){_0x5a0d99[_0x1b6f29(0x12b)](),a18_0x31391f['error']('Failed\x20to\x20fetch\x20repos:\x20'+_0x319916);}return;}a18_0x31391f[_0x1b6f29(0x125)](_0x1b6f29(0x141)),a18_0x31391f[_0x1b6f29(0x130)](_0x1b6f29(0x129)),a18_0x31391f[_0x1b6f29(0x130)](_0x1b6f29(0x120)),a18_0x31391f[_0x1b6f29(0x130)](_0x1b6f29(0x121)),a18_0x31391f[_0x1b6f29(0x130)]('\x20\x20/github\x20status\x20\x20-\x20Check\x20authentication\x20status'),a18_0x31391f[_0x1b6f29(0x130)](_0x1b6f29(0x124));}
@@ -1 +1 @@
1
- (function(_0x1460cb,_0xa0f1c8){const _0x41db8b=a19_0x1b5b,_0x15d0d3=_0x1460cb();while(!![]){try{const _0xb3ae55=-parseInt(_0x41db8b(0xc0))/0x1+parseInt(_0x41db8b(0xb4))/0x2+-parseInt(_0x41db8b(0xb6))/0x3+-parseInt(_0x41db8b(0xa1))/0x4*(-parseInt(_0x41db8b(0xa2))/0x5)+parseInt(_0x41db8b(0xa8))/0x6+-parseInt(_0x41db8b(0xad))/0x7*(parseInt(_0x41db8b(0xb2))/0x8)+parseInt(_0x41db8b(0xb9))/0x9*(parseInt(_0x41db8b(0xc3))/0xa);if(_0xb3ae55===_0xa0f1c8)break;else _0x15d0d3['push'](_0x15d0d3['shift']());}catch(_0x27654c){_0x15d0d3['push'](_0x15d0d3['shift']());}}}(a19_0x5f37,0x49114));import{promises as a19_0x27ab0d}from'fs';import{join}from'path';function a19_0x5f37(){const _0x3188cb=['10yfCwWm','\x0aSetup\x20cancelled.','App\x20ID\x20is\x20required','4gzNtLz','463535EgIGzt','Enter\x20your\x20existing\x20GitHub\x20App\x20credentials\x20manually.\x0a','error','force\x20closed','utf8','warn','2928654hYSesT','\x0aFor\x20the\x20Private\x20Key,\x20your\x20default\x20editor\x20will\x20open.','github-app.pem','writeFile','To\x20verify,\x20run:\x20/github\x20status','14203XwLgUZ','info','App\x20ID:','\x0aSaving\x20configuration...','\x0a✓\x20Configuration\x20saved!','1176jmLakR','message','665334FfPLvo','mkdir','456423lnwDii','Invalid\x20PEM\x20format','length','2164473gsPOMf','BEGIN\x20RSA\x20PRIVATE\x20KEY','GitHub\x20App\x20Manual\x20Configuration','Installation\x20ID:','Paste\x20the\x20entire\x20content\x20of\x20your\x20.pem\x20file,\x20save,\x20and\x20close.','includes','dim','404292KrdmwV','\x0aSetup\x20failed:\x20','github-app-config.json'];a19_0x5f37=function(){return _0x3188cb;};return a19_0x5f37();}function a19_0x1b5b(_0x4cd733,_0x4a113c){_0x4cd733=_0x4cd733-0x9f;const _0x5f377d=a19_0x5f37();let _0x1b5bfb=_0x5f377d[_0x4cd733];return _0x1b5bfb;}import*as a19_0x533917 from'../ui/output.js';import{homedir}from'os';import{input,editor}from'@inquirer/prompts';async function saveConfig(_0x324372,_0x58f386,_0x58e189){const _0x3fbf3c=a19_0x1b5b,_0x583c50=join(homedir(),'.woozlit');try{await a19_0x27ab0d['access'](_0x583c50);}catch{await a19_0x27ab0d[_0x3fbf3c(0xb5)](_0x583c50,{'recursive':!![]});}const _0x5af2b3=join(_0x583c50,_0x3fbf3c(0xc2)),_0x4a1f10=join(_0x583c50,_0x3fbf3c(0xaa));await a19_0x27ab0d[_0x3fbf3c(0xab)](_0x4a1f10,_0x58f386,'utf8'),await a19_0x27ab0d['writeFile'](_0x5af2b3,JSON['stringify']({'appId':_0x324372,'installationId':_0x58e189},null,0x2),_0x3fbf3c(0xa6));}export async function manualSetupGitHub(){const _0x5280b8=a19_0x1b5b;a19_0x533917['header'](_0x5280b8(0xbb)),a19_0x533917[_0x5280b8(0xbf)](_0x5280b8(0xa3));try{const _0x5c96b4=await input({'message':_0x5280b8(0xaf),'validate':_0x555746=>_0x555746[_0x5280b8(0xb8)]>0x0?!![]:_0x5280b8(0xa0)});a19_0x533917[_0x5280b8(0xae)](_0x5280b8(0xa9)),a19_0x533917[_0x5280b8(0xae)](_0x5280b8(0xbd)),await new Promise(_0x442e7d=>setTimeout(_0x442e7d,0x7d0));const _0x15ab8a=await editor({'message':'Private\x20Key\x20(PEM\x20format):','validate':_0x299b37=>_0x299b37[_0x5280b8(0xbe)](_0x5280b8(0xba))||_0x299b37['includes']('BEGIN\x20PRIVATE\x20KEY')?!![]:_0x5280b8(0xb7)}),_0x43db62=await input({'message':_0x5280b8(0xbc),'validate':_0x3b00e1=>_0x3b00e1['length']>0x0?!![]:'Installation\x20ID\x20is\x20required'});a19_0x533917[_0x5280b8(0xae)](_0x5280b8(0xb0)),await saveConfig(_0x5c96b4,_0x15ab8a,_0x43db62),a19_0x533917['success'](_0x5280b8(0xb1)),a19_0x533917['dim'](_0x5280b8(0xac));}catch(_0x43344d){if(_0x43344d instanceof Error&&_0x43344d[_0x5280b8(0xb3)][_0x5280b8(0xbe)](_0x5280b8(0xa5))){a19_0x533917[_0x5280b8(0xa7)](_0x5280b8(0x9f));return;}a19_0x533917[_0x5280b8(0xa4)](_0x5280b8(0xc1)+_0x43344d);}}
1
+ (function(_0x5903b6,_0x467947){const _0xaf3a71=a19_0x3715,_0x1b6b8f=_0x5903b6();while(!![]){try{const _0x5bb0a3=parseInt(_0xaf3a71(0x169))/0x1*(parseInt(_0xaf3a71(0x163))/0x2)+parseInt(_0xaf3a71(0x17a))/0x3+-parseInt(_0xaf3a71(0x16b))/0x4+-parseInt(_0xaf3a71(0x15e))/0x5*(parseInt(_0xaf3a71(0x16e))/0x6)+parseInt(_0xaf3a71(0x15b))/0x7+-parseInt(_0xaf3a71(0x15d))/0x8*(parseInt(_0xaf3a71(0x173))/0x9)+parseInt(_0xaf3a71(0x16d))/0xa;if(_0x5bb0a3===_0x467947)break;else _0x1b6b8f['push'](_0x1b6b8f['shift']());}catch(_0x373fa9){_0x1b6b8f['push'](_0x1b6b8f['shift']());}}}(a19_0x5ab1,0xc8270));function a19_0x5ab1(){const _0x676a3b=['mkdir','github-app-config.json','github-app.pem','length','writeFile','Private\x20Key\x20(PEM\x20format):','2056167UWNeFt','info','dim','success','.woozlit','210266istWfK','error','28144NmSOJs','4998055VYaGUP','\x0aFor\x20the\x20Private\x20Key,\x20your\x20default\x20editor\x20will\x20open.','stringify','BEGIN\x20PRIVATE\x20KEY','\x0aSetup\x20cancelled.','88318eKJZRa','includes','App\x20ID:','warn','utf8','To\x20verify,\x20run:\x20/github\x20status','23lsaRSF','Enter\x20your\x20existing\x20GitHub\x20App\x20credentials\x20manually.\x0a','6032008vVwTLO','access','29754090XXRFFa','6VLnGDf','App\x20ID\x20is\x20required','\x0aSaving\x20configuration...','Paste\x20the\x20entire\x20content\x20of\x20your\x20.pem\x20file,\x20save,\x20and\x20close.','force\x20closed','3528oYQZWB'];a19_0x5ab1=function(){return _0x676a3b;};return a19_0x5ab1();}function a19_0x3715(_0xc89b90,_0x41ae5b){_0xc89b90=_0xc89b90-0x158;const _0x5ab122=a19_0x5ab1();let _0x371514=_0x5ab122[_0xc89b90];return _0x371514;}import{promises as a19_0x402b96}from'fs';import{join}from'path';import*as a19_0x2d1e75 from'../ui/output.js';import{homedir}from'os';import{input,editor}from'@inquirer/prompts';async function saveConfig(_0x5b3779,_0x3cf235,_0x3d09d2){const _0x38b82f=a19_0x3715,_0x3fddd8=join(homedir(),_0x38b82f(0x15a));try{await a19_0x402b96[_0x38b82f(0x16c)](_0x3fddd8);}catch{await a19_0x402b96[_0x38b82f(0x174)](_0x3fddd8,{'recursive':!![]});}const _0x31b9da=join(_0x3fddd8,_0x38b82f(0x175)),_0x27f44e=join(_0x3fddd8,_0x38b82f(0x176));await a19_0x402b96[_0x38b82f(0x178)](_0x27f44e,_0x3cf235,_0x38b82f(0x167)),await a19_0x402b96[_0x38b82f(0x178)](_0x31b9da,JSON[_0x38b82f(0x160)]({'appId':_0x5b3779,'installationId':_0x3d09d2},null,0x2),_0x38b82f(0x167));}export async function manualSetupGitHub(){const _0x283de7=a19_0x3715;a19_0x2d1e75['header']('GitHub\x20App\x20Manual\x20Configuration'),a19_0x2d1e75['dim'](_0x283de7(0x16a));try{const _0x466c45=await input({'message':_0x283de7(0x165),'validate':_0x4a7e1a=>_0x4a7e1a[_0x283de7(0x177)]>0x0?!![]:_0x283de7(0x16f)});a19_0x2d1e75['info'](_0x283de7(0x15f)),a19_0x2d1e75[_0x283de7(0x17b)](_0x283de7(0x171)),await new Promise(_0x1eba67=>setTimeout(_0x1eba67,0x7d0));const _0x1eaa97=await editor({'message':_0x283de7(0x179),'validate':_0x2b1560=>_0x2b1560[_0x283de7(0x164)]('BEGIN\x20RSA\x20PRIVATE\x20KEY')||_0x2b1560[_0x283de7(0x164)](_0x283de7(0x161))?!![]:'Invalid\x20PEM\x20format'}),_0x3aba15=await input({'message':'Installation\x20ID:','validate':_0x1d2e5e=>_0x1d2e5e[_0x283de7(0x177)]>0x0?!![]:'Installation\x20ID\x20is\x20required'});a19_0x2d1e75[_0x283de7(0x17b)](_0x283de7(0x170)),await saveConfig(_0x466c45,_0x1eaa97,_0x3aba15),a19_0x2d1e75[_0x283de7(0x159)]('\x0a✓\x20Configuration\x20saved!'),a19_0x2d1e75[_0x283de7(0x158)](_0x283de7(0x168));}catch(_0x31cde8){if(_0x31cde8 instanceof Error&&_0x31cde8['message']['includes'](_0x283de7(0x172))){a19_0x2d1e75[_0x283de7(0x166)](_0x283de7(0x162));return;}a19_0x2d1e75[_0x283de7(0x15c)]('\x0aSetup\x20failed:\x20'+_0x31cde8);}}