@lovrabet/cli 1.2.5-beta.4 → 1.2.5-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) 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.js +1 -1
  31. package/lib/cmd/build-watch.js +1 -1
  32. package/lib/cmd/build.js +1 -1
  33. package/lib/cmd/logs.js +1 -1
  34. package/lib/cmd/preview.js +1 -1
  35. package/lib/cmd/start.js +1 -1
  36. package/lib/config/config-help.js +1 -1
  37. package/lib/config/main.js +1 -1
  38. package/lib/constant/domain.js +1 -1
  39. package/lib/constant/env.js +1 -1
  40. package/lib/create-app/enhanced-guided-create.js +1 -1
  41. package/lib/create-app/format-elapsed.js +1 -1
  42. package/lib/create-app/main.js +1 -1
  43. package/lib/create-app/task-finished.js +1 -1
  44. package/lib/create-app/task-loading.js +1 -1
  45. package/lib/create-app/task-running.js +1 -1
  46. package/lib/create-app/task-time.js +1 -1
  47. package/lib/create-app/use-copy-project-template.js +1 -1
  48. package/lib/create-app/use-format-code.js +1 -1
  49. package/lib/create-app/use-install-dependencies.js +1 -1
  50. package/lib/help.js +1 -1
  51. package/lib/init/main.js +1 -1
  52. package/lib/mcp/McpInstallUI.js +1 -1
  53. package/lib/mcp/claude.js +1 -1
  54. package/lib/mcp/cursor.js +1 -1
  55. package/lib/mcp/main.js +1 -1
  56. package/lib/skills/SkillInstallUI.js +1 -1
  57. package/lib/skills/main.js +1 -1
  58. package/lib/utils/check-sdk-version.js +1 -1
  59. package/lib/utils/config.js +1 -1
  60. package/lib/utils/copy-directory.js +1 -1
  61. package/lib/utils/http-client.js +1 -1
  62. package/lib/utils/logger.js +1 -1
  63. package/lib/utils/router-updater.js +1 -1
  64. package/lib/utils/sleep.js +1 -1
  65. package/lib/utils/template-replacer.js +1 -1
  66. package/package.json +1 -1
