@lovrabet/cli 1.3.4 → 1.4.1-beta.2

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 (88) hide show
  1. package/lib/ai-setup/config.js +1 -1
  2. package/lib/api/api-doc-ui.js +1 -1
  3. package/lib/api/api-doc.js +1 -1
  4. package/lib/api/api-pull-ui.js +1 -1
  5. package/lib/api/fetch-model-list.js +1 -1
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/api/main.js +1 -1
  8. package/lib/api/pull-silent.js +1 -1
  9. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  10. package/lib/app-menu/create-menu.js +1 -1
  11. package/lib/app-menu/get-local-pages.js +1 -1
  12. package/lib/app-menu/get-online-menu-list.js +1 -1
  13. package/lib/app-menu/update-menu.js +1 -0
  14. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  15. package/lib/app-menu/utils.js +1 -1
  16. package/lib/app-menu/valid-url.js +1 -1
  17. package/lib/app-menu-update-cdn/current-content.js +1 -1
  18. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  19. package/lib/app-menu-update-cdn/main.js +1 -1
  20. package/lib/app-menu-update-cdn/update-menu.js +1 -0
  21. package/lib/auth/auth-server-ui.js +1 -1
  22. package/lib/auth/auth-server.js +1 -1
  23. package/lib/auth/constant.js +1 -1
  24. package/lib/auth/get-cookie.js +1 -1
  25. package/lib/auth/is-session-valid.js +1 -1
  26. package/lib/auth/logout.js +1 -1
  27. package/lib/cli-flags.js +1 -1
  28. package/lib/cli.js +1 -1
  29. package/lib/cmd/build-watch.js +1 -1
  30. package/lib/cmd/build.js +1 -1
  31. package/lib/cmd/logs.js +1 -1
  32. package/lib/cmd/preview.js +1 -1
  33. package/lib/cmd/start-execa.js +1 -1
  34. package/lib/cmd/start.js +1 -1
  35. package/lib/config/config-help.js +1 -1
  36. package/lib/config/main.js +1 -1
  37. package/lib/constant/domain.js +1 -1
  38. package/lib/constant/env.js +1 -1
  39. package/lib/create-app/enhanced-guided-create.js +1 -1
  40. package/lib/create-app/format-elapsed.js +1 -1
  41. package/lib/create-app/main.js +1 -1
  42. package/lib/create-app/non-interactive.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/i18n/I18nProvider.js +1 -1
  52. package/lib/i18n/hooks.js +1 -1
  53. package/lib/i18n/index.js +1 -1
  54. package/lib/i18n/locales/en-US.js +1 -1
  55. package/lib/i18n/locales/zh-CN.js +1 -1
  56. package/lib/init/main.js +1 -1
  57. package/lib/mcp/McpInstallUI.js +1 -1
  58. package/lib/mcp/claude.js +1 -1
  59. package/lib/mcp/cursor.js +1 -1
  60. package/lib/mcp/main.js +1 -1
  61. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  62. package/lib/mcp/mcp-installer.js +1 -1
  63. package/lib/skills/main.js +1 -1
  64. package/lib/skills/npx-skills-add.js +1 -0
  65. package/lib/ui/IDESelector.js +1 -1
  66. package/lib/ui/useIDESelection.js +1 -1
  67. package/lib/utils/ai_config.js +1 -1
  68. package/lib/utils/cdn-config.js +1 -1
  69. package/lib/utils/check-sdk-version.js +1 -1
  70. package/lib/utils/cli-version-check.js +1 -1
  71. package/lib/utils/config.js +1 -1
  72. package/lib/utils/copy-directory.js +1 -1
  73. package/lib/utils/file-utils.js +1 -1
  74. package/lib/utils/guides-cdn.js +1 -1
  75. package/lib/utils/http-client.js +1 -1
  76. package/lib/utils/logger.js +1 -1
  77. package/lib/utils/rules-cdn.js +1 -1
  78. package/lib/utils/sleep.js +1 -1
  79. package/lib/utils/template-replacer.js +1 -1
  80. package/package.json +5 -5
  81. package/sidecar/flags.json +10 -0
  82. package/templates/rules/lovrabet_rules.mdc.tpl +891 -0
  83. package/templates/skill/SKILL.md.tpl +120 -0
  84. package/lib/ai-setup/AISetupUI.js +0 -1
  85. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +0 -1
  86. package/lib/skills/SkillInstallUI.js +0 -1
  87. package/lib/skills/skill-install-non-interactive.js +0 -1
  88. package/lib/skills/skill-installer.js +0 -1
