@lovrabet/cli 1.3.4-beta.2 → 1.3.4

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 (82) hide show
  1. package/lib/ai-setup/AISetupUI.js +1 -1
  2. package/lib/ai-setup/config.js +1 -1
  3. package/lib/api/api-doc-ui.js +1 -1
  4. package/lib/api/api-doc.js +1 -1
  5. package/lib/api/api-pull-ui.js +1 -1
  6. package/lib/api/fetch-model-list.js +1 -1
  7. package/lib/api/generate-api-file.js +1 -1
  8. package/lib/api/main.js +1 -1
  9. package/lib/api/pull-silent.js +1 -1
  10. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  11. package/lib/app-menu/create-menu.js +1 -1
  12. package/lib/app-menu/get-local-pages.js +1 -1
  13. package/lib/app-menu/get-online-menu-list.js +1 -1
  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-cdn-url.js +1 -1
  21. package/lib/auth/auth-server-ui.js +1 -1
  22. package/lib/auth/auth-server.js +1 -1
  23. package/lib/auth/constant.js +1 -1
  24. package/lib/auth/get-cookie.js +1 -1
  25. package/lib/auth/is-session-valid.js +1 -1
  26. package/lib/auth/logout.js +1 -1
  27. package/lib/cli-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/SkillInstallUI.js +1 -1
  64. package/lib/skills/main.js +1 -1
  65. package/lib/skills/skill-install-non-interactive.js +1 -1
  66. package/lib/skills/skill-installer.js +1 -1
  67. package/lib/ui/IDESelector.js +1 -1
  68. package/lib/ui/useIDESelection.js +1 -1
  69. package/lib/utils/ai_config.js +1 -1
  70. package/lib/utils/cdn-config.js +1 -1
  71. package/lib/utils/check-sdk-version.js +1 -1
  72. package/lib/utils/cli-version-check.js +1 -1
  73. package/lib/utils/config.js +1 -1
  74. package/lib/utils/copy-directory.js +1 -1
  75. package/lib/utils/file-utils.js +1 -1
  76. package/lib/utils/guides-cdn.js +1 -1
  77. package/lib/utils/http-client.js +1 -1
  78. package/lib/utils/logger.js +1 -1
  79. package/lib/utils/rules-cdn.js +1 -1
  80. package/lib/utils/sleep.js +1 -1
  81. package/lib/utils/template-replacer.js +1 -1
  82. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x1548a2,_0x87a90d){const _0x21179c=a58_0x2f14,_0x4800f7=_0x1548a2();while(!![]){try{const _0x3c67e7=-parseInt(_0x21179c(0x1d2))/0x1+parseInt(_0x21179c(0x1d4))/0x2+parseInt(_0x21179c(0x1d6))/0x3+-parseInt(_0x21179c(0x1b3))/0x4+-parseInt(_0x21179c(0x1aa))/0x5*(parseInt(_0x21179c(0x1d7))/0x6)+-parseInt(_0x21179c(0x1b7))/0x7*(parseInt(_0x21179c(0x1d8))/0x8)+parseInt(_0x21179c(0x1ae))/0x9;if(_0x3c67e7===_0x87a90d)break;else _0x4800f7['push'](_0x4800f7['shift']());}catch(_0x4f624a){_0x4800f7['push'](_0x4800f7['shift']());}}}(a58_0x5819,0x3648e));import{jsx as a58_0x43ae01,jsxs as a58_0x2c9374,Fragment as a58_0x88146}from'react/jsx-runtime';import{useState,useEffect,useMemo}from'react';import{Text,Box,useInput,useApp}from'ink';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{useI18n}from'../i18n/hooks.js';function a58_0x5819(){const _0x45eac6=['configuring','\x20\x20✗','find','500EWzXst','claude','mcp.ui.otherIDEDescription','yellow','7622676QwnAbb','setErrorMsg','label','push','mcp.ui.manualRequired','1396644ZQmstH','from','\x20\x20⚠️','mcp.ui.pressAnyKeyToExit','14VdPqNk','size','length','gray','other','map','cyan','return','some','selectedIndexes','manual','ide','mcp.ui.count','mcp.ui.selectAtLeastOne','red','mcp.ui.configuring','needsManualAction','white','column','status','\x20\x20✓','message','cwd','mcp.ui.selectedIDE','description','green','done','76483ieXMIO','name','392148LLCUfT','mcp.ui.failed','278088RoJhxJ','16602ZFYFmE','844160UGFOxZ','cursor','mcp.ui.completed','mcp.ui.partialManual','success','getSelectedIDEs','selecting','key','error'];a58_0x5819=function(){return _0x45eac6;};return a58_0x5819();}import a58_0x5a1915 from'../i18n/index.js';function a58_0x2f14(_0x5f2d8f,_0x1f8621){_0x5f2d8f=_0x5f2d8f-0x19f;const _0x58196c=a58_0x5819();let _0x2f146d=_0x58196c[_0x5f2d8f];return _0x2f146d;}export function McpInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x19abc3=a58_0x2f14,{t:_0x100896}=useI18n(),{exit:_0x10767f}=useApp(),[_0x5e53c8,_0x4bd326]=useState(_0x19abc3(0x1a4)),[_0x3a2d50,_0x1a72b7]=useState([]),[_0x14a474,_0x416aa9]=useState([]),_0x51bcdc=useMemo(()=>[...Array[_0x19abc3(0x1b4)](MCP_IDES)[_0x19abc3(0x1bc)](_0x10ce4d=>({'key':_0x10ce4d,'name':IDE_CONFIGS[_0x10ce4d][_0x19abc3(0x1d3)],'description':IDE_CONFIGS[_0x10ce4d][_0x19abc3(0x1cf)]})),{'key':_0x19abc3(0x1bb),'name':_0x100896('mcp.ui.otherIDE'),'description':_0x100896(_0x19abc3(0x1ac))}],[_0x100896]),_0x2123ef=useIDESelection({'ideList':_0x51bcdc,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x386e62=_0x19abc3;preselectedIDEs[_0x386e62(0x1b9)]>0x0&&_0x2123ef[_0x386e62(0x1c0)][_0x386e62(0x1b8)]>0x0&&_0x34b826();},[]),useInput((_0x3272d9,_0x104d13)=>{const _0xe2c36e=_0x19abc3;if(_0x5e53c8===_0xe2c36e(0x1a4)){if(_0x3272d9==='q'||_0x3272d9==='Q'){_0x10767f();return;}if(_0x104d13[_0xe2c36e(0x1be)]){if(_0x2123ef[_0xe2c36e(0x1c0)]['size']===0x0){_0x2123ef[_0xe2c36e(0x1af)](_0x100896(_0xe2c36e(0x1c4)));return;}_0x34b826();return;}_0x2123ef['handleKeyDown'](_0x3272d9,_0x104d13);}_0x5e53c8===_0xe2c36e(0x1d1)&&_0x10767f();});async function _0x34b826(){const _0x32207b=_0x19abc3,_0x4b2b52=_0x2123ef[_0x32207b(0x1a3)]();_0x1a72b7([{'label':_0x100896(_0x32207b(0x1ce)),'value':_0x100896(_0x32207b(0x1c3),{'count':_0x2123ef[_0x32207b(0x1c0)]['size']})}]),_0x4bd326(_0x32207b(0x1a7));const _0x5cdc86=[];for(const _0x2d4671 of _0x4b2b52){try{const _0x4bd24b=await configureMcp(_0x2d4671);_0x5cdc86['push']({'ide':_0x51bcdc[_0x32207b(0x1a9)](_0x38c819=>_0x38c819[_0x32207b(0x1a5)]===_0x2d4671)?.[_0x32207b(0x1d3)]||_0x2d4671,'status':_0x4bd24b[_0x32207b(0x1c7)]?_0x32207b(0x1c1):_0x4bd24b['success']?'success':_0x32207b(0x1a6),'message':_0x4bd24b[_0x32207b(0x1cc)]});}catch(_0xaaf8ec){_0x5cdc86[_0x32207b(0x1b1)]({'ide':_0x51bcdc[_0x32207b(0x1a9)](_0x439106=>_0x439106[_0x32207b(0x1a5)]===_0x2d4671)?.[_0x32207b(0x1d3)]||_0x2d4671,'status':_0x32207b(0x1a6),'message':_0xaaf8ec instanceof Error?_0xaaf8ec[_0x32207b(0x1cc)]:String(_0xaaf8ec)});}}_0x416aa9(_0x5cdc86),_0x4bd326('done'),setTimeout(()=>{_0x10767f();},0x1388);}return a58_0x2c9374(Box,{'flexDirection':_0x19abc3(0x1c9),'marginTop':0x1,'children':[_0x5e53c8===_0x19abc3(0x1a4)&&a58_0x43ae01(IDESelector,{'ideList':_0x51bcdc,'title':_0x100896('mcp.ui.title'),'selection':_0x2123ef}),_0x5e53c8===_0x19abc3(0x1a7)&&a58_0x2c9374(a58_0x88146,{'children':[_0x3a2d50[_0x19abc3(0x1bc)]((_0x3d04df,_0x5b5160)=>a58_0x2c9374(Box,{'children':[a58_0x2c9374(Text,{'color':_0x19abc3(0x1d0),'children':['√\x20',_0x3d04df[_0x19abc3(0x1b0)],':\x20']}),a58_0x43ae01(Text,{'color':_0x19abc3(0x1bd),'children':_0x3d04df['value']})]},_0x5b5160)),a58_0x43ae01(Box,{'marginTop':0x1,'children':a58_0x43ae01(Text,{'children':_0x100896(_0x19abc3(0x1c6))})})]}),_0x5e53c8===_0x19abc3(0x1d1)&&a58_0x43ae01(DoneStep,{'configResults':_0x14a474})]});}function DoneStep({configResults:_0x53f135}){const _0x3b1a1e=a58_0x2f14,{t:_0x48eff5}=useI18n(),_0x5a6c1d=_0x53f135['every'](_0x216609=>_0x216609[_0x3b1a1e(0x1ca)]===_0x3b1a1e(0x1a2)),_0x525735=_0x53f135[_0x3b1a1e(0x1bf)](_0x4f2fd0=>_0x4f2fd0[_0x3b1a1e(0x1ca)]==='manual'),_0x51039a=_0x53f135['some'](_0x204d80=>_0x204d80[_0x3b1a1e(0x1ca)]===_0x3b1a1e(0x1a6));return a58_0x2c9374(a58_0x88146,{'children':[a58_0x43ae01(Box,{'children':_0x5a6c1d?a58_0x43ae01(Text,{'color':'green','children':_0x48eff5(_0x3b1a1e(0x1a0))}):_0x525735?a58_0x43ae01(Text,{'color':_0x3b1a1e(0x1ad),'children':_0x48eff5(_0x3b1a1e(0x1a1))}):_0x51039a?a58_0x43ae01(Text,{'color':_0x3b1a1e(0x1c5),'children':_0x48eff5(_0x3b1a1e(0x1d5))}):a58_0x43ae01(Text,{'color':_0x3b1a1e(0x1ad),'children':_0x48eff5(_0x3b1a1e(0x1b2))})}),_0x53f135['map']((_0x3e5d9c,_0x292145)=>a58_0x2c9374(Box,{'flexDirection':'column','children':[a58_0x2c9374(Text,{'color':_0x3e5d9c[_0x3b1a1e(0x1ca)]==='success'?_0x3b1a1e(0x1d0):_0x3e5d9c[_0x3b1a1e(0x1ca)]===_0x3b1a1e(0x1c1)?_0x3b1a1e(0x1ad):'red','children':[_0x3e5d9c[_0x3b1a1e(0x1ca)]===_0x3b1a1e(0x1a2)?_0x3b1a1e(0x1cb):_0x3e5d9c[_0x3b1a1e(0x1ca)]===_0x3b1a1e(0x1c1)?_0x3b1a1e(0x1b5):_0x3b1a1e(0x1a8),'\x20',_0x3e5d9c[_0x3b1a1e(0x1c2)],':']}),a58_0x43ae01(Text,{'color':_0x3e5d9c[_0x3b1a1e(0x1ca)]===_0x3b1a1e(0x1a2)?_0x3b1a1e(0x1c8):_0x3e5d9c[_0x3b1a1e(0x1ca)]===_0x3b1a1e(0x1c1)?_0x3b1a1e(0x1ad):'red','children':_0x3e5d9c['message']})]},_0x292145)),a58_0x43ae01(Box,{'marginTop':0x1,'children':a58_0x43ae01(Text,{'color':_0x3b1a1e(0x1ba),'children':_0x48eff5(_0x3b1a1e(0x1b6))})})]});}async function configureMcp(_0x1f3d06){const _0x5b1ef3=a58_0x2f14,_0x2d651c=process[_0x5b1ef3(0x1cd)]();switch(_0x1f3d06){case _0x5b1ef3(0x19f):return configureCursorMcp(_0x2d651c);case _0x5b1ef3(0x1ab):return configureClaudeMcp(_0x2d651c);case _0x5b1ef3(0x1bb):return showOtherMcpGuide(_0x2d651c);default:throw new Error(a58_0x5a1915['t']('mcp.ui.unsupportedIDE',{'ide':_0x1f3d06}));}}