package/lib/api/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0xf401c1,_0x5e5bd7){const _0x3de323=a10_0x433c,_0x5a40f3=_0xf401c1();while(!![]){try{const _0x53ccfc=parseInt(_0x3de323(0xd0))/0x1+-parseInt(_0x3de323(0xae))/0x2*(parseInt(_0x3de323(0xbb))/0x3)+-parseInt(_0x3de323(0xbe))/0x4+-parseInt(_0x3de323(0xcf))/0x5*(parseInt(_0x3de323(0xaf))/0x6)+-parseInt(_0x3de323(0xd9))/0x7+-parseInt(_0x3de323(0xcb))/0x8*(parseInt(_0x3de323(0xc7))/0x9)+-parseInt(_0x3de323(0xd8))/0xa*(-parseInt(_0x3de323(0xb4))/0xb);if(_0x53ccfc===_0x5e5bd7)break;else _0x5a40f3['push'](_0x5a40f3['shift']());}catch(_0x2aa5f7){_0x5a40f3['push'](_0x5a40f3['shift']());}}}(a10_0x70b7,0x2c38b));import{jsx as a10_0x290c75}from'react/jsx-runtime';function a10_0x433c(_0x171373,_0x31f8c4){_0x171373=_0x171373-0xa6;const _0x70b749=a10_0x70b7();let _0x433c76=_0x70b749[_0x171373];return _0x433c76;}import{render}from'ink';import{ApiPullUI}from'./api-pull-ui.js';import{ApiDocUI}from'./api-doc-ui.js';import{getConfigAppCode}from'../utils/config.js';function a10_0x70b7(){const _0x1d4ec5=['\x20\x20lovrabet\x20api\x20doc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档','env','\x1b[0m','\x20\x20错误:\x20','!\x20请使用以下方式之一:','459ePDlIt','\x20\x20lovrabet\x20api\x20doc\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定文档输出目录(默认:\x20./docs)','map','321020dwPWbS','\x1b[90m\x20\x20(注:\x20--appcode\x20参数与配置一致,将使用默认配置)\x1b[0m','\x20\x20\x202.\x20使用参数:\x20lovrabet\x20api\x20pull\x20--appcode\x20<app-code>','filter','\x0alovrabet\x20api\x20-\x20API\x20相关操作\x0a\x0a用法:\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20[options]\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20[options]\x0a\x0a选项:\x0a\x20\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20指定应用代码\x0a\x20\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20指定输出目录(pull:\x20./src/api/,doc:\x20./docs)\x0a\x20\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20指定环境(如:daily、online)\x0a\x20\x20--datasetcode\x20<codes>\x20指定要生成文档的数据集代码(多个用逗号分隔,仅\x20doc\x20命令)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示此帮助信息\x0a\x0a示例:\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--appcode\x20myapp\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--output\x20./api\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定输出目录\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境拉取\x20API\x0a\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成所有数据集的文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--appcode\x20myapp\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--output\x20./docs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定文档输出目录\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境生成文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--datasetcode\x20ds_001\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20只生成指定数据集的文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--datasetcode\x20ds_001,ds_002\x20\x20\x20\x20\x20\x20//\x20生成多个数据集的文档\x0a','log','appcode','input','output','115029OoZykd','\x20\x20lovrabet\x20api\x20doc\x20--appcode\x20','doc','exit','168ISHQWK','help','flags','Unknown\x20api\x20command:\x20','40Yhaelq','179388JOLlzb','\x20\x20lovrabet\x20api\x20pull\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定输出目录(默认:\x20./src/api/)','\x20\x20\x202.\x20使用参数:\x20lovrabet\x20api\x20doc\x20--appcode\x20<app-code>','\x20\x20lovrabet\x20api\x20pull\x20--appcode\x20','parse','length','\x20\x20lovrabet\x20api\x20pull\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境(如:\x20daily,\x20online)','split','2218610bzadeT','2078447UJOhhk','error','\x20\x20lovrabet\x20api\x20doc\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境(如:\x20daily,\x20online)','params','×\x20未配置\x20AppCode','×\x20--params\x20参数不是有效的\x20JSON\x20格式','message','pull','join','×\x20--params\x20参数必须是一个有效的\x20JSON\x20对象','2818KxFbNN','184806Rvvwwx','\x20\x20lovrabet\x20api\x20doc\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode','\x20\x20lovrabet\x20api\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件','isArray','\x20\x20\x201.\x20配置默认值:\x20lovrabet\x20config\x20set\x20appcode\x20<app-code>','55UNCend','\x1b[90m*\x20使用配置的应用AppCode:\x20'];a10_0x70b7=function(){return _0x1d4ec5;};return a10_0x70b7();}export async function apiCli(_0x4f5eb3){const _0x39f14f=a10_0x433c,_0xb5a810=_0x4f5eb3[_0x39f14f(0xc5)][0x1];if(_0x4f5eb3['flags'][_0x39f14f(0xcc)]){console[_0x39f14f(0xc3)](_0x39f14f(0xc2));return;}if(_0xb5a810===_0x39f14f(0xab)){_0x4f5eb3['input'][0x2]&&(console[_0x39f14f(0xda)]('❌\x20错误:不再支持位置参数方式'),console[_0x39f14f(0xc3)]('请使用\x20--appcode\x20参数,例如:'),console['log'](_0x39f14f(0xd3)+_0x4f5eb3[_0x39f14f(0xc5)][0x2]),process['exit'](0x1));const _0xaf765b=getConfigAppCode();let _0x40d715=_0x4f5eb3['flags'][_0x39f14f(0xc4)];const _0x1a5385=typeof _0x4f5eb3[_0x39f14f(0xcd)][_0x39f14f(0xb7)]==='string'?_0x4f5eb3['flags'][_0x39f14f(0xb7)]:undefined,_0x251e59=_0x4f5eb3[_0x39f14f(0xcd)][_0x39f14f(0xc6)];!_0x40d715&&!_0xaf765b&&(console[_0x39f14f(0xda)](_0x39f14f(0xa8)),console['log'](_0x39f14f(0xba)),console[_0x39f14f(0xc3)]('\x20\x20\x201.\x20配置默认值:\x20lovrabet\x20config\x20set\x20appcode\x20<app-code>'),console[_0x39f14f(0xc3)](_0x39f14f(0xc0)),process[_0x39f14f(0xca)](0x1)),_0x40d715&&_0xaf765b&&_0x40d715===_0xaf765b&&(console[_0x39f14f(0xc3)](_0x39f14f(0xb5)+_0x40d715+'\x1b[0m'),console['log'](_0x39f14f(0xbf)),_0x40d715=undefined),render(a10_0x290c75(ApiPullUI,{'appCode':_0x40d715,'env':_0x1a5385,'output':_0x251e59}));}else{if(_0xb5a810===_0x39f14f(0xc9)){_0x4f5eb3[_0x39f14f(0xc5)][0x2]&&(console[_0x39f14f(0xda)]('❌\x20错误:不再支持位置参数方式'),console['log']('请使用\x20--appcode\x20参数,例如:'),console[_0x39f14f(0xc3)](_0x39f14f(0xc8)+_0x4f5eb3[_0x39f14f(0xc5)][0x2]),process[_0x39f14f(0xca)](0x1));const _0x4ee8ba=getConfigAppCode();let _0x1fb2e7=_0x4f5eb3[_0x39f14f(0xcd)][_0x39f14f(0xc4)];const _0x5d4ad0=typeof _0x4f5eb3[_0x39f14f(0xcd)]['env']==='string'?_0x4f5eb3[_0x39f14f(0xcd)][_0x39f14f(0xb7)]:undefined,_0xb1df7=_0x4f5eb3[_0x39f14f(0xcd)][_0x39f14f(0xc6)],_0x4555ae=_0x4f5eb3[_0x39f14f(0xcd)][_0x39f14f(0xa7)],_0x3bc6b6=_0x4f5eb3['flags']['datasetcode'];!_0x1fb2e7&&!_0x4ee8ba&&(console[_0x39f14f(0xda)](_0x39f14f(0xa8)),console['log']('!\x20请使用以下方式之一:'),console[_0x39f14f(0xc3)](_0x39f14f(0xb3)),console['log'](_0x39f14f(0xd2)),process[_0x39f14f(0xca)](0x1));_0x1fb2e7&&_0x4ee8ba&&_0x1fb2e7===_0x4ee8ba&&(console[_0x39f14f(0xc3)](_0x39f14f(0xb5)+_0x1fb2e7+_0x39f14f(0xb8)),_0x1fb2e7=undefined);let _0x29c1c2;if(_0x4555ae)try{_0x29c1c2=JSON[_0x39f14f(0xd4)](_0x4555ae),(typeof _0x29c1c2!=='object'||_0x29c1c2===null||Array[_0x39f14f(0xb2)](_0x29c1c2))&&(console[_0x39f14f(0xda)](_0x39f14f(0xad)),process['exit'](0x1));}catch(_0x18029e){console[_0x39f14f(0xda)](_0x39f14f(0xa9)),console[_0x39f14f(0xda)](_0x39f14f(0xb9)+(_0x18029e instanceof Error?_0x18029e[_0x39f14f(0xaa)]:String(_0x18029e))),process[_0x39f14f(0xca)](0x1);}let _0x279eec;_0x3bc6b6&&(_0x279eec=_0x3bc6b6[_0x39f14f(0xd7)](',')[_0x39f14f(0xbd)](_0x418322=>_0x418322['trim']())[_0x39f14f(0xc1)](_0x11abcb=>_0x11abcb[_0x39f14f(0xd5)]>0x0),_0x279eec[_0x39f14f(0xd5)]===0x0&&(console[_0x39f14f(0xda)]('×\x20--datasetcode\x20参数不能为空'),process[_0x39f14f(0xca)](0x1)),console[_0x39f14f(0xc3)]('\x1b[90m*\x20仅生成指定数据集的文档:\x20'+_0x279eec[_0x39f14f(0xac)](',\x20')+_0x39f14f(0xb8))),render(a10_0x290c75(ApiDocUI,{'appCode':_0x1fb2e7,'env':_0x5d4ad0,'output':_0xb1df7,'extraParams':_0x29c1c2,'datasetCodes':_0x279eec}));}else console['error'](_0x39f14f(0xce)+_0xb5a810),console[_0x39f14f(0xc3)]('Available\x20commands:'),console['log'](_0x39f14f(0xb1)),console['log']('\x20\x20lovrabet\x20api\x20pull\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode'),console[_0x39f14f(0xc3)](_0x39f14f(0xd1)),console[_0x39f14f(0xc3)](_0x39f14f(0xd6)),console[_0x39f14f(0xc3)](''),console[_0x39f14f(0xc3)](_0x39f14f(0xb6)),console['log'](_0x39f14f(0xb0)),console[_0x39f14f(0xc3)](_0x39f14f(0xbc)),console['log'](_0x39f14f(0xa6)),process['exit'](0x1);}}
1
+ (function(_0x530305,_0xbd1b75){const _0x201fad=a10_0x5708,_0x3d718c=_0x530305();while(!![]){try{const _0x3e2951=-parseInt(_0x201fad(0x175))/0x1*(parseInt(_0x201fad(0x161))/0x2)+parseInt(_0x201fad(0x15c))/0x3*(-parseInt(_0x201fad(0x154))/0x4)+parseInt(_0x201fad(0x16e))/0x5+parseInt(_0x201fad(0x15a))/0x6+-parseInt(_0x201fad(0x176))/0x7*(parseInt(_0x201fad(0x185))/0x8)+parseInt(_0x201fad(0x166))/0x9+-parseInt(_0x201fad(0x17a))/0xa;if(_0x3e2951===_0xbd1b75)break;else _0x3d718c['push'](_0x3d718c['shift']());}catch(_0x1706ad){_0x3d718c['push'](_0x3d718c['shift']());}}}(a10_0x47f8,0xc066e));import{jsx as a10_0x3e6f03}from'react/jsx-runtime';function a10_0x47f8(){const _0x170155=['split','7512QamMvt','message','53436IqcJSU','\x20\x20lovrabet\x20api\x20doc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档','flags','params','\x1b[90m*\x20仅生成指定数据集的文档:\x20','filter','7425882eLCeAF','output','111sIfCJY','×\x20--datasetcode\x20参数不能为空','isArray','\x20\x20lovrabet\x20api\x20pull\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode','datasetcode','1049414WZsGpt','\x1b[0m','input','\x20\x20lovrabet\x20api\x20doc\x20--appcode\x20','\x20\x20lovrabet\x20api\x20doc\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境(如:\x20daily,\x20online)','6678288hbWBNt','join','pull','❌\x20错误:不再支持位置参数方式','doc','error','\x1b[90m*\x20使用配置的应用AppCode:\x20','\x0alovrabet\x20api\x20-\x20API\x20相关操作\x0a\x0a用法:\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20[options]\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20[options]\x0a\x0a选项:\x0a\x20\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20指定应用代码\x0a\x20\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20指定输出目录(pull:\x20./src/api/,doc:\x20./docs)\x0a\x20\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20指定环境(如:daily、online)\x0a\x20\x20--datasetcode\x20<codes>\x20指定要生成文档的数据集代码(多个用逗号分隔,仅\x20doc\x20命令)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示此帮助信息\x0a\x0a示例:\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--appcode\x20myapp\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--output\x20./api\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定输出目录\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境拉取\x20API\x0a\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成所有数据集的文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--appcode\x20myapp\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--output\x20./docs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定文档输出目录\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境生成文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--datasetcode\x20ds_001\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20只生成指定数据集的文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--datasetcode\x20ds_001,ds_002\x20\x20\x20\x20\x20\x20//\x20生成多个数据集的文档\x0a','1461585vCPbwm','map','length','!\x20请使用以下方式之一:','string','\x20\x20lovrabet\x20api\x20doc\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode','请使用\x20--appcode\x20参数,例如:','1xfeodB','2688YGyhwx','Unknown\x20api\x20command:\x20','appcode','\x20\x20\x201.\x20配置默认值:\x20lovrabet\x20config\x20set\x20appcode\x20<app-code>','1043520PqCaMA','help','env','\x20\x20\x202.\x20使用参数:\x20lovrabet\x20api\x20pull\x20--appcode\x20<app-code>','×\x20--params\x20参数必须是一个有效的\x20JSON\x20对象','\x20\x20lovrabet\x20api\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件','exit','\x20\x20lovrabet\x20api\x20pull\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境(如:\x20daily,\x20online)','×\x20未配置\x20AppCode','log'];a10_0x47f8=function(){return _0x170155;};return a10_0x47f8();}import{render}from'ink';function a10_0x5708(_0x77c84a,_0x5af48b){_0x77c84a=_0x77c84a-0x153;const _0x47f81d=a10_0x47f8();let _0x5708f9=_0x47f81d[_0x77c84a];return _0x5708f9;}import{ApiPullUI}from'./api-pull-ui.js';import{ApiDocUI}from'./api-doc-ui.js';import{getConfigAppCode}from'../utils/config.js';export async function apiCli(_0x1dd2c1){const _0x2fd434=a10_0x5708,_0x34cf33=_0x1dd2c1[_0x2fd434(0x163)][0x1];if(_0x1dd2c1[_0x2fd434(0x156)][_0x2fd434(0x17b)]){console[_0x2fd434(0x183)](_0x2fd434(0x16d));return;}if(_0x34cf33===_0x2fd434(0x168)){_0x1dd2c1[_0x2fd434(0x163)][0x2]&&(console[_0x2fd434(0x16b)](_0x2fd434(0x169)),console[_0x2fd434(0x183)](_0x2fd434(0x174)),console[_0x2fd434(0x183)]('\x20\x20lovrabet\x20api\x20pull\x20--appcode\x20'+_0x1dd2c1[_0x2fd434(0x163)][0x2]),process['exit'](0x1));const _0x5b8911=getConfigAppCode();let _0x526dcb=_0x1dd2c1['flags'][_0x2fd434(0x178)];const _0x360bb5=typeof _0x1dd2c1[_0x2fd434(0x156)][_0x2fd434(0x17c)]===_0x2fd434(0x172)?_0x1dd2c1[_0x2fd434(0x156)][_0x2fd434(0x17c)]:undefined,_0x5b82e9=_0x1dd2c1[_0x2fd434(0x156)][_0x2fd434(0x15b)];!_0x526dcb&&!_0x5b8911&&(console[_0x2fd434(0x16b)](_0x2fd434(0x182)),console[_0x2fd434(0x183)](_0x2fd434(0x171)),console[_0x2fd434(0x183)](_0x2fd434(0x179)),console['log'](_0x2fd434(0x17d)),process[_0x2fd434(0x180)](0x1)),_0x526dcb&&_0x5b8911&&_0x526dcb===_0x5b8911&&(console[_0x2fd434(0x183)](_0x2fd434(0x16c)+_0x526dcb+_0x2fd434(0x162)),console[_0x2fd434(0x183)]('\x1b[90m\x20\x20(注:\x20--appcode\x20参数与配置一致,将使用默认配置)\x1b[0m'),_0x526dcb=undefined),render(a10_0x3e6f03(ApiPullUI,{'appCode':_0x526dcb,'env':_0x360bb5,'output':_0x5b82e9}));}else{if(_0x34cf33===_0x2fd434(0x16a)){_0x1dd2c1[_0x2fd434(0x163)][0x2]&&(console['error']('❌\x20错误:不再支持位置参数方式'),console['log']('请使用\x20--appcode\x20参数,例如:'),console[_0x2fd434(0x183)](_0x2fd434(0x164)+_0x1dd2c1[_0x2fd434(0x163)][0x2]),process[_0x2fd434(0x180)](0x1));const _0x52dfa4=getConfigAppCode();let _0x42b59f=_0x1dd2c1[_0x2fd434(0x156)][_0x2fd434(0x178)];const _0x4542af=typeof _0x1dd2c1[_0x2fd434(0x156)]['env']===_0x2fd434(0x172)?_0x1dd2c1[_0x2fd434(0x156)][_0x2fd434(0x17c)]:undefined,_0x125748=_0x1dd2c1['flags'][_0x2fd434(0x15b)],_0x2676c3=_0x1dd2c1[_0x2fd434(0x156)][_0x2fd434(0x157)],_0x1b86d6=_0x1dd2c1['flags'][_0x2fd434(0x160)];!_0x42b59f&&!_0x52dfa4&&(console[_0x2fd434(0x16b)](_0x2fd434(0x182)),console['log'](_0x2fd434(0x171)),console['log']('\x20\x20\x201.\x20配置默认值:\x20lovrabet\x20config\x20set\x20appcode\x20<app-code>'),console[_0x2fd434(0x183)]('\x20\x20\x202.\x20使用参数:\x20lovrabet\x20api\x20doc\x20--appcode\x20<app-code>'),process[_0x2fd434(0x180)](0x1));_0x42b59f&&_0x52dfa4&&_0x42b59f===_0x52dfa4&&(console['log'](_0x2fd434(0x16c)+_0x42b59f+_0x2fd434(0x162)),_0x42b59f=undefined);let _0x4604c3;if(_0x2676c3)try{_0x4604c3=JSON['parse'](_0x2676c3),(typeof _0x4604c3!=='object'||_0x4604c3===null||Array[_0x2fd434(0x15e)](_0x4604c3))&&(console[_0x2fd434(0x16b)](_0x2fd434(0x17e)),process['exit'](0x1));}catch(_0x2f433d){console[_0x2fd434(0x16b)]('×\x20--params\x20参数不是有效的\x20JSON\x20格式'),console[_0x2fd434(0x16b)]('\x20\x20错误:\x20'+(_0x2f433d instanceof Error?_0x2f433d[_0x2fd434(0x153)]:String(_0x2f433d))),process[_0x2fd434(0x180)](0x1);}let _0x4ce905;_0x1b86d6&&(_0x4ce905=_0x1b86d6[_0x2fd434(0x184)](',')[_0x2fd434(0x16f)](_0x4df6a1=>_0x4df6a1['trim']())[_0x2fd434(0x159)](_0x2b9cc3=>_0x2b9cc3[_0x2fd434(0x170)]>0x0),_0x4ce905['length']===0x0&&(console['error'](_0x2fd434(0x15d)),process['exit'](0x1)),console[_0x2fd434(0x183)](_0x2fd434(0x158)+_0x4ce905[_0x2fd434(0x167)](',\x20')+_0x2fd434(0x162))),render(a10_0x3e6f03(ApiDocUI,{'appCode':_0x42b59f,'env':_0x4542af,'output':_0x125748,'extraParams':_0x4604c3,'datasetCodes':_0x4ce905}));}else console[_0x2fd434(0x16b)](_0x2fd434(0x177)+_0x34cf33),console['log']('Available\x20commands:'),console[_0x2fd434(0x183)](_0x2fd434(0x17f)),console[_0x2fd434(0x183)](_0x2fd434(0x15f)),console['log']('\x20\x20lovrabet\x20api\x20pull\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定输出目录(默认:\x20./src/api/)'),console[_0x2fd434(0x183)](_0x2fd434(0x181)),console['log'](''),console[_0x2fd434(0x183)](_0x2fd434(0x155)),console['log'](_0x2fd434(0x173)),console['log']('\x20\x20lovrabet\x20api\x20doc\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定文档输出目录(默认:\x20./docs)'),console[_0x2fd434(0x183)](_0x2fd434(0x165)),process[_0x2fd434(0x180)](0x1);}}
@@ -1 +1 @@
1
- (function(_0x560d21,_0x404426){const _0x5d90d7=a11_0x5cb2,_0x35b617=_0x560d21();while(!![]){try{const _0x52efc1=-parseInt(_0x5d90d7(0x14a))/0x1+-parseInt(_0x5d90d7(0x149))/0x2+parseInt(_0x5d90d7(0x14c))/0x3+-parseInt(_0x5d90d7(0x145))/0x4+parseInt(_0x5d90d7(0x15a))/0x5+-parseInt(_0x5d90d7(0x150))/0x6+parseInt(_0x5d90d7(0x156))/0x7;if(_0x52efc1===_0x404426)break;else _0x35b617['push'](_0x35b617['shift']());}catch(_0x2b2d9b){_0x35b617['push'](_0x35b617['shift']());}}}(a11_0x4055,0x73b66));import{readConfig}from'../utils/config.js';function a11_0x4055(){const _0x24da25=['log','error','×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。','5457235adoizk','.ts\x20-\x20模型配置文件','-api','create-api-pull','2383585lbSPbo','cwd','chdir','\x20个数据集...','\x20个数据集,生成\x20','API\x20配置拉取成功:\x20','trim','env','×\x20API\x20配置拉取异常:','length','1478104QDiXwt','online','client','*\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20','137896zSIieH','616220ezWcvC','modelCount','2344887CDLOvC','api','test','√\x20成功拉取\x20','3055794jDiSXO','info','*\x20正在处理\x20'];a11_0x4055=function(){return _0x24da25;};return a11_0x4055();}import{initEnv}from'../constant/env.js';function a11_0x5cb2(_0x409556,_0x7ca474){_0x409556=_0x409556-0x143;const _0x4055d7=a11_0x4055();let _0x5cb2f3=_0x4055d7[_0x409556];return _0x5cb2f3;}import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';import{fetchModelList}from'./fetch-model-list.js';export async function pullApiSilent(_0x38b566,_0x274cd7,_0x25a288,_0x53b217){const _0xefe752=a11_0x5cb2;let _0x37e4a2;try{const _0x276659=_0x274cd7?.[_0xefe752(0x160)]()||'';if(_0x276659){const _0x9cf9ed=/^[a-zA-Z][a-zA-Z0-9_-]*$/;if(!_0x9cf9ed[_0xefe752(0x14e)](_0x276659))return console[_0xefe752(0x154)](_0xefe752(0x155)),![];}_0x25a288&&(_0x37e4a2=process[_0xefe752(0x15b)](),process[_0xefe752(0x15c)](_0x25a288));const _0x286f91=readConfig(),_0xd3a16f=typeof _0x286f91[_0xefe752(0x161)]==='string'?_0x286f91[_0xefe752(0x161)]:undefined,_0x56400d=_0x53b217||_0xd3a16f||_0xefe752(0x146);initEnv(_0x56400d),console[_0xefe752(0x153)](_0xefe752(0x148)+_0x56400d+')');const {configArray:_0x509f5b}=await fetchModelList(_0x38b566),_0xcc813=_0x276659?_0x276659+_0xefe752(0x158):_0xefe752(0x14d),_0x337f91=_0x276659?_0x276659+'-client':_0xefe752(0x147);console['log']('*\x20开始生成\x20API\x20配置文件:'),console['log']('\x20\x20\x20•\x20'+_0xcc813+_0xefe752(0x157)),console[_0xefe752(0x153)]('\x20\x20\x20•\x20'+_0x337f91+'.ts\x20-\x20客户端实例文件'),console[_0xefe752(0x153)](_0xefe752(0x152)+_0x509f5b[_0xefe752(0x144)]+_0xefe752(0x15d));const _0x1f6c30=await generateApiFile(_0x509f5b,_0x276659,_0x38b566,!![],_0x56400d);return console[_0xefe752(0x153)](_0xefe752(0x14f)+_0x509f5b[_0xefe752(0x144)]+_0xefe752(0x15e)+_0x1f6c30[_0xefe752(0x14b)]+'\x20个模型'),_0x25a288&&logger[_0xefe752(0x151)](_0xefe752(0x159),_0xefe752(0x15f)+_0x38b566,{'projectPath':_0x25a288,'appCode':_0x38b566,'datasetCount':_0x509f5b[_0xefe752(0x144)],'filePrefix':_0x276659}),!![];}catch(_0x5c9a41){const _0xe57dd9=_0x5c9a41 instanceof Error?_0x5c9a41['message']:String(_0x5c9a41);return console[_0xefe752(0x154)](_0xefe752(0x143),_0xe57dd9),_0x25a288&&logger['error']('create-api-pull','API\x20配置拉取异常:\x20'+_0xe57dd9,{'appCode':_0x38b566,'projectPath':_0x25a288}),![];}finally{_0x37e4a2&&process[_0xefe752(0x15c)](_0x37e4a2);}}
1
+ (function(_0x2e8935,_0x4f4c49){const _0x4d91a7=a11_0x1562,_0x3d5702=_0x2e8935();while(!![]){try{const _0x162cd2=parseInt(_0x4d91a7(0xb5))/0x1+-parseInt(_0x4d91a7(0xba))/0x2+parseInt(_0x4d91a7(0xc1))/0x3+-parseInt(_0x4d91a7(0xbc))/0x4*(parseInt(_0x4d91a7(0xc9))/0x5)+parseInt(_0x4d91a7(0xd1))/0x6+-parseInt(_0x4d91a7(0xcd))/0x7+parseInt(_0x4d91a7(0xca))/0x8;if(_0x162cd2===_0x4f4c49)break;else _0x3d5702['push'](_0x3d5702['shift']());}catch(_0x453843){_0x3d5702['push'](_0x3d5702['shift']());}}}(a11_0xbec1,0xece1c));function a11_0xbec1(){const _0x22c4e7=['env','string','chdir','API\x20配置拉取异常:\x20','create-api-pull','info','test','8866035ZdZmTj','9898656Zorlrk','error','√\x20成功拉取\x20','10458854egsnwG','api','.ts\x20-\x20模型配置文件','×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。','6096060XrSbUD','\x20\x20\x20•\x20','length','\x20个数据集...','modelCount','1813494MKZNcO','online','\x20个模型','.ts\x20-\x20客户端实例文件','*\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20','2252792bOddct','×\x20API\x20配置拉取异常:','4AMoSTB','log','*\x20开始生成\x20API\x20配置文件:','trim','message','3891471vQpZrj'];a11_0xbec1=function(){return _0x22c4e7;};return a11_0xbec1();}import{readConfig}from'../utils/config.js';import{initEnv}from'../constant/env.js';function a11_0x1562(_0x34cd2b,_0x3b67be){_0x34cd2b=_0x34cd2b-0xb4;const _0xbec1ea=a11_0xbec1();let _0x1562dc=_0xbec1ea[_0x34cd2b];return _0x1562dc;}import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';import{fetchModelList}from'./fetch-model-list.js';export async function pullApiSilent(_0x444246,_0x589e3c,_0xa9c846,_0x1b4694){const _0x1cd58e=a11_0x1562;let _0x1ba200;try{const _0x2aca39=_0x589e3c?.[_0x1cd58e(0xbf)]()||'';if(_0x2aca39){const _0x1ba74f=/^[a-zA-Z][a-zA-Z0-9_-]*$/;if(!_0x1ba74f[_0x1cd58e(0xc8)](_0x2aca39))return console[_0x1cd58e(0xcb)](_0x1cd58e(0xd0)),![];}_0xa9c846&&(_0x1ba200=process['cwd'](),process['chdir'](_0xa9c846));const _0x408650=readConfig(),_0x4f1c84=typeof _0x408650[_0x1cd58e(0xc2)]===_0x1cd58e(0xc3)?_0x408650[_0x1cd58e(0xc2)]:undefined,_0x3fd65a=_0x1b4694||_0x4f1c84||_0x1cd58e(0xb6);initEnv(_0x3fd65a),console[_0x1cd58e(0xbd)](_0x1cd58e(0xb9)+_0x3fd65a+')');const {configArray:_0x5c523b}=await fetchModelList(_0x444246),_0x1c7350=_0x2aca39?_0x2aca39+'-api':_0x1cd58e(0xce),_0x4ed009=_0x2aca39?_0x2aca39+'-client':'client';console['log'](_0x1cd58e(0xbe)),console[_0x1cd58e(0xbd)](_0x1cd58e(0xd2)+_0x1c7350+_0x1cd58e(0xcf)),console['log'](_0x1cd58e(0xd2)+_0x4ed009+_0x1cd58e(0xb8)),console['log']('*\x20正在处理\x20'+_0x5c523b[_0x1cd58e(0xd3)]+_0x1cd58e(0xd4));const _0x21072e=await generateApiFile(_0x5c523b,_0x2aca39,_0x444246,!![],_0x3fd65a);return console['log'](_0x1cd58e(0xcc)+_0x5c523b['length']+'\x20个数据集,生成\x20'+_0x21072e[_0x1cd58e(0xb4)]+_0x1cd58e(0xb7)),_0xa9c846&&logger[_0x1cd58e(0xc7)](_0x1cd58e(0xc6),'API\x20配置拉取成功:\x20'+_0x444246,{'projectPath':_0xa9c846,'appCode':_0x444246,'datasetCount':_0x5c523b['length'],'filePrefix':_0x2aca39}),!![];}catch(_0x1919b8){const _0x467abc=_0x1919b8 instanceof Error?_0x1919b8[_0x1cd58e(0xc0)]:String(_0x1919b8);return console[_0x1cd58e(0xcb)](_0x1cd58e(0xbb),_0x467abc),_0xa9c846&&logger['error'](_0x1cd58e(0xc6),_0x1cd58e(0xc5)+_0x467abc,{'appCode':_0x444246,'projectPath':_0xa9c846}),![];}finally{_0x1ba200&&process[_0x1cd58e(0xc4)](_0x1ba200);}}
@@ -1 +1 @@
1
- (function(_0x2718e2,_0x454abc){const _0x203050=a12_0xb92a,_0x510f20=_0x2718e2();while(!![]){try{const _0x169d3f=parseInt(_0x203050(0x15f))/0x1*(parseInt(_0x203050(0x18d))/0x2)+parseInt(_0x203050(0x17f))/0x3+-parseInt(_0x203050(0x154))/0x4*(parseInt(_0x203050(0x193))/0x5)+-parseInt(_0x203050(0x16e))/0x6*(-parseInt(_0x203050(0x16c))/0x7)+-parseInt(_0x203050(0x17d))/0x8*(-parseInt(_0x203050(0x191))/0x9)+parseInt(_0x203050(0x173))/0xa*(parseInt(_0x203050(0x16b))/0xb)+-parseInt(_0x203050(0x16f))/0xc;if(_0x169d3f===_0x454abc)break;else _0x510f20['push'](_0x510f20['shift']());}catch(_0x54b085){_0x510f20['push'](_0x510f20['shift']());}}}(a12_0x5813,0xb4bd7));import{jsx as a12_0x276a26,jsxs as a12_0x25ed48,Fragment as a12_0xf342a1}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a12_0x2af180 from'ink-spinner';import{useGetOnlineMenuList}from'./use-get-online-menu-list.js';import{getLocalPages}from'./get-local-pages.js';function a12_0xb92a(_0x221ab2,_0xed11f5){_0x221ab2=_0x221ab2-0x14a;const _0x581334=a12_0x5813();let _0xb92acd=_0x581334[_0x221ab2];return _0xb92acd;}import{createMenus}from'./create-menu.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import.meta.main&&render(a12_0x276a26(AppMenuSyncUI,{}));function a12_0x5813(){const _0xba04b7=['max','creating','请输入有效的\x20CSS\x20https\x20链接','5rnUJzf','column','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','done','JS\x20链接无法访问','test','then','green','map','catch','JS\x20链接','\x20命令重新登录','4939LXCnCR','8722567yepiRI','add','6ubWroC','15636900KVeDXl','Lovrabet平台','提示:使用\x20','*\x20正在创建菜单...','16870KQRnkJ','已选择菜单','创建菜单失败','\x20正在获取线上菜单列表...','includes','dots','delete','\x20输入项目的\x20JS\x20资源链接(https://...)','upArrow','selecting','16OCqzfZ','length','978540BxyWtx','has','filter','*\x20同步菜单到\x20Lovrabet\x20平台','cyan','trim','CSS\x20链接','blue','input-css','size','slice','gray','join','\x20←\x20','80474VVJjIR','value','fill','path','1650141DbnKUc','[✓]','224795FaLkZh','label','请至少选择一个菜单','√\x20菜单创建完成','downArrow','message','\x20输入项目的\x20CSS\x20资源链接(https://...)','white','*\x20请选择要同步的菜单:','菜单名称','return','76xhcWgh','local','red','online','*\x20CSS\x20链接:\x20','backspace','lovrabet\x20auth','input-js'];a12_0x5813=function(){return _0xba04b7;};return a12_0x5813();}export function AppMenuSyncUI(){const _0x267048=a12_0xb92a,{exit:_0x13947d}=useApp(),{loading:_0x39df7f,menuList:_0x27566c,error:_0x3e2d5d}=useGetOnlineMenuList(),_0x5ca0b6=getLocalPages(),_0x1992ad=_0x27566c[_0x267048(0x167)](_0x2f44f0=>_0x2f44f0[_0x267048(0x190)]),_0x401ccb=[_0x267048(0x152),..._0x5ca0b6[_0x267048(0x167)](_0x50d20d=>_0x50d20d[_0x267048(0x14a)])],_0x3d5121=getStringWidth(getMaxWidth(_0x401ccb,0x4)),_0x1d5145=getStringWidth(getMaxWidth(['菜单名称'])),[_0x50db6e,_0x45532f]=useState(_0x267048(0x17c)),[_0x249f20,_0x101bc6]=useState(new Set()),[_0x2e5c5f,_0x41ce5e]=useState(0x0),[_0x2fc102,_0x25e225]=useState(''),[_0x4f4037,_0x64fd5f]=useState(''),[_0x209dea,_0x5673a2]=useState(''),[_0x2c2df1,_0x2bcb65]=useState(''),[_0x5890aa,_0x58a1a5]=useState([]),_0x26200c=_0x5ca0b6[_0x267048(0x167)](_0x5c8e27=>({'label':_0x5c8e27['label'],'path':_0x5c8e27[_0x267048(0x190)],'local':!![],'online':_0x1992ad[_0x267048(0x177)](_0x5c8e27[_0x267048(0x190)])})),_0x5c713b=_0x5ca0b6['filter'](_0x567317=>{const _0x3ff602=_0x267048;return!_0x1992ad['includes'](_0x567317[_0x3ff602(0x190)]);});useEffect(()=>{const _0x21be5a=_0x267048;if(!_0x39df7f&&_0x5ca0b6['length']>0x0&&_0x249f20[_0x21be5a(0x188)]===0x0){const _0x2bf1b5=new Set(_0x5ca0b6[_0x21be5a(0x167)]((_0x581429,_0x1be66e)=>({'page':_0x581429,'index':_0x1be66e}))[_0x21be5a(0x181)](({page:_0x30eddc})=>!_0x1992ad['includes'](_0x30eddc['path']))[_0x21be5a(0x167)](({index:_0x5e1e91})=>_0x5e1e91));_0x101bc6(_0x2bf1b5);}},[_0x39df7f,_0x5ca0b6['length'],_0x1992ad[_0x267048(0x17e)]]),useInput(async(_0x428433,_0x4188f9)=>{const _0x2eedc0=_0x267048;if(_0x50db6e===_0x2eedc0(0x17c)){if(_0x4188f9[_0x2eedc0(0x17b)]){_0x41ce5e(_0x306ed1=>_0x306ed1>0x0?_0x306ed1-0x1:_0x5ca0b6[_0x2eedc0(0x17e)]-0x1);return;}if(_0x4188f9[_0x2eedc0(0x14d)]){_0x41ce5e(_0x21f078=>_0x21f078<_0x5ca0b6['length']-0x1?_0x21f078+0x1:0x0);return;}if(_0x428433==='\x20'){_0x101bc6(_0x13ac29=>{const _0x421117=_0x2eedc0,_0x44220e=new Set(_0x13ac29);return _0x44220e[_0x421117(0x180)](_0x2e5c5f)?_0x44220e[_0x421117(0x179)](_0x2e5c5f):_0x44220e[_0x421117(0x16d)](_0x2e5c5f),_0x44220e;});return;}if(_0x428433==='a'||_0x428433==='A'){const _0x203da8=new Set(_0x5ca0b6[_0x2eedc0(0x167)]((_0x48d08,_0x5cc62a)=>_0x5cc62a));_0x101bc6(_0x203da8);return;}if(_0x428433==='i'||_0x428433==='I'||_0x428433==='r'||_0x428433==='R'){_0x101bc6(_0x1cda2f=>{const _0x368a14=_0x2eedc0,_0x10a064=new Set();for(let _0x3866b2=0x0;_0x3866b2<_0x5ca0b6[_0x368a14(0x17e)];_0x3866b2++){!_0x1cda2f['has'](_0x3866b2)&&_0x10a064['add'](_0x3866b2);}return _0x10a064;});return;}if(_0x428433==='q'||_0x428433==='Q'){_0x13947d();return;}if(_0x4188f9['return']){if(_0x249f20[_0x2eedc0(0x188)]===0x0){_0x2bcb65(_0x2eedc0(0x14b));return;}const _0x3709c5=_0x5ca0b6[_0x2eedc0(0x181)]((_0x19e0b0,_0x331c8d)=>_0x249f20[_0x2eedc0(0x180)](_0x331c8d)),_0x4666c4=_0x3709c5[_0x2eedc0(0x167)](_0x17f9dd=>_0x17f9dd[_0x2eedc0(0x14a)])[_0x2eedc0(0x18b)](',\x20');_0x58a1a5([{'label':_0x2eedc0(0x174),'value':_0x249f20[_0x2eedc0(0x188)]+'\x20个'}]),_0x2bcb65(''),_0x45532f('input-js');return;}return;}if(_0x50db6e===_0x2eedc0(0x15b)){if(_0x4188f9[_0x2eedc0(0x153)]){const _0x16ee3c=_0x209dea['trim']();if(_0x16ee3c==='')return;if(!isValidJsHttpsUrl(_0x16ee3c)){_0x2bcb65('请输入有效的\x20JS\x20https\x20链接');return;}if(!await isUrlReachable(_0x16ee3c)){_0x2bcb65(_0x2eedc0(0x163));return;}_0x25e225(_0x16ee3c),_0x58a1a5(_0x32f55e=>[..._0x32f55e,{'label':_0x2eedc0(0x169),'value':_0x16ee3c}]),_0x5673a2(''),_0x2bcb65(''),_0x45532f(_0x2eedc0(0x187));return;}if(_0x4188f9['backspace']||_0x4188f9[_0x2eedc0(0x179)]){_0x5673a2(_0x382413=>_0x382413[_0x2eedc0(0x189)](0x0,-0x1)),_0x2bcb65('');return;}_0x5673a2(_0x46c99a=>_0x46c99a+_0x428433);return;}if(_0x50db6e===_0x2eedc0(0x187)){if(_0x4188f9['return']){const _0x3c8a78=_0x209dea[_0x2eedc0(0x184)]();if(_0x3c8a78==='')return;if(!isValidCssHttpsUrl(_0x3c8a78)){_0x2bcb65(_0x2eedc0(0x15e));return;}if(!await isUrlReachable(_0x3c8a78)){_0x2bcb65('CSS\x20链接无法访问');return;}_0x64fd5f(_0x3c8a78),_0x58a1a5(_0x6141cc=>[..._0x6141cc,{'label':_0x2eedc0(0x185),'value':_0x3c8a78}]),_0x5673a2(''),_0x2bcb65(''),_0x45532f('creating');const _0x1c0414=_0x5ca0b6['filter']((_0x3fef7b,_0x5b5957)=>_0x249f20[_0x2eedc0(0x180)](_0x5b5957));createMenus(_0x1c0414,[_0x2fc102,_0x3c8a78])[_0x2eedc0(0x165)](()=>{const _0x56eafd=_0x2eedc0;_0x45532f(_0x56eafd(0x162)),setTimeout(()=>{_0x13947d();},0x3e8);})[_0x2eedc0(0x168)](_0x5bc0a2=>{const _0xf20d7b=_0x2eedc0;_0x2bcb65(_0x5bc0a2[_0xf20d7b(0x14e)]||_0xf20d7b(0x175)),_0x45532f(_0xf20d7b(0x17c));});return;}if(_0x4188f9[_0x2eedc0(0x159)]||_0x4188f9['delete']){_0x5673a2(_0x3177ab=>_0x3177ab[_0x2eedc0(0x189)](0x0,-0x1)),_0x2bcb65('');return;}_0x5673a2(_0x2aefff=>_0x2aefff+_0x428433);return;}});if(_0x39df7f)return a12_0x25ed48(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x276a26(Text,{'children':'\x20\x20'}),a12_0x276a26(a12_0x2af180,{'type':_0x267048(0x178)}),a12_0x276a26(Text,{'children':_0x267048(0x176)})]});if(_0x3e2d5d)return a12_0x25ed48(Box,{'flexDirection':_0x267048(0x160),'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x25ed48(Text,{'color':_0x267048(0x156),'children':['✗\x20',_0x3e2d5d]}),a12_0x25ed48(Box,{'marginTop':0x1,'children':[a12_0x276a26(Text,{'color':'gray','children':_0x267048(0x171)}),a12_0x276a26(Text,{'color':_0x267048(0x183),'children':_0x267048(0x15a)}),a12_0x276a26(Text,{'color':'gray','children':_0x267048(0x16a)})]})]});if(_0x5ca0b6[_0x267048(0x17e)]===0x0)return a12_0x276a26(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a12_0x276a26(Text,{'color':'yellow','children':'!\x20未找到本地页面,请先创建页面'})});return a12_0x25ed48(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[_0x50db6e==='selecting'&&a12_0x25ed48(a12_0xf342a1,{'children':[a12_0x25ed48(Box,{'children':[a12_0x25ed48(Text,{'bold':!![],'children':['\x20\x20','菜单名称',getRemainingSpaces(_0x3d5121,_0x267048(0x152))]}),a12_0x25ed48(Text,{'bold':!![],'children':['本地',getRemainingSpaces(_0x1d5145,_0x267048(0x152))]}),a12_0x25ed48(Text,{'bold':!![],'children':[_0x267048(0x170),getRemainingSpaces(_0x1d5145,'菜单名称')]})]}),_0x26200c['map'](_0x48fb81=>a12_0x25ed48(Box,{'children':[a12_0x25ed48(Text,{'children':['\x20\x20',_0x48fb81[_0x267048(0x14a)],getRemainingSpaces(_0x3d5121,_0x48fb81['label'])]}),a12_0x25ed48(Text,{'color':_0x267048(0x166),'children':[_0x48fb81[_0x267048(0x155)]?'✓':'✗',getRemainingSpaces(_0x1d5145,'✓')]}),a12_0x25ed48(Text,{'color':_0x48fb81['online']?_0x267048(0x166):'red','children':[_0x48fb81[_0x267048(0x157)]?'✓':'✗',getRemainingSpaces(_0x1d5145,'✓')]})]},_0x48fb81[_0x267048(0x190)]))]}),_0x50db6e==='selecting'&&_0x5890aa[_0x267048(0x17e)]===0x0&&a12_0x276a26(Box,{'marginTop':0x1,'children':a12_0x276a26(Text,{'color':_0x267048(0x183),'children':_0x267048(0x182)})}),_0x5890aa['map']((_0x27576d,_0x4bd9b9)=>a12_0x25ed48(Box,{'children':[a12_0x25ed48(Text,{'color':_0x267048(0x166),'children':['√\x20',_0x27576d[_0x267048(0x14a)],':\x20']}),a12_0x276a26(Text,{'color':_0x267048(0x183),'children':_0x27576d[_0x267048(0x18e)]})]},_0x4bd9b9)),_0x2c2df1&&_0x50db6e==='selecting'&&a12_0x276a26(Box,{'marginTop':0x1,'children':a12_0x25ed48(Text,{'color':_0x267048(0x156),'children':['✗\x20',_0x2c2df1]})}),_0x50db6e===_0x267048(0x17c)&&a12_0x276a26(a12_0xf342a1,{'children':a12_0x25ed48(Box,{'marginTop':_0x5890aa[_0x267048(0x17e)]>0x0||_0x2c2df1?0x1:0x0,'flexDirection':_0x267048(0x160),'children':[a12_0x276a26(Text,{'bold':!![],'children':_0x267048(0x151)}),_0x5ca0b6['map']((_0x2ad35b,_0x3fa484)=>{const _0x5b695e=_0x267048,_0x8b20e1=_0x2e5c5f===_0x3fa484,_0x503082=_0x249f20['has'](_0x3fa484),_0x43d2be=_0x1992ad[_0x5b695e(0x177)](_0x2ad35b[_0x5b695e(0x190)]),_0x43fcae=_0x43d2be?'更新':'新建';return a12_0x276a26(Box,{'children':a12_0x25ed48(Text,{'backgroundColor':_0x8b20e1?_0x5b695e(0x186):undefined,'color':_0x8b20e1?_0x5b695e(0x150):undefined,'children':['\x20\x20',_0x503082?_0x5b695e(0x192):'[\x20]','\x20',_0x2ad35b['label']]})},_0x2ad35b['path']);}),a12_0x276a26(Box,{'marginTop':0x1,'children':a12_0x25ed48(Text,{'color':_0x267048(0x18a),'children':['\x20',_0x267048(0x161)]})})]})}),_0x50db6e===_0x267048(0x15b)&&a12_0x25ed48(a12_0xf342a1,{'children':[a12_0x25ed48(Box,{'children':[a12_0x276a26(Text,{'children':'*\x20JS\x20链接:\x20'}),a12_0x276a26(Text,{'color':_0x267048(0x166),'children':_0x209dea}),_0x2c2df1&&a12_0x25ed48(Text,{'color':_0x267048(0x156),'children':['\x20←\x20',_0x2c2df1]})]}),!_0x2c2df1&&a12_0x276a26(Box,{'children':a12_0x276a26(Text,{'color':_0x267048(0x18a),'children':_0x267048(0x17a)})})]}),_0x50db6e===_0x267048(0x187)&&a12_0x25ed48(a12_0xf342a1,{'children':[a12_0x25ed48(Box,{'children':[a12_0x276a26(Text,{'children':_0x267048(0x158)}),a12_0x276a26(Text,{'color':'green','children':_0x209dea}),_0x2c2df1&&a12_0x25ed48(Text,{'color':_0x267048(0x156),'children':[_0x267048(0x18c),_0x2c2df1]})]}),!_0x2c2df1&&a12_0x276a26(Box,{'children':a12_0x276a26(Text,{'color':_0x267048(0x18a),'children':_0x267048(0x14f)})})]}),_0x50db6e===_0x267048(0x15d)&&a12_0x276a26(Box,{'children':a12_0x276a26(Text,{'children':_0x267048(0x172)})}),_0x50db6e===_0x267048(0x162)&&a12_0x276a26(Box,{'children':a12_0x276a26(Text,{'color':'green','children':_0x267048(0x14c)})})]});}function getStringWidth(_0x280a51){const _0x220aaa=a12_0xb92a;let _0x37f62f=0x0;for(const _0x3b6e46 of _0x280a51){/[\u4e00-\u9fa5]/[_0x220aaa(0x164)](_0x3b6e46)?_0x37f62f+=0x2:_0x37f62f+=0x1;}return _0x37f62f;}function getRemainingSpaces(_0x33c1a0,_0x426ca1){const _0x9dde60=a12_0xb92a,_0x48b832=getStringWidth(_0x426ca1);return Array(Math[_0x9dde60(0x15c)](0x0,_0x33c1a0-_0x48b832))[_0x9dde60(0x18f)]('\x20')[_0x9dde60(0x18b)]('');}function getMaxWidth(_0x42c38a,_0x2e7e26=0x2){let _0x298c2b='',_0x451153=0x0;for(const _0x1e359f of _0x42c38a){const _0x2b1995=getStringWidth(_0x1e359f);_0x2b1995>_0x451153&&(_0x451153=_0x2b1995,_0x298c2b=_0x1e359f);}return _0x298c2b+'\x20'['repeat'](_0x2e7e26);}
1
+ (function(_0x5c1d59,_0x1472be){const _0x5057e5=a12_0x2039,_0x577d3c=_0x5c1d59();while(!![]){try{const _0x298f1e=parseInt(_0x5057e5(0xd2))/0x1*(-parseInt(_0x5057e5(0x103))/0x2)+-parseInt(_0x5057e5(0xe7))/0x3+-parseInt(_0x5057e5(0x104))/0x4+parseInt(_0x5057e5(0x100))/0x5+parseInt(_0x5057e5(0xf5))/0x6*(-parseInt(_0x5057e5(0xe6))/0x7)+parseInt(_0x5057e5(0x101))/0x8*(-parseInt(_0x5057e5(0xcf))/0x9)+-parseInt(_0x5057e5(0xfd))/0xa*(-parseInt(_0x5057e5(0xfa))/0xb);if(_0x298f1e===_0x1472be)break;else _0x577d3c['push'](_0x577d3c['shift']());}catch(_0x3f9ffe){_0x577d3c['push'](_0x577d3c['shift']());}}}(a12_0x2169,0x77b9f));import{jsx as a12_0x3c0e3f,jsxs as a12_0x223c80,Fragment as a12_0x17f464}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a12_0x5da55b from'ink-spinner';import{useGetOnlineMenuList}from'./use-get-online-menu-list.js';import{getLocalPages}from'./get-local-pages.js';function a12_0x2039(_0x568e0f,_0x2e8d31){_0x568e0f=_0x568e0f-0xcc;const _0x216993=a12_0x2169();let _0x2039b9=_0x216993[_0x568e0f];return _0x2039b9;}import{createMenus}from'./create-menu.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import.meta.main&&render(a12_0x3c0e3f(AppMenuSyncUI,{}));export function AppMenuSyncUI(){const _0xa7b436=a12_0x2039,{exit:_0x4e7373}=useApp(),{loading:_0x4a542d,menuList:_0x43e9f4,error:_0x2e472d}=useGetOnlineMenuList(),_0x366065=getLocalPages(),_0x2a3243=_0x43e9f4[_0xa7b436(0xd5)](_0x532443=>_0x532443[_0xa7b436(0x109)]),_0x506724=[_0xa7b436(0xff),..._0x366065[_0xa7b436(0xd5)](_0x2fb89d=>_0x2fb89d[_0xa7b436(0xf6)])],_0x569c27=getStringWidth(getMaxWidth(_0x506724,0x4)),_0x153bad=getStringWidth(getMaxWidth([_0xa7b436(0xff)])),[_0x192b63,_0x452eaf]=useState('selecting'),[_0x11dbb0,_0x3b73d1]=useState(new Set()),[_0x5c9fe3,_0x4d916b]=useState(0x0),[_0x1a03c9,_0x2f4cd2]=useState(''),[_0x39ec0b,_0x56dc60]=useState(''),[_0x3b0ad1,_0x21cb7c]=useState(''),[_0x50f37a,_0xdf6366]=useState(''),[_0x10f858,_0x365e93]=useState([]),_0x436fa0=_0x366065[_0xa7b436(0xd5)](_0xe70aed=>({'label':_0xe70aed['label'],'path':_0xe70aed['path'],'local':!![],'online':_0x2a3243[_0xa7b436(0xe9)](_0xe70aed[_0xa7b436(0x109)])})),_0x10587a=_0x366065[_0xa7b436(0xd3)](_0x31bc4b=>{const _0x57d999=_0xa7b436;return!_0x2a3243[_0x57d999(0xe9)](_0x31bc4b[_0x57d999(0x109)]);});useEffect(()=>{const _0x179b2a=_0xa7b436;if(!_0x4a542d&&_0x366065[_0x179b2a(0x10c)]>0x0&&_0x11dbb0[_0x179b2a(0x108)]===0x0){const _0x39bbba=new Set(_0x366065[_0x179b2a(0xd5)]((_0x49cbf6,_0x325d3d)=>({'page':_0x49cbf6,'index':_0x325d3d}))[_0x179b2a(0xd3)](({page:_0x2b88de})=>!_0x2a3243[_0x179b2a(0xe9)](_0x2b88de[_0x179b2a(0x109)]))['map'](({index:_0x481dad})=>_0x481dad));_0x3b73d1(_0x39bbba);}},[_0x4a542d,_0x366065[_0xa7b436(0x10c)],_0x2a3243[_0xa7b436(0x10c)]]),useInput(async(_0x6755d0,_0x559034)=>{const _0xa88d2d=_0xa7b436;if(_0x192b63===_0xa88d2d(0xfc)){if(_0x559034[_0xa88d2d(0xfe)]){_0x4d916b(_0x287b8a=>_0x287b8a>0x0?_0x287b8a-0x1:_0x366065[_0xa88d2d(0x10c)]-0x1);return;}if(_0x559034[_0xa88d2d(0xcd)]){_0x4d916b(_0x1024af=>_0x1024af<_0x366065[_0xa88d2d(0x10c)]-0x1?_0x1024af+0x1:0x0);return;}if(_0x6755d0==='\x20'){_0x3b73d1(_0xe73696=>{const _0x1b7fcc=_0xa88d2d,_0x3348fa=new Set(_0xe73696);return _0x3348fa[_0x1b7fcc(0xd4)](_0x5c9fe3)?_0x3348fa[_0x1b7fcc(0x10d)](_0x5c9fe3):_0x3348fa[_0x1b7fcc(0xf7)](_0x5c9fe3),_0x3348fa;});return;}if(_0x6755d0==='a'||_0x6755d0==='A'){const _0x2a4972=new Set(_0x366065[_0xa88d2d(0xd5)]((_0x510c0f,_0x1239f3)=>_0x1239f3));_0x3b73d1(_0x2a4972);return;}if(_0x6755d0==='i'||_0x6755d0==='I'||_0x6755d0==='r'||_0x6755d0==='R'){_0x3b73d1(_0x13457d=>{const _0x1dc6ad=_0xa88d2d,_0x216e48=new Set();for(let _0x3afac5=0x0;_0x3afac5<_0x366065[_0x1dc6ad(0x10c)];_0x3afac5++){!_0x13457d[_0x1dc6ad(0xd4)](_0x3afac5)&&_0x216e48[_0x1dc6ad(0xf7)](_0x3afac5);}return _0x216e48;});return;}if(_0x6755d0==='q'||_0x6755d0==='Q'){_0x4e7373();return;}if(_0x559034[_0xa88d2d(0xe4)]){if(_0x11dbb0['size']===0x0){_0xdf6366(_0xa88d2d(0xf2));return;}const _0x132700=_0x366065[_0xa88d2d(0xd3)]((_0x4feeba,_0x48a3df)=>_0x11dbb0[_0xa88d2d(0xd4)](_0x48a3df)),_0x1d5198=_0x132700[_0xa88d2d(0xd5)](_0x4cf96c=>_0x4cf96c[_0xa88d2d(0xf6)])[_0xa88d2d(0xf1)](',\x20');_0x365e93([{'label':_0xa88d2d(0xdc),'value':_0x11dbb0[_0xa88d2d(0x108)]+'\x20个'}]),_0xdf6366(''),_0x452eaf(_0xa88d2d(0xe1));return;}return;}if(_0x192b63===_0xa88d2d(0xe1)){if(_0x559034[_0xa88d2d(0xe4)]){const _0x3404bd=_0x3b0ad1[_0xa88d2d(0xe5)]();if(_0x3404bd==='')return;if(!isValidJsHttpsUrl(_0x3404bd)){_0xdf6366(_0xa88d2d(0x10f));return;}if(!await isUrlReachable(_0x3404bd)){_0xdf6366(_0xa88d2d(0x112));return;}_0x2f4cd2(_0x3404bd),_0x365e93(_0x1723d8=>[..._0x1723d8,{'label':_0xa88d2d(0xd6),'value':_0x3404bd}]),_0x21cb7c(''),_0xdf6366(''),_0x452eaf(_0xa88d2d(0x107));return;}if(_0x559034['backspace']||_0x559034[_0xa88d2d(0x10d)]){_0x21cb7c(_0x2474da=>_0x2474da[_0xa88d2d(0xe2)](0x0,-0x1)),_0xdf6366('');return;}_0x21cb7c(_0x321f0c=>_0x321f0c+_0x6755d0);return;}if(_0x192b63===_0xa88d2d(0x107)){if(_0x559034[_0xa88d2d(0xe4)]){const _0xce9629=_0x3b0ad1[_0xa88d2d(0xe5)]();if(_0xce9629==='')return;if(!isValidCssHttpsUrl(_0xce9629)){_0xdf6366(_0xa88d2d(0xef));return;}if(!await isUrlReachable(_0xce9629)){_0xdf6366(_0xa88d2d(0xf4));return;}_0x56dc60(_0xce9629),_0x365e93(_0x412f94=>[..._0x412f94,{'label':'CSS\x20链接','value':_0xce9629}]),_0x21cb7c(''),_0xdf6366(''),_0x452eaf(_0xa88d2d(0xf8));const _0x2c47b3=_0x366065['filter']((_0x1dc32f,_0x5ee4b5)=>_0x11dbb0[_0xa88d2d(0xd4)](_0x5ee4b5));createMenus(_0x2c47b3,[_0x1a03c9,_0xce9629])[_0xa88d2d(0xf0)](()=>{_0x452eaf('done'),setTimeout(()=>{_0x4e7373();},0x3e8);})[_0xa88d2d(0xd9)](_0x39a064=>{const _0x7ad05e=_0xa88d2d;_0xdf6366(_0x39a064['message']||_0x7ad05e(0xeb)),_0x452eaf(_0x7ad05e(0xfc));});return;}if(_0x559034[_0xa88d2d(0xea)]||_0x559034[_0xa88d2d(0x10d)]){_0x21cb7c(_0x5bd186=>_0x5bd186[_0xa88d2d(0xe2)](0x0,-0x1)),_0xdf6366('');return;}_0x21cb7c(_0x5c122e=>_0x5c122e+_0x6755d0);return;}});if(_0x4a542d)return a12_0x223c80(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x3c0e3f(Text,{'children':'\x20\x20'}),a12_0x3c0e3f(a12_0x5da55b,{'type':_0xa7b436(0xdf)}),a12_0x3c0e3f(Text,{'children':_0xa7b436(0xe3)})]});if(_0x2e472d)return a12_0x223c80(Box,{'flexDirection':_0xa7b436(0xf3),'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x223c80(Text,{'color':'red','children':['✗\x20',_0x2e472d]}),a12_0x223c80(Box,{'marginTop':0x1,'children':[a12_0x3c0e3f(Text,{'color':_0xa7b436(0xe8),'children':_0xa7b436(0xcc)}),a12_0x3c0e3f(Text,{'color':_0xa7b436(0xd1),'children':_0xa7b436(0xfb)}),a12_0x3c0e3f(Text,{'color':_0xa7b436(0xe8),'children':'\x20命令重新登录'})]})]});if(_0x366065['length']===0x0)return a12_0x3c0e3f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a12_0x3c0e3f(Text,{'color':_0xa7b436(0x113),'children':_0xa7b436(0x10e)})});return a12_0x223c80(Box,{'flexDirection':_0xa7b436(0xf3),'marginTop':0x1,'marginBottom':0x1,'children':[_0x192b63===_0xa7b436(0xfc)&&a12_0x223c80(a12_0x17f464,{'children':[a12_0x223c80(Box,{'children':[a12_0x223c80(Text,{'bold':!![],'children':['\x20\x20',_0xa7b436(0xff),getRemainingSpaces(_0x569c27,_0xa7b436(0xff))]}),a12_0x223c80(Text,{'bold':!![],'children':['本地',getRemainingSpaces(_0x153bad,_0xa7b436(0xff))]}),a12_0x223c80(Text,{'bold':!![],'children':['Lovrabet平台',getRemainingSpaces(_0x153bad,_0xa7b436(0xff))]})]}),_0x436fa0[_0xa7b436(0xd5)](_0x5c8ed2=>a12_0x223c80(Box,{'children':[a12_0x223c80(Text,{'children':['\x20\x20',_0x5c8ed2[_0xa7b436(0xf6)],getRemainingSpaces(_0x569c27,_0x5c8ed2[_0xa7b436(0xf6)])]}),a12_0x223c80(Text,{'color':'green','children':[_0x5c8ed2[_0xa7b436(0x105)]?'✓':'✗',getRemainingSpaces(_0x153bad,'✓')]}),a12_0x223c80(Text,{'color':_0x5c8ed2[_0xa7b436(0x111)]?'green':'red','children':[_0x5c8ed2[_0xa7b436(0x111)]?'✓':'✗',getRemainingSpaces(_0x153bad,'✓')]})]},_0x5c8ed2[_0xa7b436(0x109)]))]}),_0x192b63===_0xa7b436(0xfc)&&_0x10f858[_0xa7b436(0x10c)]===0x0&&a12_0x3c0e3f(Box,{'marginTop':0x1,'children':a12_0x3c0e3f(Text,{'color':_0xa7b436(0xd1),'children':_0xa7b436(0xd0)})}),_0x10f858[_0xa7b436(0xd5)]((_0x346a7b,_0x22a6e0)=>a12_0x223c80(Box,{'children':[a12_0x223c80(Text,{'color':_0xa7b436(0xda),'children':['√\x20',_0x346a7b[_0xa7b436(0xf6)],':\x20']}),a12_0x3c0e3f(Text,{'color':'cyan','children':_0x346a7b[_0xa7b436(0xd7)]})]},_0x22a6e0)),_0x50f37a&&_0x192b63===_0xa7b436(0xfc)&&a12_0x3c0e3f(Box,{'marginTop':0x1,'children':a12_0x223c80(Text,{'color':_0xa7b436(0xd8),'children':['✗\x20',_0x50f37a]})}),_0x192b63===_0xa7b436(0xfc)&&a12_0x3c0e3f(a12_0x17f464,{'children':a12_0x223c80(Box,{'marginTop':_0x10f858[_0xa7b436(0x10c)]>0x0||_0x50f37a?0x1:0x0,'flexDirection':'column','children':[a12_0x3c0e3f(Text,{'bold':!![],'children':_0xa7b436(0xed)}),_0x366065[_0xa7b436(0xd5)]((_0x47a599,_0x295773)=>{const _0x2f0071=_0xa7b436,_0x3fb845=_0x5c9fe3===_0x295773,_0x144933=_0x11dbb0[_0x2f0071(0xd4)](_0x295773),_0x430a20=_0x2a3243[_0x2f0071(0xe9)](_0x47a599['path']),_0x4c1dba=_0x430a20?'更新':'新建';return a12_0x3c0e3f(Box,{'children':a12_0x223c80(Text,{'backgroundColor':_0x3fb845?'blue':undefined,'color':_0x3fb845?_0x2f0071(0x10a):undefined,'children':['\x20\x20',_0x144933?_0x2f0071(0xde):_0x2f0071(0xdb),'\x20',_0x47a599[_0x2f0071(0xf6)]]})},_0x47a599[_0x2f0071(0x109)]);}),a12_0x3c0e3f(Box,{'marginTop':0x1,'children':a12_0x223c80(Text,{'color':_0xa7b436(0xe8),'children':['\x20','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认']})})]})}),_0x192b63===_0xa7b436(0xe1)&&a12_0x223c80(a12_0x17f464,{'children':[a12_0x223c80(Box,{'children':[a12_0x3c0e3f(Text,{'children':_0xa7b436(0x110)}),a12_0x3c0e3f(Text,{'color':_0xa7b436(0xda),'children':_0x3b0ad1}),_0x50f37a&&a12_0x223c80(Text,{'color':_0xa7b436(0xd8),'children':['\x20←\x20',_0x50f37a]})]}),!_0x50f37a&&a12_0x3c0e3f(Box,{'children':a12_0x3c0e3f(Text,{'color':_0xa7b436(0xe8),'children':_0xa7b436(0xdd)})})]}),_0x192b63===_0xa7b436(0x107)&&a12_0x223c80(a12_0x17f464,{'children':[a12_0x223c80(Box,{'children':[a12_0x3c0e3f(Text,{'children':'*\x20CSS\x20链接:\x20'}),a12_0x3c0e3f(Text,{'color':_0xa7b436(0xda),'children':_0x3b0ad1}),_0x50f37a&&a12_0x223c80(Text,{'color':_0xa7b436(0xd8),'children':[_0xa7b436(0x106),_0x50f37a]})]}),!_0x50f37a&&a12_0x3c0e3f(Box,{'children':a12_0x3c0e3f(Text,{'color':'gray','children':_0xa7b436(0x10b)})})]}),_0x192b63===_0xa7b436(0xf8)&&a12_0x3c0e3f(Box,{'children':a12_0x3c0e3f(Text,{'children':_0xa7b436(0xee)})}),_0x192b63===_0xa7b436(0xce)&&a12_0x3c0e3f(Box,{'children':a12_0x3c0e3f(Text,{'color':_0xa7b436(0xda),'children':_0xa7b436(0xf9)})})]});}function getStringWidth(_0x12fe3b){let _0x656f57=0x0;for(const _0x139d7d of _0x12fe3b){/[\u4e00-\u9fa5]/['test'](_0x139d7d)?_0x656f57+=0x2:_0x656f57+=0x1;}return _0x656f57;}function getRemainingSpaces(_0xb1d7d5,_0x4c0f7b){const _0x2de55e=a12_0x2039,_0x299fb6=getStringWidth(_0x4c0f7b);return Array(Math[_0x2de55e(0xe0)](0x0,_0xb1d7d5-_0x299fb6))[_0x2de55e(0xec)]('\x20')[_0x2de55e(0xf1)]('');}function a12_0x2169(){const _0x342194=['white','\x20输入项目的\x20CSS\x20资源链接(https://...)','length','delete','!\x20未找到本地页面,请先创建页面','请输入有效的\x20JS\x20https\x20链接','*\x20JS\x20链接:\x20','online','JS\x20链接无法访问','yellow','提示:使用\x20','downArrow','done','9uHPyve','*\x20同步菜单到\x20Lovrabet\x20平台','cyan','1637SXmzdv','filter','has','map','JS\x20链接','value','red','catch','green','[\x20]','已选择菜单','\x20输入项目的\x20JS\x20资源链接(https://...)','[✓]','dots','max','input-js','slice','\x20正在获取线上菜单列表...','return','trim','189FkzKEl','554508kdWwqg','gray','includes','backspace','创建菜单失败','fill','*\x20请选择要同步的菜单:','*\x20正在创建菜单...','请输入有效的\x20CSS\x20https\x20链接','then','join','请至少选择一个菜单','column','CSS\x20链接无法访问','187926DJHqTX','label','add','creating','√\x20菜单创建完成','10219jBXSQX','lovrabet\x20auth','selecting','19970sXicnD','upArrow','菜单名称','2419035oQezKL','874192YVefNV','repeat','622xkEiPx','798948qouKBu','local','\x20←\x20','input-css','size','path'];a12_0x2169=function(){return _0x342194;};return a12_0x2169();}function getMaxWidth(_0x13a455,_0x145b42=0x2){const _0x4e8329=a12_0x2039;let _0x30acd8='',_0x57cd2d=0x0;for(const _0x1cf13d of _0x13a455){const _0x4c0cf8=getStringWidth(_0x1cf13d);_0x4c0cf8>_0x57cd2d&&(_0x57cd2d=_0x4c0cf8,_0x30acd8=_0x1cf13d);}return _0x30acd8+'\x20'[_0x4e8329(0x102)](_0x145b42);}
@@ -1 +1 @@
1
- (function(_0x1b9f61,_0x1967c1){const _0x407761=a13_0x2ba9,_0x2457c8=_0x1b9f61();while(!![]){try{const _0x4ddce9=-parseInt(_0x407761(0x18d))/0x1*(-parseInt(_0x407761(0x184))/0x2)+parseInt(_0x407761(0x17b))/0x3*(-parseInt(_0x407761(0x178))/0x4)+parseInt(_0x407761(0x16b))/0x5+parseInt(_0x407761(0x18f))/0x6*(-parseInt(_0x407761(0x17a))/0x7)+-parseInt(_0x407761(0x171))/0x8+parseInt(_0x407761(0x172))/0x9+-parseInt(_0x407761(0x192))/0xa*(-parseInt(_0x407761(0x189))/0xb);if(_0x4ddce9===_0x1967c1)break;else _0x2457c8['push'](_0x2457c8['shift']());}catch(_0x136248){_0x2457c8['push'](_0x2457c8['shift']());}}}(a13_0x5c13,0x36cdb));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a13_0x2ba9(_0x34b09e,_0x87248d){_0x34b09e=_0x34b09e-0x169;const _0x5c13a4=a13_0x5c13();let _0x2ba91f=_0x5c13a4[_0x34b09e];return _0x2ba91f;}import{logger}from'../utils/logger.js';const config=readConfig();function a13_0x5c13(){const _0x375136=['POST','success','data','procode','72244Rkvxmc','菜单创建成功:\x20','create-menus','创建菜单失败,HTTP状态码:\x20','path','1223156jZHdqn','json','info','import','4aTuyyU','includes','288ITrfmC','未知错误','log','10gyhCgC','stringify','resources','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','status','!\x20请使用以下方式之一:','创建菜单成功:','2128005UyyNSD','创建菜单失败:\x20','application/json','create-menu','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','3446008GIWHGv','741969XgOimh','errorCode','未提供应用AppCode,且配置中也没有默认值','/smartapi/menu/create','0011','label','8cvzciI','errorMsg','2079jeXVTe','141366LHnQPW','error','appcode','map','all'];a13_0x5c13=function(){return _0x375136;};return a13_0x5c13();}export async function createMenu(_0x205b38){const _0x314683=a13_0x2ba9,_0x315d81=config?.[_0x314683(0x17d)];if(!_0x315d81){const _0x2067f0='未提供应用AppCode,且配置中也没有默认值';logger[_0x314683(0x17c)](_0x314683(0x16e),_0x2067f0),console[_0x314683(0x17c)]('×\x20'+_0x2067f0),console['log'](_0x314683(0x169)),console['log']('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console[_0x314683(0x191)](_0x314683(0x16f));return;}logger[_0x314683(0x18b)](_0x314683(0x16e),'正在创建菜单:\x20'+_0x205b38[_0x314683(0x177)]+'\x20('+_0x205b38[_0x314683(0x188)]+')');const _0x55c476={'appCode':_0x315d81,'type':_0x314683(0x183),'sort':0x0,'extend':{'loadScriptMode':_0x314683(0x18c),'resources':_0x205b38['resources']?JSON['stringify'](_0x205b38[_0x314683(0x194)]):undefined},..._0x205b38},_0x10ec6a=await fetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x314683(0x180),'body':JSON[_0x314683(0x193)](_0x55c476),'headers':{'Content-Type':_0x314683(0x16d),'Cookie':getCookie()}});if(!_0x10ec6a['ok']){if(_0x10ec6a['status']===0x191){const _0x168171=_0x314683(0x170);logger[_0x314683(0x17c)](_0x314683(0x16e),_0x168171,{'status':_0x10ec6a[_0x314683(0x196)],'menu':_0x205b38[_0x314683(0x177)]});throw new Error(_0x168171);}const _0x577f2f=_0x314683(0x187)+_0x10ec6a[_0x314683(0x196)];logger[_0x314683(0x17c)](_0x314683(0x16e),_0x577f2f,{'menu':_0x205b38['label']});throw new Error(_0x577f2f);}const _0x564923=await _0x10ec6a[_0x314683(0x18a)]();if(!_0x564923[_0x314683(0x181)]){const _0x46169c=_0x314683(0x16c)+(_0x564923['errorMsg']||_0x314683(0x190));logger['error'](_0x314683(0x16e),_0x46169c,{'errorCode':_0x564923[_0x314683(0x173)],'errorMsg':_0x564923['errorMsg'],'menu':_0x205b38[_0x314683(0x177)]});throw new Error(_0x46169c);}logger[_0x314683(0x18b)](_0x314683(0x16e),_0x314683(0x185)+_0x205b38['label'],_0x564923[_0x314683(0x182)]),console[_0x314683(0x191)](_0x314683(0x16a),_0x564923['data']);}async function _createMenu(_0x3fc9a4,_0x4f7421){const _0x3771c9=a13_0x2ba9,_0x4e8fd4=config?.[_0x3771c9(0x17d)];if(!_0x4e8fd4){const _0x55f6a2=_0x3771c9(0x174);logger[_0x3771c9(0x17c)](_0x3771c9(0x16e),_0x55f6a2),console[_0x3771c9(0x17c)]('×\x20'+_0x55f6a2),console[_0x3771c9(0x191)](_0x3771c9(0x169)),console['log']('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console[_0x3771c9(0x191)](_0x3771c9(0x16f));return;}const _0x371ce6={'appCode':_0x4e8fd4,'type':_0x3771c9(0x183),'sort':0x0,'extend':{'loadScriptMode':_0x3771c9(0x18c),'resources':_0x4f7421?JSON[_0x3771c9(0x193)](_0x4f7421):undefined},'label':_0x3fc9a4[_0x3771c9(0x177)],'path':_0x3fc9a4[_0x3771c9(0x188)]},_0x44f040=await fetch(getApiDomain()+_0x3771c9(0x175),{'method':'POST','body':JSON['stringify'](_0x371ce6),'headers':{'Content-Type':_0x3771c9(0x16d),'Cookie':getCookie()}});if(!_0x44f040['ok']){if(_0x44f040['status']===0x191){const _0x5f8178='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger['error']('create-menu',_0x5f8178,{'status':_0x44f040[_0x3771c9(0x196)],'menu':_0x3fc9a4['label']});throw new Error(_0x5f8178);}const _0x33fbb7=_0x3771c9(0x187)+_0x44f040[_0x3771c9(0x196)];logger[_0x3771c9(0x17c)](_0x3771c9(0x16e),_0x33fbb7,{'menu':_0x3fc9a4[_0x3771c9(0x177)]});throw new Error(_0x33fbb7);}const _0x14dac4=await _0x44f040['json']();if(!_0x14dac4[_0x3771c9(0x181)]){if(_0x14dac4[_0x3771c9(0x173)]===_0x3771c9(0x176)||_0x14dac4['errorMsg']?.[_0x3771c9(0x18e)]('登录')){const _0x1d3680=_0x3771c9(0x195);logger[_0x3771c9(0x17c)](_0x3771c9(0x16e),_0x1d3680,{'errorCode':_0x14dac4[_0x3771c9(0x173)],'errorMsg':_0x14dac4[_0x3771c9(0x179)],'menu':_0x3fc9a4[_0x3771c9(0x177)]});throw new Error(_0x1d3680);}const _0x222e1f=_0x3771c9(0x16c)+(_0x14dac4['errorMsg']||'未知错误');logger['error'](_0x3771c9(0x16e),_0x222e1f,{'errorCode':_0x14dac4[_0x3771c9(0x173)],'errorMsg':_0x14dac4['errorMsg'],'menu':_0x3fc9a4['label']});throw new Error(_0x222e1f);}logger['info']('create-menu','菜单创建成功:\x20'+_0x3fc9a4[_0x3771c9(0x177)]);}export async function createMenus(_0x32b0e6,_0x542890){const _0x2463bb=a13_0x2ba9;logger['info'](_0x2463bb(0x186),'开始批量创建菜单,共\x20'+_0x32b0e6['length']+'\x20个'),await Promise[_0x2463bb(0x17f)](_0x32b0e6[_0x2463bb(0x17e)](async _0x5a3bec=>{await _createMenu(_0x5a3bec,_0x542890);})),logger[_0x2463bb(0x18b)](_0x2463bb(0x186),'批量创建菜单完成,共\x20'+_0x32b0e6['length']+'\x20个');}
1
+ function a13_0x4930(){const _0x39b16b=['批量创建菜单完成,共\x20','import','426340hijYqJ','9koGCFs','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','菜单创建成功:\x20','255283yiadQf','all','正在创建菜单:\x20','create-menus','0011','2xMeZyh','未知错误','创建菜单失败:\x20','path','length','json','application/json','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','stringify','31665geKVRZ','未提供应用AppCode,且配置中也没有默认值','创建菜单成功:','map','创建菜单失败,HTTP状态码:\x20','data','594710MFvCCf','287106moKvlR','10lvJAta','status','!\x20请使用以下方式之一:','log','/smartapi/menu/create','appcode','errorMsg','POST','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','procode','开始批量创建菜单,共\x20','error','success','info','errorCode','label','resources','includes','164582Geagnt','407168hvqviw','create-menu'];a13_0x4930=function(){return _0x39b16b;};return a13_0x4930();}function a13_0x54cf(_0x22ac6a,_0x42a18b){_0x22ac6a=_0x22ac6a-0x107;const _0x49304f=a13_0x4930();let _0x54cf31=_0x49304f[_0x22ac6a];return _0x54cf31;}(function(_0x2f3ed6,_0x2e15d7){const _0x1aec89=a13_0x54cf,_0x56e7ab=_0x2f3ed6();while(!![]){try{const _0x408c17=parseInt(_0x1aec89(0x130))/0x1*(-parseInt(_0x1aec89(0x122))/0x2)+-parseInt(_0x1aec89(0x108))/0x3+parseInt(_0x1aec89(0x127))/0x4+-parseInt(_0x1aec89(0x110))/0x5*(-parseInt(_0x1aec89(0x10f))/0x6)+-parseInt(_0x1aec89(0x12b))/0x7+parseInt(_0x1aec89(0x123))/0x8+parseInt(_0x1aec89(0x128))/0x9*(parseInt(_0x1aec89(0x10e))/0xa);if(_0x408c17===_0x2e15d7)break;else _0x56e7ab['push'](_0x56e7ab['shift']());}catch(_0x31ed11){_0x56e7ab['push'](_0x56e7ab['shift']());}}}(a13_0x4930,0x18ab8));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();export async function createMenu(_0x28c65a){const _0x34428b=a13_0x54cf,_0x203566=config?.[_0x34428b(0x115)];if(!_0x203566){const _0x5e7a62=_0x34428b(0x109);logger['error']('create-menu',_0x5e7a62),console['error']('×\x20'+_0x5e7a62),console[_0x34428b(0x113)](_0x34428b(0x112)),console[_0x34428b(0x113)](_0x34428b(0x129)),console[_0x34428b(0x113)](_0x34428b(0x118));return;}logger[_0x34428b(0x11d)](_0x34428b(0x124),_0x34428b(0x12d)+_0x28c65a[_0x34428b(0x11f)]+'\x20('+_0x28c65a[_0x34428b(0x133)]+')');const _0x10ab6c={'appCode':_0x203566,'type':_0x34428b(0x119),'sort':0x0,'extend':{'loadScriptMode':_0x34428b(0x126),'resources':_0x28c65a[_0x34428b(0x120)]?JSON[_0x34428b(0x107)](_0x28c65a[_0x34428b(0x120)]):undefined},..._0x28c65a},_0x1781a6=await fetch(getApiDomain()+_0x34428b(0x114),{'method':_0x34428b(0x117),'body':JSON['stringify'](_0x10ab6c),'headers':{'Content-Type':_0x34428b(0x136),'Cookie':getCookie()}});if(!_0x1781a6['ok']){if(_0x1781a6[_0x34428b(0x111)]===0x191){const _0x22796e='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x34428b(0x11b)](_0x34428b(0x124),_0x22796e,{'status':_0x1781a6[_0x34428b(0x111)],'menu':_0x28c65a[_0x34428b(0x11f)]});throw new Error(_0x22796e);}const _0x25d5c9=_0x34428b(0x10c)+_0x1781a6[_0x34428b(0x111)];logger[_0x34428b(0x11b)](_0x34428b(0x124),_0x25d5c9,{'menu':_0x28c65a[_0x34428b(0x11f)]});throw new Error(_0x25d5c9);}const _0x52a990=await _0x1781a6[_0x34428b(0x135)]();if(!_0x52a990[_0x34428b(0x11c)]){const _0x1aeb1e=_0x34428b(0x132)+(_0x52a990['errorMsg']||_0x34428b(0x131));logger[_0x34428b(0x11b)]('create-menu',_0x1aeb1e,{'errorCode':_0x52a990[_0x34428b(0x11e)],'errorMsg':_0x52a990['errorMsg'],'menu':_0x28c65a[_0x34428b(0x11f)]});throw new Error(_0x1aeb1e);}logger[_0x34428b(0x11d)](_0x34428b(0x124),_0x34428b(0x12a)+_0x28c65a[_0x34428b(0x11f)],_0x52a990[_0x34428b(0x10d)]),console['log'](_0x34428b(0x10a),_0x52a990[_0x34428b(0x10d)]);}async function _createMenu(_0x13dcd4,_0x1542af){const _0x3c544d=a13_0x54cf,_0x312e2e=config?.[_0x3c544d(0x115)];if(!_0x312e2e){const _0x1f66bb=_0x3c544d(0x109);logger[_0x3c544d(0x11b)](_0x3c544d(0x124),_0x1f66bb),console[_0x3c544d(0x11b)]('×\x20'+_0x1f66bb),console['log'](_0x3c544d(0x112)),console[_0x3c544d(0x113)](_0x3c544d(0x129)),console[_0x3c544d(0x113)](_0x3c544d(0x118));return;}const _0x10f168={'appCode':_0x312e2e,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x3c544d(0x126),'resources':_0x1542af?JSON['stringify'](_0x1542af):undefined},'label':_0x13dcd4['label'],'path':_0x13dcd4[_0x3c544d(0x133)]},_0x4f68a9=await fetch(getApiDomain()+_0x3c544d(0x114),{'method':_0x3c544d(0x117),'body':JSON[_0x3c544d(0x107)](_0x10f168),'headers':{'Content-Type':_0x3c544d(0x136),'Cookie':getCookie()}});if(!_0x4f68a9['ok']){if(_0x4f68a9[_0x3c544d(0x111)]===0x191){const _0x174876=_0x3c544d(0x137);logger[_0x3c544d(0x11b)](_0x3c544d(0x124),_0x174876,{'status':_0x4f68a9[_0x3c544d(0x111)],'menu':_0x13dcd4['label']});throw new Error(_0x174876);}const _0x349dd0=_0x3c544d(0x10c)+_0x4f68a9[_0x3c544d(0x111)];logger[_0x3c544d(0x11b)](_0x3c544d(0x124),_0x349dd0,{'menu':_0x13dcd4['label']});throw new Error(_0x349dd0);}const _0x4f0069=await _0x4f68a9[_0x3c544d(0x135)]();if(!_0x4f0069[_0x3c544d(0x11c)]){if(_0x4f0069[_0x3c544d(0x11e)]===_0x3c544d(0x12f)||_0x4f0069[_0x3c544d(0x116)]?.[_0x3c544d(0x121)]('登录')){const _0x5aa2d8='登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x3c544d(0x11b)](_0x3c544d(0x124),_0x5aa2d8,{'errorCode':_0x4f0069[_0x3c544d(0x11e)],'errorMsg':_0x4f0069['errorMsg'],'menu':_0x13dcd4['label']});throw new Error(_0x5aa2d8);}const _0x1127b3=_0x3c544d(0x132)+(_0x4f0069[_0x3c544d(0x116)]||'未知错误');logger['error']('create-menu',_0x1127b3,{'errorCode':_0x4f0069[_0x3c544d(0x11e)],'errorMsg':_0x4f0069['errorMsg'],'menu':_0x13dcd4[_0x3c544d(0x11f)]});throw new Error(_0x1127b3);}logger[_0x3c544d(0x11d)]('create-menu',_0x3c544d(0x12a)+_0x13dcd4['label']);}export async function createMenus(_0x349899,_0x283360){const _0x302152=a13_0x54cf;logger['info'](_0x302152(0x12e),_0x302152(0x11a)+_0x349899[_0x302152(0x134)]+'\x20个'),await Promise[_0x302152(0x12c)](_0x349899[_0x302152(0x10b)](async _0x2a6929=>{await _createMenu(_0x2a6929,_0x283360);})),logger[_0x302152(0x11d)](_0x302152(0x12e),_0x302152(0x125)+_0x349899[_0x302152(0x134)]+'\x20个');}
@@ -1 +1 @@
1
- const a14_0x44e7c3=a14_0x3509;(function(_0x33ade9,_0x1170c0){const _0x7b8e=a14_0x3509,_0x4a2559=_0x33ade9();while(!![]){try{const _0x4f2827=parseInt(_0x7b8e(0x161))/0x1*(-parseInt(_0x7b8e(0x162))/0x2)+-parseInt(_0x7b8e(0x16f))/0x3+parseInt(_0x7b8e(0x173))/0x4+parseInt(_0x7b8e(0x16b))/0x5+parseInt(_0x7b8e(0x15e))/0x6+-parseInt(_0x7b8e(0x15c))/0x7*(-parseInt(_0x7b8e(0x172))/0x8)+parseInt(_0x7b8e(0x16d))/0x9;if(_0x4f2827===_0x1170c0)break;else _0x4a2559['push'](_0x4a2559['shift']());}catch(_0x9d1dd9){_0x4a2559['push'](_0x4a2559['shift']());}}}(a14_0x1a5c,0x59cdc));import{readdirSync,statSync,readFileSync}from'fs';function a14_0x3509(_0x1f164c,_0x387e98){_0x1f164c=_0x1f164c-0x15c;const _0x1a5cac=a14_0x1a5c();let _0x3509ab=_0x1a5cac[_0x1f164c];return _0x3509ab;}function a14_0x1a5c(){const _0x5c75e3=['33041CutqVs','34ywBGVh','endsWith','match','concat','replace','cwd','isDirectory','path','trim','1656780lRJMeF','index.tsx','195417oVPzTW','replaceAll','474726NuxKiY','src/pages','slice','618648agAaQq','1380796QNSobe','14XgIOhs','filter','1409070TBNngj','push','.tsx'];a14_0x1a5c=function(){return _0x5c75e3;};return a14_0x1a5c();}import{join,relative,resolve}from'path';const pagesDir=resolve(process[a14_0x44e7c3(0x167)](),a14_0x44e7c3(0x170));export function extractTitleFromComment(_0x2758de){const _0x259ecf=a14_0x44e7c3;try{const _0xbacf22=readFileSync(_0x2758de,'utf-8'),_0x388cc9=_0xbacf22[_0x259ecf(0x164)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x388cc9&&_0x388cc9[0x1]){const _0x152d45=_0x388cc9[0x1],_0x4901a4=_0x152d45[_0x259ecf(0x164)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x4901a4&&_0x4901a4[0x1])return _0x4901a4[0x1][_0x259ecf(0x16a)]();}let _0x2f8843=null;const _0x3bb644=_0xbacf22['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x3bb644&&_0x3bb644[0x1]&&(_0x2f8843=_0x3bb644[0x1]);if(!_0x2f8843){const _0x586b35=_0xbacf22[_0x259ecf(0x164)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x586b35&&_0x586b35[0x1]&&(_0x2f8843=_0x586b35[0x1]);}if(_0x2f8843){const _0x598d93=new RegExp('\x5cb'+_0x2f8843+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x210726=_0xbacf22['match'](_0x598d93);if(_0x210726&&_0x210726[0x1])return _0x210726[0x1];return _0x2f8843;}return null;}catch(_0x2cf63c){return null;}}export function getLocalPages(_0x31371c=pagesDir,_0x18efce=pagesDir){const _0x33ce43=a14_0x44e7c3;let _0x331346=[];const _0x1e0e29=readdirSync(_0x31371c);return _0x1e0e29['forEach'](_0x421af5=>{const _0x2d5954=a14_0x3509,_0x1ac20b=join(_0x31371c,_0x421af5),_0x1e3823=statSync(_0x1ac20b);if(_0x1e3823&&_0x1e3823[_0x2d5954(0x168)]())_0x331346=_0x331346[_0x2d5954(0x165)](getLocalPages(_0x1ac20b,_0x18efce));else{if(_0x421af5[_0x2d5954(0x163)](_0x2d5954(0x160))){let _0x51b364=relative(_0x18efce,_0x1ac20b);_0x51b364[_0x2d5954(0x163)](_0x2d5954(0x16c))?_0x51b364=_0x51b364['replace'](/index\.tsx$/,''):_0x51b364=_0x51b364[_0x2d5954(0x166)](/\.tsx$/,'');_0x51b364[_0x2d5954(0x163)]('/')&&(_0x51b364=_0x51b364[_0x2d5954(0x171)](0x0,-0x1));const _0x1b432=extractTitleFromComment(_0x1ac20b),_0x1b0e70=_0x1b432||_0x51b364;_0x331346[_0x2d5954(0x15f)]({'path':_0x51b364[_0x2d5954(0x16e)]('$',':'),'label':_0x1b0e70});}}}),_0x331346[_0x33ce43(0x15d)](_0xc77ccc=>_0xc77ccc[_0x33ce43(0x169)]!=='');}
1
+ const a14_0x4eac23=a14_0x641b;(function(_0x21f61c,_0x1aadef){const _0x393eea=a14_0x641b,_0x3d0c42=_0x21f61c();while(!![]){try{const _0x208d5e=-parseInt(_0x393eea(0x1df))/0x1*(-parseInt(_0x393eea(0x1dd))/0x2)+-parseInt(_0x393eea(0x1de))/0x3*(-parseInt(_0x393eea(0x1dc))/0x4)+parseInt(_0x393eea(0x1e1))/0x5*(parseInt(_0x393eea(0x1d9))/0x6)+-parseInt(_0x393eea(0x1c9))/0x7*(parseInt(_0x393eea(0x1cf))/0x8)+-parseInt(_0x393eea(0x1cd))/0x9+-parseInt(_0x393eea(0x1d6))/0xa*(parseInt(_0x393eea(0x1c8))/0xb)+-parseInt(_0x393eea(0x1ca))/0xc*(-parseInt(_0x393eea(0x1d7))/0xd);if(_0x208d5e===_0x1aadef)break;else _0x3d0c42['push'](_0x3d0c42['shift']());}catch(_0x3e9492){_0x3d0c42['push'](_0x3d0c42['shift']());}}}(a14_0x5c55,0x6f700));function a14_0x5c55(){const _0x516093=['685feNCdG','filter','5ZVEckR','utf-8','isDirectory','index.tsx','replaceAll','11rWHuvS','259XFXFhl','744324AlDEJP','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','endsWith','1268640bgAPlh','.tsx','138584QoIIWQ','match','concat','replace','push','forEach','cwd','6028910ETdDsy','169mFtEfX','path','1350354baaJnD','slice','src/pages','15000XXOadO','1828IBxgGO','147SlIpLc'];a14_0x5c55=function(){return _0x516093;};return a14_0x5c55();}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a14_0x4eac23(0x1d5)](),a14_0x4eac23(0x1db));function a14_0x641b(_0x253f25,_0x1a0737){_0x253f25=_0x253f25-0x1c6;const _0x5c5582=a14_0x5c55();let _0x641bc1=_0x5c5582[_0x253f25];return _0x641bc1;}export function extractTitleFromComment(_0x2d55f7){const _0x4adf79=a14_0x4eac23;try{const _0x4416bf=readFileSync(_0x2d55f7,_0x4adf79(0x1e2)),_0x26367e=_0x4416bf[_0x4adf79(0x1d0)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x26367e&&_0x26367e[0x1]){const _0x3f81da=_0x26367e[0x1],_0x301ece=_0x3f81da[_0x4adf79(0x1d0)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x301ece&&_0x301ece[0x1])return _0x301ece[0x1]['trim']();}let _0x4019cb=null;const _0x498ac7=_0x4416bf['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x498ac7&&_0x498ac7[0x1]&&(_0x4019cb=_0x498ac7[0x1]);if(!_0x4019cb){const _0x51ce6c=_0x4416bf['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x51ce6c&&_0x51ce6c[0x1]&&(_0x4019cb=_0x51ce6c[0x1]);}if(_0x4019cb){const _0x79239a=new RegExp('\x5cb'+_0x4019cb+_0x4adf79(0x1cb)),_0x365767=_0x4416bf[_0x4adf79(0x1d0)](_0x79239a);if(_0x365767&&_0x365767[0x1])return _0x365767[0x1];return _0x4019cb;}return null;}catch(_0x13bdd5){return null;}}export function getLocalPages(_0x52b6d9=pagesDir,_0x5ca6a5=pagesDir){const _0x30f40d=a14_0x4eac23;let _0x516f30=[];const _0x224a62=readdirSync(_0x52b6d9);return _0x224a62[_0x30f40d(0x1d4)](_0xb3a3b7=>{const _0x5827c1=_0x30f40d,_0x8d2b68=join(_0x52b6d9,_0xb3a3b7),_0x41ca1b=statSync(_0x8d2b68);if(_0x41ca1b&&_0x41ca1b[_0x5827c1(0x1e3)]())_0x516f30=_0x516f30[_0x5827c1(0x1d1)](getLocalPages(_0x8d2b68,_0x5ca6a5));else{if(_0xb3a3b7[_0x5827c1(0x1cc)](_0x5827c1(0x1ce))){let _0x5315fd=relative(_0x5ca6a5,_0x8d2b68);_0x5315fd['endsWith'](_0x5827c1(0x1c6))?_0x5315fd=_0x5315fd[_0x5827c1(0x1d2)](/index\.tsx$/,''):_0x5315fd=_0x5315fd['replace'](/\.tsx$/,'');_0x5315fd[_0x5827c1(0x1cc)]('/')&&(_0x5315fd=_0x5315fd[_0x5827c1(0x1da)](0x0,-0x1));const _0x362d0f=extractTitleFromComment(_0x8d2b68),_0x1d9db1=_0x362d0f||_0x5315fd;_0x516f30[_0x5827c1(0x1d3)]({'path':_0x5315fd[_0x5827c1(0x1c7)]('$',':'),'label':_0x1d9db1});}}}),_0x516f30[_0x30f40d(0x1e0)](_0x248fc1=>_0x248fc1[_0x30f40d(0x1d8)]!=='');}
@@ -1 +1 @@
1
- (function(_0xbb07bd,_0x2ff0f0){const _0x296106=a15_0x4155,_0x77aec=_0xbb07bd();while(!![]){try{const _0x244bca=-parseInt(_0x296106(0x80))/0x1*(parseInt(_0x296106(0xa4))/0x2)+parseInt(_0x296106(0x83))/0x3+-parseInt(_0x296106(0x8f))/0x4*(parseInt(_0x296106(0x96))/0x5)+parseInt(_0x296106(0x8c))/0x6*(-parseInt(_0x296106(0x82))/0x7)+-parseInt(_0x296106(0x7e))/0x8*(parseInt(_0x296106(0x9c))/0x9)+parseInt(_0x296106(0x9f))/0xa*(-parseInt(_0x296106(0x8a))/0xb)+parseInt(_0x296106(0x95))/0xc;if(_0x244bca===_0x2ff0f0)break;else _0x77aec['push'](_0x77aec['shift']());}catch(_0x2f5fb4){_0x77aec['push'](_0x77aec['shift']());}}}(a15_0x1685,0x4df2e));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 a15_0x4155(_0x4df940,_0x52aeba){_0x4df940=_0x4df940-0x7b;const _0x1685e6=a15_0x1685();let _0x4155d8=_0x1685e6[_0x4df940];return _0x4155d8;}export async function getOnlineMenuList(){const _0x12d799=a15_0x4155,_0x1f288c=config?.[_0x12d799(0x94)];if(!_0x1f288c){const _0x495830='未提供应用AppCode,且配置中也没有默认值';return logger[_0x12d799(0x87)](_0x12d799(0x8b),_0x495830),console[_0x12d799(0x87)]('×\x20'+_0x495830),console[_0x12d799(0xa0)]('!\x20请使用以下方式之一:'),console[_0x12d799(0xa0)](_0x12d799(0x8e)),console[_0x12d799(0xa0)](_0x12d799(0x8d)),[];}logger['info']('get-online-menu-list','正在获取线上菜单列表...\x20(appCode:\x20'+_0x1f288c+')');const _0x464114=await fetch(getApiDomain()+_0x12d799(0x88)+_0x1f288c,{'method':_0x12d799(0x7b),'headers':{'Content-Type':_0x12d799(0x7f),'Cookie':getCookie()}});if(!_0x464114['ok']){if(_0x464114[_0x12d799(0x93)]===0x191){const _0x3224ec=_0x12d799(0x86);logger[_0x12d799(0x87)](_0x12d799(0x8b),_0x3224ec,{'status':_0x464114['status']});throw new Error(_0x3224ec);}const _0x2d6e8b=_0x12d799(0x7d)+_0x464114[_0x12d799(0x93)];logger['error'](_0x12d799(0x8b),_0x2d6e8b);throw new Error(_0x2d6e8b);}const _0x4009a1=await _0x464114['json']();if(!_0x4009a1[_0x12d799(0x91)]){const _0x223aed=_0x12d799(0x98)+(_0x4009a1[_0x12d799(0x9d)]||_0x12d799(0x97));logger[_0x12d799(0x87)](_0x12d799(0x8b),_0x223aed,{'errorCode':_0x4009a1[_0x12d799(0xa2)],'errorMsg':_0x4009a1['errorMsg']});throw new Error(_0x223aed);}if(!_0x4009a1['data'])return logger['info'](_0x12d799(0x8b),_0x12d799(0x90)),[];return logger[_0x12d799(0x99)](_0x12d799(0x8b),'成功获取\x20'+_0x4009a1[_0x12d799(0x89)][_0x12d799(0x85)]+_0x12d799(0x7c)),_0x4009a1[_0x12d799(0x89)][_0x12d799(0x81)](formatMenuList)['flat']();}function formatMenuList(_0x22ae1d){const _0x2e10c3=a15_0x4155;let _0x1e8aa3=[];try{if(_0x22ae1d[_0x2e10c3(0x92)]?.[_0x2e10c3(0x9a)]){const _0x115581=JSON[_0x2e10c3(0xa1)](_0x22ae1d['extend'][_0x2e10c3(0x9a)]);Array[_0x2e10c3(0x9b)](_0x115581)&&(_0x1e8aa3=_0x115581);}}catch(_0x2b8e69){}const _0x155f22=[{'id':_0x22ae1d['id'],'path':_0x22ae1d['path'],'label':_0x22ae1d[_0x2e10c3(0x84)],'resources':_0x1e8aa3}];if(_0x22ae1d[_0x2e10c3(0x9e)]&&_0x22ae1d['children']['length']>0x0)for(const _0xc47eb4 of _0x22ae1d[_0x2e10c3(0x9e)]){_0x155f22[_0x2e10c3(0xa3)](...formatMenuList(_0xc47eb4));}return _0x155f22;}function a15_0x1685(){const _0x39207f=['push','3734RVpQTO','GET','\x20个线上菜单','获取菜单列表失败,HTTP状态码:\x20','522904UjrHls','application/json','172mUzruA','map','329DNuKdy','269223qmvtib','label','length','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','error','/smartapi/menu/find?appCode=','data','2118787mzgvHA','get-online-menu-list','41658EyQgQN','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','140RgPINr','服务端返回空菜单列表','success','extend','status','appcode','21261804RyHDoH','54125NYiafU','未知错误','获取菜单列表失败:\x20','info','resources','isArray','18WfrGmq','errorMsg','children','20MgyuAL','log','parse','errorCode'];a15_0x1685=function(){return _0x39207f;};return a15_0x1685();}
1
+ (function(_0xeb21d1,_0xd83e0a){const _0x1a86f1=a15_0x2b4b,_0x511875=_0xeb21d1();while(!![]){try{const _0x2e7558=-parseInt(_0x1a86f1(0x114))/0x1*(-parseInt(_0x1a86f1(0x119))/0x2)+parseInt(_0x1a86f1(0x12f))/0x3*(-parseInt(_0x1a86f1(0x120))/0x4)+-parseInt(_0x1a86f1(0x11f))/0x5+parseInt(_0x1a86f1(0x135))/0x6+parseInt(_0x1a86f1(0x128))/0x7*(parseInt(_0x1a86f1(0x134))/0x8)+-parseInt(_0x1a86f1(0x125))/0x9+-parseInt(_0x1a86f1(0x12b))/0xa;if(_0x2e7558===_0xd83e0a)break;else _0x511875['push'](_0x511875['shift']());}catch(_0x1912b7){_0x511875['push'](_0x511875['shift']());}}}(a15_0x4d81,0x576bf));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a15_0x4d81(){const _0x440b5a=['push','error','7NyLujL','get-online-menu-list','errorCode','5625450DTtmIh','flat','获取菜单列表失败,HTTP状态码:\x20','未提供应用AppCode,且配置中也没有默认值','51VYSQHZ','log','application/json','children','resources','4251032LhEwvu','3436050RgUJKQ','\x20个线上菜单','json','成功获取\x20','6bjeEam','length','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','appcode','online','229012McdZyr','data','info','errorMsg','isArray','extend','2257345bxlcEu','34708FoOClp','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','未知错误','正在获取线上菜单列表...\x20(appCode:\x20','map','2443392rNQwHd'];a15_0x4d81=function(){return _0x440b5a;};return a15_0x4d81();}import{readConfig}from'../utils/config.js';function a15_0x2b4b(_0x592cf3,_0x1c281d){_0x592cf3=_0x592cf3-0x111;const _0x4d81dd=a15_0x4d81();let _0x2b4bd8=_0x4d81dd[_0x592cf3];return _0x2b4bd8;}import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';const config=readConfig();export async function getOnlineMenuList(){const _0xc50753=a15_0x2b4b,_0x48c8c5=config?.[_0xc50753(0x117)];if(!_0x48c8c5){const _0x320d4b=_0xc50753(0x12e);return logger['error']('get-online-menu-list',_0x320d4b),console['error']('×\x20'+_0x320d4b),console['log']('!\x20请使用以下方式之一:'),console[_0xc50753(0x130)](_0xc50753(0x121)),console[_0xc50753(0x130)](_0xc50753(0x116)),[];}const _0x1bde8e=getEnv();logger[_0xc50753(0x11b)]('get-online-menu-list',_0x1bde8e===_0xc50753(0x118)?_0xc50753(0x123)+_0x48c8c5+')':'正在获取日常菜单列表...\x20(appCode:\x20'+_0x48c8c5+')');const _0x8d421b=await fetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x48c8c5,{'method':'GET','headers':{'Content-Type':_0xc50753(0x131),'Cookie':getCookie()}});if(!_0x8d421b['ok']){if(_0x8d421b['status']===0x191){const _0x4862a2='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger['error']('get-online-menu-list',_0x4862a2,{'status':_0x8d421b['status']});throw new Error(_0x4862a2);}const _0x2a29b4=_0xc50753(0x12d)+_0x8d421b['status'];logger['error']('get-online-menu-list',_0x2a29b4);throw new Error(_0x2a29b4);}const _0x9f9440=await _0x8d421b[_0xc50753(0x112)]();if(!_0x9f9440['success']){const _0x34e26d='获取菜单列表失败:\x20'+(_0x9f9440['errorMsg']||_0xc50753(0x122));logger[_0xc50753(0x127)](_0xc50753(0x129),_0x34e26d,{'errorCode':_0x9f9440[_0xc50753(0x12a)],'errorMsg':_0x9f9440[_0xc50753(0x11c)]});throw new Error(_0x34e26d);}if(!_0x9f9440['data'])return logger[_0xc50753(0x11b)]('get-online-menu-list','服务端返回空菜单列表'),[];return logger['info']('get-online-menu-list',_0xc50753(0x113)+_0x9f9440['data']['length']+_0xc50753(0x111)),_0x9f9440[_0xc50753(0x11a)][_0xc50753(0x124)](formatMenuList)[_0xc50753(0x12c)]();}function formatMenuList(_0x3ba590){const _0x9d5296=a15_0x2b4b;let _0x3dc2cb=[];try{if(_0x3ba590[_0x9d5296(0x11e)]?.[_0x9d5296(0x133)]){const _0x5aa076=JSON['parse'](_0x3ba590[_0x9d5296(0x11e)]['resources']);Array[_0x9d5296(0x11d)](_0x5aa076)&&(_0x3dc2cb=_0x5aa076);}}catch(_0x43c0ab){}const _0x47202b=[{'id':_0x3ba590['id'],'path':_0x3ba590['path'],'label':_0x3ba590['label'],'resources':_0x3dc2cb}];if(_0x3ba590[_0x9d5296(0x132)]&&_0x3ba590[_0x9d5296(0x132)][_0x9d5296(0x115)]>0x0)for(const _0x516af0 of _0x3ba590[_0x9d5296(0x132)]){_0x47202b[_0x9d5296(0x126)](...formatMenuList(_0x516af0));}return _0x47202b;}
@@ -1 +1 @@
1
- (function(_0x1e51a2,_0x38e061){const _0x5e5144=a17_0x4882,_0x5dcc19=_0x1e51a2();while(!![]){try{const _0x42bd0d=-parseInt(_0x5e5144(0xa9))/0x1+-parseInt(_0x5e5144(0xa2))/0x2*(parseInt(_0x5e5144(0xa4))/0x3)+parseInt(_0x5e5144(0xab))/0x4+parseInt(_0x5e5144(0xa1))/0x5+parseInt(_0x5e5144(0xa5))/0x6*(parseInt(_0x5e5144(0x9f))/0x7)+-parseInt(_0x5e5144(0xa7))/0x8+-parseInt(_0x5e5144(0xa3))/0x9*(parseInt(_0x5e5144(0x9e))/0xa);if(_0x42bd0d===_0x38e061)break;else _0x5dcc19['push'](_0x5dcc19['shift']());}catch(_0x238a02){_0x5dcc19['push'](_0x5dcc19['shift']());}}}(a17_0x4814,0x8e9c2));import{useEffect,useState}from'react';function a17_0x4882(_0x5e624b,_0x542d8d){_0x5e624b=_0x5e624b-0x9e;const _0x481458=a17_0x4814();let _0x4882f0=_0x481458[_0x5e624b];return _0x4882f0;}import{getOnlineMenuList}from'./get-online-menu-list.js';export function useGetOnlineMenuList(){const [_0x5365f5,_0x104924]=useState([]),[_0x1582c5,_0x5611ce]=useState(!![]),[_0xeccc94,_0x14f298]=useState('');return useEffect(()=>{const _0x2de6e6=a17_0x4882;_0x5611ce(!![]),_0x14f298(''),getOnlineMenuList()[_0x2de6e6(0xa6)](_0x104924)[_0x2de6e6(0xaa)](_0x34e622=>{const _0x55abd5=_0x2de6e6;_0x14f298(_0x34e622[_0x55abd5(0xa8)]||_0x55abd5(0xa0));})['finally'](()=>_0x5611ce(![]));},[]),{'menuList':_0x5365f5,'loading':_0x1582c5,'error':_0xeccc94};}function a17_0x4814(){const _0x4cc7ae=['72ZEDOvS','then','673224GlmPjY','message','635226PceksA','catch','3291684OWvSJn','50fSCBJR','441861bjIBJU','获取菜单列表失败','748455qCKPXl','22ZBEaOn','7443mlunIu','115212tLSLpm'];a17_0x4814=function(){return _0x4cc7ae;};return a17_0x4814();}
1
+ (function(_0x53c59c,_0x5ed973){const _0xd59ecf=a17_0x1af2,_0x4763d2=_0x53c59c();while(!![]){try{const _0x24ee9c=-parseInt(_0xd59ecf(0xb0))/0x1*(parseInt(_0xd59ecf(0xbe))/0x2)+-parseInt(_0xd59ecf(0xbc))/0x3*(-parseInt(_0xd59ecf(0xb1))/0x4)+-parseInt(_0xd59ecf(0xb8))/0x5+parseInt(_0xd59ecf(0xbf))/0x6+parseInt(_0xd59ecf(0xb3))/0x7*(parseInt(_0xd59ecf(0xbd))/0x8)+parseInt(_0xd59ecf(0xb2))/0x9*(parseInt(_0xd59ecf(0xba))/0xa)+parseInt(_0xd59ecf(0xbb))/0xb*(-parseInt(_0xd59ecf(0xb6))/0xc);if(_0x24ee9c===_0x5ed973)break;else _0x4763d2['push'](_0x4763d2['shift']());}catch(_0x275106){_0x4763d2['push'](_0x4763d2['shift']());}}}(a17_0x59dd,0xdc50a));function a17_0x1af2(_0x519aa3,_0x3b68f5){_0x519aa3=_0x519aa3-0xb0;const _0x59dd11=a17_0x59dd();let _0x1af206=_0x59dd11[_0x519aa3];return _0x1af206;}import{useEffect,useState}from'react';function a17_0x59dd(){const _0x1bd6d8=['11oDumwd','15qSyDhk','3304yDWaeo','14260JLzsOg','10750398NDmRIv','message','74Uuuoxx','1115864dWCirj','188046jftgNM','17717scgrSP','then','finally','13059528uqonUs','获取菜单列表失败','8776650hUVRJr','catch','20yBueEM'];a17_0x59dd=function(){return _0x1bd6d8;};return a17_0x59dd();}import{getOnlineMenuList}from'./get-online-menu-list.js';export function useGetOnlineMenuList(){const [_0x5101aa,_0x42a229]=useState([]),[_0x2148e4,_0x1146d9]=useState(!![]),[_0x1feffb,_0x125ef9]=useState('');return useEffect(()=>{const _0x542400=a17_0x1af2;_0x1146d9(!![]),_0x125ef9(''),getOnlineMenuList()[_0x542400(0xb4)](_0x42a229)[_0x542400(0xb9)](_0x3c09c5=>{const _0xfbe963=_0x542400;_0x125ef9(_0x3c09c5[_0xfbe963(0xc0)]||_0xfbe963(0xb7));})[_0x542400(0xb5)](()=>_0x1146d9(![]));},[]),{'menuList':_0x5101aa,'loading':_0x2148e4,'error':_0x1feffb};}
@@ -1 +1 @@
1
- (function(_0xcc8ef8,_0x4fc997){const _0x3fb9d6=a18_0x186e,_0x54bac9=_0xcc8ef8();while(!![]){try{const _0x4492b1=-parseInt(_0x3fb9d6(0xf0))/0x1+-parseInt(_0x3fb9d6(0xfa))/0x2+-parseInt(_0x3fb9d6(0xf5))/0x3+parseInt(_0x3fb9d6(0xf7))/0x4+parseInt(_0x3fb9d6(0xfb))/0x5+parseInt(_0x3fb9d6(0xf6))/0x6+-parseInt(_0x3fb9d6(0xf9))/0x7*(-parseInt(_0x3fb9d6(0xf2))/0x8);if(_0x4492b1===_0x4fc997)break;else _0x54bac9['push'](_0x54bac9['shift']());}catch(_0x1012a9){_0x54bac9['push'](_0x54bac9['shift']());}}}(a18_0x5560,0xcea94));function a18_0x186e(_0x49eef7,_0x212305){_0x49eef7=_0x49eef7-0xf0;const _0x5560c4=a18_0x5560();let _0x186e82=_0x5560c4[_0x49eef7];return _0x186e82;}export function getRemainingSpaces(_0x131dd3,_0xd95aae){const _0x2f03e9=a18_0x186e,_0x1bfad1=getStringWidth(_0xd95aae);return Array(Math[_0x2f03e9(0xf4)](0x0,_0x131dd3-_0x1bfad1))['fill']('\x20')[_0x2f03e9(0xf8)]('');}export function getMaxWidth(_0xedda03,_0x22a7b5=0x2){const _0x25fe73=a18_0x186e;let _0x4ef1bd='',_0x4d6d2f=0x0;for(const _0x380992 of _0xedda03){const _0x5ddcf7=getStringWidth(_0x380992);_0x5ddcf7>_0x4d6d2f&&(_0x4d6d2f=_0x5ddcf7,_0x4ef1bd=_0x380992);}return _0x4ef1bd+'\x20'[_0x25fe73(0xf1)](_0x22a7b5);}export function getStringWidth(_0x79c6d9){const _0x4ac03c=a18_0x186e;let _0x484bae=0x0;for(const _0x19ce80 of _0x79c6d9){/[\u4e00-\u9fa5]/[_0x4ac03c(0xf3)](_0x19ce80)?_0x484bae+=0x2:_0x484bae+=0x1;}return _0x484bae;}function a18_0x5560(){const _0x37b927=['8370792oMtYZi','test','max','4966956YUxzBk','3138714dSmAav','6623272FhMcmx','join','7mPHCBb','1850124IUkhRQ','2078995kxTlzQ','213887RloINE','repeat'];a18_0x5560=function(){return _0x37b927;};return a18_0x5560();}
1
+ (function(_0x382422,_0x1a4e12){const _0x4a9fa0=a18_0x3d89,_0x5f4460=_0x382422();while(!![]){try{const _0x38bc75=parseInt(_0x4a9fa0(0x113))/0x1+-parseInt(_0x4a9fa0(0x110))/0x2*(parseInt(_0x4a9fa0(0x115))/0x3)+-parseInt(_0x4a9fa0(0x10b))/0x4+parseInt(_0x4a9fa0(0x116))/0x5*(-parseInt(_0x4a9fa0(0x10d))/0x6)+-parseInt(_0x4a9fa0(0x114))/0x7+parseInt(_0x4a9fa0(0x111))/0x8+parseInt(_0x4a9fa0(0x10e))/0x9;if(_0x38bc75===_0x1a4e12)break;else _0x5f4460['push'](_0x5f4460['shift']());}catch(_0x15d5d3){_0x5f4460['push'](_0x5f4460['shift']());}}}(a18_0x2efc,0xec3d0));export function getRemainingSpaces(_0x249e84,_0x382d4e){const _0x176a40=a18_0x3d89,_0x2aaf4a=getStringWidth(_0x382d4e);return Array(Math[_0x176a40(0x10f)](0x0,_0x249e84-_0x2aaf4a))[_0x176a40(0x10c)]('\x20')[_0x176a40(0x112)]('');}function a18_0x3d89(_0x149d95,_0x23813a){_0x149d95=_0x149d95-0x10b;const _0x2efcd8=a18_0x2efc();let _0x3d890b=_0x2efcd8[_0x149d95];return _0x3d890b;}function a18_0x2efc(){const _0x223437=['max','4TAtuSc','9108584CbHeVr','join','603373EtCNud','5140926weHuam','835092nOvibY','4963265NyWsYD','test','4200088XqRYil','fill','6IqPRBS','23035563bYOWZU'];a18_0x2efc=function(){return _0x223437;};return a18_0x2efc();}export function getMaxWidth(_0x305552,_0x45bfca=0x2){let _0x2699a6='',_0x473474=0x0;for(const _0x22455d of _0x305552){const _0x44af5c=getStringWidth(_0x22455d);_0x44af5c>_0x473474&&(_0x473474=_0x44af5c,_0x2699a6=_0x22455d);}return _0x2699a6+'\x20'['repeat'](_0x45bfca);}export function getStringWidth(_0x5dc688){const _0x4922f6=a18_0x3d89;let _0x4b7472=0x0;for(const _0x5b6ea7 of _0x5dc688){/[\u4e00-\u9fa5]/[_0x4922f6(0x117)](_0x5b6ea7)?_0x4b7472+=0x2:_0x4b7472+=0x1;}return _0x4b7472;}
@@ -1 +1 @@
1
- (function(_0x5ca0b8,_0x351aa8){const _0x3cbbc6=a19_0x4318,_0x134d90=_0x5ca0b8();while(!![]){try{const _0x638b67=-parseInt(_0x3cbbc6(0x125))/0x1*(parseInt(_0x3cbbc6(0x120))/0x2)+-parseInt(_0x3cbbc6(0x11a))/0x3*(parseInt(_0x3cbbc6(0x11d))/0x4)+parseInt(_0x3cbbc6(0x122))/0x5+-parseInt(_0x3cbbc6(0x11e))/0x6+parseInt(_0x3cbbc6(0x124))/0x7+parseInt(_0x3cbbc6(0x123))/0x8*(parseInt(_0x3cbbc6(0x11c))/0x9)+parseInt(_0x3cbbc6(0x119))/0xa;if(_0x638b67===_0x351aa8)break;else _0x134d90['push'](_0x134d90['shift']());}catch(_0x50aa16){_0x134d90['push'](_0x134d90['shift']());}}}(a19_0xadd5,0x1a8e9));function a19_0x4318(_0x44a399,_0x22025d){_0x44a399=_0x44a399-0x119;const _0xadd5d7=a19_0xadd5();let _0x4318ef=_0xadd5d7[_0x44a399];return _0x4318ef;}export function isValidJsHttpsUrl(_0x3f7685){const _0x156083=a19_0x4318;return/^https:\/\/.+\.js(\?.*)?$/[_0x156083(0x11f)](_0x3f7685[_0x156083(0x11b)]());}export function isValidCssHttpsUrl(_0x52d3c9){const _0x178c89=a19_0x4318;return/^https:\/\/.+\.css(\?.*)?$/[_0x178c89(0x11f)](_0x52d3c9[_0x178c89(0x11b)]());}function a19_0xadd5(){const _0x41e437=['967555DwumCE','11648WmMwTB','56105BMPPZS','1YpcMtQ','2412470yZnwir','15TPxptj','trim','144MeTfRx','124692cWiRHy','929184EHSapH','test','93126ktOvJr','HEAD'];a19_0xadd5=function(){return _0x41e437;};return a19_0xadd5();}export async function isUrlReachable(_0x4b55e6){const _0x59a4a6=a19_0x4318;try{const _0x147073=await fetch(_0x4b55e6,{'method':_0x59a4a6(0x121)});return _0x147073['ok'];}catch{return![];}}
1
+ function a19_0x2d2e(_0x421aa1,_0x46dc41){_0x421aa1=_0x421aa1-0x82;const _0x381d3f=a19_0x381d();let _0x2d2e54=_0x381d3f[_0x421aa1];return _0x2d2e54;}function a19_0x381d(){const _0x149b2e=['30XZfBSL','628990nFKfLk','1923383vBXezf','1720ptKuqP','1810452DwVbuh','5797605yKyHIu','1424BMKXfP','3606UgeTNa','trim','4XErsDn','55TUCdWf','test','4716WDXUes','1690450EbNlGU'];a19_0x381d=function(){return _0x149b2e;};return a19_0x381d();}(function(_0x5d5da7,_0x17b9fb){const _0x3f13b7=a19_0x2d2e,_0x2bc9aa=_0x5d5da7();while(!![]){try{const _0x444e74=parseInt(_0x3f13b7(0x89))/0x1+-parseInt(_0x3f13b7(0x8e))/0x2*(-parseInt(_0x3f13b7(0x8f))/0x3)+-parseInt(_0x3f13b7(0x83))/0x4*(-parseInt(_0x3f13b7(0x8d))/0x5)+parseInt(_0x3f13b7(0x88))/0x6*(-parseInt(_0x3f13b7(0x8a))/0x7)+parseInt(_0x3f13b7(0x8b))/0x8*(parseInt(_0x3f13b7(0x86))/0x9)+parseInt(_0x3f13b7(0x87))/0xa+-parseInt(_0x3f13b7(0x84))/0xb*(parseInt(_0x3f13b7(0x8c))/0xc);if(_0x444e74===_0x17b9fb)break;else _0x2bc9aa['push'](_0x2bc9aa['shift']());}catch(_0x1b1ddb){_0x2bc9aa['push'](_0x2bc9aa['shift']());}}}(a19_0x381d,0xc2c90));export function isValidJsHttpsUrl(_0x131059){const _0x18ba8e=a19_0x2d2e;return/^https:\/\/.+\.js(\?.*)?$/[_0x18ba8e(0x85)](_0x131059[_0x18ba8e(0x82)]());}export function isValidCssHttpsUrl(_0x4627d8){const _0x4c4aaa=a19_0x2d2e;return/^https:\/\/.+\.css(\?.*)?$/[_0x4c4aaa(0x85)](_0x4627d8[_0x4c4aaa(0x82)]());}export async function isUrlReachable(_0xb819af){try{const _0x5b4e54=await fetch(_0xb819af,{'method':'HEAD'});return _0x5b4e54['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x3ddc0f,_0x29f62a){const _0x4c2694=a20_0x2145,_0x1f95aa=_0x3ddc0f();while(!![]){try{const _0x29c170=parseInt(_0x4c2694(0x102))/0x1+-parseInt(_0x4c2694(0x117))/0x2*(-parseInt(_0x4c2694(0x114))/0x3)+-parseInt(_0x4c2694(0x10e))/0x4+parseInt(_0x4c2694(0x101))/0x5*(parseInt(_0x4c2694(0x113))/0x6)+-parseInt(_0x4c2694(0x115))/0x7*(-parseInt(_0x4c2694(0x106))/0x8)+parseInt(_0x4c2694(0x116))/0x9+parseInt(_0x4c2694(0x10b))/0xa*(-parseInt(_0x4c2694(0x112))/0xb);if(_0x29c170===_0x29f62a)break;else _0x1f95aa['push'](_0x1f95aa['shift']());}catch(_0x286579){_0x1f95aa['push'](_0x1f95aa['shift']());}}}(a20_0x3cc7,0xbcbdc));function a20_0x2145(_0x15677f,_0x5c0655){_0x15677f=_0x15677f-0x101;const _0x3cc7cc=a20_0x3cc7();let _0x214590=_0x3cc7cc[_0x15677f];return _0x214590;}function a20_0x3cc7(){const _0x3aa0de=['length','map','from','787112gTOieC','cyan','待更新的菜单列表:','resources','filter','6546510QQdHRs','flat','join','5661872Zyxqew','column','*\x20待更新的菜单&资源链接','待更新的资源链接:','11azhfoI','127470atTKAx','1324329FqtCaT','7MtPrRC','6051204wskjAR','4JKPcsV','240dCrRmI','169812FLfySm'];a20_0x3cc7=function(){return _0x3aa0de;};return a20_0x3cc7();}import{jsx as a20_0x2eb4ac,jsxs as a20_0x3d1724}from'react/jsx-runtime';import{Text,Box}from'ink';export function CurrentMenuCdnContent(_0xe50221){const _0x5b44eb=a20_0x2145,{menuList:_0x2e3bff}=_0xe50221,_0x1bcbe2=_0x2e3bff[_0x5b44eb(0x10a)](_0x2fcced=>_0x2fcced['resources'][_0x5b44eb(0x103)]),_0x4bc281=Array[_0x5b44eb(0x105)](new Set(_0x2e3bff[_0x5b44eb(0x104)](_0x36d355=>_0x36d355[_0x5b44eb(0x109)])[_0x5b44eb(0x10c)]()));return a20_0x3d1724(Box,{'flexDirection':_0x5b44eb(0x10f),'children':[a20_0x2eb4ac(Text,{'color':_0x5b44eb(0x107),'children':_0x5b44eb(0x110)}),a20_0x3d1724(Box,{'marginTop':0x1,'flexDirection':_0x5b44eb(0x10f),'children':[a20_0x3d1724(Text,{'bold':!![],'children':['\x20\x20',_0x5b44eb(0x108)]}),a20_0x3d1724(Text,{'children':['\x20\x20',_0x1bcbe2[_0x5b44eb(0x104)](_0x4480df=>_0x4480df['label'])[_0x5b44eb(0x10d)](',\x20')]})]}),a20_0x2eb4ac(Box,{'marginTop':0x1,'children':a20_0x3d1724(Text,{'bold':!![],'children':['\x20\x20',_0x5b44eb(0x111)]})}),_0x4bc281['map'](_0x56efe9=>a20_0x2eb4ac(Box,{'children':a20_0x3d1724(Text,{'children':['\x20\x20',_0x56efe9]})},_0x56efe9))]});}
1
+ function a20_0x2b9e(){const _0x5a0fc3=['待更新的菜单列表:','filter','resources','63ZaoPGs','2308835nVZIFM','from','424272jRVvuX','column','8498Xgdfmh','2jCzdZB','cyan','*\x20待更新的菜单&资源链接','29552633zZUIaq','label','100180Cqqfpb','164ftDqXN','90357hjPyBj','join','5673500yyCRXU','2814URLjQi','length'];a20_0x2b9e=function(){return _0x5a0fc3;};return a20_0x2b9e();}(function(_0xee892e,_0x683969){const _0xbc6f1d=a20_0x4e46,_0xf85b91=_0xee892e();while(!![]){try{const _0x56f828=-parseInt(_0xbc6f1d(0x14d))/0x1*(-parseInt(_0xbc6f1d(0x152))/0x2)+parseInt(_0xbc6f1d(0x154))/0x3*(parseInt(_0xbc6f1d(0x153))/0x4)+parseInt(_0xbc6f1d(0x148))/0x5+-parseInt(_0xbc6f1d(0x157))/0x6*(-parseInt(_0xbc6f1d(0x14c))/0x7)+parseInt(_0xbc6f1d(0x14a))/0x8*(parseInt(_0xbc6f1d(0x147))/0x9)+parseInt(_0xbc6f1d(0x156))/0xa+-parseInt(_0xbc6f1d(0x150))/0xb;if(_0x56f828===_0x683969)break;else _0xf85b91['push'](_0xf85b91['shift']());}catch(_0x3061c0){_0xf85b91['push'](_0xf85b91['shift']());}}}(a20_0x2b9e,0x96ec1));import{jsx as a20_0x191197,jsxs as a20_0x1523e7}from'react/jsx-runtime';function a20_0x4e46(_0x51620b,_0x8810d3){_0x51620b=_0x51620b-0x147;const _0x2b9e79=a20_0x2b9e();let _0x4e4683=_0x2b9e79[_0x51620b];return _0x4e4683;}import{Text,Box}from'ink';export function CurrentMenuCdnContent(_0x43218d){const _0x54887c=a20_0x4e46,{menuList:_0xf8e493}=_0x43218d,_0x409d7e=_0xf8e493[_0x54887c(0x15a)](_0x16c635=>_0x16c635[_0x54887c(0x15b)][_0x54887c(0x158)]),_0x21208d=Array[_0x54887c(0x149)](new Set(_0xf8e493['map'](_0x5c748a=>_0x5c748a[_0x54887c(0x15b)])['flat']()));return a20_0x1523e7(Box,{'flexDirection':'column','children':[a20_0x191197(Text,{'color':_0x54887c(0x14e),'children':_0x54887c(0x14f)}),a20_0x1523e7(Box,{'marginTop':0x1,'flexDirection':_0x54887c(0x14b),'children':[a20_0x1523e7(Text,{'bold':!![],'children':['\x20\x20',_0x54887c(0x159)]}),a20_0x1523e7(Text,{'children':['\x20\x20',_0x409d7e['map'](_0x2c3497=>_0x2c3497[_0x54887c(0x151)])[_0x54887c(0x155)](',\x20')]})]}),a20_0x191197(Box,{'marginTop':0x1,'children':a20_0x1523e7(Text,{'bold':!![],'children':['\x20\x20','待更新的资源链接:']})}),_0x21208d['map'](_0x33f555=>a20_0x191197(Box,{'children':a20_0x1523e7(Text,{'children':['\x20\x20',_0x33f555]})},_0x33f555))]});}
@@ -1 +1 @@
1
- (function(_0x53acc3,_0x36604f){const _0x31b141=a21_0x1a3e,_0x1ab74d=_0x53acc3();while(!![]){try{const _0x296c67=parseInt(_0x31b141(0xdb))/0x1*(-parseInt(_0x31b141(0xd3))/0x2)+parseInt(_0x31b141(0xd6))/0x3+-parseInt(_0x31b141(0xd0))/0x4*(-parseInt(_0x31b141(0xce))/0x5)+parseInt(_0x31b141(0xdd))/0x6*(parseInt(_0x31b141(0xd2))/0x7)+-parseInt(_0x31b141(0xcf))/0x8+parseInt(_0x31b141(0xda))/0x9*(-parseInt(_0x31b141(0xd5))/0xa)+parseInt(_0x31b141(0xd1))/0xb;if(_0x296c67===_0x36604f)break;else _0x1ab74d['push'](_0x1ab74d['shift']());}catch(_0x48b712){_0x1ab74d['push'](_0x1ab74d['shift']());}}}(a21_0x2f9b,0x915ef));function a21_0x1a3e(_0x16fb1d,_0x4585ca){_0x16fb1d=_0x16fb1d-0xcd;const _0x2f9b58=a21_0x2f9b();let _0x1a3e7f=_0x2f9b58[_0x16fb1d];return _0x1a3e7f;}import{jsx as a21_0x3b5cee,jsxs as a21_0x1ca189}from'react/jsx-runtime';function a21_0x2f9b(){const _0x50b924=['3359905GiZcht','7482448fkbXjG','4RptFJT','6242588sWGxPr','602yHCLpt','154iegdMu','column','1390rhkXHE','2958624umFrWy','cyan','JS\x20链接:\x20','*\x20已输入的资源资源','29313gQBfMu','9263TyXqlY','green','32862vEBemZ','CSS\x20链接:\x20'];a21_0x2f9b=function(){return _0x50b924;};return a21_0x2f9b();}import{Text,Box}from'ink';export function InputCdnAsset(_0xfca2c3){const _0x2d5e69=a21_0x1a3e,{jsCdnUrl:_0x951fb4,cssCdnUrl:_0x555fef}=_0xfca2c3;return a21_0x1ca189(Box,{'flexDirection':_0x2d5e69(0xd4),'marginTop':0x1,'children':[a21_0x3b5cee(Text,{'color':_0x2d5e69(0xd7),'children':_0x2d5e69(0xd9)}),a21_0x1ca189(Box,{'children':[a21_0x1ca189(Text,{'children':['\x20\x20',_0x2d5e69(0xd8)]}),a21_0x3b5cee(Text,{'color':_0x2d5e69(0xdc),'children':_0x951fb4})]}),a21_0x1ca189(Box,{'children':[a21_0x1ca189(Text,{'children':['\x20\x20',_0x2d5e69(0xcd)]}),a21_0x3b5cee(Text,{'color':'green','children':_0x555fef})]})]});}
1
+ function a21_0x2196(_0x53d65f,_0x4f6496){_0x53d65f=_0x53d65f-0x1bc;const _0xd4b049=a21_0xd4b0();let _0x219643=_0xd4b049[_0x53d65f];return _0x219643;}(function(_0x3fffc3,_0x13e272){const _0x435800=a21_0x2196,_0x37a005=_0x3fffc3();while(!![]){try{const _0x35089e=-parseInt(_0x435800(0x1bd))/0x1+-parseInt(_0x435800(0x1be))/0x2*(parseInt(_0x435800(0x1c1))/0x3)+-parseInt(_0x435800(0x1c5))/0x4+-parseInt(_0x435800(0x1c7))/0x5*(parseInt(_0x435800(0x1c8))/0x6)+-parseInt(_0x435800(0x1c9))/0x7*(parseInt(_0x435800(0x1c3))/0x8)+-parseInt(_0x435800(0x1bf))/0x9+parseInt(_0x435800(0x1c0))/0xa;if(_0x35089e===_0x13e272)break;else _0x37a005['push'](_0x37a005['shift']());}catch(_0x383c79){_0x37a005['push'](_0x37a005['shift']());}}}(a21_0xd4b0,0x3b1a4));import{jsx as a21_0x42e5ba,jsxs as a21_0x340d97}from'react/jsx-runtime';import{Text,Box}from'ink';function a21_0xd4b0(){const _0x2c703e=['762352FyBuLU','JS\x20链接:\x20','5AKMfex','1408614FSPOLy','9863LDZBUu','column','450690YUsxhE','261374BNymif','1648062lMxoLi','16531490rRRplk','3lTWKHA','green','1256DmMQMS','CSS\x20链接:\x20'];a21_0xd4b0=function(){return _0x2c703e;};return a21_0xd4b0();}export function InputCdnAsset(_0x21bb0e){const _0x1daeff=a21_0x2196,{jsCdnUrl:_0x40fc96,cssCdnUrl:_0x43c387}=_0x21bb0e;return a21_0x340d97(Box,{'flexDirection':_0x1daeff(0x1bc),'marginTop':0x1,'children':[a21_0x42e5ba(Text,{'color':'cyan','children':'*\x20已输入的资源资源'}),a21_0x340d97(Box,{'children':[a21_0x340d97(Text,{'children':['\x20\x20',_0x1daeff(0x1c6)]}),a21_0x42e5ba(Text,{'color':_0x1daeff(0x1c2),'children':_0x40fc96})]}),a21_0x340d97(Box,{'children':[a21_0x340d97(Text,{'children':['\x20\x20',_0x1daeff(0x1c4)]}),a21_0x42e5ba(Text,{'color':_0x1daeff(0x1c2),'children':_0x43c387})]})]});}
@@ -1 +1 @@
1
- function a22_0x320b(_0x45c54c,_0x545dfc){_0x45c54c=_0x45c54c-0x1f1;const _0x4c6c1a=a22_0x4c6c();let _0x320b27=_0x4c6c1a[_0x45c54c];return _0x320b27;}(function(_0x4cf849,_0x1614eb){const _0x1ffd6b=a22_0x320b,_0x145b36=_0x4cf849();while(!![]){try{const _0x36e6db=parseInt(_0x1ffd6b(0x1f2))/0x1+parseInt(_0x1ffd6b(0x210))/0x2+parseInt(_0x1ffd6b(0x20f))/0x3+parseInt(_0x1ffd6b(0x225))/0x4*(parseInt(_0x1ffd6b(0x209))/0x5)+parseInt(_0x1ffd6b(0x222))/0x6*(-parseInt(_0x1ffd6b(0x1f4))/0x7)+parseInt(_0x1ffd6b(0x1f5))/0x8*(-parseInt(_0x1ffd6b(0x215))/0x9)+parseInt(_0x1ffd6b(0x1f7))/0xa*(-parseInt(_0x1ffd6b(0x205))/0xb);if(_0x36e6db===_0x1614eb)break;else _0x145b36['push'](_0x145b36['shift']());}catch(_0x318cc4){_0x145b36['push'](_0x145b36['shift']());}}}(a22_0x4c6c,0x50f02));import{jsx as a22_0x9a55d0,jsxs as a22_0x12b21e,Fragment as a22_0x3d5ab5}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';function a22_0x4c6c(){const _0x562824=['请输入有效的\x20JS\x20https\x20链接','creating','\x20正在获取线上菜单资源链接...','value','delete','输入项目的\x20JS\x20资源链接(https://...)','lovrabet\x20auth','backspace','upArrow','11GNERfA','\x20←\x20','cyan','flat','10oAgbto','length','input-js','column','slice','CSS\x20链接:\x20','849879uKSTNo','1039772DtPGYe','resources','dots','need-confirm','resolve','9Mcmqem','gray','label','all','JS\x20链接无法访问','*\x20请输入新的资源链接','updated','red','取消更新','downArrow','input-css','\x20资源正在同步中...','请输入有效的\x20CSS\x20https\x20链接','6726lOUrOS','cancel','return','775156HdwPuL','path','yellow','from','235402oNbjti','green','1603jlNKxB','1433416UptTkt','继续更新','6587510ROOsrf','trim','JS\x20链接:\x20','map','!\x20未找到菜单资源链接'];a22_0x4c6c=function(){return _0x562824;};return a22_0x4c6c();}import a22_0x5368ab 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_0x9a55d0(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x13c246=a22_0x320b,{exit:_0x2dcf4f}=useApp(),{loading:_0x11c215,menuList:_0x507a12,error:_0x1fc56a}=useGetOnlineMenuList(),[_0x473a0e,_0x40d8ee]=useState('ok'),[_0x5d0b22,_0x48ac6b]=useState(_0x13c246(0x20b)),[_0x266392,_0x50d0af]=useState(''),[_0x4bb28e,_0x1e03dc]=useState(''),[_0x356c5d,_0x7eead7]=useState(''),[_0x3e230b,_0xe6f9f4]=useState(''),_0x5c6f0a=Array[_0x13c246(0x1f1)](new Set(_0x507a12[_0x13c246(0x1fa)](_0x2f485a=>_0x2f485a[_0x13c246(0x211)])[_0x13c246(0x208)]()));useEffect(()=>{const _0x53db19=_0x13c246;_0x5d0b22===_0x53db19(0x21b)&&setTimeout(_0x2dcf4f,0x32);},[_0x5d0b22]),useInput(async(_0x4279b3,_0x84cf37)=>{const _0x54548c=_0x13c246;if(_0x5d0b22===_0x54548c(0x20b)){if(_0x84cf37['return']){const _0x566dfa=_0x356c5d[_0x54548c(0x1f8)]();if(_0x566dfa==='')return;if(!isValidJsHttpsUrl(_0x566dfa)){_0xe6f9f4(_0x54548c(0x1fc));return;}if(!await isUrlReachable(_0x566dfa)){_0xe6f9f4(_0x54548c(0x219));return;}_0x50d0af(_0x566dfa),_0x7eead7(''),_0xe6f9f4(''),_0x48ac6b(_0x54548c(0x21f));return;}if(_0x84cf37['backspace']||_0x84cf37[_0x54548c(0x200)]){_0x7eead7(_0x128356=>_0x128356['slice'](0x0,-0x1)),_0xe6f9f4('');return;}_0x7eead7(_0x286a92=>_0x286a92+_0x4279b3);return;}if(_0x5d0b22===_0x54548c(0x21f)){if(_0x84cf37[_0x54548c(0x224)]){const _0x11e666=_0x356c5d[_0x54548c(0x1f8)]();if(_0x11e666==='')return;if(!isValidCssHttpsUrl(_0x11e666)){_0xe6f9f4(_0x54548c(0x221));return;}if(!await isUrlReachable(_0x11e666)){_0xe6f9f4('CSS\x20链接无法访问');return;}_0x1e03dc(_0x11e666),_0x7eead7(''),_0xe6f9f4(''),_0x48ac6b('need-confirm');return;}if(_0x84cf37[_0x54548c(0x203)]||_0x84cf37[_0x54548c(0x200)]){_0x7eead7(_0x3c1903=>_0x3c1903[_0x54548c(0x20d)](0x0,-0x1)),_0xe6f9f4('');return;}_0x7eead7(_0x13316c=>_0x13316c+_0x4279b3);return;}if(_0x5d0b22===_0x54548c(0x213)){(_0x84cf37[_0x54548c(0x204)]||_0x84cf37[_0x54548c(0x21e)]||_0x84cf37['leftArrow']||_0x84cf37['rightArrow'])&&_0x40d8ee(_0x554fca=>_0x554fca==='ok'?'cancel':'ok');if(_0x84cf37[_0x54548c(0x224)]){_0x48ac6b(_0x54548c(0x1fd));if(_0x473a0e==='ok')await Promise[_0x54548c(0x218)](_0x507a12[_0x54548c(0x1fa)](_0x2cc980=>{const _0x21274c=_0x54548c,_0x59e91f={'id':_0x2cc980['id'],'label':_0x2cc980['label'],'path':_0x2cc980[_0x21274c(0x226)],'resources':[_0x266392,_0x4bb28e]};if(_0x2cc980[_0x21274c(0x211)][_0x21274c(0x20a)]===0x0)return Promise[_0x21274c(0x214)]();return updateMenuCdnUrl(_0x59e91f);})),await new Promise(_0x283d09=>setTimeout(_0x283d09,0x3e8)),_0x48ac6b('updated');else _0x473a0e===_0x54548c(0x223)&&_0x2dcf4f();}}});if(_0x11c215)return a22_0x12b21e(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x9a55d0(Text,{}),a22_0x9a55d0(a22_0x5368ab,{'type':_0x13c246(0x212)}),a22_0x9a55d0(Text,{'children':_0x13c246(0x1fe)})]});if(_0x1fc56a)return a22_0x12b21e(Box,{'flexDirection':_0x13c246(0x20c),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x12b21e(Text,{'color':_0x13c246(0x21c),'children':['✗\x20',_0x1fc56a]}),a22_0x12b21e(Box,{'marginTop':0x1,'children':[a22_0x9a55d0(Text,{'color':_0x13c246(0x216),'children':'提示:使用\x20'}),a22_0x9a55d0(Text,{'color':_0x13c246(0x207),'children':_0x13c246(0x202)}),a22_0x9a55d0(Text,{'color':_0x13c246(0x216),'children':'\x20命令重新登录'})]})]});if(_0x5c6f0a[_0x13c246(0x20a)]===0x0)return a22_0x9a55d0(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x9a55d0(Text,{'color':_0x13c246(0x227),'children':_0x13c246(0x1fb)})});if(_0x5d0b22==='need-confirm')return a22_0x12b21e(Box,{'flexDirection':_0x13c246(0x20c),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x9a55d0(CurrentMenuCdnContent,{'menuList':_0x507a12}),a22_0x9a55d0(InputCdnAsset,{'jsCdnUrl':_0x266392,'cssCdnUrl':_0x4bb28e}),a22_0x9a55d0(Box,{'marginTop':0x1,'flexDirection':'column','children':[{'label':_0x13c246(0x1f6),'value':'ok'},{'label':_0x13c246(0x21d),'value':_0x13c246(0x223)}][_0x13c246(0x1fa)](_0x25a1a0=>a22_0x12b21e(Text,{'color':_0x473a0e===_0x25a1a0[_0x13c246(0x1ff)]?_0x13c246(0x227):undefined,'children':[_0x473a0e===_0x25a1a0[_0x13c246(0x1ff)]?'>\x20':'\x20\x20',_0x25a1a0[_0x13c246(0x217)]]},_0x25a1a0[_0x13c246(0x1ff)]))})]});if(_0x5d0b22===_0x13c246(0x1fd))return a22_0x12b21e(Box,{'flexDirection':_0x13c246(0x20c),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x9a55d0(CurrentMenuCdnContent,{'menuList':_0x507a12}),a22_0x9a55d0(InputCdnAsset,{'jsCdnUrl':_0x266392,'cssCdnUrl':_0x4bb28e}),a22_0x12b21e(Box,{'marginTop':0x1,'children':[a22_0x9a55d0(a22_0x5368ab,{'type':_0x13c246(0x212)}),a22_0x9a55d0(Text,{'children':_0x13c246(0x220)})]})]});if(_0x5d0b22===_0x13c246(0x21b))return a22_0x12b21e(Box,{'flexDirection':_0x13c246(0x20c),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x9a55d0(CurrentMenuCdnContent,{'menuList':_0x507a12}),a22_0x9a55d0(InputCdnAsset,{'jsCdnUrl':_0x266392,'cssCdnUrl':_0x4bb28e}),a22_0x9a55d0(Box,{'marginTop':0x1,'children':a22_0x9a55d0(Text,{'color':_0x13c246(0x1f3),'children':'√\x20更新成功'})})]});return a22_0x12b21e(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x9a55d0(CurrentMenuCdnContent,{'menuList':_0x507a12}),a22_0x12b21e(Box,{'marginTop':0x1,'flexDirection':_0x13c246(0x20c),'children':[a22_0x9a55d0(Text,{'color':_0x13c246(0x207),'children':_0x13c246(0x21a)}),_0x266392?a22_0x12b21e(Box,{'children':[a22_0x12b21e(Text,{'color':_0x13c246(0x216),'children':['\x20\x20',_0x13c246(0x1f9)]}),a22_0x9a55d0(Text,{'color':'green','children':_0x266392})]}):_0x5d0b22===_0x13c246(0x20b)&&a22_0x12b21e(a22_0x3d5ab5,{'children':[a22_0x12b21e(Box,{'children':[a22_0x12b21e(Text,{'children':['\x20\x20',_0x13c246(0x1f9)]}),a22_0x9a55d0(Text,{'color':'green','children':_0x356c5d}),_0x3e230b&&a22_0x12b21e(Text,{'color':_0x13c246(0x21c),'children':[_0x13c246(0x206),_0x3e230b]})]}),!_0x3e230b&&a22_0x9a55d0(Box,{'children':a22_0x12b21e(Text,{'color':_0x13c246(0x216),'children':['\x20\x20',_0x13c246(0x201)]})})]}),_0x4bb28e?a22_0x12b21e(Box,{'children':[a22_0x12b21e(Text,{'children':['\x20\x20','CSS\x20链接:\x20']}),a22_0x9a55d0(Text,{'color':_0x13c246(0x1f3),'children':_0x4bb28e})]}):_0x5d0b22===_0x13c246(0x21f)&&a22_0x12b21e(a22_0x3d5ab5,{'children':[a22_0x12b21e(Box,{'children':[a22_0x12b21e(Text,{'children':['\x20\x20',_0x13c246(0x20e)]}),a22_0x9a55d0(Text,{'color':'green','children':_0x356c5d}),_0x3e230b&&a22_0x12b21e(Text,{'color':_0x13c246(0x21c),'children':[_0x13c246(0x206),_0x3e230b]})]}),!_0x3e230b&&a22_0x9a55d0(Box,{'children':a22_0x12b21e(Text,{'color':_0x13c246(0x216),'children':['\x20\x20','输入项目的\x20CSS\x20资源链接(https://...)']})})]})]})]});}
1
+ (function(_0xee5ad6,_0x38d744){const _0x279af0=a22_0x5320,_0x231754=_0xee5ad6();while(!![]){try{const _0x48ae0e=-parseInt(_0x279af0(0x113))/0x1+-parseInt(_0x279af0(0x132))/0x2+-parseInt(_0x279af0(0x12f))/0x3+-parseInt(_0x279af0(0x115))/0x4*(-parseInt(_0x279af0(0x11a))/0x5)+-parseInt(_0x279af0(0x135))/0x6*(-parseInt(_0x279af0(0x12e))/0x7)+-parseInt(_0x279af0(0x114))/0x8*(parseInt(_0x279af0(0x138))/0x9)+parseInt(_0x279af0(0x146))/0xa;if(_0x48ae0e===_0x38d744)break;else _0x231754['push'](_0x231754['shift']());}catch(_0x3dace2){_0x231754['push'](_0x231754['shift']());}}}(a22_0x5b37,0x6ecdd));import{jsx as a22_0x2aa59d,jsxs as a22_0x2a38bb,Fragment as a22_0x669d9a}from'react/jsx-runtime';function a22_0x5320(_0x496f2e,_0x15929f){_0x496f2e=_0x496f2e-0x111;const _0x5b37b3=a22_0x5b37();let _0x532049=_0x5b37b3[_0x496f2e];return _0x532049;}import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a22_0x716f82 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';function a22_0x5b37(){const _0x446c25=['请输入有效的\x20CSS\x20https\x20链接','\x20资源正在同步中...','label','slice','25evlPPR','CSS\x20链接:\x20','map','取消更新','\x20←\x20','flat','red','input-css','cyan','from','trim','green','updated','delete','*\x20请输入新的资源链接','!\x20未找到菜单资源链接','leftArrow','gray','\x20命令重新登录','length','7301uESFYn','1561059LXrrFV','CSS\x20链接无法访问','JS\x20链接:\x20','176848fbZsqE','all','value','2388UPoAMu','resources','rightArrow','4383ZXfDcK','dots','输入项目的\x20CSS\x20资源链接(https://...)','yellow','column','cancel','输入项目的\x20JS\x20资源链接(https://...)','creating','upArrow','return','input-js','backspace','need-confirm','请输入有效的\x20JS\x20https\x20链接','7845400UKKKdk','resolve','继续更新','93908dxtvBS','6824knZuUu','297836XUIfrf'];a22_0x5b37=function(){return _0x446c25;};return a22_0x5b37();}import{InputCdnAsset}from'./input-cdn-asset.js';import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import.meta.main&&render(a22_0x2aa59d(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x5c0cd1=a22_0x5320,{exit:_0x1ecea0}=useApp(),{loading:_0x1893dd,menuList:_0x1c3fa2,error:_0x43a050}=useGetOnlineMenuList(),[_0x2413b1,_0x4692da]=useState('ok'),[_0x3d038d,_0x4a4d12]=useState(_0x5c0cd1(0x142)),[_0x56d3d9,_0x47f127]=useState(''),[_0xacf7c,_0x1e2527]=useState(''),[_0x2ac83b,_0x5b0042]=useState(''),[_0xdb200b,_0x2c5877]=useState(''),_0x368c3e=Array[_0x5c0cd1(0x123)](new Set(_0x1c3fa2['map'](_0x579f4a=>_0x579f4a[_0x5c0cd1(0x136)])[_0x5c0cd1(0x11f)]()));useEffect(()=>{_0x3d038d==='updated'&&setTimeout(_0x1ecea0,0x32);},[_0x3d038d]),useInput(async(_0x36451c,_0x478650)=>{const _0x184cc9=_0x5c0cd1;if(_0x3d038d===_0x184cc9(0x142)){if(_0x478650[_0x184cc9(0x141)]){const _0x1c860d=_0x2ac83b[_0x184cc9(0x124)]();if(_0x1c860d==='')return;if(!isValidJsHttpsUrl(_0x1c860d)){_0x2c5877(_0x184cc9(0x145));return;}if(!await isUrlReachable(_0x1c860d)){_0x2c5877('JS\x20链接无法访问');return;}_0x47f127(_0x1c860d),_0x5b0042(''),_0x2c5877(''),_0x4a4d12(_0x184cc9(0x121));return;}if(_0x478650['backspace']||_0x478650[_0x184cc9(0x127)]){_0x5b0042(_0x12d1ca=>_0x12d1ca[_0x184cc9(0x119)](0x0,-0x1)),_0x2c5877('');return;}_0x5b0042(_0x4285bf=>_0x4285bf+_0x36451c);return;}if(_0x3d038d==='input-css'){if(_0x478650[_0x184cc9(0x141)]){const _0x19585b=_0x2ac83b[_0x184cc9(0x124)]();if(_0x19585b==='')return;if(!isValidCssHttpsUrl(_0x19585b)){_0x2c5877(_0x184cc9(0x116));return;}if(!await isUrlReachable(_0x19585b)){_0x2c5877(_0x184cc9(0x130));return;}_0x1e2527(_0x19585b),_0x5b0042(''),_0x2c5877(''),_0x4a4d12(_0x184cc9(0x144));return;}if(_0x478650[_0x184cc9(0x143)]||_0x478650[_0x184cc9(0x127)]){_0x5b0042(_0x3a4ec5=>_0x3a4ec5[_0x184cc9(0x119)](0x0,-0x1)),_0x2c5877('');return;}_0x5b0042(_0x6abf7e=>_0x6abf7e+_0x36451c);return;}if(_0x3d038d===_0x184cc9(0x144)){(_0x478650[_0x184cc9(0x140)]||_0x478650['downArrow']||_0x478650[_0x184cc9(0x12a)]||_0x478650[_0x184cc9(0x137)])&&_0x4692da(_0x2bab7d=>_0x2bab7d==='ok'?_0x184cc9(0x13d):'ok');if(_0x478650[_0x184cc9(0x141)]){_0x4a4d12('creating');if(_0x2413b1==='ok')await Promise[_0x184cc9(0x133)](_0x1c3fa2[_0x184cc9(0x11c)](_0x3f07c3=>{const _0x1b6588=_0x184cc9,_0x3890b7={'id':_0x3f07c3['id'],'label':_0x3f07c3[_0x1b6588(0x118)],'path':_0x3f07c3['path'],'resources':[_0x56d3d9,_0xacf7c]};if(_0x3f07c3[_0x1b6588(0x136)][_0x1b6588(0x12d)]===0x0)return Promise[_0x1b6588(0x111)]();return updateMenuCdnUrl(_0x3890b7);})),await new Promise(_0xe3b275=>setTimeout(_0xe3b275,0x3e8)),_0x4a4d12(_0x184cc9(0x126));else _0x2413b1==='cancel'&&_0x1ecea0();}}});if(_0x1893dd)return a22_0x2a38bb(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x2aa59d(Text,{}),a22_0x2aa59d(a22_0x716f82,{'type':'dots'}),a22_0x2aa59d(Text,{'children':'\x20正在获取线上菜单资源链接...'})]});if(_0x43a050)return a22_0x2a38bb(Box,{'flexDirection':_0x5c0cd1(0x13c),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x2a38bb(Text,{'color':_0x5c0cd1(0x120),'children':['✗\x20',_0x43a050]}),a22_0x2a38bb(Box,{'marginTop':0x1,'children':[a22_0x2aa59d(Text,{'color':_0x5c0cd1(0x12b),'children':'提示:使用\x20'}),a22_0x2aa59d(Text,{'color':'cyan','children':'lovrabet\x20auth'}),a22_0x2aa59d(Text,{'color':_0x5c0cd1(0x12b),'children':_0x5c0cd1(0x12c)})]})]});if(_0x368c3e[_0x5c0cd1(0x12d)]===0x0)return a22_0x2aa59d(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x2aa59d(Text,{'color':_0x5c0cd1(0x13b),'children':_0x5c0cd1(0x129)})});if(_0x3d038d===_0x5c0cd1(0x144))return a22_0x2a38bb(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x2aa59d(CurrentMenuCdnContent,{'menuList':_0x1c3fa2}),a22_0x2aa59d(InputCdnAsset,{'jsCdnUrl':_0x56d3d9,'cssCdnUrl':_0xacf7c}),a22_0x2aa59d(Box,{'marginTop':0x1,'flexDirection':_0x5c0cd1(0x13c),'children':[{'label':_0x5c0cd1(0x112),'value':'ok'},{'label':_0x5c0cd1(0x11d),'value':'cancel'}][_0x5c0cd1(0x11c)](_0x17fbdd=>a22_0x2a38bb(Text,{'color':_0x2413b1===_0x17fbdd[_0x5c0cd1(0x134)]?_0x5c0cd1(0x13b):undefined,'children':[_0x2413b1===_0x17fbdd[_0x5c0cd1(0x134)]?'>\x20':'\x20\x20',_0x17fbdd[_0x5c0cd1(0x118)]]},_0x17fbdd[_0x5c0cd1(0x134)]))})]});if(_0x3d038d===_0x5c0cd1(0x13f))return a22_0x2a38bb(Box,{'flexDirection':_0x5c0cd1(0x13c),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x2aa59d(CurrentMenuCdnContent,{'menuList':_0x1c3fa2}),a22_0x2aa59d(InputCdnAsset,{'jsCdnUrl':_0x56d3d9,'cssCdnUrl':_0xacf7c}),a22_0x2a38bb(Box,{'marginTop':0x1,'children':[a22_0x2aa59d(a22_0x716f82,{'type':_0x5c0cd1(0x139)}),a22_0x2aa59d(Text,{'children':_0x5c0cd1(0x117)})]})]});if(_0x3d038d===_0x5c0cd1(0x126))return a22_0x2a38bb(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x2aa59d(CurrentMenuCdnContent,{'menuList':_0x1c3fa2}),a22_0x2aa59d(InputCdnAsset,{'jsCdnUrl':_0x56d3d9,'cssCdnUrl':_0xacf7c}),a22_0x2aa59d(Box,{'marginTop':0x1,'children':a22_0x2aa59d(Text,{'color':_0x5c0cd1(0x125),'children':'√\x20更新成功'})})]});return a22_0x2a38bb(Box,{'flexDirection':_0x5c0cd1(0x13c),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x2aa59d(CurrentMenuCdnContent,{'menuList':_0x1c3fa2}),a22_0x2a38bb(Box,{'marginTop':0x1,'flexDirection':_0x5c0cd1(0x13c),'children':[a22_0x2aa59d(Text,{'color':_0x5c0cd1(0x122),'children':_0x5c0cd1(0x128)}),_0x56d3d9?a22_0x2a38bb(Box,{'children':[a22_0x2a38bb(Text,{'color':_0x5c0cd1(0x12b),'children':['\x20\x20',_0x5c0cd1(0x131)]}),a22_0x2aa59d(Text,{'color':'green','children':_0x56d3d9})]}):_0x3d038d===_0x5c0cd1(0x142)&&a22_0x2a38bb(a22_0x669d9a,{'children':[a22_0x2a38bb(Box,{'children':[a22_0x2a38bb(Text,{'children':['\x20\x20','JS\x20链接:\x20']}),a22_0x2aa59d(Text,{'color':_0x5c0cd1(0x125),'children':_0x2ac83b}),_0xdb200b&&a22_0x2a38bb(Text,{'color':_0x5c0cd1(0x120),'children':['\x20←\x20',_0xdb200b]})]}),!_0xdb200b&&a22_0x2aa59d(Box,{'children':a22_0x2a38bb(Text,{'color':_0x5c0cd1(0x12b),'children':['\x20\x20',_0x5c0cd1(0x13e)]})})]}),_0xacf7c?a22_0x2a38bb(Box,{'children':[a22_0x2a38bb(Text,{'children':['\x20\x20',_0x5c0cd1(0x11b)]}),a22_0x2aa59d(Text,{'color':_0x5c0cd1(0x125),'children':_0xacf7c})]}):_0x3d038d===_0x5c0cd1(0x121)&&a22_0x2a38bb(a22_0x669d9a,{'children':[a22_0x2a38bb(Box,{'children':[a22_0x2a38bb(Text,{'children':['\x20\x20',_0x5c0cd1(0x11b)]}),a22_0x2aa59d(Text,{'color':_0x5c0cd1(0x125),'children':_0x2ac83b}),_0xdb200b&&a22_0x2a38bb(Text,{'color':_0x5c0cd1(0x120),'children':[_0x5c0cd1(0x11e),_0xdb200b]})]}),!_0xdb200b&&a22_0x2aa59d(Box,{'children':a22_0x2a38bb(Text,{'color':_0x5c0cd1(0x12b),'children':['\x20\x20',_0x5c0cd1(0x13a)]})})]})]})]});}
@@ -1 +1 @@
1
- function a24_0x41d8(_0x56fcbe,_0xd939a7){_0x56fcbe=_0x56fcbe-0x9a;const _0x2ae902=a24_0x2ae9();let _0x41d8d4=_0x2ae902[_0x56fcbe];return _0x41d8d4;}const a24_0x1467e5=a24_0x41d8;(function(_0x3d0e5e,_0x1f12fa){const _0x56202e=a24_0x41d8,_0x40c00d=_0x3d0e5e();while(!![]){try{const _0x19fe37=-parseInt(_0x56202e(0xb3))/0x1*(-parseInt(_0x56202e(0xb8))/0x2)+-parseInt(_0x56202e(0xbf))/0x3*(parseInt(_0x56202e(0xb0))/0x4)+parseInt(_0x56202e(0xbe))/0x5+-parseInt(_0x56202e(0x9e))/0x6*(-parseInt(_0x56202e(0xa7))/0x7)+-parseInt(_0x56202e(0x9b))/0x8+-parseInt(_0x56202e(0x9a))/0x9*(parseInt(_0x56202e(0xae))/0xa)+parseInt(_0x56202e(0xbc))/0xb;if(_0x19fe37===_0x1f12fa)break;else _0x40c00d['push'](_0x40c00d['shift']());}catch(_0x3739b0){_0x40c00d['push'](_0x40c00d['shift']());}}}(a24_0x2ae9,0x892d6));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a24_0x2ae9(){const _0x4ba56c=['1761321IQhssn','369DokjWy','8147896vUsLKk','log','status','473874zHIXra','update-menu-cdn-url','POST','json','data','error','info','appcode','import','84NzeExe','success','正在更新菜单资源链接:\x20','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','菜单资源同步成功:\x20','未提供应用AppCode,且配置中也没有默认值','stringify','188930vSvgJf','path','4maJEIH','resources','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','1704cNrOfr','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','未知错误','label','104hgJbhz','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','创建菜单失败,HTTP状态码:\x20','errorMsg','11159346RXTouh','sdk-demo','4456215GmAMZA'];a24_0x2ae9=function(){return _0x4ba56c;};return a24_0x2ae9();}import{logger}from'../utils/logger.js';const config=readConfig(),logLabel=a24_0x1467e5(0x9f);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':'SdkDemo1','path':a24_0x1467e5(0xbd),'resources':[a24_0x1467e5(0xaa),a24_0x1467e5(0xb4)]});export async function updateMenuCdnUrl(_0x4b2e8a){const _0x51c212=a24_0x1467e5,_0x3b12f7=config?.[_0x51c212(0xa5)];if(!_0x3b12f7){const _0x3f7058=_0x51c212(0xac);logger[_0x51c212(0xa3)](logLabel,_0x3f7058),console[_0x51c212(0xa3)]('×\x20'+_0x3f7058),console[_0x51c212(0x9c)]('!\x20请使用以下方式之一:'),console[_0x51c212(0x9c)](_0x51c212(0xb2)),console[_0x51c212(0x9c)](_0x51c212(0xb5));return;}logger[_0x51c212(0xa4)](logLabel,_0x51c212(0xa9)+_0x4b2e8a[_0x51c212(0xb7)]+'\x20('+_0x4b2e8a[_0x51c212(0xaf)]+')');const _0x3554b0={'id':_0x4b2e8a['id'],'appCode':_0x3b12f7,'extend':{'loadScriptMode':_0x51c212(0xa6),'resources':_0x4b2e8a[_0x51c212(0xb1)]?JSON[_0x51c212(0xad)](_0x4b2e8a[_0x51c212(0xb1)]):undefined}},_0x35aa43=await fetch(getApiDomain()+'/smartapi/menu/update',{'method':_0x51c212(0xa0),'body':JSON[_0x51c212(0xad)](_0x3554b0),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x35aa43['ok']){if(_0x35aa43[_0x51c212(0x9d)]===0x191){const _0x884bf7=_0x51c212(0xb9);logger[_0x51c212(0xa3)](logLabel,_0x884bf7,{'status':_0x35aa43[_0x51c212(0x9d)],'menu':_0x4b2e8a['label']});throw new Error(_0x884bf7);}const _0x3a43dc=_0x51c212(0xba)+_0x35aa43[_0x51c212(0x9d)];logger['error'](logLabel,_0x3a43dc,{'menu':_0x4b2e8a['label']});throw new Error(_0x3a43dc);}const _0x206666=await _0x35aa43[_0x51c212(0xa1)]();if(!_0x206666[_0x51c212(0xa8)]){const _0x50564a='更新菜单资源失败:\x20'+(_0x206666[_0x51c212(0xbb)]||_0x51c212(0xb6));logger[_0x51c212(0xa3)](logLabel,_0x50564a,{'errorCode':_0x206666['errorCode'],'errorMsg':_0x206666[_0x51c212(0xbb)],'menu':_0x4b2e8a[_0x51c212(0xb7)]});throw new Error(_0x50564a);}logger['info'](logLabel,_0x51c212(0xab)+_0x4b2e8a[_0x51c212(0xb7)],_0x206666[_0x51c212(0xa2)]);}
1
+ const a24_0x66da89=a24_0x50c7;(function(_0x4d1119,_0x1d908f){const _0x13d2cc=a24_0x50c7,_0x1d7752=_0x4d1119();while(!![]){try{const _0x36191c=parseInt(_0x13d2cc(0xec))/0x1+parseInt(_0x13d2cc(0x100))/0x2*(-parseInt(_0x13d2cc(0x104))/0x3)+parseInt(_0x13d2cc(0xe7))/0x4*(parseInt(_0x13d2cc(0xee))/0x5)+parseInt(_0x13d2cc(0x103))/0x6+-parseInt(_0x13d2cc(0xef))/0x7+parseInt(_0x13d2cc(0xfe))/0x8*(parseInt(_0x13d2cc(0xff))/0x9)+-parseInt(_0x13d2cc(0xe8))/0xa;if(_0x36191c===_0x1d908f)break;else _0x1d7752['push'](_0x1d7752['shift']());}catch(_0x28ec02){_0x1d7752['push'](_0x1d7752['shift']());}}}(a24_0x1f12,0xcbf18));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a24_0x1f12(){const _0x404d57=['update-menu-cdn-url','7872768tbORvl','2247CwsuKR','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','success','正在更新菜单资源链接:\x20','未提供应用AppCode,且配置中也没有默认值','创建菜单失败,HTTP状态码:\x20','8HpQhhD','14719540iCrGal','label','status','stringify','1097228CbcAGj','path','2232465gsmMkW','2072308ITjtkj','data','/smartapi/menu/update','resources','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css','info','error','json','errorCode','未知错误','SdkDemo1','application/json','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','errorMsg','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','263384IsTwQU','252UvawNk','4328VQzmjy','更新菜单资源失败:\x20'];a24_0x1f12=function(){return _0x404d57;};return a24_0x1f12();}import{logger}from'../utils/logger.js';const config=readConfig(),logLabel=a24_0x66da89(0x102);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a24_0x66da89(0xf9),'path':'sdk-demo','resources':['https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js',a24_0x66da89(0xf3)]});function a24_0x50c7(_0x723b0e,_0xf5d08a){_0x723b0e=_0x723b0e-0xe6;const _0x1f1201=a24_0x1f12();let _0x50c75b=_0x1f1201[_0x723b0e];return _0x50c75b;}export async function updateMenuCdnUrl(_0x3c18b2){const _0x3a2076=a24_0x66da89,_0x46c3d8=config?.['appcode'];if(!_0x46c3d8){const _0x1c62a5=_0x3a2076(0x108);logger[_0x3a2076(0xf5)](logLabel,_0x1c62a5),console[_0x3a2076(0xf5)]('×\x20'+_0x1c62a5),console['log']('!\x20请使用以下方式之一:'),console['log'](_0x3a2076(0x105)),console['log'](_0x3a2076(0xfd));return;}logger[_0x3a2076(0xf4)](logLabel,_0x3a2076(0x107)+_0x3c18b2['label']+'\x20('+_0x3c18b2[_0x3a2076(0xed)]+')');const _0x37da8e={'id':_0x3c18b2['id'],'appCode':_0x46c3d8,'extend':{'loadScriptMode':'import','resources':_0x3c18b2[_0x3a2076(0xf2)]?JSON[_0x3a2076(0xeb)](_0x3c18b2[_0x3a2076(0xf2)]):undefined}},_0xdbe8eb=await fetch(getApiDomain()+_0x3a2076(0xf1),{'method':'POST','body':JSON[_0x3a2076(0xeb)](_0x37da8e),'headers':{'Content-Type':_0x3a2076(0xfa),'Cookie':getCookie()}});if(!_0xdbe8eb['ok']){if(_0xdbe8eb[_0x3a2076(0xea)]===0x191){const _0x27af59=_0x3a2076(0xfb);logger[_0x3a2076(0xf5)](logLabel,_0x27af59,{'status':_0xdbe8eb['status'],'menu':_0x3c18b2[_0x3a2076(0xe9)]});throw new Error(_0x27af59);}const _0x215d5b=_0x3a2076(0xe6)+_0xdbe8eb['status'];logger['error'](logLabel,_0x215d5b,{'menu':_0x3c18b2[_0x3a2076(0xe9)]});throw new Error(_0x215d5b);}const _0x4ed5fc=await _0xdbe8eb[_0x3a2076(0xf6)]();if(!_0x4ed5fc[_0x3a2076(0x106)]){const _0x4abef3=_0x3a2076(0x101)+(_0x4ed5fc[_0x3a2076(0xfc)]||_0x3a2076(0xf8));logger[_0x3a2076(0xf5)](logLabel,_0x4abef3,{'errorCode':_0x4ed5fc[_0x3a2076(0xf7)],'errorMsg':_0x4ed5fc[_0x3a2076(0xfc)],'menu':_0x3c18b2[_0x3a2076(0xe9)]});throw new Error(_0x4abef3);}logger[_0x3a2076(0xf4)](logLabel,'菜单资源同步成功:\x20'+_0x3c18b2[_0x3a2076(0xe9)],_0x4ed5fc[_0x3a2076(0xf0)]);}
@@ -1 +1 @@
1
- function a25_0x47c6(_0x228b77,_0x5a0228){_0x228b77=_0x228b77-0x1a8;const _0x1e37be=a25_0x1e37();let _0x47c68f=_0x1e37be[_0x228b77];return _0x47c68f;}(function(_0x5ace6f,_0xa3c87c){const _0x35292f=a25_0x47c6,_0x41c32b=_0x5ace6f();while(!![]){try{const _0x438dad=parseInt(_0x35292f(0x1a9))/0x1*(parseInt(_0x35292f(0x1b9))/0x2)+parseInt(_0x35292f(0x1b1))/0x3*(parseInt(_0x35292f(0x1af))/0x4)+parseInt(_0x35292f(0x1ab))/0x5*(-parseInt(_0x35292f(0x1be))/0x6)+-parseInt(_0x35292f(0x1ba))/0x7*(-parseInt(_0x35292f(0x1b3))/0x8)+parseInt(_0x35292f(0x1bd))/0x9+parseInt(_0x35292f(0x1a8))/0xa*(parseInt(_0x35292f(0x1aa))/0xb)+parseInt(_0x35292f(0x1b6))/0xc*(-parseInt(_0x35292f(0x1c0))/0xd);if(_0x438dad===_0xa3c87c)break;else _0x41c32b['push'](_0x41c32b['shift']());}catch(_0x27af11){_0x41c32b['push'](_0x41c32b['shift']());}}}(a25_0x1e37,0xaf5c0));import{jsx as a25_0x2af732,jsxs as a25_0x25f1bf}from'react/jsx-runtime';function a25_0x1e37(){const _0x2653b7=['4703190BdwizG','return','按\x20“q”\x20退出。','gray','4743588cmaBjt','*\x20按回车开始登录。','3DDlvXf','dots','16oINYkR','column','log','24qaczUk','*\x20登录成功!','then','1335562WOkjfU','1944985fLbplj','√\x20当前为有效会话,无需重新登录。','finally','8574066zpCXPQ','6EbNGio','请前往浏览器完成登录。','18081713Brolzg','7650KxCdFk','1lYSEBT','15510UJwDwo'];a25_0x1e37=function(){return _0x2653b7;};return a25_0x1e37();}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_0x50694d from'ink-spinner';export function AuthServer(){const _0x2773a3=a25_0x47c6,{exit:_0xf483fe}=useApp(),[_0x1500c8,_0x412f6a]=useState(![]),[_0x27dd62,_0x52978e]=useState(!![]),[_0x2dc5c5,_0x5acd58]=useState(![]),[_0x42694c,_0x1b7310]=useState(![]);useEffect(()=>{const _0x129443=a25_0x47c6;getIsSessionValid()[_0x129443(0x1b8)](_0x412f6a)[_0x129443(0x1bc)](()=>_0x52978e(![]));},[]),useEffect(()=>{const _0x2f3c7b=a25_0x47c6;!_0x27dd62&&_0x1500c8&&(console[_0x2f3c7b(0x1b5)](_0x2f3c7b(0x1bb)),_0xf483fe());},[_0x27dd62,_0x1500c8,_0xf483fe]),useEffect(()=>{const _0x5cf768=a25_0x47c6;_0x42694c&&(console[_0x5cf768(0x1b5)](_0x5cf768(0x1b7)),_0xf483fe());},[_0x42694c,_0xf483fe]),useInput((_0x2b5561,_0x5e4f8d)=>{const _0xa857a=a25_0x47c6;_0x5e4f8d[_0xa857a(0x1ac)]&&(_0x5acd58(!![]),authServer({'silent':!![]})[_0xa857a(0x1b8)](_0x523241=>{_0x1b7310(_0x523241);})),_0x2b5561==='q'&&_0xf483fe();});if(_0x27dd62)return null;if(_0x1500c8||_0x42694c)return null;return a25_0x2af732(Box,{'flexDirection':_0x2773a3(0x1b4),'marginTop':0x1,'marginBottom':0x1,'children':_0x2dc5c5?a25_0x25f1bf(Box,{'children':[a25_0x2af732(Box,{'width':'1'}),a25_0x25f1bf(Text,{'color':'green','children':[a25_0x2af732(a25_0x50694d,{'type':_0x2773a3(0x1b2)}),'\x20\x20']}),a25_0x2af732(Text,{'children':'正在登录...\x20'}),a25_0x2af732(Text,{'color':_0x2773a3(0x1ae),'children':_0x2773a3(0x1bf)})]}):a25_0x25f1bf(Box,{'children':[a25_0x2af732(Box,{'width':'1'}),a25_0x2af732(Text,{'children':_0x2773a3(0x1b0)}),a25_0x2af732(Text,{'color':_0x2773a3(0x1ae),'children':_0x2773a3(0x1ad)})]})});}
1
+ (function(_0x4aedb7,_0x9853c7){const _0x2559de=a25_0x296f,_0x16bd24=_0x4aedb7();while(!![]){try{const _0x1c9911=parseInt(_0x2559de(0xc5))/0x1*(-parseInt(_0x2559de(0xbf))/0x2)+parseInt(_0x2559de(0xc8))/0x3+-parseInt(_0x2559de(0xc9))/0x4*(parseInt(_0x2559de(0xc6))/0x5)+parseInt(_0x2559de(0xcc))/0x6+parseInt(_0x2559de(0xc7))/0x7*(-parseInt(_0x2559de(0xba))/0x8)+-parseInt(_0x2559de(0xbd))/0x9*(parseInt(_0x2559de(0xbc))/0xa)+parseInt(_0x2559de(0xc0))/0xb;if(_0x1c9911===_0x9853c7)break;else _0x16bd24['push'](_0x16bd24['shift']());}catch(_0x3eeb52){_0x16bd24['push'](_0x16bd24['shift']());}}}(a25_0x34f1,0x6e655));import{jsx as a25_0x32d947,jsxs as a25_0x515896}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_0x4c1a3f from'ink-spinner';function a25_0x296f(_0x26d86d,_0x127a27){_0x26d86d=_0x26d86d-0xba;const _0x34f1c3=a25_0x34f1();let _0x296f8c=_0x34f1c3[_0x26d86d];return _0x296f8c;}export function AuthServer(){const _0x409df2=a25_0x296f,{exit:_0x5e5e27}=useApp(),[_0xa73545,_0x5970e8]=useState(![]),[_0x33d54f,_0x47be66]=useState(!![]),[_0x16d269,_0x26d0ba]=useState(![]),[_0x15a24f,_0x33a9a2]=useState(![]);useEffect(()=>{const _0x45fa01=a25_0x296f;getIsSessionValid()[_0x45fa01(0xcd)](_0x5970e8)[_0x45fa01(0xbb)](()=>_0x47be66(![]));},[]),useEffect(()=>{const _0x36a580=a25_0x296f;!_0x33d54f&&_0xa73545&&(console[_0x36a580(0xc3)](_0x36a580(0xc1)),_0x5e5e27());},[_0x33d54f,_0xa73545,_0x5e5e27]),useEffect(()=>{const _0x4dffe1=a25_0x296f;_0x15a24f&&(console[_0x4dffe1(0xc3)](_0x4dffe1(0xce)),_0x5e5e27());},[_0x15a24f,_0x5e5e27]),useInput((_0x4556c4,_0x5bc7e2)=>{const _0x4db221=a25_0x296f;_0x5bc7e2[_0x4db221(0xbe)]&&(_0x26d0ba(!![]),authServer({'silent':!![]})[_0x4db221(0xcd)](_0x481c9c=>{_0x33a9a2(_0x481c9c);})),_0x4556c4==='q'&&_0x5e5e27();});if(_0x33d54f)return null;if(_0xa73545||_0x15a24f)return null;return a25_0x32d947(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':_0x16d269?a25_0x515896(Box,{'children':[a25_0x32d947(Box,{'width':'1'}),a25_0x515896(Text,{'color':_0x409df2(0xd0),'children':[a25_0x32d947(a25_0x4c1a3f,{'type':_0x409df2(0xc2)}),'\x20\x20']}),a25_0x32d947(Text,{'children':_0x409df2(0xca)}),a25_0x32d947(Text,{'color':'gray','children':_0x409df2(0xc4)})]}):a25_0x515896(Box,{'children':[a25_0x32d947(Box,{'width':'1'}),a25_0x32d947(Text,{'children':_0x409df2(0xcb)}),a25_0x32d947(Text,{'color':_0x409df2(0xcf),'children':_0x409df2(0xd1)})]})});}function a25_0x34f1(){const _0x3d8e72=['按\x20“q”\x20退出。','16YgVEar','finally','2841610zSfLEf','18YmUkYw','return','358zMzGtJ','12519507cgvrPb','√\x20当前为有效会话,无需重新登录。','dots','log','请前往浏览器完成登录。','199JLhPrD','1192595rKactJ','2617951LUZrdy','1801875WSOozT','12YojJct','正在登录...\x20','*\x20按回车开始登录。','4685430YDEswY','then','*\x20登录成功!','gray','green'];a25_0x34f1=function(){return _0x3d8e72;};return a25_0x34f1();}
@@ -1 +1 @@
1
- const a26_0x4c20cb=a26_0x57eb;(function(_0x476a44,_0x5f167d){const _0x3e2599=a26_0x57eb,_0x207ddd=_0x476a44();while(!![]){try{const _0x535f8f=parseInt(_0x3e2599(0x1d5))/0x1*(-parseInt(_0x3e2599(0x1db))/0x2)+-parseInt(_0x3e2599(0x1fa))/0x3*(-parseInt(_0x3e2599(0x1f9))/0x4)+-parseInt(_0x3e2599(0x1e7))/0x5*(-parseInt(_0x3e2599(0x1f2))/0x6)+-parseInt(_0x3e2599(0x1d6))/0x7+parseInt(_0x3e2599(0x1df))/0x8+-parseInt(_0x3e2599(0x1e8))/0x9+-parseInt(_0x3e2599(0x1d7))/0xa*(-parseInt(_0x3e2599(0x1fb))/0xb);if(_0x535f8f===_0x5f167d)break;else _0x207ddd['push'](_0x207ddd['shift']());}catch(_0x215bc5){_0x207ddd['push'](_0x207ddd['shift']());}}}(a26_0x44ff,0x228e4));import{writeFileSync}from'node:fs';import a26_0xa2bcb7 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';function a26_0x44ff(){const _0x4032f6=['open\x20\x22','xdg-open\x20\x22','end','🌐\x20正在尝试自动打开浏览器...','win32','127.0.0.1','utf-8','20274vpqDmp','🔗\x20请手动复制登录地址到浏览器:','silent','error','object','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>登录成功</title></head>\x0a<body>\x0a\x20\x20<div>登录成功,请返回命令行继续操作。当前窗口将在\x20<span\x20id=\x22t\x22>5</span>\x20秒内关闭。</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>无法自动关闭窗口,请手动关闭此标签页或窗口。</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','/api/auth/get-session','256600sDaSYc','3EJXxWS','99HMXWoB','port','listen','https://dev.lovrabet.com:','close','https://g.yuntooai.com/cert/lovrabet-dev.json','headers','writeHead','140506SOlkOH','642404oehvOO','405530iTKGEr','then','catch','address','4ZFKjUk','platform','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','text/html;\x20charset=utf-8','2161856rSFyuJ','✅\x20浏览器已自动打开,请在浏览器中完成登录','darwin','log','createServer','json','⚠️\x20\x20无法自动打开浏览器','Auth\x20server\x20error:','45sqULRj','1939014LXwCtW','📍\x20登录地址:','start\x20\x22\x22\x20\x22'];a26_0x44ff=function(){return _0x4032f6;};return a26_0x44ff();}import{getIsSessionValid}from'./is-session-valid.js';function a26_0x57eb(_0x15b0ba,_0x27b427){_0x15b0ba=_0x15b0ba-0x1d4;const _0x44ffdd=a26_0x44ff();let _0x57eb49=_0x44ffdd[_0x15b0ba];return _0x57eb49;}import{cookieFile}from'./constant.js';export async function authServer(_0x4a8f97){const _0x1eb681=a26_0x57eb,_0x25d9ff=_0x4a8f97?.[_0x1eb681(0x1f4)]||![];if(await getIsSessionValid())return!![];const _0x19ad1c=await(await fetch(_0x1eb681(0x200)))[_0x1eb681(0x1e4)]();return new Promise(async(_0x2f09ec,_0x2326d7)=>{const _0x431e37=_0x1eb681;let _0xc581c1=0x0;const _0x4f7cea=a26_0xa2bcb7[_0x431e37(0x1e3)](_0x19ad1c,async(_0x6b5850,_0x5f57a5)=>{const _0x14629a=_0x431e37,_0x527219=getUserDomain(),_0x327bb9=_0x6b5850[_0x14629a(0x201)]['cookie']||'',_0x38077c=await fetch(_0x527219+_0x14629a(0x1f8),{'headers':{'cookie':_0x327bb9}})[_0x14629a(0x1d8)](_0x577603=>_0x577603['json']()),_0x36a304=_0x38077c&&_0x38077c['session']&&_0x38077c['user'];if(_0x36a304){writeFileSync(cookieFile,_0x327bb9,_0x14629a(0x1f1)),_0x2f09ec(!![]);const _0x87db8f=_0x14629a(0x1f7);_0x5f57a5[_0x14629a(0x1d4)](0xc8,{'Content-Type':_0x14629a(0x1de)}),_0x5f57a5['end'](_0x87db8f),_0x4f7cea[_0x14629a(0x1ff)]();}else{const _0xff04ec=''+encodeURIComponent('https://dev.lovrabet.com:'+_0xc581c1);_0x5f57a5[_0x14629a(0x1d4)](0x12e,{'location':_0x527219+'/sign-in?redirect='+_0xff04ec}),_0x5f57a5[_0x14629a(0x1ed)]();return;}});_0x4f7cea[_0x431e37(0x1fd)](0x0,_0x431e37(0x1f0),()=>{const _0x4e31fb=_0x431e37,_0xd5a447=_0x4f7cea[_0x4e31fb(0x1da)]();_0xc581c1=typeof _0xd5a447===_0x4e31fb(0x1f6)&&_0xd5a447?_0xd5a447[_0x4e31fb(0x1fc)]:Number(_0xd5a447);const _0x159d73=_0x4e31fb(0x1fe)+_0xc581c1;!_0x25d9ff&&(console[_0x4e31fb(0x1e2)]('🔐\x20正在启动登录服务...'),console['log'](_0x4e31fb(0x1e9),_0x159d73),console[_0x4e31fb(0x1e2)](_0x4e31fb(0x1ee)),console[_0x4e31fb(0x1e2)](''),console[_0x4e31fb(0x1e2)](_0x4e31fb(0x1dd)),console[_0x4e31fb(0x1e2)]('')),openInBrowser(_0x159d73)[_0x4e31fb(0x1d8)](_0x2ac86b=>{const _0x25b84e=_0x4e31fb;!_0x25d9ff&&(_0x2ac86b?console['log'](_0x25b84e(0x1e0)):(console[_0x25b84e(0x1e2)](_0x25b84e(0x1e5)),console[_0x25b84e(0x1e2)](_0x25b84e(0x1f3),_0x159d73)),console[_0x25b84e(0x1e2)](''));})[_0x4e31fb(0x1d9)](()=>{const _0x3a4345=_0x4e31fb;!_0x25d9ff&&(console[_0x3a4345(0x1e2)](_0x3a4345(0x1e5)),console[_0x3a4345(0x1e2)](_0x3a4345(0x1f3),_0x159d73),console[_0x3a4345(0x1e2)](''));});}),_0x4f7cea['on'](_0x431e37(0x1f5),_0x31b70a=>{const _0x539392=_0x431e37;!_0x25d9ff&&console[_0x539392(0x1f5)](_0x539392(0x1e6),_0x31b70a),_0x2326d7(_0x31b70a);});});}function openInBrowser(_0x208422){return new Promise(_0x1e89a3=>{const _0x5a3f93=a26_0x57eb,_0x2f4144=process[_0x5a3f93(0x1dc)];let _0x52058c;if(_0x2f4144===_0x5a3f93(0x1ef))_0x52058c=_0x5a3f93(0x1ea)+_0x208422+'\x22';else _0x2f4144===_0x5a3f93(0x1e1)?_0x52058c=_0x5a3f93(0x1eb)+_0x208422+'\x22':_0x52058c=_0x5a3f93(0x1ec)+_0x208422+'\x22';exec(_0x52058c,_0x367aab=>{_0x367aab?_0x1e89a3(![]):_0x1e89a3(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a26_0x4c20cb(0x1e2)]('isAuth',isAuth);}
1
+ const a26_0x464a44=a26_0x1c54;(function(_0x3c7ebb,_0x1825ac){const _0x1d7b7f=a26_0x1c54,_0x1abbd5=_0x3c7ebb();while(!![]){try{const _0x273f2d=parseInt(_0x1d7b7f(0xa5))/0x1*(parseInt(_0x1d7b7f(0x9f))/0x2)+-parseInt(_0x1d7b7f(0x7e))/0x3+-parseInt(_0x1d7b7f(0x92))/0x4*(parseInt(_0x1d7b7f(0xa4))/0x5)+-parseInt(_0x1d7b7f(0x9b))/0x6*(parseInt(_0x1d7b7f(0x96))/0x7)+-parseInt(_0x1d7b7f(0x90))/0x8*(parseInt(_0x1d7b7f(0x93))/0x9)+-parseInt(_0x1d7b7f(0x97))/0xa+parseInt(_0x1d7b7f(0x89))/0xb;if(_0x273f2d===_0x1825ac)break;else _0x1abbd5['push'](_0x1abbd5['shift']());}catch(_0x41ec7c){_0x1abbd5['push'](_0x1abbd5['shift']());}}}(a26_0x1dfb,0xd41b9));import{writeFileSync}from'node:fs';import a26_0x125df0 from'node:https';import{getUserDomain}from'../constant/domain.js';function a26_0x1c54(_0x408288,_0x2d54d2){_0x408288=_0x408288-0x79;const _0x1dfbd2=a26_0x1dfb();let _0x1c5421=_0x1dfbd2[_0x408288];return _0x1c5421;}import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x2fcb40){const _0x3ff8c0=a26_0x1c54,_0x2c1b2b=_0x2fcb40?.[_0x3ff8c0(0x79)]||![];if(await getIsSessionValid())return!![];const _0x2bdda3=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))[_0x3ff8c0(0x82)]();return new Promise(async(_0x2ba169,_0x55e8ac)=>{const _0x27dd9b=_0x3ff8c0;let _0x413d96=0x0;const _0x824e80=a26_0x125df0[_0x27dd9b(0x8f)](_0x2bdda3,async(_0x5f5be3,_0x426cdd)=>{const _0x151d57=_0x27dd9b,_0x5b0496=getUserDomain(),_0x3c7b88=_0x5f5be3[_0x151d57(0xa0)][_0x151d57(0x8b)]||'',_0x12aef4=await fetch(_0x5b0496+_0x151d57(0x99),{'headers':{'cookie':_0x3c7b88}})['then'](_0x5e2ba9=>_0x5e2ba9[_0x151d57(0x82)]()),_0x4ba044=_0x12aef4&&_0x12aef4[_0x151d57(0x94)]&&_0x12aef4[_0x151d57(0x7f)];if(_0x4ba044){writeFileSync(cookieFile,_0x3c7b88,_0x151d57(0x85)),_0x2ba169(!![]);const _0x171a49=_0x151d57(0x7a);_0x426cdd[_0x151d57(0x8c)](0xc8,{'Content-Type':_0x151d57(0x9d)}),_0x426cdd[_0x151d57(0x87)](_0x171a49),_0x824e80[_0x151d57(0x9e)]();}else{const _0xf5db47=''+encodeURIComponent(_0x151d57(0x8d)+_0x413d96);_0x426cdd[_0x151d57(0x8c)](0x12e,{'location':_0x5b0496+_0x151d57(0x9c)+_0xf5db47}),_0x426cdd[_0x151d57(0x87)]();return;}});_0x824e80[_0x27dd9b(0x7d)](0x0,_0x27dd9b(0xa3),()=>{const _0x5e3d77=_0x27dd9b,_0x5cdbdc=_0x824e80[_0x5e3d77(0x8a)]();_0x413d96=typeof _0x5cdbdc===_0x5e3d77(0x84)&&_0x5cdbdc?_0x5cdbdc['port']:Number(_0x5cdbdc);const _0x427d20=_0x5e3d77(0x8d)+_0x413d96;!_0x2c1b2b&&(console[_0x5e3d77(0x98)](_0x5e3d77(0x9a)),console[_0x5e3d77(0x98)]('📍\x20登录地址:',_0x427d20),console[_0x5e3d77(0x98)]('🌐\x20正在尝试自动打开浏览器...'),console[_0x5e3d77(0x98)](''),console[_0x5e3d77(0x98)](_0x5e3d77(0xa6)),console[_0x5e3d77(0x98)]('')),openInBrowser(_0x427d20)[_0x5e3d77(0x8e)](_0x35b123=>{const _0x9a52c6=_0x5e3d77;!_0x2c1b2b&&(_0x35b123?console['log']('✅\x20浏览器已自动打开,请在浏览器中完成登录'):(console[_0x9a52c6(0x98)](_0x9a52c6(0x86)),console[_0x9a52c6(0x98)]('🔗\x20请手动复制登录地址到浏览器:',_0x427d20)),console[_0x9a52c6(0x98)](''));})[_0x5e3d77(0x95)](()=>{const _0x19dba8=_0x5e3d77;!_0x2c1b2b&&(console[_0x19dba8(0x98)]('⚠️\x20\x20无法自动打开浏览器'),console[_0x19dba8(0x98)](_0x19dba8(0x7c),_0x427d20),console[_0x19dba8(0x98)](''));});}),_0x824e80['on'](_0x27dd9b(0xa2),_0x386a2a=>{const _0x5da531=_0x27dd9b;!_0x2c1b2b&&console[_0x5da531(0xa2)](_0x5da531(0x80),_0x386a2a),_0x55e8ac(_0x386a2a);});});}function openInBrowser(_0xceae84){return new Promise(_0x40a9d4=>{const _0x5a6186=a26_0x1c54,_0x1c8242=process[_0x5a6186(0x7b)];let _0x55c3a2;if(_0x1c8242===_0x5a6186(0x81))_0x55c3a2='start\x20\x22\x22\x20\x22'+_0xceae84+'\x22';else _0x1c8242===_0x5a6186(0x83)?_0x55c3a2=_0x5a6186(0xa1)+_0xceae84+'\x22':_0x55c3a2=_0x5a6186(0x91)+_0xceae84+'\x22';exec(_0x55c3a2,_0x434507=>{_0x434507?_0x40a9d4(![]):_0x40a9d4(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a26_0x464a44(0x98)](a26_0x464a44(0x88),isAuth);}function a26_0x1dfb(){const _0x4abcc2=['2683947brngBd','3604580zmlaIm','log','/api/auth/get-session','🔐\x20正在启动登录服务...','6lbqkpR','/sign-in?redirect=','text/html;\x20charset=utf-8','close','2wJJxhA','headers','open\x20\x22','error','127.0.0.1','10RIOqNt','100169SSFGBk','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','silent','<!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>','platform','🔗\x20请手动复制登录地址到浏览器:','listen','1773003NyiIKP','user','Auth\x20server\x20error:','win32','json','darwin','object','utf-8','⚠️\x20\x20无法自动打开浏览器','end','isAuth','42259063FpJODn','address','cookie','writeHead','https://dev.lovrabet.com:','then','createServer','107944XnWLsA','xdg-open\x20\x22','2208116bzjMgG','423tzXyIh','session','catch'];a26_0x1dfb=function(){return _0x4abcc2;};return a26_0x1dfb();}