@lovrabet/cli 1.3.1 → 1.3.2-beta.1

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(_0x412812,_0x145992){const _0x3a63e1=a11_0x1f6b,_0x448b3b=_0x412812();while(!![]){try{const _0x22a21e=parseInt(_0x3a63e1(0x1f4))/0x1+parseInt(_0x3a63e1(0x1fd))/0x2+-parseInt(_0x3a63e1(0x204))/0x3+parseInt(_0x3a63e1(0x1ff))/0x4+-parseInt(_0x3a63e1(0x1f5))/0x5*(-parseInt(_0x3a63e1(0x200))/0x6)+-parseInt(_0x3a63e1(0x202))/0x7*(-parseInt(_0x3a63e1(0x1e5))/0x8)+-parseInt(_0x3a63e1(0x1fc))/0x9;if(_0x22a21e===_0x145992)break;else _0x448b3b['push'](_0x448b3b['shift']());}catch(_0x21fa25){_0x448b3b['push'](_0x448b3b['shift']());}}}(a11_0x554d,0x19cd9));import{readConfig}from'../utils/config.js';function a11_0x554d(){const _0x3d6bc4=['-api','269044JSieTK','132AdqAHN','*\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20','7GxfQNv','√\x20成功拉取\x20','166167PYIZQl','client','\x20个数据集...','1271176OowaKZ','log','×\x20API\x20配置拉取异常:','*\x20正在处理\x20','API\x20配置拉取异常:\x20','trim','\x20个数据集,生成\x20','.ts\x20-\x20客户端实例文件','\x20\x20\x20•\x20','online','message','test','\x20个模型','length','env','63269bCTAxW','2165NcsDfU','error','*\x20开始生成\x20API\x20配置文件:','API\x20配置拉取成功:\x20','string','create-api-pull','chdir','2069316QeXzRS','184098dXCfdJ'];a11_0x554d=function(){return _0x3d6bc4;};return a11_0x554d();}function a11_0x1f6b(_0x29fc2d,_0x2c0132){_0x29fc2d=_0x29fc2d-0x1e3;const _0x554d77=a11_0x554d();let _0x1f6bc7=_0x554d77[_0x29fc2d];return _0x1f6bc7;}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(_0x1f2424,_0x33d953,_0x59fe74,_0x30fd1f){const _0x49e3b7=a11_0x1f6b;let _0x444c34;try{const _0x490be3=_0x33d953?.[_0x49e3b7(0x1ea)]()||'';if(_0x490be3){const _0x5b5802=/^[a-zA-Z][a-zA-Z0-9_-]*$/;if(!_0x5b5802[_0x49e3b7(0x1f0)](_0x490be3))return console[_0x49e3b7(0x1f6)]('×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。'),![];}_0x59fe74&&(_0x444c34=process['cwd'](),process[_0x49e3b7(0x1fb)](_0x59fe74));const _0x30d8ff=readConfig(),_0x4c49eb=typeof _0x30d8ff[_0x49e3b7(0x1f3)]===_0x49e3b7(0x1f9)?_0x30d8ff['env']:undefined,_0x45bb7c=_0x30fd1f||_0x4c49eb||_0x49e3b7(0x1ee);initEnv(_0x45bb7c),console['log'](_0x49e3b7(0x201)+_0x45bb7c+')');const {configArray:_0x4b310a}=await fetchModelList(_0x1f2424),_0x1d0bad=_0x490be3?_0x490be3+_0x49e3b7(0x1fe):'api',_0x3ce879=_0x490be3?_0x490be3+'-client':_0x49e3b7(0x1e3);console['log'](_0x49e3b7(0x1f7)),console[_0x49e3b7(0x1e6)](_0x49e3b7(0x1ed)+_0x1d0bad+'.ts\x20-\x20模型配置文件'),console[_0x49e3b7(0x1e6)](_0x49e3b7(0x1ed)+_0x3ce879+_0x49e3b7(0x1ec)),console[_0x49e3b7(0x1e6)](_0x49e3b7(0x1e8)+_0x4b310a[_0x49e3b7(0x1f2)]+_0x49e3b7(0x1e4));const _0x2c4226=await generateApiFile(_0x4b310a,_0x490be3,_0x1f2424,!![],_0x45bb7c);return console[_0x49e3b7(0x1e6)](_0x49e3b7(0x203)+_0x4b310a[_0x49e3b7(0x1f2)]+_0x49e3b7(0x1eb)+_0x2c4226['modelCount']+_0x49e3b7(0x1f1)),_0x59fe74&&logger['info'](_0x49e3b7(0x1fa),_0x49e3b7(0x1f8)+_0x1f2424,{'projectPath':_0x59fe74,'appCode':_0x1f2424,'datasetCount':_0x4b310a[_0x49e3b7(0x1f2)],'filePrefix':_0x490be3}),!![];}catch(_0xc02740){const _0x37bec1=_0xc02740 instanceof Error?_0xc02740[_0x49e3b7(0x1ef)]:String(_0xc02740);return console[_0x49e3b7(0x1f6)](_0x49e3b7(0x1e7),_0x37bec1),_0x59fe74&&logger[_0x49e3b7(0x1f6)]('create-api-pull',_0x49e3b7(0x1e9)+_0x37bec1,{'appCode':_0x1f2424,'projectPath':_0x59fe74}),![];}finally{_0x444c34&&process[_0x49e3b7(0x1fb)](_0x444c34);}}
@@ -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(_0x1f159d,_0x1ffcb3){const _0x453725=a12_0x42c7,_0x3aa78f=_0x1f159d();while(!![]){try{const _0xb23d45=parseInt(_0x453725(0x1de))/0x1+-parseInt(_0x453725(0x1ef))/0x2+parseInt(_0x453725(0x1ec))/0x3+parseInt(_0x453725(0x204))/0x4*(parseInt(_0x453725(0x1e7))/0x5)+-parseInt(_0x453725(0x212))/0x6+-parseInt(_0x453725(0x1f6))/0x7+parseInt(_0x453725(0x201))/0x8*(-parseInt(_0x453725(0x1f7))/0x9);if(_0xb23d45===_0x1ffcb3)break;else _0x3aa78f['push'](_0x3aa78f['shift']());}catch(_0xb1abbb){_0x3aa78f['push'](_0x3aa78f['shift']());}}}(a12_0x1253,0x20bed));import{jsx as a12_0x37c4c9,jsxs as a12_0x1bcb19,Fragment as a12_0x459b8f}from'react/jsx-runtime';function a12_0x1253(){const _0x1fc30a=['input-css','online','CSS\x20链接','green','slice','label','message','done','16DBWWQm','max','creating','12IHZlln','white','dots','filter','length','\x20输入项目的\x20CSS\x20资源链接(https://...)','map','创建菜单失败','*\x20正在创建菜单...','join','repeat','path','\x20输入项目的\x20JS\x20资源链接(https://...)','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','750324ZueeMg','lovrabet\x20auth','return','gray','backspace','selecting','delete','菜单名称','includes','column','fill','147078fCTbsp','local','JS\x20链接无法访问','√\x20菜单创建完成','red','blue','\x20←\x20','[\x20]','has','194585xnvTXH','input-js','size','trim','!\x20未找到本地页面,请先创建页面','45732mZxKsc','upArrow','Lovrabet平台','29938JOdTwh','*\x20JS\x20链接:\x20','downArrow','then','cyan','提示:使用\x20','*\x20CSS\x20链接:\x20','22141WbZQDs','7929iUrfiM','CSS\x20链接无法访问'];a12_0x1253=function(){return _0x1fc30a;};return a12_0x1253();}import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a12_0x1be3c3 from'ink-spinner';import{useGetOnlineMenuList}from'./use-get-online-menu-list.js';import{getLocalPages}from'./get-local-pages.js';function a12_0x42c7(_0x4b57cb,_0x3e3f66){_0x4b57cb=_0x4b57cb-0x1dd;const _0x1253dd=a12_0x1253();let _0x42c7de=_0x1253dd[_0x4b57cb];return _0x42c7de;}import{createMenus}from'./create-menu.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import.meta.main&&render(a12_0x37c4c9(AppMenuSyncUI,{}));export function AppMenuSyncUI(){const _0x569889=a12_0x42c7,{exit:_0x4ae11f}=useApp(),{loading:_0x511fd5,menuList:_0x3b1bb9,error:_0x54ef94}=useGetOnlineMenuList(),_0x150f6d=getLocalPages(),_0x5a6d4b=_0x3b1bb9[_0x569889(0x20a)](_0x1d544a=>_0x1d544a[_0x569889(0x20f)]),_0x23e5ea=[_0x569889(0x219),..._0x150f6d[_0x569889(0x20a)](_0x3230f4=>_0x3230f4[_0x569889(0x1fe)])],_0x22ac7d=getStringWidth(getMaxWidth(_0x23e5ea,0x4)),_0x303db8=getStringWidth(getMaxWidth([_0x569889(0x219)])),[_0x5eb7a4,_0x199c1a]=useState('selecting'),[_0x2c00e3,_0x42ea75]=useState(new Set()),[_0x3d3b09,_0x263977]=useState(0x0),[_0x6bca0a,_0x5ccc9a]=useState(''),[_0x5b1cbd,_0x5aea2d]=useState(''),[_0x42efc5,_0x3bd04f]=useState(''),[_0x5a8ce4,_0x4274c8]=useState(''),[_0x3409d0,_0x4d33a7]=useState([]),_0x23deec=_0x150f6d[_0x569889(0x20a)](_0x1861ee=>({'label':_0x1861ee[_0x569889(0x1fe)],'path':_0x1861ee['path'],'local':!![],'online':_0x5a6d4b[_0x569889(0x21a)](_0x1861ee[_0x569889(0x20f)])})),_0x192b0d=_0x150f6d[_0x569889(0x207)](_0x2802be=>{const _0x3e3a1b=_0x569889;return!_0x5a6d4b[_0x3e3a1b(0x21a)](_0x2802be['path']);});useEffect(()=>{const _0x2291f4=_0x569889;if(!_0x511fd5&&_0x150f6d[_0x2291f4(0x208)]>0x0&&_0x2c00e3[_0x2291f4(0x1e9)]===0x0){const _0xee06fe=new Set(_0x150f6d[_0x2291f4(0x20a)]((_0x3c2102,_0x5e38b9)=>({'page':_0x3c2102,'index':_0x5e38b9}))[_0x2291f4(0x207)](({page:_0x5a15df})=>!_0x5a6d4b[_0x2291f4(0x21a)](_0x5a15df['path']))[_0x2291f4(0x20a)](({index:_0x2b4fef})=>_0x2b4fef));_0x42ea75(_0xee06fe);}},[_0x511fd5,_0x150f6d[_0x569889(0x208)],_0x5a6d4b['length']]),useInput(async(_0x4120aa,_0x49967a)=>{const _0x4b3b52=_0x569889;if(_0x5eb7a4===_0x4b3b52(0x217)){if(_0x49967a[_0x4b3b52(0x1ed)]){_0x263977(_0x2f7b31=>_0x2f7b31>0x0?_0x2f7b31-0x1:_0x150f6d['length']-0x1);return;}if(_0x49967a[_0x4b3b52(0x1f1)]){_0x263977(_0x36c968=>_0x36c968<_0x150f6d['length']-0x1?_0x36c968+0x1:0x0);return;}if(_0x4120aa==='\x20'){_0x42ea75(_0x213198=>{const _0x48cbe1=_0x4b3b52,_0x5d4c1b=new Set(_0x213198);return _0x5d4c1b[_0x48cbe1(0x1e6)](_0x3d3b09)?_0x5d4c1b[_0x48cbe1(0x218)](_0x3d3b09):_0x5d4c1b['add'](_0x3d3b09),_0x5d4c1b;});return;}if(_0x4120aa==='a'||_0x4120aa==='A'){const _0x386c99=new Set(_0x150f6d['map']((_0x5cd12b,_0xd8cf8f)=>_0xd8cf8f));_0x42ea75(_0x386c99);return;}if(_0x4120aa==='i'||_0x4120aa==='I'||_0x4120aa==='r'||_0x4120aa==='R'){_0x42ea75(_0x3abd7f=>{const _0x422391=_0x4b3b52,_0x59b00e=new Set();for(let _0x15abad=0x0;_0x15abad<_0x150f6d[_0x422391(0x208)];_0x15abad++){!_0x3abd7f[_0x422391(0x1e6)](_0x15abad)&&_0x59b00e['add'](_0x15abad);}return _0x59b00e;});return;}if(_0x4120aa==='q'||_0x4120aa==='Q'){_0x4ae11f();return;}if(_0x49967a['return']){if(_0x2c00e3['size']===0x0){_0x4274c8('请至少选择一个菜单');return;}const _0x118b11=_0x150f6d[_0x4b3b52(0x207)]((_0x55bb6f,_0x4209fb)=>_0x2c00e3[_0x4b3b52(0x1e6)](_0x4209fb)),_0x38c9e0=_0x118b11[_0x4b3b52(0x20a)](_0x560170=>_0x560170[_0x4b3b52(0x1fe)])[_0x4b3b52(0x20d)](',\x20');_0x4d33a7([{'label':'已选择菜单','value':_0x2c00e3[_0x4b3b52(0x1e9)]+'\x20个'}]),_0x4274c8(''),_0x199c1a(_0x4b3b52(0x1e8));return;}return;}if(_0x5eb7a4===_0x4b3b52(0x1e8)){if(_0x49967a[_0x4b3b52(0x214)]){const _0xf3cc9c=_0x42efc5['trim']();if(_0xf3cc9c==='')return;if(!isValidJsHttpsUrl(_0xf3cc9c)){_0x4274c8('请输入有效的\x20JS\x20https\x20链接');return;}if(!await isUrlReachable(_0xf3cc9c)){_0x4274c8(_0x4b3b52(0x1e0));return;}_0x5ccc9a(_0xf3cc9c),_0x4d33a7(_0x3441a9=>[..._0x3441a9,{'label':'JS\x20链接','value':_0xf3cc9c}]),_0x3bd04f(''),_0x4274c8(''),_0x199c1a('input-css');return;}if(_0x49967a[_0x4b3b52(0x216)]||_0x49967a[_0x4b3b52(0x218)]){_0x3bd04f(_0x1879ea=>_0x1879ea['slice'](0x0,-0x1)),_0x4274c8('');return;}_0x3bd04f(_0x1fa1bd=>_0x1fa1bd+_0x4120aa);return;}if(_0x5eb7a4===_0x4b3b52(0x1f9)){if(_0x49967a[_0x4b3b52(0x214)]){const _0x56d557=_0x42efc5[_0x4b3b52(0x1ea)]();if(_0x56d557==='')return;if(!isValidCssHttpsUrl(_0x56d557)){_0x4274c8('请输入有效的\x20CSS\x20https\x20链接');return;}if(!await isUrlReachable(_0x56d557)){_0x4274c8(_0x4b3b52(0x1f8));return;}_0x5aea2d(_0x56d557),_0x4d33a7(_0x465cf3=>[..._0x465cf3,{'label':_0x4b3b52(0x1fb),'value':_0x56d557}]),_0x3bd04f(''),_0x4274c8(''),_0x199c1a(_0x4b3b52(0x203));const _0x1329cc=_0x150f6d['filter']((_0x57ab87,_0x382521)=>_0x2c00e3[_0x4b3b52(0x1e6)](_0x382521));createMenus(_0x1329cc,[_0x6bca0a,_0x56d557])[_0x4b3b52(0x1f2)](()=>{const _0x418e0e=_0x4b3b52;_0x199c1a(_0x418e0e(0x200)),setTimeout(()=>{_0x4ae11f();},0x3e8);})['catch'](_0xa4bb12=>{const _0x4c7a8a=_0x4b3b52;_0x4274c8(_0xa4bb12[_0x4c7a8a(0x1ff)]||_0x4c7a8a(0x20b)),_0x199c1a('selecting');});return;}if(_0x49967a[_0x4b3b52(0x216)]||_0x49967a['delete']){_0x3bd04f(_0x28665b=>_0x28665b[_0x4b3b52(0x1fd)](0x0,-0x1)),_0x4274c8('');return;}_0x3bd04f(_0x390ae0=>_0x390ae0+_0x4120aa);return;}});if(_0x511fd5)return a12_0x1bcb19(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x37c4c9(Text,{'children':'\x20\x20'}),a12_0x37c4c9(a12_0x1be3c3,{'type':_0x569889(0x206)}),a12_0x37c4c9(Text,{'children':'\x20正在获取线上菜单列表...'})]});if(_0x54ef94)return a12_0x1bcb19(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a12_0x1bcb19(Text,{'color':_0x569889(0x1e2),'children':['✗\x20',_0x54ef94]}),a12_0x1bcb19(Box,{'marginTop':0x1,'children':[a12_0x37c4c9(Text,{'color':_0x569889(0x215),'children':_0x569889(0x1f4)}),a12_0x37c4c9(Text,{'color':_0x569889(0x1f3),'children':_0x569889(0x213)}),a12_0x37c4c9(Text,{'color':_0x569889(0x215),'children':'\x20命令重新登录'})]})]});if(_0x150f6d['length']===0x0)return a12_0x37c4c9(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a12_0x37c4c9(Text,{'color':'yellow','children':_0x569889(0x1eb)})});return a12_0x1bcb19(Box,{'flexDirection':_0x569889(0x21b),'marginTop':0x1,'marginBottom':0x1,'children':[_0x5eb7a4===_0x569889(0x217)&&a12_0x1bcb19(a12_0x459b8f,{'children':[a12_0x1bcb19(Box,{'children':[a12_0x1bcb19(Text,{'bold':!![],'children':['\x20\x20',_0x569889(0x219),getRemainingSpaces(_0x22ac7d,'菜单名称')]}),a12_0x1bcb19(Text,{'bold':!![],'children':['本地',getRemainingSpaces(_0x303db8,_0x569889(0x219))]}),a12_0x1bcb19(Text,{'bold':!![],'children':[_0x569889(0x1ee),getRemainingSpaces(_0x303db8,_0x569889(0x219))]})]}),_0x23deec[_0x569889(0x20a)](_0x413339=>a12_0x1bcb19(Box,{'children':[a12_0x1bcb19(Text,{'children':['\x20\x20',_0x413339[_0x569889(0x1fe)],getRemainingSpaces(_0x22ac7d,_0x413339[_0x569889(0x1fe)])]}),a12_0x1bcb19(Text,{'color':_0x569889(0x1fc),'children':[_0x413339[_0x569889(0x1df)]?'✓':'✗',getRemainingSpaces(_0x303db8,'✓')]}),a12_0x1bcb19(Text,{'color':_0x413339['online']?_0x569889(0x1fc):_0x569889(0x1e2),'children':[_0x413339[_0x569889(0x1fa)]?'✓':'✗',getRemainingSpaces(_0x303db8,'✓')]})]},_0x413339[_0x569889(0x20f)]))]}),_0x5eb7a4===_0x569889(0x217)&&_0x3409d0[_0x569889(0x208)]===0x0&&a12_0x37c4c9(Box,{'marginTop':0x1,'children':a12_0x37c4c9(Text,{'color':'cyan','children':'*\x20同步菜单到\x20Lovrabet\x20平台'})}),_0x3409d0[_0x569889(0x20a)]((_0x3c7776,_0x4c8e7b)=>a12_0x1bcb19(Box,{'children':[a12_0x1bcb19(Text,{'color':_0x569889(0x1fc),'children':['√\x20',_0x3c7776[_0x569889(0x1fe)],':\x20']}),a12_0x37c4c9(Text,{'color':'cyan','children':_0x3c7776['value']})]},_0x4c8e7b)),_0x5a8ce4&&_0x5eb7a4===_0x569889(0x217)&&a12_0x37c4c9(Box,{'marginTop':0x1,'children':a12_0x1bcb19(Text,{'color':'red','children':['✗\x20',_0x5a8ce4]})}),_0x5eb7a4===_0x569889(0x217)&&a12_0x37c4c9(a12_0x459b8f,{'children':a12_0x1bcb19(Box,{'marginTop':_0x3409d0['length']>0x0||_0x5a8ce4?0x1:0x0,'flexDirection':'column','children':[a12_0x37c4c9(Text,{'bold':!![],'children':'*\x20请选择要同步的菜单:'}),_0x150f6d[_0x569889(0x20a)]((_0x2f4a9f,_0xab617f)=>{const _0x55e7a6=_0x569889,_0x5a584e=_0x3d3b09===_0xab617f,_0x1bbc1a=_0x2c00e3[_0x55e7a6(0x1e6)](_0xab617f),_0x83de97=_0x5a6d4b[_0x55e7a6(0x21a)](_0x2f4a9f[_0x55e7a6(0x20f)]),_0x90f162=_0x83de97?'更新':'新建';return a12_0x37c4c9(Box,{'children':a12_0x1bcb19(Text,{'backgroundColor':_0x5a584e?_0x55e7a6(0x1e3):undefined,'color':_0x5a584e?_0x55e7a6(0x205):undefined,'children':['\x20\x20',_0x1bbc1a?'[✓]':_0x55e7a6(0x1e5),'\x20',_0x2f4a9f[_0x55e7a6(0x1fe)]]})},_0x2f4a9f[_0x55e7a6(0x20f)]);}),a12_0x37c4c9(Box,{'marginTop':0x1,'children':a12_0x1bcb19(Text,{'color':'gray','children':['\x20',_0x569889(0x211)]})})]})}),_0x5eb7a4===_0x569889(0x1e8)&&a12_0x1bcb19(a12_0x459b8f,{'children':[a12_0x1bcb19(Box,{'children':[a12_0x37c4c9(Text,{'children':_0x569889(0x1f0)}),a12_0x37c4c9(Text,{'color':_0x569889(0x1fc),'children':_0x42efc5}),_0x5a8ce4&&a12_0x1bcb19(Text,{'color':'red','children':[_0x569889(0x1e4),_0x5a8ce4]})]}),!_0x5a8ce4&&a12_0x37c4c9(Box,{'children':a12_0x37c4c9(Text,{'color':_0x569889(0x215),'children':_0x569889(0x210)})})]}),_0x5eb7a4===_0x569889(0x1f9)&&a12_0x1bcb19(a12_0x459b8f,{'children':[a12_0x1bcb19(Box,{'children':[a12_0x37c4c9(Text,{'children':_0x569889(0x1f5)}),a12_0x37c4c9(Text,{'color':'green','children':_0x42efc5}),_0x5a8ce4&&a12_0x1bcb19(Text,{'color':_0x569889(0x1e2),'children':[_0x569889(0x1e4),_0x5a8ce4]})]}),!_0x5a8ce4&&a12_0x37c4c9(Box,{'children':a12_0x37c4c9(Text,{'color':_0x569889(0x215),'children':_0x569889(0x209)})})]}),_0x5eb7a4===_0x569889(0x203)&&a12_0x37c4c9(Box,{'children':a12_0x37c4c9(Text,{'children':_0x569889(0x20c)})}),_0x5eb7a4===_0x569889(0x200)&&a12_0x37c4c9(Box,{'children':a12_0x37c4c9(Text,{'color':_0x569889(0x1fc),'children':_0x569889(0x1e1)})})]});}function getStringWidth(_0x2fd070){let _0xcde9bd=0x0;for(const _0x23a76c of _0x2fd070){/[\u4e00-\u9fa5]/['test'](_0x23a76c)?_0xcde9bd+=0x2:_0xcde9bd+=0x1;}return _0xcde9bd;}function getRemainingSpaces(_0x2f5002,_0x494b11){const _0x10f06d=a12_0x42c7,_0x5b92c3=getStringWidth(_0x494b11);return Array(Math[_0x10f06d(0x202)](0x0,_0x2f5002-_0x5b92c3))[_0x10f06d(0x1dd)]('\x20')[_0x10f06d(0x20d)]('');}function getMaxWidth(_0x5a3233,_0x4dd8a6=0x2){const _0x9cb395=a12_0x42c7;let _0x26c8e2='',_0x5b8d5d=0x0;for(const _0x4f7a07 of _0x5a3233){const _0x4ce8f5=getStringWidth(_0x4f7a07);_0x4ce8f5>_0x5b8d5d&&(_0x5b8d5d=_0x4ce8f5,_0x26c8e2=_0x4f7a07);}return _0x26c8e2+'\x20'[_0x9cb395(0x20e)](_0x4dd8a6);}
@@ -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(_0x3e9263,_0x14c229){const _0x35c9e0=a13_0x33c4,_0xa31fb8=_0x3e9263();while(!![]){try{const _0x507951=parseInt(_0x35c9e0(0x11f))/0x1*(parseInt(_0x35c9e0(0x119))/0x2)+-parseInt(_0x35c9e0(0x135))/0x3*(parseInt(_0x35c9e0(0x12e))/0x4)+parseInt(_0x35c9e0(0x13f))/0x5*(-parseInt(_0x35c9e0(0x12f))/0x6)+-parseInt(_0x35c9e0(0x137))/0x7*(-parseInt(_0x35c9e0(0x13c))/0x8)+parseInt(_0x35c9e0(0x13d))/0x9*(-parseInt(_0x35c9e0(0x139))/0xa)+-parseInt(_0x35c9e0(0x12b))/0xb*(parseInt(_0x35c9e0(0x146))/0xc)+parseInt(_0x35c9e0(0x145))/0xd;if(_0x507951===_0x14c229)break;else _0xa31fb8['push'](_0xa31fb8['shift']());}catch(_0x489006){_0xa31fb8['push'](_0xa31fb8['shift']());}}}(a13_0x188d,0x5b929));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a13_0x188d(){const _0x1aa8ee=['success','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','log','48436KFSoBg','includes','data','未提供应用AppCode,且配置中也没有默认值','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','application/json','11MiBJlE','/smartapi/menu/create','errorMsg','error','正在创建菜单:\x20','info','length','菜单创建成功:\x20','创建菜单失败:\x20','label','create-menu','!\x20请使用以下方式之一:','33ffUNPF','path','create-menus','4OgsskL','48918Ojuinp','status','json','批量创建菜单完成,共\x20','resources','map','1597716aQbtcy','0011','7EisOZk','appcode','1943140uTHqIa','stringify','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','4345176wJeAwn','9jZiLgp','import','295FozvWA','未知错误','创建菜单成功:','all','procode','创建菜单失败,HTTP状态码:\x20','13824772JGIikZ','1159980phdyxY','errorCode'];a13_0x188d=function(){return _0x1aa8ee;};return a13_0x188d();}import{logger}from'../utils/logger.js';const config=readConfig();export async function createMenu(_0x4252c9){const _0xbf915b=a13_0x33c4,_0x38d302=config?.['appcode'];if(!_0x38d302){const _0x6c2913=_0xbf915b(0x11c);logger[_0xbf915b(0x122)](_0xbf915b(0x129),_0x6c2913),console[_0xbf915b(0x122)]('×\x20'+_0x6c2913),console[_0xbf915b(0x118)](_0xbf915b(0x12a)),console['log'](_0xbf915b(0x13b)),console[_0xbf915b(0x118)](_0xbf915b(0x117));return;}logger[_0xbf915b(0x124)](_0xbf915b(0x129),_0xbf915b(0x123)+_0x4252c9[_0xbf915b(0x128)]+'\x20('+_0x4252c9[_0xbf915b(0x12c)]+')');const _0x24541e={'appCode':_0x38d302,'type':_0xbf915b(0x143),'sort':0x0,'extend':{'loadScriptMode':_0xbf915b(0x13e),'resources':_0x4252c9[_0xbf915b(0x133)]?JSON[_0xbf915b(0x13a)](_0x4252c9[_0xbf915b(0x133)]):undefined},..._0x4252c9},_0x2c5b25=await fetch(getApiDomain()+_0xbf915b(0x120),{'method':'POST','body':JSON['stringify'](_0x24541e),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x2c5b25['ok']){if(_0x2c5b25[_0xbf915b(0x130)]===0x191){const _0x3f29c2='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0xbf915b(0x122)](_0xbf915b(0x129),_0x3f29c2,{'status':_0x2c5b25[_0xbf915b(0x130)],'menu':_0x4252c9[_0xbf915b(0x128)]});throw new Error(_0x3f29c2);}const _0x3c4537=_0xbf915b(0x144)+_0x2c5b25['status'];logger[_0xbf915b(0x122)](_0xbf915b(0x129),_0x3c4537,{'menu':_0x4252c9[_0xbf915b(0x128)]});throw new Error(_0x3c4537);}const _0x4442ad=await _0x2c5b25[_0xbf915b(0x131)]();if(!_0x4442ad[_0xbf915b(0x116)]){const _0x25be37=_0xbf915b(0x127)+(_0x4442ad[_0xbf915b(0x121)]||_0xbf915b(0x140));logger['error'](_0xbf915b(0x129),_0x25be37,{'errorCode':_0x4442ad[_0xbf915b(0x147)],'errorMsg':_0x4442ad[_0xbf915b(0x121)],'menu':_0x4252c9[_0xbf915b(0x128)]});throw new Error(_0x25be37);}logger[_0xbf915b(0x124)](_0xbf915b(0x129),_0xbf915b(0x126)+_0x4252c9[_0xbf915b(0x128)],_0x4442ad[_0xbf915b(0x11b)]),console[_0xbf915b(0x118)](_0xbf915b(0x141),_0x4442ad[_0xbf915b(0x11b)]);}async function _createMenu(_0x275587,_0x5e15c7){const _0x142b28=a13_0x33c4,_0x77c95a=config?.[_0x142b28(0x138)];if(!_0x77c95a){const _0x1c9ef2=_0x142b28(0x11c);logger[_0x142b28(0x122)]('create-menu',_0x1c9ef2),console[_0x142b28(0x122)]('×\x20'+_0x1c9ef2),console[_0x142b28(0x118)](_0x142b28(0x12a)),console[_0x142b28(0x118)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console['log'](_0x142b28(0x117));return;}const _0x1f9fc9={'appCode':_0x77c95a,'type':_0x142b28(0x143),'sort':0x0,'extend':{'loadScriptMode':_0x142b28(0x13e),'resources':_0x5e15c7?JSON[_0x142b28(0x13a)](_0x5e15c7):undefined},'label':_0x275587[_0x142b28(0x128)],'path':_0x275587['path']},_0x1c7144=await fetch(getApiDomain()+'/smartapi/menu/create',{'method':'POST','body':JSON[_0x142b28(0x13a)](_0x1f9fc9),'headers':{'Content-Type':_0x142b28(0x11e),'Cookie':getCookie()}});if(!_0x1c7144['ok']){if(_0x1c7144[_0x142b28(0x130)]===0x191){const _0x287e24='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x142b28(0x122)](_0x142b28(0x129),_0x287e24,{'status':_0x1c7144[_0x142b28(0x130)],'menu':_0x275587[_0x142b28(0x128)]});throw new Error(_0x287e24);}const _0x557d4d=_0x142b28(0x144)+_0x1c7144['status'];logger[_0x142b28(0x122)]('create-menu',_0x557d4d,{'menu':_0x275587[_0x142b28(0x128)]});throw new Error(_0x557d4d);}const _0x4bb48e=await _0x1c7144['json']();if(!_0x4bb48e[_0x142b28(0x116)]){if(_0x4bb48e[_0x142b28(0x147)]===_0x142b28(0x136)||_0x4bb48e[_0x142b28(0x121)]?.[_0x142b28(0x11a)]('登录')){const _0x216132=_0x142b28(0x11d);logger[_0x142b28(0x122)]('create-menu',_0x216132,{'errorCode':_0x4bb48e[_0x142b28(0x147)],'errorMsg':_0x4bb48e['errorMsg'],'menu':_0x275587[_0x142b28(0x128)]});throw new Error(_0x216132);}const _0x1d7c9d=_0x142b28(0x127)+(_0x4bb48e[_0x142b28(0x121)]||'未知错误');logger['error'](_0x142b28(0x129),_0x1d7c9d,{'errorCode':_0x4bb48e[_0x142b28(0x147)],'errorMsg':_0x4bb48e[_0x142b28(0x121)],'menu':_0x275587[_0x142b28(0x128)]});throw new Error(_0x1d7c9d);}logger['info']('create-menu',_0x142b28(0x126)+_0x275587[_0x142b28(0x128)]);}function a13_0x33c4(_0x288237,_0x59e976){_0x288237=_0x288237-0x116;const _0x188df6=a13_0x188d();let _0x33c45e=_0x188df6[_0x288237];return _0x33c45e;}export async function createMenus(_0x2ea568,_0x5273f4){const _0x6ae084=a13_0x33c4;logger[_0x6ae084(0x124)]('create-menus','开始批量创建菜单,共\x20'+_0x2ea568[_0x6ae084(0x125)]+'\x20个'),await Promise[_0x6ae084(0x142)](_0x2ea568[_0x6ae084(0x134)](async _0x31ce8a=>{await _createMenu(_0x31ce8a,_0x5273f4);})),logger['info'](_0x6ae084(0x12d),_0x6ae084(0x132)+_0x2ea568[_0x6ae084(0x125)]+'\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_0x4174f3=a14_0x57b9;(function(_0x40373c,_0x164d78){const _0x43c90f=a14_0x57b9,_0x3c4cb4=_0x40373c();while(!![]){try{const _0x3c4640=parseInt(_0x43c90f(0xc7))/0x1+-parseInt(_0x43c90f(0xbb))/0x2+-parseInt(_0x43c90f(0xc1))/0x3+parseInt(_0x43c90f(0xb3))/0x4*(-parseInt(_0x43c90f(0xba))/0x5)+-parseInt(_0x43c90f(0xbc))/0x6+-parseInt(_0x43c90f(0xc2))/0x7+parseInt(_0x43c90f(0xc6))/0x8*(parseInt(_0x43c90f(0xbf))/0x9);if(_0x3c4640===_0x164d78)break;else _0x3c4cb4['push'](_0x3c4cb4['shift']());}catch(_0x314c72){_0x3c4cb4['push'](_0x3c4cb4['shift']());}}}(a14_0x48f0,0xc08f9));function a14_0x57b9(_0x3f96f5,_0x222183){_0x3f96f5=_0x3f96f5-0xb2;const _0x48f01e=a14_0x48f0();let _0x57b976=_0x48f01e[_0x3f96f5];return _0x57b976;}import{readdirSync,statSync,readFileSync}from'fs';function a14_0x48f0(){const _0x47c2fb=['replaceAll','35541IzxSeB','slice','637347PZOFzQ','1682310MPIZeu','isDirectory','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','replace','4960RhQAyf','279809RatxEW','match','concat','.tsx','372tnAGPz','cwd','path','push','index.tsx','endsWith','forEach','25995gWYiXP','613744SEkUaD','4177812FMeTSR','filter'];a14_0x48f0=function(){return _0x47c2fb;};return a14_0x48f0();}import{join,relative,resolve}from'path';const pagesDir=resolve(process[a14_0x4174f3(0xb4)](),'src/pages');export function extractTitleFromComment(_0x1368b9){const _0x4cec07=a14_0x4174f3;try{const _0x329ad1=readFileSync(_0x1368b9,'utf-8'),_0x3482a4=_0x329ad1['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x3482a4&&_0x3482a4[0x1]){const _0x3b982c=_0x3482a4[0x1],_0x1eb184=_0x3b982c[_0x4cec07(0xc8)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x1eb184&&_0x1eb184[0x1])return _0x1eb184[0x1]['trim']();}let _0x261de0=null;const _0x2492f5=_0x329ad1[_0x4cec07(0xc8)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x2492f5&&_0x2492f5[0x1]&&(_0x261de0=_0x2492f5[0x1]);if(!_0x261de0){const _0x470bf6=_0x329ad1[_0x4cec07(0xc8)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x470bf6&&_0x470bf6[0x1]&&(_0x261de0=_0x470bf6[0x1]);}if(_0x261de0){const _0x5ae1e5=new RegExp('\x5cb'+_0x261de0+_0x4cec07(0xc4)),_0x466022=_0x329ad1[_0x4cec07(0xc8)](_0x5ae1e5);if(_0x466022&&_0x466022[0x1])return _0x466022[0x1];return _0x261de0;}return null;}catch(_0x926b91){return null;}}export function getLocalPages(_0x1df700=pagesDir,_0x4fd6f2=pagesDir){const _0xefd4fd=a14_0x4174f3;let _0x4fb9b0=[];const _0x407590=readdirSync(_0x1df700);return _0x407590[_0xefd4fd(0xb9)](_0x37e197=>{const _0xee9694=_0xefd4fd,_0xb16a63=join(_0x1df700,_0x37e197),_0x311cab=statSync(_0xb16a63);if(_0x311cab&&_0x311cab[_0xee9694(0xc3)]())_0x4fb9b0=_0x4fb9b0[_0xee9694(0xc9)](getLocalPages(_0xb16a63,_0x4fd6f2));else{if(_0x37e197[_0xee9694(0xb8)](_0xee9694(0xb2))){let _0x409f56=relative(_0x4fd6f2,_0xb16a63);_0x409f56[_0xee9694(0xb8)](_0xee9694(0xb7))?_0x409f56=_0x409f56[_0xee9694(0xc5)](/index\.tsx$/,''):_0x409f56=_0x409f56['replace'](/\.tsx$/,'');_0x409f56['endsWith']('/')&&(_0x409f56=_0x409f56[_0xee9694(0xc0)](0x0,-0x1));const _0x2a6012=extractTitleFromComment(_0xb16a63),_0x2e8ad5=_0x2a6012||_0x409f56;_0x4fb9b0[_0xee9694(0xb6)]({'path':_0x409f56[_0xee9694(0xbe)]('$',':'),'label':_0x2e8ad5});}}}),_0x4fb9b0[_0xefd4fd(0xbd)](_0x306d5d=>_0x306d5d[_0xefd4fd(0xb5)]!=='');}
@@ -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(_0x5ece29,_0x5d89b8){const _0x409e93=a15_0x264f,_0x4e6657=_0x5ece29();while(!![]){try{const _0x5031fe=-parseInt(_0x409e93(0xda))/0x1+parseInt(_0x409e93(0xcc))/0x2*(-parseInt(_0x409e93(0xde))/0x3)+-parseInt(_0x409e93(0xd9))/0x4+-parseInt(_0x409e93(0xc5))/0x5+-parseInt(_0x409e93(0xd3))/0x6*(parseInt(_0x409e93(0xd1))/0x7)+parseInt(_0x409e93(0xc1))/0x8+parseInt(_0x409e93(0xc4))/0x9;if(_0x5031fe===_0x5d89b8)break;else _0x4e6657['push'](_0x4e6657['shift']());}catch(_0x24b5b6){_0x4e6657['push'](_0x4e6657['shift']());}}}(a15_0x24dd,0x44775));import{getCookie}from'../auth/get-cookie.js';function a15_0x264f(_0x9713c9,_0x4d0376){_0x9713c9=_0x9713c9-0xbd;const _0x24dd65=a15_0x24dd();let _0x264f96=_0x24dd65[_0x9713c9];return _0x264f96;}import{getApiDomain}from'../constant/domain.js';function a15_0x24dd(){const _0x1e2149=['服务端返回空菜单列表','label','map','online','\x20个线上菜单','status','622aGKTQn','flat','成功获取\x20','正在获取日常菜单列表...\x20(appCode:\x20','未提供应用AppCode,且配置中也没有默认值','161511LXIQPc','errorCode','60dKpWOp','path','length','resources','/smartapi/menu/find?appCode=','errorMsg','1176492okneTO','382878bzxsRt','push','GET','!\x20请使用以下方式之一:','3462UJYigz','data','application/json','get-online-menu-list','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','error','获取菜单列表失败,HTTP状态码:\x20','正在获取线上菜单列表...\x20(appCode:\x20','log','extend','2181960fbmdGr','info','children','14632686bcMQFo','1757685nIUjKB'];a15_0x24dd=function(){return _0x1e2149;};return a15_0x24dd();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';const config=readConfig();export async function getOnlineMenuList(){const _0x34ad9a=a15_0x264f,_0x3cc5e0=config?.['appcode'];if(!_0x3cc5e0){const _0x569691=_0x34ad9a(0xd0);return logger['error'](_0x34ad9a(0xe1),_0x569691),console[_0x34ad9a(0xe3)]('×\x20'+_0x569691),console['log'](_0x34ad9a(0xdd)),console[_0x34ad9a(0xbf)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console[_0x34ad9a(0xbf)]('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>'),[];}const _0x29fae5=getEnv();logger[_0x34ad9a(0xc2)]('get-online-menu-list',_0x29fae5===_0x34ad9a(0xc9)?_0x34ad9a(0xbe)+_0x3cc5e0+')':_0x34ad9a(0xcf)+_0x3cc5e0+')');const _0x239f07=await fetch(getApiDomain()+_0x34ad9a(0xd7)+_0x3cc5e0,{'method':_0x34ad9a(0xdc),'headers':{'Content-Type':_0x34ad9a(0xe0),'Cookie':getCookie()}});if(!_0x239f07['ok']){if(_0x239f07[_0x34ad9a(0xcb)]===0x191){const _0x389ff5=_0x34ad9a(0xe2);logger[_0x34ad9a(0xe3)](_0x34ad9a(0xe1),_0x389ff5,{'status':_0x239f07[_0x34ad9a(0xcb)]});throw new Error(_0x389ff5);}const _0x25343f=_0x34ad9a(0xbd)+_0x239f07[_0x34ad9a(0xcb)];logger[_0x34ad9a(0xe3)](_0x34ad9a(0xe1),_0x25343f);throw new Error(_0x25343f);}const _0x20015b=await _0x239f07['json']();if(!_0x20015b['success']){const _0x5b491e='获取菜单列表失败:\x20'+(_0x20015b[_0x34ad9a(0xd8)]||'未知错误');logger[_0x34ad9a(0xe3)]('get-online-menu-list',_0x5b491e,{'errorCode':_0x20015b[_0x34ad9a(0xd2)],'errorMsg':_0x20015b['errorMsg']});throw new Error(_0x5b491e);}if(!_0x20015b[_0x34ad9a(0xdf)])return logger[_0x34ad9a(0xc2)]('get-online-menu-list',_0x34ad9a(0xc6)),[];return logger[_0x34ad9a(0xc2)]('get-online-menu-list',_0x34ad9a(0xce)+_0x20015b['data'][_0x34ad9a(0xd5)]+_0x34ad9a(0xca)),_0x20015b[_0x34ad9a(0xdf)][_0x34ad9a(0xc8)](formatMenuList)[_0x34ad9a(0xcd)]();}function formatMenuList(_0x2f6acc){const _0x14095d=a15_0x264f;let _0x28a67a=[];try{if(_0x2f6acc[_0x14095d(0xc0)]?.[_0x14095d(0xd6)]){const _0x10281a=JSON['parse'](_0x2f6acc['extend']['resources']);Array['isArray'](_0x10281a)&&(_0x28a67a=_0x10281a);}}catch(_0x5e8b19){}const _0x4b593c=[{'id':_0x2f6acc['id'],'path':_0x2f6acc[_0x14095d(0xd4)],'label':_0x2f6acc[_0x14095d(0xc7)],'resources':_0x28a67a}];if(_0x2f6acc[_0x14095d(0xc3)]&&_0x2f6acc['children'][_0x14095d(0xd5)]>0x0)for(const _0xae2fa1 of _0x2f6acc['children']){_0x4b593c[_0x14095d(0xdb)](...formatMenuList(_0xae2fa1));}return _0x4b593c;}
@@ -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(_0x38b7a8,_0xe38d4c){const _0x553bbe=a17_0x46ff,_0x5b1ab3=_0x38b7a8();while(!![]){try{const _0xbc5af0=-parseInt(_0x553bbe(0x6e))/0x1+parseInt(_0x553bbe(0x6d))/0x2+-parseInt(_0x553bbe(0x73))/0x3+-parseInt(_0x553bbe(0x75))/0x4*(parseInt(_0x553bbe(0x6c))/0x5)+-parseInt(_0x553bbe(0x70))/0x6+-parseInt(_0x553bbe(0x74))/0x7*(-parseInt(_0x553bbe(0x6f))/0x8)+parseInt(_0x553bbe(0x71))/0x9;if(_0xbc5af0===_0xe38d4c)break;else _0x5b1ab3['push'](_0x5b1ab3['shift']());}catch(_0x9ff51d){_0x5b1ab3['push'](_0x5b1ab3['shift']());}}}(a17_0x1aee,0x3a1bd));import{useEffect,useState}from'react';function a17_0x1aee(){const _0x361a13=['90371stvnQu','3162720OCWDOW','2234970GhvUBi','6750117BbBYno','finally','1180974dYeXLi','7kCXMur','208XmVuXN','42950wDILKc','791728qWhpFq'];a17_0x1aee=function(){return _0x361a13;};return a17_0x1aee();}function a17_0x46ff(_0x27bde2,_0x545ed0){_0x27bde2=_0x27bde2-0x6c;const _0x1aee6d=a17_0x1aee();let _0x46ff18=_0x1aee6d[_0x27bde2];return _0x46ff18;}import{getOnlineMenuList}from'./get-online-menu-list.js';export function useGetOnlineMenuList(){const [_0x3441ef,_0x2dcbed]=useState([]),[_0x5ce18a,_0x26a259]=useState(!![]),[_0x2bdd79,_0x4ca964]=useState('');return useEffect(()=>{const _0x2d6d15=a17_0x46ff;_0x26a259(!![]),_0x4ca964(''),getOnlineMenuList()['then'](_0x2dcbed)['catch'](_0x57be08=>{_0x4ca964(_0x57be08['message']||'获取菜单列表失败');})[_0x2d6d15(0x72)](()=>_0x26a259(![]));},[]),{'menuList':_0x3441ef,'loading':_0x5ce18a,'error':_0x2bdd79};}
@@ -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 a18_0xee69(_0x54af80,_0x17d02c){_0x54af80=_0x54af80-0xd8;const _0x35dc71=a18_0x35dc();let _0xee69ad=_0x35dc71[_0x54af80];return _0xee69ad;}function a18_0x35dc(){const _0x5a2665=['348XdScAT','1gwxHaf','8OFVpTX','test','3731HZrWHt','3918HzBEUQ','repeat','join','249249QSengV','963085nUQMmv','8OUzexy','247046rOpzYy','328188opFWmU','max','2781570DhwpGW','661779DNwopU'];a18_0x35dc=function(){return _0x5a2665;};return a18_0x35dc();}(function(_0x4a9619,_0x9f24b){const _0x4c3f81=a18_0xee69,_0x500f78=_0x4a9619();while(!![]){try{const _0x39355f=parseInt(_0x4c3f81(0xe4))/0x1*(parseInt(_0x4c3f81(0xde))/0x2)+-parseInt(_0x4c3f81(0xdf))/0x3+parseInt(_0x4c3f81(0xdd))/0x4*(-parseInt(_0x4c3f81(0xdc))/0x5)+-parseInt(_0x4c3f81(0xd8))/0x6*(-parseInt(_0x4c3f81(0xe7))/0x7)+parseInt(_0x4c3f81(0xe5))/0x8*(-parseInt(_0x4c3f81(0xe2))/0x9)+-parseInt(_0x4c3f81(0xe1))/0xa+-parseInt(_0x4c3f81(0xdb))/0xb*(-parseInt(_0x4c3f81(0xe3))/0xc);if(_0x39355f===_0x9f24b)break;else _0x500f78['push'](_0x500f78['shift']());}catch(_0x2223de){_0x500f78['push'](_0x500f78['shift']());}}}(a18_0x35dc,0x44efd));export function getRemainingSpaces(_0x4ce3b8,_0x395e56){const _0x552195=a18_0xee69,_0x35b6fe=getStringWidth(_0x395e56);return Array(Math[_0x552195(0xe0)](0x0,_0x4ce3b8-_0x35b6fe))['fill']('\x20')[_0x552195(0xda)]('');}export function getMaxWidth(_0x52bae8,_0x44a99e=0x2){const _0x4b1e21=a18_0xee69;let _0x25c217='',_0x353cba=0x0;for(const _0x301853 of _0x52bae8){const _0x4379de=getStringWidth(_0x301853);_0x4379de>_0x353cba&&(_0x353cba=_0x4379de,_0x25c217=_0x301853);}return _0x25c217+'\x20'[_0x4b1e21(0xd9)](_0x44a99e);}export function getStringWidth(_0x552575){const _0x1cf11e=a18_0xee69;let _0x1bc280=0x0;for(const _0x50a34f of _0x552575){/[\u4e00-\u9fa5]/[_0x1cf11e(0xe6)](_0x50a34f)?_0x1bc280+=0x2:_0x1bc280+=0x1;}return _0x1bc280;}
@@ -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(_0x2a943b,_0xe1a2f0){const _0x5699dc=a19_0x16c2,_0x49285c=_0x2a943b();while(!![]){try{const _0x511bc8=-parseInt(_0x5699dc(0x112))/0x1+parseInt(_0x5699dc(0x111))/0x2*(-parseInt(_0x5699dc(0x116))/0x3)+parseInt(_0x5699dc(0x10e))/0x4*(parseInt(_0x5699dc(0x110))/0x5)+-parseInt(_0x5699dc(0x114))/0x6+parseInt(_0x5699dc(0x117))/0x7+-parseInt(_0x5699dc(0x115))/0x8*(parseInt(_0x5699dc(0x118))/0x9)+parseInt(_0x5699dc(0x10f))/0xa;if(_0x511bc8===_0xe1a2f0)break;else _0x49285c['push'](_0x49285c['shift']());}catch(_0x4d3d69){_0x49285c['push'](_0x49285c['shift']());}}}(a19_0x134c,0x78b09));function a19_0x134c(){const _0x468093=['6910113SsaZqi','9detCjV','HEAD','trim','3743284wqOQsS','1560010zkDioo','5lCmKEj','30966HuDQDb','652822OBQGDT','test','2493240otxkwz','1900640ldbUpr','54XnUFDV'];a19_0x134c=function(){return _0x468093;};return a19_0x134c();}export function isValidJsHttpsUrl(_0x3170b1){const _0x349854=a19_0x16c2;return/^https:\/\/.+\.js(\?.*)?$/[_0x349854(0x113)](_0x3170b1[_0x349854(0x10d)]());}function a19_0x16c2(_0x19cdc1,_0x4bc978){_0x19cdc1=_0x19cdc1-0x10c;const _0x134c92=a19_0x134c();let _0x16c22b=_0x134c92[_0x19cdc1];return _0x16c22b;}export function isValidCssHttpsUrl(_0x216a28){const _0x129cf7=a19_0x16c2;return/^https:\/\/.+\.css(\?.*)?$/[_0x129cf7(0x113)](_0x216a28[_0x129cf7(0x10d)]());}export async function isUrlReachable(_0x4b466b){const _0x40bfc6=a19_0x16c2;try{const _0x3e0088=await fetch(_0x4b466b,{'method':_0x40bfc6(0x10c)});return _0x3e0088['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 a20_0x4e65(_0x5579e0,_0x185c05){_0x5579e0=_0x5579e0-0x135;const _0x9cc2ff=a20_0x9cc2();let _0x4e651b=_0x9cc2ff[_0x5579e0];return _0x4e651b;}(function(_0x7935a,_0x5f5c21){const _0x4c9d2a=a20_0x4e65,_0x2f3529=_0x7935a();while(!![]){try{const _0x14b8ac=-parseInt(_0x4c9d2a(0x143))/0x1*(-parseInt(_0x4c9d2a(0x142))/0x2)+parseInt(_0x4c9d2a(0x139))/0x3+-parseInt(_0x4c9d2a(0x13b))/0x4*(parseInt(_0x4c9d2a(0x145))/0x5)+parseInt(_0x4c9d2a(0x138))/0x6*(parseInt(_0x4c9d2a(0x146))/0x7)+-parseInt(_0x4c9d2a(0x144))/0x8*(parseInt(_0x4c9d2a(0x13c))/0x9)+-parseInt(_0x4c9d2a(0x14a))/0xa+parseInt(_0x4c9d2a(0x135))/0xb*(parseInt(_0x4c9d2a(0x13e))/0xc);if(_0x14b8ac===_0x5f5c21)break;else _0x2f3529['push'](_0x2f3529['shift']());}catch(_0x48428e){_0x2f3529['push'](_0x2f3529['shift']());}}}(a20_0x9cc2,0x9f806));import{jsx as a20_0x2c6c86,jsxs as a20_0xd6930b}from'react/jsx-runtime';import{Text,Box}from'ink';export function CurrentMenuCdnContent(_0x259ab2){const _0x3ca0dc=a20_0x4e65,{menuList:_0x114136}=_0x259ab2,_0x356a92=_0x114136[_0x3ca0dc(0x136)](_0x36e307=>_0x36e307[_0x3ca0dc(0x14c)][_0x3ca0dc(0x147)]),_0x3df3c6=Array[_0x3ca0dc(0x149)](new Set(_0x114136[_0x3ca0dc(0x13d)](_0x3eb828=>_0x3eb828[_0x3ca0dc(0x14c)])[_0x3ca0dc(0x14b)]()));return a20_0xd6930b(Box,{'flexDirection':'column','children':[a20_0x2c6c86(Text,{'color':_0x3ca0dc(0x137),'children':_0x3ca0dc(0x13f)}),a20_0xd6930b(Box,{'marginTop':0x1,'flexDirection':_0x3ca0dc(0x141),'children':[a20_0xd6930b(Text,{'bold':!![],'children':['\x20\x20',_0x3ca0dc(0x13a)]}),a20_0xd6930b(Text,{'children':['\x20\x20',_0x356a92['map'](_0x1274a4=>_0x1274a4[_0x3ca0dc(0x140)])[_0x3ca0dc(0x148)](',\x20')]})]}),a20_0x2c6c86(Box,{'marginTop':0x1,'children':a20_0xd6930b(Text,{'bold':!![],'children':['\x20\x20','待更新的资源链接:']})}),_0x3df3c6[_0x3ca0dc(0x13d)](_0x380e38=>a20_0x2c6c86(Box,{'children':a20_0xd6930b(Text,{'children':['\x20\x20',_0x380e38]})},_0x380e38))]});}function a20_0x9cc2(){const _0xbcee85=['join','from','10882540pnVxMU','flat','resources','26733982SmKyrm','filter','cyan','6fFooyz','329778odpXmR','待更新的菜单列表:','4ktvXyF','1390941euQHWZ','map','12JWkMkx','*\x20待更新的菜单&资源链接','label','column','2760sNkJkx','473CmRCDb','24csWjKk','6152165DnwMwM','1698368eMCeeq','length'];a20_0x9cc2=function(){return _0xbcee85;};return a20_0x9cc2();}
@@ -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(_0x5aaf12,_0x1b733b){const _0x3c5832=a21_0x9c7a,_0x655f9f=_0x5aaf12();while(!![]){try{const _0x84d5ce=-parseInt(_0x3c5832(0xd9))/0x1*(-parseInt(_0x3c5832(0xcf))/0x2)+-parseInt(_0x3c5832(0xdc))/0x3*(-parseInt(_0x3c5832(0xde))/0x4)+-parseInt(_0x3c5832(0xd0))/0x5*(parseInt(_0x3c5832(0xd1))/0x6)+parseInt(_0x3c5832(0xd7))/0x7*(-parseInt(_0x3c5832(0xd3))/0x8)+parseInt(_0x3c5832(0xd5))/0x9*(parseInt(_0x3c5832(0xd2))/0xa)+parseInt(_0x3c5832(0xd6))/0xb*(-parseInt(_0x3c5832(0xce))/0xc)+-parseInt(_0x3c5832(0xd8))/0xd*(-parseInt(_0x3c5832(0xda))/0xe);if(_0x84d5ce===_0x1b733b)break;else _0x655f9f['push'](_0x655f9f['shift']());}catch(_0xe9c448){_0x655f9f['push'](_0x655f9f['shift']());}}}(a21_0x2328,0x9d6b5));import{jsx as a21_0x3b3b01,jsxs as a21_0x30e86e}from'react/jsx-runtime';function a21_0x9c7a(_0x12cfa5,_0x20626f){_0x12cfa5=_0x12cfa5-0xcd;const _0x2328e0=a21_0x2328();let _0x9c7a64=_0x2328e0[_0x12cfa5];return _0x9c7a64;}function a21_0x2328(){const _0x33c32d=['6SLEzyJ','10TtgvVh','72AqOncZ','*\x20已输入的资源资源','4746249QILuXD','1245167TLjpdi','250747yBtrAo','19903poFWOP','92QkjHQN','11256xfNYBs','green','6brcnWy','JS\x20链接:\x20','708492DZxpCJ','column','132lhNTSo','19816hZZhgq','4058610auybqP'];a21_0x2328=function(){return _0x33c32d;};return a21_0x2328();}import{Text,Box}from'ink';export function InputCdnAsset(_0x240d39){const _0x5e2625=a21_0x9c7a,{jsCdnUrl:_0x3e5ed8,cssCdnUrl:_0x54f1c3}=_0x240d39;return a21_0x30e86e(Box,{'flexDirection':_0x5e2625(0xcd),'marginTop':0x1,'children':[a21_0x3b3b01(Text,{'color':'cyan','children':_0x5e2625(0xd4)}),a21_0x30e86e(Box,{'children':[a21_0x30e86e(Text,{'children':['\x20\x20',_0x5e2625(0xdd)]}),a21_0x3b3b01(Text,{'color':'green','children':_0x3e5ed8})]}),a21_0x30e86e(Box,{'children':[a21_0x30e86e(Text,{'children':['\x20\x20','CSS\x20链接:\x20']}),a21_0x3b3b01(Text,{'color':_0x5e2625(0xdb),'children':_0x54f1c3})]})]});}
@@ -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(_0x423f41,_0x14eb27){const _0x54cd9b=a22_0x69b8,_0x2e04a0=_0x423f41();while(!![]){try{const _0x47dfbe=-parseInt(_0x54cd9b(0x1c2))/0x1+-parseInt(_0x54cd9b(0x1c8))/0x2+-parseInt(_0x54cd9b(0x1c7))/0x3+parseInt(_0x54cd9b(0x1d7))/0x4+parseInt(_0x54cd9b(0x1bf))/0x5+parseInt(_0x54cd9b(0x1ba))/0x6*(-parseInt(_0x54cd9b(0x1d6))/0x7)+-parseInt(_0x54cd9b(0x1d5))/0x8*(-parseInt(_0x54cd9b(0x1ce))/0x9);if(_0x47dfbe===_0x14eb27)break;else _0x2e04a0['push'](_0x2e04a0['shift']());}catch(_0x10350b){_0x2e04a0['push'](_0x2e04a0['shift']());}}}(a22_0xbc4b,0x7e391));import{jsx as a22_0x3ed287,jsxs as a22_0x29a9f8,Fragment as a22_0x18f6d6}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a22_0x1d067d 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';function a22_0x69b8(_0x24dd05,_0x3435e1){_0x24dd05=_0x24dd05-0x1ad;const _0xbc4b36=a22_0xbc4b();let _0x69b806=_0xbc4b36[_0x24dd05];return _0x69b806;}function a22_0xbc4b(){const _0x36943a=['输入项目的\x20JS\x20资源链接(https://...)','backspace','column','1824369AHanEo','897636NSOiXw','\x20资源正在同步中...','creating','label','取消更新','lovrabet\x20auth','186858yHfVmT','提示:使用\x20','input-css','value','upArrow','gray','all','776FPyTFK','574VToRLR','397912pvSfFx','return','JS\x20链接:\x20','green','map','yellow','downArrow','\x20正在获取线上菜单资源链接...','输入项目的\x20CSS\x20资源链接(https://...)','cancel','JS\x20链接无法访问','cyan','\x20←\x20','trim','updated','*\x20请输入新的资源链接','red','input-js','need-confirm','59016tKgdRM','\x20命令重新登录','delete','rightArrow','resources','3260030syizoV','path','length','384896ZczFiw','继续更新'];a22_0xbc4b=function(){return _0x36943a;};return a22_0xbc4b();}import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import.meta.main&&render(a22_0x3ed287(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x5843dd=a22_0x69b8,{exit:_0x775e37}=useApp(),{loading:_0x425468,menuList:_0x376fe7,error:_0x264e2c}=useGetOnlineMenuList(),[_0x53574d,_0x52e9cc]=useState('ok'),[_0xeeb010,_0x33e9a5]=useState('input-js'),[_0x20e6ec,_0x2c1780]=useState(''),[_0x4474de,_0x43874a]=useState(''),[_0x33d2a4,_0xc95326]=useState(''),[_0xf1142,_0x2f22c1]=useState(''),_0x103193=Array['from'](new Set(_0x376fe7[_0x5843dd(0x1db)](_0x2eb3f1=>_0x2eb3f1[_0x5843dd(0x1be)])['flat']()));useEffect(()=>{const _0x31ea55=_0x5843dd;_0xeeb010===_0x31ea55(0x1b5)&&setTimeout(_0x775e37,0x32);},[_0xeeb010]),useInput(async(_0x3b5832,_0x5d8394)=>{const _0x257870=_0x5843dd;if(_0xeeb010===_0x257870(0x1b8)){if(_0x5d8394[_0x257870(0x1d8)]){const _0x3427e6=_0x33d2a4[_0x257870(0x1b4)]();if(_0x3427e6==='')return;if(!isValidJsHttpsUrl(_0x3427e6)){_0x2f22c1('请输入有效的\x20JS\x20https\x20链接');return;}if(!await isUrlReachable(_0x3427e6)){_0x2f22c1(_0x257870(0x1b1));return;}_0x2c1780(_0x3427e6),_0xc95326(''),_0x2f22c1(''),_0x33e9a5(_0x257870(0x1d0));return;}if(_0x5d8394['backspace']||_0x5d8394[_0x257870(0x1bc)]){_0xc95326(_0xbebdc1=>_0xbebdc1['slice'](0x0,-0x1)),_0x2f22c1('');return;}_0xc95326(_0x255da0=>_0x255da0+_0x3b5832);return;}if(_0xeeb010==='input-css'){if(_0x5d8394[_0x257870(0x1d8)]){const _0x2591ae=_0x33d2a4[_0x257870(0x1b4)]();if(_0x2591ae==='')return;if(!isValidCssHttpsUrl(_0x2591ae)){_0x2f22c1('请输入有效的\x20CSS\x20https\x20链接');return;}if(!await isUrlReachable(_0x2591ae)){_0x2f22c1('CSS\x20链接无法访问');return;}_0x43874a(_0x2591ae),_0xc95326(''),_0x2f22c1(''),_0x33e9a5(_0x257870(0x1b9));return;}if(_0x5d8394[_0x257870(0x1c5)]||_0x5d8394[_0x257870(0x1bc)]){_0xc95326(_0x551b9f=>_0x551b9f['slice'](0x0,-0x1)),_0x2f22c1('');return;}_0xc95326(_0x2213cc=>_0x2213cc+_0x3b5832);return;}if(_0xeeb010===_0x257870(0x1b9)){(_0x5d8394[_0x257870(0x1d2)]||_0x5d8394[_0x257870(0x1ad)]||_0x5d8394['leftArrow']||_0x5d8394[_0x257870(0x1bd)])&&_0x52e9cc(_0x161b04=>_0x161b04==='ok'?_0x257870(0x1b0):'ok');if(_0x5d8394['return']){_0x33e9a5('creating');if(_0x53574d==='ok')await Promise[_0x257870(0x1d4)](_0x376fe7['map'](_0x808db4=>{const _0x3abc17=_0x257870,_0x40e2a9={'id':_0x808db4['id'],'label':_0x808db4['label'],'path':_0x808db4[_0x3abc17(0x1c0)],'resources':[_0x20e6ec,_0x4474de]};if(_0x808db4[_0x3abc17(0x1be)][_0x3abc17(0x1c1)]===0x0)return Promise['resolve']();return updateMenuCdnUrl(_0x40e2a9);})),await new Promise(_0xa7e566=>setTimeout(_0xa7e566,0x3e8)),_0x33e9a5('updated');else _0x53574d==='cancel'&&_0x775e37();}}});if(_0x425468)return a22_0x29a9f8(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x3ed287(Text,{}),a22_0x3ed287(a22_0x1d067d,{'type':'dots'}),a22_0x3ed287(Text,{'children':_0x5843dd(0x1ae)})]});if(_0x264e2c)return a22_0x29a9f8(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x29a9f8(Text,{'color':_0x5843dd(0x1b7),'children':['✗\x20',_0x264e2c]}),a22_0x29a9f8(Box,{'marginTop':0x1,'children':[a22_0x3ed287(Text,{'color':_0x5843dd(0x1d3),'children':_0x5843dd(0x1cf)}),a22_0x3ed287(Text,{'color':'cyan','children':_0x5843dd(0x1cd)}),a22_0x3ed287(Text,{'color':_0x5843dd(0x1d3),'children':_0x5843dd(0x1bb)})]})]});if(_0x103193[_0x5843dd(0x1c1)]===0x0)return a22_0x3ed287(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x3ed287(Text,{'color':_0x5843dd(0x1dc),'children':'!\x20未找到菜单资源链接'})});if(_0xeeb010==='need-confirm')return a22_0x29a9f8(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x3ed287(CurrentMenuCdnContent,{'menuList':_0x376fe7}),a22_0x3ed287(InputCdnAsset,{'jsCdnUrl':_0x20e6ec,'cssCdnUrl':_0x4474de}),a22_0x3ed287(Box,{'marginTop':0x1,'flexDirection':'column','children':[{'label':_0x5843dd(0x1c3),'value':'ok'},{'label':_0x5843dd(0x1cc),'value':_0x5843dd(0x1b0)}][_0x5843dd(0x1db)](_0x29e3dd=>a22_0x29a9f8(Text,{'color':_0x53574d===_0x29e3dd['value']?'yellow':undefined,'children':[_0x53574d===_0x29e3dd[_0x5843dd(0x1d1)]?'>\x20':'\x20\x20',_0x29e3dd[_0x5843dd(0x1cb)]]},_0x29e3dd['value']))})]});if(_0xeeb010===_0x5843dd(0x1ca))return a22_0x29a9f8(Box,{'flexDirection':_0x5843dd(0x1c6),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x3ed287(CurrentMenuCdnContent,{'menuList':_0x376fe7}),a22_0x3ed287(InputCdnAsset,{'jsCdnUrl':_0x20e6ec,'cssCdnUrl':_0x4474de}),a22_0x29a9f8(Box,{'marginTop':0x1,'children':[a22_0x3ed287(a22_0x1d067d,{'type':'dots'}),a22_0x3ed287(Text,{'children':_0x5843dd(0x1c9)})]})]});if(_0xeeb010==='updated')return a22_0x29a9f8(Box,{'flexDirection':_0x5843dd(0x1c6),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x3ed287(CurrentMenuCdnContent,{'menuList':_0x376fe7}),a22_0x3ed287(InputCdnAsset,{'jsCdnUrl':_0x20e6ec,'cssCdnUrl':_0x4474de}),a22_0x3ed287(Box,{'marginTop':0x1,'children':a22_0x3ed287(Text,{'color':'green','children':'√\x20更新成功'})})]});return a22_0x29a9f8(Box,{'flexDirection':_0x5843dd(0x1c6),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x3ed287(CurrentMenuCdnContent,{'menuList':_0x376fe7}),a22_0x29a9f8(Box,{'marginTop':0x1,'flexDirection':_0x5843dd(0x1c6),'children':[a22_0x3ed287(Text,{'color':_0x5843dd(0x1b2),'children':_0x5843dd(0x1b6)}),_0x20e6ec?a22_0x29a9f8(Box,{'children':[a22_0x29a9f8(Text,{'color':_0x5843dd(0x1d3),'children':['\x20\x20',_0x5843dd(0x1d9)]}),a22_0x3ed287(Text,{'color':_0x5843dd(0x1da),'children':_0x20e6ec})]}):_0xeeb010==='input-js'&&a22_0x29a9f8(a22_0x18f6d6,{'children':[a22_0x29a9f8(Box,{'children':[a22_0x29a9f8(Text,{'children':['\x20\x20',_0x5843dd(0x1d9)]}),a22_0x3ed287(Text,{'color':_0x5843dd(0x1da),'children':_0x33d2a4}),_0xf1142&&a22_0x29a9f8(Text,{'color':_0x5843dd(0x1b7),'children':[_0x5843dd(0x1b3),_0xf1142]})]}),!_0xf1142&&a22_0x3ed287(Box,{'children':a22_0x29a9f8(Text,{'color':_0x5843dd(0x1d3),'children':['\x20\x20',_0x5843dd(0x1c4)]})})]}),_0x4474de?a22_0x29a9f8(Box,{'children':[a22_0x29a9f8(Text,{'children':['\x20\x20','CSS\x20链接:\x20']}),a22_0x3ed287(Text,{'color':_0x5843dd(0x1da),'children':_0x4474de})]}):_0xeeb010==='input-css'&&a22_0x29a9f8(a22_0x18f6d6,{'children':[a22_0x29a9f8(Box,{'children':[a22_0x29a9f8(Text,{'children':['\x20\x20','CSS\x20链接:\x20']}),a22_0x3ed287(Text,{'color':_0x5843dd(0x1da),'children':_0x33d2a4}),_0xf1142&&a22_0x29a9f8(Text,{'color':_0x5843dd(0x1b7),'children':[_0x5843dd(0x1b3),_0xf1142]})]}),!_0xf1142&&a22_0x3ed287(Box,{'children':a22_0x29a9f8(Text,{'color':_0x5843dd(0x1d3),'children':['\x20\x20',_0x5843dd(0x1af)]})})]})]})]});}
@@ -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
+ function a24_0x5d48(){const _0x3743f2=['path','json','创建菜单失败,HTTP状态码:\x20','application/json','appcode','5578dLFZJI','info','label','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','7674700OUSBjE','正在更新菜单资源链接:\x20','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','252fCaCBO','import','status','1008BlbKMH','10125498syQHEx','!\x20请使用以下方式之一:','8wPncnu','success','未知错误','2834165tnaPTN','log','stringify','未提供应用AppCode,且配置中也没有默认值','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','529782tBRTgQ','102632JVyXHV','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','更新菜单资源失败:\x20','/smartapi/menu/update','errorCode','2160819HcVrXc','errorMsg','resources','update-menu-cdn-url','error','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css'];a24_0x5d48=function(){return _0x3743f2;};return a24_0x5d48();}const a24_0xc134ed=a24_0x50e9;(function(_0x5c562c,_0x5dbffe){const _0x24c8eb=a24_0x50e9,_0x458f14=_0x5c562c();while(!![]){try{const _0x4f5c6f=parseInt(_0x24c8eb(0x114))/0x1+parseInt(_0x24c8eb(0xff))/0x2*(parseInt(_0x24c8eb(0x109))/0x3)+parseInt(_0x24c8eb(0x10c))/0x4*(parseInt(_0x24c8eb(0x10f))/0x5)+-parseInt(_0x24c8eb(0x10a))/0x6+parseInt(_0x24c8eb(0x106))/0x7*(parseInt(_0x24c8eb(0x115))/0x8)+parseInt(_0x24c8eb(0x11a))/0x9+-parseInt(_0x24c8eb(0x103))/0xa;if(_0x4f5c6f===_0x5dbffe)break;else _0x458f14['push'](_0x458f14['shift']());}catch(_0x217d93){_0x458f14['push'](_0x458f14['shift']());}}}(a24_0x5d48,0xcee4a));import{getCookie}from'../auth/get-cookie.js';function a24_0x50e9(_0x592a05,_0x19dd2c){_0x592a05=_0x592a05-0xff;const _0x5d487f=a24_0x5d48();let _0x50e9a4=_0x5d487f[_0x592a05];return _0x50e9a4;}import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig(),logLabel=a24_0xc134ed(0x11d);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':'SdkDemo1','path':'sdk-demo','resources':[a24_0xc134ed(0x105),a24_0xc134ed(0x11f)]});export async function updateMenuCdnUrl(_0x335396){const _0x486a9a=a24_0xc134ed,_0x3d9afd=config?.[_0x486a9a(0x124)];if(!_0x3d9afd){const _0x2f95c4=_0x486a9a(0x112);logger['error'](logLabel,_0x2f95c4),console[_0x486a9a(0x11e)]('×\x20'+_0x2f95c4),console[_0x486a9a(0x110)](_0x486a9a(0x10b)),console[_0x486a9a(0x110)](_0x486a9a(0x116)),console[_0x486a9a(0x110)](_0x486a9a(0x113));return;}logger[_0x486a9a(0x100)](logLabel,_0x486a9a(0x104)+_0x335396[_0x486a9a(0x101)]+'\x20('+_0x335396[_0x486a9a(0x120)]+')');const _0x6fcaea={'id':_0x335396['id'],'appCode':_0x3d9afd,'extend':{'loadScriptMode':_0x486a9a(0x107),'resources':_0x335396[_0x486a9a(0x11c)]?JSON[_0x486a9a(0x111)](_0x335396['resources']):undefined}},_0x1357a5=await fetch(getApiDomain()+_0x486a9a(0x118),{'method':'POST','body':JSON[_0x486a9a(0x111)](_0x6fcaea),'headers':{'Content-Type':_0x486a9a(0x123),'Cookie':getCookie()}});if(!_0x1357a5['ok']){if(_0x1357a5[_0x486a9a(0x108)]===0x191){const _0x2a058d=_0x486a9a(0x102);logger[_0x486a9a(0x11e)](logLabel,_0x2a058d,{'status':_0x1357a5[_0x486a9a(0x108)],'menu':_0x335396[_0x486a9a(0x101)]});throw new Error(_0x2a058d);}const _0x281d0f=_0x486a9a(0x122)+_0x1357a5[_0x486a9a(0x108)];logger[_0x486a9a(0x11e)](logLabel,_0x281d0f,{'menu':_0x335396[_0x486a9a(0x101)]});throw new Error(_0x281d0f);}const _0x30e236=await _0x1357a5[_0x486a9a(0x121)]();if(!_0x30e236[_0x486a9a(0x10d)]){const _0x5c8ad0=_0x486a9a(0x117)+(_0x30e236[_0x486a9a(0x11b)]||_0x486a9a(0x10e));logger['error'](logLabel,_0x5c8ad0,{'errorCode':_0x30e236[_0x486a9a(0x119)],'errorMsg':_0x30e236[_0x486a9a(0x11b)],'menu':_0x335396[_0x486a9a(0x101)]});throw new Error(_0x5c8ad0);}logger[_0x486a9a(0x100)](logLabel,'菜单资源同步成功:\x20'+_0x335396[_0x486a9a(0x101)],_0x30e236['data']);}
@@ -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(_0x22d289,_0xeb8b7f){const _0x469bd4=a25_0x1bc2,_0x4c6124=_0x22d289();while(!![]){try{const _0x673301=parseInt(_0x469bd4(0x174))/0x1+-parseInt(_0x469bd4(0x169))/0x2+parseInt(_0x469bd4(0x16f))/0x3+-parseInt(_0x469bd4(0x16e))/0x4*(-parseInt(_0x469bd4(0x171))/0x5)+parseInt(_0x469bd4(0x17b))/0x6*(parseInt(_0x469bd4(0x176))/0x7)+parseInt(_0x469bd4(0x175))/0x8*(parseInt(_0x469bd4(0x173))/0x9)+-parseInt(_0x469bd4(0x17a))/0xa;if(_0x673301===_0xeb8b7f)break;else _0x4c6124['push'](_0x4c6124['shift']());}catch(_0x50e6fd){_0x4c6124['push'](_0x4c6124['shift']());}}}(a25_0xe827,0x2596c));function a25_0x1bc2(_0x510b69,_0x35dff7){_0x510b69=_0x510b69-0x169;const _0xe827af=a25_0xe827();let _0x1bc2c9=_0xe827af[_0x510b69];return _0x1bc2c9;}function a25_0xe827(){const _0x510884=['20huowWV','√\x20当前为有效会话,无需重新登录。','72HAPgPK','12808miSKAJ','169928GGXYrb','7aYkuSv','按\x20“q”\x20退出。','green','log','1011540Tcsssk','1315770PEkBfd','gray','565968amTJfK','*\x20按回车开始登录。','dots','正在登录...\x20','column','70964ebBlnw','195321ZWHZjv','then'];a25_0xe827=function(){return _0x510884;};return a25_0xe827();}import{jsx as a25_0x68121c,jsxs as a25_0x1bf918}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a25_0x2f54f0 from'ink-spinner';export function AuthServer(){const _0x3e82f9=a25_0x1bc2,{exit:_0xe99647}=useApp(),[_0x2b4ddc,_0x2360a1]=useState(![]),[_0x5b4f60,_0x3a23dc]=useState(!![]),[_0x66ca92,_0x108e26]=useState(![]),[_0xcea734,_0x2a7351]=useState(![]);useEffect(()=>{const _0x161735=a25_0x1bc2;getIsSessionValid()[_0x161735(0x170)](_0x2360a1)['finally'](()=>_0x3a23dc(![]));},[]),useEffect(()=>{const _0x545727=a25_0x1bc2;!_0x5b4f60&&_0x2b4ddc&&(console[_0x545727(0x179)](_0x545727(0x172)),_0xe99647());},[_0x5b4f60,_0x2b4ddc,_0xe99647]),useEffect(()=>{const _0x59e232=a25_0x1bc2;_0xcea734&&(console[_0x59e232(0x179)]('*\x20登录成功!'),_0xe99647());},[_0xcea734,_0xe99647]),useInput((_0x24d150,_0x4e4e88)=>{const _0x413fe9=a25_0x1bc2;_0x4e4e88['return']&&(_0x108e26(!![]),authServer({'silent':!![]})[_0x413fe9(0x170)](_0x3b08d4=>{_0x2a7351(_0x3b08d4);})),_0x24d150==='q'&&_0xe99647();});if(_0x5b4f60)return null;if(_0x2b4ddc||_0xcea734)return null;return a25_0x68121c(Box,{'flexDirection':_0x3e82f9(0x16d),'marginTop':0x1,'marginBottom':0x1,'children':_0x66ca92?a25_0x1bf918(Box,{'children':[a25_0x68121c(Box,{'width':'1'}),a25_0x1bf918(Text,{'color':_0x3e82f9(0x178),'children':[a25_0x68121c(a25_0x2f54f0,{'type':_0x3e82f9(0x16b)}),'\x20\x20']}),a25_0x68121c(Text,{'children':_0x3e82f9(0x16c)}),a25_0x68121c(Text,{'color':_0x3e82f9(0x17c),'children':'请前往浏览器完成登录。'})]}):a25_0x1bf918(Box,{'children':[a25_0x68121c(Box,{'width':'1'}),a25_0x68121c(Text,{'children':_0x3e82f9(0x16a)}),a25_0x68121c(Text,{'color':'gray','children':_0x3e82f9(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_0x560897=a26_0x484f;(function(_0x8080f,_0x352162){const _0x53db1f=a26_0x484f,_0x99fcf6=_0x8080f();while(!![]){try{const _0x3260e0=parseInt(_0x53db1f(0x18a))/0x1+parseInt(_0x53db1f(0x197))/0x2*(-parseInt(_0x53db1f(0x186))/0x3)+parseInt(_0x53db1f(0x188))/0x4+-parseInt(_0x53db1f(0x18e))/0x5+-parseInt(_0x53db1f(0x1a5))/0x6*(parseInt(_0x53db1f(0x189))/0x7)+parseInt(_0x53db1f(0x194))/0x8+parseInt(_0x53db1f(0x1a2))/0x9;if(_0x3260e0===_0x352162)break;else _0x99fcf6['push'](_0x99fcf6['shift']());}catch(_0x29e371){_0x99fcf6['push'](_0x99fcf6['shift']());}}}(a26_0x43f4,0x31da7));function a26_0x484f(_0x4d6983,_0x22e0bf){_0x4d6983=_0x4d6983-0x182;const _0x43f4fc=a26_0x43f4();let _0x484f1a=_0x43f4fc[_0x4d6983];return _0x484f1a;}import{writeFileSync}from'node:fs';import a26_0x2ca882 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x2a350e){const _0x1b6b7e=a26_0x484f,_0x2e2921=_0x2a350e?.[_0x1b6b7e(0x187)]||![];if(await getIsSessionValid())return!![];const _0x41e8b2=await(await fetch(_0x1b6b7e(0x199)))[_0x1b6b7e(0x18f)]();return new Promise(async(_0xa8560a,_0x324ff1)=>{const _0x31ee53=_0x1b6b7e;let _0x4fbc66=0x0;const _0x33078e=a26_0x2ca882[_0x31ee53(0x18d)](_0x41e8b2,async(_0x590256,_0x592af8)=>{const _0x101375=_0x31ee53,_0x36970c=getUserDomain(),_0x143da0=_0x590256[_0x101375(0x1a9)]['cookie']||'',_0x109609=await fetch(_0x36970c+'/api/auth/get-session',{'headers':{'cookie':_0x143da0}})[_0x101375(0x19d)](_0x462eab=>_0x462eab[_0x101375(0x18f)]()),_0x530362=_0x109609&&_0x109609['session']&&_0x109609[_0x101375(0x195)];if(_0x530362){writeFileSync(cookieFile,_0x143da0,'utf-8'),_0xa8560a(!![]);const _0x28a9f3=_0x101375(0x1a3);_0x592af8[_0x101375(0x1a1)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x592af8[_0x101375(0x191)](_0x28a9f3),_0x33078e['close']();}else{const _0x5e9ea8=''+encodeURIComponent(_0x101375(0x185)+_0x4fbc66);_0x592af8[_0x101375(0x1a1)](0x12e,{'location':_0x36970c+_0x101375(0x19a)+_0x5e9ea8}),_0x592af8[_0x101375(0x191)]();return;}});_0x33078e[_0x31ee53(0x19b)](0x0,_0x31ee53(0x18c),()=>{const _0x5f0b93=_0x31ee53,_0x76515b=_0x33078e['address']();_0x4fbc66=typeof _0x76515b===_0x5f0b93(0x192)&&_0x76515b?_0x76515b['port']:Number(_0x76515b);const _0x2d1738=_0x5f0b93(0x185)+_0x4fbc66;!_0x2e2921&&(console['log'](_0x5f0b93(0x182)),console['log'](_0x5f0b93(0x190),_0x2d1738),console[_0x5f0b93(0x19f)](_0x5f0b93(0x1a8)),console['log'](''),console['log'](_0x5f0b93(0x1a4)),console[_0x5f0b93(0x19f)]('')),openInBrowser(_0x2d1738)[_0x5f0b93(0x19d)](_0xf48e65=>{const _0x501e43=_0x5f0b93;!_0x2e2921&&(_0xf48e65?console[_0x501e43(0x19f)](_0x501e43(0x183)):(console['log'](_0x501e43(0x19e)),console[_0x501e43(0x19f)]('🔗\x20请手动复制登录地址到浏览器:',_0x2d1738)),console[_0x501e43(0x19f)](''));})[_0x5f0b93(0x1a0)](()=>{const _0x8f5f66=_0x5f0b93;!_0x2e2921&&(console[_0x8f5f66(0x19f)](_0x8f5f66(0x19e)),console[_0x8f5f66(0x19f)](_0x8f5f66(0x19c),_0x2d1738),console[_0x8f5f66(0x19f)](''));});}),_0x33078e['on'](_0x31ee53(0x196),_0x5d35c5=>{const _0x2a57f9=_0x31ee53;!_0x2e2921&&console[_0x2a57f9(0x196)](_0x2a57f9(0x1a7),_0x5d35c5),_0x324ff1(_0x5d35c5);});});}function openInBrowser(_0x2c3c38){return new Promise(_0x2a5e12=>{const _0x3ae4ed=a26_0x484f,_0x582fd1=process[_0x3ae4ed(0x198)];let _0xe60391;if(_0x582fd1==='win32')_0xe60391=_0x3ae4ed(0x1a6)+_0x2c3c38+'\x22';else _0x582fd1===_0x3ae4ed(0x193)?_0xe60391=_0x3ae4ed(0x18b)+_0x2c3c38+'\x22':_0xe60391=_0x3ae4ed(0x184)+_0x2c3c38+'\x22';exec(_0xe60391,_0x33a767=>{_0x33a767?_0x2a5e12(![]):_0x2a5e12(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a26_0x560897(0x19f)]('isAuth',isAuth);}function a26_0x43f4(){const _0x31cc94=['2307246ZhBLGq','start\x20\x22\x22\x20\x22','Auth\x20server\x20error:','🌐\x20正在尝试自动打开浏览器...','headers','🔐\x20正在启动登录服务...','✅\x20浏览器已自动打开,请在浏览器中完成登录','xdg-open\x20\x22','https://dev.lovrabet.com:','3987khTRKR','silent','937852fQpvVC','7GFilgs','296704opTbeN','open\x20\x22','127.0.0.1','createServer','1522690hjzRFP','json','📍\x20登录地址:','end','object','darwin','1098280bsvxXZ','user','error','152ULGank','platform','https://g.yuntooai.com/cert/lovrabet-dev.json','/sign-in?redirect=','listen','🔗\x20请手动复制登录地址到浏览器:','then','⚠️\x20\x20无法自动打开浏览器','log','catch','writeHead','2932470eoAfqI','<!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如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开'];a26_0x43f4=function(){return _0x31cc94;};return a26_0x43f4();}
@@ -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
+ function a27_0x11b9(_0x1dbb93,_0x109509){_0x1dbb93=_0x1dbb93-0x1b9;const _0x5eced1=a27_0x5ece();let _0x11b919=_0x5eced1[_0x1dbb93];return _0x11b919;}const a27_0x2a5b65=a27_0x11b9;(function(_0x320320,_0x17b02a){const _0x55e3ef=a27_0x11b9,_0x33c44d=_0x320320();while(!![]){try{const _0x3c0376=-parseInt(_0x55e3ef(0x1b9))/0x1*(parseInt(_0x55e3ef(0x1bd))/0x2)+-parseInt(_0x55e3ef(0x1bf))/0x3*(-parseInt(_0x55e3ef(0x1bc))/0x4)+parseInt(_0x55e3ef(0x1bb))/0x5+-parseInt(_0x55e3ef(0x1c3))/0x6+-parseInt(_0x55e3ef(0x1be))/0x7+-parseInt(_0x55e3ef(0x1ba))/0x8+-parseInt(_0x55e3ef(0x1c1))/0x9*(-parseInt(_0x55e3ef(0x1c2))/0xa);if(_0x3c0376===_0x17b02a)break;else _0x33c44d['push'](_0x33c44d['shift']());}catch(_0x2d9f79){_0x33c44d['push'](_0x33c44d['shift']());}}}(a27_0x5ece,0x75881));import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+a27_0x2a5b65(0x1c4);export const cookieFile=configDir+a27_0x2a5b65(0x1c0);mkdirSync(configDir,{'recursive':!![]});function a27_0x5ece(){const _0x19212b=['291306qcgKEI','/cookie','13910409NQtCVs','10FlrGYF','1403064viIaHL','/.lovrabet','19VWjLib','4896048BpzkWY','3290875qNKTRH','8uPliPO','62728lIdQEz','3323635oIjvdf'];a27_0x5ece=function(){return _0x19212b;};return a27_0x5ece();}
@@ -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(_0x4891a6,_0x54a520){var _0x2b0313=a28_0x47e6,_0x111f0f=_0x4891a6();while(!![]){try{var _0x54afd5=parseInt(_0x2b0313(0x12d))/0x1+-parseInt(_0x2b0313(0x128))/0x2+parseInt(_0x2b0313(0x12c))/0x3*(parseInt(_0x2b0313(0x12b))/0x4)+-parseInt(_0x2b0313(0x129))/0x5+parseInt(_0x2b0313(0x127))/0x6+-parseInt(_0x2b0313(0x126))/0x7*(-parseInt(_0x2b0313(0x12a))/0x8)+-parseInt(_0x2b0313(0x12f))/0x9*(-parseInt(_0x2b0313(0x12e))/0xa);if(_0x54afd5===_0x54a520)break;else _0x111f0f['push'](_0x111f0f['shift']());}catch(_0x1ebcb9){_0x111f0f['push'](_0x111f0f['shift']());}}}(a28_0x515b,0x7cbc8));function a28_0x47e6(_0x160c92,_0x1f2ccb){_0x160c92=_0x160c92-0x126;var _0x515b4d=a28_0x515b();var _0x47e621=_0x515b4d[_0x160c92];return _0x47e621;}import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}function a28_0x515b(){var _0x3a7577=['1207028PYDvqY','1785445SeZaRg','32kosXva','16KMumTy','682098QBVIQS','56171ngvvep','20mnySNm','1138959ghUBRb','129899HFVStG','1071348ktXqlM'];a28_0x515b=function(){return _0x3a7577;};return a28_0x515b();}
@@ -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(_0x57a369,_0x39440e){const _0x17a9f5=a29_0x4092,_0x49cc50=_0x57a369();while(!![]){try{const _0x2705b3=-parseInt(_0x17a9f5(0x14b))/0x1+parseInt(_0x17a9f5(0x14e))/0x2*(-parseInt(_0x17a9f5(0x147))/0x3)+-parseInt(_0x17a9f5(0x144))/0x4+parseInt(_0x17a9f5(0x14d))/0x5*(-parseInt(_0x17a9f5(0x14f))/0x6)+-parseInt(_0x17a9f5(0x14c))/0x7*(parseInt(_0x17a9f5(0x152))/0x8)+parseInt(_0x17a9f5(0x151))/0x9*(parseInt(_0x17a9f5(0x146))/0xa)+-parseInt(_0x17a9f5(0x153))/0xb*(-parseInt(_0x17a9f5(0x149))/0xc);if(_0x2705b3===_0x39440e)break;else _0x49cc50['push'](_0x49cc50['shift']());}catch(_0x20e828){_0x49cc50['push'](_0x49cc50['shift']());}}}(a29_0x4228,0x2ee68));function a29_0x4092(_0x2916f4,_0x4192c2){_0x2916f4=_0x2916f4-0x143;const _0x4228b4=a29_0x4228();let _0x4092ea=_0x4228b4[_0x2916f4];return _0x4092ea;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a29_0x4228(){const _0x144205=['user','174516OlKJYp','2531242qJBiNE','1717820GINlMo','178ayskPS','6HUSAFo','json','1638MhyEMN','8sFputU','726kBhwaw','then','606040NNXyFO','/api/auth/get-session','10410JxHhuN','12102Lyyvlk','session','253248NgvVmR'];a29_0x4228=function(){return _0x144205;};return a29_0x4228();}import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x88e5af=a29_0x4092;try{if(!existsSync(cookieFile))return![];const _0x229374=readFileSync(cookieFile,'utf-8'),_0x42b3c4=await fetch(getUserDomain()+_0x88e5af(0x145),{'headers':{'cookie':_0x229374}})[_0x88e5af(0x143)](_0x53b1ff=>_0x53b1ff[_0x88e5af(0x150)]());return _0x42b3c4&&_0x42b3c4[_0x88e5af(0x148)]&&_0x42b3c4[_0x88e5af(0x14a)];}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 a30_0x1782(){var _0x222acc=['910532xlUlkH','4146ZGCRNs','912594KINRkO','log','1713899OBeAXE','5SoAAmn','9932MSBLTz','✓\x20已退出登录','87lKYIOG','4392620AhtEIv','4392936QTCqlp','18mlNocD','2506BdDphC'];a30_0x1782=function(){return _0x222acc;};return a30_0x1782();}function a30_0x41fe(_0x253812,_0x111f30){_0x253812=_0x253812-0x10e;var _0x178202=a30_0x1782();var _0x41fea6=_0x178202[_0x253812];return _0x41fea6;}(function(_0x4638c2,_0x1dc0cf){var _0x3ec6cf=a30_0x41fe,_0x521489=_0x4638c2();while(!![]){try{var _0x57ee7d=-parseInt(_0x3ec6cf(0x11a))/0x1+parseInt(_0x3ec6cf(0x111))/0x2*(-parseInt(_0x3ec6cf(0x113))/0x3)+parseInt(_0x3ec6cf(0x118))/0x4*(parseInt(_0x3ec6cf(0x110))/0x5)+parseInt(_0x3ec6cf(0x119))/0x6*(-parseInt(_0x3ec6cf(0x117))/0x7)+parseInt(_0x3ec6cf(0x115))/0x8+-parseInt(_0x3ec6cf(0x116))/0x9*(-parseInt(_0x3ec6cf(0x114))/0xa)+parseInt(_0x3ec6cf(0x10f))/0xb;if(_0x57ee7d===_0x1dc0cf)break;else _0x521489['push'](_0x521489['shift']());}catch(_0x437609){_0x521489['push'](_0x521489['shift']());}}}(a30_0x1782,0x7bcd9));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x4219dd=a30_0x41fe;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x4219dd(0x112))):console[_0x4219dd(0x10e)]('!\x20当前未登录');}
@@ -0,0 +1 @@
1
+ const a31_0x3643e5=a31_0x3c27;function a31_0x3061(){const _0x27b059=['2247196lftLxj','2159288iSWdPi','18tcswIV','316885CyxZkm','boolean','427843CmpdzG','3429236BNJdiS','5460776BIbwim','8575371naZPkz','3iIoazT'];a31_0x3061=function(){return _0x27b059;};return a31_0x3061();}function a31_0x3c27(_0x53c115,_0x3ae2e8){_0x53c115=_0x53c115-0x88;const _0x30614c=a31_0x3061();let _0x3c271e=_0x30614c[_0x53c115];return _0x3c271e;}(function(_0x31e84c,_0x3dda3d){const _0x457d9b=a31_0x3c27,_0x5c6ab5=_0x31e84c();while(!![]){try{const _0x3bc0ee=-parseInt(_0x457d9b(0x8a))/0x1+parseInt(_0x457d9b(0x90))/0x2+parseInt(_0x457d9b(0x8e))/0x3*(-parseInt(_0x457d9b(0x8b))/0x4)+parseInt(_0x457d9b(0x88))/0x5*(parseInt(_0x457d9b(0x91))/0x6)+parseInt(_0x457d9b(0x8f))/0x7+-parseInt(_0x457d9b(0x8c))/0x8+parseInt(_0x457d9b(0x8d))/0x9;if(_0x3bc0ee===_0x3dda3d)break;else _0x5c6ab5['push'](_0x5c6ab5['shift']());}catch(_0x5a3980){_0x5c6ab5['push'](_0x5c6ab5['shift']());}}}(a31_0x3061,0x8c981));export const dynamicCliFlags={'dangerouslyBffSave':{'type':a31_0x3643e5(0x89)}};