1
+ (function(_0x24cc30,_0x13dd43){const _0x1132e3=a58_0x18e1,_0x2692ab=_0x24cc30();while(!![]){try{const _0x5a8093=parseInt(_0x1132e3(0x141))/0x1*(parseInt(_0x1132e3(0x13d))/0x2)+parseInt(_0x1132e3(0x13a))/0x3+-parseInt(_0x1132e3(0x13c))/0x4*(parseInt(_0x1132e3(0x15f))/0x5)+-parseInt(_0x1132e3(0x153))/0x6+parseInt(_0x1132e3(0x14f))/0x7*(parseInt(_0x1132e3(0x150))/0x8)+parseInt(_0x1132e3(0x140))/0x9+-parseInt(_0x1132e3(0x15c))/0xa;if(_0x5a8093===_0x13dd43)break;else _0x2692ab['push'](_0x2692ab['shift']());}catch(_0x4bad6d){_0x2692ab['push'](_0x2692ab['shift']());}}}(a58_0x1c9a,0x8c49c));import{jsx as a58_0x54e072,jsxs as a58_0x552cf8,Fragment as a58_0x3d058b}from'react/jsx-runtime';import{useState,useEffect,useMemo}from'react';import{Text,Box,useInput,useApp}from'ink';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';function a58_0x18e1(_0x30b08a,_0xfd2e44){_0x30b08a=_0x30b08a-0x135;const _0x1c9a56=a58_0x1c9a();let _0x18e1a2=_0x1c9a56[_0x30b08a];return _0x18e1a2;}import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{useI18n}from'../i18n/hooks.js';import a58_0x15bdc3 from'../i18n/index.js';export function McpInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x27c327=a58_0x18e1,{t:_0x96d810}=useI18n(),{exit:_0x1b9536}=useApp(),[_0x116dbb,_0x31235b]=useState(_0x27c327(0x16b)),[_0x479570,_0xb96b2d]=useState([]),[_0x327306,_0x1a4426]=useState([]),_0x4a15a8=useMemo(()=>[...Array[_0x27c327(0x14c)](MCP_IDES)['map'](_0x530167=>({'key':_0x530167,'name':IDE_CONFIGS[_0x530167][_0x27c327(0x14d)],'description':IDE_CONFIGS[_0x530167][_0x27c327(0x166)]})),{'key':'other','name':_0x96d810('mcp.ui.otherIDE'),'description':_0x96d810('mcp.ui.otherIDEDescription')}],[_0x96d810]),_0x3e4ebe=useIDESelection({'ideList':_0x4a15a8,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x5b7b74=_0x27c327;preselectedIDEs[_0x5b7b74(0x157)]>0x0&&_0x3e4ebe[_0x5b7b74(0x135)][_0x5b7b74(0x149)]>0x0&&_0x3cf7e1();},[]),useInput((_0x6bfc0f,_0x3c08e5)=>{const _0x442d28=_0x27c327;if(_0x116dbb===_0x442d28(0x16b)){if(_0x6bfc0f==='q'||_0x6bfc0f==='Q'){_0x1b9536();return;}if(_0x3c08e5[_0x442d28(0x168)]){if(_0x3e4ebe[_0x442d28(0x135)][_0x442d28(0x149)]===0x0){_0x3e4ebe[_0x442d28(0x136)](_0x96d810(_0x442d28(0x14a)));return;}_0x3cf7e1();return;}_0x3e4ebe[_0x442d28(0x163)](_0x6bfc0f,_0x3c08e5);}_0x116dbb===_0x442d28(0x15b)&&_0x1b9536();});async function _0x3cf7e1(){const _0xa73e5b=_0x27c327,_0x348e19=_0x3e4ebe[_0xa73e5b(0x154)]();_0xb96b2d([{'label':_0x96d810(_0xa73e5b(0x146)),'value':_0x96d810(_0xa73e5b(0x159),{'count':_0x3e4ebe['selectedIndexes'][_0xa73e5b(0x149)]})}]),_0x31235b(_0xa73e5b(0x161));const _0x48f44a=[];for(const _0x45de81 of _0x348e19){try{const _0x714f99=await configureMcp(_0x45de81);_0x48f44a[_0xa73e5b(0x151)]({'ide':_0x4a15a8[_0xa73e5b(0x158)](_0x2a8b7a=>_0x2a8b7a[_0xa73e5b(0x13f)]===_0x45de81)?.['name']||_0x45de81,'status':_0x714f99[_0xa73e5b(0x156)]?_0xa73e5b(0x15a):_0x714f99[_0xa73e5b(0x16a)]?_0xa73e5b(0x16a):_0xa73e5b(0x15d),'message':_0x714f99[_0xa73e5b(0x165)]});}catch(_0x368a39){_0x48f44a[_0xa73e5b(0x151)]({'ide':_0x4a15a8['find'](_0x1e4e6e=>_0x1e4e6e[_0xa73e5b(0x13f)]===_0x45de81)?.[_0xa73e5b(0x14d)]||_0x45de81,'status':_0xa73e5b(0x15d),'message':_0x368a39 instanceof Error?_0x368a39['message']:String(_0x368a39)});}}_0x1a4426(_0x48f44a),_0x31235b(_0xa73e5b(0x15b)),setTimeout(()=>{_0x1b9536();},0x1388);}return a58_0x552cf8(Box,{'flexDirection':_0x27c327(0x13b),'marginTop':0x1,'children':[_0x116dbb===_0x27c327(0x16b)&&a58_0x54e072(IDESelector,{'ideList':_0x4a15a8,'title':_0x96d810(_0x27c327(0x144)),'selection':_0x3e4ebe}),_0x116dbb===_0x27c327(0x161)&&a58_0x552cf8(a58_0x3d058b,{'children':[_0x479570['map']((_0xdff5f5,_0x3d857d)=>a58_0x552cf8(Box,{'children':[a58_0x552cf8(Text,{'color':_0x27c327(0x167),'children':['√\x20',_0xdff5f5[_0x27c327(0x14b)],':\x20']}),a58_0x54e072(Text,{'color':'cyan','children':_0xdff5f5[_0x27c327(0x162)]})]},_0x3d857d)),a58_0x54e072(Box,{'marginTop':0x1,'children':a58_0x54e072(Text,{'children':_0x96d810(_0x27c327(0x169))})})]}),_0x116dbb===_0x27c327(0x15b)&&a58_0x54e072(DoneStep,{'configResults':_0x327306})]});}function a58_0x1c9a(){const _0xb7dd6e=['432gYqbNB','push','mcp.ui.pressAnyKeyToExit','1851522BuRUxm','getSelectedIDEs','cwd','needsManualAction','length','find','mcp.ui.count','manual','done','5209900fBHjaQ','error','mcp.ui.completed','80845WnLsnK','yellow','configuring','value','handleKeyDown','white','message','description','green','return','mcp.ui.configuring','success','selecting','status','mcp.ui.partialManual','mcp.ui.unsupportedIDE','selectedIndexes','setErrorMsg','\x20\x20⚠️','cursor','other','3326304LebiPy','column','248PqgVFx','1362ISbAmM','red','key','6417297FlzTqI','540ShNkeU','\x20\x20✓','some','mcp.ui.title','gray','mcp.ui.selectedIDE','map','mcp.ui.manualRequired','size','mcp.ui.selectAtLeastOne','label','from','name','ide','28147IumMbf'];a58_0x1c9a=function(){return _0xb7dd6e;};return a58_0x1c9a();}function DoneStep({configResults:_0x30fba7}){const _0x13e53f=a58_0x18e1,{t:_0x94d390}=useI18n(),_0xdb9504=_0x30fba7['every'](_0x599b2a=>_0x599b2a[_0x13e53f(0x16c)]==='success'),_0x24f8b4=_0x30fba7[_0x13e53f(0x143)](_0x1df9c0=>_0x1df9c0[_0x13e53f(0x16c)]===_0x13e53f(0x15a)),_0x38085b=_0x30fba7[_0x13e53f(0x143)](_0x3da8e8=>_0x3da8e8[_0x13e53f(0x16c)]===_0x13e53f(0x15d));return a58_0x552cf8(a58_0x3d058b,{'children':[a58_0x54e072(Box,{'children':_0xdb9504?a58_0x54e072(Text,{'color':'green','children':_0x94d390(_0x13e53f(0x15e))}):_0x24f8b4?a58_0x54e072(Text,{'color':_0x13e53f(0x160),'children':_0x94d390(_0x13e53f(0x16d))}):_0x38085b?a58_0x54e072(Text,{'color':_0x13e53f(0x13e),'children':_0x94d390('mcp.ui.failed')}):a58_0x54e072(Text,{'color':_0x13e53f(0x160),'children':_0x94d390(_0x13e53f(0x148))})}),_0x30fba7[_0x13e53f(0x147)]((_0x2ec30b,_0x2c868a)=>a58_0x552cf8(Box,{'flexDirection':_0x13e53f(0x13b),'children':[a58_0x552cf8(Text,{'color':_0x2ec30b[_0x13e53f(0x16c)]===_0x13e53f(0x16a)?_0x13e53f(0x167):_0x2ec30b[_0x13e53f(0x16c)]==='manual'?_0x13e53f(0x160):_0x13e53f(0x13e),'children':[_0x2ec30b[_0x13e53f(0x16c)]===_0x13e53f(0x16a)?_0x13e53f(0x142):_0x2ec30b[_0x13e53f(0x16c)]===_0x13e53f(0x15a)?_0x13e53f(0x137):'\x20\x20✗','\x20',_0x2ec30b[_0x13e53f(0x14e)],':']}),a58_0x54e072(Text,{'color':_0x2ec30b[_0x13e53f(0x16c)]===_0x13e53f(0x16a)?_0x13e53f(0x164):_0x2ec30b['status']===_0x13e53f(0x15a)?_0x13e53f(0x160):_0x13e53f(0x13e),'children':_0x2ec30b[_0x13e53f(0x165)]})]},_0x2c868a)),a58_0x54e072(Box,{'marginTop':0x1,'children':a58_0x54e072(Text,{'color':_0x13e53f(0x145),'children':_0x94d390(_0x13e53f(0x152))})})]});}async function configureMcp(_0xcbf66f){const _0x35ae2c=a58_0x18e1,_0x3df87f=process[_0x35ae2c(0x155)]();switch(_0xcbf66f){case _0x35ae2c(0x138):return configureCursorMcp(_0x3df87f);case'claude':return configureClaudeMcp(_0x3df87f);case _0x35ae2c(0x139):return showOtherMcpGuide(_0x3df87f);default:throw new Error(a58_0x15bdc3['t'](_0x35ae2c(0x16e),{'ide':_0xcbf66f}));}}
package/lib/mcp/claude.js CHANGED
@@ -1 +1 @@
1
- function a59_0x1ed9(_0x214c63,_0x4ae180){_0x214c63=_0x214c63-0x17c;const _0x5294f8=a59_0x5294();let _0x1ed98e=_0x5294f8[_0x214c63];return _0x1ed98e;}function a59_0x5294(){const _0x3434b7=['message','9838840urimSK','1003645ETtiUw','\x0a📋\x20','662181oEkkOJ','586905mINcrO','42atVZez','success','cwd','826385ndkgJN','2690361TWBqJw','20MEOquZ','exit','error','mcp.claudeConfig.error','1808654nKhudU'];a59_0x5294=function(){return _0x3434b7;};return a59_0x5294();}(function(_0x54669a,_0x4d06ce){const _0x39338f=a59_0x1ed9,_0xe7e9a6=_0x54669a();while(!![]){try{const _0x14f7f4=parseInt(_0x39338f(0x180))/0x1+-parseInt(_0x39338f(0x18b))/0x2+-parseInt(_0x39338f(0x181))/0x3*(parseInt(_0x39338f(0x187))/0x4)+-parseInt(_0x39338f(0x17e))/0x5*(-parseInt(_0x39338f(0x182))/0x6)+-parseInt(_0x39338f(0x185))/0x7+parseInt(_0x39338f(0x17d))/0x8+-parseInt(_0x39338f(0x186))/0x9;if(_0x14f7f4===_0x4d06ce)break;else _0xe7e9a6['push'](_0xe7e9a6['shift']());}catch(_0x8ad404){_0xe7e9a6['push'](_0xe7e9a6['shift']());}}}(a59_0x5294,0xf3915));import{configureClaudeMcp as a59_0x390b35}from'./mcp-installer.js';import a59_0x31b771 from'../i18n/index.js';export async function configureClaudeMcp(){const _0x1e97f9=a59_0x1ed9,_0x181ae2=process[_0x1e97f9(0x184)](),_0x150921=a59_0x390b35(_0x181ae2);_0x150921[_0x1e97f9(0x183)]?(console['log'](_0x1e97f9(0x17f)+_0x150921[_0x1e97f9(0x17c)]+'\x0a'),process[_0x1e97f9(0x188)](0x0)):(console[_0x1e97f9(0x189)](a59_0x31b771['t'](_0x1e97f9(0x18a),{'error':_0x150921[_0x1e97f9(0x17c)]})),process[_0x1e97f9(0x188)](0x1));}
1
+ function a59_0x5cd9(_0x601ed8,_0x17fcda){_0x601ed8=_0x601ed8-0x181;const _0x4392b1=a59_0x4392();let _0x5cd91b=_0x4392b1[_0x601ed8];return _0x5cd91b;}function a59_0x4392(){const _0x11ca6c=['1027iFHyow','628KaeDHb','6fAbEVs','1768355iunvre','4348696jAstHy','440772WXWYwc','6200XeNTKk','success','17067dSWzKm','600488MHBDBj','\x0a📋\x20','81ykAKBk','error','mcp.claudeConfig.error','20pzhEcD','5377463NMxoGI','exit','message','157YKksga'];a59_0x4392=function(){return _0x11ca6c;};return a59_0x4392();}(function(_0xf6f3e0,_0x143d35){const _0x5207d9=a59_0x5cd9,_0x2873ae=_0xf6f3e0();while(!![]){try{const _0x21da78=-parseInt(_0x5207d9(0x184))/0x1*(parseInt(_0x5207d9(0x18b))/0x2)+parseInt(_0x5207d9(0x18d))/0x3*(-parseInt(_0x5207d9(0x186))/0x4)+-parseInt(_0x5207d9(0x188))/0x5+parseInt(_0x5207d9(0x187))/0x6*(parseInt(_0x5207d9(0x181))/0x7)+parseInt(_0x5207d9(0x18e))/0x8*(-parseInt(_0x5207d9(0x190))/0x9)+-parseInt(_0x5207d9(0x193))/0xa*(parseInt(_0x5207d9(0x189))/0xb)+-parseInt(_0x5207d9(0x18a))/0xc*(-parseInt(_0x5207d9(0x185))/0xd);if(_0x21da78===_0x143d35)break;else _0x2873ae['push'](_0x2873ae['shift']());}catch(_0x5d2dc6){_0x2873ae['push'](_0x2873ae['shift']());}}}(a59_0x4392,0x72cb1));import{configureClaudeMcp as a59_0x3e91cd}from'./mcp-installer.js';import a59_0x443b47 from'../i18n/index.js';export async function configureClaudeMcp(){const _0x4a3e11=a59_0x5cd9,_0x1c97b7=process['cwd'](),_0x23bd70=a59_0x3e91cd(_0x1c97b7);_0x23bd70[_0x4a3e11(0x18c)]?(console['log'](_0x4a3e11(0x18f)+_0x23bd70[_0x4a3e11(0x183)]+'\x0a'),process[_0x4a3e11(0x182)](0x0)):(console[_0x4a3e11(0x191)](a59_0x443b47['t'](_0x4a3e11(0x192),{'error':_0x23bd70[_0x4a3e11(0x183)]})),process[_0x4a3e11(0x182)](0x1));}
package/lib/mcp/cursor.js CHANGED
@@ -1 +1 @@
1
- function a60_0x3b02(){const _0x4153e0=['293184XJhgNu','mcp.cursorConfig.restartRequired','log','58365yNtZsI','success','312WfpsyH','2016DHNmKC','4SWHvhM','3470850jvFxtw','6QaLsEX','1232895qkEaNL','exit','91naxlss','message','3486225OmXdWc','25990RTCXtX','mcp.cursorConfig.configInfo','22DsYUYz','7795697TVKOdc','mcp.cursorConfig.usageHint'];a60_0x3b02=function(){return _0x4153e0;};return a60_0x3b02();}(function(_0x254a90,_0x1972f2){const _0x1b7a57=a60_0x3819,_0x3fbc14=_0x254a90();while(!![]){try{const _0x5bd2eb=-parseInt(_0x1b7a57(0x17d))/0x1*(parseInt(_0x1b7a57(0x180))/0x2)+parseInt(_0x1b7a57(0x17b))/0x3*(-parseInt(_0x1b7a57(0x18c))/0x4)+parseInt(_0x1b7a57(0x17f))/0x5+-parseInt(_0x1b7a57(0x18e))/0x6*(parseInt(_0x1b7a57(0x183))/0x7)+-parseInt(_0x1b7a57(0x18b))/0x8*(-parseInt(_0x1b7a57(0x188))/0x9)+parseInt(_0x1b7a57(0x18d))/0xa*(parseInt(_0x1b7a57(0x182))/0xb)+parseInt(_0x1b7a57(0x185))/0xc*(parseInt(_0x1b7a57(0x18a))/0xd);if(_0x5bd2eb===_0x1972f2)break;else _0x3fbc14['push'](_0x3fbc14['shift']());}catch(_0x1ecbce){_0x3fbc14['push'](_0x3fbc14['shift']());}}}(a60_0x3b02,0xdce76));import{configureCursorMcp as a60_0x373a1c}from'./mcp-installer.js';function a60_0x3819(_0xc6d55d,_0x48e387){_0xc6d55d=_0xc6d55d-0x17b;const _0x3b0287=a60_0x3b02();let _0x381925=_0x3b0287[_0xc6d55d];return _0x381925;}import a60_0x202306 from'../i18n/index.js';export async function configureCursorMcp(){const _0x59080b=a60_0x3819,_0x2d1cbd=process['cwd'](),_0x4d74ff=await a60_0x373a1c(_0x2d1cbd);_0x4d74ff[_0x59080b(0x189)]?(console[_0x59080b(0x187)](a60_0x202306['t']('mcp.cursorConfig.success')),console[_0x59080b(0x187)](a60_0x202306['t'](_0x59080b(0x181))),console[_0x59080b(0x187)]('\x20\x20'+_0x4d74ff[_0x59080b(0x17e)]+'\x0a'),console[_0x59080b(0x187)](a60_0x202306['t'](_0x59080b(0x184))),console['log'](a60_0x202306['t'](_0x59080b(0x186))),process[_0x59080b(0x17c)](0x0)):(console['error'](a60_0x202306['t']('mcp.cursorConfig.error',{'error':_0x4d74ff[_0x59080b(0x17e)]})),process[_0x59080b(0x17c)](0x1));}
1
+ function a60_0x4f7b(_0x547704,_0x3ee0b5){_0x547704=_0x547704-0xba;const _0x3d3dd8=a60_0x3d3d();let _0x4f7b10=_0x3d3dd8[_0x547704];return _0x4f7b10;}(function(_0x57c1cf,_0x4ddf6e){const _0x1c6307=a60_0x4f7b,_0x55e5af=_0x57c1cf();while(!![]){try{const _0xe07828=-parseInt(_0x1c6307(0xbd))/0x1+parseInt(_0x1c6307(0xbb))/0x2*(-parseInt(_0x1c6307(0xbe))/0x3)+parseInt(_0x1c6307(0xc1))/0x4*(-parseInt(_0x1c6307(0xc9))/0x5)+parseInt(_0x1c6307(0xc8))/0x6+parseInt(_0x1c6307(0xcb))/0x7*(parseInt(_0x1c6307(0xbc))/0x8)+-parseInt(_0x1c6307(0xc2))/0x9*(-parseInt(_0x1c6307(0xcc))/0xa)+-parseInt(_0x1c6307(0xbf))/0xb;if(_0xe07828===_0x4ddf6e)break;else _0x55e5af['push'](_0x55e5af['shift']());}catch(_0x4acc63){_0x55e5af['push'](_0x55e5af['shift']());}}}(a60_0x3d3d,0x1cd44));function a60_0x3d3d(){const _0x3b3e51=['147470gcIdLa','log','2sIdNVy','56pqCDiY','56429PqkNxY','137238Ovouqb','492294ASGzJM','mcp.cursorConfig.success','4vzwVGN','27FGiVVJ','exit','message','mcp.cursorConfig.error','success','cwd','1214958IZFmbu','1034590OSykWw','mcp.cursorConfig.configInfo','225197BVWtmX'];a60_0x3d3d=function(){return _0x3b3e51;};return a60_0x3d3d();}import{configureCursorMcp as a60_0x1d0f1a}from'./mcp-installer.js';import a60_0x187b21 from'../i18n/index.js';export async function configureCursorMcp(){const _0x394898=a60_0x4f7b,_0x2165cb=process[_0x394898(0xc7)](),_0x21d46e=await a60_0x1d0f1a(_0x2165cb);_0x21d46e[_0x394898(0xc6)]?(console[_0x394898(0xba)](a60_0x187b21['t'](_0x394898(0xc0))),console['log'](a60_0x187b21['t'](_0x394898(0xca))),console[_0x394898(0xba)]('\x20\x20'+_0x21d46e[_0x394898(0xc4)]+'\x0a'),console['log'](a60_0x187b21['t']('mcp.cursorConfig.usageHint')),console['log'](a60_0x187b21['t']('mcp.cursorConfig.restartRequired')),process[_0x394898(0xc3)](0x0)):(console['error'](a60_0x187b21['t'](_0x394898(0xc5),{'error':_0x21d46e[_0x394898(0xc4)]})),process[_0x394898(0xc3)](0x1));}
package/lib/mcp/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x26316a,_0x3356f6){const _0x36fc77=a61_0x291f,_0x5c0f50=_0x26316a();while(!![]){try{const _0x2bfe51=parseInt(_0x36fc77(0xe2))/0x1+-parseInt(_0x36fc77(0xef))/0x2*(parseInt(_0x36fc77(0xd7))/0x3)+-parseInt(_0x36fc77(0xc8))/0x4*(parseInt(_0x36fc77(0xfa))/0x5)+parseInt(_0x36fc77(0xd0))/0x6*(-parseInt(_0x36fc77(0xce))/0x7)+parseInt(_0x36fc77(0xf2))/0x8*(-parseInt(_0x36fc77(0xcc))/0x9)+-parseInt(_0x36fc77(0xed))/0xa+-parseInt(_0x36fc77(0xe9))/0xb*(-parseInt(_0x36fc77(0xd4))/0xc);if(_0x2bfe51===_0x3356f6)break;else _0x5c0f50['push'](_0x5c0f50['shift']());}catch(_0x2eed7e){_0x5c0f50['push'](_0x5c0f50['shift']());}}}(a61_0x4d25,0x52063));import{configureCursorMcp}from'./cursor.js';import{configureClaudeMcp}from'./claude.js';import{logger}from'../utils/logger.js';import{createInterface}from'node:readline';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import a61_0x562adb from'../i18n/index.js';export async function mcpCommand(_0x8fef02,_0x166edb,_0x40f1ff){const _0x4d9017=a61_0x291f;logger[_0x4d9017(0xe5)](process[_0x4d9017(0xfc)]());if(_0x40f1ff?.[_0x4d9017(0xf7)]||_0x8fef02===_0x4d9017(0xc6)){showHelp();return;}_0x8fef02!==_0x4d9017(0xea)&&(console[_0x4d9017(0xec)](a61_0x562adb['t'](_0x4d9017(0xca),{'cmd':_0x8fef02||'-'})),console[_0x4d9017(0xee)](a61_0x562adb['t'](_0x4d9017(0xc5))),console[_0x4d9017(0xee)](a61_0x562adb['t'](_0x4d9017(0xc4))),console[_0x4d9017(0xee)](a61_0x562adb['t'](_0x4d9017(0xfb))),logger[_0x4d9017(0xec)](_0x4d9017(0xeb),a61_0x562adb['t']('mcp.error.unsupportedCommand',{'cmd':_0x8fef02||'-'})),process['exit'](0x1));let _0xf03a0b;if(_0x40f1ff?.[_0x4d9017(0xf4)])_0xf03a0b=_0x4d9017(0xe4);else{if(_0x40f1ff?.['mcpClaude'])_0xf03a0b='claude';else{if(_0x166edb?.[0x0]){const _0x4e1b8e=_0x166edb[0x0]['toLowerCase']();MCP_IDES[_0x4d9017(0xe8)](_0x4e1b8e)&&(_0xf03a0b=_0x4e1b8e);}}}await installMcp(_0xf03a0b);}function a61_0x291f(_0x17dfe4,_0x27ef76){_0x17dfe4=_0x17dfe4-0xc2;const _0x4d251d=a61_0x4d25();let _0x291fff=_0x4d251d[_0x17dfe4];return _0x291fff;}function showHelp(){const _0x308eae=a61_0x291f;console[_0x308eae(0xee)]('\x0a'+a61_0x562adb['t'](_0x308eae(0xdb))+'\x0a\x0a'+a61_0x562adb['t'](_0x308eae(0xcd))+'\x0a'+a61_0x562adb['t'](_0x308eae(0xf5))+'\x0a'+a61_0x562adb['t']('mcp.help.usage.installCursor')+'\x0a'+a61_0x562adb['t']('mcp.help.usage.installClaude')+'\x0a\x0a'+a61_0x562adb['t']('mcp.help.configMethods')+'\x0a'+a61_0x562adb['t'](_0x308eae(0xe6))+_0x308eae(0xf0)+a61_0x562adb['t'](_0x308eae(0xc3))+'\x0a\x0a'+a61_0x562adb['t']('mcp.help.configMethodsDirect')+'\x0a'+a61_0x562adb['t'](_0x308eae(0xc2))+'\x0a'+a61_0x562adb['t'](_0x308eae(0xfe))+'\x0a\x0a'+a61_0x562adb['t'](_0x308eae(0xd5))+'\x0a'+Array['from'](MCP_IDES)[_0x308eae(0xf3)]((_0x3ba818,_0x171cab)=>'\x20\x20'+(_0x171cab+0x1)+'.\x20'+IDE_CONFIGS[_0x3ba818][_0x308eae(0xf1)]+'\x20-\x20'+IDE_CONFIGS[_0x3ba818][_0x308eae(0xda)])[_0x308eae(0xdd)]('\x0a')+'\x0a\x0a'+a61_0x562adb['t'](_0x308eae(0xe0))+'\x0a'+a61_0x562adb['t'](_0x308eae(0xd1))+'\x0a'+a61_0x562adb['t'](_0x308eae(0xe7))+'\x0a\x0a'+a61_0x562adb['t']('mcp.help.exampleInstallCursor')+'\x0a'+a61_0x562adb['t']('mcp.help.exampleInstallCursorHint')+'\x0a\x0a'+a61_0x562adb['t'](_0x308eae(0xd6))+'\x0a\x20\x20https://help.yuntoo.com/mcp/config-guide\x0a');}async function selectIDE(){const _0x234861=a61_0x291f;console[_0x234861(0xee)](a61_0x562adb['t']('mcp.select.chooseIDE'));const _0x46bfc2=Array[_0x234861(0xd2)](MCP_IDES);return _0x46bfc2[_0x234861(0xdc)]((_0x21b4ec,_0x451788)=>{const _0x41eec8=_0x234861;console[_0x41eec8(0xee)]('\x20\x20'+(_0x451788+0x1)+'.\x20'+IDE_CONFIGS[_0x21b4ec][_0x41eec8(0xf1)]+_0x41eec8(0xc7)+IDE_CONFIGS[_0x21b4ec][_0x41eec8(0xda)]);}),console['log'](a61_0x562adb['t'](_0x234861(0xf9))),console[_0x234861(0xee)](a61_0x562adb['t'](_0x234861(0xd8))),new Promise(_0x37a679=>{const _0xab926e=_0x234861,_0x41b1c9=createInterface({'input':process[_0xab926e(0xfd)],'output':process['stdout']});_0x41b1c9[_0xab926e(0xf6)](a61_0x562adb['t']('mcp.select.prompt'),_0x1c40f7=>{const _0x1478e7=_0xab926e;_0x41b1c9[_0x1478e7(0xde)]();const _0x334a35=_0x1c40f7['trim']()[_0x1478e7(0xcb)]();(_0x334a35==='q'||_0x334a35==='quit'||_0x334a35==='exit')&&(console[_0x1478e7(0xee)](a61_0x562adb['t'](_0x1478e7(0xcf))),process[_0x1478e7(0xe3)](0x0));const _0x582ead=parseInt(_0x334a35,0xa);if(!isNaN(_0x582ead)&&_0x582ead>=0x1&&_0x582ead<=_0x46bfc2[_0x1478e7(0xff)]){const _0x2d3ae5=_0x46bfc2[_0x582ead-0x1];_0x2d3ae5&&_0x37a679(_0x2d3ae5);return;}console['log'](a61_0x562adb['t'](_0x1478e7(0xf8),{'count':_0x46bfc2[_0x1478e7(0xff)]})),process[_0x1478e7(0xe3)](0x1);});});}function a61_0x4d25(){const _0x5e1e2e=['mcp.help.usage.help','54733peZyks','mcp.select.cancelled','78lsUbiI','mcp.help.exampleInstall','from','claude','12PyKHhH','mcp.help.supportedIDEs','mcp.help.configGuide','1866054irWXYi','mcp.select.enterNumber','mcp.installFlow.configuring','description','mcp.help.title','forEach','join','close','message','mcp.help.examples','mcp.installFlow.error','624930pPnGDX','exit','cursor','setLogPath','mcp.help.configMethodsInteractive','mcp.help.exampleInstallHint','has','16276447ILjUcL','install','mcp','error','3838470aeljBZ','log','2TpNTrl','\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x0a','name','954088OgwNkB','map','mcpCursor','mcp.help.usage.install','question','help','mcp.select.invalidChoice','mcp.select.cancel','57645qekqNm','mcp.help.command.help','cwd','stdin','mcp.help.configMethodsDirectClaude','length','mcp.help.configMethodsDirectCursor','mcp.help.configMethodsInteractiveHint','mcp.help.command.install','mcp.help.availableCommands','--help','\x20-\x20','188IvqHdB','mcp-install','mcp.error.unsupportedCommand','toLowerCase','9yHicur'];a61_0x4d25=function(){return _0x5e1e2e;};return a61_0x4d25();}async function installMcp(_0x55b042){const _0xa2ea52=a61_0x291f;let _0x5b4b96;!_0x55b042?_0x5b4b96=await selectIDE():_0x5b4b96=_0x55b042;try{const _0x5d0b42=IDE_CONFIGS[_0x5b4b96];console[_0xa2ea52(0xee)](a61_0x562adb['t'](_0xa2ea52(0xd9),{'name':_0x5d0b42[_0xa2ea52(0xf1)]}));switch(_0x5b4b96){case _0xa2ea52(0xe4):await configureCursorMcp();break;case _0xa2ea52(0xd3):await configureClaudeMcp();break;}}catch(_0x5b6fcf){logger[_0xa2ea52(0xec)](_0xa2ea52(0xc9),a61_0x562adb['t']('mcp.installFlow.error',{'error':_0x5b6fcf instanceof Error?_0x5b6fcf[_0xa2ea52(0xdf)]:String(_0x5b6fcf)}),{'error':_0x5b6fcf instanceof Error?_0x5b6fcf[_0xa2ea52(0xdf)]:String(_0x5b6fcf)}),console[_0xa2ea52(0xec)](a61_0x562adb['t'](_0xa2ea52(0xe1),{'error':_0x5b6fcf instanceof Error?_0x5b6fcf[_0xa2ea52(0xdf)]:String(_0x5b6fcf)})),process[_0xa2ea52(0xe3)](0x1);}}
1
+ (function(_0x529aa6,_0x8f1e47){const _0x571922=a61_0xe605,_0x29d121=_0x529aa6();while(!![]){try{const _0x258fd9=parseInt(_0x571922(0x228))/0x1+-parseInt(_0x571922(0x210))/0x2+parseInt(_0x571922(0x22a))/0x3+-parseInt(_0x571922(0x1fd))/0x4*(-parseInt(_0x571922(0x225))/0x5)+-parseInt(_0x571922(0x223))/0x6+-parseInt(_0x571922(0x214))/0x7*(parseInt(_0x571922(0x222))/0x8)+parseInt(_0x571922(0x205))/0x9*(parseInt(_0x571922(0x20e))/0xa);if(_0x258fd9===_0x8f1e47)break;else _0x29d121['push'](_0x29d121['shift']());}catch(_0x4740d3){_0x29d121['push'](_0x29d121['shift']());}}}(a61_0x24c2,0xb5bfd));import{configureCursorMcp}from'./cursor.js';import{configureClaudeMcp}from'./claude.js';import{logger}from'../utils/logger.js';import{createInterface}from'node:readline';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';function a61_0x24c2(){const _0x48625d=['error','question','mcp.select.chooseIDE','mcp.help.exampleInstallHint','map','mcp.help.title','from','mcp.select.prompt','claude','mcp.help.command.help','stdout','5352xBIcCm','3151398lgZoIg','mcp.help.availableCommands','39885ObTLzB','cwd','mcpClaude','236767XgndIL','\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x0a','2780397pnWBhk','mcp.installFlow.error','mcp.help.configMethodsDirect','mcp.select.cancelled','\x20-\x20','mcp.help.configMethodsDirectClaude','stdin','has','mcp.help.exampleInstallCursor','cursor','mcp.help.configMethods','mcp','name','mcp.installFlow.configuring','mcp.help.configMethodsInteractiveHint','740NJQgYh','mcp.help.configMethodsDirectCursor','help','mcp.help.exampleInstallCursorHint','description','join','mcp.help.usage.installCursor','setLogPath','386874uDdXin','log','mcp.help.usage.help','install','close','mcp.select.enterNumber','message','toLowerCase','mcp.help.configMethodsInteractive','20PfhPtj','mcp.select.invalidChoice','1082164TWLzwn','exit','mcpCursor','mcp.error.unsupportedCommand','9569YWetqA','length','quit'];a61_0x24c2=function(){return _0x48625d;};return a61_0x24c2();}import a61_0x253b0e from'../i18n/index.js';export async function mcpCommand(_0x4ed170,_0x5a1f7e,_0x5dab40){const _0x2dbef4=a61_0xe605;logger[_0x2dbef4(0x204)](process[_0x2dbef4(0x226)]());if(_0x5dab40?.[_0x2dbef4(0x1ff)]||_0x4ed170==='--help'){showHelp();return;}_0x4ed170!==_0x2dbef4(0x208)&&(console['error'](a61_0x253b0e['t'](_0x2dbef4(0x213),{'cmd':_0x4ed170||'-'})),console['log'](a61_0x253b0e['t'](_0x2dbef4(0x224))),console['log'](a61_0x253b0e['t']('mcp.help.command.install')),console[_0x2dbef4(0x206)](a61_0x253b0e['t'](_0x2dbef4(0x220))),logger[_0x2dbef4(0x217)](_0x2dbef4(0x1f9),a61_0x253b0e['t'](_0x2dbef4(0x213),{'cmd':_0x4ed170||'-'})),process[_0x2dbef4(0x211)](0x1));let _0x16c05d;if(_0x5dab40?.[_0x2dbef4(0x212)])_0x16c05d='cursor';else{if(_0x5dab40?.[_0x2dbef4(0x227)])_0x16c05d=_0x2dbef4(0x21f);else{if(_0x5a1f7e?.[0x0]){const _0x4cf1ca=_0x5a1f7e[0x0][_0x2dbef4(0x20c)]();MCP_IDES[_0x2dbef4(0x1f5)](_0x4cf1ca)&&(_0x16c05d=_0x4cf1ca);}}}await installMcp(_0x16c05d);}function a61_0xe605(_0x88b7ec,_0x917bc8){_0x88b7ec=_0x88b7ec-0x1f2;const _0x24c2e4=a61_0x24c2();let _0xe605da=_0x24c2e4[_0x88b7ec];return _0xe605da;}function showHelp(){const _0x33ee94=a61_0xe605;console[_0x33ee94(0x206)]('\x0a'+a61_0x253b0e['t'](_0x33ee94(0x21c))+'\x0a\x0a'+a61_0x253b0e['t'](_0x33ee94(0x207))+'\x0a'+a61_0x253b0e['t']('mcp.help.usage.install')+'\x0a'+a61_0x253b0e['t'](_0x33ee94(0x203))+'\x0a'+a61_0x253b0e['t']('mcp.help.usage.installClaude')+'\x0a\x0a'+a61_0x253b0e['t'](_0x33ee94(0x1f8))+'\x0a'+a61_0x253b0e['t'](_0x33ee94(0x20d))+_0x33ee94(0x229)+a61_0x253b0e['t'](_0x33ee94(0x1fc))+'\x0a\x0a'+a61_0x253b0e['t'](_0x33ee94(0x22c))+'\x0a'+a61_0x253b0e['t'](_0x33ee94(0x1fe))+'\x0a'+a61_0x253b0e['t'](_0x33ee94(0x1f3))+'\x0a\x0a'+a61_0x253b0e['t']('mcp.help.supportedIDEs')+'\x0a'+Array['from'](MCP_IDES)[_0x33ee94(0x21b)]((_0x1dcad5,_0x3d252e)=>'\x20\x20'+(_0x3d252e+0x1)+'.\x20'+IDE_CONFIGS[_0x1dcad5][_0x33ee94(0x1fa)]+_0x33ee94(0x1f2)+IDE_CONFIGS[_0x1dcad5]['description'])[_0x33ee94(0x202)]('\x0a')+'\x0a\x0a'+a61_0x253b0e['t']('mcp.help.examples')+'\x0a'+a61_0x253b0e['t']('mcp.help.exampleInstall')+'\x0a'+a61_0x253b0e['t'](_0x33ee94(0x21a))+'\x0a\x0a'+a61_0x253b0e['t'](_0x33ee94(0x1f6))+'\x0a'+a61_0x253b0e['t'](_0x33ee94(0x200))+'\x0a\x0a'+a61_0x253b0e['t']('mcp.help.configGuide')+'\x0a\x20\x20https://help.yuntoo.com/mcp/config-guide\x0a');}async function selectIDE(){const _0x2ecc5c=a61_0xe605;console['log'](a61_0x253b0e['t'](_0x2ecc5c(0x219)));const _0x24c0fa=Array[_0x2ecc5c(0x21d)](MCP_IDES);return _0x24c0fa['forEach']((_0x143f1f,_0x58c12d)=>{const _0x1cf8a7=_0x2ecc5c;console[_0x1cf8a7(0x206)]('\x20\x20'+(_0x58c12d+0x1)+'.\x20'+IDE_CONFIGS[_0x143f1f][_0x1cf8a7(0x1fa)]+_0x1cf8a7(0x1f2)+IDE_CONFIGS[_0x143f1f][_0x1cf8a7(0x201)]);}),console[_0x2ecc5c(0x206)](a61_0x253b0e['t']('mcp.select.cancel')),console[_0x2ecc5c(0x206)](a61_0x253b0e['t'](_0x2ecc5c(0x20a))),new Promise(_0x23f6c3=>{const _0x39b7c3=_0x2ecc5c,_0xa1bccc=createInterface({'input':process[_0x39b7c3(0x1f4)],'output':process[_0x39b7c3(0x221)]});_0xa1bccc[_0x39b7c3(0x218)](a61_0x253b0e['t'](_0x39b7c3(0x21e)),_0x182f46=>{const _0x1ec725=_0x39b7c3;_0xa1bccc[_0x1ec725(0x209)]();const _0x171745=_0x182f46['trim']()[_0x1ec725(0x20c)]();(_0x171745==='q'||_0x171745===_0x1ec725(0x216)||_0x171745===_0x1ec725(0x211))&&(console[_0x1ec725(0x206)](a61_0x253b0e['t'](_0x1ec725(0x22d))),process['exit'](0x0));const _0x4595f5=parseInt(_0x171745,0xa);if(!isNaN(_0x4595f5)&&_0x4595f5>=0x1&&_0x4595f5<=_0x24c0fa[_0x1ec725(0x215)]){const _0x522ad1=_0x24c0fa[_0x4595f5-0x1];_0x522ad1&&_0x23f6c3(_0x522ad1);return;}console[_0x1ec725(0x206)](a61_0x253b0e['t'](_0x1ec725(0x20f),{'count':_0x24c0fa[_0x1ec725(0x215)]})),process['exit'](0x1);});});}async function installMcp(_0x1a7ed5){const _0x156c0c=a61_0xe605;let _0x5f2263;!_0x1a7ed5?_0x5f2263=await selectIDE():_0x5f2263=_0x1a7ed5;try{const _0x53abeb=IDE_CONFIGS[_0x5f2263];console['log'](a61_0x253b0e['t'](_0x156c0c(0x1fb),{'name':_0x53abeb[_0x156c0c(0x1fa)]}));switch(_0x5f2263){case _0x156c0c(0x1f7):await configureCursorMcp();break;case _0x156c0c(0x21f):await configureClaudeMcp();break;}}catch(_0x43090a){logger[_0x156c0c(0x217)]('mcp-install',a61_0x253b0e['t'](_0x156c0c(0x22b),{'error':_0x43090a instanceof Error?_0x43090a['message']:String(_0x43090a)}),{'error':_0x43090a instanceof Error?_0x43090a['message']:String(_0x43090a)}),console[_0x156c0c(0x217)](a61_0x253b0e['t'](_0x156c0c(0x22b),{'error':_0x43090a instanceof Error?_0x43090a[_0x156c0c(0x20b)]:String(_0x43090a)})),process['exit'](0x1);}}
@@ -1 +1 @@
1
- const a62_0x3ca58d=a62_0x5070;function a62_0x5070(_0x1ff187,_0x2a4446){_0x1ff187=_0x1ff187-0x183;const _0x382759=a62_0x3827();let _0x5070da=_0x382759[_0x1ff187];return _0x5070da;}(function(_0x5eeb6b,_0x1609d3){const _0x3103c4=a62_0x5070,_0x31a593=_0x5eeb6b();while(!![]){try{const _0x307e56=parseInt(_0x3103c4(0x1a0))/0x1*(parseInt(_0x3103c4(0x18b))/0x2)+parseInt(_0x3103c4(0x196))/0x3*(parseInt(_0x3103c4(0x19f))/0x4)+-parseInt(_0x3103c4(0x18f))/0x5+-parseInt(_0x3103c4(0x183))/0x6+-parseInt(_0x3103c4(0x187))/0x7*(parseInt(_0x3103c4(0x195))/0x8)+parseInt(_0x3103c4(0x192))/0x9*(parseInt(_0x3103c4(0x18c))/0xa)+-parseInt(_0x3103c4(0x199))/0xb;if(_0x307e56===_0x1609d3)break;else _0x31a593['push'](_0x31a593['shift']());}catch(_0x4d9586){_0x31a593['push'](_0x31a593['shift']());}}}(a62_0x3827,0xbd769));import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{logger}from'../utils/logger.js';import a62_0x448064 from'../i18n/index.js';function a62_0x3827(){const _0x5cb292=['length','cursor','needsManualAction','2CMbWWP','320NBSabh','cwd','info','205770wBBjfm','mcp.install.failed','mcp.install.otherIDE','98037PpErpG','log','success','948536WpKAJr','3GOArvv','claude','mcp-install-non-interactive','9165750AEqtue','mcp.install.success','setLogPath','push','mcp.cursor','other','4790860zMntsy','649004MECjMU','mcp.install.completed','2557698mmlucF','message','mcp.claude','mcp.install.unknownIDE','7PeCCCK'];a62_0x3827=function(){return _0x5cb292;};return a62_0x3827();}export async function installMcpNonInteractive(_0x3a8f9c,_0x3d629b=process[a62_0x3ca58d(0x18d)]()){const _0x1ec893=a62_0x3ca58d;logger[_0x1ec893(0x19b)](_0x3d629b),logger[_0x1ec893(0x18e)](_0x1ec893(0x198),a62_0x448064['t']('mcp.install.starting'),{'ides':_0x3a8f9c});const _0x489303=[];for(const _0x803cf of _0x3a8f9c){try{let _0x5e82fe;switch(_0x803cf){case'cursor':_0x5e82fe=await configureCursorMcp(_0x3d629b);break;case _0x1ec893(0x197):_0x5e82fe=configureClaudeMcp(_0x3d629b);break;case _0x1ec893(0x19e):_0x5e82fe=showOtherMcpGuide(_0x3d629b);break;default:_0x5e82fe={'success':![],'message':a62_0x448064['t'](_0x1ec893(0x186),{'ide':_0x803cf})};}_0x489303[_0x1ec893(0x19c)](_0x5e82fe);if(_0x5e82fe[_0x1ec893(0x194)]){const _0x137ba3=_0x803cf==='cursor'?a62_0x448064['t'](_0x1ec893(0x19d)):_0x803cf===_0x1ec893(0x197)?a62_0x448064['t'](_0x1ec893(0x185)):a62_0x448064['t'](_0x1ec893(0x191));console[_0x1ec893(0x193)](a62_0x448064['t'](_0x1ec893(0x19a),{'ide':_0x137ba3})),console[_0x1ec893(0x193)]('\x20\x20'+_0x5e82fe[_0x1ec893(0x184)]);}else console['error'](a62_0x448064['t'](_0x1ec893(0x190),{'ide':_0x803cf===_0x1ec893(0x189)?a62_0x448064['t'](_0x1ec893(0x19d)):_0x803cf===_0x1ec893(0x197)?a62_0x448064['t']('mcp.claude'):a62_0x448064['t']('mcp.install.otherIDE'),'error':_0x5e82fe[_0x1ec893(0x184)]}));}catch(_0x4c0b10){console['error'](a62_0x448064['t'](_0x1ec893(0x190),{'ide':_0x803cf==='cursor'?a62_0x448064['t'](_0x1ec893(0x19d)):_0x803cf===_0x1ec893(0x197)?a62_0x448064['t'](_0x1ec893(0x185)):a62_0x448064['t'](_0x1ec893(0x191)),'error':_0x4c0b10 instanceof Error?_0x4c0b10['message']:String(_0x4c0b10)}));}}const _0x3c7349=_0x489303['filter'](_0x5e6a88=>_0x5e6a88[_0x1ec893(0x194)])[_0x1ec893(0x188)],_0x415800=_0x489303['length'];console[_0x1ec893(0x193)](a62_0x448064['t'](_0x1ec893(0x1a1),{'successCount':_0x3c7349,'totalCount':_0x415800}));const _0x212feb=_0x489303['some'](_0xf74ccb=>_0xf74ccb[_0x1ec893(0x18a)]);_0x212feb&&console[_0x1ec893(0x193)](a62_0x448064['t']('mcp.install.manualActionRequired'));}
1
+ const a62_0x31094e=a62_0x2aa1;(function(_0x495a7c,_0x5b824e){const _0xebbf7b=a62_0x2aa1,_0x4da1d4=_0x495a7c();while(!![]){try{const _0x277039=parseInt(_0xebbf7b(0x209))/0x1+-parseInt(_0xebbf7b(0x1f2))/0x2+-parseInt(_0xebbf7b(0x204))/0x3+-parseInt(_0xebbf7b(0x1f7))/0x4+-parseInt(_0xebbf7b(0x206))/0x5+parseInt(_0xebbf7b(0x200))/0x6*(parseInt(_0xebbf7b(0x202))/0x7)+-parseInt(_0xebbf7b(0x1f0))/0x8*(-parseInt(_0xebbf7b(0x1fa))/0x9);if(_0x277039===_0x5b824e)break;else _0x4da1d4['push'](_0x4da1d4['shift']());}catch(_0x2fd87b){_0x4da1d4['push'](_0x4da1d4['shift']());}}}(a62_0x4b81,0xb9fa5));import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';function a62_0x2aa1(_0x1029c5,_0x31b2aa){_0x1029c5=_0x1029c5-0x1ef;const _0x4b818c=a62_0x4b81();let _0x2aa111=_0x4b818c[_0x1029c5];return _0x2aa111;}import{logger}from'../utils/logger.js';import a62_0x455520 from'../i18n/index.js';function a62_0x4b81(){const _0x1d415a=['985996tOIcky','mcp.install.manualActionRequired','mcp.install.success','mcp.install.completed','some','3056644CMrTov','needsManualAction','setLogPath','18077058gvllkY','claude','other','cwd','mcp-install-non-interactive','mcp.install.failed','1194BfMzBI','log','43141kIXsUo','mcp.install.otherIDE','3205020mioscy','error','2751390yPxQQL','mcp.cursor','cursor','402543nyTdpP','length','mcp.claude','push','success','8RMMZto','message'];a62_0x4b81=function(){return _0x1d415a;};return a62_0x4b81();}export async function installMcpNonInteractive(_0x4103b7,_0x193585=process[a62_0x31094e(0x1fd)]()){const _0xd98f7d=a62_0x31094e;logger[_0xd98f7d(0x1f9)](_0x193585),logger['info'](_0xd98f7d(0x1fe),a62_0x455520['t']('mcp.install.starting'),{'ides':_0x4103b7});const _0x35b21b=[];for(const _0x1e3445 of _0x4103b7){try{let _0x37441d;switch(_0x1e3445){case'cursor':_0x37441d=await configureCursorMcp(_0x193585);break;case _0xd98f7d(0x1fb):_0x37441d=configureClaudeMcp(_0x193585);break;case _0xd98f7d(0x1fc):_0x37441d=showOtherMcpGuide(_0x193585);break;default:_0x37441d={'success':![],'message':a62_0x455520['t']('mcp.install.unknownIDE',{'ide':_0x1e3445})};}_0x35b21b[_0xd98f7d(0x20c)](_0x37441d);if(_0x37441d[_0xd98f7d(0x1ef)]){const _0x1c7ae2=_0x1e3445===_0xd98f7d(0x208)?a62_0x455520['t'](_0xd98f7d(0x207)):_0x1e3445===_0xd98f7d(0x1fb)?a62_0x455520['t'](_0xd98f7d(0x20b)):a62_0x455520['t'](_0xd98f7d(0x203));console['log'](a62_0x455520['t'](_0xd98f7d(0x1f4),{'ide':_0x1c7ae2})),console[_0xd98f7d(0x201)]('\x20\x20'+_0x37441d[_0xd98f7d(0x1f1)]);}else console[_0xd98f7d(0x205)](a62_0x455520['t'](_0xd98f7d(0x1ff),{'ide':_0x1e3445===_0xd98f7d(0x208)?a62_0x455520['t']('mcp.cursor'):_0x1e3445===_0xd98f7d(0x1fb)?a62_0x455520['t']('mcp.claude'):a62_0x455520['t'](_0xd98f7d(0x203)),'error':_0x37441d['message']}));}catch(_0x405d5e){console['error'](a62_0x455520['t']('mcp.install.failed',{'ide':_0x1e3445===_0xd98f7d(0x208)?a62_0x455520['t'](_0xd98f7d(0x207)):_0x1e3445===_0xd98f7d(0x1fb)?a62_0x455520['t']('mcp.claude'):a62_0x455520['t'](_0xd98f7d(0x203)),'error':_0x405d5e instanceof Error?_0x405d5e[_0xd98f7d(0x1f1)]:String(_0x405d5e)}));}}const _0x1a5f5e=_0x35b21b['filter'](_0x61f5cd=>_0x61f5cd[_0xd98f7d(0x1ef)])[_0xd98f7d(0x20a)],_0x3476be=_0x35b21b[_0xd98f7d(0x20a)];console[_0xd98f7d(0x201)](a62_0x455520['t'](_0xd98f7d(0x1f5),{'successCount':_0x1a5f5e,'totalCount':_0x3476be}));const _0x3b6f09=_0x35b21b[_0xd98f7d(0x1f6)](_0x51d1c5=>_0x51d1c5[_0xd98f7d(0x1f8)]);_0x3b6f09&&console[_0xd98f7d(0x201)](a62_0x455520['t'](_0xd98f7d(0x1f3)));}
@@ -1 +1 @@
1
- const a63_0x14b54b=a63_0x2eeb;(function(_0x2d6be0,_0x21eed2){const _0xaf760d=a63_0x2eeb,_0x356485=_0x2d6be0();while(!![]){try{const _0x2630de=-parseInt(_0xaf760d(0x13e))/0x1+parseInt(_0xaf760d(0x139))/0x2*(parseInt(_0xaf760d(0x114))/0x3)+-parseInt(_0xaf760d(0x147))/0x4+parseInt(_0xaf760d(0x11a))/0x5*(parseInt(_0xaf760d(0x140))/0x6)+parseInt(_0xaf760d(0x136))/0x7+-parseInt(_0xaf760d(0x14d))/0x8+-parseInt(_0xaf760d(0x13a))/0x9*(-parseInt(_0xaf760d(0x144))/0xa);if(_0x2630de===_0x21eed2)break;else _0x356485['push'](_0x356485['shift']());}catch(_0x4995cc){_0x356485['push'](_0x356485['shift']());}}}(a63_0x16ab,0xb71f4));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getRulesContent}from'../utils/rules-cdn.js';import a63_0x23f79f from'../i18n/index.js';const __dirname=dirname(fileURLToPath(import.meta.url));export const MCP_SERVER_NAME=a63_0x14b54b(0x143);export const MCP_COMMAND=a63_0x14b54b(0x125);function a63_0x2eeb(_0x16273a,_0x4ec7b0){_0x16273a=_0x16273a-0x10f;const _0x16ab79=a63_0x16ab();let _0x2eeb2e=_0x16ab79[_0x16273a];return _0x2eeb2e;}export const MCP_ARGS=[a63_0x14b54b(0x148)];function a63_0x16ab(){const _0x580caa=['1391053IEAwqq','mcp.config.env','5682FUYDWD','mcp-install','mcp.cursorConfig.rules.created','lovrabet-dataset','10UYRnEq','\x0a\x20\x20','online','1921028AvRXWd','@lovrabet/dataset-mcp-server@latest','mcp.cursorConfig.error','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[\x22@lovrabet/dataset-mcp-server@latest\x22],','mcp.claudeConfig.configInfo','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{','4729336NYvClz','mcp.json','\x22LOVRABET_APP_CODE\x22:\x20\x22','mcp.cursorConfig.rules.exists','map','\x20\x20}','agents.md','159UbuUow','\x20-e\x20LOVRABET_ENV=','parse','mcp.cursorConfig.success','mcp.other.configGuide','rules','2725QjboXW','mcp.claudeConfig.restartRequired','mcp.cursorConfig.updateExisting','mcp-cursor','.cursor','mcp-claude','AppCode:\x20','mcpServers','\x20\x20\x20\x20\x20\x20}','\x22LOVRABET_ENV\x22:\x20\x22','mcp.other.guideShown','npx','mcp.claudeConfig.agents.exists','mcp.claudeConfig.manualCommand','join','mcp.error.missingAppcode','mcp.cursorConfig.rules.copyFailed','error','mcp.cursorConfig.written','utf8','appcode','LOVRABET_ENV','mcp.cursorConfig.createNew','claude\x20mcp\x20add\x20','info','\x20\x20\x22mcpServers\x22:\x20{','utf-8','\x20-e\x20LOVRABET_APP_CODE=','4495253BYGbVi','stringify','mcp.claudeConfig.agents.created','46974MkkJNL','7284960cBXkym','mcp.cursorConfig.restartRequired','push','message'];a63_0x16ab=function(){return _0x580caa;};return a63_0x16ab();}export function getAppConfig(){const _0x56b282=a63_0x14b54b,_0x365b06=readConfig(),_0x3b157d=_0x365b06[_0x56b282(0x12e)]||_0x365b06['app'],_0x415ef5=_0x365b06['env']||_0x56b282(0x146);if(!_0x3b157d)throw new Error(a63_0x23f79f['t'](_0x56b282(0x129)));return{'appcode':String(_0x3b157d),'env':_0x415ef5};}export function buildMcpEnv(_0xee0f5c,_0x18f46){const _0x3f4074=a63_0x14b54b,_0x2ffad3={'LOVRABET_APP_CODE':_0xee0f5c};return _0x18f46!==_0x3f4074(0x146)&&(_0x2ffad3[_0x3f4074(0x12f)]=_0x18f46),_0x2ffad3;}export function buildMcpServerConfig(_0x560383,_0x40d0c6){return{'command':MCP_COMMAND,'args':MCP_ARGS,'env':buildMcpEnv(_0x560383,_0x40d0c6)};}export function buildClaudeMcpCommand(_0x1f7dcb,_0x48cad4){const _0x4cf086=a63_0x14b54b,_0x4a96b4=_0x4cf086(0x131)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0x4cf086(0x128)]('\x20')+_0x4cf086(0x135)+_0x1f7dcb,_0x4e73c5=_0x48cad4!==_0x4cf086(0x146)?_0x4cf086(0x115)+_0x48cad4:'';return''+_0x4a96b4+_0x4e73c5;}export async function copyCursorRules(_0x4b03a3){const _0x4dc0e9=a63_0x14b54b,_0x45d2fe=join(_0x4b03a3,_0x4dc0e9(0x11e)),_0x15d71d=join(_0x45d2fe,_0x4dc0e9(0x119)),_0xbf18f8=join(_0x15d71d,'lovrabet_rules.mdc');if(existsSync(_0xbf18f8))return logger['info'](_0x4dc0e9(0x141),a63_0x23f79f['t'](_0x4dc0e9(0x110)),{'path':_0xbf18f8}),![];try{ensureDir(_0x15d71d);const _0x102944=await getRulesContent();return writeFileSync(_0xbf18f8,_0x102944,'utf-8'),logger[_0x4dc0e9(0x132)](_0x4dc0e9(0x141),a63_0x23f79f['t'](_0x4dc0e9(0x142)),{'to':_0xbf18f8}),!![];}catch(_0x3d47a0){return logger['error'](_0x4dc0e9(0x141),a63_0x23f79f['t'](_0x4dc0e9(0x12a)),{'error':_0x3d47a0 instanceof Error?_0x3d47a0[_0x4dc0e9(0x13d)]:String(_0x3d47a0)}),![];}}export async function copyAgentsMd(_0x5c93aa){const _0x410a58=a63_0x14b54b,_0x5a1af3=join(_0x5c93aa,_0x410a58(0x113));if(existsSync(_0x5a1af3))return logger[_0x410a58(0x132)](_0x410a58(0x141),a63_0x23f79f['t'](_0x410a58(0x126)),{'path':_0x5a1af3}),![];try{const _0x458250=await getRulesContent();return writeFileSync(_0x5a1af3,_0x458250,_0x410a58(0x134)),logger[_0x410a58(0x132)](_0x410a58(0x141),a63_0x23f79f['t'](_0x410a58(0x138)),{'to':_0x5a1af3}),!![];}catch(_0x339778){return logger[_0x410a58(0x12b)](_0x410a58(0x141),a63_0x23f79f['t']('mcp.claudeConfig.agents.copyFailed'),{'error':_0x339778 instanceof Error?_0x339778[_0x410a58(0x13d)]:String(_0x339778)}),![];}}export async function configureCursorMcp(_0x14bfbf){const _0x186a4c=a63_0x14b54b;try{const {appcode:_0x298122,env:_0x5478ba}=getAppConfig(),_0x5ea871=join(_0x14bfbf,_0x186a4c(0x11e)),_0x104881=join(_0x5ea871,_0x186a4c(0x14e));ensureDir(_0x5ea871);const _0x1ad465=buildMcpServerConfig(_0x298122,_0x5478ba);let _0x3c7cac;if(existsSync(_0x104881)){const _0x426ced=readFileSync(_0x104881,_0x186a4c(0x12d));_0x3c7cac=JSON[_0x186a4c(0x116)](_0x426ced),!_0x3c7cac[_0x186a4c(0x121)]&&(_0x3c7cac[_0x186a4c(0x121)]={}),logger[_0x186a4c(0x132)]('mcp-cursor',a63_0x23f79f['t'](_0x186a4c(0x11c)),{'path':_0x104881,'appcode':_0x298122,'env':_0x5478ba});}else _0x3c7cac={'mcpServers':{}},logger[_0x186a4c(0x132)](_0x186a4c(0x11d),a63_0x23f79f['t'](_0x186a4c(0x130)),{'path':_0x104881,'appcode':_0x298122,'env':_0x5478ba});_0x3c7cac[_0x186a4c(0x121)][MCP_SERVER_NAME]=_0x1ad465,writeFileSync(_0x104881,JSON[_0x186a4c(0x137)](_0x3c7cac,null,0x2),{'encoding':_0x186a4c(0x12d)});const _0x2cf21f=await copyCursorRules(_0x14bfbf),_0xddf4c7=[a63_0x23f79f['t'](_0x186a4c(0x12c)),'AppCode:\x20'+_0x298122];return _0x5478ba!==_0x186a4c(0x146)&&_0xddf4c7[_0x186a4c(0x13c)](a63_0x23f79f['t'](_0x186a4c(0x13f),{'env':_0x5478ba})),_0xddf4c7['push'](a63_0x23f79f['t'](_0x186a4c(0x13b))),_0x2cf21f&&_0xddf4c7['push'](a63_0x23f79f['t']('mcp.cursorConfig.rules.created')),logger['info'](_0x186a4c(0x11d),a63_0x23f79f['t'](_0x186a4c(0x117)),{'appcode':_0x298122,'env':_0x5478ba,'configPath':_0x104881}),{'success':!![],'message':_0xddf4c7[_0x186a4c(0x128)](_0x186a4c(0x145))};}catch(_0x2de802){return logger['error'](_0x186a4c(0x11d),a63_0x23f79f['t'](_0x186a4c(0x149),{'error':_0x2de802 instanceof Error?_0x2de802[_0x186a4c(0x13d)]:String(_0x2de802)}),{'error':_0x2de802 instanceof Error?_0x2de802[_0x186a4c(0x13d)]:String(_0x2de802)}),{'success':![],'message':_0x2de802 instanceof Error?_0x2de802[_0x186a4c(0x13d)]:String(_0x2de802)};}}export function configureClaudeMcp(_0x5b9251){const _0x25e22c=a63_0x14b54b;try{const {appcode:_0x51cccf,env:_0x23abe1}=getAppConfig();copyAgentsMd(_0x5b9251);const _0x6ca76=buildClaudeMcpCommand(_0x51cccf,_0x23abe1),_0x4d29a7=[a63_0x23f79f['t'](_0x25e22c(0x127)),''+_0x6ca76,a63_0x23f79f['t'](_0x25e22c(0x14b)),_0x25e22c(0x120)+_0x51cccf];return _0x23abe1!=='online'&&_0x4d29a7[_0x25e22c(0x13c)](a63_0x23f79f['t']('mcp.config.env',{'env':_0x23abe1})),_0x4d29a7[_0x25e22c(0x13c)](a63_0x23f79f['t'](_0x25e22c(0x11b))),logger['info'](_0x25e22c(0x11f),a63_0x23f79f['t']('mcp.claudeConfig.commandGenerated'),{'appcode':_0x51cccf,'env':_0x23abe1,'command':_0x6ca76}),{'success':!![],'message':_0x4d29a7[_0x25e22c(0x128)](_0x25e22c(0x145)),'needsManualAction':!![]};}catch(_0x4c04e7){return logger[_0x25e22c(0x12b)](_0x25e22c(0x11f),a63_0x23f79f['t']('mcp.claudeConfig.error',{'error':_0x4c04e7 instanceof Error?_0x4c04e7[_0x25e22c(0x13d)]:String(_0x4c04e7)}),{'error':_0x4c04e7 instanceof Error?_0x4c04e7[_0x25e22c(0x13d)]:String(_0x4c04e7)}),{'success':![],'message':_0x4c04e7 instanceof Error?_0x4c04e7[_0x25e22c(0x13d)]:String(_0x4c04e7)};}}export function showOtherMcpGuide(_0x407bba){const _0x20a1f7=a63_0x14b54b;try{const {appcode:_0x4d102e,env:_0x16221a}=getAppConfig(),_0x14a207=buildMcpServerConfig(_0x4d102e,_0x16221a),_0x51d850=[_0x20a1f7(0x10f)+_0x4d102e+'\x22'];_0x16221a!==_0x20a1f7(0x146)&&_0x51d850[_0x20a1f7(0x13c)](_0x20a1f7(0x123)+_0x16221a+'\x22');const _0x755ac9=[a63_0x23f79f['t']('mcp.other.configInfo',{'appcode':_0x4d102e,'env':_0x16221a}),'{',_0x20a1f7(0x133),_0x20a1f7(0x14c),'\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,',_0x20a1f7(0x14a),'\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{',..._0x51d850[_0x20a1f7(0x111)](_0x29e71f=>'\x20\x20\x20\x20\x20\x20\x20\x20'+_0x29e71f+','),_0x20a1f7(0x122),'\x20\x20\x20\x20}',_0x20a1f7(0x112),'}',a63_0x23f79f['t'](_0x20a1f7(0x118))];return logger[_0x20a1f7(0x132)](_0x20a1f7(0x141),a63_0x23f79f['t'](_0x20a1f7(0x124)),{'appcode':_0x4d102e,'env':_0x16221a}),{'success':!![],'message':_0x755ac9['join']('\x0a'),'needsManualAction':!![]};}catch(_0x36fe0a){return{'success':![],'message':_0x36fe0a instanceof Error?_0x36fe0a[_0x20a1f7(0x13d)]:String(_0x36fe0a)};}}function ensureDir(_0x2ad88d){!existsSync(_0x2ad88d)&&mkdirSync(_0x2ad88d,{'recursive':!![]});}
1
+ const a63_0x28c0b8=a63_0x19dc;function a63_0x19dc(_0x22d3d4,_0x553c0d){_0x22d3d4=_0x22d3d4-0x1be;const _0x3cca98=a63_0x3cca();let _0x19dcec=_0x3cca98[_0x22d3d4];return _0x19dcec;}(function(_0x36ba09,_0x2d09c5){const _0x3ca706=a63_0x19dc,_0xa29aac=_0x36ba09();while(!![]){try{const _0x1277a5=-parseInt(_0x3ca706(0x1dc))/0x1*(-parseInt(_0x3ca706(0x1e7))/0x2)+-parseInt(_0x3ca706(0x1c0))/0x3*(-parseInt(_0x3ca706(0x1e8))/0x4)+parseInt(_0x3ca706(0x1be))/0x5+parseInt(_0x3ca706(0x1fc))/0x6*(-parseInt(_0x3ca706(0x1f2))/0x7)+-parseInt(_0x3ca706(0x1f0))/0x8+parseInt(_0x3ca706(0x1c3))/0x9*(parseInt(_0x3ca706(0x1eb))/0xa)+parseInt(_0x3ca706(0x1e0))/0xb*(-parseInt(_0x3ca706(0x1cb))/0xc);if(_0x1277a5===_0x2d09c5)break;else _0xa29aac['push'](_0xa29aac['shift']());}catch(_0x434393){_0xa29aac['push'](_0xa29aac['shift']());}}}(a63_0x3cca,0x4a643));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getRulesContent}from'../utils/rules-cdn.js';import a63_0x53f532 from'../i18n/index.js';const __dirname=dirname(fileURLToPath(import.meta.url));export const MCP_SERVER_NAME='lovrabet-dataset';export const MCP_COMMAND=a63_0x28c0b8(0x1ca);export const MCP_ARGS=[a63_0x28c0b8(0x1e3)];export function getAppConfig(){const _0x196d1b=a63_0x28c0b8,_0xe11415=readConfig(),_0x509a69=_0xe11415[_0x196d1b(0x1d5)]||_0xe11415[_0x196d1b(0x1ec)],_0x3dbfb2=_0xe11415[_0x196d1b(0x1f5)]||_0x196d1b(0x1dd);if(!_0x509a69)throw new Error(a63_0x53f532['t'](_0x196d1b(0x1d2)));return{'appcode':String(_0x509a69),'env':_0x3dbfb2};}export function buildMcpEnv(_0x2a75d6,_0x232297){const _0xe4f6de=a63_0x28c0b8,_0x2bcf75={'LOVRABET_APP_CODE':_0x2a75d6};return _0x232297!==_0xe4f6de(0x1dd)&&(_0x2bcf75[_0xe4f6de(0x1bf)]=_0x232297),_0x2bcf75;}function a63_0x3cca(){const _0x1cf5bb=['message','mcp-cursor','mcp.other.guideShown','852240BidCLr','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','1199625nIGhyH','lovrabet_rules.mdc','mcp.cursorConfig.rules.created','env','\x0a\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20','mcp.config.env','mcp-claude','claude\x20mcp\x20add\x20','.cursor','6DdKcdb','utf8','\x20\x20}','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','2827565jfdtqr','LOVRABET_ENV','185220iSbhaK','mcp.other.configInfo','mcpServers','405171XRXiUS','mcp.cursorConfig.success','push','AppCode:\x20','mcp.claudeConfig.configInfo','\x20\x20\x20\x20}','stringify','npx','555372WLWkkg','\x22LOVRABET_ENV\x22:\x20\x22','mcp.cursorConfig.error','parse','mcp.claudeConfig.manualCommand','mcp.cursorConfig.updateExisting','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[\x22@lovrabet/dataset-mcp-server@latest\x22],','mcp.error.missingAppcode','info','error','appcode','mcp.cursorConfig.restartRequired','mcp.claudeConfig.agents.copyFailed','mcp.cursorConfig.rules.copyFailed','agents.md','join','mcp.claudeConfig.agents.exists','1qvdjKt','online','mcp-install','rules','231kqzrNN','mcp.other.configGuide','utf-8','@lovrabet/dataset-mcp-server@latest','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{','\x20\x20\x20\x20\x20\x20}','mcp.claudeConfig.agents.created','684026OVtzJr','4mqsTxq','\x20-e\x20LOVRABET_APP_CODE=','mcp.claudeConfig.restartRequired','130ZFCUlO','app'];a63_0x3cca=function(){return _0x1cf5bb;};return a63_0x3cca();}export function buildMcpServerConfig(_0x28745b,_0x54e20a){return{'command':MCP_COMMAND,'args':MCP_ARGS,'env':buildMcpEnv(_0x28745b,_0x54e20a)};}export function buildClaudeMcpCommand(_0x176af0,_0x3b660d){const _0x2db7cd=a63_0x28c0b8,_0x27322a=_0x2db7cd(0x1fa)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0x2db7cd(0x1da)]('\x20')+_0x2db7cd(0x1e9)+_0x176af0,_0xd34ec5=_0x3b660d!=='online'?'\x20-e\x20LOVRABET_ENV='+_0x3b660d:'';return''+_0x27322a+_0xd34ec5;}export async function copyCursorRules(_0x113115){const _0x5e3102=a63_0x28c0b8,_0x1c861e=join(_0x113115,_0x5e3102(0x1fb)),_0x772466=join(_0x1c861e,_0x5e3102(0x1df)),_0xfa52b7=join(_0x772466,_0x5e3102(0x1f3));if(existsSync(_0xfa52b7))return logger[_0x5e3102(0x1d3)](_0x5e3102(0x1de),a63_0x53f532['t']('mcp.cursorConfig.rules.exists'),{'path':_0xfa52b7}),![];try{ensureDir(_0x772466);const _0x952c91=await getRulesContent();return writeFileSync(_0xfa52b7,_0x952c91,_0x5e3102(0x1e2)),logger[_0x5e3102(0x1d3)](_0x5e3102(0x1de),a63_0x53f532['t'](_0x5e3102(0x1f4)),{'to':_0xfa52b7}),!![];}catch(_0x542cb2){return logger[_0x5e3102(0x1d4)](_0x5e3102(0x1de),a63_0x53f532['t'](_0x5e3102(0x1d8)),{'error':_0x542cb2 instanceof Error?_0x542cb2[_0x5e3102(0x1ed)]:String(_0x542cb2)}),![];}}export async function copyAgentsMd(_0x31acda){const _0x4ed5de=a63_0x28c0b8,_0x3a78f1=join(_0x31acda,_0x4ed5de(0x1d9));if(existsSync(_0x3a78f1))return logger[_0x4ed5de(0x1d3)]('mcp-install',a63_0x53f532['t'](_0x4ed5de(0x1db)),{'path':_0x3a78f1}),![];try{const _0x54b004=await getRulesContent();return writeFileSync(_0x3a78f1,_0x54b004,_0x4ed5de(0x1e2)),logger[_0x4ed5de(0x1d3)](_0x4ed5de(0x1de),a63_0x53f532['t'](_0x4ed5de(0x1e6)),{'to':_0x3a78f1}),!![];}catch(_0x3b320e){return logger[_0x4ed5de(0x1d4)]('mcp-install',a63_0x53f532['t'](_0x4ed5de(0x1d7)),{'error':_0x3b320e instanceof Error?_0x3b320e[_0x4ed5de(0x1ed)]:String(_0x3b320e)}),![];}}export async function configureCursorMcp(_0x1bb9c2){const _0xcd1349=a63_0x28c0b8;try{const {appcode:_0x5189d2,env:_0xabb212}=getAppConfig(),_0x27ec4b=join(_0x1bb9c2,_0xcd1349(0x1fb)),_0x2bb72f=join(_0x27ec4b,'mcp.json');ensureDir(_0x27ec4b);const _0xf43442=buildMcpServerConfig(_0x5189d2,_0xabb212);let _0x5ae0e3;if(existsSync(_0x2bb72f)){const _0x37698b=readFileSync(_0x2bb72f,_0xcd1349(0x1fd));_0x5ae0e3=JSON[_0xcd1349(0x1ce)](_0x37698b),!_0x5ae0e3[_0xcd1349(0x1c2)]&&(_0x5ae0e3[_0xcd1349(0x1c2)]={}),logger['info'](_0xcd1349(0x1ee),a63_0x53f532['t'](_0xcd1349(0x1d0)),{'path':_0x2bb72f,'appcode':_0x5189d2,'env':_0xabb212});}else _0x5ae0e3={'mcpServers':{}},logger['info']('mcp-cursor',a63_0x53f532['t']('mcp.cursorConfig.createNew'),{'path':_0x2bb72f,'appcode':_0x5189d2,'env':_0xabb212});_0x5ae0e3[_0xcd1349(0x1c2)][MCP_SERVER_NAME]=_0xf43442,writeFileSync(_0x2bb72f,JSON[_0xcd1349(0x1c9)](_0x5ae0e3,null,0x2),{'encoding':'utf8'});const _0x5da489=await copyCursorRules(_0x1bb9c2),_0x3a0d43=[a63_0x53f532['t']('mcp.cursorConfig.written'),'AppCode:\x20'+_0x5189d2];return _0xabb212!=='online'&&_0x3a0d43['push'](a63_0x53f532['t'](_0xcd1349(0x1f8),{'env':_0xabb212})),_0x3a0d43[_0xcd1349(0x1c5)](a63_0x53f532['t'](_0xcd1349(0x1d6))),_0x5da489&&_0x3a0d43[_0xcd1349(0x1c5)](a63_0x53f532['t']('mcp.cursorConfig.rules.created')),logger[_0xcd1349(0x1d3)](_0xcd1349(0x1ee),a63_0x53f532['t'](_0xcd1349(0x1c4)),{'appcode':_0x5189d2,'env':_0xabb212,'configPath':_0x2bb72f}),{'success':!![],'message':_0x3a0d43[_0xcd1349(0x1da)](_0xcd1349(0x1f6))};}catch(_0x427761){return logger[_0xcd1349(0x1d4)](_0xcd1349(0x1ee),a63_0x53f532['t'](_0xcd1349(0x1cd),{'error':_0x427761 instanceof Error?_0x427761[_0xcd1349(0x1ed)]:String(_0x427761)}),{'error':_0x427761 instanceof Error?_0x427761['message']:String(_0x427761)}),{'success':![],'message':_0x427761 instanceof Error?_0x427761[_0xcd1349(0x1ed)]:String(_0x427761)};}}export function configureClaudeMcp(_0x43b757){const _0x4be626=a63_0x28c0b8;try{const {appcode:_0x2419e,env:_0x38dde3}=getAppConfig();copyAgentsMd(_0x43b757);const _0x14f228=buildClaudeMcpCommand(_0x2419e,_0x38dde3),_0x313715=[a63_0x53f532['t'](_0x4be626(0x1cf)),''+_0x14f228,a63_0x53f532['t'](_0x4be626(0x1c7)),_0x4be626(0x1c6)+_0x2419e];return _0x38dde3!==_0x4be626(0x1dd)&&_0x313715[_0x4be626(0x1c5)](a63_0x53f532['t'](_0x4be626(0x1f8),{'env':_0x38dde3})),_0x313715['push'](a63_0x53f532['t'](_0x4be626(0x1ea))),logger['info'](_0x4be626(0x1f9),a63_0x53f532['t']('mcp.claudeConfig.commandGenerated'),{'appcode':_0x2419e,'env':_0x38dde3,'command':_0x14f228}),{'success':!![],'message':_0x313715['join'](_0x4be626(0x1f6)),'needsManualAction':!![]};}catch(_0x384971){return logger[_0x4be626(0x1d4)](_0x4be626(0x1f9),a63_0x53f532['t']('mcp.claudeConfig.error',{'error':_0x384971 instanceof Error?_0x384971[_0x4be626(0x1ed)]:String(_0x384971)}),{'error':_0x384971 instanceof Error?_0x384971[_0x4be626(0x1ed)]:String(_0x384971)}),{'success':![],'message':_0x384971 instanceof Error?_0x384971[_0x4be626(0x1ed)]:String(_0x384971)};}}export function showOtherMcpGuide(_0x17b455){const _0xc6f5ff=a63_0x28c0b8;try{const {appcode:_0x11d677,env:_0x4b68fc}=getAppConfig(),_0x756f24=buildMcpServerConfig(_0x11d677,_0x4b68fc),_0xf3a28a=['\x22LOVRABET_APP_CODE\x22:\x20\x22'+_0x11d677+'\x22'];_0x4b68fc!==_0xc6f5ff(0x1dd)&&_0xf3a28a[_0xc6f5ff(0x1c5)](_0xc6f5ff(0x1cc)+_0x4b68fc+'\x22');const _0x563943=[a63_0x53f532['t'](_0xc6f5ff(0x1c1),{'appcode':_0x11d677,'env':_0x4b68fc}),'{','\x20\x20\x22mcpServers\x22:\x20{',_0xc6f5ff(0x1e4),_0xc6f5ff(0x1f1),_0xc6f5ff(0x1d1),_0xc6f5ff(0x1ff),..._0xf3a28a['map'](_0x16f549=>_0xc6f5ff(0x1f7)+_0x16f549+','),_0xc6f5ff(0x1e5),_0xc6f5ff(0x1c8),_0xc6f5ff(0x1fe),'}',a63_0x53f532['t'](_0xc6f5ff(0x1e1))];return logger[_0xc6f5ff(0x1d3)](_0xc6f5ff(0x1de),a63_0x53f532['t'](_0xc6f5ff(0x1ef)),{'appcode':_0x11d677,'env':_0x4b68fc}),{'success':!![],'message':_0x563943[_0xc6f5ff(0x1da)]('\x0a'),'needsManualAction':!![]};}catch(_0x207243){return{'success':![],'message':_0x207243 instanceof Error?_0x207243['message']:String(_0x207243)};}}function ensureDir(_0x3ff991){!existsSync(_0x3ff991)&&mkdirSync(_0x3ff991,{'recursive':!![]});}
@@ -1 +1 @@
1
- const a64_0x21577c=a64_0x14dc;(function(_0x365297,_0x269ef4){const _0x3d75f=a64_0x14dc,_0x19c354=_0x365297();while(!![]){try{const _0x5ed6ee=parseInt(_0x3d75f(0xc1))/0x1*(-parseInt(_0x3d75f(0xb7))/0x2)+-parseInt(_0x3d75f(0xbc))/0x3+-parseInt(_0x3d75f(0xc9))/0x4*(parseInt(_0x3d75f(0xdb))/0x5)+parseInt(_0x3d75f(0xbb))/0x6*(-parseInt(_0x3d75f(0xb6))/0x7)+parseInt(_0x3d75f(0xe3))/0x8+parseInt(_0x3d75f(0xda))/0x9+parseInt(_0x3d75f(0xe5))/0xa;if(_0x5ed6ee===_0x269ef4)break;else _0x19c354['push'](_0x19c354['shift']());}catch(_0x299c1a){_0x19c354['push'](_0x19c354['shift']());}}}(a64_0x34df,0x2344b));import{jsx as a64_0xf45948,jsxs as a64_0x351ae8,Fragment as a64_0x210d38}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Text,Box,useInput,useApp}from'ink';import{writeFileSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,IDE_LIST}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{useI18n}from'../i18n/hooks.js';const __dirname=dirname(fileURLToPath(import.meta.url)),UI_IDE_LIST=IDE_LIST[a64_0x21577c(0xde)](_0x238b81=>({'key':_0x238b81,'name':IDE_CONFIGS[_0x238b81][a64_0x21577c(0xd2)],'description':IDE_CONFIGS[_0x238b81][a64_0x21577c(0xb8)]}));function a64_0x14dc(_0x4c200f,_0x3b0137){_0x4c200f=_0x4c200f-0xb4;const _0x34dfdd=a64_0x34df();let _0x14dc7d=_0x34dfdd[_0x4c200f];return _0x14dc7d;}export function SkillInstallUI({preselectedIDEs:preselectedIDEs=[],providedFlags:_0x46d524}){const _0x23a261=a64_0x21577c,{exit:_0x39efcb}=useApp(),{t:_0x55ae78}=useI18n(),[_0x1b0c98,_0x3a80ee]=useState(_0x23a261(0xce)),[_0xac7c90,_0x46ed40]=useState([]),[_0x53a305,_0x5206be]=useState([]),[_0x2c7bb1,_0x387574]=useState(0x0),_0xdb37e4=useIDESelection({'ideList':UI_IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x16998a=_0x23a261;preselectedIDEs['length']>0x0&&_0xdb37e4[_0x16998a(0xca)][_0x16998a(0xd1)]>0x0&&_0x36c44b();},[]),useInput((_0x363761,_0x365047)=>{const _0x4ebbd4=_0x23a261;if(_0x1b0c98===_0x4ebbd4(0xce)){if(_0x363761==='q'||_0x363761==='Q'){_0x39efcb();return;}if(_0x365047[_0x4ebbd4(0xc3)]){if(_0xdb37e4[_0x4ebbd4(0xca)][_0x4ebbd4(0xd1)]===0x0){_0xdb37e4[_0x4ebbd4(0xe8)](_0x55ae78(_0x4ebbd4(0xc7)));return;}_0x36c44b();return;}_0xdb37e4['handleKeyDown'](_0x363761,_0x365047);}_0x1b0c98===_0x4ebbd4(0xea)&&_0x39efcb();});async function _0x36c44b(){const _0xbf47dc=_0x23a261,_0x18f9df=_0xdb37e4[_0xbf47dc(0xbe)]();_0x5206be(_0x18f9df),_0x46ed40([{'label':_0x55ae78(_0xbf47dc(0xc0)),'value':_0x55ae78(_0xbf47dc(0xdd),{'count':_0xdb37e4[_0xbf47dc(0xca)][_0xbf47dc(0xd1)]})}]),_0x3a80ee('installing'),await _0x59954a(_0x18f9df);}async function _0x59954a(_0x29f7aa){const _0x45403d=_0x23a261,_0x50718b=process['cwd'](),_0x488dc1=resolve(__dirname,_0x45403d(0xd5));logger[_0x45403d(0xb5)](_0x50718b);const _0x5b6679=_0x46d524&&_0x46d524[_0x45403d(0xcf)]>0x0;console[_0x45403d(0xcc)](_0x5b6679?_0x55ae78(_0x45403d(0xbf)):_0x55ae78('skill.cdn.fetching'));let _0x176dd2;try{_0x176dd2=await fetchGuidesFromCDN(_0x5b6679),console[_0x45403d(0xcc)](_0x55ae78(_0x45403d(0xd3),{'count':Object[_0x45403d(0xd0)](_0x176dd2[_0x45403d(0xe6)])[_0x45403d(0xcf)]}));}catch(_0xd1029a){console[_0x45403d(0xba)](_0x55ae78(_0x45403d(0xc8),{'error':_0xd1029a instanceof Error?_0xd1029a[_0x45403d(0xcb)]:String(_0xd1029a)}));}let _0x230101=0x0;for(const _0x4c60fa of _0x29f7aa){try{const _0x594677=IDE_CONFIGS[_0x4c60fa],_0xd22eca=await installSingleIDE(_0x4c60fa,_0x594677,_0x50718b,_0x488dc1,_0x176dd2,_0x46d524);_0x230101+=_0xd22eca,_0x387574(_0x230101);}catch(_0x48598a){console[_0x45403d(0xe4)](_0x55ae78('skill.error.installFailed',{'ide':_0x4c60fa,'error':_0x48598a instanceof Error?_0x48598a[_0x45403d(0xcb)]:String(_0x48598a)}));}}_0x176dd2&&writeGuidesToProject(_0x176dd2,_0x50718b,_0x45403d(0xc6),_0x46d524);const _0x4fc786={'version':'2.0.0','installedAt':new Date()['toISOString'](),'platforms':_0x29f7aa},_0x4f4a79=join(_0x50718b,_0x45403d(0xd9)),_0x22b6e0=join(_0x50718b,'.lovrabet');await copyDir(_0x22b6e0,_0x22b6e0),writeFileSync(_0x4f4a79,JSON[_0x45403d(0xe7)](_0x4fc786,null,0x2),_0x45403d(0xe9)),logger[_0x45403d(0xc2)](_0x45403d(0xc4),_0x45403d(0xbd),{'projectRoot':_0x50718b,'ides':_0x29f7aa,'foldersCount':_0x230101}),_0x3a80ee('done'),setTimeout(()=>{_0x39efcb();},0x3e8);}return a64_0x351ae8(Box,{'flexDirection':_0x23a261(0xdf),'marginTop':0x1,'children':[_0x1b0c98===_0x23a261(0xce)&&a64_0xf45948(IDESelector,{'ideList':UI_IDE_LIST,'title':_0x55ae78(_0x23a261(0xcd)),'selection':_0xdb37e4}),_0x1b0c98===_0x23a261(0xe1)&&a64_0xf45948(InstallingStep,{'completedSteps':_0xac7c90,'installingIDEs':_0x53a305,'installedCount':_0x2c7bb1}),_0x1b0c98===_0x23a261(0xea)&&a64_0xf45948(DoneStep,{'installedCount':_0x2c7bb1})]});}function InstallingStep({completedSteps:_0x46a98a,installingIDEs:_0x43931c,installedCount:_0x2359dc}){const _0x2e24a8=a64_0x21577c,{t:_0x28fe34}=useI18n();return a64_0x351ae8(a64_0x210d38,{'children':[_0x46a98a[_0x2e24a8(0xde)]((_0x3ef264,_0x13998b)=>a64_0x351ae8(Box,{'children':[a64_0x351ae8(Text,{'color':'green','children':['√\x20',_0x3ef264[_0x2e24a8(0xd8)],':\x20']}),a64_0xf45948(Text,{'color':_0x2e24a8(0xb9),'children':_0x3ef264['value']})]},_0x13998b)),a64_0xf45948(Box,{'marginTop':0x1,'children':a64_0xf45948(Text,{'children':_0x28fe34(_0x2e24a8(0xd6))})}),_0x43931c['map'](_0x5a6e1a=>a64_0x351ae8(Box,{'children':[a64_0xf45948(Text,{'color':_0x2e24a8(0xdc),'children':_0x2e24a8(0xe2)}),a64_0xf45948(Text,{'children':IDE_CONFIGS[_0x5a6e1a]?.[_0x2e24a8(0xd2)]||_0x5a6e1a})]},_0x5a6e1a)),a64_0xf45948(Box,{'marginTop':0x1,'children':a64_0xf45948(Text,{'color':_0x2e24a8(0xd7),'children':_0x28fe34(_0x2e24a8(0xd4),{'count':_0x2359dc})})})]});}function DoneStep({installedCount:_0x463108}){const _0x3ca1f5=a64_0x21577c,{t:_0x2897f2}=useI18n();return a64_0x351ae8(a64_0x210d38,{'children':[a64_0xf45948(Box,{'children':a64_0xf45948(Text,{'color':'green','children':_0x2897f2(_0x3ca1f5(0xc5),{'count':_0x463108})})}),a64_0xf45948(Box,{'marginTop':0x1,'children':a64_0xf45948(Text,{'color':_0x3ca1f5(0xd7),'children':_0x2897f2(_0x3ca1f5(0xb4))})}),a64_0xf45948(Box,{'marginTop':0x1,'children':a64_0xf45948(Text,{'color':_0x3ca1f5(0xd7),'children':_0x2897f2(_0x3ca1f5(0xe0))})})]});}async function copyDirIfNeeded(_0x22eedd,_0x508f75){try{return await copyDir(_0x22eedd,_0x508f75),!![];}catch{return![];}}function a64_0x34df(){const _0x2bbc16=['skill.select.count','map','column','skill.done.pressAnyKey','installing','\x20✓\x20','1047880rXmAVj','error','1895480yBAqzv','guides','stringify','setErrorMsg','utf-8','done','skill.done.guidesPathInline','setLogPath','7RwCUds','50946gZevlu','description','cyan','warn','997410SKvAuC','116508JCmsMC','安装成功','getSelectedIDEs','skill.cdn.fetchingExtend','skill.select.selectedIDE','1KkiebU','info','return','skill-install','skill.done.successInline','.lovrabet/skill/.shared/guides','skill.error.selectAtLeastOne','skill.cdn.fetchFailed','612852gdArEV','selectedIndexes','message','log','skill.installing.title','selecting','length','keys','size','name','skill.cdn.fetchSuccess','skill.installing.installed','../../cdn-source/skills','skill.installing.progress','gray','label','.lovrabet/skill-manifest.json','1869147OObbfM','5PxRYLT','green'];a64_0x34df=function(){return _0x2bbc16;};return a64_0x34df();}
1
+ const a64_0x36eb1f=a64_0x3dbc;(function(_0x24bece,_0x190f1e){const _0x1d2118=a64_0x3dbc,_0x5ad2ee=_0x24bece();while(!![]){try{const _0x2cf583=-parseInt(_0x1d2118(0x1c1))/0x1+parseInt(_0x1d2118(0x19d))/0x2*(-parseInt(_0x1d2118(0x1b7))/0x3)+parseInt(_0x1d2118(0x1a8))/0x4+-parseInt(_0x1d2118(0x1bf))/0x5+-parseInt(_0x1d2118(0x1b0))/0x6+-parseInt(_0x1d2118(0x1a6))/0x7+parseInt(_0x1d2118(0x1a5))/0x8*(parseInt(_0x1d2118(0x19e))/0x9);if(_0x2cf583===_0x190f1e)break;else _0x5ad2ee['push'](_0x5ad2ee['shift']());}catch(_0x35af08){_0x5ad2ee['push'](_0x5ad2ee['shift']());}}}(a64_0x11b8,0x9117d));function a64_0x11b8(){const _0x456711=['size','skill.cdn.fetchingExtend','message','map','selecting','info','54naHPgg','25537626mGdSZx','2.0.0','selectedIndexes','gray','warn','skill.installing.installed','skill.select.selectedIDE','8obtWIX','5730438vDnelf','.lovrabet/skill-manifest.json','1015572UemSKb','return','skill.done.guidesPathInline','../../cdn-source/skills','\x20✓\x20','length','installing','skill.done.pressAnyKey','3324588juxjHB','setLogPath','log','skill.installing.title','setErrorMsg','toISOString','skill.done.successInline','39009VCNYwI','skill-install','guides','error','name','skill.cdn.fetching','skill.cdn.fetchSuccess','keys','31955PFuyPR','utf-8','766902bzoKgw','green','done','.lovrabet','cyan','skill.select.count'];a64_0x11b8=function(){return _0x456711;};return a64_0x11b8();}import{jsx as a64_0x36aafd,jsxs as a64_0x5e55a8,Fragment as a64_0x4d6ee0}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Text,Box,useInput,useApp}from'ink';import{writeFileSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,IDE_LIST}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';function a64_0x3dbc(_0x3f6a33,_0x395236){_0x3f6a33=_0x3f6a33-0x192;const _0x11b809=a64_0x11b8();let _0x3dbc03=_0x11b809[_0x3f6a33];return _0x3dbc03;}import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{useI18n}from'../i18n/hooks.js';const __dirname=dirname(fileURLToPath(import.meta.url)),UI_IDE_LIST=IDE_LIST[a64_0x36eb1f(0x19a)](_0x265a5a=>({'key':_0x265a5a,'name':IDE_CONFIGS[_0x265a5a][a64_0x36eb1f(0x1bb)],'description':IDE_CONFIGS[_0x265a5a]['description']}));export function SkillInstallUI({preselectedIDEs:preselectedIDEs=[],providedFlags:_0x143ef0}){const _0x141e64=a64_0x36eb1f,{exit:_0x58b441}=useApp(),{t:_0x1ea8d2}=useI18n(),[_0x136be4,_0x5c5b2b]=useState(_0x141e64(0x19b)),[_0x302a79,_0x17acbb]=useState([]),[_0x9475d,_0x219ec0]=useState([]),[_0x2fc810,_0x4c5b55]=useState(0x0),_0x24878e=useIDESelection({'ideList':UI_IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x2bd925=_0x141e64;preselectedIDEs[_0x2bd925(0x1ad)]>0x0&&_0x24878e['selectedIndexes'][_0x2bd925(0x197)]>0x0&&_0x3d2810();},[]),useInput((_0xa714a,_0x4bd792)=>{const _0x400d8d=_0x141e64;if(_0x136be4===_0x400d8d(0x19b)){if(_0xa714a==='q'||_0xa714a==='Q'){_0x58b441();return;}if(_0x4bd792[_0x400d8d(0x1a9)]){if(_0x24878e[_0x400d8d(0x1a0)][_0x400d8d(0x197)]===0x0){_0x24878e[_0x400d8d(0x1b4)](_0x1ea8d2('skill.error.selectAtLeastOne'));return;}_0x3d2810();return;}_0x24878e['handleKeyDown'](_0xa714a,_0x4bd792);}_0x136be4===_0x400d8d(0x193)&&_0x58b441();});async function _0x3d2810(){const _0x2f2a3f=_0x141e64,_0x3c1355=_0x24878e['getSelectedIDEs']();_0x219ec0(_0x3c1355),_0x17acbb([{'label':_0x1ea8d2(_0x2f2a3f(0x1a4)),'value':_0x1ea8d2(_0x2f2a3f(0x196),{'count':_0x24878e['selectedIndexes'][_0x2f2a3f(0x197)]})}]),_0x5c5b2b(_0x2f2a3f(0x1ae)),await _0x4ae6e1(_0x3c1355);}async function _0x4ae6e1(_0x5156e2){const _0x46d983=_0x141e64,_0x4aec39=process['cwd'](),_0x174a52=resolve(__dirname,_0x46d983(0x1ab));logger[_0x46d983(0x1b1)](_0x4aec39);const _0x88d256=_0x143ef0&&_0x143ef0['length']>0x0;console[_0x46d983(0x1b2)](_0x88d256?_0x1ea8d2(_0x46d983(0x198)):_0x1ea8d2(_0x46d983(0x1bc)));let _0x485701;try{_0x485701=await fetchGuidesFromCDN(_0x88d256),console[_0x46d983(0x1b2)](_0x1ea8d2(_0x46d983(0x1bd),{'count':Object[_0x46d983(0x1be)](_0x485701[_0x46d983(0x1b9)])[_0x46d983(0x1ad)]}));}catch(_0x7acf8f){console[_0x46d983(0x1a2)](_0x1ea8d2('skill.cdn.fetchFailed',{'error':_0x7acf8f instanceof Error?_0x7acf8f[_0x46d983(0x199)]:String(_0x7acf8f)}));}let _0x4a14bd=0x0;for(const _0x55b03c of _0x5156e2){try{const _0x1e5390=IDE_CONFIGS[_0x55b03c],_0x189df7=await installSingleIDE(_0x55b03c,_0x1e5390,_0x4aec39,_0x174a52,_0x485701,_0x143ef0);_0x4a14bd+=_0x189df7,_0x4c5b55(_0x4a14bd);}catch(_0xf9d0ad){console[_0x46d983(0x1ba)](_0x1ea8d2('skill.error.installFailed',{'ide':_0x55b03c,'error':_0xf9d0ad instanceof Error?_0xf9d0ad[_0x46d983(0x199)]:String(_0xf9d0ad)}));}}_0x485701&&writeGuidesToProject(_0x485701,_0x4aec39,'.lovrabet/skill/.shared/guides',_0x143ef0);const _0x28c30d={'version':_0x46d983(0x19f),'installedAt':new Date()[_0x46d983(0x1b5)](),'platforms':_0x5156e2},_0x15ca3a=join(_0x4aec39,_0x46d983(0x1a7)),_0x6ae277=join(_0x4aec39,_0x46d983(0x194));await copyDir(_0x6ae277,_0x6ae277),writeFileSync(_0x15ca3a,JSON['stringify'](_0x28c30d,null,0x2),_0x46d983(0x1c0)),logger[_0x46d983(0x19c)](_0x46d983(0x1b8),'安装成功',{'projectRoot':_0x4aec39,'ides':_0x5156e2,'foldersCount':_0x4a14bd}),_0x5c5b2b('done'),setTimeout(()=>{_0x58b441();},0x3e8);}return a64_0x5e55a8(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x136be4===_0x141e64(0x19b)&&a64_0x36aafd(IDESelector,{'ideList':UI_IDE_LIST,'title':_0x1ea8d2(_0x141e64(0x1b3)),'selection':_0x24878e}),_0x136be4===_0x141e64(0x1ae)&&a64_0x36aafd(InstallingStep,{'completedSteps':_0x302a79,'installingIDEs':_0x9475d,'installedCount':_0x2fc810}),_0x136be4===_0x141e64(0x193)&&a64_0x36aafd(DoneStep,{'installedCount':_0x2fc810})]});}function InstallingStep({completedSteps:_0xb6a701,installingIDEs:_0x420d0d,installedCount:_0x106096}){const _0x41879b=a64_0x36eb1f,{t:_0x179a05}=useI18n();return a64_0x5e55a8(a64_0x4d6ee0,{'children':[_0xb6a701[_0x41879b(0x19a)]((_0x3cea40,_0x58210d)=>a64_0x5e55a8(Box,{'children':[a64_0x5e55a8(Text,{'color':_0x41879b(0x192),'children':['√\x20',_0x3cea40['label'],':\x20']}),a64_0x36aafd(Text,{'color':_0x41879b(0x195),'children':_0x3cea40['value']})]},_0x58210d)),a64_0x36aafd(Box,{'marginTop':0x1,'children':a64_0x36aafd(Text,{'children':_0x179a05('skill.installing.progress')})}),_0x420d0d['map'](_0x8a6ce1=>a64_0x5e55a8(Box,{'children':[a64_0x36aafd(Text,{'color':'green','children':_0x41879b(0x1ac)}),a64_0x36aafd(Text,{'children':IDE_CONFIGS[_0x8a6ce1]?.['name']||_0x8a6ce1})]},_0x8a6ce1)),a64_0x36aafd(Box,{'marginTop':0x1,'children':a64_0x36aafd(Text,{'color':_0x41879b(0x1a1),'children':_0x179a05(_0x41879b(0x1a3),{'count':_0x106096})})})]});}function DoneStep({installedCount:_0x518b95}){const _0x425c88=a64_0x36eb1f,{t:_0x2fe0c2}=useI18n();return a64_0x5e55a8(a64_0x4d6ee0,{'children':[a64_0x36aafd(Box,{'children':a64_0x36aafd(Text,{'color':_0x425c88(0x192),'children':_0x2fe0c2(_0x425c88(0x1b6),{'count':_0x518b95})})}),a64_0x36aafd(Box,{'marginTop':0x1,'children':a64_0x36aafd(Text,{'color':'gray','children':_0x2fe0c2(_0x425c88(0x1aa))})}),a64_0x36aafd(Box,{'marginTop':0x1,'children':a64_0x36aafd(Text,{'color':_0x425c88(0x1a1),'children':_0x2fe0c2(_0x425c88(0x1af))})})]});}async function copyDirIfNeeded(_0x2c88d7,_0x32d485){try{return await copyDir(_0x2c88d7,_0x32d485),!![];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x38ecd9,_0x1683ed){const _0x1cd370=a65_0x40d4,_0xb62da7=_0x38ecd9();while(!![]){try{const _0x5c1607=-parseInt(_0x1cd370(0x201))/0x1*(-parseInt(_0x1cd370(0x1cf))/0x2)+parseInt(_0x1cd370(0x1f8))/0x3+-parseInt(_0x1cd370(0x1e9))/0x4+-parseInt(_0x1cd370(0x204))/0x5+parseInt(_0x1cd370(0x21f))/0x6+parseInt(_0x1cd370(0x1eb))/0x7+parseInt(_0x1cd370(0x1ea))/0x8;if(_0x5c1607===_0x1683ed)break;else _0xb62da7['push'](_0xb62da7['shift']());}catch(_0x4ce202){_0xb62da7['push'](_0xb62da7['shift']());}}}(a65_0x5b24,0x1e9b3));import{writeFileSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';import{createInterface}from'node:readline';import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,CORE_IDE_LIST,ALL_CORE_IDES}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import a65_0x4ab914 from'../i18n/index.js';function a65_0x40d4(_0x43e7ef,_0xfd5a42){_0x43e7ef=_0x43e7ef-0x1ce;const _0x5b243b=a65_0x5b24();let _0x40d474=_0x5b243b[_0x43e7ef];return _0x40d474;}const t=a65_0x4ab914['t']['bind'](a65_0x4ab914),__dirname=dirname(fileURLToPath(import.meta.url));export function camelCaseFlagsToKebab(_0x3ad2cb){const _0x564032=a65_0x40d4,_0x46fb80=[];for(const [_0x296062,_0x4c0888]of Object[_0x564032(0x208)](_0x3ad2cb)){if(_0x4c0888===!![]){const _0x804810=_0x296062['replace'](/([A-Z])/g,_0x564032(0x1da))[_0x564032(0x228)]();_0x46fb80[_0x564032(0x230)](_0x804810);}}return _0x46fb80;}export function parseDynamicFlags(){const _0x4de534=a65_0x40d4,_0x4c7543=[];for(let _0x196fe1=0x3;_0x196fe1<process[_0x4de534(0x1e4)][_0x4de534(0x1ce)];_0x196fe1++){const _0x4f79c4=process[_0x4de534(0x1e4)][_0x196fe1];if(_0x4f79c4&&_0x4f79c4[_0x4de534(0x22b)]('--')){const _0x504477=_0x4f79c4[_0x4de534(0x1fe)](0x2);_0x504477&&!_0x504477['includes']('=')&&_0x4c7543[_0x4de534(0x230)](_0x504477);}}return _0x4c7543;}function a65_0x5b24(){const _0x1c7f2a=['quit','\x20-\x20','toLowerCase','skill.generic','skill.help.installInteractive','startsWith','\x20\x20q.\x20','skill.select.installAll','skill.error.installFailed','exit','push','skill.errorHint.showHelp','log','toISOString','warn','--help','stringify','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20cursor\x20--dangerously-bff-save\x0a\x0a','skill.help.installDirect','skill.done.guidesPath','skill.help.allDesc','skill.select.noneSelected','length','2HIaUBI','skill.select.cancel','skill.help.supportedIDEs','skill.help.exampleDirectDesc','skill.help.exampleAllDesc','skill-install','安装成功','skill.help.afterInstallList','skill.installing.createdDir','skill.errorHint.installInteractive','\x0a\x20\x20--cursor\x20\x20\x20\x20\x20\x20\x20Cursor\x20IDE\x20(.cursorrules\x20+\x20.cursor/commands/)\x0a\x20\x20--windsurf\x20\x20\x20\x20\x20Windsurf\x20IDE\x20(.windsurf/workflows/)\x0a\x20\x20--claude\x20\x20\x20\x20\x20\x20\x20Claude\x20Code\x20(.claude/skills/)\x0a\x20\x20--cline\x20\x20\x20\x20\x20\x20\x20\x20Cline\x20IDE\x20(.cline/skills/)\x0a\x20\x20--codex\x20\x20\x20\x20\x20\x20\x20\x20Codex\x20IDE\x20(.codex/skills/)\x0a\x20\x20--opencode\x20\x20\x20\x20\x20OpenCode\x20IDE\x20(.opencode/skills/)\x0a\x20\x20--qoder\x20\x20\x20\x20\x20\x20\x20\x20Qoder\x20IDE\x20(.qoder/rules/\x20+\x20.qoder/skills/)\x0a\x20\x20--codebuddy\x20\x20\x20\x20CodeBuddy\x20IDE\x20(.codebuddy/skills/)\x0a\x20\x20--trae\x20\x20\x20\x20\x20\x20\x20\x20\x20Trae\x20IDE\x20(.trae/skills/)\x0a\x20\x20--agent\x20\x20\x20\x20\x20\x20\x20\x20','-$1','skill.help.skillContents','cwd','\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x0a','question','skill.select.title','skill.help.interactiveKeys','skill.cdn.fetchSuccess','install','skill.cdn.fetchingExtend','argv','description','skill.help.options','help','\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x0a','499272rwNymu','727832XPbfil','22008KnTCgV','\x0a\x20\x20--antigravity\x20\x20Antigravity\x20IDE\x20(.agent/skills/)\x0a\x20\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x0a\x20\x20.lovrabet/skill/.shared/guides/01-typescript-sdk/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/02-mcp-sql-workflow/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/03-antd-style/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/04-troubleshooting/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/05-api-integration/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/06-menu-management/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/07-backend-function/guide.md\x0a\x20\x20','skill.help.examples','guides','skill.help.exampleInteractive','skill.installing.createdManifest','some','skill.select.inputHint','error','stdin','skill','files','94428tNINyA','\x0a\x20\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','all','.lovrabet/skill/.shared/guides','skill.help.interactiveSelect','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20\x20#\x20','slice','skill.done.guidesLocation','skill.help.installWithBff','60184hgClYK','skill.installing.created','skill.help.directInstall','317075EaTWDH','\x0a\x20\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','skill.installing.ide','\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x0a','entries','../../cdn-source/skills','message','info','split','name','setLogPath','skill.help.installAll','skill.select.inputFormat','forEach','utf-8','skill.help.agentDesc','includes','skill.select.prompt','skill.help.exampleBffDesc','agent','skill.errorHint.installDirect','\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x0a','skill.errorHint.exampleInteractive','close','\x0a\x20\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x20\x20','folders','stdout','766878tnTvLr','\x0a\x20\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','keys','\x20\x200.\x20','skill.errorHint.exampleDirect','skill.help.afterInstall','skill.help.guidesLocationTitle'];a65_0x5b24=function(){return _0x1c7f2a;};return a65_0x5b24();}export function getAllProvidedFlags(_0xd0882d){const _0x11e0ab=camelCaseFlagsToKebab(_0xd0882d),_0x8ebfbd=parseDynamicFlags(),_0x3a2e51=new Set([..._0x11e0ab,..._0x8ebfbd]);return Array['from'](_0x3a2e51);}export async function skillsCommand(_0x3268d7,_0x5dbef6,_0x5c59d8){const _0x138ff2=a65_0x40d4;logger[_0x138ff2(0x20e)](process[_0x138ff2(0x1dc)]());if(_0x5c59d8?.[_0x138ff2(0x1e7)]||_0x3268d7===_0x138ff2(0x235)){showHelp();return;}_0x3268d7!==_0x138ff2(0x1e2)&&(console[_0x138ff2(0x1f4)](t('skill.error.unsupportedCommand',{'cmd':_0x3268d7||'(empty)'})),console[_0x138ff2(0x232)](t('skill.errorHint.availableCommands')),console[_0x138ff2(0x232)](t(_0x138ff2(0x1d8))),console[_0x138ff2(0x232)](t(_0x138ff2(0x218))),console[_0x138ff2(0x232)](t(_0x138ff2(0x231))),console['log'](t('skill.errorHint.usageExamples')),console[_0x138ff2(0x232)](t(_0x138ff2(0x21a))),console[_0x138ff2(0x232)](t(_0x138ff2(0x223))),logger['error'](_0x138ff2(0x1f6),'不支持的命令:\x20'+_0x3268d7),process[_0x138ff2(0x22f)](0x1));let _0x5c8bf2=_0x5dbef6?.[0x0];const _0x358341=getAllProvidedFlags(_0x5c59d8??{});_0x5c8bf2?.[_0x138ff2(0x22b)]('--')&&(_0x5c8bf2=undefined),await installSkill(_0x5c8bf2??_0x138ff2(0x217),_0x358341);}async function selectIDEs(){const _0xeedb16=a65_0x40d4;return console[_0xeedb16(0x232)](t(_0xeedb16(0x1df))),CORE_IDE_LIST[_0xeedb16(0x211)]((_0x11b1e2,_0x513aea)=>{const _0x25790b=_0xeedb16;console['log']('\x20\x20'+(_0x513aea+0x1)+'.\x20'+IDE_CONFIGS[_0x11b1e2]['name']+_0x25790b(0x227)+IDE_CONFIGS[_0x11b1e2][_0x25790b(0x1e5)]);}),console['log'](_0xeedb16(0x222)+t(_0xeedb16(0x22d))),console[_0xeedb16(0x232)](_0xeedb16(0x22c)+t(_0xeedb16(0x1d0))+'\x0a'),console[_0xeedb16(0x232)](t(_0xeedb16(0x210))),console[_0xeedb16(0x232)](t(_0xeedb16(0x1f3))),new Promise(_0x1de1f1=>{const _0x2c7625=_0xeedb16,_0x227f92=createInterface({'input':process[_0x2c7625(0x1f5)],'output':process[_0x2c7625(0x21e)]});_0x227f92[_0x2c7625(0x1de)](t(_0x2c7625(0x215)),_0x5e0d82=>{const _0x487453=_0x2c7625;_0x227f92[_0x487453(0x21b)]();const _0x2e7bfc=_0x5e0d82['trim']()[_0x487453(0x228)]();(_0x2e7bfc==='q'||_0x2e7bfc===_0x487453(0x226)||_0x2e7bfc===_0x487453(0x22f))&&(console['log'](t('skill.select.cancelled')),process[_0x487453(0x22f)](0x0));if(_0x2e7bfc==='0'||_0x2e7bfc===_0x487453(0x1fa)){_0x1de1f1([_0x487453(0x1fa)]);return;}const _0x455843=_0x2e7bfc[_0x487453(0x20c)](/\s+/)['filter'](Boolean),_0x18e340=[];for(const _0x559d76 of _0x455843){const _0xc7a3f0=parseInt(_0x559d76,0xa);if(!isNaN(_0xc7a3f0)&&_0xc7a3f0>=0x1&&_0xc7a3f0<=CORE_IDE_LIST[_0x487453(0x1ce)]){const _0x2bb988=CORE_IDE_LIST[_0xc7a3f0-0x1];_0x2bb988&&!_0x18e340['includes'](_0x2bb988)&&_0x18e340['push'](_0x2bb988);}}_0x18e340[_0x487453(0x1ce)]===0x0&&(console['log'](t(_0x487453(0x23b))),process[_0x487453(0x22f)](0x0)),_0x1de1f1(_0x18e340);});});}function showHelp(){const _0x3f9e5e=a65_0x40d4;console[_0x3f9e5e(0x232)]('\x0a'+t('skill.help.title')+'\x0a\x0a'+t('skill.help.usage')+'\x0a\x20\x20lovrabet\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+t('skill.help.showHelp')+_0x3f9e5e(0x220)+t(_0x3f9e5e(0x22a))+_0x3f9e5e(0x205)+t(_0x3f9e5e(0x238))+_0x3f9e5e(0x1f9)+t('skill.help.installAll')+_0x3f9e5e(0x21c)+t(_0x3f9e5e(0x200))+'\x0a\x0a'+t('skill.help.installMethods')+'\x0a'+t(_0x3f9e5e(0x1fc))+'\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x0a'+t(_0x3f9e5e(0x1e0))+'\x0a\x0a'+t(_0x3f9e5e(0x203))+'\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20'+t(_0x3f9e5e(0x238))+_0x3f9e5e(0x1fd)+t(_0x3f9e5e(0x20f))+'\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20'+t('skill.help.installAll')+'\x0a\x0a'+t('skill.help.bffWorkflow')+_0x3f9e5e(0x237)+t(_0x3f9e5e(0x1d1))+_0x3f9e5e(0x1d9)+t(_0x3f9e5e(0x213))+_0x3f9e5e(0x1ec)+t(_0x3f9e5e(0x23a))+'\x0a\x0a'+t(_0x3f9e5e(0x1e6))+'\x0a'+t('skill.help.bffOption')+'\x0a\x0a'+t(_0x3f9e5e(0x1db))+'\x0a'+t('skill.help.skillContentsList')+'\x0a\x0a'+t(_0x3f9e5e(0x1ee))+_0x3f9e5e(0x219)+t(_0x3f9e5e(0x1f0))+_0x3f9e5e(0x207)+t(_0x3f9e5e(0x1d2))+_0x3f9e5e(0x1e8)+t(_0x3f9e5e(0x216))+_0x3f9e5e(0x1dd)+t(_0x3f9e5e(0x1d3))+'\x0a\x0a'+t(_0x3f9e5e(0x224))+'\x0a'+t(_0x3f9e5e(0x1d6))+'\x0a\x0a'+t(_0x3f9e5e(0x225))+_0x3f9e5e(0x1ed));}async function installSkill(_0x3aa39e,_0x3b237d){const _0x4ed4ba=a65_0x40d4,_0xfd4d62=process[_0x4ed4ba(0x1dc)](),_0x43687c=resolve(__dirname,_0x4ed4ba(0x209));let _0x5a4a19=[];!_0x3aa39e?_0x5a4a19=await selectIDEs():_0x5a4a19=[_0x3aa39e];_0x5a4a19[_0x4ed4ba(0x214)]('all')&&(_0x5a4a19=[...ALL_CORE_IDES,_0x4ed4ba(0x217)]);const _0x5f004e=[];for(const _0x3af9c5 of _0x5a4a19){if(_0x3af9c5===_0x4ed4ba(0x217))_0x5f004e['push']('agent');else{if(_0x3af9c5===_0x4ed4ba(0x1fa))continue;else IDE_CONFIGS[_0x3af9c5]?_0x5f004e['push'](_0x3af9c5):(console[_0x4ed4ba(0x232)](t('skill.error.unknownPlatform',{'ide':_0x3af9c5})),_0x5f004e[_0x4ed4ba(0x230)](_0x4ed4ba(0x217)));}}_0x5f004e[_0x4ed4ba(0x1ce)]===0x0&&(console[_0x4ed4ba(0x232)](t('skill.error.noValidIDE')),process[_0x4ed4ba(0x22f)](0x0));const _0x5b3df5=_0x3b237d&&_0x3b237d[_0x4ed4ba(0x1ce)]>0x0;console[_0x4ed4ba(0x232)](_0x5b3df5?t(_0x4ed4ba(0x1e3)):t('skill.cdn.fetching'));let _0x337839;try{_0x337839=await fetchGuidesFromCDN(_0x5b3df5),console[_0x4ed4ba(0x232)](t(_0x4ed4ba(0x1e1),{'count':Object[_0x4ed4ba(0x221)](_0x337839[_0x4ed4ba(0x1ef)])['length']}));}catch(_0x461652){console[_0x4ed4ba(0x234)](t('skill.cdn.fetchFailed',{'error':_0x461652 instanceof Error?_0x461652[_0x4ed4ba(0x20a)]:String(_0x461652)}));}let _0x8b20a7=0x0;for(const _0x4075d4 of _0x5f004e){try{const _0x509cdf=_0x4075d4===_0x4ed4ba(0x217)?t(_0x4ed4ba(0x229)):IDE_CONFIGS[_0x4075d4]?.[_0x4ed4ba(0x20d)]||_0x4075d4;console[_0x4ed4ba(0x232)](t(_0x4ed4ba(0x206),{'name':_0x509cdf}));const _0x34f136=_0x4075d4===_0x4ed4ba(0x217)?undefined:IDE_CONFIGS[_0x4075d4],_0x26de01=await installSingleIDE(_0x4075d4,_0x34f136,_0xfd4d62,_0x43687c,_0x337839,_0x3b237d);_0x8b20a7+=_0x26de01;if(_0x34f136?.[_0x4ed4ba(0x21d)])for(const _0x27960f of _0x34f136[_0x4ed4ba(0x21d)]){const _0x11300d=_0x34f136['files']?.[_0x4ed4ba(0x1f2)](_0x549d0c=>_0x549d0c['path'][_0x4ed4ba(0x22b)](_0x27960f+'/'))??![];_0x11300d?console[_0x4ed4ba(0x232)](t(_0x4ed4ba(0x1d7),{'path':_0x27960f})):console[_0x4ed4ba(0x232)](t('skill.installing.created',{'path':_0x27960f}));}if(_0x34f136?.[_0x4ed4ba(0x1f7)])for(const _0x125297 of _0x34f136[_0x4ed4ba(0x1f7)]){console[_0x4ed4ba(0x232)](t(_0x4ed4ba(0x202),{'path':_0x125297['path']}));}}catch(_0x524004){console[_0x4ed4ba(0x1f4)](t(_0x4ed4ba(0x22e),{'ide':_0x4075d4,'error':_0x524004 instanceof Error?_0x524004[_0x4ed4ba(0x20a)]:String(_0x524004)}));}}_0x337839&&writeGuidesToProject(_0x337839,_0xfd4d62,_0x4ed4ba(0x1fb),_0x3b237d);const _0x2e22ff={'version':'2.0.0','installedAt':new Date()[_0x4ed4ba(0x233)](),'platforms':_0x5f004e},_0x45de4f=join(_0xfd4d62,'.lovrabet/skill-manifest.json'),_0x54da5b=join(_0xfd4d62,'.lovrabet');await copyDir(_0x54da5b,_0x54da5b),writeFileSync(_0x45de4f,JSON[_0x4ed4ba(0x236)](_0x2e22ff,null,0x2),_0x4ed4ba(0x212)),console[_0x4ed4ba(0x232)](t(_0x4ed4ba(0x1f1))),console[_0x4ed4ba(0x232)](t('skill.done.success',{'count':_0x8b20a7})),console['log'](t(_0x4ed4ba(0x1ff))),console[_0x4ed4ba(0x232)](t(_0x4ed4ba(0x239))),logger[_0x4ed4ba(0x20b)](_0x4ed4ba(0x1d4),_0x4ed4ba(0x1d5),{'projectRoot':_0xfd4d62,'ides':_0x5f004e,'foldersCount':_0x8b20a7});}
1
+ function a65_0x458c(_0x399e5e,_0x2274d8){_0x399e5e=_0x399e5e-0xcc;const _0x20160f=a65_0x2016();let _0x458c18=_0x20160f[_0x399e5e];return _0x458c18;}const a65_0x252c0b=a65_0x458c;(function(_0x54d9bf,_0x8d6c0b){const _0xa852d9=a65_0x458c,_0x368c09=_0x54d9bf();while(!![]){try{const _0x401b3b=-parseInt(_0xa852d9(0xf1))/0x1+-parseInt(_0xa852d9(0xd5))/0x2*(parseInt(_0xa852d9(0x11a))/0x3)+parseInt(_0xa852d9(0xd4))/0x4*(parseInt(_0xa852d9(0x13a))/0x5)+-parseInt(_0xa852d9(0x133))/0x6+parseInt(_0xa852d9(0x11b))/0x7+-parseInt(_0xa852d9(0x10a))/0x8*(-parseInt(_0xa852d9(0x127))/0x9)+-parseInt(_0xa852d9(0x13e))/0xa*(-parseInt(_0xa852d9(0xdc))/0xb);if(_0x401b3b===_0x8d6c0b)break;else _0x368c09['push'](_0x368c09['shift']());}catch(_0x10a9c2){_0x368c09['push'](_0x368c09['shift']());}}}(a65_0x2016,0xcf84a));import{writeFileSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';import{createInterface}from'node:readline';import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,CORE_IDE_LIST,ALL_CORE_IDES}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import a65_0x3aefc9 from'../i18n/index.js';const t=a65_0x3aefc9['t'][a65_0x252c0b(0xe8)](a65_0x3aefc9),__dirname=dirname(fileURLToPath(import.meta.url));export function camelCaseFlagsToKebab(_0x304a24){const _0x46419a=a65_0x252c0b,_0x42e88f=[];for(const [_0x1b1ef5,_0x582dbb]of Object[_0x46419a(0x138)](_0x304a24)){if(_0x582dbb===!![]){const _0x16388e=_0x1b1ef5[_0x46419a(0x13f)](/([A-Z])/g,'-$1')[_0x46419a(0x105)]();_0x42e88f['push'](_0x16388e);}}return _0x42e88f;}export function parseDynamicFlags(){const _0x3a533c=a65_0x252c0b,_0x54fca8=[];for(let _0x2bf905=0x3;_0x2bf905<process[_0x3a533c(0x118)][_0x3a533c(0xf0)];_0x2bf905++){const _0x247af6=process[_0x3a533c(0x118)][_0x2bf905];if(_0x247af6&&_0x247af6[_0x3a533c(0xd1)]('--')){const _0x44e77a=_0x247af6[_0x3a533c(0x137)](0x2);_0x44e77a&&!_0x44e77a['includes']('=')&&_0x54fca8['push'](_0x44e77a);}}return _0x54fca8;}export function getAllProvidedFlags(_0x57d693){const _0x1c292d=a65_0x252c0b,_0x442dfb=camelCaseFlagsToKebab(_0x57d693),_0x6fa608=parseDynamicFlags(),_0x25fe53=new Set([..._0x442dfb,..._0x6fa608]);return Array[_0x1c292d(0x126)](_0x25fe53);}export async function skillsCommand(_0x5be5d2,_0x170ade,_0x535ec2){const _0x55d55f=a65_0x252c0b;logger['setLogPath'](process[_0x55d55f(0x11f)]());if(_0x535ec2?.['help']||_0x5be5d2===_0x55d55f(0xd3)){showHelp();return;}_0x5be5d2!==_0x55d55f(0x101)&&(console[_0x55d55f(0xcd)](t(_0x55d55f(0xdb),{'cmd':_0x5be5d2||_0x55d55f(0xec)})),console[_0x55d55f(0xd2)](t(_0x55d55f(0xe6))),console[_0x55d55f(0xd2)](t('skill.errorHint.installInteractive')),console[_0x55d55f(0xd2)](t(_0x55d55f(0xfc))),console[_0x55d55f(0xd2)](t(_0x55d55f(0xf5))),console[_0x55d55f(0xd2)](t(_0x55d55f(0x131))),console[_0x55d55f(0xd2)](t(_0x55d55f(0xf3))),console[_0x55d55f(0xd2)](t('skill.errorHint.exampleDirect')),logger[_0x55d55f(0xcd)]('skill','不支持的命令:\x20'+_0x5be5d2),process[_0x55d55f(0x128)](0x1));let _0x5c2053=_0x170ade?.[0x0];const _0x46230c=getAllProvidedFlags(_0x535ec2??{});_0x5c2053?.[_0x55d55f(0xd1)]('--')&&(_0x5c2053=undefined),await installSkill(_0x5c2053??_0x55d55f(0x13b),_0x46230c);}function a65_0x2016(){const _0x210a9f=['.lovrabet/skill-manifest.json','16504fHXtWk','skill.help.installWithBff','close','skill.select.inputFormat','name','question','skill.done.success','toISOString','skill.help.supportedIDEs','skill.help.installInteractive','trim','skill.help.installDirect','skill.help.title','folders','argv','skill.cdn.fetchSuccess','5283WuVFNO','1736903ilurdb','skill.help.installMethods','skill.help.afterInstall','skill.help.guidesLocationTitle','cwd','安装成功','split','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20cursor\x20--dangerously-bff-save\x0a\x0a','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x0a','skill.help.skillContents','skill.help.afterInstallList','from','5760ShKMfP','exit','skill.cdn.fetchingExtend','skill.generic','skill.help.bffOption','keys','stringify','\x0a\x20\x20.lovrabet/skill/.shared/guides/01-typescript-sdk/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/02-mcp-sql-workflow/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/03-antd-style/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/04-troubleshooting/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/05-api-integration/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/06-menu-management/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/07-backend-function/guide.md\x0a\x20\x20','\x0a\x20\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x20\x20','\x0a\x20\x20lovrabet\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','skill.errorHint.usageExamples','skill.help.interactiveKeys','9998082DsFRkS','files','includes','../../cdn-source/skills','slice','entries','skill.installing.createdDir','5tJhyYt','agent','skill.select.inputHint','skill.cdn.fetchFailed','40VOCgKM','replace','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20\x20#\x20','error','\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x0a','all','.lovrabet','startsWith','log','--help','4151276KDEkCj','566nOtWqd','skill.help.installAll','skill.help.exampleBffDesc','skill.select.prompt','skill.installing.created','stdout','skill.error.unsupportedCommand','4347101dWCbpo','message','skill.help.showHelp','2.0.0','\x0a\x20\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','filter','skill.help.exampleDirectDesc','path','skill.done.guidesLocation','skill-install','skill.errorHint.availableCommands','skill.help.directInstall','bind','skill.help.examples','description','\x0a\x20\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(empty)','guides','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20','skill.error.noValidIDE','length','1172328QnsjXx','skill.help.exampleInteractive','skill.errorHint.exampleInteractive','\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x0a','skill.errorHint.showHelp','some','skill.select.noneSelected','skill.select.cancel','skill.done.guidesPath','\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x0a','skill.error.unknownPlatform','skill.errorHint.installDirect','skill.cdn.fetching','skill.help.agentDesc','skill.error.installFailed','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20','install','\x20\x20q.\x20','skill.select.installAll','push','toLowerCase','warn','skill.help.bffWorkflow','skill.select.cancelled'];a65_0x2016=function(){return _0x210a9f;};return a65_0x2016();}async function selectIDEs(){const _0x399590=a65_0x252c0b;return console[_0x399590(0xd2)](t('skill.select.title')),CORE_IDE_LIST['forEach']((_0x2d33e8,_0xb08512)=>{const _0x59ebd6=_0x399590;console['log']('\x20\x20'+(_0xb08512+0x1)+'.\x20'+IDE_CONFIGS[_0x2d33e8][_0x59ebd6(0x10e)]+'\x20-\x20'+IDE_CONFIGS[_0x2d33e8][_0x59ebd6(0xea)]);}),console[_0x399590(0xd2)]('\x20\x200.\x20'+t(_0x399590(0x103))),console['log'](_0x399590(0x102)+t(_0x399590(0xf8))+'\x0a'),console[_0x399590(0xd2)](t(_0x399590(0x10d))),console[_0x399590(0xd2)](t(_0x399590(0x13c))),new Promise(_0x454123=>{const _0x1e7f8c=_0x399590,_0xb75891=createInterface({'input':process['stdin'],'output':process[_0x1e7f8c(0xda)]});_0xb75891[_0x1e7f8c(0x10f)](t(_0x1e7f8c(0xd8)),_0x4eb30b=>{const _0x56f10c=_0x1e7f8c;_0xb75891[_0x56f10c(0x10c)]();const _0x501279=_0x4eb30b[_0x56f10c(0x114)]()[_0x56f10c(0x105)]();(_0x501279==='q'||_0x501279==='quit'||_0x501279===_0x56f10c(0x128))&&(console[_0x56f10c(0xd2)](t(_0x56f10c(0x108))),process['exit'](0x0));if(_0x501279==='0'||_0x501279==='all'){_0x454123(['all']);return;}const _0x558a01=_0x501279[_0x56f10c(0x121)](/\s+/)[_0x56f10c(0xe1)](Boolean),_0x12d5d7=[];for(const _0x1b6749 of _0x558a01){const _0xfb3230=parseInt(_0x1b6749,0xa);if(!isNaN(_0xfb3230)&&_0xfb3230>=0x1&&_0xfb3230<=CORE_IDE_LIST[_0x56f10c(0xf0)]){const _0x19c468=CORE_IDE_LIST[_0xfb3230-0x1];_0x19c468&&!_0x12d5d7[_0x56f10c(0x135)](_0x19c468)&&_0x12d5d7[_0x56f10c(0x104)](_0x19c468);}}_0x12d5d7[_0x56f10c(0xf0)]===0x0&&(console[_0x56f10c(0xd2)](t(_0x56f10c(0xf7))),process[_0x56f10c(0x128)](0x0)),_0x454123(_0x12d5d7);});});}function showHelp(){const _0x1229da=a65_0x252c0b;console[_0x1229da(0xd2)]('\x0a'+t(_0x1229da(0x116))+'\x0a\x0a'+t('skill.help.usage')+_0x1229da(0x130)+t(_0x1229da(0xde))+_0x1229da(0xeb)+t(_0x1229da(0x113))+_0x1229da(0xe0)+t(_0x1229da(0x115))+'\x0a\x20\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+t('skill.help.installAll')+_0x1229da(0x12f)+t(_0x1229da(0x10b))+'\x0a\x0a'+t(_0x1229da(0x11c))+'\x0a'+t('skill.help.interactiveSelect')+_0x1229da(0x123)+t(_0x1229da(0x132))+'\x0a\x0a'+t(_0x1229da(0xe7))+_0x1229da(0xee)+t(_0x1229da(0x115))+_0x1229da(0xcc)+t(_0x1229da(0xd6))+_0x1229da(0x100)+t(_0x1229da(0xd6))+'\x0a\x0a'+t(_0x1229da(0x107))+_0x1229da(0x122)+t(_0x1229da(0x112))+'\x0a\x20\x20--cursor\x20\x20\x20\x20\x20\x20\x20Cursor\x20IDE\x20(.cursorrules\x20+\x20.cursor/commands/)\x0a\x20\x20--windsurf\x20\x20\x20\x20\x20Windsurf\x20IDE\x20(.windsurf/workflows/)\x0a\x20\x20--claude\x20\x20\x20\x20\x20\x20\x20Claude\x20Code\x20(.claude/skills/)\x0a\x20\x20--cline\x20\x20\x20\x20\x20\x20\x20\x20Cline\x20IDE\x20(.cline/skills/)\x0a\x20\x20--codex\x20\x20\x20\x20\x20\x20\x20\x20Codex\x20IDE\x20(.codex/skills/)\x0a\x20\x20--opencode\x20\x20\x20\x20\x20OpenCode\x20IDE\x20(.opencode/skills/)\x0a\x20\x20--qoder\x20\x20\x20\x20\x20\x20\x20\x20Qoder\x20IDE\x20(.qoder/rules/\x20+\x20.qoder/skills/)\x0a\x20\x20--codebuddy\x20\x20\x20\x20CodeBuddy\x20IDE\x20(.codebuddy/skills/)\x0a\x20\x20--trae\x20\x20\x20\x20\x20\x20\x20\x20\x20Trae\x20IDE\x20(.trae/skills/)\x0a\x20\x20--agent\x20\x20\x20\x20\x20\x20\x20\x20'+t(_0x1229da(0xfe))+'\x0a\x20\x20--antigravity\x20\x20Antigravity\x20IDE\x20(.agent/skills/)\x0a\x20\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+t('skill.help.allDesc')+'\x0a\x0a'+t('skill.help.options')+'\x0a'+t(_0x1229da(0x12b))+'\x0a\x0a'+t(_0x1229da(0x124))+'\x0a'+t('skill.help.skillContentsList')+'\x0a\x0a'+t(_0x1229da(0xe9))+_0x1229da(0xce)+t(_0x1229da(0xf2))+_0x1229da(0xfa)+t(_0x1229da(0xe2))+_0x1229da(0xf4)+t(_0x1229da(0xd7))+'\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x0a'+t('skill.help.exampleAllDesc')+'\x0a\x0a'+t(_0x1229da(0x11d))+'\x0a'+t(_0x1229da(0x125))+'\x0a\x0a'+t(_0x1229da(0x11e))+_0x1229da(0x12e));}async function installSkill(_0x17d1dc,_0x485a42){const _0x1a9224=a65_0x252c0b,_0x59a894=process[_0x1a9224(0x11f)](),_0x1cad86=resolve(__dirname,_0x1a9224(0x136));let _0x2b8cfe=[];!_0x17d1dc?_0x2b8cfe=await selectIDEs():_0x2b8cfe=[_0x17d1dc];_0x2b8cfe[_0x1a9224(0x135)](_0x1a9224(0xcf))&&(_0x2b8cfe=[...ALL_CORE_IDES,'agent']);const _0xf4e21b=[];for(const _0x4b3dbd of _0x2b8cfe){if(_0x4b3dbd===_0x1a9224(0x13b))_0xf4e21b['push'](_0x1a9224(0x13b));else{if(_0x4b3dbd===_0x1a9224(0xcf))continue;else IDE_CONFIGS[_0x4b3dbd]?_0xf4e21b['push'](_0x4b3dbd):(console['log'](t(_0x1a9224(0xfb),{'ide':_0x4b3dbd})),_0xf4e21b[_0x1a9224(0x104)](_0x1a9224(0x13b)));}}_0xf4e21b[_0x1a9224(0xf0)]===0x0&&(console[_0x1a9224(0xd2)](t(_0x1a9224(0xef))),process[_0x1a9224(0x128)](0x0));const _0x22c4d6=_0x485a42&&_0x485a42[_0x1a9224(0xf0)]>0x0;console[_0x1a9224(0xd2)](_0x22c4d6?t(_0x1a9224(0x129)):t(_0x1a9224(0xfd)));let _0x16cf83;try{_0x16cf83=await fetchGuidesFromCDN(_0x22c4d6),console[_0x1a9224(0xd2)](t(_0x1a9224(0x119),{'count':Object[_0x1a9224(0x12c)](_0x16cf83[_0x1a9224(0xed)])[_0x1a9224(0xf0)]}));}catch(_0x48b8e0){console[_0x1a9224(0x106)](t(_0x1a9224(0x13d),{'error':_0x48b8e0 instanceof Error?_0x48b8e0[_0x1a9224(0xdd)]:String(_0x48b8e0)}));}let _0x1ad78f=0x0;for(const _0x28e468 of _0xf4e21b){try{const _0x37da53=_0x28e468===_0x1a9224(0x13b)?t(_0x1a9224(0x12a)):IDE_CONFIGS[_0x28e468]?.[_0x1a9224(0x10e)]||_0x28e468;console[_0x1a9224(0xd2)](t('skill.installing.ide',{'name':_0x37da53}));const _0x332d03=_0x28e468==='agent'?undefined:IDE_CONFIGS[_0x28e468],_0x2015b2=await installSingleIDE(_0x28e468,_0x332d03,_0x59a894,_0x1cad86,_0x16cf83,_0x485a42);_0x1ad78f+=_0x2015b2;if(_0x332d03?.[_0x1a9224(0x117)])for(const _0x22985d of _0x332d03[_0x1a9224(0x117)]){const _0x34606a=_0x332d03['files']?.[_0x1a9224(0xf6)](_0x33864d=>_0x33864d['path']['startsWith'](_0x22985d+'/'))??![];_0x34606a?console[_0x1a9224(0xd2)](t(_0x1a9224(0x139),{'path':_0x22985d})):console[_0x1a9224(0xd2)](t(_0x1a9224(0xd9),{'path':_0x22985d}));}if(_0x332d03?.[_0x1a9224(0x134)])for(const _0x52e3fb of _0x332d03[_0x1a9224(0x134)]){console[_0x1a9224(0xd2)](t(_0x1a9224(0xd9),{'path':_0x52e3fb[_0x1a9224(0xe3)]}));}}catch(_0x3b7a37){console['error'](t(_0x1a9224(0xff),{'ide':_0x28e468,'error':_0x3b7a37 instanceof Error?_0x3b7a37[_0x1a9224(0xdd)]:String(_0x3b7a37)}));}}_0x16cf83&&writeGuidesToProject(_0x16cf83,_0x59a894,'.lovrabet/skill/.shared/guides',_0x485a42);const _0x58f30c={'version':_0x1a9224(0xdf),'installedAt':new Date()[_0x1a9224(0x111)](),'platforms':_0xf4e21b},_0x185961=join(_0x59a894,_0x1a9224(0x109)),_0x38a554=join(_0x59a894,_0x1a9224(0xd0));await copyDir(_0x38a554,_0x38a554),writeFileSync(_0x185961,JSON[_0x1a9224(0x12d)](_0x58f30c,null,0x2),'utf-8'),console[_0x1a9224(0xd2)](t('skill.installing.createdManifest')),console[_0x1a9224(0xd2)](t(_0x1a9224(0x110),{'count':_0x1ad78f})),console[_0x1a9224(0xd2)](t(_0x1a9224(0xe4))),console[_0x1a9224(0xd2)](t(_0x1a9224(0xf9))),logger['info'](_0x1a9224(0xe5),_0x1a9224(0x120),{'projectRoot':_0x59a894,'ides':_0xf4e21b,'foldersCount':_0x1ad78f});}
@@ -1 +1 @@
1
- const a66_0x24223b=a66_0x391d;(function(_0x11e21b,_0x5470f8){const _0x19da7f=a66_0x391d,_0x5a4503=_0x11e21b();while(!![]){try{const _0x2a81bc=parseInt(_0x19da7f(0x75))/0x1+-parseInt(_0x19da7f(0x7e))/0x2+parseInt(_0x19da7f(0x92))/0x3*(parseInt(_0x19da7f(0x8b))/0x4)+-parseInt(_0x19da7f(0x91))/0x5*(parseInt(_0x19da7f(0x77))/0x6)+-parseInt(_0x19da7f(0x74))/0x7+parseInt(_0x19da7f(0x84))/0x8+parseInt(_0x19da7f(0x90))/0x9;if(_0x2a81bc===_0x5470f8)break;else _0x5a4503['push'](_0x5a4503['shift']());}catch(_0x3f6b5f){_0x5a4503['push'](_0x5a4503['shift']());}}}(a66_0x5507,0x1b400));import{writeFileSync,existsSync,mkdirSync}from'node:fs';function a66_0x5507(){const _0x3f1c35=['.lovrabet/skill/.shared/guides','1235384snDGUJ','info','length','skill-install-non-interactive','\x20\x20✓\x20','message','error','38848qnYYbd','../../cdn-source/skills','utf-8','log','skill.error.installFailed','1993149iJjQkt','25820IzBhLU','6VxsZcg','开始安装技能包','skill.done.guidesPathInline','cwd','skill.cdn.fetchSuccess','914970wLIWen','120409ucZKqV','.lovrabet/skill-manifest.json','102mSIhNP','skill.cdn.fetching','guides','warn','setLogPath','name','.lovrabet','371206WoHBge','keys','skill.cdn.fetchingExtend','stringify','2.0.0'];a66_0x5507=function(){return _0x3f1c35;};return a66_0x5507();}import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';import{logger}from'../utils/logger.js';function a66_0x391d(_0x401bca,_0x5ae4be){_0x401bca=_0x401bca-0x71;const _0x550796=a66_0x5507();let _0x391d88=_0x550796[_0x401bca];return _0x391d88;}import{IDE_CONFIGS}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import a66_0x25b2a8 from'../i18n/index.js';const t=a66_0x25b2a8['t']['bind'](a66_0x25b2a8),__dirname=dirname(fileURLToPath(import.meta.url));export async function installSkillsNonInteractive(_0x1b199b,_0x584468,_0x54ffe1=process[a66_0x24223b(0x72)]()){const _0x5da485=a66_0x24223b,_0x4efc26=resolve(__dirname,_0x5da485(0x8c));logger[_0x5da485(0x7b)](_0x54ffe1),logger[_0x5da485(0x85)]('skill-install-non-interactive',_0x5da485(0x93),{'ides':_0x1b199b});const _0x7269d9=join(_0x54ffe1,_0x5da485(0x7d));!existsSync(_0x7269d9)&&mkdirSync(_0x7269d9,{'recursive':!![]});const _0x556a4a=_0x584468&&_0x584468[_0x5da485(0x86)]>0x0;console['log'](_0x556a4a?t(_0x5da485(0x80)):t(_0x5da485(0x78)));let _0x286f06;try{_0x286f06=await fetchGuidesFromCDN(_0x556a4a),console['log'](t(_0x5da485(0x73),{'count':Object[_0x5da485(0x7f)](_0x286f06[_0x5da485(0x79)])[_0x5da485(0x86)]}));}catch(_0x19b408){console[_0x5da485(0x7a)](t('skill.cdn.fetchFailed',{'error':_0x19b408 instanceof Error?_0x19b408[_0x5da485(0x89)]:String(_0x19b408)}));}let _0x52751f=0x0;for(const _0xc07d10 of _0x1b199b){try{const _0x3c6611=IDE_CONFIGS[_0xc07d10];if(!_0x3c6611){console[_0x5da485(0x7a)](t('skill.error.unknownIDE',{'ide':_0xc07d10}));continue;}const _0x2e5ee5=await installSingleIDE(_0xc07d10,_0x3c6611,_0x54ffe1,_0x4efc26,_0x286f06,_0x584468);_0x52751f+=_0x2e5ee5,console[_0x5da485(0x8e)](_0x5da485(0x88)+(_0x3c6611[_0x5da485(0x7c)]||_0xc07d10));}catch(_0x36fe89){console[_0x5da485(0x8a)](t(_0x5da485(0x8f),{'ide':_0xc07d10,'error':_0x36fe89 instanceof Error?_0x36fe89[_0x5da485(0x89)]:String(_0x36fe89)}));}}_0x286f06&&writeGuidesToProject(_0x286f06,_0x54ffe1,_0x5da485(0x83),_0x584468);const _0x2bec32={'version':_0x5da485(0x82),'installedAt':new Date()['toISOString'](),'platforms':_0x1b199b},_0x1d5432=join(_0x54ffe1,_0x5da485(0x76));writeFileSync(_0x1d5432,JSON[_0x5da485(0x81)](_0x2bec32,null,0x2),_0x5da485(0x8d)),logger[_0x5da485(0x85)](_0x5da485(0x87),'安装成功',{'projectRoot':_0x54ffe1,'ides':_0x1b199b,'foldersCount':_0x52751f}),console[_0x5da485(0x8e)](t('skill.done.success',{'count':_0x52751f})),console[_0x5da485(0x8e)](t(_0x5da485(0x71)));}
1
+ const a66_0x9a1fc3=a66_0x50f6;(function(_0x2216b3,_0x3d54f6){const _0x489047=a66_0x50f6,_0x29ea7f=_0x2216b3();while(!![]){try{const _0x24710b=parseInt(_0x489047(0x1f7))/0x1+parseInt(_0x489047(0x1ea))/0x2+-parseInt(_0x489047(0x1fa))/0x3+parseInt(_0x489047(0x1e7))/0x4+-parseInt(_0x489047(0x1f6))/0x5+-parseInt(_0x489047(0x1f0))/0x6+parseInt(_0x489047(0x1f5))/0x7;if(_0x24710b===_0x3d54f6)break;else _0x29ea7f['push'](_0x29ea7f['shift']());}catch(_0x4b614f){_0x29ea7f['push'](_0x29ea7f['shift']());}}}(a66_0x4c1f,0xb7451));import{writeFileSync,existsSync,mkdirSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';function a66_0x50f6(_0x31ca09,_0x939480){_0x31ca09=_0x31ca09-0x1de;const _0x4c1f2d=a66_0x4c1f();let _0x50f6b2=_0x4c1f2d[_0x31ca09];return _0x50f6b2;}import{logger}from'../utils/logger.js';import{IDE_CONFIGS}from'../utils/ai_config.js';function a66_0x4c1f(){const _0x6666cc=['2496562lZZLKC','message','skill.error.unknownIDE','warn','skill.cdn.fetchSuccess','skill.error.installFailed','3527898zRemUj','keys','utf-8','length','\x20\x20✓\x20','6698398qSghTj','3873120NFYlHm','488479nqPCuu','toISOString','name','2847639OopHET','log','.lovrabet/skill/.shared/guides','skill.done.guidesPathInline','skill-install-non-interactive','info','bind','2.0.0','stringify','开始安装技能包','1475276Ciutgg','.lovrabet','.lovrabet/skill-manifest.json'];a66_0x4c1f=function(){return _0x6666cc;};return a66_0x4c1f();}import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import a66_0x5ab4fb from'../i18n/index.js';const t=a66_0x5ab4fb['t'][a66_0x9a1fc3(0x1e3)](a66_0x5ab4fb),__dirname=dirname(fileURLToPath(import.meta.url));export async function installSkillsNonInteractive(_0x73547a,_0x2f66c8,_0x761dc0=process['cwd']()){const _0x24207f=a66_0x9a1fc3,_0x727615=resolve(__dirname,'../../cdn-source/skills');logger['setLogPath'](_0x761dc0),logger[_0x24207f(0x1e2)](_0x24207f(0x1e1),_0x24207f(0x1e6),{'ides':_0x73547a});const _0x3bfd1e=join(_0x761dc0,_0x24207f(0x1e8));!existsSync(_0x3bfd1e)&&mkdirSync(_0x3bfd1e,{'recursive':!![]});const _0x52449a=_0x2f66c8&&_0x2f66c8[_0x24207f(0x1f3)]>0x0;console[_0x24207f(0x1de)](_0x52449a?t('skill.cdn.fetchingExtend'):t('skill.cdn.fetching'));let _0xb8c12b;try{_0xb8c12b=await fetchGuidesFromCDN(_0x52449a),console[_0x24207f(0x1de)](t(_0x24207f(0x1ee),{'count':Object[_0x24207f(0x1f1)](_0xb8c12b['guides'])[_0x24207f(0x1f3)]}));}catch(_0x2c05ef){console[_0x24207f(0x1ed)](t('skill.cdn.fetchFailed',{'error':_0x2c05ef instanceof Error?_0x2c05ef[_0x24207f(0x1eb)]:String(_0x2c05ef)}));}let _0x1eb29f=0x0;for(const _0x53f00d of _0x73547a){try{const _0x82067c=IDE_CONFIGS[_0x53f00d];if(!_0x82067c){console[_0x24207f(0x1ed)](t(_0x24207f(0x1ec),{'ide':_0x53f00d}));continue;}const _0x4f8a94=await installSingleIDE(_0x53f00d,_0x82067c,_0x761dc0,_0x727615,_0xb8c12b,_0x2f66c8);_0x1eb29f+=_0x4f8a94,console[_0x24207f(0x1de)](_0x24207f(0x1f4)+(_0x82067c[_0x24207f(0x1f9)]||_0x53f00d));}catch(_0x202e01){console['error'](t(_0x24207f(0x1ef),{'ide':_0x53f00d,'error':_0x202e01 instanceof Error?_0x202e01[_0x24207f(0x1eb)]:String(_0x202e01)}));}}_0xb8c12b&&writeGuidesToProject(_0xb8c12b,_0x761dc0,_0x24207f(0x1df),_0x2f66c8);const _0x42314c={'version':_0x24207f(0x1e4),'installedAt':new Date()[_0x24207f(0x1f8)](),'platforms':_0x73547a},_0x263c7b=join(_0x761dc0,_0x24207f(0x1e9));writeFileSync(_0x263c7b,JSON[_0x24207f(0x1e5)](_0x42314c,null,0x2),_0x24207f(0x1f2)),logger[_0x24207f(0x1e2)]('skill-install-non-interactive','安装成功',{'projectRoot':_0x761dc0,'ides':_0x73547a,'foldersCount':_0x1eb29f}),console[_0x24207f(0x1de)](t('skill.done.success',{'count':_0x1eb29f})),console[_0x24207f(0x1de)](t(_0x24207f(0x1e0)));}
@@ -1 +1 @@
1
- function a67_0xfb7d(_0x297ce7,_0x295b71){_0x297ce7=_0x297ce7-0x119;const _0x47dfd2=a67_0x47df();let _0xfb7d2f=_0x47dfd2[_0x297ce7];return _0xfb7d2f;}(function(_0x691888,_0x425c2c){const _0x2dfff0=a67_0xfb7d,_0x5cd611=_0x691888();while(!![]){try{const _0x202ef1=-parseInt(_0x2dfff0(0x134))/0x1*(parseInt(_0x2dfff0(0x125))/0x2)+parseInt(_0x2dfff0(0x126))/0x3*(parseInt(_0x2dfff0(0x124))/0x4)+-parseInt(_0x2dfff0(0x123))/0x5*(-parseInt(_0x2dfff0(0x130))/0x6)+parseInt(_0x2dfff0(0x138))/0x7*(parseInt(_0x2dfff0(0x137))/0x8)+-parseInt(_0x2dfff0(0x133))/0x9*(parseInt(_0x2dfff0(0x121))/0xa)+parseInt(_0x2dfff0(0x135))/0xb*(-parseInt(_0x2dfff0(0x12e))/0xc)+-parseInt(_0x2dfff0(0x12b))/0xd*(-parseInt(_0x2dfff0(0x122))/0xe);if(_0x202ef1===_0x425c2c)break;else _0x5cd611['push'](_0x5cd611['shift']());}catch(_0x142196){_0x5cd611['push'](_0x5cd611['shift']());}}}(a67_0x47df,0xc671c));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{dirname,join}from'node:path';import{writeSkillFile,appendExtendContents}from'../utils/guides-cdn.js';export async function installSingleIDE(_0xbab891,_0x3e2d66,_0x4de4be,_0x3f26f2,_0x5e0985,_0x4bf86f){const _0x400a5d=a67_0xfb7d;let _0x29b35a=0x0;const _0x1b76de=_0x3e2d66?.['folders']??['.'+_0xbab891];for(const _0x11c762 of _0x1b76de){const _0x4c5994=join(_0x4de4be,_0x11c762),_0x181502=_0x3e2d66?.[_0x400a5d(0x12d)]?.['some'](_0x4c31e7=>_0x4c31e7[_0x400a5d(0x11d)][_0x400a5d(0x129)](_0x11c762+'/'))??![];_0x181502?!existsSync(_0x4c5994)&&(mkdirSync(_0x4c5994,{'recursive':!![]}),_0x29b35a++):!existsSync(_0x4c5994)&&(writeFileSync(_0x4c5994,'','utf-8'),_0x29b35a++);}if(_0x3e2d66?.['files']){const _0x3e22d8=_0x3e2d66[_0x400a5d(0x11b)]||_0xbab891;for(const _0x2d1135 of _0x3e2d66[_0x400a5d(0x12d)]){const _0x3c1bcc=join(_0x4de4be,_0x2d1135[_0x400a5d(0x11d)]);await createFileFromTemplate(_0x2d1135,_0x3c1bcc,_0x3e22d8,_0x3f26f2,_0x5e0985,_0x4bf86f),_0x29b35a++;}}return _0x29b35a;}function a67_0x47df(){const _0x559a2a=['utf-8','template','guides','7949420CMRGHQ','322NoNBTk','5MJfuFW','8hLmgeU','3252OuZdDw','1547319OIvUpz','|\x20`','requireFlags','startsWith','title','151073rpQXRC','join','files','14040skxEBK','\x0a<!--\x20GUIDES_APPEND\x20-->','3819354PrIQlZ','`\x20|\x20','replace','18gIqRLJ','320qUkPHB','3113fqLHkv','some','296eAfSLH','249494EKMjKX','<!--\x20GUIDES_APPEND\x20-->','keys','SKILL.md.tpl','length','name','test','path'];a67_0x47df=function(){return _0x559a2a;};return a67_0x47df();}export async function createFileFromTemplate(_0x32a14e,_0x2393a2,_0x3e74b0,_0x34b6e3,_0x4dbeec,_0x3872da){const _0x4320c2=a67_0xfb7d,_0x4147a2=dirname(_0x2393a2);!existsSync(_0x4147a2)&&mkdirSync(_0x4147a2,{'recursive':!![]});const _0x1f57e8=_0x32a14e[_0x4320c2(0x11f)]===_0x4320c2(0x119);if(existsSync(_0x2393a2)&&!_0x1f57e8)return;if(_0x32a14e[_0x4320c2(0x11f)]){const _0x3a8cd6=join(_0x34b6e3,_0x32a14e[_0x4320c2(0x11f)]);if(existsSync(_0x3a8cd6)){let _0x156666=readFileSync(_0x3a8cd6,_0x4320c2(0x11e));_0x156666=_0x156666[_0x4320c2(0x132)](/\{\{IDE_NAME\}\}/g,_0x3e74b0);_0x4dbeec&&_0x1f57e8&&(_0x156666=insertGuidesSection(_0x156666,_0x4dbeec,_0x3872da),_0x156666=appendExtendContents(_0x156666,_0x4dbeec,_0x3872da));writeFileSync(_0x2393a2,_0x156666,'utf-8');return;}if(_0x4dbeec&&_0x1f57e8)try{writeSkillFile(_0x4dbeec,_0x2393a2,_0x3e74b0,_0x3872da);return;}catch{}}writeFileSync(_0x2393a2,'',_0x4320c2(0x11e));}function insertGuidesSection(_0x390d03,_0x1671b5,_0x187aa4){const _0x73e96e=a67_0xfb7d,_0x571662=_0x73e96e(0x139),_0x4cc038=_0x390d03['indexOf'](_0x571662);if(_0x4cc038===-0x1)return _0x390d03;const _0x2aef62=[],_0x54bdc5=Object[_0x73e96e(0x13a)](_0x1671b5[_0x73e96e(0x120)])['sort']();for(const _0x467302 of _0x54bdc5){const _0x5e3b19=_0x1671b5['guides'][_0x467302];if(!_0x5e3b19)continue;if(/^0[1-6]-/[_0x73e96e(0x11c)](_0x467302))continue;if(_0x5e3b19[_0x73e96e(0x128)]&&_0x5e3b19['requireFlags'][_0x73e96e(0x11a)]>0x0){const _0x20bbed=_0x5e3b19['requireFlags'][_0x73e96e(0x136)](_0x33e55d=>_0x187aa4?.['includes'](_0x33e55d));if(!_0x20bbed)continue;}const _0x1d104f=_0x5e3b19[_0x73e96e(0x11d)]['replace'](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x2aef62['push'](_0x73e96e(0x127)+_0x1d104f+_0x73e96e(0x131)+_0x5e3b19[_0x73e96e(0x12a)]+'\x20|');}if(_0x2aef62[_0x73e96e(0x11a)]===0x0)return _0x390d03[_0x73e96e(0x132)](_0x571662,'<!--\x20GUIDES_APPEND\x20-->');const _0x286153=_0x2aef62[_0x73e96e(0x12c)]('\x0a');return _0x390d03[_0x73e96e(0x132)](_0x571662,_0x286153+_0x73e96e(0x12f));}
1
+ (function(_0x16bf18,_0x2717b4){const _0x2435f7=a67_0x432b,_0x41e098=_0x16bf18();while(!![]){try{const _0x1f68a7=parseInt(_0x2435f7(0xb0))/0x1+parseInt(_0x2435f7(0xa2))/0x2+-parseInt(_0x2435f7(0xb4))/0x3+parseInt(_0x2435f7(0xa6))/0x4*(parseInt(_0x2435f7(0xb1))/0x5)+-parseInt(_0x2435f7(0x9d))/0x6+-parseInt(_0x2435f7(0xb6))/0x7+-parseInt(_0x2435f7(0xac))/0x8*(parseInt(_0x2435f7(0xae))/0x9);if(_0x1f68a7===_0x2717b4)break;else _0x41e098['push'](_0x41e098['shift']());}catch(_0x24227c){_0x41e098['push'](_0x41e098['shift']());}}}(a67_0x3606,0x6cf65));function a67_0x3606(){const _0x32809f=['606972AfNhoq','replace','startsWith','folders','sort','title','8puWAsW','template','1720161qOTiYv','includes','763033yJZazm','25cBAVKi','|\x20`','name','1491465CXWVUX','\x0a<!--\x20GUIDES_APPEND\x20-->','5925955RvNRAW','utf-8','guides','requireFlags','indexOf','files','<!--\x20GUIDES_APPEND\x20-->','2243940MVZgyX','push','keys','length','join','1666800uZagUE','test','path','some'];a67_0x3606=function(){return _0x32809f;};return a67_0x3606();}import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';function a67_0x432b(_0x1eb2ed,_0x28354a){_0x1eb2ed=_0x1eb2ed-0x9b;const _0x360675=a67_0x3606();let _0x432b53=_0x360675[_0x1eb2ed];return _0x432b53;}import{dirname,join}from'node:path';import{writeSkillFile,appendExtendContents}from'../utils/guides-cdn.js';export async function installSingleIDE(_0x4a9bf8,_0x1cd044,_0x397df5,_0x1021e7,_0x7895d,_0x473b2a){const _0xfd90d5=a67_0x432b;let _0x2fc06f=0x0;const _0x35e9b7=_0x1cd044?.[_0xfd90d5(0xa9)]??['.'+_0x4a9bf8];for(const _0x4fcf22 of _0x35e9b7){const _0x354dac=join(_0x397df5,_0x4fcf22),_0xc94900=_0x1cd044?.[_0xfd90d5(0x9b)]?.[_0xfd90d5(0xa5)](_0x3ffaa1=>_0x3ffaa1[_0xfd90d5(0xa4)][_0xfd90d5(0xa8)](_0x4fcf22+'/'))??![];_0xc94900?!existsSync(_0x354dac)&&(mkdirSync(_0x354dac,{'recursive':!![]}),_0x2fc06f++):!existsSync(_0x354dac)&&(writeFileSync(_0x354dac,'',_0xfd90d5(0xb7)),_0x2fc06f++);}if(_0x1cd044?.[_0xfd90d5(0x9b)]){const _0x50938b=_0x1cd044[_0xfd90d5(0xb3)]||_0x4a9bf8;for(const _0x530e25 of _0x1cd044[_0xfd90d5(0x9b)]){const _0x2f5249=join(_0x397df5,_0x530e25['path']);await createFileFromTemplate(_0x530e25,_0x2f5249,_0x50938b,_0x1021e7,_0x7895d,_0x473b2a),_0x2fc06f++;}}return _0x2fc06f;}export async function createFileFromTemplate(_0x109b98,_0x4a267c,_0x4fb381,_0x24032d,_0xfa0e68,_0x383e75){const _0x22bd5e=a67_0x432b,_0x3938bf=dirname(_0x4a267c);!existsSync(_0x3938bf)&&mkdirSync(_0x3938bf,{'recursive':!![]});const _0x1c9aae=_0x109b98[_0x22bd5e(0xad)]==='SKILL.md.tpl';if(existsSync(_0x4a267c)&&!_0x1c9aae)return;if(_0x109b98[_0x22bd5e(0xad)]){const _0x69d4c3=join(_0x24032d,_0x109b98[_0x22bd5e(0xad)]);if(existsSync(_0x69d4c3)){let _0x56b990=readFileSync(_0x69d4c3,_0x22bd5e(0xb7));_0x56b990=_0x56b990['replace'](/\{\{IDE_NAME\}\}/g,_0x4fb381);_0xfa0e68&&_0x1c9aae&&(_0x56b990=insertGuidesSection(_0x56b990,_0xfa0e68,_0x383e75),_0x56b990=appendExtendContents(_0x56b990,_0xfa0e68,_0x383e75));writeFileSync(_0x4a267c,_0x56b990,'utf-8');return;}if(_0xfa0e68&&_0x1c9aae)try{writeSkillFile(_0xfa0e68,_0x4a267c,_0x4fb381,_0x383e75);return;}catch{}}writeFileSync(_0x4a267c,'','utf-8');}function insertGuidesSection(_0x1c7101,_0x42c160,_0x5f225e){const _0x1efd2a=a67_0x432b,_0x2df87b='<!--\x20GUIDES_APPEND\x20-->',_0x295064=_0x1c7101[_0x1efd2a(0xba)](_0x2df87b);if(_0x295064===-0x1)return _0x1c7101;const _0x4ffd30=[],_0xbbc1b=Object[_0x1efd2a(0x9f)](_0x42c160[_0x1efd2a(0xb8)])[_0x1efd2a(0xaa)]();for(const _0x14ec3c of _0xbbc1b){const _0x19bc56=_0x42c160[_0x1efd2a(0xb8)][_0x14ec3c];if(!_0x19bc56)continue;if(/^0[1-6]-/[_0x1efd2a(0xa3)](_0x14ec3c))continue;if(_0x19bc56[_0x1efd2a(0xb9)]&&_0x19bc56['requireFlags'][_0x1efd2a(0xa0)]>0x0){const _0x369d0e=_0x19bc56[_0x1efd2a(0xb9)]['some'](_0x1a266d=>_0x5f225e?.[_0x1efd2a(0xaf)](_0x1a266d));if(!_0x369d0e)continue;}const _0x5586eb=_0x19bc56[_0x1efd2a(0xa4)][_0x1efd2a(0xa7)](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x4ffd30[_0x1efd2a(0x9e)](_0x1efd2a(0xb2)+_0x5586eb+'`\x20|\x20'+_0x19bc56[_0x1efd2a(0xab)]+'\x20|');}if(_0x4ffd30[_0x1efd2a(0xa0)]===0x0)return _0x1c7101[_0x1efd2a(0xa7)](_0x2df87b,_0x1efd2a(0x9c));const _0x113d9f=_0x4ffd30[_0x1efd2a(0xa1)]('\x0a');return _0x1c7101[_0x1efd2a(0xa7)](_0x2df87b,_0x113d9f+_0x1efd2a(0xb5));}
@@ -1 +1 @@
1
- function a69_0x373b(_0x2846af,_0x184d3b){_0x2846af=_0x2846af-0x1cc;const _0x2edcff=a69_0x2edc();let _0x373bb1=_0x2edcff[_0x2846af];return _0x373bb1;}(function(_0x3e728c,_0x4a29eb){const _0x40edb4=a69_0x373b,_0x55d07d=_0x3e728c();while(!![]){try{const _0x31e3b2=parseInt(_0x40edb4(0x1d0))/0x1+-parseInt(_0x40edb4(0x1d4))/0x2+parseInt(_0x40edb4(0x1db))/0x3+parseInt(_0x40edb4(0x1de))/0x4+parseInt(_0x40edb4(0x1d8))/0x5*(parseInt(_0x40edb4(0x1cf))/0x6)+parseInt(_0x40edb4(0x1d5))/0x7*(parseInt(_0x40edb4(0x1dc))/0x8)+-parseInt(_0x40edb4(0x1cd))/0x9;if(_0x31e3b2===_0x4a29eb)break;else _0x55d07d['push'](_0x55d07d['shift']());}catch(_0x4b33a2){_0x55d07d['push'](_0x55d07d['shift']());}}}(a69_0x2edc,0x857ee));import{jsxs as a69_0x3d2b19,jsx as a69_0x4d0998}from'react/jsx-runtime';import{Text,Box}from'ink';import{useI18n}from'../i18n/hooks.js';export function IDESelector({ideList:_0x357a74,title:_0x2b9285,selection:_0x3eb3b2}){const _0xd9fd79=a69_0x373b,{t:_0x27ba80}=useI18n(),{selectedIndexes:_0x362ef7,highlightIndex:_0x405c00,errorMsg:_0x17ab5a}=_0x3eb3b2;return a69_0x3d2b19(Box,{'flexDirection':'column','marginTop':0x1,'children':[a69_0x4d0998(Box,{'children':a69_0x3d2b19(Text,{'color':_0xd9fd79(0x1cc),'children':['*\x20',_0x2b9285]})}),_0x17ab5a&&a69_0x4d0998(Box,{'marginTop':0x1,'children':a69_0x3d2b19(Text,{'color':_0xd9fd79(0x1d6),'children':['✗\x20',_0x17ab5a]})}),a69_0x3d2b19(Box,{'marginTop':0x1,'flexDirection':_0xd9fd79(0x1dd),'children':[a69_0x3d2b19(Text,{'bold':!![],'children':['*\x20',_0x27ba80('ui.ideSelector.title')]}),_0x357a74[_0xd9fd79(0x1ce)]((_0x2c426f,_0x5c6a56)=>{const _0x9d1e53=_0xd9fd79,_0x325b24=_0x405c00===_0x5c6a56,_0x528952=_0x362ef7[_0x9d1e53(0x1d9)](_0x5c6a56);return a69_0x4d0998(Box,{'children':a69_0x3d2b19(Text,{'backgroundColor':_0x325b24?'blue':undefined,'color':_0x325b24?'white':undefined,'children':['\x20\x20',_0x528952?'[✓]':'[\x20]','\x20',_0x2c426f[_0x9d1e53(0x1d2)],'\x20',a69_0x3d2b19(Text,{'color':_0x325b24?_0x9d1e53(0x1d1):_0x9d1e53(0x1d3),'dimColor':!_0x325b24,'children':['-\x20',_0x2c426f['description']]})]})},_0x2c426f[_0x9d1e53(0x1d7)]);}),a69_0x4d0998(Box,{'marginTop':0x1,'children':a69_0x3d2b19(Text,{'color':'gray','children':['\x20',_0x27ba80(_0xd9fd79(0x1da))]})})]})]});}function a69_0x2edc(){const _0xb5b8f7=['map','198402vjOqIO','919294PgxTIb','white','name','gray','170652RWkyqX','1645GbKFtN','red','key','135quiBHT','has','ui.ideSelector.hotkeys','1227705BKDxBE','33208TFqkru','column','2625392JIbsLh','cyan','28989423hJsBtD'];a69_0x2edc=function(){return _0xb5b8f7;};return a69_0x2edc();}export{useIDESelection}from'./useIDESelection.js';
1
+ (function(_0x3728e2,_0x2e2abb){const _0x16c03a=a69_0x275e,_0x528d86=_0x3728e2();while(!![]){try{const _0x5a4757=parseInt(_0x16c03a(0xde))/0x1*(-parseInt(_0x16c03a(0xe9))/0x2)+parseInt(_0x16c03a(0xe7))/0x3*(-parseInt(_0x16c03a(0xe4))/0x4)+-parseInt(_0x16c03a(0xe2))/0x5+parseInt(_0x16c03a(0xed))/0x6+parseInt(_0x16c03a(0xe1))/0x7+-parseInt(_0x16c03a(0xef))/0x8*(parseInt(_0x16c03a(0xdc))/0x9)+parseInt(_0x16c03a(0xea))/0xa;if(_0x5a4757===_0x2e2abb)break;else _0x528d86['push'](_0x528d86['shift']());}catch(_0x1b0a3e){_0x528d86['push'](_0x528d86['shift']());}}}(a69_0x2d3f,0x741c5));import{jsxs as a69_0xf581b,jsx as a69_0x3e2796}from'react/jsx-runtime';import{Text,Box}from'ink';function a69_0x275e(_0x563b59,_0x217408){_0x563b59=_0x563b59-0xdc;const _0x2d3f96=a69_0x2d3f();let _0x275e39=_0x2d3f96[_0x563b59];return _0x275e39;}import{useI18n}from'../i18n/hooks.js';export function IDESelector({ideList:_0x238cb9,title:_0x43ae59,selection:_0x1e6700}){const _0x22955c=a69_0x275e,{t:_0x3bc33d}=useI18n(),{selectedIndexes:_0xa345c6,highlightIndex:_0x277aba,errorMsg:_0xd80045}=_0x1e6700;return a69_0xf581b(Box,{'flexDirection':_0x22955c(0xee),'marginTop':0x1,'children':[a69_0x3e2796(Box,{'children':a69_0xf581b(Text,{'color':_0x22955c(0xdf),'children':['*\x20',_0x43ae59]})}),_0xd80045&&a69_0x3e2796(Box,{'marginTop':0x1,'children':a69_0xf581b(Text,{'color':'red','children':['✗\x20',_0xd80045]})}),a69_0xf581b(Box,{'marginTop':0x1,'flexDirection':'column','children':[a69_0xf581b(Text,{'bold':!![],'children':['*\x20',_0x3bc33d('ui.ideSelector.title')]}),_0x238cb9[_0x22955c(0xe6)]((_0x567643,_0x1d2d04)=>{const _0x190f63=_0x22955c,_0x98f7e8=_0x277aba===_0x1d2d04,_0x11aded=_0xa345c6[_0x190f63(0xf1)](_0x1d2d04);return a69_0x3e2796(Box,{'children':a69_0xf581b(Text,{'backgroundColor':_0x98f7e8?_0x190f63(0xdd):undefined,'color':_0x98f7e8?_0x190f63(0xe8):undefined,'children':['\x20\x20',_0x11aded?_0x190f63(0xe0):_0x190f63(0xf0),'\x20',_0x567643['name'],'\x20',a69_0xf581b(Text,{'color':_0x98f7e8?_0x190f63(0xe8):_0x190f63(0xe5),'dimColor':!_0x98f7e8,'children':['-\x20',_0x567643[_0x190f63(0xeb)]]})]})},_0x567643[_0x190f63(0xec)]);}),a69_0x3e2796(Box,{'marginTop':0x1,'children':a69_0xf581b(Text,{'color':_0x22955c(0xe5),'children':['\x20',_0x3bc33d(_0x22955c(0xe3))]})})]})]});}function a69_0x2d3f(){const _0xc7f107=['22782aCOEdO','column','8euieUZ','[\x20]','has','1073178ZHzScm','blue','1uiNnar','cyan','[✓]','4629079UkXmLE','220045sytACk','ui.ideSelector.hotkeys','5732vNncOv','gray','map','1176YsKSuN','white','1108694nwViHN','10898290gIIxtj','description','key'];a69_0x2d3f=function(){return _0xc7f107;};return a69_0x2d3f();}export{useIDESelection}from'./useIDESelection.js';
@@ -1 +1 @@
1
- (function(_0x174761,_0x35c2f9){const _0xbd7944=a70_0x16f4,_0x374cf4=_0x174761();while(!![]){try{const _0x3cbe53=parseInt(_0xbd7944(0xb7))/0x1+-parseInt(_0xbd7944(0xb1))/0x2+-parseInt(_0xbd7944(0xa8))/0x3*(-parseInt(_0xbd7944(0xab))/0x4)+-parseInt(_0xbd7944(0xae))/0x5+-parseInt(_0xbd7944(0xb3))/0x6*(parseInt(_0xbd7944(0xb4))/0x7)+-parseInt(_0xbd7944(0xa5))/0x8*(-parseInt(_0xbd7944(0xb2))/0x9)+parseInt(_0xbd7944(0xa4))/0xa*(parseInt(_0xbd7944(0xa6))/0xb);if(_0x3cbe53===_0x35c2f9)break;else _0x374cf4['push'](_0x374cf4['shift']());}catch(_0x5da1fd){_0x374cf4['push'](_0x374cf4['shift']());}}}(a70_0x51cb,0xab5d1));import{useState,useCallback}from'react';function a70_0x16f4(_0x545490,_0x1b9d55){_0x545490=_0x545490-0xa3;const _0x51cb78=a70_0x51cb();let _0x16f462=_0x51cb78[_0x545490];return _0x16f462;}function a70_0x51cb(){const _0x58bc3b=['key','8lWhueZ','add','findIndex','3987415dyYDIM','size','map','2312072SmrKoW','9Xevkne','6utdxIX','1840503JQbEDc','has','upArrow','778136LaMvPx','length','90ShIwAy','9029096jJeKht','923912OyCMMA','delete','383478HtvYAD','filter'];a70_0x51cb=function(){return _0x58bc3b;};return a70_0x51cb();}export function useIDESelection({ideList:_0x39424a,preselectedIDEs:preselectedIDEs=[],multiSelect:multiSelect=!![]}){const _0x99f0b3=a70_0x16f4,[_0x1b3b38,_0x2e8abb]=useState(new Set(preselectedIDEs[_0x99f0b3(0xb0)](_0x377d2b=>_0x39424a[_0x99f0b3(0xad)](_0x1088a5=>_0x1088a5['key']===_0x377d2b))[_0x99f0b3(0xa9)](_0x3d634c=>_0x3d634c>=0x0))),[_0xcd42fb,_0x40bc42]=useState(0x0),[_0x3f136b,_0x1dd069]=useState(''),_0x34c0e9=useCallback(()=>{const _0x441f1a=_0x99f0b3;_0x40bc42(_0x39e70d=>_0x39e70d>0x0?_0x39e70d-0x1:_0x39424a[_0x441f1a(0xa3)]-0x1);},[_0x39424a['length']]),_0x18296b=useCallback(()=>{const _0x3bae6f=_0x99f0b3;_0x40bc42(_0x41f520=>_0x41f520<_0x39424a[_0x3bae6f(0xa3)]-0x1?_0x41f520+0x1:0x0);},[_0x39424a[_0x99f0b3(0xa3)]]),_0x2fc95d=useCallback(()=>{if(!multiSelect){_0x2e8abb(new Set([_0xcd42fb]));return;}_0x2e8abb(_0x45ee12=>{const _0x21b64d=a70_0x16f4,_0x24135e=new Set(_0x45ee12);return _0x24135e['has'](_0xcd42fb)?_0x24135e[_0x21b64d(0xa7)](_0xcd42fb):_0x24135e[_0x21b64d(0xac)](_0xcd42fb),_0x24135e;});},[_0xcd42fb,multiSelect]),_0x3839c2=useCallback(()=>{const _0x334d27=_0x99f0b3;_0x2e8abb(new Set(_0x39424a[_0x334d27(0xb0)]((_0x2195fc,_0x3301ea)=>_0x3301ea)));},[_0x39424a]),_0x2ceffd=useCallback(()=>{_0x2e8abb(_0x7b92ea=>{const _0x411edb=a70_0x16f4,_0x336e6b=new Set();for(let _0x3157a8=0x0;_0x3157a8<_0x39424a[_0x411edb(0xa3)];_0x3157a8++){!_0x7b92ea[_0x411edb(0xb5)](_0x3157a8)&&_0x336e6b[_0x411edb(0xac)](_0x3157a8);}return _0x336e6b;});},[_0x39424a]),_0x4adade=useCallback(()=>{const _0x384e86=_0x99f0b3;return Array['from'](_0x1b3b38)['map'](_0x24f3af=>_0x39424a[_0x24f3af]?.[_0x384e86(0xaa)])[_0x384e86(0xa9)](_0x358c9a=>_0x358c9a!==undefined);},[_0x1b3b38,_0x39424a]),_0x579a3e=useCallback(()=>{const _0x3d0416=_0x99f0b3;return _0x1b3b38[_0x3d0416(0xaf)]===_0x39424a['length'];},[_0x1b3b38,_0x39424a]),_0x3259b5=useCallback((_0x1e9dc3,_0x31101d)=>{const _0x473ca3=_0x99f0b3;if(_0x31101d[_0x473ca3(0xb6)])return _0x34c0e9(),!![];if(_0x31101d['downArrow'])return _0x18296b(),!![];if(_0x1e9dc3==='\x20')return _0x2fc95d(),!![];if(_0x1e9dc3==='a'||_0x1e9dc3==='A')return _0x3839c2(),!![];if(_0x1e9dc3==='i'||_0x1e9dc3==='I'||_0x1e9dc3==='r'||_0x1e9dc3==='R')return _0x2ceffd(),!![];return![];},[_0x34c0e9,_0x18296b,_0x2fc95d,_0x3839c2,_0x2ceffd]);return{'selectedIndexes':_0x1b3b38,'highlightIndex':_0xcd42fb,'errorMsg':_0x3f136b,'setErrorMsg':_0x1dd069,'handleKeyDown':_0x3259b5,'getSelectedIDEs':_0x4adade,'isAllSelected':_0x579a3e,'toggleSelection':_0x2fc95d,'selectAll':_0x3839c2,'invertSelection':_0x2ceffd,'moveHighlightUp':_0x34c0e9,'moveHighlightDown':_0x18296b};}
1
+ function a70_0x35c1(_0x4bfbea,_0x54db81){_0x4bfbea=_0x4bfbea-0x12d;const _0x49d69b=a70_0x49d6();let _0x35c140=_0x49d69b[_0x4bfbea];return _0x35c140;}(function(_0x4e6812,_0x4440a0){const _0x2758ff=a70_0x35c1,_0x2d6b51=_0x4e6812();while(!![]){try{const _0x63fac3=parseInt(_0x2758ff(0x134))/0x1*(-parseInt(_0x2758ff(0x132))/0x2)+parseInt(_0x2758ff(0x133))/0x3+-parseInt(_0x2758ff(0x13e))/0x4+parseInt(_0x2758ff(0x12d))/0x5+-parseInt(_0x2758ff(0x13b))/0x6+parseInt(_0x2758ff(0x139))/0x7+-parseInt(_0x2758ff(0x131))/0x8;if(_0x63fac3===_0x4440a0)break;else _0x2d6b51['push'](_0x2d6b51['shift']());}catch(_0xa3736b){_0x2d6b51['push'](_0x2d6b51['shift']());}}}(a70_0x49d6,0xc50e8));import{useState,useCallback}from'react';export function useIDESelection({ideList:_0x1e339d,preselectedIDEs:preselectedIDEs=[],multiSelect:multiSelect=!![]}){const _0x501d7f=a70_0x35c1,[_0x2d2a34,_0x47a133]=useState(new Set(preselectedIDEs['map'](_0x3d59c3=>_0x1e339d[_0x501d7f(0x140)](_0x2811c2=>_0x2811c2[_0x501d7f(0x12f)]===_0x3d59c3))[_0x501d7f(0x130)](_0x3a5655=>_0x3a5655>=0x0))),[_0x384393,_0xbb2a1f]=useState(0x0),[_0x3c476a,_0x5b7e9b]=useState(''),_0xd3daca=useCallback(()=>{_0xbb2a1f(_0x73c40f=>_0x73c40f>0x0?_0x73c40f-0x1:_0x1e339d['length']-0x1);},[_0x1e339d[_0x501d7f(0x138)]]),_0x11c30e=useCallback(()=>{_0xbb2a1f(_0x313365=>_0x313365<_0x1e339d['length']-0x1?_0x313365+0x1:0x0);},[_0x1e339d[_0x501d7f(0x138)]]),_0x1e2e91=useCallback(()=>{if(!multiSelect){_0x47a133(new Set([_0x384393]));return;}_0x47a133(_0x37a5d3=>{const _0x3e920e=a70_0x35c1,_0x244610=new Set(_0x37a5d3);return _0x244610[_0x3e920e(0x13a)](_0x384393)?_0x244610[_0x3e920e(0x13f)](_0x384393):_0x244610[_0x3e920e(0x12e)](_0x384393),_0x244610;});},[_0x384393,multiSelect]),_0x50e089=useCallback(()=>{const _0x18577b=_0x501d7f;_0x47a133(new Set(_0x1e339d[_0x18577b(0x136)]((_0x189fff,_0x4d21f3)=>_0x4d21f3)));},[_0x1e339d]),_0x28f1f4=useCallback(()=>{_0x47a133(_0x46ba55=>{const _0x1a617a=a70_0x35c1,_0x37ccd7=new Set();for(let _0x3cf883=0x0;_0x3cf883<_0x1e339d[_0x1a617a(0x138)];_0x3cf883++){!_0x46ba55[_0x1a617a(0x13a)](_0x3cf883)&&_0x37ccd7[_0x1a617a(0x12e)](_0x3cf883);}return _0x37ccd7;});},[_0x1e339d]),_0x266864=useCallback(()=>{const _0x2db634=_0x501d7f;return Array[_0x2db634(0x137)](_0x2d2a34)[_0x2db634(0x136)](_0x5e9aec=>_0x1e339d[_0x5e9aec]?.[_0x2db634(0x12f)])[_0x2db634(0x130)](_0x468ac9=>_0x468ac9!==undefined);},[_0x2d2a34,_0x1e339d]),_0x41387a=useCallback(()=>{const _0x518990=_0x501d7f;return _0x2d2a34[_0x518990(0x13d)]===_0x1e339d[_0x518990(0x138)];},[_0x2d2a34,_0x1e339d]),_0x499b00=useCallback((_0x24e366,_0x18c47d)=>{const _0x16d378=_0x501d7f;if(_0x18c47d[_0x16d378(0x135)])return _0xd3daca(),!![];if(_0x18c47d[_0x16d378(0x13c)])return _0x11c30e(),!![];if(_0x24e366==='\x20')return _0x1e2e91(),!![];if(_0x24e366==='a'||_0x24e366==='A')return _0x50e089(),!![];if(_0x24e366==='i'||_0x24e366==='I'||_0x24e366==='r'||_0x24e366==='R')return _0x28f1f4(),!![];return![];},[_0xd3daca,_0x11c30e,_0x1e2e91,_0x50e089,_0x28f1f4]);return{'selectedIndexes':_0x2d2a34,'highlightIndex':_0x384393,'errorMsg':_0x3c476a,'setErrorMsg':_0x5b7e9b,'handleKeyDown':_0x499b00,'getSelectedIDEs':_0x266864,'isAllSelected':_0x41387a,'toggleSelection':_0x1e2e91,'selectAll':_0x50e089,'invertSelection':_0x28f1f4,'moveHighlightUp':_0xd3daca,'moveHighlightDown':_0x11c30e};}function a70_0x49d6(){const _0x34ba3c=['6639860YxNioJ','add','key','filter','5142176BXYCyQ','1921072yGiydt','2611134SYcoyu','1HsobiG','upArrow','map','from','length','10775611HUXbVX','has','1246182OAvEWh','downArrow','size','4478296foSnMs','delete','findIndex'];a70_0x49d6=function(){return _0x34ba3c;};return a70_0x49d6();}