@lovrabet/cli 1.1.26-beta.8 → 1.1.26-beta.9

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 (58) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/api/api-doc-ui.js +1 -1
  5. package/lib/api/api-doc.js +1 -1
  6. package/lib/api/api-pull-ui.js +1 -1
  7. package/lib/api/fetch-model-list.js +1 -1
  8. package/lib/api/generate-api-file.js +1 -1
  9. package/lib/api/main.js +1 -1
  10. package/lib/api/pull-silent.js +1 -1
  11. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  12. package/lib/app-menu/create-menu.js +1 -1
  13. package/lib/app-menu/get-local-pages.js +1 -1
  14. package/lib/app-menu/get-online-menu-list.js +1 -1
  15. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  16. package/lib/app-menu/utils.js +1 -1
  17. package/lib/app-menu/valid-url.js +1 -1
  18. package/lib/app-menu-cdn-version/app-menu-sync-cdn-version-ui.js +1 -1
  19. package/lib/app-menu-cdn-version/cdn-url-compare-table.js +1 -1
  20. package/lib/app-menu-cdn-version/update-menu-cdn-url.js +1 -1
  21. package/lib/auth/auth-server-ui.js +1 -1
  22. package/lib/auth/auth-server.js +1 -1
  23. package/lib/auth/constant.js +1 -1
  24. package/lib/auth/get-cookie.js +1 -1
  25. package/lib/auth/is-session-valid.js +1 -1
  26. package/lib/auth/logout.js +1 -1
  27. package/lib/cli.js +1 -1
  28. package/lib/cmd/build-watch.js +1 -1
  29. package/lib/cmd/build.js +1 -1
  30. package/lib/cmd/logs.js +1 -1
  31. package/lib/cmd/preview.js +1 -1
  32. package/lib/cmd/start.js +1 -1
  33. package/lib/config/config-help.js +1 -1
  34. package/lib/config/main.js +1 -1
  35. package/lib/constant/domain.js +1 -1
  36. package/lib/constant/env.js +1 -1
  37. package/lib/create-app/enhanced-guided-create.js +1 -1
  38. package/lib/create-app/format-elapsed.js +1 -1
  39. package/lib/create-app/main.js +1 -1
  40. package/lib/create-app/task-finished.js +1 -1
  41. package/lib/create-app/task-loading.js +1 -1
  42. package/lib/create-app/task-running.js +1 -1
  43. package/lib/create-app/task-time.js +1 -1
  44. package/lib/create-app/use-copy-project-template.js +1 -1
  45. package/lib/create-app/use-format-code.js +1 -1
  46. package/lib/create-app/use-install-dependencies.js +1 -1
  47. package/lib/help.js +1 -1
  48. package/lib/init/main.js +1 -1
  49. package/lib/mcp/cursor.js +1 -1
  50. package/lib/mcp/main.js +1 -1
  51. package/lib/utils/config.js +1 -1
  52. package/lib/utils/copy-directory.js +1 -1
  53. package/lib/utils/http-client.js +1 -1
  54. package/lib/utils/logger.js +1 -1
  55. package/lib/utils/router-updater.js +1 -1
  56. package/lib/utils/sleep.js +1 -1
  57. package/lib/utils/template-replacer.js +1 -1
  58. package/package.json +1 -1
