@lovrabet/cli 1.3.1 → 1.3.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) 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/ai-setup/AISetupUI.js +1 -1
  5. package/lib/ai-setup/config.js +1 -1
  6. package/lib/api/api-doc-ui.js +1 -1
  7. package/lib/api/api-doc.js +1 -1
  8. package/lib/api/api-pull-ui.js +1 -1
  9. package/lib/api/fetch-model-list.js +1 -1
  10. package/lib/api/generate-api-file.js +1 -1
  11. package/lib/api/main.js +1 -1
  12. package/lib/api/pull-silent.js +1 -1
  13. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  14. package/lib/app-menu/create-menu.js +1 -1
  15. package/lib/app-menu/get-local-pages.js +1 -1
  16. package/lib/app-menu/get-online-menu-list.js +1 -1
  17. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  18. package/lib/app-menu/utils.js +1 -1
  19. package/lib/app-menu/valid-url.js +1 -1
  20. package/lib/app-menu-update-cdn/current-content.js +1 -1
  21. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  22. package/lib/app-menu-update-cdn/main.js +1 -1
  23. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  24. package/lib/auth/auth-server-ui.js +1 -1
  25. package/lib/auth/auth-server.js +1 -1
  26. package/lib/auth/constant.js +1 -1
  27. package/lib/auth/get-cookie.js +1 -1
  28. package/lib/auth/is-session-valid.js +1 -1
  29. package/lib/auth/logout.js +1 -1
  30. package/lib/cli-flags.js +1 -0
  31. package/lib/cli.js +1 -1
  32. package/lib/cmd/build-watch.js +1 -1
  33. package/lib/cmd/build.js +1 -1
  34. package/lib/cmd/logs.js +1 -1
  35. package/lib/cmd/preview.js +1 -1
  36. package/lib/cmd/start.js +1 -1
  37. package/lib/config/config-help.js +1 -1
  38. package/lib/config/main.js +1 -1
  39. package/lib/constant/domain.js +1 -1
  40. package/lib/constant/env.js +1 -1
  41. package/lib/create-app/enhanced-guided-create.js +1 -1
  42. package/lib/create-app/format-elapsed.js +1 -1
  43. package/lib/create-app/main.js +1 -1
  44. package/lib/create-app/non-interactive.js +1 -1
  45. package/lib/create-app/task-finished.js +1 -1
  46. package/lib/create-app/task-loading.js +1 -1
  47. package/lib/create-app/task-running.js +1 -1
  48. package/lib/create-app/task-time.js +1 -1
  49. package/lib/create-app/use-copy-project-template.js +1 -1
  50. package/lib/create-app/use-format-code.js +1 -1
  51. package/lib/create-app/use-install-dependencies.js +1 -1
  52. package/lib/help.js +1 -1
  53. package/lib/init/main.js +1 -1
  54. package/lib/mcp/McpInstallUI.js +1 -1
  55. package/lib/mcp/claude.js +1 -1
  56. package/lib/mcp/cursor.js +1 -1
  57. package/lib/mcp/main.js +1 -1
  58. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  59. package/lib/mcp/mcp-installer.js +1 -1
  60. package/lib/skills/SkillInstallUI.js +1 -1
  61. package/lib/skills/main.js +1 -1
  62. package/lib/skills/skill-install-non-interactive.js +1 -1
  63. package/lib/skills/skill-installer.js +1 -1
  64. package/lib/ui/IDESelector.js +1 -1
  65. package/lib/ui/useIDESelection.js +1 -1
  66. package/lib/utils/ai_config.js +1 -1
  67. package/lib/utils/cdn-config.js +1 -1
  68. package/lib/utils/check-sdk-version.js +1 -1
  69. package/lib/utils/cli-version-check.js +1 -1
  70. package/lib/utils/config.js +1 -1
  71. package/lib/utils/copy-directory.js +1 -1
  72. package/lib/utils/file-utils.js +1 -1
  73. package/lib/utils/guides-cdn.js +1 -1
  74. package/lib/utils/http-client.js +1 -1
  75. package/lib/utils/logger.js +1 -1
  76. package/lib/utils/router-updater.js +1 -1
  77. package/lib/utils/rules-cdn.js +1 -1
  78. package/lib/utils/sleep.js +1 -1
  79. package/lib/utils/template-replacer.js +1 -1
  80. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x9bad3b,_0x20cee9){const _0x47d853=a11_0x2bb3,_0x1f3b60=_0x9bad3b();while(!![]){try{const _0x4772c3=parseInt(_0x47d853(0x105))/0x1+parseInt(_0x47d853(0xf0))/0x2+-parseInt(_0x47d853(0xf7))/0x3+-parseInt(_0x47d853(0x101))/0x4*(parseInt(_0x47d853(0x10b))/0x5)+parseInt(_0x47d853(0x109))/0x6+-parseInt(_0x47d853(0xfb))/0x7+parseInt(_0x47d853(0x107))/0x8;if(_0x4772c3===_0x20cee9)break;else _0x1f3b60['push'](_0x1f3b60['shift']());}catch(_0xcce3db){_0x1f3b60['push'](_0x1f3b60['shift']());}}}(a11_0x5816,0x8d0cf));function a11_0x5816(){const _0x47dc90=['279208sGWPHH','√\x20成功拉取\x20','API\x20配置拉取异常:\x20','trim','757381QMLeVa','api','1513000QlKIpb','-client','1977840AIdQNx','length','10jUweAc','*\x20开始生成\x20API\x20配置文件:','\x20个数据集...','error','-api','message','556398BnokUY','cwd','*\x20正在处理\x20','×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。','client','modelCount','\x20个模型','1194942qbTGCN','*\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20','log','create-api-pull','3070788mDMUAw','string','online','chdir','\x20\x20\x20•\x20','env'];a11_0x5816=function(){return _0x47dc90;};return a11_0x5816();}function a11_0x2bb3(_0x10a65e,_0x3faf6d){_0x10a65e=_0x10a65e-0xf0;const _0x58164b=a11_0x5816();let _0x2bb3ad=_0x58164b[_0x10a65e];return _0x2bb3ad;}import{readConfig}from'../utils/config.js';import{initEnv}from'../constant/env.js';import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';import{fetchModelList}from'./fetch-model-list.js';export async function pullApiSilent(_0x3744e1,_0x69b383,_0x7375a3,_0x567a11){const _0x58c9d3=a11_0x2bb3;let _0x39c906;try{const _0x594fa7=_0x69b383?.[_0x58c9d3(0x104)]()||'';if(_0x594fa7){const _0x2e9040=/^[a-zA-Z][a-zA-Z0-9_-]*$/;if(!_0x2e9040['test'](_0x594fa7))return console[_0x58c9d3(0x10e)](_0x58c9d3(0xf3)),![];}_0x7375a3&&(_0x39c906=process[_0x58c9d3(0xf1)](),process[_0x58c9d3(0xfe)](_0x7375a3));const _0x27e325=readConfig(),_0x5896e6=typeof _0x27e325['env']===_0x58c9d3(0xfc)?_0x27e325[_0x58c9d3(0x100)]:undefined,_0xc34569=_0x567a11||_0x5896e6||_0x58c9d3(0xfd);initEnv(_0xc34569),console[_0x58c9d3(0xf9)](_0x58c9d3(0xf8)+_0xc34569+')');const {configArray:_0x36173d}=await fetchModelList(_0x3744e1),_0x203d12=_0x594fa7?_0x594fa7+_0x58c9d3(0x10f):_0x58c9d3(0x106),_0x42caf6=_0x594fa7?_0x594fa7+_0x58c9d3(0x108):_0x58c9d3(0xf4);console[_0x58c9d3(0xf9)](_0x58c9d3(0x10c)),console['log'](_0x58c9d3(0xff)+_0x203d12+'.ts\x20-\x20模型配置文件'),console['log']('\x20\x20\x20•\x20'+_0x42caf6+'.ts\x20-\x20客户端实例文件'),console[_0x58c9d3(0xf9)](_0x58c9d3(0xf2)+_0x36173d[_0x58c9d3(0x10a)]+_0x58c9d3(0x10d));const _0x2282ba=await generateApiFile(_0x36173d,_0x594fa7,_0x3744e1,!![],_0xc34569);return console[_0x58c9d3(0xf9)](_0x58c9d3(0x102)+_0x36173d[_0x58c9d3(0x10a)]+'\x20个数据集,生成\x20'+_0x2282ba[_0x58c9d3(0xf5)]+_0x58c9d3(0xf6)),_0x7375a3&&logger['info'](_0x58c9d3(0xfa),'API\x20配置拉取成功:\x20'+_0x3744e1,{'projectPath':_0x7375a3,'appCode':_0x3744e1,'datasetCount':_0x36173d[_0x58c9d3(0x10a)],'filePrefix':_0x594fa7}),!![];}catch(_0x1584d8){const _0x242b80=_0x1584d8 instanceof Error?_0x1584d8[_0x58c9d3(0x110)]:String(_0x1584d8);return console[_0x58c9d3(0x10e)]('×\x20API\x20配置拉取异常:',_0x242b80),_0x7375a3&&logger[_0x58c9d3(0x10e)](_0x58c9d3(0xfa),_0x58c9d3(0x103)+_0x242b80,{'appCode':_0x3744e1,'projectPath':_0x7375a3}),![];}finally{_0x39c906&&process[_0x58c9d3(0xfe)](_0x39c906);}}
