@lovrabet/cli 1.3.2-beta.1 → 1.3.3

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 (85) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/ai-setup/AISetupUI.js +1 -1
  5. package/lib/ai-setup/config.js +1 -1
  6. package/lib/api/api-doc-ui.js +1 -1
  7. package/lib/api/api-doc.js +1 -1
  8. package/lib/api/api-pull-ui.js +1 -1
  9. package/lib/api/fetch-model-list.js +1 -1
  10. package/lib/api/generate-api-file.js +1 -1
  11. package/lib/api/main.js +1 -1
  12. package/lib/api/pull-silent.js +1 -1
  13. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  14. package/lib/app-menu/create-menu.js +1 -1
  15. package/lib/app-menu/get-local-pages.js +1 -1
  16. package/lib/app-menu/get-online-menu-list.js +1 -1
  17. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  18. package/lib/app-menu/utils.js +1 -1
  19. package/lib/app-menu/valid-url.js +1 -1
  20. package/lib/app-menu-update-cdn/current-content.js +1 -1
  21. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  22. package/lib/app-menu-update-cdn/main.js +1 -1
  23. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  24. package/lib/auth/auth-server-ui.js +1 -1
  25. package/lib/auth/auth-server.js +1 -1
  26. package/lib/auth/constant.js +1 -1
  27. package/lib/auth/get-cookie.js +1 -1
  28. package/lib/auth/is-session-valid.js +1 -1
  29. package/lib/auth/logout.js +1 -1
  30. package/lib/cli-flags.js +1 -1
  31. package/lib/cli.js +1 -1
  32. package/lib/cmd/build-watch.js +1 -1
  33. package/lib/cmd/build.js +1 -1
  34. package/lib/cmd/logs.js +1 -1
  35. package/lib/cmd/preview.js +1 -1
  36. package/lib/cmd/start.js +1 -1
  37. package/lib/config/config-help.js +1 -1
  38. package/lib/config/main.js +1 -1
  39. package/lib/constant/domain.js +1 -1
  40. package/lib/constant/env.js +1 -1
  41. package/lib/create-app/enhanced-guided-create.js +1 -1
  42. package/lib/create-app/format-elapsed.js +1 -1
  43. package/lib/create-app/main.js +1 -1
  44. package/lib/create-app/non-interactive.js +1 -1
  45. package/lib/create-app/task-finished.js +1 -1
  46. package/lib/create-app/task-loading.js +1 -1
  47. package/lib/create-app/task-running.js +1 -1
  48. package/lib/create-app/task-time.js +1 -1
  49. package/lib/create-app/use-copy-project-template.js +1 -1
  50. package/lib/create-app/use-format-code.js +1 -1
  51. package/lib/create-app/use-install-dependencies.js +1 -1
  52. package/lib/help.js +1 -1
  53. package/lib/i18n/I18nProvider.js +1 -0
  54. package/lib/i18n/hooks.js +1 -0
  55. package/lib/i18n/index.js +1 -0
  56. package/lib/i18n/locales/en-US.js +1 -0
  57. package/lib/i18n/locales/zh-CN.js +1 -0
  58. package/lib/init/main.js +1 -1
  59. package/lib/mcp/McpInstallUI.js +1 -1
  60. package/lib/mcp/claude.js +1 -1
  61. package/lib/mcp/cursor.js +1 -1
  62. package/lib/mcp/main.js +1 -1
  63. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  64. package/lib/mcp/mcp-installer.js +1 -1
  65. package/lib/skills/SkillInstallUI.js +1 -1
  66. package/lib/skills/main.js +1 -1
  67. package/lib/skills/skill-install-non-interactive.js +1 -1
  68. package/lib/skills/skill-installer.js +1 -1
  69. package/lib/ui/IDESelector.js +1 -1
  70. package/lib/ui/useIDESelection.js +1 -1
  71. package/lib/utils/ai_config.js +1 -1
  72. package/lib/utils/cdn-config.js +1 -1
  73. package/lib/utils/check-sdk-version.js +1 -1
  74. package/lib/utils/cli-version-check.js +1 -1
  75. package/lib/utils/config.js +1 -1
  76. package/lib/utils/copy-directory.js +1 -1
  77. package/lib/utils/file-utils.js +1 -1
  78. package/lib/utils/guides-cdn.js +1 -1
  79. package/lib/utils/http-client.js +1 -1
  80. package/lib/utils/logger.js +1 -1
  81. package/lib/utils/router-updater.js +1 -1
  82. package/lib/utils/rules-cdn.js +1 -1
  83. package/lib/utils/sleep.js +1 -1
  84. package/lib/utils/template-replacer.js +1 -1
  85. package/package.json +3 -1