@@ -1 +1 @@
1
- function a11_0x4c01(_0x11b9e6,_0x4dca80){const _0x26ea17=a11_0x26ea();return a11_0x4c01=function(_0x4c01cd,_0x3ca441){_0x4c01cd=_0x4c01cd-0x105;let _0x35161a=_0x26ea17[_0x4c01cd];return _0x35161a;},a11_0x4c01(_0x11b9e6,_0x4dca80);}function a11_0x26ea(){const _0x526e75=['4577667iWxbDc','status','stringify','import','正在创建菜单:\x20','开始批量创建菜单,共\x20','data','23951295eMiYFy','all','1720VQwRAr','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','!\x20请使用以下方式之一:','log','12quFQMW','创建菜单成功:','17539CwMiWy','error','/smartapi/menu/create','errorCode','label','application/json','3116920xANWzd','未知错误','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','path','success','map','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','create-menus','创建菜单失败:\x20','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','info','json','创建菜单失败,HTTP状态码:\x20','POST','procode','create-menu','errorMsg','1256766xMdngG','未提供应用AppCode,且配置中也没有默认值','15445uxUhyv','0011','3453042DDFFaM','resources','length','appcode','批量创建菜单完成,共\x20'];a11_0x26ea=function(){return _0x526e75;};return a11_0x26ea();}(function(_0xd55e24,_0x59033c){const _0xf0311f=a11_0x4c01,_0x38ec72=_0xd55e24();while(!![]){try{const _0x4cf865=parseInt(_0xf0311f(0x125))/0x1*(-parseInt(_0xf0311f(0x123))/0x2)+-parseInt(_0xf0311f(0x116))/0x3+parseInt(_0xf0311f(0x11f))/0x4*(-parseInt(_0xf0311f(0x10f))/0x5)+parseInt(_0xf0311f(0x111))/0x6+parseInt(_0xf0311f(0x10d))/0x7+parseInt(_0xf0311f(0x12b))/0x8+parseInt(_0xf0311f(0x11d))/0x9;if(_0x4cf865===_0x59033c)break;else _0x38ec72['push'](_0x38ec72['shift']());}catch(_0x280ad5){_0x38ec72['push'](_0x38ec72['shift']());}}}(a11_0x26ea,0xceaba));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();export async function createMenu(_0x3c0589){const _0x285b1e=a11_0x4c01,_0x3df1cd=config?.[_0x285b1e(0x114)];if(!_0x3df1cd){const _0x505588=_0x285b1e(0x10e);logger[_0x285b1e(0x126)](_0x285b1e(0x10b),_0x505588),console[_0x285b1e(0x126)]('×\x20'+_0x505588),console[_0x285b1e(0x122)](_0x285b1e(0x121)),console['log']('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console['log'](_0x285b1e(0x105));return;}logger[_0x285b1e(0x106)]('create-menu',_0x285b1e(0x11a)+_0x3c0589['label']+'\x20('+_0x3c0589[_0x285b1e(0x12e)]+')');const _0xe4b3f={'appCode':_0x3df1cd,'type':_0x285b1e(0x10a),'sort':0x0,'extend':{'loadScriptMode':_0x285b1e(0x119),'resources':_0x3c0589[_0x285b1e(0x112)]?JSON[_0x285b1e(0x118)](_0x3c0589[_0x285b1e(0x112)]):undefined},..._0x3c0589},_0x4e2c30=await fetch(getApiDomain()+_0x285b1e(0x127),{'method':_0x285b1e(0x109),'body':JSON[_0x285b1e(0x118)](_0xe4b3f),'headers':{'Content-Type':_0x285b1e(0x12a),'Cookie':getCookie()}});if(!_0x4e2c30['ok']){if(_0x4e2c30[_0x285b1e(0x117)]===0x191){const _0x3341c3=_0x285b1e(0x131);logger[_0x285b1e(0x126)](_0x285b1e(0x10b),_0x3341c3,{'status':_0x4e2c30[_0x285b1e(0x117)],'menu':_0x3c0589['label']});throw new Error(_0x3341c3);}const _0x5ad83c='创建菜单失败,HTTP状态码:\x20'+_0x4e2c30[_0x285b1e(0x117)];logger[_0x285b1e(0x126)](_0x285b1e(0x10b),_0x5ad83c,{'menu':_0x3c0589[_0x285b1e(0x129)]});throw new Error(_0x5ad83c);}const _0x3e98ac=await _0x4e2c30[_0x285b1e(0x107)]();if(!_0x3e98ac[_0x285b1e(0x12f)]){const _0x1c85b0=_0x285b1e(0x133)+(_0x3e98ac[_0x285b1e(0x10c)]||_0x285b1e(0x12c));logger[_0x285b1e(0x126)](_0x285b1e(0x10b),_0x1c85b0,{'errorCode':_0x3e98ac[_0x285b1e(0x128)],'errorMsg':_0x3e98ac['errorMsg'],'menu':_0x3c0589['label']});throw new Error(_0x1c85b0);}logger[_0x285b1e(0x106)](_0x285b1e(0x10b),'菜单创建成功:\x20'+_0x3c0589[_0x285b1e(0x129)],_0x3e98ac[_0x285b1e(0x11c)]),console[_0x285b1e(0x122)](_0x285b1e(0x124),_0x3e98ac[_0x285b1e(0x11c)]);}async function _createMenu(_0x11877c,_0x4b2f1b){const _0x198705=a11_0x4c01,_0x44084d=config?.[_0x198705(0x114)];if(!_0x44084d){const _0x146dc3=_0x198705(0x10e);logger[_0x198705(0x126)](_0x198705(0x10b),_0x146dc3),console[_0x198705(0x126)]('×\x20'+_0x146dc3),console[_0x198705(0x122)](_0x198705(0x121)),console[_0x198705(0x122)](_0x198705(0x120)),console[_0x198705(0x122)](_0x198705(0x105));return;}const _0x587ed0={'appCode':_0x44084d,'type':_0x198705(0x10a),'sort':0x0,'extend':{'loadScriptMode':_0x198705(0x119),'resources':_0x4b2f1b?JSON[_0x198705(0x118)](_0x4b2f1b):undefined},'label':_0x11877c['label'],'path':_0x11877c['path']},_0x1755b6=await fetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x198705(0x109),'body':JSON[_0x198705(0x118)](_0x587ed0),'headers':{'Content-Type':_0x198705(0x12a),'Cookie':getCookie()}});if(!_0x1755b6['ok']){if(_0x1755b6[_0x198705(0x117)]===0x191){const _0x2a532d=_0x198705(0x131);logger['error'](_0x198705(0x10b),_0x2a532d,{'status':_0x1755b6['status'],'menu':_0x11877c[_0x198705(0x129)]});throw new Error(_0x2a532d);}const _0x57d14d=_0x198705(0x108)+_0x1755b6[_0x198705(0x117)];logger[_0x198705(0x126)]('create-menu',_0x57d14d,{'menu':_0x11877c['label']});throw new Error(_0x57d14d);}const _0x5be63b=await _0x1755b6[_0x198705(0x107)]();if(!_0x5be63b[_0x198705(0x12f)]){if(_0x5be63b['errorCode']===_0x198705(0x110)||_0x5be63b[_0x198705(0x10c)]?.['includes']('登录')){const _0x509e10=_0x198705(0x12d);logger[_0x198705(0x126)](_0x198705(0x10b),_0x509e10,{'errorCode':_0x5be63b[_0x198705(0x128)],'errorMsg':_0x5be63b[_0x198705(0x10c)],'menu':_0x11877c['label']});throw new Error(_0x509e10);}const _0x18bbf5=_0x198705(0x133)+(_0x5be63b[_0x198705(0x10c)]||_0x198705(0x12c));logger[_0x198705(0x126)](_0x198705(0x10b),_0x18bbf5,{'errorCode':_0x5be63b['errorCode'],'errorMsg':_0x5be63b[_0x198705(0x10c)],'menu':_0x11877c[_0x198705(0x129)]});throw new Error(_0x18bbf5);}logger[_0x198705(0x106)](_0x198705(0x10b),'菜单创建成功:\x20'+_0x11877c[_0x198705(0x129)]);}export async function createMenus(_0x309a97,_0x53ffa6){const _0x4b2f6f=a11_0x4c01;logger[_0x4b2f6f(0x106)](_0x4b2f6f(0x132),_0x4b2f6f(0x11b)+_0x309a97[_0x4b2f6f(0x113)]+'\x20个'),await Promise[_0x4b2f6f(0x11e)](_0x309a97[_0x4b2f6f(0x130)](async _0x2fef44=>{await _createMenu(_0x2fef44,_0x53ffa6);})),logger[_0x4b2f6f(0x106)]('create-menus',_0x4b2f6f(0x115)+_0x309a97['length']+'\x20个');}
1
+ (function(_0x9cfeee,_0xb5050d){const _0x235c6b=a11_0x3c7a,_0x4c68cd=_0x9cfeee();while(!![]){try{const _0x454749=-parseInt(_0x235c6b(0x21b))/0x1*(-parseInt(_0x235c6b(0x214))/0x2)+parseInt(_0x235c6b(0x1f8))/0x3+-parseInt(_0x235c6b(0x21c))/0x4*(parseInt(_0x235c6b(0x21d))/0x5)+-parseInt(_0x235c6b(0x1f9))/0x6*(-parseInt(_0x235c6b(0x1f5))/0x7)+parseInt(_0x235c6b(0x215))/0x8+parseInt(_0x235c6b(0x1f3))/0x9*(parseInt(_0x235c6b(0x201))/0xa)+-parseInt(_0x235c6b(0x204))/0xb*(parseInt(_0x235c6b(0x211))/0xc);if(_0x454749===_0xb5050d)break;else _0x4c68cd['push'](_0x4c68cd['shift']());}catch(_0x38ff84){_0x4c68cd['push'](_0x4c68cd['shift']());}}}(a11_0x5652,0x724a5));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a11_0x3c7a(_0x3db0fe,_0x291adf){const _0x565296=a11_0x5652();return a11_0x3c7a=function(_0x3c7a36,_0xfd162b){_0x3c7a36=_0x3c7a36-0x1f3;let _0x310105=_0x565296[_0x3c7a36];return _0x310105;},a11_0x3c7a(_0x3db0fe,_0x291adf);}function a11_0x5652(){const _0x5759d5=['/smartapi/menu/create','data','4mEnvsa','28QGDDlc','638315ZkSFwv','创建菜单成功:','import','info','批量创建菜单完成,共\x20','24309sfzwtf','create-menu','273014edLLOR','log','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','42642GBjbAg','18vyicYN','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','length','0011','创建菜单失败,HTTP状态码:\x20','path','create-menus','stringify','2220ErbRGM','菜单创建成功:\x20','errorCode','5055457WRqtnk','procode','appcode','includes','json','label','status','success','!\x20请使用以下方式之一:','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','errorMsg','application/json','创建菜单失败:\x20','12druRJW','error','未知错误','375754GDVsWi','2712088lCPTUt','POST','resources','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>'];a11_0x5652=function(){return _0x5759d5;};return a11_0x5652();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();export async function createMenu(_0x3b8f92){const _0x621238=a11_0x3c7a,_0x2309ae=config?.[_0x621238(0x206)];if(!_0x2309ae){const _0x3c19e0='未提供应用AppCode,且配置中也没有默认值';logger[_0x621238(0x212)](_0x621238(0x1f4),_0x3c19e0),console['error']('×\x20'+_0x3c19e0),console[_0x621238(0x1f6)]('!\x20请使用以下方式之一:'),console[_0x621238(0x1f6)](_0x621238(0x20d)),console['log']('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>');return;}logger[_0x621238(0x220)](_0x621238(0x1f4),'正在创建菜单:\x20'+_0x3b8f92[_0x621238(0x209)]+'\x20('+_0x3b8f92[_0x621238(0x1fe)]+')');const _0x3ffe9b={'appCode':_0x2309ae,'type':_0x621238(0x205),'sort':0x0,'extend':{'loadScriptMode':_0x621238(0x21f),'resources':_0x3b8f92[_0x621238(0x217)]?JSON[_0x621238(0x200)](_0x3b8f92[_0x621238(0x217)]):undefined},..._0x3b8f92},_0x36899e=await fetch(getApiDomain()+_0x621238(0x219),{'method':'POST','body':JSON[_0x621238(0x200)](_0x3ffe9b),'headers':{'Content-Type':_0x621238(0x20f),'Cookie':getCookie()}});if(!_0x36899e['ok']){if(_0x36899e[_0x621238(0x20a)]===0x191){const _0x238f50=_0x621238(0x1fa);logger[_0x621238(0x212)](_0x621238(0x1f4),_0x238f50,{'status':_0x36899e[_0x621238(0x20a)],'menu':_0x3b8f92['label']});throw new Error(_0x238f50);}const _0x3efe40=_0x621238(0x1fd)+_0x36899e['status'];logger[_0x621238(0x212)]('create-menu',_0x3efe40,{'menu':_0x3b8f92['label']});throw new Error(_0x3efe40);}const _0x4967fa=await _0x36899e[_0x621238(0x208)]();if(!_0x4967fa['success']){const _0x458307=_0x621238(0x210)+(_0x4967fa[_0x621238(0x20e)]||'未知错误');logger[_0x621238(0x212)](_0x621238(0x1f4),_0x458307,{'errorCode':_0x4967fa[_0x621238(0x203)],'errorMsg':_0x4967fa[_0x621238(0x20e)],'menu':_0x3b8f92[_0x621238(0x209)]});throw new Error(_0x458307);}logger[_0x621238(0x220)](_0x621238(0x1f4),_0x621238(0x202)+_0x3b8f92[_0x621238(0x209)],_0x4967fa['data']),console['log'](_0x621238(0x21e),_0x4967fa[_0x621238(0x21a)]);}async function _createMenu(_0x1354f6,_0x30b9ce){const _0x16b429=a11_0x3c7a,_0x3c3ebf=config?.[_0x16b429(0x206)];if(!_0x3c3ebf){const _0x14c168='未提供应用AppCode,且配置中也没有默认值';logger['error'](_0x16b429(0x1f4),_0x14c168),console[_0x16b429(0x212)]('×\x20'+_0x14c168),console[_0x16b429(0x1f6)](_0x16b429(0x20c)),console[_0x16b429(0x1f6)](_0x16b429(0x20d)),console[_0x16b429(0x1f6)](_0x16b429(0x218));return;}const _0x25555d={'appCode':_0x3c3ebf,'type':_0x16b429(0x205),'sort':0x0,'extend':{'loadScriptMode':_0x16b429(0x21f),'resources':_0x30b9ce?JSON['stringify'](_0x30b9ce):undefined},'label':_0x1354f6['label'],'path':_0x1354f6[_0x16b429(0x1fe)]},_0x59670d=await fetch(getApiDomain()+_0x16b429(0x219),{'method':_0x16b429(0x216),'body':JSON[_0x16b429(0x200)](_0x25555d),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x59670d['ok']){if(_0x59670d[_0x16b429(0x20a)]===0x191){const _0x3272c5=_0x16b429(0x1fa);logger[_0x16b429(0x212)](_0x16b429(0x1f4),_0x3272c5,{'status':_0x59670d[_0x16b429(0x20a)],'menu':_0x1354f6['label']});throw new Error(_0x3272c5);}const _0x12624c=_0x16b429(0x1fd)+_0x59670d['status'];logger[_0x16b429(0x212)]('create-menu',_0x12624c,{'menu':_0x1354f6[_0x16b429(0x209)]});throw new Error(_0x12624c);}const _0x2a361b=await _0x59670d[_0x16b429(0x208)]();if(!_0x2a361b[_0x16b429(0x20b)]){if(_0x2a361b['errorCode']===_0x16b429(0x1fc)||_0x2a361b[_0x16b429(0x20e)]?.[_0x16b429(0x207)]('登录')){const _0x5a591c=_0x16b429(0x1f7);logger['error']('create-menu',_0x5a591c,{'errorCode':_0x2a361b[_0x16b429(0x203)],'errorMsg':_0x2a361b['errorMsg'],'menu':_0x1354f6['label']});throw new Error(_0x5a591c);}const _0x30141e='创建菜单失败:\x20'+(_0x2a361b[_0x16b429(0x20e)]||_0x16b429(0x213));logger['error'](_0x16b429(0x1f4),_0x30141e,{'errorCode':_0x2a361b[_0x16b429(0x203)],'errorMsg':_0x2a361b[_0x16b429(0x20e)],'menu':_0x1354f6[_0x16b429(0x209)]});throw new Error(_0x30141e);}logger[_0x16b429(0x220)](_0x16b429(0x1f4),'菜单创建成功:\x20'+_0x1354f6[_0x16b429(0x209)]);}export async function createMenus(_0x5befcd,_0x4e12cc){const _0x12bdf1=a11_0x3c7a;logger[_0x12bdf1(0x220)](_0x12bdf1(0x1ff),'开始批量创建菜单,共\x20'+_0x5befcd[_0x12bdf1(0x1fb)]+'\x20个'),await Promise['all'](_0x5befcd['map'](async _0x3c2b33=>{await _createMenu(_0x3c2b33,_0x4e12cc);})),logger['info'](_0x12bdf1(0x1ff),_0x12bdf1(0x221)+_0x5befcd[_0x12bdf1(0x1fb)]+'\x20个');}
@@ -1 +1 @@
1
- function a12_0x24b9(){const _0x5be172=['375439HgBzkW','3EgSipB','12946144pcdURc','slice','filter','1596340WkPxxP','6288765mKmzZJ','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','endsWith','60XIcuYN','concat','22551570zPgFRh','replace','203250pcaicC','utf-8','isDirectory','.tsx','match','path','865042Ewvpnb','trim','src/pages','cwd','push'];a12_0x24b9=function(){return _0x5be172;};return a12_0x24b9();}const a12_0x1d22fa=a12_0x4f13;(function(_0x17e0d8,_0x15a6de){const _0x2b8839=a12_0x4f13,_0x3da7ee=_0x17e0d8();while(!![]){try{const _0x2fbf7a=-parseInt(_0x2b8839(0x1c2))/0x1+-parseInt(_0x2b8839(0x1d5))/0x2*(-parseInt(_0x2b8839(0x1c3))/0x3)+parseInt(_0x2b8839(0x1c7))/0x4+parseInt(_0x2b8839(0x1cf))/0x5*(parseInt(_0x2b8839(0x1cb))/0x6)+parseInt(_0x2b8839(0x1c8))/0x7+parseInt(_0x2b8839(0x1c4))/0x8+-parseInt(_0x2b8839(0x1cd))/0x9;if(_0x2fbf7a===_0x15a6de)break;else _0x3da7ee['push'](_0x3da7ee['shift']());}catch(_0xfe15ee){_0x3da7ee['push'](_0x3da7ee['shift']());}}}(a12_0x24b9,0xd5480));function a12_0x4f13(_0x4e45f5,_0x4946da){const _0x24b95f=a12_0x24b9();return a12_0x4f13=function(_0x4f13fd,_0x5ded2a){_0x4f13fd=_0x4f13fd-0x1c2;let _0x32bea1=_0x24b95f[_0x4f13fd];return _0x32bea1;},a12_0x4f13(_0x4e45f5,_0x4946da);}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a12_0x1d22fa(0x1d8)](),a12_0x1d22fa(0x1d7));export function extractTitleFromComment(_0x34bfd1){const _0x4e5a81=a12_0x1d22fa;try{const _0x5d32e1=readFileSync(_0x34bfd1,_0x4e5a81(0x1d0)),_0x90d5ce=_0x5d32e1[_0x4e5a81(0x1d3)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x90d5ce&&_0x90d5ce[0x1]){const _0x52cbcb=_0x90d5ce[0x1],_0x476304=_0x52cbcb[_0x4e5a81(0x1d3)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x476304&&_0x476304[0x1])return _0x476304[0x1][_0x4e5a81(0x1d6)]();}let _0x5ed9c7=null;const _0x20225a=_0x5d32e1[_0x4e5a81(0x1d3)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x20225a&&_0x20225a[0x1]&&(_0x5ed9c7=_0x20225a[0x1]);if(!_0x5ed9c7){const _0x498eb5=_0x5d32e1[_0x4e5a81(0x1d3)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x498eb5&&_0x498eb5[0x1]&&(_0x5ed9c7=_0x498eb5[0x1]);}if(_0x5ed9c7){const _0x1b39ae=new RegExp('\x5cb'+_0x5ed9c7+_0x4e5a81(0x1c9)),_0x45c482=_0x5d32e1['match'](_0x1b39ae);if(_0x45c482&&_0x45c482[0x1])return _0x45c482[0x1];return _0x5ed9c7;}return null;}catch(_0x567e9c){return null;}}export function getLocalPages(_0x36c12a=pagesDir,_0x36bd9f=pagesDir){const _0x3646fa=a12_0x1d22fa;let _0x1d6acc=[];const _0x3fd944=readdirSync(_0x36c12a);return _0x3fd944['forEach'](_0x354da3=>{const _0xdea16a=a12_0x4f13,_0x20652e=join(_0x36c12a,_0x354da3),_0x517ceb=statSync(_0x20652e);if(_0x517ceb&&_0x517ceb[_0xdea16a(0x1d1)]())_0x1d6acc=_0x1d6acc[_0xdea16a(0x1cc)](getLocalPages(_0x20652e,_0x36bd9f));else{if(_0x354da3[_0xdea16a(0x1ca)](_0xdea16a(0x1d2))){let _0x78731d=relative(_0x36bd9f,_0x20652e);_0x78731d[_0xdea16a(0x1ca)]('index.tsx')?_0x78731d=_0x78731d[_0xdea16a(0x1ce)](/index\.tsx$/,''):_0x78731d=_0x78731d[_0xdea16a(0x1ce)](/\.tsx$/,'');_0x78731d[_0xdea16a(0x1ca)]('/')&&(_0x78731d=_0x78731d[_0xdea16a(0x1c5)](0x0,-0x1));const _0x19e6ee=extractTitleFromComment(_0x20652e),_0x2d4051=_0x19e6ee||_0x78731d;_0x1d6acc[_0xdea16a(0x1d9)]({'path':_0x78731d['replaceAll']('$',':'),'label':_0x2d4051});}}}),_0x1d6acc[_0x3646fa(0x1c6)](_0x477a31=>_0x477a31[_0x3646fa(0x1d4)]!=='');}
1
+ const a12_0x2769f0=a12_0x4415;(function(_0x3d7077,_0x1323b1){const _0x105c17=a12_0x4415,_0x47f1bc=_0x3d7077();while(!![]){try{const _0x4e8576=-parseInt(_0x105c17(0xc9))/0x1+parseInt(_0x105c17(0xd8))/0x2+-parseInt(_0x105c17(0xd9))/0x3*(parseInt(_0x105c17(0xcc))/0x4)+-parseInt(_0x105c17(0xd2))/0x5+parseInt(_0x105c17(0xdd))/0x6*(parseInt(_0x105c17(0xda))/0x7)+-parseInt(_0x105c17(0xc8))/0x8*(-parseInt(_0x105c17(0xca))/0x9)+-parseInt(_0x105c17(0xd1))/0xa;if(_0x4e8576===_0x1323b1)break;else _0x47f1bc['push'](_0x47f1bc['shift']());}catch(_0x32484e){_0x47f1bc['push'](_0x47f1bc['shift']());}}}(a12_0x4324,0xe7a06));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a12_0x2769f0(0xde)](),a12_0x2769f0(0xcd));export function extractTitleFromComment(_0x490543){const _0x12d72b=a12_0x2769f0;try{const _0x2349f2=readFileSync(_0x490543,_0x12d72b(0xc7)),_0x4a4230=_0x2349f2[_0x12d72b(0xd3)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x4a4230&&_0x4a4230[0x1]){const _0x296514=_0x4a4230[0x1],_0x5de8d1=_0x296514['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x5de8d1&&_0x5de8d1[0x1])return _0x5de8d1[0x1][_0x12d72b(0xd6)]();}let _0x5d4638=null;const _0x1f458f=_0x2349f2[_0x12d72b(0xd3)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x1f458f&&_0x1f458f[0x1]&&(_0x5d4638=_0x1f458f[0x1]);if(!_0x5d4638){const _0x1d89ba=_0x2349f2[_0x12d72b(0xd3)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x1d89ba&&_0x1d89ba[0x1]&&(_0x5d4638=_0x1d89ba[0x1]);}if(_0x5d4638){const _0x3cface=new RegExp('\x5cb'+_0x5d4638+_0x12d72b(0xcb)),_0xbccad7=_0x2349f2['match'](_0x3cface);if(_0xbccad7&&_0xbccad7[0x1])return _0xbccad7[0x1];return _0x5d4638;}return null;}catch(_0x480b22){return null;}}function a12_0x4415(_0x261bbd,_0x32d324){const _0x43249f=a12_0x4324();return a12_0x4415=function(_0x441511,_0x231fe1){_0x441511=_0x441511-0xc7;let _0x39ee73=_0x43249f[_0x441511];return _0x39ee73;},a12_0x4415(_0x261bbd,_0x32d324);}function a12_0x4324(){const _0x22e1b8=['112XjUwWd','slice','path','523818cRABNA','cwd','endsWith','filter','utf-8','7168quuepH','719100aTRBuH','15759VfHYUl','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','60KYgARu','src/pages','index.tsx','replaceAll','replace','13256010yyPskR','291490urKwPI','match','.tsx','push','trim','isDirectory','2653384RzOttg','248139rqfgqT'];a12_0x4324=function(){return _0x22e1b8;};return a12_0x4324();}export function getLocalPages(_0x5c78d5=pagesDir,_0x55d635=pagesDir){const _0x536b13=a12_0x2769f0;let _0x183d25=[];const _0x5f0c3a=readdirSync(_0x5c78d5);return _0x5f0c3a['forEach'](_0x3a6747=>{const _0x3d420f=a12_0x4415,_0x4ba5ad=join(_0x5c78d5,_0x3a6747),_0x198f04=statSync(_0x4ba5ad);if(_0x198f04&&_0x198f04[_0x3d420f(0xd7)]())_0x183d25=_0x183d25['concat'](getLocalPages(_0x4ba5ad,_0x55d635));else{if(_0x3a6747[_0x3d420f(0xdf)](_0x3d420f(0xd4))){let _0x3e10b5=relative(_0x55d635,_0x4ba5ad);_0x3e10b5[_0x3d420f(0xdf)](_0x3d420f(0xce))?_0x3e10b5=_0x3e10b5[_0x3d420f(0xd0)](/index\.tsx$/,''):_0x3e10b5=_0x3e10b5[_0x3d420f(0xd0)](/\.tsx$/,'');_0x3e10b5[_0x3d420f(0xdf)]('/')&&(_0x3e10b5=_0x3e10b5[_0x3d420f(0xdb)](0x0,-0x1));const _0x25abfe=extractTitleFromComment(_0x4ba5ad),_0x33db14=_0x25abfe||_0x3e10b5;_0x183d25[_0x3d420f(0xd5)]({'path':_0x3e10b5[_0x3d420f(0xcf)]('$',':'),'label':_0x33db14});}}}),_0x183d25[_0x536b13(0xe0)](_0x303090=>_0x303090[_0x536b13(0xdc)]!=='');}
@@ -1 +1 @@
1
- (function(_0x78bc86,_0x29b40f){const _0x49127e=a13_0x5a15,_0x2598b9=_0x78bc86();while(!![]){try{const _0x4cffc2=parseInt(_0x49127e(0x154))/0x1*(parseInt(_0x49127e(0x15c))/0x2)+-parseInt(_0x49127e(0x167))/0x3*(parseInt(_0x49127e(0x153))/0x4)+-parseInt(_0x49127e(0x158))/0x5*(-parseInt(_0x49127e(0x169))/0x6)+parseInt(_0x49127e(0x179))/0x7*(-parseInt(_0x49127e(0x15a))/0x8)+-parseInt(_0x49127e(0x155))/0x9*(-parseInt(_0x49127e(0x159))/0xa)+parseInt(_0x49127e(0x166))/0xb*(parseInt(_0x49127e(0x168))/0xc)+parseInt(_0x49127e(0x175))/0xd*(-parseInt(_0x49127e(0x15b))/0xe);if(_0x4cffc2===_0x29b40f)break;else _0x2598b9['push'](_0x2598b9['shift']());}catch(_0x134ebe){_0x2598b9['push'](_0x2598b9['shift']());}}}(a13_0x5322,0x4526c));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';function a13_0x5a15(_0x353e77,_0x82c216){const _0x532288=a13_0x5322();return a13_0x5a15=function(_0x5a150f,_0x56848d){_0x5a150f=_0x5a150f-0x153;let _0x3dbe3f=_0x532288[_0x5a150f];return _0x3dbe3f;},a13_0x5a15(_0x353e77,_0x82c216);}const config=readConfig();function a13_0x5322(){const _0x5386d8=['appcode','extend','获取菜单列表失败,HTTP状态码:\x20','data','123695picVdF','3gGuVXX','504DPNnNT','12OzyQEz','info','isArray','path','成功获取\x20','application/json','json','label','获取菜单列表失败:\x20','服务端返回空菜单列表','status','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','491647hwZTzl','get-online-menu-list','success','未知错误','3680047lMkugV','resources','map','\x20个线上菜单','1730908HdIjyr','631BCIQDA','2894202coaoQE','errorMsg','正在获取线上菜单列表...\x20(appCode:\x20','597305ziqTKJ','10lTAOhh','8dbRGxl','14lrVNCU','782pnErzD','未提供应用AppCode,且配置中也没有默认值','error','GET','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','log'];a13_0x5322=function(){return _0x5386d8;};return a13_0x5322();}export async function getOnlineMenuList(){const _0x2cf591=a13_0x5a15,_0x404ff8=config?.[_0x2cf591(0x162)];if(!_0x404ff8){const _0x3060a8=_0x2cf591(0x15d);return logger[_0x2cf591(0x15e)]('get-online-menu-list',_0x3060a8),console['error']('×\x20'+_0x3060a8),console[_0x2cf591(0x161)]('!\x20请使用以下方式之一:'),console[_0x2cf591(0x161)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console['log'](_0x2cf591(0x174)),[];}logger['info'](_0x2cf591(0x176),_0x2cf591(0x157)+_0x404ff8+')');const _0xc85404=await fetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x404ff8,{'method':_0x2cf591(0x15f),'headers':{'Content-Type':_0x2cf591(0x16e),'Cookie':getCookie()}});if(!_0xc85404['ok']){if(_0xc85404[_0x2cf591(0x173)]===0x191){const _0x36a40e=_0x2cf591(0x160);logger[_0x2cf591(0x15e)](_0x2cf591(0x176),_0x36a40e,{'status':_0xc85404[_0x2cf591(0x173)]});throw new Error(_0x36a40e);}const _0x1af89b=_0x2cf591(0x164)+_0xc85404[_0x2cf591(0x173)];logger[_0x2cf591(0x15e)](_0x2cf591(0x176),_0x1af89b);throw new Error(_0x1af89b);}const _0x3d69ec=await _0xc85404[_0x2cf591(0x16f)]();if(!_0x3d69ec[_0x2cf591(0x177)]){const _0x39bbe5=_0x2cf591(0x171)+(_0x3d69ec[_0x2cf591(0x156)]||_0x2cf591(0x178));logger[_0x2cf591(0x15e)]('get-online-menu-list',_0x39bbe5,{'errorCode':_0x3d69ec['errorCode'],'errorMsg':_0x3d69ec[_0x2cf591(0x156)]});throw new Error(_0x39bbe5);}if(!_0x3d69ec['data'])return logger['info'](_0x2cf591(0x176),_0x2cf591(0x172)),[];return logger[_0x2cf591(0x16a)](_0x2cf591(0x176),_0x2cf591(0x16d)+_0x3d69ec[_0x2cf591(0x165)]['length']+_0x2cf591(0x17c)),_0x3d69ec[_0x2cf591(0x165)][_0x2cf591(0x17b)](_0x384076=>{const _0x279fab=_0x2cf591;let _0x394b02=[];try{if(_0x384076[_0x279fab(0x163)]?.[_0x279fab(0x17a)]){const _0xfa9ae2=JSON['parse'](_0x384076['extend'][_0x279fab(0x17a)]);Array[_0x279fab(0x16b)](_0xfa9ae2)&&(_0x394b02=_0xfa9ae2);}}catch(_0x20ee3c){}return{'id':_0x384076['id'],'path':_0x384076[_0x279fab(0x16c)],'label':_0x384076[_0x279fab(0x170)],'resources':_0x394b02};});}
1
+ (function(_0x3900d2,_0x14320c){const _0x579b2d=a13_0x1062,_0x59d7bb=_0x3900d2();while(!![]){try{const _0x984158=parseInt(_0x579b2d(0x186))/0x1*(-parseInt(_0x579b2d(0x18f))/0x2)+-parseInt(_0x579b2d(0x188))/0x3+-parseInt(_0x579b2d(0x17d))/0x4*(-parseInt(_0x579b2d(0x198))/0x5)+-parseInt(_0x579b2d(0x17a))/0x6+-parseInt(_0x579b2d(0x17c))/0x7*(-parseInt(_0x579b2d(0x173))/0x8)+-parseInt(_0x579b2d(0x197))/0x9+parseInt(_0x579b2d(0x180))/0xa;if(_0x984158===_0x14320c)break;else _0x59d7bb['push'](_0x59d7bb['shift']());}catch(_0x292892){_0x59d7bb['push'](_0x59d7bb['shift']());}}}(a13_0x2230,0x9a03c));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a13_0x2230(){const _0x423f57=['获取菜单列表失败:\x20','7666967MtaXeC','1073640YiFIOI','info','获取菜单列表失败,HTTP状态码:\x20','12624840cVuSYO','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','errorCode','log','path','json','119159kVHsEp','errorMsg','2041758XELBqQ','/smartapi/menu/find?appCode=','extend','success','data','GET','status','12mewwxh','parse','正在获取线上菜单列表...\x20(appCode:\x20','resources','isArray','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','\x20个线上菜单','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','2565936FZZIgF','15SZBCxs','未知错误','服务端返回空菜单列表','8xVjldm','length','error','label','!\x20请使用以下方式之一:','application/json','get-online-menu-list','5109042OpsOqG'];a13_0x2230=function(){return _0x423f57;};return a13_0x2230();}import{readConfig}from'../utils/config.js';function a13_0x1062(_0x2b7414,_0x276642){const _0x22302b=a13_0x2230();return a13_0x1062=function(_0x1062c7,_0x430815){_0x1062c7=_0x1062c7-0x172;let _0x1e4798=_0x22302b[_0x1062c7];return _0x1e4798;},a13_0x1062(_0x2b7414,_0x276642);}import{logger}from'../utils/logger.js';const config=readConfig();export async function getOnlineMenuList(){const _0xdd1c40=a13_0x1062,_0x2f620d=config?.['appcode'];if(!_0x2f620d){const _0x4c4162='未提供应用AppCode,且配置中也没有默认值';return logger['error'](_0xdd1c40(0x179),_0x4c4162),console['error']('×\x20'+_0x4c4162),console[_0xdd1c40(0x183)](_0xdd1c40(0x177)),console[_0xdd1c40(0x183)](_0xdd1c40(0x181)),console[_0xdd1c40(0x183)](_0xdd1c40(0x196)),[];}logger['info'](_0xdd1c40(0x179),_0xdd1c40(0x191)+_0x2f620d+')');const _0x133664=await fetch(getApiDomain()+_0xdd1c40(0x189)+_0x2f620d,{'method':_0xdd1c40(0x18d),'headers':{'Content-Type':_0xdd1c40(0x178),'Cookie':getCookie()}});if(!_0x133664['ok']){if(_0x133664[_0xdd1c40(0x18e)]===0x191){const _0x24a877=_0xdd1c40(0x194);logger[_0xdd1c40(0x175)]('get-online-menu-list',_0x24a877,{'status':_0x133664[_0xdd1c40(0x18e)]});throw new Error(_0x24a877);}const _0x20333b=_0xdd1c40(0x17f)+_0x133664[_0xdd1c40(0x18e)];logger[_0xdd1c40(0x175)]('get-online-menu-list',_0x20333b);throw new Error(_0x20333b);}const _0x3c9f4b=await _0x133664[_0xdd1c40(0x185)]();if(!_0x3c9f4b[_0xdd1c40(0x18b)]){const _0x4a7db4=_0xdd1c40(0x17b)+(_0x3c9f4b['errorMsg']||_0xdd1c40(0x199));logger[_0xdd1c40(0x175)](_0xdd1c40(0x179),_0x4a7db4,{'errorCode':_0x3c9f4b[_0xdd1c40(0x182)],'errorMsg':_0x3c9f4b[_0xdd1c40(0x187)]});throw new Error(_0x4a7db4);}if(!_0x3c9f4b[_0xdd1c40(0x18c)])return logger[_0xdd1c40(0x17e)](_0xdd1c40(0x179),_0xdd1c40(0x172)),[];return logger[_0xdd1c40(0x17e)](_0xdd1c40(0x179),'成功获取\x20'+_0x3c9f4b[_0xdd1c40(0x18c)][_0xdd1c40(0x174)]+_0xdd1c40(0x195)),_0x3c9f4b['data']['map'](_0x28b218=>{const _0xd09e37=_0xdd1c40;let _0x3fcf24=[];try{if(_0x28b218[_0xd09e37(0x18a)]?.[_0xd09e37(0x192)]){const _0x591871=JSON[_0xd09e37(0x190)](_0x28b218[_0xd09e37(0x18a)][_0xd09e37(0x192)]);Array[_0xd09e37(0x193)](_0x591871)&&(_0x3fcf24=_0x591871);}}catch(_0x47ca19){}return{'id':_0x28b218['id'],'path':_0x28b218[_0xd09e37(0x184)],'label':_0x28b218[_0xd09e37(0x176)],'resources':_0x3fcf24};});}
@@ -1 +1 @@
1
- (function(_0xfc9035,_0x2868c5){const _0x7493e0=a15_0x1752,_0x5a6d9a=_0xfc9035();while(!![]){try{const _0x406856=-parseInt(_0x7493e0(0x89))/0x1*(parseInt(_0x7493e0(0x84))/0x2)+-parseInt(_0x7493e0(0x8a))/0x3+-parseInt(_0x7493e0(0x87))/0x4+parseInt(_0x7493e0(0x85))/0x5+-parseInt(_0x7493e0(0x8b))/0x6+-parseInt(_0x7493e0(0x83))/0x7+-parseInt(_0x7493e0(0x81))/0x8*(-parseInt(_0x7493e0(0x8c))/0x9);if(_0x406856===_0x2868c5)break;else _0x5a6d9a['push'](_0x5a6d9a['shift']());}catch(_0x4b3237){_0x5a6d9a['push'](_0x5a6d9a['shift']());}}}(a15_0x2f51,0xe935f));import{useEffect,useState}from'react';function a15_0x2f51(){const _0xc19de8=['7584500CVXolO','then','53684IlgKhn','833856YPBUXg','10851024Apcasy','604017NNlZRF','finally','744YUvqsz','message','10310559GIPocL','40JrAxve','6214600MxJPho','获取菜单列表失败'];a15_0x2f51=function(){return _0xc19de8;};return a15_0x2f51();}import{getOnlineMenuList}from'./get-online-menu-list.js';function a15_0x1752(_0x55f74,_0x49382a){const _0x2f5189=a15_0x2f51();return a15_0x1752=function(_0x17526e,_0x35ff65){_0x17526e=_0x17526e-0x81;let _0x4f1c8d=_0x2f5189[_0x17526e];return _0x4f1c8d;},a15_0x1752(_0x55f74,_0x49382a);}export function useGetOnlineMenuList(){const [_0xfcab1e,_0x48ad47]=useState([]),[_0x479dc7,_0x3b4877]=useState(!![]),[_0x205a74,_0x292c81]=useState('');return useEffect(()=>{const _0x7d1c94=a15_0x1752;_0x3b4877(!![]),_0x292c81(''),getOnlineMenuList()[_0x7d1c94(0x88)](_0x48ad47)['catch'](_0x5648fb=>{const _0x4d0c1f=_0x7d1c94;_0x292c81(_0x5648fb[_0x4d0c1f(0x82)]||_0x4d0c1f(0x86));})[_0x7d1c94(0x8d)](()=>_0x3b4877(![]));},[]),{'menuList':_0xfcab1e,'loading':_0x479dc7,'error':_0x205a74};}
1
+ function a15_0x15b7(_0x287ad7,_0x100dd3){const _0x9caf93=a15_0x9caf();return a15_0x15b7=function(_0x15b7a3,_0x2d186a){_0x15b7a3=_0x15b7a3-0x10f;let _0xe194ba=_0x9caf93[_0x15b7a3];return _0xe194ba;},a15_0x15b7(_0x287ad7,_0x100dd3);}function a15_0x9caf(){const _0x25275f=['8955LFufjD','then','46040TasEWm','3734zFNVJV','获取菜单列表失败','10zghEYm','3438CHPJiN','message','finally','4pxoOjk','catch','3012348BWSWlF','27VLqOWY','637XxztPk','3606390MGCJKw','2082291jrxqOI','9146203ZZlMkJ'];a15_0x9caf=function(){return _0x25275f;};return a15_0x9caf();}(function(_0x54eb33,_0x1a9eba){const _0x13002d=a15_0x15b7,_0x2c2087=_0x54eb33();while(!![]){try{const _0xffe0a8=-parseInt(_0x13002d(0x11c))/0x1*(parseInt(_0x13002d(0x113))/0x2)+-parseInt(_0x13002d(0x11f))/0x3*(parseInt(_0x13002d(0x119))/0x4)+parseInt(_0x13002d(0x110))/0x5*(parseInt(_0x13002d(0x116))/0x6)+parseInt(_0x13002d(0x11d))/0x7*(parseInt(_0x13002d(0x112))/0x8)+parseInt(_0x13002d(0x11e))/0x9+parseInt(_0x13002d(0x115))/0xa*(-parseInt(_0x13002d(0x10f))/0xb)+parseInt(_0x13002d(0x11b))/0xc;if(_0xffe0a8===_0x1a9eba)break;else _0x2c2087['push'](_0x2c2087['shift']());}catch(_0x2daec1){_0x2c2087['push'](_0x2c2087['shift']());}}}(a15_0x9caf,0x98c2c));import{useEffect,useState}from'react';import{getOnlineMenuList}from'./get-online-menu-list.js';export function useGetOnlineMenuList(){const [_0x3c18aa,_0x5a4584]=useState([]),[_0x1f2a79,_0x48f34b]=useState(!![]),[_0x11baf2,_0x37f6a7]=useState('');return useEffect(()=>{const _0x51d4fc=a15_0x15b7;_0x48f34b(!![]),_0x37f6a7(''),getOnlineMenuList()[_0x51d4fc(0x111)](_0x5a4584)[_0x51d4fc(0x11a)](_0x359106=>{const _0x45ced4=_0x51d4fc;_0x37f6a7(_0x359106[_0x45ced4(0x117)]||_0x45ced4(0x114));})[_0x51d4fc(0x118)](()=>_0x48f34b(![]));},[]),{'menuList':_0x3c18aa,'loading':_0x1f2a79,'error':_0x11baf2};}
@@ -1 +1 @@
1
- (function(_0x4a7449,_0xd85d78){const _0x43d806=a16_0x1b9b,_0x4d2c88=_0x4a7449();while(!![]){try{const _0x2fcef0=-parseInt(_0x43d806(0xa5))/0x1+-parseInt(_0x43d806(0xa7))/0x2*(-parseInt(_0x43d806(0xa6))/0x3)+parseInt(_0x43d806(0x9b))/0x4+parseInt(_0x43d806(0xa4))/0x5+parseInt(_0x43d806(0xa0))/0x6+-parseInt(_0x43d806(0x9e))/0x7+-parseInt(_0x43d806(0xa1))/0x8*(parseInt(_0x43d806(0x9d))/0x9);if(_0x2fcef0===_0xd85d78)break;else _0x4d2c88['push'](_0x4d2c88['shift']());}catch(_0xb49303){_0x4d2c88['push'](_0x4d2c88['shift']());}}}(a16_0x3ae2,0xee487));export function getRemainingSpaces(_0x4bab72,_0x4ccb63){const _0x464520=a16_0x1b9b,_0xccc56c=getStringWidth(_0x4ccb63);return Array(Math[_0x464520(0xa3)](0x0,_0x4bab72-_0xccc56c))[_0x464520(0xa2)]('\x20')[_0x464520(0x9c)]('');}export function getMaxWidth(_0xc9224a,_0x440597=0x2){const _0x543faa=a16_0x1b9b;let _0x5c81d1='',_0x46ab9b=0x0;for(const _0x3c7fbf of _0xc9224a){const _0x3eb8d4=getStringWidth(_0x3c7fbf);_0x3eb8d4>_0x46ab9b&&(_0x46ab9b=_0x3eb8d4,_0x5c81d1=_0x3c7fbf);}return _0x5c81d1+'\x20'[_0x543faa(0x9f)](_0x440597);}export function getStringWidth(_0x387d58){let _0x41dbdc=0x0;for(const _0x156474 of _0x387d58){/[\u4e00-\u9fa5]/['test'](_0x156474)?_0x41dbdc+=0x2:_0x41dbdc+=0x1;}return _0x41dbdc;}function a16_0x1b9b(_0x250d02,_0x2df969){const _0x3ae2c9=a16_0x3ae2();return a16_0x1b9b=function(_0x1b9b1c,_0x477805){_0x1b9b1c=_0x1b9b1c-0x9b;let _0x2ba457=_0x3ae2c9[_0x1b9b1c];return _0x2ba457;},a16_0x1b9b(_0x250d02,_0x2df969);}function a16_0x3ae2(){const _0x45ad6e=['1385032XSAqEA','join','9nBVPHn','1859746RQOXId','repeat','6735450bkZuBo','13806488ESaEEW','fill','max','2901415QQTDuE','544156JSGRcQ','29646MQsQOY','296EBFUWG'];a16_0x3ae2=function(){return _0x45ad6e;};return a16_0x3ae2();}
1
+ (function(_0x46c6c5,_0x3bad0d){const _0x50e047=a16_0x3d0c,_0x4bfadc=_0x46c6c5();while(!![]){try{const _0x142e3c=parseInt(_0x50e047(0x134))/0x1*(-parseInt(_0x50e047(0x136))/0x2)+parseInt(_0x50e047(0x132))/0x3*(-parseInt(_0x50e047(0x13f))/0x4)+-parseInt(_0x50e047(0x13c))/0x5+-parseInt(_0x50e047(0x13a))/0x6*(-parseInt(_0x50e047(0x139))/0x7)+parseInt(_0x50e047(0x13b))/0x8+-parseInt(_0x50e047(0x133))/0x9*(parseInt(_0x50e047(0x137))/0xa)+parseInt(_0x50e047(0x135))/0xb;if(_0x142e3c===_0x3bad0d)break;else _0x4bfadc['push'](_0x4bfadc['shift']());}catch(_0x3bfd46){_0x4bfadc['push'](_0x4bfadc['shift']());}}}(a16_0x446e,0x3b840));function a16_0x3d0c(_0x473a32,_0x39ec99){const _0x446e15=a16_0x446e();return a16_0x3d0c=function(_0x3d0c93,_0x1756bb){_0x3d0c93=_0x3d0c93-0x132;let _0xd2f91=_0x446e15[_0x3d0c93];return _0xd2f91;},a16_0x3d0c(_0x473a32,_0x39ec99);}export function getRemainingSpaces(_0x1fc256,_0x540216){const _0x486232=a16_0x3d0c,_0x2ee122=getStringWidth(_0x540216);return Array(Math[_0x486232(0x13e)](0x0,_0x1fc256-_0x2ee122))['fill']('\x20')[_0x486232(0x140)]('');}export function getMaxWidth(_0x160201,_0x59fa1=0x2){const _0x131521=a16_0x3d0c;let _0x1b014b='',_0x5c03e8=0x0;for(const _0x28972a of _0x160201){const _0x1a332a=getStringWidth(_0x28972a);_0x1a332a>_0x5c03e8&&(_0x5c03e8=_0x1a332a,_0x1b014b=_0x28972a);}return _0x1b014b+'\x20'[_0x131521(0x13d)](_0x59fa1);}function a16_0x446e(){const _0x1d2c14=['test','259wDYRIT','9696PFrfpi','2700896igKdfL','1996250IcBuuh','repeat','max','1510324RNWNjD','join','3JLvCHm','160938PWWYse','10126TybiCM','9836585xUbluH','50wcaLNf','10FsWjmf'];a16_0x446e=function(){return _0x1d2c14;};return a16_0x446e();}export function getStringWidth(_0x1aad2b){const _0x2b03cb=a16_0x3d0c;let _0x482a6c=0x0;for(const _0x458551 of _0x1aad2b){/[\u4e00-\u9fa5]/[_0x2b03cb(0x138)](_0x458551)?_0x482a6c+=0x2:_0x482a6c+=0x1;}return _0x482a6c;}
@@ -1 +1 @@
1
- (function(_0xacbe1f,_0x2ca8ea){const _0x424836=a17_0x2aef,_0x57e039=_0xacbe1f();while(!![]){try{const _0x3732e2=parseInt(_0x424836(0xb9))/0x1+-parseInt(_0x424836(0xc3))/0x2+-parseInt(_0x424836(0xc4))/0x3*(-parseInt(_0x424836(0xc2))/0x4)+-parseInt(_0x424836(0xbf))/0x5+-parseInt(_0x424836(0xbe))/0x6*(parseInt(_0x424836(0xba))/0x7)+-parseInt(_0x424836(0xbb))/0x8+-parseInt(_0x424836(0xc1))/0x9*(-parseInt(_0x424836(0xc0))/0xa);if(_0x3732e2===_0x2ca8ea)break;else _0x57e039['push'](_0x57e039['shift']());}catch(_0x5e7030){_0x57e039['push'](_0x57e039['shift']());}}}(a17_0x4771,0xd88a6));export function isValidJsHttpsUrl(_0x5e38f3){const _0x3eecf3=a17_0x2aef;return/^https:\/\/.+\.js(\?.*)?$/[_0x3eecf3(0xbc)](_0x5e38f3[_0x3eecf3(0xbd)]());}function a17_0x4771(){const _0x2804b8=['87WckkLk','HEAD','73035BSvjdC','1036ZUgptI','4444264XwMjPj','test','trim','62250cDQYlG','1254040daQzzB','45945970ghTFmI','9QNuHIi','31108EPDfdJ','3328748YEwobw'];a17_0x4771=function(){return _0x2804b8;};return a17_0x4771();}export function isValidCssHttpsUrl(_0x42e1db){const _0x553297=a17_0x2aef;return/^https:\/\/.+\.css(\?.*)?$/[_0x553297(0xbc)](_0x42e1db['trim']());}function a17_0x2aef(_0x1a27b6,_0x40f5eb){const _0x4771d8=a17_0x4771();return a17_0x2aef=function(_0x2aef73,_0x489ad7){_0x2aef73=_0x2aef73-0xb8;let _0x19dc50=_0x4771d8[_0x2aef73];return _0x19dc50;},a17_0x2aef(_0x1a27b6,_0x40f5eb);}export async function isUrlReachable(_0x4d20df){const _0x351553=a17_0x2aef;try{const _0x3cf17d=await fetch(_0x4d20df,{'method':_0x351553(0xb8)});return _0x3cf17d['ok'];}catch{return![];}}
1
+ (function(_0x259880,_0x3c5c1f){const _0x194093=a17_0x43f0,_0x1f41ea=_0x259880();while(!![]){try{const _0x46fb7c=parseInt(_0x194093(0x19e))/0x1*(parseInt(_0x194093(0x1a4))/0x2)+parseInt(_0x194093(0x19f))/0x3+-parseInt(_0x194093(0x1a6))/0x4*(-parseInt(_0x194093(0x1a5))/0x5)+parseInt(_0x194093(0x1a1))/0x6*(parseInt(_0x194093(0x1a2))/0x7)+-parseInt(_0x194093(0x19d))/0x8+parseInt(_0x194093(0x1a9))/0x9*(parseInt(_0x194093(0x1aa))/0xa)+-parseInt(_0x194093(0x1a0))/0xb*(parseInt(_0x194093(0x1a7))/0xc);if(_0x46fb7c===_0x3c5c1f)break;else _0x1f41ea['push'](_0x1f41ea['shift']());}catch(_0x4867d7){_0x1f41ea['push'](_0x1f41ea['shift']());}}}(a17_0x5140,0xa6cfa));function a17_0x43f0(_0x392351,_0x443af6){const _0x5140ad=a17_0x5140();return a17_0x43f0=function(_0x43f010,_0x2654be){_0x43f010=_0x43f010-0x19d;let _0x404e4f=_0x5140ad[_0x43f010];return _0x404e4f;},a17_0x43f0(_0x392351,_0x443af6);}export function isValidJsHttpsUrl(_0x1af4a2){return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x1af4a2['trim']());}function a17_0x5140(){const _0x37c8ba=['90Hfxoki','137634pbMmjC','trim','164506ahqeRe','2270045eGsBvf','12UYMSqN','8245284cIUEDr','test','67761QysEPW','1490IswIBz','6955016nOfLNI','10ckqJOt','2099265FHQbMv','44wrLpTg'];a17_0x5140=function(){return _0x37c8ba;};return a17_0x5140();}export function isValidCssHttpsUrl(_0x8bc8b3){const _0x198956=a17_0x43f0;return/^https:\/\/.+\.css(\?.*)?$/[_0x198956(0x1a8)](_0x8bc8b3[_0x198956(0x1a3)]());}export async function isUrlReachable(_0x34f085){try{const _0x34f029=await fetch(_0x34f085,{'method':'HEAD'});return _0x34f029['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a18_0x5a015b=a18_0x6a1c;(function(_0x38259a,_0x9ac67e){const _0x1b2f08=a18_0x6a1c,_0x3aced1=_0x38259a();while(!![]){try{const _0x2a05c2=-parseInt(_0x1b2f08(0x8f))/0x1*(-parseInt(_0x1b2f08(0x94))/0x2)+parseInt(_0x1b2f08(0x72))/0x3*(-parseInt(_0x1b2f08(0x87))/0x4)+parseInt(_0x1b2f08(0x6d))/0x5*(-parseInt(_0x1b2f08(0x73))/0x6)+-parseInt(_0x1b2f08(0x82))/0x7*(parseInt(_0x1b2f08(0x71))/0x8)+-parseInt(_0x1b2f08(0x79))/0x9+parseInt(_0x1b2f08(0x93))/0xa*(parseInt(_0x1b2f08(0x81))/0xb)+parseInt(_0x1b2f08(0x7e))/0xc;if(_0x2a05c2===_0x9ac67e)break;else _0x3aced1['push'](_0x3aced1['shift']());}catch(_0x240be7){_0x3aced1['push'](_0x3aced1['shift']());}}}(a18_0x232d,0xcfafc));import{jsx as a18_0x148fb5,jsxs as a18_0x53f6c5}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';function a18_0x6a1c(_0x4360c2,_0x2ae316){const _0x232df3=a18_0x232d();return a18_0x6a1c=function(_0x6a1ce2,_0x2e5a8a){_0x6a1ce2=_0x6a1ce2-0x6d;let _0x18be2e=_0x232df3[_0x6a1ce2];return _0x18be2e;},a18_0x6a1c(_0x4360c2,_0x2ae316);}import a18_0x57d5b7 from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable}from'../app-menu/valid-url.js';import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import{CdnUrlCompareTable}from'./cdn-url-compare-table.js';import.meta['main']&&render(a18_0x148fb5(AppMenuSyncCdnVersionUI,{'newVersion':a18_0x5a015b(0x83)}));export function AppMenuSyncCdnVersionUI(_0x284502){const _0x173031=a18_0x5a015b,{exit:_0x1a734f}=useApp(),{newVersion:_0x1ebbf8}=_0x284502,{loading:_0x2b158f,menuList:_0x298f78,error:_0x3c60f3}=useGetOnlineMenuList(),[_0x5ee062,_0x4ab63a]=useState(![]),[_0x3c4732,_0x514dab]=useState(!![]),[_0x4ba1cc,_0x53e980]=useState('ok'),[_0xd8bb52,_0x37b6b9]=useState([]),_0x48ad5a=Array[_0x173031(0x7a)](new Set(_0x298f78[_0x173031(0x74)](_0x47693d=>_0x47693d[_0x173031(0x70)])['flat']()));useEffect(()=>{const _0x3a04be=_0x173031;if(!_0x48ad5a[_0x3a04be(0x88)])return;Promise['all'](_0x48ad5a[_0x3a04be(0x74)](async _0x147e4=>{const _0x4f7071=_0x3a04be,_0x1949c9=_0x147e4[_0x4f7071(0x86)](extractVersionFromUrl(_0x147e4),_0x1ebbf8),_0x3061bc=await isUrlReachable(_0x1949c9);if(_0x3061bc)return'';return _0x1949c9;}))['then'](_0x55869c=>{_0x37b6b9(_0x55869c['filter'](_0x2c0b74=>_0x2c0b74)),_0x514dab(![]);});},[_0x48ad5a['length'],_0x1ebbf8]),useEffect(()=>{const _0x51e919=_0x173031;(_0x5ee062||_0xd8bb52[_0x51e919(0x88)]>0x0)&&setTimeout(_0x1a734f,0x32);},[_0x5ee062,_0xd8bb52[_0x173031(0x88)]]),useInput(async(_0x47634e,_0x505a62)=>{const _0x250230=_0x173031;if(_0x505a62[_0x250230(0x91)]||_0x505a62[_0x250230(0x96)]||_0x505a62['leftArrow']||_0x505a62[_0x250230(0x95)]){_0x53e980(_0x29d2dc=>_0x29d2dc==='ok'?_0x250230(0x89):'ok');return;}if(_0x505a62[_0x250230(0x7f)]){if(_0x4ba1cc==='ok'){await Promise[_0x250230(0x98)](_0x298f78[_0x250230(0x74)](_0x35ef3a=>{const _0xc9077e=_0x250230,_0x4319cb={'id':_0x35ef3a['id'],'label':_0x35ef3a['label'],'path':_0x35ef3a[_0xc9077e(0x7c)],'resources':_0x35ef3a[_0xc9077e(0x70)][_0xc9077e(0x74)](_0x13b90e=>_0x13b90e['replace'](extractVersionFromUrl(_0x13b90e),_0x1ebbf8))};return updateMenuCdnUrl(_0x4319cb);})),_0x4ab63a(!![]);return;}_0x4ba1cc===_0x250230(0x89)&&_0x1a734f();}});if(_0x2b158f||_0x3c4732)return a18_0x53f6c5(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x148fb5(Text,{'children':'\x20\x20'}),a18_0x148fb5(a18_0x57d5b7,{'type':_0x173031(0x7b)}),a18_0x148fb5(Text,{'children':'\x20正在获取线上菜单资源列表...'})]});if(_0x3c60f3)return a18_0x53f6c5(Box,{'flexDirection':_0x173031(0x8e),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x53f6c5(Text,{'color':_0x173031(0x80),'children':['✗\x20',_0x3c60f3]}),a18_0x53f6c5(Box,{'marginTop':0x1,'children':[a18_0x148fb5(Text,{'color':_0x173031(0x8b),'children':_0x173031(0x99)}),a18_0x148fb5(Text,{'color':_0x173031(0x8a),'children':_0x173031(0x90)}),a18_0x148fb5(Text,{'color':_0x173031(0x8b),'children':_0x173031(0x76)})]})]});if(_0x48ad5a['length']===0x0)return a18_0x148fb5(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a18_0x148fb5(Text,{'color':_0x173031(0x78),'children':_0x173031(0x6e)})});const _0xe8f5a=_0x48ad5a[_0x173031(0x74)](_0x2e1583=>({'cdnUrl':_0x2e1583,'currentVersion':extractVersionFromUrl(_0x2e1583)||_0x173031(0x77),'newVersion':_0x1ebbf8}));if(_0x5ee062)return a18_0x53f6c5(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a18_0x148fb5(CdnUrlCompareTable,{'compareRows':_0xe8f5a}),a18_0x148fb5(Box,{'marginTop':0x1,'children':a18_0x148fb5(Text,{'color':_0x173031(0x6f),'children':_0x173031(0x8d)})})]});if(_0xd8bb52['length'])return a18_0x53f6c5(Box,{'flexDirection':_0x173031(0x8e),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x148fb5(CdnUrlCompareTable,{'compareRows':_0xe8f5a}),a18_0x53f6c5(Box,{'marginTop':0x1,'flexDirection':_0x173031(0x8e),'children':[a18_0x148fb5(Text,{'color':'red','children':_0x173031(0x7d)}),_0xd8bb52[_0x173031(0x74)](_0x220b64=>a18_0x148fb5(Text,{'color':_0x173031(0x8b),'children':'\x20\x20'+_0x220b64},_0x220b64))]})]});return a18_0x53f6c5(Box,{'flexDirection':_0x173031(0x8e),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x148fb5(CdnUrlCompareTable,{'compareRows':_0xe8f5a}),a18_0x148fb5(Box,{'marginTop':0x1,'children':a18_0x148fb5(Text,{'color':_0x173031(0x8a),'children':'*\x20更新菜单资源到\x20Lovrabet\x20平台'})}),a18_0x148fb5(Box,{'marginTop':0x1,'flexDirection':_0x173031(0x8e),'children':[{'label':_0x173031(0x8c),'value':'ok'},{'label':'取消更新','value':_0x173031(0x89)}][_0x173031(0x74)](_0x174e90=>a18_0x53f6c5(Text,{'color':_0x4ba1cc===_0x174e90[_0x173031(0x97)]?_0x173031(0x78):undefined,'children':[_0x4ba1cc===_0x174e90['value']?'>\x20':'\x20\x20',_0x174e90[_0x173031(0x85)]]},_0x174e90[_0x173031(0x97)]))})]});}function a18_0x232d(){const _0x4df292=['length','cancel','cyan','gray','继续更新','√\x20资源版本更新成功','column','231085hrCqGW','lovrabet\x20auth','upArrow','\x5cd+\x5c.\x5cd+\x5c.\x5cd+(?:[-+A-Za-z0-9.]+)?','7966790plGuSY','12ewJWNc','rightArrow','downArrow','value','all','提示:使用\x20','145vIMWpx','!\x20未找到菜单资源链接','green','resources','1240leYPiY','27esjavx','36810vCeNwh','map',')(?:/|$)','\x20命令重新登录','unknown','yellow','8320032Byjqxj','from','dots','path','✗\x20待更新的菜单资源无法访问,请检查链接是否正确','12430320elBzWI','return','red','11ymBbHs','27307PJBPlT','1.0.4','/v?(','label','replace','293932CLVSAg'];a18_0x232d=function(){return _0x4df292;};return a18_0x232d();}function extractVersionFromUrl(_0x3cfa5a){const _0x1819ef=a18_0x5a015b;if(!_0x3cfa5a)return'';const _0x955bc6=_0x1819ef(0x92),_0x227836=[new RegExp('@('+_0x955bc6+')'),new RegExp('-('+_0x955bc6+')(?:\x5c.|-)'),new RegExp(_0x1819ef(0x84)+_0x955bc6+_0x1819ef(0x75)),new RegExp('[?&]version=('+_0x955bc6+')')];for(const _0x2b6ce5 of _0x227836){const _0x5e2ce2=_0x3cfa5a['match'](_0x2b6ce5);if(_0x5e2ce2&&_0x5e2ce2[0x1])return _0x5e2ce2[0x1];}return'';}
1
+ function a18_0x304b(){const _0x4b13fd=['dots','yellow','!\x20未找到菜单资源链接','cyan','leftArrow','filter','188728lCFLGL',')(?:\x5c.|-)','label','317676baJVal','取消更新','match','upArrow','column','[?&]version=(','replace','main','downArrow','then','path','12LgGhdP','1153200aNnPXj','1.0.4','gray','√\x20资源版本更新成功','unknown','✗\x20待更新的菜单资源无法访问,请检查链接是否正确','继续更新','return','flat','2263689opMsGw','length','6RePWqy','red','value','209321hysFTH','\x5cd+\x5c.\x5cd+\x5c.\x5cd+(?:[-+A-Za-z0-9.]+)?','\x20命令重新登录','40779sSUirZ','green','1549176nnoWfo','cancel','map','lovrabet\x20auth','all','resources','from','rightArrow'];a18_0x304b=function(){return _0x4b13fd;};return a18_0x304b();}const a18_0x3d91a5=a18_0x36a0;(function(_0x516bc5,_0x3153fd){const _0x3e7dd7=a18_0x36a0,_0x5126ab=_0x516bc5();while(!![]){try{const _0x97ba0=-parseInt(_0x3e7dd7(0x143))/0x1*(-parseInt(_0x3e7dd7(0x131))/0x2)+parseInt(_0x3e7dd7(0x126))/0x3+parseInt(_0x3e7dd7(0x153))/0x4+-parseInt(_0x3e7dd7(0x132))/0x5*(parseInt(_0x3e7dd7(0x13d))/0x6)+parseInt(_0x3e7dd7(0x140))/0x7+parseInt(_0x3e7dd7(0x145))/0x8+-parseInt(_0x3e7dd7(0x13b))/0x9;if(_0x97ba0===_0x3153fd)break;else _0x5126ab['push'](_0x5126ab['shift']());}catch(_0x2b1590){_0x5126ab['push'](_0x5126ab['shift']());}}}(a18_0x304b,0x21f81));import{jsx as a18_0x38ba6d,jsxs as a18_0x2fdd20}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a18_0x39df15 from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable}from'../app-menu/valid-url.js';function a18_0x36a0(_0xe7734a,_0x36d21f){const _0x304b80=a18_0x304b();return a18_0x36a0=function(_0x36a077,_0x1800c3){_0x36a077=_0x36a077-0x125;let _0x40e615=_0x304b80[_0x36a077];return _0x40e615;},a18_0x36a0(_0xe7734a,_0x36d21f);}import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import{CdnUrlCompareTable}from'./cdn-url-compare-table.js';import.meta[a18_0x3d91a5(0x12d)]&&render(a18_0x38ba6d(AppMenuSyncCdnVersionUI,{'newVersion':a18_0x3d91a5(0x133)}));export function AppMenuSyncCdnVersionUI(_0x133a8a){const _0x3c2013=a18_0x3d91a5,{exit:_0x28951c}=useApp(),{newVersion:_0x29b421}=_0x133a8a,{loading:_0x5d341b,menuList:_0x1fb549,error:_0x17d6fe}=useGetOnlineMenuList(),[_0x28a1aa,_0x3a933b]=useState(![]),[_0x428599,_0x5d1ccc]=useState(!![]),[_0x3248d2,_0x28134b]=useState('ok'),[_0x3b5a1b,_0x4aa3c4]=useState([]),_0x1a8647=Array[_0x3c2013(0x14b)](new Set(_0x1fb549['map'](_0x238e9f=>_0x238e9f[_0x3c2013(0x14a)])[_0x3c2013(0x13a)]()));useEffect(()=>{const _0x3fa47e=_0x3c2013;if(!_0x1a8647[_0x3fa47e(0x13c)])return;Promise['all'](_0x1a8647['map'](async _0x121268=>{const _0x21d370=_0x3fa47e,_0x611ed=_0x121268[_0x21d370(0x12c)](extractVersionFromUrl(_0x121268),_0x29b421),_0x5eaf45=await isUrlReachable(_0x611ed);if(_0x5eaf45)return'';return _0x611ed;}))[_0x3fa47e(0x12f)](_0xccbed1=>{const _0x2fdb17=_0x3fa47e;_0x4aa3c4(_0xccbed1[_0x2fdb17(0x152)](_0x103418=>_0x103418)),_0x5d1ccc(![]);});},[_0x1a8647['length'],_0x29b421]),useEffect(()=>{const _0xec9c93=_0x3c2013;(_0x28a1aa||_0x3b5a1b[_0xec9c93(0x13c)]>0x0)&&setTimeout(_0x28951c,0x32);},[_0x28a1aa,_0x3b5a1b[_0x3c2013(0x13c)]]),useInput(async(_0x589e95,_0x2068cf)=>{const _0x3035c1=_0x3c2013;if(_0x2068cf[_0x3035c1(0x129)]||_0x2068cf[_0x3035c1(0x12e)]||_0x2068cf[_0x3035c1(0x151)]||_0x2068cf[_0x3035c1(0x14c)]){_0x28134b(_0x35bb89=>_0x35bb89==='ok'?_0x3035c1(0x146):'ok');return;}if(_0x2068cf[_0x3035c1(0x139)]){if(_0x3248d2==='ok'){await Promise[_0x3035c1(0x149)](_0x1fb549[_0x3035c1(0x147)](_0x99974b=>{const _0x52eba9=_0x3035c1,_0x2a6588={'id':_0x99974b['id'],'label':_0x99974b[_0x52eba9(0x125)],'path':_0x99974b[_0x52eba9(0x130)],'resources':_0x99974b[_0x52eba9(0x14a)]['map'](_0x3d04a6=>_0x3d04a6[_0x52eba9(0x12c)](extractVersionFromUrl(_0x3d04a6),_0x29b421))};return updateMenuCdnUrl(_0x2a6588);})),_0x3a933b(!![]);return;}_0x3248d2===_0x3035c1(0x146)&&_0x28951c();}});if(_0x5d341b||_0x428599)return a18_0x2fdd20(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x38ba6d(Text,{'children':'\x20\x20'}),a18_0x38ba6d(a18_0x39df15,{'type':_0x3c2013(0x14d)}),a18_0x38ba6d(Text,{'children':'\x20正在获取线上菜单资源列表...'})]});if(_0x17d6fe)return a18_0x2fdd20(Box,{'flexDirection':_0x3c2013(0x12a),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x2fdd20(Text,{'color':_0x3c2013(0x13e),'children':['✗\x20',_0x17d6fe]}),a18_0x2fdd20(Box,{'marginTop':0x1,'children':[a18_0x38ba6d(Text,{'color':'gray','children':'提示:使用\x20'}),a18_0x38ba6d(Text,{'color':_0x3c2013(0x150),'children':_0x3c2013(0x148)}),a18_0x38ba6d(Text,{'color':_0x3c2013(0x134),'children':_0x3c2013(0x142)})]})]});if(_0x1a8647[_0x3c2013(0x13c)]===0x0)return a18_0x38ba6d(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a18_0x38ba6d(Text,{'color':'yellow','children':_0x3c2013(0x14f)})});const _0x413088=_0x1a8647['map'](_0x147ab3=>({'cdnUrl':_0x147ab3,'currentVersion':extractVersionFromUrl(_0x147ab3)||_0x3c2013(0x136),'newVersion':_0x29b421}));if(_0x28a1aa)return a18_0x2fdd20(Box,{'flexDirection':_0x3c2013(0x12a),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x38ba6d(CdnUrlCompareTable,{'compareRows':_0x413088}),a18_0x38ba6d(Box,{'marginTop':0x1,'children':a18_0x38ba6d(Text,{'color':_0x3c2013(0x144),'children':_0x3c2013(0x135)})})]});if(_0x3b5a1b[_0x3c2013(0x13c)])return a18_0x2fdd20(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a18_0x38ba6d(CdnUrlCompareTable,{'compareRows':_0x413088}),a18_0x2fdd20(Box,{'marginTop':0x1,'flexDirection':_0x3c2013(0x12a),'children':[a18_0x38ba6d(Text,{'color':'red','children':_0x3c2013(0x137)}),_0x3b5a1b[_0x3c2013(0x147)](_0x273611=>a18_0x38ba6d(Text,{'color':_0x3c2013(0x134),'children':'\x20\x20'+_0x273611},_0x273611))]})]});return a18_0x2fdd20(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a18_0x38ba6d(CdnUrlCompareTable,{'compareRows':_0x413088}),a18_0x38ba6d(Box,{'marginTop':0x1,'children':a18_0x38ba6d(Text,{'color':_0x3c2013(0x150),'children':'*\x20更新菜单资源到\x20Lovrabet\x20平台'})}),a18_0x38ba6d(Box,{'marginTop':0x1,'flexDirection':_0x3c2013(0x12a),'children':[{'label':_0x3c2013(0x138),'value':'ok'},{'label':_0x3c2013(0x127),'value':'cancel'}][_0x3c2013(0x147)](_0x1d95a5=>a18_0x2fdd20(Text,{'color':_0x3248d2===_0x1d95a5[_0x3c2013(0x13f)]?_0x3c2013(0x14e):undefined,'children':[_0x3248d2===_0x1d95a5['value']?'>\x20':'\x20\x20',_0x1d95a5['label']]},_0x1d95a5[_0x3c2013(0x13f)]))})]});}function extractVersionFromUrl(_0x532d62){const _0x365ec2=a18_0x3d91a5;if(!_0x532d62)return'';const _0x253541=_0x365ec2(0x141),_0x561f48=[new RegExp('@('+_0x253541+')'),new RegExp('-('+_0x253541+_0x365ec2(0x154)),new RegExp('/v?('+_0x253541+')(?:/|$)'),new RegExp(_0x365ec2(0x12b)+_0x253541+')')];for(const _0x254330 of _0x561f48){const _0x1c3a2c=_0x532d62[_0x365ec2(0x128)](_0x254330);if(_0x1c3a2c&&_0x1c3a2c[0x1])return _0x1c3a2c[0x1];}return'';}
@@ -1 +1 @@
1
- (function(_0x23cf4c,_0x551124){const _0x32de42=a19_0x271c,_0xcc6a54=_0x23cf4c();while(!![]){try{const _0x236801=parseInt(_0x32de42(0x1f6))/0x1*(parseInt(_0x32de42(0x1f5))/0x2)+-parseInt(_0x32de42(0x1fe))/0x3+parseInt(_0x32de42(0x1fa))/0x4+-parseInt(_0x32de42(0x1fd))/0x5*(-parseInt(_0x32de42(0x1ff))/0x6)+-parseInt(_0x32de42(0x200))/0x7*(parseInt(_0x32de42(0x1fb))/0x8)+-parseInt(_0x32de42(0x1ef))/0x9+parseInt(_0x32de42(0x1ee))/0xa;if(_0x236801===_0x551124)break;else _0xcc6a54['push'](_0xcc6a54['shift']());}catch(_0x12139f){_0xcc6a54['push'](_0xcc6a54['shift']());}}}(a19_0x4904,0x5c768));import{jsx as a19_0x24e47c,jsxs as a19_0x2866a3,Fragment as a19_0x18e14b}from'react/jsx-runtime';import{Text,Box}from'ink';function a19_0x271c(_0xf766e1,_0x34d6af){const _0x490452=a19_0x4904();return a19_0x271c=function(_0x271c34,_0x35e37e){_0x271c34=_0x271c34-0x1ee;let _0x43fd53=_0x490452[_0x271c34];return _0x43fd53;},a19_0x271c(_0xf766e1,_0x34d6af);}import{getMaxWidth,getRemainingSpaces,getStringWidth}from'../app-menu/utils.js';export function CdnUrlCompareTable(_0x5abd9c){const _0x39ef60=a19_0x271c,{compareRows:_0x7fc44b}=_0x5abd9c,_0x2fd5ef=_0x7fc44b[_0x39ef60(0x1f1)](_0x374656=>_0x374656['cdnUrl']),_0x3ba919=getStringWidth(getMaxWidth([_0x39ef60(0x1fc),_0x39ef60(0x1f3)],0x2)),_0xcccf9f=getStringWidth(getMaxWidth(_0x2fd5ef,0x2));return a19_0x2866a3(a19_0x18e14b,{'children':[a19_0x24e47c(Text,{'color':'cyan','children':_0x39ef60(0x1f4)}),a19_0x2866a3(Box,{'children':[a19_0x2866a3(Text,{'bold':!![],'children':['\x20\x20',_0x39ef60(0x201),getRemainingSpaces(_0xcccf9f,'资源链接')]}),a19_0x2866a3(Text,{'bold':!![],'children':[_0x39ef60(0x1fc),getRemainingSpaces(_0x3ba919,_0x39ef60(0x1fc))]}),a19_0x2866a3(Text,{'bold':!![],'children':['新版本',getRemainingSpaces(_0x3ba919,'新版本')]})]}),_0x7fc44b[_0x39ef60(0x1f1)](_0x1da4ff=>a19_0x2866a3(Box,{'children':[a19_0x2866a3(Text,{'children':['\x20\x20',_0x1da4ff['cdnUrl'],getRemainingSpaces(_0xcccf9f,_0x1da4ff[_0x39ef60(0x1f8)])]}),a19_0x2866a3(Text,{'color':_0x39ef60(0x1f9),'children':[_0x1da4ff[_0x39ef60(0x1f0)],getRemainingSpaces(_0x3ba919,_0x1da4ff[_0x39ef60(0x1f0)])]}),a19_0x2866a3(Text,{'color':_0x39ef60(0x1f7),'children':[_0x1da4ff['newVersion'],getRemainingSpaces(_0x3ba919,_0x1da4ff[_0x39ef60(0x1f2)])]})]},_0x1da4ff[_0x39ef60(0x1f8)]))]});}function a19_0x4904(){const _0x29520e=['map','newVersion','新版本','*\x20待更新的菜单资源链接','2aIrGfW','216547VToeYR','cyan','cdnUrl','green','2509604zByajA','16lrrEuY','当前版本','665275rOKtEa','676614mbdvfm','12eXlbru','922047eTBdFP','资源链接','4446950sCUdWw','6183405uGouWq','currentVersion'];a19_0x4904=function(){return _0x29520e;};return a19_0x4904();}
1
+ function a19_0x2687(_0x716b73,_0x49a5b5){const _0x5cd8ca=a19_0x5cd8();return a19_0x2687=function(_0x268715,_0x4db8c8){_0x268715=_0x268715-0xa6;let _0x118327=_0x5cd8ca[_0x268715];return _0x118327;},a19_0x2687(_0x716b73,_0x49a5b5);}(function(_0x277e28,_0x4bd511){const _0x3f7a32=a19_0x2687,_0x1cbf51=_0x277e28();while(!![]){try{const _0xa2c869=parseInt(_0x3f7a32(0xb0))/0x1+-parseInt(_0x3f7a32(0xb7))/0x2*(-parseInt(_0x3f7a32(0xae))/0x3)+-parseInt(_0x3f7a32(0xa6))/0x4+parseInt(_0x3f7a32(0xaf))/0x5*(-parseInt(_0x3f7a32(0xb6))/0x6)+parseInt(_0x3f7a32(0xa8))/0x7*(-parseInt(_0x3f7a32(0xa7))/0x8)+-parseInt(_0x3f7a32(0xa9))/0x9+parseInt(_0x3f7a32(0xac))/0xa;if(_0xa2c869===_0x4bd511)break;else _0x1cbf51['push'](_0x1cbf51['shift']());}catch(_0x11503f){_0x1cbf51['push'](_0x1cbf51['shift']());}}}(a19_0x5cd8,0x88394));import{jsx as a19_0x141b2f,jsxs as a19_0x5b776f,Fragment as a19_0x56acf6}from'react/jsx-runtime';import{Text,Box}from'ink';function a19_0x5cd8(){const _0x3e45a3=['110530KIxsEI','176656aDJkFP','139304HPlbht','189EAvojD','4267917tPaHeM','currentVersion','新版本','9694440SSTAKK','green','21LJYJTU','5mjXxIF','521548izJzUG','资源链接','cdnUrl','map','newVersion','当前版本','1988082qXAOUz'];a19_0x5cd8=function(){return _0x3e45a3;};return a19_0x5cd8();}import{getMaxWidth,getRemainingSpaces,getStringWidth}from'../app-menu/utils.js';export function CdnUrlCompareTable(_0x39b3a3){const _0x4c9ca1=a19_0x2687,{compareRows:_0x23962d}=_0x39b3a3,_0x2c26b7=_0x23962d[_0x4c9ca1(0xb3)](_0x11db8e=>_0x11db8e[_0x4c9ca1(0xb2)]),_0x360acc=getStringWidth(getMaxWidth([_0x4c9ca1(0xb5),_0x4c9ca1(0xab)],0x2)),_0x7a5945=getStringWidth(getMaxWidth(_0x2c26b7,0x2));return a19_0x5b776f(a19_0x56acf6,{'children':[a19_0x141b2f(Text,{'color':'cyan','children':'*\x20待更新的菜单资源链接'}),a19_0x5b776f(Box,{'children':[a19_0x5b776f(Text,{'bold':!![],'children':['\x20\x20',_0x4c9ca1(0xb1),getRemainingSpaces(_0x7a5945,_0x4c9ca1(0xb1))]}),a19_0x5b776f(Text,{'bold':!![],'children':['当前版本',getRemainingSpaces(_0x360acc,_0x4c9ca1(0xb5))]}),a19_0x5b776f(Text,{'bold':!![],'children':[_0x4c9ca1(0xab),getRemainingSpaces(_0x360acc,'新版本')]})]}),_0x23962d[_0x4c9ca1(0xb3)](_0x30a627=>a19_0x5b776f(Box,{'children':[a19_0x5b776f(Text,{'children':['\x20\x20',_0x30a627['cdnUrl'],getRemainingSpaces(_0x7a5945,_0x30a627[_0x4c9ca1(0xb2)])]}),a19_0x5b776f(Text,{'color':_0x4c9ca1(0xad),'children':[_0x30a627[_0x4c9ca1(0xaa)],getRemainingSpaces(_0x360acc,_0x30a627['currentVersion'])]}),a19_0x5b776f(Text,{'color':'cyan','children':[_0x30a627['newVersion'],getRemainingSpaces(_0x360acc,_0x30a627[_0x4c9ca1(0xb4)])]})]},_0x30a627['cdnUrl']))]});}
@@ -1 +1 @@
1
- function a21_0x2401(_0x5f0747,_0xdc37dd){const _0x12bec8=a21_0x12be();return a21_0x2401=function(_0x240181,_0x4001e0){_0x240181=_0x240181-0x1d3;let _0x5b9fc5=_0x12bec8[_0x240181];return _0x5b9fc5;},a21_0x2401(_0x5f0747,_0xdc37dd);}const a21_0x3efe2a=a21_0x2401;function a21_0x12be(){const _0x1e875d=['创建菜单失败,HTTP状态码:\x20','stringify','info','import','sdk-demo','更新菜单资源失败:\x20','error','1209109XgeYYr','正在更新菜单资源链接:\x20','main','log','171973qeBkUh','/smartapi/menu/update','未知错误','90lkFkRW','update-menu-cdn-url','8RePAmE','json','resources','status','未提供应用AppCode,且配置中也没有默认值','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','POST','733145uEognq','24276ujbcYu','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css','7308513UuyECF','665pJMhbW','1662868FsqHRF','781896MdYkSo','菜单资源同步成功:\x20','3QkMhZA','appcode','data','errorMsg','SdkDemo1','label','success','path'];a21_0x12be=function(){return _0x1e875d;};return a21_0x12be();}(function(_0x3c9e86,_0x2105dc){const _0x23fe8b=a21_0x2401,_0x225cab=_0x3c9e86();while(!![]){try{const _0x767489=-parseInt(_0x23fe8b(0x1f7))/0x1+-parseInt(_0x23fe8b(0x1e1))/0x2*(-parseInt(_0x23fe8b(0x1e4))/0x3)+parseInt(_0x23fe8b(0x1e2))/0x4+parseInt(_0x23fe8b(0x1dc))/0x5+-parseInt(_0x23fe8b(0x1dd))/0x6*(parseInt(_0x23fe8b(0x1e0))/0x7)+-parseInt(_0x23fe8b(0x1d5))/0x8*(-parseInt(_0x23fe8b(0x1df))/0x9)+-parseInt(_0x23fe8b(0x1d3))/0xa*(parseInt(_0x23fe8b(0x1f3))/0xb);if(_0x767489===_0x2105dc)break;else _0x225cab['push'](_0x225cab['shift']());}catch(_0x4dffc4){_0x225cab['push'](_0x225cab['shift']());}}}(a21_0x12be,0x6b6ac));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig(),logLabel=a21_0x3efe2a(0x1d4);import.meta[a21_0x3efe2a(0x1f5)]&&updateMenuCdnUrl({'id':0xf41e,'label':a21_0x3efe2a(0x1e8),'path':a21_0x3efe2a(0x1f0),'resources':[a21_0x3efe2a(0x1da),a21_0x3efe2a(0x1de)]});export async function updateMenuCdnUrl(_0x2545cd){const _0x1afebc=a21_0x3efe2a,_0xc160f2=config?.[_0x1afebc(0x1e5)];if(!_0xc160f2){const _0x549b28=_0x1afebc(0x1d9);logger[_0x1afebc(0x1f2)](logLabel,_0x549b28),console[_0x1afebc(0x1f2)]('×\x20'+_0x549b28),console[_0x1afebc(0x1f6)]('!\x20请使用以下方式之一:'),console[_0x1afebc(0x1f6)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console[_0x1afebc(0x1f6)]('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>');return;}logger[_0x1afebc(0x1ee)](logLabel,_0x1afebc(0x1f4)+_0x2545cd[_0x1afebc(0x1e9)]+'\x20('+_0x2545cd[_0x1afebc(0x1eb)]+')');const _0x4e4885={'id':_0x2545cd['id'],'appCode':_0xc160f2,'extend':{'loadScriptMode':_0x1afebc(0x1ef),'resources':_0x2545cd[_0x1afebc(0x1d7)]?JSON[_0x1afebc(0x1ed)](_0x2545cd[_0x1afebc(0x1d7)]):undefined}},_0x248f89=await fetch(getApiDomain()+_0x1afebc(0x1f8),{'method':_0x1afebc(0x1db),'body':JSON[_0x1afebc(0x1ed)](_0x4e4885),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x248f89['ok']){if(_0x248f89[_0x1afebc(0x1d8)]===0x191){const _0x1837f4='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x1afebc(0x1f2)](logLabel,_0x1837f4,{'status':_0x248f89[_0x1afebc(0x1d8)],'menu':_0x2545cd[_0x1afebc(0x1e9)]});throw new Error(_0x1837f4);}const _0x3d7d1a=_0x1afebc(0x1ec)+_0x248f89[_0x1afebc(0x1d8)];logger['error'](logLabel,_0x3d7d1a,{'menu':_0x2545cd[_0x1afebc(0x1e9)]});throw new Error(_0x3d7d1a);}const _0xc3fdfe=await _0x248f89[_0x1afebc(0x1d6)]();if(!_0xc3fdfe[_0x1afebc(0x1ea)]){const _0x59b4b2=_0x1afebc(0x1f1)+(_0xc3fdfe[_0x1afebc(0x1e7)]||_0x1afebc(0x1f9));logger[_0x1afebc(0x1f2)](logLabel,_0x59b4b2,{'errorCode':_0xc3fdfe['errorCode'],'errorMsg':_0xc3fdfe['errorMsg'],'menu':_0x2545cd[_0x1afebc(0x1e9)]});throw new Error(_0x59b4b2);}logger['info'](logLabel,_0x1afebc(0x1e3)+_0x2545cd['label'],_0xc3fdfe[_0x1afebc(0x1e6)]);}
1
+ function a21_0x1f4f(){const _0x314100=['main','菜单资源同步成功:\x20','7087531hbFXKk','resources','/smartapi/menu/update','errorCode','11204TPeHKA','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','4281250HBJjOs','data','6VfbGlJ','error','未知错误','appcode','success','label','7507955svGtGC','未提供应用AppCode,且配置中也没有默认值','sdk-demo','stringify','update-menu-cdn-url','6QmdzwY','3OMNTFP','更新菜单资源失败:\x20','status','json','5045104QQcmnk','POST','8gigNJQ','errorMsg','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','log','info','133524mxIjGL','4647025LPEnST'];a21_0x1f4f=function(){return _0x314100;};return a21_0x1f4f();}const a21_0xaec8c8=a21_0x1360;function a21_0x1360(_0x65b6b0,_0x203a89){const _0x1f4f4e=a21_0x1f4f();return a21_0x1360=function(_0x1360cc,_0x4ae1b5){_0x1360cc=_0x1360cc-0x19e;let _0x2a4d40=_0x1f4f4e[_0x1360cc];return _0x2a4d40;},a21_0x1360(_0x65b6b0,_0x203a89);}(function(_0x3ae5ed,_0x412d32){const _0x31c2af=a21_0x1360,_0x4043c4=_0x3ae5ed();while(!![]){try{const _0x4f74a1=-parseInt(_0x31c2af(0x1c0))/0x1*(parseInt(_0x31c2af(0x1a1))/0x2)+parseInt(_0x31c2af(0x1ad))/0x3*(-parseInt(_0x31c2af(0x1b1))/0x4)+-parseInt(_0x31c2af(0x1b9))/0x5*(-parseInt(_0x31c2af(0x1ac))/0x6)+-parseInt(_0x31c2af(0x1a7))/0x7*(-parseInt(_0x31c2af(0x1b3))/0x8)+-parseInt(_0x31c2af(0x1b8))/0x9+-parseInt(_0x31c2af(0x19f))/0xa+parseInt(_0x31c2af(0x1bc))/0xb;if(_0x4f74a1===_0x412d32)break;else _0x4043c4['push'](_0x4043c4['shift']());}catch(_0x2bb611){_0x4043c4['push'](_0x4043c4['shift']());}}}(a21_0x1f4f,0xddc9a));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig(),logLabel=a21_0xaec8c8(0x1ab);import.meta[a21_0xaec8c8(0x1ba)]&&updateMenuCdnUrl({'id':0xf41e,'label':'SdkDemo1','path':a21_0xaec8c8(0x1a9),'resources':['https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css']});export async function updateMenuCdnUrl(_0xb8edd9){const _0x3861e1=a21_0xaec8c8,_0x5811d5=config?.[_0x3861e1(0x1a4)];if(!_0x5811d5){const _0x3f58c8=_0x3861e1(0x1a8);logger['error'](logLabel,_0x3f58c8),console[_0x3861e1(0x1a2)]('×\x20'+_0x3f58c8),console[_0x3861e1(0x1b6)]('!\x20请使用以下方式之一:'),console[_0x3861e1(0x1b6)](_0x3861e1(0x19e)),console['log'](_0x3861e1(0x1b5));return;}logger[_0x3861e1(0x1b7)](logLabel,'正在更新菜单资源链接:\x20'+_0xb8edd9[_0x3861e1(0x1a6)]+'\x20('+_0xb8edd9['path']+')');const _0xf472ee={'id':_0xb8edd9['id'],'appCode':_0x5811d5,'extend':{'loadScriptMode':'import','resources':_0xb8edd9['resources']?JSON[_0x3861e1(0x1aa)](_0xb8edd9[_0x3861e1(0x1bd)]):undefined}},_0x178b2e=await fetch(getApiDomain()+_0x3861e1(0x1be),{'method':_0x3861e1(0x1b2),'body':JSON['stringify'](_0xf472ee),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x178b2e['ok']){if(_0x178b2e[_0x3861e1(0x1af)]===0x191){const _0x49e697='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger['error'](logLabel,_0x49e697,{'status':_0x178b2e[_0x3861e1(0x1af)],'menu':_0xb8edd9[_0x3861e1(0x1a6)]});throw new Error(_0x49e697);}const _0xce9805='创建菜单失败,HTTP状态码:\x20'+_0x178b2e[_0x3861e1(0x1af)];logger['error'](logLabel,_0xce9805,{'menu':_0xb8edd9[_0x3861e1(0x1a6)]});throw new Error(_0xce9805);}const _0x33b40d=await _0x178b2e[_0x3861e1(0x1b0)]();if(!_0x33b40d[_0x3861e1(0x1a5)]){const _0x29b5c7=_0x3861e1(0x1ae)+(_0x33b40d[_0x3861e1(0x1b4)]||_0x3861e1(0x1a3));logger[_0x3861e1(0x1a2)](logLabel,_0x29b5c7,{'errorCode':_0x33b40d[_0x3861e1(0x1bf)],'errorMsg':_0x33b40d[_0x3861e1(0x1b4)],'menu':_0xb8edd9[_0x3861e1(0x1a6)]});throw new Error(_0x29b5c7);}logger[_0x3861e1(0x1b7)](logLabel,_0x3861e1(0x1bb)+_0xb8edd9[_0x3861e1(0x1a6)],_0x33b40d[_0x3861e1(0x1a0)]);}
@@ -1 +1 @@
1
- (function(_0x55606c,_0x16f7d0){const _0xaf482f=a22_0x19f4,_0x3694ac=_0x55606c();while(!![]){try{const _0x22a490=-parseInt(_0xaf482f(0xe3))/0x1+parseInt(_0xaf482f(0xd4))/0x2+-parseInt(_0xaf482f(0xcf))/0x3*(parseInt(_0xaf482f(0xce))/0x4)+parseInt(_0xaf482f(0xe1))/0x5+parseInt(_0xaf482f(0xda))/0x6+-parseInt(_0xaf482f(0xd0))/0x7+-parseInt(_0xaf482f(0xdc))/0x8*(-parseInt(_0xaf482f(0xe2))/0x9);if(_0x22a490===_0x16f7d0)break;else _0x3694ac['push'](_0x3694ac['shift']());}catch(_0x28aa4f){_0x3694ac['push'](_0x3694ac['shift']());}}}(a22_0x5bd5,0x24ff6));function a22_0x5bd5(){const _0x395065=['713181kQehUS','return','按\x20“q”\x20退出。','*\x20登录成功!','349890XHXzCp','正在登录...\x20','column','log','请前往浏览器完成登录。','then','359154IQxhvz','√\x20当前为有效会话,无需重新登录。','48LBmPmn','green','gray','dots','finally','1383700ZqrWJv','313947TWPFvk','277069JCeQtr','16alZBJr','142761zfSjUJ'];a22_0x5bd5=function(){return _0x395065;};return a22_0x5bd5();}import{jsx as a22_0x5ee59a,jsxs as a22_0x67686e}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a22_0x33006e from'ink-spinner';function a22_0x19f4(_0x2ad941,_0x310984){const _0x5bd582=a22_0x5bd5();return a22_0x19f4=function(_0x19f42d,_0x460f31){_0x19f42d=_0x19f42d-0xce;let _0x4280e8=_0x5bd582[_0x19f42d];return _0x4280e8;},a22_0x19f4(_0x2ad941,_0x310984);}export function AuthServer(){const _0x3fc1dd=a22_0x19f4,{exit:_0x265492}=useApp(),[_0x53204c,_0x12f879]=useState(![]),[_0x5a8ba0,_0x22d8eb]=useState(!![]),[_0x9e6e79,_0x50de4b]=useState(![]),[_0x4e811b,_0x4bcffb]=useState(![]);useEffect(()=>{const _0x5c4c82=a22_0x19f4;getIsSessionValid()[_0x5c4c82(0xd9)](_0x12f879)[_0x5c4c82(0xe0)](()=>_0x22d8eb(![]));},[]),useEffect(()=>{const _0x31e20a=a22_0x19f4;!_0x5a8ba0&&_0x53204c&&(console['log'](_0x31e20a(0xdb)),_0x265492());},[_0x5a8ba0,_0x53204c,_0x265492]),useEffect(()=>{const _0x1ad25a=a22_0x19f4;_0x4e811b&&(console[_0x1ad25a(0xd7)](_0x1ad25a(0xd3)),_0x265492());},[_0x4e811b,_0x265492]),useInput((_0x47347f,_0x3173b1)=>{const _0xc2499b=a22_0x19f4;_0x3173b1[_0xc2499b(0xd1)]&&(_0x50de4b(!![]),authServer({'silent':!![]})[_0xc2499b(0xd9)](_0x38682c=>{_0x4bcffb(_0x38682c);})),_0x47347f==='q'&&_0x265492();});if(_0x5a8ba0)return null;if(_0x53204c||_0x4e811b)return null;return a22_0x5ee59a(Box,{'flexDirection':_0x3fc1dd(0xd6),'marginTop':0x1,'marginBottom':0x1,'children':_0x9e6e79?a22_0x67686e(Box,{'children':[a22_0x5ee59a(Box,{'width':'1'}),a22_0x67686e(Text,{'color':_0x3fc1dd(0xdd),'children':[a22_0x5ee59a(a22_0x33006e,{'type':_0x3fc1dd(0xdf)}),'\x20\x20']}),a22_0x5ee59a(Text,{'children':_0x3fc1dd(0xd5)}),a22_0x5ee59a(Text,{'color':_0x3fc1dd(0xde),'children':_0x3fc1dd(0xd8)})]}):a22_0x67686e(Box,{'children':[a22_0x5ee59a(Box,{'width':'1'}),a22_0x5ee59a(Text,{'children':'*\x20按回车开始登录。'}),a22_0x5ee59a(Text,{'color':_0x3fc1dd(0xde),'children':_0x3fc1dd(0xd2)})]})});}
1
+ (function(_0x2c54c2,_0x5f0a21){const _0x5122da=a22_0x34da,_0x714a91=_0x2c54c2();while(!![]){try{const _0x149abb=-parseInt(_0x5122da(0x1bb))/0x1+parseInt(_0x5122da(0x1b4))/0x2+-parseInt(_0x5122da(0x1c0))/0x3*(-parseInt(_0x5122da(0x1b0))/0x4)+-parseInt(_0x5122da(0x1b8))/0x5+parseInt(_0x5122da(0x1b5))/0x6+-parseInt(_0x5122da(0x1bc))/0x7*(-parseInt(_0x5122da(0x1b7))/0x8)+parseInt(_0x5122da(0x1b1))/0x9*(-parseInt(_0x5122da(0x1b3))/0xa);if(_0x149abb===_0x5f0a21)break;else _0x714a91['push'](_0x714a91['shift']());}catch(_0x41907e){_0x714a91['push'](_0x714a91['shift']());}}}(a22_0x4b82,0xbdca1));import{jsx as a22_0x22c608,jsxs as a22_0x4dc669}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';function a22_0x34da(_0x3d9662,_0x4cc026){const _0x4b8224=a22_0x4b82();return a22_0x34da=function(_0x34daee,_0x5dedd8){_0x34daee=_0x34daee-0x1ad;let _0x17a770=_0x4b8224[_0x34daee];return _0x17a770;},a22_0x34da(_0x3d9662,_0x4cc026);}import{getIsSessionValid}from'./is-session-valid.js';function a22_0x4b82(){const _0x279778=['3151638QtOZGP','*\x20按回车开始登录。','40vfDUxM','1719224uxUEFS','8449770gYhlkN','√\x20当前为有效会话,无需重新登录。','8AXpbhc','4833250CslGgc','finally','dots','176984LeOAHc','4636891GDJnTz','log','return','正在登录...\x20','167751BtJykQ','then','column','请前往浏览器完成登录。','28nlPGIQ'];a22_0x4b82=function(){return _0x279778;};return a22_0x4b82();}import{authServer}from'./auth-server.js';import a22_0xdad064 from'ink-spinner';export function AuthServer(){const _0x26e70d=a22_0x34da,{exit:_0x34825a}=useApp(),[_0x1c6468,_0x30fae7]=useState(![]),[_0x5d5494,_0x2e478e]=useState(!![]),[_0x4e256a,_0x18d3a0]=useState(![]),[_0x591603,_0x2522c8]=useState(![]);useEffect(()=>{const _0x53316c=a22_0x34da;getIsSessionValid()['then'](_0x30fae7)[_0x53316c(0x1b9)](()=>_0x2e478e(![]));},[]),useEffect(()=>{const _0x3ddf77=a22_0x34da;!_0x5d5494&&_0x1c6468&&(console[_0x3ddf77(0x1bd)](_0x3ddf77(0x1b6)),_0x34825a());},[_0x5d5494,_0x1c6468,_0x34825a]),useEffect(()=>{const _0x31e468=a22_0x34da;_0x591603&&(console[_0x31e468(0x1bd)]('*\x20登录成功!'),_0x34825a());},[_0x591603,_0x34825a]),useInput((_0x5796d4,_0x2a6304)=>{const _0x28c5fd=a22_0x34da;_0x2a6304[_0x28c5fd(0x1be)]&&(_0x18d3a0(!![]),authServer({'silent':!![]})[_0x28c5fd(0x1ad)](_0x2f693d=>{_0x2522c8(_0x2f693d);})),_0x5796d4==='q'&&_0x34825a();});if(_0x5d5494)return null;if(_0x1c6468||_0x591603)return null;return a22_0x22c608(Box,{'flexDirection':_0x26e70d(0x1ae),'marginTop':0x1,'marginBottom':0x1,'children':_0x4e256a?a22_0x4dc669(Box,{'children':[a22_0x22c608(Box,{'width':'1'}),a22_0x4dc669(Text,{'color':'green','children':[a22_0x22c608(a22_0xdad064,{'type':_0x26e70d(0x1ba)}),'\x20\x20']}),a22_0x22c608(Text,{'children':_0x26e70d(0x1bf)}),a22_0x22c608(Text,{'color':'gray','children':_0x26e70d(0x1af)})]}):a22_0x4dc669(Box,{'children':[a22_0x22c608(Box,{'width':'1'}),a22_0x22c608(Text,{'children':_0x26e70d(0x1b2)}),a22_0x22c608(Text,{'color':'gray','children':'按\x20“q”\x20退出。'})]})});}
@@ -1 +1 @@
1
- const a23_0x3dedf2=a23_0x5b3b;(function(_0x114c2f,_0x10c82f){const _0x43bf30=a23_0x5b3b,_0x23265e=_0x114c2f();while(!![]){try{const _0x15b42f=-parseInt(_0x43bf30(0xdc))/0x1+-parseInt(_0x43bf30(0xea))/0x2*(-parseInt(_0x43bf30(0xe0))/0x3)+parseInt(_0x43bf30(0xd0))/0x4+-parseInt(_0x43bf30(0xd6))/0x5+-parseInt(_0x43bf30(0xcb))/0x6+-parseInt(_0x43bf30(0xe9))/0x7*(parseInt(_0x43bf30(0xdb))/0x8)+parseInt(_0x43bf30(0xd7))/0x9;if(_0x15b42f===_0x10c82f)break;else _0x23265e['push'](_0x23265e['shift']());}catch(_0xa6f562){_0x23265e['push'](_0x23265e['shift']());}}}(a23_0x716d,0x8e9fd));import{writeFileSync}from'node:fs';import a23_0x547f5d from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';function a23_0x716d(){const _0x3d9d4b=['utf-8','⚠️\x20\x20无法自动打开浏览器','silent','Auth\x20server\x20error:','/sign-in?redirect=','main','object','/api/auth/get-session','5643984cWFZyR','writeHead','session','win32','end','430780OBSEto','🔗\x20请手动复制登录地址到浏览器:','close','port','then','open\x20\x22','3663655Ghryjb','25025886zltZcn','https://dev.lovrabet.com:','address','🔐\x20正在启动登录服务...','1072ViKRUg','1009215tHeTel','user','https://g.yuntooai.com/cert/lovrabet-dev.json','xdg-open\x20\x22','2478IWGrTr','text/html;\x20charset=utf-8','log','cookie','json','catch','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','127.0.0.1','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>登录成功</title></head>\x0a<body>\x0a\x20\x20<div>登录成功,请返回命令行继续操作。当前窗口将在\x20<span\x20id=\x22t\x22>5</span>\x20秒内关闭。</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>无法自动关闭窗口,请手动关闭此标签页或窗口。</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','4739EzxaNO','1136IqVVIJ','darwin'];a23_0x716d=function(){return _0x3d9d4b;};return a23_0x716d();}function a23_0x5b3b(_0x1d92ea,_0x3c8610){const _0x716da2=a23_0x716d();return a23_0x5b3b=function(_0x5b3b,_0xe18a9f){_0x5b3b=_0x5b3b-0xca;let _0x352436=_0x716da2[_0x5b3b];return _0x352436;},a23_0x5b3b(_0x1d92ea,_0x3c8610);}export async function authServer(_0x411161){const _0x55e778=a23_0x5b3b,_0x45c728=_0x411161?.[_0x55e778(0xee)]||![];if(await getIsSessionValid())return!![];const _0x2982c2=await(await fetch(_0x55e778(0xde)))[_0x55e778(0xe4)]();return new Promise(async(_0x106099,_0x13a354)=>{const _0x35f3c7=_0x55e778;let _0x8aab99=0x0;const _0x5a1811=a23_0x547f5d['createServer'](_0x2982c2,async(_0x344855,_0x4a70a4)=>{const _0x20bac0=a23_0x5b3b,_0x13d5aa=getUserDomain(),_0x35198e=_0x344855['headers'][_0x20bac0(0xe3)]||'',_0x2e5da2=await fetch(_0x13d5aa+_0x20bac0(0xca),{'headers':{'cookie':_0x35198e}})[_0x20bac0(0xd4)](_0x2e89b8=>_0x2e89b8[_0x20bac0(0xe4)]()),_0x43d547=_0x2e5da2&&_0x2e5da2[_0x20bac0(0xcd)]&&_0x2e5da2[_0x20bac0(0xdd)];if(_0x43d547){writeFileSync(cookieFile,_0x35198e,_0x20bac0(0xec)),_0x106099(!![]);const _0x28e575=_0x20bac0(0xe8);_0x4a70a4[_0x20bac0(0xcc)](0xc8,{'Content-Type':_0x20bac0(0xe1)}),_0x4a70a4[_0x20bac0(0xcf)](_0x28e575),_0x5a1811[_0x20bac0(0xd2)]();}else{const _0x57b3ad=''+encodeURIComponent(_0x20bac0(0xd8)+_0x8aab99);_0x4a70a4['writeHead'](0x12e,{'location':_0x13d5aa+_0x20bac0(0xf0)+_0x57b3ad}),_0x4a70a4[_0x20bac0(0xcf)]();return;}});_0x5a1811['listen'](0x0,_0x35f3c7(0xe7),()=>{const _0x200180=_0x35f3c7,_0x429e71=_0x5a1811[_0x200180(0xd9)]();_0x8aab99=typeof _0x429e71===_0x200180(0xf2)&&_0x429e71?_0x429e71[_0x200180(0xd3)]:Number(_0x429e71);const _0xf8ba52=_0x200180(0xd8)+_0x8aab99;!_0x45c728&&(console[_0x200180(0xe2)](_0x200180(0xda)),console[_0x200180(0xe2)]('📍\x20登录地址:',_0xf8ba52),console['log']('🌐\x20正在尝试自动打开浏览器...'),console[_0x200180(0xe2)](''),console[_0x200180(0xe2)](_0x200180(0xe6)),console[_0x200180(0xe2)]('')),openInBrowser(_0xf8ba52)[_0x200180(0xd4)](_0x26bd08=>{const _0x2484e7=_0x200180;!_0x45c728&&(_0x26bd08?console[_0x2484e7(0xe2)]('✅\x20浏览器已自动打开,请在浏览器中完成登录'):(console['log']('⚠️\x20\x20无法自动打开浏览器'),console[_0x2484e7(0xe2)](_0x2484e7(0xd1),_0xf8ba52)),console[_0x2484e7(0xe2)](''));})[_0x200180(0xe5)](()=>{const _0x2069da=_0x200180;!_0x45c728&&(console[_0x2069da(0xe2)](_0x2069da(0xed)),console['log']('🔗\x20请手动复制登录地址到浏览器:',_0xf8ba52),console[_0x2069da(0xe2)](''));});}),_0x5a1811['on']('error',_0x5add58=>{const _0x905bba=_0x35f3c7;!_0x45c728&&console['error'](_0x905bba(0xef),_0x5add58),_0x13a354(_0x5add58);});});}function openInBrowser(_0x2b1b9d){return new Promise(_0x41d942=>{const _0x304764=a23_0x5b3b,_0x141792=process['platform'];let _0x4e1750;if(_0x141792===_0x304764(0xce))_0x4e1750='start\x20\x22\x22\x20\x22'+_0x2b1b9d+'\x22';else _0x141792===_0x304764(0xeb)?_0x4e1750=_0x304764(0xd5)+_0x2b1b9d+'\x22':_0x4e1750=_0x304764(0xdf)+_0x2b1b9d+'\x22';exec(_0x4e1750,_0x577e57=>{_0x577e57?_0x41d942(![]):_0x41d942(!![]);});});}if(import.meta[a23_0x3dedf2(0xf1)]){const isAuth=await authServer();console[a23_0x3dedf2(0xe2)]('isAuth',isAuth);}
1
+ const a23_0x45a5ed=a23_0x140a;function a23_0x140a(_0x3b1326,_0x2513eb){const _0x148e72=a23_0x148e();return a23_0x140a=function(_0x140a93,_0x733610){_0x140a93=_0x140a93-0xc8;let _0x5e575b=_0x148e72[_0x140a93];return _0x5e575b;},a23_0x140a(_0x3b1326,_0x2513eb);}(function(_0x153a89,_0x5da6c0){const _0x346d33=a23_0x140a,_0x1d40a6=_0x153a89();while(!![]){try{const _0x459192=parseInt(_0x346d33(0xda))/0x1*(parseInt(_0x346d33(0xdf))/0x2)+-parseInt(_0x346d33(0xd9))/0x3+-parseInt(_0x346d33(0xe8))/0x4+-parseInt(_0x346d33(0xd5))/0x5*(parseInt(_0x346d33(0xf0))/0x6)+-parseInt(_0x346d33(0xdb))/0x7+parseInt(_0x346d33(0xcc))/0x8*(parseInt(_0x346d33(0xe7))/0x9)+parseInt(_0x346d33(0xec))/0xa;if(_0x459192===_0x5da6c0)break;else _0x1d40a6['push'](_0x1d40a6['shift']());}catch(_0x26ad0f){_0x1d40a6['push'](_0x1d40a6['shift']());}}}(a23_0x148e,0xcb775));import{writeFileSync}from'node:fs';import a23_0x58cb2f from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';function a23_0x148e(){const _0x5d9d39=['error','start\x20\x22\x22\x20\x22','then','platform','darwin','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','open\x20\x22','1708947xjCwOG','1086240kheZvu','createServer','https://dev.lovrabet.com:','close','29243060mLqxRi','silent','utf-8','log','8746926dIGAPe','user','json','main','end','isAuth','8yOpkpk','🔗\x20请手动复制登录地址到浏览器:','⚠️\x20\x20无法自动打开浏览器','address','/sign-in?redirect=','https://g.yuntooai.com/cert/lovrabet-dev.json','win32','session','listen','5bAeXGi','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>登录成功</title></head>\x0a<body>\x0a\x20\x20<div>登录成功,请返回命令行继续操作。当前窗口将在\x20<span\x20id=\x22t\x22>5</span>\x20秒内关闭。</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>无法自动关闭窗口,请手动关闭此标签页或窗口。</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','port','catch','1264047bWqrVI','26192JKBTyF','2560530lPEgsc','📍\x20登录地址:','writeHead','✅\x20浏览器已自动打开,请在浏览器中完成登录','18iLCTZo'];a23_0x148e=function(){return _0x5d9d39;};return a23_0x148e();}export async function authServer(_0x47c2fd){const _0x5b113b=a23_0x140a,_0x3d25fe=_0x47c2fd?.[_0x5b113b(0xed)]||![];if(await getIsSessionValid())return!![];const _0x1b9a96=await(await fetch(_0x5b113b(0xd1)))[_0x5b113b(0xc8)]();return new Promise(async(_0x3b38d6,_0x11f430)=>{const _0x14e17b=_0x5b113b;let _0x1ae35c=0x0;const _0x1e5d8c=a23_0x58cb2f[_0x14e17b(0xe9)](_0x1b9a96,async(_0x2f03e9,_0x844135)=>{const _0x4cb596=_0x14e17b,_0x234c75=getUserDomain(),_0x3d8276=_0x2f03e9['headers']['cookie']||'',_0x33c07c=await fetch(_0x234c75+'/api/auth/get-session',{'headers':{'cookie':_0x3d8276}})[_0x4cb596(0xe2)](_0x2dd1da=>_0x2dd1da[_0x4cb596(0xc8)]()),_0x2af79f=_0x33c07c&&_0x33c07c[_0x4cb596(0xd3)]&&_0x33c07c[_0x4cb596(0xf1)];if(_0x2af79f){writeFileSync(cookieFile,_0x3d8276,_0x4cb596(0xee)),_0x3b38d6(!![]);const _0x1b3133=_0x4cb596(0xd6);_0x844135[_0x4cb596(0xdd)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x844135[_0x4cb596(0xca)](_0x1b3133),_0x1e5d8c[_0x4cb596(0xeb)]();}else{const _0xc1b41=''+encodeURIComponent(_0x4cb596(0xea)+_0x1ae35c);_0x844135[_0x4cb596(0xdd)](0x12e,{'location':_0x234c75+_0x4cb596(0xd0)+_0xc1b41}),_0x844135[_0x4cb596(0xca)]();return;}});_0x1e5d8c[_0x14e17b(0xd4)](0x0,'127.0.0.1',()=>{const _0x598b6=_0x14e17b,_0x530dd5=_0x1e5d8c[_0x598b6(0xcf)]();_0x1ae35c=typeof _0x530dd5==='object'&&_0x530dd5?_0x530dd5[_0x598b6(0xd7)]:Number(_0x530dd5);const _0xd51964=_0x598b6(0xea)+_0x1ae35c;!_0x3d25fe&&(console[_0x598b6(0xef)]('🔐\x20正在启动登录服务...'),console[_0x598b6(0xef)](_0x598b6(0xdc),_0xd51964),console['log']('🌐\x20正在尝试自动打开浏览器...'),console[_0x598b6(0xef)](''),console['log'](_0x598b6(0xe5)),console[_0x598b6(0xef)]('')),openInBrowser(_0xd51964)[_0x598b6(0xe2)](_0x574af3=>{const _0x56d291=_0x598b6;!_0x3d25fe&&(_0x574af3?console[_0x56d291(0xef)](_0x56d291(0xde)):(console[_0x56d291(0xef)]('⚠️\x20\x20无法自动打开浏览器'),console[_0x56d291(0xef)](_0x56d291(0xcd),_0xd51964)),console[_0x56d291(0xef)](''));})[_0x598b6(0xd8)](()=>{const _0x24d17d=_0x598b6;!_0x3d25fe&&(console[_0x24d17d(0xef)](_0x24d17d(0xce)),console[_0x24d17d(0xef)](_0x24d17d(0xcd),_0xd51964),console[_0x24d17d(0xef)](''));});}),_0x1e5d8c['on'](_0x14e17b(0xe0),_0x4b4f07=>{const _0x1f7c9c=_0x14e17b;!_0x3d25fe&&console[_0x1f7c9c(0xe0)]('Auth\x20server\x20error:',_0x4b4f07),_0x11f430(_0x4b4f07);});});}function openInBrowser(_0x2f8b3b){return new Promise(_0x2a9f3c=>{const _0x2ee45d=a23_0x140a,_0xce3b12=process[_0x2ee45d(0xe3)];let _0x837cfa;if(_0xce3b12===_0x2ee45d(0xd2))_0x837cfa=_0x2ee45d(0xe1)+_0x2f8b3b+'\x22';else _0xce3b12===_0x2ee45d(0xe4)?_0x837cfa=_0x2ee45d(0xe6)+_0x2f8b3b+'\x22':_0x837cfa='xdg-open\x20\x22'+_0x2f8b3b+'\x22';exec(_0x837cfa,_0x3ab69c=>{_0x3ab69c?_0x2a9f3c(![]):_0x2a9f3c(!![]);});});}if(import.meta[a23_0x45a5ed(0xc9)]){const isAuth=await authServer();console[a23_0x45a5ed(0xef)](a23_0x45a5ed(0xcb),isAuth);}
@@ -1 +1 @@
1
- const a24_0x5d1a5e=a24_0x1a58;(function(_0x92a1c7,_0x3d29a6){const _0x4e3075=a24_0x1a58,_0x37578c=_0x92a1c7();while(!![]){try{const _0x3f3be6=parseInt(_0x4e3075(0x1e0))/0x1+parseInt(_0x4e3075(0x1e6))/0x2*(parseInt(_0x4e3075(0x1e3))/0x3)+parseInt(_0x4e3075(0x1dd))/0x4*(parseInt(_0x4e3075(0x1df))/0x5)+parseInt(_0x4e3075(0x1e2))/0x6+-parseInt(_0x4e3075(0x1de))/0x7*(parseInt(_0x4e3075(0x1e4))/0x8)+-parseInt(_0x4e3075(0x1e5))/0x9+-parseInt(_0x4e3075(0x1e8))/0xa*(parseInt(_0x4e3075(0x1e1))/0xb);if(_0x3f3be6===_0x3d29a6)break;else _0x37578c['push'](_0x37578c['shift']());}catch(_0x14b0e3){_0x37578c['push'](_0x37578c['shift']());}}}(a24_0x5363,0x4412d));import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+a24_0x5d1a5e(0x1e7);function a24_0x5363(){const _0x428922=['/.lovrabet','4390200PCsXKE','/cookie','5036KUXoot','455zvdotg','1370FSlgTk','208856wBGJXI','11iKTauM','2671686BRATtP','93090lWlsFi','32392SiKpVD','1838241YTemFb','12OJZnPW'];a24_0x5363=function(){return _0x428922;};return a24_0x5363();}function a24_0x1a58(_0x4b3743,_0x411f92){const _0x5363e4=a24_0x5363();return a24_0x1a58=function(_0x1a58e8,_0x37f3cf){_0x1a58e8=_0x1a58e8-0x1dc;let _0x14a80e=_0x5363e4[_0x1a58e8];return _0x14a80e;},a24_0x1a58(_0x4b3743,_0x411f92);}export const cookieFile=configDir+a24_0x5d1a5e(0x1dc);mkdirSync(configDir,{'recursive':!![]});
1
+ function a24_0x4e30(_0xaaab6a,_0x1844f7){const _0x3f9317=a24_0x3f93();return a24_0x4e30=function(_0x4e30e0,_0x334277){_0x4e30e0=_0x4e30e0-0x1ab;let _0x11bd1c=_0x3f9317[_0x4e30e0];return _0x11bd1c;},a24_0x4e30(_0xaaab6a,_0x1844f7);}const a24_0x18de4a=a24_0x4e30;(function(_0x5b3c9c,_0x240c8f){const _0x297b33=a24_0x4e30,_0x335b7f=_0x5b3c9c();while(!![]){try{const _0x58cc64=parseInt(_0x297b33(0x1b2))/0x1*(parseInt(_0x297b33(0x1b4))/0x2)+-parseInt(_0x297b33(0x1af))/0x3+parseInt(_0x297b33(0x1ae))/0x4+parseInt(_0x297b33(0x1b5))/0x5*(-parseInt(_0x297b33(0x1ab))/0x6)+-parseInt(_0x297b33(0x1b6))/0x7*(parseInt(_0x297b33(0x1b1))/0x8)+-parseInt(_0x297b33(0x1ad))/0x9+-parseInt(_0x297b33(0x1b3))/0xa*(-parseInt(_0x297b33(0x1ac))/0xb);if(_0x58cc64===_0x240c8f)break;else _0x335b7f['push'](_0x335b7f['shift']());}catch(_0x515df6){_0x335b7f['push'](_0x335b7f['shift']());}}}(a24_0x3f93,0xb1f05));import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+a24_0x18de4a(0x1b0);export const cookieFile=configDir+'/cookie';function a24_0x3f93(){const _0x3e4436=['2311VujGSF','50wgxhjW','526pkMlrN','880BcSkZH','1918rkqtuv','2022EOXbRw','5221447KLMcsq','11104515dEXqmn','1892804XcJcOD','1687335GvyqhN','/.lovrabet','25400McuPty'];a24_0x3f93=function(){return _0x3e4436;};return a24_0x3f93();}mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- (function(_0x3e8e09,_0x285c28){var _0x353aba=a25_0x11c9,_0x4615d7=_0x3e8e09();while(!![]){try{var _0x5c0757=parseInt(_0x353aba(0x179))/0x1*(parseInt(_0x353aba(0x17d))/0x2)+parseInt(_0x353aba(0x17b))/0x3+parseInt(_0x353aba(0x177))/0x4*(-parseInt(_0x353aba(0x17a))/0x5)+-parseInt(_0x353aba(0x176))/0x6+-parseInt(_0x353aba(0x17c))/0x7+-parseInt(_0x353aba(0x17f))/0x8*(-parseInt(_0x353aba(0x175))/0x9)+-parseInt(_0x353aba(0x178))/0xa*(-parseInt(_0x353aba(0x17e))/0xb);if(_0x5c0757===_0x285c28)break;else _0x4615d7['push'](_0x4615d7['shift']());}catch(_0xcf7728){_0x4615d7['push'](_0x4615d7['shift']());}}}(a25_0x4a5f,0x8f09d));function a25_0x4a5f(){var _0x54194b=['178OYHBKA','5128618RUHyGR','1216NrgIZK','utf-8','24597DqwNnA','1716762xFkqia','4BKCtUs','40xCNEwl','5257zaSpXE','4919245MOttPd','517920zuPYob','7455140BhzKnj'];a25_0x4a5f=function(){return _0x54194b;};return a25_0x4a5f();}function a25_0x11c9(_0x4fd76e,_0x5b036e){var _0x4a5fb8=a25_0x4a5f();return a25_0x11c9=function(_0x11c992,_0x4dc669){_0x11c992=_0x11c992-0x175;var _0x53cd68=_0x4a5fb8[_0x11c992];return _0x53cd68;},a25_0x11c9(_0x4fd76e,_0x5b036e);}import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0xc6d167=a25_0x11c9;try{return readFileSync(cookieFile,_0xc6d167(0x180));}catch{}return'';}
1
+ function a25_0x3495(_0x2103d5,_0x18b3d9){var _0x54242e=a25_0x5424();return a25_0x3495=function(_0x3495a1,_0x27b0e3){_0x3495a1=_0x3495a1-0xea;var _0xf0a6=_0x54242e[_0x3495a1];return _0xf0a6;},a25_0x3495(_0x2103d5,_0x18b3d9);}(function(_0x57eae5,_0x397303){var _0x5ca8a0=a25_0x3495,_0x3f2d5d=_0x57eae5();while(!![]){try{var _0x46abfa=parseInt(_0x5ca8a0(0xf3))/0x1+-parseInt(_0x5ca8a0(0xea))/0x2*(-parseInt(_0x5ca8a0(0xf5))/0x3)+-parseInt(_0x5ca8a0(0xec))/0x4+parseInt(_0x5ca8a0(0xee))/0x5*(parseInt(_0x5ca8a0(0xef))/0x6)+parseInt(_0x5ca8a0(0xf2))/0x7*(parseInt(_0x5ca8a0(0xed))/0x8)+parseInt(_0x5ca8a0(0xf4))/0x9*(-parseInt(_0x5ca8a0(0xeb))/0xa)+-parseInt(_0x5ca8a0(0xf0))/0xb*(-parseInt(_0x5ca8a0(0xf1))/0xc);if(_0x46abfa===_0x397303)break;else _0x3f2d5d['push'](_0x3f2d5d['shift']());}catch(_0x3556d2){_0x3f2d5d['push'](_0x3f2d5d['shift']());}}}(a25_0x5424,0x98150));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';function a25_0x5424(){var _0x4b24b0=['4013360xbuhHt','324328BpoMgr','70LktFYp','469698OFhxHq','169301fpbcug','708anvNqQ','35peLTdu','51702pARtet','2956977Isxmsq','72jWXNAJ','2078OikpbJ','20QGJhPP'];a25_0x5424=function(){return _0x4b24b0;};return a25_0x5424();}export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}
@@ -1 +1 @@
1
- (function(_0xbfdbb9,_0x3160ef){const _0x5334d3=a26_0x263a,_0x17232b=_0xbfdbb9();while(!![]){try{const _0x1e8d41=parseInt(_0x5334d3(0x1cc))/0x1+-parseInt(_0x5334d3(0x1cf))/0x2+parseInt(_0x5334d3(0x1cb))/0x3*(parseInt(_0x5334d3(0x1cd))/0x4)+-parseInt(_0x5334d3(0x1c7))/0x5+parseInt(_0x5334d3(0x1ce))/0x6+-parseInt(_0x5334d3(0x1d0))/0x7*(-parseInt(_0x5334d3(0x1ca))/0x8)+-parseInt(_0x5334d3(0x1c8))/0x9*(parseInt(_0x5334d3(0x1d1))/0xa);if(_0x1e8d41===_0x3160ef)break;else _0x17232b['push'](_0x17232b['shift']());}catch(_0x580641){_0x17232b['push'](_0x17232b['shift']());}}}(a26_0x1ffb,0xc295a));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x4e03e1=a26_0x263a;try{if(!existsSync(cookieFile))return![];const _0x4c0e3e=readFileSync(cookieFile,'utf-8'),_0x47dcdf=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x4c0e3e}})['then'](_0x3506fc=>_0x3506fc[_0x4e03e1(0x1c9)]());return _0x47dcdf&&_0x47dcdf['session']&&_0x47dcdf['user'];}catch{}return![];}function a26_0x263a(_0xe3f12c,_0x25586d){const _0x1ffb15=a26_0x1ffb();return a26_0x263a=function(_0x263a83,_0xb563ef){_0x263a83=_0x263a83-0x1c7;let _0xf01fb8=_0x1ffb15[_0x263a83];return _0xf01fb8;},a26_0x263a(_0xe3f12c,_0x25586d);}function a26_0x1ffb(){const _0x50e90c=['3FwPIDM','1018318OJWdfT','5916844ZTPNlu','2927508LZPpWv','472842pFBCKj','231IaouZv','11887150XhrvsS','4491645kjCSjQ','9DeKqLy','json','32736PnzuhC'];a26_0x1ffb=function(){return _0x50e90c;};return a26_0x1ffb();}
1
+ (function(_0x5225d2,_0x287700){const _0x236c9f=a26_0x2aaf,_0x8dd38c=_0x5225d2();while(!![]){try{const _0x31196e=parseInt(_0x236c9f(0xbf))/0x1+-parseInt(_0x236c9f(0xba))/0x2+parseInt(_0x236c9f(0xc6))/0x3*(parseInt(_0x236c9f(0xc4))/0x4)+-parseInt(_0x236c9f(0xc1))/0x5*(-parseInt(_0x236c9f(0xbb))/0x6)+parseInt(_0x236c9f(0xb9))/0x7+-parseInt(_0x236c9f(0xc8))/0x8*(parseInt(_0x236c9f(0xc3))/0x9)+parseInt(_0x236c9f(0xbc))/0xa*(-parseInt(_0x236c9f(0xc2))/0xb);if(_0x31196e===_0x287700)break;else _0x8dd38c['push'](_0x8dd38c['shift']());}catch(_0x3c731e){_0x8dd38c['push'](_0x8dd38c['shift']());}}}(a26_0x14b9,0x52726));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a26_0x2aaf(_0x5802ab,_0x26830d){const _0x14b956=a26_0x14b9();return a26_0x2aaf=function(_0x2aaf54,_0xf7e234){_0x2aaf54=_0x2aaf54-0xb9;let _0x23f22c=_0x14b956[_0x2aaf54];return _0x23f22c;},a26_0x2aaf(_0x5802ab,_0x26830d);}import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0xfa0688=a26_0x2aaf;try{if(!existsSync(cookieFile))return![];const _0x2e4e0c=readFileSync(cookieFile,_0xfa0688(0xc0)),_0x1a5d00=await fetch(getUserDomain()+_0xfa0688(0xbd),{'headers':{'cookie':_0x2e4e0c}})[_0xfa0688(0xbe)](_0x231dce=>_0x231dce['json']());return _0x1a5d00&&_0x1a5d00[_0xfa0688(0xc5)]&&_0x1a5d00[_0xfa0688(0xc7)];}catch{}return![];}function a26_0x14b9(){const _0x228838=['user','24kxBevi','4198866iFlVBq','853496oLvqgp','5250lgMsJz','1210BuXHsZ','/api/auth/get-session','then','603124GXQoKh','utf-8','2965DhjKrr','105446mvxNvS','210213HtbANx','4mtuuBb','session','817770cHujlm'];a26_0x14b9=function(){return _0x228838;};return a26_0x14b9();}
@@ -1 +1 @@
1
- function a27_0x4c69(){var _0x1470f8=['log','!\x20当前未登录','1417876fsrELN','1372902EeowHK','8253zMtLzE','2748087CcOrIU','382487JkcYHd','312ylROny','✓\x20已退出登录','450868ePcTwn','26nyrrld','30831AOYgJu','5wmwwZb','20MlkFWZ'];a27_0x4c69=function(){return _0x1470f8;};return a27_0x4c69();}(function(_0x43f385,_0x4495c9){var _0x55985a=a27_0x17ec,_0x29782c=_0x43f385();while(!![]){try{var _0x575b24=parseInt(_0x55985a(0x18f))/0x1+parseInt(_0x55985a(0x193))/0x2*(parseInt(_0x55985a(0x194))/0x3)+parseInt(_0x55985a(0x199))/0x4*(parseInt(_0x55985a(0x195))/0x5)+-parseInt(_0x55985a(0x19a))/0x6+parseInt(_0x55985a(0x19b))/0x7*(-parseInt(_0x55985a(0x190))/0x8)+-parseInt(_0x55985a(0x19c))/0x9+-parseInt(_0x55985a(0x196))/0xa*(parseInt(_0x55985a(0x192))/0xb);if(_0x575b24===_0x4495c9)break;else _0x29782c['push'](_0x29782c['shift']());}catch(_0x163d3b){_0x29782c['push'](_0x29782c['shift']());}}}(a27_0x4c69,0x32e38));import{unlinkSync,existsSync}from'node:fs';function a27_0x17ec(_0x332af9,_0x5a4c19){var _0x4c6992=a27_0x4c69();return a27_0x17ec=function(_0x17ec59,_0x49474e){_0x17ec59=_0x17ec59-0x18f;var _0x13da17=_0x4c6992[_0x17ec59];return _0x13da17;},a27_0x17ec(_0x332af9,_0x5a4c19);}import{cookieFile}from'./constant.js';export function logout(){var _0x3baa0b=a27_0x17ec;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x3baa0b(0x197)](_0x3baa0b(0x191))):console[_0x3baa0b(0x197)](_0x3baa0b(0x198));}
1
+ (function(_0x2c171c,_0x5cf49d){var _0x1e7eca=a27_0x2605,_0x25969d=_0x2c171c();while(!![]){try{var _0x1d9d05=parseInt(_0x1e7eca(0x93))/0x1+-parseInt(_0x1e7eca(0x92))/0x2+parseInt(_0x1e7eca(0x95))/0x3+parseInt(_0x1e7eca(0x91))/0x4+parseInt(_0x1e7eca(0x94))/0x5+parseInt(_0x1e7eca(0x8f))/0x6*(-parseInt(_0x1e7eca(0x96))/0x7)+-parseInt(_0x1e7eca(0x90))/0x8;if(_0x1d9d05===_0x5cf49d)break;else _0x25969d['push'](_0x25969d['shift']());}catch(_0x25972a){_0x25969d['push'](_0x25969d['shift']());}}}(a27_0x177e,0xaa040));function a27_0x177e(){var _0x3bb792=['433578lMtiQo','20615ncIlvR','log','!\x20当前未登录','✓\x20已退出登录','2130JuSiqr','8002416FZLxkG','5493140AcPiNK','2284142EichiV','1178899lrKZiK','5937610OzBxfW'];a27_0x177e=function(){return _0x3bb792;};return a27_0x177e();}import{unlinkSync,existsSync}from'node:fs';function a27_0x2605(_0x39497c,_0xde4cee){var _0x177e72=a27_0x177e();return a27_0x2605=function(_0x26055b,_0x2f889b){_0x26055b=_0x26055b-0x8f;var _0x4adf8f=_0x177e72[_0x26055b];return _0x4adf8f;},a27_0x2605(_0x39497c,_0xde4cee);}import{cookieFile}from'./constant.js';export function logout(){var _0x51aca5=a27_0x2605;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x51aca5(0x97)](_0x51aca5(0x99))):console[_0x51aca5(0x97)](_0x51aca5(0x98));}
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a28_0x18c25a=a28_0x33f0;function a28_0x4b85(){const _0x456273=['add-page','执行添加页面命令','执行预览命令','3227xJfAse','执行初始化配置命令','env','boolean','preview','14292289sSwDkT','执行启动命令','logout','cwd','189AKWLhW','start','6272yetENa','885489EsjhwS','12SnFNxr','auth','205xSdVaq','build','\x20(监听模式)','exit','join','23154vRBmDJ','config','info','549299nejZSy','add','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20cdn\x20sync\x20--version\x201.0.0\x20\x20//\x20同步菜单\x20CDN\x20资源版本\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20配置\x20Cursor\x20的\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','执行构建命令','logs','sync','api','input','cdn','flags','lovrabet\x20','appcode','setLogPath','error','create','string','watch','trim','mcp','version','init','setRawCommand','2txeyuu','93740gjzFdh','2021200RRgfSS'];a28_0x4b85=function(){return _0x456273;};return a28_0x4b85();}(function(_0x1a3541,_0xca553e){const _0x57e4b4=a28_0x33f0,_0x3f09b1=_0x1a3541();while(!![]){try{const _0x5935e3=-parseInt(_0x57e4b4(0x18a))/0x1+parseInt(_0x57e4b4(0x16d))/0x2*(-parseInt(_0x57e4b4(0x17f))/0x3)+-parseInt(_0x57e4b4(0x16f))/0x4+-parseInt(_0x57e4b4(0x182))/0x5*(parseInt(_0x57e4b4(0x187))/0x6)+parseInt(_0x57e4b4(0x173))/0x7*(parseInt(_0x57e4b4(0x17e))/0x8)+-parseInt(_0x57e4b4(0x17c))/0x9*(-parseInt(_0x57e4b4(0x16e))/0xa)+-parseInt(_0x57e4b4(0x178))/0xb*(-parseInt(_0x57e4b4(0x180))/0xc);if(_0x5935e3===_0xca553e)break;else _0x3f09b1['push'](_0x3f09b1['shift']());}catch(_0x50693d){_0x3f09b1['push'](_0x3f09b1['shift']());}}}(a28_0x4b85,0x5559c));import{jsx as a28_0x4051fa}from'react/jsx-runtime';import a28_0x10e952 from'meow';function a28_0x33f0(_0x11b733,_0x594131){const _0x4b8576=a28_0x4b85();return a28_0x33f0=function(_0x33f0e8,_0x10d7de){_0x33f0e8=_0x33f0e8-0x168;let _0x59fd76=_0x4b8576[_0x33f0e8];return _0x59fd76;},a28_0x33f0(_0x11b733,_0x594131);}import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';import{AppMenuSyncCdnVersionUI}from'./app-menu-cdn-version/app-menu-sync-cdn-version-ui.js';const cli=a28_0x10e952(a28_0x18c25a(0x18c),{'importMeta':import.meta,'flags':{'name':{'type':'string'},'clear':{'type':a28_0x18c25a(0x176)},'env':{'type':'string'},'watch':{'type':a28_0x18c25a(0x176)},'help':{'type':a28_0x18c25a(0x176)},'appcode':{'type':a28_0x18c25a(0x199)},'output':{'type':a28_0x18c25a(0x199)},'params':{'type':'string'},'datasetcode':{'type':a28_0x18c25a(0x199)},'version':{'type':'string'}}});await run();async function run(){const _0x1a3195=a28_0x18c25a,_0x43136a=cli[_0x1a3195(0x191)][0x0],_0x29d97e=cli['input'][0x1],_0x80a575=cli[_0x1a3195(0x191)][0x2],_0x147b2d=(_0x1a3195(0x194)+process['argv']['slice'](0x2)[_0x1a3195(0x186)]('\x20'))[_0x1a3195(0x168)]();logger[_0x1a3195(0x16c)](_0x147b2d);switch(_0x43136a){case _0x1a3195(0x16b):{const _0x221745=cli[_0x1a3195(0x193)][_0x1a3195(0x195)],_0x5300c2=cli[_0x1a3195(0x193)][_0x1a3195(0x175)];logger[_0x1a3195(0x196)](process['cwd']()),logger[_0x1a3195(0x189)](_0x1a3195(0x16b),_0x1a3195(0x174)),render(a28_0x4051fa(Init,{'appcode':_0x221745,'env':_0x5300c2}));break;}case _0x1a3195(0x198):{const _0x41dfb6=cli[_0x1a3195(0x191)][0x1]?.[_0x1a3195(0x168)](),_0x3d758a=cli[_0x1a3195(0x193)][_0x1a3195(0x175)];render(a28_0x4051fa(CreateApp,{'projectCode':_0x41dfb6,'env':_0x3d758a}));break;}case _0x1a3195(0x18b):{cli[_0x1a3195(0x191)][0x1]==='page'&&(logger[_0x1a3195(0x196)](process['cwd']()),logger[_0x1a3195(0x189)](_0x1a3195(0x170),_0x1a3195(0x171)),render(a28_0x4051fa(AddPage,{})));break;}case _0x1a3195(0x17d):{try{logger[_0x1a3195(0x196)](process['cwd']()),logger[_0x1a3195(0x189)]('start',_0x1a3195(0x179)),await runStart();}catch(_0x3d4cf3){console[_0x1a3195(0x197)](_0x3d4cf3),process['exit'](0x1);}break;}case _0x1a3195(0x183):{try{logger['setLogPath'](process[_0x1a3195(0x17b)]()),logger[_0x1a3195(0x189)](_0x1a3195(0x183),_0x1a3195(0x18d)),await runBuild();}catch(_0x496998){console[_0x1a3195(0x197)](_0x496998),process[_0x1a3195(0x185)](0x1);}break;}case _0x1a3195(0x177):{const _0x2d2983=cli[_0x1a3195(0x193)][_0x1a3195(0x19a)];logger['setLogPath'](process[_0x1a3195(0x17b)]()),logger[_0x1a3195(0x189)]('preview',_0x1a3195(0x172)+(_0x2d2983?_0x1a3195(0x184):''));if(_0x2d2983)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x7423cf){console[_0x1a3195(0x197)](_0x7423cf),process[_0x1a3195(0x185)](0x1);}else try{await runPreview();}catch(_0x309282){console[_0x1a3195(0x197)](_0x309282),process[_0x1a3195(0x185)](0x1);}break;}case _0x1a3195(0x188):{render(a28_0x4051fa(Config,{'cli':cli}));break;}case _0x1a3195(0x190):{await apiCli(cli);break;}case _0x1a3195(0x181):{render(a28_0x4051fa(AuthServer,{}));break;}case'menu':{if(_0x29d97e===_0x1a3195(0x192)){if(_0x80a575===_0x1a3195(0x18f)&&cli['flags'][_0x1a3195(0x16a)]){logger[_0x1a3195(0x196)](process[_0x1a3195(0x17b)]()),logger[_0x1a3195(0x189)]('menu-sync-cdn','执行菜单\x20CDN\x20版本同步命令'),render(a28_0x4051fa(AppMenuSyncCdnVersionUI,{'newVersion':cli[_0x1a3195(0x193)][_0x1a3195(0x16a)]}));break;}}else render(a28_0x4051fa(AppMenuSyncUI,{}));break;}case _0x1a3195(0x17a):{logout();break;}case _0x1a3195(0x169):{const _0x20d7d7=cli[_0x1a3195(0x191)][0x1];await mcpCommand(_0x20d7d7);break;}case _0x1a3195(0x18e):{cli[_0x1a3195(0x193)]['clear']?clearLogs():showLogs();break;}default:render(a28_0x4051fa(Help,{}));break;}}
2
+ const a28_0x5d3d07=a28_0x2903;(function(_0x30d95d,_0x240428){const _0x9571e=a28_0x2903,_0x53f90d=_0x30d95d();while(!![]){try{const _0x37b4be=parseInt(_0x9571e(0x93))/0x1+-parseInt(_0x9571e(0x8b))/0x2*(-parseInt(_0x9571e(0x80))/0x3)+-parseInt(_0x9571e(0x94))/0x4+parseInt(_0x9571e(0x9a))/0x5+-parseInt(_0x9571e(0x76))/0x6+-parseInt(_0x9571e(0x77))/0x7*(parseInt(_0x9571e(0x97))/0x8)+-parseInt(_0x9571e(0x79))/0x9;if(_0x37b4be===_0x240428)break;else _0x53f90d['push'](_0x53f90d['shift']());}catch(_0x228867){_0x53f90d['push'](_0x53f90d['shift']());}}}(a28_0x4325,0x7360b));import{jsx as a28_0x37a0b2}from'react/jsx-runtime';import a28_0x293fe2 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/main.js';import{runStart}from'./cmd/start.js';function a28_0x2903(_0x2f3242,_0x2b9eae){const _0x43255a=a28_0x4325();return a28_0x2903=function(_0x290329,_0x20e9e8){_0x290329=_0x290329-0x70;let _0x3129a1=_0x43255a[_0x290329];return _0x3129a1;},a28_0x2903(_0x2f3242,_0x2b9eae);}function a28_0x4325(){const _0x436bb7=['822108TEVXZN','68576hCBgce','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20cdn\x20sync\x20--version\x201.0.0\x20\x20//\x20同步菜单\x20CDN\x20资源版本\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20配置\x20Cursor\x20的\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','trim','1240648vPRxwy','info','logout','3671415OTXYct','auth','exit','start','join','menu','create','4815240iVEWKi','7sWSNOI','setRawCommand','8128107qnmBKb','slice','preview','page','init','env','api','2382252QTEkaf','config','\x20(监听模式)','add','build','string','logs','argv','cwd','boolean','input','2wclhPy','flags','error','执行添加页面命令','add-page','version','setLogPath','clear'];a28_0x4325=function(){return _0x436bb7;};return a28_0x4325();}import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';import{AppMenuSyncCdnVersionUI}from'./app-menu-cdn-version/app-menu-sync-cdn-version-ui.js';const cli=a28_0x293fe2(a28_0x5d3d07(0x95),{'importMeta':import.meta,'flags':{'name':{'type':a28_0x5d3d07(0x85)},'clear':{'type':a28_0x5d3d07(0x89)},'env':{'type':a28_0x5d3d07(0x85)},'watch':{'type':a28_0x5d3d07(0x89)},'help':{'type':a28_0x5d3d07(0x89)},'appcode':{'type':a28_0x5d3d07(0x85)},'output':{'type':a28_0x5d3d07(0x85)},'params':{'type':'string'},'datasetcode':{'type':a28_0x5d3d07(0x85)},'version':{'type':a28_0x5d3d07(0x85)}}});await run();async function run(){const _0x223c43=a28_0x5d3d07,_0x1ba082=cli[_0x223c43(0x8a)][0x0],_0x41e19c=cli[_0x223c43(0x8a)][0x1],_0x5edef3=cli['input'][0x2],_0x5863b5=('lovrabet\x20'+process[_0x223c43(0x87)][_0x223c43(0x7a)](0x2)[_0x223c43(0x73)]('\x20'))['trim']();logger[_0x223c43(0x78)](_0x5863b5);switch(_0x1ba082){case _0x223c43(0x7d):{const _0x3d1359=cli[_0x223c43(0x8c)]['appcode'],_0x15fc48=cli['flags'][_0x223c43(0x7e)];logger['setLogPath'](process[_0x223c43(0x88)]()),logger[_0x223c43(0x98)](_0x223c43(0x7d),'执行初始化配置命令'),render(a28_0x37a0b2(Init,{'appcode':_0x3d1359,'env':_0x15fc48}));break;}case _0x223c43(0x75):{const _0x42ddae=cli[_0x223c43(0x8a)][0x1]?.[_0x223c43(0x96)](),_0x1562d3=cli['flags'][_0x223c43(0x7e)];render(a28_0x37a0b2(CreateApp,{'projectCode':_0x42ddae,'env':_0x1562d3}));break;}case _0x223c43(0x83):{cli[_0x223c43(0x8a)][0x1]===_0x223c43(0x7c)&&(logger['setLogPath'](process[_0x223c43(0x88)]()),logger[_0x223c43(0x98)](_0x223c43(0x8f),_0x223c43(0x8e)),render(a28_0x37a0b2(AddPage,{})));break;}case'start':{try{logger[_0x223c43(0x91)](process[_0x223c43(0x88)]()),logger['info'](_0x223c43(0x72),'执行启动命令'),await runStart();}catch(_0x55a846){console[_0x223c43(0x8d)](_0x55a846),process[_0x223c43(0x71)](0x1);}break;}case _0x223c43(0x84):{try{logger[_0x223c43(0x91)](process[_0x223c43(0x88)]()),logger[_0x223c43(0x98)](_0x223c43(0x84),'执行构建命令'),await runBuild();}catch(_0x278cb0){console['error'](_0x278cb0),process['exit'](0x1);}break;}case _0x223c43(0x7b):{const _0x4577e5=cli[_0x223c43(0x8c)]['watch'];logger[_0x223c43(0x91)](process[_0x223c43(0x88)]()),logger[_0x223c43(0x98)](_0x223c43(0x7b),'执行预览命令'+(_0x4577e5?_0x223c43(0x82):''));if(_0x4577e5)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x3c60a7){console[_0x223c43(0x8d)](_0x3c60a7),process['exit'](0x1);}else try{await runPreview();}catch(_0x181c66){console['error'](_0x181c66),process[_0x223c43(0x71)](0x1);}break;}case _0x223c43(0x81):{render(a28_0x37a0b2(Config,{'cli':cli}));break;}case _0x223c43(0x7f):{await apiCli(cli);break;}case _0x223c43(0x70):{render(a28_0x37a0b2(AuthServer,{}));break;}case _0x223c43(0x74):{if(_0x41e19c==='cdn'){if(_0x5edef3==='sync'&&cli['flags'][_0x223c43(0x90)]){logger[_0x223c43(0x91)](process[_0x223c43(0x88)]()),logger[_0x223c43(0x98)]('menu-sync-cdn','执行菜单\x20CDN\x20版本同步命令'),render(a28_0x37a0b2(AppMenuSyncCdnVersionUI,{'newVersion':cli[_0x223c43(0x8c)][_0x223c43(0x90)]}));break;}}else render(a28_0x37a0b2(AppMenuSyncUI,{}));break;}case _0x223c43(0x99):{logout();break;}case'mcp':{const _0x208d6b=cli['input'][0x1];await mcpCommand(_0x208d6b);break;}case _0x223c43(0x86):{cli[_0x223c43(0x8c)][_0x223c43(0x92)]?clearLogs():showLogs();break;}default:render(a28_0x37a0b2(Help,{}));break;}}
@@ -1 +1 @@
1
- function a29_0x3079(_0x5c2e70,_0x1e46b0){const _0xd36bed=a29_0xd36b();return a29_0x3079=function(_0x307933,_0x270eff){_0x307933=_0x307933-0x11c;let _0x49a532=_0xd36bed[_0x307933];return _0x49a532;},a29_0x3079(_0x5c2e70,_0x1e46b0);}function a29_0xd36b(){const _0x403971=['335JdAMvu','980CNtEig','vite','1630136SmfXZj','132uwRzOF','27YeJdnF','1542efuJie','3831YcpbQZ','cwd','PATH','20461qIzHSD','15917DjlHsg','node_modules','build','521840UGsKyB','9908ODeqPm','4295880ifmyiZ'];a29_0xd36b=function(){return _0x403971;};return a29_0xd36b();}(function(_0x19e311,_0x1f56dd){const _0x249e0f=a29_0x3079,_0x5e00ea=_0x19e311();while(!![]){try{const _0x20ce4a=parseInt(_0x249e0f(0x124))/0x1+-parseInt(_0x249e0f(0x12b))/0x2*(-parseInt(_0x249e0f(0x120))/0x3)+-parseInt(_0x249e0f(0x128))/0x4*(-parseInt(_0x249e0f(0x12a))/0x5)+parseInt(_0x249e0f(0x11f))/0x6*(-parseInt(_0x249e0f(0x123))/0x7)+parseInt(_0x249e0f(0x11c))/0x8*(parseInt(_0x249e0f(0x11e))/0x9)+parseInt(_0x249e0f(0x129))/0xa+-parseInt(_0x249e0f(0x127))/0xb*(parseInt(_0x249e0f(0x11d))/0xc);if(_0x20ce4a===_0x1f56dd)break;else _0x5e00ea['push'](_0x5e00ea['shift']());}catch(_0x1e6b73){_0x5e00ea['push'](_0x5e00ea['shift']());}}}(a29_0xd36b,0x8c7d4));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x322356,_0x344388)=>{const _0x8811aa=a29_0x3079,_0x5f39f0=spawn(_0x8811aa(0x12c),[_0x8811aa(0x126),'--watch'],{'stdio':'inherit','shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x8811aa(0x121)](),_0x8811aa(0x125),'.bin')+delimiter+process['env'][_0x8811aa(0x122)]}});_0x5f39f0['on']('close',_0x4fe39e=>{if(_0x4fe39e===0x0||_0x4fe39e===null)_0x322356();else _0x344388(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x4fe39e));}),_0x5f39f0['on']('error',_0x344388);});}
1
+ (function(_0x291c76,_0x25d835){const _0x27caac=a29_0x3b34,_0x4956a3=_0x291c76();while(!![]){try{const _0x5ec36d=parseInt(_0x27caac(0x1ca))/0x1+-parseInt(_0x27caac(0x1cb))/0x2+-parseInt(_0x27caac(0x1d8))/0x3+-parseInt(_0x27caac(0x1d5))/0x4+-parseInt(_0x27caac(0x1d1))/0x5*(parseInt(_0x27caac(0x1d4))/0x6)+parseInt(_0x27caac(0x1d0))/0x7+parseInt(_0x27caac(0x1cd))/0x8;if(_0x5ec36d===_0x25d835)break;else _0x4956a3['push'](_0x4956a3['shift']());}catch(_0x13194a){_0x4956a3['push'](_0x4956a3['shift']());}}}(a29_0x4303,0x4cf5f));import{spawn}from'node:child_process';function a29_0x3b34(_0x11c716,_0x1cab00){const _0x430305=a29_0x4303();return a29_0x3b34=function(_0x3b3471,_0x58557c){_0x3b3471=_0x3b3471-0x1ca;let _0x55223e=_0x430305[_0x3b3471];return _0x55223e;},a29_0x3b34(_0x11c716,_0x1cab00);}import{delimiter,join}from'node:path';function a29_0x4303(){const _0x182bfd=['build','3379425fvNNKJ','61785hOKqrQ','PATH','env','162mhdLvd','1319884udDZdx','inherit','cwd','371862qixUkx','node_modules','46637ImgyHK','474094kmQdTn','close','6483440WwIdBZ','vite'];a29_0x4303=function(){return _0x182bfd;};return a29_0x4303();}export function runBuildWatch(){return new Promise((_0x4fc5a9,_0x17793d)=>{const _0x499264=a29_0x3b34,_0x286c91=spawn(_0x499264(0x1ce),[_0x499264(0x1cf),'--watch'],{'stdio':_0x499264(0x1d6),'shell':!![],'env':{...process[_0x499264(0x1d3)],'PATH':''+join(process[_0x499264(0x1d7)](),_0x499264(0x1d9),'.bin')+delimiter+process[_0x499264(0x1d3)][_0x499264(0x1d2)]}});_0x286c91['on'](_0x499264(0x1cc),_0x7d6a24=>{if(_0x7d6a24===0x0||_0x7d6a24===null)_0x4fc5a9();else _0x17793d(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x7d6a24));}),_0x286c91['on']('error',_0x17793d);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- function a30_0x5101(_0x5a07db,_0x1b2c8e){const _0x6f0efa=a30_0x6f0e();return a30_0x5101=function(_0x5101fd,_0x5baf64){_0x5101fd=_0x5101fd-0x1d7;let _0x59ba22=_0x6f0efa[_0x5101fd];return _0x59ba22;},a30_0x5101(_0x5a07db,_0x1b2c8e);}(function(_0x29e8cf,_0x50af30){const _0x35e50c=a30_0x5101,_0x971371=_0x29e8cf();while(!![]){try{const _0xfb4bb5=parseInt(_0x35e50c(0x1df))/0x1+-parseInt(_0x35e50c(0x1f7))/0x2*(-parseInt(_0x35e50c(0x1d9))/0x3)+-parseInt(_0x35e50c(0x1dc))/0x4*(-parseInt(_0x35e50c(0x1e4))/0x5)+-parseInt(_0x35e50c(0x1f6))/0x6*(parseInt(_0x35e50c(0x1f3))/0x7)+-parseInt(_0x35e50c(0x1ee))/0x8+-parseInt(_0x35e50c(0x1da))/0x9*(parseInt(_0x35e50c(0x1e2))/0xa)+parseInt(_0x35e50c(0x1f5))/0xb;if(_0xfb4bb5===_0x50af30)break;else _0x971371['push'](_0x971371['shift']());}catch(_0x1d8df1){_0x971371['push'](_0x971371['shift']());}}}(a30_0x6f0e,0xf1a94));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x22bae3,_0x5cdf33)=>{const _0x4f4020=a30_0x5101,_0x364754=Date['now']();logger[_0x4f4020(0x1f4)](_0x4f4020(0x1d7),_0x4f4020(0x1dd),{'command':_0x4f4020(0x1e7)});let _0x129b03='';const _0x254998=spawn('npm',[_0x4f4020(0x1ec),'build'],{'stdio':[_0x4f4020(0x1f2),'inherit','pipe'],'shell':!![],'env':{...process[_0x4f4020(0x1ed)],'PATH':''+join(process[_0x4f4020(0x1f1)](),'node_modules',_0x4f4020(0x1f0))+delimiter+process[_0x4f4020(0x1ed)][_0x4f4020(0x1db)]}});_0x254998[_0x4f4020(0x1e8)]?.['on'](_0x4f4020(0x1e3),_0x4f17ae=>{_0x129b03+=_0x4f17ae['toString']();}),_0x254998['on'](_0x4f4020(0x1e6),_0x1124d5=>{const _0x108fd4=_0x4f4020,_0x3639c1=Date[_0x108fd4(0x1e1)]()-_0x364754;if(_0x1124d5===0x0||_0x1124d5===null)logger[_0x108fd4(0x1e0)](_0x108fd4(0x1d7),_0x108fd4(0x1d8),_0x3639c1),_0x22bae3();else{const _0x2d1763={'exitCode':_0x1124d5,'duration':_0x3639c1,'command':_0x108fd4(0x1e7),'cwd':process[_0x108fd4(0x1f1)]()};_0x129b03[_0x108fd4(0x1e9)]()&&(_0x2d1763[_0x108fd4(0x1e8)]=_0x129b03['trim']()),logger[_0x108fd4(0x1e5)]('build',_0x108fd4(0x1ea),_0x2d1763),_0x5cdf33(new Error(_0x108fd4(0x1ef)+_0x1124d5));}}),_0x254998['on'](_0x4f4020(0x1e5),_0x3aa6fe=>{const _0x50a835=_0x4f4020,_0x44dc4c=Date[_0x50a835(0x1e1)]()-_0x364754;logger[_0x50a835(0x1e5)](_0x50a835(0x1d7),_0x50a835(0x1eb),{'error':_0x3aa6fe[_0x50a835(0x1de)],'duration':_0x44dc4c,'stderr':_0x129b03[_0x50a835(0x1e9)]()||undefined}),_0x5cdf33(_0x3aa6fe);});});}function a30_0x6f0e(){const _0x3f0eee=['env','7026648evFeiR','npm\x20run\x20build\x20exited\x20with\x20code\x20','.bin','cwd','inherit','1656291phiUVR','info','19294836hIjWft','12egchpd','619546yzatPh','build','项目构建成功','3JlmnFy','16454574jCYuOZ','PATH','732cldbMt','开始构建项目','message','1858971LavOKD','success','now','10HnNXKd','data','6745lihSkC','error','close','npm\x20run\x20build','stderr','trim','项目构建失败','项目构建出错','run'];a30_0x6f0e=function(){return _0x3f0eee;};return a30_0x6f0e();}
1
+ (function(_0x504879,_0x5f244e){const _0x309aad=a30_0x1857,_0x185937=_0x504879();while(!![]){try{const _0x1d0443=-parseInt(_0x309aad(0x188))/0x1*(parseInt(_0x309aad(0x18c))/0x2)+parseInt(_0x309aad(0x189))/0x3+-parseInt(_0x309aad(0x19a))/0x4*(-parseInt(_0x309aad(0x187))/0x5)+-parseInt(_0x309aad(0x180))/0x6*(parseInt(_0x309aad(0x197))/0x7)+-parseInt(_0x309aad(0x194))/0x8*(-parseInt(_0x309aad(0x182))/0x9)+parseInt(_0x309aad(0x190))/0xa*(-parseInt(_0x309aad(0x18e))/0xb)+-parseInt(_0x309aad(0x195))/0xc*(-parseInt(_0x309aad(0x184))/0xd);if(_0x1d0443===_0x5f244e)break;else _0x185937['push'](_0x185937['shift']());}catch(_0x3dd0e7){_0x185937['push'](_0x185937['shift']());}}}(a30_0x2475,0x814bd));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a30_0x2475(){const _0x196da8=['12782RROAAG','npm\x20run\x20build\x20exited\x20with\x20code\x20','6130vUGXQA','success','pipe','npm\x20run\x20build','3634328livSSi','12blcXTX','message','651fqdyUA','stderr','项目构建出错','4ROQmtw','PATH','build','node_modules','now','toString','trim','59442fnOuFO','开始构建项目','9dkVoES','data','6244277rMOmLh','cwd','error','1923425QkMDil','5471atQxCw','2564673wIaTRj','项目构建成功','npm','4zXvAhn','.bin'];a30_0x2475=function(){return _0x196da8;};return a30_0x2475();}function a30_0x1857(_0x5cea3f,_0x3ab9e0){const _0x2475b2=a30_0x2475();return a30_0x1857=function(_0x185709,_0x63e75e){_0x185709=_0x185709-0x17f;let _0x856f8a=_0x2475b2[_0x185709];return _0x856f8a;},a30_0x1857(_0x5cea3f,_0x3ab9e0);}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x63835b,_0x3044fa)=>{const _0x5293a0=a30_0x1857,_0x247766=Date[_0x5293a0(0x19e)]();logger['info'](_0x5293a0(0x19c),_0x5293a0(0x181),{'command':_0x5293a0(0x193)});let _0x4f06c9='';const _0x4959bf=spawn(_0x5293a0(0x18b),['run',_0x5293a0(0x19c)],{'stdio':['inherit','inherit',_0x5293a0(0x192)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x5293a0(0x185)](),_0x5293a0(0x19d),_0x5293a0(0x18d))+delimiter+process['env'][_0x5293a0(0x19b)]}});_0x4959bf[_0x5293a0(0x198)]?.['on'](_0x5293a0(0x183),_0x102e44=>{const _0x18f39b=_0x5293a0;_0x4f06c9+=_0x102e44[_0x18f39b(0x19f)]();}),_0x4959bf['on']('close',_0x266911=>{const _0x3f88ed=_0x5293a0,_0x4366c7=Date['now']()-_0x247766;if(_0x266911===0x0||_0x266911===null)logger[_0x3f88ed(0x191)]('build',_0x3f88ed(0x18a),_0x4366c7),_0x63835b();else{const _0x1201be={'exitCode':_0x266911,'duration':_0x4366c7,'command':_0x3f88ed(0x193),'cwd':process['cwd']()};_0x4f06c9[_0x3f88ed(0x17f)]()&&(_0x1201be[_0x3f88ed(0x198)]=_0x4f06c9[_0x3f88ed(0x17f)]()),logger[_0x3f88ed(0x186)](_0x3f88ed(0x19c),'项目构建失败',_0x1201be),_0x3044fa(new Error(_0x3f88ed(0x18f)+_0x266911));}}),_0x4959bf['on']('error',_0x99121e=>{const _0x1f6044=_0x5293a0,_0x83cabd=Date[_0x1f6044(0x19e)]()-_0x247766;logger[_0x1f6044(0x186)](_0x1f6044(0x19c),_0x1f6044(0x199),{'error':_0x99121e[_0x1f6044(0x196)],'duration':_0x83cabd,'stderr':_0x4f06c9[_0x1f6044(0x17f)]()||undefined}),_0x3044fa(_0x99121e);});});}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2a661c,_0x259018){const _0x472fba=a31_0x12d1,_0x2f1088=_0x2a661c();while(!![]){try{const _0x168e09=-parseInt(_0x472fba(0x1c0))/0x1*(-parseInt(_0x472fba(0x1cd))/0x2)+parseInt(_0x472fba(0x1c5))/0x3*(parseInt(_0x472fba(0x1d1))/0x4)+-parseInt(_0x472fba(0x1c6))/0x5*(-parseInt(_0x472fba(0x1df))/0x6)+-parseInt(_0x472fba(0x1d6))/0x7+parseInt(_0x472fba(0x1d4))/0x8*(-parseInt(_0x472fba(0x1c1))/0x9)+-parseInt(_0x472fba(0x1c2))/0xa*(parseInt(_0x472fba(0x1c3))/0xb)+parseInt(_0x472fba(0x1d9))/0xc;if(_0x168e09===_0x259018)break;else _0x2f1088['push'](_0x2f1088['shift']());}catch(_0x4caeb9){_0x2f1088['push'](_0x2f1088['shift']());}}}(a31_0x11ab,0xc0023));function a31_0x11ab(){const _0x3dd11e=['length','log','12551448AXtMAj','level','command','warn','error','toLocaleString','6344034bUxlFD','setLogPath','*\x20日志已清空','5KqUjjC','5508927JXsYCH','154610QrfdxN','671HwHthd','clearLogs','525sXXUYp','5cvVmkl','\x20\x20\x20详情:\x20','keys','stringify','message','cwd','timestamp','95330fGwiMt','details','\x20\x20\x20耗时:\x20','duration','5708txGebd','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','zh-CN','8rlodlN','\x20\x20\x20时间:\x20','1747564oxrnWG'];a31_0x11ab=function(){return _0x3dd11e;};return a31_0x11ab();}import{logger}from'../utils/logger.js';export function showLogs(){const _0x431bca=a31_0x12d1;logger[_0x431bca(0x1be)](process[_0x431bca(0x1cb)]());const _0x2a0c14=logger['readLogs']();if(_0x2a0c14[_0x431bca(0x1d7)]===0x0){console[_0x431bca(0x1d8)]('*\x20暂无日志记录');return;}console[_0x431bca(0x1d8)](_0x431bca(0x1d2)),_0x2a0c14['forEach']((_0x4918d7,_0x406678)=>{const _0xa52c72=_0x431bca,_0xc44423=new Date(_0x4918d7[_0xa52c72(0x1cc)])[_0xa52c72(0x1de)](_0xa52c72(0x1d3)),_0xefea4f=_0x4918d7[_0xa52c72(0x1da)]==='success'?'√':_0x4918d7[_0xa52c72(0x1da)]===_0xa52c72(0x1dd)?'×':_0x4918d7[_0xa52c72(0x1da)]===_0xa52c72(0x1dc)?'!':'i';console[_0xa52c72(0x1d8)](_0x406678+0x1+'.\x20'+_0xefea4f+'\x20['+_0x4918d7[_0xa52c72(0x1db)]+']\x20'+_0x4918d7[_0xa52c72(0x1ca)]),console[_0xa52c72(0x1d8)](_0xa52c72(0x1d5)+_0xc44423),_0x4918d7[_0xa52c72(0x1d0)]&&console[_0xa52c72(0x1d8)](_0xa52c72(0x1cf)+_0x4918d7['duration']+'ms'),_0x4918d7['details']&&Object[_0xa52c72(0x1c8)](_0x4918d7[_0xa52c72(0x1ce)])['length']>0x0&&console[_0xa52c72(0x1d8)](_0xa52c72(0x1c7)+JSON[_0xa52c72(0x1c9)](_0x4918d7[_0xa52c72(0x1ce)],null,0x2)),console[_0xa52c72(0x1d8)]('');});}function a31_0x12d1(_0x36943d,_0x6d92d){const _0x11ab27=a31_0x11ab();return a31_0x12d1=function(_0x12d1fe,_0x1bfd1d){_0x12d1fe=_0x12d1fe-0x1be;let _0x45a24b=_0x11ab27[_0x12d1fe];return _0x45a24b;},a31_0x12d1(_0x36943d,_0x6d92d);}export function clearLogs(){const _0x17969d=a31_0x12d1;logger['setLogPath'](process[_0x17969d(0x1cb)]()),logger[_0x17969d(0x1c4)](),console[_0x17969d(0x1d8)](_0x17969d(0x1bf));}
1
+ (function(_0x3e31b6,_0x529e6f){const _0x43722c=a31_0x12bb,_0x313e60=_0x3e31b6();while(!![]){try{const _0x4ce37f=-parseInt(_0x43722c(0xa3))/0x1*(parseInt(_0x43722c(0xa0))/0x2)+-parseInt(_0x43722c(0xa9))/0x3+parseInt(_0x43722c(0x9e))/0x4*(parseInt(_0x43722c(0xb8))/0x5)+parseInt(_0x43722c(0xa7))/0x6+-parseInt(_0x43722c(0xa4))/0x7*(parseInt(_0x43722c(0xbb))/0x8)+-parseInt(_0x43722c(0x9c))/0x9+parseInt(_0x43722c(0xb4))/0xa*(parseInt(_0x43722c(0x9f))/0xb);if(_0x4ce37f===_0x529e6f)break;else _0x313e60['push'](_0x313e60['shift']());}catch(_0x429355){_0x313e60['push'](_0x313e60['shift']());}}}(a31_0x1505,0x71b92));import{logger}from'../utils/logger.js';function a31_0x1505(){const _0x597482=['toLocaleString','*\x20暂无日志记录','\x20\x20\x20耗时:\x20','stringify','message','error','setLogPath','command','4589860ltKubQ','\x20\x20\x20时间:\x20','log','success','15oUHDIw','zh-CN','details','40XKtnWZ','readLogs','level','2736783ZAWgMw','*\x20日志已清空','864452UegReq','22PBiOlG','464064crAFNt','duration','timestamp','4BiwYXa','202846pbkJDL','warn','length','1816938GKvkha','keys','78657HqOVsf','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','\x20\x20\x20详情:\x20'];a31_0x1505=function(){return _0x597482;};return a31_0x1505();}function a31_0x12bb(_0x10feee,_0x5729eb){const _0x1505d5=a31_0x1505();return a31_0x12bb=function(_0x12bb1b,_0x45ed99){_0x12bb1b=_0x12bb1b-0x9a;let _0x26bfce=_0x1505d5[_0x12bb1b];return _0x26bfce;},a31_0x12bb(_0x10feee,_0x5729eb);}export function showLogs(){const _0x12b53d=a31_0x12bb;logger[_0x12b53d(0xb2)](process['cwd']());const _0x2ad07d=logger[_0x12b53d(0x9a)]();if(_0x2ad07d[_0x12b53d(0xa6)]===0x0){console[_0x12b53d(0xb6)](_0x12b53d(0xad));return;}console['log'](_0x12b53d(0xaa)),_0x2ad07d['forEach']((_0x495fa2,_0x1bee72)=>{const _0x3abe78=_0x12b53d,_0x5cc231=new Date(_0x495fa2[_0x3abe78(0xa2)])[_0x3abe78(0xac)](_0x3abe78(0xb9)),_0x2568a9=_0x495fa2['level']===_0x3abe78(0xb7)?'√':_0x495fa2[_0x3abe78(0x9b)]===_0x3abe78(0xb1)?'×':_0x495fa2[_0x3abe78(0x9b)]===_0x3abe78(0xa5)?'!':'i';console[_0x3abe78(0xb6)](_0x1bee72+0x1+'.\x20'+_0x2568a9+'\x20['+_0x495fa2[_0x3abe78(0xb3)]+']\x20'+_0x495fa2[_0x3abe78(0xb0)]),console[_0x3abe78(0xb6)](_0x3abe78(0xb5)+_0x5cc231),_0x495fa2[_0x3abe78(0xa1)]&&console[_0x3abe78(0xb6)](_0x3abe78(0xae)+_0x495fa2[_0x3abe78(0xa1)]+'ms'),_0x495fa2[_0x3abe78(0xba)]&&Object[_0x3abe78(0xa8)](_0x495fa2['details'])['length']>0x0&&console[_0x3abe78(0xb6)](_0x3abe78(0xab)+JSON[_0x3abe78(0xaf)](_0x495fa2['details'],null,0x2)),console[_0x3abe78(0xb6)]('');});}export function clearLogs(){const _0x2d7a0a=a31_0x12bb;logger[_0x2d7a0a(0xb2)](process['cwd']()),logger['clearLogs'](),console[_0x2d7a0a(0xb6)](_0x2d7a0a(0x9d));}