1
+ (function(_0x4e97a5,_0x5f21b9){const _0x23895a=a11_0x5c49,_0x312572=_0x4e97a5();while(!![]){try{const _0x1b876c=parseInt(_0x23895a(0xfd))/0x1+-parseInt(_0x23895a(0xf3))/0x2+-parseInt(_0x23895a(0xe8))/0x3*(parseInt(_0x23895a(0xec))/0x4)+-parseInt(_0x23895a(0xe0))/0x5+-parseInt(_0x23895a(0xf1))/0x6*(-parseInt(_0x23895a(0xdc))/0x7)+parseInt(_0x23895a(0xde))/0x8*(-parseInt(_0x23895a(0xe3))/0x9)+parseInt(_0x23895a(0xf7))/0xa;if(_0x1b876c===_0x5f21b9)break;else _0x312572['push'](_0x312572['shift']());}catch(_0x351928){_0x312572['push'](_0x312572['shift']());}}}(a11_0x3daa,0x50e4b));import{readConfig}from'../utils/config.js';import{initEnv}from'../constant/env.js';function a11_0x5c49(_0x30acb6,_0x4e15c4){_0x30acb6=_0x30acb6-0xdc;const _0x3daa8f=a11_0x3daa();let _0x5c49d2=_0x3daa8f[_0x30acb6];return _0x5c49d2;}import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';import{fetchModelList}from'./fetch-model-list.js';function a11_0x3daa(){const _0x1bacc3=['*\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20','online','4WzdiGQ','message','API\x20配置拉取成功:\x20','\x20个数据集,生成\x20','env','18rJSObY','\x20个数据集...','1316814wDZnPQ','test','log','error','23068500FOqyXc','√\x20成功拉取\x20','length','\x20\x20\x20•\x20','-api','chdir','460789bWomKq','179032RsMqEn','API\x20配置拉取异常:\x20','8rndjUa','string','3012120PCeWeU','trim','*\x20正在处理\x20','5654862AmbPCg','modelCount','*\x20开始生成\x20API\x20配置文件:','api','create-api-pull','1871637VSlGBR','cwd'];a11_0x3daa=function(){return _0x1bacc3;};return a11_0x3daa();}export async function pullApiSilent(_0xb42dd8,_0x57c57a,_0x9fb716,_0x5107b0){const _0x59fdd9=a11_0x5c49;let _0x5c31c8;try{const _0x5ac851=_0x57c57a?.[_0x59fdd9(0xe1)]()||'';if(_0x5ac851){const _0xe336e5=/^[a-zA-Z][a-zA-Z0-9_-]*$/;if(!_0xe336e5[_0x59fdd9(0xf4)](_0x5ac851))return console[_0x59fdd9(0xf6)]('×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。'),![];}_0x9fb716&&(_0x5c31c8=process[_0x59fdd9(0xe9)](),process[_0x59fdd9(0xfc)](_0x9fb716));const _0x5ba326=readConfig(),_0x2dc36e=typeof _0x5ba326[_0x59fdd9(0xf0)]===_0x59fdd9(0xdf)?_0x5ba326[_0x59fdd9(0xf0)]:undefined,_0x40894d=_0x5107b0||_0x2dc36e||_0x59fdd9(0xeb);initEnv(_0x40894d),console[_0x59fdd9(0xf5)](_0x59fdd9(0xea)+_0x40894d+')');const {configArray:_0x368f1f}=await fetchModelList(_0xb42dd8),_0x5e22d2=_0x5ac851?_0x5ac851+_0x59fdd9(0xfb):_0x59fdd9(0xe6),_0x1b0928=_0x5ac851?_0x5ac851+'-client':'client';console[_0x59fdd9(0xf5)](_0x59fdd9(0xe5)),console[_0x59fdd9(0xf5)](_0x59fdd9(0xfa)+_0x5e22d2+'.ts\x20-\x20模型配置文件'),console[_0x59fdd9(0xf5)](_0x59fdd9(0xfa)+_0x1b0928+'.ts\x20-\x20客户端实例文件'),console['log'](_0x59fdd9(0xe2)+_0x368f1f['length']+_0x59fdd9(0xf2));const _0x118ae5=await generateApiFile(_0x368f1f,_0x5ac851,_0xb42dd8,!![],_0x40894d);return console[_0x59fdd9(0xf5)](_0x59fdd9(0xf8)+_0x368f1f[_0x59fdd9(0xf9)]+_0x59fdd9(0xef)+_0x118ae5[_0x59fdd9(0xe4)]+'\x20个模型'),_0x9fb716&&logger['info'](_0x59fdd9(0xe7),_0x59fdd9(0xee)+_0xb42dd8,{'projectPath':_0x9fb716,'appCode':_0xb42dd8,'datasetCount':_0x368f1f['length'],'filePrefix':_0x5ac851}),!![];}catch(_0x5d38e0){const _0x5b6080=_0x5d38e0 instanceof Error?_0x5d38e0[_0x59fdd9(0xed)]:String(_0x5d38e0);return console[_0x59fdd9(0xf6)]('×\x20API\x20配置拉取异常:',_0x5b6080),_0x9fb716&&logger[_0x59fdd9(0xf6)](_0x59fdd9(0xe7),_0x59fdd9(0xdd)+_0x5b6080,{'appCode':_0xb42dd8,'projectPath':_0x9fb716}),![];}finally{_0x5c31c8&&process['chdir'](_0x5c31c8);}}
@@ -1 +1 @@
1
- (function(_0x4f6c88,_0x4c278e){const _0x49d5f9=a12_0x4970,_0x4232e7=_0x4f6c88();while(!![]){try{const _0x59d391=-parseInt(_0x49d5f9(0x122))/0x1+parseInt(_0x49d5f9(0x12f))/0x2*(parseInt(_0x49d5f9(0x139))/0x3)+-parseInt(_0x49d5f9(0x113))/0x4+parseInt(_0x49d5f9(0xfe))/0x5*(parseInt(_0x49d5f9(0x106))/0x6)+-parseInt(_0x49d5f9(0x127))/0x7+-parseInt(_0x49d5f9(0x108))/0x8*(parseInt(_0x49d5f9(0x10b))/0x9)+parseInt(_0x49d5f9(0x125))/0xa;if(_0x59d391===_0x4c278e)break;else _0x4232e7['push'](_0x4232e7['shift']());}catch(_0x1b4329){_0x4232e7['push'](_0x4232e7['shift']());}}}(a12_0x53c5,0xb204d));import{jsx as a12_0x9c48ca,jsxs as a12_0x63ccbb,Fragment as a12_0x3174b7}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a12_0x1084db from'ink-spinner';import{useGetOnlineMenuList}from'./use-get-online-menu-list.js';import{getLocalPages}from'./get-local-pages.js';function a12_0x4970(_0x5579,_0xbb248f){_0x5579=_0x5579-0xf2;const _0x53c524=a12_0x53c5();let _0x4970e3=_0x53c524[_0x5579];return _0x4970e3;}import{createMenus}from'./create-menu.js';function a12_0x53c5(){const _0x23370c=['[✓]','includes','blue','138cOKSqf','green','\x20输入项目的\x20CSS\x20资源链接(https://...)','join','local','catch','\x20←\x20','gray','JS\x20链接无法访问','upArrow','selecting','downArrow','max','length','45BoGikn','map','add','[\x20]','*\x20JS\x20链接:\x20','√\x20菜单创建完成','创建菜单失败','column','111582RASwcx','return','16tjXwWr','online','\x20输入项目的\x20JS\x20资源链接(https://...)','4930236sgJMEi','*\x20同步菜单到\x20Lovrabet\x20平台','path','lovrabet\x20auth','value','done','dots','yellow','3560064DosQnO','slice','then','请至少选择一个菜单','请输入有效的\x20CSS\x20https\x20链接','提示:使用\x20','size','message','delete','trim','label','repeat','test','\x20正在获取线上菜单列表...','Lovrabet平台','916596QCNDQi','\x20命令重新登录','菜单名称','29887830mmrJbS','cyan','6160161tJkRXO','creating','input-css','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','*\x20CSS\x20链接:\x20','input-js','filter','white','58924rWcDkK','CSS\x20链接','red','!\x20未找到本地页面,请先创建页面','fill','backspace','has'];a12_0x53c5=function(){return _0x23370c;};return a12_0x53c5();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import.meta.main&&render(a12_0x9c48ca(AppMenuSyncUI,{}));export function AppMenuSyncUI(){const _0x281091=a12_0x4970,{exit:_0x5778a3}=useApp(),{loading:_0x24ceeb,menuList:_0x341609,error:_0x3c85f6}=useGetOnlineMenuList(),_0x9f80e3=getLocalPages(),_0x4b285f=_0x341609[_0x281091(0xff)](_0x331952=>_0x331952['path']),_0x4cea8f=[_0x281091(0x124),..._0x9f80e3['map'](_0x19e423=>_0x19e423[_0x281091(0x11d)])],_0x1e0c03=getStringWidth(getMaxWidth(_0x4cea8f,0x4)),_0x149891=getStringWidth(getMaxWidth([_0x281091(0x124)])),[_0x4910a2,_0xd789a8]=useState('selecting'),[_0x12e937,_0x550df4]=useState(new Set()),[_0x4297bd,_0x52b25c]=useState(0x0),[_0x19a417,_0x433af7]=useState(''),[_0x19b95a,_0x31e1f8]=useState(''),[_0x2ede33,_0x5c00cf]=useState(''),[_0x214fa0,_0x3bb190]=useState(''),[_0x1b3b1f,_0x206d9d]=useState([]),_0x5051d7=_0x9f80e3['map'](_0xe2b1fb=>({'label':_0xe2b1fb[_0x281091(0x11d)],'path':_0xe2b1fb['path'],'local':!![],'online':_0x4b285f[_0x281091(0x137)](_0xe2b1fb[_0x281091(0x10d)])})),_0x9e0fa=_0x9f80e3[_0x281091(0x12d)](_0x4acd7c=>{const _0x3b96fd=_0x281091;return!_0x4b285f['includes'](_0x4acd7c[_0x3b96fd(0x10d)]);});useEffect(()=>{const _0x2e96d4=_0x281091;if(!_0x24ceeb&&_0x9f80e3[_0x2e96d4(0xfd)]>0x0&&_0x12e937[_0x2e96d4(0x119)]===0x0){const _0x30132a=new Set(_0x9f80e3['map']((_0x4b3105,_0x57fa73)=>({'page':_0x4b3105,'index':_0x57fa73}))[_0x2e96d4(0x12d)](({page:_0x212e95})=>!_0x4b285f[_0x2e96d4(0x137)](_0x212e95[_0x2e96d4(0x10d)]))['map'](({index:_0x2bc319})=>_0x2bc319));_0x550df4(_0x30132a);}},[_0x24ceeb,_0x9f80e3[_0x281091(0xfd)],_0x4b285f['length']]),useInput(async(_0x206aeb,_0x1321ad)=>{const _0x1cf949=_0x281091;if(_0x4910a2===_0x1cf949(0xfa)){if(_0x1321ad[_0x1cf949(0xf9)]){_0x52b25c(_0x19c97f=>_0x19c97f>0x0?_0x19c97f-0x1:_0x9f80e3['length']-0x1);return;}if(_0x1321ad[_0x1cf949(0xfb)]){_0x52b25c(_0x4d3395=>_0x4d3395<_0x9f80e3['length']-0x1?_0x4d3395+0x1:0x0);return;}if(_0x206aeb==='\x20'){_0x550df4(_0x26ff50=>{const _0x3028de=_0x1cf949,_0x92ef08=new Set(_0x26ff50);return _0x92ef08[_0x3028de(0x135)](_0x4297bd)?_0x92ef08[_0x3028de(0x11b)](_0x4297bd):_0x92ef08[_0x3028de(0x100)](_0x4297bd),_0x92ef08;});return;}if(_0x206aeb==='a'||_0x206aeb==='A'){const _0x23c2b0=new Set(_0x9f80e3[_0x1cf949(0xff)]((_0xa2350b,_0x399726)=>_0x399726));_0x550df4(_0x23c2b0);return;}if(_0x206aeb==='i'||_0x206aeb==='I'||_0x206aeb==='r'||_0x206aeb==='R'){_0x550df4(_0x10637e=>{const _0x10480b=_0x1cf949,_0xf82322=new Set();for(let _0x4ec156=0x0;_0x4ec156<_0x9f80e3[_0x10480b(0xfd)];_0x4ec156++){!_0x10637e['has'](_0x4ec156)&&_0xf82322[_0x10480b(0x100)](_0x4ec156);}return _0xf82322;});return;}if(_0x206aeb==='q'||_0x206aeb==='Q'){_0x5778a3();return;}if(_0x1321ad[_0x1cf949(0x107)]){if(_0x12e937[_0x1cf949(0x119)]===0x0){_0x3bb190(_0x1cf949(0x116));return;}const _0x36b8d8=_0x9f80e3[_0x1cf949(0x12d)]((_0x5a279b,_0x2b1733)=>_0x12e937['has'](_0x2b1733)),_0x188ca4=_0x36b8d8[_0x1cf949(0xff)](_0x17497b=>_0x17497b['label'])[_0x1cf949(0xf3)](',\x20');_0x206d9d([{'label':'已选择菜单','value':_0x12e937['size']+'\x20个'}]),_0x3bb190(''),_0xd789a8(_0x1cf949(0x12c));return;}return;}if(_0x4910a2==='input-js'){if(_0x1321ad[_0x1cf949(0x107)]){const _0x12714c=_0x2ede33[_0x1cf949(0x11c)]();if(_0x12714c==='')return;if(!isValidJsHttpsUrl(_0x12714c)){_0x3bb190('请输入有效的\x20JS\x20https\x20链接');return;}if(!await isUrlReachable(_0x12714c)){_0x3bb190(_0x1cf949(0xf8));return;}_0x433af7(_0x12714c),_0x206d9d(_0x13a3df=>[..._0x13a3df,{'label':'JS\x20链接','value':_0x12714c}]),_0x5c00cf(''),_0x3bb190(''),_0xd789a8(_0x1cf949(0x129));return;}if(_0x1321ad[_0x1cf949(0x134)]||_0x1321ad[_0x1cf949(0x11b)]){_0x5c00cf(_0x436c9d=>_0x436c9d[_0x1cf949(0x114)](0x0,-0x1)),_0x3bb190('');return;}_0x5c00cf(_0x34a03c=>_0x34a03c+_0x206aeb);return;}if(_0x4910a2===_0x1cf949(0x129)){if(_0x1321ad[_0x1cf949(0x107)]){const _0x269c3a=_0x2ede33[_0x1cf949(0x11c)]();if(_0x269c3a==='')return;if(!isValidCssHttpsUrl(_0x269c3a)){_0x3bb190(_0x1cf949(0x117));return;}if(!await isUrlReachable(_0x269c3a)){_0x3bb190('CSS\x20链接无法访问');return;}_0x31e1f8(_0x269c3a),_0x206d9d(_0x59800c=>[..._0x59800c,{'label':_0x1cf949(0x130),'value':_0x269c3a}]),_0x5c00cf(''),_0x3bb190(''),_0xd789a8(_0x1cf949(0x128));const _0x984360=_0x9f80e3['filter']((_0x57cafe,_0x140b81)=>_0x12e937[_0x1cf949(0x135)](_0x140b81));createMenus(_0x984360,[_0x19a417,_0x269c3a])[_0x1cf949(0x115)](()=>{const _0x283416=_0x1cf949;_0xd789a8(_0x283416(0x110)),setTimeout(()=>{_0x5778a3();},0x3e8);})[_0x1cf949(0xf5)](_0x14b4a5=>{const _0x414827=_0x1cf949;_0x3bb190(_0x14b4a5[_0x414827(0x11a)]||_0x414827(0x104)),_0xd789a8(_0x414827(0xfa));});return;}if(_0x1321ad[_0x1cf949(0x134)]||_0x1321ad[_0x1cf949(0x11b)]){_0x5c00cf(_0x23b4d2=>_0x23b4d2['slice'](0x0,-0x1)),_0x3bb190('');return;}_0x5c00cf(_0x484c72=>_0x484c72+_0x206aeb);return;}});if(_0x24ceeb)return a12_0x63ccbb(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x9c48ca(Text,{'children':'\x20\x20'}),a12_0x9c48ca(a12_0x1084db,{'type':_0x281091(0x111)}),a12_0x9c48ca(Text,{'children':_0x281091(0x120)})]});if(_0x3c85f6)return a12_0x63ccbb(Box,{'flexDirection':_0x281091(0x105),'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x63ccbb(Text,{'color':_0x281091(0x131),'children':['✗\x20',_0x3c85f6]}),a12_0x63ccbb(Box,{'marginTop':0x1,'children':[a12_0x9c48ca(Text,{'color':_0x281091(0xf7),'children':_0x281091(0x118)}),a12_0x9c48ca(Text,{'color':_0x281091(0x126),'children':_0x281091(0x10e)}),a12_0x9c48ca(Text,{'color':'gray','children':_0x281091(0x123)})]})]});if(_0x9f80e3[_0x281091(0xfd)]===0x0)return a12_0x9c48ca(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a12_0x9c48ca(Text,{'color':_0x281091(0x112),'children':_0x281091(0x132)})});return a12_0x63ccbb(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[_0x4910a2===_0x281091(0xfa)&&a12_0x63ccbb(a12_0x3174b7,{'children':[a12_0x63ccbb(Box,{'children':[a12_0x63ccbb(Text,{'bold':!![],'children':['\x20\x20',_0x281091(0x124),getRemainingSpaces(_0x1e0c03,_0x281091(0x124))]}),a12_0x63ccbb(Text,{'bold':!![],'children':['本地',getRemainingSpaces(_0x149891,_0x281091(0x124))]}),a12_0x63ccbb(Text,{'bold':!![],'children':[_0x281091(0x121),getRemainingSpaces(_0x149891,_0x281091(0x124))]})]}),_0x5051d7[_0x281091(0xff)](_0xd9d5df=>a12_0x63ccbb(Box,{'children':[a12_0x63ccbb(Text,{'children':['\x20\x20',_0xd9d5df['label'],getRemainingSpaces(_0x1e0c03,_0xd9d5df[_0x281091(0x11d)])]}),a12_0x63ccbb(Text,{'color':'green','children':[_0xd9d5df[_0x281091(0xf4)]?'✓':'✗',getRemainingSpaces(_0x149891,'✓')]}),a12_0x63ccbb(Text,{'color':_0xd9d5df[_0x281091(0x109)]?_0x281091(0x13a):_0x281091(0x131),'children':[_0xd9d5df['online']?'✓':'✗',getRemainingSpaces(_0x149891,'✓')]})]},_0xd9d5df['path']))]}),_0x4910a2===_0x281091(0xfa)&&_0x1b3b1f[_0x281091(0xfd)]===0x0&&a12_0x9c48ca(Box,{'marginTop':0x1,'children':a12_0x9c48ca(Text,{'color':'cyan','children':_0x281091(0x10c)})}),_0x1b3b1f['map']((_0x31dce6,_0x1bc3e6)=>a12_0x63ccbb(Box,{'children':[a12_0x63ccbb(Text,{'color':_0x281091(0x13a),'children':['√\x20',_0x31dce6['label'],':\x20']}),a12_0x9c48ca(Text,{'color':_0x281091(0x126),'children':_0x31dce6[_0x281091(0x10f)]})]},_0x1bc3e6)),_0x214fa0&&_0x4910a2===_0x281091(0xfa)&&a12_0x9c48ca(Box,{'marginTop':0x1,'children':a12_0x63ccbb(Text,{'color':_0x281091(0x131),'children':['✗\x20',_0x214fa0]})}),_0x4910a2==='selecting'&&a12_0x9c48ca(a12_0x3174b7,{'children':a12_0x63ccbb(Box,{'marginTop':_0x1b3b1f[_0x281091(0xfd)]>0x0||_0x214fa0?0x1:0x0,'flexDirection':_0x281091(0x105),'children':[a12_0x9c48ca(Text,{'bold':!![],'children':'*\x20请选择要同步的菜单:'}),_0x9f80e3[_0x281091(0xff)]((_0x2801d9,_0x507dd4)=>{const _0x351421=_0x281091,_0x33b9db=_0x4297bd===_0x507dd4,_0x432361=_0x12e937['has'](_0x507dd4),_0x1e75b3=_0x4b285f[_0x351421(0x137)](_0x2801d9['path']),_0xb25a6b=_0x1e75b3?'更新':'新建';return a12_0x9c48ca(Box,{'children':a12_0x63ccbb(Text,{'backgroundColor':_0x33b9db?_0x351421(0x138):undefined,'color':_0x33b9db?_0x351421(0x12e):undefined,'children':['\x20\x20',_0x432361?_0x351421(0x136):_0x351421(0x101),'\x20',_0x2801d9[_0x351421(0x11d)]]})},_0x2801d9[_0x351421(0x10d)]);}),a12_0x9c48ca(Box,{'marginTop':0x1,'children':a12_0x63ccbb(Text,{'color':_0x281091(0xf7),'children':['\x20',_0x281091(0x12a)]})})]})}),_0x4910a2===_0x281091(0x12c)&&a12_0x63ccbb(a12_0x3174b7,{'children':[a12_0x63ccbb(Box,{'children':[a12_0x9c48ca(Text,{'children':_0x281091(0x102)}),a12_0x9c48ca(Text,{'color':_0x281091(0x13a),'children':_0x2ede33}),_0x214fa0&&a12_0x63ccbb(Text,{'color':_0x281091(0x131),'children':[_0x281091(0xf6),_0x214fa0]})]}),!_0x214fa0&&a12_0x9c48ca(Box,{'children':a12_0x9c48ca(Text,{'color':_0x281091(0xf7),'children':_0x281091(0x10a)})})]}),_0x4910a2===_0x281091(0x129)&&a12_0x63ccbb(a12_0x3174b7,{'children':[a12_0x63ccbb(Box,{'children':[a12_0x9c48ca(Text,{'children':_0x281091(0x12b)}),a12_0x9c48ca(Text,{'color':_0x281091(0x13a),'children':_0x2ede33}),_0x214fa0&&a12_0x63ccbb(Text,{'color':'red','children':[_0x281091(0xf6),_0x214fa0]})]}),!_0x214fa0&&a12_0x9c48ca(Box,{'children':a12_0x9c48ca(Text,{'color':'gray','children':_0x281091(0xf2)})})]}),_0x4910a2===_0x281091(0x128)&&a12_0x9c48ca(Box,{'children':a12_0x9c48ca(Text,{'children':'*\x20正在创建菜单...'})}),_0x4910a2==='done'&&a12_0x9c48ca(Box,{'children':a12_0x9c48ca(Text,{'color':_0x281091(0x13a),'children':_0x281091(0x103)})})]});}function getStringWidth(_0x3e09e5){const _0x1f48d6=a12_0x4970;let _0x1d749a=0x0;for(const _0x21aefb of _0x3e09e5){/[\u4e00-\u9fa5]/[_0x1f48d6(0x11f)](_0x21aefb)?_0x1d749a+=0x2:_0x1d749a+=0x1;}return _0x1d749a;}function getRemainingSpaces(_0x47a9e2,_0x2cb10e){const _0x59e722=a12_0x4970,_0x2863de=getStringWidth(_0x2cb10e);return Array(Math[_0x59e722(0xfc)](0x0,_0x47a9e2-_0x2863de))[_0x59e722(0x133)]('\x20')[_0x59e722(0xf3)]('');}function getMaxWidth(_0x3a6223,_0x3e54ad=0x2){const _0xa9e41c=a12_0x4970;let _0x4c5747='',_0x133a69=0x0;for(const _0x2584fd of _0x3a6223){const _0x3ea9ae=getStringWidth(_0x2584fd);_0x3ea9ae>_0x133a69&&(_0x133a69=_0x3ea9ae,_0x4c5747=_0x2584fd);}return _0x4c5747+'\x20'[_0xa9e41c(0x11e)](_0x3e54ad);}
1
+ (function(_0x5d8ebd,_0x14c31b){const _0x497ad1=a12_0x2e53,_0x34ee38=_0x5d8ebd();while(!![]){try{const _0x59035f=-parseInt(_0x497ad1(0x103))/0x1*(-parseInt(_0x497ad1(0xf0))/0x2)+parseInt(_0x497ad1(0xea))/0x3+parseInt(_0x497ad1(0xe3))/0x4*(parseInt(_0x497ad1(0xff))/0x5)+-parseInt(_0x497ad1(0xd7))/0x6+-parseInt(_0x497ad1(0xfc))/0x7*(-parseInt(_0x497ad1(0xca))/0x8)+-parseInt(_0x497ad1(0xfb))/0x9+-parseInt(_0x497ad1(0xdf))/0xa;if(_0x59035f===_0x14c31b)break;else _0x34ee38['push'](_0x34ee38['shift']());}catch(_0x208a4f){_0x34ee38['push'](_0x34ee38['shift']());}}}(a12_0x52fb,0xc84c5));import{jsx as a12_0x3f3357,jsxs as a12_0x5c7ba1,Fragment as a12_0x2be73b}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';function a12_0x52fb(){const _0x59d0ba=['*\x20CSS\x20链接:\x20','请输入有效的\x20JS\x20https\x20链接','trim','creating','13248342MlNinT','35WeYueI','delete','blue','5gDxvnJ','column','yellow','!\x20未找到本地页面,请先创建页面','5lsEsfa','add','backspace','max','JS\x20链接','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','done','has','upArrow','downArrow','\x20命令重新登录','CSS\x20链接无法访问','input-css','length','join','red','642888AHdJcw','size','请至少选择一个菜单','[\x20]','\x20输入项目的\x20JS\x20资源链接(https://...)','\x20正在获取线上菜单列表...','green','请输入有效的\x20CSS\x20https\x20链接','slice','*\x20同步菜单到\x20Lovrabet\x20平台','value','return','菜单名称','3369822erKBDp','cyan','then','map','JS\x20链接无法访问','√\x20菜单创建完成','local','\x20←\x20','7874570JogqEO','includes','catch','online','1872308GhYUZh','lovrabet\x20auth','filter','fill','path','selecting','*\x20正在创建菜单...','3790968oxxTVl','label','input-js','repeat','test','*\x20JS\x20链接:\x20','603206vsVYVt','\x20输入项目的\x20CSS\x20资源链接(https://...)','创建菜单失败','message','gray','white','已选择菜单'];a12_0x52fb=function(){return _0x59d0ba;};return a12_0x52fb();}import{useEffect,useState}from'react';import a12_0x202c94 from'ink-spinner';import{useGetOnlineMenuList}from'./use-get-online-menu-list.js';import{getLocalPages}from'./get-local-pages.js';import{createMenus}from'./create-menu.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import.meta.main&&render(a12_0x3f3357(AppMenuSyncUI,{}));export function AppMenuSyncUI(){const _0x121af4=a12_0x2e53,{exit:_0x112782}=useApp(),{loading:_0x2189c3,menuList:_0x163127,error:_0x3d0946}=useGetOnlineMenuList(),_0x4af717=getLocalPages(),_0x152e51=_0x163127[_0x121af4(0xda)](_0x172f59=>_0x172f59['path']),_0x510526=[_0x121af4(0xd6),..._0x4af717[_0x121af4(0xda)](_0x5b9c8b=>_0x5b9c8b[_0x121af4(0xeb)])],_0x5c65af=getStringWidth(getMaxWidth(_0x510526,0x4)),_0x5a3f33=getStringWidth(getMaxWidth([_0x121af4(0xd6)])),[_0x355caf,_0x4b1af1]=useState(_0x121af4(0xe8)),[_0x500329,_0x54c107]=useState(new Set()),[_0x5c7bdd,_0x43bb41]=useState(0x0),[_0x125cb0,_0x5b86ec]=useState(''),[_0x515aff,_0x5ebc77]=useState(''),[_0x22e5f4,_0x49922b]=useState(''),[_0x3256d9,_0x27bde4]=useState(''),[_0x3af769,_0x2decc3]=useState([]),_0x11d011=_0x4af717[_0x121af4(0xda)](_0x379df4=>({'label':_0x379df4[_0x121af4(0xeb)],'path':_0x379df4[_0x121af4(0xe7)],'local':!![],'online':_0x152e51[_0x121af4(0xe0)](_0x379df4[_0x121af4(0xe7)])})),_0x424e52=_0x4af717[_0x121af4(0xe5)](_0x13775c=>{const _0xa64549=_0x121af4;return!_0x152e51[_0xa64549(0xe0)](_0x13775c['path']);});useEffect(()=>{const _0x1928ff=_0x121af4;if(!_0x2189c3&&_0x4af717[_0x1928ff(0xc7)]>0x0&&_0x500329[_0x1928ff(0xcb)]===0x0){const _0x2a1c06=new Set(_0x4af717[_0x1928ff(0xda)]((_0x1c8073,_0x7093b8)=>({'page':_0x1c8073,'index':_0x7093b8}))[_0x1928ff(0xe5)](({page:_0x4d263e})=>!_0x152e51['includes'](_0x4d263e[_0x1928ff(0xe7)]))[_0x1928ff(0xda)](({index:_0x3d1869})=>_0x3d1869));_0x54c107(_0x2a1c06);}},[_0x2189c3,_0x4af717[_0x121af4(0xc7)],_0x152e51['length']]),useInput(async(_0x57a76c,_0x3844fc)=>{const _0x3e09e6=_0x121af4;if(_0x355caf===_0x3e09e6(0xe8)){if(_0x3844fc[_0x3e09e6(0xc2)]){_0x43bb41(_0x148e2b=>_0x148e2b>0x0?_0x148e2b-0x1:_0x4af717[_0x3e09e6(0xc7)]-0x1);return;}if(_0x3844fc[_0x3e09e6(0xc3)]){_0x43bb41(_0x3c5b2d=>_0x3c5b2d<_0x4af717[_0x3e09e6(0xc7)]-0x1?_0x3c5b2d+0x1:0x0);return;}if(_0x57a76c==='\x20'){_0x54c107(_0x1f2e40=>{const _0x4ab496=_0x3e09e6,_0x4da98c=new Set(_0x1f2e40);return _0x4da98c[_0x4ab496(0xc1)](_0x5c7bdd)?_0x4da98c['delete'](_0x5c7bdd):_0x4da98c[_0x4ab496(0xbb)](_0x5c7bdd),_0x4da98c;});return;}if(_0x57a76c==='a'||_0x57a76c==='A'){const _0x17b561=new Set(_0x4af717['map']((_0x5591c8,_0x201c5f)=>_0x201c5f));_0x54c107(_0x17b561);return;}if(_0x57a76c==='i'||_0x57a76c==='I'||_0x57a76c==='r'||_0x57a76c==='R'){_0x54c107(_0x141da5=>{const _0x40a888=_0x3e09e6,_0x26d0e2=new Set();for(let _0x1f69c7=0x0;_0x1f69c7<_0x4af717[_0x40a888(0xc7)];_0x1f69c7++){!_0x141da5[_0x40a888(0xc1)](_0x1f69c7)&&_0x26d0e2[_0x40a888(0xbb)](_0x1f69c7);}return _0x26d0e2;});return;}if(_0x57a76c==='q'||_0x57a76c==='Q'){_0x112782();return;}if(_0x3844fc[_0x3e09e6(0xd5)]){if(_0x500329[_0x3e09e6(0xcb)]===0x0){_0x27bde4(_0x3e09e6(0xcc));return;}const _0x11e79c=_0x4af717[_0x3e09e6(0xe5)]((_0x58d09d,_0x2f1ae3)=>_0x500329[_0x3e09e6(0xc1)](_0x2f1ae3)),_0x4dd736=_0x11e79c[_0x3e09e6(0xda)](_0x364659=>_0x364659[_0x3e09e6(0xeb)])[_0x3e09e6(0xc8)](',\x20');_0x2decc3([{'label':_0x3e09e6(0xf6),'value':_0x500329[_0x3e09e6(0xcb)]+'\x20个'}]),_0x27bde4(''),_0x4b1af1(_0x3e09e6(0xec));return;}return;}if(_0x355caf===_0x3e09e6(0xec)){if(_0x3844fc[_0x3e09e6(0xd5)]){const _0x430094=_0x22e5f4[_0x3e09e6(0xf9)]();if(_0x430094==='')return;if(!isValidJsHttpsUrl(_0x430094)){_0x27bde4(_0x3e09e6(0xf8));return;}if(!await isUrlReachable(_0x430094)){_0x27bde4(_0x3e09e6(0xdb));return;}_0x5b86ec(_0x430094),_0x2decc3(_0x42ac5a=>[..._0x42ac5a,{'label':_0x3e09e6(0xbe),'value':_0x430094}]),_0x49922b(''),_0x27bde4(''),_0x4b1af1('input-css');return;}if(_0x3844fc[_0x3e09e6(0xbc)]||_0x3844fc['delete']){_0x49922b(_0x5efa2a=>_0x5efa2a[_0x3e09e6(0xd2)](0x0,-0x1)),_0x27bde4('');return;}_0x49922b(_0x469ad3=>_0x469ad3+_0x57a76c);return;}if(_0x355caf===_0x3e09e6(0xc6)){if(_0x3844fc[_0x3e09e6(0xd5)]){const _0x19988c=_0x22e5f4[_0x3e09e6(0xf9)]();if(_0x19988c==='')return;if(!isValidCssHttpsUrl(_0x19988c)){_0x27bde4(_0x3e09e6(0xd1));return;}if(!await isUrlReachable(_0x19988c)){_0x27bde4(_0x3e09e6(0xc5));return;}_0x5ebc77(_0x19988c),_0x2decc3(_0x55cbcb=>[..._0x55cbcb,{'label':'CSS\x20链接','value':_0x19988c}]),_0x49922b(''),_0x27bde4(''),_0x4b1af1(_0x3e09e6(0xfa));const _0x9dc61=_0x4af717[_0x3e09e6(0xe5)]((_0x171515,_0x361a72)=>_0x500329[_0x3e09e6(0xc1)](_0x361a72));createMenus(_0x9dc61,[_0x125cb0,_0x19988c])[_0x3e09e6(0xd9)](()=>{const _0x26f07e=_0x3e09e6;_0x4b1af1(_0x26f07e(0xc0)),setTimeout(()=>{_0x112782();},0x3e8);})[_0x3e09e6(0xe1)](_0x4f62e6=>{const _0x3540a7=_0x3e09e6;_0x27bde4(_0x4f62e6[_0x3540a7(0xf3)]||_0x3540a7(0xf2)),_0x4b1af1(_0x3540a7(0xe8));});return;}if(_0x3844fc[_0x3e09e6(0xbc)]||_0x3844fc[_0x3e09e6(0xfd)]){_0x49922b(_0x5edc22=>_0x5edc22[_0x3e09e6(0xd2)](0x0,-0x1)),_0x27bde4('');return;}_0x49922b(_0x7e905c=>_0x7e905c+_0x57a76c);return;}});if(_0x2189c3)return a12_0x5c7ba1(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x3f3357(Text,{'children':'\x20\x20'}),a12_0x3f3357(a12_0x202c94,{'type':'dots'}),a12_0x3f3357(Text,{'children':_0x121af4(0xcf)})]});if(_0x3d0946)return a12_0x5c7ba1(Box,{'flexDirection':_0x121af4(0x100),'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x5c7ba1(Text,{'color':_0x121af4(0xc9),'children':['✗\x20',_0x3d0946]}),a12_0x5c7ba1(Box,{'marginTop':0x1,'children':[a12_0x3f3357(Text,{'color':'gray','children':'提示:使用\x20'}),a12_0x3f3357(Text,{'color':_0x121af4(0xd8),'children':_0x121af4(0xe4)}),a12_0x3f3357(Text,{'color':_0x121af4(0xf4),'children':_0x121af4(0xc4)})]})]});if(_0x4af717[_0x121af4(0xc7)]===0x0)return a12_0x3f3357(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a12_0x3f3357(Text,{'color':_0x121af4(0x101),'children':_0x121af4(0x102)})});return a12_0x5c7ba1(Box,{'flexDirection':_0x121af4(0x100),'marginTop':0x1,'marginBottom':0x1,'children':[_0x355caf===_0x121af4(0xe8)&&a12_0x5c7ba1(a12_0x2be73b,{'children':[a12_0x5c7ba1(Box,{'children':[a12_0x5c7ba1(Text,{'bold':!![],'children':['\x20\x20',_0x121af4(0xd6),getRemainingSpaces(_0x5c65af,_0x121af4(0xd6))]}),a12_0x5c7ba1(Text,{'bold':!![],'children':['本地',getRemainingSpaces(_0x5a3f33,_0x121af4(0xd6))]}),a12_0x5c7ba1(Text,{'bold':!![],'children':['Lovrabet平台',getRemainingSpaces(_0x5a3f33,_0x121af4(0xd6))]})]}),_0x11d011[_0x121af4(0xda)](_0x1371a7=>a12_0x5c7ba1(Box,{'children':[a12_0x5c7ba1(Text,{'children':['\x20\x20',_0x1371a7[_0x121af4(0xeb)],getRemainingSpaces(_0x5c65af,_0x1371a7[_0x121af4(0xeb)])]}),a12_0x5c7ba1(Text,{'color':_0x121af4(0xd0),'children':[_0x1371a7[_0x121af4(0xdd)]?'✓':'✗',getRemainingSpaces(_0x5a3f33,'✓')]}),a12_0x5c7ba1(Text,{'color':_0x1371a7['online']?'green':_0x121af4(0xc9),'children':[_0x1371a7[_0x121af4(0xe2)]?'✓':'✗',getRemainingSpaces(_0x5a3f33,'✓')]})]},_0x1371a7[_0x121af4(0xe7)]))]}),_0x355caf===_0x121af4(0xe8)&&_0x3af769['length']===0x0&&a12_0x3f3357(Box,{'marginTop':0x1,'children':a12_0x3f3357(Text,{'color':'cyan','children':_0x121af4(0xd3)})}),_0x3af769[_0x121af4(0xda)]((_0x3dc4f5,_0x5dce1)=>a12_0x5c7ba1(Box,{'children':[a12_0x5c7ba1(Text,{'color':'green','children':['√\x20',_0x3dc4f5[_0x121af4(0xeb)],':\x20']}),a12_0x3f3357(Text,{'color':_0x121af4(0xd8),'children':_0x3dc4f5[_0x121af4(0xd4)]})]},_0x5dce1)),_0x3256d9&&_0x355caf===_0x121af4(0xe8)&&a12_0x3f3357(Box,{'marginTop':0x1,'children':a12_0x5c7ba1(Text,{'color':_0x121af4(0xc9),'children':['✗\x20',_0x3256d9]})}),_0x355caf==='selecting'&&a12_0x3f3357(a12_0x2be73b,{'children':a12_0x5c7ba1(Box,{'marginTop':_0x3af769[_0x121af4(0xc7)]>0x0||_0x3256d9?0x1:0x0,'flexDirection':_0x121af4(0x100),'children':[a12_0x3f3357(Text,{'bold':!![],'children':'*\x20请选择要同步的菜单:'}),_0x4af717[_0x121af4(0xda)]((_0x4cf289,_0x526766)=>{const _0xb45f92=_0x121af4,_0x1593cd=_0x5c7bdd===_0x526766,_0x1d4e8f=_0x500329['has'](_0x526766),_0x55c3c3=_0x152e51[_0xb45f92(0xe0)](_0x4cf289[_0xb45f92(0xe7)]),_0x580564=_0x55c3c3?'更新':'新建';return a12_0x3f3357(Box,{'children':a12_0x5c7ba1(Text,{'backgroundColor':_0x1593cd?_0xb45f92(0xfe):undefined,'color':_0x1593cd?_0xb45f92(0xf5):undefined,'children':['\x20\x20',_0x1d4e8f?'[✓]':_0xb45f92(0xcd),'\x20',_0x4cf289['label']]})},_0x4cf289[_0xb45f92(0xe7)]);}),a12_0x3f3357(Box,{'marginTop':0x1,'children':a12_0x5c7ba1(Text,{'color':_0x121af4(0xf4),'children':['\x20',_0x121af4(0xbf)]})})]})}),_0x355caf===_0x121af4(0xec)&&a12_0x5c7ba1(a12_0x2be73b,{'children':[a12_0x5c7ba1(Box,{'children':[a12_0x3f3357(Text,{'children':_0x121af4(0xef)}),a12_0x3f3357(Text,{'color':_0x121af4(0xd0),'children':_0x22e5f4}),_0x3256d9&&a12_0x5c7ba1(Text,{'color':_0x121af4(0xc9),'children':['\x20←\x20',_0x3256d9]})]}),!_0x3256d9&&a12_0x3f3357(Box,{'children':a12_0x3f3357(Text,{'color':_0x121af4(0xf4),'children':_0x121af4(0xce)})})]}),_0x355caf==='input-css'&&a12_0x5c7ba1(a12_0x2be73b,{'children':[a12_0x5c7ba1(Box,{'children':[a12_0x3f3357(Text,{'children':_0x121af4(0xf7)}),a12_0x3f3357(Text,{'color':_0x121af4(0xd0),'children':_0x22e5f4}),_0x3256d9&&a12_0x5c7ba1(Text,{'color':_0x121af4(0xc9),'children':[_0x121af4(0xde),_0x3256d9]})]}),!_0x3256d9&&a12_0x3f3357(Box,{'children':a12_0x3f3357(Text,{'color':'gray','children':_0x121af4(0xf1)})})]}),_0x355caf===_0x121af4(0xfa)&&a12_0x3f3357(Box,{'children':a12_0x3f3357(Text,{'children':_0x121af4(0xe9)})}),_0x355caf===_0x121af4(0xc0)&&a12_0x3f3357(Box,{'children':a12_0x3f3357(Text,{'color':'green','children':_0x121af4(0xdc)})})]});}function getStringWidth(_0x3e5d52){const _0x2908ea=a12_0x2e53;let _0x3ad012=0x0;for(const _0x4de7f7 of _0x3e5d52){/[\u4e00-\u9fa5]/[_0x2908ea(0xee)](_0x4de7f7)?_0x3ad012+=0x2:_0x3ad012+=0x1;}return _0x3ad012;}function getRemainingSpaces(_0x5753b2,_0x38925d){const _0x458bab=a12_0x2e53,_0x39ac66=getStringWidth(_0x38925d);return Array(Math[_0x458bab(0xbd)](0x0,_0x5753b2-_0x39ac66))[_0x458bab(0xe6)]('\x20')['join']('');}function a12_0x2e53(_0x21f5b9,_0x47634b){_0x21f5b9=_0x21f5b9-0xbb;const _0x52fb9c=a12_0x52fb();let _0x2e5374=_0x52fb9c[_0x21f5b9];return _0x2e5374;}function getMaxWidth(_0x306b3f,_0xa3d691=0x2){const _0x2c5257=a12_0x2e53;let _0x517d43='',_0x34d138=0x0;for(const _0x5b7fc0 of _0x306b3f){const _0x1a4299=getStringWidth(_0x5b7fc0);_0x1a4299>_0x34d138&&(_0x34d138=_0x1a4299,_0x517d43=_0x5b7fc0);}return _0x517d43+'\x20'[_0x2c5257(0xed)](_0xa3d691);}
@@ -1 +1 @@
1
- (function(_0xdfbf96,_0x3f0b11){const _0x35809b=a13_0x83a0,_0x4a4132=_0xdfbf96();while(!![]){try{const _0x5d3444=-parseInt(_0x35809b(0x118))/0x1+parseInt(_0x35809b(0x105))/0x2+-parseInt(_0x35809b(0x111))/0x3*(-parseInt(_0x35809b(0x106))/0x4)+parseInt(_0x35809b(0x11e))/0x5+-parseInt(_0x35809b(0x11b))/0x6+parseInt(_0x35809b(0x101))/0x7+-parseInt(_0x35809b(0x123))/0x8*(parseInt(_0x35809b(0x119))/0x9);if(_0x5d3444===_0x3f0b11)break;else _0x4a4132['push'](_0x4a4132['shift']());}catch(_0x212495){_0x4a4132['push'](_0x4a4132['shift']());}}}(a13_0x397f,0xabdbe));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();function a13_0x397f(){const _0x5e52e0=['/smartapi/menu/create','6178725MomEAm','info','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','0011','开始批量创建菜单,共\x20','64VUQmMv','all','log','create-menu','json','resources','create-menus','创建菜单成功:','8446823CCHeal','errorMsg','stringify','success','1951650OSFehI','1575172gVpsec','appcode','未提供应用AppCode,且配置中也没有默认值','status','菜单创建成功:\x20','map','label','data','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','POST','procode','9ZrJccS','path','application/json','未知错误','正在创建菜单:\x20','errorCode','error','5288Bnhptp','4086486FEsqSF','创建菜单失败:\x20','1547904CvRszN','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录'];a13_0x397f=function(){return _0x5e52e0;};return a13_0x397f();}export async function createMenu(_0xba93d8){const _0x288d1c=a13_0x83a0,_0xf3ecf1=config?.[_0x288d1c(0x107)];if(!_0xf3ecf1){const _0x418c82=_0x288d1c(0x108);logger['error'](_0x288d1c(0xfc),_0x418c82),console[_0x288d1c(0x117)]('×\x20'+_0x418c82),console[_0x288d1c(0xfb)]('!\x20请使用以下方式之一:'),console[_0x288d1c(0xfb)](_0x288d1c(0x10e)),console['log'](_0x288d1c(0x120));return;}logger['info'](_0x288d1c(0xfc),_0x288d1c(0x115)+_0xba93d8['label']+'\x20('+_0xba93d8[_0x288d1c(0x112)]+')');const _0x38993f={'appCode':_0xf3ecf1,'type':'procode','sort':0x0,'extend':{'loadScriptMode':'import','resources':_0xba93d8[_0x288d1c(0xfe)]?JSON[_0x288d1c(0x103)](_0xba93d8[_0x288d1c(0xfe)]):undefined},..._0xba93d8},_0x683271=await fetch(getApiDomain()+_0x288d1c(0x11d),{'method':'POST','body':JSON[_0x288d1c(0x103)](_0x38993f),'headers':{'Content-Type':_0x288d1c(0x113),'Cookie':getCookie()}});if(!_0x683271['ok']){if(_0x683271[_0x288d1c(0x109)]===0x191){const _0x394b36='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x288d1c(0x117)]('create-menu',_0x394b36,{'status':_0x683271['status'],'menu':_0xba93d8[_0x288d1c(0x10c)]});throw new Error(_0x394b36);}const _0x3a19d6='创建菜单失败,HTTP状态码:\x20'+_0x683271[_0x288d1c(0x109)];logger[_0x288d1c(0x117)](_0x288d1c(0xfc),_0x3a19d6,{'menu':_0xba93d8[_0x288d1c(0x10c)]});throw new Error(_0x3a19d6);}const _0x1cf569=await _0x683271[_0x288d1c(0xfd)]();if(!_0x1cf569[_0x288d1c(0x104)]){const _0x38d88c=_0x288d1c(0x11a)+(_0x1cf569[_0x288d1c(0x102)]||_0x288d1c(0x114));logger[_0x288d1c(0x117)](_0x288d1c(0xfc),_0x38d88c,{'errorCode':_0x1cf569['errorCode'],'errorMsg':_0x1cf569[_0x288d1c(0x102)],'menu':_0xba93d8['label']});throw new Error(_0x38d88c);}logger['info'](_0x288d1c(0xfc),'菜单创建成功:\x20'+_0xba93d8[_0x288d1c(0x10c)],_0x1cf569[_0x288d1c(0x10d)]),console['log'](_0x288d1c(0x100),_0x1cf569['data']);}async function _createMenu(_0x24cabb,_0x4b4381){const _0x3a517a=a13_0x83a0,_0x3c086f=config?.[_0x3a517a(0x107)];if(!_0x3c086f){const _0x3b5ad3=_0x3a517a(0x108);logger[_0x3a517a(0x117)]('create-menu',_0x3b5ad3),console[_0x3a517a(0x117)]('×\x20'+_0x3b5ad3),console['log']('!\x20请使用以下方式之一:'),console[_0x3a517a(0xfb)](_0x3a517a(0x10e)),console['log'](_0x3a517a(0x120));return;}const _0x3e5e0b={'appCode':_0x3c086f,'type':_0x3a517a(0x110),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x4b4381?JSON[_0x3a517a(0x103)](_0x4b4381):undefined},'label':_0x24cabb['label'],'path':_0x24cabb[_0x3a517a(0x112)]},_0x339613=await fetch(getApiDomain()+_0x3a517a(0x11d),{'method':_0x3a517a(0x10f),'body':JSON[_0x3a517a(0x103)](_0x3e5e0b),'headers':{'Content-Type':_0x3a517a(0x113),'Cookie':getCookie()}});if(!_0x339613['ok']){if(_0x339613[_0x3a517a(0x109)]===0x191){const _0x1b9361='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x3a517a(0x117)]('create-menu',_0x1b9361,{'status':_0x339613[_0x3a517a(0x109)],'menu':_0x24cabb['label']});throw new Error(_0x1b9361);}const _0x1e41a3='创建菜单失败,HTTP状态码:\x20'+_0x339613['status'];logger[_0x3a517a(0x117)](_0x3a517a(0xfc),_0x1e41a3,{'menu':_0x24cabb[_0x3a517a(0x10c)]});throw new Error(_0x1e41a3);}const _0x4499c4=await _0x339613[_0x3a517a(0xfd)]();if(!_0x4499c4[_0x3a517a(0x104)]){if(_0x4499c4['errorCode']===_0x3a517a(0x121)||_0x4499c4[_0x3a517a(0x102)]?.['includes']('登录')){const _0x276704=_0x3a517a(0x11c);logger[_0x3a517a(0x117)]('create-menu',_0x276704,{'errorCode':_0x4499c4[_0x3a517a(0x116)],'errorMsg':_0x4499c4[_0x3a517a(0x102)],'menu':_0x24cabb['label']});throw new Error(_0x276704);}const _0x505924='创建菜单失败:\x20'+(_0x4499c4[_0x3a517a(0x102)]||_0x3a517a(0x114));logger[_0x3a517a(0x117)](_0x3a517a(0xfc),_0x505924,{'errorCode':_0x4499c4[_0x3a517a(0x116)],'errorMsg':_0x4499c4[_0x3a517a(0x102)],'menu':_0x24cabb[_0x3a517a(0x10c)]});throw new Error(_0x505924);}logger[_0x3a517a(0x11f)](_0x3a517a(0xfc),_0x3a517a(0x10a)+_0x24cabb[_0x3a517a(0x10c)]);}function a13_0x83a0(_0x2f4b1f,_0x1b1173){_0x2f4b1f=_0x2f4b1f-0xfb;const _0x397f7f=a13_0x397f();let _0x83a0c5=_0x397f7f[_0x2f4b1f];return _0x83a0c5;}export async function createMenus(_0x35c540,_0x53d61d){const _0x14ee09=a13_0x83a0;logger[_0x14ee09(0x11f)](_0x14ee09(0xff),_0x14ee09(0x122)+_0x35c540['length']+'\x20个'),await Promise[_0x14ee09(0x124)](_0x35c540[_0x14ee09(0x10b)](async _0x227c76=>{await _createMenu(_0x227c76,_0x53d61d);})),logger['info'](_0x14ee09(0xff),'批量创建菜单完成,共\x20'+_0x35c540['length']+'\x20个');}
1
+ (function(_0x177558,_0x3d7afa){const _0x4048e5=a13_0x43dc,_0x75004=_0x177558();while(!![]){try{const _0x96b116=-parseInt(_0x4048e5(0x100))/0x1+parseInt(_0x4048e5(0xf3))/0x2*(-parseInt(_0x4048e5(0xfe))/0x3)+-parseInt(_0x4048e5(0xfd))/0x4*(-parseInt(_0x4048e5(0xd9))/0x5)+parseInt(_0x4048e5(0xe7))/0x6*(-parseInt(_0x4048e5(0x103))/0x7)+parseInt(_0x4048e5(0xdc))/0x8+-parseInt(_0x4048e5(0xfc))/0x9+parseInt(_0x4048e5(0xf7))/0xa;if(_0x96b116===_0x3d7afa)break;else _0x75004['push'](_0x75004['shift']());}catch(_0xec9d7e){_0x75004['push'](_0x75004['shift']());}}}(a13_0x40c7,0xb4883));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a13_0x40c7(){const _0x980afb=['success','正在创建菜单:\x20','json','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','!\x20请使用以下方式之一:','errorCode','/smartapi/menu/create','POST','0011','6wwPGMY','stringify','创建菜单成功:','import','all','info','errorMsg','error','label','创建菜单失败:\x20','includes','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','498sczAly','resources','create-menus','application/json','16401220MuOqBM','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','procode','status','data','6276924GLyHBO','108hfhZog','11379HZPorK','appcode','765500zFUhbe','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','create-menu','1705669wmxiwe','log','path','127665lrHorE','批量创建菜单完成,共\x20','菜单创建成功:\x20','8488048vPexjE','未提供应用AppCode,且配置中也没有默认值'];a13_0x40c7=function(){return _0x980afb;};return a13_0x40c7();}function a13_0x43dc(_0xbc9bf0,_0x4c03f9){_0xbc9bf0=_0xbc9bf0-0xd8;const _0x40c739=a13_0x40c7();let _0x43dce4=_0x40c739[_0xbc9bf0];return _0x43dce4;}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();export async function createMenu(_0x272848){const _0x318436=a13_0x43dc,_0x319a72=config?.[_0x318436(0xff)];if(!_0x319a72){const _0x59609c=_0x318436(0xdd);logger[_0x318436(0xee)](_0x318436(0x102),_0x59609c),console[_0x318436(0xee)]('×\x20'+_0x59609c),console['log']('!\x20请使用以下方式之一:'),console[_0x318436(0x104)](_0x318436(0x101)),console[_0x318436(0x104)]('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>');return;}logger[_0x318436(0xec)](_0x318436(0x102),_0x318436(0xdf)+_0x272848[_0x318436(0xef)]+'\x20('+_0x272848[_0x318436(0xd8)]+')');const _0x4b03c7={'appCode':_0x319a72,'type':_0x318436(0xf9),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x272848[_0x318436(0xf4)]?JSON['stringify'](_0x272848[_0x318436(0xf4)]):undefined},..._0x272848},_0x2e53f7=await fetch(getApiDomain()+_0x318436(0xe4),{'method':'POST','body':JSON[_0x318436(0xe8)](_0x4b03c7),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x2e53f7['ok']){if(_0x2e53f7['status']===0x191){const _0x740b69='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x318436(0xee)]('create-menu',_0x740b69,{'status':_0x2e53f7[_0x318436(0xfa)],'menu':_0x272848[_0x318436(0xef)]});throw new Error(_0x740b69);}const _0x120cae='创建菜单失败,HTTP状态码:\x20'+_0x2e53f7[_0x318436(0xfa)];logger[_0x318436(0xee)](_0x318436(0x102),_0x120cae,{'menu':_0x272848['label']});throw new Error(_0x120cae);}const _0x269dbf=await _0x2e53f7[_0x318436(0xe0)]();if(!_0x269dbf['success']){const _0x257863='创建菜单失败:\x20'+(_0x269dbf[_0x318436(0xed)]||'未知错误');logger[_0x318436(0xee)](_0x318436(0x102),_0x257863,{'errorCode':_0x269dbf['errorCode'],'errorMsg':_0x269dbf[_0x318436(0xed)],'menu':_0x272848[_0x318436(0xef)]});throw new Error(_0x257863);}logger[_0x318436(0xec)](_0x318436(0x102),_0x318436(0xdb)+_0x272848['label'],_0x269dbf[_0x318436(0xfb)]),console[_0x318436(0x104)](_0x318436(0xe9),_0x269dbf['data']);}async function _createMenu(_0x395089,_0x2878fc){const _0x41de0b=a13_0x43dc,_0x5b7148=config?.[_0x41de0b(0xff)];if(!_0x5b7148){const _0x59c380=_0x41de0b(0xdd);logger['error']('create-menu',_0x59c380),console[_0x41de0b(0xee)]('×\x20'+_0x59c380),console[_0x41de0b(0x104)](_0x41de0b(0xe2)),console[_0x41de0b(0x104)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console[_0x41de0b(0x104)](_0x41de0b(0xf2));return;}const _0x37d948={'appCode':_0x5b7148,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x41de0b(0xea),'resources':_0x2878fc?JSON[_0x41de0b(0xe8)](_0x2878fc):undefined},'label':_0x395089['label'],'path':_0x395089[_0x41de0b(0xd8)]},_0x10029c=await fetch(getApiDomain()+_0x41de0b(0xe4),{'method':_0x41de0b(0xe5),'body':JSON[_0x41de0b(0xe8)](_0x37d948),'headers':{'Content-Type':_0x41de0b(0xf6),'Cookie':getCookie()}});if(!_0x10029c['ok']){if(_0x10029c['status']===0x191){const _0x2be655=_0x41de0b(0xe1);logger[_0x41de0b(0xee)](_0x41de0b(0x102),_0x2be655,{'status':_0x10029c['status'],'menu':_0x395089[_0x41de0b(0xef)]});throw new Error(_0x2be655);}const _0x9dbb34='创建菜单失败,HTTP状态码:\x20'+_0x10029c[_0x41de0b(0xfa)];logger['error'](_0x41de0b(0x102),_0x9dbb34,{'menu':_0x395089[_0x41de0b(0xef)]});throw new Error(_0x9dbb34);}const _0x1fc932=await _0x10029c[_0x41de0b(0xe0)]();if(!_0x1fc932[_0x41de0b(0xde)]){if(_0x1fc932[_0x41de0b(0xe3)]===_0x41de0b(0xe6)||_0x1fc932['errorMsg']?.[_0x41de0b(0xf1)]('登录')){const _0x807dba=_0x41de0b(0xf8);logger['error'](_0x41de0b(0x102),_0x807dba,{'errorCode':_0x1fc932['errorCode'],'errorMsg':_0x1fc932['errorMsg'],'menu':_0x395089[_0x41de0b(0xef)]});throw new Error(_0x807dba);}const _0x297fce=_0x41de0b(0xf0)+(_0x1fc932[_0x41de0b(0xed)]||'未知错误');logger[_0x41de0b(0xee)](_0x41de0b(0x102),_0x297fce,{'errorCode':_0x1fc932['errorCode'],'errorMsg':_0x1fc932[_0x41de0b(0xed)],'menu':_0x395089[_0x41de0b(0xef)]});throw new Error(_0x297fce);}logger[_0x41de0b(0xec)](_0x41de0b(0x102),_0x41de0b(0xdb)+_0x395089[_0x41de0b(0xef)]);}export async function createMenus(_0x4326d6,_0x521205){const _0x1fbc9c=a13_0x43dc;logger[_0x1fbc9c(0xec)](_0x1fbc9c(0xf5),'开始批量创建菜单,共\x20'+_0x4326d6['length']+'\x20个'),await Promise[_0x1fbc9c(0xeb)](_0x4326d6['map'](async _0xef7d0c=>{await _createMenu(_0xef7d0c,_0x521205);})),logger[_0x1fbc9c(0xec)]('create-menus',_0x1fbc9c(0xda)+_0x4326d6['length']+'\x20个');}
@@ -1 +1 @@
1
- const a14_0x2aa685=a14_0xa6f2;(function(_0x1e2d5d,_0x19d893){const _0x2ee9aa=a14_0xa6f2,_0x3e9555=_0x1e2d5d();while(!![]){try{const _0x9965be=-parseInt(_0x2ee9aa(0x18a))/0x1+-parseInt(_0x2ee9aa(0x198))/0x2+-parseInt(_0x2ee9aa(0x187))/0x3*(-parseInt(_0x2ee9aa(0x184))/0x4)+-parseInt(_0x2ee9aa(0x193))/0x5*(-parseInt(_0x2ee9aa(0x18b))/0x6)+-parseInt(_0x2ee9aa(0x18d))/0x7+parseInt(_0x2ee9aa(0x18c))/0x8+-parseInt(_0x2ee9aa(0x191))/0x9;if(_0x9965be===_0x19d893)break;else _0x3e9555['push'](_0x3e9555['shift']());}catch(_0x25c22e){_0x3e9555['push'](_0x3e9555['shift']());}}}(a14_0x1028,0x6b45c));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a14_0x2aa685(0x192)](),a14_0x2aa685(0x186));function a14_0xa6f2(_0x30cf40,_0x1770c0){_0x30cf40=_0x30cf40-0x183;const _0x1028a9=a14_0x1028();let _0xa6f2f2=_0x1028a9[_0x30cf40];return _0xa6f2f2;}export function extractTitleFromComment(_0x18848e){const _0x81f347=a14_0x2aa685;try{const _0x117e5d=readFileSync(_0x18848e,_0x81f347(0x183)),_0x5a805e=_0x117e5d[_0x81f347(0x19b)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x5a805e&&_0x5a805e[0x1]){const _0x249dc3=_0x5a805e[0x1],_0x336b49=_0x249dc3['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x336b49&&_0x336b49[0x1])return _0x336b49[0x1][_0x81f347(0x196)]();}let _0x27cb80=null;const _0x4f3ed3=_0x117e5d[_0x81f347(0x19b)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x4f3ed3&&_0x4f3ed3[0x1]&&(_0x27cb80=_0x4f3ed3[0x1]);if(!_0x27cb80){const _0x1aaafc=_0x117e5d[_0x81f347(0x19b)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x1aaafc&&_0x1aaafc[0x1]&&(_0x27cb80=_0x1aaafc[0x1]);}if(_0x27cb80){const _0x46283d=new RegExp('\x5cb'+_0x27cb80+_0x81f347(0x195)),_0x943c2b=_0x117e5d[_0x81f347(0x19b)](_0x46283d);if(_0x943c2b&&_0x943c2b[0x1])return _0x943c2b[0x1];return _0x27cb80;}return null;}catch(_0x34fa71){return null;}}export function getLocalPages(_0x14d8ea=pagesDir,_0x55300b=pagesDir){const _0x7043c2=a14_0x2aa685;let _0x15cd6f=[];const _0x4459ee=readdirSync(_0x14d8ea);return _0x4459ee[_0x7043c2(0x199)](_0xd10747=>{const _0x5b5232=_0x7043c2,_0x1e7b1b=join(_0x14d8ea,_0xd10747),_0x47de22=statSync(_0x1e7b1b);if(_0x47de22&&_0x47de22['isDirectory']())_0x15cd6f=_0x15cd6f['concat'](getLocalPages(_0x1e7b1b,_0x55300b));else{if(_0xd10747[_0x5b5232(0x190)](_0x5b5232(0x189))){let _0x5303f8=relative(_0x55300b,_0x1e7b1b);_0x5303f8[_0x5b5232(0x190)](_0x5b5232(0x197))?_0x5303f8=_0x5303f8[_0x5b5232(0x19a)](/index\.tsx$/,''):_0x5303f8=_0x5303f8[_0x5b5232(0x19a)](/\.tsx$/,'');_0x5303f8[_0x5b5232(0x190)]('/')&&(_0x5303f8=_0x5303f8[_0x5b5232(0x185)](0x0,-0x1));const _0x3b423a=extractTitleFromComment(_0x1e7b1b),_0x3f12b0=_0x3b423a||_0x5303f8;_0x15cd6f[_0x5b5232(0x18e)]({'path':_0x5303f8[_0x5b5232(0x188)]('$',':'),'label':_0x3f12b0});}}}),_0x15cd6f[_0x7043c2(0x194)](_0x408d8a=>_0x408d8a[_0x7043c2(0x18f)]!=='');}function a14_0x1028(){const _0x25f8ba=['path','endsWith','2097846kPULPY','cwd','44295tIPOUW','filter','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','trim','index.tsx','862704wteobK','forEach','replace','match','utf-8','77416ESCTdK','slice','src/pages','45zNNnXQ','replaceAll','.tsx','204884xnytFH','522UzYqtK','5044280hbyTYo','2680020BgWBOR','push'];a14_0x1028=function(){return _0x25f8ba;};return a14_0x1028();}
1
+ const a14_0xab3c3f=a14_0x1c94;(function(_0x2a9439,_0x5f3bd4){const _0x39890f=a14_0x1c94,_0x4ca98f=_0x2a9439();while(!![]){try{const _0x2ee7e5=-parseInt(_0x39890f(0x189))/0x1+parseInt(_0x39890f(0x184))/0x2*(parseInt(_0x39890f(0x183))/0x3)+parseInt(_0x39890f(0x18b))/0x4*(-parseInt(_0x39890f(0x187))/0x5)+-parseInt(_0x39890f(0x17f))/0x6*(parseInt(_0x39890f(0x18f))/0x7)+-parseInt(_0x39890f(0x18a))/0x8+parseInt(_0x39890f(0x18d))/0x9*(-parseInt(_0x39890f(0x185))/0xa)+parseInt(_0x39890f(0x17e))/0xb*(parseInt(_0x39890f(0x188))/0xc);if(_0x2ee7e5===_0x5f3bd4)break;else _0x4ca98f['push'](_0x4ca98f['shift']());}catch(_0x360620){_0x4ca98f['push'](_0x4ca98f['shift']());}}}(a14_0x4bd0,0x2e2f1));function a14_0x4bd0(){const _0x350e2e=['src/pages','18410smeEZX','push','concat','.tsx','replaceAll','match','slice','filter','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','endsWith','utf-8','9970147BPKhNy','834mvhHyl','replace','path','trim','443943tJCxxk','4AlnhmX','70SfmUNL','index.tsx','90085xZYLVf','12PdvODQ','106395CwrkdW','2743640CmBuOw','16XidzhT','cwd','162234ACjFMV'];a14_0x4bd0=function(){return _0x350e2e;};return a14_0x4bd0();}function a14_0x1c94(_0x48da89,_0x550e7f){_0x48da89=_0x48da89-0x17a;const _0x4bd0f8=a14_0x4bd0();let _0x1c9460=_0x4bd0f8[_0x48da89];return _0x1c9460;}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a14_0xab3c3f(0x18c)](),a14_0xab3c3f(0x18e));export function extractTitleFromComment(_0x4db62a){const _0x817243=a14_0xab3c3f;try{const _0x942dae=readFileSync(_0x4db62a,_0x817243(0x17d)),_0x27b435=_0x942dae[_0x817243(0x194)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x27b435&&_0x27b435[0x1]){const _0x321b9c=_0x27b435[0x1],_0x4bd4c8=_0x321b9c['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x4bd4c8&&_0x4bd4c8[0x1])return _0x4bd4c8[0x1][_0x817243(0x182)]();}let _0x5266d=null;const _0x24a701=_0x942dae['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x24a701&&_0x24a701[0x1]&&(_0x5266d=_0x24a701[0x1]);if(!_0x5266d){const _0x4bac50=_0x942dae[_0x817243(0x194)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x4bac50&&_0x4bac50[0x1]&&(_0x5266d=_0x4bac50[0x1]);}if(_0x5266d){const _0x34d6c1=new RegExp('\x5cb'+_0x5266d+_0x817243(0x17b)),_0x4bcdbc=_0x942dae[_0x817243(0x194)](_0x34d6c1);if(_0x4bcdbc&&_0x4bcdbc[0x1])return _0x4bcdbc[0x1];return _0x5266d;}return null;}catch(_0x24df80){return null;}}export function getLocalPages(_0x2ae4bb=pagesDir,_0x20102c=pagesDir){const _0x245923=a14_0xab3c3f;let _0x568e5a=[];const _0x5c1d99=readdirSync(_0x2ae4bb);return _0x5c1d99['forEach'](_0x31adcc=>{const _0xc5d0e5=a14_0x1c94,_0x2e8472=join(_0x2ae4bb,_0x31adcc),_0x51c775=statSync(_0x2e8472);if(_0x51c775&&_0x51c775['isDirectory']())_0x568e5a=_0x568e5a[_0xc5d0e5(0x191)](getLocalPages(_0x2e8472,_0x20102c));else{if(_0x31adcc[_0xc5d0e5(0x17c)](_0xc5d0e5(0x192))){let _0x372231=relative(_0x20102c,_0x2e8472);_0x372231[_0xc5d0e5(0x17c)](_0xc5d0e5(0x186))?_0x372231=_0x372231[_0xc5d0e5(0x180)](/index\.tsx$/,''):_0x372231=_0x372231[_0xc5d0e5(0x180)](/\.tsx$/,'');_0x372231[_0xc5d0e5(0x17c)]('/')&&(_0x372231=_0x372231[_0xc5d0e5(0x195)](0x0,-0x1));const _0x4c9cbe=extractTitleFromComment(_0x2e8472),_0x42d893=_0x4c9cbe||_0x372231;_0x568e5a[_0xc5d0e5(0x190)]({'path':_0x372231[_0xc5d0e5(0x193)]('$',':'),'label':_0x42d893});}}}),_0x568e5a[_0x245923(0x17a)](_0x28e948=>_0x28e948[_0x245923(0x181)]!=='');}
@@ -1 +1 @@
1
- (function(_0x8d377a,_0x3914b5){const _0x331e58=a15_0x2b8f,_0xc52a85=_0x8d377a();while(!![]){try{const _0x34f676=-parseInt(_0x331e58(0x13d))/0x1*(parseInt(_0x331e58(0x123))/0x2)+parseInt(_0x331e58(0x13a))/0x3+parseInt(_0x331e58(0x12f))/0x4*(parseInt(_0x331e58(0x11f))/0x5)+-parseInt(_0x331e58(0x129))/0x6*(parseInt(_0x331e58(0x121))/0x7)+-parseInt(_0x331e58(0x136))/0x8+parseInt(_0x331e58(0x12e))/0x9*(parseInt(_0x331e58(0x137))/0xa)+parseInt(_0x331e58(0x13f))/0xb*(-parseInt(_0x331e58(0x120))/0xc);if(_0x34f676===_0x3914b5)break;else _0xc52a85['push'](_0xc52a85['shift']());}catch(_0x12ef75){_0xc52a85['push'](_0xc52a85['shift']());}}}(a15_0x21cf,0x96a6c));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 a15_0x2b8f(_0xe2b552,_0x4e1e5b){_0xe2b552=_0xe2b552-0x11e;const _0x21cf65=a15_0x21cf();let _0x2b8f79=_0x21cf65[_0xe2b552];return _0x2b8f79;}import{getEnv}from'../constant/env.js';const config=readConfig();function a15_0x21cf(){const _0x37cca7=['success','label','error','3727968wXohNE','859580yiEzKm','成功获取\x20','extend','137589lhwgeD','map','正在获取日常菜单列表...\x20(appCode:\x20','1NswCAG','flat','604747aSHFSj','path','errorMsg','errorCode','data','application/json','!\x20请使用以下方式之一:','children','online','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','GET','\x20个线上菜单','5CsxIkj','24nIraAi','406pIVBbr','isArray','114806sNgnqm','status','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','get-online-menu-list','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','info','20592wUgPIi','parse','length','resources','push','36FLhKpi','4239128oWERPq','appcode','未提供应用AppCode,且配置中也没有默认值','log'];a15_0x21cf=function(){return _0x37cca7;};return a15_0x21cf();}export async function getOnlineMenuList(){const _0x2ab11c=a15_0x2b8f,_0x1ef428=config?.[_0x2ab11c(0x130)];if(!_0x1ef428){const _0x32dd30=_0x2ab11c(0x131);return logger[_0x2ab11c(0x135)](_0x2ab11c(0x126),_0x32dd30),console['error']('×\x20'+_0x32dd30),console[_0x2ab11c(0x132)](_0x2ab11c(0x145)),console[_0x2ab11c(0x132)](_0x2ab11c(0x127)),console[_0x2ab11c(0x132)](_0x2ab11c(0x125)),[];}const _0xaa081d=getEnv();logger[_0x2ab11c(0x128)](_0x2ab11c(0x126),_0xaa081d===_0x2ab11c(0x147)?'正在获取线上菜单列表...\x20(appCode:\x20'+_0x1ef428+')':_0x2ab11c(0x13c)+_0x1ef428+')');const _0x2b1fe5=await fetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x1ef428,{'method':_0x2ab11c(0x149),'headers':{'Content-Type':_0x2ab11c(0x144),'Cookie':getCookie()}});if(!_0x2b1fe5['ok']){if(_0x2b1fe5[_0x2ab11c(0x124)]===0x191){const _0x2bdef7=_0x2ab11c(0x148);logger[_0x2ab11c(0x135)](_0x2ab11c(0x126),_0x2bdef7,{'status':_0x2b1fe5[_0x2ab11c(0x124)]});throw new Error(_0x2bdef7);}const _0x2988da='获取菜单列表失败,HTTP状态码:\x20'+_0x2b1fe5[_0x2ab11c(0x124)];logger[_0x2ab11c(0x135)](_0x2ab11c(0x126),_0x2988da);throw new Error(_0x2988da);}const _0x50dec2=await _0x2b1fe5['json']();if(!_0x50dec2[_0x2ab11c(0x133)]){const _0x3825a9='获取菜单列表失败:\x20'+(_0x50dec2['errorMsg']||'未知错误');logger[_0x2ab11c(0x135)](_0x2ab11c(0x126),_0x3825a9,{'errorCode':_0x50dec2[_0x2ab11c(0x142)],'errorMsg':_0x50dec2[_0x2ab11c(0x141)]});throw new Error(_0x3825a9);}if(!_0x50dec2[_0x2ab11c(0x143)])return logger['info']('get-online-menu-list','服务端返回空菜单列表'),[];return logger['info']('get-online-menu-list',_0x2ab11c(0x138)+_0x50dec2[_0x2ab11c(0x143)][_0x2ab11c(0x12b)]+_0x2ab11c(0x11e)),_0x50dec2[_0x2ab11c(0x143)][_0x2ab11c(0x13b)](formatMenuList)[_0x2ab11c(0x13e)]();}function formatMenuList(_0x125f30){const _0x1dbe1a=a15_0x2b8f;let _0x5cfb57=[];try{if(_0x125f30[_0x1dbe1a(0x139)]?.[_0x1dbe1a(0x12c)]){const _0x17bb55=JSON[_0x1dbe1a(0x12a)](_0x125f30[_0x1dbe1a(0x139)][_0x1dbe1a(0x12c)]);Array[_0x1dbe1a(0x122)](_0x17bb55)&&(_0x5cfb57=_0x17bb55);}}catch(_0x5e4192){}const _0xd972c5=[{'id':_0x125f30['id'],'path':_0x125f30[_0x1dbe1a(0x140)],'label':_0x125f30[_0x1dbe1a(0x134)],'resources':_0x5cfb57}];if(_0x125f30[_0x1dbe1a(0x146)]&&_0x125f30['children'][_0x1dbe1a(0x12b)]>0x0)for(const _0xc194b8 of _0x125f30[_0x1dbe1a(0x146)]){_0xd972c5[_0x1dbe1a(0x12d)](...formatMenuList(_0xc194b8));}return _0xd972c5;}
1
+ function a15_0x2053(_0x48cf95,_0x10b491){_0x48cf95=_0x48cf95-0xba;const _0x35821d=a15_0x3582();let _0x205346=_0x35821d[_0x48cf95];return _0x205346;}(function(_0xbbe39,_0x115424){const _0x58fb90=a15_0x2053,_0x25389a=_0xbbe39();while(!![]){try{const _0x6dddbe=-parseInt(_0x58fb90(0xc0))/0x1+parseInt(_0x58fb90(0xbf))/0x2*(-parseInt(_0x58fb90(0xd8))/0x3)+parseInt(_0x58fb90(0xc4))/0x4*(-parseInt(_0x58fb90(0xd3))/0x5)+-parseInt(_0x58fb90(0xcf))/0x6+parseInt(_0x58fb90(0xc5))/0x7*(parseInt(_0x58fb90(0xbd))/0x8)+parseInt(_0x58fb90(0xba))/0x9+parseInt(_0x58fb90(0xbb))/0xa;if(_0x6dddbe===_0x115424)break;else _0x25389a['push'](_0x25389a['shift']());}catch(_0x28ab28){_0x25389a['push'](_0x25389a['shift']());}}}(a15_0x3582,0xed485));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';import{getEnv}from'../constant/env.js';const config=readConfig();function a15_0x3582(){const _0x144290=['errorMsg','path','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','服务端返回空菜单列表','/smartapi/menu/find?appCode=','appcode','data','10801305YGjicW','28113850zBwyyy','未提供应用AppCode,且配置中也没有默认值','8gLZOko','application/json','369580pzEiMw','579951uUfPSs','status','children','未知错误','6632ldSHPM','12749163wLZqsv','!\x20请使用以下方式之一:','get-online-menu-list','获取菜单列表失败:\x20','resources','online','push','extend','label','GET','7246902YsFnsx','flat','error','json','3695DOiLfD','\x20个线上菜单','log','isArray','info','30dyaFGl','正在获取线上菜单列表...\x20(appCode:\x20','获取菜单列表失败,HTTP状态码:\x20'];a15_0x3582=function(){return _0x144290;};return a15_0x3582();}export async function getOnlineMenuList(){const _0x1577c4=a15_0x2053,_0x2f5512=config?.[_0x1577c4(0xe0)];if(!_0x2f5512){const _0x31ba9c=_0x1577c4(0xbc);return logger[_0x1577c4(0xd1)]('get-online-menu-list',_0x31ba9c),console[_0x1577c4(0xd1)]('×\x20'+_0x31ba9c),console[_0x1577c4(0xd5)](_0x1577c4(0xc6)),console['log']('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console['log']('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>'),[];}const _0x1ad1b7=getEnv();logger['info'](_0x1577c4(0xc7),_0x1ad1b7===_0x1577c4(0xca)?_0x1577c4(0xd9)+_0x2f5512+')':'正在获取日常菜单列表...\x20(appCode:\x20'+_0x2f5512+')');const _0x2b5974=await fetch(getApiDomain()+_0x1577c4(0xdf)+_0x2f5512,{'method':_0x1577c4(0xce),'headers':{'Content-Type':_0x1577c4(0xbe),'Cookie':getCookie()}});if(!_0x2b5974['ok']){if(_0x2b5974[_0x1577c4(0xc1)]===0x191){const _0x59f070=_0x1577c4(0xdd);logger[_0x1577c4(0xd1)](_0x1577c4(0xc7),_0x59f070,{'status':_0x2b5974[_0x1577c4(0xc1)]});throw new Error(_0x59f070);}const _0x3fbe1f=_0x1577c4(0xda)+_0x2b5974[_0x1577c4(0xc1)];logger[_0x1577c4(0xd1)](_0x1577c4(0xc7),_0x3fbe1f);throw new Error(_0x3fbe1f);}const _0x46ea47=await _0x2b5974[_0x1577c4(0xd2)]();if(!_0x46ea47['success']){const _0x554541=_0x1577c4(0xc8)+(_0x46ea47[_0x1577c4(0xdb)]||_0x1577c4(0xc3));logger['error']('get-online-menu-list',_0x554541,{'errorCode':_0x46ea47['errorCode'],'errorMsg':_0x46ea47[_0x1577c4(0xdb)]});throw new Error(_0x554541);}if(!_0x46ea47[_0x1577c4(0xe1)])return logger['info'](_0x1577c4(0xc7),_0x1577c4(0xde)),[];return logger[_0x1577c4(0xd7)](_0x1577c4(0xc7),'成功获取\x20'+_0x46ea47[_0x1577c4(0xe1)]['length']+_0x1577c4(0xd4)),_0x46ea47[_0x1577c4(0xe1)]['map'](formatMenuList)[_0x1577c4(0xd0)]();}function formatMenuList(_0x385ab2){const _0x4f714a=a15_0x2053;let _0x12cd80=[];try{if(_0x385ab2[_0x4f714a(0xcc)]?.[_0x4f714a(0xc9)]){const _0x15fb30=JSON['parse'](_0x385ab2['extend'][_0x4f714a(0xc9)]);Array[_0x4f714a(0xd6)](_0x15fb30)&&(_0x12cd80=_0x15fb30);}}catch(_0x30cd4c){}const _0x29d4a3=[{'id':_0x385ab2['id'],'path':_0x385ab2[_0x4f714a(0xdc)],'label':_0x385ab2[_0x4f714a(0xcd)],'resources':_0x12cd80}];if(_0x385ab2[_0x4f714a(0xc2)]&&_0x385ab2[_0x4f714a(0xc2)]['length']>0x0)for(const _0x246709 of _0x385ab2[_0x4f714a(0xc2)]){_0x29d4a3[_0x4f714a(0xcb)](...formatMenuList(_0x246709));}return _0x29d4a3;}
@@ -1 +1 @@
1
- (function(_0x52e4b0,_0x8be5c2){const _0x3301de=a17_0x5ba4,_0x1c854a=_0x52e4b0();while(!![]){try{const _0x42c43f=parseInt(_0x3301de(0xfc))/0x1+-parseInt(_0x3301de(0x102))/0x2+-parseInt(_0x3301de(0x108))/0x3*(-parseInt(_0x3301de(0x103))/0x4)+-parseInt(_0x3301de(0x101))/0x5*(-parseInt(_0x3301de(0x107))/0x6)+-parseInt(_0x3301de(0x106))/0x7*(-parseInt(_0x3301de(0xff))/0x8)+-parseInt(_0x3301de(0x100))/0x9*(-parseInt(_0x3301de(0x109))/0xa)+-parseInt(_0x3301de(0x10b))/0xb;if(_0x42c43f===_0x8be5c2)break;else _0x1c854a['push'](_0x1c854a['shift']());}catch(_0xd215e6){_0x1c854a['push'](_0x1c854a['shift']());}}}(a17_0x4e38,0xb12c8));function a17_0x4e38(){const _0xb802a8=['30608996UsoBlV','512447NMxOqE','获取菜单列表失败','then','88456OKgSlm','2169963tjPjlS','17350cTqlFa','1398582plheBM','304NCRVNu','catch','message','553amllso','1824yzAQBa','41190ONlPRb','30nvkSRl','finally'];a17_0x4e38=function(){return _0xb802a8;};return a17_0x4e38();}import{useEffect,useState}from'react';function a17_0x5ba4(_0x3c29c5,_0x21234f){_0x3c29c5=_0x3c29c5-0xfc;const _0x4e3836=a17_0x4e38();let _0x5ba40a=_0x4e3836[_0x3c29c5];return _0x5ba40a;}import{getOnlineMenuList}from'./get-online-menu-list.js';export function useGetOnlineMenuList(){const [_0x45fbb6,_0x6eccf7]=useState([]),[_0x59ce58,_0x14640f]=useState(!![]),[_0x19cbbb,_0x3ea411]=useState('');return useEffect(()=>{const _0xcbf248=a17_0x5ba4;_0x14640f(!![]),_0x3ea411(''),getOnlineMenuList()[_0xcbf248(0xfe)](_0x6eccf7)[_0xcbf248(0x104)](_0x4a0f3c=>{const _0x412f19=_0xcbf248;_0x3ea411(_0x4a0f3c[_0x412f19(0x105)]||_0x412f19(0xfd));})[_0xcbf248(0x10a)](()=>_0x14640f(![]));},[]),{'menuList':_0x45fbb6,'loading':_0x59ce58,'error':_0x19cbbb};}
1
+ (function(_0x377ed7,_0x3ac5db){const _0x1b18ed=a17_0x1058,_0x5e4311=_0x377ed7();while(!![]){try{const _0x21451c=-parseInt(_0x1b18ed(0x103))/0x1*(parseInt(_0x1b18ed(0xfe))/0x2)+parseInt(_0x1b18ed(0x105))/0x3+-parseInt(_0x1b18ed(0x10a))/0x4*(-parseInt(_0x1b18ed(0x101))/0x5)+parseInt(_0x1b18ed(0x109))/0x6*(parseInt(_0x1b18ed(0xff))/0x7)+parseInt(_0x1b18ed(0x106))/0x8*(parseInt(_0x1b18ed(0x102))/0x9)+parseInt(_0x1b18ed(0x108))/0xa+-parseInt(_0x1b18ed(0x100))/0xb*(parseInt(_0x1b18ed(0x107))/0xc);if(_0x21451c===_0x3ac5db)break;else _0x5e4311['push'](_0x5e4311['shift']());}catch(_0x4eaeb6){_0x5e4311['push'](_0x5e4311['shift']());}}}(a17_0x3e45,0x96648));function a17_0x1058(_0x23c0d5,_0x83dd88){_0x23c0d5=_0x23c0d5-0xfb;const _0x3e45ad=a17_0x3e45();let _0x10588a=_0x3e45ad[_0x23c0d5];return _0x10588a;}function a17_0x3e45(){const _0x3f97c2=['3023400zzCodO','6488ZLmMoA','12mLPPMe','4664620scdCie','1464546UQuxVe','563912rvrKbi','finally','获取菜单列表失败','message','then','538jBePuU','7HSledo','18836884WcBYls','20HWbPit','7686ecXSZu','2403QcpMsZ','catch'];a17_0x3e45=function(){return _0x3f97c2;};return a17_0x3e45();}import{useEffect,useState}from'react';import{getOnlineMenuList}from'./get-online-menu-list.js';export function useGetOnlineMenuList(){const [_0x38dabe,_0x44dd01]=useState([]),[_0x279312,_0x26b471]=useState(!![]),[_0x385517,_0x10378d]=useState('');return useEffect(()=>{const _0x162704=a17_0x1058;_0x26b471(!![]),_0x10378d(''),getOnlineMenuList()[_0x162704(0xfd)](_0x44dd01)[_0x162704(0x104)](_0x3d8d98=>{const _0x31d074=_0x162704;_0x10378d(_0x3d8d98[_0x31d074(0xfc)]||_0x31d074(0xfb));})[_0x162704(0x10b)](()=>_0x26b471(![]));},[]),{'menuList':_0x38dabe,'loading':_0x279312,'error':_0x385517};}
@@ -1 +1 @@
1
- (function(_0x4185a0,_0x182d86){const _0xd2662d=a18_0x28d4,_0x80ca68=_0x4185a0();while(!![]){try{const _0x485174=parseInt(_0xd2662d(0x178))/0x1*(parseInt(_0xd2662d(0x182))/0x2)+-parseInt(_0xd2662d(0x17b))/0x3+-parseInt(_0xd2662d(0x17f))/0x4+parseInt(_0xd2662d(0x180))/0x5+-parseInt(_0xd2662d(0x181))/0x6*(-parseInt(_0xd2662d(0x17c))/0x7)+-parseInt(_0xd2662d(0x185))/0x8*(parseInt(_0xd2662d(0x179))/0x9)+-parseInt(_0xd2662d(0x183))/0xa*(-parseInt(_0xd2662d(0x17d))/0xb);if(_0x485174===_0x182d86)break;else _0x80ca68['push'](_0x80ca68['shift']());}catch(_0x463d50){_0x80ca68['push'](_0x80ca68['shift']());}}}(a18_0x1490,0xc3b33));function a18_0x28d4(_0x20a296,_0x589728){_0x20a296=_0x20a296-0x178;const _0x1490d5=a18_0x1490();let _0x28d41d=_0x1490d5[_0x20a296];return _0x28d41d;}export function getRemainingSpaces(_0x3a73c1,_0x3e852b){const _0x5ba7ed=a18_0x28d4,_0x202593=getStringWidth(_0x3e852b);return Array(Math[_0x5ba7ed(0x17e)](0x0,_0x3a73c1-_0x202593))[_0x5ba7ed(0x17a)]('\x20')['join']('');}export function getMaxWidth(_0x58252c,_0x2467b4=0x2){const _0x59878a=a18_0x28d4;let _0x395ea5='',_0x170ee2=0x0;for(const _0x49a13f of _0x58252c){const _0x205fbb=getStringWidth(_0x49a13f);_0x205fbb>_0x170ee2&&(_0x170ee2=_0x205fbb,_0x395ea5=_0x49a13f);}return _0x395ea5+'\x20'[_0x59878a(0x184)](_0x2467b4);}function a18_0x1490(){const _0x582388=['11JAMjSZ','max','5435448SmTKSk','2234665iKiTdz','12mjEsrD','1780222HsvhCK','15532970ECjqmf','repeat','1091424gFnbHp','test','1TIxBJG','45GpJpKg','fill','1533462wKDWxU','1621907VwLczt'];a18_0x1490=function(){return _0x582388;};return a18_0x1490();}export function getStringWidth(_0x158c5c){const _0x2c484a=a18_0x28d4;let _0x392eee=0x0;for(const _0x336afd of _0x158c5c){/[\u4e00-\u9fa5]/[_0x2c484a(0x186)](_0x336afd)?_0x392eee+=0x2:_0x392eee+=0x1;}return _0x392eee;}
1
+ (function(_0x591d6c,_0x5a0468){const _0x1c6456=a18_0x59ae,_0x4ef2cc=_0x591d6c();while(!![]){try{const _0x1155f5=-parseInt(_0x1c6456(0x14d))/0x1+-parseInt(_0x1c6456(0x156))/0x2+-parseInt(_0x1c6456(0x154))/0x3+parseInt(_0x1c6456(0x153))/0x4*(parseInt(_0x1c6456(0x155))/0x5)+-parseInt(_0x1c6456(0x152))/0x6+parseInt(_0x1c6456(0x14f))/0x7+parseInt(_0x1c6456(0x159))/0x8*(parseInt(_0x1c6456(0x151))/0x9);if(_0x1155f5===_0x5a0468)break;else _0x4ef2cc['push'](_0x4ef2cc['shift']());}catch(_0x523372){_0x4ef2cc['push'](_0x4ef2cc['shift']());}}}(a18_0x3e16,0x61b60));function a18_0x59ae(_0x51de84,_0x3e7b2e){_0x51de84=_0x51de84-0x14d;const _0x3e16ba=a18_0x3e16();let _0x59ae46=_0x3e16ba[_0x51de84];return _0x59ae46;}export function getRemainingSpaces(_0x25f1c8,_0x55863d){const _0x12a35a=a18_0x59ae,_0x1e77c2=getStringWidth(_0x55863d);return Array(Math[_0x12a35a(0x157)](0x0,_0x25f1c8-_0x1e77c2))[_0x12a35a(0x158)]('\x20')[_0x12a35a(0x150)]('');}export function getMaxWidth(_0x54633f,_0x583b32=0x2){let _0xf4b48a='',_0x1d3381=0x0;for(const _0xe1011a of _0x54633f){const _0x4caf64=getStringWidth(_0xe1011a);_0x4caf64>_0x1d3381&&(_0x1d3381=_0x4caf64,_0xf4b48a=_0xe1011a);}return _0xf4b48a+'\x20'['repeat'](_0x583b32);}function a18_0x3e16(){const _0x57f582=['590742piBqbe','max','fill','785336ZzNnMN','561497IYnHYM','test','2923046gNXHAf','join','153oLBZIo','4283904zguBiX','4tmQCxE','1520160WrjgID','1956895PuMkJj'];a18_0x3e16=function(){return _0x57f582;};return a18_0x3e16();}export function getStringWidth(_0x14f923){const _0x34a320=a18_0x59ae;let _0x318853=0x0;for(const _0x428d15 of _0x14f923){/[\u4e00-\u9fa5]/[_0x34a320(0x14e)](_0x428d15)?_0x318853+=0x2:_0x318853+=0x1;}return _0x318853;}
@@ -1 +1 @@
1
- (function(_0x39e05b,_0x23797f){const _0x259656=a19_0x6bf7,_0x35f87f=_0x39e05b();while(!![]){try{const _0x3ca0a1=-parseInt(_0x259656(0x18d))/0x1+-parseInt(_0x259656(0x193))/0x2*(-parseInt(_0x259656(0x18f))/0x3)+-parseInt(_0x259656(0x198))/0x4+-parseInt(_0x259656(0x195))/0x5*(-parseInt(_0x259656(0x18c))/0x6)+-parseInt(_0x259656(0x197))/0x7*(-parseInt(_0x259656(0x192))/0x8)+parseInt(_0x259656(0x190))/0x9*(parseInt(_0x259656(0x18e))/0xa)+-parseInt(_0x259656(0x194))/0xb;if(_0x3ca0a1===_0x23797f)break;else _0x35f87f['push'](_0x35f87f['shift']());}catch(_0x5d01de){_0x35f87f['push'](_0x35f87f['shift']());}}}(a19_0x1df8,0xf0d32));function a19_0x1df8(){const _0x205605=['test','3462282dqAXSt','241322UVTPiw','9626630ATnEra','870894JsXuQa','18MbzsbH','HEAD','8rAyGYQ','8wlYUSo','35514347pjwIQh','5DLFyeO','trim','12306679xejlZz','3861380vyxrZv'];a19_0x1df8=function(){return _0x205605;};return a19_0x1df8();}export function isValidJsHttpsUrl(_0x17ebbe){const _0x5eea84=a19_0x6bf7;return/^https:\/\/.+\.js(\?.*)?$/[_0x5eea84(0x199)](_0x17ebbe[_0x5eea84(0x196)]());}export function isValidCssHttpsUrl(_0x3d15d7){const _0x3ce26e=a19_0x6bf7;return/^https:\/\/.+\.css(\?.*)?$/[_0x3ce26e(0x199)](_0x3d15d7[_0x3ce26e(0x196)]());}function a19_0x6bf7(_0x42400d,_0x48669f){_0x42400d=_0x42400d-0x18c;const _0x1df8ab=a19_0x1df8();let _0x6bf79b=_0x1df8ab[_0x42400d];return _0x6bf79b;}export async function isUrlReachable(_0x3d2ac0){const _0x14ff59=a19_0x6bf7;try{const _0x5f149b=await fetch(_0x3d2ac0,{'method':_0x14ff59(0x191)});return _0x5f149b['ok'];}catch{return![];}}
1
+ function a19_0x7f6d(_0x3817fa,_0x42a036){_0x3817fa=_0x3817fa-0x84;const _0x27e91e=a19_0x27e9();let _0x7f6dd0=_0x27e91e[_0x3817fa];return _0x7f6dd0;}(function(_0x4bbcd0,_0x19d682){const _0x4ea295=a19_0x7f6d,_0x411192=_0x4bbcd0();while(!![]){try{const _0x5097d4=-parseInt(_0x4ea295(0x8b))/0x1+parseInt(_0x4ea295(0x85))/0x2+parseInt(_0x4ea295(0x8a))/0x3+-parseInt(_0x4ea295(0x88))/0x4*(parseInt(_0x4ea295(0x89))/0x5)+parseInt(_0x4ea295(0x8c))/0x6+-parseInt(_0x4ea295(0x84))/0x7+parseInt(_0x4ea295(0x87))/0x8;if(_0x5097d4===_0x19d682)break;else _0x411192['push'](_0x411192['shift']());}catch(_0x47acf5){_0x411192['push'](_0x411192['shift']());}}}(a19_0x27e9,0x83d25));function a19_0x27e9(){const _0x4f5dd2=['5021682clAwyd','6009388FHmqUN','753166wUCEPY','test','9073224teHcOY','34404ilouyK','235sRZIQi','1506561wwxfNw','1047198thfpmt'];a19_0x27e9=function(){return _0x4f5dd2;};return a19_0x27e9();}export function isValidJsHttpsUrl(_0x3d6f40){const _0x4d6b08=a19_0x7f6d;return/^https:\/\/.+\.js(\?.*)?$/[_0x4d6b08(0x86)](_0x3d6f40['trim']());}export function isValidCssHttpsUrl(_0x3f4ca3){const _0x902f88=a19_0x7f6d;return/^https:\/\/.+\.css(\?.*)?$/[_0x902f88(0x86)](_0x3f4ca3['trim']());}export async function isUrlReachable(_0x29d310){try{const _0xfa81b1=await fetch(_0x29d310,{'method':'HEAD'});return _0xfa81b1['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x3e8c7c,_0x1858a3){const _0x37f613=a20_0x292e,_0x5a2a3f=_0x3e8c7c();while(!![]){try{const _0x547e0a=parseInt(_0x37f613(0x137))/0x1+-parseInt(_0x37f613(0x13e))/0x2+parseInt(_0x37f613(0x130))/0x3*(parseInt(_0x37f613(0x139))/0x4)+parseInt(_0x37f613(0x140))/0x5*(parseInt(_0x37f613(0x141))/0x6)+-parseInt(_0x37f613(0x13d))/0x7*(-parseInt(_0x37f613(0x134))/0x8)+parseInt(_0x37f613(0x136))/0x9+-parseInt(_0x37f613(0x13a))/0xa*(parseInt(_0x37f613(0x13f))/0xb);if(_0x547e0a===_0x1858a3)break;else _0x5a2a3f['push'](_0x5a2a3f['shift']());}catch(_0x57eb4f){_0x5a2a3f['push'](_0x5a2a3f['shift']());}}}(a20_0x1afd,0x8fca9));function a20_0x292e(_0x24ee30,_0x2bceb8){_0x24ee30=_0x24ee30-0x12f;const _0x1afded=a20_0x1afd();let _0x292ef6=_0x1afded[_0x24ee30];return _0x292ef6;}import{jsx as a20_0x27b960,jsxs as a20_0x3e73a5}from'react/jsx-runtime';import{Text,Box}from'ink';export function CurrentMenuCdnContent(_0x4cd9cf){const _0x4d1e05=a20_0x292e,{menuList:_0x5bb82b}=_0x4cd9cf,_0x58bd89=_0x5bb82b[_0x4d1e05(0x12f)](_0x568756=>_0x568756[_0x4d1e05(0x135)][_0x4d1e05(0x132)]),_0x545ab7=Array['from'](new Set(_0x5bb82b[_0x4d1e05(0x133)](_0x3017c5=>_0x3017c5['resources'])[_0x4d1e05(0x138)]()));return a20_0x3e73a5(Box,{'flexDirection':'column','children':[a20_0x27b960(Text,{'color':_0x4d1e05(0x13b),'children':'*\x20待更新的菜单&资源链接'}),a20_0x3e73a5(Box,{'marginTop':0x1,'flexDirection':_0x4d1e05(0x142),'children':[a20_0x3e73a5(Text,{'bold':!![],'children':['\x20\x20',_0x4d1e05(0x13c)]}),a20_0x3e73a5(Text,{'children':['\x20\x20',_0x58bd89[_0x4d1e05(0x133)](_0x1cef3c=>_0x1cef3c['label'])[_0x4d1e05(0x131)](',\x20')]})]}),a20_0x27b960(Box,{'marginTop':0x1,'children':a20_0x3e73a5(Text,{'bold':!![],'children':['\x20\x20',_0x4d1e05(0x143)]})}),_0x545ab7[_0x4d1e05(0x133)](_0x1bc975=>a20_0x27b960(Box,{'children':a20_0x3e73a5(Text,{'children':['\x20\x20',_0x1bc975]})},_0x1bc975))]});}function a20_0x1afd(){const _0x35fead=['19610xBsXaQ','cyan','待更新的菜单列表:','137830YKUUEZ','2120446ALhJPm','5918wyDajK','220020nyyZlW','132AftDrN','column','待更新的资源链接:','filter','1191315arbRXG','join','length','map','352Mirzlr','resources','2565387TBFmNr','187614QlriOq','flat','4IhzwJE'];a20_0x1afd=function(){return _0x35fead;};return a20_0x1afd();}
1
+ (function(_0x21b400,_0x1c39f6){const _0x539d38=a20_0xa381,_0x5c599a=_0x21b400();while(!![]){try{const _0x45e5a3=parseInt(_0x539d38(0x1c3))/0x1*(parseInt(_0x539d38(0x1d5))/0x2)+parseInt(_0x539d38(0x1d0))/0x3+parseInt(_0x539d38(0x1d1))/0x4+-parseInt(_0x539d38(0x1c5))/0x5+parseInt(_0x539d38(0x1d6))/0x6*(-parseInt(_0x539d38(0x1d2))/0x7)+-parseInt(_0x539d38(0x1cb))/0x8*(-parseInt(_0x539d38(0x1d4))/0x9)+-parseInt(_0x539d38(0x1c7))/0xa;if(_0x45e5a3===_0x1c39f6)break;else _0x5c599a['push'](_0x5c599a['shift']());}catch(_0x2adf43){_0x5c599a['push'](_0x5c599a['shift']());}}}(a20_0x29e7,0x4d0d9));import{jsx as a20_0x3fac8b,jsxs as a20_0x41fdc8}from'react/jsx-runtime';function a20_0xa381(_0x2ab1b2,_0x4eba53){_0x2ab1b2=_0x2ab1b2-0x1c2;const _0x29e79d=a20_0x29e7();let _0xa38140=_0x29e79d[_0x2ab1b2];return _0xa38140;}function a20_0x29e7(){const _0x3f1d3b=['*\x20待更新的菜单&资源链接','149NcjrIE','join','383425bjVOwL','待更新的菜单列表:','8901630MYdOuq','length','resources','label','48bSDwwR','flat','filter','from','map','959940AQkEbr','2287520XIcuWw','752647tFPpDE','cyan','300006HrGLbA','6888qfzkRn','18NVylSe'];a20_0x29e7=function(){return _0x3f1d3b;};return a20_0x29e7();}import{Text,Box}from'ink';export function CurrentMenuCdnContent(_0x58c542){const _0x32b29c=a20_0xa381,{menuList:_0x45ab13}=_0x58c542,_0x385b5c=_0x45ab13[_0x32b29c(0x1cd)](_0x331d52=>_0x331d52[_0x32b29c(0x1c9)][_0x32b29c(0x1c8)]),_0x4f4d01=Array[_0x32b29c(0x1ce)](new Set(_0x45ab13[_0x32b29c(0x1cf)](_0x30aaab=>_0x30aaab[_0x32b29c(0x1c9)])[_0x32b29c(0x1cc)]()));return a20_0x41fdc8(Box,{'flexDirection':'column','children':[a20_0x3fac8b(Text,{'color':_0x32b29c(0x1d3),'children':_0x32b29c(0x1c2)}),a20_0x41fdc8(Box,{'marginTop':0x1,'flexDirection':'column','children':[a20_0x41fdc8(Text,{'bold':!![],'children':['\x20\x20',_0x32b29c(0x1c6)]}),a20_0x41fdc8(Text,{'children':['\x20\x20',_0x385b5c[_0x32b29c(0x1cf)](_0x563da5=>_0x563da5[_0x32b29c(0x1ca)])[_0x32b29c(0x1c4)](',\x20')]})]}),a20_0x3fac8b(Box,{'marginTop':0x1,'children':a20_0x41fdc8(Text,{'bold':!![],'children':['\x20\x20','待更新的资源链接:']})}),_0x4f4d01['map'](_0x230849=>a20_0x3fac8b(Box,{'children':a20_0x41fdc8(Text,{'children':['\x20\x20',_0x230849]})},_0x230849))]});}
@@ -1 +1 @@
1
- (function(_0x125103,_0x370538){const _0x42563f=a21_0x3fe0,_0x11b303=_0x125103();while(!![]){try{const _0x54d7f6=-parseInt(_0x42563f(0x129))/0x1*(parseInt(_0x42563f(0x120))/0x2)+-parseInt(_0x42563f(0x12d))/0x3+parseInt(_0x42563f(0x126))/0x4+-parseInt(_0x42563f(0x124))/0x5*(parseInt(_0x42563f(0x12a))/0x6)+parseInt(_0x42563f(0x125))/0x7*(-parseInt(_0x42563f(0x12e))/0x8)+parseInt(_0x42563f(0x12c))/0x9+parseInt(_0x42563f(0x127))/0xa;if(_0x54d7f6===_0x370538)break;else _0x11b303['push'](_0x11b303['shift']());}catch(_0x306390){_0x11b303['push'](_0x11b303['shift']());}}}(a21_0x4938,0x482f4));import{jsx as a21_0xa90b62,jsxs as a21_0x297528}from'react/jsx-runtime';function a21_0x3fe0(_0x3322d1,_0x2c0a94){_0x3322d1=_0x3322d1-0x120;const _0x493869=a21_0x4938();let _0x3fe0db=_0x493869[_0x3322d1];return _0x3fe0db;}import{Text,Box}from'ink';export function InputCdnAsset(_0x12724e){const _0x259a97=a21_0x3fe0,{jsCdnUrl:_0x14a897,cssCdnUrl:_0x3404b5}=_0x12724e;return a21_0x297528(Box,{'flexDirection':'column','marginTop':0x1,'children':[a21_0xa90b62(Text,{'color':_0x259a97(0x123),'children':_0x259a97(0x128)}),a21_0x297528(Box,{'children':[a21_0x297528(Text,{'children':['\x20\x20',_0x259a97(0x12b)]}),a21_0xa90b62(Text,{'color':'green','children':_0x14a897})]}),a21_0x297528(Box,{'children':[a21_0x297528(Text,{'children':['\x20\x20',_0x259a97(0x121)]}),a21_0xa90b62(Text,{'color':_0x259a97(0x122),'children':_0x3404b5})]})]});}function a21_0x4938(){const _0x177eb0=['399063WQtWVw','272548HMSqTL','16256190fumwzE','*\x20已输入的资源资源','4hYwoKm','654QvTWoh','JS\x20链接:\x20','1306206iTCpcZ','1508817mRJLba','48ZlNIyT','61518leRDrN','CSS\x20链接:\x20','green','cyan','26385SaZQSC'];a21_0x4938=function(){return _0x177eb0;};return a21_0x4938();}
1
+ function a21_0x2de7(_0x59b129,_0x2d5812){_0x59b129=_0x59b129-0x1dc;const _0x1c694e=a21_0x1c69();let _0x2de785=_0x1c694e[_0x59b129];return _0x2de785;}(function(_0x4c45f8,_0x137023){const _0x131643=a21_0x2de7,_0x39dcb8=_0x4c45f8();while(!![]){try{const _0x2dc8f2=parseInt(_0x131643(0x1e4))/0x1*(parseInt(_0x131643(0x1de))/0x2)+-parseInt(_0x131643(0x1e0))/0x3+parseInt(_0x131643(0x1e5))/0x4+-parseInt(_0x131643(0x1e8))/0x5*(parseInt(_0x131643(0x1dc))/0x6)+-parseInt(_0x131643(0x1e1))/0x7+-parseInt(_0x131643(0x1e2))/0x8+-parseInt(_0x131643(0x1e3))/0x9*(-parseInt(_0x131643(0x1df))/0xa);if(_0x2dc8f2===_0x137023)break;else _0x39dcb8['push'](_0x39dcb8['shift']());}catch(_0x34b76d){_0x39dcb8['push'](_0x39dcb8['shift']());}}}(a21_0x1c69,0x524f2));import{jsx as a21_0x49aa4a,jsxs as a21_0x14820d}from'react/jsx-runtime';import{Text,Box}from'ink';function a21_0x1c69(){const _0x72569a=['1617312HJudUZ','45zBuvZs','3614yzoVBA','1862884mOttEk','column','cyan','5TYSLRz','green','CSS\x20链接:\x20','3825582asudqd','JS\x20链接:\x20','300GnDcJd','1793950jdROur','609108uCGDLS','3674027uUqqhC'];a21_0x1c69=function(){return _0x72569a;};return a21_0x1c69();}export function InputCdnAsset(_0x44250e){const _0x26d3ac=a21_0x2de7,{jsCdnUrl:_0x14cc75,cssCdnUrl:_0x3bae98}=_0x44250e;return a21_0x14820d(Box,{'flexDirection':_0x26d3ac(0x1e6),'marginTop':0x1,'children':[a21_0x49aa4a(Text,{'color':_0x26d3ac(0x1e7),'children':'*\x20已输入的资源资源'}),a21_0x14820d(Box,{'children':[a21_0x14820d(Text,{'children':['\x20\x20',_0x26d3ac(0x1dd)]}),a21_0x49aa4a(Text,{'color':_0x26d3ac(0x1e9),'children':_0x14cc75})]}),a21_0x14820d(Box,{'children':[a21_0x14820d(Text,{'children':['\x20\x20',_0x26d3ac(0x1ea)]}),a21_0x49aa4a(Text,{'color':_0x26d3ac(0x1e9),'children':_0x3bae98})]})]});}
@@ -1 +1 @@
1
- (function(_0x336c34,_0x2c3e82){const _0x3c3fdd=a22_0x50c8,_0x594725=_0x336c34();while(!![]){try{const _0x487a48=-parseInt(_0x3c3fdd(0x200))/0x1+-parseInt(_0x3c3fdd(0x203))/0x2+parseInt(_0x3c3fdd(0x1fe))/0x3+parseInt(_0x3c3fdd(0x1e1))/0x4*(-parseInt(_0x3c3fdd(0x1ec))/0x5)+-parseInt(_0x3c3fdd(0x1fc))/0x6*(parseInt(_0x3c3fdd(0x1fa))/0x7)+-parseInt(_0x3c3fdd(0x20e))/0x8*(-parseInt(_0x3c3fdd(0x1ef))/0x9)+parseInt(_0x3c3fdd(0x1da))/0xa*(parseInt(_0x3c3fdd(0x206))/0xb);if(_0x487a48===_0x2c3e82)break;else _0x594725['push'](_0x594725['shift']());}catch(_0x30feb4){_0x594725['push'](_0x594725['shift']());}}}(a22_0x33b8,0x7f01f));function a22_0x33b8(){const _0x1d1753=['resources','3675642rAYloU','trim','312876GqgaCi','slice','69478qpFfck','cancel','creating','1934200XvPqkj','input-js','label','11emXHyl','backspace','继续更新','输入项目的\x20JS\x20资源链接(https://...)','map','取消更新','resolve','delete','8CNXcMb','all','flat','yellow','return','input-css','19888370RKWDVL','cyan','from','\x20←\x20','输入项目的\x20CSS\x20资源链接(https://...)','\x20正在获取线上菜单资源链接...','lovrabet\x20auth','3760252HJGRYF','updated','gray','leftArrow','JS\x20链接:\x20','!\x20未找到菜单资源链接','upArrow','*\x20请输入新的资源链接','value','rightArrow','green','5ehdiKC','请输入有效的\x20CSS\x20https\x20链接','dots','9147078AgvqyV','downArrow','√\x20更新成功','JS\x20链接无法访问','red','请输入有效的\x20JS\x20https\x20链接','column','length','CSS\x20链接:\x20','CSS\x20链接无法访问','need-confirm','7hIJSaG'];a22_0x33b8=function(){return _0x1d1753;};return a22_0x33b8();}import{jsx as a22_0x216dcf,jsxs as a22_0x9934e9,Fragment as a22_0x3eec4f}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';function a22_0x50c8(_0x41ac88,_0x53a1e8){_0x41ac88=_0x41ac88-0x1d9;const _0x33b801=a22_0x33b8();let _0x50c8e6=_0x33b801[_0x41ac88];return _0x50c8e6;}import{useEffect,useState}from'react';import a22_0x40df60 from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import.meta.main&&render(a22_0x216dcf(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x32bb8d=a22_0x50c8,{exit:_0x440cdc}=useApp(),{loading:_0x2d9f3b,menuList:_0x29baf5,error:_0x59c6c0}=useGetOnlineMenuList(),[_0x4e57a4,_0x15725e]=useState('ok'),[_0xc3a4db,_0x42bf7a]=useState(_0x32bb8d(0x204)),[_0xf5974a,_0x10a7af]=useState(''),[_0x188033,_0x270a58]=useState(''),[_0x58bd15,_0x620e28]=useState(''),[_0x5f2145,_0x386a54]=useState(''),_0x3dc6e0=Array[_0x32bb8d(0x1dc)](new Set(_0x29baf5[_0x32bb8d(0x20a)](_0x49f621=>_0x49f621[_0x32bb8d(0x1fb)])[_0x32bb8d(0x210)]()));useEffect(()=>{const _0x3f52b2=_0x32bb8d;_0xc3a4db===_0x3f52b2(0x1e2)&&setTimeout(_0x440cdc,0x32);},[_0xc3a4db]),useInput(async(_0x4fbc9f,_0x479a43)=>{const _0x257a1a=_0x32bb8d;if(_0xc3a4db===_0x257a1a(0x204)){if(_0x479a43['return']){const _0x7973d9=_0x58bd15[_0x257a1a(0x1fd)]();if(_0x7973d9==='')return;if(!isValidJsHttpsUrl(_0x7973d9)){_0x386a54(_0x257a1a(0x1f4));return;}if(!await isUrlReachable(_0x7973d9)){_0x386a54(_0x257a1a(0x1f2));return;}_0x10a7af(_0x7973d9),_0x620e28(''),_0x386a54(''),_0x42bf7a(_0x257a1a(0x1d9));return;}if(_0x479a43[_0x257a1a(0x207)]||_0x479a43[_0x257a1a(0x20d)]){_0x620e28(_0x44ee24=>_0x44ee24[_0x257a1a(0x1ff)](0x0,-0x1)),_0x386a54('');return;}_0x620e28(_0x370793=>_0x370793+_0x4fbc9f);return;}if(_0xc3a4db===_0x257a1a(0x1d9)){if(_0x479a43['return']){const _0x1d5d75=_0x58bd15[_0x257a1a(0x1fd)]();if(_0x1d5d75==='')return;if(!isValidCssHttpsUrl(_0x1d5d75)){_0x386a54(_0x257a1a(0x1ed));return;}if(!await isUrlReachable(_0x1d5d75)){_0x386a54(_0x257a1a(0x1f8));return;}_0x270a58(_0x1d5d75),_0x620e28(''),_0x386a54(''),_0x42bf7a('need-confirm');return;}if(_0x479a43['backspace']||_0x479a43[_0x257a1a(0x20d)]){_0x620e28(_0x3db50d=>_0x3db50d['slice'](0x0,-0x1)),_0x386a54('');return;}_0x620e28(_0x70c579=>_0x70c579+_0x4fbc9f);return;}if(_0xc3a4db===_0x257a1a(0x1f9)){(_0x479a43[_0x257a1a(0x1e7)]||_0x479a43[_0x257a1a(0x1f0)]||_0x479a43[_0x257a1a(0x1e4)]||_0x479a43[_0x257a1a(0x1ea)])&&_0x15725e(_0x398307=>_0x398307==='ok'?_0x257a1a(0x201):'ok');if(_0x479a43[_0x257a1a(0x212)]){_0x42bf7a(_0x257a1a(0x202));if(_0x4e57a4==='ok')await Promise[_0x257a1a(0x20f)](_0x29baf5[_0x257a1a(0x20a)](_0x1d166b=>{const _0x4f1a2f=_0x257a1a,_0x37613c={'id':_0x1d166b['id'],'label':_0x1d166b[_0x4f1a2f(0x205)],'path':_0x1d166b['path'],'resources':[_0xf5974a,_0x188033]};if(_0x1d166b['resources']['length']===0x0)return Promise[_0x4f1a2f(0x20c)]();return updateMenuCdnUrl(_0x37613c);})),await new Promise(_0x303c5d=>setTimeout(_0x303c5d,0x3e8)),_0x42bf7a(_0x257a1a(0x1e2));else _0x4e57a4==='cancel'&&_0x440cdc();}}});if(_0x2d9f3b)return a22_0x9934e9(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x216dcf(Text,{}),a22_0x216dcf(a22_0x40df60,{'type':_0x32bb8d(0x1ee)}),a22_0x216dcf(Text,{'children':_0x32bb8d(0x1df)})]});if(_0x59c6c0)return a22_0x9934e9(Box,{'flexDirection':_0x32bb8d(0x1f5),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x9934e9(Text,{'color':'red','children':['✗\x20',_0x59c6c0]}),a22_0x9934e9(Box,{'marginTop':0x1,'children':[a22_0x216dcf(Text,{'color':_0x32bb8d(0x1e3),'children':'提示:使用\x20'}),a22_0x216dcf(Text,{'color':_0x32bb8d(0x1db),'children':_0x32bb8d(0x1e0)}),a22_0x216dcf(Text,{'color':_0x32bb8d(0x1e3),'children':'\x20命令重新登录'})]})]});if(_0x3dc6e0[_0x32bb8d(0x1f6)]===0x0)return a22_0x216dcf(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x216dcf(Text,{'color':'yellow','children':_0x32bb8d(0x1e6)})});if(_0xc3a4db===_0x32bb8d(0x1f9))return a22_0x9934e9(Box,{'flexDirection':_0x32bb8d(0x1f5),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x216dcf(CurrentMenuCdnContent,{'menuList':_0x29baf5}),a22_0x216dcf(InputCdnAsset,{'jsCdnUrl':_0xf5974a,'cssCdnUrl':_0x188033}),a22_0x216dcf(Box,{'marginTop':0x1,'flexDirection':_0x32bb8d(0x1f5),'children':[{'label':_0x32bb8d(0x208),'value':'ok'},{'label':_0x32bb8d(0x20b),'value':_0x32bb8d(0x201)}][_0x32bb8d(0x20a)](_0x549d3b=>a22_0x9934e9(Text,{'color':_0x4e57a4===_0x549d3b[_0x32bb8d(0x1e9)]?_0x32bb8d(0x211):undefined,'children':[_0x4e57a4===_0x549d3b['value']?'>\x20':'\x20\x20',_0x549d3b[_0x32bb8d(0x205)]]},_0x549d3b[_0x32bb8d(0x1e9)]))})]});if(_0xc3a4db===_0x32bb8d(0x202))return a22_0x9934e9(Box,{'flexDirection':_0x32bb8d(0x1f5),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x216dcf(CurrentMenuCdnContent,{'menuList':_0x29baf5}),a22_0x216dcf(InputCdnAsset,{'jsCdnUrl':_0xf5974a,'cssCdnUrl':_0x188033}),a22_0x9934e9(Box,{'marginTop':0x1,'children':[a22_0x216dcf(a22_0x40df60,{'type':_0x32bb8d(0x1ee)}),a22_0x216dcf(Text,{'children':'\x20资源正在同步中...'})]})]});if(_0xc3a4db===_0x32bb8d(0x1e2))return a22_0x9934e9(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x216dcf(CurrentMenuCdnContent,{'menuList':_0x29baf5}),a22_0x216dcf(InputCdnAsset,{'jsCdnUrl':_0xf5974a,'cssCdnUrl':_0x188033}),a22_0x216dcf(Box,{'marginTop':0x1,'children':a22_0x216dcf(Text,{'color':_0x32bb8d(0x1eb),'children':_0x32bb8d(0x1f1)})})]});return a22_0x9934e9(Box,{'flexDirection':_0x32bb8d(0x1f5),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x216dcf(CurrentMenuCdnContent,{'menuList':_0x29baf5}),a22_0x9934e9(Box,{'marginTop':0x1,'flexDirection':_0x32bb8d(0x1f5),'children':[a22_0x216dcf(Text,{'color':_0x32bb8d(0x1db),'children':_0x32bb8d(0x1e8)}),_0xf5974a?a22_0x9934e9(Box,{'children':[a22_0x9934e9(Text,{'color':_0x32bb8d(0x1e3),'children':['\x20\x20',_0x32bb8d(0x1e5)]}),a22_0x216dcf(Text,{'color':_0x32bb8d(0x1eb),'children':_0xf5974a})]}):_0xc3a4db==='input-js'&&a22_0x9934e9(a22_0x3eec4f,{'children':[a22_0x9934e9(Box,{'children':[a22_0x9934e9(Text,{'children':['\x20\x20','JS\x20链接:\x20']}),a22_0x216dcf(Text,{'color':'green','children':_0x58bd15}),_0x5f2145&&a22_0x9934e9(Text,{'color':_0x32bb8d(0x1f3),'children':[_0x32bb8d(0x1dd),_0x5f2145]})]}),!_0x5f2145&&a22_0x216dcf(Box,{'children':a22_0x9934e9(Text,{'color':_0x32bb8d(0x1e3),'children':['\x20\x20',_0x32bb8d(0x209)]})})]}),_0x188033?a22_0x9934e9(Box,{'children':[a22_0x9934e9(Text,{'children':['\x20\x20','CSS\x20链接:\x20']}),a22_0x216dcf(Text,{'color':_0x32bb8d(0x1eb),'children':_0x188033})]}):_0xc3a4db===_0x32bb8d(0x1d9)&&a22_0x9934e9(a22_0x3eec4f,{'children':[a22_0x9934e9(Box,{'children':[a22_0x9934e9(Text,{'children':['\x20\x20',_0x32bb8d(0x1f7)]}),a22_0x216dcf(Text,{'color':_0x32bb8d(0x1eb),'children':_0x58bd15}),_0x5f2145&&a22_0x9934e9(Text,{'color':_0x32bb8d(0x1f3),'children':[_0x32bb8d(0x1dd),_0x5f2145]})]}),!_0x5f2145&&a22_0x216dcf(Box,{'children':a22_0x9934e9(Text,{'color':_0x32bb8d(0x1e3),'children':['\x20\x20',_0x32bb8d(0x1de)]})})]})]})]});}
1
+ (function(_0x2d0e74,_0x4c5049){const _0x3c5845=a22_0x1f41,_0x127a20=_0x2d0e74();while(!![]){try{const _0x36b254=-parseInt(_0x3c5845(0x149))/0x1*(parseInt(_0x3c5845(0x13b))/0x2)+-parseInt(_0x3c5845(0x13c))/0x3*(-parseInt(_0x3c5845(0x138))/0x4)+parseInt(_0x3c5845(0x163))/0x5+parseInt(_0x3c5845(0x167))/0x6*(-parseInt(_0x3c5845(0x152))/0x7)+-parseInt(_0x3c5845(0x15a))/0x8+-parseInt(_0x3c5845(0x15b))/0x9+parseInt(_0x3c5845(0x156))/0xa;if(_0x36b254===_0x4c5049)break;else _0x127a20['push'](_0x127a20['shift']());}catch(_0x5db95c){_0x127a20['push'](_0x127a20['shift']());}}}(a22_0x5018,0x428b4));import{jsx as a22_0x49f9c0,jsxs as a22_0x46d283,Fragment as a22_0x16cba2}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a22_0x570944 from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';function a22_0x5018(){const _0x276fbe=['3662190lEkpMw','继续更新','\x20命令重新登录','!\x20未找到菜单资源链接','creating','input-js','cyan','slice','322370MYQypi','√\x20更新成功','JS\x20链接:\x20','dots','884244FUYOxh','label','downArrow','gray','column','value','map','need-confirm','\x20←\x20','yellow','4CYRVwF','取消更新','\x20正在获取线上菜单资源链接...','58762EJomkN','507543KhqFaj','cancel','delete','green','JS\x20链接无法访问','upArrow','resources','*\x20请输入新的资源链接','backspace','rightArrow','all','from','input-css','17xzhimg','resolve','输入项目的\x20CSS\x20资源链接(https://...)','length','updated','\x20资源正在同步中...','CSS\x20链接:\x20','提示:使用\x20','请输入有效的\x20JS\x20https\x20链接','14ZIObQz','CSS\x20链接无法访问','return','trim','15241270GMilFg','flat','lovrabet\x20auth','red','2272664lJCtiO'];a22_0x5018=function(){return _0x276fbe;};return a22_0x5018();}import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';function a22_0x1f41(_0x4f787c,_0x47812d){_0x4f787c=_0x4f787c-0x132;const _0x5018a9=a22_0x5018();let _0x1f41f5=_0x5018a9[_0x4f787c];return _0x1f41f5;}import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import.meta.main&&render(a22_0x49f9c0(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x4b536e=a22_0x1f41,{exit:_0x118566}=useApp(),{loading:_0x41fae8,menuList:_0x3736af,error:_0x2fde84}=useGetOnlineMenuList(),[_0x576cd8,_0x367566]=useState('ok'),[_0x1b956d,_0x3a6927]=useState(_0x4b536e(0x160)),[_0x10f037,_0x32ea50]=useState(''),[_0xfe9e2f,_0x9c7c49]=useState(''),[_0x1cf5d2,_0x44bbf4]=useState(''),[_0x3ea01a,_0x1bf915]=useState(''),_0x4a469d=Array[_0x4b536e(0x147)](new Set(_0x3736af[_0x4b536e(0x134)](_0x592034=>_0x592034[_0x4b536e(0x142)])[_0x4b536e(0x157)]()));useEffect(()=>{const _0xa2d4de=_0x4b536e;_0x1b956d===_0xa2d4de(0x14d)&&setTimeout(_0x118566,0x32);},[_0x1b956d]),useInput(async(_0x1970fd,_0x5aa8e7)=>{const _0x1b715a=_0x4b536e;if(_0x1b956d==='input-js'){if(_0x5aa8e7[_0x1b715a(0x154)]){const _0x5650e2=_0x1cf5d2[_0x1b715a(0x155)]();if(_0x5650e2==='')return;if(!isValidJsHttpsUrl(_0x5650e2)){_0x1bf915(_0x1b715a(0x151));return;}if(!await isUrlReachable(_0x5650e2)){_0x1bf915(_0x1b715a(0x140));return;}_0x32ea50(_0x5650e2),_0x44bbf4(''),_0x1bf915(''),_0x3a6927(_0x1b715a(0x148));return;}if(_0x5aa8e7[_0x1b715a(0x144)]||_0x5aa8e7[_0x1b715a(0x13e)]){_0x44bbf4(_0x41f34a=>_0x41f34a[_0x1b715a(0x162)](0x0,-0x1)),_0x1bf915('');return;}_0x44bbf4(_0x17cee8=>_0x17cee8+_0x1970fd);return;}if(_0x1b956d===_0x1b715a(0x148)){if(_0x5aa8e7[_0x1b715a(0x154)]){const _0xcf32f6=_0x1cf5d2[_0x1b715a(0x155)]();if(_0xcf32f6==='')return;if(!isValidCssHttpsUrl(_0xcf32f6)){_0x1bf915('请输入有效的\x20CSS\x20https\x20链接');return;}if(!await isUrlReachable(_0xcf32f6)){_0x1bf915(_0x1b715a(0x153));return;}_0x9c7c49(_0xcf32f6),_0x44bbf4(''),_0x1bf915(''),_0x3a6927(_0x1b715a(0x135));return;}if(_0x5aa8e7[_0x1b715a(0x144)]||_0x5aa8e7['delete']){_0x44bbf4(_0x2b2056=>_0x2b2056[_0x1b715a(0x162)](0x0,-0x1)),_0x1bf915('');return;}_0x44bbf4(_0x1fd53c=>_0x1fd53c+_0x1970fd);return;}if(_0x1b956d===_0x1b715a(0x135)){(_0x5aa8e7[_0x1b715a(0x141)]||_0x5aa8e7[_0x1b715a(0x169)]||_0x5aa8e7['leftArrow']||_0x5aa8e7[_0x1b715a(0x145)])&&_0x367566(_0x1ebb32=>_0x1ebb32==='ok'?_0x1b715a(0x13d):'ok');if(_0x5aa8e7['return']){_0x3a6927(_0x1b715a(0x15f));if(_0x576cd8==='ok')await Promise[_0x1b715a(0x146)](_0x3736af[_0x1b715a(0x134)](_0x53c8bc=>{const _0xeea32c=_0x1b715a,_0x4a1cef={'id':_0x53c8bc['id'],'label':_0x53c8bc[_0xeea32c(0x168)],'path':_0x53c8bc['path'],'resources':[_0x10f037,_0xfe9e2f]};if(_0x53c8bc[_0xeea32c(0x142)][_0xeea32c(0x14c)]===0x0)return Promise[_0xeea32c(0x14a)]();return updateMenuCdnUrl(_0x4a1cef);})),await new Promise(_0x13f8e9=>setTimeout(_0x13f8e9,0x3e8)),_0x3a6927(_0x1b715a(0x14d));else _0x576cd8===_0x1b715a(0x13d)&&_0x118566();}}});if(_0x41fae8)return a22_0x46d283(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(Text,{}),a22_0x49f9c0(a22_0x570944,{'type':'dots'}),a22_0x49f9c0(Text,{'children':_0x4b536e(0x13a)})]});if(_0x2fde84)return a22_0x46d283(Box,{'flexDirection':_0x4b536e(0x132),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x46d283(Text,{'color':'red','children':['✗\x20',_0x2fde84]}),a22_0x46d283(Box,{'marginTop':0x1,'children':[a22_0x49f9c0(Text,{'color':'gray','children':_0x4b536e(0x150)}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x161),'children':_0x4b536e(0x158)}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x16a),'children':_0x4b536e(0x15d)})]})]});if(_0x4a469d[_0x4b536e(0x14c)]===0x0)return a22_0x49f9c0(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x49f9c0(Text,{'color':_0x4b536e(0x137),'children':_0x4b536e(0x15e)})});if(_0x1b956d===_0x4b536e(0x135))return a22_0x46d283(Box,{'flexDirection':_0x4b536e(0x132),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(CurrentMenuCdnContent,{'menuList':_0x3736af}),a22_0x49f9c0(InputCdnAsset,{'jsCdnUrl':_0x10f037,'cssCdnUrl':_0xfe9e2f}),a22_0x49f9c0(Box,{'marginTop':0x1,'flexDirection':_0x4b536e(0x132),'children':[{'label':_0x4b536e(0x15c),'value':'ok'},{'label':_0x4b536e(0x139),'value':_0x4b536e(0x13d)}][_0x4b536e(0x134)](_0x50d5ca=>a22_0x46d283(Text,{'color':_0x576cd8===_0x50d5ca[_0x4b536e(0x133)]?_0x4b536e(0x137):undefined,'children':[_0x576cd8===_0x50d5ca['value']?'>\x20':'\x20\x20',_0x50d5ca[_0x4b536e(0x168)]]},_0x50d5ca['value']))})]});if(_0x1b956d===_0x4b536e(0x15f))return a22_0x46d283(Box,{'flexDirection':_0x4b536e(0x132),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(CurrentMenuCdnContent,{'menuList':_0x3736af}),a22_0x49f9c0(InputCdnAsset,{'jsCdnUrl':_0x10f037,'cssCdnUrl':_0xfe9e2f}),a22_0x46d283(Box,{'marginTop':0x1,'children':[a22_0x49f9c0(a22_0x570944,{'type':_0x4b536e(0x166)}),a22_0x49f9c0(Text,{'children':_0x4b536e(0x14e)})]})]});if(_0x1b956d===_0x4b536e(0x14d))return a22_0x46d283(Box,{'flexDirection':_0x4b536e(0x132),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(CurrentMenuCdnContent,{'menuList':_0x3736af}),a22_0x49f9c0(InputCdnAsset,{'jsCdnUrl':_0x10f037,'cssCdnUrl':_0xfe9e2f}),a22_0x49f9c0(Box,{'marginTop':0x1,'children':a22_0x49f9c0(Text,{'color':_0x4b536e(0x13f),'children':_0x4b536e(0x164)})})]});return a22_0x46d283(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(CurrentMenuCdnContent,{'menuList':_0x3736af}),a22_0x46d283(Box,{'marginTop':0x1,'flexDirection':_0x4b536e(0x132),'children':[a22_0x49f9c0(Text,{'color':_0x4b536e(0x161),'children':_0x4b536e(0x143)}),_0x10f037?a22_0x46d283(Box,{'children':[a22_0x46d283(Text,{'color':_0x4b536e(0x16a),'children':['\x20\x20','JS\x20链接:\x20']}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x13f),'children':_0x10f037})]}):_0x1b956d==='input-js'&&a22_0x46d283(a22_0x16cba2,{'children':[a22_0x46d283(Box,{'children':[a22_0x46d283(Text,{'children':['\x20\x20',_0x4b536e(0x165)]}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x13f),'children':_0x1cf5d2}),_0x3ea01a&&a22_0x46d283(Text,{'color':'red','children':[_0x4b536e(0x136),_0x3ea01a]})]}),!_0x3ea01a&&a22_0x49f9c0(Box,{'children':a22_0x46d283(Text,{'color':_0x4b536e(0x16a),'children':['\x20\x20','输入项目的\x20JS\x20资源链接(https://...)']})})]}),_0xfe9e2f?a22_0x46d283(Box,{'children':[a22_0x46d283(Text,{'children':['\x20\x20',_0x4b536e(0x14f)]}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x13f),'children':_0xfe9e2f})]}):_0x1b956d==='input-css'&&a22_0x46d283(a22_0x16cba2,{'children':[a22_0x46d283(Box,{'children':[a22_0x46d283(Text,{'children':['\x20\x20',_0x4b536e(0x14f)]}),a22_0x49f9c0(Text,{'color':'green','children':_0x1cf5d2}),_0x3ea01a&&a22_0x46d283(Text,{'color':_0x4b536e(0x159),'children':[_0x4b536e(0x136),_0x3ea01a]})]}),!_0x3ea01a&&a22_0x49f9c0(Box,{'children':a22_0x46d283(Text,{'color':'gray','children':['\x20\x20',_0x4b536e(0x14b)]})})]})]})]});}
@@ -1 +1 @@
1
- const a24_0x248fb5=a24_0x43ea;(function(_0x453aae,_0x43f9ed){const _0x5f0223=a24_0x43ea,_0xefa72b=_0x453aae();while(!![]){try{const _0x53bdd5=-parseInt(_0x5f0223(0x99))/0x1+-parseInt(_0x5f0223(0x96))/0x2*(-parseInt(_0x5f0223(0xa5))/0x3)+parseInt(_0x5f0223(0xaf))/0x4*(-parseInt(_0x5f0223(0x9d))/0x5)+parseInt(_0x5f0223(0xa9))/0x6+-parseInt(_0x5f0223(0xae))/0x7+-parseInt(_0x5f0223(0xac))/0x8+parseInt(_0x5f0223(0x9a))/0x9;if(_0x53bdd5===_0x43f9ed)break;else _0xefa72b['push'](_0xefa72b['shift']());}catch(_0xf7a7dd){_0xefa72b['push'](_0xefa72b['shift']());}}}(a24_0x131a,0x8b572));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 a24_0x43ea(_0x445464,_0x2609cc){_0x445464=_0x445464-0x91;const _0x131abb=a24_0x131a();let _0x43eabd=_0x131abb[_0x445464];return _0x43eabd;}const config=readConfig(),logLabel='update-menu-cdn-url';import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a24_0x248fb5(0x94),'path':a24_0x248fb5(0xab),'resources':['https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js',a24_0x248fb5(0xb2)]});export async function updateMenuCdnUrl(_0x4b3043){const _0x410d74=a24_0x248fb5,_0x57852a=config?.[_0x410d74(0xa6)];if(!_0x57852a){const _0x9206cc=_0x410d74(0xa1);logger[_0x410d74(0xa3)](logLabel,_0x9206cc),console[_0x410d74(0xa3)]('×\x20'+_0x9206cc),console[_0x410d74(0xa2)](_0x410d74(0xaa)),console[_0x410d74(0xa2)](_0x410d74(0x9b)),console[_0x410d74(0xa2)](_0x410d74(0xad));return;}logger[_0x410d74(0x91)](logLabel,_0x410d74(0xb1)+_0x4b3043['label']+'\x20('+_0x4b3043[_0x410d74(0x9f)]+')');const _0x2c1e4c={'id':_0x4b3043['id'],'appCode':_0x57852a,'extend':{'loadScriptMode':'import','resources':_0x4b3043['resources']?JSON[_0x410d74(0xb0)](_0x4b3043[_0x410d74(0x92)]):undefined}},_0x38f681=await fetch(getApiDomain()+'/smartapi/menu/update',{'method':_0x410d74(0xa0),'body':JSON[_0x410d74(0xb0)](_0x2c1e4c),'headers':{'Content-Type':_0x410d74(0x9e),'Cookie':getCookie()}});if(!_0x38f681['ok']){if(_0x38f681['status']===0x191){const _0x3786a2=_0x410d74(0xa8);logger[_0x410d74(0xa3)](logLabel,_0x3786a2,{'status':_0x38f681['status'],'menu':_0x4b3043[_0x410d74(0x95)]});throw new Error(_0x3786a2);}const _0x2d587b=_0x410d74(0x98)+_0x38f681['status'];logger[_0x410d74(0xa3)](logLabel,_0x2d587b,{'menu':_0x4b3043[_0x410d74(0x95)]});throw new Error(_0x2d587b);}const _0x5c5cef=await _0x38f681[_0x410d74(0x97)]();if(!_0x5c5cef['success']){const _0x39c9e6=_0x410d74(0xa7)+(_0x5c5cef[_0x410d74(0x93)]||_0x410d74(0xa4));logger[_0x410d74(0xa3)](logLabel,_0x39c9e6,{'errorCode':_0x5c5cef['errorCode'],'errorMsg':_0x5c5cef[_0x410d74(0x93)],'menu':_0x4b3043['label']});throw new Error(_0x39c9e6);}logger['info'](logLabel,'菜单资源同步成功:\x20'+_0x4b3043[_0x410d74(0x95)],_0x5c5cef[_0x410d74(0x9c)]);}function a24_0x131a(){const _0x46956a=['log','error','未知错误','12fPkJZf','appcode','更新菜单资源失败:\x20','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','5524404iuRYJE','!\x20请使用以下方式之一:','sdk-demo','2187088PEwyjM','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','3450615BUNrJG','86024wUAova','stringify','正在更新菜单资源链接:\x20','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css','info','resources','errorMsg','SdkDemo1','label','546304YCTuDw','json','创建菜单失败,HTTP状态码:\x20','1046708fnvJUt','5463009bMeqjq','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','data','55AKvIWE','application/json','path','POST','未提供应用AppCode,且配置中也没有默认值'];a24_0x131a=function(){return _0x46956a;};return a24_0x131a();}
1
+ const a24_0x36b3ac=a24_0x55d2;(function(_0x18ea0a,_0x47b894){const _0x12a183=a24_0x55d2,_0x590d65=_0x18ea0a();while(!![]){try{const _0x1524fc=-parseInt(_0x12a183(0x110))/0x1*(parseInt(_0x12a183(0x121))/0x2)+parseInt(_0x12a183(0x109))/0x3+-parseInt(_0x12a183(0x120))/0x4*(parseInt(_0x12a183(0x11b))/0x5)+-parseInt(_0x12a183(0x123))/0x6+parseInt(_0x12a183(0x11a))/0x7*(-parseInt(_0x12a183(0x107))/0x8)+-parseInt(_0x12a183(0x102))/0x9*(parseInt(_0x12a183(0x117))/0xa)+-parseInt(_0x12a183(0x105))/0xb*(-parseInt(_0x12a183(0x11d))/0xc);if(_0x1524fc===_0x47b894)break;else _0x590d65['push'](_0x590d65['shift']());}catch(_0x466a99){_0x590d65['push'](_0x590d65['shift']());}}}(a24_0x2fc0,0xb67c8));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=a24_0x36b3ac(0x100);function a24_0x55d2(_0x4b3a1d,_0x2ec24){_0x4b3a1d=_0x4b3a1d-0x100;const _0x2fc008=a24_0x2fc0();let _0x55d2b7=_0x2fc008[_0x4b3a1d];return _0x55d2b7;}function a24_0x2fc0(){const _0x5e57fd=['10573330suRRGG','resources','errorCode','153475aaXroB','5NMtpHn','SdkDemo1','24gihPYH','未提供应用AppCode,且配置中也没有默认值','log','4624172VbaGbh','174730ZbmfJA','未知错误','8891838vbAPJi','error','appcode','update-menu-cdn-url','errorMsg','9iUtdLU','POST','stringify','36843609VJLUSV','import','536OijVVy','label','2094465nKlNvJ','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','/smartapi/menu/update','sdk-demo','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','创建菜单失败,HTTP状态码:\x20','17EnwUhy','status','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','data','正在更新菜单资源链接:\x20','菜单资源同步成功:\x20','info'];a24_0x2fc0=function(){return _0x5e57fd;};return a24_0x2fc0();}import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a24_0x36b3ac(0x11c),'path':a24_0x36b3ac(0x10d),'resources':[a24_0x36b3ac(0x10e),'https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css']});export async function updateMenuCdnUrl(_0x32a3c7){const _0x588e26=a24_0x36b3ac,_0xe05be4=config?.[_0x588e26(0x125)];if(!_0xe05be4){const _0x33db46=_0x588e26(0x11e);logger[_0x588e26(0x124)](logLabel,_0x33db46),console[_0x588e26(0x124)]('×\x20'+_0x33db46),console[_0x588e26(0x11f)]('!\x20请使用以下方式之一:'),console[_0x588e26(0x11f)](_0x588e26(0x112)),console[_0x588e26(0x11f)](_0x588e26(0x10b));return;}logger[_0x588e26(0x116)](logLabel,_0x588e26(0x114)+_0x32a3c7['label']+'\x20('+_0x32a3c7['path']+')');const _0x226ffd={'id':_0x32a3c7['id'],'appCode':_0xe05be4,'extend':{'loadScriptMode':_0x588e26(0x106),'resources':_0x32a3c7[_0x588e26(0x118)]?JSON[_0x588e26(0x104)](_0x32a3c7[_0x588e26(0x118)]):undefined}},_0x4aa890=await fetch(getApiDomain()+_0x588e26(0x10c),{'method':_0x588e26(0x103),'body':JSON[_0x588e26(0x104)](_0x226ffd),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x4aa890['ok']){if(_0x4aa890['status']===0x191){const _0x212b9e=_0x588e26(0x10a);logger[_0x588e26(0x124)](logLabel,_0x212b9e,{'status':_0x4aa890[_0x588e26(0x111)],'menu':_0x32a3c7[_0x588e26(0x108)]});throw new Error(_0x212b9e);}const _0x82d89b=_0x588e26(0x10f)+_0x4aa890[_0x588e26(0x111)];logger['error'](logLabel,_0x82d89b,{'menu':_0x32a3c7[_0x588e26(0x108)]});throw new Error(_0x82d89b);}const _0x1ffcdc=await _0x4aa890['json']();if(!_0x1ffcdc['success']){const _0x5dcc67='更新菜单资源失败:\x20'+(_0x1ffcdc[_0x588e26(0x101)]||_0x588e26(0x122));logger[_0x588e26(0x124)](logLabel,_0x5dcc67,{'errorCode':_0x1ffcdc[_0x588e26(0x119)],'errorMsg':_0x1ffcdc['errorMsg'],'menu':_0x32a3c7[_0x588e26(0x108)]});throw new Error(_0x5dcc67);}logger[_0x588e26(0x116)](logLabel,_0x588e26(0x115)+_0x32a3c7[_0x588e26(0x108)],_0x1ffcdc[_0x588e26(0x113)]);}
@@ -1 +1 @@
1
- (function(_0x3644b6,_0x4446e5){const _0x1e613=a25_0x3655,_0x50b55c=_0x3644b6();while(!![]){try{const _0x1b8ce6=parseInt(_0x1e613(0xc7))/0x1+parseInt(_0x1e613(0xc1))/0x2*(parseInt(_0x1e613(0xbd))/0x3)+-parseInt(_0x1e613(0xc4))/0x4*(-parseInt(_0x1e613(0xcf))/0x5)+parseInt(_0x1e613(0xbf))/0x6+parseInt(_0x1e613(0xc5))/0x7*(-parseInt(_0x1e613(0xd0))/0x8)+-parseInt(_0x1e613(0xc3))/0x9+-parseInt(_0x1e613(0xc2))/0xa;if(_0x1b8ce6===_0x4446e5)break;else _0x50b55c['push'](_0x50b55c['shift']());}catch(_0x40356f){_0x50b55c['push'](_0x50b55c['shift']());}}}(a25_0x469b,0x628c2));import{jsx as a25_0x2102ba,jsxs as a25_0x2cc7d1}from'react/jsx-runtime';function a25_0x469b(){const _0x415c5b=['2343276PKZdaJ','42917LUidWG','正在登录...\x20','668429nOnlSF','log','green','gray','then','√\x20当前为有效会话,无需重新登录。','finally','column','5tZaLMm','656stzSkd','434952dOiUhT','return','4463346WJwDKR','*\x20登录成功!','4lWBhDp','13215190GgRpXH','541764bMNrpO'];a25_0x469b=function(){return _0x415c5b;};return a25_0x469b();}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';function a25_0x3655(_0x1c8175,_0x5dfe7b){_0x1c8175=_0x1c8175-0xbd;const _0x469b74=a25_0x469b();let _0x3655e7=_0x469b74[_0x1c8175];return _0x3655e7;}import a25_0x3bcf94 from'ink-spinner';export function AuthServer(){const _0x3e5eae=a25_0x3655,{exit:_0x1b5bf3}=useApp(),[_0x86edc9,_0x5b93bd]=useState(![]),[_0x538d92,_0x1d3530]=useState(!![]),[_0x115774,_0x2dcc69]=useState(![]),[_0x580d00,_0x37efe0]=useState(![]);useEffect(()=>{const _0xf7d177=a25_0x3655;getIsSessionValid()[_0xf7d177(0xcb)](_0x5b93bd)[_0xf7d177(0xcd)](()=>_0x1d3530(![]));},[]),useEffect(()=>{const _0xa7caa5=a25_0x3655;!_0x538d92&&_0x86edc9&&(console[_0xa7caa5(0xc8)](_0xa7caa5(0xcc)),_0x1b5bf3());},[_0x538d92,_0x86edc9,_0x1b5bf3]),useEffect(()=>{const _0x1fb6c2=a25_0x3655;_0x580d00&&(console[_0x1fb6c2(0xc8)](_0x1fb6c2(0xc0)),_0x1b5bf3());},[_0x580d00,_0x1b5bf3]),useInput((_0x2a190a,_0x599b4a)=>{const _0x3c578e=a25_0x3655;_0x599b4a[_0x3c578e(0xbe)]&&(_0x2dcc69(!![]),authServer({'silent':!![]})[_0x3c578e(0xcb)](_0x53f2b9=>{_0x37efe0(_0x53f2b9);})),_0x2a190a==='q'&&_0x1b5bf3();});if(_0x538d92)return null;if(_0x86edc9||_0x580d00)return null;return a25_0x2102ba(Box,{'flexDirection':_0x3e5eae(0xce),'marginTop':0x1,'marginBottom':0x1,'children':_0x115774?a25_0x2cc7d1(Box,{'children':[a25_0x2102ba(Box,{'width':'1'}),a25_0x2cc7d1(Text,{'color':_0x3e5eae(0xc9),'children':[a25_0x2102ba(a25_0x3bcf94,{'type':'dots'}),'\x20\x20']}),a25_0x2102ba(Text,{'children':_0x3e5eae(0xc6)}),a25_0x2102ba(Text,{'color':'gray','children':'请前往浏览器完成登录。'})]}):a25_0x2cc7d1(Box,{'children':[a25_0x2102ba(Box,{'width':'1'}),a25_0x2102ba(Text,{'children':'*\x20按回车开始登录。'}),a25_0x2102ba(Text,{'color':_0x3e5eae(0xca),'children':'按\x20“q”\x20退出。'})]})});}
1
+ (function(_0x3b46a4,_0x4a0750){const _0x1325b9=a25_0x30cf,_0x1fb39b=_0x3b46a4();while(!![]){try{const _0x29d8c4=parseInt(_0x1325b9(0x175))/0x1+parseInt(_0x1325b9(0x16e))/0x2*(-parseInt(_0x1325b9(0x17c))/0x3)+-parseInt(_0x1325b9(0x179))/0x4+-parseInt(_0x1325b9(0x170))/0x5+-parseInt(_0x1325b9(0x17b))/0x6+-parseInt(_0x1325b9(0x16f))/0x7+parseInt(_0x1325b9(0x176))/0x8*(parseInt(_0x1325b9(0x17a))/0x9);if(_0x29d8c4===_0x4a0750)break;else _0x1fb39b['push'](_0x1fb39b['shift']());}catch(_0x15509a){_0x1fb39b['push'](_0x1fb39b['shift']());}}}(a25_0x1924,0xcd129));import{jsx as a25_0x49c123,jsxs as a25_0x96cc59}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';function a25_0x1924(){const _0x34a2bd=['5694704kPFoSZ','9aMKklp','753354XiaAWM','3189GPkTWG','column','then','724dkVFbU','1156001XBiZDF','6426955fmAuqR','请前往浏览器完成登录。','finally','log','正在登录...\x20','1151429olFusx','24584984pcXKnP','按\x20“q”\x20退出。','gray'];a25_0x1924=function(){return _0x34a2bd;};return a25_0x1924();}import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';function a25_0x30cf(_0x3e964b,_0x508c4a){_0x3e964b=_0x3e964b-0x16d;const _0x19241a=a25_0x1924();let _0x30cfac=_0x19241a[_0x3e964b];return _0x30cfac;}import a25_0xc65bdd from'ink-spinner';export function AuthServer(){const _0x33dd83=a25_0x30cf,{exit:_0x3d1cb9}=useApp(),[_0x22dc1c,_0xf58765]=useState(![]),[_0x428155,_0x3215d7]=useState(!![]),[_0x35a993,_0x13c987]=useState(![]),[_0x20bb3c,_0x5d457a]=useState(![]);useEffect(()=>{const _0x2cd5df=a25_0x30cf;getIsSessionValid()[_0x2cd5df(0x16d)](_0xf58765)[_0x2cd5df(0x172)](()=>_0x3215d7(![]));},[]),useEffect(()=>{const _0x3dd46c=a25_0x30cf;!_0x428155&&_0x22dc1c&&(console[_0x3dd46c(0x173)]('√\x20当前为有效会话,无需重新登录。'),_0x3d1cb9());},[_0x428155,_0x22dc1c,_0x3d1cb9]),useEffect(()=>{const _0x445351=a25_0x30cf;_0x20bb3c&&(console[_0x445351(0x173)]('*\x20登录成功!'),_0x3d1cb9());},[_0x20bb3c,_0x3d1cb9]),useInput((_0x756f75,_0x351f4b)=>{_0x351f4b['return']&&(_0x13c987(!![]),authServer({'silent':!![]})['then'](_0x4c3d48=>{_0x5d457a(_0x4c3d48);})),_0x756f75==='q'&&_0x3d1cb9();});if(_0x428155)return null;if(_0x22dc1c||_0x20bb3c)return null;return a25_0x49c123(Box,{'flexDirection':_0x33dd83(0x17d),'marginTop':0x1,'marginBottom':0x1,'children':_0x35a993?a25_0x96cc59(Box,{'children':[a25_0x49c123(Box,{'width':'1'}),a25_0x96cc59(Text,{'color':'green','children':[a25_0x49c123(a25_0xc65bdd,{'type':'dots'}),'\x20\x20']}),a25_0x49c123(Text,{'children':_0x33dd83(0x174)}),a25_0x49c123(Text,{'color':_0x33dd83(0x178),'children':_0x33dd83(0x171)})]}):a25_0x96cc59(Box,{'children':[a25_0x49c123(Box,{'width':'1'}),a25_0x49c123(Text,{'children':'*\x20按回车开始登录。'}),a25_0x49c123(Text,{'color':_0x33dd83(0x178),'children':_0x33dd83(0x177)})]})});}
@@ -1 +1 @@
1
- const a26_0x352129=a26_0x4d22;(function(_0x45db58,_0x47f13f){const _0x1b0502=a26_0x4d22,_0x4b24e9=_0x45db58();while(!![]){try{const _0x143c11=parseInt(_0x1b0502(0x1e2))/0x1+-parseInt(_0x1b0502(0x1e3))/0x2+-parseInt(_0x1b0502(0x1c3))/0x3*(parseInt(_0x1b0502(0x1dc))/0x4)+-parseInt(_0x1b0502(0x1be))/0x5*(parseInt(_0x1b0502(0x1cb))/0x6)+-parseInt(_0x1b0502(0x1cd))/0x7*(-parseInt(_0x1b0502(0x1d0))/0x8)+parseInt(_0x1b0502(0x1bc))/0x9*(-parseInt(_0x1b0502(0x1bf))/0xa)+parseInt(_0x1b0502(0x1c7))/0xb;if(_0x143c11===_0x47f13f)break;else _0x4b24e9['push'](_0x4b24e9['shift']());}catch(_0x202004){_0x4b24e9['push'](_0x4b24e9['shift']());}}}(a26_0x579d,0x7e1cb));import{writeFileSync}from'node:fs';import a26_0x280d0d from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';function a26_0x579d(){const _0x59db66=['359010prSQGL','🔗\x20请手动复制登录地址到浏览器:','<!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>','✅\x20浏览器已自动打开,请在浏览器中完成登录','3oXimLc','error','🔐\x20正在启动登录服务...','https://g.yuntooai.com/cert/lovrabet-dev.json','5656651vVcPAK','isAuth','address','📍\x20登录地址:','859266dxHQUl','createServer','2590oONtDE','user','object','17736PoddBz','json','utf-8','xdg-open\x20\x22','/sign-in?redirect=','port','log','⚠️\x20\x20无法自动打开浏览器','cookie','end','then','headers','69332Mkcafi','writeHead','platform','https://dev.lovrabet.com:','close','127.0.0.1','774701itrnzG','1860610DQLGgu','listen','silent','54giKgsk','text/html;\x20charset=utf-8','15QAmAMZ'];a26_0x579d=function(){return _0x59db66;};return a26_0x579d();}import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x1c7cd6){const _0x210791=a26_0x4d22,_0x2999a7=_0x1c7cd6?.[_0x210791(0x1bb)]||![];if(await getIsSessionValid())return!![];const _0x5a9a22=await(await fetch(_0x210791(0x1c6)))[_0x210791(0x1d1)]();return new Promise(async(_0x4fd074,_0x113a93)=>{const _0x59f14a=_0x210791;let _0x2d81f9=0x0;const _0x4b5174=a26_0x280d0d[_0x59f14a(0x1cc)](_0x5a9a22,async(_0x18a639,_0x190f70)=>{const _0xef64a3=_0x59f14a,_0x3d7ca2=getUserDomain(),_0x27b1f7=_0x18a639[_0xef64a3(0x1db)][_0xef64a3(0x1d8)]||'',_0x1c886d=await fetch(_0x3d7ca2+'/api/auth/get-session',{'headers':{'cookie':_0x27b1f7}})[_0xef64a3(0x1da)](_0x204bcc=>_0x204bcc[_0xef64a3(0x1d1)]()),_0x52631b=_0x1c886d&&_0x1c886d['session']&&_0x1c886d[_0xef64a3(0x1ce)];if(_0x52631b){writeFileSync(cookieFile,_0x27b1f7,_0xef64a3(0x1d2)),_0x4fd074(!![]);const _0x2e563a=_0xef64a3(0x1c1);_0x190f70[_0xef64a3(0x1dd)](0xc8,{'Content-Type':_0xef64a3(0x1bd)}),_0x190f70[_0xef64a3(0x1d9)](_0x2e563a),_0x4b5174[_0xef64a3(0x1e0)]();}else{const _0x3319cc=''+encodeURIComponent(_0xef64a3(0x1df)+_0x2d81f9);_0x190f70['writeHead'](0x12e,{'location':_0x3d7ca2+_0xef64a3(0x1d4)+_0x3319cc}),_0x190f70[_0xef64a3(0x1d9)]();return;}});_0x4b5174[_0x59f14a(0x1ba)](0x0,_0x59f14a(0x1e1),()=>{const _0x55fc94=_0x59f14a,_0x3e73a6=_0x4b5174[_0x55fc94(0x1c9)]();_0x2d81f9=typeof _0x3e73a6===_0x55fc94(0x1cf)&&_0x3e73a6?_0x3e73a6[_0x55fc94(0x1d5)]:Number(_0x3e73a6);const _0x58e4c4=_0x55fc94(0x1df)+_0x2d81f9;!_0x2999a7&&(console['log'](_0x55fc94(0x1c5)),console[_0x55fc94(0x1d6)](_0x55fc94(0x1ca),_0x58e4c4),console['log']('🌐\x20正在尝试自动打开浏览器...'),console[_0x55fc94(0x1d6)](''),console[_0x55fc94(0x1d6)]('💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开'),console['log']('')),openInBrowser(_0x58e4c4)['then'](_0x515a01=>{const _0x244963=_0x55fc94;!_0x2999a7&&(_0x515a01?console['log'](_0x244963(0x1c2)):(console[_0x244963(0x1d6)](_0x244963(0x1d7)),console[_0x244963(0x1d6)](_0x244963(0x1c0),_0x58e4c4)),console['log'](''));})['catch'](()=>{const _0x380698=_0x55fc94;!_0x2999a7&&(console[_0x380698(0x1d6)]('⚠️\x20\x20无法自动打开浏览器'),console[_0x380698(0x1d6)](_0x380698(0x1c0),_0x58e4c4),console[_0x380698(0x1d6)](''));});}),_0x4b5174['on']('error',_0x50d65a=>{const _0x1d348a=_0x59f14a;!_0x2999a7&&console[_0x1d348a(0x1c4)]('Auth\x20server\x20error:',_0x50d65a),_0x113a93(_0x50d65a);});});}function a26_0x4d22(_0x217387,_0x33ffa0){_0x217387=_0x217387-0x1ba;const _0x579d6b=a26_0x579d();let _0x4d2213=_0x579d6b[_0x217387];return _0x4d2213;}function openInBrowser(_0x469e41){return new Promise(_0x48b810=>{const _0x31645a=a26_0x4d22,_0xd0f18e=process[_0x31645a(0x1de)];let _0x295590;if(_0xd0f18e==='win32')_0x295590='start\x20\x22\x22\x20\x22'+_0x469e41+'\x22';else _0xd0f18e==='darwin'?_0x295590='open\x20\x22'+_0x469e41+'\x22':_0x295590=_0x31645a(0x1d3)+_0x469e41+'\x22';exec(_0x295590,_0x1fddd8=>{_0x1fddd8?_0x48b810(![]):_0x48b810(!![]);});});}if(import.meta.main){const isAuth=await authServer();console['log'](a26_0x352129(0x1c8),isAuth);}
1
+ const a26_0xf730b3=a26_0x92b8;(function(_0x56d2fc,_0x5d9219){const _0x2b5eec=a26_0x92b8,_0x21ca1b=_0x56d2fc();while(!![]){try{const _0x267ee7=-parseInt(_0x2b5eec(0x1be))/0x1*(parseInt(_0x2b5eec(0x1bb))/0x2)+parseInt(_0x2b5eec(0x1b9))/0x3+parseInt(_0x2b5eec(0x1a5))/0x4+parseInt(_0x2b5eec(0x1ab))/0x5*(parseInt(_0x2b5eec(0x1a1))/0x6)+-parseInt(_0x2b5eec(0x1b3))/0x7*(parseInt(_0x2b5eec(0x1ba))/0x8)+parseInt(_0x2b5eec(0x1a2))/0x9+parseInt(_0x2b5eec(0x193))/0xa;if(_0x267ee7===_0x5d9219)break;else _0x21ca1b['push'](_0x21ca1b['shift']());}catch(_0x9fae17){_0x21ca1b['push'](_0x21ca1b['shift']());}}}(a26_0x3cc8,0x86711));import{writeFileSync}from'node:fs';import a26_0x100581 from'node:https';import{getUserDomain}from'../constant/domain.js';function a26_0x3cc8(){const _0x184095=['writeHead','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','text/html;\x20charset=utf-8','567522PDIoaZ','2726928VLiqwI','⚠️\x20\x20无法自动打开浏览器','headers','4222484UeMGnk','cookie','object','🔐\x20正在启动登录服务...','user','/sign-in?redirect=','25odwtCM','https://dev.lovrabet.com:','platform','log','<!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>','/api/auth/get-session','end','then','29281ktnUGc','silent','isAuth','error','127.0.0.1','open\x20\x22','1006068ODdBIe','1664KbdoCa','566yHwvry','xdg-open\x20\x22','json','2908LoKjNl','767970QIaEdG','📍\x20登录地址:','port','utf-8','https://g.yuntooai.com/cert/lovrabet-dev.json','darwin','createServer','Auth\x20server\x20error:','close','🔗\x20请手动复制登录地址到浏览器:','start\x20\x22\x22\x20\x22'];a26_0x3cc8=function(){return _0x184095;};return a26_0x3cc8();}function a26_0x92b8(_0x345553,_0x4be800){_0x345553=_0x345553-0x193;const _0x3cc8e7=a26_0x3cc8();let _0x92b855=_0x3cc8e7[_0x345553];return _0x92b855;}import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x76f7e7){const _0x401bd7=a26_0x92b8,_0x2b14eb=_0x76f7e7?.[_0x401bd7(0x1b4)]||![];if(await getIsSessionValid())return!![];const _0x430b5a=await(await fetch(_0x401bd7(0x197)))[_0x401bd7(0x1bd)]();return new Promise(async(_0x5af4c4,_0x57f5cd)=>{const _0x77450f=_0x401bd7;let _0x4ceeb7=0x0;const _0x95bbc2=a26_0x100581[_0x77450f(0x199)](_0x430b5a,async(_0x2ef787,_0x1eaa92)=>{const _0x2c2fa6=_0x77450f,_0x42574c=getUserDomain(),_0x413000=_0x2ef787[_0x2c2fa6(0x1a4)][_0x2c2fa6(0x1a6)]||'',_0x50f5e8=await fetch(_0x42574c+_0x2c2fa6(0x1b0),{'headers':{'cookie':_0x413000}})['then'](_0x492c25=>_0x492c25[_0x2c2fa6(0x1bd)]()),_0x4ea106=_0x50f5e8&&_0x50f5e8['session']&&_0x50f5e8[_0x2c2fa6(0x1a9)];if(_0x4ea106){writeFileSync(cookieFile,_0x413000,_0x2c2fa6(0x196)),_0x5af4c4(!![]);const _0x1099a7=_0x2c2fa6(0x1af);_0x1eaa92['writeHead'](0xc8,{'Content-Type':_0x2c2fa6(0x1a0)}),_0x1eaa92[_0x2c2fa6(0x1b1)](_0x1099a7),_0x95bbc2[_0x2c2fa6(0x19b)]();}else{const _0x42e080=''+encodeURIComponent('https://dev.lovrabet.com:'+_0x4ceeb7);_0x1eaa92[_0x2c2fa6(0x19e)](0x12e,{'location':_0x42574c+_0x2c2fa6(0x1aa)+_0x42e080}),_0x1eaa92[_0x2c2fa6(0x1b1)]();return;}});_0x95bbc2['listen'](0x0,_0x77450f(0x1b7),()=>{const _0x25a6d3=_0x77450f,_0xacd799=_0x95bbc2['address']();_0x4ceeb7=typeof _0xacd799===_0x25a6d3(0x1a7)&&_0xacd799?_0xacd799[_0x25a6d3(0x195)]:Number(_0xacd799);const _0x2e14f2=_0x25a6d3(0x1ac)+_0x4ceeb7;!_0x2b14eb&&(console['log'](_0x25a6d3(0x1a8)),console[_0x25a6d3(0x1ae)](_0x25a6d3(0x194),_0x2e14f2),console[_0x25a6d3(0x1ae)]('🌐\x20正在尝试自动打开浏览器...'),console[_0x25a6d3(0x1ae)](''),console['log'](_0x25a6d3(0x19f)),console['log']('')),openInBrowser(_0x2e14f2)[_0x25a6d3(0x1b2)](_0xda73de=>{const _0x4b00a6=_0x25a6d3;!_0x2b14eb&&(_0xda73de?console['log']('✅\x20浏览器已自动打开,请在浏览器中完成登录'):(console[_0x4b00a6(0x1ae)](_0x4b00a6(0x1a3)),console[_0x4b00a6(0x1ae)]('🔗\x20请手动复制登录地址到浏览器:',_0x2e14f2)),console[_0x4b00a6(0x1ae)](''));})['catch'](()=>{const _0x95b09b=_0x25a6d3;!_0x2b14eb&&(console['log']('⚠️\x20\x20无法自动打开浏览器'),console[_0x95b09b(0x1ae)](_0x95b09b(0x19c),_0x2e14f2),console['log'](''));});}),_0x95bbc2['on'](_0x77450f(0x1b6),_0x2352f0=>{const _0x5e0d63=_0x77450f;!_0x2b14eb&&console[_0x5e0d63(0x1b6)](_0x5e0d63(0x19a),_0x2352f0),_0x57f5cd(_0x2352f0);});});}function openInBrowser(_0x7b372f){return new Promise(_0x12dbc4=>{const _0x52ed6d=a26_0x92b8,_0x9c2b=process[_0x52ed6d(0x1ad)];let _0x379262;if(_0x9c2b==='win32')_0x379262=_0x52ed6d(0x19d)+_0x7b372f+'\x22';else _0x9c2b===_0x52ed6d(0x198)?_0x379262=_0x52ed6d(0x1b8)+_0x7b372f+'\x22':_0x379262=_0x52ed6d(0x1bc)+_0x7b372f+'\x22';exec(_0x379262,_0x34a520=>{_0x34a520?_0x12dbc4(![]):_0x12dbc4(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a26_0xf730b3(0x1ae)](a26_0xf730b3(0x1b5),isAuth);}
@@ -1 +1 @@
1
- const a27_0x101789=a27_0xfc04;(function(_0x2e8706,_0x197962){const _0x40de76=a27_0xfc04,_0x2701c7=_0x2e8706();while(!![]){try{const _0x596fe2=-parseInt(_0x40de76(0x14b))/0x1+parseInt(_0x40de76(0x14d))/0x2*(-parseInt(_0x40de76(0x14f))/0x3)+-parseInt(_0x40de76(0x14c))/0x4+-parseInt(_0x40de76(0x151))/0x5+parseInt(_0x40de76(0x150))/0x6+-parseInt(_0x40de76(0x149))/0x7*(parseInt(_0x40de76(0x153))/0x8)+-parseInt(_0x40de76(0x14e))/0x9*(-parseInt(_0x40de76(0x152))/0xa);if(_0x596fe2===_0x197962)break;else _0x2701c7['push'](_0x2701c7['shift']());}catch(_0x49f388){_0x2701c7['push'](_0x2701c7['shift']());}}}(a27_0x4fd9,0x52acf));function a27_0x4fd9(){const _0x3bb400=['420990eRBycD','20QgMuiO','83152SuNDts','/.lovrabet','217XWuYno','/cookie','309525dSdxIt','695824RCdvar','424474EHwEBT','4653729VHTlYN','3vwJuVS','2439642AKJYsB'];a27_0x4fd9=function(){return _0x3bb400;};return a27_0x4fd9();}import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+a27_0x101789(0x154);function a27_0xfc04(_0x1ad026,_0xdaf90a){_0x1ad026=_0x1ad026-0x149;const _0x4fd9f2=a27_0x4fd9();let _0xfc0406=_0x4fd9f2[_0x1ad026];return _0xfc0406;}export const cookieFile=configDir+a27_0x101789(0x14a);mkdirSync(configDir,{'recursive':!![]});
1
+ const a27_0x303c9f=a27_0xfb43;(function(_0xc2d1ea,_0x181a8f){const _0x327d8b=a27_0xfb43,_0x32c4e5=_0xc2d1ea();while(!![]){try{const _0x493c99=-parseInt(_0x327d8b(0x131))/0x1+parseInt(_0x327d8b(0x138))/0x2*(parseInt(_0x327d8b(0x13a))/0x3)+parseInt(_0x327d8b(0x13b))/0x4*(-parseInt(_0x327d8b(0x135))/0x5)+parseInt(_0x327d8b(0x134))/0x6+parseInt(_0x327d8b(0x137))/0x7+parseInt(_0x327d8b(0x136))/0x8*(parseInt(_0x327d8b(0x139))/0x9)+parseInt(_0x327d8b(0x130))/0xa*(-parseInt(_0x327d8b(0x133))/0xb);if(_0x493c99===_0x181a8f)break;else _0x32c4e5['push'](_0x32c4e5['shift']());}catch(_0xb9d564){_0x32c4e5['push'](_0x32c4e5['shift']());}}}(a27_0x3eec,0x997e5));import{mkdirSync}from'node:fs';function a27_0x3eec(){const _0x14cdca=['4WNPbsu','9bsPMwx','624678VTxGHq','550336TatZlG','/cookie','20UeyAyp','714484pLmyvL','/.lovrabet','6746806WWlknx','7528110VZaudW','5GpObLm','4639312pTuipK','3194926bNacVh'];a27_0x3eec=function(){return _0x14cdca;};return a27_0x3eec();}import{homedir}from'node:os';export const configDir=homedir()+a27_0x303c9f(0x132);export const cookieFile=configDir+a27_0x303c9f(0x13c);function a27_0xfb43(_0x240151,_0x4933f5){_0x240151=_0x240151-0x130;const _0x3eecbb=a27_0x3eec();let _0xfb436c=_0x3eecbb[_0x240151];return _0xfb436c;}mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- function a28_0x331a(){var _0x2be7ac=['1843506InMnXg','11OYnXQw','81901HDxJPg','2168zzLjwt','utf-8','1564116Ypsgvp','8895036BgHUrg','2471feTgyn','3098367nDaRwg','2urjBqF','3pmuxUR','10bZVCZy','605940TCwlcJ'];a28_0x331a=function(){return _0x2be7ac;};return a28_0x331a();}(function(_0x598420,_0x1dc243){var _0x22a177=a28_0x2deb,_0x1f965c=_0x598420();while(!![]){try{var _0x150c91=parseInt(_0x22a177(0xd1))/0x1*(-parseInt(_0x22a177(0xcb))/0x2)+-parseInt(_0x22a177(0xcc))/0x3*(parseInt(_0x22a177(0xc7))/0x4)+-parseInt(_0x22a177(0xce))/0x5+parseInt(_0x22a177(0xcf))/0x6+-parseInt(_0x22a177(0xc9))/0x7*(-parseInt(_0x22a177(0xc5))/0x8)+parseInt(_0x22a177(0xca))/0x9*(-parseInt(_0x22a177(0xcd))/0xa)+-parseInt(_0x22a177(0xd0))/0xb*(-parseInt(_0x22a177(0xc8))/0xc);if(_0x150c91===_0x1dc243)break;else _0x1f965c['push'](_0x1f965c['shift']());}catch(_0x1b5dfe){_0x1f965c['push'](_0x1f965c['shift']());}}}(a28_0x331a,0x323da));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';function a28_0x2deb(_0x5b5433,_0x505e1d){_0x5b5433=_0x5b5433-0xc5;var _0x331a03=a28_0x331a();var _0x2deb30=_0x331a03[_0x5b5433];return _0x2deb30;}export function getCookie(){var _0x464086=a28_0x2deb;try{return readFileSync(cookieFile,_0x464086(0xc6));}catch{}return'';}
1
+ function a28_0x3fd5(){var _0x38ec6d=['8452503gCQhOu','1036608KhEKEk','23937760npzCLt','16uAfMfr','634304bbyBUc','629877yKKDGx','1708940QgEkXV','utf-8','927087esPLra','2FBqHDy','20aWsvIL'];a28_0x3fd5=function(){return _0x38ec6d;};return a28_0x3fd5();}function a28_0x1959(_0x21083d,_0x349e1e){_0x21083d=_0x21083d-0x107;var _0x3fd5d7=a28_0x3fd5();var _0x195980=_0x3fd5d7[_0x21083d];return _0x195980;}(function(_0x16cb91,_0x115ba7){var _0x22508e=a28_0x1959,_0x3b3162=_0x16cb91();while(!![]){try{var _0x32e817=-parseInt(_0x22508e(0x10c))/0x1+-parseInt(_0x22508e(0x111))/0x2*(parseInt(_0x22508e(0x10d))/0x3)+-parseInt(_0x22508e(0x107))/0x4*(parseInt(_0x22508e(0x10e))/0x5)+-parseInt(_0x22508e(0x109))/0x6+parseInt(_0x22508e(0x110))/0x7*(parseInt(_0x22508e(0x10b))/0x8)+parseInt(_0x22508e(0x108))/0x9+parseInt(_0x22508e(0x10a))/0xa;if(_0x32e817===_0x115ba7)break;else _0x3b3162['push'](_0x3b3162['shift']());}catch(_0x2fddda){_0x3b3162['push'](_0x3b3162['shift']());}}}(a28_0x3fd5,0xd4dae));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x415c58=a28_0x1959;try{return readFileSync(cookieFile,_0x415c58(0x10f));}catch{}return'';}
@@ -1 +1 @@
1
- (function(_0x597711,_0x1ed27f){const _0x41ed72=a29_0x26c7,_0x3d800d=_0x597711();while(!![]){try{const _0x3143f2=-parseInt(_0x41ed72(0xae))/0x1+-parseInt(_0x41ed72(0xad))/0x2+-parseInt(_0x41ed72(0xb0))/0x3+parseInt(_0x41ed72(0xb1))/0x4+parseInt(_0x41ed72(0xaa))/0x5*(-parseInt(_0x41ed72(0xab))/0x6)+parseInt(_0x41ed72(0xa9))/0x7+-parseInt(_0x41ed72(0xa8))/0x8*(-parseInt(_0x41ed72(0xaf))/0x9);if(_0x3143f2===_0x1ed27f)break;else _0x3d800d['push'](_0x3d800d['shift']());}catch(_0x3f4d26){_0x3d800d['push'](_0x3d800d['shift']());}}}(a29_0x4310,0x2298f));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a29_0x26c7(_0x4bd4a9,_0x4a0789){_0x4bd4a9=_0x4bd4a9-0xa7;const _0x4310a6=a29_0x4310();let _0x26c7b7=_0x4310a6[_0x4bd4a9];return _0x26c7b7;}function a29_0x4310(){const _0x5575d4=['2870325oabZZr','85827xgdmFD','452472TpRpJr','json','8KcKYIt','1445122xCtDCr','15voaDlN','283614DczJRD','then','368588EgzTHS','142068mmCaTy'];a29_0x4310=function(){return _0x5575d4;};return a29_0x4310();}export async function getIsSessionValid(){const _0x5253ad=a29_0x26c7;try{if(!existsSync(cookieFile))return![];const _0x1a1636=readFileSync(cookieFile,'utf-8'),_0x53d4f6=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x1a1636}})[_0x5253ad(0xac)](_0x53a04d=>_0x53a04d[_0x5253ad(0xa7)]());return _0x53d4f6&&_0x53d4f6['session']&&_0x53d4f6['user'];}catch{}return![];}
1
+ function a29_0x2b74(_0x199475,_0x2aeb17){_0x199475=_0x199475-0x181;const _0x32ad38=a29_0x32ad();let _0x2b743f=_0x32ad38[_0x199475];return _0x2b743f;}(function(_0x3a33a7,_0x1b09f3){const _0x5718b9=a29_0x2b74,_0x4ad1cd=_0x3a33a7();while(!![]){try{const _0xf0733b=parseInt(_0x5718b9(0x184))/0x1*(parseInt(_0x5718b9(0x18f))/0x2)+-parseInt(_0x5718b9(0x186))/0x3*(-parseInt(_0x5718b9(0x18c))/0x4)+parseInt(_0x5718b9(0x18b))/0x5+-parseInt(_0x5718b9(0x182))/0x6*(parseInt(_0x5718b9(0x185))/0x7)+parseInt(_0x5718b9(0x187))/0x8*(parseInt(_0x5718b9(0x18a))/0x9)+parseInt(_0x5718b9(0x183))/0xa+-parseInt(_0x5718b9(0x181))/0xb*(parseInt(_0x5718b9(0x190))/0xc);if(_0xf0733b===_0x1b09f3)break;else _0x4ad1cd['push'](_0x4ad1cd['shift']());}catch(_0x590c8d){_0x4ad1cd['push'](_0x4ad1cd['shift']());}}}(a29_0x32ad,0x2c5bf));import{existsSync,readFileSync}from'node:fs';function a29_0x32ad(){const _0x543d61=['json','387aTaSfE','859010RlPBoH','28672KrebEi','utf-8','then','4996IwXOnV','156jntioF','824549jPkgGW','54biJeTM','3129290TTvqWB','58uucnUn','73906glDckr','138IWRREl','54296NHNGiz','session'];a29_0x32ad=function(){return _0x543d61;};return a29_0x32ad();}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x25a60b=a29_0x2b74;try{if(!existsSync(cookieFile))return![];const _0x1d478e=readFileSync(cookieFile,_0x25a60b(0x18d)),_0x32a1e0=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x1d478e}})[_0x25a60b(0x18e)](_0x3ca384=>_0x3ca384[_0x25a60b(0x189)]());return _0x32a1e0&&_0x32a1e0[_0x25a60b(0x188)]&&_0x32a1e0['user'];}catch{}return![];}
@@ -1 +1 @@
1
- (function(_0x5cdbd6,_0x130e81){var _0x5250e1=a30_0x1de5,_0x15366b=_0x5cdbd6();while(!![]){try{var _0x21e17f=-parseInt(_0x5250e1(0x13b))/0x1*(-parseInt(_0x5250e1(0x142))/0x2)+-parseInt(_0x5250e1(0x13f))/0x3*(parseInt(_0x5250e1(0x13c))/0x4)+parseInt(_0x5250e1(0x13a))/0x5*(-parseInt(_0x5250e1(0x146))/0x6)+parseInt(_0x5250e1(0x141))/0x7+parseInt(_0x5250e1(0x145))/0x8*(-parseInt(_0x5250e1(0x138))/0x9)+parseInt(_0x5250e1(0x144))/0xa*(-parseInt(_0x5250e1(0x13d))/0xb)+parseInt(_0x5250e1(0x140))/0xc*(parseInt(_0x5250e1(0x147))/0xd);if(_0x21e17f===_0x130e81)break;else _0x15366b['push'](_0x15366b['shift']());}catch(_0x3ee6c4){_0x15366b['push'](_0x15366b['shift']());}}}(a30_0xed7c,0x299ac));function a30_0xed7c(){var _0x48594a=['✓\x20已退出登录','636393tDaaWT','24iQEbRf','2261672ZPHKra','273012DNdmwR','!\x20当前未登录','50yNMitY','440aFLDfM','2802HKLqbK','3032198ksxxli','28233TKgqom','log','1490CAvbdw','1lFrDhH','4pEnMOm','510070yKYJnK'];a30_0xed7c=function(){return _0x48594a;};return a30_0xed7c();}import{unlinkSync,existsSync}from'node:fs';function a30_0x1de5(_0x5539ae,_0x4c6568){_0x5539ae=_0x5539ae-0x138;var _0xed7c02=a30_0xed7c();var _0x1de5fa=_0xed7c02[_0x5539ae];return _0x1de5fa;}import{cookieFile}from'./constant.js';export function logout(){var _0x17b584=a30_0x1de5;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x17b584(0x13e))):console[_0x17b584(0x139)](_0x17b584(0x143));}
1
+ (function(_0x41d737,_0x23b1d8){var _0x59e4a0=a30_0x38ae,_0x13e2d2=_0x41d737();while(!![]){try{var _0x162af1=parseInt(_0x59e4a0(0x19d))/0x1+-parseInt(_0x59e4a0(0x1a3))/0x2+-parseInt(_0x59e4a0(0x1a2))/0x3+-parseInt(_0x59e4a0(0x19c))/0x4+-parseInt(_0x59e4a0(0x19f))/0x5*(-parseInt(_0x59e4a0(0x19b))/0x6)+parseInt(_0x59e4a0(0x1a4))/0x7+parseInt(_0x59e4a0(0x19e))/0x8;if(_0x162af1===_0x23b1d8)break;else _0x13e2d2['push'](_0x13e2d2['shift']());}catch(_0x561b41){_0x13e2d2['push'](_0x13e2d2['shift']());}}}(a30_0x5b38,0x8f79e));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';function a30_0x38ae(_0x3cc345,_0x4c6912){_0x3cc345=_0x3cc345-0x19b;var _0x5b388c=a30_0x5b38();var _0x38ae2c=_0x5b388c[_0x3cc345];return _0x38ae2c;}export function logout(){var _0x2b144a=a30_0x38ae;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x2b144a(0x1a1)](_0x2b144a(0x1a0))):console[_0x2b144a(0x1a1)]('!\x20当前未登录');}function a30_0x5b38(){var _0x5b0dc7=['6456798PRnJbh','2508824NHaPhD','133994MCcrWM','2083600HhRzgT','5CJmaIg','✓\x20已退出登录','log','2811102oPWBaH','938564zmpjZI','8054361xBlSvC'];a30_0x5b38=function(){return _0x5b0dc7;};return a30_0x5b38();}