@@ -1 +1 @@
1
- (function(_0xba27e,_0xa1181b){const _0xf679d1=a63_0x27bf,_0x3d7af8=_0xba27e();while(!![]){try{const _0x2699ea=-parseInt(_0xf679d1(0x1d0))/0x1+parseInt(_0xf679d1(0x1c7))/0x2*(-parseInt(_0xf679d1(0x1d1))/0x3)+parseInt(_0xf679d1(0x1be))/0x4*(-parseInt(_0xf679d1(0x1de))/0x5)+parseInt(_0xf679d1(0x1d3))/0x6+-parseInt(_0xf679d1(0x1bd))/0x7*(parseInt(_0xf679d1(0x1cc))/0x8)+parseInt(_0xf679d1(0x1c1))/0x9+parseInt(_0xf679d1(0x1cb))/0xa;if(_0x2699ea===_0xa1181b)break;else _0x3d7af8['push'](_0x3d7af8['shift']());}catch(_0x47537d){_0x3d7af8['push'](_0x3d7af8['shift']());}}}(a63_0x49f1,0x63dbf));import{writeFileSync,existsSync,mkdirSync}from'node:fs';import{resolve,join}from'node:path';function a63_0x27bf(_0x4a27b6,_0x36c992){_0x4a27b6=_0x4a27b6-0x1b8;const _0x49f155=a63_0x49f1();let _0x27bf41=_0x49f155[_0x4a27b6];return _0x27bf41;}import{fileURLToPath}from'node:url';import{dirname}from'node:path';function a63_0x49f1(){const _0x409944=['warn','message','\x0a✓\x20技能包安装成功!共安装\x20','2imlPGv','.lovrabet/skill-manifest.json','error','toISOString','265470USlSRt','88CsCEGZ','utf-8','length','\x20\x20✓\x20','110279GTAQul','144708UemCSp','\x20个开发者指南','3486756SfDmLx','../../cdn-source/skills','setLogPath','...','skill-install-non-interactive','\x20\x20✗\x20未知的\x20IDE:\x20','开始安装技能包','log','guides','.lovrabet/skill/.shared/guides','正在从\x20CDN\x20拉取开发者指南','474645ncgIfF','✓\x20拉取\x20','2.0.0','.lovrabet','安装成功','info','217112hpGziH','4gnsmlI','\x20个目录','keys','3563730RKgbuH','name','\x20失败:\x20'];a63_0x49f1=function(){return _0x409944;};return a63_0x49f1();}import{logger}from'../utils/logger.js';import{IDE_CONFIGS}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';const __dirname=dirname(fileURLToPath(import.meta.url));export async function installSkillsNonInteractive(_0x320e71,_0x56166d,_0x57c4b7=process['cwd']()){const _0x4856ef=a63_0x27bf,_0x6e7fc9=resolve(__dirname,_0x4856ef(0x1d4));logger[_0x4856ef(0x1d5)](_0x57c4b7),logger[_0x4856ef(0x1bc)](_0x4856ef(0x1d7),_0x4856ef(0x1d9),{'ides':_0x320e71});const _0x6b7e5d=join(_0x57c4b7,_0x4856ef(0x1ba));!existsSync(_0x6b7e5d)&&mkdirSync(_0x6b7e5d,{'recursive':!![]});const _0x54f824=_0x56166d&&_0x56166d[_0x4856ef(0x1ce)]>0x0;console[_0x4856ef(0x1da)](_0x4856ef(0x1dd)+(_0x54f824?'(含扩展)':'')+_0x4856ef(0x1d6));let _0x1a380b;try{_0x1a380b=await fetchGuidesFromCDN(_0x54f824),console[_0x4856ef(0x1da)](_0x4856ef(0x1b8)+Object[_0x4856ef(0x1c0)](_0x1a380b[_0x4856ef(0x1db)])[_0x4856ef(0x1ce)]+_0x4856ef(0x1d2));}catch(_0x4cd8ec){console[_0x4856ef(0x1c4)]('\x20\x20!\x20CDN\x20拉取失败,跳过指南安装:\x20'+(_0x4cd8ec instanceof Error?_0x4cd8ec[_0x4856ef(0x1c5)]:String(_0x4cd8ec)));}let _0x614edd=0x0;for(const _0x3b2de8 of _0x320e71){try{const _0x3b83b0=IDE_CONFIGS[_0x3b2de8];if(!_0x3b83b0){console[_0x4856ef(0x1c4)](_0x4856ef(0x1d8)+_0x3b2de8);continue;}const _0xbca1b6=await installSingleIDE(_0x3b2de8,_0x3b83b0,_0x57c4b7,_0x6e7fc9,_0x1a380b,_0x56166d);_0x614edd+=_0xbca1b6,console['log'](_0x4856ef(0x1cf)+(_0x3b83b0[_0x4856ef(0x1c2)]||_0x3b2de8));}catch(_0x3494ae){console[_0x4856ef(0x1c9)]('\x20\x20✗\x20安装\x20'+_0x3b2de8+_0x4856ef(0x1c3)+(_0x3494ae instanceof Error?_0x3494ae[_0x4856ef(0x1c5)]:String(_0x3494ae)));}}_0x1a380b&&writeGuidesToProject(_0x1a380b,_0x57c4b7,_0x4856ef(0x1dc),_0x56166d);const _0x481e8d={'version':_0x4856ef(0x1b9),'installedAt':new Date()[_0x4856ef(0x1ca)](),'platforms':_0x320e71},_0x44d6fa=join(_0x57c4b7,_0x4856ef(0x1c8));writeFileSync(_0x44d6fa,JSON['stringify'](_0x481e8d,null,0x2),_0x4856ef(0x1cd)),logger[_0x4856ef(0x1bc)](_0x4856ef(0x1d7),_0x4856ef(0x1bb),{'projectRoot':_0x57c4b7,'ides':_0x320e71,'foldersCount':_0x614edd}),console[_0x4856ef(0x1da)](_0x4856ef(0x1c6)+_0x614edd+_0x4856ef(0x1bf)),console[_0x4856ef(0x1da)]('开发者指南位置:\x20.lovrabet/skill/.shared/guides/');}
1
+ const a68_0x14b76b=a68_0x2ee9;(function(_0x1e1f0b,_0x260229){const _0x14bc51=a68_0x2ee9,_0x181c3c=_0x1e1f0b();while(!![]){try{const _0x4a10=-parseInt(_0x14bc51(0x97))/0x1+-parseInt(_0x14bc51(0x91))/0x2*(-parseInt(_0x14bc51(0x8d))/0x3)+-parseInt(_0x14bc51(0x8a))/0x4*(parseInt(_0x14bc51(0x8b))/0x5)+parseInt(_0x14bc51(0x99))/0x6*(parseInt(_0x14bc51(0x7d))/0x7)+-parseInt(_0x14bc51(0x7f))/0x8*(-parseInt(_0x14bc51(0x81))/0x9)+-parseInt(_0x14bc51(0x77))/0xa*(-parseInt(_0x14bc51(0x98))/0xb)+-parseInt(_0x14bc51(0x89))/0xc;if(_0x4a10===_0x260229)break;else _0x181c3c['push'](_0x181c3c['shift']());}catch(_0x5138cf){_0x181c3c['push'](_0x181c3c['shift']());}}}(a68_0xc2f6,0x45905));import{writeFileSync,existsSync,mkdirSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';function a68_0xc2f6(){const _0x3c2cf8=['../../cdn-source/skills','skill.cdn.fetchFailed','keys','guides','.lovrabet/skill-manifest.json','191290LtFmqV','3043931kyAFlI','202854hhdNmX','toISOString','log','setLogPath','2.0.0','10ZYotdn','skill.cdn.fetchSuccess','length','开始安装技能包','安装成功','info','14lBaVFE','skill.error.unknownIDE','1950632cIuvVd','error','18rzATSI','skill-install-non-interactive','name','skill.done.guidesPathInline','.lovrabet/skill/.shared/guides','\x20\x20✓\x20','.lovrabet','bind','9119484zAojoy','463724lnbhwO','5dgPcja','skill.cdn.fetchingExtend','4074jkFvhb','utf-8','stringify','skill.error.installFailed','766YGRLee'];a68_0xc2f6=function(){return _0x3c2cf8;};return a68_0xc2f6();}import{logger}from'../utils/logger.js';import{IDE_CONFIGS}from'../utils/ai_config.js';function a68_0x2ee9(_0x5846bf,_0x55400e){_0x5846bf=_0x5846bf-0x76;const _0xc2f611=a68_0xc2f6();let _0x2ee9ca=_0xc2f611[_0x5846bf];return _0x2ee9ca;}import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import a68_0x1a3fc4 from'../i18n/index.js';const t=a68_0x1a3fc4['t'][a68_0x14b76b(0x88)](a68_0x1a3fc4),__dirname=dirname(fileURLToPath(import.meta.url));export async function installSkillsNonInteractive(_0x29f00d,_0x19b87f,_0x5a1fa3=process['cwd']()){const _0x581c75=a68_0x14b76b,_0x4c8fac=resolve(__dirname,_0x581c75(0x92));logger[_0x581c75(0x9c)](_0x5a1fa3),logger[_0x581c75(0x7c)](_0x581c75(0x82),_0x581c75(0x7a),{'ides':_0x29f00d});const _0x5b34a0=join(_0x5a1fa3,_0x581c75(0x87));!existsSync(_0x5b34a0)&&mkdirSync(_0x5b34a0,{'recursive':!![]});const _0x1c8ab7=_0x19b87f&&_0x19b87f[_0x581c75(0x79)]>0x0;console[_0x581c75(0x9b)](_0x1c8ab7?t(_0x581c75(0x8c)):t('skill.cdn.fetching'));let _0x54788f;try{_0x54788f=await fetchGuidesFromCDN(_0x1c8ab7),console['log'](t(_0x581c75(0x78),{'count':Object[_0x581c75(0x94)](_0x54788f[_0x581c75(0x95)])[_0x581c75(0x79)]}));}catch(_0x5b1eae){console['warn'](t(_0x581c75(0x93),{'error':_0x5b1eae instanceof Error?_0x5b1eae['message']:String(_0x5b1eae)}));}let _0xde99e2=0x0;for(const _0xb955a2 of _0x29f00d){try{const _0x454de9=IDE_CONFIGS[_0xb955a2];if(!_0x454de9){console['warn'](t(_0x581c75(0x7e),{'ide':_0xb955a2}));continue;}const _0x38041d=await installSingleIDE(_0xb955a2,_0x454de9,_0x5a1fa3,_0x4c8fac,_0x54788f,_0x19b87f);_0xde99e2+=_0x38041d,console[_0x581c75(0x9b)](_0x581c75(0x86)+(_0x454de9[_0x581c75(0x83)]||_0xb955a2));}catch(_0x3d6f63){console[_0x581c75(0x80)](t(_0x581c75(0x90),{'ide':_0xb955a2,'error':_0x3d6f63 instanceof Error?_0x3d6f63['message']:String(_0x3d6f63)}));}}_0x54788f&&writeGuidesToProject(_0x54788f,_0x5a1fa3,_0x581c75(0x85),_0x19b87f);const _0x4c65ca={'version':_0x581c75(0x76),'installedAt':new Date()[_0x581c75(0x9a)](),'platforms':_0x29f00d},_0x179005=join(_0x5a1fa3,_0x581c75(0x96));writeFileSync(_0x179005,JSON[_0x581c75(0x8f)](_0x4c65ca,null,0x2),_0x581c75(0x8e)),logger[_0x581c75(0x7c)]('skill-install-non-interactive',_0x581c75(0x7b),{'projectRoot':_0x5a1fa3,'ides':_0x29f00d,'foldersCount':_0xde99e2}),console[_0x581c75(0x9b)](t('skill.done.success',{'count':_0xde99e2})),console[_0x581c75(0x9b)](t(_0x581c75(0x84)));}
@@ -1 +1 @@
1
- function a64_0x2972(_0x46a7c4,_0x5f3def){_0x46a7c4=_0x46a7c4-0x1ba;const _0x49f4fd=a64_0x49f4();let _0x2972a2=_0x49f4fd[_0x46a7c4];return _0x2972a2;}(function(_0x4928a5,_0x3b02f1){const _0x585e9e=a64_0x2972,_0x5bb854=_0x4928a5();while(!![]){try{const _0x3b7a3a=parseInt(_0x585e9e(0x1c7))/0x1+-parseInt(_0x585e9e(0x1d6))/0x2+-parseInt(_0x585e9e(0x1cf))/0x3*(-parseInt(_0x585e9e(0x1c1))/0x4)+parseInt(_0x585e9e(0x1da))/0x5*(-parseInt(_0x585e9e(0x1c4))/0x6)+parseInt(_0x585e9e(0x1c9))/0x7*(-parseInt(_0x585e9e(0x1cd))/0x8)+parseInt(_0x585e9e(0x1c5))/0x9*(-parseInt(_0x585e9e(0x1c8))/0xa)+parseInt(_0x585e9e(0x1d0))/0xb;if(_0x3b7a3a===_0x3b02f1)break;else _0x5bb854['push'](_0x5bb854['shift']());}catch(_0x325c66){_0x5bb854['push'](_0x5bb854['shift']());}}}(a64_0x49f4,0xc3a37));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(_0x46c198,_0x1ec7b9,_0x2417d1,_0x205c4f,_0xa561a1,_0x4a1f4c){const _0x1c5463=a64_0x2972;let _0x8a2ec2=0x0;const _0x4bf24e=_0x1ec7b9?.[_0x1c5463(0x1d9)]??['.'+_0x46c198];for(const _0x3b3f50 of _0x4bf24e){const _0x5717db=join(_0x2417d1,_0x3b3f50),_0x4980f5=_0x1ec7b9?.[_0x1c5463(0x1d8)]?.[_0x1c5463(0x1bc)](_0x1e16e9=>_0x1e16e9[_0x1c5463(0x1d1)][_0x1c5463(0x1ce)](_0x3b3f50+'/'))??![];_0x4980f5?!existsSync(_0x5717db)&&(mkdirSync(_0x5717db,{'recursive':!![]}),_0x8a2ec2++):!existsSync(_0x5717db)&&(writeFileSync(_0x5717db,'',_0x1c5463(0x1ba)),_0x8a2ec2++);}if(_0x1ec7b9?.['files']){const _0x5c12cc=_0x1ec7b9[_0x1c5463(0x1cb)]||_0x46c198;for(const _0x41a27d of _0x1ec7b9[_0x1c5463(0x1d8)]){const _0x10f8ad=join(_0x2417d1,_0x41a27d[_0x1c5463(0x1d1)]);await createFileFromTemplate(_0x41a27d,_0x10f8ad,_0x5c12cc,_0x205c4f,_0xa561a1,_0x4a1f4c),_0x8a2ec2++;}}return _0x8a2ec2;}export async function createFileFromTemplate(_0x2577d0,_0x5c78eb,_0x3169a7,_0x6ef4f9,_0x2a02b7,_0xcc5a23){const _0x1c0ca2=a64_0x2972,_0x539139=dirname(_0x5c78eb);!existsSync(_0x539139)&&mkdirSync(_0x539139,{'recursive':!![]});const _0x4af5e0=_0x2577d0['template']===_0x1c0ca2(0x1d4);if(existsSync(_0x5c78eb)&&!_0x4af5e0)return;if(_0x2577d0[_0x1c0ca2(0x1d3)]){const _0x107cd3=join(_0x6ef4f9,_0x2577d0[_0x1c0ca2(0x1d3)]);if(existsSync(_0x107cd3)){let _0x533bfa=readFileSync(_0x107cd3,_0x1c0ca2(0x1ba));_0x533bfa=_0x533bfa[_0x1c0ca2(0x1c3)](/\{\{IDE_NAME\}\}/g,_0x3169a7);_0x2a02b7&&_0x4af5e0&&(_0x533bfa=insertGuidesSection(_0x533bfa,_0x2a02b7,_0xcc5a23),_0x533bfa=appendExtendContents(_0x533bfa,_0x2a02b7,_0xcc5a23));writeFileSync(_0x5c78eb,_0x533bfa,_0x1c0ca2(0x1ba));return;}if(_0x2a02b7&&_0x4af5e0)try{writeSkillFile(_0x2a02b7,_0x5c78eb,_0x3169a7,_0xcc5a23);return;}catch{}}writeFileSync(_0x5c78eb,'',_0x1c0ca2(0x1ba));}function a64_0x49f4(){const _0x47aed0=['SKILL.md.tpl','<!--\x20GUIDES_APPEND\x20-->','1759310bASxXu','length','files','folders','93645HDRNef','utf-8','|\x20`','some','\x0a<!--\x20GUIDES_APPEND\x20-->','test','indexOf','`\x20|\x20','200NPizhN','guides','replace','18qGEgpQ','237078STuDIN','requireFlags','1062658NaeJTP','130piEGRK','49nuMqNz','push','name','includes','1159976IMOeUh','startsWith','59061Midavf','11523534IOrZXw','path','keys','template'];a64_0x49f4=function(){return _0x47aed0;};return a64_0x49f4();}function insertGuidesSection(_0x2b5fda,_0x6d0d36,_0x33e698){const _0x35e9d2=a64_0x2972,_0x57af78=_0x35e9d2(0x1d5),_0x33b8ce=_0x2b5fda[_0x35e9d2(0x1bf)](_0x57af78);if(_0x33b8ce===-0x1)return _0x2b5fda;const _0x5efb77=[],_0x1c2957=Object[_0x35e9d2(0x1d2)](_0x6d0d36['guides'])['sort']();for(const _0x149133 of _0x1c2957){const _0x2d976a=_0x6d0d36[_0x35e9d2(0x1c2)][_0x149133];if(!_0x2d976a)continue;if(/^0[1-6]-/[_0x35e9d2(0x1be)](_0x149133))continue;if(_0x2d976a[_0x35e9d2(0x1c6)]&&_0x2d976a['requireFlags'][_0x35e9d2(0x1d7)]>0x0){const _0x33e4f0=_0x2d976a['requireFlags'][_0x35e9d2(0x1bc)](_0x5e19d4=>_0x33e698?.[_0x35e9d2(0x1cc)](_0x5e19d4));if(!_0x33e4f0)continue;}const _0x309ec0=_0x2d976a['path'][_0x35e9d2(0x1c3)](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x5efb77[_0x35e9d2(0x1ca)](_0x35e9d2(0x1bb)+_0x309ec0+_0x35e9d2(0x1c0)+_0x2d976a['title']+'\x20|');}if(_0x5efb77[_0x35e9d2(0x1d7)]===0x0)return _0x2b5fda[_0x35e9d2(0x1c3)](_0x57af78,_0x35e9d2(0x1d5));const _0x24ad27=_0x5efb77['join']('\x0a');return _0x2b5fda['replace'](_0x57af78,_0x24ad27+_0x35e9d2(0x1bd));}
1
+ (function(_0x24bb5a,_0x21570f){const _0x7b6e72=a69_0x3127,_0x16e877=_0x24bb5a();while(!![]){try{const _0x4c2e29=-parseInt(_0x7b6e72(0x96))/0x1+-parseInt(_0x7b6e72(0x94))/0x2*(parseInt(_0x7b6e72(0x95))/0x3)+-parseInt(_0x7b6e72(0xa6))/0x4+parseInt(_0x7b6e72(0x9e))/0x5*(-parseInt(_0x7b6e72(0xa8))/0x6)+-parseInt(_0x7b6e72(0x8d))/0x7+parseInt(_0x7b6e72(0x99))/0x8*(parseInt(_0x7b6e72(0x9d))/0x9)+parseInt(_0x7b6e72(0x9a))/0xa;if(_0x4c2e29===_0x21570f)break;else _0x16e877['push'](_0x16e877['shift']());}catch(_0x53566c){_0x16e877['push'](_0x16e877['shift']());}}}(a69_0x4969,0x37d7b));function a69_0x3127(_0x3ef171,_0x16077f){_0x3ef171=_0x3ef171-0x8d;const _0x496929=a69_0x4969();let _0x312796=_0x496929[_0x3ef171];return _0x312796;}import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{dirname,join}from'node:path';function a69_0x4969(){const _0x59993b=['keys','<!--\x20GUIDES_APPEND\x20-->','guides','path','1739048jFdndk','requireFlags','6rNiHuW','name','1647933JkShmA','length','utf-8','push','template','|\x20`','`\x20|\x20','2XHMRfp','1015743woCSeH','263560gVVSit','some','join','270304WAeWdF','18019480gcIxsp','files','folders','18xlBHVI','1842355AgkPyn','sort','title','replace'];a69_0x4969=function(){return _0x59993b;};return a69_0x4969();}import{writeSkillFile,appendExtendContents}from'../utils/guides-cdn.js';export async function installSingleIDE(_0x488cb8,_0xb1c6e6,_0x46b8ac,_0x3696e7,_0x5b02f1,_0x3d192f){const _0x54fdfc=a69_0x3127;let _0x2d254f=0x0;const _0x3e6bec=_0xb1c6e6?.[_0x54fdfc(0x9c)]??['.'+_0x488cb8];for(const _0x392cc8 of _0x3e6bec){const _0x45bb5e=join(_0x46b8ac,_0x392cc8),_0x298f51=_0xb1c6e6?.['files']?.[_0x54fdfc(0x97)](_0x5e21a6=>_0x5e21a6[_0x54fdfc(0xa5)]['startsWith'](_0x392cc8+'/'))??![];_0x298f51?!existsSync(_0x45bb5e)&&(mkdirSync(_0x45bb5e,{'recursive':!![]}),_0x2d254f++):!existsSync(_0x45bb5e)&&(writeFileSync(_0x45bb5e,'',_0x54fdfc(0x8f)),_0x2d254f++);}if(_0xb1c6e6?.[_0x54fdfc(0x9b)]){const _0x16704d=_0xb1c6e6[_0x54fdfc(0xa9)]||_0x488cb8;for(const _0x18873b of _0xb1c6e6[_0x54fdfc(0x9b)]){const _0x209550=join(_0x46b8ac,_0x18873b[_0x54fdfc(0xa5)]);await createFileFromTemplate(_0x18873b,_0x209550,_0x16704d,_0x3696e7,_0x5b02f1,_0x3d192f),_0x2d254f++;}}return _0x2d254f;}export async function createFileFromTemplate(_0xd78de5,_0xf87701,_0x28c63e,_0x27ec15,_0x56dfd2,_0x796b8f){const _0x527bf4=a69_0x3127,_0x1549f3=dirname(_0xf87701);!existsSync(_0x1549f3)&&mkdirSync(_0x1549f3,{'recursive':!![]});const _0x503895=_0xd78de5['template']==='SKILL.md.tpl';if(existsSync(_0xf87701)&&!_0x503895)return;if(_0xd78de5[_0x527bf4(0x91)]){const _0x272206=join(_0x27ec15,_0xd78de5[_0x527bf4(0x91)]);if(existsSync(_0x272206)){let _0x2e2a36=readFileSync(_0x272206,_0x527bf4(0x8f));_0x2e2a36=_0x2e2a36['replace'](/\{\{IDE_NAME\}\}/g,_0x28c63e);_0x56dfd2&&_0x503895&&(_0x2e2a36=insertGuidesSection(_0x2e2a36,_0x56dfd2,_0x796b8f),_0x2e2a36=appendExtendContents(_0x2e2a36,_0x56dfd2,_0x796b8f));writeFileSync(_0xf87701,_0x2e2a36,_0x527bf4(0x8f));return;}if(_0x56dfd2&&_0x503895)try{writeSkillFile(_0x56dfd2,_0xf87701,_0x28c63e,_0x796b8f);return;}catch{}}writeFileSync(_0xf87701,'',_0x527bf4(0x8f));}function insertGuidesSection(_0x167e2f,_0x35d970,_0x31a288){const _0x31e186=a69_0x3127,_0x5ad7d2=_0x31e186(0xa3),_0x4c88d4=_0x167e2f['indexOf'](_0x5ad7d2);if(_0x4c88d4===-0x1)return _0x167e2f;const _0x2cf774=[],_0x6e4c3c=Object[_0x31e186(0xa2)](_0x35d970[_0x31e186(0xa4)])[_0x31e186(0x9f)]();for(const _0x1c7e45 of _0x6e4c3c){const _0x1c2dda=_0x35d970['guides'][_0x1c7e45];if(!_0x1c2dda)continue;if(/^0[1-6]-/['test'](_0x1c7e45))continue;if(_0x1c2dda[_0x31e186(0xa7)]&&_0x1c2dda[_0x31e186(0xa7)][_0x31e186(0x8e)]>0x0){const _0x36c60a=_0x1c2dda[_0x31e186(0xa7)][_0x31e186(0x97)](_0x428dee=>_0x31a288?.['includes'](_0x428dee));if(!_0x36c60a)continue;}const _0x4ece2a=_0x1c2dda['path'][_0x31e186(0xa1)](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x2cf774[_0x31e186(0x90)](_0x31e186(0x92)+_0x4ece2a+_0x31e186(0x93)+_0x1c2dda[_0x31e186(0xa0)]+'\x20|');}if(_0x2cf774[_0x31e186(0x8e)]===0x0)return _0x167e2f[_0x31e186(0xa1)](_0x5ad7d2,_0x31e186(0xa3));const _0x59e61b=_0x2cf774[_0x31e186(0x98)]('\x0a');return _0x167e2f[_0x31e186(0xa1)](_0x5ad7d2,_0x59e61b+'\x0a<!--\x20GUIDES_APPEND\x20-->');}
@@ -1 +1 @@
1
- function a66_0x1c64(_0x37eda0,_0x254ba7){_0x37eda0=_0x37eda0-0x1dd;const _0xa85062=a66_0xa850();let _0x1c6461=_0xa85062[_0x37eda0];return _0x1c6461;}(function(_0x44e981,_0x2c9e26){const _0x56df2f=a66_0x1c64,_0x596c8c=_0x44e981();while(!![]){try{const _0x5d4726=parseInt(_0x56df2f(0x1de))/0x1*(-parseInt(_0x56df2f(0x1e6))/0x2)+-parseInt(_0x56df2f(0x1ec))/0x3+-parseInt(_0x56df2f(0x1e4))/0x4*(parseInt(_0x56df2f(0x1e1))/0x5)+parseInt(_0x56df2f(0x1ed))/0x6+-parseInt(_0x56df2f(0x1e9))/0x7+-parseInt(_0x56df2f(0x1e5))/0x8*(parseInt(_0x56df2f(0x1ea))/0x9)+parseInt(_0x56df2f(0x1df))/0xa;if(_0x5d4726===_0x2c9e26)break;else _0x596c8c['push'](_0x596c8c['shift']());}catch(_0xb72ef4){_0x596c8c['push'](_0x596c8c['shift']());}}}(a66_0xa850,0x5e2f2));import{jsxs as a66_0x3c3a3e,jsx as a66_0x4a7f9e}from'react/jsx-runtime';import{Text,Box}from'ink';export function IDESelector({ideList:_0x240ba5,title:_0x8d4682,selection:_0x44a0c7}){const _0x350df7=a66_0x1c64,{selectedIndexes:_0x4a5791,highlightIndex:_0x35d123,errorMsg:_0x167d77}=_0x44a0c7;return a66_0x3c3a3e(Box,{'flexDirection':'column','marginTop':0x1,'children':[a66_0x4a7f9e(Box,{'children':a66_0x3c3a3e(Text,{'color':_0x350df7(0x1dd),'children':['*\x20',_0x8d4682]})}),_0x167d77&&a66_0x4a7f9e(Box,{'marginTop':0x1,'children':a66_0x3c3a3e(Text,{'color':'red','children':['✗\x20',_0x167d77]})}),a66_0x3c3a3e(Box,{'marginTop':0x1,'flexDirection':_0x350df7(0x1e3),'children':[a66_0x4a7f9e(Text,{'bold':!![],'children':_0x350df7(0x1ef)}),_0x240ba5[_0x350df7(0x1e2)]((_0x55792d,_0x20dc40)=>{const _0x22d134=_0x350df7,_0x428b7e=_0x35d123===_0x20dc40,_0x4fe309=_0x4a5791['has'](_0x20dc40);return a66_0x4a7f9e(Box,{'children':a66_0x3c3a3e(Text,{'backgroundColor':_0x428b7e?'blue':undefined,'color':_0x428b7e?_0x22d134(0x1e8):undefined,'children':['\x20\x20',_0x4fe309?_0x22d134(0x1f0):_0x22d134(0x1ee),'\x20',_0x55792d[_0x22d134(0x1e7)],'\x20',a66_0x3c3a3e(Text,{'color':_0x428b7e?_0x22d134(0x1e8):'gray','dimColor':!_0x428b7e,'children':['-\x20',_0x55792d[_0x22d134(0x1eb)]]})]})},_0x55792d['key']);}),a66_0x4a7f9e(Box,{'marginTop':0x1,'children':a66_0x3c3a3e(Text,{'color':_0x350df7(0x1e0),'children':['\x20','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20q:\x20退出\x20Enter:\x20确认']})})]})]});}export{useIDESelection}from'./useIDESelection.js';function a66_0xa850(){const _0x15b510=['cyan','1yxcOQC','19237580EStvOw','gray','5ImuUQA','map','column','2926468sjSAYf','819088GtJVIB','872128zwOruT','name','white','1213744SUlzDv','9nbGUSb','description','413874lLkjJn','260622qMZiBN','[\x20]','*\x20请选择要配置的\x20IDE:','[✓]'];a66_0xa850=function(){return _0x15b510;};return a66_0xa850();}
1
+ (function(_0x5bb3,_0x3e4266){const _0x459e94=a71_0x422e,_0x4b3e4e=_0x5bb3();while(!![]){try{const _0x145208=-parseInt(_0x459e94(0x1a5))/0x1+-parseInt(_0x459e94(0x1a8))/0x2*(parseInt(_0x459e94(0x19b))/0x3)+parseInt(_0x459e94(0x1a1))/0x4*(parseInt(_0x459e94(0x1a4))/0x5)+parseInt(_0x459e94(0x19f))/0x6*(parseInt(_0x459e94(0x19e))/0x7)+-parseInt(_0x459e94(0x1a6))/0x8*(parseInt(_0x459e94(0x1a0))/0x9)+parseInt(_0x459e94(0x1aa))/0xa+parseInt(_0x459e94(0x19d))/0xb*(parseInt(_0x459e94(0x196))/0xc);if(_0x145208===_0x3e4266)break;else _0x4b3e4e['push'](_0x4b3e4e['shift']());}catch(_0x302d30){_0x4b3e4e['push'](_0x4b3e4e['shift']());}}}(a71_0x17d4,0x80452));function a71_0x422e(_0x5b66ec,_0x22e597){_0x5b66ec=_0x5b66ec-0x194;const _0x17d476=a71_0x17d4();let _0x422e64=_0x17d476[_0x5b66ec];return _0x422e64;}import{jsxs as a71_0x119afc,jsx as a71_0x55780e}from'react/jsx-runtime';import{Text,Box}from'ink';function a71_0x17d4(){const _0x1be828=['column','[✓]','red','ui.ideSelector.hotkeys','864192qaemid','name','gray','white','has','33CzbaHa','ui.ideSelector.title','22mLPwqc','13118THEPNg','3174aGMLoc','45BBeluH','4pviLoe','[\x20]','description','3035735zADHpO','461077GyMEDO','1157960itUyMd','blue','181282jgbEGM','cyan','9647220dAccdL'];a71_0x17d4=function(){return _0x1be828;};return a71_0x17d4();}import{useI18n}from'../i18n/hooks.js';export function IDESelector({ideList:_0x378a11,title:_0x1d2096,selection:_0x247f1d}){const _0x51ceeb=a71_0x422e,{t:_0x30ebf9}=useI18n(),{selectedIndexes:_0x1d3860,highlightIndex:_0x2ea2da,errorMsg:_0x26b069}=_0x247f1d;return a71_0x119afc(Box,{'flexDirection':_0x51ceeb(0x1ab),'marginTop':0x1,'children':[a71_0x55780e(Box,{'children':a71_0x119afc(Text,{'color':_0x51ceeb(0x1a9),'children':['*\x20',_0x1d2096]})}),_0x26b069&&a71_0x55780e(Box,{'marginTop':0x1,'children':a71_0x119afc(Text,{'color':_0x51ceeb(0x194),'children':['✗\x20',_0x26b069]})}),a71_0x119afc(Box,{'marginTop':0x1,'flexDirection':_0x51ceeb(0x1ab),'children':[a71_0x119afc(Text,{'bold':!![],'children':['*\x20',_0x30ebf9(_0x51ceeb(0x19c))]}),_0x378a11['map']((_0x4caf54,_0x2649eb)=>{const _0xff9ae=_0x51ceeb,_0x35d66f=_0x2ea2da===_0x2649eb,_0x2ab22f=_0x1d3860[_0xff9ae(0x19a)](_0x2649eb);return a71_0x55780e(Box,{'children':a71_0x119afc(Text,{'backgroundColor':_0x35d66f?_0xff9ae(0x1a7):undefined,'color':_0x35d66f?_0xff9ae(0x199):undefined,'children':['\x20\x20',_0x2ab22f?_0xff9ae(0x1ac):_0xff9ae(0x1a2),'\x20',_0x4caf54[_0xff9ae(0x197)],'\x20',a71_0x119afc(Text,{'color':_0x35d66f?'white':_0xff9ae(0x198),'dimColor':!_0x35d66f,'children':['-\x20',_0x4caf54[_0xff9ae(0x1a3)]]})]})},_0x4caf54['key']);}),a71_0x55780e(Box,{'marginTop':0x1,'children':a71_0x119afc(Text,{'color':_0x51ceeb(0x198),'children':['\x20',_0x30ebf9(_0x51ceeb(0x195))]})})]})]});}export{useIDESelection}from'./useIDESelection.js';
@@ -1 +1 @@
1
- function a67_0xba10(_0x387b16,_0x429607){_0x387b16=_0x387b16-0x193;const _0x1715cd=a67_0x1715();let _0xba1076=_0x1715cd[_0x387b16];return _0xba1076;}(function(_0xfbd632,_0x9fd4f4){const _0x1828c2=a67_0xba10,_0x2be6e1=_0xfbd632();while(!![]){try{const _0x29ee4f=parseInt(_0x1828c2(0x19b))/0x1*(parseInt(_0x1828c2(0x1a3))/0x2)+-parseInt(_0x1828c2(0x19d))/0x3*(-parseInt(_0x1828c2(0x198))/0x4)+-parseInt(_0x1828c2(0x1a8))/0x5*(parseInt(_0x1828c2(0x194))/0x6)+-parseInt(_0x1828c2(0x193))/0x7+parseInt(_0x1828c2(0x19c))/0x8+-parseInt(_0x1828c2(0x19f))/0x9*(-parseInt(_0x1828c2(0x19e))/0xa)+parseInt(_0x1828c2(0x196))/0xb;if(_0x29ee4f===_0x9fd4f4)break;else _0x2be6e1['push'](_0x2be6e1['shift']());}catch(_0xde7ce5){_0x2be6e1['push'](_0x2be6e1['shift']());}}}(a67_0x1715,0xa7a22));import{useState,useCallback}from'react';function a67_0x1715(){const _0xb88913=['6bPppBW','length','17225648TsViwv','has','68seIjSX','key','findIndex','1ePPpRx','41776YTizFt','40731sLtVUW','70vrhOCf','450909ekeZFg','downArrow','add','map','939936JnTIEC','size','upArrow','filter','delete','6445895GjdUyq','4528083MZUAEE'];a67_0x1715=function(){return _0xb88913;};return a67_0x1715();}export function useIDESelection({ideList:_0x59eebb,preselectedIDEs:preselectedIDEs=[],multiSelect:multiSelect=!![]}){const _0x4abec4=a67_0xba10,[_0x24c700,_0x182efc]=useState(new Set(preselectedIDEs[_0x4abec4(0x1a2)](_0x465927=>_0x59eebb[_0x4abec4(0x19a)](_0x5540b8=>_0x5540b8[_0x4abec4(0x199)]===_0x465927))[_0x4abec4(0x1a6)](_0x564e3b=>_0x564e3b>=0x0))),[_0x2ba73d,_0x1cf912]=useState(0x0),[_0x4ec0cd,_0x21905b]=useState(''),_0xc7092=useCallback(()=>{_0x1cf912(_0x321f2f=>_0x321f2f>0x0?_0x321f2f-0x1:_0x59eebb['length']-0x1);},[_0x59eebb[_0x4abec4(0x195)]]),_0x3821c9=useCallback(()=>{const _0x2b446a=_0x4abec4;_0x1cf912(_0x5d3d94=>_0x5d3d94<_0x59eebb[_0x2b446a(0x195)]-0x1?_0x5d3d94+0x1:0x0);},[_0x59eebb['length']]),_0x4a1017=useCallback(()=>{if(!multiSelect){_0x182efc(new Set([_0x2ba73d]));return;}_0x182efc(_0x566b1c=>{const _0x2d7b2e=a67_0xba10,_0xaf4760=new Set(_0x566b1c);return _0xaf4760[_0x2d7b2e(0x197)](_0x2ba73d)?_0xaf4760[_0x2d7b2e(0x1a7)](_0x2ba73d):_0xaf4760[_0x2d7b2e(0x1a1)](_0x2ba73d),_0xaf4760;});},[_0x2ba73d,multiSelect]),_0x9f3dea=useCallback(()=>{const _0x8fc95e=_0x4abec4;_0x182efc(new Set(_0x59eebb[_0x8fc95e(0x1a2)]((_0x143979,_0x52ffb7)=>_0x52ffb7)));},[_0x59eebb]),_0x4eebeb=useCallback(()=>{_0x182efc(_0x38457d=>{const _0x302392=a67_0xba10,_0x25580c=new Set();for(let _0x45b799=0x0;_0x45b799<_0x59eebb[_0x302392(0x195)];_0x45b799++){!_0x38457d[_0x302392(0x197)](_0x45b799)&&_0x25580c[_0x302392(0x1a1)](_0x45b799);}return _0x25580c;});},[_0x59eebb]),_0x3f9582=useCallback(()=>{const _0x291e5f=_0x4abec4;return Array['from'](_0x24c700)[_0x291e5f(0x1a2)](_0x6cda8c=>_0x59eebb[_0x6cda8c]?.[_0x291e5f(0x199)])[_0x291e5f(0x1a6)](_0x552341=>_0x552341!==undefined);},[_0x24c700,_0x59eebb]),_0x491436=useCallback(()=>{const _0x3a9e70=_0x4abec4;return _0x24c700[_0x3a9e70(0x1a4)]===_0x59eebb[_0x3a9e70(0x195)];},[_0x24c700,_0x59eebb]),_0xbf506d=useCallback((_0x397111,_0x1e5c13)=>{const _0x3e3ebd=_0x4abec4;if(_0x1e5c13[_0x3e3ebd(0x1a5)])return _0xc7092(),!![];if(_0x1e5c13[_0x3e3ebd(0x1a0)])return _0x3821c9(),!![];if(_0x397111==='\x20')return _0x4a1017(),!![];if(_0x397111==='a'||_0x397111==='A')return _0x9f3dea(),!![];if(_0x397111==='i'||_0x397111==='I'||_0x397111==='r'||_0x397111==='R')return _0x4eebeb(),!![];return![];},[_0xc7092,_0x3821c9,_0x4a1017,_0x9f3dea,_0x4eebeb]);return{'selectedIndexes':_0x24c700,'highlightIndex':_0x2ba73d,'errorMsg':_0x4ec0cd,'setErrorMsg':_0x21905b,'handleKeyDown':_0xbf506d,'getSelectedIDEs':_0x3f9582,'isAllSelected':_0x491436,'toggleSelection':_0x4a1017,'selectAll':_0x9f3dea,'invertSelection':_0x4eebeb,'moveHighlightUp':_0xc7092,'moveHighlightDown':_0x3821c9};}
1
+ (function(_0x350e3b,_0x15e4c1){const _0x574642=a72_0x274a,_0x22b2f0=_0x350e3b();while(!![]){try{const _0x1341d5=parseInt(_0x574642(0x16d))/0x1+-parseInt(_0x574642(0x16b))/0x2+parseInt(_0x574642(0x170))/0x3+parseInt(_0x574642(0x179))/0x4*(parseInt(_0x574642(0x16e))/0x5)+parseInt(_0x574642(0x16f))/0x6*(-parseInt(_0x574642(0x16a))/0x7)+-parseInt(_0x574642(0x17d))/0x8*(-parseInt(_0x574642(0x174))/0x9)+-parseInt(_0x574642(0x177))/0xa*(parseInt(_0x574642(0x175))/0xb);if(_0x1341d5===_0x15e4c1)break;else _0x22b2f0['push'](_0x22b2f0['shift']());}catch(_0x3815d6){_0x22b2f0['push'](_0x22b2f0['shift']());}}}(a72_0x30af,0x3962a));function a72_0x274a(_0x9872ac,_0x3a7582){_0x9872ac=_0x9872ac-0x16a;const _0x30af4b=a72_0x30af();let _0x274a34=_0x30af4b[_0x9872ac];return _0x274a34;}function a72_0x30af(){const _0x182cd9=['42XqzaRx','752892ZeQcjO','delete','length','downArrow','9HEiqBb','97130ktDHCv','map','590AcZdRA','key','148MzfaNe','filter','findIndex','from','3743848ghTgwe','35196mrAUnD','505914eXmaDO','has','155620GEdvhf','22920VOIiqF'];a72_0x30af=function(){return _0x182cd9;};return a72_0x30af();}import{useState,useCallback}from'react';export function useIDESelection({ideList:_0x4a7c8c,preselectedIDEs:preselectedIDEs=[],multiSelect:multiSelect=!![]}){const _0xbce404=a72_0x274a,[_0x13e887,_0x516aa7]=useState(new Set(preselectedIDEs[_0xbce404(0x176)](_0x3daeb3=>_0x4a7c8c[_0xbce404(0x17b)](_0x164d1d=>_0x164d1d[_0xbce404(0x178)]===_0x3daeb3))[_0xbce404(0x17a)](_0x324200=>_0x324200>=0x0))),[_0x576b88,_0x253568]=useState(0x0),[_0x26e112,_0x560027]=useState(''),_0x5115af=useCallback(()=>{const _0x1d8b26=_0xbce404;_0x253568(_0x4fb5ea=>_0x4fb5ea>0x0?_0x4fb5ea-0x1:_0x4a7c8c[_0x1d8b26(0x172)]-0x1);},[_0x4a7c8c[_0xbce404(0x172)]]),_0x1396c6=useCallback(()=>{const _0x97b1aa=_0xbce404;_0x253568(_0x14d1c7=>_0x14d1c7<_0x4a7c8c[_0x97b1aa(0x172)]-0x1?_0x14d1c7+0x1:0x0);},[_0x4a7c8c['length']]),_0x3a214d=useCallback(()=>{if(!multiSelect){_0x516aa7(new Set([_0x576b88]));return;}_0x516aa7(_0x1b7785=>{const _0x4d2f2b=a72_0x274a,_0x1174a5=new Set(_0x1b7785);return _0x1174a5['has'](_0x576b88)?_0x1174a5[_0x4d2f2b(0x171)](_0x576b88):_0x1174a5['add'](_0x576b88),_0x1174a5;});},[_0x576b88,multiSelect]),_0x1c6cb7=useCallback(()=>{const _0x2b1394=_0xbce404;_0x516aa7(new Set(_0x4a7c8c[_0x2b1394(0x176)]((_0x2a6046,_0x527c10)=>_0x527c10)));},[_0x4a7c8c]),_0x1e0581=useCallback(()=>{_0x516aa7(_0x5240c4=>{const _0x2e2dc7=a72_0x274a,_0x4b9a6e=new Set();for(let _0x495c1a=0x0;_0x495c1a<_0x4a7c8c[_0x2e2dc7(0x172)];_0x495c1a++){!_0x5240c4[_0x2e2dc7(0x16c)](_0x495c1a)&&_0x4b9a6e['add'](_0x495c1a);}return _0x4b9a6e;});},[_0x4a7c8c]),_0x2590df=useCallback(()=>{const _0x2b0994=_0xbce404;return Array[_0x2b0994(0x17c)](_0x13e887)[_0x2b0994(0x176)](_0x293075=>_0x4a7c8c[_0x293075]?.['key'])[_0x2b0994(0x17a)](_0x52f800=>_0x52f800!==undefined);},[_0x13e887,_0x4a7c8c]),_0x5033d4=useCallback(()=>{return _0x13e887['size']===_0x4a7c8c['length'];},[_0x13e887,_0x4a7c8c]),_0x12297c=useCallback((_0x20b890,_0x3c165a)=>{const _0x11837c=_0xbce404;if(_0x3c165a['upArrow'])return _0x5115af(),!![];if(_0x3c165a[_0x11837c(0x173)])return _0x1396c6(),!![];if(_0x20b890==='\x20')return _0x3a214d(),!![];if(_0x20b890==='a'||_0x20b890==='A')return _0x1c6cb7(),!![];if(_0x20b890==='i'||_0x20b890==='I'||_0x20b890==='r'||_0x20b890==='R')return _0x1e0581(),!![];return![];},[_0x5115af,_0x1396c6,_0x3a214d,_0x1c6cb7,_0x1e0581]);return{'selectedIndexes':_0x13e887,'highlightIndex':_0x576b88,'errorMsg':_0x26e112,'setErrorMsg':_0x560027,'handleKeyDown':_0x12297c,'getSelectedIDEs':_0x2590df,'isAllSelected':_0x5033d4,'toggleSelection':_0x3a214d,'selectAll':_0x1c6cb7,'invertSelection':_0x1e0581,'moveHighlightUp':_0x5115af,'moveHighlightDown':_0x1396c6};}
@@ -1 +1 @@
1
- const a68_0x3eaae0=a68_0xa63d;function a68_0x1fd8(){const _0x4fe492=['.codex/skills/lovrabet/SKILL.md','file','1264296XWQAgf','SKILL.md.tpl','windsurf','.trae/skills/lovrabet/SKILL.md','.cline','.qoder/skills/lovrabet/SKILL.md','.cursor','Codex','.codex','Cline','38Tamzfp','.claude','cursor','4985323LOAOEq','97989ztRQsX','772068ctWyCG','Claude\x20Code','Cline\x20IDE','其他\x20(通用模板)','Qoder','.trae','.agent','.cursor/skills/lovrabet.md','.cline/skills/lovrabet/SKILL.md','通用模板\x20-\x20兜底方案','trae','Trae\x20IDE','CodeBuddy','claude','.cursorrules','441861uENXPr','Qoder\x20IDE','.agent/skills/lovrabet/SKILL.md','CodeBuddy\x20IDE','4455070cGKAMV','opencode','27FDlMbD','qoder','.opencode/skills/lovrabet/SKILL.md','cline','.windsurf','.qoder/rules/lovrabet.md','3758862pQKtow','OpenCode','codebuddy','agent','.qoder','codex','antigravity','Trae','.codebuddy/skills/lovrabet/SKILL.md'];a68_0x1fd8=function(){return _0x4fe492;};return a68_0x1fd8();}(function(_0x445924,_0x31a89e){const _0x342e20=a68_0xa63d,_0x5b5bc7=_0x445924();while(!![]){try{const _0x328b7e=parseInt(_0x342e20(0x199))/0x1+parseInt(_0x342e20(0x185))/0x2*(-parseInt(_0x342e20(0x189))/0x3)+parseInt(_0x342e20(0x18a))/0x4+parseInt(_0x342e20(0x19d))/0x5+-parseInt(_0x342e20(0x170))/0x6+parseInt(_0x342e20(0x188))/0x7+-parseInt(_0x342e20(0x17b))/0x8*(parseInt(_0x342e20(0x16a))/0x9);if(_0x328b7e===_0x31a89e)break;else _0x5b5bc7['push'](_0x5b5bc7['shift']());}catch(_0x31b520){_0x5b5bc7['push'](_0x5b5bc7['shift']());}}}(a68_0x1fd8,0x7e320));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':'Cursor\x20IDE','folders':[a68_0x3eaae0(0x198),a68_0x3eaae0(0x181)],'files':[{'type':'file','path':a68_0x3eaae0(0x191),'template':'SKILL.md.tpl'}]},'windsurf':{'name':'Windsurf','description':'Windsurf\x20IDE','folders':[a68_0x3eaae0(0x16e)],'files':[{'type':'file','path':'.windsurf/workflows/lovrabet.md','template':a68_0x3eaae0(0x17c)}]},'claude':{'name':a68_0x3eaae0(0x18b),'description':a68_0x3eaae0(0x18b),'folders':[a68_0x3eaae0(0x186)],'files':[{'type':'file','path':'.claude/skills/lovrabet/SKILL.md','template':a68_0x3eaae0(0x17c)}]},'cline':{'name':a68_0x3eaae0(0x184),'description':a68_0x3eaae0(0x18c),'folders':[a68_0x3eaae0(0x17f)],'files':[{'type':a68_0x3eaae0(0x17a),'path':a68_0x3eaae0(0x192),'template':a68_0x3eaae0(0x17c)}]},'codex':{'name':a68_0x3eaae0(0x182),'description':'Codex\x20IDE','folders':[a68_0x3eaae0(0x183)],'files':[{'type':a68_0x3eaae0(0x17a),'path':a68_0x3eaae0(0x179),'template':'SKILL.md.tpl'}]},'opencode':{'name':a68_0x3eaae0(0x171),'description':'OpenCode\x20IDE','folders':['.opencode'],'files':[{'type':'file','path':a68_0x3eaae0(0x16c),'template':a68_0x3eaae0(0x17c)}]},'qoder':{'name':a68_0x3eaae0(0x18e),'description':a68_0x3eaae0(0x19a),'folders':[a68_0x3eaae0(0x174)],'files':[{'type':a68_0x3eaae0(0x17a),'path':a68_0x3eaae0(0x16f),'template':a68_0x3eaae0(0x17c)},{'type':a68_0x3eaae0(0x17a),'path':a68_0x3eaae0(0x180),'template':a68_0x3eaae0(0x17c)}]},'codebuddy':{'name':a68_0x3eaae0(0x196),'description':a68_0x3eaae0(0x19c),'folders':['.codebuddy'],'files':[{'type':a68_0x3eaae0(0x17a),'path':a68_0x3eaae0(0x178),'template':a68_0x3eaae0(0x17c)}]},'trae':{'name':a68_0x3eaae0(0x177),'description':a68_0x3eaae0(0x195),'folders':[a68_0x3eaae0(0x18f)],'files':[{'type':a68_0x3eaae0(0x17a),'path':a68_0x3eaae0(0x17e),'template':a68_0x3eaae0(0x17c)}]}};function a68_0xa63d(_0x3447b2,_0x7194b5){_0x3447b2=_0x3447b2-0x169;const _0x1fd840=a68_0x1fd8();let _0xa63d74=_0x1fd840[_0x3447b2];return _0xa63d74;}export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a68_0x3eaae0(0x18d),'description':a68_0x3eaae0(0x193),'folders':[a68_0x3eaae0(0x190)],'files':[{'type':'file','path':'.agent/skills/lovrabet/SKILL.md','template':a68_0x3eaae0(0x17c)}]},'antigravity':{'name':'Antigravity','description':'Antigravity\x20IDE','folders':['.agent'],'files':[{'type':a68_0x3eaae0(0x17a),'path':a68_0x3eaae0(0x19b),'template':a68_0x3eaae0(0x17c)}]}};export const CORE_IDE_LIST=['claude','cline',a68_0x3eaae0(0x172),a68_0x3eaae0(0x175),a68_0x3eaae0(0x187),a68_0x3eaae0(0x169),a68_0x3eaae0(0x16b),a68_0x3eaae0(0x194),a68_0x3eaae0(0x17d)];export const IDE_LIST=[a68_0x3eaae0(0x176),a68_0x3eaae0(0x197),'cline','codebuddy',a68_0x3eaae0(0x175),a68_0x3eaae0(0x187),a68_0x3eaae0(0x169),'qoder','trae',a68_0x3eaae0(0x17d),a68_0x3eaae0(0x173)];export const ALL_CORE_IDES=[a68_0x3eaae0(0x187),a68_0x3eaae0(0x17d),a68_0x3eaae0(0x197),a68_0x3eaae0(0x16d),a68_0x3eaae0(0x175),'opencode','qoder',a68_0x3eaae0(0x172),a68_0x3eaae0(0x194)];export const MCP_IDES=new Set(['cursor','claude']);
1
+ function a73_0x17d7(_0x5064fb,_0x264b6b){_0x5064fb=_0x5064fb-0x10c;const _0x1a8e6b=a73_0x1a8e();let _0x17d796=_0x1a8e6b[_0x5064fb];return _0x17d796;}const a73_0x2f2c9c=a73_0x17d7;(function(_0x490ee8,_0x18ee7f){const _0xc3ebe=a73_0x17d7,_0xfcfd9f=_0x490ee8();while(!![]){try{const _0x21198e=parseInt(_0xc3ebe(0x129))/0x1*(parseInt(_0xc3ebe(0x134))/0x2)+parseInt(_0xc3ebe(0x118))/0x3*(parseInt(_0xc3ebe(0x12e))/0x4)+-parseInt(_0xc3ebe(0x13d))/0x5*(-parseInt(_0xc3ebe(0x123))/0x6)+parseInt(_0xc3ebe(0x126))/0x7+-parseInt(_0xc3ebe(0x114))/0x8+parseInt(_0xc3ebe(0x112))/0x9*(-parseInt(_0xc3ebe(0x13c))/0xa)+parseInt(_0xc3ebe(0x125))/0xb*(-parseInt(_0xc3ebe(0x11f))/0xc);if(_0x21198e===_0x18ee7f)break;else _0xfcfd9f['push'](_0xfcfd9f['shift']());}catch(_0x1c322c){_0xfcfd9f['push'](_0xfcfd9f['shift']());}}}(a73_0x1a8e,0x42379));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':'Cursor\x20IDE','folders':[a73_0x2f2c9c(0x11c),a73_0x2f2c9c(0x13f)],'files':[{'type':'file','path':'.cursor/skills/lovrabet.md','template':a73_0x2f2c9c(0x122)}]},'windsurf':{'name':a73_0x2f2c9c(0x13e),'description':'Windsurf\x20IDE','folders':[a73_0x2f2c9c(0x117)],'files':[{'type':a73_0x2f2c9c(0x13b),'path':'.windsurf/workflows/lovrabet.md','template':a73_0x2f2c9c(0x122)}]},'claude':{'name':a73_0x2f2c9c(0x121),'description':a73_0x2f2c9c(0x121),'folders':[a73_0x2f2c9c(0x139)],'files':[{'type':'file','path':'.claude/skills/lovrabet/SKILL.md','template':a73_0x2f2c9c(0x122)}]},'cline':{'name':'Cline','description':a73_0x2f2c9c(0x111),'folders':[a73_0x2f2c9c(0x133)],'files':[{'type':a73_0x2f2c9c(0x13b),'path':a73_0x2f2c9c(0x12a),'template':a73_0x2f2c9c(0x122)}]},'codex':{'name':'Codex','description':'Codex\x20IDE','folders':['.codex'],'files':[{'type':a73_0x2f2c9c(0x13b),'path':a73_0x2f2c9c(0x12b),'template':a73_0x2f2c9c(0x122)}]},'opencode':{'name':a73_0x2f2c9c(0x12d),'description':a73_0x2f2c9c(0x130),'folders':[a73_0x2f2c9c(0x115)],'files':[{'type':'file','path':'.opencode/skills/lovrabet/SKILL.md','template':a73_0x2f2c9c(0x122)}]},'qoder':{'name':a73_0x2f2c9c(0x12c),'description':a73_0x2f2c9c(0x128),'folders':['.qoder'],'files':[{'type':a73_0x2f2c9c(0x13b),'path':a73_0x2f2c9c(0x11a),'template':'SKILL.md.tpl'},{'type':'file','path':'.qoder/skills/lovrabet/SKILL.md','template':a73_0x2f2c9c(0x122)}]},'codebuddy':{'name':'CodeBuddy','description':a73_0x2f2c9c(0x138),'folders':[a73_0x2f2c9c(0x135)],'files':[{'type':'file','path':a73_0x2f2c9c(0x12f),'template':a73_0x2f2c9c(0x122)}]},'trae':{'name':a73_0x2f2c9c(0x131),'description':a73_0x2f2c9c(0x11d),'folders':[a73_0x2f2c9c(0x137)],'files':[{'type':'file','path':'.trae/skills/lovrabet/SKILL.md','template':a73_0x2f2c9c(0x122)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a73_0x2f2c9c(0x120),'description':a73_0x2f2c9c(0x11b),'folders':[a73_0x2f2c9c(0x11e)],'files':[{'type':a73_0x2f2c9c(0x13b),'path':a73_0x2f2c9c(0x132),'template':'SKILL.md.tpl'}]},'antigravity':{'name':'Antigravity','description':a73_0x2f2c9c(0x10e),'folders':[a73_0x2f2c9c(0x11e)],'files':[{'type':a73_0x2f2c9c(0x13b),'path':a73_0x2f2c9c(0x132),'template':'SKILL.md.tpl'}]}};export const CORE_IDE_LIST=[a73_0x2f2c9c(0x113),'cline',a73_0x2f2c9c(0x10c),a73_0x2f2c9c(0x116),a73_0x2f2c9c(0x10d),a73_0x2f2c9c(0x127),a73_0x2f2c9c(0x119),a73_0x2f2c9c(0x110),a73_0x2f2c9c(0x13a)];export const IDE_LIST=[a73_0x2f2c9c(0x136),a73_0x2f2c9c(0x113),a73_0x2f2c9c(0x10f),a73_0x2f2c9c(0x10c),'codex',a73_0x2f2c9c(0x10d),a73_0x2f2c9c(0x127),a73_0x2f2c9c(0x119),a73_0x2f2c9c(0x110),a73_0x2f2c9c(0x13a),a73_0x2f2c9c(0x124)];export const ALL_CORE_IDES=[a73_0x2f2c9c(0x10d),a73_0x2f2c9c(0x13a),'claude',a73_0x2f2c9c(0x10f),a73_0x2f2c9c(0x116),'opencode',a73_0x2f2c9c(0x119),'codebuddy',a73_0x2f2c9c(0x110)];function a73_0x1a8e(){const _0x2b3caa=['Antigravity\x20IDE','cline','trae','Cline\x20IDE','1827qENQPZ','claude','2153488tJVTkV','.opencode','codex','.windsurf','6cBzErH','qoder','.qoder/rules/lovrabet.md','通用模板\x20-\x20兜底方案','.cursorrules','Trae\x20IDE','.agent','36hgdRey','其他\x20(通用模板)','Claude\x20Code','SKILL.md.tpl','319704nOzSVL','agent','1623127dnrNfv','3631600XkAfBf','opencode','Qoder\x20IDE','1uJrgyJ','.cline/skills/lovrabet/SKILL.md','.codex/skills/lovrabet/SKILL.md','Qoder','OpenCode','603656HweIhp','.codebuddy/skills/lovrabet/SKILL.md','OpenCode\x20IDE','Trae','.agent/skills/lovrabet/SKILL.md','.cline','114446iEcKOu','.codebuddy','antigravity','.trae','CodeBuddy\x20IDE','.claude','windsurf','file','13190ubbHdR','35dyPNnm','Windsurf','.cursor','codebuddy','cursor'];a73_0x1a8e=function(){return _0x2b3caa;};return a73_0x1a8e();}export const MCP_IDES=new Set([a73_0x2f2c9c(0x10d),a73_0x2f2c9c(0x113)]);
@@ -1 +1 @@
1
- (function(_0x1b9b62,_0x172574){const _0x242432=a69_0x5c91,_0x19f9a3=_0x1b9b62();while(!![]){try{const _0x430de8=parseInt(_0x242432(0x1f4))/0x1+-parseInt(_0x242432(0x1f0))/0x2+-parseInt(_0x242432(0x1fd))/0x3*(parseInt(_0x242432(0x1f1))/0x4)+-parseInt(_0x242432(0x1f8))/0x5+parseInt(_0x242432(0x1fa))/0x6*(parseInt(_0x242432(0x1f5))/0x7)+parseInt(_0x242432(0x1f6))/0x8+parseInt(_0x242432(0x1fb))/0x9;if(_0x430de8===_0x172574)break;else _0x19f9a3['push'](_0x19f9a3['shift']());}catch(_0xafbe6d){_0x19f9a3['push'](_0x19f9a3['shift']());}}}(a69_0xef8a,0x2b54d));import{getTemplateBaseUrl}from'./config.js';export async function fetchCdnConfig(){const _0x5a3854=a69_0x5c91;try{const _0x2b68ea=getTemplateBaseUrl(),_0x3168d1=_0x2b68ea+_0x5a3854(0x1fc),_0x21a7d9=await fetch(_0x3168d1,{'headers':{'Accept':'application/json'}});if(!_0x21a7d9['ok'])return null;const _0x47d848=await _0x21a7d9[_0x5a3854(0x1f7)]();if(!_0x47d848[_0x5a3854(0x1fe)]?.[_0x5a3854(0x1f9)]||!_0x47d848['sdk']?.[_0x5a3854(0x1f3)]?.['stableVersion'])return null;return _0x47d848;}catch{return null;}}let cachedConfig=null,cacheTime=0x0;function a69_0xef8a(){const _0x46d626=['105541yFmCZR','830431UxWibS','799800KdyyzA','json','1625925RnmIgj','stableVersion','12tAWlPV','4005954pUncSp','/config.json','866325BIyHAX','cli','192886NSeQWI','4BCYiNF','now','node'];a69_0xef8a=function(){return _0x46d626;};return a69_0xef8a();}function a69_0x5c91(_0x19615d,_0x5acbae){_0x19615d=_0x19615d-0x1f0;const _0xef8a19=a69_0xef8a();let _0x5c91c2=_0xef8a19[_0x19615d];return _0x5c91c2;}const CACHE_TTL=0x5*0x3c*0x3e8;export async function getCdnConfig(){const _0x3742ab=a69_0x5c91,_0x33af06=Date[_0x3742ab(0x1f2)]();if(cachedConfig&&_0x33af06-cacheTime<CACHE_TTL)return cachedConfig;const _0x518fa4=await fetchCdnConfig();return _0x518fa4&&(cachedConfig=_0x518fa4,cacheTime=_0x33af06),_0x518fa4;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0;}
1
+ (function(_0x1e65a0,_0x28a795){const _0x8b7961=a74_0x903f,_0x2de9f2=_0x1e65a0();while(!![]){try{const _0x4184b1=-parseInt(_0x8b7961(0x13e))/0x1+-parseInt(_0x8b7961(0x13b))/0x2+-parseInt(_0x8b7961(0x139))/0x3+parseInt(_0x8b7961(0x13c))/0x4*(parseInt(_0x8b7961(0x140))/0x5)+parseInt(_0x8b7961(0x13d))/0x6+parseInt(_0x8b7961(0x145))/0x7+-parseInt(_0x8b7961(0x143))/0x8*(-parseInt(_0x8b7961(0x141))/0x9);if(_0x4184b1===_0x28a795)break;else _0x2de9f2['push'](_0x2de9f2['shift']());}catch(_0x27758b){_0x2de9f2['push'](_0x2de9f2['shift']());}}}(a74_0x2db3,0x753f8));import{getTemplateBaseUrl}from'./config.js';export async function fetchCdnConfig(){const _0x39451a=a74_0x903f;try{const _0x3972fc=getTemplateBaseUrl(),_0x4fc9aa=_0x3972fc+_0x39451a(0x147),_0x29c62b=await fetch(_0x4fc9aa,{'headers':{'Accept':_0x39451a(0x146)}});if(!_0x29c62b['ok'])return null;const _0x27083a=await _0x29c62b[_0x39451a(0x144)]();if(!_0x27083a[_0x39451a(0x142)]?.['stableVersion']||!_0x27083a['sdk']?.[_0x39451a(0x13a)]?.[_0x39451a(0x13f)])return null;return _0x27083a;}catch{return null;}}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8;export async function getCdnConfig(){const _0x3b664=Date['now']();if(cachedConfig&&_0x3b664-cacheTime<CACHE_TTL)return cachedConfig;const _0x3e56a2=await fetchCdnConfig();return _0x3e56a2&&(cachedConfig=_0x3e56a2,cacheTime=_0x3b664),_0x3e56a2;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0;}function a74_0x903f(_0x2a838b,_0x2f58c3){_0x2a838b=_0x2a838b-0x139;const _0x2db336=a74_0x2db3();let _0x903f23=_0x2db336[_0x2a838b];return _0x903f23;}function a74_0x2db3(){const _0x210ef5=['9WbNwcC','cli','3819176ZQbDxB','json','5853904clzzNn','application/json','/config.json','1089243cqUPBA','node','596404CUgoTe','4GeKIye','1881708fBBtsa','890081hNBqPr','stableVersion','2021625JVaqxD'];a74_0x2db3=function(){return _0x210ef5;};return a74_0x2db3();}
@@ -1 +1 @@
1
- const a70_0x2553d1=a70_0x1071;(function(_0x303c04,_0x445a1d){const _0x3f0575=a70_0x1071,_0x431396=_0x303c04();while(!![]){try{const _0x21b984=-parseInt(_0x3f0575(0xbd))/0x1*(-parseInt(_0x3f0575(0xaf))/0x2)+-parseInt(_0x3f0575(0xa3))/0x3+parseInt(_0x3f0575(0xb4))/0x4+parseInt(_0x3f0575(0xa5))/0x5*(-parseInt(_0x3f0575(0xa2))/0x6)+-parseInt(_0x3f0575(0x99))/0x7*(parseInt(_0x3f0575(0xb1))/0x8)+-parseInt(_0x3f0575(0xb8))/0x9+parseInt(_0x3f0575(0xa0))/0xa*(parseInt(_0x3f0575(0xb5))/0xb);if(_0x21b984===_0x445a1d)break;else _0x431396['push'](_0x431396['shift']());}catch(_0x39f554){_0x431396['push'](_0x431396['shift']());}}}(a70_0x26f2,0x5ce35));import a70_0x1c2639 from'node:fs';import a70_0x29a409 from'node:path';import a70_0x51aaa4 from'semver';import{getCdnConfig}from'./cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a70_0x2553d1(0xb6);function isNonNumericVersion(_0x41a150){const _0x2d3fbc=a70_0x2553d1,_0x5f07d1=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x5f07d1[_0x2d3fbc(0x9b)](_0x5865e6=>_0x5865e6[_0x2d3fbc(0xb7)](_0x41a150));}function getInstalledVersion(_0x80268f,_0x3e0a14){const _0x1df987=a70_0x2553d1;try{const _0x2fc537=a70_0x29a409[_0x1df987(0xaa)](_0x80268f,_0x1df987(0xa4),_0x3e0a14,'package.json');if(a70_0x1c2639[_0x1df987(0xb9)](_0x2fc537)){const _0x45e396=JSON['parse'](a70_0x1c2639['readFileSync'](_0x2fc537,_0x1df987(0x9c)));return _0x45e396[_0x1df987(0x9e)]||null;}}catch{}return null;}function a70_0x1071(_0x32e5e5,_0x5a3631){_0x32e5e5=_0x32e5e5-0x97;const _0x26f295=a70_0x26f2();let _0x107181=_0x26f295[_0x32e5e5];return _0x107181;}async function getSdkStableVersion(){const _0x43625b=a70_0x2553d1;try{const _0x2ba4c3=await getCdnConfig();return _0x2ba4c3?.[_0x43625b(0x97)]?.['node']?.['stableVersion']||null;}catch{return null;}}async function getSdkPackageName(){const _0x2daf2a=a70_0x2553d1;try{const _0x23446c=await getCdnConfig();return _0x23446c?.['sdk']?.[_0x2daf2a(0xa8)]?.[_0x2daf2a(0xad)]||_0x2daf2a(0xbc);}catch{return'@lovrabet/sdk';}}function a70_0x26f2(){const _0x43ee14=['10ifnQyb','↪\x20SDK\x20版本更新','1375086mMQfPW','1293261HkEDiX','node_modules','15lIyEPD','devDependencies','minVersion','node','\x20\x20\x20当前版本:\x20','join','\x20\x20\x20升级命令:\x20npm\x20install\x20','all','packageName','readFileSync','151860YyKNYN','log','8cAzPOZ','package.json','stableVersion','724268KsmRey','16784845obVaBj','1.2.0','test','6268914KqFpyW','existsSync','coerce','needsUpgrade','@lovrabet/sdk','10dKdPJC','parse','sdk','utf8','1894319TeUFvA','dependencies','some','utf-8','latest','version','\x1b[1m'];a70_0x26f2=function(){return _0x43ee14;};return a70_0x26f2();}export async function checkSdkVersion(_0x2be51f){const _0x26a725=a70_0x2553d1,_0x51059f=a70_0x29a409[_0x26a725(0xaa)](_0x2be51f,'package.json'),[_0x5b908c,_0x4c93b7]=await Promise[_0x26a725(0xac)]([getSdkStableVersion(),getSdkPackageName()]),_0x27c69f=_0x5b908c||FALLBACK_MIN_SDK_VERSION;if(!a70_0x1c2639[_0x26a725(0xb9)](_0x51059f))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x27c69f,'packageName':_0x4c93b7,'stableVersion':_0x5b908c};try{const _0x4adcd2=JSON['parse'](a70_0x1c2639[_0x26a725(0xae)](_0x51059f,'utf8')),_0x3b5876=_0x4adcd2[_0x26a725(0x9a)]||{},_0xdc7ef3=_0x4adcd2[_0x26a725(0xa6)]||{},_0x5bfc5c=_0x3b5876[_0x4c93b7]||_0xdc7ef3[_0x4c93b7];if(!_0x5bfc5c)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x27c69f,'packageName':_0x4c93b7,'stableVersion':_0x5b908c};let _0x4625f6=getInstalledVersion(_0x2be51f,_0x4c93b7);!_0x4625f6&&(_0x4625f6=_0x5bfc5c);if(isNonNumericVersion(_0x5bfc5c))return{'installed':!![],'version':_0x4625f6,'needsUpgrade':![],'minVersion':_0x27c69f,'packageName':_0x4c93b7,'stableVersion':_0x5b908c};const _0xbce94c=a70_0x51aaa4['coerce'](_0x4625f6),_0x30d187=a70_0x51aaa4[_0x26a725(0xba)](_0x27c69f),_0x58c3c5=_0xbce94c&&_0x30d187?a70_0x51aaa4['lt'](_0xbce94c,_0x30d187):![];return{'installed':!![],'version':_0x4625f6,'needsUpgrade':_0x58c3c5,'minVersion':_0x27c69f,'packageName':_0x4c93b7,'stableVersion':_0x5b908c};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x27c69f,'packageName':_0x4c93b7,'stableVersion':_0x5b908c};}}export function checkSdkVersionSync(_0x72189f){const _0x1bfa3a=a70_0x2553d1,_0x559145=a70_0x29a409['join'](_0x72189f,_0x1bfa3a(0xb2)),_0x260e5a='@lovrabet/sdk';if(!a70_0x1c2639['existsSync'](_0x559145))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x260e5a,'stableVersion':null};try{const _0x3bb5b9=JSON[_0x1bfa3a(0xbe)](a70_0x1c2639[_0x1bfa3a(0xae)](_0x559145,_0x1bfa3a(0x98))),_0x3bb1b9=_0x3bb5b9[_0x1bfa3a(0x9a)]||{},_0x24d392=_0x3bb5b9['devDependencies']||{},_0x38edb4=_0x3bb1b9[_0x260e5a]||_0x24d392[_0x260e5a];if(!_0x38edb4)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x260e5a,'stableVersion':null};let _0x204023=getInstalledVersion(_0x72189f,_0x260e5a);!_0x204023&&(_0x204023=_0x38edb4);if(isNonNumericVersion(_0x38edb4))return{'installed':!![],'version':_0x204023,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x260e5a,'stableVersion':null};const _0x420f63=a70_0x51aaa4[_0x1bfa3a(0xba)](_0x204023),_0x3e4ba7=_0x420f63?a70_0x51aaa4['lt'](_0x420f63,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x204023,'needsUpgrade':_0x3e4ba7,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x260e5a,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x260e5a,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x4456ee){const _0x5d5d11=a70_0x2553d1;if(!_0x4456ee[_0x5d5d11(0xbb)])return;const _0x4a53a4='\x1b[33m',_0x460951='\x1b[0m',_0x418475=_0x5d5d11(0x9f),_0xbcfb1a=_0x4456ee['packageName']||'@lovrabet/sdk';console[_0x5d5d11(0xb0)](),console[_0x5d5d11(0xb0)](''+_0x4a53a4+_0x418475+_0x5d5d11(0xa1)+_0x460951),console[_0x5d5d11(0xb0)](_0x4a53a4+_0x5d5d11(0xa9)+_0xbcfb1a+'@'+_0x4456ee['version']+_0x460951),console[_0x5d5d11(0xb0)](_0x4a53a4+'\x20\x20\x20稳定版本:\x20'+(_0x4456ee[_0x5d5d11(0xb3)]||_0x4456ee[_0x5d5d11(0xa7)])+_0x460951),console[_0x5d5d11(0xb0)](_0x4a53a4+_0x5d5d11(0xab)+_0xbcfb1a+'@'+(_0x4456ee['stableVersion']||_0x5d5d11(0x9d))+_0x460951),console['log']();}
1
+ const a75_0xfbf196=a75_0x4b97;(function(_0x565e6c,_0x463f7a){const _0x2fc10d=a75_0x4b97,_0x65ada8=_0x565e6c();while(!![]){try{const _0x18d402=parseInt(_0x2fc10d(0x1f9))/0x1+-parseInt(_0x2fc10d(0x1e4))/0x2*(parseInt(_0x2fc10d(0x1f1))/0x3)+parseInt(_0x2fc10d(0x1f2))/0x4+parseInt(_0x2fc10d(0x1df))/0x5+parseInt(_0x2fc10d(0x1e6))/0x6+-parseInt(_0x2fc10d(0x1d7))/0x7+-parseInt(_0x2fc10d(0x1eb))/0x8;if(_0x18d402===_0x463f7a)break;else _0x65ada8['push'](_0x65ada8['shift']());}catch(_0x256fdb){_0x65ada8['push'](_0x65ada8['shift']());}}}(a75_0x5a9f,0x9262d));import a75_0x3bcca7 from'node:fs';import a75_0xf08880 from'node:path';import a75_0x13cfd4 from'semver';import{getCdnConfig}from'./cdn-config.js';import a75_0x5ddd90 from'../i18n/index.js';const t=a75_0x5ddd90['t'][a75_0xfbf196(0x1e8)](a75_0x5ddd90),FALLBACK_MIN_SDK_VERSION=a75_0xfbf196(0x1ef);function isNonNumericVersion(_0x468d44){const _0x1f9d4e=a75_0xfbf196,_0x2a7d3a=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x2a7d3a[_0x1f9d4e(0x1ee)](_0x3bfd49=>_0x3bfd49[_0x1f9d4e(0x1f6)](_0x468d44));}function getInstalledVersion(_0x2db0bf,_0x337fa7){const _0x443e6c=a75_0xfbf196;try{const _0x3a3d5b=a75_0xf08880[_0x443e6c(0x1d8)](_0x2db0bf,_0x443e6c(0x1f7),_0x337fa7,_0x443e6c(0x1f4));if(a75_0x3bcca7['existsSync'](_0x3a3d5b)){const _0x16eb6c=JSON[_0x443e6c(0x1ea)](a75_0x3bcca7['readFileSync'](_0x3a3d5b,_0x443e6c(0x1f5)));return _0x16eb6c[_0x443e6c(0x1f3)]||null;}}catch{}return null;}function a75_0x4b97(_0xd4d654,_0x446117){_0xd4d654=_0xd4d654-0x1d4;const _0x5a9f5e=a75_0x5a9f();let _0x4b9790=_0x5a9f5e[_0xd4d654];return _0x4b9790;}function a75_0x5a9f(){const _0x5b8f35=['stableVersion','4448955SXaGSj','join','upgrade.sdk.current','coerce','existsSync','devDependencies','minVersion','needsUpgrade','4428485IpkJFa','@lovrabet/sdk','\x1b[0m','readFileSync','utf8','6HMLaKJ','upgrade.sdk.command','3684396TkDBKt','sdk','bind','log','parse','13381144byvRgg','dependencies','all','some','1.2.0','\x1b[33m','71601byCwoq','3230720KxmxlY','version','package.json','utf-8','test','node_modules','\x1b[1m','671963kAXJkY','upgrade.sdk.stable','latest','node'];a75_0x5a9f=function(){return _0x5b8f35;};return a75_0x5a9f();}async function getSdkStableVersion(){const _0x2e02f4=a75_0xfbf196;try{const _0xa167b3=await getCdnConfig();return _0xa167b3?.[_0x2e02f4(0x1e7)]?.[_0x2e02f4(0x1d5)]?.[_0x2e02f4(0x1d6)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x3fcb80=a75_0xfbf196;try{const _0x57102b=await getCdnConfig();return _0x57102b?.[_0x3fcb80(0x1e7)]?.['node']?.['packageName']||'@lovrabet/sdk';}catch{return _0x3fcb80(0x1e0);}}export async function checkSdkVersion(_0x4eaf02){const _0x396d16=a75_0xfbf196,_0x2dcd0f=a75_0xf08880[_0x396d16(0x1d8)](_0x4eaf02,'package.json'),[_0x56e1a2,_0x408974]=await Promise[_0x396d16(0x1ed)]([getSdkStableVersion(),getSdkPackageName()]),_0x291461=_0x56e1a2||FALLBACK_MIN_SDK_VERSION;if(!a75_0x3bcca7[_0x396d16(0x1db)](_0x2dcd0f))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x291461,'packageName':_0x408974,'stableVersion':_0x56e1a2};try{const _0xecb045=JSON[_0x396d16(0x1ea)](a75_0x3bcca7[_0x396d16(0x1e2)](_0x2dcd0f,_0x396d16(0x1e3))),_0x528369=_0xecb045[_0x396d16(0x1ec)]||{},_0x5afd25=_0xecb045[_0x396d16(0x1dc)]||{},_0x499385=_0x528369[_0x408974]||_0x5afd25[_0x408974];if(!_0x499385)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x291461,'packageName':_0x408974,'stableVersion':_0x56e1a2};let _0x5dbc68=getInstalledVersion(_0x4eaf02,_0x408974);!_0x5dbc68&&(_0x5dbc68=_0x499385);if(isNonNumericVersion(_0x499385))return{'installed':!![],'version':_0x5dbc68,'needsUpgrade':![],'minVersion':_0x291461,'packageName':_0x408974,'stableVersion':_0x56e1a2};const _0x371c45=a75_0x13cfd4['coerce'](_0x5dbc68),_0x23e9a7=a75_0x13cfd4['coerce'](_0x291461),_0x1bb01f=_0x371c45&&_0x23e9a7?a75_0x13cfd4['lt'](_0x371c45,_0x23e9a7):![];return{'installed':!![],'version':_0x5dbc68,'needsUpgrade':_0x1bb01f,'minVersion':_0x291461,'packageName':_0x408974,'stableVersion':_0x56e1a2};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x291461,'packageName':_0x408974,'stableVersion':_0x56e1a2};}}export function checkSdkVersionSync(_0x1528cc){const _0x156177=a75_0xfbf196,_0x3499ae=a75_0xf08880['join'](_0x1528cc,_0x156177(0x1f4)),_0x5426fa='@lovrabet/sdk';if(!a75_0x3bcca7['existsSync'](_0x3499ae))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5426fa,'stableVersion':null};try{const _0x1dd20c=JSON['parse'](a75_0x3bcca7[_0x156177(0x1e2)](_0x3499ae,'utf8')),_0x222592=_0x1dd20c['dependencies']||{},_0x112349=_0x1dd20c[_0x156177(0x1dc)]||{},_0x2d8b6e=_0x222592[_0x5426fa]||_0x112349[_0x5426fa];if(!_0x2d8b6e)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5426fa,'stableVersion':null};let _0x4e50b2=getInstalledVersion(_0x1528cc,_0x5426fa);!_0x4e50b2&&(_0x4e50b2=_0x2d8b6e);if(isNonNumericVersion(_0x2d8b6e))return{'installed':!![],'version':_0x4e50b2,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5426fa,'stableVersion':null};const _0x442ac0=a75_0x13cfd4[_0x156177(0x1da)](_0x4e50b2),_0x427f50=_0x442ac0?a75_0x13cfd4['lt'](_0x442ac0,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x4e50b2,'needsUpgrade':_0x427f50,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5426fa,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5426fa,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x52b26c){const _0x5d35b4=a75_0xfbf196;if(!_0x52b26c[_0x5d35b4(0x1de)])return;const _0x4b78f7=_0x5d35b4(0x1f0),_0x142132=_0x5d35b4(0x1e1),_0x583e77=_0x5d35b4(0x1f8),_0x14ae3d=_0x52b26c['packageName']||_0x5d35b4(0x1e0),_0x3680b0=_0x52b26c[_0x5d35b4(0x1d6)]||_0x52b26c[_0x5d35b4(0x1dd)],_0x50ef09='npm\x20install\x20'+_0x14ae3d+'@'+(_0x3680b0||_0x5d35b4(0x1d4));console['log'](),console[_0x5d35b4(0x1e9)](''+_0x4b78f7+_0x583e77+t('upgrade.sdk.title')+_0x142132),console[_0x5d35b4(0x1e9)](''+_0x4b78f7+t(_0x5d35b4(0x1d9),{'package':_0x14ae3d,'version':_0x52b26c[_0x5d35b4(0x1f3)]})+_0x142132),console[_0x5d35b4(0x1e9)](''+_0x4b78f7+t(_0x5d35b4(0x1fa),{'version':_0x3680b0})+_0x142132),console[_0x5d35b4(0x1e9)](''+_0x4b78f7+t(_0x5d35b4(0x1e5),{'command':_0x50ef09})+_0x142132),console[_0x5d35b4(0x1e9)]();}
@@ -1 +1 @@
1
- (function(_0x1be858,_0x97e944){const _0x34c1fb=a71_0x5bc2,_0x1f70fb=_0x1be858();while(!![]){try{const _0xd9682a=parseInt(_0x34c1fb(0x9d))/0x1*(-parseInt(_0x34c1fb(0xa4))/0x2)+parseInt(_0x34c1fb(0xa5))/0x3+-parseInt(_0x34c1fb(0xad))/0x4*(parseInt(_0x34c1fb(0xaf))/0x5)+-parseInt(_0x34c1fb(0xaa))/0x6*(-parseInt(_0x34c1fb(0xb5))/0x7)+-parseInt(_0x34c1fb(0xa1))/0x8*(parseInt(_0x34c1fb(0xae))/0x9)+-parseInt(_0x34c1fb(0xa9))/0xa*(-parseInt(_0x34c1fb(0xac))/0xb)+-parseInt(_0x34c1fb(0xb0))/0xc*(-parseInt(_0x34c1fb(0xa7))/0xd);if(_0xd9682a===_0x97e944)break;else _0x1f70fb['push'](_0x1f70fb['shift']());}catch(_0x4cf28b){_0x1f70fb['push'](_0x1f70fb['shift']());}}}(a71_0x4d78,0x45895));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a71_0x3af56f from'semver';import{getCdnConfig}from'./cdn-config.js';function getCurrentCliVersion(){const _0x3d7607=a71_0x5bc2;try{const _0x1202e0=fileURLToPath(import.meta.url),_0xc58779=resolve(dirname(_0x1202e0),_0x3d7607(0xa2)),_0x5aa1d0=resolve(_0xc58779,_0x3d7607(0x9a)),_0xdcb6e0=JSON[_0x3d7607(0xa8)](readFileSync(_0x5aa1d0,_0x3d7607(0x9c)));return _0xdcb6e0['version']||'1.0.0';}catch{return'1.0.0';}}function a71_0x5bc2(_0x766f60,_0x2c570f){_0x766f60=_0x766f60-0x98;const _0x4d78a7=a71_0x4d78();let _0x5bc2f3=_0x4d78a7[_0x766f60];return _0x5bc2f3;}function isNonNumericVersion(_0x301786){const _0x86c135=a71_0x5bc2,_0x204f31=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x204f31[_0x86c135(0x9b)](_0xf22bd=>_0xf22bd[_0x86c135(0xb2)](_0x301786));}export async function checkCliVersion(){const _0x2ea2f5=a71_0x5bc2,_0x5f6abd=getCurrentCliVersion(),_0x165ba9=await getCdnConfig(),_0x2498b8=_0x165ba9?.[_0x2ea2f5(0xb1)]?.[_0x2ea2f5(0xab)]||null;let _0x270d25=![];if(_0x2498b8)try{const _0x2b9556=a71_0x3af56f[_0x2ea2f5(0xb4)](_0x5f6abd),_0x3e0982=a71_0x3af56f[_0x2ea2f5(0xb4)](_0x2498b8);_0x2b9556&&_0x3e0982&&(_0x270d25=a71_0x3af56f['lt'](_0x2b9556,_0x3e0982));}catch{_0x270d25=![];}return{'currentVersion':_0x5f6abd,'stableVersion':_0x2498b8,'needsUpgrade':_0x270d25,'isPreRelease':![]};}export function printCliUpgradeWarning(_0x25621f){const _0x4e95cf=a71_0x5bc2;if(!_0x25621f[_0x4e95cf(0x99)])return;const _0x2d2d2f=_0x4e95cf(0x9f),_0x32d59b=_0x4e95cf(0xb6),_0x10f23e=_0x4e95cf(0x98);console[_0x4e95cf(0xa0)](),console[_0x4e95cf(0xa0)](''+_0x2d2d2f+_0x10f23e+_0x4e95cf(0xa6)+_0x32d59b),console[_0x4e95cf(0xa0)](_0x2d2d2f+'\x20\x20\x20当前\x20CLI\x20版本:\x20'+_0x25621f[_0x4e95cf(0x9e)]+_0x32d59b),console[_0x4e95cf(0xa0)](_0x2d2d2f+_0x4e95cf(0xa3)+_0x25621f['stableVersion']+_0x32d59b),console[_0x4e95cf(0xa0)](_0x2d2d2f+_0x4e95cf(0xb3)+_0x32d59b),console[_0x4e95cf(0xa0)]();}function a71_0x4d78(){const _0x3b3ee9=['10DCUezt','522HmuAXi','stableVersion','555775bOjZxi','1772HerEwv','30663OsRNss','2465faHiwj','192KvFrKg','cli','test','\x20\x20\x20升级命令:\x20npm\x20install\x20-g\x20@lovrabet/cli@latest','coerce','30394vcKEkG','\x1b[0m','\x1b[1m','needsUpgrade','package.json','some','utf-8','219971KfIxFM','currentVersion','\x1b[33m','log','1096PRFypx','../..','\x20\x20\x20稳定版本:\x20','4JWSiZE','1015326mdWfLa','↪\x20新版本可用','522600xLhySd','parse'];a71_0x4d78=function(){return _0x3b3ee9;};return a71_0x4d78();}
1
+ (function(_0x540768,_0x1a3013){const _0x1dd41e=a76_0x25d2,_0x59a401=_0x540768();while(!![]){try{const _0x5d6c29=-parseInt(_0x1dd41e(0x12c))/0x1*(-parseInt(_0x1dd41e(0x129))/0x2)+parseInt(_0x1dd41e(0x131))/0x3+-parseInt(_0x1dd41e(0x140))/0x4+parseInt(_0x1dd41e(0x130))/0x5+-parseInt(_0x1dd41e(0x12b))/0x6*(-parseInt(_0x1dd41e(0x142))/0x7)+parseInt(_0x1dd41e(0x138))/0x8*(-parseInt(_0x1dd41e(0x13b))/0x9)+-parseInt(_0x1dd41e(0x12f))/0xa;if(_0x5d6c29===_0x1a3013)break;else _0x59a401['push'](_0x59a401['shift']());}catch(_0x488e3f){_0x59a401['push'](_0x59a401['shift']());}}}(a76_0x240b,0xb7b6e));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a76_0x412a24 from'semver';import{getCdnConfig}from'./cdn-config.js';function a76_0x240b(){const _0x1ed876=['test','1515474vFpzid','\x1b[33m','upgrade.cli.command','utf-8','\x1b[0m','3181716AAlFgf','version','49qnpolq','some','cli','52XrLPbn','stableVersion','870540BzDdFY','7988Vrbtuc','1.0.0','../..','10202460AKaqXz','5031015jxcjZX','2531418uPgcwx','package.json','coerce','parse','upgrade.cli.title','upgrade.cli.current','\x1b[1m','24hPJpRI','log'];a76_0x240b=function(){return _0x1ed876;};return a76_0x240b();}import a76_0x156c0f from'../i18n/index.js';const t=a76_0x156c0f['t']['bind'](a76_0x156c0f);function getCurrentCliVersion(){const _0x348ac7=a76_0x25d2;try{const _0x383571=fileURLToPath(import.meta.url),_0x2fe086=resolve(dirname(_0x383571),_0x348ac7(0x12e)),_0x5a643b=resolve(_0x2fe086,_0x348ac7(0x132)),_0x1572a5=JSON[_0x348ac7(0x134)](readFileSync(_0x5a643b,_0x348ac7(0x13e)));return _0x1572a5[_0x348ac7(0x141)]||_0x348ac7(0x12d);}catch{return _0x348ac7(0x12d);}}function isNonNumericVersion(_0x4962dc){const _0x511624=a76_0x25d2,_0x32e936=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x32e936[_0x511624(0x143)](_0x4d531e=>_0x4d531e[_0x511624(0x13a)](_0x4962dc));}export async function checkCliVersion(){const _0x4423ab=a76_0x25d2,_0x46cd7a=getCurrentCliVersion(),_0xfaa7b3=await getCdnConfig(),_0x5c9979=_0xfaa7b3?.[_0x4423ab(0x144)]?.[_0x4423ab(0x12a)]||null;let _0x4bdc6f=![];if(_0x5c9979)try{const _0x31dd00=a76_0x412a24[_0x4423ab(0x133)](_0x46cd7a),_0x292bee=a76_0x412a24['coerce'](_0x5c9979);_0x31dd00&&_0x292bee&&(_0x4bdc6f=a76_0x412a24['lt'](_0x31dd00,_0x292bee));}catch{_0x4bdc6f=![];}return{'currentVersion':_0x46cd7a,'stableVersion':_0x5c9979,'needsUpgrade':_0x4bdc6f,'isPreRelease':![]};}function a76_0x25d2(_0x1d04ce,_0x497036){_0x1d04ce=_0x1d04ce-0x129;const _0x240ba6=a76_0x240b();let _0x25d293=_0x240ba6[_0x1d04ce];return _0x25d293;}export function printCliUpgradeWarning(_0x339c49){const _0x15ed9f=a76_0x25d2;if(!_0x339c49['needsUpgrade'])return;const _0x5ee00d=_0x15ed9f(0x13c),_0x55e918=_0x15ed9f(0x13f),_0x57feea=_0x15ed9f(0x137),_0x299b04='npm\x20install\x20-g\x20@lovrabet/cli@latest';console[_0x15ed9f(0x139)](),console[_0x15ed9f(0x139)](''+_0x5ee00d+_0x57feea+t(_0x15ed9f(0x135))+_0x55e918),console['log'](''+_0x5ee00d+t(_0x15ed9f(0x136),{'version':_0x339c49['currentVersion']})+_0x55e918),console[_0x15ed9f(0x139)](''+_0x5ee00d+t('upgrade.cli.stable',{'version':_0x339c49[_0x15ed9f(0x12a)]})+_0x55e918),console[_0x15ed9f(0x139)](''+_0x5ee00d+t(_0x15ed9f(0x13d),{'command':_0x299b04})+_0x55e918),console[_0x15ed9f(0x139)]();}
@@ -1 +1 @@
1
- const a72_0x144850=a72_0x3e7b;(function(_0x225b1b,_0x5646dd){const _0x3fb9ec=a72_0x3e7b,_0xf2c86b=_0x225b1b();while(!![]){try{const _0x22d16d=-parseInt(_0x3fb9ec(0x169))/0x1*(-parseInt(_0x3fb9ec(0x16b))/0x2)+parseInt(_0x3fb9ec(0x16a))/0x3*(-parseInt(_0x3fb9ec(0x168))/0x4)+-parseInt(_0x3fb9ec(0x177))/0x5*(parseInt(_0x3fb9ec(0x16d))/0x6)+parseInt(_0x3fb9ec(0x164))/0x7+parseInt(_0x3fb9ec(0x16f))/0x8*(-parseInt(_0x3fb9ec(0x170))/0x9)+parseInt(_0x3fb9ec(0x174))/0xa*(parseInt(_0x3fb9ec(0x16e))/0xb)+parseInt(_0x3fb9ec(0x173))/0xc*(-parseInt(_0x3fb9ec(0x17a))/0xd);if(_0x22d16d===_0x5646dd)break;else _0xf2c86b['push'](_0xf2c86b['shift']());}catch(_0x3c9085){_0xf2c86b['push'](_0xf2c86b['shift']());}}}(a72_0x3137,0x5d81b));import{existsSync,readFileSync}from'node:fs';import{resolve}from'node:path';import{homedir}from'node:os';import{initEnv}from'../constant/env.js';function a72_0x3137(){const _0x5b0fc3=['string','trim','278192xuTGqT','1wJsFpG','6EpZixl','580956ZAcemy','replace','6MxoRbT','731434XYSvXq','40rOLxBt','247122DUEmZM','utf8','.lovrabetrc','552204DMDkDt','20ZZikxA','template_base_url','app','382245baJEiG','parse','cwd','65VIEMEw','env','3797199RNlwNn','appcode'];a72_0x3137=function(){return _0x5b0fc3;};return a72_0x3137();}export const projectConfigPath=resolve(process[a72_0x144850(0x179)](),a72_0x144850(0x172));export const globalConfigPath=resolve(homedir(),'.lovrabetrc');export function readConfig(_0x5dbcd0){const _0x41548a=a72_0x144850;let _0x3eee1={};try{if(existsSync(globalConfigPath)){const _0x200c72=readFileSync(globalConfigPath,{'encoding':'utf8'});_0x200c72&&(_0x3eee1=JSON['parse'](_0x200c72));}}catch(_0x5394e5){}try{const _0x504d27=_0x5dbcd0?resolve(_0x5dbcd0,_0x41548a(0x172)):projectConfigPath;if(existsSync(_0x504d27)){const _0x40dd44=readFileSync(_0x504d27,{'encoding':_0x41548a(0x171)});if(_0x40dd44){const _0x2e7b1a=JSON['parse'](_0x40dd44);_0x3eee1={..._0x3eee1,..._0x2e7b1a};}}}catch(_0x338768){}return _0x3eee1[_0x41548a(0x163)]&&typeof _0x3eee1[_0x41548a(0x163)]==='string'&&initEnv(_0x3eee1['env']),_0x3eee1;}export function getConfigAppCode(){const _0x2f4100=a72_0x144850;let _0xbb44eb={},_0x353ff2={};try{if(existsSync(globalConfigPath)){const _0x381075=readFileSync(globalConfigPath,{'encoding':'utf8'});_0x381075&&(_0x353ff2=JSON[_0x2f4100(0x178)](_0x381075));}}catch(_0x12f2b2){}try{if(existsSync(projectConfigPath)){const _0x3ffd3f=readFileSync(projectConfigPath,{'encoding':_0x2f4100(0x171)});_0x3ffd3f&&(_0xbb44eb=JSON[_0x2f4100(0x178)](_0x3ffd3f));}}catch(_0x546e71){}let _0x52da7b;if(_0x2f4100(0x165)in _0xbb44eb)_0x52da7b=_0xbb44eb[_0x2f4100(0x165)];else{if(_0x2f4100(0x176)in _0xbb44eb)_0x52da7b=_0xbb44eb['app'];else{if('appcode'in _0x353ff2)_0x52da7b=_0x353ff2[_0x2f4100(0x165)];else _0x2f4100(0x176)in _0x353ff2&&(_0x52da7b=_0x353ff2[_0x2f4100(0x176)]);}}if(typeof _0x52da7b!==_0x2f4100(0x166)||_0x52da7b[_0x2f4100(0x167)]()==='')return undefined;return _0x52da7b;}export function isInProject(){return existsSync(projectConfigPath);}function a72_0x3e7b(_0x142ce8,_0x339bb3){_0x142ce8=_0x142ce8-0x163;const _0x31375d=a72_0x3137();let _0x3e7b44=_0x31375d[_0x142ce8];return _0x3e7b44;}export function getTemplateBaseUrl(){const _0x37ad2e=a72_0x144850,_0x28bcaf=readConfig();if(_0x28bcaf[_0x37ad2e(0x175)]&&typeof _0x28bcaf[_0x37ad2e(0x175)]==='string')return _0x28bcaf[_0x37ad2e(0x175)][_0x37ad2e(0x16c)](/\/$/,'');return'https://g.lovrabet.com/dist/lovrabet-cli';}
1
+ const a77_0x196d33=a77_0x40cc;(function(_0x34e758,_0x5818bb){const _0x571528=a77_0x40cc,_0x1d7a41=_0x34e758();while(!![]){try{const _0x323d24=-parseInt(_0x571528(0x13a))/0x1+parseInt(_0x571528(0x139))/0x2+parseInt(_0x571528(0x13f))/0x3+-parseInt(_0x571528(0x143))/0x4*(parseInt(_0x571528(0x14a))/0x5)+-parseInt(_0x571528(0x144))/0x6*(-parseInt(_0x571528(0x137))/0x7)+parseInt(_0x571528(0x141))/0x8+-parseInt(_0x571528(0x140))/0x9;if(_0x323d24===_0x5818bb)break;else _0x1d7a41['push'](_0x1d7a41['shift']());}catch(_0x4f2c83){_0x1d7a41['push'](_0x1d7a41['shift']());}}}(a77_0x55a0,0x8eaaf));import{existsSync,readFileSync}from'node:fs';import{resolve}from'node:path';import{homedir}from'node:os';import{initEnv}from'../constant/env.js';function a77_0x55a0(){const _0xd7d188=['app','8gmBdGp','188022HiqFvs','utf8','env','template_base_url','.lovrabetrc','cwd','308090xTiDXz','7HWqdGo','parse','1098602gbpEKp','1050726nQFsyp','appcode','string','replace','https://g.lovrabet.com/dist/lovrabet-cli','1140840qciptD','348696DkzZXT','6689240BJQPBJ'];a77_0x55a0=function(){return _0xd7d188;};return a77_0x55a0();}export const projectConfigPath=resolve(process[a77_0x196d33(0x149)](),a77_0x196d33(0x148));export const globalConfigPath=resolve(homedir(),'.lovrabetrc');export function readConfig(_0x4566ef){const _0x4093a8=a77_0x196d33;let _0x2c045b={};try{if(existsSync(globalConfigPath)){const _0x1dfcb4=readFileSync(globalConfigPath,{'encoding':_0x4093a8(0x145)});_0x1dfcb4&&(_0x2c045b=JSON[_0x4093a8(0x138)](_0x1dfcb4));}}catch(_0x260098){}try{const _0xfcff72=_0x4566ef?resolve(_0x4566ef,_0x4093a8(0x148)):projectConfigPath;if(existsSync(_0xfcff72)){const _0x1f9fea=readFileSync(_0xfcff72,{'encoding':_0x4093a8(0x145)});if(_0x1f9fea){const _0x5b63a8=JSON[_0x4093a8(0x138)](_0x1f9fea);_0x2c045b={..._0x2c045b,..._0x5b63a8};}}}catch(_0x1cb832){}return _0x2c045b[_0x4093a8(0x146)]&&typeof _0x2c045b[_0x4093a8(0x146)]==='string'&&initEnv(_0x2c045b[_0x4093a8(0x146)]),_0x2c045b;}function a77_0x40cc(_0x421cf9,_0x55d53e){_0x421cf9=_0x421cf9-0x137;const _0x55a0df=a77_0x55a0();let _0x40ccc6=_0x55a0df[_0x421cf9];return _0x40ccc6;}export function getConfigAppCode(){const _0x35b7ec=a77_0x196d33;let _0x24a210={},_0x2ddd3f={};try{if(existsSync(globalConfigPath)){const _0x5dc822=readFileSync(globalConfigPath,{'encoding':_0x35b7ec(0x145)});_0x5dc822&&(_0x2ddd3f=JSON[_0x35b7ec(0x138)](_0x5dc822));}}catch(_0x2f69fc){}try{if(existsSync(projectConfigPath)){const _0x938c08=readFileSync(projectConfigPath,{'encoding':_0x35b7ec(0x145)});_0x938c08&&(_0x24a210=JSON[_0x35b7ec(0x138)](_0x938c08));}}catch(_0x162a96){}let _0x5b1a3d;if(_0x35b7ec(0x13b)in _0x24a210)_0x5b1a3d=_0x24a210[_0x35b7ec(0x13b)];else{if('app'in _0x24a210)_0x5b1a3d=_0x24a210['app'];else{if(_0x35b7ec(0x13b)in _0x2ddd3f)_0x5b1a3d=_0x2ddd3f[_0x35b7ec(0x13b)];else _0x35b7ec(0x142)in _0x2ddd3f&&(_0x5b1a3d=_0x2ddd3f['app']);}}if(typeof _0x5b1a3d!==_0x35b7ec(0x13c)||_0x5b1a3d['trim']()==='')return undefined;return _0x5b1a3d;}export function isInProject(){return existsSync(projectConfigPath);}export function getTemplateBaseUrl(){const _0x5e9fcf=a77_0x196d33,_0x393e4d=readConfig();if(_0x393e4d[_0x5e9fcf(0x147)]&&typeof _0x393e4d['template_base_url']==='string')return _0x393e4d['template_base_url'][_0x5e9fcf(0x13d)](/\/$/,'');return _0x5e9fcf(0x13e);}
@@ -1 +1 @@
1
- (function(_0x4d2dbf,_0x4f8280){const _0x395f1d=a73_0x1678,_0x35ee8b=_0x4d2dbf();while(!![]){try{const _0x2685af=parseInt(_0x395f1d(0x157))/0x1*(-parseInt(_0x395f1d(0x152))/0x2)+parseInt(_0x395f1d(0x158))/0x3*(parseInt(_0x395f1d(0x15a))/0x4)+parseInt(_0x395f1d(0x153))/0x5*(parseInt(_0x395f1d(0x150))/0x6)+parseInt(_0x395f1d(0x160))/0x7+parseInt(_0x395f1d(0x155))/0x8*(parseInt(_0x395f1d(0x156))/0x9)+parseInt(_0x395f1d(0x154))/0xa+parseInt(_0x395f1d(0x15f))/0xb*(-parseInt(_0x395f1d(0x15b))/0xc);if(_0x2685af===_0x4f8280)break;else _0x35ee8b['push'](_0x35ee8b['shift']());}catch(_0x507c04){_0x35ee8b['push'](_0x35ee8b['shift']());}}}(a73_0x2221,0xcfe89));function a73_0x2221(){const _0x161247=['isDirectory','4135188ywSbfX','name','6OaTZJX','5tZdUQu','11769700uzGILk','8QmVmvO','1651167Ncivgz','310586XCEOXg','419430rWtLZI','复制目录时出错:','16mFoHNj','1890348sTrAJS','copyFileSync','readdirSync','join','88IfhNvk','3042984zwDNZr','mkdirSync'];a73_0x2221=function(){return _0x161247;};return a73_0x2221();}import a73_0x5e2f40 from'node:path';import a73_0x3c47fa from'node:fs';function a73_0x1678(_0x59233f,_0x9a491b){_0x59233f=_0x59233f-0x150;const _0x222123=a73_0x2221();let _0x167827=_0x222123[_0x59233f];return _0x167827;}export async function copyDirectory(_0x45a22e,_0x4b365e){const _0x15d496=a73_0x1678;try{const _0x52cef2=a73_0x3c47fa[_0x15d496(0x15d)](_0x45a22e,{'withFileTypes':!![]});a73_0x3c47fa[_0x15d496(0x161)](_0x4b365e,{'recursive':!![]});for(const _0x402f9c of _0x52cef2){const _0x57d263=a73_0x5e2f40[_0x15d496(0x15e)](_0x45a22e,_0x402f9c[_0x15d496(0x151)]),_0x2b6a1d=a73_0x5e2f40[_0x15d496(0x15e)](_0x4b365e,_0x402f9c[_0x15d496(0x151)]);_0x402f9c[_0x15d496(0x162)]()?await copyDirectory(_0x57d263,_0x2b6a1d):a73_0x3c47fa[_0x15d496(0x15c)](_0x57d263,_0x2b6a1d);}}catch(_0x31abf8){console['error'](_0x15d496(0x159),_0x31abf8);}}
1
+ (function(_0x12d370,_0x20e015){const _0x2d1b53=a78_0x185a,_0x18aa19=_0x12d370();while(!![]){try{const _0x34d3d0=parseInt(_0x2d1b53(0x6b))/0x1+parseInt(_0x2d1b53(0x6a))/0x2*(parseInt(_0x2d1b53(0x76))/0x3)+-parseInt(_0x2d1b53(0x6f))/0x4+-parseInt(_0x2d1b53(0x6d))/0x5+parseInt(_0x2d1b53(0x70))/0x6*(parseInt(_0x2d1b53(0x68))/0x7)+-parseInt(_0x2d1b53(0x69))/0x8*(parseInt(_0x2d1b53(0x66))/0x9)+parseInt(_0x2d1b53(0x74))/0xa*(parseInt(_0x2d1b53(0x6c))/0xb);if(_0x34d3d0===_0x20e015)break;else _0x18aa19['push'](_0x18aa19['shift']());}catch(_0x39deb0){_0x18aa19['push'](_0x18aa19['shift']());}}}(a78_0x5b12,0xdbdc4));import a78_0x19d6ac from'node:path';import a78_0x39b540 from'node:fs';function a78_0x185a(_0x1553aa,_0x5e57b9){_0x1553aa=_0x1553aa-0x66;const _0x5b1281=a78_0x5b12();let _0x185a0f=_0x5b1281[_0x1553aa];return _0x185a0f;}export async function copyDirectory(_0x449e66,_0x3e0acc){const _0x26f6fa=a78_0x185a;try{const _0x2132cb=a78_0x39b540['readdirSync'](_0x449e66,{'withFileTypes':!![]});a78_0x39b540[_0x26f6fa(0x71)](_0x3e0acc,{'recursive':!![]});for(const _0xeb3733 of _0x2132cb){const _0x26d4c0=a78_0x19d6ac[_0x26f6fa(0x72)](_0x449e66,_0xeb3733[_0x26f6fa(0x75)]),_0x10137a=a78_0x19d6ac[_0x26f6fa(0x72)](_0x3e0acc,_0xeb3733[_0x26f6fa(0x75)]);_0xeb3733[_0x26f6fa(0x73)]()?await copyDirectory(_0x26d4c0,_0x10137a):a78_0x39b540['copyFileSync'](_0x26d4c0,_0x10137a);}}catch(_0x511236){console[_0x26f6fa(0x6e)](_0x26f6fa(0x67),_0x511236);}}function a78_0x5b12(){const _0x251bc6=['1560611SZPnAY','3817kBlJrS','5279260FzcwCT','error','5835848aPQGrD','897090ZojFfy','mkdirSync','join','isDirectory','3290ZGdLXg','name','1299GPCPLc','3870zwtZFs','复制目录时出错:','77yunPoQ','1768dYkVFY','882pcbvRB'];a78_0x5b12=function(){return _0x251bc6;};return a78_0x5b12();}
@@ -1 +1 @@
1
- function a74_0x5875(){const _0x58650d=['5643080Xfbuno','645xSGJLD','5452805fmAaSk','32kpdvhg','41935652MVPBzK','isDirectory','13149346VcBgUr','10988ZGngwT','1593lTHQKc','56054XOYJzX','6576PMpLJO','6HWfsrs'];a74_0x5875=function(){return _0x58650d;};return a74_0x5875();}(function(_0x576bfc,_0x1a79d9){const _0x32bdce=a74_0x1fc0,_0x1b9bd4=_0x576bfc();while(!![]){try{const _0x38c6c5=parseInt(_0x32bdce(0x1a6))/0x1*(-parseInt(_0x32bdce(0x1ac))/0x2)+-parseInt(_0x32bdce(0x1a4))/0x3*(-parseInt(_0x32bdce(0x1aa))/0x4)+parseInt(_0x32bdce(0x1a5))/0x5*(-parseInt(_0x32bdce(0x1a2))/0x6)+-parseInt(_0x32bdce(0x1a9))/0x7+-parseInt(_0x32bdce(0x1a1))/0x8*(parseInt(_0x32bdce(0x1ab))/0x9)+parseInt(_0x32bdce(0x1a3))/0xa+parseInt(_0x32bdce(0x1a7))/0xb;if(_0x38c6c5===_0x1a79d9)break;else _0x1b9bd4['push'](_0x1b9bd4['shift']());}catch(_0x57713c){_0x1b9bd4['push'](_0x1b9bd4['shift']());}}}(a74_0x5875,0xe95c8));function a74_0x1fc0(_0x14842d,_0x2d5ccb){_0x14842d=_0x14842d-0x1a1;const _0x58756e=a74_0x5875();let _0x1fc0b8=_0x58756e[_0x14842d];return _0x1fc0b8;}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x6e5fb9,_0x19d745){const _0x2df0e4=a74_0x1fc0,_0x2f12ba=statSync(_0x6e5fb9);if(_0x2f12ba[_0x2df0e4(0x1a8)]()){!existsSync(_0x19d745)&&mkdirSync(_0x19d745,{'recursive':!![]});const _0x5534b2=readdirSync(_0x6e5fb9);for(const _0x2bd939 of _0x5534b2){await copyDir(join(_0x6e5fb9,_0x2bd939),join(_0x19d745,_0x2bd939));}}else copyFileSync(_0x6e5fb9,_0x19d745);}export function ensureDir(_0x2193d3){!existsSync(_0x2193d3)&&mkdirSync(_0x2193d3,{'recursive':!![]});}export function pathExists(_0x48b6be){return existsSync(_0x48b6be);}
1
+ (function(_0x305102,_0x4dd41f){const _0x13ec54=a79_0xc883,_0x3eb9e7=_0x305102();while(!![]){try{const _0x30f07c=parseInt(_0x13ec54(0x1a6))/0x1*(parseInt(_0x13ec54(0x1a7))/0x2)+-parseInt(_0x13ec54(0x1a3))/0x3*(-parseInt(_0x13ec54(0x1ab))/0x4)+-parseInt(_0x13ec54(0x1a0))/0x5*(-parseInt(_0x13ec54(0x1aa))/0x6)+parseInt(_0x13ec54(0x1a5))/0x7*(-parseInt(_0x13ec54(0x1a4))/0x8)+parseInt(_0x13ec54(0x1a8))/0x9*(-parseInt(_0x13ec54(0x19e))/0xa)+-parseInt(_0x13ec54(0x1a9))/0xb*(parseInt(_0x13ec54(0x1a2))/0xc)+-parseInt(_0x13ec54(0x19f))/0xd;if(_0x30f07c===_0x4dd41f)break;else _0x3eb9e7['push'](_0x3eb9e7['shift']());}catch(_0x589584){_0x3eb9e7['push'](_0x3eb9e7['shift']());}}}(a79_0x4cbb,0x1d348));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a79_0x4cbb(){const _0x35d2f9=['692135QufyRw','isDirectory','60ZIpZCP','6LxWnpd','1048mcwqUa','1337saDNHc','2074WGuZgQ','102DMQoKr','9EfFCLR','420926jPNgaZ','6pQHxWF','379856AswVFI','885140vfVjaX','125320IMRPlu'];a79_0x4cbb=function(){return _0x35d2f9;};return a79_0x4cbb();}export async function copyDir(_0x5d82fd,_0xe02d22){const _0x419d73=a79_0xc883,_0x5c35f5=statSync(_0x5d82fd);if(_0x5c35f5[_0x419d73(0x1a1)]()){!existsSync(_0xe02d22)&&mkdirSync(_0xe02d22,{'recursive':!![]});const _0x25d41c=readdirSync(_0x5d82fd);for(const _0x293f45 of _0x25d41c){await copyDir(join(_0x5d82fd,_0x293f45),join(_0xe02d22,_0x293f45));}}else copyFileSync(_0x5d82fd,_0xe02d22);}export function ensureDir(_0x4c19bd){!existsSync(_0x4c19bd)&&mkdirSync(_0x4c19bd,{'recursive':!![]});}function a79_0xc883(_0x12f241,_0xe0aefe){_0x12f241=_0x12f241-0x19e;const _0x4cbbec=a79_0x4cbb();let _0xc883a3=_0x4cbbec[_0x12f241];return _0xc883a3;}export function pathExists(_0x5a9422){return existsSync(_0x5a9422);}
@@ -1 +1 @@
1
- const a75_0x249fe2=a75_0x4bb1;(function(_0x373af5,_0x2aac71){const _0x4fd947=a75_0x4bb1,_0x17a20d=_0x373af5();while(!![]){try{const _0x4862dd=parseInt(_0x4fd947(0x189))/0x1+parseInt(_0x4fd947(0x190))/0x2+parseInt(_0x4fd947(0x199))/0x3+-parseInt(_0x4fd947(0x1a1))/0x4*(parseInt(_0x4fd947(0x192))/0x5)+-parseInt(_0x4fd947(0x1a6))/0x6+-parseInt(_0x4fd947(0x187))/0x7+parseInt(_0x4fd947(0x18e))/0x8*(-parseInt(_0x4fd947(0x17e))/0x9);if(_0x4862dd===_0x2aac71)break;else _0x17a20d['push'](_0x17a20d['shift']());}catch(_0x3dd11d){_0x17a20d['push'](_0x17a20d['shift']());}}}(a75_0x4cc1,0xee5c6));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{getTemplateBaseUrl}from'./config.js';function getGuidesCdnUrl(){const _0x35b183=getTemplateBaseUrl();return _0x35b183+'/skills/guides.json';}function getGuidesExtendCdnUrl(){const _0x10ffbd=a75_0x4bb1,_0x24e306=getTemplateBaseUrl();return _0x24e306+_0x10ffbd(0x197);}function a75_0x4bb1(_0x4dc7bd,_0x5f24ba){_0x4dc7bd=_0x4dc7bd-0x17d;const _0x4cc1c0=a75_0x4cc1();let _0x4bb1c2=_0x4cc1c0[_0x4dc7bd];return _0x4bb1c2;}const CACHE_DIR=join(process['env'][a75_0x249fe2(0x19c)]||process[a75_0x249fe2(0x181)]['USERPROFILE']||'',a75_0x249fe2(0x18a),a75_0x249fe2(0x1a2));export async function fetchGuidesFromCDN(_0x3d62a8=![]){const _0x514f40=a75_0x249fe2,_0x1cd2b1=getGuidesCdnUrl(),_0xab1ffd=await fetch(_0x1cd2b1,{'headers':{'Accept':'application/json'}});if(!_0xab1ffd['ok'])throw new Error(_0x514f40(0x1a3)+_0xab1ffd['status']+'\x20'+_0xab1ffd[_0x514f40(0x17d)]);const _0x390645=await _0xab1ffd['json']();if(!_0x390645['guides']||typeof _0x390645[_0x514f40(0x19a)]!==_0x514f40(0x1a5))throw new Error('CDN\x20返回数据格式错误');if(!_0x3d62a8)return _0x390645;try{const _0x441e3b=getGuidesExtendCdnUrl(),_0x41cb1e=await fetch(_0x441e3b,{'headers':{'Accept':_0x514f40(0x182)}});if(_0x41cb1e['ok']){const _0xb3dd75=await _0x41cb1e[_0x514f40(0x18d)]();_0xb3dd75[_0x514f40(0x19a)]&&typeof _0xb3dd75[_0x514f40(0x19a)]===_0x514f40(0x1a5)&&(_0x390645[_0x514f40(0x19a)]={..._0x390645[_0x514f40(0x19a)],..._0xb3dd75[_0x514f40(0x19a)]});}}catch{}return _0x390645;}export function writeGuidesToProject(_0x1c2c05,_0x217d35,_0x5caf0f=a75_0x249fe2(0x19f),_0x3a42ca){const _0x73e1b3=a75_0x249fe2,_0x45c114=join(_0x217d35,_0x5caf0f);for(const [_0x51bb22,_0xd34003]of Object[_0x73e1b3(0x18f)](_0x1c2c05['guides'])){if(_0xd34003['requireFlags']&&_0xd34003['requireFlags'][_0x73e1b3(0x1a9)]>0x0){const _0x24312c=_0xd34003[_0x73e1b3(0x188)][_0x73e1b3(0x1a8)](_0x26dcc3=>_0x3a42ca?.['includes'](_0x26dcc3));if(!_0x24312c)continue;}const _0x344d48=join(_0x45c114,_0x51bb22);mkdirSync(_0x344d48,{'recursive':!![]});let _0x33b04b=_0xd34003[_0x73e1b3(0x196)];_0xd34003[_0x73e1b3(0x186)]&&(_0x33b04b=appendUpdateTime(_0x33b04b,_0xd34003[_0x73e1b3(0x186)])),writeFileSync(join(_0x344d48,_0x73e1b3(0x1a7)),_0x33b04b,_0x73e1b3(0x18b));}}export function appendUpdateTime(_0x233e74,_0x43d3a2){const _0x1ae999=a75_0x249fe2;return _0x233e74=_0x233e74[_0x1ae999(0x1a0)](/\n*>更新时间:.*$/m,''),_0x233e74['trimEnd']()+('\x0a\x0a>更新时间:'+_0x43d3a2);}export function getSkillTemplate(_0x43b21f){const _0x23d797=a75_0x249fe2;return _0x43b21f[_0x23d797(0x185)]?.[_0x23d797(0x196)]||'';}export function appendExtendContents(_0x8a8e8f,_0x2ecd92,_0x2b4f5a){const _0x4f6580=a75_0x249fe2,_0x315fec=[];for(const [_0x34d10b,_0x795566]of Object['entries'](_0x2ecd92[_0x4f6580(0x19a)])){if(_0x795566[_0x4f6580(0x188)]&&_0x795566[_0x4f6580(0x188)][_0x4f6580(0x1a9)]>0x0){const _0x4ba05b=_0x795566[_0x4f6580(0x188)][_0x4f6580(0x1a8)](_0x244b97=>_0x2b4f5a?.[_0x4f6580(0x193)](_0x244b97));if(!_0x4ba05b)continue;}_0x795566[_0x4f6580(0x184)]&&_0x315fec['push'](_0x795566[_0x4f6580(0x184)][_0x4f6580(0x194)]());}if(_0x315fec['length']===0x0)return _0x8a8e8f;return _0x8a8e8f[_0x4f6580(0x194)]()+'\x0a\x0a'+_0x315fec[_0x4f6580(0x183)]('\x0a\x0a')+'\x0a';}function a75_0x4cc1(){const _0x3eb3c4=['HOME','\x0a<!--\x20GUIDES_APPEND\x20-->','<!--\x20GUIDES_APPEND\x20-->','.lovrabet/skill/.shared/guides','replace','3656476Rjnbgo','cache','CDN\x20请求失败:\x20','sort','object','3237360yEvgse','guide.md','some','length','statusText','9vkzmZC','|\x20`','path','env','application/json','join','extendContent','skillTemplate','lastUpdated','2367421radqbH','requireFlags','705949JsJWoq','.lovrabet','utf-8','keys','json','11936048qFSrpY','entries','3462192msxSkK','title','5lQTnZC','includes','trimEnd','CDN\x20数据中缺少\x20skillTemplate','content','/skills/guides-extend.json','map','5469507tSfkXV','guides','`\x20|\x20'];a75_0x4cc1=function(){return _0x3eb3c4;};return a75_0x4cc1();}export function writeSkillFile(_0x11b078,_0x5294d3,_0x5d9b3b,_0x3cbb43){const _0x993dbb=a75_0x249fe2,_0x52e00f=getSkillTemplate(_0x11b078);if(!_0x52e00f)throw new Error(_0x993dbb(0x195));const _0x29b6d5=dirname(_0x5294d3);mkdirSync(_0x29b6d5,{'recursive':!![]});let _0x5a02c2=_0x52e00f[_0x993dbb(0x1a0)](/\{\{IDE_NAME\}\}/g,_0x5d9b3b);_0x5a02c2=insertGuidesSection(_0x5a02c2,_0x11b078,_0x3cbb43),_0x5a02c2=appendExtendContents(_0x5a02c2,_0x11b078,_0x3cbb43),_0x11b078[_0x993dbb(0x185)]['lastUpdated']&&(_0x5a02c2=appendUpdateTime(_0x5a02c2,_0x11b078[_0x993dbb(0x185)][_0x993dbb(0x186)])),writeFileSync(_0x5294d3,_0x5a02c2,'utf-8');}export function insertGuidesSection(_0x2997d9,_0x1f7bfc,_0x4f9dbc){const _0x4d1664=a75_0x249fe2,_0x1e7747='<!--\x20GUIDES_APPEND\x20-->',_0x56a742=_0x2997d9['indexOf'](_0x1e7747);if(_0x56a742===-0x1)return _0x2997d9;const _0x50e8ba=[],_0x3e048f=Object[_0x4d1664(0x18c)](_0x1f7bfc[_0x4d1664(0x19a)])[_0x4d1664(0x1a4)]();for(const _0xd9d055 of _0x3e048f){const _0x3dc00d=_0x1f7bfc['guides'][_0xd9d055];if(!_0x3dc00d)continue;if(/^0[1-6]-/['test'](_0xd9d055))continue;if(_0x3dc00d[_0x4d1664(0x188)]&&_0x3dc00d[_0x4d1664(0x188)][_0x4d1664(0x1a9)]>0x0){const _0x12b92a=_0x3dc00d['requireFlags']['some'](_0x4f3cbe=>_0x4f9dbc?.['includes'](_0x4f3cbe));if(!_0x12b92a)continue;}const _0x461972=_0x3dc00d[_0x4d1664(0x180)]['replace'](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x50e8ba['push'](_0x4d1664(0x17f)+_0x461972+_0x4d1664(0x19b)+_0x3dc00d[_0x4d1664(0x191)]+'\x20|');}if(_0x50e8ba[_0x4d1664(0x1a9)]===0x0)return _0x2997d9[_0x4d1664(0x1a0)](_0x1e7747,_0x4d1664(0x19e));const _0x1ccefe=_0x50e8ba['join']('\x0a');return _0x2997d9[_0x4d1664(0x1a0)](_0x1e7747,_0x1ccefe+_0x4d1664(0x19d));}export async function installGuides(_0x37e885){const _0x587cb3=a75_0x249fe2,_0x30c406=await fetchGuidesFromCDN();return writeGuidesToProject(_0x30c406,_0x37e885),Object['keys'](_0x30c406[_0x587cb3(0x19a)])[_0x587cb3(0x1a9)];}export function getGuidesSummary(_0x41b643){const _0x1c49c4=a75_0x249fe2;return Object[_0x1c49c4(0x18f)](_0x41b643[_0x1c49c4(0x19a)])[_0x1c49c4(0x198)](([_0x1abfca,_0xe6cfc])=>({'key':_0x1abfca,'title':_0xe6cfc[_0x1c49c4(0x191)],'path':_0xe6cfc[_0x1c49c4(0x180)]}));}
1
+ const a80_0x4f4b6b=a80_0x5d4f;(function(_0xd6fc92,_0x28d56){const _0x251189=a80_0x5d4f,_0x189ca8=_0xd6fc92();while(!![]){try{const _0x4d0db9=parseInt(_0x251189(0x11c))/0x1*(parseInt(_0x251189(0x124))/0x2)+-parseInt(_0x251189(0x109))/0x3+-parseInt(_0x251189(0x119))/0x4+-parseInt(_0x251189(0x110))/0x5+-parseInt(_0x251189(0x121))/0x6+parseInt(_0x251189(0x11b))/0x7*(-parseInt(_0x251189(0x11e))/0x8)+-parseInt(_0x251189(0x10b))/0x9*(-parseInt(_0x251189(0x116))/0xa);if(_0x4d0db9===_0x28d56)break;else _0x189ca8['push'](_0x189ca8['shift']());}catch(_0x1ee36d){_0x189ca8['push'](_0x189ca8['shift']());}}}(a80_0xfbc4,0xc57ba));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{getTemplateBaseUrl}from'./config.js';function a80_0xfbc4(){const _0xa6a4bc=['trimEnd','1233174gqjqPO','push','171pAJcwe','utf-8','\x0a<!--\x20GUIDES_APPEND\x20-->','env','length','110395hETeLo','CDN\x20请求失败:\x20','entries','CDN\x20数据中缺少\x20skillTemplate','|\x20`','lastUpdated','757970zCWhfp','skillTemplate','join','1731716srBAYj','application/json','21wCJEQV','1409127aFFlyh','path','1332824DumsfV','\x0a\x0a>更新时间:','extendContent','4047030Gjrdnr','map','object','2nnaJIE','includes','.lovrabet','requireFlags','json','/skills/guides.json','test','<!--\x20GUIDES_APPEND\x20-->','some','.lovrabet/skill/.shared/guides','replace','guides','keys','status','statusText','guide.md','title','`\x20|\x20','USERPROFILE','HOME'];a80_0xfbc4=function(){return _0xa6a4bc;};return a80_0xfbc4();}function getGuidesCdnUrl(){const _0x3ddcca=a80_0x5d4f,_0x539806=getTemplateBaseUrl();return _0x539806+_0x3ddcca(0xf9);}function getGuidesExtendCdnUrl(){const _0x42bfa8=getTemplateBaseUrl();return _0x42bfa8+'/skills/guides-extend.json';}const CACHE_DIR=join(process[a80_0x4f4b6b(0x10e)][a80_0x4f4b6b(0x107)]||process['env'][a80_0x4f4b6b(0x106)]||'',a80_0x4f4b6b(0x126),'cache');export async function fetchGuidesFromCDN(_0x5be83c=![]){const _0x304134=a80_0x4f4b6b,_0x301d9f=getGuidesCdnUrl(),_0x44087c=await fetch(_0x301d9f,{'headers':{'Accept':_0x304134(0x11a)}});if(!_0x44087c['ok'])throw new Error(_0x304134(0x111)+_0x44087c[_0x304134(0x101)]+'\x20'+_0x44087c[_0x304134(0x102)]);const _0x57fcd5=await _0x44087c[_0x304134(0xf8)]();if(!_0x57fcd5[_0x304134(0xff)]||typeof _0x57fcd5[_0x304134(0xff)]!==_0x304134(0x123))throw new Error('CDN\x20返回数据格式错误');if(!_0x5be83c)return _0x57fcd5;try{const _0x51c915=getGuidesExtendCdnUrl(),_0x476c6d=await fetch(_0x51c915,{'headers':{'Accept':_0x304134(0x11a)}});if(_0x476c6d['ok']){const _0x52681b=await _0x476c6d['json']();_0x52681b[_0x304134(0xff)]&&typeof _0x52681b['guides']===_0x304134(0x123)&&(_0x57fcd5[_0x304134(0xff)]={..._0x57fcd5[_0x304134(0xff)],..._0x52681b[_0x304134(0xff)]});}}catch{}return _0x57fcd5;}export function writeGuidesToProject(_0x25d880,_0x5d44ac,_0x3f2559=a80_0x4f4b6b(0xfd),_0x175ef1){const _0x225749=a80_0x4f4b6b,_0x2418ec=join(_0x5d44ac,_0x3f2559);for(const [_0x125ad8,_0x2e8e87]of Object[_0x225749(0x112)](_0x25d880[_0x225749(0xff)])){if(_0x2e8e87[_0x225749(0xf7)]&&_0x2e8e87[_0x225749(0xf7)][_0x225749(0x10f)]>0x0){const _0x47f3af=_0x2e8e87[_0x225749(0xf7)][_0x225749(0xfc)](_0x2ecd1a=>_0x175ef1?.[_0x225749(0x125)](_0x2ecd1a));if(!_0x47f3af)continue;}const _0xd18a54=join(_0x2418ec,_0x125ad8);mkdirSync(_0xd18a54,{'recursive':!![]});let _0x3b6633=_0x2e8e87['content'];_0x2e8e87[_0x225749(0x115)]&&(_0x3b6633=appendUpdateTime(_0x3b6633,_0x2e8e87['lastUpdated'])),writeFileSync(join(_0xd18a54,_0x225749(0x103)),_0x3b6633,_0x225749(0x10c));}}export function appendUpdateTime(_0xa12182,_0xba4429){const _0x568932=a80_0x4f4b6b;return _0xa12182=_0xa12182[_0x568932(0xfe)](/\n*>更新时间:.*$/m,''),_0xa12182[_0x568932(0x108)]()+(_0x568932(0x11f)+_0xba4429);}export function getSkillTemplate(_0x212d04){const _0x4b1a2c=a80_0x4f4b6b;return _0x212d04[_0x4b1a2c(0x117)]?.['content']||'';}export function appendExtendContents(_0x13173c,_0x1c58e2,_0x408c83){const _0x4cdf38=a80_0x4f4b6b,_0xf094a2=[];for(const [_0x376d1d,_0x55ef94]of Object[_0x4cdf38(0x112)](_0x1c58e2['guides'])){if(_0x55ef94[_0x4cdf38(0xf7)]&&_0x55ef94[_0x4cdf38(0xf7)][_0x4cdf38(0x10f)]>0x0){const _0x9723de=_0x55ef94[_0x4cdf38(0xf7)][_0x4cdf38(0xfc)](_0x112272=>_0x408c83?.['includes'](_0x112272));if(!_0x9723de)continue;}_0x55ef94[_0x4cdf38(0x120)]&&_0xf094a2[_0x4cdf38(0x10a)](_0x55ef94[_0x4cdf38(0x120)][_0x4cdf38(0x108)]());}if(_0xf094a2[_0x4cdf38(0x10f)]===0x0)return _0x13173c;return _0x13173c[_0x4cdf38(0x108)]()+'\x0a\x0a'+_0xf094a2[_0x4cdf38(0x118)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x2e76c8,_0x3c502a,_0x1d729d,_0x58120c){const _0x46d2c3=a80_0x4f4b6b,_0x302fb3=getSkillTemplate(_0x2e76c8);if(!_0x302fb3)throw new Error(_0x46d2c3(0x113));const _0x173701=dirname(_0x3c502a);mkdirSync(_0x173701,{'recursive':!![]});let _0x35706e=_0x302fb3[_0x46d2c3(0xfe)](/\{\{IDE_NAME\}\}/g,_0x1d729d);_0x35706e=insertGuidesSection(_0x35706e,_0x2e76c8,_0x58120c),_0x35706e=appendExtendContents(_0x35706e,_0x2e76c8,_0x58120c),_0x2e76c8[_0x46d2c3(0x117)][_0x46d2c3(0x115)]&&(_0x35706e=appendUpdateTime(_0x35706e,_0x2e76c8[_0x46d2c3(0x117)][_0x46d2c3(0x115)])),writeFileSync(_0x3c502a,_0x35706e,_0x46d2c3(0x10c));}function a80_0x5d4f(_0x29f898,_0x20d3a3){_0x29f898=_0x29f898-0xf7;const _0xfbc46e=a80_0xfbc4();let _0x5d4f6f=_0xfbc46e[_0x29f898];return _0x5d4f6f;}export function insertGuidesSection(_0x4e68fd,_0x22bb4e,_0x15d101){const _0x3c6bd6=a80_0x4f4b6b,_0x29d1f4='<!--\x20GUIDES_APPEND\x20-->',_0x4622fc=_0x4e68fd['indexOf'](_0x29d1f4);if(_0x4622fc===-0x1)return _0x4e68fd;const _0x1944e6=[],_0x51301f=Object[_0x3c6bd6(0x100)](_0x22bb4e[_0x3c6bd6(0xff)])['sort']();for(const _0x1b969d of _0x51301f){const _0x17045c=_0x22bb4e[_0x3c6bd6(0xff)][_0x1b969d];if(!_0x17045c)continue;if(/^0[1-6]-/[_0x3c6bd6(0xfa)](_0x1b969d))continue;if(_0x17045c[_0x3c6bd6(0xf7)]&&_0x17045c[_0x3c6bd6(0xf7)][_0x3c6bd6(0x10f)]>0x0){const _0x152c54=_0x17045c[_0x3c6bd6(0xf7)]['some'](_0x28eb16=>_0x15d101?.['includes'](_0x28eb16));if(!_0x152c54)continue;}const _0x58f903=_0x17045c[_0x3c6bd6(0x11d)][_0x3c6bd6(0xfe)](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x1944e6[_0x3c6bd6(0x10a)](_0x3c6bd6(0x114)+_0x58f903+_0x3c6bd6(0x105)+_0x17045c[_0x3c6bd6(0x104)]+'\x20|');}if(_0x1944e6[_0x3c6bd6(0x10f)]===0x0)return _0x4e68fd[_0x3c6bd6(0xfe)](_0x29d1f4,_0x3c6bd6(0xfb));const _0x5150a7=_0x1944e6[_0x3c6bd6(0x118)]('\x0a');return _0x4e68fd[_0x3c6bd6(0xfe)](_0x29d1f4,_0x5150a7+_0x3c6bd6(0x10d));}export async function installGuides(_0x170018){const _0x313434=a80_0x4f4b6b,_0x559129=await fetchGuidesFromCDN();return writeGuidesToProject(_0x559129,_0x170018),Object[_0x313434(0x100)](_0x559129[_0x313434(0xff)])[_0x313434(0x10f)];}export function getGuidesSummary(_0x5de4e4){const _0x340847=a80_0x4f4b6b;return Object[_0x340847(0x112)](_0x5de4e4[_0x340847(0xff)])[_0x340847(0x122)](([_0x4e8b8b,_0x534c72])=>({'key':_0x4e8b8b,'title':_0x534c72[_0x340847(0x104)],'path':_0x534c72[_0x340847(0x11d)]}));}
@@ -1 +1 @@
1
- (function(_0x2877a2,_0x1ea011){const _0x131eab=a76_0x4e9b,_0x57e0ef=_0x2877a2();while(!![]){try{const _0x587dc8=-parseInt(_0x131eab(0xbc))/0x1*(parseInt(_0x131eab(0xc0))/0x2)+parseInt(_0x131eab(0xbf))/0x3*(-parseInt(_0x131eab(0xc9))/0x4)+parseInt(_0x131eab(0xb7))/0x5+-parseInt(_0x131eab(0xb9))/0x6*(parseInt(_0x131eab(0xc1))/0x7)+parseInt(_0x131eab(0xbe))/0x8*(parseInt(_0x131eab(0xb5))/0x9)+parseInt(_0x131eab(0xce))/0xa+-parseInt(_0x131eab(0xca))/0xb;if(_0x587dc8===_0x1ea011)break;else _0x57e0ef['push'](_0x57e0ef['shift']());}catch(_0x48aadd){_0x57e0ef['push'](_0x57e0ef['shift']());}}}(a76_0x34cb,0x3a383));export async function httpRequest(_0x10027d,_0x4fe644={}){const _0x7052ea=a76_0x4e9b,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x4fe644;let _0x12458c=null;for(let _0x3b61b8=0x0;_0x3b61b8<=retries;_0x3b61b8++){try{const _0x1e25a0=new AbortController(),_0x4d30f0=setTimeout(()=>_0x1e25a0[_0x7052ea(0xb8)](),timeout),_0x18fe3d=await fetch(_0x10027d,{'headers':headers,'signal':_0x1e25a0['signal']});clearTimeout(_0x4d30f0);let _0x572d0c;const _0x3fd040=_0x18fe3d['headers'][_0x7052ea(0xc2)]('content-type');return _0x3fd040?.['includes'](_0x7052ea(0xd0))?_0x572d0c=await _0x18fe3d[_0x7052ea(0xba)]():_0x572d0c=await _0x18fe3d['text'](),{'ok':_0x18fe3d['ok'],'status':_0x18fe3d['status'],'statusText':_0x18fe3d[_0x7052ea(0xc7)],'data':_0x572d0c,'headers':_0x18fe3d[_0x7052ea(0xcb)],'url':_0x18fe3d[_0x7052ea(0xb6)],'text':()=>_0x18fe3d[_0x7052ea(0xc5)]()};}catch(_0x45929c){_0x12458c=_0x45929c instanceof Error?_0x45929c:new Error(String(_0x45929c));if(_0x3b61b8===retries)break;if(shouldRetry(_0x45929c)){console[_0x7052ea(0xd2)](_0x7052ea(0xc4)+retryDelay+_0x7052ea(0xbd)+(_0x3b61b8+0x1)+_0x7052ea(0xc3)),await sleep(retryDelay);continue;}else break;}}throw _0x12458c||new Error(_0x7052ea(0xcc));}function a76_0x34cb(){const _0x419950=['name','2789250CxgLXg','message','application/json','AbortError','log','9lmbnSr','url','1037180lWpNxn','abort','176178ePAdyp','json','includes','48hdGiXS','ms\x20后进行第\x20','3029984CHYAIS','121713GBFwnV','10694gCuqqa','49WZGDJD','get','\x20次重试...','*\x20请求失败,','text','ENOTFOUND','statusText','fetch','12wCxQKM','470052NJcIHA','headers','Request\x20failed'];a76_0x34cb=function(){return _0x419950;};return a76_0x34cb();}function a76_0x4e9b(_0x54aa5f,_0x1a247a){_0x54aa5f=_0x54aa5f-0xb5;const _0x34cb2f=a76_0x34cb();let _0x4e9b44=_0x34cb2f[_0x54aa5f];return _0x4e9b44;}function shouldRetry(_0x3d4d66){const _0xf0d638=a76_0x4e9b;if(_0x3d4d66 instanceof Error){if(_0x3d4d66[_0xf0d638(0xcd)]===_0xf0d638(0xd1))return![];if(_0x3d4d66['name']==='TypeError'&&_0x3d4d66[_0xf0d638(0xcf)][_0xf0d638(0xbb)](_0xf0d638(0xc8)))return!![];if(_0x3d4d66[_0xf0d638(0xcf)][_0xf0d638(0xbb)]('ECONNRESET'))return!![];if(_0x3d4d66[_0xf0d638(0xcf)][_0xf0d638(0xbb)](_0xf0d638(0xc6)))return![];}return![];}function sleep(_0x17765b){return new Promise(_0x3f4e8e=>setTimeout(_0x3f4e8e,_0x17765b));}export function validateUrl(_0x5c6272){try{return new URL(_0x5c6272),!![];}catch{return![];}}
1
+ (function(_0x481a0b,_0xe02777){const _0x1e1527=a81_0x45ac,_0x5b8b34=_0x481a0b();while(!![]){try{const _0x2bfc08=-parseInt(_0x1e1527(0x17a))/0x1*(-parseInt(_0x1e1527(0x192))/0x2)+-parseInt(_0x1e1527(0x191))/0x3+-parseInt(_0x1e1527(0x185))/0x4*(parseInt(_0x1e1527(0x180))/0x5)+parseInt(_0x1e1527(0x197))/0x6+parseInt(_0x1e1527(0x182))/0x7*(parseInt(_0x1e1527(0x184))/0x8)+parseInt(_0x1e1527(0x17c))/0x9*(parseInt(_0x1e1527(0x18c))/0xa)+parseInt(_0x1e1527(0x186))/0xb;if(_0x2bfc08===_0xe02777)break;else _0x5b8b34['push'](_0x5b8b34['shift']());}catch(_0x5a4fcc){_0x5b8b34['push'](_0x5b8b34['shift']());}}}(a81_0x32a9,0x6a46c));export async function httpRequest(_0x35293d,_0x530290={}){const _0x4c1150=a81_0x45ac,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x530290;let _0xbf7d11=null;for(let _0x24e72e=0x0;_0x24e72e<=retries;_0x24e72e++){try{const _0x13b904=new AbortController(),_0x1b3e14=setTimeout(()=>_0x13b904['abort'](),timeout),_0x469920=await fetch(_0x35293d,{'headers':headers,'signal':_0x13b904['signal']});clearTimeout(_0x1b3e14);let _0x1ace56;const _0x54c015=_0x469920[_0x4c1150(0x194)][_0x4c1150(0x18e)](_0x4c1150(0x188));return _0x54c015?.['includes']('application/json')?_0x1ace56=await _0x469920['json']():_0x1ace56=await _0x469920[_0x4c1150(0x18d)](),{'ok':_0x469920['ok'],'status':_0x469920[_0x4c1150(0x17e)],'statusText':_0x469920[_0x4c1150(0x17f)],'data':_0x1ace56,'headers':_0x469920[_0x4c1150(0x194)],'url':_0x469920[_0x4c1150(0x189)],'text':()=>_0x469920['text']()};}catch(_0x10f577){_0xbf7d11=_0x10f577 instanceof Error?_0x10f577:new Error(String(_0x10f577));if(_0x24e72e===retries)break;if(shouldRetry(_0x10f577)){console[_0x4c1150(0x18b)](_0x4c1150(0x18f)+retryDelay+_0x4c1150(0x179)+(_0x24e72e+0x1)+_0x4c1150(0x17b)),await sleep(retryDelay);continue;}else break;}}throw _0xbf7d11||new Error(_0x4c1150(0x190));}function shouldRetry(_0x22374f){const _0x4e540c=a81_0x45ac;if(_0x22374f instanceof Error){if(_0x22374f['name']===_0x4e540c(0x187))return![];if(_0x22374f[_0x4e540c(0x181)]===_0x4e540c(0x183)&&_0x22374f[_0x4e540c(0x18a)][_0x4e540c(0x193)](_0x4e540c(0x195)))return!![];if(_0x22374f[_0x4e540c(0x18a)][_0x4e540c(0x193)](_0x4e540c(0x196)))return!![];if(_0x22374f[_0x4e540c(0x18a)][_0x4e540c(0x193)](_0x4e540c(0x17d)))return![];}return![];}function a81_0x32a9(){const _0x321aee=['40623goIXcq','\x20次重试...','54QhHmpF','ENOTFOUND','status','statusText','40lqbMxM','name','30842LlzOsD','TypeError','424gQDZDC','20324uCeNsj','3299296flvqiD','AbortError','content-type','url','message','log','235110fNobMk','text','get','*\x20请求失败,','Request\x20failed','2191455mHPJod','10LTZbBz','includes','headers','fetch','ECONNRESET','1972836yZXWyY','ms\x20后进行第\x20'];a81_0x32a9=function(){return _0x321aee;};return a81_0x32a9();}function a81_0x45ac(_0x282f2d,_0x342818){_0x282f2d=_0x282f2d-0x179;const _0x32a94c=a81_0x32a9();let _0x45ac69=_0x32a94c[_0x282f2d];return _0x45ac69;}function sleep(_0x50d9fb){return new Promise(_0x5d7aac=>setTimeout(_0x5d7aac,_0x50d9fb));}export function validateUrl(_0x48ce14){try{return new URL(_0x48ce14),!![];}catch{return![];}}
@@ -1 +1 @@
1
- const a77_0x183510=a77_0x74ba;(function(_0x44aad2,_0x31849b){const _0x534aa6=a77_0x74ba,_0x15b3b4=_0x44aad2();while(!![]){try{const _0x16c539=parseInt(_0x534aa6(0x1d7))/0x1+parseInt(_0x534aa6(0x201))/0x2*(parseInt(_0x534aa6(0x1e3))/0x3)+-parseInt(_0x534aa6(0x1ea))/0x4+-parseInt(_0x534aa6(0x1f9))/0x5*(-parseInt(_0x534aa6(0x1df))/0x6)+parseInt(_0x534aa6(0x1e4))/0x7+parseInt(_0x534aa6(0x1fb))/0x8+-parseInt(_0x534aa6(0x1d6))/0x9*(parseInt(_0x534aa6(0x1dd))/0xa);if(_0x16c539===_0x31849b)break;else _0x15b3b4['push'](_0x15b3b4['shift']());}catch(_0x58d351){_0x15b3b4['push'](_0x15b3b4['shift']());}}}(a77_0xb454,0x3723a));import a77_0x1439e6 from'winston';import a77_0x2e90c7 from'node:fs';function a77_0xb454(){const _0x2b70b4=['warn','now','setRawCommand','2lBzJFT','trim','logFilePath','log','readFileSync','clearLogs','format','36qPWGIY','320292aebudi','green','Failed\x20to\x20clear\x20logs:','writeFileSync','map','printf','1825410YQasnv','winstonLogger','357438ivwCMJ','info','parse','File','342165jGWNqI','1342278cpSrAJ','join','setLogPath','transports','initWinstonLogger','errors','473080hmpWuU','split','details','logTask','dirname','red','readLogs','level','Failed\x20to\x20read\x20logs:','success','existsSync','getWinstonInstance','error','message','currentRawCommand','10bNHAbO','失败:\x20','2632296uPNBNP','utf8','stringify'];a77_0xb454=function(){return _0x2b70b4;};return a77_0xb454();}function a77_0x74ba(_0x12da8f,_0x2f2569){_0x12da8f=_0x12da8f-0x1d5;const _0xb45424=a77_0xb454();let _0x74bac6=_0xb45424[_0x12da8f];return _0x74bac6;}import a77_0x4c574c from'node:path';class Logger{[a77_0x183510(0x1de)];[a77_0x183510(0x203)];[a77_0x183510(0x1f8)]='';constructor(){const _0x4af998=a77_0x183510;this[_0x4af998(0x203)]='';}[a77_0x183510(0x200)](_0x3f3e2c){const _0x5eb144=a77_0x183510;this[_0x5eb144(0x1f8)]=_0x3f3e2c;}[a77_0x183510(0x1e8)](){const _0x2cba26=a77_0x183510,_0x41dbe8=a77_0x4c574c[_0x2cba26(0x1ee)](this['logFilePath']);!a77_0x2e90c7[_0x2cba26(0x1f4)](_0x41dbe8)&&a77_0x2e90c7['mkdirSync'](_0x41dbe8,{'recursive':!![]});const _0xd42138=a77_0x1439e6[_0x2cba26(0x1d5)]['combine'](a77_0x1439e6['format']['timestamp'](),a77_0x1439e6[_0x2cba26(0x1d5)][_0x2cba26(0x1e9)]({'stack':!![]}),a77_0x1439e6['format'][_0x2cba26(0x1dc)](_0x1a8312=>{const _0x38cbea=_0x2cba26,_0x108ad8={'timestamp':_0x1a8312['timestamp']||new Date()['toISOString'](),'level':_0x1a8312[_0x38cbea(0x1f1)]||_0x38cbea(0x1e0),'command':_0x1a8312['command']||'unknown','rawCommand':_0x1a8312['rawCommand']||this[_0x38cbea(0x1f8)]||undefined,'message':_0x1a8312[_0x38cbea(0x1f7)]||'','duration':_0x1a8312['duration']||undefined,'details':_0x1a8312[_0x38cbea(0x1ec)]||undefined};return JSON[_0x38cbea(0x1fd)](_0x108ad8);}));this['winstonLogger']=a77_0x1439e6['createLogger']({'level':_0x2cba26(0x1e0),'format':_0xd42138,'transports':[new a77_0x1439e6[(_0x2cba26(0x1e7))][(_0x2cba26(0x1e2))]({'filename':this[_0x2cba26(0x203)],'level':'info'})],'silent':![]}),a77_0x1439e6['addColors']({'success':_0x2cba26(0x1d8),'error':_0x2cba26(0x1ef),'warn':'yellow','info':'blue'});}[a77_0x183510(0x1e6)](_0x5d131e){const _0x43d9d9=a77_0x183510;this[_0x43d9d9(0x203)]=a77_0x4c574c[_0x43d9d9(0x1e5)](_0x5d131e,'.lovrabet.log'),this[_0x43d9d9(0x1de)]&&this[_0x43d9d9(0x1de)]['clear'](),this[_0x43d9d9(0x1e8)]();}[a77_0x183510(0x1e0)](_0xfa5046,_0x44f648,_0x41c534){const _0x24085b=a77_0x183510;if(!this['logFilePath']||!this[_0x24085b(0x1de)])return;this['winstonLogger']['info'](_0x44f648,{'command':_0xfa5046,'details':_0x41c534});}[a77_0x183510(0x1f3)](_0xd521c,_0x3c96ed,_0x1224f3,_0x1afccd){const _0x1bd55f=a77_0x183510;if(!this['logFilePath']||!this[_0x1bd55f(0x1de)])return;this[_0x1bd55f(0x1de)][_0x1bd55f(0x204)]('info',_0x3c96ed,{'level':'success','command':_0xd521c,'duration':_0x1224f3,'details':_0x1afccd});}[a77_0x183510(0x1f6)](_0x4654b4,_0x350100,_0x342900){const _0x57b364=a77_0x183510;if(!this[_0x57b364(0x203)]||!this[_0x57b364(0x1de)])return;this[_0x57b364(0x1de)]['error'](_0x350100,{'command':_0x4654b4,'details':_0x342900});}[a77_0x183510(0x1fe)](_0x4cdc84,_0x4ca757,_0x4b5574){const _0x1fee83=a77_0x183510;if(!this[_0x1fee83(0x203)]||!this[_0x1fee83(0x1de)])return;this[_0x1fee83(0x1de)][_0x1fee83(0x1fe)](_0x4ca757,{'command':_0x4cdc84,'details':_0x4b5574});}async[a77_0x183510(0x1ed)](_0x16a619,_0x284c5a,_0x1e278c){const _0x42eec0=a77_0x183510,_0x58bf34=Date[_0x42eec0(0x1ff)]();this['info'](_0x16a619,'开始执行:\x20'+_0x284c5a);try{const _0x47e609=await _0x1e278c(),_0x4465ef=Date['now']()-_0x58bf34;return this[_0x42eec0(0x1f3)](_0x16a619,'完成:\x20'+_0x284c5a,_0x4465ef),_0x47e609;}catch(_0x26e98b){const _0x168331=Date[_0x42eec0(0x1ff)]()-_0x58bf34;this[_0x42eec0(0x1f6)](_0x16a619,_0x42eec0(0x1fa)+_0x284c5a,{'error':_0x26e98b instanceof Error?_0x26e98b['message']:String(_0x26e98b),'duration':_0x168331});throw _0x26e98b;}}[a77_0x183510(0x1f0)](){const _0x425a66=a77_0x183510;try{if(!a77_0x2e90c7[_0x425a66(0x1f4)](this['logFilePath']))return[];const _0x582142=a77_0x2e90c7[_0x425a66(0x205)](this[_0x425a66(0x203)],_0x425a66(0x1fc));return _0x582142[_0x425a66(0x1eb)]('\x0a')['filter'](_0x16ad51=>_0x16ad51[_0x425a66(0x202)]())[_0x425a66(0x1db)](_0x1d1ebf=>JSON[_0x425a66(0x1e1)](_0x1d1ebf));}catch(_0x121396){return console[_0x425a66(0x1fe)](_0x425a66(0x1f2),_0x121396),[];}}[a77_0x183510(0x206)](){const _0x179b27=a77_0x183510;try{a77_0x2e90c7[_0x179b27(0x1f4)](this['logFilePath'])&&a77_0x2e90c7[_0x179b27(0x1da)](this[_0x179b27(0x203)],'','utf8');}catch(_0x2464ba){console[_0x179b27(0x1fe)](_0x179b27(0x1d9),_0x2464ba);}}[a77_0x183510(0x1f5)](){const _0x257317=a77_0x183510;return this[_0x257317(0x1de)];}}export const logger=new Logger();
1
+ const a82_0x526f42=a82_0x11c5;(function(_0x52619f,_0x2451b6){const _0x5b87ba=a82_0x11c5,_0x333935=_0x52619f();while(!![]){try{const _0x1125f8=parseInt(_0x5b87ba(0xbb))/0x1*(-parseInt(_0x5b87ba(0xe2))/0x2)+-parseInt(_0x5b87ba(0xcd))/0x3*(parseInt(_0x5b87ba(0xe7))/0x4)+-parseInt(_0x5b87ba(0xb0))/0x5*(-parseInt(_0x5b87ba(0xc5))/0x6)+parseInt(_0x5b87ba(0xc6))/0x7*(parseInt(_0x5b87ba(0xdf))/0x8)+parseInt(_0x5b87ba(0xd6))/0x9*(-parseInt(_0x5b87ba(0xcf))/0xa)+parseInt(_0x5b87ba(0xd3))/0xb+-parseInt(_0x5b87ba(0xe8))/0xc*(parseInt(_0x5b87ba(0xeb))/0xd);if(_0x1125f8===_0x2451b6)break;else _0x333935['push'](_0x333935['shift']());}catch(_0x15f326){_0x333935['push'](_0x333935['shift']());}}}(a82_0xc3dc,0x91dbd));function a82_0x11c5(_0x1c567d,_0x7091d3){_0x1c567d=_0x1c567d-0xaf;const _0xc3dcf7=a82_0xc3dc();let _0x11c5d8=_0xc3dcf7[_0x1c567d];return _0x11c5d8;}function a82_0xc3dc(){const _0x3e8636=['1491108MjMnDH','split','map','13vfoZhh','now','3070575DOzXMI','setRawCommand','logFilePath','filter','existsSync','join','dirname','getWinstonInstance','winstonLogger','currentRawCommand','blue','15934mIyekk','rawCommand','writeFileSync','warn','Failed\x20to\x20clear\x20logs:','mkdirSync','errors','duration','parse','timestamp','6Manxpi','2555917dLakTa','.lovrabet.log','readFileSync','stringify','details','command','format','79107htiwzS','Failed\x20to\x20read\x20logs:','4290gcTUQu','readLogs','setLogPath','message','4391552PNTXtn','完成:\x20','success','9459iwWqqM','error','initWinstonLogger','unknown','yellow','level','开始执行:\x20','toISOString','clearLogs','24ciZmOU','logTask','clear','48RQzEyz','transports','info','trim','失败:\x20','84lqrFoP'];a82_0xc3dc=function(){return _0x3e8636;};return a82_0xc3dc();}import a82_0x51bdaf from'winston';import a82_0xd3f0f3 from'node:fs';import a82_0x1923a4 from'node:path';class Logger{['winstonLogger'];[a82_0x526f42(0xb2)];[a82_0x526f42(0xb9)]='';constructor(){const _0x1afada=a82_0x526f42;this[_0x1afada(0xb2)]='';}[a82_0x526f42(0xb1)](_0x491b4c){const _0x456de3=a82_0x526f42;this[_0x456de3(0xb9)]=_0x491b4c;}[a82_0x526f42(0xd8)](){const _0xe8e725=a82_0x526f42,_0x27fcd3=a82_0x1923a4[_0xe8e725(0xb6)](this[_0xe8e725(0xb2)]);!a82_0xd3f0f3[_0xe8e725(0xb4)](_0x27fcd3)&&a82_0xd3f0f3[_0xe8e725(0xc0)](_0x27fcd3,{'recursive':!![]});const _0x273eb9=a82_0x51bdaf['format']['combine'](a82_0x51bdaf[_0xe8e725(0xcc)]['timestamp'](),a82_0x51bdaf[_0xe8e725(0xcc)][_0xe8e725(0xc1)]({'stack':!![]}),a82_0x51bdaf['format']['printf'](_0x4da083=>{const _0x16171e=_0xe8e725,_0x56be69={'timestamp':_0x4da083[_0x16171e(0xc4)]||new Date()[_0x16171e(0xdd)](),'level':_0x4da083[_0x16171e(0xdb)]||_0x16171e(0xe4),'command':_0x4da083[_0x16171e(0xcb)]||_0x16171e(0xd9),'rawCommand':_0x4da083[_0x16171e(0xbc)]||this[_0x16171e(0xb9)]||undefined,'message':_0x4da083[_0x16171e(0xd2)]||'','duration':_0x4da083[_0x16171e(0xc2)]||undefined,'details':_0x4da083[_0x16171e(0xca)]||undefined};return JSON[_0x16171e(0xc9)](_0x56be69);}));this[_0xe8e725(0xb8)]=a82_0x51bdaf['createLogger']({'level':'info','format':_0x273eb9,'transports':[new a82_0x51bdaf[(_0xe8e725(0xe3))]['File']({'filename':this['logFilePath'],'level':_0xe8e725(0xe4)})],'silent':![]}),a82_0x51bdaf['addColors']({'success':'green','error':'red','warn':_0xe8e725(0xda),'info':_0xe8e725(0xba)});}[a82_0x526f42(0xd1)](_0xa0bb96){const _0x1d06e2=a82_0x526f42;this[_0x1d06e2(0xb2)]=a82_0x1923a4[_0x1d06e2(0xb5)](_0xa0bb96,_0x1d06e2(0xc7)),this[_0x1d06e2(0xb8)]&&this[_0x1d06e2(0xb8)][_0x1d06e2(0xe1)](),this[_0x1d06e2(0xd8)]();}['info'](_0x1477fa,_0x1a944a,_0x496be4){const _0x32cca0=a82_0x526f42;if(!this[_0x32cca0(0xb2)]||!this[_0x32cca0(0xb8)])return;this['winstonLogger'][_0x32cca0(0xe4)](_0x1a944a,{'command':_0x1477fa,'details':_0x496be4});}['success'](_0x4a787d,_0x1d8960,_0x4c750b,_0x369147){const _0x4f603e=a82_0x526f42;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x4f603e(0xb8)]['log'](_0x4f603e(0xe4),_0x1d8960,{'level':_0x4f603e(0xd5),'command':_0x4a787d,'duration':_0x4c750b,'details':_0x369147});}['error'](_0x3b44c4,_0x514406,_0x1aa2fa){const _0x563168=a82_0x526f42;if(!this['logFilePath']||!this[_0x563168(0xb8)])return;this[_0x563168(0xb8)][_0x563168(0xd7)](_0x514406,{'command':_0x3b44c4,'details':_0x1aa2fa});}[a82_0x526f42(0xbe)](_0xb61651,_0x1da249,_0x44e38f){const _0x4f83f7=a82_0x526f42;if(!this[_0x4f83f7(0xb2)]||!this[_0x4f83f7(0xb8)])return;this['winstonLogger'][_0x4f83f7(0xbe)](_0x1da249,{'command':_0xb61651,'details':_0x44e38f});}async[a82_0x526f42(0xe0)](_0x35df5e,_0x457d14,_0x2aad8d){const _0x370269=a82_0x526f42,_0x2f4713=Date[_0x370269(0xaf)]();this[_0x370269(0xe4)](_0x35df5e,_0x370269(0xdc)+_0x457d14);try{const _0xacb295=await _0x2aad8d(),_0x5c7f27=Date[_0x370269(0xaf)]()-_0x2f4713;return this[_0x370269(0xd5)](_0x35df5e,_0x370269(0xd4)+_0x457d14,_0x5c7f27),_0xacb295;}catch(_0x1da726){const _0x41f330=Date[_0x370269(0xaf)]()-_0x2f4713;this['error'](_0x35df5e,_0x370269(0xe6)+_0x457d14,{'error':_0x1da726 instanceof Error?_0x1da726[_0x370269(0xd2)]:String(_0x1da726),'duration':_0x41f330});throw _0x1da726;}}[a82_0x526f42(0xd0)](){const _0x1a671b=a82_0x526f42;try{if(!a82_0xd3f0f3['existsSync'](this['logFilePath']))return[];const _0x464608=a82_0xd3f0f3[_0x1a671b(0xc8)](this['logFilePath'],'utf8');return _0x464608[_0x1a671b(0xe9)]('\x0a')[_0x1a671b(0xb3)](_0x1c7cdf=>_0x1c7cdf[_0x1a671b(0xe5)]())[_0x1a671b(0xea)](_0x1f510a=>JSON[_0x1a671b(0xc3)](_0x1f510a));}catch(_0x8f7584){return console[_0x1a671b(0xbe)](_0x1a671b(0xce),_0x8f7584),[];}}[a82_0x526f42(0xde)](){const _0x2bf3ca=a82_0x526f42;try{a82_0xd3f0f3[_0x2bf3ca(0xb4)](this[_0x2bf3ca(0xb2)])&&a82_0xd3f0f3[_0x2bf3ca(0xbd)](this[_0x2bf3ca(0xb2)],'','utf8');}catch(_0x16d3da){console['warn'](_0x2bf3ca(0xbf),_0x16d3da);}}[a82_0x526f42(0xb7)](){const _0x445cc4=a82_0x526f42;return this[_0x445cc4(0xb8)];}}export const logger=new Logger();
@@ -1 +1 @@
1
- const a78_0x43fa7f=a78_0x2afc;function a78_0x2afc(_0x157fc8,_0x415deb){_0x157fc8=_0x157fc8-0x1c4;const _0x116a2e=a78_0x116a();let _0x2afc71=_0x116a2e[_0x157fc8];return _0x2afc71;}(function(_0x23c83c,_0x20a4ff){const _0x579267=a78_0x2afc,_0x1190ce=_0x23c83c();while(!![]){try{const _0xd643ac=-parseInt(_0x579267(0x1d2))/0x1*(parseInt(_0x579267(0x1f2))/0x2)+parseInt(_0x579267(0x1f5))/0x3+parseInt(_0x579267(0x1d9))/0x4*(parseInt(_0x579267(0x1e6))/0x5)+parseInt(_0x579267(0x1e9))/0x6*(parseInt(_0x579267(0x1e4))/0x7)+-parseInt(_0x579267(0x1ec))/0x8+-parseInt(_0x579267(0x1e5))/0x9+-parseInt(_0x579267(0x1c6))/0xa*(-parseInt(_0x579267(0x1dd))/0xb);if(_0xd643ac===_0x20a4ff)break;else _0x1190ce['push'](_0x1190ce['shift']());}catch(_0xe1f4ba){_0x1190ce['push'](_0x1190ce['shift']());}}}(a78_0x116a,0x51bdb));import a78_0x7a6235 from'node:fs';import a78_0x565699 from'node:path';import{logger}from'./logger.js';function a78_0x116a(){const _0x469d2b=['addImport','121270WbHDmB','toComponentName','indexOf','map','import\x20','未找到路由配置的\x20children\x20数组','length','addPageRoute','split','\x20from\x20\x22../pages/','charAt','index','427cJCLkr','toLowerCase','success','now','src','\x20/>,\x0a\x20\x20\x20\x20\x20\x20\x20\x20},','match','112YDMKOv','\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20element:\x20<','message','路由配置更新完成','99kYpHOR','路由文件不存在:\x20','routerFilePath','index.tsx','error','readFile','writeFile','38990mZgBnC','4251798tmhyvM','39970TBRzvG','路由配置更新失败','promises','690dKwvMr','router','addRoute','4040504nUzfko','join','existsSync','path:\x20\x22','lastIndexOf','slice','602BdTMpv','\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path:\x20\x22','toUpperCase','1401894plEmoz','includes','utf8'];a78_0x116a=function(){return _0x469d2b;};return a78_0x116a();}export class RouterUpdater{[a78_0x43fa7f(0x1df)];constructor(_0x9bedf7){const _0x207c9f=a78_0x43fa7f;this[_0x207c9f(0x1df)]=a78_0x565699[_0x207c9f(0x1ed)](_0x9bedf7,_0x207c9f(0x1d6),_0x207c9f(0x1ea),_0x207c9f(0x1e0));}async[a78_0x43fa7f(0x1cd)](_0x31a666,_0x3c1dac){const _0x168f4f=a78_0x43fa7f;if(!a78_0x7a6235[_0x168f4f(0x1ee)](this[_0x168f4f(0x1df)]))throw new Error(_0x168f4f(0x1de)+this[_0x168f4f(0x1df)]);const _0x535eb4=Date[_0x168f4f(0x1d5)]();logger['info'](_0x168f4f(0x1ea),'开始更新路由配置',{'pageName':_0x31a666,'routePath':_0x3c1dac,'file':this[_0x168f4f(0x1df)]});try{const _0x3d94dc=await a78_0x7a6235['promises']['readFile'](this['routerFilePath'],_0x168f4f(0x1c4)),_0x5923bc=this['toComponentName'](_0x31a666),_0x3c706a=this['addImport'](_0x3d94dc,_0x5923bc,_0x31a666),_0x458062=this[_0x168f4f(0x1eb)](_0x3c706a,_0x3c1dac,_0x5923bc);await a78_0x7a6235[_0x168f4f(0x1e8)][_0x168f4f(0x1e3)](this[_0x168f4f(0x1df)],_0x458062,_0x168f4f(0x1c4));const _0x471df0=Date['now']()-_0x535eb4;logger[_0x168f4f(0x1d4)]('router',_0x168f4f(0x1dc),_0x471df0,{'pageName':_0x31a666,'routePath':_0x3c1dac,'componentName':_0x5923bc});}catch(_0xbd83c0){const _0x32b7d7=Date['now']()-_0x535eb4;logger[_0x168f4f(0x1e1)]('router',_0x168f4f(0x1e7),{'pageName':_0x31a666,'routePath':_0x3c1dac,'error':_0xbd83c0 instanceof Error?_0xbd83c0[_0x168f4f(0x1db)]:String(_0xbd83c0),'duration':_0x32b7d7});throw _0xbd83c0;}}[a78_0x43fa7f(0x1c7)](_0x591bda){const _0x3a2544=a78_0x43fa7f;return _0x591bda[_0x3a2544(0x1ce)]('-')[_0x3a2544(0x1c9)](_0x322eef=>_0x322eef[_0x3a2544(0x1d0)](0x0)[_0x3a2544(0x1f4)]()+_0x322eef[_0x3a2544(0x1f1)](0x1)[_0x3a2544(0x1d3)]())[_0x3a2544(0x1ed)]('');}['addImport'](_0x210876,_0x387edd,_0x570082){const _0x1b8cfa=a78_0x43fa7f,_0x35c0ee=/import\s+\w+\s+from\s+["']\.\.\/pages\/\w+["'];?\n/g,_0x45378a=_0x210876[_0x1b8cfa(0x1d8)](_0x35c0ee)||[],_0x5c936d=_0x1b8cfa(0x1ca)+_0x387edd+_0x1b8cfa(0x1cf)+_0x570082+'\x22;';if(_0x210876[_0x1b8cfa(0x1f6)](_0x5c936d))return _0x210876;if(_0x45378a['length']>0x0){const _0x2fd22a=_0x45378a[_0x45378a[_0x1b8cfa(0x1cc)]-0x1];if(_0x2fd22a){const _0x331bed=_0x210876[_0x1b8cfa(0x1f0)](_0x2fd22a),_0x38b087=_0x331bed+_0x2fd22a[_0x1b8cfa(0x1cc)];return _0x210876[_0x1b8cfa(0x1f1)](0x0,_0x38b087)+_0x5c936d+'\x0a'+_0x210876[_0x1b8cfa(0x1f1)](_0x38b087);}}const _0x5b87fe=_0x210876[_0x1b8cfa(0x1d8)](/import\s+\w+\s+from\s+["']\.\.\/layouts\/\w+["'];?\n/);if(_0x5b87fe&&_0x5b87fe[_0x1b8cfa(0x1d1)]!==undefined){const _0x492ede=_0x5b87fe[_0x1b8cfa(0x1d1)]+_0x5b87fe[0x0][_0x1b8cfa(0x1cc)];return _0x210876['slice'](0x0,_0x492ede)+_0x5c936d+'\x0a'+_0x210876[_0x1b8cfa(0x1f1)](_0x492ede);}return _0x210876;}[a78_0x43fa7f(0x1eb)](_0x43fc50,_0x593334,_0x501dd0){const _0x181c17=a78_0x43fa7f,_0x5b1180=_0x181c17(0x1f3)+_0x593334+_0x181c17(0x1da)+_0x501dd0+_0x181c17(0x1d7);if(_0x43fc50['includes'](_0x181c17(0x1ef)+_0x593334+'\x22'))return _0x43fc50;const _0x177651=/children:\s*\[([\s\S]*?)\]/,_0x5b4945=_0x43fc50['match'](_0x177651);if(!_0x5b4945||_0x5b4945[_0x181c17(0x1d1)]===undefined)throw new Error(_0x181c17(0x1cb));const _0x476140=_0x5b4945[0x1],_0x58831b=_0x5b4945[_0x181c17(0x1d1)]+_0x5b4945[0x0][_0x181c17(0x1c8)]('[')+0x1,_0x14af25=_0x476140?.[_0x181c17(0x1d8)](/\{[\s\S]*?\},/g)||[];if(_0x14af25[_0x181c17(0x1cc)]>0x0){const _0x4fcbd2=_0x14af25[_0x14af25[_0x181c17(0x1cc)]-0x1];if(_0x4fcbd2){const _0x135e87=_0x43fc50[_0x181c17(0x1f0)](_0x4fcbd2),_0x557533=_0x135e87+_0x4fcbd2[_0x181c17(0x1cc)];return _0x43fc50[_0x181c17(0x1f1)](0x0,_0x557533)+'\x0a'+_0x5b1180+_0x43fc50[_0x181c17(0x1f1)](_0x557533);}}return _0x43fc50[_0x181c17(0x1f1)](0x0,_0x58831b)+'\x0a'+_0x5b1180+_0x43fc50[_0x181c17(0x1f1)](_0x58831b);}async['previewChanges'](_0x2dae28,_0x452f91){const _0x53d78a=a78_0x43fa7f;if(!a78_0x7a6235[_0x53d78a(0x1ee)](this[_0x53d78a(0x1df)]))throw new Error(_0x53d78a(0x1de)+this[_0x53d78a(0x1df)]);const _0xdbd613=await a78_0x7a6235['promises'][_0x53d78a(0x1e2)](this[_0x53d78a(0x1df)],_0x53d78a(0x1c4)),_0x2f6ae7=this[_0x53d78a(0x1c7)](_0x2dae28);let _0x2a7a08=this[_0x53d78a(0x1c5)](_0xdbd613,_0x2f6ae7,_0x2dae28);return _0x2a7a08=this[_0x53d78a(0x1eb)](_0x2a7a08,_0x452f91,_0x2f6ae7),_0x2a7a08;}}
1
+ function a83_0x56eb(_0x212c13,_0x1e816d){_0x212c13=_0x212c13-0x1ec;const _0x2f0ba4=a83_0x2f0b();let _0x56eb4f=_0x2f0ba4[_0x212c13];return _0x56eb4f;}function a83_0x2f0b(){const _0x3bf121=['addPageRoute','path:\x20\x22','4514496UKUkXI','success','split','indexOf','map','index','lastIndexOf','\x20from\x20\x22../pages/','3qFvGiG','writeFile','4951062vRbtlp','\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20element:\x20<','match','路由文件不存在:\x20','25022630VyWjLP','router','includes','路由配置更新完成','charAt','error','info','previewChanges','toComponentName','src','\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path:\x20\x22','771146BzfZEm','开始更新路由配置','3553890kExsBv','addRoute','length','routerFilePath','4mpKKqL','join','readFile','143507TyyXlL','now','existsSync','371889hxlOMj','import\x20','slice','路由配置更新失败','6GKXpbY','toLowerCase','toUpperCase','message','utf8','addImport'];a83_0x2f0b=function(){return _0x3bf121;};return a83_0x2f0b();}const a83_0x2680c8=a83_0x56eb;(function(_0x1d3f46,_0x5cc71c){const _0x4a862c=a83_0x56eb,_0x42348f=_0x1d3f46();while(!![]){try{const _0x4c235e=parseInt(_0x4a862c(0x1fd))/0x1+parseInt(_0x4a862c(0x1f4))/0x2*(-parseInt(_0x4a862c(0x214))/0x3)+parseInt(_0x4a862c(0x1fa))/0x4*(-parseInt(_0x4a862c(0x1f6))/0x5)+-parseInt(_0x4a862c(0x204))/0x6*(-parseInt(_0x4a862c(0x200))/0x7)+-parseInt(_0x4a862c(0x20c))/0x8+-parseInt(_0x4a862c(0x216))/0x9+parseInt(_0x4a862c(0x21a))/0xa;if(_0x4c235e===_0x5cc71c)break;else _0x42348f['push'](_0x42348f['shift']());}catch(_0x4957f7){_0x42348f['push'](_0x42348f['shift']());}}}(a83_0x2f0b,0x772b4));import a83_0x288469 from'node:fs';import a83_0x34e871 from'node:path';import{logger}from'./logger.js';export class RouterUpdater{[a83_0x2680c8(0x1f9)];constructor(_0x347441){const _0x1a5b75=a83_0x2680c8;this[_0x1a5b75(0x1f9)]=a83_0x34e871[_0x1a5b75(0x1fb)](_0x347441,_0x1a5b75(0x1f2),_0x1a5b75(0x21b),'index.tsx');}async[a83_0x2680c8(0x20a)](_0x4bc333,_0x5aa689){const _0x28efb7=a83_0x2680c8;if(!a83_0x288469[_0x28efb7(0x1ff)](this[_0x28efb7(0x1f9)]))throw new Error('路由文件不存在:\x20'+this[_0x28efb7(0x1f9)]);const _0x332d04=Date[_0x28efb7(0x1fe)]();logger[_0x28efb7(0x1ef)](_0x28efb7(0x21b),_0x28efb7(0x1f5),{'pageName':_0x4bc333,'routePath':_0x5aa689,'file':this[_0x28efb7(0x1f9)]});try{const _0xe6f719=await a83_0x288469['promises'][_0x28efb7(0x1fc)](this[_0x28efb7(0x1f9)],_0x28efb7(0x208)),_0x334f3f=this[_0x28efb7(0x1f1)](_0x4bc333),_0x5b90b1=this[_0x28efb7(0x209)](_0xe6f719,_0x334f3f,_0x4bc333),_0x1a3be8=this[_0x28efb7(0x1f7)](_0x5b90b1,_0x5aa689,_0x334f3f);await a83_0x288469['promises'][_0x28efb7(0x215)](this[_0x28efb7(0x1f9)],_0x1a3be8,_0x28efb7(0x208));const _0x3becb7=Date[_0x28efb7(0x1fe)]()-_0x332d04;logger[_0x28efb7(0x20d)](_0x28efb7(0x21b),_0x28efb7(0x1ec),_0x3becb7,{'pageName':_0x4bc333,'routePath':_0x5aa689,'componentName':_0x334f3f});}catch(_0x572655){const _0x3aab99=Date[_0x28efb7(0x1fe)]()-_0x332d04;logger[_0x28efb7(0x1ee)](_0x28efb7(0x21b),_0x28efb7(0x203),{'pageName':_0x4bc333,'routePath':_0x5aa689,'error':_0x572655 instanceof Error?_0x572655[_0x28efb7(0x207)]:String(_0x572655),'duration':_0x3aab99});throw _0x572655;}}['toComponentName'](_0xb145de){const _0x33e1e6=a83_0x2680c8;return _0xb145de[_0x33e1e6(0x20e)]('-')[_0x33e1e6(0x210)](_0x3d3e42=>_0x3d3e42[_0x33e1e6(0x1ed)](0x0)[_0x33e1e6(0x206)]()+_0x3d3e42['slice'](0x1)[_0x33e1e6(0x205)]())[_0x33e1e6(0x1fb)]('');}[a83_0x2680c8(0x209)](_0x4cd345,_0x270b3d,_0x144499){const _0x2e2ebf=a83_0x2680c8,_0x3c6297=/import\s+\w+\s+from\s+["']\.\.\/pages\/\w+["'];?\n/g,_0x32179a=_0x4cd345[_0x2e2ebf(0x218)](_0x3c6297)||[],_0x2b8c96=_0x2e2ebf(0x201)+_0x270b3d+_0x2e2ebf(0x213)+_0x144499+'\x22;';if(_0x4cd345[_0x2e2ebf(0x21c)](_0x2b8c96))return _0x4cd345;if(_0x32179a[_0x2e2ebf(0x1f8)]>0x0){const _0x1e375d=_0x32179a[_0x32179a[_0x2e2ebf(0x1f8)]-0x1];if(_0x1e375d){const _0x5eabef=_0x4cd345['lastIndexOf'](_0x1e375d),_0x52b36c=_0x5eabef+_0x1e375d[_0x2e2ebf(0x1f8)];return _0x4cd345['slice'](0x0,_0x52b36c)+_0x2b8c96+'\x0a'+_0x4cd345[_0x2e2ebf(0x202)](_0x52b36c);}}const _0x3b8cf2=_0x4cd345[_0x2e2ebf(0x218)](/import\s+\w+\s+from\s+["']\.\.\/layouts\/\w+["'];?\n/);if(_0x3b8cf2&&_0x3b8cf2['index']!==undefined){const _0x33c653=_0x3b8cf2['index']+_0x3b8cf2[0x0][_0x2e2ebf(0x1f8)];return _0x4cd345['slice'](0x0,_0x33c653)+_0x2b8c96+'\x0a'+_0x4cd345['slice'](_0x33c653);}return _0x4cd345;}['addRoute'](_0x4d48a3,_0x4ddea2,_0x18bd85){const _0x56240b=a83_0x2680c8,_0x471fe1=_0x56240b(0x1f3)+_0x4ddea2+_0x56240b(0x217)+_0x18bd85+'\x20/>,\x0a\x20\x20\x20\x20\x20\x20\x20\x20},';if(_0x4d48a3[_0x56240b(0x21c)](_0x56240b(0x20b)+_0x4ddea2+'\x22'))return _0x4d48a3;const _0x5d3449=/children:\s*\[([\s\S]*?)\]/,_0x870d86=_0x4d48a3[_0x56240b(0x218)](_0x5d3449);if(!_0x870d86||_0x870d86['index']===undefined)throw new Error('未找到路由配置的\x20children\x20数组');const _0x23b177=_0x870d86[0x1],_0x516bd0=_0x870d86[_0x56240b(0x211)]+_0x870d86[0x0][_0x56240b(0x20f)]('[')+0x1,_0x15dd83=_0x23b177?.[_0x56240b(0x218)](/\{[\s\S]*?\},/g)||[];if(_0x15dd83[_0x56240b(0x1f8)]>0x0){const _0x20d6e4=_0x15dd83[_0x15dd83[_0x56240b(0x1f8)]-0x1];if(_0x20d6e4){const _0x53fafa=_0x4d48a3[_0x56240b(0x212)](_0x20d6e4),_0x9e22fa=_0x53fafa+_0x20d6e4[_0x56240b(0x1f8)];return _0x4d48a3['slice'](0x0,_0x9e22fa)+'\x0a'+_0x471fe1+_0x4d48a3['slice'](_0x9e22fa);}}return _0x4d48a3[_0x56240b(0x202)](0x0,_0x516bd0)+'\x0a'+_0x471fe1+_0x4d48a3[_0x56240b(0x202)](_0x516bd0);}async[a83_0x2680c8(0x1f0)](_0x3e8167,_0x4f3314){const _0x20ccd6=a83_0x2680c8;if(!a83_0x288469[_0x20ccd6(0x1ff)](this[_0x20ccd6(0x1f9)]))throw new Error(_0x20ccd6(0x219)+this['routerFilePath']);const _0x342282=await a83_0x288469['promises'][_0x20ccd6(0x1fc)](this[_0x20ccd6(0x1f9)],_0x20ccd6(0x208)),_0x746d90=this[_0x20ccd6(0x1f1)](_0x3e8167);let _0x4da995=this[_0x20ccd6(0x209)](_0x342282,_0x746d90,_0x3e8167);return _0x4da995=this[_0x20ccd6(0x1f7)](_0x4da995,_0x4f3314,_0x746d90),_0x4da995;}}
@@ -1 +1 @@
1
- const a79_0x5b31f7=a79_0x4326;(function(_0x421da8,_0x19dcf1){const _0x57d546=a79_0x4326,_0xfc3952=_0x421da8();while(!![]){try{const _0x1b195d=-parseInt(_0x57d546(0xc2))/0x1+-parseInt(_0x57d546(0xba))/0x2*(parseInt(_0x57d546(0xd0))/0x3)+parseInt(_0x57d546(0xc4))/0x4*(parseInt(_0x57d546(0xcd))/0x5)+parseInt(_0x57d546(0xd2))/0x6+-parseInt(_0x57d546(0xbb))/0x7+parseInt(_0x57d546(0xbf))/0x8+-parseInt(_0x57d546(0xcf))/0x9*(-parseInt(_0x57d546(0xc6))/0xa);if(_0x1b195d===_0x19dcf1)break;else _0xfc3952['push'](_0xfc3952['shift']());}catch(_0x30caca){_0xfc3952['push'](_0xfc3952['shift']());}}}(a79_0x2462,0x2ba95));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x52742a=a79_0x4326,_0x5503f6=getTemplateBaseUrl();return _0x5503f6+_0x52742a(0xcb);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a79_0x5b31f7(0xc1));export async function fetchRulesFromCDN(){const _0x3be81c=a79_0x5b31f7,_0x31ad6b=getRulesCdnUrl(),_0x49ab7d=await fetch(_0x31ad6b,{'headers':{'Accept':'application/json'}});if(!_0x49ab7d['ok'])throw new Error(_0x3be81c(0xc3)+_0x49ab7d[_0x3be81c(0xce)]+'\x20'+_0x49ab7d[_0x3be81c(0xbc)]);const _0x2d2b4e=await _0x49ab7d[_0x3be81c(0xcc)]();if(!_0x2d2b4e[_0x3be81c(0xca)]||typeof _0x2d2b4e[_0x3be81c(0xca)]!=='string')throw new Error(_0x3be81c(0xc7));return _0x2d2b4e;}export async function getRulesContent(){try{const _0x4e0ef2=await fetchRulesFromCDN();return _0x4e0ef2['content'];}catch{return readLocalTemplate();}}function a79_0x2462(){const _0x344054=['/rules/rules.json','json','67370BmRGqO','status','9qXCNxw','1275ZAvtFm','lastUpdated','1576572xDARFD','1594AdvWrr','1940687vlwpSw','statusText','utf-8','agents.md','2669424eAbndc','本地模板文件不存在:\x20','../../cdn-source/rules/lovrabet_rules.mdc.tpl','68889yRZhws','CDN\x20请求失败:\x20','4ZBEVQR','.cursor/rules','2537780EtuPyf','CDN\x20返回数据格式错误','catch','lovrabet_rules.mdc','content'];a79_0x2462=function(){return _0x344054;};return a79_0x2462();}function a79_0x4326(_0x163be2,_0x1d09e0){_0x163be2=_0x163be2-0xba;const _0x24626d=a79_0x2462();let _0x43265d=_0x24626d[_0x163be2];return _0x43265d;}export function readLocalTemplate(){const _0x3ad75f=a79_0x5b31f7;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,'utf-8');throw new Error(_0x3ad75f(0xc0)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x286b1b){const _0x489c37=a79_0x5b31f7,_0x1b6379=await fetchRulesFromCDN()[_0x489c37(0xc8)](()=>null);let _0x44f5e2;_0x1b6379?(_0x44f5e2=_0x1b6379[_0x489c37(0xca)],_0x1b6379[_0x489c37(0xd1)]&&(_0x44f5e2=appendUpdateTime(_0x44f5e2,_0x1b6379['lastUpdated']))):_0x44f5e2=readLocalTemplate();const _0x54ffab=dirname(_0x286b1b);!existsSync(_0x54ffab)&&mkdirSync(_0x54ffab,{'recursive':!![]}),writeFileSync(_0x286b1b,_0x44f5e2,_0x489c37(0xbd));}export async function copyRulesToCursor(_0x99aaf9){const _0x4f3094=a79_0x5b31f7,_0x22bbdf=join(_0x99aaf9,_0x4f3094(0xc5)),_0x5cd255=join(_0x22bbdf,_0x4f3094(0xc9));if(existsSync(_0x5cd255))return![];return await writeRulesFile(_0x5cd255),!![];}export async function copyRulesToAgentsMd(_0x146813){const _0x10157d=a79_0x5b31f7,_0x190b31=join(_0x146813,_0x10157d(0xbe));if(existsSync(_0x190b31))return![];return await writeRulesFile(_0x190b31),!![];}
1
+ const a84_0x4765d5=a84_0x312e;(function(_0xba1f3e,_0xb4e45f){const _0x24b25c=a84_0x312e,_0x153b42=_0xba1f3e();while(!![]){try{const _0x4e3e17=parseInt(_0x24b25c(0x1f8))/0x1+-parseInt(_0x24b25c(0x1ef))/0x2*(-parseInt(_0x24b25c(0x1f7))/0x3)+-parseInt(_0x24b25c(0x1ea))/0x4+-parseInt(_0x24b25c(0x1f2))/0x5+parseInt(_0x24b25c(0x1e7))/0x6+parseInt(_0x24b25c(0x1f5))/0x7+-parseInt(_0x24b25c(0x1ee))/0x8;if(_0x4e3e17===_0xb4e45f)break;else _0x153b42['push'](_0x153b42['shift']());}catch(_0x42a2f8){_0x153b42['push'](_0x153b42['shift']());}}}(a84_0x34cb,0xceec5));function a84_0x34cb(){const _0x2a1fc8=['lastUpdated','.cursor/rules','../../cdn-source/rules/lovrabet_rules.mdc.tpl','utf-8','json','8570562SOcmla','catch','application/json','6640200MpTtUX','content','CDN\x20请求失败:\x20','/rules/rules.json','3271504UlPkIG','1920862sQbivx','lovrabet_rules.mdc','CDN\x20返回数据格式错误','4807385tiTPBc','本地模板文件不存在:\x20','statusText','7782467cKUQrV','string','3orgUAA','377383rQTIuw'];a84_0x34cb=function(){return _0x2a1fc8;};return a84_0x34cb();}import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';function a84_0x312e(_0x2c8c9d,_0x492401){_0x2c8c9d=_0x2c8c9d-0x1e4;const _0x34cb98=a84_0x34cb();let _0x312e24=_0x34cb98[_0x2c8c9d];return _0x312e24;}import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x56861f=a84_0x312e,_0x4098a8=getTemplateBaseUrl();return _0x4098a8+_0x56861f(0x1ed);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a84_0x4765d5(0x1e4));export async function fetchRulesFromCDN(){const _0x1a9557=a84_0x4765d5,_0x3495c7=getRulesCdnUrl(),_0x55b2a1=await fetch(_0x3495c7,{'headers':{'Accept':_0x1a9557(0x1e9)}});if(!_0x55b2a1['ok'])throw new Error(_0x1a9557(0x1ec)+_0x55b2a1['status']+'\x20'+_0x55b2a1[_0x1a9557(0x1f4)]);const _0x48a43d=await _0x55b2a1[_0x1a9557(0x1e6)]();if(!_0x48a43d[_0x1a9557(0x1eb)]||typeof _0x48a43d[_0x1a9557(0x1eb)]!==_0x1a9557(0x1f6))throw new Error(_0x1a9557(0x1f1));return _0x48a43d;}export async function getRulesContent(){const _0x5d8703=a84_0x4765d5;try{const _0x7ab910=await fetchRulesFromCDN();return _0x7ab910[_0x5d8703(0x1eb)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x374f02=a84_0x4765d5;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x374f02(0x1e5));throw new Error(_0x374f02(0x1f3)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x51594f){const _0x47e525=a84_0x4765d5,_0x338643=await fetchRulesFromCDN()[_0x47e525(0x1e8)](()=>null);let _0x4148c6;_0x338643?(_0x4148c6=_0x338643['content'],_0x338643['lastUpdated']&&(_0x4148c6=appendUpdateTime(_0x4148c6,_0x338643[_0x47e525(0x1f9)]))):_0x4148c6=readLocalTemplate();const _0x535989=dirname(_0x51594f);!existsSync(_0x535989)&&mkdirSync(_0x535989,{'recursive':!![]}),writeFileSync(_0x51594f,_0x4148c6,_0x47e525(0x1e5));}export async function copyRulesToCursor(_0x22e3c1){const _0x322773=a84_0x4765d5,_0x3f65bb=join(_0x22e3c1,_0x322773(0x1fa)),_0x25846b=join(_0x3f65bb,_0x322773(0x1f0));if(existsSync(_0x25846b))return![];return await writeRulesFile(_0x25846b),!![];}export async function copyRulesToAgentsMd(_0x2acc20){const _0x2e53d4=join(_0x2acc20,'agents.md');if(existsSync(_0x2e53d4))return![];return await writeRulesFile(_0x2e53d4),!![];}
@@ -1 +1 @@
1
- export function sleep(_0x2c4f8a){return new Promise(_0x49f98e=>setTimeout(_0x49f98e,_0x2c4f8a));}
1
+ export function sleep(_0x234a73){return new Promise(_0x260e97=>setTimeout(_0x260e97,_0x234a73));}