@@ -1 +1 @@
1
- const a11_0x19c511=a11_0x4ec6;function a11_0x3ac6(){const _0x4b700f=['cwd','.tsx','4898961TsTYll','match','60MdbDvv','36664XaWxgU','7570760aJyPOd','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','17464CmUXWb','459012QXGXZz','concat','slice','trim','src/pages','3659718QnhHLE','index.tsx','76Pnkpdx','forEach','utf-8','replace','123765bUoFkC','490eziUKe','endsWith'];a11_0x3ac6=function(){return _0x4b700f;};return a11_0x3ac6();}(function(_0x268d43,_0x3bcb00){const _0x10e9e0=a11_0x4ec6,_0x1435cf=_0x268d43();while(!![]){try{const _0x529d9f=parseInt(_0x10e9e0(0x1bd))/0x1+parseInt(_0x10e9e0(0x1bc))/0x2*(-parseInt(_0x10e9e0(0x1b8))/0x3)+parseInt(_0x10e9e0(0x1c4))/0x4*(parseInt(_0x10e9e0(0x1b1))/0x5)+parseInt(_0x10e9e0(0x1c2))/0x6+parseInt(_0x10e9e0(0x1b2))/0x7*(parseInt(_0x10e9e0(0x1b9))/0x8)+-parseInt(_0x10e9e0(0x1b6))/0x9+-parseInt(_0x10e9e0(0x1ba))/0xa;if(_0x529d9f===_0x3bcb00)break;else _0x1435cf['push'](_0x1435cf['shift']());}catch(_0x33847a){_0x1435cf['push'](_0x1435cf['shift']());}}}(a11_0x3ac6,0x5dc25));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a11_0x19c511(0x1b4)](),a11_0x19c511(0x1c1));export function extractTitleFromComment(_0x53523b){const _0x29ad7c=a11_0x19c511;try{const _0x4956a3=readFileSync(_0x53523b,_0x29ad7c(0x1c6)),_0x132502=_0x4956a3[_0x29ad7c(0x1b7)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x132502&&_0x132502[0x1]){const _0x1f93fb=_0x132502[0x1],_0x5b8e2e=_0x1f93fb[_0x29ad7c(0x1b7)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x5b8e2e&&_0x5b8e2e[0x1])return _0x5b8e2e[0x1][_0x29ad7c(0x1c0)]();}let _0x3c53da=null;const _0x5e1b61=_0x4956a3[_0x29ad7c(0x1b7)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x5e1b61&&_0x5e1b61[0x1]&&(_0x3c53da=_0x5e1b61[0x1]);if(!_0x3c53da){const _0xff5c7c=_0x4956a3[_0x29ad7c(0x1b7)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0xff5c7c&&_0xff5c7c[0x1]&&(_0x3c53da=_0xff5c7c[0x1]);}if(_0x3c53da){const _0x29a6be=new RegExp('\x5cb'+_0x3c53da+_0x29ad7c(0x1bb)),_0xe8183e=_0x4956a3[_0x29ad7c(0x1b7)](_0x29a6be);if(_0xe8183e&&_0xe8183e[0x1])return _0xe8183e[0x1];return _0x3c53da;}return null;}catch(_0xbb631e){return null;}}function a11_0x4ec6(_0x2282b0,_0x3db0fb){_0x2282b0=_0x2282b0-0x1b0;const _0x3ac6e2=a11_0x3ac6();let _0x4ec613=_0x3ac6e2[_0x2282b0];return _0x4ec613;}export function getLocalPages(_0x5a080=pagesDir,_0xa9371f=pagesDir){const _0xc1dd0d=a11_0x19c511;let _0x10d837=[];const _0x39aa0d=readdirSync(_0x5a080);return _0x39aa0d[_0xc1dd0d(0x1c5)](_0xef633d=>{const _0x23a21f=_0xc1dd0d,_0x45816c=join(_0x5a080,_0xef633d),_0x1e01b6=statSync(_0x45816c);if(_0x1e01b6&&_0x1e01b6['isDirectory']())_0x10d837=_0x10d837[_0x23a21f(0x1be)](getLocalPages(_0x45816c,_0xa9371f));else{if(_0xef633d[_0x23a21f(0x1b3)](_0x23a21f(0x1b5))){let _0x59e335=relative(_0xa9371f,_0x45816c);_0x59e335[_0x23a21f(0x1b3)](_0x23a21f(0x1c3))?_0x59e335=_0x59e335[_0x23a21f(0x1b0)](/index\.tsx$/,''):_0x59e335=_0x59e335[_0x23a21f(0x1b0)](/\.tsx$/,'');_0x59e335['endsWith']('/')&&(_0x59e335=_0x59e335[_0x23a21f(0x1bf)](0x0,-0x1));const _0x3b0915=extractTitleFromComment(_0x45816c),_0xa7add6=_0x3b0915||_0x59e335;_0x10d837['push']({'path':_0x59e335['replaceAll']('$',':'),'label':_0xa7add6});}}}),_0x10d837['filter'](_0x3229a3=>_0x3229a3['path']!=='');}
1
+ const a10_0x1052e2=a10_0x528f;(function(_0x58cc01,_0x238dbf){const _0x2f50f4=a10_0x528f,_0x330b1c=_0x58cc01();while(!![]){try{const _0x412d98=-parseInt(_0x2f50f4(0xf9))/0x1+-parseInt(_0x2f50f4(0xf0))/0x2*(parseInt(_0x2f50f4(0xed))/0x3)+-parseInt(_0x2f50f4(0xf7))/0x4*(parseInt(_0x2f50f4(0xf5))/0x5)+parseInt(_0x2f50f4(0xf1))/0x6+-parseInt(_0x2f50f4(0xea))/0x7+parseInt(_0x2f50f4(0xee))/0x8*(parseInt(_0x2f50f4(0xeb))/0x9)+-parseInt(_0x2f50f4(0xf4))/0xa*(-parseInt(_0x2f50f4(0xfa))/0xb);if(_0x412d98===_0x238dbf)break;else _0x330b1c['push'](_0x330b1c['shift']());}catch(_0x4c7595){_0x330b1c['push'](_0x330b1c['shift']());}}}(a10_0x36a6,0x7e52a));import{readdirSync,statSync,readFileSync}from'fs';function a10_0x36a6(){const _0x28504e=['410EsKtNp','88210Sorfyg','src/pages','32zdtHwx','slice','417039KtGzin','130889MlEzHI','replace','concat','match','trim','cwd','.tsx','replaceAll','index.tsx','2516262ugNLkX','117BhkROk','utf-8','789303qmJvhw','157368YnVKtE','forEach','2fbxkcA','5727468NbXngv','push','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'];a10_0x36a6=function(){return _0x28504e;};return a10_0x36a6();}import{join,relative,resolve}from'path';const pagesDir=resolve(process[a10_0x1052e2(0xe6)](),a10_0x1052e2(0xf6));export function extractTitleFromComment(_0x4120d8){const _0x4fec08=a10_0x1052e2;try{const _0x1015b7=readFileSync(_0x4120d8,_0x4fec08(0xec)),_0x3bb09c=_0x1015b7[_0x4fec08(0xe4)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x3bb09c&&_0x3bb09c[0x1]){const _0x186764=_0x3bb09c[0x1],_0x2f4bc0=_0x186764['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x2f4bc0&&_0x2f4bc0[0x1])return _0x2f4bc0[0x1][_0x4fec08(0xe5)]();}let _0xd90579=null;const _0x4c1f36=_0x1015b7[_0x4fec08(0xe4)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x4c1f36&&_0x4c1f36[0x1]&&(_0xd90579=_0x4c1f36[0x1]);if(!_0xd90579){const _0xcd0a01=_0x1015b7['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0xcd0a01&&_0xcd0a01[0x1]&&(_0xd90579=_0xcd0a01[0x1]);}if(_0xd90579){const _0x22d4d0=new RegExp('\x5cb'+_0xd90579+_0x4fec08(0xf3)),_0x231524=_0x1015b7[_0x4fec08(0xe4)](_0x22d4d0);if(_0x231524&&_0x231524[0x1])return _0x231524[0x1];return _0xd90579;}return null;}catch(_0x207ad9){return null;}}function a10_0x528f(_0x490b5b,_0x1f2e43){_0x490b5b=_0x490b5b-0xe2;const _0x36a68f=a10_0x36a6();let _0x528f65=_0x36a68f[_0x490b5b];return _0x528f65;}export function getLocalPages(_0x270453=pagesDir,_0x42fd12=pagesDir){const _0x584906=a10_0x1052e2;let _0x5b7a6b=[];const _0x7b774c=readdirSync(_0x270453);return _0x7b774c[_0x584906(0xef)](_0x181292=>{const _0x37c5b2=_0x584906,_0x2462dd=join(_0x270453,_0x181292),_0x3065a4=statSync(_0x2462dd);if(_0x3065a4&&_0x3065a4['isDirectory']())_0x5b7a6b=_0x5b7a6b[_0x37c5b2(0xe3)](getLocalPages(_0x2462dd,_0x42fd12));else{if(_0x181292['endsWith'](_0x37c5b2(0xe7))){let _0x45f7e7=relative(_0x42fd12,_0x2462dd);_0x45f7e7['endsWith'](_0x37c5b2(0xe9))?_0x45f7e7=_0x45f7e7[_0x37c5b2(0xe2)](/index\.tsx$/,''):_0x45f7e7=_0x45f7e7[_0x37c5b2(0xe2)](/\.tsx$/,'');_0x45f7e7['endsWith']('/')&&(_0x45f7e7=_0x45f7e7[_0x37c5b2(0xf8)](0x0,-0x1));const _0x2f5cec=extractTitleFromComment(_0x2462dd),_0x2c2701=_0x2f5cec||_0x45f7e7;_0x5b7a6b[_0x37c5b2(0xf2)]({'path':_0x45f7e7[_0x37c5b2(0xe8)]('$',':'),'label':_0x2c2701});}}}),_0x5b7a6b['filter'](_0x37d215=>_0x37d215['path']!=='');}
@@ -1 +1 @@
1
- (function(_0x161155,_0x53a0c1){const _0x4968d8=a12_0x146b,_0x590fc5=_0x161155();while(!![]){try{const _0x42dad2=-parseInt(_0x4968d8(0xee))/0x1*(-parseInt(_0x4968d8(0xf0))/0x2)+-parseInt(_0x4968d8(0x10a))/0x3+parseInt(_0x4968d8(0xe8))/0x4*(-parseInt(_0x4968d8(0xe9))/0x5)+-parseInt(_0x4968d8(0x109))/0x6+parseInt(_0x4968d8(0xf1))/0x7+parseInt(_0x4968d8(0x10f))/0x8*(-parseInt(_0x4968d8(0xff))/0x9)+-parseInt(_0x4968d8(0xea))/0xa*(-parseInt(_0x4968d8(0x10e))/0xb);if(_0x42dad2===_0x53a0c1)break;else _0x590fc5['push'](_0x590fc5['shift']());}catch(_0x374631){_0x590fc5['push'](_0x590fc5['shift']());}}}(a12_0x4d78,0xe7e44));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a12_0x4d78(){const _0x1347ef=['14533784zuVXhp','appMenu.fetching.online','32Sdmogy','970360rpzkIQ','590uzrQDz','map','label','log','1550597ljeiqQ','common.error','2YJLWrN','9491832VuIdgF','appcode','appMenu.error.httpStatus','errorCode','error','length','get-online-menu-list','application/json','online','path','push','appMenu.success.fetched','status','/smartapi/menu/find?appCode=','9zKKtWA','errorMsg','isArray','appMenu.error.appCodeHint.option1','children','appMenu.error.missingAppCode','GET','data','resources','parse','5694042zUvMUH','2581287uPMFQo','json','extend','info','600710HYEQrz'];a12_0x4d78=function(){return _0x1347ef;};return a12_0x4d78();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';import a12_0x1de3c2 from'../i18n/index.js';const config=readConfig(),t=a12_0x1de3c2['t']['bind'](a12_0x1de3c2);function a12_0x146b(_0x7c511c,_0x4b18db){_0x7c511c=_0x7c511c-0xe8;const _0x4d78ab=a12_0x4d78();let _0x146b25=_0x4d78ab[_0x7c511c];return _0x146b25;}export async function getOnlineMenuList(){const _0x33d86f=a12_0x146b,_0x58a85f=config?.[_0x33d86f(0xf2)];if(!_0x58a85f){const _0x10c591=t(_0x33d86f(0x104));return logger[_0x33d86f(0xf5)](_0x33d86f(0xf7),_0x10c591),console[_0x33d86f(0xf5)]('×\x20'+_0x10c591),console[_0x33d86f(0xed)](t('appMenu.error.appCodeHint.title')),console[_0x33d86f(0xed)](t(_0x33d86f(0x102))),console[_0x33d86f(0xed)](t('appMenu.error.appCodeHint.option2')),[];}const _0x18d991=getEnv();logger['info']('get-online-menu-list',_0x18d991===_0x33d86f(0xf9)?t(_0x33d86f(0x110),{'appCode':_0x58a85f}):t('appMenu.fetching.daily',{'appCode':_0x58a85f}));const _0x2487f6=await fetch(getApiDomain()+_0x33d86f(0xfe)+_0x58a85f,{'method':_0x33d86f(0x105),'headers':{'Content-Type':_0x33d86f(0xf8),'Cookie':getCookie()}});if(!_0x2487f6['ok']){if(_0x2487f6[_0x33d86f(0xfd)]===0x191){const _0x15fc96=t('appMenu.error.authExpired');logger[_0x33d86f(0xf5)]('get-online-menu-list',_0x15fc96,{'status':_0x2487f6[_0x33d86f(0xfd)]});throw new Error(_0x15fc96);}const _0x38ff67=t(_0x33d86f(0xf3),{'status':_0x2487f6[_0x33d86f(0xfd)]});logger[_0x33d86f(0xf5)](_0x33d86f(0xf7),_0x38ff67);throw new Error(_0x38ff67);}const _0x21b2a6=await _0x2487f6[_0x33d86f(0x10b)]();if(!_0x21b2a6['success']){const _0x12d86c=t('appMenu.error.fetchFailed',{'error':_0x21b2a6[_0x33d86f(0x100)]||t(_0x33d86f(0xef))});logger['error'](_0x33d86f(0xf7),_0x12d86c,{'errorCode':_0x21b2a6[_0x33d86f(0xf4)],'errorMsg':_0x21b2a6[_0x33d86f(0x100)]});throw new Error(_0x12d86c);}if(!_0x21b2a6[_0x33d86f(0x106)])return logger[_0x33d86f(0x10d)](_0x33d86f(0xf7),t('appMenu.info.emptyMenuList')),[];return logger[_0x33d86f(0x10d)](_0x33d86f(0xf7),t(_0x33d86f(0xfc),{'count':_0x21b2a6[_0x33d86f(0x106)][_0x33d86f(0xf6)]})),_0x21b2a6[_0x33d86f(0x106)][_0x33d86f(0xeb)](formatMenuList)['flat']();}function formatMenuList(_0x2e20d0){const _0x2411c1=a12_0x146b;let _0x489245=[];try{if(_0x2e20d0[_0x2411c1(0x10c)]?.[_0x2411c1(0x107)]){const _0x1e53c6=JSON[_0x2411c1(0x108)](_0x2e20d0[_0x2411c1(0x10c)][_0x2411c1(0x107)]);Array[_0x2411c1(0x101)](_0x1e53c6)&&(_0x489245=_0x1e53c6);}}catch(_0x3c7882){}const _0x2b2212=[{'id':_0x2e20d0['id'],'path':_0x2e20d0[_0x2411c1(0xfa)],'label':_0x2e20d0[_0x2411c1(0xec)],'resources':_0x489245}];if(_0x2e20d0[_0x2411c1(0x103)]&&_0x2e20d0[_0x2411c1(0x103)]['length']>0x0)for(const _0x195191 of _0x2e20d0['children']){_0x2b2212[_0x2411c1(0xfb)](...formatMenuList(_0x195191));}return _0x2b2212;}
1
+ const a11_0x45f136=a11_0x1c68;(function(_0x152054,_0x50e94d){const _0x1ac3df=a11_0x1c68,_0xca0138=_0x152054();while(!![]){try{const _0x301510=parseInt(_0x1ac3df(0x123))/0x1+-parseInt(_0x1ac3df(0x12a))/0x2+-parseInt(_0x1ac3df(0x117))/0x3+-parseInt(_0x1ac3df(0x121))/0x4*(parseInt(_0x1ac3df(0x128))/0x5)+-parseInt(_0x1ac3df(0x130))/0x6+-parseInt(_0x1ac3df(0x126))/0x7+parseInt(_0x1ac3df(0x12c))/0x8;if(_0x301510===_0x50e94d)break;else _0xca0138['push'](_0xca0138['shift']());}catch(_0x1ea60f){_0xca0138['push'](_0xca0138['shift']());}}}(a11_0x23c1,0xd149f));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';function a11_0x1c68(_0x598cfd,_0x218bce){_0x598cfd=_0x598cfd-0x108;const _0x23c1d9=a11_0x23c1();let _0x1c68a1=_0x23c1d9[_0x598cfd];return _0x1c68a1;}import{getEnv}from'../constant/env.js';import a11_0x57ba94 from'../i18n/index.js';function a11_0x23c1(){const _0x1356be=['get-online-menu-list','13916DMjcss','appMenu.fetching.online','488455AVZeNM','flat','children','1209915ZsUrKl','info','1435XfXoAr','appMenu.fetching.daily','3020036cRjuBL','error','39840728YsWwFG','GET','appMenu.info.emptyMenuList','appMenu.error.appCodeHint.title','8383524xfxRBf','label','length','push','resources','/smartapi/menu/find?appCode=','errorMsg','bind','appMenu.success.fetched','appMenu.error.missingAppCode','json','data','errorCode','path','extend','isArray','appMenu.error.appCodeHint.option1','appcode','1598127EczGDP','common.error','appMenu.error.httpStatus','status','appMenu.error.authExpired','success','parse','application/json','appMenu.error.fetchFailed'];a11_0x23c1=function(){return _0x1356be;};return a11_0x23c1();}const config=readConfig(),t=a11_0x57ba94['t'][a11_0x45f136(0x10c)](a11_0x57ba94);export async function getOnlineMenuList(){const _0xd43764=a11_0x45f136,_0x1564b1=config?.[_0xd43764(0x116)];if(!_0x1564b1){const _0x2bf333=t(_0xd43764(0x10e));return logger['error']('get-online-menu-list',_0x2bf333),console[_0xd43764(0x12b)]('×\x20'+_0x2bf333),console['log'](t(_0xd43764(0x12f))),console['log'](t(_0xd43764(0x115))),console['log'](t('appMenu.error.appCodeHint.option2')),[];}const _0x5beb2b=getEnv();logger['info'](_0xd43764(0x120),_0x5beb2b==='online'?t(_0xd43764(0x122),{'appCode':_0x1564b1}):t(_0xd43764(0x129),{'appCode':_0x1564b1}));const _0x336711=await fetch(getApiDomain()+_0xd43764(0x10a)+_0x1564b1,{'method':_0xd43764(0x12d),'headers':{'Content-Type':_0xd43764(0x11e),'Cookie':getCookie()}});if(!_0x336711['ok']){if(_0x336711['status']===0x191){const _0x562e79=t(_0xd43764(0x11b));logger[_0xd43764(0x12b)](_0xd43764(0x120),_0x562e79,{'status':_0x336711['status']});throw new Error(_0x562e79);}const _0xa139be=t(_0xd43764(0x119),{'status':_0x336711[_0xd43764(0x11a)]});logger['error'](_0xd43764(0x120),_0xa139be);throw new Error(_0xa139be);}const _0x2df213=await _0x336711[_0xd43764(0x10f)]();if(!_0x2df213[_0xd43764(0x11c)]){const _0x166f2f=t(_0xd43764(0x11f),{'error':_0x2df213[_0xd43764(0x10b)]||t(_0xd43764(0x118))});logger[_0xd43764(0x12b)](_0xd43764(0x120),_0x166f2f,{'errorCode':_0x2df213[_0xd43764(0x111)],'errorMsg':_0x2df213[_0xd43764(0x10b)]});throw new Error(_0x166f2f);}if(!_0x2df213[_0xd43764(0x110)])return logger[_0xd43764(0x127)](_0xd43764(0x120),t(_0xd43764(0x12e))),[];return logger['info'](_0xd43764(0x120),t(_0xd43764(0x10d),{'count':_0x2df213[_0xd43764(0x110)]['length']})),_0x2df213[_0xd43764(0x110)]['map'](formatMenuList)[_0xd43764(0x124)]();}function formatMenuList(_0x50bee0){const _0x35b809=a11_0x45f136;let _0x411a9b=[];try{if(_0x50bee0[_0x35b809(0x113)]?.['resources']){const _0xffc13b=JSON[_0x35b809(0x11d)](_0x50bee0['extend'][_0x35b809(0x109)]);Array[_0x35b809(0x114)](_0xffc13b)&&(_0x411a9b=_0xffc13b);}}catch(_0x2d0bab){}const _0x4af003=[{'id':_0x50bee0['id'],'path':_0x50bee0[_0x35b809(0x112)],'label':_0x50bee0[_0x35b809(0x131)],'resources':_0x411a9b}];if(_0x50bee0[_0x35b809(0x125)]&&_0x50bee0['children'][_0x35b809(0x132)]>0x0)for(const _0x553d95 of _0x50bee0[_0x35b809(0x125)]){_0x4af003[_0x35b809(0x108)](...formatMenuList(_0x553d95));}return _0x4af003;}
@@ -0,0 +1 @@
1
+ var a13_0x5e47cb=a13_0x17e7;function a13_0x36b7(){var _0x952212=['96vfkmrD','random','10980TSdaKh','1832721WehAYZ','1255IuNEYr','3446120EqLgzY','https://g.lovrabet.com/dist/cowork-qzyt-web/1.1.0/assets/main.css','43624526NPwCrq','Prompt管理列表页','4ysqnAx','381977maDVlA','9OqfVRs','https://g.lovrabet.com/dist/cowork-qzyt-web/1.1.0/assets/main.js','262857rMcnGV','substring','3857112wKgHET'];a13_0x36b7=function(){return _0x952212;};return a13_0x36b7();}function a13_0x17e7(_0x1a53e,_0x172052){_0x1a53e=_0x1a53e-0x71;var _0x36b773=a13_0x36b7();var _0x17e743=_0x36b773[_0x1a53e];return _0x17e743;}(function(_0x3791d5,_0x5b69cd){var _0x1c2087=a13_0x17e7,_0x16b11a=_0x3791d5();while(!![]){try{var _0x45e66b=parseInt(_0x1c2087(0x74))/0x1*(-parseInt(_0x1c2087(0x73))/0x2)+-parseInt(_0x1c2087(0x7d))/0x3+-parseInt(_0x1c2087(0x7c))/0x4*(parseInt(_0x1c2087(0x7e))/0x5)+-parseInt(_0x1c2087(0x79))/0x6+-parseInt(_0x1c2087(0x77))/0x7*(parseInt(_0x1c2087(0x7a))/0x8)+parseInt(_0x1c2087(0x75))/0x9*(-parseInt(_0x1c2087(0x7f))/0xa)+parseInt(_0x1c2087(0x71))/0xb;if(_0x45e66b===_0x5b69cd)break;else _0x16b11a['push'](_0x16b11a['shift']());}catch(_0x491527){_0x16b11a['push'](_0x16b11a['shift']());}}}(a13_0x36b7,0x7143e));import{updateMenu}from'../app-menu-update-cdn/update-menu.js';import.meta.main&&updateMenu({'id':0x11b8a,'label':a13_0x5e47cb(0x72)+Math[a13_0x5e47cb(0x7b)]()['toString'](0x24)[a13_0x5e47cb(0x78)](0x2,0xf),'resources':[a13_0x5e47cb(0x76),a13_0x5e47cb(0x80)]});
@@ -1 +1 @@
1
- const a14_0x561502=a14_0x20f8;function a14_0x20f8(_0x5f2a45,_0x4b70f0){_0x5f2a45=_0x5f2a45-0x14d;const _0x32d026=a14_0x32d0();let _0x20f8f5=_0x32d026[_0x5f2a45];return _0x20f8f5;}(function(_0x16b477,_0xf1bf3e){const _0x4a56fc=a14_0x20f8,_0xa9640a=_0x16b477();while(!![]){try{const _0x434779=-parseInt(_0x4a56fc(0x151))/0x1*(parseInt(_0x4a56fc(0x154))/0x2)+parseInt(_0x4a56fc(0x14e))/0x3*(-parseInt(_0x4a56fc(0x159))/0x4)+-parseInt(_0x4a56fc(0x15c))/0x5+parseInt(_0x4a56fc(0x155))/0x6+-parseInt(_0x4a56fc(0x15a))/0x7*(parseInt(_0x4a56fc(0x15b))/0x8)+parseInt(_0x4a56fc(0x152))/0x9+parseInt(_0x4a56fc(0x150))/0xa;if(_0x434779===_0xf1bf3e)break;else _0xa9640a['push'](_0xa9640a['shift']());}catch(_0x55b1a4){_0xa9640a['push'](_0xa9640a['shift']());}}}(a14_0x32d0,0xb6799));import{useEffect,useState}from'react';import{getOnlineMenuList}from'./get-online-menu-list.js';function a14_0x32d0(){const _0x4aad83=['appMenu.error.fetchFailed','39zjOLxs','catch','18554840xecTJT','61LIkagA','12088836AVpvpf','bind','39118nehrqa','7810386ngUGhp','finally','message','then','335588oQSreB','7zXoEHk','892024fhkidN','6788695YpPQuv'];a14_0x32d0=function(){return _0x4aad83;};return a14_0x32d0();}import a14_0x48381f from'../i18n/index.js';const t=a14_0x48381f['t'][a14_0x561502(0x153)](a14_0x48381f);export function useGetOnlineMenuList(){const [_0x4c2a88,_0x2dc9b2]=useState([]),[_0xa458c7,_0x57260b]=useState(!![]),[_0x2a6ca7,_0x2a04f9]=useState('');return useEffect(()=>{const _0xb13465=a14_0x20f8;_0x57260b(!![]),_0x2a04f9(''),getOnlineMenuList()[_0xb13465(0x158)](_0x2dc9b2)[_0xb13465(0x14f)](_0x2a611c=>{const _0x44cddc=_0xb13465;_0x2a04f9(_0x2a611c[_0x44cddc(0x157)]||t(_0x44cddc(0x14d),{'error':t('common.error')}));})[_0xb13465(0x156)](()=>_0x57260b(![]));},[]),{'menuList':_0x4c2a88,'loading':_0xa458c7,'error':_0x2a6ca7};}
1
+ function a14_0x1a27(){const _0x11776f=['catch','then','56hLueOH','1767500YFhKwd','1369380WAUkGX','appMenu.error.fetchFailed','bind','message','555359nQoDDm','8TCTvcZ','14374665zRrabI','919092eqsknJ','2545596cdzwPl','100148ZhGZaS'];a14_0x1a27=function(){return _0x11776f;};return a14_0x1a27();}const a14_0x1904a8=a14_0x5454;(function(_0x456c13,_0x5e550d){const _0x15e5a2=a14_0x5454,_0x2ec856=_0x456c13();while(!![]){try{const _0x1e5499=-parseInt(_0x15e5a2(0x126))/0x1*(parseInt(_0x15e5a2(0x122))/0x2)+-parseInt(_0x15e5a2(0x12b))/0x3+-parseInt(_0x15e5a2(0x124))/0x4+-parseInt(_0x15e5a2(0x12a))/0x5+-parseInt(_0x15e5a2(0x125))/0x6+-parseInt(_0x15e5a2(0x121))/0x7*(-parseInt(_0x15e5a2(0x129))/0x8)+parseInt(_0x15e5a2(0x123))/0x9;if(_0x1e5499===_0x5e550d)break;else _0x2ec856['push'](_0x2ec856['shift']());}catch(_0x3399a6){_0x2ec856['push'](_0x2ec856['shift']());}}}(a14_0x1a27,0x464d1));import{useEffect,useState}from'react';import{getOnlineMenuList}from'./get-online-menu-list.js';import a14_0x28c8fd from'../i18n/index.js';function a14_0x5454(_0x5e5b6d,_0x3fbf90){_0x5e5b6d=_0x5e5b6d-0x120;const _0x1a270f=a14_0x1a27();let _0x54541a=_0x1a270f[_0x5e5b6d];return _0x54541a;}const t=a14_0x28c8fd['t'][a14_0x1904a8(0x12d)](a14_0x28c8fd);export function useGetOnlineMenuList(){const [_0x10d47f,_0x74c49b]=useState([]),[_0xf6d9a8,_0x3e232b]=useState(!![]),[_0x42873c,_0x3030de]=useState('');return useEffect(()=>{const _0xe1a5d9=a14_0x5454;_0x3e232b(!![]),_0x3030de(''),getOnlineMenuList()[_0xe1a5d9(0x128)](_0x74c49b)[_0xe1a5d9(0x127)](_0xbab81d=>{const _0x3a34a1=_0xe1a5d9;_0x3030de(_0xbab81d[_0x3a34a1(0x120)]||t(_0x3a34a1(0x12c),{'error':t('common.error')}));})['finally'](()=>_0x3e232b(![]));},[]),{'menuList':_0x10d47f,'loading':_0xf6d9a8,'error':_0x42873c};}
@@ -1 +1 @@
1
- (function(_0x31bca1,_0x354b3e){const _0x744785=a15_0x5a0a,_0x3e19f8=_0x31bca1();while(!![]){try{const _0x4ee930=-parseInt(_0x744785(0xab))/0x1+-parseInt(_0x744785(0xa8))/0x2*(parseInt(_0x744785(0xaf))/0x3)+parseInt(_0x744785(0xa5))/0x4*(parseInt(_0x744785(0xae))/0x5)+parseInt(_0x744785(0xa7))/0x6*(-parseInt(_0x744785(0xb1))/0x7)+parseInt(_0x744785(0xa6))/0x8+-parseInt(_0x744785(0xa9))/0x9+-parseInt(_0x744785(0xa4))/0xa*(-parseInt(_0x744785(0xa2))/0xb);if(_0x4ee930===_0x354b3e)break;else _0x3e19f8['push'](_0x3e19f8['shift']());}catch(_0x455132){_0x3e19f8['push'](_0x3e19f8['shift']());}}}(a15_0x14ae,0x55ad3));function a15_0x5a0a(_0x324991,_0x3e9c13){_0x324991=_0x324991-0xa2;const _0x14ae3a=a15_0x14ae();let _0x5a0a5c=_0x14ae3a[_0x324991];return _0x5a0a5c;}export function getRemainingSpaces(_0x3e9ace,_0x33e51c){const _0x23a3f1=a15_0x5a0a,_0x19c64f=getStringWidth(_0x33e51c);return Array(Math[_0x23a3f1(0xad)](0x0,_0x3e9ace-_0x19c64f))[_0x23a3f1(0xb0)]('\x20')[_0x23a3f1(0xac)]('');}export function getMaxWidth(_0xd86e2,_0x5744d6=0x2){const _0x13cba7=a15_0x5a0a;let _0x567e3e='',_0x197926=0x0;for(const _0x5a4692 of _0xd86e2){const _0x3570e6=getStringWidth(_0x5a4692);_0x3570e6>_0x197926&&(_0x197926=_0x3570e6,_0x567e3e=_0x5a4692);}return _0x567e3e+'\x20'[_0x13cba7(0xaa)](_0x5744d6);}function a15_0x14ae(){const _0x4d6aa5=['max','19230gfjPWo','3sNZbuN','fill','21baPbxP','10690207ktyhpC','test','10hHQfJU','672LKgEkE','1223168hfxyGJ','823434LEozEg','610966JkWhJM','3081528zEPTSN','repeat','360338nqRdAo','join'];a15_0x14ae=function(){return _0x4d6aa5;};return a15_0x14ae();}export function getStringWidth(_0xa351b9){const _0x4a7961=a15_0x5a0a;let _0x560688=0x0;for(const _0xb738cc of _0xa351b9){/[\u4e00-\u9fa5]/[_0x4a7961(0xa3)](_0xb738cc)?_0x560688+=0x2:_0x560688+=0x1;}return _0x560688;}
1
+ (function(_0x44cb2b,_0x70fc2b){const _0x1954ad=a15_0x12f6,_0x531fe3=_0x44cb2b();while(!![]){try{const _0x4ae60b=-parseInt(_0x1954ad(0x110))/0x1+parseInt(_0x1954ad(0x115))/0x2+parseInt(_0x1954ad(0x10f))/0x3+-parseInt(_0x1954ad(0x116))/0x4+parseInt(_0x1954ad(0x113))/0x5*(parseInt(_0x1954ad(0x118))/0x6)+-parseInt(_0x1954ad(0x119))/0x7+parseInt(_0x1954ad(0x111))/0x8;if(_0x4ae60b===_0x70fc2b)break;else _0x531fe3['push'](_0x531fe3['shift']());}catch(_0x2d31a3){_0x531fe3['push'](_0x531fe3['shift']());}}}(a15_0x55f9,0xe54c8));export function getRemainingSpaces(_0x2b9b4d,_0x257974){const _0x351f51=a15_0x12f6,_0x2d4721=getStringWidth(_0x257974);return Array(Math[_0x351f51(0x117)](0x0,_0x2b9b4d-_0x2d4721))[_0x351f51(0x112)]('\x20')[_0x351f51(0x114)]('');}export function getMaxWidth(_0x36ed87,_0x586d27=0x2){const _0x20f8a6=a15_0x12f6;let _0x437061='',_0x233383=0x0;for(const _0x38bdaf of _0x36ed87){const _0x258284=getStringWidth(_0x38bdaf);_0x258284>_0x233383&&(_0x233383=_0x258284,_0x437061=_0x38bdaf);}return _0x437061+'\x20'[_0x20f8a6(0x11a)](_0x586d27);}function a15_0x12f6(_0x549e96,_0x57081e){_0x549e96=_0x549e96-0x10f;const _0x55f98c=a15_0x55f9();let _0x12f6f2=_0x55f98c[_0x549e96];return _0x12f6f2;}function a15_0x55f9(){const _0x195da8=['max','6dxiFej','6778660pGuXDt','repeat','198918LniONr','429241RnZcfr','15437616xADEfb','fill','109265osiYNg','join','2311858WkQPYj','3347844VgDiRR'];a15_0x55f9=function(){return _0x195da8;};return a15_0x55f9();}export function getStringWidth(_0x599ac8){let _0x273a3c=0x0;for(const _0x3d450b of _0x599ac8){/[\u4e00-\u9fa5]/['test'](_0x3d450b)?_0x273a3c+=0x2:_0x273a3c+=0x1;}return _0x273a3c;}
@@ -1 +1 @@
1
- (function(_0x30fa1c,_0x477710){const _0x1e6faf=a16_0x1c03,_0x547280=_0x30fa1c();while(!![]){try{const _0x30bc82=parseInt(_0x1e6faf(0x152))/0x1+parseInt(_0x1e6faf(0x151))/0x2*(parseInt(_0x1e6faf(0x158))/0x3)+-parseInt(_0x1e6faf(0x15c))/0x4+parseInt(_0x1e6faf(0x15d))/0x5*(parseInt(_0x1e6faf(0x154))/0x6)+-parseInt(_0x1e6faf(0x15b))/0x7+-parseInt(_0x1e6faf(0x155))/0x8*(-parseInt(_0x1e6faf(0x153))/0x9)+-parseInt(_0x1e6faf(0x15a))/0xa;if(_0x30bc82===_0x477710)break;else _0x547280['push'](_0x547280['shift']());}catch(_0x2042e0){_0x547280['push'](_0x547280['shift']());}}}(a16_0x397c,0xc8a96));export function isValidJsHttpsUrl(_0x1842e6){const _0x400430=a16_0x1c03;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x1842e6[_0x400430(0x157)]());}function a16_0x1c03(_0x385681,_0x46b824){_0x385681=_0x385681-0x151;const _0x397c61=a16_0x397c();let _0x1c03a9=_0x397c61[_0x385681];return _0x1c03a9;}export function isValidCssHttpsUrl(_0x546f2b){const _0x598e48=a16_0x1c03;return/^https:\/\/.+\.css(\?.*)?$/[_0x598e48(0x156)](_0x546f2b[_0x598e48(0x157)]());}function a16_0x397c(){const _0x446525=['42GLuKvD','7768NmgpVm','test','trim','2121192UIXigp','HEAD','5943900NCTEZz','10224795HJNbhl','3782792qdbFyr','283585IqGFbz','4sUMQcG','662817uXaEbN','12501MZkHbh'];a16_0x397c=function(){return _0x446525;};return a16_0x397c();}export async function isUrlReachable(_0x30614e){const _0x36fe6f=a16_0x1c03;try{const _0x55e1e8=await fetch(_0x30614e,{'method':_0x36fe6f(0x159)});return _0x55e1e8['ok'];}catch{return![];}}
1
+ (function(_0x39aa40,_0x4226f4){const _0x594e5e=a16_0x179a,_0x13453d=_0x39aa40();while(!![]){try{const _0x4869af=parseInt(_0x594e5e(0x13d))/0x1*(parseInt(_0x594e5e(0x145))/0x2)+parseInt(_0x594e5e(0x13f))/0x3*(parseInt(_0x594e5e(0x142))/0x4)+parseInt(_0x594e5e(0x13e))/0x5*(-parseInt(_0x594e5e(0x141))/0x6)+-parseInt(_0x594e5e(0x148))/0x7+parseInt(_0x594e5e(0x144))/0x8+-parseInt(_0x594e5e(0x13c))/0x9+parseInt(_0x594e5e(0x146))/0xa*(parseInt(_0x594e5e(0x140))/0xb);if(_0x4869af===_0x4226f4)break;else _0x13453d['push'](_0x13453d['shift']());}catch(_0x5ac826){_0x13453d['push'](_0x13453d['shift']());}}}(a16_0x2bfc,0x253de));export function isValidJsHttpsUrl(_0x2736b3){const _0x476f73=a16_0x179a;return/^https:\/\/.+\.js(\?.*)?$/[_0x476f73(0x147)](_0x2736b3[_0x476f73(0x149)]());}function a16_0x2bfc(){const _0x5999f4=['6KPBpJf','244bdQUJt','HEAD','871352EPjTJy','2IIXURv','7110UbXzzG','test','971138czHtPs','trim','1639917aVnAQB','218049BaWrry','434675edpDfo','6621DKgbHm','1529NeutTo'];a16_0x2bfc=function(){return _0x5999f4;};return a16_0x2bfc();}export function isValidCssHttpsUrl(_0x29c0bb){const _0x2c82b6=a16_0x179a;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x29c0bb[_0x2c82b6(0x149)]());}function a16_0x179a(_0xed83e2,_0x561d7c){_0xed83e2=_0xed83e2-0x13c;const _0x2bfcd3=a16_0x2bfc();let _0x179a62=_0x2bfcd3[_0xed83e2];return _0x179a62;}export async function isUrlReachable(_0x3741f7){const _0x2cc3e2=a16_0x179a;try{const _0x150821=await fetch(_0x3741f7,{'method':_0x2cc3e2(0x143)});return _0x150821['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x1fb2c2,_0x50ed8f){const _0x3eac2a=a17_0x9f24,_0xa5cabb=_0x1fb2c2();while(!![]){try{const _0x27a396=parseInt(_0x3eac2a(0x13d))/0x1+parseInt(_0x3eac2a(0x12e))/0x2+parseInt(_0x3eac2a(0x134))/0x3+parseInt(_0x3eac2a(0x136))/0x4*(-parseInt(_0x3eac2a(0x13a))/0x5)+parseInt(_0x3eac2a(0x137))/0x6+-parseInt(_0x3eac2a(0x13c))/0x7*(-parseInt(_0x3eac2a(0x133))/0x8)+-parseInt(_0x3eac2a(0x132))/0x9*(parseInt(_0x3eac2a(0x130))/0xa);if(_0x27a396===_0x50ed8f)break;else _0xa5cabb['push'](_0xa5cabb['shift']());}catch(_0x278e1f){_0xa5cabb['push'](_0xa5cabb['shift']());}}}(a17_0x45c9,0xdebd3));function a17_0x9f24(_0x4d911b,_0x2cd20e){_0x4d911b=_0x4d911b-0x12a;const _0x45c956=a17_0x45c9();let _0x9f241=_0x45c956[_0x4d911b];return _0x9f241;}function a17_0x45c9(){const _0x3e4ae6=['2055928GvqBhx','8739210DfbPjf','map','column','5YCUfpS','join','7RxBWRv','1656797LONLsy','appMenu.updateCdn.preview.resourceLinks','filter','appMenu.updateCdn.preview.title','flat','2609350VkDUyU','from','18605040RQnMlo','label','18OjzcHu','38224bnXAQd','2173632IaitIu','resources'];a17_0x45c9=function(){return _0x3e4ae6;};return a17_0x45c9();}import{jsx as a17_0x11b777,jsxs as a17_0x87be7a}from'react/jsx-runtime';import{Text,Box}from'ink';import{useI18n}from'../i18n/hooks.js';export function CurrentMenuCdnContent(_0x34f5da){const _0x555e0e=a17_0x9f24,{t:_0xa13193}=useI18n(),{menuList:_0xdd6439}=_0x34f5da,_0x566713=_0xdd6439[_0x555e0e(0x12b)](_0x25f494=>_0x25f494[_0x555e0e(0x135)]['length']),_0x541194=Array[_0x555e0e(0x12f)](new Set(_0xdd6439[_0x555e0e(0x138)](_0x258a95=>_0x258a95[_0x555e0e(0x135)])[_0x555e0e(0x12d)]()));return a17_0x87be7a(Box,{'flexDirection':_0x555e0e(0x139),'children':[a17_0x11b777(Text,{'color':'cyan','children':_0xa13193(_0x555e0e(0x12c))}),a17_0x87be7a(Box,{'marginTop':0x1,'flexDirection':_0x555e0e(0x139),'children':[a17_0x87be7a(Text,{'bold':!![],'children':['\x20\x20',_0xa13193('appMenu.updateCdn.preview.menuList')]}),a17_0x87be7a(Text,{'children':['\x20\x20',_0x566713[_0x555e0e(0x138)](_0x46b48c=>_0x46b48c[_0x555e0e(0x131)])[_0x555e0e(0x13b)](',\x20')]})]}),a17_0x11b777(Box,{'marginTop':0x1,'children':a17_0x87be7a(Text,{'bold':!![],'children':['\x20\x20',_0xa13193(_0x555e0e(0x12a))]})}),_0x541194[_0x555e0e(0x138)](_0x2e228d=>a17_0x11b777(Box,{'children':a17_0x87be7a(Text,{'children':['\x20\x20',_0x2e228d]})},_0x2e228d))]});}
1
+ function a17_0xa35b(_0x14c04d,_0x54155f){_0x14c04d=_0x14c04d-0xd4;const _0x3bb887=a17_0x3bb8();let _0xa35b9b=_0x3bb887[_0x14c04d];return _0xa35b9b;}(function(_0x18dd84,_0x16dc65){const _0x5e5013=a17_0xa35b,_0x157a6a=_0x18dd84();while(!![]){try{const _0x322ac8=parseInt(_0x5e5013(0xe4))/0x1+parseInt(_0x5e5013(0xde))/0x2+parseInt(_0x5e5013(0xe1))/0x3*(parseInt(_0x5e5013(0xd9))/0x4)+parseInt(_0x5e5013(0xe8))/0x5*(-parseInt(_0x5e5013(0xe7))/0x6)+parseInt(_0x5e5013(0xe9))/0x7*(-parseInt(_0x5e5013(0xda))/0x8)+-parseInt(_0x5e5013(0xd5))/0x9*(-parseInt(_0x5e5013(0xe5))/0xa)+-parseInt(_0x5e5013(0xe2))/0xb*(parseInt(_0x5e5013(0xe6))/0xc);if(_0x322ac8===_0x16dc65)break;else _0x157a6a['push'](_0x157a6a['shift']());}catch(_0x35f228){_0x157a6a['push'](_0x157a6a['shift']());}}}(a17_0x3bb8,0x4423b));function a17_0x3bb8(){const _0x3fbab0=['label','8ipDGzc','695864ocxKiD','join','appMenu.updateCdn.preview.resourceLinks','resources','980114wtjSjG','length','appMenu.updateCdn.preview.menuList','386907TiLPaz','55HSxVSu','cyan','405249VNcjfP','1060YaWORm','1763052zbxqBV','6VAzvxn','1864975SGZord','7OSmJJt','flat','filter','27207Xhylfx','map','column'];a17_0x3bb8=function(){return _0x3fbab0;};return a17_0x3bb8();}import{jsx as a17_0x4ef498,jsxs as a17_0x580757}from'react/jsx-runtime';import{Text,Box}from'ink';import{useI18n}from'../i18n/hooks.js';export function CurrentMenuCdnContent(_0x1692b8){const _0x39c30c=a17_0xa35b,{t:_0x27b648}=useI18n(),{menuList:_0x220c14}=_0x1692b8,_0x13c01c=_0x220c14[_0x39c30c(0xd4)](_0x3e8928=>_0x3e8928[_0x39c30c(0xdd)][_0x39c30c(0xdf)]),_0x3c2120=Array['from'](new Set(_0x220c14[_0x39c30c(0xd6)](_0x461d2f=>_0x461d2f[_0x39c30c(0xdd)])[_0x39c30c(0xea)]()));return a17_0x580757(Box,{'flexDirection':_0x39c30c(0xd7),'children':[a17_0x4ef498(Text,{'color':_0x39c30c(0xe3),'children':_0x27b648('appMenu.updateCdn.preview.title')}),a17_0x580757(Box,{'marginTop':0x1,'flexDirection':_0x39c30c(0xd7),'children':[a17_0x580757(Text,{'bold':!![],'children':['\x20\x20',_0x27b648(_0x39c30c(0xe0))]}),a17_0x580757(Text,{'children':['\x20\x20',_0x13c01c['map'](_0x173773=>_0x173773[_0x39c30c(0xd8)])[_0x39c30c(0xdb)](',\x20')]})]}),a17_0x4ef498(Box,{'marginTop':0x1,'children':a17_0x580757(Text,{'bold':!![],'children':['\x20\x20',_0x27b648(_0x39c30c(0xdc))]})}),_0x3c2120[_0x39c30c(0xd6)](_0x425be0=>a17_0x4ef498(Box,{'children':a17_0x580757(Text,{'children':['\x20\x20',_0x425be0]})},_0x425be0))]});}
@@ -1 +1 @@
1
- (function(_0x4dbb8f,_0x39c07f){const _0x2e8d33=a18_0x1870,_0x343620=_0x4dbb8f();while(!![]){try{const _0x20f06f=parseInt(_0x2e8d33(0x190))/0x1*(parseInt(_0x2e8d33(0x18b))/0x2)+-parseInt(_0x2e8d33(0x185))/0x3+-parseInt(_0x2e8d33(0x194))/0x4*(parseInt(_0x2e8d33(0x18c))/0x5)+-parseInt(_0x2e8d33(0x191))/0x6+-parseInt(_0x2e8d33(0x189))/0x7*(-parseInt(_0x2e8d33(0x18a))/0x8)+-parseInt(_0x2e8d33(0x18d))/0x9*(-parseInt(_0x2e8d33(0x193))/0xa)+-parseInt(_0x2e8d33(0x18e))/0xb*(-parseInt(_0x2e8d33(0x186))/0xc);if(_0x20f06f===_0x39c07f)break;else _0x343620['push'](_0x343620['shift']());}catch(_0x402b21){_0x343620['push'](_0x343620['shift']());}}}(a18_0xbceb,0xa0a1f));function a18_0x1870(_0x477c2c,_0x192525){_0x477c2c=_0x477c2c-0x185;const _0xbcebc5=a18_0xbceb();let _0x187069=_0xbcebc5[_0x477c2c];return _0x187069;}import{jsx as a18_0x4b457f,jsxs as a18_0x2eeb4f}from'react/jsx-runtime';import{Text,Box}from'ink';import{useI18n}from'../i18n/hooks.js';export function InputCdnAsset(_0x11064d){const _0x89cab3=a18_0x1870,{t:_0x250591}=useI18n(),{jsCdnUrl:_0x19f5bb,cssCdnUrl:_0x466853}=_0x11064d;return a18_0x2eeb4f(Box,{'flexDirection':_0x89cab3(0x187),'marginTop':0x1,'children':[a18_0x4b457f(Text,{'color':'cyan','children':_0x250591(_0x89cab3(0x192))}),a18_0x2eeb4f(Box,{'children':[a18_0x2eeb4f(Text,{'children':['\x20\x20',_0x250591(_0x89cab3(0x18f))]}),a18_0x4b457f(Text,{'color':_0x89cab3(0x188),'children':_0x19f5bb})]}),a18_0x2eeb4f(Box,{'children':[a18_0x2eeb4f(Text,{'children':['\x20\x20',_0x250591('appMenu.updateCdn.input.cssUrl.label')]}),a18_0x4b457f(Text,{'color':'green','children':_0x466853})]})]});}function a18_0xbceb(){const _0x564b8e=['116040pqOSai','column','green','4169774MrIWvl','16VgpNfy','682iEOLWy','325pnqMTk','126rEaJze','638qTSMfK','appMenu.updateCdn.input.jsUrl.label','3063rrqRFT','6721812lIlnzE','appMenu.updateCdn.input.title','322580TJhbke','18076BnGZyz','3528993HbVaqR'];a18_0xbceb=function(){return _0x564b8e;};return a18_0xbceb();}
1
+ function a18_0x4fea(){const _0x2aa274=['2886968dxwUrm','3fqXKOd','1857624dkUtLR','447151BZZlCG','column','16SHSZjx','117eZUhkA','appMenu.updateCdn.input.jsUrl.label','602720dRyrJc','green','1672644ruvvsm','appMenu.updateCdn.input.cssUrl.label','44834CiuqIE','appMenu.updateCdn.input.title','664450hUGRUC'];a18_0x4fea=function(){return _0x2aa274;};return a18_0x4fea();}(function(_0x32375d,_0x3749fa){const _0x29d8f6=a18_0x41ec,_0x48e0ed=_0x32375d();while(!![]){try{const _0x570a53=parseInt(_0x29d8f6(0x162))/0x1+-parseInt(_0x29d8f6(0x15c))/0x2*(parseInt(_0x29d8f6(0x160))/0x3)+-parseInt(_0x29d8f6(0x164))/0x4*(parseInt(_0x29d8f6(0x167))/0x5)+-parseInt(_0x29d8f6(0x169))/0x6+-parseInt(_0x29d8f6(0x15f))/0x7+parseInt(_0x29d8f6(0x161))/0x8+parseInt(_0x29d8f6(0x165))/0x9*(parseInt(_0x29d8f6(0x15e))/0xa);if(_0x570a53===_0x3749fa)break;else _0x48e0ed['push'](_0x48e0ed['shift']());}catch(_0x506b1a){_0x48e0ed['push'](_0x48e0ed['shift']());}}}(a18_0x4fea,0x54cd4));import{jsx as a18_0x152d7f,jsxs as a18_0x1259a2}from'react/jsx-runtime';import{Text,Box}from'ink';import{useI18n}from'../i18n/hooks.js';function a18_0x41ec(_0xc2bbae,_0x4e8434){_0xc2bbae=_0xc2bbae-0x15c;const _0x4fea49=a18_0x4fea();let _0x41ec2c=_0x4fea49[_0xc2bbae];return _0x41ec2c;}export function InputCdnAsset(_0x53d987){const _0x48cd19=a18_0x41ec,{t:_0x2dd15b}=useI18n(),{jsCdnUrl:_0x217acd,cssCdnUrl:_0x41d708}=_0x53d987;return a18_0x1259a2(Box,{'flexDirection':_0x48cd19(0x163),'marginTop':0x1,'children':[a18_0x152d7f(Text,{'color':'cyan','children':_0x2dd15b(_0x48cd19(0x15d))}),a18_0x1259a2(Box,{'children':[a18_0x1259a2(Text,{'children':['\x20\x20',_0x2dd15b(_0x48cd19(0x166))]}),a18_0x152d7f(Text,{'color':_0x48cd19(0x168),'children':_0x217acd})]}),a18_0x1259a2(Box,{'children':[a18_0x1259a2(Text,{'children':['\x20\x20',_0x2dd15b(_0x48cd19(0x16a))]}),a18_0x152d7f(Text,{'color':_0x48cd19(0x168),'children':_0x41d708})]})]});}
@@ -1 +1 @@
1
- (function(_0x1e99dd,_0x24f186){const _0x52cd8f=a19_0x547c,_0x40a1f5=_0x1e99dd();while(!![]){try{const _0x291c0c=-parseInt(_0x52cd8f(0xab))/0x1+-parseInt(_0x52cd8f(0xb2))/0x2*(parseInt(_0x52cd8f(0xc6))/0x3)+parseInt(_0x52cd8f(0xe0))/0x4*(parseInt(_0x52cd8f(0xdc))/0x5)+-parseInt(_0x52cd8f(0xb8))/0x6*(parseInt(_0x52cd8f(0xc0))/0x7)+parseInt(_0x52cd8f(0xc9))/0x8+parseInt(_0x52cd8f(0xcf))/0x9+parseInt(_0x52cd8f(0xbc))/0xa;if(_0x291c0c===_0x24f186)break;else _0x40a1f5['push'](_0x40a1f5['shift']());}catch(_0x1d4d65){_0x40a1f5['push'](_0x40a1f5['shift']());}}}(a19_0x546b,0xa78dc));function a19_0x546b(){const _0x4d463a=['leftArrow','906UtroHS','input-css','value','3950616GPwgst','downArrow','delete','slice','green','lovrabet\x20auth','9125424IRhzbA','need-confirm','appMenu.updateCdn.success.updated','red','appMenu.updateCdn.error.invalidCssUrl','appMenu.updateCdn.loading.fetching','appMenu.updateCdn.error.invalidJsUrl','cancel','backspace','upArrow','resources','path','length','5RHRuHy','appMenu.updateCdn.error.jsUrlUnreachable','from','updated','5277484ZTbWOH','appMenu.updateCdn.error.cssUrlUnreachable','rightArrow','120300WlGBXm','flat','dots','all','return','column','input-js','7188PccKip','map','appMenu.updateCdn.action.continue','appMenu.updateCdn.input.jsUrl.placeholder','trim','yellow','66nPLNGu','gray','appMenu.updateCdn.error.noCdnLinks','appMenu.updateCdn.input.cssUrl.label','1940370thdgJs','creating','resolve','label','718571qPWrQD','appMenu.updateCdn.input.cssUrl.placeholder','cyan','appMenu.updateCdn.error.authHint.prefix','appMenu.updateCdn.input.jsUrl.label'];a19_0x546b=function(){return _0x4d463a;};return a19_0x546b();}import{jsx as a19_0x1d1acb,jsxs as a19_0x41168d,Fragment as a19_0x14bfb5}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';function a19_0x547c(_0x2dd5c1,_0xa38643){_0x2dd5c1=_0x2dd5c1-0xaa;const _0x546b73=a19_0x546b();let _0x547cad=_0x546b73[_0x2dd5c1];return _0x547cad;}import a19_0xd2c19b 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{useI18n}from'../i18n/hooks.js';import.meta.main&&render(a19_0x1d1acb(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x3d2ceb=a19_0x547c,{exit:_0x250d31}=useApp(),{t:_0x46f062}=useI18n(),{loading:_0x310010,menuList:_0x34ee36,error:_0x2d238d}=useGetOnlineMenuList(),[_0x1ccdfe,_0x24ae31]=useState('ok'),[_0x495150,_0x372acb]=useState(_0x3d2ceb(0xb1)),[_0x89a8f0,_0x1e3601]=useState(''),[_0x26a5ec,_0x109ec8]=useState(''),[_0x1bb21a,_0x42b200]=useState(''),[_0x1eab3e,_0x5e4353]=useState(''),_0xc8467f=Array[_0x3d2ceb(0xde)](new Set(_0x34ee36['map'](_0x4fb352=>_0x4fb352[_0x3d2ceb(0xd9)])[_0x3d2ceb(0xac)]()));useEffect(()=>{const _0x181246=_0x3d2ceb;_0x495150===_0x181246(0xdf)&&setTimeout(_0x250d31,0x32);},[_0x495150]),useInput(async(_0x234e08,_0x2c54a4)=>{const _0x36ddb7=_0x3d2ceb;if(_0x495150==='input-js'){if(_0x2c54a4[_0x36ddb7(0xaf)]){const _0xdac68c=_0x1bb21a['trim']();if(_0xdac68c==='')return;if(!isValidJsHttpsUrl(_0xdac68c)){_0x5e4353(_0x46f062(_0x36ddb7(0xd5)));return;}if(!await isUrlReachable(_0xdac68c)){_0x5e4353(_0x46f062(_0x36ddb7(0xdd)));return;}_0x1e3601(_0xdac68c),_0x42b200(''),_0x5e4353(''),_0x372acb(_0x36ddb7(0xc7));return;}if(_0x2c54a4[_0x36ddb7(0xd7)]||_0x2c54a4['delete']){_0x42b200(_0x2ca262=>_0x2ca262['slice'](0x0,-0x1)),_0x5e4353('');return;}_0x42b200(_0x16403a=>_0x16403a+_0x234e08);return;}if(_0x495150===_0x36ddb7(0xc7)){if(_0x2c54a4[_0x36ddb7(0xaf)]){const _0x128c35=_0x1bb21a[_0x36ddb7(0xb6)]();if(_0x128c35==='')return;if(!isValidCssHttpsUrl(_0x128c35)){_0x5e4353(_0x46f062(_0x36ddb7(0xd3)));return;}if(!await isUrlReachable(_0x128c35)){_0x5e4353(_0x46f062(_0x36ddb7(0xe1)));return;}_0x109ec8(_0x128c35),_0x42b200(''),_0x5e4353(''),_0x372acb(_0x36ddb7(0xd0));return;}if(_0x2c54a4[_0x36ddb7(0xd7)]||_0x2c54a4[_0x36ddb7(0xcb)]){_0x42b200(_0x25a2ee=>_0x25a2ee[_0x36ddb7(0xcc)](0x0,-0x1)),_0x5e4353('');return;}_0x42b200(_0x3f4f24=>_0x3f4f24+_0x234e08);return;}if(_0x495150===_0x36ddb7(0xd0)){(_0x2c54a4[_0x36ddb7(0xd8)]||_0x2c54a4[_0x36ddb7(0xca)]||_0x2c54a4[_0x36ddb7(0xc5)]||_0x2c54a4[_0x36ddb7(0xaa)])&&_0x24ae31(_0xf7aef4=>_0xf7aef4==='ok'?'cancel':'ok');if(_0x2c54a4[_0x36ddb7(0xaf)]){_0x372acb(_0x36ddb7(0xbd));if(_0x1ccdfe==='ok')await Promise[_0x36ddb7(0xae)](_0x34ee36[_0x36ddb7(0xb3)](_0x4c1405=>{const _0x3b72f4=_0x36ddb7,_0x2bb116={'id':_0x4c1405['id'],'label':_0x4c1405[_0x3b72f4(0xbf)],'path':_0x4c1405[_0x3b72f4(0xda)],'resources':[_0x89a8f0,_0x26a5ec]};if(_0x4c1405['resources'][_0x3b72f4(0xdb)]===0x0)return Promise[_0x3b72f4(0xbe)]();return updateMenuCdnUrl(_0x2bb116);})),await new Promise(_0x17be6c=>setTimeout(_0x17be6c,0x3e8)),_0x372acb(_0x36ddb7(0xdf));else _0x1ccdfe===_0x36ddb7(0xd6)&&_0x250d31();}}});if(_0x310010)return a19_0x41168d(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x1d1acb(Text,{}),a19_0x1d1acb(a19_0xd2c19b,{'type':_0x3d2ceb(0xad)}),a19_0x1d1acb(Text,{'children':_0x46f062(_0x3d2ceb(0xd4))})]});if(_0x2d238d)return a19_0x41168d(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a19_0x41168d(Text,{'color':_0x3d2ceb(0xd2),'children':['✗\x20',_0x2d238d]}),a19_0x41168d(Box,{'marginTop':0x1,'children':[a19_0x1d1acb(Text,{'color':_0x3d2ceb(0xb9),'children':_0x46f062(_0x3d2ceb(0xc3))}),a19_0x1d1acb(Text,{'color':_0x3d2ceb(0xc2),'children':_0x3d2ceb(0xce)}),a19_0x1d1acb(Text,{'color':'gray','children':_0x46f062('appMenu.updateCdn.error.authHint.suffix')})]})]});if(_0xc8467f['length']===0x0)return a19_0x1d1acb(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a19_0x1d1acb(Text,{'color':'yellow','children':_0x46f062(_0x3d2ceb(0xba))})});if(_0x495150===_0x3d2ceb(0xd0))return a19_0x41168d(Box,{'flexDirection':_0x3d2ceb(0xb0),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x1d1acb(CurrentMenuCdnContent,{'menuList':_0x34ee36}),a19_0x1d1acb(InputCdnAsset,{'jsCdnUrl':_0x89a8f0,'cssCdnUrl':_0x26a5ec}),a19_0x1d1acb(Box,{'marginTop':0x1,'flexDirection':_0x3d2ceb(0xb0),'children':[{'label':_0x46f062(_0x3d2ceb(0xb4)),'value':'ok'},{'label':_0x46f062('appMenu.updateCdn.action.cancel'),'value':_0x3d2ceb(0xd6)}][_0x3d2ceb(0xb3)](_0x1853dd=>a19_0x41168d(Text,{'color':_0x1ccdfe===_0x1853dd['value']?_0x3d2ceb(0xb7):undefined,'children':[_0x1ccdfe===_0x1853dd[_0x3d2ceb(0xc8)]?'>\x20':'\x20\x20',_0x1853dd['label']]},_0x1853dd['value']))})]});if(_0x495150==='creating')return a19_0x41168d(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a19_0x1d1acb(CurrentMenuCdnContent,{'menuList':_0x34ee36}),a19_0x1d1acb(InputCdnAsset,{'jsCdnUrl':_0x89a8f0,'cssCdnUrl':_0x26a5ec}),a19_0x41168d(Box,{'marginTop':0x1,'children':[a19_0x1d1acb(a19_0xd2c19b,{'type':_0x3d2ceb(0xad)}),a19_0x1d1acb(Text,{'children':_0x46f062('appMenu.updateCdn.loading.syncing')})]})]});if(_0x495150==='updated')return a19_0x41168d(Box,{'flexDirection':_0x3d2ceb(0xb0),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x1d1acb(CurrentMenuCdnContent,{'menuList':_0x34ee36}),a19_0x1d1acb(InputCdnAsset,{'jsCdnUrl':_0x89a8f0,'cssCdnUrl':_0x26a5ec}),a19_0x1d1acb(Box,{'marginTop':0x1,'children':a19_0x1d1acb(Text,{'color':'green','children':_0x46f062(_0x3d2ceb(0xd1))})})]});return a19_0x41168d(Box,{'flexDirection':_0x3d2ceb(0xb0),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x1d1acb(CurrentMenuCdnContent,{'menuList':_0x34ee36}),a19_0x41168d(Box,{'marginTop':0x1,'flexDirection':'column','children':[a19_0x1d1acb(Text,{'color':_0x3d2ceb(0xc2),'children':_0x46f062('appMenu.updateCdn.title')}),_0x89a8f0?a19_0x41168d(Box,{'children':[a19_0x41168d(Text,{'color':'gray','children':['\x20\x20',_0x46f062(_0x3d2ceb(0xc4))]}),a19_0x1d1acb(Text,{'color':_0x3d2ceb(0xcd),'children':_0x89a8f0})]}):_0x495150===_0x3d2ceb(0xb1)&&a19_0x41168d(a19_0x14bfb5,{'children':[a19_0x41168d(Box,{'children':[a19_0x41168d(Text,{'children':['\x20\x20',_0x46f062(_0x3d2ceb(0xc4))]}),a19_0x1d1acb(Text,{'color':_0x3d2ceb(0xcd),'children':_0x1bb21a}),_0x1eab3e&&a19_0x41168d(Text,{'color':_0x3d2ceb(0xd2),'children':['\x20←\x20',_0x1eab3e]})]}),!_0x1eab3e&&a19_0x1d1acb(Box,{'children':a19_0x41168d(Text,{'color':_0x3d2ceb(0xb9),'children':['\x20\x20',_0x46f062(_0x3d2ceb(0xb5))]})})]}),_0x26a5ec?a19_0x41168d(Box,{'children':[a19_0x41168d(Text,{'children':['\x20\x20',_0x46f062('appMenu.updateCdn.input.cssUrl.label')]}),a19_0x1d1acb(Text,{'color':_0x3d2ceb(0xcd),'children':_0x26a5ec})]}):_0x495150===_0x3d2ceb(0xc7)&&a19_0x41168d(a19_0x14bfb5,{'children':[a19_0x41168d(Box,{'children':[a19_0x41168d(Text,{'children':['\x20\x20',_0x46f062(_0x3d2ceb(0xbb))]}),a19_0x1d1acb(Text,{'color':_0x3d2ceb(0xcd),'children':_0x1bb21a}),_0x1eab3e&&a19_0x41168d(Text,{'color':_0x3d2ceb(0xd2),'children':['\x20←\x20',_0x1eab3e]})]}),!_0x1eab3e&&a19_0x1d1acb(Box,{'children':a19_0x41168d(Text,{'color':_0x3d2ceb(0xb9),'children':['\x20\x20',_0x46f062(_0x3d2ceb(0xc1))]})})]})]})]});}
1
+ (function(_0x28c7f1,_0x418249){const _0x59392a=a19_0x4b2e,_0x14a94b=_0x28c7f1();while(!![]){try{const _0x559f7f=parseInt(_0x59392a(0x128))/0x1+-parseInt(_0x59392a(0x149))/0x2*(parseInt(_0x59392a(0x14f))/0x3)+-parseInt(_0x59392a(0x13f))/0x4+-parseInt(_0x59392a(0x151))/0x5+-parseInt(_0x59392a(0x144))/0x6+-parseInt(_0x59392a(0x12d))/0x7*(-parseInt(_0x59392a(0x137))/0x8)+parseInt(_0x59392a(0x134))/0x9;if(_0x559f7f===_0x418249)break;else _0x14a94b['push'](_0x14a94b['shift']());}catch(_0x515cbc){_0x14a94b['push'](_0x14a94b['shift']());}}}(a19_0x1156,0x58ec6));function a19_0x1156(){const _0x4763d7=['need-confirm','label','11515248cqWsmQ','input-css','rightArrow','104816XmLWkF','dots','appMenu.updateCdn.action.continue','downArrow','appMenu.updateCdn.error.noCdnLinks','appMenu.updateCdn.input.jsUrl.placeholder','delete','appMenu.updateCdn.error.invalidCssUrl','2706980bkpixR','lovrabet\x20auth','value','green','appMenu.updateCdn.action.cancel','1937250RrMELc','all','flat','leftArrow','return','56SGrMJO','backspace','red','yellow','appMenu.updateCdn.loading.syncing','appMenu.updateCdn.error.authHint.prefix','37992TznTKa','creating','2243040QEEdVv','trim','\x20←\x20','map','gray','resolve','appMenu.updateCdn.error.cssUrlUnreachable','upArrow','appMenu.updateCdn.success.updated','from','cancel','resources','677946kisXUB','appMenu.updateCdn.input.cssUrl.label','appMenu.updateCdn.input.jsUrl.label','length','input-js','112oAFXLB','path','slice','column','cyan'];a19_0x1156=function(){return _0x4763d7;};return a19_0x1156();}import{jsx as a19_0xefa03f,jsxs as a19_0x46ba66,Fragment as a19_0x232936}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a19_0x306f2f from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';function a19_0x4b2e(_0x2a7161,_0x2be58f){_0x2a7161=_0x2a7161-0x122;const _0x115666=a19_0x1156();let _0x4b2e7a=_0x115666[_0x2a7161];return _0x4b2e7a;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';import{updateMenu}from'./update-menu.js';import{useI18n}from'../i18n/hooks.js';import.meta.main&&render(a19_0xefa03f(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x27a64c=a19_0x4b2e,{exit:_0x49ed00}=useApp(),{t:_0x16cc12}=useI18n(),{loading:_0x5389db,menuList:_0x445119,error:_0x2d68bf}=useGetOnlineMenuList(),[_0x3cbbed,_0xbf33c4]=useState('ok'),[_0x12b4c4,_0x114931]=useState(_0x27a64c(0x12c)),[_0x6e5aee,_0x38f631]=useState(''),[_0x342dae,_0x152e10]=useState(''),[_0x152c7e,_0x5483df]=useState(''),[_0x24ab4e,_0x3d462f]=useState(''),_0x2deece=Array[_0x27a64c(0x125)](new Set(_0x445119[_0x27a64c(0x154)](_0x3594ef=>_0x3594ef[_0x27a64c(0x127)])[_0x27a64c(0x146)]()));useEffect(()=>{_0x12b4c4==='updated'&&setTimeout(_0x49ed00,0x32);},[_0x12b4c4]),useInput(async(_0xc03347,_0x5b13f8)=>{const _0x260344=_0x27a64c;if(_0x12b4c4===_0x260344(0x12c)){if(_0x5b13f8['return']){const _0x3a17d0=_0x152c7e[_0x260344(0x152)]();if(_0x3a17d0==='')return;if(!isValidJsHttpsUrl(_0x3a17d0)){_0x3d462f(_0x16cc12('appMenu.updateCdn.error.invalidJsUrl'));return;}if(!await isUrlReachable(_0x3a17d0)){_0x3d462f(_0x16cc12('appMenu.updateCdn.error.jsUrlUnreachable'));return;}_0x38f631(_0x3a17d0),_0x5483df(''),_0x3d462f(''),_0x114931(_0x260344(0x135));return;}if(_0x5b13f8[_0x260344(0x14a)]||_0x5b13f8[_0x260344(0x13d)]){_0x5483df(_0x37d22b=>_0x37d22b[_0x260344(0x12f)](0x0,-0x1)),_0x3d462f('');return;}_0x5483df(_0x5c4565=>_0x5c4565+_0xc03347);return;}if(_0x12b4c4===_0x260344(0x135)){if(_0x5b13f8[_0x260344(0x148)]){const _0x2e9e4f=_0x152c7e[_0x260344(0x152)]();if(_0x2e9e4f==='')return;if(!isValidCssHttpsUrl(_0x2e9e4f)){_0x3d462f(_0x16cc12(_0x260344(0x13e)));return;}if(!await isUrlReachable(_0x2e9e4f)){_0x3d462f(_0x16cc12(_0x260344(0x122)));return;}_0x152e10(_0x2e9e4f),_0x5483df(''),_0x3d462f(''),_0x114931(_0x260344(0x132));return;}if(_0x5b13f8['backspace']||_0x5b13f8[_0x260344(0x13d)]){_0x5483df(_0x5e81cd=>_0x5e81cd[_0x260344(0x12f)](0x0,-0x1)),_0x3d462f('');return;}_0x5483df(_0x3db0ee=>_0x3db0ee+_0xc03347);return;}if(_0x12b4c4==='need-confirm'){(_0x5b13f8[_0x260344(0x123)]||_0x5b13f8[_0x260344(0x13a)]||_0x5b13f8[_0x260344(0x147)]||_0x5b13f8[_0x260344(0x136)])&&_0xbf33c4(_0x58211f=>_0x58211f==='ok'?_0x260344(0x126):'ok');if(_0x5b13f8[_0x260344(0x148)]){_0x114931(_0x260344(0x150));if(_0x3cbbed==='ok')await Promise[_0x260344(0x145)](_0x445119[_0x260344(0x154)](_0x3cf6dd=>{const _0x21e589=_0x260344,_0x3d54bd={'id':_0x3cf6dd['id'],'label':_0x3cf6dd[_0x21e589(0x133)],'path':_0x3cf6dd[_0x21e589(0x12e)],'resources':[_0x6e5aee,_0x342dae]};if(_0x3cf6dd['resources'][_0x21e589(0x12b)]===0x0)return Promise[_0x21e589(0x156)]();return updateMenu(_0x3d54bd);})),await new Promise(_0x98ed5d=>setTimeout(_0x98ed5d,0x3e8)),_0x114931('updated');else _0x3cbbed===_0x260344(0x126)&&_0x49ed00();}}});if(_0x5389db)return a19_0x46ba66(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a19_0xefa03f(Text,{}),a19_0xefa03f(a19_0x306f2f,{'type':'dots'}),a19_0xefa03f(Text,{'children':_0x16cc12('appMenu.updateCdn.loading.fetching')})]});if(_0x2d68bf)return a19_0x46ba66(Box,{'flexDirection':_0x27a64c(0x130),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x46ba66(Text,{'color':'red','children':['✗\x20',_0x2d68bf]}),a19_0x46ba66(Box,{'marginTop':0x1,'children':[a19_0xefa03f(Text,{'color':_0x27a64c(0x155),'children':_0x16cc12(_0x27a64c(0x14e))}),a19_0xefa03f(Text,{'color':_0x27a64c(0x131),'children':_0x27a64c(0x140)}),a19_0xefa03f(Text,{'color':_0x27a64c(0x155),'children':_0x16cc12('appMenu.updateCdn.error.authHint.suffix')})]})]});if(_0x2deece['length']===0x0)return a19_0xefa03f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a19_0xefa03f(Text,{'color':_0x27a64c(0x14c),'children':_0x16cc12(_0x27a64c(0x13b))})});if(_0x12b4c4==='need-confirm')return a19_0x46ba66(Box,{'flexDirection':_0x27a64c(0x130),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0xefa03f(CurrentMenuCdnContent,{'menuList':_0x445119}),a19_0xefa03f(InputCdnAsset,{'jsCdnUrl':_0x6e5aee,'cssCdnUrl':_0x342dae}),a19_0xefa03f(Box,{'marginTop':0x1,'flexDirection':_0x27a64c(0x130),'children':[{'label':_0x16cc12(_0x27a64c(0x139)),'value':'ok'},{'label':_0x16cc12(_0x27a64c(0x143)),'value':_0x27a64c(0x126)}]['map'](_0xc6cd40=>a19_0x46ba66(Text,{'color':_0x3cbbed===_0xc6cd40[_0x27a64c(0x141)]?'yellow':undefined,'children':[_0x3cbbed===_0xc6cd40[_0x27a64c(0x141)]?'>\x20':'\x20\x20',_0xc6cd40[_0x27a64c(0x133)]]},_0xc6cd40['value']))})]});if(_0x12b4c4===_0x27a64c(0x150))return a19_0x46ba66(Box,{'flexDirection':_0x27a64c(0x130),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0xefa03f(CurrentMenuCdnContent,{'menuList':_0x445119}),a19_0xefa03f(InputCdnAsset,{'jsCdnUrl':_0x6e5aee,'cssCdnUrl':_0x342dae}),a19_0x46ba66(Box,{'marginTop':0x1,'children':[a19_0xefa03f(a19_0x306f2f,{'type':_0x27a64c(0x138)}),a19_0xefa03f(Text,{'children':_0x16cc12(_0x27a64c(0x14d))})]})]});if(_0x12b4c4==='updated')return a19_0x46ba66(Box,{'flexDirection':_0x27a64c(0x130),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0xefa03f(CurrentMenuCdnContent,{'menuList':_0x445119}),a19_0xefa03f(InputCdnAsset,{'jsCdnUrl':_0x6e5aee,'cssCdnUrl':_0x342dae}),a19_0xefa03f(Box,{'marginTop':0x1,'children':a19_0xefa03f(Text,{'color':_0x27a64c(0x142),'children':_0x16cc12(_0x27a64c(0x124))})})]});return a19_0x46ba66(Box,{'flexDirection':_0x27a64c(0x130),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0xefa03f(CurrentMenuCdnContent,{'menuList':_0x445119}),a19_0x46ba66(Box,{'marginTop':0x1,'flexDirection':'column','children':[a19_0xefa03f(Text,{'color':'cyan','children':_0x16cc12('appMenu.updateCdn.title')}),_0x6e5aee?a19_0x46ba66(Box,{'children':[a19_0x46ba66(Text,{'color':_0x27a64c(0x155),'children':['\x20\x20',_0x16cc12(_0x27a64c(0x12a))]}),a19_0xefa03f(Text,{'color':'green','children':_0x6e5aee})]}):_0x12b4c4===_0x27a64c(0x12c)&&a19_0x46ba66(a19_0x232936,{'children':[a19_0x46ba66(Box,{'children':[a19_0x46ba66(Text,{'children':['\x20\x20',_0x16cc12(_0x27a64c(0x12a))]}),a19_0xefa03f(Text,{'color':_0x27a64c(0x142),'children':_0x152c7e}),_0x24ab4e&&a19_0x46ba66(Text,{'color':_0x27a64c(0x14b),'children':[_0x27a64c(0x153),_0x24ab4e]})]}),!_0x24ab4e&&a19_0xefa03f(Box,{'children':a19_0x46ba66(Text,{'color':_0x27a64c(0x155),'children':['\x20\x20',_0x16cc12(_0x27a64c(0x13c))]})})]}),_0x342dae?a19_0x46ba66(Box,{'children':[a19_0x46ba66(Text,{'children':['\x20\x20',_0x16cc12(_0x27a64c(0x129))]}),a19_0xefa03f(Text,{'color':_0x27a64c(0x142),'children':_0x342dae})]}):_0x12b4c4===_0x27a64c(0x135)&&a19_0x46ba66(a19_0x232936,{'children':[a19_0x46ba66(Box,{'children':[a19_0x46ba66(Text,{'children':['\x20\x20',_0x16cc12('appMenu.updateCdn.input.cssUrl.label')]}),a19_0xefa03f(Text,{'color':_0x27a64c(0x142),'children':_0x152c7e}),_0x24ab4e&&a19_0x46ba66(Text,{'color':_0x27a64c(0x14b),'children':[_0x27a64c(0x153),_0x24ab4e]})]}),!_0x24ab4e&&a19_0xefa03f(Box,{'children':a19_0x46ba66(Text,{'color':_0x27a64c(0x155),'children':['\x20\x20',_0x16cc12('appMenu.updateCdn.input.cssUrl.placeholder')]})})]})]})]});}
@@ -0,0 +1 @@
1
+ const a21_0x50bf47=a21_0x5dfb;(function(_0xab5f36,_0x52b5ce){const _0x52bdd3=a21_0x5dfb,_0x4ef891=_0xab5f36();while(!![]){try{const _0x397357=-parseInt(_0x52bdd3(0x184))/0x1+parseInt(_0x52bdd3(0x1a3))/0x2+-parseInt(_0x52bdd3(0x1a1))/0x3*(-parseInt(_0x52bdd3(0x19b))/0x4)+parseInt(_0x52bdd3(0x187))/0x5*(parseInt(_0x52bdd3(0x18f))/0x6)+parseInt(_0x52bdd3(0x196))/0x7+-parseInt(_0x52bdd3(0x194))/0x8+parseInt(_0x52bdd3(0x185))/0x9;if(_0x397357===_0x52b5ce)break;else _0x4ef891['push'](_0x4ef891['shift']());}catch(_0x5413ba){_0x4ef891['push'](_0x4ef891['shift']());}}}(a21_0x423f,0xc19ec));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import a21_0x49e421 from'../i18n/index.js';function a21_0x5dfb(_0x3f7995,_0x5b04be){_0x3f7995=_0x3f7995-0x180;const _0x423f55=a21_0x423f();let _0x5dfbc3=_0x423f55[_0x3f7995];return _0x5dfbc3;}const config=readConfig(),logLabel=a21_0x50bf47(0x182),t=a21_0x49e421['t']['bind'](a21_0x49e421);function a21_0x423f(){const _0x2a15cd=['data','appMenu.updateCdn.error.updateFailed','appcode','path','12kUEKNs','info','label','errorMsg','length','8597328euuxpa','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','2686159qhXYwr','appMenu.error.appCodeHint.option2','sdk-demo','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css','appMenu.error.appCodeHint.option1','124nWLlYD','appMenu.updateCdn.updating','appMenu.error.appCodeHint.title','error','application/json','appMenu.error.authExpired','35985NikcNA','appMenu.error.missingAppCode','1597878SQoqxJ','resources','import','success','json','status','update-menu-cdn-url','common.error','474131BVIMyb','5032638SnqBqN','/smartapi/menu/update','570405seIrhh','log','errorCode','SdkDemo1'];a21_0x423f=function(){return _0x2a15cd;};return a21_0x423f();}import.meta.main&&updateMenu({'id':0xf41e,'label':a21_0x50bf47(0x18a),'path':a21_0x50bf47(0x198),'resources':[a21_0x50bf47(0x195),a21_0x50bf47(0x199)]});export async function updateMenu(_0x574d57){const _0x53862b=a21_0x50bf47,_0x900d9a=config?.[_0x53862b(0x18d)];if(!_0x900d9a){const _0x12877d=t(_0x53862b(0x1a2));logger[_0x53862b(0x19e)](logLabel,_0x12877d),console[_0x53862b(0x19e)]('×\x20'+_0x12877d),console[_0x53862b(0x188)](t(_0x53862b(0x19d))),console[_0x53862b(0x188)](t(_0x53862b(0x19a))),console['log'](t(_0x53862b(0x197)));return;}logger[_0x53862b(0x190)](logLabel,t(_0x53862b(0x19c),{'label':_0x574d57[_0x53862b(0x191)],'path':_0x574d57[_0x53862b(0x18e)]}));const _0x50ffbc={'id':_0x574d57['id'],'appCode':_0x900d9a,'extend':{'loadScriptMode':_0x53862b(0x1a5),..._0x574d57[_0x53862b(0x1a4)]?.[_0x53862b(0x193)]?{'resources':JSON['stringify'](_0x574d57[_0x53862b(0x1a4)])}:{}}};_0x574d57[_0x53862b(0x191)]&&(_0x50ffbc[_0x53862b(0x191)]=_0x574d57[_0x53862b(0x191)]);const _0x167d75=await fetch(getApiDomain()+_0x53862b(0x186),{'method':'POST','body':JSON['stringify'](_0x50ffbc),'headers':{'Content-Type':_0x53862b(0x19f),'Cookie':getCookie()}});if(!_0x167d75['ok']){if(_0x167d75[_0x53862b(0x181)]===0x191){const _0x539c34=t(_0x53862b(0x1a0));logger['error'](logLabel,_0x539c34,{'status':_0x167d75[_0x53862b(0x181)],'menu':_0x574d57[_0x53862b(0x191)]});throw new Error(_0x539c34);}const _0x113d72=t('appMenu.updateCdn.error.updateFailed',{'error':_0x167d75[_0x53862b(0x181)]});logger[_0x53862b(0x19e)](logLabel,_0x113d72,{'menu':_0x574d57[_0x53862b(0x191)]});throw new Error(_0x113d72);}const _0x47fe62=await _0x167d75[_0x53862b(0x180)]();if(!_0x47fe62[_0x53862b(0x1a6)]){const _0x57079d=t(_0x53862b(0x18c),{'error':_0x47fe62[_0x53862b(0x192)]||t(_0x53862b(0x183))});logger['error'](logLabel,_0x57079d,{'errorCode':_0x47fe62[_0x53862b(0x189)],'errorMsg':_0x47fe62[_0x53862b(0x192)],'menu':_0x574d57[_0x53862b(0x191)]});throw new Error(_0x57079d);}logger[_0x53862b(0x190)](logLabel,t('appMenu.updateCdn.success.synced',{'label':_0x574d57[_0x53862b(0x191)]}),_0x47fe62[_0x53862b(0x18b)]);}
@@ -1 +1 @@
1
- (function(_0x501a56,_0x3f8031){const _0x280c16=a22_0x4909,_0x2ea679=_0x501a56();while(!![]){try{const _0x319b45=-parseInt(_0x280c16(0x10a))/0x1+-parseInt(_0x280c16(0xff))/0x2+parseInt(_0x280c16(0x100))/0x3+-parseInt(_0x280c16(0x101))/0x4+-parseInt(_0x280c16(0xfc))/0x5*(-parseInt(_0x280c16(0x102))/0x6)+parseInt(_0x280c16(0x108))/0x7*(-parseInt(_0x280c16(0x10d))/0x8)+-parseInt(_0x280c16(0x10b))/0x9*(-parseInt(_0x280c16(0x110))/0xa);if(_0x319b45===_0x3f8031)break;else _0x2ea679['push'](_0x2ea679['shift']());}catch(_0x26ae8b){_0x2ea679['push'](_0x2ea679['shift']());}}}(a22_0x3201,0xf2322));function a22_0x4909(_0x58a93e,_0x24a518){_0x58a93e=_0x58a93e-0xfb;const _0x320145=a22_0x3201();let _0x490918=_0x320145[_0x58a93e];return _0x490918;}import{jsx as a22_0x11ce7d,jsxs as a22_0x36053b}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';function a22_0x3201(){const _0x2696f1=['auth.login.browserPrompt','then','finally','auth.login.pressQToExit','4728584VJVGdG','auth.session.valid','1277825ApqaPK','786222BLWYxf','auth.login.inProgress','8PoctqU','auth.login.pressEnter','green','460vmUhtp','auth.login.successCli','column','20SqRBwJ','gray','log','3435850diQdki','1450794jUgTGx','6687720NIFRvG','2749740LZooPf','return'];a22_0x3201=function(){return _0x2696f1;};return a22_0x3201();}import{authServer}from'./auth-server.js';import a22_0x16c4c1 from'ink-spinner';import{useI18n}from'../i18n/hooks.js';export function AuthServer(){const _0x4a02ef=a22_0x4909,{exit:_0x557c2b}=useApp(),{t:_0x410da8}=useI18n(),[_0x1cd099,_0x4cf3bd]=useState(![]),[_0x28b36c,_0x47a49a]=useState(!![]),[_0x4f65e3,_0x1b49e0]=useState(![]),[_0x1d4632,_0x3ea381]=useState(![]);useEffect(()=>{const _0x3f1eb8=a22_0x4909;getIsSessionValid()[_0x3f1eb8(0x105)](_0x4cf3bd)[_0x3f1eb8(0x106)](()=>_0x47a49a(![]));},[]),useEffect(()=>{const _0x23c048=a22_0x4909;!_0x28b36c&&_0x1cd099&&(console[_0x23c048(0xfe)](_0x410da8(_0x23c048(0x109))),_0x557c2b());},[_0x28b36c,_0x1cd099,_0x557c2b]),useEffect(()=>{const _0x5cede0=a22_0x4909;_0x1d4632&&(console[_0x5cede0(0xfe)]('*\x20'+_0x410da8(_0x5cede0(0x111))),_0x557c2b());},[_0x1d4632,_0x557c2b]),useInput((_0x333732,_0x4c8b1f)=>{const _0x46e01c=a22_0x4909;_0x4c8b1f[_0x46e01c(0x103)]&&(_0x1b49e0(!![]),authServer({'silent':!![]})[_0x46e01c(0x105)](_0x20602c=>{_0x3ea381(_0x20602c);})),_0x333732==='q'&&_0x557c2b();});if(_0x28b36c)return null;if(_0x1cd099||_0x1d4632)return null;return a22_0x11ce7d(Box,{'flexDirection':_0x4a02ef(0xfb),'marginTop':0x1,'marginBottom':0x1,'children':_0x4f65e3?a22_0x36053b(Box,{'children':[a22_0x11ce7d(Box,{'width':'1'}),a22_0x36053b(Text,{'color':_0x4a02ef(0x10f),'children':[a22_0x11ce7d(a22_0x16c4c1,{'type':'dots'}),'\x20\x20']}),a22_0x36053b(Text,{'children':[_0x410da8(_0x4a02ef(0x10c)),'\x20']}),a22_0x11ce7d(Text,{'color':'gray','children':_0x410da8(_0x4a02ef(0x104))})]}):a22_0x36053b(Box,{'children':[a22_0x11ce7d(Box,{'width':'1'}),a22_0x11ce7d(Text,{'children':_0x410da8(_0x4a02ef(0x10e))}),a22_0x11ce7d(Text,{'color':_0x4a02ef(0xfd),'children':_0x410da8(_0x4a02ef(0x107))})]})});}
1
+ function a22_0x197f(_0x29ecd7,_0x44bd59){_0x29ecd7=_0x29ecd7-0xc7;const _0x4f1529=a22_0x4f15();let _0x197f16=_0x4f1529[_0x29ecd7];return _0x197f16;}(function(_0x305aa7,_0x28dade){const _0x5c8ba2=a22_0x197f,_0x377a13=_0x305aa7();while(!![]){try{const _0x167464=parseInt(_0x5c8ba2(0xc7))/0x1+parseInt(_0x5c8ba2(0xce))/0x2+-parseInt(_0x5c8ba2(0xd2))/0x3+-parseInt(_0x5c8ba2(0xd5))/0x4+parseInt(_0x5c8ba2(0xcf))/0x5*(parseInt(_0x5c8ba2(0xcc))/0x6)+-parseInt(_0x5c8ba2(0xd4))/0x7*(-parseInt(_0x5c8ba2(0xd1))/0x8)+-parseInt(_0x5c8ba2(0xcb))/0x9;if(_0x167464===_0x28dade)break;else _0x377a13['push'](_0x377a13['shift']());}catch(_0x36d5a0){_0x377a13['push'](_0x377a13['shift']());}}}(a22_0x4f15,0x6e1df));import{jsx as a22_0x5172a8,jsxs as a22_0x327c6d}from'react/jsx-runtime';function a22_0x4f15(){const _0x53997d=['801597zeSBpK','then','log','dots','3568383xtrTqH','354QdnXaT','gray','329278FPmbHw','58235JyIady','green','4568zGApST','1563564QaXmCf','column','1519LBrHcb','1634408yNQhWz','return','auth.login.pressEnter'];a22_0x4f15=function(){return _0x53997d;};return a22_0x4f15();}import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a22_0x31da4f from'ink-spinner';import{useI18n}from'../i18n/hooks.js';export function AuthServer(){const _0x3e0d31=a22_0x197f,{exit:_0x23161b}=useApp(),{t:_0x3ab260}=useI18n(),[_0x40f9ee,_0x11d754]=useState(![]),[_0x35489a,_0x3e0eb6]=useState(!![]),[_0xe1f1ab,_0x4bfffe]=useState(![]),[_0x2913cf,_0x233f89]=useState(![]);useEffect(()=>{const _0x52ac83=a22_0x197f;getIsSessionValid()[_0x52ac83(0xc8)](_0x11d754)['finally'](()=>_0x3e0eb6(![]));},[]),useEffect(()=>{const _0xd0aec4=a22_0x197f;!_0x35489a&&_0x40f9ee&&(console[_0xd0aec4(0xc9)](_0x3ab260('auth.session.valid')),_0x23161b());},[_0x35489a,_0x40f9ee,_0x23161b]),useEffect(()=>{const _0x2eed19=a22_0x197f;_0x2913cf&&(console[_0x2eed19(0xc9)]('*\x20'+_0x3ab260('auth.login.successCli')),_0x23161b());},[_0x2913cf,_0x23161b]),useInput((_0x3fb445,_0x472c01)=>{const _0x4c2447=a22_0x197f;_0x472c01[_0x4c2447(0xd6)]&&(_0x4bfffe(!![]),authServer({'silent':!![]})['then'](_0x423eec=>{_0x233f89(_0x423eec);})),_0x3fb445==='q'&&_0x23161b();});if(_0x35489a)return null;if(_0x40f9ee||_0x2913cf)return null;return a22_0x5172a8(Box,{'flexDirection':_0x3e0d31(0xd3),'marginTop':0x1,'marginBottom':0x1,'children':_0xe1f1ab?a22_0x327c6d(Box,{'children':[a22_0x5172a8(Box,{'width':'1'}),a22_0x327c6d(Text,{'color':_0x3e0d31(0xd0),'children':[a22_0x5172a8(a22_0x31da4f,{'type':_0x3e0d31(0xca)}),'\x20\x20']}),a22_0x327c6d(Text,{'children':[_0x3ab260('auth.login.inProgress'),'\x20']}),a22_0x5172a8(Text,{'color':_0x3e0d31(0xcd),'children':_0x3ab260('auth.login.browserPrompt')})]}):a22_0x327c6d(Box,{'children':[a22_0x5172a8(Box,{'width':'1'}),a22_0x5172a8(Text,{'children':_0x3ab260(_0x3e0d31(0xd7))}),a22_0x5172a8(Text,{'color':_0x3e0d31(0xcd),'children':_0x3ab260('auth.login.pressQToExit')})]})});}
@@ -1 +1 @@
1
- const a23_0x3c1efc=a23_0x3799;(function(_0x42fbd2,_0x3bf7d6){const _0x2fd35d=a23_0x3799,_0x5c9509=_0x42fbd2();while(!![]){try{const _0x4e7127=parseInt(_0x2fd35d(0xca))/0x1*(parseInt(_0x2fd35d(0xb6))/0x2)+parseInt(_0x2fd35d(0xbd))/0x3*(-parseInt(_0x2fd35d(0xd5))/0x4)+-parseInt(_0x2fd35d(0xd4))/0x5*(-parseInt(_0x2fd35d(0xc0))/0x6)+-parseInt(_0x2fd35d(0xd9))/0x7+-parseInt(_0x2fd35d(0xba))/0x8*(-parseInt(_0x2fd35d(0xc8))/0x9)+-parseInt(_0x2fd35d(0xbf))/0xa*(-parseInt(_0x2fd35d(0xab))/0xb)+-parseInt(_0x2fd35d(0xce))/0xc;if(_0x4e7127===_0x3bf7d6)break;else _0x5c9509['push'](_0x5c9509['shift']());}catch(_0x63ab61){_0x5c9509['push'](_0x5c9509['shift']());}}}(a23_0x30f8,0x3856d));function a23_0x3799(_0x31a29f,_0xbc9146){_0x31a29f=_0x31a29f-0xa9;const _0x30f87f=a23_0x30f8();let _0x3799bb=_0x30f87f[_0x31a29f];return _0x3799bb;}import{writeFileSync}from'node:fs';import a23_0x1ddaab from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';import a23_0x277184 from'../i18n/index.js';const t=a23_0x277184['t'][a23_0x3c1efc(0xd7)](a23_0x277184);export async function authServer(_0x2f84c){const _0x2af8de=a23_0x3c1efc,_0x418160=_0x2f84c?.[_0x2af8de(0xac)]||![];if(await getIsSessionValid())return!![];const _0x583183=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))[_0x2af8de(0xbb)]();return new Promise(async(_0x116ee7,_0x58dd8f)=>{const _0x5c76a8=_0x2af8de;let _0x9398eb=0x0;const _0x183326=a23_0x1ddaab[_0x5c76a8(0xbc)](_0x583183,async(_0x8f5c1b,_0x46f83a)=>{const _0x4657a7=_0x5c76a8,_0x1000c9=getUserDomain(),_0x1408ab=_0x8f5c1b['headers']['cookie']||'',_0x468614=await fetch(_0x1000c9+_0x4657a7(0xaf),{'headers':{'cookie':_0x1408ab}})[_0x4657a7(0xb9)](_0x4a5bc1=>_0x4a5bc1[_0x4657a7(0xbb)]()),_0x4755b8=_0x468614&&_0x468614[_0x4657a7(0xb7)]&&_0x468614['user'];if(_0x4755b8){writeFileSync(cookieFile,_0x1408ab,'utf-8'),_0x116ee7(!![]);const _0x1f2848=t(_0x4657a7(0xcf)),_0x54c84d=t(_0x4657a7(0xc7),{'seconds':_0x4657a7(0xd2)}),_0x30dc4b=t(_0x4657a7(0xcc)),_0x35f600=_0x4657a7(0xbe)+_0x1f2848+'</title></head>\x0a<body>\x0a\x20\x20<div>'+_0x54c84d+_0x4657a7(0xc9)+_0x30dc4b+_0x4657a7(0xcb);_0x46f83a[_0x4657a7(0xda)](0xc8,{'Content-Type':_0x4657a7(0xc5)}),_0x46f83a[_0x4657a7(0xd1)](_0x35f600),_0x183326[_0x4657a7(0xad)]();}else{const _0xe3499a=''+encodeURIComponent(_0x4657a7(0xb8)+_0x9398eb);_0x46f83a[_0x4657a7(0xda)](0x12e,{'location':_0x1000c9+_0x4657a7(0xd8)+_0xe3499a}),_0x46f83a[_0x4657a7(0xd1)]();return;}});_0x183326['listen'](0x0,_0x5c76a8(0xb3),()=>{const _0x4c0784=_0x5c76a8,_0x245c4d=_0x183326[_0x4c0784(0xaa)]();_0x9398eb=typeof _0x245c4d===_0x4c0784(0xcd)&&_0x245c4d?_0x245c4d[_0x4c0784(0xd3)]:Number(_0x245c4d);const _0xd3950c=_0x4c0784(0xb8)+_0x9398eb;!_0x418160&&(console[_0x4c0784(0xc2)](t(_0x4c0784(0xb0))),console[_0x4c0784(0xc2)](t(_0x4c0784(0xc4)),_0xd3950c),console['log'](t(_0x4c0784(0xb2))),console[_0x4c0784(0xc2)](''),console['log'](t(_0x4c0784(0xa9))),console[_0x4c0784(0xc2)]('')),openInBrowser(_0xd3950c)['then'](_0x4d856e=>{const _0x3a21b6=_0x4c0784;!_0x418160&&(_0x4d856e?console[_0x3a21b6(0xc2)](t(_0x3a21b6(0xb4))):(console['log'](t('auth.server.browserOpenFailed')),console[_0x3a21b6(0xc2)](t(_0x3a21b6(0xae)),_0xd3950c)),console[_0x3a21b6(0xc2)](''));})['catch'](()=>{const _0x32c4a4=_0x4c0784;!_0x418160&&(console['log'](t('auth.server.browserOpenFailed')),console[_0x32c4a4(0xc2)](t(_0x32c4a4(0xae)),_0xd3950c),console[_0x32c4a4(0xc2)](''));});}),_0x183326['on'](_0x5c76a8(0xc3),_0x2428b2=>{!_0x418160&&console['error']('Auth\x20server\x20error:',_0x2428b2),_0x58dd8f(_0x2428b2);});});}function a23_0x30f8(){const _0x3ee02f=['open\x20\x22','end','<span\x20id=\x22t\x22>5</span>','port','5rmaPfn','650812fKnBVM','isAuth','bind','/sign-in?redirect=','1125579wyytgB','writeHead','auth.server.manualOpenHint','address','3481247RnDHqX','silent','close','auth.server.manualCopyUrl','/api/auth/get-session','auth.server.starting','start\x20\x22\x22\x20\x22','auth.server.openingBrowser','127.0.0.1','auth.server.browserOpened','platform','6uBvxaq','session','https://dev.lovrabet.com:','then','124768ZPikkf','json','createServer','3CWCAQC','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>','10jPvFXm','1015542Bpqijo','xdg-open\x20\x22','log','error','auth.server.loginUrl','text/html;\x20charset=utf-8','win32','auth.login.success.message','27onHptF','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','134361QsCQJs','</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>','auth.login.success.manualClose','object','4576080ZWYpJV','auth.login.success.title'];a23_0x30f8=function(){return _0x3ee02f;};return a23_0x30f8();}function openInBrowser(_0x401b84){return new Promise(_0x22a34b=>{const _0x495775=a23_0x3799,_0x28f5cf=process[_0x495775(0xb5)];let _0x310896;if(_0x28f5cf===_0x495775(0xc6))_0x310896=_0x495775(0xb1)+_0x401b84+'\x22';else _0x28f5cf==='darwin'?_0x310896=_0x495775(0xd0)+_0x401b84+'\x22':_0x310896=_0x495775(0xc1)+_0x401b84+'\x22';exec(_0x310896,_0x23e877=>{_0x23e877?_0x22a34b(![]):_0x22a34b(!![]);});});}if(import.meta.main){const isAuth=await authServer();console['log'](a23_0x3c1efc(0xd6),isAuth);}
1
+ const a23_0x1fcc04=a23_0x14cc;(function(_0x4a93c1,_0x17098e){const _0x144c69=a23_0x14cc,_0x5102e8=_0x4a93c1();while(!![]){try{const _0x1e313c=-parseInt(_0x144c69(0xfd))/0x1+parseInt(_0x144c69(0xde))/0x2+parseInt(_0x144c69(0xf3))/0x3*(-parseInt(_0x144c69(0x100))/0x4)+parseInt(_0x144c69(0xf6))/0x5+parseInt(_0x144c69(0xf8))/0x6*(-parseInt(_0x144c69(0x102))/0x7)+-parseInt(_0x144c69(0x105))/0x8*(parseInt(_0x144c69(0xdd))/0x9)+parseInt(_0x144c69(0xf0))/0xa;if(_0x1e313c===_0x17098e)break;else _0x5102e8['push'](_0x5102e8['shift']());}catch(_0x3191c0){_0x5102e8['push'](_0x5102e8['shift']());}}}(a23_0x21b7,0xb79ee));import{writeFileSync}from'node:fs';import a23_0x1ff2b7 from'node:https';import{getUserDomain}from'../constant/domain.js';function a23_0x14cc(_0x4499a3,_0xcbf4b8){_0x4499a3=_0x4499a3-0xdd;const _0x21b76e=a23_0x21b7();let _0x14cc48=_0x21b76e[_0x4499a3];return _0x14cc48;}import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';import a23_0x649d5f from'../i18n/index.js';const t=a23_0x649d5f['t'][a23_0x1fcc04(0x104)](a23_0x649d5f);function a23_0x21b7(){const _0x2c554e=['auth.server.openingBrowser','https://dev.lovrabet.com:','2190880QagAby','silent','485292hDQXLe','log','headers','cookie','json','1479202tZcfFq','open\x20\x22','port','5962172sUARpM','close','49kHSBXM','auth.server.starting','bind','1240264kEQGfJ','address','auth.server.browserOpened','object','18qFIWep','1402482IELfML','auth.server.browserOpenFailed','end','auth.login.success.title','</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>','<span\x20id=\x22t\x22>5</span>','auth.login.success.manualClose','darwin','https://g.yuntooai.com/cert/lovrabet-dev.json','isAuth','listen','/api/auth/get-session','/sign-in?redirect=','user','writeHead','utf-8','Auth\x20server\x20error:','auth.server.manualCopyUrl','34586780Cddnwt','error','then','3cYiJmw'];a23_0x21b7=function(){return _0x2c554e;};return a23_0x21b7();}export async function authServer(_0x2872d0){const _0x4fb5d6=a23_0x1fcc04,_0xbf50f1=_0x2872d0?.[_0x4fb5d6(0xf7)]||![];if(await getIsSessionValid())return!![];const _0x2f2997=await(await fetch(_0x4fb5d6(0xe6)))[_0x4fb5d6(0xfc)]();return new Promise(async(_0x737d3b,_0x204274)=>{const _0xc40e38=_0x4fb5d6;let _0x2bae8c=0x0;const _0x3fd0a8=a23_0x1ff2b7['createServer'](_0x2f2997,async(_0x2a3917,_0xd29b3d)=>{const _0x131eb5=a23_0x14cc,_0x54027b=getUserDomain(),_0xc900fb=_0x2a3917[_0x131eb5(0xfa)][_0x131eb5(0xfb)]||'',_0x36568c=await fetch(_0x54027b+_0x131eb5(0xe9),{'headers':{'cookie':_0xc900fb}})[_0x131eb5(0xf2)](_0x468738=>_0x468738[_0x131eb5(0xfc)]()),_0x40ed64=_0x36568c&&_0x36568c['session']&&_0x36568c[_0x131eb5(0xeb)];if(_0x40ed64){writeFileSync(cookieFile,_0xc900fb,_0x131eb5(0xed)),_0x737d3b(!![]);const _0x4e2d80=t(_0x131eb5(0xe1)),_0x408a1c=t('auth.login.success.message',{'seconds':_0x131eb5(0xe3)}),_0x300646=t(_0x131eb5(0xe4)),_0x3e100d='<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>'+_0x4e2d80+'</title></head>\x0a<body>\x0a\x20\x20<div>'+_0x408a1c+'</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>'+_0x300646+_0x131eb5(0xe2);_0xd29b3d[_0x131eb5(0xec)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0xd29b3d[_0x131eb5(0xe0)](_0x3e100d),_0x3fd0a8[_0x131eb5(0x101)]();}else{const _0x2eab5a=''+encodeURIComponent(_0x131eb5(0xf5)+_0x2bae8c);_0xd29b3d[_0x131eb5(0xec)](0x12e,{'location':_0x54027b+_0x131eb5(0xea)+_0x2eab5a}),_0xd29b3d[_0x131eb5(0xe0)]();return;}});_0x3fd0a8[_0xc40e38(0xe8)](0x0,'127.0.0.1',()=>{const _0x4dc9fc=_0xc40e38,_0x225d7a=_0x3fd0a8[_0x4dc9fc(0x106)]();_0x2bae8c=typeof _0x225d7a===_0x4dc9fc(0x108)&&_0x225d7a?_0x225d7a[_0x4dc9fc(0xff)]:Number(_0x225d7a);const _0x4114cc=_0x4dc9fc(0xf5)+_0x2bae8c;!_0xbf50f1&&(console[_0x4dc9fc(0xf9)](t(_0x4dc9fc(0x103))),console[_0x4dc9fc(0xf9)](t('auth.server.loginUrl'),_0x4114cc),console[_0x4dc9fc(0xf9)](t(_0x4dc9fc(0xf4))),console['log'](''),console[_0x4dc9fc(0xf9)](t('auth.server.manualOpenHint')),console[_0x4dc9fc(0xf9)]('')),openInBrowser(_0x4114cc)[_0x4dc9fc(0xf2)](_0x35defb=>{const _0x571dea=_0x4dc9fc;!_0xbf50f1&&(_0x35defb?console[_0x571dea(0xf9)](t(_0x571dea(0x107))):(console[_0x571dea(0xf9)](t(_0x571dea(0xdf))),console[_0x571dea(0xf9)](t(_0x571dea(0xef)),_0x4114cc)),console[_0x571dea(0xf9)](''));})['catch'](()=>{const _0x207680=_0x4dc9fc;!_0xbf50f1&&(console[_0x207680(0xf9)](t('auth.server.browserOpenFailed')),console['log'](t(_0x207680(0xef)),_0x4114cc),console[_0x207680(0xf9)](''));});}),_0x3fd0a8['on'](_0xc40e38(0xf1),_0x278221=>{const _0x125db5=_0xc40e38;!_0xbf50f1&&console['error'](_0x125db5(0xee),_0x278221),_0x204274(_0x278221);});});}function openInBrowser(_0x444e35){return new Promise(_0xd52b73=>{const _0xdca601=a23_0x14cc,_0x5adb01=process['platform'];let _0x1e761e;if(_0x5adb01==='win32')_0x1e761e='start\x20\x22\x22\x20\x22'+_0x444e35+'\x22';else _0x5adb01===_0xdca601(0xe5)?_0x1e761e=_0xdca601(0xfe)+_0x444e35+'\x22':_0x1e761e='xdg-open\x20\x22'+_0x444e35+'\x22';exec(_0x1e761e,_0x3f7428=>{_0x3f7428?_0xd52b73(![]):_0xd52b73(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a23_0x1fcc04(0xf9)](a23_0x1fcc04(0xe7),isAuth);}
@@ -1 +1 @@
1
- const a24_0x37c96d=a24_0x509f;(function(_0x49b932,_0x39d8f0){const _0x5c974b=a24_0x509f,_0x348606=_0x49b932();while(!![]){try{const _0x93ff39=parseInt(_0x5c974b(0xb6))/0x1+-parseInt(_0x5c974b(0xb9))/0x2+parseInt(_0x5c974b(0xb3))/0x3+-parseInt(_0x5c974b(0xb4))/0x4*(-parseInt(_0x5c974b(0xb8))/0x5)+parseInt(_0x5c974b(0xba))/0x6+-parseInt(_0x5c974b(0xb7))/0x7+parseInt(_0x5c974b(0xbb))/0x8;if(_0x93ff39===_0x39d8f0)break;else _0x348606['push'](_0x348606['shift']());}catch(_0x7c4903){_0x348606['push'](_0x348606['shift']());}}}(a24_0x293d,0x5b897));import{mkdirSync}from'node:fs';function a24_0x509f(_0x24699c,_0x3bb7b3){_0x24699c=_0x24699c-0xb3;const _0x293d5f=a24_0x293d();let _0x509fa8=_0x293d5f[_0x24699c];return _0x509fa8;}import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a24_0x37c96d(0xb5));export const cookieFile=join(configDir,a24_0x37c96d(0xbc));function a24_0x293d(){const _0x401826=['3179622ySXEvM','851512OExLjj','cookie','234660LJogeE','512ZPadyi','.lovrabet','247988WrNwGg','4222785goAqnv','15385CMYxIY','756500jkxJpW'];a24_0x293d=function(){return _0x401826;};return a24_0x293d();}mkdirSync(configDir,{'recursive':!![]});
1
+ const a24_0x2998f9=a24_0x156b;(function(_0x213e3f,_0xc7dcf6){const _0x4c4dce=a24_0x156b,_0x4061bd=_0x213e3f();while(!![]){try{const _0x349694=parseInt(_0x4c4dce(0x7a))/0x1+-parseInt(_0x4c4dce(0x7b))/0x2+parseInt(_0x4c4dce(0x79))/0x3*(parseInt(_0x4c4dce(0x7c))/0x4)+-parseInt(_0x4c4dce(0x78))/0x5*(-parseInt(_0x4c4dce(0x81))/0x6)+-parseInt(_0x4c4dce(0x7e))/0x7+parseInt(_0x4c4dce(0x80))/0x8+-parseInt(_0x4c4dce(0x7d))/0x9*(-parseInt(_0x4c4dce(0x7f))/0xa);if(_0x349694===_0xc7dcf6)break;else _0x4061bd['push'](_0x4061bd['shift']());}catch(_0xd86c57){_0x4061bd['push'](_0x4061bd['shift']());}}}(a24_0x2eb2,0xb7486));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a24_0x2998f9(0x77));function a24_0x156b(_0x5267f7,_0x2ee1b7){_0x5267f7=_0x5267f7-0x76;const _0x2eb290=a24_0x2eb2();let _0x156bc7=_0x2eb290[_0x5267f7];return _0x156bc7;}export const cookieFile=join(configDir,a24_0x2998f9(0x76));function a24_0x2eb2(){const _0x1559e7=['1871466qNPzln','256198rSUcKp','2258794jtptql','4gzyxBj','774QONbrG','791399WRTkpL','3340hdTBMy','342512zQTTXh','348otMBol','cookie','.lovrabet','89795MBbMEu'];a24_0x2eb2=function(){return _0x1559e7;};return a24_0x2eb2();}mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- function a25_0x1269(){var _0x2f635c=['1553031HhKHVt','2QEZCdG','29118ScFXQL','13981dJbCfS','15690240aXZNWl','utf-8','805SQckWq','1888424xzElhg','450ynKtAy','574383jIBhXo','9AEfimE','3048925LPaGsl','4nbFzpe'];a25_0x1269=function(){return _0x2f635c;};return a25_0x1269();}function a25_0x3a57(_0x1c1c69,_0x9eefb4){_0x1c1c69=_0x1c1c69-0x74;var _0x126976=a25_0x1269();var _0x3a57a3=_0x126976[_0x1c1c69];return _0x3a57a3;}(function(_0x2f1a83,_0x43878c){var _0x43d548=a25_0x3a57,_0x5ac578=_0x2f1a83();while(!![]){try{var _0x5be35a=parseInt(_0x43d548(0x7d))/0x1*(-parseInt(_0x43d548(0x75))/0x2)+parseInt(_0x43d548(0x74))/0x3*(-parseInt(_0x43d548(0x80))/0x4)+-parseInt(_0x43d548(0x7f))/0x5+-parseInt(_0x43d548(0x76))/0x6*(-parseInt(_0x43d548(0x7a))/0x7)+parseInt(_0x43d548(0x7b))/0x8*(parseInt(_0x43d548(0x7e))/0x9)+-parseInt(_0x43d548(0x7c))/0xa*(parseInt(_0x43d548(0x77))/0xb)+parseInt(_0x43d548(0x78))/0xc;if(_0x5be35a===_0x43878c)break;else _0x5ac578['push'](_0x5ac578['shift']());}catch(_0x20bd20){_0x5ac578['push'](_0x5ac578['shift']());}}}(a25_0x1269,0x53a64));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x3125f1=a25_0x3a57;try{return readFileSync(cookieFile,_0x3125f1(0x79));}catch{}return'';}
1
+ function a25_0x8ed3(){var _0x130884=['5639155YJouRc','46490510wrkkmO','2865120qzXVZd','4175184oEoUSG','40159DaqfFc','942UsQqIw','232038gBHPZh','256azMeLj','455032bXQPEh','2eqldFR'];a25_0x8ed3=function(){return _0x130884;};return a25_0x8ed3();}(function(_0x4d0c3e,_0x4d0b20){var _0x72f35d=a25_0x3e29,_0x565de2=_0x4d0c3e();while(!![]){try{var _0x472d74=parseInt(_0x72f35d(0x75))/0x1+-parseInt(_0x72f35d(0x76))/0x2*(-parseInt(_0x72f35d(0x7a))/0x3)+parseInt(_0x72f35d(0x79))/0x4+parseInt(_0x72f35d(0x77))/0x5+parseInt(_0x72f35d(0x72))/0x6*(parseInt(_0x72f35d(0x71))/0x7)+-parseInt(_0x72f35d(0x74))/0x8*(-parseInt(_0x72f35d(0x73))/0x9)+-parseInt(_0x72f35d(0x78))/0xa;if(_0x472d74===_0x4d0b20)break;else _0x565de2['push'](_0x565de2['shift']());}catch(_0x372a34){_0x565de2['push'](_0x565de2['shift']());}}}(a25_0x8ed3,0xbb641));import{readFileSync}from'node:fs';function a25_0x3e29(_0x5468dd,_0x4c782b){_0x5468dd=_0x5468dd-0x71;var _0x8ed392=a25_0x8ed3();var _0x3e29fc=_0x8ed392[_0x5468dd];return _0x3e29fc;}import{cookieFile}from'./constant.js';export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}
@@ -1 +1 @@
1
- function a26_0x3fcf(){const _0x46968f=['1435Sssjli','json','26PKVzgS','4DYVDTu','1315378McrpwK','333BVpxbh','session','2780585VYYdyC','then','374fmDIeR','utf-8','9063whjjLM','user','/api/auth/get-session','48880krNMEh','2962302ZtMOLz','643728NdjLBF','416930vLEzJz'];a26_0x3fcf=function(){return _0x46968f;};return a26_0x3fcf();}(function(_0x3f846e,_0x59aa19){const _0x3a5e3e=a26_0x45cf,_0x2091df=_0x3f846e();while(!![]){try{const _0xbe05bf=parseInt(_0x3a5e3e(0xfe))/0x1+-parseInt(_0x3a5e3e(0x10e))/0x2*(-parseInt(_0x3a5e3e(0x105))/0x3)+-parseInt(_0x3a5e3e(0xfd))/0x4*(-parseInt(_0x3a5e3e(0x101))/0x5)+parseInt(_0x3a5e3e(0x109))/0x6+parseInt(_0x3a5e3e(0x10c))/0x7*(-parseInt(_0x3a5e3e(0x108))/0x8)+-parseInt(_0x3a5e3e(0xff))/0x9*(-parseInt(_0x3a5e3e(0x10b))/0xa)+parseInt(_0x3a5e3e(0x103))/0xb*(-parseInt(_0x3a5e3e(0x10a))/0xc);if(_0xbe05bf===_0x59aa19)break;else _0x2091df['push'](_0x2091df['shift']());}catch(_0x11ab3c){_0x2091df['push'](_0x2091df['shift']());}}}(a26_0x3fcf,0xd4918));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a26_0x45cf(_0x435b09,_0x54d88d){_0x435b09=_0x435b09-0xfd;const _0x3fcfbe=a26_0x3fcf();let _0x45cf94=_0x3fcfbe[_0x435b09];return _0x45cf94;}export async function getIsSessionValid(){const _0x5d32a4=a26_0x45cf;try{if(!existsSync(cookieFile))return![];const _0x13061f=readFileSync(cookieFile,_0x5d32a4(0x104)),_0x41f411=await fetch(getUserDomain()+_0x5d32a4(0x107),{'headers':{'cookie':_0x13061f}})[_0x5d32a4(0x102)](_0x21c172=>_0x21c172[_0x5d32a4(0x10d)]());return _0x41f411&&_0x41f411[_0x5d32a4(0x100)]&&_0x41f411[_0x5d32a4(0x106)];}catch{}return![];}
1
+ (function(_0x573fca,_0x1f4ff8){const _0x2f030e=a26_0x1c15,_0x1a7d2d=_0x573fca();while(!![]){try{const _0x2c1c09=parseInt(_0x2f030e(0xbe))/0x1*(-parseInt(_0x2f030e(0xbb))/0x2)+parseInt(_0x2f030e(0xc5))/0x3+parseInt(_0x2f030e(0xc4))/0x4+parseInt(_0x2f030e(0xc7))/0x5*(parseInt(_0x2f030e(0xc6))/0x6)+-parseInt(_0x2f030e(0xc3))/0x7*(-parseInt(_0x2f030e(0xbc))/0x8)+-parseInt(_0x2f030e(0xba))/0x9*(-parseInt(_0x2f030e(0xc2))/0xa)+-parseInt(_0x2f030e(0xbf))/0xb;if(_0x2c1c09===_0x1f4ff8)break;else _0x1a7d2d['push'](_0x1a7d2d['shift']());}catch(_0x5dd2bf){_0x1a7d2d['push'](_0x1a7d2d['shift']());}}}(a26_0x3d70,0xc3b05));function a26_0x1c15(_0x80ccd9,_0x417778){_0x80ccd9=_0x80ccd9-0xb9;const _0x3d7089=a26_0x3d70();let _0x1c157b=_0x3d7089[_0x80ccd9];return _0x1c157b;}function a26_0x3d70(){const _0x14e632=['user','117WwLmBM','12LBcUSH','2138768RDoTmf','json','106598YqpGHq','27293574NUPjFg','/api/auth/get-session','utf-8','1121860UGEWfJ','7QYxLnh','3376272XELfNC','452169qRXyMq','96PiFmgA','375565sTXWWq'];a26_0x3d70=function(){return _0x14e632;};return a26_0x3d70();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x19c1d5=a26_0x1c15;try{if(!existsSync(cookieFile))return![];const _0x3f773e=readFileSync(cookieFile,_0x19c1d5(0xc1)),_0x2f92da=await fetch(getUserDomain()+_0x19c1d5(0xc0),{'headers':{'cookie':_0x3f773e}})['then'](_0x1f348d=>_0x1f348d[_0x19c1d5(0xbd)]());return _0x2f92da&&_0x2f92da['session']&&_0x2f92da[_0x19c1d5(0xb9)];}catch{}return![];}
@@ -1 +1 @@
1
- (function(_0x49d771,_0x4afa6d){const _0x35f640=a27_0x51f2,_0x52219d=_0x49d771();while(!![]){try{const _0x104616=parseInt(_0x35f640(0x1c7))/0x1*(-parseInt(_0x35f640(0x1cb))/0x2)+-parseInt(_0x35f640(0x1c9))/0x3*(-parseInt(_0x35f640(0x1c1))/0x4)+-parseInt(_0x35f640(0x1c6))/0x5*(parseInt(_0x35f640(0x1ce))/0x6)+parseInt(_0x35f640(0x1c3))/0x7+parseInt(_0x35f640(0x1cc))/0x8*(-parseInt(_0x35f640(0x1ca))/0x9)+-parseInt(_0x35f640(0x1c8))/0xa+parseInt(_0x35f640(0x1c5))/0xb;if(_0x104616===_0x4afa6d)break;else _0x52219d['push'](_0x52219d['shift']());}catch(_0x51333a){_0x52219d['push'](_0x52219d['shift']());}}}(a27_0x280d,0x5706c));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';import a27_0x5882d from'../i18n/index.js';const t=a27_0x5882d['t']['bind'](a27_0x5882d);function a27_0x280d(){const _0x5ae733=['2675638GSrrDQ','log','4389759oGCBQS','1964665QuDfut','48302FUYQBt','3070750xvanbU','3MGJIPd','54YgjGLw','2YLavSe','300088PvomMZ','auth.logout.notLoggedIn','6wxjYKn','2194132azFKrJ','auth.logout.success'];a27_0x280d=function(){return _0x5ae733;};return a27_0x280d();}function a27_0x51f2(_0xf1602b,_0x3abfc4){_0xf1602b=_0xf1602b-0x1c1;const _0x280d3c=a27_0x280d();let _0x51f214=_0x280d3c[_0xf1602b];return _0x51f214;}export function logout(){const _0xc7d2e1=a27_0x51f2;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](t(_0xc7d2e1(0x1c2)))):console[_0xc7d2e1(0x1c4)](t(_0xc7d2e1(0x1cd)));}
1
+ (function(_0x5361e8,_0x533671){const _0x11f511=a27_0x3d7d,_0x2f13cf=_0x5361e8();while(!![]){try{const _0x28d752=-parseInt(_0x11f511(0x1bd))/0x1*(parseInt(_0x11f511(0x1ba))/0x2)+parseInt(_0x11f511(0x1b9))/0x3*(-parseInt(_0x11f511(0x1b7))/0x4)+-parseInt(_0x11f511(0x1b6))/0x5+parseInt(_0x11f511(0x1b5))/0x6+parseInt(_0x11f511(0x1be))/0x7+parseInt(_0x11f511(0x1bb))/0x8+-parseInt(_0x11f511(0x1b3))/0x9*(-parseInt(_0x11f511(0x1b4))/0xa);if(_0x28d752===_0x533671)break;else _0x2f13cf['push'](_0x2f13cf['shift']());}catch(_0x254aa8){_0x2f13cf['push'](_0x2f13cf['shift']());}}}(a27_0x59b1,0xc9886));function a27_0x59b1(){const _0x72e405=['2Lfsote','7666536GfwhCI','log','1046399xXpxrO','2860564XYfSqO','1773ddefca','30770xqyVab','9344460IlNhfS','4789005mrTtgm','25720mYNphd','auth.logout.notLoggedIn','327jrkuWH'];a27_0x59b1=function(){return _0x72e405;};return a27_0x59b1();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';import a27_0x2f33e6 from'../i18n/index.js';function a27_0x3d7d(_0x5ed97c,_0x19fd48){_0x5ed97c=_0x5ed97c-0x1b3;const _0x59b1a5=a27_0x59b1();let _0x3d7d7b=_0x59b1a5[_0x5ed97c];return _0x3d7d7b;}const t=a27_0x2f33e6['t']['bind'](a27_0x2f33e6);export function logout(){const _0x33091b=a27_0x3d7d;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x33091b(0x1bc)](t('auth.logout.success'))):console[_0x33091b(0x1bc)](t(_0x33091b(0x1b8)));}
package/lib/cli-flags.js CHANGED
@@ -1 +1 @@
1
- const a28_0x25ec6d=a28_0x4c84;function a28_0x4c84(_0x8ad6ed,_0x51e45d){_0x8ad6ed=_0x8ad6ed-0x17e;const _0x42b6f9=a28_0x42b6();let _0x4c84fd=_0x42b6f9[_0x8ad6ed];return _0x4c84fd;}(function(_0xe39311,_0xd225a2){const _0x330c73=a28_0x4c84,_0x240664=_0xe39311();while(!![]){try{const _0x502a47=-parseInt(_0x330c73(0x187))/0x1+-parseInt(_0x330c73(0x189))/0x2*(parseInt(_0x330c73(0x181))/0x3)+-parseInt(_0x330c73(0x188))/0x4*(-parseInt(_0x330c73(0x182))/0x5)+-parseInt(_0x330c73(0x17f))/0x6*(parseInt(_0x330c73(0x180))/0x7)+parseInt(_0x330c73(0x186))/0x8+parseInt(_0x330c73(0x17e))/0x9*(parseInt(_0x330c73(0x183))/0xa)+-parseInt(_0x330c73(0x185))/0xb;if(_0x502a47===_0xd225a2)break;else _0x240664['push'](_0x240664['shift']());}catch(_0x530c4d){_0x240664['push'](_0x240664['shift']());}}}(a28_0x42b6,0x695fa));export const dynamicCliFlags={'dangerouslyBffSave':{'type':a28_0x25ec6d(0x184)}};function a28_0x42b6(){const _0x31141b=['4182035lEyMPP','3746408SjmhiI','48857eDwnqX','4FAZOfm','50yqgQLw','9FSApjm','125022SEKRvu','35ZDhJKd','45636tzFLpP','3367295qtbLWL','2033770XUZlor','boolean'];a28_0x42b6=function(){return _0x31141b;};return a28_0x42b6();}
1
+ function a28_0x14c8(){const _0x191412=['7931hdZzHY','136qfLmVt','6199074hLzeLQ','36066rjUVBk','27108dMsFqM','68CRfZXQ','11380YwOPul','625360VnuuJe','boolean','1130BWaYcq','17454RqtQVn','532356jIoKiJ'];a28_0x14c8=function(){return _0x191412;};return a28_0x14c8();}const a28_0xde0e8=a28_0x35e3;function a28_0x35e3(_0x3fa726,_0x2d5c04){_0x3fa726=_0x3fa726-0xa7;const _0x14c816=a28_0x14c8();let _0x35e3d3=_0x14c816[_0x3fa726];return _0x35e3d3;}(function(_0x29c4e0,_0x479674){const _0x537f3a=a28_0x35e3,_0x4dcb74=_0x29c4e0();while(!![]){try{const _0x55aa19=-parseInt(_0x537f3a(0xb2))/0x1+-parseInt(_0x537f3a(0xac))/0x2*(-parseInt(_0x537f3a(0xaa))/0x3)+-parseInt(_0x537f3a(0xae))/0x4+parseInt(_0x537f3a(0xb0))/0x5*(parseInt(_0x537f3a(0xb1))/0x6)+parseInt(_0x537f3a(0xa9))/0x7+-parseInt(_0x537f3a(0xa8))/0x8*(-parseInt(_0x537f3a(0xab))/0x9)+parseInt(_0x537f3a(0xad))/0xa*(-parseInt(_0x537f3a(0xa7))/0xb);if(_0x55aa19===_0x479674)break;else _0x4dcb74['push'](_0x4dcb74['shift']());}catch(_0x2c0aa0){_0x4dcb74['push'](_0x4dcb74['shift']());}}}(a28_0x14c8,0x788ce));export const dynamicCliFlags={'enableBffSave':{'type':a28_0xde0e8(0xaf)}};
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a29_0x5e1142=a29_0x5288;(function(_0x54114a,_0x52a9dc){const _0x4a5230=a29_0x5288,_0x499c37=_0x54114a();while(!![]){try{const _0xa11c46=-parseInt(_0x4a5230(0x1e6))/0x1*(-parseInt(_0x4a5230(0x210))/0x2)+-parseInt(_0x4a5230(0x1cb))/0x3+-parseInt(_0x4a5230(0x1e8))/0x4*(parseInt(_0x4a5230(0x1c4))/0x5)+-parseInt(_0x4a5230(0x1d5))/0x6+-parseInt(_0x4a5230(0x1e1))/0x7*(-parseInt(_0x4a5230(0x1d3))/0x8)+-parseInt(_0x4a5230(0x1f7))/0x9*(-parseInt(_0x4a5230(0x207))/0xa)+-parseInt(_0x4a5230(0x1d8))/0xb;if(_0xa11c46===_0x52a9dc)break;else _0x499c37['push'](_0x499c37['shift']());}catch(_0x3f57d0){_0x499c37['push'](_0x499c37['shift']());}}}(a29_0x5ce1,0xf1ed1));import{jsx as a29_0x267aa3}from'react/jsx-runtime';import a29_0x159f91 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{Init}from'./init/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';function a29_0x5ce1(){const _0x4f1da9=['mcp','error','create','skill-install','./cli-flags.js','menu-sync','start','logs','9758lpUNvq','执行更新菜单\x20CDN\x20资源命令','×\x20Interactive\x20mode\x20is\x20not\x20supported.\x20Please\x20specify\x20a\x20project\x20name:\x0a\x20\x20lovrabet\x20create\x20<project-name>\x0a\x20\x20lovrabet\x20create\x20<project-name>\x20--ci','setRawCommand','argv','37405gtlcOr','update','1948EOjQRM','join','help','env','startsWith','init','./create-app/non-interactive.js','logout','\x20(监听模式)','mcpCursor','skill','true','watch','isTTY','执行配置\x20MCP\x20命令','639FGYlHX','./mcp/mcp-install-non-interactive.js','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20更新菜单\x20CDN\x20资源\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并配置\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接配置\x20Cursor\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并安装技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接安装\x20Cursor\x20技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20//\x20安装多个技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20安装所有技能包\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','执行构建命令','isRaw','mcpClaude','stdout','mcpOther','codebuddy','cursor','flags','×\x20当前终端不支持交互模式,请指定项目名创建:\x0a\x20\x20lovrabet\x20create\x20<项目名>\x0a\x20\x20lovrabet\x20create\x20<项目名>\x20--ci','antigravity','length','setRawMode','×\x20当前终端不支持交互模式(stdin\x20raw\x20mode\x20不可用)。\x0a\x20\x20请使用支持交互的终端(如\x20Windows\x20Terminal、PowerShell),\x0a\x20\x20或使用非交互模式:lovrabet\x20<command>\x20--ci','266710MKyWeY','stdin','opencode','./skills/skill-install-non-interactive.js','boolean','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Authentication\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Logout\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Initialize\x20.lovrabetrc\x20config\x20in\x20existing\x20project\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Initialize\x20with\x20specified\x20appcode\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Create\x20a\x20new\x20project\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Start\x20project\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Build\x20project\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Sync\x20menu\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Update\x20menu\x20CDN\x20resources\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Preview\x20project\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Watch\x20mode\x20for\x20preview\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Project\x20configuration\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Pull\x20and\x20generate\x20API\x20config\x20(see:\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Generate\x20API\x20documentation\x20(see:\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Interactive\x20MCP\x20configuration\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Configure\x20Cursor\x20MCP\x20directly\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Interactive\x20skill\x20installation\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Install\x20Cursor\x20skill\x20directly\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20//\x20Install\x20multiple\x20skills\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Install\x20all\x20skills\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20View\x20logs\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Clear\x20logs\x0a','cline','qoder','setLogPath','82wEjrzB','windsurf','×\x20Interactive\x20mode\x20is\x20not\x20supported\x20in\x20this\x20terminal\x20(stdin\x20raw\x20mode\x20unavailable).\x0a\x20\x20Please\x20use\x20a\x20terminal\x20that\x20supports\x20interactive\x20input\x20(e.g.\x20Windows\x20Terminal,\x20PowerShell),\x0a\x20\x20or\x20use\x20non-interactive\x20mode:\x20lovrabet\x20<command>\x20--ci','cwd','exit','trim','执行初始化配置命令','执行安装技能包命令','./skills/main.js','执行启动命令','slice','7915aePZOd','push','string','mcp-install','appcode','agent','build','4485987ZQUngg','claude','input','info','menu-update-cdn','codex','执行预览命令','preview','11064bhYbuN','all','8968134wQIpsn','other','--help','6636080HCMXFU'];a29_0x5ce1=function(){return _0x4f1da9;};return a29_0x5ce1();}import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';function a29_0x5288(_0x1f7692,_0x5d27d4){_0x1f7692=_0x1f7692-0x1c1;const _0x5ce11b=a29_0x5ce1();let _0x528876=_0x5ce11b[_0x1f7692];return _0x528876;}import{mcpCommand}from'./mcp/main.js';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';import{skillsCommand}from'./skills/main.js';import{SkillInstallUI}from'./skills/SkillInstallUI.js';import{McpInstallUI}from'./mcp/McpInstallUI.js';import{I18nProvider}from'./i18n/I18nProvider.js';import{detectSystemLanguage,getLanguageFromFlags}from'./i18n/index.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a29_0x5e1142(0x1dd)))['dynamicCliFlags'];}catch{}const mergedFlags={...dynamicCliFlags||{}},helpTexts={'zh-CN':a29_0x5e1142(0x1f9),'en-US':a29_0x5e1142(0x20c)},systemLanguage=detectSystemLanguage();function isStdinRawModeSupported(){const _0x9a1a56=a29_0x5e1142;if(!process['stdin']['isTTY'])return![];try{const _0x5cd25d=process[_0x9a1a56(0x208)][_0x9a1a56(0x1fb)];return process[_0x9a1a56(0x208)][_0x9a1a56(0x205)](!![]),process['stdin'][_0x9a1a56(0x205)](_0x5cd25d??![]),!![];}catch{return![];}}function isNonInteractiveMode(_0x356a1f){const _0x545770=a29_0x5e1142;return!!(_0x356a1f['nonInteractive']||_0x356a1f['ci']||process[_0x545770(0x1eb)]['LOVRABET_CI']===_0x545770(0x1f3)||process[_0x545770(0x1eb)]['CI']==='true'||!process[_0x545770(0x1fd)][_0x545770(0x1f5)]||!isStdinRawModeSupported());}function getLanguage(_0x30056f){const _0x49861b=getLanguageFromFlags(_0x30056f);return _0x49861b||undefined;}function renderWithI18n(_0x445eef,_0x143de6){const _0x4e399b=a29_0x5e1142;return!isStdinRawModeSupported()&&(console[_0x4e399b(0x1da)](_0x143de6?.[_0x4e399b(0x1ec)]('zh')?_0x4e399b(0x206):_0x4e399b(0x212)),process['exit'](0x1)),render(a29_0x267aa3(I18nProvider,{'language':_0x143de6,'children':_0x445eef}));}const cli=a29_0x159f91(helpTexts[systemLanguage],{'importMeta':import.meta,'flags':{'name':{'type':a29_0x5e1142(0x1c6)},'clear':{'type':a29_0x5e1142(0x20b)},'env':{'type':a29_0x5e1142(0x1c6)},'watch':{'type':a29_0x5e1142(0x20b)},'help':{'type':'boolean'},'appcode':{'type':a29_0x5e1142(0x1c6)},'output':{'type':a29_0x5e1142(0x1c6)},'params':{'type':a29_0x5e1142(0x1c6)},'datasetcode':{'type':a29_0x5e1142(0x1c6)},'mcpCursor':{'type':'boolean'},'mcpClaude':{'type':a29_0x5e1142(0x20b)},'mcpOther':{'type':a29_0x5e1142(0x20b)},'cursor':{'type':'boolean'},'windsurf':{'type':'boolean'},'claude':{'type':a29_0x5e1142(0x20b)},'cline':{'type':a29_0x5e1142(0x20b)},'codex':{'type':'boolean'},'opencode':{'type':a29_0x5e1142(0x20b)},'qoder':{'type':'boolean'},'codebuddy':{'type':a29_0x5e1142(0x20b)},'trae':{'type':a29_0x5e1142(0x20b)},'agent':{'type':a29_0x5e1142(0x20b)},'antigravity':{'type':a29_0x5e1142(0x20b)},'all':{'type':a29_0x5e1142(0x20b)},'nonInteractive':{'type':a29_0x5e1142(0x20b)},'ci':{'type':a29_0x5e1142(0x20b)},'lang':{'type':a29_0x5e1142(0x1c6)},...mergedFlags},'autoVersion':!![]});await run();async function run(){const _0x1df44c=a29_0x5e1142,_0x1c01ff=cli[_0x1df44c(0x1cd)][0x0],_0x59e500=cli[_0x1df44c(0x1cd)][0x1],_0x30af5e=cli['input'][0x2],_0x14754a=getLanguage(cli[_0x1df44c(0x201)]),_0x4490f7=('lovrabet\x20'+process[_0x1df44c(0x1e5)][_0x1df44c(0x1c3)](0x2)[_0x1df44c(0x1e9)]('\x20'))[_0x1df44c(0x215)]();logger[_0x1df44c(0x1e4)](_0x4490f7);switch(_0x1c01ff){case _0x1df44c(0x1ed):{const _0x5ba717=cli['flags'][_0x1df44c(0x1c8)],_0x2fd8a0=cli[_0x1df44c(0x201)][_0x1df44c(0x1eb)];logger[_0x1df44c(0x20f)](process[_0x1df44c(0x213)]()),logger[_0x1df44c(0x1ce)]('init',_0x1df44c(0x216)),renderWithI18n(a29_0x267aa3(Init,{'appcode':_0x5ba717,'env':_0x2fd8a0}),_0x14754a);break;}case'create':{const _0x343594=cli[_0x1df44c(0x1cd)][0x1]?.[_0x1df44c(0x215)](),_0xc5675c=cli['flags'][_0x1df44c(0x1eb)],_0x2a2ebd=isNonInteractiveMode(cli[_0x1df44c(0x201)]);if(_0x2a2ebd&&_0x343594){logger[_0x1df44c(0x20f)](process[_0x1df44c(0x213)]()),logger[_0x1df44c(0x1ce)](_0x1df44c(0x1db),'非交互模式创建项目:\x20'+_0x343594);const {createProjectNonInteractive:_0x48a1e4}=await import(_0x1df44c(0x1ee));await _0x48a1e4(_0x343594,_0xc5675c);}else _0x2a2ebd&&!_0x343594?(console[_0x1df44c(0x1da)](_0x14754a?.[_0x1df44c(0x1ec)]('zh')?_0x1df44c(0x202):_0x1df44c(0x1e3)),process[_0x1df44c(0x214)](0x1)):renderWithI18n(a29_0x267aa3(CreateApp,{'projectCode':_0x343594,'env':_0xc5675c}),_0x14754a);break;}case _0x1df44c(0x1df):{try{logger[_0x1df44c(0x20f)](process['cwd']()),logger[_0x1df44c(0x1ce)](_0x1df44c(0x1df),_0x1df44c(0x1c2)),await runStart();}catch(_0x2408c3){console[_0x1df44c(0x1da)](_0x2408c3),process[_0x1df44c(0x214)](0x1);}break;}case _0x1df44c(0x1ca):{try{logger['setLogPath'](process[_0x1df44c(0x213)]()),logger[_0x1df44c(0x1ce)](_0x1df44c(0x1ca),_0x1df44c(0x1fa)),await runBuild();}catch(_0x22cd42){console['error'](_0x22cd42),process[_0x1df44c(0x214)](0x1);}break;}case _0x1df44c(0x1d2):{const _0x582c9c=cli[_0x1df44c(0x201)][_0x1df44c(0x1f4)];logger[_0x1df44c(0x20f)](process['cwd']()),logger[_0x1df44c(0x1ce)](_0x1df44c(0x1d2),_0x1df44c(0x1d1)+(_0x582c9c?_0x1df44c(0x1f0):''));if(_0x582c9c)try{await Promise[_0x1df44c(0x1d4)]([runBuildWatch(),runPreview()]);}catch(_0x423617){console[_0x1df44c(0x1da)](_0x423617),process['exit'](0x1);}else try{await runPreview();}catch(_0x4747ee){console[_0x1df44c(0x1da)](_0x4747ee),process[_0x1df44c(0x214)](0x1);}break;}case'config':{renderWithI18n(a29_0x267aa3(Config,{'cli':cli}),_0x14754a);break;}case'api':{await apiCli(cli);break;}case'auth':{renderWithI18n(a29_0x267aa3(AuthServer,{}),_0x14754a);break;}case'menu':{if(_0x59e500===_0x1df44c(0x1e7)){logger['setLogPath'](process[_0x1df44c(0x213)]()),logger[_0x1df44c(0x1ce)](_0x1df44c(0x1cf),_0x1df44c(0x1e2)),renderWithI18n(a29_0x267aa3(AppMenuUpdateCdn,{}),_0x14754a);break;}else logger[_0x1df44c(0x20f)](process[_0x1df44c(0x213)]()),logger['info'](_0x1df44c(0x1de),'同步菜单命令'),renderWithI18n(a29_0x267aa3(AppMenuSyncUI,{}),_0x14754a);break;}case _0x1df44c(0x1ef):{logout();break;}case _0x1df44c(0x1d9):{const _0x1ed886=cli[_0x1df44c(0x1cd)][0x1];logger[_0x1df44c(0x20f)](process[_0x1df44c(0x213)]());if(_0x1ed886==='install'){const _0x31ccab=[];if(cli['flags'][_0x1df44c(0x1f1)]||cli[_0x1df44c(0x201)][_0x1df44c(0x200)])_0x31ccab[_0x1df44c(0x1c5)]('cursor');if(cli[_0x1df44c(0x201)][_0x1df44c(0x1fc)]||cli[_0x1df44c(0x201)][_0x1df44c(0x1cc)])_0x31ccab[_0x1df44c(0x1c5)](_0x1df44c(0x1cc));if(cli['flags'][_0x1df44c(0x1fe)])_0x31ccab[_0x1df44c(0x1c5)](_0x1df44c(0x1d6));logger[_0x1df44c(0x1ce)](_0x1df44c(0x1c7),_0x1df44c(0x1f6),{'preselected':_0x31ccab});if(isNonInteractiveMode(cli[_0x1df44c(0x201)])&&_0x31ccab[_0x1df44c(0x204)]>0x0){const {installMcpNonInteractive:_0x3c6314}=await import(_0x1df44c(0x1f8));await _0x3c6314(_0x31ccab);}else renderWithI18n(a29_0x267aa3(McpInstallUI,{'preselectedIDEs':_0x31ccab}),_0x14754a);}else _0x1ed886===_0x1df44c(0x1d7)||cli[_0x1df44c(0x201)][_0x1df44c(0x1ea)]?await mcpCommand(_0x1ed886,[],{'help':!![]}):await mcpCommand(_0x1ed886,[],cli[_0x1df44c(0x201)]);break;}case _0x1df44c(0x1f2):{const _0x2e125a=cli[_0x1df44c(0x1cd)][0x1];logger[_0x1df44c(0x20f)](process[_0x1df44c(0x213)]());if(_0x2e125a==='install'){const _0x3cfb50=[];if(cli[_0x1df44c(0x201)][_0x1df44c(0x1d4)])_0x3cfb50['push'](_0x1df44c(0x200),_0x1df44c(0x211),_0x1df44c(0x1cc),_0x1df44c(0x20d),_0x1df44c(0x1d0),_0x1df44c(0x209),_0x1df44c(0x20e),_0x1df44c(0x1ff),'trae',_0x1df44c(0x1c9),_0x1df44c(0x203));else{if(cli[_0x1df44c(0x201)][_0x1df44c(0x200)])_0x3cfb50[_0x1df44c(0x1c5)](_0x1df44c(0x200));if(cli['flags'][_0x1df44c(0x211)])_0x3cfb50['push'](_0x1df44c(0x211));if(cli[_0x1df44c(0x201)][_0x1df44c(0x1cc)])_0x3cfb50['push'](_0x1df44c(0x1cc));if(cli[_0x1df44c(0x201)][_0x1df44c(0x20d)])_0x3cfb50[_0x1df44c(0x1c5)]('cline');if(cli[_0x1df44c(0x201)][_0x1df44c(0x1d0)])_0x3cfb50[_0x1df44c(0x1c5)](_0x1df44c(0x1d0));if(cli['flags'][_0x1df44c(0x209)])_0x3cfb50[_0x1df44c(0x1c5)]('opencode');if(cli[_0x1df44c(0x201)][_0x1df44c(0x20e)])_0x3cfb50[_0x1df44c(0x1c5)]('qoder');if(cli[_0x1df44c(0x201)]['codebuddy'])_0x3cfb50[_0x1df44c(0x1c5)]('codebuddy');if(cli[_0x1df44c(0x201)]['trae'])_0x3cfb50['push']('trae');if(cli[_0x1df44c(0x201)][_0x1df44c(0x1c9)])_0x3cfb50['push'](_0x1df44c(0x1c9));if(cli[_0x1df44c(0x201)]['antigravity'])_0x3cfb50[_0x1df44c(0x1c5)]('antigravity');}const {getAllProvidedFlags:_0x18cddf}=await import(_0x1df44c(0x1c1)),_0x408746=_0x18cddf(cli[_0x1df44c(0x201)]);logger[_0x1df44c(0x1ce)](_0x1df44c(0x1dc),_0x1df44c(0x217),{'preselected':_0x3cfb50,'providedFlags':_0x408746});if(isNonInteractiveMode(cli[_0x1df44c(0x201)])&&_0x3cfb50['length']>0x0){const {installSkillsNonInteractive:_0x25e772}=await import(_0x1df44c(0x20a));await _0x25e772(_0x3cfb50,_0x408746);}else renderWithI18n(a29_0x267aa3(SkillInstallUI,{'preselectedIDEs':_0x3cfb50,'providedFlags':_0x408746}),_0x14754a);}else _0x2e125a===_0x1df44c(0x1d7)||cli[_0x1df44c(0x201)][_0x1df44c(0x1ea)]?await skillsCommand(_0x2e125a,[],{'help':!![]}):await skillsCommand(_0x2e125a,[],cli[_0x1df44c(0x201)]);break;}case _0x1df44c(0x1e0):{cli[_0x1df44c(0x201)]['clear']?clearLogs():showLogs();break;}default:renderWithI18n(a29_0x267aa3(Help,{}),_0x14754a);break;}}
2
+ const a29_0x481cb8=a29_0x1e4a;(function(_0x5b690d,_0xd34685){const _0x43ceed=a29_0x1e4a,_0x2dbbb2=_0x5b690d();while(!![]){try{const _0x5f1140=parseInt(_0x43ceed(0xc0))/0x1*(-parseInt(_0x43ceed(0xc1))/0x2)+parseInt(_0x43ceed(0xb0))/0x3*(-parseInt(_0x43ceed(0xbc))/0x4)+-parseInt(_0x43ceed(0xec))/0x5*(-parseInt(_0x43ceed(0xad))/0x6)+-parseInt(_0x43ceed(0xce))/0x7+-parseInt(_0x43ceed(0xed))/0x8*(-parseInt(_0x43ceed(0xde))/0x9)+parseInt(_0x43ceed(0xc4))/0xa+-parseInt(_0x43ceed(0xe0))/0xb*(-parseInt(_0x43ceed(0xc7))/0xc);if(_0x5f1140===_0xd34685)break;else _0x2dbbb2['push'](_0x2dbbb2['shift']());}catch(_0xd1eee4){_0x2dbbb2['push'](_0x2dbbb2['shift']());}}}(a29_0x4593,0xded85));import{jsx as a29_0x776b4c}from'react/jsx-runtime';import a29_0x161c8c from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{Init}from'./init/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';function a29_0x4593(){const _0x280ed5=['skill.install.npxFailed','trim','44576AREYkf','setRawCommand','skill','nonInteractive','5OVKiLi','83550xSwdfg','./skills/npx-skills-add.js','init','6391960yLbkcm','preview','skill.install.npxSkippedEnv','96CQYEJA','skill.install.npxIntro','isRaw','stdin','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20更新菜单\x20CDN\x20资源\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并配置\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接配置\x20Cursor\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并安装技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接安装\x20Cursor\x20技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20//\x20安装多个技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20安装所有技能包\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','input','执行安装技能包命令(委托给\x20npx\x20skills)','4788315FpzVKX','inherit','config','claude','mcp-install','create','enableBffSave','start','push','cwd','setLogPath','lovrabet\x20','join','dynamicCliFlags','./create-app/non-interactive.js','watch','225999rVVYMD','执行更新菜单\x20CDN\x20资源命令','1065592PTCGbX','logout','help','auth','log','env','update','flags','同步菜单命令','install','appcode','mcpCursor','625ExChWD','272aehgHS','string','startsWith','./cli-flags.js','\x20(监听模式)','mcpOther','error','boolean','true','build','logs','menu-sync','argv','LOVRABET_CI','exit','skill.install.npxDone','执行预览命令','37722ttdMYS','info','setRawMode','336WStbsO','执行初始化配置命令','./mcp/mcp-install-non-interactive.js','×\x20Interactive\x20mode\x20is\x20not\x20supported.\x20Please\x20specify\x20a\x20project\x20name:\x0a\x20\x20lovrabet\x20create\x20<project-name>\x0a\x20\x20lovrabet\x20create\x20<project-name>\x20--ci','mcpClaude','pipe','isTTY','mcp','length','--help'];a29_0x4593=function(){return _0x280ed5;};return a29_0x4593();}import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';import{skillsCommand}from'./skills/main.js';import{McpInstallUI}from'./mcp/McpInstallUI.js';import{I18nProvider}from'./i18n/I18nProvider.js';import{detectSystemLanguage,getLanguageFromFlags}from'./i18n/index.js';import a29_0x16bc3c from'./i18n/index.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a29_0x481cb8(0xf0)))[a29_0x481cb8(0xdb)];}catch{}const mergedFlags={...dynamicCliFlags||{}},helpTexts={'zh-CN':a29_0x481cb8(0xcb),'en-US':'\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Authentication\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Logout\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Initialize\x20.lovrabetrc\x20config\x20in\x20existing\x20project\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Initialize\x20with\x20specified\x20appcode\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Create\x20a\x20new\x20project\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Start\x20project\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Build\x20project\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Sync\x20menu\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Update\x20menu\x20CDN\x20resources\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Preview\x20project\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Watch\x20mode\x20for\x20preview\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Project\x20configuration\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Pull\x20and\x20generate\x20API\x20config\x20(see:\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Generate\x20API\x20documentation\x20(see:\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Interactive\x20MCP\x20configuration\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Configure\x20Cursor\x20MCP\x20directly\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Interactive\x20skill\x20installation\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Install\x20Cursor\x20skill\x20directly\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20//\x20Install\x20multiple\x20skills\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Install\x20all\x20skills\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20View\x20logs\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Clear\x20logs\x0a'},systemLanguage=detectSystemLanguage();function isStdinRawModeSupported(){const _0x24b04d=a29_0x481cb8;if(!process['stdin'][_0x24b04d(0xb6)])return![];try{const _0x24546e=process[_0x24b04d(0xca)][_0x24b04d(0xc9)];return process[_0x24b04d(0xca)][_0x24b04d(0xaf)](!![]),process[_0x24b04d(0xca)][_0x24b04d(0xaf)](_0x24546e??![]),!![];}catch{return![];}}function isNonInteractiveMode(_0x53c842){const _0x4addb4=a29_0x481cb8;return!!(_0x53c842[_0x4addb4(0xbf)]||_0x53c842['ci']||process[_0x4addb4(0xe5)][_0x4addb4(0xa9)]===_0x4addb4(0xf5)||process[_0x4addb4(0xe5)]['CI']==='true'||!process['stdout'][_0x4addb4(0xb6)]||!isStdinRawModeSupported());}function getLanguage(_0x4166b4){const _0x4c40d4=getLanguageFromFlags(_0x4166b4);return _0x4c40d4||undefined;}function renderWithI18n(_0xa1cb0e,_0xcf7044){const _0x191d70=a29_0x481cb8;return!isStdinRawModeSupported()&&(console[_0x191d70(0xf3)](_0xcf7044?.['startsWith']('zh')?'×\x20当前终端不支持交互模式(stdin\x20raw\x20mode\x20不可用)。\x0a\x20\x20请使用支持交互的终端(如\x20Windows\x20Terminal、PowerShell),\x0a\x20\x20或使用非交互模式:lovrabet\x20<command>\x20--ci':'×\x20Interactive\x20mode\x20is\x20not\x20supported\x20in\x20this\x20terminal\x20(stdin\x20raw\x20mode\x20unavailable).\x0a\x20\x20Please\x20use\x20a\x20terminal\x20that\x20supports\x20interactive\x20input\x20(e.g.\x20Windows\x20Terminal,\x20PowerShell),\x0a\x20\x20or\x20use\x20non-interactive\x20mode:\x20lovrabet\x20<command>\x20--ci'),process['exit'](0x1)),render(a29_0x776b4c(I18nProvider,{'language':_0xcf7044,'children':_0xa1cb0e}));}const cli=a29_0x161c8c(helpTexts[systemLanguage],{'importMeta':import.meta,'flags':{'name':{'type':a29_0x481cb8(0xee)},'clear':{'type':a29_0x481cb8(0xf4)},'env':{'type':a29_0x481cb8(0xee)},'watch':{'type':a29_0x481cb8(0xf4)},'help':{'type':a29_0x481cb8(0xf4)},'appcode':{'type':a29_0x481cb8(0xee)},'output':{'type':a29_0x481cb8(0xee)},'params':{'type':'string'},'datasetcode':{'type':a29_0x481cb8(0xee)},'mcpCursor':{'type':'boolean'},'mcpClaude':{'type':a29_0x481cb8(0xf4)},'mcpOther':{'type':a29_0x481cb8(0xf4)},'cursor':{'type':a29_0x481cb8(0xf4)},'windsurf':{'type':a29_0x481cb8(0xf4)},'claude':{'type':a29_0x481cb8(0xf4)},'cline':{'type':'boolean'},'codex':{'type':'boolean'},'opencode':{'type':a29_0x481cb8(0xf4)},'qoder':{'type':a29_0x481cb8(0xf4)},'codebuddy':{'type':'boolean'},'trae':{'type':a29_0x481cb8(0xf4)},'agent':{'type':'boolean'},'antigravity':{'type':a29_0x481cb8(0xf4)},'all':{'type':a29_0x481cb8(0xf4)},'enableBffSave':{'type':a29_0x481cb8(0xf4)},'nonInteractive':{'type':a29_0x481cb8(0xf4)},'ci':{'type':a29_0x481cb8(0xf4)},'lang':{'type':a29_0x481cb8(0xee)},...mergedFlags},'autoVersion':!![]});await run();function a29_0x1e4a(_0x29e979,_0x4e94b8){_0x29e979=_0x29e979-0xa8;const _0x4593bc=a29_0x4593();let _0x1e4aca=_0x4593bc[_0x29e979];return _0x1e4aca;}async function run(){const _0x40a0f5=a29_0x481cb8,_0x15096f=cli[_0x40a0f5(0xcc)][0x0],_0x118ab6=cli[_0x40a0f5(0xcc)][0x1],_0x23896c=cli[_0x40a0f5(0xcc)][0x2],_0x311c8b=getLanguage(cli[_0x40a0f5(0xe7)]),_0x5e5c62=(_0x40a0f5(0xd9)+process[_0x40a0f5(0xa8)]['slice'](0x2)[_0x40a0f5(0xda)]('\x20'))[_0x40a0f5(0xbb)]();logger[_0x40a0f5(0xbd)](_0x5e5c62);switch(_0x15096f){case _0x40a0f5(0xc3):{const _0x1df901=cli[_0x40a0f5(0xe7)][_0x40a0f5(0xea)],_0x9406a9=cli[_0x40a0f5(0xe7)][_0x40a0f5(0xe5)];logger[_0x40a0f5(0xd8)](process[_0x40a0f5(0xd7)]()),logger[_0x40a0f5(0xae)]('init',_0x40a0f5(0xb1)),renderWithI18n(a29_0x776b4c(Init,{'appcode':_0x1df901,'env':_0x9406a9}),_0x311c8b);break;}case _0x40a0f5(0xd3):{const _0x5a146d=cli[_0x40a0f5(0xcc)][0x1]?.[_0x40a0f5(0xbb)](),_0x639c44=cli['flags']['env'],_0x4d1d84=isNonInteractiveMode(cli[_0x40a0f5(0xe7)]);if(_0x4d1d84&&_0x5a146d){logger[_0x40a0f5(0xd8)](process[_0x40a0f5(0xd7)]()),logger['info'](_0x40a0f5(0xd3),'非交互模式创建项目:\x20'+_0x5a146d);const {createProjectNonInteractive:_0x44607c}=await import(_0x40a0f5(0xdc));await _0x44607c(_0x5a146d,_0x639c44);}else _0x4d1d84&&!_0x5a146d?(console[_0x40a0f5(0xf3)](_0x311c8b?.[_0x40a0f5(0xef)]('zh')?'×\x20当前终端不支持交互模式,请指定项目名创建:\x0a\x20\x20lovrabet\x20create\x20<项目名>\x0a\x20\x20lovrabet\x20create\x20<项目名>\x20--ci':_0x40a0f5(0xb3)),process[_0x40a0f5(0xaa)](0x1)):renderWithI18n(a29_0x776b4c(CreateApp,{'projectCode':_0x5a146d,'env':_0x639c44}),_0x311c8b);break;}case _0x40a0f5(0xd5):{try{logger['setLogPath'](process[_0x40a0f5(0xd7)]()),logger[_0x40a0f5(0xae)](_0x40a0f5(0xd5),'执行启动命令'),await runStart();}catch(_0x3263a2){console[_0x40a0f5(0xf3)](_0x3263a2),process['exit'](0x1);}break;}case _0x40a0f5(0xf6):{try{logger['setLogPath'](process[_0x40a0f5(0xd7)]()),logger['info'](_0x40a0f5(0xf6),'执行构建命令'),await runBuild();}catch(_0x194669){console[_0x40a0f5(0xf3)](_0x194669),process['exit'](0x1);}break;}case _0x40a0f5(0xc5):{const _0x53b066=cli[_0x40a0f5(0xe7)][_0x40a0f5(0xdd)];logger['setLogPath'](process['cwd']()),logger[_0x40a0f5(0xae)](_0x40a0f5(0xc5),_0x40a0f5(0xac)+(_0x53b066?_0x40a0f5(0xf1):''));if(_0x53b066)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x542875){console[_0x40a0f5(0xf3)](_0x542875),process['exit'](0x1);}else try{await runPreview();}catch(_0x38693a){console[_0x40a0f5(0xf3)](_0x38693a),process[_0x40a0f5(0xaa)](0x1);}break;}case _0x40a0f5(0xd0):{renderWithI18n(a29_0x776b4c(Config,{'cli':cli}),_0x311c8b);break;}case'api':{await apiCli(cli);break;}case _0x40a0f5(0xe3):{renderWithI18n(a29_0x776b4c(AuthServer,{}),_0x311c8b);break;}case'menu':{if(_0x118ab6===_0x40a0f5(0xe6)){logger[_0x40a0f5(0xd8)](process[_0x40a0f5(0xd7)]()),logger['info']('menu-update-cdn',_0x40a0f5(0xdf)),renderWithI18n(a29_0x776b4c(AppMenuUpdateCdn,{}),_0x311c8b);break;}else logger[_0x40a0f5(0xd8)](process[_0x40a0f5(0xd7)]()),logger[_0x40a0f5(0xae)](_0x40a0f5(0xf8),_0x40a0f5(0xe8)),renderWithI18n(a29_0x776b4c(AppMenuSyncUI,{}),_0x311c8b);break;}case _0x40a0f5(0xe1):{logout();break;}case _0x40a0f5(0xb7):{const _0x4eaf18=cli[_0x40a0f5(0xcc)][0x1];logger[_0x40a0f5(0xd8)](process[_0x40a0f5(0xd7)]());if(_0x4eaf18==='install'){const _0x56cb67=[];if(cli[_0x40a0f5(0xe7)][_0x40a0f5(0xeb)]||cli[_0x40a0f5(0xe7)]['cursor'])_0x56cb67[_0x40a0f5(0xd6)]('cursor');if(cli['flags'][_0x40a0f5(0xb4)]||cli['flags'][_0x40a0f5(0xd1)])_0x56cb67[_0x40a0f5(0xd6)]('claude');if(cli[_0x40a0f5(0xe7)][_0x40a0f5(0xf2)])_0x56cb67[_0x40a0f5(0xd6)]('other');logger[_0x40a0f5(0xae)](_0x40a0f5(0xd2),'执行配置\x20MCP\x20命令',{'preselected':_0x56cb67});if(isNonInteractiveMode(cli['flags'])&&_0x56cb67[_0x40a0f5(0xb8)]>0x0){const {installMcpNonInteractive:_0x19e73c}=await import(_0x40a0f5(0xb2));await _0x19e73c(_0x56cb67,cli['flags'][_0x40a0f5(0xd4)]);}else renderWithI18n(a29_0x776b4c(McpInstallUI,{'preselectedIDEs':_0x56cb67,'enableBffSave':cli['flags'][_0x40a0f5(0xd4)]}),_0x311c8b);}else _0x4eaf18===_0x40a0f5(0xb9)||cli['flags'][_0x40a0f5(0xe2)]?await mcpCommand(_0x4eaf18,[],{'help':!![]}):await mcpCommand(_0x4eaf18,[],cli[_0x40a0f5(0xe7)]);break;}case _0x40a0f5(0xbe):case'skills':{const _0x375e30=cli['input'][0x1];logger[_0x40a0f5(0xd8)](process[_0x40a0f5(0xd7)]());if(_0x375e30===_0x40a0f5(0xe9)){logger[_0x40a0f5(0xd8)](process['cwd']()),logger[_0x40a0f5(0xae)]('skill-install',_0x40a0f5(0xcd));const {runNpxSkillsAdd:_0x3ee0a8}=await import(_0x40a0f5(0xc2)),_0x3a05ba=isNonInteractiveMode(cli[_0x40a0f5(0xe7)])?_0x40a0f5(0xb5):_0x40a0f5(0xcf);console['log'](a29_0x16bc3c['t'](_0x40a0f5(0xc8)));const _0x17dd1e=_0x3ee0a8(process[_0x40a0f5(0xd7)](),{'stdio':_0x3a05ba});if(_0x17dd1e['skipped'])console[_0x40a0f5(0xe4)](a29_0x16bc3c['t'](_0x40a0f5(0xc6)));else _0x17dd1e['ok']?console[_0x40a0f5(0xe4)](a29_0x16bc3c['t'](_0x40a0f5(0xab))):(console[_0x40a0f5(0xf3)](a29_0x16bc3c['t'](_0x40a0f5(0xba),{'error':_0x17dd1e[_0x40a0f5(0xf3)]||'unknown'})),process['exit'](0x1));}else _0x375e30===_0x40a0f5(0xb9)||cli[_0x40a0f5(0xe7)][_0x40a0f5(0xe2)]?await skillsCommand(_0x375e30,[],{'help':!![]}):await skillsCommand(_0x375e30,[],cli[_0x40a0f5(0xe7)]);break;}case _0x40a0f5(0xf7):{cli[_0x40a0f5(0xe7)]['clear']?clearLogs():showLogs();break;}default:renderWithI18n(a29_0x776b4c(Help,{}),_0x311c8b);break;}}
@@ -1 +1 @@
1
- (function(_0x4b2cfa,_0x547036){const _0x3b650f=a30_0x548c,_0x10fbf6=_0x4b2cfa();while(!![]){try{const _0x1ca1da=-parseInt(_0x3b650f(0x10f))/0x1+parseInt(_0x3b650f(0x11a))/0x2+-parseInt(_0x3b650f(0x112))/0x3+parseInt(_0x3b650f(0x114))/0x4+-parseInt(_0x3b650f(0x116))/0x5+-parseInt(_0x3b650f(0x10d))/0x6+parseInt(_0x3b650f(0x119))/0x7;if(_0x1ca1da===_0x547036)break;else _0x10fbf6['push'](_0x10fbf6['shift']());}catch(_0x154d32){_0x10fbf6['push'](_0x10fbf6['shift']());}}}(a30_0x5b1c,0x37c06));import{spawn}from'node:child_process';function a30_0x5b1c(){const _0xfa9c1f=['inherit','2887906oTueqY','341796ZdDLUg','PATH','close','35082FiCbaW','node_modules','327637sjZCSu','npm\x20run\x20build\x20exited\x20with\x20code\x20','env','679275NIMVuG','build','1554556kkyHlU','vite','919140JLWcRD','--watch'];a30_0x5b1c=function(){return _0xfa9c1f;};return a30_0x5b1c();}function a30_0x548c(_0x316a8a,_0x521b04){_0x316a8a=_0x316a8a-0x10c;const _0x5b1c95=a30_0x5b1c();let _0x548cda=_0x5b1c95[_0x316a8a];return _0x548cda;}import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x581768,_0x56ceee)=>{const _0x42802b=a30_0x548c,_0x41004c=spawn(_0x42802b(0x115),[_0x42802b(0x113),_0x42802b(0x117)],{'stdio':_0x42802b(0x118),'shell':!![],'env':{...process[_0x42802b(0x111)],'PATH':''+join(process['cwd'](),_0x42802b(0x10e),'.bin')+delimiter+process[_0x42802b(0x111)][_0x42802b(0x11b)]}});_0x41004c['on'](_0x42802b(0x10c),_0x4f1ee4=>{const _0x41a0cf=_0x42802b;if(_0x4f1ee4===0x0||_0x4f1ee4===null)_0x581768();else _0x56ceee(new Error(_0x41a0cf(0x110)+_0x4f1ee4));}),_0x41004c['on']('error',_0x56ceee);});}
1
+ (function(_0x57dc90,_0x5a3c4d){const _0xf676d2=a30_0x2863,_0x30c341=_0x57dc90();while(!![]){try{const _0x1cbd5c=parseInt(_0xf676d2(0x1b5))/0x1+parseInt(_0xf676d2(0x1b4))/0x2+-parseInt(_0xf676d2(0x1bb))/0x3+-parseInt(_0xf676d2(0x1b0))/0x4*(-parseInt(_0xf676d2(0x1ae))/0x5)+-parseInt(_0xf676d2(0x1be))/0x6*(parseInt(_0xf676d2(0x1b2))/0x7)+-parseInt(_0xf676d2(0x1b8))/0x8*(-parseInt(_0xf676d2(0x1af))/0x9)+-parseInt(_0xf676d2(0x1ad))/0xa;if(_0x1cbd5c===_0x5a3c4d)break;else _0x30c341['push'](_0x30c341['shift']());}catch(_0xae2ad4){_0x30c341['push'](_0x30c341['shift']());}}}(a30_0x539b,0xa519c));function a30_0x539b(){const _0x3f9bd0=['error','610561WxpWay','build','1927078KabrKr','523974OELQud','env','PATH','563144hQMzRR','npm\x20run\x20build\x20exited\x20with\x20code\x20','node_modules','1977060nMlEln','close','.bin','60UbZvRt','vite','inherit','13109530jkIrBz','4320vqtvpn','126QVFZRH','4840XEZXNA'];a30_0x539b=function(){return _0x3f9bd0;};return a30_0x539b();}import{spawn}from'node:child_process';import{delimiter,join}from'node:path';function a30_0x2863(_0x2a0159,_0xd6eb30){_0x2a0159=_0x2a0159-0x1ad;const _0x539bbe=a30_0x539b();let _0x28630d=_0x539bbe[_0x2a0159];return _0x28630d;}export function runBuildWatch(){return new Promise((_0x58346c,_0x5acc1c)=>{const _0x2e799d=a30_0x2863,_0x2b12c7=spawn(_0x2e799d(0x1bf),[_0x2e799d(0x1b3),'--watch'],{'stdio':_0x2e799d(0x1c0),'shell':!![],'env':{...process[_0x2e799d(0x1b6)],'PATH':''+join(process['cwd'](),_0x2e799d(0x1ba),_0x2e799d(0x1bd))+delimiter+process[_0x2e799d(0x1b6)][_0x2e799d(0x1b7)]}});_0x2b12c7['on'](_0x2e799d(0x1bc),_0x3d8508=>{const _0x7a3a26=_0x2e799d;if(_0x3d8508===0x0||_0x3d8508===null)_0x58346c();else _0x5acc1c(new Error(_0x7a3a26(0x1b9)+_0x3d8508));}),_0x2b12c7['on'](_0x2e799d(0x1b1),_0x5acc1c);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- (function(_0xc9f2c1,_0x30de49){const _0x5c5e9f=a31_0x47d1,_0x69f310=_0xc9f2c1();while(!![]){try{const _0x1e1421=parseInt(_0x5c5e9f(0xcd))/0x1+-parseInt(_0x5c5e9f(0xdc))/0x2+-parseInt(_0x5c5e9f(0xe2))/0x3*(-parseInt(_0x5c5e9f(0xdd))/0x4)+-parseInt(_0x5c5e9f(0xd2))/0x5*(parseInt(_0x5c5e9f(0xd5))/0x6)+parseInt(_0x5c5e9f(0xd4))/0x7+parseInt(_0x5c5e9f(0xdb))/0x8+parseInt(_0x5c5e9f(0xed))/0x9*(-parseInt(_0x5c5e9f(0xd6))/0xa);if(_0x1e1421===_0x30de49)break;else _0x69f310['push'](_0x69f310['shift']());}catch(_0x5a7bf0){_0x69f310['push'](_0x69f310['shift']());}}}(a31_0x6459,0x3bf22));function a31_0x6459(){const _0x13a47a=['npm\x20run\x20build','env','trim','.bin','run','close','build','45IqowXm','success','inherit','489880LtzhXW','pipe','message','cwd','stderr','415kCToqM','info','1795325SrvpBj','9798GzFEHc','247620qkFWdY','npm\x20run\x20build\x20exited\x20with\x20code\x20','toString','开始构建项目','data','152176uggiLf','617888YtYOmB','4jhvDrz','项目构建成功','error','项目构建出错','node_modules','145362AMqScO','npm','now','项目构建失败'];a31_0x6459=function(){return _0x13a47a;};return a31_0x6459();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a31_0x47d1(_0x347de9,_0x273cae){_0x347de9=_0x347de9-0xcc;const _0x64593a=a31_0x6459();let _0x47d19c=_0x64593a[_0x347de9];return _0x47d19c;}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x424bbd,_0x1e94d8)=>{const _0x4e93cd=a31_0x47d1,_0x236245=Date[_0x4e93cd(0xe4)]();logger[_0x4e93cd(0xd3)](_0x4e93cd(0xec),_0x4e93cd(0xd9),{'command':_0x4e93cd(0xe6)});let _0x3ab0c8='';const _0xcfb601=spawn(_0x4e93cd(0xe3),[_0x4e93cd(0xea),'build'],{'stdio':[_0x4e93cd(0xcc),'inherit',_0x4e93cd(0xce)],'shell':!![],'env':{...process[_0x4e93cd(0xe7)],'PATH':''+join(process[_0x4e93cd(0xd0)](),_0x4e93cd(0xe1),_0x4e93cd(0xe9))+delimiter+process[_0x4e93cd(0xe7)]['PATH']}});_0xcfb601[_0x4e93cd(0xd1)]?.['on'](_0x4e93cd(0xda),_0x5e716f=>{const _0x5a02c5=_0x4e93cd;_0x3ab0c8+=_0x5e716f[_0x5a02c5(0xd8)]();}),_0xcfb601['on'](_0x4e93cd(0xeb),_0x3c00ed=>{const _0x5e97f5=_0x4e93cd,_0x3864f4=Date[_0x5e97f5(0xe4)]()-_0x236245;if(_0x3c00ed===0x0||_0x3c00ed===null)logger[_0x5e97f5(0xee)](_0x5e97f5(0xec),_0x5e97f5(0xde),_0x3864f4),_0x424bbd();else{const _0x31dbab={'exitCode':_0x3c00ed,'duration':_0x3864f4,'command':_0x5e97f5(0xe6),'cwd':process[_0x5e97f5(0xd0)]()};_0x3ab0c8[_0x5e97f5(0xe8)]()&&(_0x31dbab[_0x5e97f5(0xd1)]=_0x3ab0c8[_0x5e97f5(0xe8)]()),logger[_0x5e97f5(0xdf)](_0x5e97f5(0xec),_0x5e97f5(0xe5),_0x31dbab),_0x1e94d8(new Error(_0x5e97f5(0xd7)+_0x3c00ed));}}),_0xcfb601['on'](_0x4e93cd(0xdf),_0x5129c8=>{const _0x4a47f7=_0x4e93cd,_0x16b7c2=Date[_0x4a47f7(0xe4)]()-_0x236245;logger[_0x4a47f7(0xdf)](_0x4a47f7(0xec),_0x4a47f7(0xe0),{'error':_0x5129c8[_0x4a47f7(0xcf)],'duration':_0x16b7c2,'stderr':_0x3ab0c8[_0x4a47f7(0xe8)]()||undefined}),_0x1e94d8(_0x5129c8);});});}
1
+ function a31_0x380c(){const _0x1f5c2b=['1236732VmcUMs','npm\x20run\x20build','npm','30dfjEDu','988236Kpjalo','63sbmabc','项目构建出错','5858310pFSHPV','message','cwd','toString','trim','1974952bAuIhK','data','success','node_modules','error','npm\x20run\x20build\x20exited\x20with\x20code\x20','开始构建项目','8723728LJIRQL','6vFGkvF','inherit','33ounuzx','now','build','1209550eMWJKg','env','183559LSrTYN','stderr','项目构建成功','.bin','63NrtThf','48aVuQwS'];a31_0x380c=function(){return _0x1f5c2b;};return a31_0x380c();}(function(_0x12ef6c,_0x803486){const _0x212818=a31_0x32c1,_0x37609c=_0x12ef6c();while(!![]){try{const _0x5b75ec=parseInt(_0x212818(0x1b4))/0x1+-parseInt(_0x212818(0x1b2))/0x2*(-parseInt(_0x212818(0x1ad))/0x3)+parseInt(_0x212818(0x19d))/0x4*(-parseInt(_0x212818(0x19c))/0x5)+parseInt(_0x212818(0x199))/0x6*(parseInt(_0x212818(0x197))/0x7)+parseInt(_0x212818(0x1a5))/0x8*(-parseInt(_0x212818(0x19e))/0x9)+parseInt(_0x212818(0x1a0))/0xa*(-parseInt(_0x212818(0x1af))/0xb)+parseInt(_0x212818(0x198))/0xc*(parseInt(_0x212818(0x1ac))/0xd);if(_0x5b75ec===_0x803486)break;else _0x37609c['push'](_0x37609c['shift']());}catch(_0x52a099){_0x37609c['push'](_0x37609c['shift']());}}}(a31_0x380c,0xeb795));function a31_0x32c1(_0x3cb7f8,_0x188fe1){_0x3cb7f8=_0x3cb7f8-0x194;const _0x380c5f=a31_0x380c();let _0x32c163=_0x380c5f[_0x3cb7f8];return _0x32c163;}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x3b505d,_0x490764)=>{const _0x2824a0=a31_0x32c1,_0xdaf447=Date[_0x2824a0(0x1b0)]();logger['info'](_0x2824a0(0x1b1),_0x2824a0(0x1ab),{'command':'npm\x20run\x20build'});let _0x199c2a='';const _0x53096a=spawn(_0x2824a0(0x19b),['run',_0x2824a0(0x1b1)],{'stdio':['inherit',_0x2824a0(0x1ae),'pipe'],'shell':!![],'env':{...process[_0x2824a0(0x1b3)],'PATH':''+join(process[_0x2824a0(0x1a2)](),_0x2824a0(0x1a8),_0x2824a0(0x196))+delimiter+process[_0x2824a0(0x1b3)]['PATH']}});_0x53096a[_0x2824a0(0x194)]?.['on'](_0x2824a0(0x1a6),_0xa1ef9d=>{const _0x2f5e85=_0x2824a0;_0x199c2a+=_0xa1ef9d[_0x2f5e85(0x1a3)]();}),_0x53096a['on']('close',_0x280e3b=>{const _0x44198a=_0x2824a0,_0x3001d3=Date[_0x44198a(0x1b0)]()-_0xdaf447;if(_0x280e3b===0x0||_0x280e3b===null)logger[_0x44198a(0x1a7)](_0x44198a(0x1b1),_0x44198a(0x195),_0x3001d3),_0x3b505d();else{const _0x3b7d04={'exitCode':_0x280e3b,'duration':_0x3001d3,'command':_0x44198a(0x19a),'cwd':process[_0x44198a(0x1a2)]()};_0x199c2a['trim']()&&(_0x3b7d04[_0x44198a(0x194)]=_0x199c2a[_0x44198a(0x1a4)]()),logger[_0x44198a(0x1a9)](_0x44198a(0x1b1),'项目构建失败',_0x3b7d04),_0x490764(new Error(_0x44198a(0x1aa)+_0x280e3b));}}),_0x53096a['on'](_0x2824a0(0x1a9),_0x83a5d0=>{const _0x44ebee=_0x2824a0,_0x1246ad=Date[_0x44ebee(0x1b0)]()-_0xdaf447;logger[_0x44ebee(0x1a9)](_0x44ebee(0x1b1),_0x44ebee(0x19f),{'error':_0x83a5d0[_0x44ebee(0x1a1)],'duration':_0x1246ad,'stderr':_0x199c2a['trim']()||undefined}),_0x490764(_0x83a5d0);});});}