@2api-store/activate 0.8.0 → 0.9.0

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.
package/dist/activate.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function _0xa4cb(_0xc50c4b,_0x21c29e){_0xc50c4b=_0xc50c4b-0x186;const _0x22920a=_0x2292();let _0xa4cbf3=_0x22920a[_0xc50c4b];return _0xa4cbf3;}const _0x3700ab=_0xa4cb;(function(_0x40907b,_0x3220fa){const _0x49b935=_0xa4cb,_0x408abf=_0x40907b();while(!![]){try{const _0x37d3ba=-parseInt(_0x49b935(0x260))/0x1+parseInt(_0x49b935(0x1fc))/0x2*(parseInt(_0x49b935(0x275))/0x3)+-parseInt(_0x49b935(0x262))/0x4+-parseInt(_0x49b935(0x222))/0x5+-parseInt(_0x49b935(0x1da))/0x6+-parseInt(_0x49b935(0x237))/0x7*(-parseInt(_0x49b935(0x24e))/0x8)+parseInt(_0x49b935(0x26a))/0x9*(parseInt(_0x49b935(0x243))/0xa);if(_0x37d3ba===_0x3220fa)break;else _0x408abf['push'](_0x408abf['shift']());}catch(_0x25d9d6){_0x408abf['push'](_0x408abf['shift']());}}}(_0x2292,0x2c6ad),(process[_0x3700ab(0x24c)](_0x3700ab(0x24a)),process[_0x3700ab(0x20d)][_0x3700ab(0x1db)]='1'));import{detectAll as _0x5e3a08}from'./lib/detect.mjs';function _0x2292(){const _0x2adc78=['MydyO','KmUMD','选择\x20CLI','usage','\x20(未装)','available','GqvXS','exit','length','grok','(新用户已创建)','\x0a@2api-store/activate\x20v','qoqrQ','backup-failed','model','请求\x20GET\x20/v1/models…','label','Mzokc','has','isMac','可能是分组不匹配或账号临时不可用,使用时会报\x20404/429','[试运行]\x20将写入\x20','group','rfUMy','未捕获错误:','key','备份失败:','shell-only','失败\x20','FArdr','UkJXT','content','zDYvA','pDcKd','handler','NNCpW','base_url','请求激活服务','1053120QEdljd','NODE_NO_WARNINGS','ibhsA','bLSnm','GwFbs','LRkvT','node','兑换码','XMSpq','ckQzY','MUzmb','VMrrc','dryRun','dim','未查询到可用分组。请联系管理员开通分组后再激活。','configs','dFSQO','\x20\x20[shell\x20命令,请手动执行]','client_type','isLinux','(跳过此文件避免无备份覆盖)','\x20已安装','pTUTA','RNMyj','未选择任何\x20CLI,退出。','email','gxleF','YbLsu','isWindows','gemini','unknown','kUvPK','CECgw','path','910aFbqxu','检查\x20CLI\x20安装状态','验证未通过:','PowerShell','\x20异常:','stack','alreadyInstalled','yTGGf','qWNJB','action','未知错误','MxSsd','未检测到\x20','\x20\x20备份:','error','version','split','env','获取可用分组','inIyQ','【试运行模式\x20--dry-run】不会真写文件、不会真装\x20CLI','permission-denied','clientType','Linux','config','argv','\x20/\x20','\x20安装(','\x20项(见上方输出)','\x20\x20目标:','环境:','(仍会写入配置;如需更换请重跑激活选择其他模型)','邮箱格式不正确','--api-base','haeuO','凭据格式无法识别(应为\x20sk-\x20前缀的\x20API\x20Key\x20或兑换码)','files','TPjFS','1677470dEVwVY','macOS','rBaty','wfayt','installed','rLMgJ','map','YqMVK','sk-','📧\x20新账号\x20','displayName','models','help','(ID\x20','log','\x20\x20\x20\x20','doBKu','cVkOs','oVodu','https://2api.store','\x20个模型当前无可用账号(标注\x20⚠,可能是分组不匹配或账号临时不可用)','7DbJKFU','lcEOv','yZAoC','meta','LljLk','\x20·\x20node\x20v','wxRzw','push','Windows','已写入','zCkgD','add','80YsLLxj','startsWith',')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示帮助\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示版本\x0a\x0a','已写入\x20','fewYZ','backup','base_url_beta','warning','message','removeAllListeners','XonrU','120016rOxxwy','lvEVn','reason','mBKuX','\x20\x20[试运行]\x20不真实写入','未输入凭据','UoJtm','你的\x20key\x20所属分组:','GPDsy','user','statusCode','选择绑定的分组','\x20项:','\x20\x20\x20\x20...(共\x20','zWfhe','string','FBYwc','claude','91684rDfvNM','HTTP\x20','386188iRbUrx','YWUMc','JFMNx','detectBin','failed','ACTIVATE_API_BASE','iNfHU','redeem','683703WufMgb','JndXg','apiBase','all','平台过滤:','test','KHUnJ','replace','(配置已写入,请手动检查)','kbjFe','green','1704ADxmMm','get','选择默认模型(最新优先)','已检测到\x20CLI:','\x20安装失败:','catch','vnYfr','选择默认模型','\x20平台,ID\x20','name','display_name','cli','uoAHB','(配置仍会写入,但请手动安装后使用)','/antigravity','written','sSQAD','备份并写入配置','isArray','rdLUI','trim','UexZs','(跳过模型可用性探测:服务端暂不支持或网络不可达)','\x20个文件','dSGwu','BkXOH','os_type','\x20\x20内容预览:','platform','rHXea','fiqfl','需要\x20node\x20>=\x2018,当前\x20','激活报告','AknMY','服务端未返回模型列表,{{defaultModel}}\x20将留空','join','keys','aFyNv','需手动执行的\x20shell\x20命令:','is_new','dry-run','备份位置:','\x0a\x0a环境变量:\x0a\x20\x20ACTIVATE_API_BASE\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(同\x20--api-base)\x0a\x0a示例:\x0a\x20\x20npx\x20@2api-store/activate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20默认激活\x0a\x20\x20npx\x20@2api-store/activate\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20试运行\x0a\x20\x20npx\x20@2api-store/activate\x20--platform\x20openai\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20只激活\x20openai\x0a\x20\x20npx\x20@2api-store/activate\x20restore\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20从备份恢复\x0a\x20\x20npx\x20@2api-store/activate\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20恢复官方默认\x0a\x20\x20npx\x20@2api-store/activate\x20refresh-groups\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20查看可用分组\x0a\x20\x20ACTIVATE_API_BASE=http://127.0.0.1:5566\x20npx\x20@2api-store/activate\x0a\x0a退出码:\x0a\x20\x200\x20\x20成功\x0a\x20\x201\x20\x20输入错误\x20/\x20网络失败\x20/\x20致命错误\x0a\x20\x202\x20\x20部分文件权限不足(请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)\x0a\x20\x203\x20\x20其他写入失败\x0a','filter','slice','windows','ZGLyI','请输入邮箱(用于兑换码绑定\x20/\x20新账号创建)','\x20个文件(未真实写入)','EUCEd','TAnsl','includes','YPtHS','YcmIo','toLowerCase','anthropic','api_key','CxRrl','Ezlpj','未选择分组','startCmd','mDXxK','Tmafq','\x20\x20-\x20','输入模型\x20ID(如\x20gpt-5.6-terra)','KulHW','fCBKG','写入失败:','JPimb','──\x20','模式:','\x20──','YiXHQ','已选分组:','sSYmb','新账号:','pnmbr'];_0x2292=function(){return _0x2adc78;};return _0x2292();}import{cliActivate as _0x5ef493,listGroups as _0x403a67,verifyApiKey as _0x56a247,probeModels as _0x505e25}from'./lib/api.mjs';import{renderContent as _0x31fc6a,expandPath as _0x5ada4f,listModels as _0x336686}from'./lib/render.mjs';import{backupFile as _0x167607}from'./lib/backup.mjs';import{writeFileWithPermission as _0x2896fa,PermissionDeniedError as _0x188d82}from'./lib/write.mjs';import{ask as _0x1bda94,askSecret as _0x217568,multiSelect as _0x46af81,select as _0x1395c7,confirm as _0x57e916,closePrompt as _0x436960}from'./lib/prompt.mjs';import{banner as _0x3fb386,ok as _0x14dad2,fail as _0x5e2d7e,warn as _0x3a2d60,info as _0x698c48,step as _0x5ebcd4,guide as _0x4de158,plain as _0x32db3f,chalk as _0x4d25a8}from'./lib/ui.mjs';import{getCliMeta as _0x19419e,isDefaultSelected as _0x21a56d}from'./lib/platforms.mjs';import{ensureInstalled as _0x2db027}from'./lib/install.mjs';import{SUBCOMMANDS as _0x30a335,SUBCOMMAND_NAMES as _0x1d9840,SUB_HELP as _0x15490d}from'./lib/cmds.mjs';import{createRequire as _0x278540}from'node:module';const L=_0x278540(import.meta.url)('./package.json')[_0x3700ab(0x20b)],E=_0x3700ab(0x235);(async function(){const _0x17f543=_0x3700ab,_0x283394={'sSQAD':function(_0x19b15a,_0x216ee6){return _0x19b15a===_0x216ee6;},'ZybhU':'--dry-run','mBKuX':function(_0x483fb3,_0x1f5c1b){return _0x483fb3===_0x1f5c1b;},'ibhsA':'--platform','Hysri':_0x17f543(0x21d),'iNfHU':'--version','YiXHQ':function(_0x4752c6,_0x40b1f8){return _0x4752c6==_0x40b1f8;},'EUCEd':_0x17f543(0x25d),'wfayt':_0x17f543(0x25f),'EUHUS':_0x17f543(0x19e),'YcmIo':_0x17f543(0x1f7),'cVkOs':_0x17f543(0x1bd),'Mzokc':function(_0x24593f,_0xfa7d4e){return _0x24593f(_0xfa7d4e);},'rfUMy':function(_0x3d4b8b){return _0x3d4b8b();},'haeuO':_0x17f543(0x223),'yZAoC':_0x17f543(0x23f),'KulHW':function(_0x221626,_0x920008){return _0x221626(_0x920008);},'rLMgJ':function(_0x1b05f2,_0x26fe9a){return _0x1b05f2>_0x26fe9a;},'zWfhe':function(_0x70cb42,_0x558a66){return _0x70cb42(_0x558a66);},'pnmbr':function(_0x44879b,_0x4d5dd2){return _0x44879b(_0x4d5dd2);},'JndXg':'未检测到\x20codex/claude/gemini/grok/opencode(可在后续步骤按需自动安装)','wxRzw':function(_0xa92d7b,_0x4bab2b){return _0xa92d7b(_0x4bab2b);},'gxleF':_0x17f543(0x210),'JFMNx':function(_0x43f4b0,_0x1a3d7e){return _0x43f4b0(_0x1a3d7e);},'Tmafq':function(_0x24ca8a,_0x1312eb){return _0x24ca8a(_0x1312eb);},'vadMj':'请输入\x20API\x20Key(sk-...)或兑换码','kbjFe':function(_0x1d06c2,_0x28a8ec){return _0x1d06c2(_0x28a8ec);},'sSYmb':_0x17f543(0x253),'pTUTA':_0x17f543(0x22a),'MUzmb':_0x17f543(0x1cd),'inIyQ':_0x17f543(0x269),'zDYvA':_0x17f543(0x1f8),'Ezlpj':'empty','LljLk':_0x17f543(0x21f),'NNCpW':'API\x20Key','lcEOv':_0x17f543(0x21c),'zCkgD':function(_0x1ce554,_0x1544e2){return _0x1ce554(_0x1544e2);},'GqvXS':function(_0x4787f8,_0x291cb2){return _0x4787f8===_0x291cb2;},'qoqrQ':_0x17f543(0x1e8),'kUvPK':function(_0xbc8929,_0x31f5da){return _0xbc8929(_0x31f5da);},'bLSnm':function(_0x7e4d3a,_0x4ba843){return _0x7e4d3a(_0x4ba843);},'BkXOH':function(_0x4bea26,_0x15c1c3){return _0x4bea26(_0x15c1c3);},'rBaty':_0x17f543(0x1be),'GwFbs':function(_0x1df5ea,_0x5339b5){return _0x1df5ea(_0x5339b5);},'fCBKG':function(_0x3bf64e,_0x43c711){return _0x3bf64e===_0x43c711;},'fewYZ':'服务端未返回适配当前系统的配置模板','AknMY':function(_0x2cd333,_0xc011de){return _0x2cd333(_0xc011de);},'eGoZD':'(独立\x20CLI)','MxSsd':function(_0x5a0ffe,_0x5d9ea1){return _0x5a0ffe(_0x5d9ea1);},'qWNJB':_0x17f543(0x1b6),'lvEVn':function(_0x37eb57,_0x28cb83,_0x4c10c0,_0x24a1e8){return _0x37eb57(_0x28cb83,_0x4c10c0,_0x24a1e8);},'UkJXT':'选择要激活的\x20CLI(绿色=已装,灰色=未装;默认选主\x20CLI,独立\x20CLI\x20默认不选)','ckQzY':function(_0x7873cf,_0x570ae2){return _0x7873cf===_0x570ae2;},'MydyO':function(_0x6f7256,_0xc827ea){return _0x6f7256(_0xc827ea);},'bDPsY':_0x17f543(0x1f2),'RNMyj':_0x17f543(0x1fd),'GPDsy':function(_0x55fdbd,_0x270243,_0x30a0a4){return _0x55fdbd(_0x270243,_0x30a0a4);},'aFyNv':function(_0x3e3d5b,_0x1f8e92){return _0x3e3d5b===_0x1f8e92;},'TAnsl':_0x17f543(0x206),'LRkvT':function(_0x4489af,_0x2873ad){return _0x4489af(_0x2873ad);},'jcafQ':_0x17f543(0x277),'VMrrc':_0x17f543(0x28b),'THHvk':function(_0x3dea43,_0x172bfa){return _0x3dea43>_0x172bfa;},'VthcO':'其他(手动输入模型\x20ID)','KHUnJ':function(_0x4053ea,_0x44ed8e,_0x546a16,_0x524085){return _0x4053ea(_0x44ed8e,_0x546a16,_0x524085);},'UoJtm':_0x17f543(0x1a7),'UexZs':function(_0x274404,_0xc402c8){return _0x274404(_0xc402c8);},'doBKu':function(_0x2658a2,_0x2e54e9){return _0x2658a2(_0x2e54e9);},'sFUBw':_0x17f543(0x1c8),'dSGwu':_0x17f543(0x216),'XMSpq':function(_0x58b27f,_0x1c1ffe){return _0x58b27f(_0x1c1ffe);},'wOPTk':_0x17f543(0x189),'hmCMl':_0x17f543(0x286),'YbLsu':function(_0x32f463,_0x2463e8){return _0x32f463(_0x2463e8);},'vnYfr':'Terminal','rdLUI':_0x17f543(0x1ff),'jPXBA':_0x17f543(0x1eb),'YPtHS':function(_0xba2519,_0x5eb73c){return _0xba2519(_0x5eb73c);},'TPjFS':_0x17f543(0x252),'KPtCe':_0x17f543(0x290),'rHXea':'dry-run','FooeG':function(_0x5ed25e,_0x573bbf){return _0x5ed25e(_0x573bbf);},'KmUMD':function(_0x44a2dc,_0x20651b){return _0x44a2dc(_0x20651b);},'yTGGf':_0x17f543(0x240),'FArdr':_0x17f543(0x284),'NRGfF':function(_0x43ff27,_0x16cd77){return _0x43ff27 instanceof _0x16cd77;},'pDcKd':_0x17f543(0x211),'YqMVK':'failed','CECgw':'验证\x20API\x20Key','NBTMt':function(_0x360c0d,_0x185139){return _0x360c0d(_0x185139);},'YWUMc':_0x17f543(0x1c3),'oVodu':'API\x20Key\x20验证通过(GET\x20/v1/models\x20→\x20200)','dFSQO':function(_0x31be10,_0x297ccd){return _0x31be10(_0x297ccd);},'fiqfl':function(_0x1d3b69,_0x372f14){return _0x1d3b69(_0x372f14);},'JPimb':_0x17f543(0x187),'uoAHB':function(_0xaa65ee,_0x3233ea){return _0xaa65ee(_0x3233ea);},'CxRrl':function(_0x4294e8,_0x2a6a6e){return _0x4294e8>_0x2a6a6e;},'FBYwc':function(_0x3a47c5,_0x199249){return _0x3a47c5(_0x199249);},'mDXxK':'部分文件权限不足,请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑:','FPIbb':function(_0x2823b0,_0x446d63){return _0x2823b0(_0x446d63);},'XonrU':'\x20\x20sudo\x20npx\x20-y\x20@2api-store/activate'},_0x1b72cf=process[_0x17f543(0x215)][0x2];if(_0x1b72cf&&!_0x1b72cf[_0x17f543(0x244)]('-')&&_0x1d9840[_0x17f543(0x1c6)](_0x1b72cf)){const _0x314cea=process['argv']['slice'](0x3),_0x3e3f74=_0x30a335[_0x1b72cf];try{return await _0x3e3f74[_0x17f543(0x1d6)](_0x314cea)||0x0;}catch(_0x213b21){return _0x283394[_0x17f543(0x1c5)](_0x5e2d7e,'子命令\x20'+_0x1b72cf+_0x17f543(0x200)+(_0x213b21?.[_0x17f543(0x24b)]||_0x213b21)),_0x213b21?.[_0x17f543(0x201)]&&console[_0x17f543(0x20a)](_0x213b21['stack']),0x1;}}const _0x2b5f59=function(_0x235a6a){const _0x53f2e6=_0x17f543,_0x157f05={'dryRun':!0x1,'platform':null,'_':[]};for(let _0x2914ec=0x0;_0x2914ec<_0x235a6a[_0x53f2e6(0x1bc)];_0x2914ec++){const _0x5b30df=_0x235a6a[_0x2914ec];if(_0x283394[_0x53f2e6(0x285)](_0x283394['ZybhU'],_0x5b30df)||_0x283394[_0x53f2e6(0x251)]('-n',_0x5b30df))_0x157f05[_0x53f2e6(0x1e6)]=!0x0;else{if(_0x283394[_0x53f2e6(0x251)](_0x283394[_0x53f2e6(0x1dc)],_0x5b30df)||_0x283394[_0x53f2e6(0x285)]('-p',_0x5b30df))_0x157f05[_0x53f2e6(0x291)]=_0x235a6a[++_0x2914ec];else{if(_0x283394[_0x53f2e6(0x251)](_0x283394['Hysri'],_0x5b30df))_0x157f05[_0x53f2e6(0x26c)]=_0x235a6a[++_0x2914ec];else{if('--help'===_0x5b30df||_0x283394['mBKuX']('-h',_0x5b30df))_0x157f05[_0x53f2e6(0x22e)]=!0x0;else{if(_0x283394[_0x53f2e6(0x268)]===_0x5b30df||_0x283394[_0x53f2e6(0x251)]('-v',_0x5b30df))_0x157f05[_0x53f2e6(0x20b)]=!0x0;else{if(_0x5b30df[_0x53f2e6(0x244)]('--')&&_0x5b30df['includes']('=')){const [_0x399f9f,_0x12aec8]=_0x5b30df[_0x53f2e6(0x193)](0x2)[_0x53f2e6(0x20c)](/=(.*)/,0x2);_0x157f05[_0x399f9f]=_0x12aec8;}else _0x5b30df[_0x53f2e6(0x244)]('--')?_0x157f05[_0x5b30df[_0x53f2e6(0x271)](/^--/,'')]=_0x235a6a[++_0x2914ec]:_0x157f05['_'][_0x53f2e6(0x23e)](_0x5b30df);}}}}}}return _0x157f05;}(process[_0x17f543(0x215)][_0x17f543(0x193)](0x2));if(_0x2b5f59[_0x17f543(0x22e)])return console[_0x17f543(0x230)]((_0x17f543(0x1bf)+L+'\x20—\x20TokenShop\x20CLI\x20一键激活\x0a\x0a用法:\x0a\x20\x20npx\x20@2api-store/activate\x20[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20默认激活流程\x0a\x20\x20npx\x20@2api-store/activate\x20<subcommand>\x20[options]\x20\x20\x20运行子命令\x0a\x0a选项(默认激活流程):\x0a\x20\x20--dry-run,\x20-n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20不真写配置/不真装\x20CLI,只展示将做什么\x0a\x20\x20--platform\x20<name>\x20\x20\x20\x20\x20\x20只激活指定平台(openai/anthropic/gemini/grok/antigravity)\x0a\x20\x20--api-base\x20<url>\x20\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(默认\x20$ACTIVATE_API_BASE\x20或\x20'+E+_0x17f543(0x245)+_0x15490d+_0x17f543(0x191))['trim']()),0x0;if(_0x2b5f59[_0x17f543(0x20b)])return console[_0x17f543(0x230)](L),0x0;_0x283394[_0x17f543(0x1cb)](_0x3fb386);const _0xcf590e=_0x283394[_0x17f543(0x1cb)](_0x5e3a08),_0xdbe859=_0xcf590e['os'][_0x17f543(0x1c7)]?_0x283394[_0x17f543(0x21e)]:_0xcf590e['os'][_0x17f543(0x1ed)]?_0x17f543(0x213):_0xcf590e['os'][_0x17f543(0x1f6)]?_0x283394[_0x17f543(0x239)]:_0xcf590e['os'][_0x17f543(0x291)];if(_0x283394[_0x17f543(0x1c5)](_0x698c48,_0x17f543(0x21a)+_0xdbe859+_0x17f543(0x23c)+_0xcf590e[_0x17f543(0x1e0)]['version']),!_0xcf590e['node']['supported'])return _0x283394[_0x17f543(0x1a8)](_0x5e2d7e,_0x17f543(0x186)+_0xcf590e[_0x17f543(0x1e0)]['version']),0x1;const _0x2d3fe5=Object[_0x17f543(0x18b)](_0xcf590e[_0x17f543(0x226)]),_0x5dc7ee=_0x2d3fe5[_0x17f543(0x228)](_0x37dd71=>{const _0x3f2c08=_0x17f543,_0x2fddae=_0xcf590e[_0x3f2c08(0x226)][_0x37dd71]?.[_0x3f2c08(0x20b)];return _0x2fddae?_0x37dd71+'@'+_0x2fddae:_0x37dd71;});_0x283394[_0x17f543(0x227)](_0x2d3fe5[_0x17f543(0x1bc)],0x0)?_0x283394[_0x17f543(0x25c)](_0x14dad2,_0x17f543(0x278)+_0x5dc7ee[_0x17f543(0x18a)](',\x20')):_0x283394[_0x17f543(0x1b3)](_0x698c48,_0x283394[_0x17f543(0x26b)]);const _0x2325e7=_0x2b5f59[_0x17f543(0x26c)]||process[_0x17f543(0x20d)][_0x17f543(0x267)]||E;_0x283394[_0x17f543(0x23d)](_0x698c48,'API\x20端点:'+_0x2325e7),_0x2b5f59[_0x17f543(0x1e6)]&&_0x283394['Mzokc'](_0x3a2d60,_0x283394[_0x17f543(0x1f4)]),_0x2b5f59[_0x17f543(0x291)]&&_0x283394['JFMNx'](_0x698c48,_0x17f543(0x26e)+_0x2b5f59['platform']),console[_0x17f543(0x230)]();const _0x597548=(await _0x283394[_0x17f543(0x1a5)](_0x217568,_0x283394['vadMj']))['trim']();if(!_0x597548)return _0x283394[_0x17f543(0x273)](_0x5e2d7e,_0x283394[_0x17f543(0x1b1)]),0x1;const _0x5f1289=(_0x3d40ae=_0x597548)?_0x3d40ae['startsWith'](_0x283394[_0x17f543(0x1f0)])?_0x283394[_0x17f543(0x1e4)]:/^[a-zA-Z0-9]{16,64}$/[_0x17f543(0x26f)](_0x3d40ae)?_0x283394[_0x17f543(0x20f)]:_0x283394[_0x17f543(0x1d4)]:_0x283394[_0x17f543(0x1a1)];var _0x3d40ae;if(_0x283394[_0x17f543(0x1d4)]===_0x5f1289)return _0x5e2d7e(_0x283394[_0x17f543(0x23b)]),0x1;_0x698c48('识别为:'+(_0x283394[_0x17f543(0x251)](_0x283394['MUzmb'],_0x5f1289)?_0x283394[_0x17f543(0x1d7)]:_0x17f543(0x1e1))+'模式');let _0x4bf03a,_0x3ddd2d='',_0x18cdfe=null;if(_0x283394[_0x17f543(0x20f)]===_0x5f1289){if(_0x3ddd2d=(await _0x283394['KulHW'](_0x1bda94,_0x17f543(0x196)))['trim'](),!_0x3ddd2d||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/[_0x17f543(0x26f)](_0x3ddd2d))return _0x5e2d7e(_0x283394[_0x17f543(0x238)]),0x1;_0x283394[_0x17f543(0x241)](_0x5ebcd4,_0x17f543(0x20e));const _0x44bf9d=await _0x283394[_0x17f543(0x1a8)](_0x403a67,{'apiBase':_0x2325e7});if(_0x283394[_0x17f543(0x1ba)](0x0,_0x44bf9d[_0x17f543(0x1bc)]))return _0x283394[_0x17f543(0x25c)](_0x5e2d7e,_0x283394[_0x17f543(0x1c0)]),0x1;const _0x256c08=_0x44bf9d['map'](_0x21522a=>({'label':''+_0x21522a[_0x17f543(0x27e)],'value':_0x21522a['id']})),_0x478689=await _0x1395c7(_0x17f543(0x259),_0x256c08,{'defaultIndex':0x0});if(_0x18cdfe=_0x44bf9d[_0x478689]?.['id'],!_0x18cdfe)return _0x283394[_0x17f543(0x1a8)](_0x5e2d7e,_0x17f543(0x1a2)),0x1;_0x14dad2(_0x17f543(0x1b0)+_0x44bf9d[_0x478689][_0x17f543(0x27e)]+_0x17f543(0x22f)+_0x18cdfe+')'),console['log']();}_0x283394[_0x17f543(0x1f9)](_0x5ebcd4,_0x17f543(0x1d9));try{_0x4bf03a=await _0x283394[_0x17f543(0x1dd)](_0x5ef493,{'credential':_0x597548,'email':_0x3ddd2d,'platform':_0x2b5f59[_0x17f543(0x291)],'groupId':_0x18cdfe,'apiBase':_0x2325e7});}catch(_0x2f830e){return _0x283394['kbjFe'](_0x5e2d7e,'激活失败:'+_0x2f830e[_0x17f543(0x24b)]),_0x2f830e[_0x17f543(0x258)]&&_0x283394[_0x17f543(0x28e)](_0x5e2d7e,'\x20\x20HTTP\x20'+_0x2f830e[_0x17f543(0x258)]),0x1;}_0x4bf03a[_0x17f543(0x1ca)]?.['name']&&_0x283394[_0x17f543(0x273)](_0x698c48,_0x17f543(0x255)+_0x4bf03a['group'][_0x17f543(0x27e)]+'('+(_0x4bf03a['group'][_0x17f543(0x291)]||'未知')+_0x17f543(0x27d)+_0x4bf03a['group']['id']+')'),_0x283394[_0x17f543(0x23d)](_0x14dad2,_0x17f543(0x1ad)+_0x4bf03a['mode']+(_0x4bf03a[_0x17f543(0x257)]?.['is_new']?_0x283394[_0x17f543(0x224)]:'')),_0x4bf03a[_0x17f543(0x257)]?.[_0x17f543(0x18e)]&&_0x4bf03a['user']?.[_0x17f543(0x1f3)]&&(_0x283394[_0x17f543(0x1a8)](_0x698c48,_0x17f543(0x1b2)+_0x4bf03a[_0x17f543(0x257)][_0x17f543(0x1f3)]),_0x4bf03a[_0x17f543(0x257)][_0x17f543(0x24b)]&&_0x283394['GwFbs'](_0x698c48,_0x4bf03a[_0x17f543(0x257)][_0x17f543(0x24b)])),console[_0x17f543(0x230)]();const _0x2a1bae=function(_0x458869){const _0x570638=_0x17f543,_0x123629=new Set();for(const _0x47332b of _0x458869||[]){const _0x2333b2=(_0x283394[_0x570638(0x1af)](_0x283394[_0x570638(0x198)],typeof _0x47332b)?_0x47332b:_0x47332b?.['id']||'')[_0x570638(0x19d)]();/^(gpt|o1|o3|codex|glm|minimax|deepseek)/['test'](_0x2333b2)?_0x123629[_0x570638(0x242)]('openai'):_0x2333b2[_0x570638(0x244)](_0x283394[_0x570638(0x225)])?_0x123629['add'](_0x283394['EUHUS']):_0x2333b2[_0x570638(0x244)](_0x283394['YcmIo'])?_0x123629[_0x570638(0x242)](_0x283394[_0x570638(0x19c)]):_0x2333b2[_0x570638(0x244)](_0x283394[_0x570638(0x233)])&&_0x123629['add'](_0x283394[_0x570638(0x233)]);}return[..._0x123629];}(_0x4bf03a[_0x17f543(0x22d)]||[]);_0x2b5f59[_0x17f543(0x291)]&&!_0x2a1bae[_0x17f543(0x19a)](_0x2b5f59[_0x17f543(0x291)])&&_0x2a1bae['push'](_0x2b5f59[_0x17f543(0x291)]);const _0x241880=(_0x4bf03a[_0x17f543(0x1e9)]||[])[_0x17f543(0x192)](_0xab48a2=>!!_0xab48a2&&(!(_0x2a1bae['length']>0x0&&!_0x2a1bae[_0x17f543(0x19a)](_0xab48a2[_0x17f543(0x291)]))&&((!_0x2b5f59[_0x17f543(0x291)]||_0xab48a2[_0x17f543(0x291)]===_0x2b5f59['platform'])&&(_0xcf590e['os'][_0x17f543(0x1f6)]?_0x17f543(0x194)===_0xab48a2['os_type']||'all'===_0xab48a2[_0x17f543(0x28f)]:'unix'===_0xab48a2[_0x17f543(0x28f)]||_0x17f543(0x26d)===_0xab48a2[_0x17f543(0x28f)]))));if(_0x283394['fCBKG'](0x0,_0x241880[_0x17f543(0x1bc)]))return _0x5e2d7e(_0x283394[_0x17f543(0x247)]),0x1;const _0x13e740=new Set(),_0x4c9212=[];for(const _0x7307d3 of _0x241880){const _0x2b58af=_0x7307d3[_0x17f543(0x291)]+'/'+_0x7307d3[_0x17f543(0x1ec)];if(_0x13e740[_0x17f543(0x1c6)](_0x2b58af))continue;_0x13e740[_0x17f543(0x242)](_0x2b58af);const _0x58fb99=_0x283394['AknMY'](_0x19419e,_0x7307d3['client_type']),_0x302f79=_0x7307d3[_0x17f543(0x27f)]||_0x7307d3[_0x17f543(0x22c)]||_0x58fb99?.['name']||_0x7307d3['platform']+'\x20'+_0x7307d3['client_type'],_0x160bb7=_0xcf590e[_0x17f543(0x226)][_0x7307d3[_0x17f543(0x1ec)]]?.[_0x17f543(0x1fb)]||_0x58fb99&&_0xcf590e[_0x17f543(0x226)][_0x58fb99['detectBin']]?.[_0x17f543(0x1fb)],_0x37e9b2=_0x21a56d(_0x7307d3[_0x17f543(0x1ec)])?'':_0x283394['eGoZD'],_0x481568=_0x160bb7?_0x4d25a8[_0x17f543(0x274)](_0x302f79):_0x4d25a8['gray'](_0x302f79+_0x17f543(0x1b8));_0x4c9212[_0x17f543(0x23e)]({'label':_0x481568+'\x20'+_0x4d25a8[_0x17f543(0x1e7)]('['+_0x7307d3['platform']+'/'+_0x7307d3[_0x17f543(0x1ec)]+']')+_0x37e9b2,'config':_0x7307d3,'clientType':_0x7307d3[_0x17f543(0x1ec)],'meta':_0x58fb99,'alreadyInstalled':!!_0x160bb7});}const _0x443d34=_0x4c9212[_0x17f543(0x228)]((_0x51bb8b,_0x47cbf5)=>({'item':_0x51bb8b,'i':_0x47cbf5}))[_0x17f543(0x192)](({item:_0xd27ce})=>_0x21a56d(_0xd27ce[_0x17f543(0x212)]))[_0x17f543(0x228)](({i:_0x535e08})=>_0x535e08);_0x283394[_0x17f543(0x207)](_0x5ebcd4,_0x283394[_0x17f543(0x204)]);const _0x1dfdd5=await _0x283394[_0x17f543(0x24f)](_0x46af81,_0x283394[_0x17f543(0x1d2)],_0x4c9212,{'defaultSelected':_0x443d34});if(_0x283394[_0x17f543(0x1e3)](0x0,_0x1dfdd5[_0x17f543(0x1bc)]))return _0x283394[_0x17f543(0x1b4)](_0x32db3f,_0x283394['bDPsY']),0x0;const _0x4c469b=_0x1dfdd5['map'](_0x253569=>_0x4c9212[_0x253569]);if(console[_0x17f543(0x230)](),!_0x2b5f59[_0x17f543(0x1e6)]){_0x5ebcd4(_0x283394[_0x17f543(0x1f1)]);for(const _0x3cc90e of _0x4c469b){if(_0x3cc90e[_0x17f543(0x202)]){const _0x3bbc1a=_0xcf590e[_0x17f543(0x226)][_0x3cc90e[_0x17f543(0x212)]]?.['version']||_0xcf590e[_0x17f543(0x226)][_0x3cc90e[_0x17f543(0x23a)]?.[_0x17f543(0x265)]]?.[_0x17f543(0x20b)];_0x283394[_0x17f543(0x264)](_0x14dad2,(_0x3cc90e[_0x17f543(0x23a)]?.['name']||_0x3cc90e[_0x17f543(0x212)])+_0x17f543(0x1ef)+(_0x3bbc1a?'(v'+_0x3bbc1a+')':''));continue;}if(!_0x3cc90e[_0x17f543(0x23a)]||!_0x3cc90e[_0x17f543(0x23a)]['installPackage']){_0x283394[_0x17f543(0x1de)](_0x3a2d60,_0x3cc90e['clientType']+'\x20无可自动安装的\x20npm\x20包,请手动安装后重跑(配置仍会写入)');continue;}_0x698c48(_0x17f543(0x208)+_0x3cc90e[_0x17f543(0x23a)][_0x17f543(0x27e)]+'(命令\x20'+_0x3cc90e[_0x17f543(0x23a)][_0x17f543(0x265)]+')');const _0x5413e2=await _0x283394[_0x17f543(0x256)](_0x2db027,_0x3cc90e[_0x17f543(0x23a)],{'dryRun':_0x2b5f59[_0x17f543(0x1e6)]});_0x5413e2['installed']?_0x283394[_0x17f543(0x23d)](_0x14dad2,_0x3cc90e[_0x17f543(0x23a)]['name']+'\x20安装成功'+(_0x5413e2[_0x17f543(0x20b)]?'(v'+_0x5413e2['version']+')':'')):_0x5413e2['skipped']&&_0x283394[_0x17f543(0x18c)]('user-declined',_0x5413e2[_0x17f543(0x250)])?_0x3a2d60('已跳过\x20'+_0x3cc90e['meta'][_0x17f543(0x27e)]+'\x20安装(配置仍会写入,但请手动安装后使用)'):_0x5413e2['skipped']?_0x283394[_0x17f543(0x188)](_0x698c48,'已跳过\x20'+_0x3cc90e['meta']['name']+_0x17f543(0x217)+_0x5413e2[_0x17f543(0x250)]+')'):_0x5e2d7e(_0x3cc90e[_0x17f543(0x23a)]['name']+_0x17f543(0x279)+(_0x5413e2[_0x17f543(0x20a)]||_0x283394[_0x17f543(0x199)])+_0x17f543(0x282));}console[_0x17f543(0x230)]();}const _0x3e1ab7=_0x283394[_0x17f543(0x1df)](_0x336686,_0x4bf03a[_0x17f543(0x22d)]||[]);let _0x62a04b='';if(_0x3e1ab7['length']>0x0){_0x283394['MydyO'](_0x5ebcd4,_0x283394['jcafQ']);let _0xf73fcf=null;if(_0x597548[_0x17f543(0x244)](_0x283394[_0x17f543(0x1f0)]))try{const _0x1e0980=await _0x505e25({'credential':_0x597548,'apiBase':_0x2325e7});_0x1e0980&&Array[_0x17f543(0x287)](_0x1e0980[_0x17f543(0x22d)])&&(_0xf73fcf=new Map(_0x1e0980[_0x17f543(0x22d)]['map'](_0x113ab7=>[_0x113ab7[_0x17f543(0x1c2)],!!_0x113ab7[_0x17f543(0x1b9)]])));}catch{_0x698c48(_0x283394[_0x17f543(0x1e5)]);}let _0x495b4b=_0x3e1ab7;if(_0xf73fcf){_0x495b4b=[..._0x3e1ab7[_0x17f543(0x192)](_0x4f6f18=>!0x1!==_0xf73fcf[_0x17f543(0x276)](_0x4f6f18['id'])),..._0x3e1ab7[_0x17f543(0x192)](_0xcefe8e=>!0x1===_0xf73fcf['get'](_0xcefe8e['id']))];const _0x14e4db=_0x495b4b[_0x17f543(0x192)](_0x32dc1c=>!0x1===_0xf73fcf['get'](_0x32dc1c['id']))['length'];_0x283394['rLMgJ'](_0x14e4db,0x0)&&_0x283394[_0x17f543(0x273)](_0x698c48,'⚠\x20'+_0x14e4db+_0x17f543(0x236));}const _0x2267d9=0xa,_0x3fd29c=_0x495b4b[_0x17f543(0x193)](0x0,_0x2267d9),_0x8212ae=_0x283394['THHvk'](_0x495b4b['length'],_0x2267d9),_0x41c7c9=_0x49263e=>_0xf73fcf?!0x1===_0xf73fcf[_0x17f543(0x276)](_0x49263e['id'])?'⚠\x20':'✓\x20':'',_0x5909a9=[..._0x3fd29c[_0x17f543(0x228)](_0x56e3bc=>({'label':''+_0x41c7c9(_0x56e3bc)+_0x56e3bc[_0x17f543(0x1c4)]+'\x20('+_0x56e3bc['id']+')'})),..._0x8212ae?[{'label':_0x4d25a8[_0x17f543(0x1e7)](_0x283394['VthcO'])}]:[]],_0x4f6c0f=await _0x283394[_0x17f543(0x270)](_0x1395c7,_0x17f543(0x27c),_0x5909a9,{'defaultIndex':0x0});if(_0x8212ae&&_0x283394[_0x17f543(0x1e3)](_0x4f6c0f,_0x3fd29c[_0x17f543(0x1bc)])?(_0x62a04b=(await _0x283394[_0x17f543(0x1de)](_0x1bda94,_0x283394[_0x17f543(0x254)]))[_0x17f543(0x289)](),_0x62a04b||(_0x62a04b=_0x3fd29c[0x0]['id'])):_0x62a04b=_0x3fd29c[_0x4f6c0f]['id'],_0x283394[_0x17f543(0x1df)](_0x14dad2,'已选默认模型:'+_0x62a04b),_0xf73fcf&&!0x1===_0xf73fcf[_0x17f543(0x276)](_0x62a04b)){const _0x47b238=_0x495b4b[_0x17f543(0x192)](_0x3b25cd=>!0x1!==_0xf73fcf['get'](_0x3b25cd['id']))['slice'](0x0,0x3)[_0x17f543(0x228)](_0x21dfe5=>_0x21dfe5['id']);_0x283394[_0x17f543(0x28a)](_0x3a2d60,'模型可用性探测:'+_0x62a04b+'\x20当前无可用账号'),_0x283394['doBKu'](_0x3a2d60,_0x283394['sFUBw']),_0x47b238[_0x17f543(0x1bc)]>0x0&&_0x283394[_0x17f543(0x1f9)](_0x3a2d60,'建议换用:'+_0x47b238[_0x17f543(0x18a)](_0x283394[_0x17f543(0x28d)])),_0x283394[_0x17f543(0x1e2)](_0x3a2d60,_0x17f543(0x21b));}}else _0x3a2d60(_0x283394['wOPTk']);console[_0x17f543(0x230)]();const _0x26d2fd=_0x4bf03a[_0x17f543(0x1d8)]||'',_0x4426b7=_0x4bf03a[_0x17f543(0x249)]||_0x26d2fd,_0x32a228={'apiKey':_0x4bf03a[_0x17f543(0x19f)]||'','baseUrl':_0x26d2fd,'apiBase':_0x26d2fd,'apiBaseBeta':_0x4426b7,'antigravityApiBase':_0x26d2fd+'/antigravity','antigravityApiBaseBeta':_0x4426b7+_0x17f543(0x283),'defaultModel':_0x62a04b};_0x5ebcd4(_0x283394['hmCMl']);const _0x39b9ec=[];let _0xa517b8=null;for(const _0x1aac8e of _0x4c469b){const _0x272ce1=_0x1aac8e[_0x17f543(0x214)][_0x17f543(0x27f)]||_0x1aac8e[_0x17f543(0x214)][_0x17f543(0x22c)]||_0x1aac8e[_0x17f543(0x23a)]?.['name']||_0x1aac8e['clientType'];_0x283394[_0x17f543(0x1f5)](_0x32db3f,_0x17f543(0x1ac)+_0x272ce1+_0x17f543(0x1ae));const _0x1440e8=_0x1aac8e[_0x17f543(0x214)][_0x17f543(0x220)]||[];for(const _0x125e2f of _0x1440e8){const _0xa87c5e=_0x125e2f[_0x17f543(0x1fb)]||'',_0x42ed3d=_0x283394[_0x17f543(0x1a9)](_0x283394[_0x17f543(0x27b)],_0xa87c5e)||_0x283394[_0x17f543(0x285)](_0x283394[_0x17f543(0x288)],_0xa87c5e),_0x26ab9d=_0x42ed3d?_0xa87c5e:_0x5ada4f(_0xa87c5e,{'isWindows':_0xcf590e['os']['isWindows']}),_0x77f75c=_0x31fc6a(_0x125e2f[_0x17f543(0x1d3)]||'',_0x32a228);if(_0x42ed3d){_0x283394[_0x17f543(0x232)](_0x32db3f,_0x283394['jPXBA']),_0x32db3f(_0x77f75c[_0x17f543(0x20c)]('\x0a')[_0x17f543(0x228)](_0x279434=>'\x20\x20\x20\x20'+_0x279434)[_0x17f543(0x18a)]('\x0a')),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0xa87c5e,'action':_0x17f543(0x1cf)});continue;}if(_0x283394[_0x17f543(0x19b)](_0x32db3f,_0x17f543(0x219)+_0x26ab9d),_0x2b5f59[_0x17f543(0x1e6)]){_0x3a2d60(_0x283394[_0x17f543(0x221)]);const _0x2275c9=_0x77f75c[_0x17f543(0x20c)]('\x0a'),_0x41c684=_0x2275c9[_0x17f543(0x193)](0x0,0x8)['join']('\x0a');_0x283394[_0x17f543(0x19b)](_0x32db3f,_0x283394['KPtCe']),_0x283394['doBKu'](_0x32db3f,_0x41c684[_0x17f543(0x20c)]('\x0a')[_0x17f543(0x228)](_0x4d30e5=>_0x17f543(0x231)+_0x4d30e5)[_0x17f543(0x18a)]('\x0a')),_0x2275c9['length']>0x8&&_0x283394[_0x17f543(0x1b3)](_0x32db3f,_0x17f543(0x25b)+_0x2275c9[_0x17f543(0x1bc)]+'\x20行)'),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x283394[_0x17f543(0x292)]}),console[_0x17f543(0x230)]();continue;}let _0x27be4e=null;try{_0x27be4e=_0x167607(_0x26ab9d),_0x27be4e&&_0x283394['kbjFe'](_0x32db3f,_0x17f543(0x209)+_0x27be4e);}catch(_0x29b5e5){_0x283394['FooeG'](_0x5e2d7e,_0x17f543(0x1ce)+_0x29b5e5['message']+_0x17f543(0x1ee)),_0x39b9ec['push']({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x17f543(0x1c1),'error':_0x29b5e5[_0x17f543(0x24b)]});continue;}try{_0x2896fa(_0x26ab9d,_0x77f75c,{'isWindows':_0xcf590e['os'][_0x17f543(0x1f6)]}),_0x283394[_0x17f543(0x1b5)](_0x14dad2,_0x283394[_0x17f543(0x203)]),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x283394[_0x17f543(0x1d1)],'backup':_0x27be4e});}catch(_0x6eb284){_0x283394['NRGfF'](_0x6eb284,_0x188d82)?(_0xa517b8||(_0xa517b8=_0x6eb284),_0x5e2d7e(_0x6eb284[_0x17f543(0x24b)]),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x283394[_0x17f543(0x1d5)],'error':_0x6eb284[_0x17f543(0x24b)]})):(_0x5e2d7e(_0x17f543(0x1aa)+_0x6eb284[_0x17f543(0x24b)]),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x283394[_0x17f543(0x229)],'error':_0x6eb284[_0x17f543(0x24b)]}));}}console[_0x17f543(0x230)]();}if(_0x436960(),!_0x2b5f59[_0x17f543(0x1e6)]&&_0x4bf03a['api_key']&&_0x4bf03a[_0x17f543(0x1d8)]){_0x283394[_0x17f543(0x19b)](_0x5ebcd4,_0x283394[_0x17f543(0x1fa)]),_0x283394['NBTMt'](_0x698c48,_0x283394[_0x17f543(0x263)]);const _0x550899=await _0x283394[_0x17f543(0x28a)](_0x56a247,{'apiKey':_0x4bf03a[_0x17f543(0x19f)],'baseUrl':_0x4bf03a[_0x17f543(0x1d8)]});_0x550899['ok']?_0x283394[_0x17f543(0x207)](_0x14dad2,_0x283394[_0x17f543(0x234)]):_0x283394[_0x17f543(0x1ea)](_0x3a2d60,_0x17f543(0x1fe)+(_0x550899[_0x17f543(0x20a)]||_0x17f543(0x261)+_0x550899[_0x17f543(0x258)])+_0x17f543(0x272)),console[_0x17f543(0x230)]();}_0x283394[_0x17f543(0x293)](_0x5ebcd4,_0x283394[_0x17f543(0x1ab)]);const _0x1202cf=_0x39b9ec[_0x17f543(0x192)](_0x206c42=>_0x17f543(0x284)===_0x206c42[_0x17f543(0x205)]),_0x439c91=_0x39b9ec[_0x17f543(0x192)](_0x25ffa1=>_0x17f543(0x266)===_0x25ffa1[_0x17f543(0x205)]||'permission-denied'===_0x25ffa1[_0x17f543(0x205)]||_0x17f543(0x1c1)===_0x25ffa1[_0x17f543(0x205)]),_0x42d3eb=_0x39b9ec[_0x17f543(0x192)](_0x19f88b=>_0x17f543(0x1cf)===_0x19f88b[_0x17f543(0x205)]),_0x39f722=_0x39b9ec[_0x17f543(0x192)](_0x579911=>_0x17f543(0x18f)===_0x579911[_0x17f543(0x205)]);_0x2b5f59[_0x17f543(0x1e6)]?_0x283394['FooeG'](_0x32db3f,_0x17f543(0x1c9)+_0x39f722['length']+_0x17f543(0x197)):_0x14dad2(_0x17f543(0x246)+_0x1202cf[_0x17f543(0x1bc)]+_0x17f543(0x28c)),_0x283394[_0x17f543(0x227)](_0x42d3eb[_0x17f543(0x1bc)],0x0)&&_0x698c48(_0x17f543(0x18d)+_0x42d3eb[_0x17f543(0x1bc)]+_0x17f543(0x218)),_0x439c91[_0x17f543(0x1bc)]>0x0&&(_0x283394[_0x17f543(0x281)](_0x3a2d60,_0x17f543(0x1d0)+_0x439c91[_0x17f543(0x1bc)]+_0x17f543(0x25a)),_0x439c91['forEach'](_0x5d8c19=>_0x3a2d60('\x20\x20-\x20'+_0x5d8c19[_0x17f543(0x280)]+'\x20'+_0x5d8c19[_0x17f543(0x1fb)])));const _0x22ec17=_0x39b9ec[_0x17f543(0x192)](_0x5c989b=>_0x5c989b['backup'])[_0x17f543(0x228)](_0x3f8484=>_0x3f8484[_0x17f543(0x248)]);if(_0x283394[_0x17f543(0x1a0)](_0x22ec17[_0x17f543(0x1bc)],0x0)&&(_0x283394[_0x17f543(0x1ea)](_0x698c48,_0x17f543(0x190)),_0x22ec17['forEach'](_0x115504=>_0x32db3f(_0x17f543(0x1a6)+_0x115504))),_0x4bf03a[_0x17f543(0x257)]?.['is_new']&&(console[_0x17f543(0x230)](),_0x283394[_0x17f543(0x188)](_0x698c48,_0x17f543(0x22b)+(_0x4bf03a['user'][_0x17f543(0x1f3)]||'')+'\x20已创建,请查收邮件获取初始密码,登录后尽快修改。')),!_0x2b5f59[_0x17f543(0x1e6)]){const _0x524d07=_0x4c469b[_0x17f543(0x228)](_0x58e8b4=>_0x58e8b4['meta'])[_0x17f543(0x192)](Boolean)[_0x17f543(0x228)](_0x1a4737=>({'name':_0x1a4737[_0x17f543(0x27e)],'startCmd':_0x1a4737[_0x17f543(0x1a3)],'usage':_0x1a4737[_0x17f543(0x1b7)]}));_0x283394[_0x17f543(0x25e)](_0x4de158,_0x524d07);}return _0xa517b8?(console[_0x17f543(0x230)](),_0x283394['wxRzw'](_0x5e2d7e,_0x283394[_0x17f543(0x1a4)]),_0x283394['FPIbb'](_0x5e2d7e,_0x283394[_0x17f543(0x24d)]),0x2):_0x283394[_0x17f543(0x227)](_0x439c91['length'],0x0)?0x3:0x0;}()['then'](_0x395193=>{const _0x393dc2=_0x3700ab,_0x24078b={'ZGLyI':function(_0x4805d2){return _0x4805d2();}};_0x24078b[_0x393dc2(0x195)](_0x436960),process[_0x393dc2(0x1bb)](_0x395193||0x0);})[_0x3700ab(0x27a)](_0x883d4e=>{const _0x5ec43b=_0x3700ab,_0x2ca743={'xxoSj':function(_0x1e2ccf,_0xe9b1de){return _0x1e2ccf(_0xe9b1de);}};_0x2ca743['xxoSj'](_0x5e2d7e,_0x5ec43b(0x1cc)+(_0x883d4e?.[_0x5ec43b(0x24b)]||_0x883d4e)),_0x883d4e?.[_0x5ec43b(0x201)]&&console[_0x5ec43b(0x20a)](_0x883d4e['stack']),_0x436960(),process[_0x5ec43b(0x1bb)](0x1);}));
2
+ const _0x555c3c=_0x4596;(function(_0x5d4593,_0x4753c0){const _0x2d7cdb=_0x4596,_0x11f687=_0x5d4593();while(!![]){try{const _0x5943ae=parseInt(_0x2d7cdb(0x15c))/0x1*(parseInt(_0x2d7cdb(0x16f))/0x2)+parseInt(_0x2d7cdb(0xd6))/0x3*(parseInt(_0x2d7cdb(0x188))/0x4)+-parseInt(_0x2d7cdb(0xf4))/0x5*(-parseInt(_0x2d7cdb(0x185))/0x6)+-parseInt(_0x2d7cdb(0x11b))/0x7+-parseInt(_0x2d7cdb(0x1a4))/0x8*(parseInt(_0x2d7cdb(0x108))/0x9)+parseInt(_0x2d7cdb(0x14c))/0xa+parseInt(_0x2d7cdb(0x161))/0xb*(-parseInt(_0x2d7cdb(0xc0))/0xc);if(_0x5943ae===_0x4753c0)break;else _0x11f687['push'](_0x11f687['shift']());}catch(_0x6165d4){_0x11f687['push'](_0x11f687['shift']());}}}(_0x15f3,0x658bb),(process[_0x555c3c(0x184)]('warning'),process[_0x555c3c(0x15e)][_0x555c3c(0x19e)]='1'));import{detectAll as _0x2e0c71}from'./lib/detect.mjs';import{cliActivate as _0x3ef6bd,listGroups as _0x5c034f,verifyApiKey as _0xb8c8d6,probeModels as _0x2cd6b2}from'./lib/api.mjs';import{renderContent as _0x419609,applyModelContextWindow as _0x473488,expandPath as _0x5dc617,listModels as _0x4aa2d9}from'./lib/render.mjs';import{backupFile as _0xe7c99d}from'./lib/backup.mjs';import{writeFileWithPermission as _0x5750a4,PermissionDeniedError as _0x3df89c}from'./lib/write.mjs';import{ask as _0x230957,askSecret as _0x100a46,multiSelect as _0x5ee037,select as _0x6d853b,confirm as _0xd42002,closePrompt as _0x2e4f4f}from'./lib/prompt.mjs';import{banner as _0x554935,ok as _0x395e12,fail as _0x5991cd,warn as _0x9e8fca,info as _0x448b62,step as _0xe5dfaf,guide as _0x1eb83e,plain as _0x5deab1,chalk as _0x14bb6c}from'./lib/ui.mjs';import{getCliMeta as _0xf4ccd6,isDefaultSelected as _0x5af743}from'./lib/platforms.mjs';import{ensureInstalled as _0x50c911}from'./lib/install.mjs';import{SUBCOMMANDS as _0x24b48c,SUBCOMMAND_NAMES as _0x4de880,SUB_HELP as _0x1c986d}from'./lib/cmds.mjs';import{createRequire as _0x1b0cf3}from'node:module';const E=_0x1b0cf3(import.meta.url)(_0x555c3c(0x132))[_0x555c3c(0x177)],S=_0x555c3c(0xe3);function _0x4596(_0x1ce437,_0xeef878){_0x1ce437=_0x1ce437-0xba;const _0x15f3dc=_0x15f3();let _0x459612=_0x15f3dc[_0x1ce437];return _0x459612;}function _0x15f3(){const _0x462eaf=['ANqeP','11XmhHKT','map','env','openai','then','10379798MMvVdv','Windows','LHFRP','replace','服务端未返回适配当前系统的配置模板','exit','client_type','key','激活报告','dYMHx','uVerb','wZvGY','action','installPackage','91540ADnjBq','\x20安装成功','ZjDCZ','API\x20端点:','已选分组:','(命令\x20','RsntF','is_new','version','写入失败:','需要\x20node\x20>=\x2018,当前\x20','base_url','mode','backup-failed','HHYFc','ZBGqk','AYweu','qJkpA','wfzRx','UJqpX','HTTP\x20','removeAllListeners','1417020aXIOTH','MztXY','AjIHj','2428yGGALL','SWxmN','\x20—\x20TokenShop\x20CLI\x20一键激活\x0a\x0a用法:\x0a\x20\x20npx\x20@2api-store/activate\x20[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20默认激活流程\x0a\x20\x20npx\x20@2api-store/activate\x20<subcommand>\x20[options]\x20\x20\x20运行子命令\x0a\x0a选项(默认激活流程):\x0a\x20\x20--dry-run,\x20-n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20不真写配置/不真装\x20CLI,只展示将做什么\x0a\x20\x20--platform\x20<name>\x20\x20\x20\x20\x20\x20只激活指定平台(openai/anthropic/gemini/grok/antigravity)\x0a\x20\x20--api-base\x20<url>\x20\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(默认\x20$ACTIVATE_API_BASE\x20或\x20','has','未查询到可用分组。请联系管理员开通分组后再激活。','未捕获错误:','base_url_beta','user','meta','get','trim','模型可用性探测:','KsJpN','log','服务端未返回模型列表,{{defaultModel}}\x20将留空','需手动执行的\x20shell\x20命令:','未选择分组','ckxkB','bdYBX','(仍会写入配置;如需更换请重跑激活选择其他模型)','jxYZX','\x20\x20备份:','NODE_NO_WARNINGS','BpPXC','验证未通过:','configs','备份并写入配置','已检测到\x20CLI:','5975512IBIOij','RxQQY','catch','\x0a\x0a环境变量:\x0a\x20\x20ACTIVATE_API_BASE\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(同\x20--api-base)\x0a\x0a示例:\x0a\x20\x20npx\x20@2api-store/activate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20默认激活\x0a\x20\x20npx\x20@2api-store/activate\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20试运行\x0a\x20\x20npx\x20@2api-store/activate\x20--platform\x20openai\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20只激活\x20openai\x0a\x20\x20npx\x20@2api-store/activate\x20restore\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20从备份恢复\x0a\x20\x20npx\x20@2api-store/activate\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20恢复官方默认\x0a\x20\x20npx\x20@2api-store/activate\x20refresh-groups\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20查看可用分组\x0a\x20\x20ACTIVATE_API_BASE=http://127.0.0.1:5566\x20npx\x20@2api-store/activate\x0a\x0a退出码:\x0a\x20\x200\x20\x20成功\x0a\x20\x201\x20\x20输入错误\x20/\x20网络失败\x20/\x20致命错误\x0a\x20\x202\x20\x20部分文件权限不足(请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)\x0a\x20\x203\x20\x20其他写入失败\x0a','hpxTn','test','\x20\x20目标:','content','miKyU','error','oEWiX','输入模型\x20ID(如\x20gpt-5.6-terra)','model_context_windows','其他(手动输入模型\x20ID)','(跳过此文件避免无备份覆盖)','Woxjv','部分文件权限不足,请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑:','YNkgR','检查\x20CLI\x20安装状态','(跳过模型可用性探测:服务端暂不支持或网络不可达)','\x20\x20-\x20','dim','yoTkX','qrPNf','RUpfE','\x20\x20\x20\x20','激活失败:','startsWith','\x20/\x20','unknown','alreadyInstalled','HeyMb','installed','模式:','ZEHIf','detectBin','已写入','statusCode','SdtQr','Pydzb','backup','node','(ID\x20','已跳过\x20','DIwjD','\x20\x20[试运行]\x20不真实写入','all','凭据格式无法识别(应为\x20sk-\x20前缀的\x20API\x20Key\x20或兑换码)','--version','keys','ejUrU','reason','\x20个文件(未真实写入)','stack','请输入\x20API\x20Key(sk-...)或兑换码','12KYZQjp','windows','display_name','gray','macOS','LBYQw','includes','建议换用:','请求激活服务','选择\x20CLI','\x20个文件','\x20\x20[shell\x20命令,请手动执行]','环境:','邮箱格式不正确','apiBase','GEWDb','available','选择默认模型(最新优先)','models','可能是分组不匹配或账号临时不可用,使用时会报\x20404/429','RGQmY','\x20已创建,请查收邮件获取初始密码,登录后尽快修改。','2529llTXTd','afmDO','handler','IBlOZ','jMIuU','gnvcE','shell-only','──\x20','\x20──','length','dDJDX','ygMZd','YXkat','https://2api.store','zPexZ','TbCEG','slice','dryRun','isLinux','Linux','isArray','push','未检测到\x20codex/claude/gemini/grok/opencode(可在后续步骤按需自动安装)','uUhDI','选择绑定的分组','supported','PowerShell','请求\x20GET\x20/v1/models…','获取可用分组','sk-','15kgQtuI','\x20\x20HTTP\x20','\x20行)','UeLZj','YSRdF','EAgkt','[试运行]\x20将写入\x20','PCumJ','OpoKJ','message','VKYJL','IFgeK','email','已写入\x20','name','XBrnn','OmwNn','IQGcf','join','clientType','9aAEGzR','NChRj','fxLxY','xznvU','displayName','api_key','API\x20Key','gemini','Terminal','\x20\x20sudo\x20npx\x20-y\x20@2api-store/activate','aJglP','未检测到\x20','未输入凭据','wFSxR','qrdQd','ATjAn','备份失败:','/antigravity','dry-run','2373175uqypWj','请输入邮箱(用于兑换码绑定\x20/\x20新账号创建)','平台过滤:','model','pwcpn','未知错误','兑换码','string','PBdGX','config','skipped','failed','argv','dhroO','MJFIW','path','green','vnptA','tTWTZ','unix','cbgKF','\x20(未装)','redeem','./package.json','empty','新账号:','KIKMt','\x20\x20内容预览:','group','permission-denied','vFapx','fbiHe','EJSec','ESOvl','\x20·\x20node\x20v','--dry-run','kBejX',')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示帮助\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示版本\x0a\x0a','AXYte','\x20平台,ID\x20','选择默认模型','未选择任何\x20CLI,退出。','KjoQs','isWindows','WdqQp','filter','\x20安装(','claude','备份位置:','7218320EYAGWK','usage','ytsKZ','eYUKw','add','xHfyC','你的\x20key\x20所属分组:','CcQFv','split','Ibuiq','os_type','\x20已安装','platform','utxXx','forEach'];_0x15f3=function(){return _0x462eaf;};return _0x15f3();}(async function(){const _0x9ef14c=_0x555c3c,_0x4f349a={'TEceq':function(_0x3625ac,_0x296900){return _0x3625ac<_0x296900;},'oEWiX':function(_0x5d62f1,_0x5813c1){return _0x5d62f1===_0x5813c1;},'wVWmH':_0x9ef14c(0x13e),'PCumJ':function(_0x5e24a7,_0x1fd698){return _0x5e24a7===_0x1fd698;},'SWxmN':function(_0x1cf2b2,_0x31b318){return _0x1cf2b2===_0x31b318;},'dhroO':'--platform','oCJuf':'--api-base','Ibuiq':function(_0x4fd4e5,_0x4f8fec){return _0x4fd4e5===_0x4f8fec;},'NICuR':'--help','bdYBX':function(_0x5a2639,_0x518b6c){return _0x5a2639===_0x518b6c;},'utxXx':_0x9ef14c(0x1d4),'vjUXU':function(_0x3cbe3b,_0x7645f9){return _0x3cbe3b==_0x7645f9;},'FPMkC':_0x9ef14c(0x15f),'uUhDI':'anthropic','wfzRx':_0x9ef14c(0x10f),'IFgeK':'grok','RxQQY':function(_0x5485f7){return _0x5485f7();},'TbCEG':function(_0x24b575){return _0x24b575();},'sPptW':_0x9ef14c(0xc4),'XBrnn':function(_0x1b96ec,_0x1cbd2b){return _0x1b96ec(_0x1cbd2b);},'gnvcE':function(_0x2b4527,_0x74fbf4){return _0x2b4527>_0x74fbf4;},'YNkgR':function(_0x3b9aa2,_0x4c6921){return _0x3b9aa2(_0x4c6921);},'KIKMt':_0x9ef14c(0xec),'EJSec':function(_0x302a58,_0x9e3465){return _0x302a58(_0x9e3465);},'ZEHIf':'【试运行模式\x20--dry-run】不会真写文件、不会真装\x20CLI','fbiHe':_0x9ef14c(0xbf),'OpoKJ':_0x9ef14c(0x114),'UJqpX':_0x9ef14c(0xf3),'aJglP':_0x9ef14c(0x168),'tTWTZ':_0x9ef14c(0x131),'YSRdF':_0x9ef14c(0x1c1),'rYykv':_0x9ef14c(0x133),'KsJpN':function(_0x1b1a71,_0x253939){return _0x1b1a71===_0x253939;},'AjIHj':_0x9ef14c(0x1d3),'Pgwvm':_0x9ef14c(0x121),'dYMHx':function(_0x292ace,_0x578c4b){return _0x292ace===_0x578c4b;},'WdqQp':function(_0x19fed2,_0x2673b9){return _0x19fed2(_0x2673b9);},'uALEz':_0x9ef14c(0x11c),'MztXY':_0x9ef14c(0xcd),'DIwjD':function(_0x281037,_0x141e86){return _0x281037(_0x141e86);},'NChRj':function(_0x39b35b,_0x1f84f9){return _0x39b35b(_0x1f84f9);},'ejUrU':_0x9ef14c(0x18c),'hpxTn':function(_0x491227,_0x113b54,_0x50d19b,_0x4693bc){return _0x491227(_0x113b54,_0x50d19b,_0x4693bc);},'PBdGX':_0x9ef14c(0xee),'SKblu':function(_0x1dbca2,_0x172967){return _0x1dbca2(_0x172967);},'bbasA':_0x9ef14c(0x198),'bNhxc':function(_0x60d627,_0x10aaa4){return _0x60d627(_0x10aaa4);},'MJFIW':function(_0x541185,_0x592d80){return _0x541185(_0x592d80);},'LBYQw':_0x9ef14c(0xc8),'OmwNn':function(_0x45bac4,_0x1c8566){return _0x45bac4(_0x1c8566);},'ZjDCZ':'(新用户已创建)','VKYJL':function(_0x37936a,_0x3042ef){return _0x37936a(_0x3042ef);},'Pydzb':function(_0x22f313,_0x47f8df){return _0x22f313(_0x47f8df);},'yCXnC':_0x9ef14c(0x165),'eYUKw':function(_0x2f0f85,_0x193d7a){return _0x2f0f85(_0x193d7a);},'vnptA':'(独立\x20CLI)','ytsKZ':function(_0x5d0fcc,_0x38c756){return _0x5d0fcc(_0x38c756);},'IBlOZ':'选择要激活的\x20CLI(绿色=已装,灰色=未装;默认选主\x20CLI,独立\x20CLI\x20默认不选)','qJkpA':function(_0x43ee9e,_0x1bc830){return _0x43ee9e(_0x1bc830);},'AYweu':_0x9ef14c(0x144),'RGQmY':_0x9ef14c(0x1b6),'RsntF':function(_0x1e9cc6,_0x42f170){return _0x1e9cc6(_0x42f170);},'pwcpn':function(_0x573d61,_0x5555e3,_0x367a64){return _0x573d61(_0x5555e3,_0x367a64);},'uVerb':'user-declined','LHFRP':function(_0x442d45,_0x956616){return _0x442d45(_0x956616);},'miKyU':_0x9ef14c(0x120),'xHfyC':function(_0x2b4b3f,_0x2e9d40){return _0x2b4b3f(_0x2e9d40);},'RUpfE':_0x9ef14c(0xd1),'qrPNf':function(_0x5a9375,_0x158b51){return _0x5a9375>_0x158b51;},'AXYte':function(_0x933fd7,_0x4b73db){return _0x933fd7>_0x4b73db;},'CcQFv':_0x9ef14c(0x1b1),'GEWDb':function(_0x2de600,_0x27722b,_0x537c3c,_0x1689f8){return _0x2de600(_0x27722b,_0x537c3c,_0x1689f8);},'HHYFc':_0x9ef14c(0x143),'kBejX':function(_0x4d7c81,_0xbc75d){return _0x4d7c81(_0xbc75d);},'EAgkt':_0x9ef14c(0xd3),'YXkat':function(_0x55e7c2,_0x294a6b){return _0x55e7c2>_0x294a6b;},'IQGcf':_0x9ef14c(0x1c0),'ZBGqk':function(_0x147d0c,_0x3a8893){return _0x147d0c(_0x3a8893);},'ESOvl':_0x9ef14c(0x19b),'yoTkX':_0x9ef14c(0x196),'HeyMb':_0x9ef14c(0x1a2),'zPexZ':function(_0x7dcfd6,_0x1bd87e){return _0x7dcfd6===_0x1bd87e;},'afmDO':function(_0x360342,_0x30969a){return _0x360342===_0x30969a;},'ANqeP':function(_0x5936e5,_0x2115c6){return _0x5936e5(_0x2115c6);},'jxYZX':function(_0x2d87dc,_0x771557){return _0x2d87dc(_0x771557);},'qrdQd':_0x9ef14c(0x1d1),'ATjAn':function(_0x13c3f0,_0x85fb0c){return _0x13c3f0(_0x85fb0c);},'bGPma':_0x9ef14c(0x17c),'jMIuU':'written','ckxkB':function(_0x4e1498,_0x1a6960){return _0x4e1498 instanceof _0x1a6960;},'BpPXC':_0x9ef14c(0x138),'fxLxY':function(_0x33f7f0,_0x1836a5){return _0x33f7f0(_0x1836a5);},'wZvGY':_0x9ef14c(0x126),'Woxjv':function(_0x5be7ee){return _0x5be7ee();},'cbgKF':_0x9ef14c(0xf1),'vFapx':function(_0x41c6a2,_0x1ec18a){return _0x41c6a2(_0x1ec18a);},'rCMBG':'API\x20Key\x20验证通过(GET\x20/v1/models\x20→\x20200)','KjoQs':function(_0x597c1f,_0x3c519d){return _0x597c1f>_0x3c519d;},'UeLZj':_0x9ef14c(0x14b),'dDJDX':function(_0x3dfe01,_0x3614a9){return _0x3dfe01(_0x3614a9);},'SdtQr':function(_0x4e0c3e,_0x10f58b){return _0x4e0c3e(_0x10f58b);},'wFSxR':_0x9ef14c(0x1b4),'ElPtj':function(_0x33b4e2,_0x8d5e9d){return _0x33b4e2(_0x8d5e9d);}},_0x50b66a=process['argv'][0x2];if(_0x50b66a&&!_0x50b66a['startsWith']('-')&&_0x4de880[_0x9ef14c(0x18b)](_0x50b66a)){const _0x2a2d15=process[_0x9ef14c(0x127)][_0x9ef14c(0xe6)](0x3),_0x13a9a0=_0x24b48c[_0x50b66a];try{return await _0x13a9a0[_0x9ef14c(0xd8)](_0x2a2d15)||0x0;}catch(_0x4539a8){return _0x5991cd('子命令\x20'+_0x50b66a+'\x20异常:'+(_0x4539a8?.[_0x9ef14c(0xfd)]||_0x4539a8)),_0x4539a8?.[_0x9ef14c(0xbe)]&&console['error'](_0x4539a8['stack']),0x1;}}const _0x237f41=function(_0x15942f){const _0x2350ec=_0x9ef14c,_0x30ec9c={'dryRun':!0x1,'platform':null,'_':[]};for(let _0x2e7da7=0x0;_0x4f349a['TEceq'](_0x2e7da7,_0x15942f['length']);_0x2e7da7++){const _0x1b6897=_0x15942f[_0x2e7da7];if(_0x4f349a[_0x2350ec(0x1ae)](_0x4f349a['wVWmH'],_0x1b6897)||_0x4f349a[_0x2350ec(0xfb)]('-n',_0x1b6897))_0x30ec9c[_0x2350ec(0xe7)]=!0x0;else{if(_0x4f349a[_0x2350ec(0x189)](_0x4f349a[_0x2350ec(0x128)],_0x1b6897)||'-p'===_0x1b6897)_0x30ec9c[_0x2350ec(0x158)]=_0x15942f[++_0x2e7da7];else{if(_0x4f349a[_0x2350ec(0xfb)](_0x4f349a['oCJuf'],_0x1b6897))_0x30ec9c[_0x2350ec(0xce)]=_0x15942f[++_0x2e7da7];else{if(_0x4f349a[_0x2350ec(0x155)](_0x4f349a['NICuR'],_0x1b6897)||_0x4f349a[_0x2350ec(0x19a)]('-h',_0x1b6897))_0x30ec9c['help']=!0x0;else{if(_0x4f349a[_0x2350ec(0x155)](_0x4f349a[_0x2350ec(0x159)],_0x1b6897)||_0x4f349a[_0x2350ec(0x19a)]('-v',_0x1b6897))_0x30ec9c[_0x2350ec(0x177)]=!0x0;else{if(_0x1b6897[_0x2350ec(0x1bf)]('--')&&_0x1b6897[_0x2350ec(0xc6)]('=')){const [_0x50373f,_0x192999]=_0x1b6897[_0x2350ec(0xe6)](0x2)['split'](/=(.*)/,0x2);_0x30ec9c[_0x50373f]=_0x192999;}else _0x1b6897[_0x2350ec(0x1bf)]('--')?_0x30ec9c[_0x1b6897[_0x2350ec(0x164)](/^--/,'')]=_0x15942f[++_0x2e7da7]:_0x30ec9c['_'][_0x2350ec(0xeb)](_0x1b6897);}}}}}}return _0x30ec9c;}(process['argv']['slice'](0x2));if(_0x237f41['help'])return console[_0x9ef14c(0x195)](('\x0a@2api-store/activate\x20v'+E+_0x9ef14c(0x18a)+S+_0x9ef14c(0x140)+_0x1c986d+_0x9ef14c(0x1a7))[_0x9ef14c(0x192)]()),0x0;if(_0x237f41['version'])return console[_0x9ef14c(0x195)](E),0x0;_0x4f349a[_0x9ef14c(0x1a5)](_0x554935);const _0x5c4e46=_0x4f349a[_0x9ef14c(0xe5)](_0x2e0c71),_0x9bd56d=_0x5c4e46['os']['isMac']?_0x4f349a['sPptW']:_0x5c4e46['os'][_0x9ef14c(0xe8)]?_0x9ef14c(0xe9):_0x5c4e46['os'][_0x9ef14c(0x146)]?_0x9ef14c(0x162):_0x5c4e46['os'][_0x9ef14c(0x158)];if(_0x4f349a[_0x9ef14c(0x103)](_0x448b62,_0x9ef14c(0xcc)+_0x9bd56d+_0x9ef14c(0x13d)+_0x5c4e46[_0x9ef14c(0x1cd)][_0x9ef14c(0x177)]),!_0x5c4e46[_0x9ef14c(0x1cd)][_0x9ef14c(0xef)])return _0x4f349a[_0x9ef14c(0x103)](_0x5991cd,_0x9ef14c(0x179)+_0x5c4e46[_0x9ef14c(0x1cd)][_0x9ef14c(0x177)]),0x1;const _0x494d47=Object[_0x9ef14c(0xba)](_0x5c4e46[_0x9ef14c(0x1c4)]),_0x2a9103=_0x494d47[_0x9ef14c(0x15d)](_0x3eb974=>{const _0xa70abb=_0x9ef14c,_0x4d0272=_0x5c4e46[_0xa70abb(0x1c4)][_0x3eb974]?.[_0xa70abb(0x177)];return _0x4d0272?_0x3eb974+'@'+_0x4d0272:_0x3eb974;});_0x4f349a['gnvcE'](_0x494d47[_0x9ef14c(0xdf)],0x0)?_0x4f349a[_0x9ef14c(0x1b5)](_0x395e12,_0x9ef14c(0x1a3)+_0x2a9103[_0x9ef14c(0x106)](',\x20')):_0x4f349a['YNkgR'](_0x448b62,_0x4f349a[_0x9ef14c(0x135)]);const _0x5255b9=_0x237f41['apiBase']||process[_0x9ef14c(0x15e)]['ACTIVATE_API_BASE']||S;_0x4f349a[_0x9ef14c(0x13b)](_0x448b62,_0x9ef14c(0x172)+_0x5255b9),_0x237f41['dryRun']&&_0x4f349a['XBrnn'](_0x9e8fca,_0x4f349a[_0x9ef14c(0x1c6)]),_0x237f41[_0x9ef14c(0x158)]&&_0x4f349a[_0x9ef14c(0x103)](_0x448b62,_0x9ef14c(0x11d)+_0x237f41[_0x9ef14c(0x158)]),console[_0x9ef14c(0x195)]();const _0x487b34=(await _0x100a46(_0x4f349a[_0x9ef14c(0x13a)]))[_0x9ef14c(0x192)]();if(!_0x487b34)return _0x5991cd(_0x4f349a[_0x9ef14c(0xfc)]),0x1;const _0x3ce68e=(_0xecefef=_0x487b34)?_0xecefef[_0x9ef14c(0x1bf)](_0x4f349a[_0x9ef14c(0x182)])?_0x4f349a[_0x9ef14c(0x112)]:/^[a-zA-Z0-9]{16,64}$/[_0x9ef14c(0x1a9)](_0xecefef)?_0x4f349a[_0x9ef14c(0x12d)]:_0x4f349a[_0x9ef14c(0xf8)]:_0x4f349a['rYykv'];var _0xecefef;if(_0x4f349a[_0x9ef14c(0x194)](_0x4f349a[_0x9ef14c(0xf8)],_0x3ce68e))return _0x4f349a[_0x9ef14c(0x103)](_0x5991cd,_0x4f349a[_0x9ef14c(0x187)]),0x1;_0x4f349a['YNkgR'](_0x448b62,'识别为:'+(_0x4f349a['Ibuiq'](_0x9ef14c(0x168),_0x3ce68e)?_0x9ef14c(0x10e):_0x4f349a['Pgwvm'])+'模式');let _0x24451f,_0x349c0a='',_0x30536d=null;if(_0x4f349a[_0x9ef14c(0x16a)](_0x4f349a[_0x9ef14c(0x12d)],_0x3ce68e)){if(_0x349c0a=(await _0x4f349a[_0x9ef14c(0x147)](_0x230957,_0x4f349a['uALEz']))['trim'](),!_0x349c0a||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/[_0x9ef14c(0x1a9)](_0x349c0a))return _0x4f349a[_0x9ef14c(0x147)](_0x5991cd,_0x4f349a[_0x9ef14c(0x186)]),0x1;_0x4f349a[_0x9ef14c(0x1d0)](_0xe5dfaf,_0x9ef14c(0xf2));const _0x48208d=await _0x5c034f({'apiBase':_0x5255b9});if(_0x4f349a[_0x9ef14c(0x1ae)](0x0,_0x48208d['length']))return _0x4f349a[_0x9ef14c(0x109)](_0x5991cd,_0x4f349a[_0x9ef14c(0xbb)]),0x1;const _0x2ae3bb=_0x48208d[_0x9ef14c(0x15d)](_0x33fab5=>({'label':''+_0x33fab5[_0x9ef14c(0x102)],'value':_0x33fab5['id']})),_0x120f3e=await _0x4f349a['hpxTn'](_0x6d853b,_0x4f349a[_0x9ef14c(0x123)],_0x2ae3bb,{'defaultIndex':0x0});if(_0x30536d=_0x48208d[_0x120f3e]?.['id'],!_0x30536d)return _0x4f349a['SKblu'](_0x5991cd,_0x4f349a['bbasA']),0x1;_0x4f349a['bNhxc'](_0x395e12,_0x9ef14c(0x173)+_0x48208d[_0x120f3e][_0x9ef14c(0x102)]+_0x9ef14c(0x1ce)+_0x30536d+')'),console['log']();}_0x4f349a[_0x9ef14c(0x129)](_0xe5dfaf,_0x4f349a[_0x9ef14c(0xc5)]);try{_0x24451f=await _0x4f349a['SKblu'](_0x3ef6bd,{'credential':_0x487b34,'email':_0x349c0a,'platform':_0x237f41[_0x9ef14c(0x158)],'groupId':_0x30536d,'apiBase':_0x5255b9});}catch(_0x54bbe6){return _0x4f349a['YNkgR'](_0x5991cd,_0x9ef14c(0x1be)+_0x54bbe6[_0x9ef14c(0xfd)]),_0x54bbe6[_0x9ef14c(0x1c9)]&&_0x4f349a['bNhxc'](_0x5991cd,_0x9ef14c(0xf5)+_0x54bbe6[_0x9ef14c(0x1c9)]),0x1;}_0x24451f[_0x9ef14c(0x137)]?.[_0x9ef14c(0x102)]&&_0x4f349a[_0x9ef14c(0x129)](_0x448b62,_0x9ef14c(0x152)+_0x24451f['group']['name']+'('+(_0x24451f[_0x9ef14c(0x137)][_0x9ef14c(0x158)]||'未知')+_0x9ef14c(0x142)+_0x24451f[_0x9ef14c(0x137)]['id']+')'),_0x4f349a[_0x9ef14c(0x104)](_0x395e12,_0x9ef14c(0x1c5)+_0x24451f[_0x9ef14c(0x17b)]+(_0x24451f[_0x9ef14c(0x18f)]?.[_0x9ef14c(0x176)]?_0x4f349a[_0x9ef14c(0x171)]:'')),_0x24451f[_0x9ef14c(0x18f)]?.['is_new']&&_0x24451f[_0x9ef14c(0x18f)]?.[_0x9ef14c(0x100)]&&(_0x448b62(_0x9ef14c(0x134)+_0x24451f[_0x9ef14c(0x18f)][_0x9ef14c(0x100)]),_0x24451f[_0x9ef14c(0x18f)][_0x9ef14c(0xfd)]&&_0x4f349a[_0x9ef14c(0xfe)](_0x448b62,_0x24451f[_0x9ef14c(0x18f)]['message'])),console[_0x9ef14c(0x195)]();const _0x4ae2bf=function(_0x36d3ff){const _0x20b064=_0x9ef14c,_0x4e41d4=new Set();for(const _0x5c9b9c of _0x36d3ff||[]){const _0x44a5ab=(_0x4f349a['vjUXU'](_0x20b064(0x122),typeof _0x5c9b9c)?_0x5c9b9c:_0x5c9b9c?.['id']||'')['toLowerCase']();/^(gpt|o1|o3|codex|glm|minimax|deepseek)/[_0x20b064(0x1a9)](_0x44a5ab)?_0x4e41d4[_0x20b064(0x150)](_0x4f349a['FPMkC']):_0x44a5ab[_0x20b064(0x1bf)](_0x20b064(0x14a))?_0x4e41d4[_0x20b064(0x150)](_0x4f349a[_0x20b064(0xed)]):_0x44a5ab[_0x20b064(0x1bf)]('gemini')?_0x4e41d4[_0x20b064(0x150)](_0x4f349a[_0x20b064(0x181)]):_0x44a5ab[_0x20b064(0x1bf)](_0x4f349a[_0x20b064(0xff)])&&_0x4e41d4[_0x20b064(0x150)](_0x4f349a[_0x20b064(0xff)]);}return[..._0x4e41d4];}(_0x24451f['models']||[]);_0x237f41[_0x9ef14c(0x158)]&&!_0x4ae2bf[_0x9ef14c(0xc6)](_0x237f41[_0x9ef14c(0x158)])&&_0x4ae2bf[_0x9ef14c(0xeb)](_0x237f41[_0x9ef14c(0x158)]);const _0x40b276=(_0x24451f[_0x9ef14c(0x1a1)]||[])[_0x9ef14c(0x148)](_0xd64c74=>!!_0xd64c74&&(!(_0x4ae2bf['length']>0x0&&!_0x4ae2bf['includes'](_0xd64c74[_0x9ef14c(0x158)]))&&((!_0x237f41['platform']||_0xd64c74['platform']===_0x237f41[_0x9ef14c(0x158)])&&(_0x5c4e46['os'][_0x9ef14c(0x146)]?_0x9ef14c(0xc1)===_0xd64c74['os_type']||_0x9ef14c(0x1d2)===_0xd64c74[_0x9ef14c(0x156)]:_0x9ef14c(0x12e)===_0xd64c74[_0x9ef14c(0x156)]||_0x9ef14c(0x1d2)===_0xd64c74[_0x9ef14c(0x156)]))));if(0x0===_0x40b276[_0x9ef14c(0xdf)])return _0x4f349a[_0x9ef14c(0x1cb)](_0x5991cd,_0x4f349a['yCXnC']),0x1;const _0xf67f67=new Set(),_0x1ac88e=[];for(const _0x549890 of _0x40b276){const _0x39563d=_0x549890[_0x9ef14c(0x158)]+'/'+_0x549890['client_type'];if(_0xf67f67[_0x9ef14c(0x18b)](_0x39563d))continue;_0xf67f67['add'](_0x39563d);const _0x4050f4=_0xf4ccd6(_0x549890[_0x9ef14c(0x167)]),_0x175947=_0x549890[_0x9ef14c(0xc2)]||_0x549890[_0x9ef14c(0x10c)]||_0x4050f4?.[_0x9ef14c(0x102)]||_0x549890['platform']+'\x20'+_0x549890[_0x9ef14c(0x167)],_0x473dea=_0x5c4e46['installed'][_0x549890['client_type']]?.[_0x9ef14c(0x12a)]||_0x4050f4&&_0x5c4e46['installed'][_0x4050f4[_0x9ef14c(0x1c7)]]?.[_0x9ef14c(0x12a)],_0x2293eb=_0x4f349a[_0x9ef14c(0x14f)](_0x5af743,_0x549890[_0x9ef14c(0x167)])?'':_0x4f349a[_0x9ef14c(0x12c)],_0x153d67=_0x473dea?_0x14bb6c[_0x9ef14c(0x12b)](_0x175947):_0x14bb6c[_0x9ef14c(0xc3)](_0x175947+_0x9ef14c(0x130));_0x1ac88e[_0x9ef14c(0xeb)]({'label':_0x153d67+'\x20'+_0x14bb6c['dim']('['+_0x549890['platform']+'/'+_0x549890[_0x9ef14c(0x167)]+']')+_0x2293eb,'config':_0x549890,'clientType':_0x549890[_0x9ef14c(0x167)],'meta':_0x4050f4,'alreadyInstalled':!!_0x473dea});}const _0x5e76a7=_0x1ac88e['map']((_0x535b9d,_0xe7ed2b)=>({'item':_0x535b9d,'i':_0xe7ed2b}))[_0x9ef14c(0x148)](({item:_0x1be118})=>_0x5af743(_0x1be118['clientType']))[_0x9ef14c(0x15d)](({i:_0x14872d})=>_0x14872d);_0x4f349a[_0x9ef14c(0x14e)](_0xe5dfaf,_0x9ef14c(0xc9));const _0x5bd906=await _0x4f349a['hpxTn'](_0x5ee037,_0x4f349a[_0x9ef14c(0xd9)],_0x1ac88e,{'defaultSelected':_0x5e76a7});if(0x0===_0x5bd906['length'])return _0x4f349a[_0x9ef14c(0x180)](_0x5deab1,_0x4f349a[_0x9ef14c(0x17f)]),0x0;const _0x3cc355=_0x5bd906[_0x9ef14c(0x15d)](_0x5d1340=>_0x1ac88e[_0x5d1340]);if(console[_0x9ef14c(0x195)](),!_0x237f41['dryRun']){_0x4f349a['MJFIW'](_0xe5dfaf,_0x4f349a[_0x9ef14c(0xd4)]);for(const _0x3fc221 of _0x3cc355){if(_0x3fc221[_0x9ef14c(0x1c2)]){const _0x2f2f29=_0x5c4e46[_0x9ef14c(0x1c4)][_0x3fc221[_0x9ef14c(0x107)]]?.[_0x9ef14c(0x177)]||_0x5c4e46[_0x9ef14c(0x1c4)][_0x3fc221['meta']?.[_0x9ef14c(0x1c7)]]?.[_0x9ef14c(0x177)];_0x395e12((_0x3fc221[_0x9ef14c(0x190)]?.['name']||_0x3fc221[_0x9ef14c(0x107)])+_0x9ef14c(0x157)+(_0x2f2f29?'(v'+_0x2f2f29+')':''));continue;}if(!_0x3fc221[_0x9ef14c(0x190)]||!_0x3fc221[_0x9ef14c(0x190)][_0x9ef14c(0x16e)]){_0x4f349a[_0x9ef14c(0x175)](_0x9e8fca,_0x3fc221[_0x9ef14c(0x107)]+'\x20无可自动安装的\x20npm\x20包,请手动安装后重跑(配置仍会写入)');continue;}_0x448b62(_0x9ef14c(0x113)+_0x3fc221['meta'][_0x9ef14c(0x102)]+_0x9ef14c(0x174)+_0x3fc221[_0x9ef14c(0x190)][_0x9ef14c(0x1c7)]+')');const _0x47710c=await _0x4f349a[_0x9ef14c(0x11f)](_0x50c911,_0x3fc221[_0x9ef14c(0x190)],{'dryRun':_0x237f41[_0x9ef14c(0xe7)]});_0x47710c[_0x9ef14c(0x1c4)]?_0x4f349a[_0x9ef14c(0x129)](_0x395e12,_0x3fc221[_0x9ef14c(0x190)][_0x9ef14c(0x102)]+_0x9ef14c(0x170)+(_0x47710c[_0x9ef14c(0x177)]?'(v'+_0x47710c[_0x9ef14c(0x177)]+')':'')):_0x47710c[_0x9ef14c(0x125)]&&_0x4f349a['SWxmN'](_0x4f349a[_0x9ef14c(0x16b)],_0x47710c[_0x9ef14c(0xbc)])?_0x4f349a[_0x9ef14c(0x163)](_0x9e8fca,_0x9ef14c(0x1cf)+_0x3fc221[_0x9ef14c(0x190)][_0x9ef14c(0x102)]+'\x20安装(配置仍会写入,但请手动安装后使用)'):_0x47710c[_0x9ef14c(0x125)]?_0x448b62('已跳过\x20'+_0x3fc221[_0x9ef14c(0x190)][_0x9ef14c(0x102)]+_0x9ef14c(0x149)+_0x47710c[_0x9ef14c(0xbc)]+')'):_0x5991cd(_0x3fc221['meta'][_0x9ef14c(0x102)]+'\x20安装失败:'+(_0x47710c[_0x9ef14c(0x1ad)]||_0x4f349a[_0x9ef14c(0x1ac)])+'(配置仍会写入,但请手动安装后使用)');}console[_0x9ef14c(0x195)]();}const _0x23208d=_0x4aa2d9(_0x24451f[_0x9ef14c(0xd2)]||[]);let _0x2ea435='';if(_0x4f349a[_0x9ef14c(0xdb)](_0x23208d[_0x9ef14c(0xdf)],0x0)){_0x4f349a[_0x9ef14c(0x151)](_0xe5dfaf,_0x4f349a[_0x9ef14c(0x1bc)]);let _0x4230a3=null;if(_0x487b34[_0x9ef14c(0x1bf)](_0x4f349a[_0x9ef14c(0x182)]))try{const _0x12d749=await _0x4f349a['qJkpA'](_0x2cd6b2,{'credential':_0x487b34,'apiBase':_0x5255b9});_0x12d749&&Array[_0x9ef14c(0xea)](_0x12d749[_0x9ef14c(0xd2)])&&(_0x4230a3=new Map(_0x12d749[_0x9ef14c(0xd2)]['map'](_0x9f1308=>[_0x9f1308[_0x9ef14c(0x11e)],!!_0x9f1308[_0x9ef14c(0xd0)]])));}catch{_0x448b62(_0x9ef14c(0x1b7));}let _0x2101ad=_0x23208d;if(_0x4230a3){_0x2101ad=[..._0x23208d['filter'](_0x415c34=>!0x1!==_0x4230a3[_0x9ef14c(0x191)](_0x415c34['id'])),..._0x23208d['filter'](_0x4f8189=>!0x1===_0x4230a3['get'](_0x4f8189['id']))];const _0x346562=_0x2101ad[_0x9ef14c(0x148)](_0x4781a6=>!0x1===_0x4230a3[_0x9ef14c(0x191)](_0x4781a6['id']))[_0x9ef14c(0xdf)];_0x4f349a[_0x9ef14c(0x1bb)](_0x346562,0x0)&&_0x4f349a['NChRj'](_0x448b62,'⚠\x20'+_0x346562+'\x20个模型当前无可用账号(标注\x20⚠,可能是分组不匹配或账号临时不可用)');}const _0x1b6a0e=0xa,_0x2cf939=_0x2101ad[_0x9ef14c(0xe6)](0x0,_0x1b6a0e),_0x14ced4=_0x4f349a[_0x9ef14c(0x141)](_0x2101ad[_0x9ef14c(0xdf)],_0x1b6a0e),_0xf33e60=_0x7cb92=>_0x4230a3?!0x1===_0x4230a3['get'](_0x7cb92['id'])?'⚠\x20':'✓\x20':'',_0x33a7ce=[..._0x2cf939['map'](_0x3d2aba=>({'label':''+_0xf33e60(_0x3d2aba)+_0x3d2aba['label']+'\x20('+_0x3d2aba['id']+')'})),..._0x14ced4?[{'label':_0x14bb6c[_0x9ef14c(0x1b9)](_0x4f349a[_0x9ef14c(0x153)])}]:[]],_0x16b278=await _0x4f349a[_0x9ef14c(0xcf)](_0x6d853b,_0x4f349a[_0x9ef14c(0x17d)],_0x33a7ce,{'defaultIndex':0x0});if(_0x14ced4&&_0x4f349a[_0x9ef14c(0xfb)](_0x16b278,_0x2cf939['length'])?(_0x2ea435=(await _0x4f349a[_0x9ef14c(0x103)](_0x230957,_0x9ef14c(0x1af)))[_0x9ef14c(0x192)](),_0x2ea435||(_0x2ea435=_0x2cf939[0x0]['id'])):_0x2ea435=_0x2cf939[_0x16b278]['id'],_0x4f349a[_0x9ef14c(0x13f)](_0x395e12,'已选默认模型:'+_0x2ea435),_0x4230a3&&!0x1===_0x4230a3[_0x9ef14c(0x191)](_0x2ea435)){const _0x1ee1fb=_0x2101ad['filter'](_0x16b4b4=>!0x1!==_0x4230a3['get'](_0x16b4b4['id']))['slice'](0x0,0x3)['map'](_0x5a7876=>_0x5a7876['id']);_0x4f349a[_0x9ef14c(0x1b5)](_0x9e8fca,_0x9ef14c(0x193)+_0x2ea435+'\x20当前无可用账号'),_0x4f349a['EJSec'](_0x9e8fca,_0x4f349a[_0x9ef14c(0xf9)]),_0x4f349a[_0x9ef14c(0xe2)](_0x1ee1fb['length'],0x0)&&_0x4f349a['ytsKZ'](_0x9e8fca,_0x9ef14c(0xc7)+_0x1ee1fb['join'](_0x4f349a[_0x9ef14c(0x105)])),_0x4f349a[_0x9ef14c(0x17e)](_0x9e8fca,_0x4f349a[_0x9ef14c(0x13c)]);}}else _0x4f349a[_0x9ef14c(0x14e)](_0x9e8fca,_0x4f349a[_0x9ef14c(0x1ba)]);console['log']();const _0x511357=_0x24451f[_0x9ef14c(0x17a)]||'',_0x57bebb=_0x24451f[_0x9ef14c(0x18e)]||_0x511357,_0x34aaaf={'apiKey':_0x24451f[_0x9ef14c(0x10d)]||'','baseUrl':_0x511357,'apiBase':_0x511357,'apiBaseBeta':_0x57bebb,'antigravityApiBase':_0x511357+_0x9ef14c(0x119),'antigravityApiBaseBeta':_0x57bebb+_0x9ef14c(0x119),'defaultModel':_0x2ea435};_0xe5dfaf(_0x4f349a[_0x9ef14c(0x1c3)]);const _0x4e9a34=[];let _0x5dffb6=null;for(const _0x52d86b of _0x3cc355){const _0x32a4b5=_0x52d86b[_0x9ef14c(0x124)][_0x9ef14c(0xc2)]||_0x52d86b[_0x9ef14c(0x124)][_0x9ef14c(0x10c)]||_0x52d86b[_0x9ef14c(0x190)]?.[_0x9ef14c(0x102)]||_0x52d86b[_0x9ef14c(0x107)];_0x5deab1(_0x9ef14c(0xdd)+_0x32a4b5+_0x9ef14c(0xde));const _0x446f1d=_0x52d86b[_0x9ef14c(0x124)]['files']||[];for(const _0x4391b8 of _0x446f1d){const _0x5533af=_0x4391b8['path']||'',_0x199fd4=_0x4f349a[_0x9ef14c(0xe4)](_0x9ef14c(0x110),_0x5533af)||_0x4f349a[_0x9ef14c(0xd7)](_0x9ef14c(0xf0),_0x5533af),_0x3b90e8=_0x199fd4?_0x5533af:_0x5dc617(_0x5533af,{'isWindows':_0x5c4e46['os']['isWindows']}),_0x53ce8b=_0x4f349a[_0x9ef14c(0xcf)](_0x473488,_0x4f349a[_0x9ef14c(0x11f)](_0x419609,_0x4391b8[_0x9ef14c(0x1ab)]||'',_0x34aaaf),_0x24451f[_0x9ef14c(0x1b0)],_0x2ea435);if(_0x199fd4){_0x5deab1(_0x9ef14c(0xcb)),_0x4f349a['XBrnn'](_0x5deab1,_0x53ce8b[_0x9ef14c(0x154)]('\x0a')[_0x9ef14c(0x15d)](_0x1f3036=>_0x9ef14c(0x1bd)+_0x1f3036)[_0x9ef14c(0x106)]('\x0a')),_0x4e9a34[_0x9ef14c(0xeb)]({'cli':_0x32a4b5,'path':_0x5533af,'action':_0x9ef14c(0xdc)});continue;}if(_0x4f349a[_0x9ef14c(0x15b)](_0x5deab1,_0x9ef14c(0x1aa)+_0x3b90e8),_0x237f41[_0x9ef14c(0xe7)]){_0x4f349a['jxYZX'](_0x9e8fca,_0x4f349a[_0x9ef14c(0x116)]);const _0x7f5b69=_0x53ce8b[_0x9ef14c(0x154)]('\x0a'),_0x232676=_0x7f5b69['slice'](0x0,0x8)[_0x9ef14c(0x106)]('\x0a');_0x4f349a[_0x9ef14c(0x13f)](_0x5deab1,_0x9ef14c(0x136)),_0x4f349a[_0x9ef14c(0x117)](_0x5deab1,_0x232676[_0x9ef14c(0x154)]('\x0a')[_0x9ef14c(0x15d)](_0x187f09=>_0x9ef14c(0x1bd)+_0x187f09)[_0x9ef14c(0x106)]('\x0a')),_0x7f5b69[_0x9ef14c(0xdf)]>0x8&&_0x5deab1('\x20\x20\x20\x20...(共\x20'+_0x7f5b69[_0x9ef14c(0xdf)]+_0x9ef14c(0xf6)),_0x4e9a34[_0x9ef14c(0xeb)]({'cli':_0x32a4b5,'path':_0x3b90e8,'action':_0x9ef14c(0x11a)}),console['log']();continue;}let _0x11718a=null;try{_0x11718a=_0x4f349a[_0x9ef14c(0x175)](_0xe7c99d,_0x3b90e8),_0x11718a&&_0x5deab1(_0x9ef14c(0x19d)+_0x11718a);}catch(_0x36004a){_0x5991cd(_0x9ef14c(0x118)+_0x36004a['message']+_0x9ef14c(0x1b2)),_0x4e9a34[_0x9ef14c(0xeb)]({'cli':_0x32a4b5,'path':_0x3b90e8,'action':_0x4f349a['bGPma'],'error':_0x36004a[_0x9ef14c(0xfd)]});continue;}try{_0x4f349a[_0x9ef14c(0x1a8)](_0x5750a4,_0x3b90e8,_0x53ce8b,{'isWindows':_0x5c4e46['os'][_0x9ef14c(0x146)]}),_0x395e12(_0x9ef14c(0x1c8)),_0x4e9a34['push']({'cli':_0x32a4b5,'path':_0x3b90e8,'action':_0x4f349a[_0x9ef14c(0xda)],'backup':_0x11718a});}catch(_0x4a839d){_0x4f349a[_0x9ef14c(0x199)](_0x4a839d,_0x3df89c)?(_0x5dffb6||(_0x5dffb6=_0x4a839d),_0x4f349a[_0x9ef14c(0x117)](_0x5991cd,_0x4a839d[_0x9ef14c(0xfd)]),_0x4e9a34['push']({'cli':_0x32a4b5,'path':_0x3b90e8,'action':_0x4f349a[_0x9ef14c(0x19f)],'error':_0x4a839d['message']})):(_0x4f349a[_0x9ef14c(0x10a)](_0x5991cd,_0x9ef14c(0x178)+_0x4a839d[_0x9ef14c(0xfd)]),_0x4e9a34[_0x9ef14c(0xeb)]({'cli':_0x32a4b5,'path':_0x3b90e8,'action':_0x4f349a[_0x9ef14c(0x16c)],'error':_0x4a839d['message']}));}}console[_0x9ef14c(0x195)]();}if(_0x4f349a[_0x9ef14c(0x1b3)](_0x2e4f4f),!_0x237f41['dryRun']&&_0x24451f[_0x9ef14c(0x10d)]&&_0x24451f[_0x9ef14c(0x17a)]){_0xe5dfaf('验证\x20API\x20Key'),_0x4f349a[_0x9ef14c(0x14e)](_0x448b62,_0x4f349a[_0x9ef14c(0x12f)]);const _0x39fbb0=await _0x4f349a[_0x9ef14c(0x139)](_0xb8c8d6,{'apiKey':_0x24451f['api_key'],'baseUrl':_0x24451f['base_url']});_0x39fbb0['ok']?_0x395e12(_0x4f349a['rCMBG']):_0x9e8fca(_0x9ef14c(0x1a0)+(_0x39fbb0['error']||_0x9ef14c(0x183)+_0x39fbb0[_0x9ef14c(0x1c9)])+'(配置已写入,请手动检查)'),console[_0x9ef14c(0x195)]();}_0xe5dfaf(_0x9ef14c(0x169));const _0x496cbf=_0x4e9a34[_0x9ef14c(0x148)](_0x3e62bd=>'written'===_0x3e62bd[_0x9ef14c(0x16d)]),_0xb5e87e=_0x4e9a34['filter'](_0x2403be=>_0x9ef14c(0x126)===_0x2403be[_0x9ef14c(0x16d)]||_0x9ef14c(0x138)===_0x2403be[_0x9ef14c(0x16d)]||_0x9ef14c(0x17c)===_0x2403be['action']),_0x1b7af0=_0x4e9a34[_0x9ef14c(0x148)](_0xe0e32b=>_0x9ef14c(0xdc)===_0xe0e32b[_0x9ef14c(0x16d)]),_0x23c3bb=_0x4e9a34[_0x9ef14c(0x148)](_0x4c2eae=>_0x9ef14c(0x11a)===_0x4c2eae[_0x9ef14c(0x16d)]);_0x237f41[_0x9ef14c(0xe7)]?_0x5deab1(_0x9ef14c(0xfa)+_0x23c3bb[_0x9ef14c(0xdf)]+_0x9ef14c(0xbd)):_0x395e12(_0x9ef14c(0x101)+_0x496cbf[_0x9ef14c(0xdf)]+_0x9ef14c(0xca)),_0x4f349a[_0x9ef14c(0x141)](_0x1b7af0['length'],0x0)&&_0x448b62(_0x9ef14c(0x197)+_0x1b7af0[_0x9ef14c(0xdf)]+'\x20项(见上方输出)'),_0x4f349a['KjoQs'](_0xb5e87e[_0x9ef14c(0xdf)],0x0)&&(_0x9e8fca('失败\x20'+_0xb5e87e[_0x9ef14c(0xdf)]+'\x20项:'),_0xb5e87e[_0x9ef14c(0x15a)](_0x5db272=>_0x9e8fca(_0x9ef14c(0x1b8)+_0x5db272['cli']+'\x20'+_0x5db272['path'])));const _0x52be55=_0x4e9a34[_0x9ef14c(0x148)](_0x3ae193=>_0x3ae193[_0x9ef14c(0x1cc)])['map'](_0xc5643f=>_0xc5643f[_0x9ef14c(0x1cc)]);if(_0x4f349a[_0x9ef14c(0x141)](_0x52be55[_0x9ef14c(0xdf)],0x0)&&(_0x4f349a[_0x9ef14c(0x180)](_0x448b62,_0x4f349a[_0x9ef14c(0xf7)]),_0x52be55[_0x9ef14c(0x15a)](_0x3524c5=>_0x5deab1('\x20\x20-\x20'+_0x3524c5))),_0x24451f[_0x9ef14c(0x18f)]?.['is_new']&&(console['log'](),_0x4f349a[_0x9ef14c(0xe0)](_0x448b62,'📧\x20新账号\x20'+(_0x24451f[_0x9ef14c(0x18f)][_0x9ef14c(0x100)]||'')+_0x9ef14c(0xd5))),!_0x237f41[_0x9ef14c(0xe7)]){const _0x7c6afa=_0x3cc355[_0x9ef14c(0x15d)](_0x443934=>_0x443934[_0x9ef14c(0x190)])[_0x9ef14c(0x148)](Boolean)[_0x9ef14c(0x15d)](_0x223d57=>({'name':_0x223d57[_0x9ef14c(0x102)],'startCmd':_0x223d57['startCmd'],'usage':_0x223d57[_0x9ef14c(0x14d)]}));_0x4f349a[_0x9ef14c(0x19c)](_0x1eb83e,_0x7c6afa);}return _0x5dffb6?(console[_0x9ef14c(0x195)](),_0x4f349a[_0x9ef14c(0x1ca)](_0x5991cd,_0x4f349a[_0x9ef14c(0x115)]),_0x4f349a['ElPtj'](_0x5991cd,_0x9ef14c(0x111)),0x2):_0x4f349a[_0x9ef14c(0x145)](_0xb5e87e[_0x9ef14c(0xdf)],0x0)?0x3:0x0;}()[_0x555c3c(0x160)](_0x436b10=>{const _0x49b59c=_0x555c3c,_0x2603f7={'ZpACE':function(_0x397939){return _0x397939();},'ygMZd':function(_0x987c21,_0x216ab7){return _0x987c21||_0x216ab7;}};_0x2603f7['ZpACE'](_0x2e4f4f),process[_0x49b59c(0x166)](_0x2603f7[_0x49b59c(0xe1)](_0x436b10,0x0));})[_0x555c3c(0x1a6)](_0x3dd747=>{const _0x594cc3=_0x555c3c,_0xee789b={'xznvU':function(_0x2d04d5){return _0x2d04d5();}};_0x5991cd(_0x594cc3(0x18d)+(_0x3dd747?.[_0x594cc3(0xfd)]||_0x3dd747)),_0x3dd747?.[_0x594cc3(0xbe)]&&console[_0x594cc3(0x1ad)](_0x3dd747[_0x594cc3(0xbe)]),_0xee789b[_0x594cc3(0x10b)](_0x2e4f4f),process['exit'](0x1);}));
package/dist/lib/api.mjs CHANGED
@@ -1 +1 @@
1
- const _0x5e1e03=_0x498b;(function(_0x38692d,_0xff5dd7){const _0x21f384=_0x498b,_0x38d1d0=_0x38692d();while(!![]){try{const _0x3b04e9=parseInt(_0x21f384(0xf6))/0x1*(-parseInt(_0x21f384(0x12f))/0x2)+parseInt(_0x21f384(0x114))/0x3*(-parseInt(_0x21f384(0x107))/0x4)+-parseInt(_0x21f384(0x132))/0x5*(-parseInt(_0x21f384(0x127))/0x6)+parseInt(_0x21f384(0x104))/0x7+parseInt(_0x21f384(0xd2))/0x8*(-parseInt(_0x21f384(0x135))/0x9)+parseInt(_0x21f384(0x129))/0xa+parseInt(_0x21f384(0xef))/0xb;if(_0x3b04e9===_0xff5dd7)break;else _0x38d1d0['push'](_0x38d1d0['shift']());}catch(_0x94d33c){_0x38d1d0['push'](_0x38d1d0['shift']());}}}(_0x2604,0x2c86f));function _0x2604(){const _0x8814df=['hxorJ','GET','153321iloBcn','TRXug','parse','4QlqAaP','write','body','无效的\x20baseUrl:','POST','bDJJw','xrkWa','push','LWtij','xshWW','jdfLT','uOQJT','xwNRh','519069TxhYpD','smAuL','JgvUj','响应非\x20JSON','cihTp','UdOTI','aCzpi','isArray','GKndi','toString','statusCode','end','bGWXM','PODbC','data','/api/v1/cli/probe-models','Coxsw','kKOss','YEpqF','16644XBEezU','destroy','1346470rvEpJo','slice','XkAaL','error','FtvLp','WWpGz','91406PjyhbL','sqBvN','响应非\x20JSON(HTTP\x20','380tXUoRw','fWwGg','QmKze','931005tqFdEu','PoW\x20challenge\x20获取失败:','ZRNNj','seDKY','/api/v1/cli/activate','HTTP\x20','验证请求超时(15s)','TNmXh','niVqm','24ERuCxM','WtZYE','s)—\x20','FDePY','sEnlY','tDhOC','fAQvd','ZGGzt','sdDzr','object','请求超时(30s)—\x20','message','XKtUo','application/json','LxBah','protocol','QUDjM','raw','dneIk','LJNgZ','timeout','UacfF','pCKNx','/v1/models','iLYQL','byteLength','tvXon','concat','request','4790236bKINTw','stringify','rDTIN','SqYlC','utf8','xvfYs','dLDwF','3jfLUba','@2api-store/activate/0.1.0','dhWll','ZFqwq','/api/v1/cli/groups','lMrwV','无效的\x20apiBase:','href','wMxnY','https:','uQDmV','iZQGu'];_0x2604=function(){return _0x8814df;};return _0x2604();}import _0x456539 from'node:https';import _0x384e51 from'node:http';import{getDeviceId as _0x403d4c}from'./device.mjs';import{getChallenge as _0x4ec1f2,solvePoW as _0x29609d}from'./pow.mjs';function _0x498b(_0x5d983b,_0x440d88){_0x5d983b=_0x5d983b-0xd0;const _0x2604e9=_0x2604();let _0x498b6f=_0x2604e9[_0x5d983b];return _0x498b6f;}const n=_0x5e1e03(0xf7),a=0x7530;function i(_0x3add83,_0x5b29fb={}){return{'User-Agent':n,'X-Device-Id':_0x3add83,..._0x5b29fb};}export async function cliActivate({credential:_0x117f52,email:_0x35a533,platform:_0x1cca2f,groupId:_0x55f3bb,apiBase:_0x4d299f}){const _0x26a073=_0x5e1e03,_0x1b42e5={'LxBah':'utf8','PODbC':function(_0x5a3c6a,_0x482476){return _0x5a3c6a(_0x482476);},'seDKY':function(_0x3e58d9,_0x122241){return _0x3e58d9>=_0x122241;},'fWwGg':_0x26a073(0xdb),'cihTp':_0x26a073(0x11f),'uOQJT':_0x26a073(0x139),'smAuL':function(_0x589032,_0x590993){return _0x589032(_0x590993);},'sljYN':function(_0x4e6231,_0x2eb24d){return _0x4e6231===_0x2eb24d;},'doSIw':_0x26a073(0x10b),'jdfLT':_0x26a073(0xdf),'sEnlY':_0x26a073(0xe6),'XDgBA':function(_0x20972b){return _0x20972b();},'tDhOC':function(_0x360580,_0xf820fd,_0x3c3f27){return _0x360580(_0xf820fd,_0x3c3f27);}},_0x48d132=_0x1b42e5['XDgBA'](_0x403d4c);let _0x1dc718,_0x358c12;try{const {challenge:_0xc6a53,difficulty:_0x1628f4}=await _0x4ec1f2({'apiBase':_0x4d299f,'deviceId':_0x48d132});_0x1dc718=_0xc6a53,_0x358c12=_0x1b42e5[_0x26a073(0xd7)](_0x29609d,_0xc6a53,_0x1628f4);}catch(_0x2919cb){throw new Error(_0x26a073(0x136)+_0x2919cb[_0x26a073(0xdd)]);}return new Promise((_0x3574c3,_0x3b2b4a)=>{const _0x18b956=_0x26a073;let _0x5e38ee;try{_0x5e38ee=new URL(_0x1b42e5[_0x18b956(0x112)],_0x4d299f);}catch(_0x4a50b6){return void _0x1b42e5[_0x18b956(0x115)](_0x3b2b4a,new Error(_0x18b956(0xfc)+_0x4d299f+'('+_0x4a50b6[_0x18b956(0xdd)]+')'));}const _0x5819ea=_0x1b42e5['sljYN'](_0x18b956(0xff),_0x5e38ee[_0x18b956(0xe1)])?_0x456539:_0x384e51,_0x35adff={'credential':_0x117f52,..._0x35a533?{'email':_0x35a533}:{},..._0x1cca2f?{'platform':_0x1cca2f}:{},..._0x55f3bb?{'group_id':_0x55f3bb}:{}},_0x6a4a4e=JSON[_0x18b956(0xf0)](_0x35adff),_0x59e906=_0x5819ea['request'](_0x5e38ee,{'method':_0x1b42e5['doSIw'],'headers':i(_0x48d132,{'Content-Type':_0x1b42e5[_0x18b956(0x111)],'Content-Length':Buffer[_0x18b956(0xeb)](_0x6a4a4e),'X-PoW-Challenge':_0x1dc718,'X-PoW-Nonce':_0x358c12}),'timeout':a},_0x1487b8=>{const _0xe3cf11=_0x18b956,_0x2e5e86={'sqBvN':_0x1b42e5[_0xe3cf11(0xe0)],'WtZYE':function(_0x440422,_0x4d2f35){return _0x1b42e5['PODbC'](_0x440422,_0x4d2f35);},'iLYQL':function(_0x47d381,_0x9c4dc3){const _0x4998e8=_0xe3cf11;return _0x1b42e5[_0x4998e8(0x138)](_0x47d381,_0x9c4dc3);},'UdOTI':function(_0x1bd19d,_0x228833){return _0x1bd19d<_0x228833;},'FDePY':function(_0x7dfec9,_0xb8d1){const _0x51e477=_0xe3cf11;return _0x1b42e5[_0x51e477(0x121)](_0x7dfec9,_0xb8d1);},'TRXug':_0x1b42e5[_0xe3cf11(0x133)],'wHEpJ':function(_0x100c6c,_0x1fe4bc){return _0x100c6c(_0x1fe4bc);}},_0x97cb0=[];_0x1487b8['on'](_0xe3cf11(0x122),_0x501cdb=>_0x97cb0['push'](_0x501cdb)),_0x1487b8['on'](_0x1b42e5[_0xe3cf11(0x118)],()=>{const _0x476ae7=_0xe3cf11,_0x4d9b5e=Buffer['concat'](_0x97cb0)[_0x476ae7(0x11d)](_0x2e5e86[_0x476ae7(0x130)]);let _0x4db5c4;try{_0x4db5c4=_0x4d9b5e?JSON[_0x476ae7(0x106)](_0x4d9b5e):{};}catch{const _0x603290=new Error(_0x476ae7(0x131)+_0x1487b8[_0x476ae7(0x11e)]+'):'+_0x4d9b5e[_0x476ae7(0x12a)](0x0,0xc8));return _0x603290[_0x476ae7(0x11e)]=_0x1487b8[_0x476ae7(0x11e)],_0x603290[_0x476ae7(0xe3)]=_0x4d9b5e,void _0x2e5e86[_0x476ae7(0xd3)](_0x3b2b4a,_0x603290);}if(_0x2e5e86[_0x476ae7(0xea)](_0x1487b8[_0x476ae7(0x11e)],0xc8)&&_0x2e5e86[_0x476ae7(0x119)](_0x1487b8['statusCode'],0x12c))_0x2e5e86[_0x476ae7(0xd5)](_0x3574c3,_0x4db5c4);else{const _0x63019c=_0x4db5c4?.[_0x476ae7(0x12c)],_0x4e5f4b=(_0x63019c&&_0x2e5e86[_0x476ae7(0x105)]==typeof _0x63019c?_0x63019c[_0x476ae7(0xdd)]:_0x63019c)||_0x4db5c4?.[_0x476ae7(0xdd)]||_0x476ae7(0x13a)+_0x1487b8[_0x476ae7(0x11e)],_0x42f98d=new Error(_0x4e5f4b);_0x42f98d['statusCode']=_0x1487b8[_0x476ae7(0x11e)],_0x42f98d[_0x476ae7(0x109)]=_0x4db5c4,_0x2e5e86['wHEpJ'](_0x3b2b4a,_0x42f98d);}});});_0x59e906['on'](_0x1b42e5[_0x18b956(0xd6)],()=>{const _0x659338=_0x18b956;_0x59e906[_0x659338(0x128)](new Error('请求超时(30s)—\x20'+_0x5e38ee[_0x659338(0xfd)]));}),_0x59e906['on'](_0x18b956(0x12c),_0x3b2b4a),_0x59e906[_0x18b956(0x108)](_0x6a4a4e),_0x59e906[_0x18b956(0x11f)]();});}export function probeModels({credential:_0x2b38be,apiBase:_0x1a7a32,timeoutMs:_0x5dcbf1=0x2710}){const _0x1b673c=_0x5e1e03,_0x16fc3f={'LJNgZ':function(_0x189a32,_0x5427c4){return _0x189a32<_0x5427c4;},'ZRNNj':function(_0x19c0f8,_0x47164c){return _0x19c0f8>=_0x47164c;},'zixiA':_0x1b673c(0x122),'XKtUo':'end','uQDmV':_0x1b673c(0x123),'YEpqF':function(_0x2210c4,_0x31097f){return _0x2210c4===_0x31097f;},'uNnvi':'https:','JgvUj':_0x1b673c(0x10b),'WWpGz':function(_0x3f053f,_0x2788e7,_0x588878){return _0x3f053f(_0x2788e7,_0x588878);},'rDTIN':_0x1b673c(0xdf),'QUDjM':'error','efvoe':function(_0x2f10ba){return _0x2f10ba();}},_0x291c3f=_0x16fc3f['efvoe'](_0x403d4c);return new Promise((_0x483e0a,_0x4c9e84)=>{const _0x4a39f9=_0x1b673c,_0x24421f={'XNDGH':'utf8','XkAaL':function(_0x255c85,_0x568275){const _0x5b93ec=_0x498b;return _0x16fc3f[_0x5b93ec(0xe5)](_0x255c85,_0x568275);},'bDJJw':function(_0x17dd00,_0x2ce162){const _0x27bea7=_0x498b;return _0x16fc3f[_0x27bea7(0x137)](_0x17dd00,_0x2ce162);},'lMrwV':function(_0x13b545,_0x2267a8){return _0x13b545(_0x2267a8);},'kHZeF':_0x4a39f9(0x117),'LWtij':_0x16fc3f['zixiA'],'aCzpi':_0x16fc3f[_0x4a39f9(0xde)]};let _0x354702;try{_0x354702=new URL(_0x16fc3f[_0x4a39f9(0x100)],_0x1a7a32);}catch(_0x2c5b95){return void _0x4c9e84(new Error(_0x4a39f9(0xfc)+_0x1a7a32+'('+_0x2c5b95[_0x4a39f9(0xdd)]+')'));}const _0x30fc02=_0x16fc3f[_0x4a39f9(0x126)](_0x16fc3f['uNnvi'],_0x354702['protocol'])?_0x456539:_0x384e51,_0x31e860=JSON[_0x4a39f9(0xf0)]({'credential':_0x2b38be}),_0x35211d=_0x30fc02[_0x4a39f9(0xee)](_0x354702,{'method':_0x16fc3f[_0x4a39f9(0x116)],'headers':_0x16fc3f[_0x4a39f9(0x12e)](i,_0x291c3f,{'Content-Type':_0x16fc3f[_0x4a39f9(0xf1)],'Content-Length':Buffer['byteLength'](_0x31e860)}),'timeout':_0x5dcbf1},_0x37ef91=>{const _0x3a2caf=_0x4a39f9,_0x4823bf={'xwNRh':_0x24421f['XNDGH'],'EyfKY':function(_0x48f4e7,_0x50b34c){const _0x419a6d=_0x498b;return _0x24421f[_0x419a6d(0x12b)](_0x48f4e7,_0x50b34c);},'pjRlk':function(_0x3b89e9,_0x2608a8){const _0xba2c7b=_0x498b;return _0x24421f[_0xba2c7b(0x10c)](_0x3b89e9,_0x2608a8);},'QmKze':function(_0x3a1267,_0x842eea){return _0x3a1267(_0x842eea);},'sdDzr':function(_0x339453,_0x567737){const _0x148762=_0x498b;return _0x24421f[_0x148762(0xfb)](_0x339453,_0x567737);},'fAQvd':function(_0x33fe7b,_0x12b9b5){return _0x33fe7b(_0x12b9b5);},'dhWll':_0x24421f['kHZeF']},_0x2ad5f3=[];_0x37ef91['on'](_0x24421f[_0x3a2caf(0x10f)],_0x645698=>_0x2ad5f3[_0x3a2caf(0x10e)](_0x645698)),_0x37ef91['on'](_0x24421f[_0x3a2caf(0x11a)],()=>{const _0x361b7b=_0x3a2caf,_0x50da9c=Buffer['concat'](_0x2ad5f3)[_0x361b7b(0x11d)](_0x4823bf[_0x361b7b(0x113)]);if(_0x4823bf['EyfKY'](_0x37ef91['statusCode'],0xc8)||_0x4823bf['pjRlk'](_0x37ef91['statusCode'],0x12c)){const _0x59bdf3=new Error(_0x361b7b(0x13a)+_0x37ef91[_0x361b7b(0x11e)]);return _0x59bdf3['statusCode']=_0x37ef91['statusCode'],void _0x4823bf[_0x361b7b(0x134)](_0x4c9e84,_0x59bdf3);}try{_0x4823bf[_0x361b7b(0xda)](_0x483e0a,_0x50da9c?JSON[_0x361b7b(0x106)](_0x50da9c):{});}catch{_0x4823bf[_0x361b7b(0xd8)](_0x4c9e84,new Error(_0x4823bf[_0x361b7b(0xf8)]));}});});_0x35211d['on'](_0x4a39f9(0xe6),()=>{const _0x586093=_0x4a39f9;_0x35211d['destroy'](new Error('请求超时('+_0x5dcbf1/0x3e8+_0x586093(0xd4)+_0x354702[_0x586093(0xfd)]));}),_0x35211d['on'](_0x16fc3f[_0x4a39f9(0xe2)],_0x4c9e84),_0x35211d['write'](_0x31e860),_0x35211d['end']();});}export function listGroups({apiBase:_0x3195e9}){const _0x38ea9b=_0x5e1e03,_0x49a520={'wMxnY':function(_0x5c6375,_0x365675){return _0x5c6375(_0x365675);},'EsfEs':function(_0x37228c,_0x5a8803){return _0x37228c>=_0x5a8803;},'ZGGzt':function(_0x2cdda3,_0x39311b){return _0x2cdda3<_0x39311b;},'puMWh':'data','xshWW':_0x38ea9b(0xff),'iZQGu':function(_0x1a2520){return _0x1a2520();},'GKndi':_0x38ea9b(0xe6),'TNmXh':_0x38ea9b(0x12c)};return new Promise((_0x440d42,_0x5bbf9c)=>{const _0x499c22=_0x38ea9b,_0x2c65fb={'dneIk':function(_0x2c135c,_0x18787d){const _0x3c44e6=_0x498b;return _0x49a520[_0x3c44e6(0xfe)](_0x2c135c,_0x18787d);},'UacfF':function(_0x850e1c,_0x34f8b3){return _0x49a520['EsfEs'](_0x850e1c,_0x34f8b3);},'VtlhS':function(_0x4610ed,_0x416b77){const _0x595569=_0x498b;return _0x49a520[_0x595569(0xd9)](_0x4610ed,_0x416b77);},'niVqm':_0x49a520['puMWh'],'YUbJu':_0x499c22(0x11f)};let _0x58e36b;try{_0x58e36b=new URL(_0x499c22(0xfa),_0x3195e9);}catch(_0x5a634b){return void _0x5bbf9c(new Error('无效的\x20apiBase:'+_0x3195e9+'('+_0x5a634b[_0x499c22(0xdd)]+')'));}const _0x5f2b19=_0x49a520[_0x499c22(0x110)]===_0x58e36b[_0x499c22(0xe1)]?_0x456539:_0x384e51,_0x572d7a=_0x49a520[_0x499c22(0x101)](_0x403d4c),_0x4e0200=_0x5f2b19['request'](_0x58e36b,{'method':_0x499c22(0x103),'headers':i(_0x572d7a,{'Accept':_0x499c22(0xdf)}),'timeout':a},_0x1aa4b0=>{const _0x4e5c1f=_0x499c22,_0x5d36c7={'FtvLp':_0x4e5c1f(0xf3),'kKOss':function(_0x507f4c,_0x36dfaa){const _0x4ca73f=_0x4e5c1f;return _0x2c65fb[_0x4ca73f(0xe4)](_0x507f4c,_0x36dfaa);},'Coxsw':function(_0x10e520,_0x1032f9){const _0x2c7ba9=_0x4e5c1f;return _0x2c65fb[_0x2c7ba9(0xe7)](_0x10e520,_0x1032f9);},'xLuxJ':function(_0x426f2b,_0x3082c1){return _0x2c65fb['VtlhS'](_0x426f2b,_0x3082c1);},'KwgiE':function(_0x202637,_0x4fcda1){return _0x202637(_0x4fcda1);}},_0x700eaa=[];_0x1aa4b0['on'](_0x2c65fb[_0x4e5c1f(0xd1)],_0x3ff973=>_0x700eaa[_0x4e5c1f(0x10e)](_0x3ff973)),_0x1aa4b0['on'](_0x2c65fb['YUbJu'],()=>{const _0x525037=_0x4e5c1f,_0x33bb71=Buffer[_0x525037(0xed)](_0x700eaa)[_0x525037(0x11d)](_0x5d36c7[_0x525037(0x12d)]);let _0x764f55;try{_0x764f55=_0x33bb71?JSON[_0x525037(0x106)](_0x33bb71):{};}catch{return void _0x5d36c7[_0x525037(0x125)](_0x440d42,[]);}if(_0x5d36c7[_0x525037(0x124)](_0x1aa4b0['statusCode'],0xc8)&&_0x5d36c7['xLuxJ'](_0x1aa4b0[_0x525037(0x11e)],0x12c)){const _0x1e7108=Array['isArray'](_0x764f55)?_0x764f55:_0x764f55?.['groups'];_0x5d36c7['KwgiE'](_0x440d42,Array[_0x525037(0x11b)](_0x1e7108)?_0x1e7108:[]);}else _0x440d42([]);});});_0x4e0200['on'](_0x49a520[_0x499c22(0x11c)],()=>{const _0x3b0f1f=_0x499c22;_0x4e0200[_0x3b0f1f(0x128)](new Error(_0x3b0f1f(0xdc)+_0x58e36b[_0x3b0f1f(0xfd)]));}),_0x4e0200['on'](_0x49a520[_0x499c22(0xd0)],_0x183b2d=>{_0x49a520['wMxnY'](_0x440d42,[]);}),_0x4e0200[_0x499c22(0x11f)]();});}export function verifyApiKey({apiKey:_0x4c5dcb,baseUrl:_0x493a83}){const _0x3eb931=_0x5e1e03,_0x1c15b2={'LwHgL':function(_0x17765b,_0x32f6d8){return _0x17765b<_0x32f6d8;},'xrkWa':function(_0x4c7b0c,_0x1acb75){return _0x4c7b0c(_0x1acb75);},'pCKNx':'data','iASMZ':function(_0x1f2e28,_0x38c5cb){return _0x1f2e28(_0x38c5cb);},'dLDwF':function(_0x402a20,_0x34433c){return _0x402a20(_0x34433c);},'bGWXM':function(_0x3a6db6,_0x4253be){return _0x3a6db6===_0x4253be;},'SqYlC':_0x3eb931(0x103)};return new Promise(_0x454834=>{const _0x3d5bd8=_0x3eb931,_0x46e0c1={'xvfYs':function(_0x24edd4,_0x133cf7){return _0x1c15b2['iASMZ'](_0x24edd4,_0x133cf7);},'tvXon':_0x3d5bd8(0x13b)};let _0x445960;try{_0x445960=new URL(_0x3d5bd8(0xe9),_0x493a83);}catch{return void _0x1c15b2[_0x3d5bd8(0xf5)](_0x454834,{'ok':!0x1,'error':_0x3d5bd8(0x10a)+_0x493a83});}const _0xd3f819=(_0x1c15b2[_0x3d5bd8(0x120)](_0x3d5bd8(0xff),_0x445960[_0x3d5bd8(0xe1)])?_0x456539:_0x384e51)['request'](_0x445960,{'method':_0x1c15b2[_0x3d5bd8(0xf2)],'headers':{'Authorization':'Bearer\x20'+_0x4c5dcb,'User-Agent':n},'timeout':0x3a98},_0x42aeea=>{const _0x212e2b=_0x3d5bd8,_0x487517={'hxorJ':function(_0x521db8,_0x3fb145){return _0x521db8>=_0x3fb145;},'ZFqwq':function(_0x42b9c5,_0x462927){return _0x1c15b2['LwHgL'](_0x42b9c5,_0x462927);},'SYqnv':function(_0x43ce9f,_0x1ed2b7){const _0x4bb33c=_0x498b;return _0x1c15b2[_0x4bb33c(0x10d)](_0x43ce9f,_0x1ed2b7);}},_0xc0c53d=[];_0x42aeea['on'](_0x1c15b2[_0x212e2b(0xe8)],_0x1851c7=>_0xc0c53d[_0x212e2b(0x10e)](_0x1851c7)),_0x42aeea['on'](_0x212e2b(0x11f),()=>{const _0x4fdf79=_0x212e2b,_0x13ddf6=_0x487517[_0x4fdf79(0x102)](_0x42aeea[_0x4fdf79(0x11e)],0xc8)&&_0x487517[_0x4fdf79(0xf9)](_0x42aeea[_0x4fdf79(0x11e)],0x12c);_0x487517['SYqnv'](_0x454834,{'ok':_0x13ddf6,'statusCode':_0x42aeea[_0x4fdf79(0x11e)]});});});_0xd3f819['on']('timeout',()=>{const _0x4da7fa=_0x3d5bd8;_0xd3f819[_0x4da7fa(0x128)](),_0x46e0c1[_0x4da7fa(0xf4)](_0x454834,{'ok':!0x1,'error':_0x46e0c1[_0x4da7fa(0xec)]});}),_0xd3f819['on'](_0x3d5bd8(0x12c),_0x346ee6=>_0x454834({'ok':!0x1,'error':_0x346ee6[_0x3d5bd8(0xdd)]})),_0xd3f819['end']();});}
1
+ const _0x2c8d86=_0x5cc7;(function(_0x32d2f6,_0x26d88b){const _0x366a54=_0x5cc7,_0x8f5d0d=_0x32d2f6();while(!![]){try{const _0x33c824=-parseInt(_0x366a54(0x1e6))/0x1*(-parseInt(_0x366a54(0x225))/0x2)+-parseInt(_0x366a54(0x238))/0x3+-parseInt(_0x366a54(0x1fa))/0x4+-parseInt(_0x366a54(0x1df))/0x5+-parseInt(_0x366a54(0x20c))/0x6*(parseInt(_0x366a54(0x240))/0x7)+parseInt(_0x366a54(0x1e7))/0x8+parseInt(_0x366a54(0x204))/0x9;if(_0x33c824===_0x26d88b)break;else _0x8f5d0d['push'](_0x8f5d0d['shift']());}catch(_0x34d8a0){_0x8f5d0d['push'](_0x8f5d0d['shift']());}}}(_0x27fc,0x4f534));import _0x44c0b2 from'node:https';function _0x27fc(){const _0xdcb4d3=['GET','AlnLt','href','1619472yyiaNS','data','jNbhg','body','DIrMg','push','gOxCu','QmyNZ','28WSbBYa','ReLtU','PoW\x20challenge\x20获取失败:','响应非\x20JSON','kjcAQ','LrECw','application/json','无效的\x20apiBase:','pojQZ','Bearer\x20','olySg','HTTP\x20','oJQeS','992500emuefW','KRjUX','stringify','zuewk','error','zjAgF','toString','450782csOWpV','1266824uubOBV','XWXmY','request','/api/v1/cli/activate','请求超时(30s)—\x20','ozYjI','object','concat','hOumW','EEOrp','uSjTG','pfLjp','end','utf8','验证请求超时(15s)','dhnly','message','BTfIl','响应非\x20JSON(HTTP\x20','1294832zsmasC','../package.json','slice','raw','otVNi','https:','isArray','OsSgu','ODvqr','/v1/models','8447229xRSYtX','ssvdu','/api/v1/cli/groups','write','请求超时(','tOPnx','VmiRH','bZaiV','241152ljUJMH','RsHCF','eHWit','fLSJr','aVVOl','eQkBl','statusCode','hMuFZ','CSFgE','OBzCm','Nmhtv','qLyDl','@2api-store/activate/','Jmoru','无效的\x20baseUrl:','DmVXR','vviQG','wFhYo','OWUZl','aIExD','EyRIU','pfvjv','parse','NBFEu','dWMDy','2pKPuPQ','gjmaL','NLOHH','groups','/api/v1/cli/probe-models','timeout','destroy','byteLength','qFcHi','POST','DXCnJ','chjRq','jiBkk','gLIwO','wIufD','protocol'];_0x27fc=function(){return _0xdcb4d3;};return _0x27fc();}import _0x5a7517 from'node:http';import{createRequire as _0x164dcb}from'node:module';import{getDeviceId as _0xd847b6}from'./device.mjs';import{getChallenge as _0x41977a,solvePoW as _0x5c2e0f}from'./pow.mjs';const a=_0x164dcb(import.meta.url)(_0x2c8d86(0x1fb))['version'],i=_0x2c8d86(0x218)+a,c=0x7530;function u(_0x5d3a32,_0x503b71={}){return{'User-Agent':i,'X-Device-Id':_0x5d3a32,..._0x503b71};}export async function cliActivate({credential:_0x5cab54,email:_0x227728,platform:_0x3b87d6,groupId:_0x391f30,apiBase:_0x59ef61}){const _0x56fe8a=_0x2c8d86,_0x38aa28={'EoOlC':_0x56fe8a(0x1f4),'KRjUX':function(_0x49a1aa,_0x38e2d0){return _0x49a1aa>=_0x38e2d0;},'DXCnJ':function(_0x4fd0e6,_0x38fe16){return _0x4fd0e6<_0x38fe16;},'jiBkk':_0x56fe8a(0x1ed),'Nmhtv':_0x56fe8a(0x239),'NLOHH':_0x56fe8a(0x1f3),'wIufD':_0x56fe8a(0x1ea),'pEpIw':function(_0x53c274,_0x2a9dac){return _0x53c274(_0x2a9dac);},'CSFgE':function(_0x27d714,_0x2859e2){return _0x27d714===_0x2859e2;},'ssvdu':'POST','zuewk':function(_0x5ea939,_0x5aa75c,_0x258388){return _0x5ea939(_0x5aa75c,_0x258388);},'aVVOl':'application/json','RsHCF':'timeout','hOumW':_0x56fe8a(0x1e3),'dWMDy':function(_0x5c4dc9){return _0x5c4dc9();}},_0x30fd1c=_0x38aa28[_0x56fe8a(0x224)](_0xd847b6);let _0x5c1528,_0x11fe87;try{const {challenge:_0x263f20,difficulty:_0x42b663}=await _0x38aa28['pEpIw'](_0x41977a,{'apiBase':_0x59ef61,'deviceId':_0x30fd1c});_0x5c1528=_0x263f20,_0x11fe87=_0x38aa28[_0x56fe8a(0x1e2)](_0x5c2e0f,_0x263f20,_0x42b663);}catch(_0x4264db){throw new Error(_0x56fe8a(0x1d4)+_0x4264db[_0x56fe8a(0x1f7)]);}return new Promise((_0x4ddaee,_0x4157b4)=>{const _0xa78991=_0x56fe8a;let _0x4836c4;try{_0x4836c4=new URL(_0x38aa28[_0xa78991(0x233)],_0x59ef61);}catch(_0x2fa2f3){return void _0x38aa28['pEpIw'](_0x4157b4,new Error(_0xa78991(0x1d9)+_0x59ef61+'('+_0x2fa2f3['message']+')'));}const _0x3a23b1=_0x38aa28[_0xa78991(0x214)](_0xa78991(0x1ff),_0x4836c4[_0xa78991(0x234)])?_0x44c0b2:_0x5a7517,_0x2413fb={'credential':_0x5cab54,'cli_version':a,..._0x227728?{'email':_0x227728}:{},..._0x3b87d6?{'platform':_0x3b87d6}:{},..._0x391f30?{'group_id':_0x391f30}:{}},_0x4e8548=JSON[_0xa78991(0x1e1)](_0x2413fb),_0x2acec5=_0x3a23b1[_0xa78991(0x1e9)](_0x4836c4,{'method':_0x38aa28[_0xa78991(0x205)],'headers':_0x38aa28['zuewk'](u,_0x30fd1c,{'Content-Type':_0x38aa28[_0xa78991(0x210)],'Content-Length':Buffer[_0xa78991(0x22c)](_0x4e8548),'X-PoW-Challenge':_0x5c1528,'X-PoW-Nonce':_0x11fe87}),'timeout':c},_0x30b588=>{const _0x5afa88=_0xa78991,_0x11a709={'tOPnx':_0x38aa28['EoOlC'],'zrhVh':function(_0x139569,_0x458820){const _0x1c2317=_0x5cc7;return _0x38aa28[_0x1c2317(0x1e0)](_0x139569,_0x458820);},'AlnLt':function(_0x3e7910,_0x283a89){const _0x26003a=_0x5cc7;return _0x38aa28[_0x26003a(0x22f)](_0x3e7910,_0x283a89);},'FrqPK':function(_0x567845,_0x3d66b9){return _0x567845(_0x3d66b9);},'EEOrp':function(_0x16f50a,_0x45b463){return _0x16f50a==_0x45b463;},'XWXmY':_0x38aa28[_0x5afa88(0x231)]},_0x2b664e=[];_0x30b588['on'](_0x38aa28[_0x5afa88(0x216)],_0x59737c=>_0x2b664e[_0x5afa88(0x23d)](_0x59737c)),_0x30b588['on'](_0x38aa28[_0x5afa88(0x227)],()=>{const _0x2b1fa4=_0x5afa88,_0x4da074=Buffer['concat'](_0x2b664e)['toString'](_0x11a709[_0x2b1fa4(0x209)]);let _0x111491;try{_0x111491=_0x4da074?JSON['parse'](_0x4da074):{};}catch{const _0x1a84c5=new Error(_0x2b1fa4(0x1f9)+_0x30b588[_0x2b1fa4(0x212)]+'):'+_0x4da074[_0x2b1fa4(0x1fc)](0x0,0xc8));return _0x1a84c5[_0x2b1fa4(0x212)]=_0x30b588[_0x2b1fa4(0x212)],_0x1a84c5[_0x2b1fa4(0x1fd)]=_0x4da074,void _0x4157b4(_0x1a84c5);}if(_0x11a709['zrhVh'](_0x30b588[_0x2b1fa4(0x212)],0xc8)&&_0x11a709[_0x2b1fa4(0x236)](_0x30b588[_0x2b1fa4(0x212)],0x12c))_0x11a709['FrqPK'](_0x4ddaee,_0x111491);else{const _0x1ed09a=_0x111491?.[_0x2b1fa4(0x1e3)],_0x5c1ac9=(_0x1ed09a&&_0x11a709[_0x2b1fa4(0x1f0)](_0x11a709[_0x2b1fa4(0x1e8)],typeof _0x1ed09a)?_0x1ed09a['message']:_0x1ed09a)||_0x111491?.['message']||_0x2b1fa4(0x1dd)+_0x30b588[_0x2b1fa4(0x212)],_0x1df72e=new Error(_0x5c1ac9);_0x1df72e[_0x2b1fa4(0x212)]=_0x30b588[_0x2b1fa4(0x212)],_0x1df72e[_0x2b1fa4(0x23b)]=_0x111491,_0x4157b4(_0x1df72e);}});});_0x2acec5['on'](_0x38aa28[_0xa78991(0x20d)],()=>{const _0x26e62b=_0xa78991;_0x2acec5[_0x26e62b(0x22b)](new Error(_0x26e62b(0x1eb)+_0x4836c4[_0x26e62b(0x237)]));}),_0x2acec5['on'](_0x38aa28[_0xa78991(0x1ef)],_0x4157b4),_0x2acec5[_0xa78991(0x207)](_0x4e8548),_0x2acec5[_0xa78991(0x1f3)]();});}export function probeModels({credential:_0x35aacf,apiBase:_0x18af03,timeoutMs:_0x23f430=0x2710}){const _0x172bcf=_0x2c8d86,_0x3184eb={'uSjTG':_0x172bcf(0x1f4),'xlTRm':function(_0x46d49f,_0x38961d){return _0x46d49f(_0x38961d);},'otVNi':_0x172bcf(0x1d5),'eQkBl':_0x172bcf(0x239),'qLyDl':function(_0x227ad4,_0xde8823){return _0x227ad4/_0xde8823;},'bZaiV':_0x172bcf(0x229),'BTfIl':function(_0x3a0a8b,_0x401d66){return _0x3a0a8b(_0x401d66);},'UUMWS':_0x172bcf(0x1ff),'xqzcy':_0x172bcf(0x22e),'eyCAh':function(_0x52abdb,_0x324f7c,_0x4b078a){return _0x52abdb(_0x324f7c,_0x4b078a);},'yoJkm':'application/json','zhfYI':'timeout','vviQG':'error','gOlGq':function(_0x555aa2){return _0x555aa2();}},_0x3775f6=_0x3184eb['gOlGq'](_0xd847b6);return new Promise((_0x3193a4,_0x34f0e5)=>{const _0x36fcc2=_0x172bcf,_0x5ebc35={'fLSJr':_0x3184eb[_0x36fcc2(0x1f1)],'wFhYo':function(_0x4fdd6e,_0x952075){return _0x3184eb['xlTRm'](_0x4fdd6e,_0x952075);},'gGxqh':_0x3184eb[_0x36fcc2(0x1fe)],'kvKvt':_0x3184eb[_0x36fcc2(0x211)],'gLIwO':function(_0x5d53d2,_0x569655){const _0x2a98c3=_0x36fcc2;return _0x3184eb[_0x2a98c3(0x217)](_0x5d53d2,_0x569655);}};let _0x262389;try{_0x262389=new URL(_0x3184eb[_0x36fcc2(0x20b)],_0x18af03);}catch(_0x251e9f){return void _0x3184eb[_0x36fcc2(0x1f8)](_0x34f0e5,new Error('无效的\x20apiBase:'+_0x18af03+'('+_0x251e9f[_0x36fcc2(0x1f7)]+')'));}const _0x499609=_0x3184eb['UUMWS']===_0x262389['protocol']?_0x44c0b2:_0x5a7517,_0x1d9061=JSON[_0x36fcc2(0x1e1)]({'credential':_0x35aacf}),_0x495590=_0x499609['request'](_0x262389,{'method':_0x3184eb['xqzcy'],'headers':_0x3184eb['eyCAh'](u,_0x3775f6,{'Content-Type':_0x3184eb['yoJkm'],'Content-Length':Buffer[_0x36fcc2(0x22c)](_0x1d9061)}),'timeout':_0x23f430},_0x56fb48=>{const _0x1359ba=_0x36fcc2,_0x3e3128={'LrECw':_0x5ebc35[_0x1359ba(0x20f)],'uXbrB':function(_0x8bc0f1,_0x5c4b2f){return _0x8bc0f1(_0x5c4b2f);},'aIExD':function(_0x4b06ed,_0x1db459){const _0x49ad44=_0x1359ba;return _0x5ebc35[_0x49ad44(0x21d)](_0x4b06ed,_0x1db459);},'oJQeS':_0x5ebc35['gGxqh']},_0x482697=[];_0x56fb48['on'](_0x5ebc35['kvKvt'],_0x128ac3=>_0x482697[_0x1359ba(0x23d)](_0x128ac3)),_0x56fb48['on'](_0x1359ba(0x1f3),()=>{const _0x40062b=_0x1359ba,_0x2a8825=Buffer[_0x40062b(0x1ee)](_0x482697)['toString'](_0x3e3128[_0x40062b(0x1d7)]);if(_0x56fb48[_0x40062b(0x212)]<0xc8||_0x56fb48[_0x40062b(0x212)]>=0x12c){const _0x579ddc=new Error(_0x40062b(0x1dd)+_0x56fb48['statusCode']);return _0x579ddc['statusCode']=_0x56fb48[_0x40062b(0x212)],void _0x3e3128['uXbrB'](_0x34f0e5,_0x579ddc);}try{_0x3e3128[_0x40062b(0x21f)](_0x3193a4,_0x2a8825?JSON[_0x40062b(0x222)](_0x2a8825):{});}catch{_0x3e3128['uXbrB'](_0x34f0e5,new Error(_0x3e3128[_0x40062b(0x1de)]));}});});_0x495590['on'](_0x3184eb['zhfYI'],()=>{const _0x8de8f8=_0x36fcc2;_0x495590[_0x8de8f8(0x22b)](new Error(_0x8de8f8(0x208)+_0x5ebc35[_0x8de8f8(0x232)](_0x23f430,0x3e8)+'s)—\x20'+_0x262389[_0x8de8f8(0x237)]));}),_0x495590['on'](_0x3184eb[_0x36fcc2(0x21c)],_0x34f0e5),_0x495590['write'](_0x1d9061),_0x495590[_0x36fcc2(0x1f3)]();});}function _0x5cc7(_0x3f19b8,_0x396727){_0x3f19b8=_0x3f19b8-0x1d3;const _0x27fc3a=_0x27fc();let _0x5cc798=_0x27fc3a[_0x3f19b8];return _0x5cc798;}export function listGroups({apiBase:_0x1f6048}){const _0x3cb7bb=_0x2c8d86,_0x50c539={'ODvqr':_0x3cb7bb(0x239),'qFcHi':_0x3cb7bb(0x1f3),'olySg':function(_0x11a8f1,_0x17cb47){return _0x11a8f1(_0x17cb47);},'zjAgF':_0x3cb7bb(0x1f4),'hMuFZ':function(_0x3b23d9,_0x681eb2){return _0x3b23d9>=_0x681eb2;},'DIrMg':function(_0x2bf06d,_0x340db1){return _0x2bf06d<_0x340db1;},'kjcAQ':function(_0x171e06,_0x1d3ee3){return _0x171e06(_0x1d3ee3);},'QmyNZ':_0x3cb7bb(0x206),'eHWit':function(_0x237a0b,_0x10a1ca){return _0x237a0b===_0x10a1ca;},'VmiRH':function(_0x31c2cf){return _0x31c2cf();},'gjmaL':function(_0x59cad3,_0x46a9aa,_0xbc6d42){return _0x59cad3(_0x46a9aa,_0xbc6d42);},'DmVXR':_0x3cb7bb(0x1d8),'gOxCu':_0x3cb7bb(0x22a),'Jmoru':_0x3cb7bb(0x1e3)};return new Promise((_0x46a499,_0x544271)=>{const _0x4198b6=_0x3cb7bb,_0x160d8a={'pojQZ':_0x50c539[_0x4198b6(0x1e4)],'jNbhg':function(_0x51aadd,_0x52abec){return _0x51aadd(_0x52abec);},'eYnJF':function(_0x20a3cb,_0x18db70){const _0x5d67e1=_0x4198b6;return _0x50c539[_0x5d67e1(0x213)](_0x20a3cb,_0x18db70);},'OsSgu':function(_0x23ca93,_0x3f3604){const _0x404956=_0x4198b6;return _0x50c539[_0x404956(0x23c)](_0x23ca93,_0x3f3604);},'pfLjp':function(_0x4dcb73,_0x542f65){const _0x31b533=_0x4198b6;return _0x50c539[_0x31b533(0x1d6)](_0x4dcb73,_0x542f65);}};let _0x3b98d3;try{_0x3b98d3=new URL(_0x50c539[_0x4198b6(0x23f)],_0x1f6048);}catch(_0x119efd){return void _0x50c539['kjcAQ'](_0x544271,new Error(_0x4198b6(0x1d9)+_0x1f6048+'('+_0x119efd['message']+')'));}const _0x3da445=_0x50c539[_0x4198b6(0x20e)](_0x4198b6(0x1ff),_0x3b98d3[_0x4198b6(0x234)])?_0x44c0b2:_0x5a7517,_0x4113ad=_0x50c539[_0x4198b6(0x20a)](_0xd847b6),_0xdd18ae=_0x3da445[_0x4198b6(0x1e9)](_0x3b98d3,{'method':_0x4198b6(0x235),'headers':_0x50c539[_0x4198b6(0x226)](u,_0x4113ad,{'Accept':_0x50c539[_0x4198b6(0x21b)]}),'timeout':c},_0x34c50e=>{const _0x1881de=_0x4198b6,_0x48c6de=[];_0x34c50e['on'](_0x50c539[_0x1881de(0x202)],_0x53f075=>_0x48c6de[_0x1881de(0x23d)](_0x53f075)),_0x34c50e['on'](_0x50c539[_0x1881de(0x22d)],()=>{const _0x3c266e=_0x1881de,_0x52ab15=Buffer['concat'](_0x48c6de)[_0x3c266e(0x1e5)](_0x160d8a[_0x3c266e(0x1da)]);let _0x571b02;try{_0x571b02=_0x52ab15?JSON[_0x3c266e(0x222)](_0x52ab15):{};}catch{return void _0x160d8a[_0x3c266e(0x23a)](_0x46a499,[]);}if(_0x160d8a['eYnJF'](_0x34c50e[_0x3c266e(0x212)],0xc8)&&_0x160d8a[_0x3c266e(0x201)](_0x34c50e[_0x3c266e(0x212)],0x12c)){const _0x2c7fb6=Array[_0x3c266e(0x200)](_0x571b02)?_0x571b02:_0x571b02?.[_0x3c266e(0x228)];_0x160d8a[_0x3c266e(0x23a)](_0x46a499,Array[_0x3c266e(0x200)](_0x2c7fb6)?_0x2c7fb6:[]);}else _0x160d8a[_0x3c266e(0x1f2)](_0x46a499,[]);});});_0xdd18ae['on'](_0x50c539[_0x4198b6(0x23e)],()=>{const _0x1be2b2=_0x4198b6;_0xdd18ae[_0x1be2b2(0x22b)](new Error(_0x1be2b2(0x1eb)+_0x3b98d3[_0x1be2b2(0x237)]));}),_0xdd18ae['on'](_0x50c539[_0x4198b6(0x219)],_0x54fe7e=>{const _0x54b502=_0x4198b6;_0x50c539[_0x54b502(0x1dc)](_0x46a499,[]);}),_0xdd18ae['end']();});}export function verifyApiKey({apiKey:_0x5bde59,baseUrl:_0x2b052d}){const _0x429a2a=_0x2c8d86,_0x5ef78d={'zVSIH':function(_0x1f2de1,_0x425e96){return _0x1f2de1<_0x425e96;},'NBFEu':function(_0x301307,_0x211faa){return _0x301307(_0x211faa);},'CJbWW':'data','ReLtU':function(_0x373e73,_0x1ad418){return _0x373e73(_0x1ad418);},'OWUZl':_0x429a2a(0x235),'YrPsY':_0x429a2a(0x22a),'OBzCm':_0x429a2a(0x1e3)};return new Promise(_0x7aacaa=>{const _0x16bcb0=_0x429a2a,_0x45d76c={'GsHlG':function(_0x158175,_0x3e57c9){return _0x5ef78d['zVSIH'](_0x158175,_0x3e57c9);},'dhnly':function(_0x3a7cf8,_0x50859a){const _0x41115f=_0x5cc7;return _0x5ef78d[_0x41115f(0x223)](_0x3a7cf8,_0x50859a);},'chjRq':_0x5ef78d['CJbWW'],'EyRIU':_0x16bcb0(0x1f3)};let _0x3b0948;try{_0x3b0948=new URL(_0x16bcb0(0x203),_0x2b052d);}catch{return void _0x5ef78d[_0x16bcb0(0x1d3)](_0x7aacaa,{'ok':!0x1,'error':_0x16bcb0(0x21a)+_0x2b052d});}const _0xaed5fd=(_0x16bcb0(0x1ff)===_0x3b0948[_0x16bcb0(0x234)]?_0x44c0b2:_0x5a7517)[_0x16bcb0(0x1e9)](_0x3b0948,{'method':_0x5ef78d[_0x16bcb0(0x21e)],'headers':{'Authorization':_0x16bcb0(0x1db)+_0x5bde59,'User-Agent':i},'timeout':0x3a98},_0x1eab55=>{const _0x201a17=_0x16bcb0,_0x38f02e={'pfvjv':function(_0xc8a20b,_0x513d79){return _0x45d76c['GsHlG'](_0xc8a20b,_0x513d79);},'ozYjI':function(_0x5af90a,_0x49c86b){const _0x98463d=_0x5cc7;return _0x45d76c[_0x98463d(0x1f6)](_0x5af90a,_0x49c86b);}},_0x399d11=[];_0x1eab55['on'](_0x45d76c[_0x201a17(0x230)],_0x28c666=>_0x399d11['push'](_0x28c666)),_0x1eab55['on'](_0x45d76c[_0x201a17(0x220)],()=>{const _0xe9a35=_0x201a17,_0x132e3e=_0x1eab55[_0xe9a35(0x212)]>=0xc8&&_0x38f02e[_0xe9a35(0x221)](_0x1eab55[_0xe9a35(0x212)],0x12c);_0x38f02e[_0xe9a35(0x1ec)](_0x7aacaa,{'ok':_0x132e3e,'statusCode':_0x1eab55[_0xe9a35(0x212)]});});});_0xaed5fd['on'](_0x5ef78d['YrPsY'],()=>{const _0x6e1bf6=_0x16bcb0;_0xaed5fd[_0x6e1bf6(0x22b)](),_0x7aacaa({'ok':!0x1,'error':_0x6e1bf6(0x1f5)});}),_0xaed5fd['on'](_0x5ef78d[_0x16bcb0(0x215)],_0x3cc721=>_0x7aacaa({'ok':!0x1,'error':_0x3cc721[_0x16bcb0(0x1f7)]})),_0xaed5fd['end']();});}
@@ -1 +1 @@
1
- (function(_0x3291d9,_0x558501){const _0x390124=_0x35d0,_0x65e1fe=_0x3291d9();while(!![]){try{const _0x4715bc=-parseInt(_0x390124(0x194))/0x1+-parseInt(_0x390124(0x1a7))/0x2*(-parseInt(_0x390124(0x19a))/0x3)+-parseInt(_0x390124(0x1ac))/0x4*(-parseInt(_0x390124(0x199))/0x5)+-parseInt(_0x390124(0x196))/0x6+-parseInt(_0x390124(0x1ab))/0x7*(parseInt(_0x390124(0x195))/0x8)+parseInt(_0x390124(0x19e))/0x9*(-parseInt(_0x390124(0x1a2))/0xa)+parseInt(_0x390124(0x19d))/0xb*(parseInt(_0x390124(0x1a0))/0xc);if(_0x4715bc===_0x558501)break;else _0x65e1fe['push'](_0x65e1fe['shift']());}catch(_0x7d6e27){_0x65e1fe['push'](_0x65e1fe['shift']());}}}(_0x2c9c,0x3cd64));import _0x295c7c from'node:fs';import _0x4726ac from'node:path';function _0x2c9c(){const _0x343b50=['sort','existsSync','14344LuOnQe','1065384BVFyvE','mtime','5820cWqBic','.bak.','40asngAc','isFile','toISOString','name','push','15518GiACxd','mtimeMs','备份文件不存在:','size','49piGfFX','1693388rGONPb','join','30841VEewDS','216464xujDzF','723642WaxKgW','readdirSync','match','5iLHvco','3qrZMab'];_0x2c9c=function(){return _0x343b50;};return _0x2c9c();}export function backupFile(_0x42ae30){const _0x5194c0=_0x35d0;let _0xfc1730=!0x1;try{_0xfc1730=_0x295c7c[_0x5194c0(0x19c)](_0x42ae30);}catch{return null;}if(!_0xfc1730)return null;const _0x1089fb=_0x42ae30+_0x5194c0(0x1a1)+new Date()[_0x5194c0(0x1a4)]()['replace'](/[:.]/g,'-');return _0x295c7c['copyFileSync'](_0x42ae30,_0x1089fb),_0x1089fb;}function _0x35d0(_0x89ac25,_0x5e8728){_0x89ac25=_0x89ac25-0x193;const _0x2c9ccd=_0x2c9c();let _0x35d0d6=_0x2c9ccd[_0x89ac25];return _0x35d0d6;}export function listBackups(_0xd00aef){const _0x1edca0=_0x35d0,_0x306623=[];for(const _0x274503 of _0xd00aef){if(!_0x274503)continue;let _0x52189f;try{_0x52189f=_0x295c7c[_0x1edca0(0x197)](_0x274503,{'withFileTypes':!0x0});}catch{continue;}for(const _0x33afcd of _0x52189f){if(!_0x33afcd[_0x1edca0(0x1a3)]())continue;const _0x426fd1=_0x33afcd[_0x1edca0(0x1a5)][_0x1edca0(0x198)](/^(.+)\.bak\.[\dTZ:-]+$/);if(!_0x426fd1)continue;const _0x7889cb=_0x426fd1[0x1],_0x3bf9be=_0x4726ac['join'](_0x274503,_0x33afcd[_0x1edca0(0x1a5)]),_0x30238a=_0x4726ac[_0x1edca0(0x193)](_0x274503,_0x7889cb);try{const _0x4a653d=_0x295c7c['statSync'](_0x3bf9be);_0x306623[_0x1edca0(0x1a6)]({'bakPath':_0x3bf9be,'origPath':_0x30238a,'mtime':_0x4a653d[_0x1edca0(0x1a8)],'dir':_0x274503,'file':_0x33afcd[_0x1edca0(0x1a5)],'origName':_0x7889cb,'size':_0x4a653d[_0x1edca0(0x1aa)]});}catch{}}}return _0x306623[_0x1edca0(0x19b)]((_0xa3271f,_0x1fca8a)=>_0x1fca8a['mtime']-_0xa3271f[_0x1edca0(0x19f)]),_0x306623;}export function restoreBackup(_0x4f2434,_0x1f182f){const _0x1da558=_0x35d0;if(!_0x295c7c[_0x1da558(0x19c)](_0x4f2434))throw new Error(_0x1da558(0x1a9)+_0x4f2434);const _0x69b28c=_0x4726ac['dirname'](_0x1f182f);try{_0x295c7c['mkdirSync'](_0x69b28c,{'recursive':!0x0});}catch{}return _0x295c7c['copyFileSync'](_0x4f2434,_0x1f182f),_0x1f182f;}
1
+ (function(_0x149223,_0x560b4f){const _0x4eee2d=_0x2398,_0x36ae74=_0x149223();while(!![]){try{const _0xb7908a=-parseInt(_0x4eee2d(0x1bf))/0x1*(-parseInt(_0x4eee2d(0x1c5))/0x2)+parseInt(_0x4eee2d(0x1b8))/0x3*(-parseInt(_0x4eee2d(0x1d1))/0x4)+-parseInt(_0x4eee2d(0x1cb))/0x5*(parseInt(_0x4eee2d(0x1be))/0x6)+-parseInt(_0x4eee2d(0x1ba))/0x7*(-parseInt(_0x4eee2d(0x1bc))/0x8)+-parseInt(_0x4eee2d(0x1c8))/0x9+parseInt(_0x4eee2d(0x1b9))/0xa+parseInt(_0x4eee2d(0x1c3))/0xb;if(_0xb7908a===_0x560b4f)break;else _0x36ae74['push'](_0x36ae74['shift']());}catch(_0x44ccf4){_0x36ae74['push'](_0x36ae74['shift']());}}}(_0x2100,0xac2a1));import _0x349b66 from'node:fs';import _0x51d603 from'node:path';export function backupFile(_0x3d6cc4){const _0x5dc1a8=_0x2398;let _0x33a3bc=!0x1;try{_0x33a3bc=_0x349b66[_0x5dc1a8(0x1c6)](_0x3d6cc4);}catch{return null;}if(!_0x33a3bc)return null;const _0x42bfb=_0x3d6cc4+_0x5dc1a8(0x1ce)+new Date()[_0x5dc1a8(0x1c7)]()[_0x5dc1a8(0x1bd)](/[:.]/g,'-');return _0x349b66[_0x5dc1a8(0x1d0)](_0x3d6cc4,_0x42bfb),_0x42bfb;}export function listBackups(_0x10bd87){const _0x4e0ff1=_0x2398,_0x412e34=[];for(const _0x335302 of _0x10bd87){if(!_0x335302)continue;let _0x4ba91d;try{_0x4ba91d=_0x349b66[_0x4e0ff1(0x1c1)](_0x335302,{'withFileTypes':!0x0});}catch{continue;}for(const _0x50829b of _0x4ba91d){if(!_0x50829b[_0x4e0ff1(0x1d3)]())continue;const _0x1de100=_0x50829b[_0x4e0ff1(0x1ca)]['match'](/^(.+)\.bak\.[\dTZ:-]+$/);if(!_0x1de100)continue;const _0x442850=_0x1de100[0x1],_0x5aca95=_0x51d603[_0x4e0ff1(0x1cd)](_0x335302,_0x50829b['name']),_0x3f8e30=_0x51d603[_0x4e0ff1(0x1cd)](_0x335302,_0x442850);try{const _0x517fb8=_0x349b66[_0x4e0ff1(0x1c2)](_0x5aca95);_0x412e34[_0x4e0ff1(0x1c9)]({'bakPath':_0x5aca95,'origPath':_0x3f8e30,'mtime':_0x517fb8[_0x4e0ff1(0x1c0)],'dir':_0x335302,'file':_0x50829b[_0x4e0ff1(0x1ca)],'origName':_0x442850,'size':_0x517fb8[_0x4e0ff1(0x1bb)]});}catch{}}}return _0x412e34[_0x4e0ff1(0x1d2)]((_0x3a0611,_0x52f37c)=>_0x52f37c['mtime']-_0x3a0611[_0x4e0ff1(0x1cc)]),_0x412e34;}function _0x2100(){const _0x337129=['size','857912YOueCt','replace','1494HNsbFg','218934JortEX','mtimeMs','readdirSync','statSync','14533189gACWxZ','dirname','6Shmyss','existsSync','toISOString','12662721VDmPJa','push','name','8425GoWYjs','mtime','join','.bak.','备份文件不存在:','copyFileSync','8oGfxvE','sort','isFile','mkdirSync','411267MOTWyn','7206570iYWlzc','7QdaJez'];_0x2100=function(){return _0x337129;};return _0x2100();}function _0x2398(_0x20006a,_0x1895b8){_0x20006a=_0x20006a-0x1b7;const _0x2100c1=_0x2100();let _0x2398d5=_0x2100c1[_0x20006a];return _0x2398d5;}export function restoreBackup(_0x15750b,_0x201f77){const _0x440c72=_0x2398;if(!_0x349b66[_0x440c72(0x1c6)](_0x15750b))throw new Error(_0x440c72(0x1cf)+_0x15750b);const _0x520962=_0x51d603[_0x440c72(0x1c4)](_0x201f77);try{_0x349b66[_0x440c72(0x1b7)](_0x520962,{'recursive':!0x0});}catch{}return _0x349b66[_0x440c72(0x1d0)](_0x15750b,_0x201f77),_0x201f77;}
package/dist/lib/cmds.mjs CHANGED
@@ -1 +1 @@
1
- const _0x14467b=_0x8873;(function(_0x4f6526,_0x2eb365){const _0x6e2156=_0x8873,_0x4e11da=_0x4f6526();while(!![]){try{const _0x2219fa=parseInt(_0x6e2156(0x213))/0x1+-parseInt(_0x6e2156(0x27d))/0x2*(-parseInt(_0x6e2156(0x184))/0x3)+parseInt(_0x6e2156(0x277))/0x4+parseInt(_0x6e2156(0x1ff))/0x5+-parseInt(_0x6e2156(0x25e))/0x6*(-parseInt(_0x6e2156(0x245))/0x7)+parseInt(_0x6e2156(0x1a3))/0x8*(-parseInt(_0x6e2156(0x1fe))/0x9)+-parseInt(_0x6e2156(0x223))/0xa*(parseInt(_0x6e2156(0x1d2))/0xb);if(_0x2219fa===_0x2eb365)break;else _0x4e11da['push'](_0x4e11da['shift']());}catch(_0x48f25c){_0x4e11da['push'](_0x4e11da['shift']());}}}(_0x4e67,0xd68de));import _0x178e02 from'node:fs';import _0x2a326f from'node:path';import _0x31d95c from'node:os';import{unzipSync as _0x5b8abe}from'fflate';import{backupFile as _0xdaa780,listBackups as _0x167215,restoreBackup as _0x49bc65}from'./backup.mjs';import{cliActivate as _0x3b404b,listGroups as _0x403c03}from'./api.mjs';function _0x4e67(){const _0x296c0b=['iHrDl','%userprofile%\x5c.claude\x5csettings.json','EACCES','rWzqT','⚠️\x20这是破坏性操作:将删除上述配置文件并尝试从备份恢复。','vKjoa','Claude\x20Code','padEnd','dirname','includes','需要\x20node\x20>=\x2018,当前\x20','RxrHL','Logiu','isArray','获取可用分组','forEach','QZoKg','has','slice','NAxPC','可能原因:服务端未配置分组\x20/\x20网络错误\x20/\x20端点错误','%userprofile%\x5c.gemini','SHKYA','isWindows','fail','zdTlJ','请把\x20zip\x20压缩包发给客服排障(包内已脱敏,不含明文\x20key)','group','恢复官方默认(删\x202api.store\x20配置并从备份恢复)','vcoQy','lhCkh','未查询到可用分组','MDYuS','%userprofile%\x5c.gemini\x5csettings.json','诊断失败:','dDFQL','key:…','%userprofile%\x5c.codex\x5cconfig.toml','\x20文件:','VuYWb','node','79849QpKORz','getFullYear','status','(跳过删除此文件避免误伤)','MlwTd','toUpperCase','\x20\x20...(共\x20','\x20\x20•\x20使用兑换码:重新激活时选目标分组即可','readFileSync','\x20\x20说明','LLZOx','log','utf8','bCgKF','Gemini\x20CLI','XgxOU','skip-cli-tests','诊断连接并生成日志压缩包(发给客服排障)','已恢复:','【试运行模式\x20--dry-run】不会真实删除/恢复文件','gLJql','keys','total_ms','ACTIVATE_API_BASE','wsmlC','toOnx','DxkxZ','get','UuvOz','权限不足,无法删除\x20','IAKsO','MQUkV','string','cyan','duration_ms','sk-…','sort','xsvgD','match','dryRun','bNORP','.bak.reset.','将处理以下文件:','ttmOU','765459IKUrMM','4038055MQRXCa','HvfAp','~/.claude','lVQnX','cuKva','%userprofile%\x5c.codex\x5cauth.json','GfPtT','/cli-tests.jsonl','分组列表','定位\x202api.store\x20写入的配置','未发现\x202api.store\x20写入的配置文件(可能已\x20reset\x20或从未激活过)','无\x20HTTP\x20测试记录','从备份恢复\x20','并从最新备份恢复:','replace','将恢复\x20','find','mtime','endsWith','NioAw','57231nudMAI','未找到任何备份文件(reset\x20后这些文件将直接删除,无备份可恢复)','选择应用(回车=第一个)','Snlcu','fUYIv','split','parse','下一步:如需重新激活,运行\x20npx\x20@2api-store/activate','cfXaF','FZXUr','dry-run','已取消','ZOYOY','~/.claude/settings.json','查询到\x20','values','1930MQcHBG','sYFqO','rPRdk','--help','vCLmN','cli','name','existsSync','API\x20端点:','\x20\x20•\x20已有\x20API\x20Key\x20绑组:登录管理后台修改,或重新激活(npx\x20@2api-store/activate)','max','npx\x20@2api-store/activate\x20reset\x20[options]\x0a\x0a','JkSxG','\x20个\x202api.store\x20配置文件','已删除\x20','tMzGU','trim','copyFileSync','getMinutes','(可通过\x20--api-base\x20或\x20ACTIVATE_API_BASE\x20覆盖)','~/.gemini/settings.json','从最新备份恢复','已删除:','\x20\x20✓\x20','nqKIT','XmpLt','IToFJ','DjxNg','\x20|\x20','iZsfQ','QhVcV','uvBvs','IMrVn','npx\x20@2api-store/activate\x20diagnose\x20[options]\x0a\x0a','5397LloCcB','set','sdpkg','MbNzV','USERPROFILE','未找到任何备份文件(.bak.*)','ttfb_ms','💡\x20如需切换分组:','找到\x20','\x20\x20-\x20','\x20←\x20','ERR','--yes','http_tests','--dry-run','\x20个可用分组','HQnze','yellow','npx\x20@2api-store/activate\x20refresh-groups\x20[options]\x0a\x0a','%userprofile%\x5c.claude','inowj','EoHmr','诊断包已生成:','origPath','getMonth','3186rgElQo','push','安全备份当前文件','ccIdM','恢复失败:','GqXcF','未选择应用','pVMzf','sVlBV','选择要恢复的应用','model','ZMaIE','扫描目录:','YXYPi','todig','help','verdict','将对每个测试模型发送真实计费的小请求(max_tokens=1,每模型约几分钱),用于连通性实测','\x20个文件','WwSOH','from','getHours','jHXmG','skipCliTests','删除\x202api.store\x20配置','4072344tUVClu','supported','relative','EROFS','dqmYg','gOELy','180LKmFDJ','code','length','qSQPv','yes','tUVUT','\x20个备份文件','未选择时间点','选择时间点(回车=最新)','\x20个备份)','eOWAG','myNtm','EPERM','Fvpgg','env','--api-base','ThuUh','~/.gemini','VBMPA','ms/','获取分组失败:','~/.codex/config.toml','nEeMX','PAmXP','Cqqwl','map','basename','unlinkSync','查看可用分组(不改配置)','reset\x20报告','无可恢复的备份','DkLFe','将执行:','xPLln','slow','MBGVZ','~/.codex','version','\x20个文件):','ARoLR','JLnBk','共恢复\x20','%userprofile%\x5c.codex','apiBase','dOdij','Lzmzg','rAOEH','XjWZT','\x20→\x20','50613GIhKwS','wqthn','HOME','startsWith','已安全备份\x20','从备份恢复配置','zipPath','nTRBt','bakPath','MxqRr','MChhj','message','getSeconds','bold','join','getDate','toISOString','green','(请用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)','qrCnj','ZBQbX','\x20\x20exit\x20','out','dim','TVQxc','NSeEe','如需从备份恢复,请运行:npx\x20@2api-store/activate\x20restore','boruH','BBgsi','\x20\x20request_id','~/.codex/auth.json','144JgUsJp','mKzgM','model:','KEDRk','[试运行]\x20不真实恢复','安全备份:'];_0x4e67=function(){return _0x296c0b;};return _0x4e67();}import{writeFileWithPermission as _0x2975d6,PermissionDeniedError as _0x4ba144}from'./write.mjs';import{renderContent as _0x2d9268,expandPath as _0x5b5618,listModels as _0x20ebc7}from'./render.mjs';import{getCliMeta as _0x5ee762,isDefaultSelected as _0x25dba2}from'./platforms.mjs';import{detectAll as _0x375296}from'./detect.mjs';import{runDiagnose as _0x58947d}from'./diagnose.mjs';import{ask as _0x30a1d3,askSecret as _0x35231d,multiSelect as _0x47b223,select as _0x4929aa,confirm as _0x34f933,closePrompt as _0x3ced5f}from'./prompt.mjs';import{banner as _0x5e198b,ok as _0x3e1f02,fail as _0x4b9df4,warn as _0x183042,info as _0xb8bd2c,step as _0x24ea79,plain as _0x3861df,guide as _0x12c245,chalk as _0x2ee820}from'./ui.mjs';const C='https://2api.store',R=[_0x14467b(0x292),_0x14467b(0x1a2),_0x14467b(0x220),_0x14467b(0x237)],M=[_0x14467b(0x1ce),_0x14467b(0x204),_0x14467b(0x1aa),_0x14467b(0x1ca)],N=[_0x14467b(0x2a1),_0x14467b(0x201),_0x14467b(0x28e)],B=[_0x14467b(0x17d),_0x14467b(0x258),_0x14467b(0x1be)],H=new Set([_0x14467b(0x21d),_0x14467b(0x1e2)]);function K(_0x374a23){const _0x348009=_0x14467b;return _0x374a23[_0x348009(0x20d)](/-([a-z])/g,(_0x61f4d3,_0x56356e)=>_0x56356e[_0x348009(0x1d7)]());}function U(_0x24d0c9){const _0x42b780=_0x14467b,_0x5bf107={'qrCnj':function(_0x242569,_0x1fc1c4){return _0x242569<_0x1fc1c4;},'uvBvs':function(_0x3186f8,_0x46d51e){return _0x3186f8===_0x46d51e;},'XmpLt':_0x42b780(0x253),'QhVcV':function(_0x4e1fff,_0x31e7d9){return _0x4e1fff===_0x31e7d9;},'wqthn':_0x42b780(0x251),'boruH':function(_0x4f9cd8,_0x4e11f7){return _0x4f9cd8===_0x4e11f7;},'tmyIt':_0x42b780(0x28c),'inowj':function(_0x593c03,_0x14864f){return _0x593c03(_0x14864f);}},_0xa5e7a4={'dryRun':!0x1,'_':[]};for(let _0x2c4c0e=0x0;_0x5bf107[_0x42b780(0x197)](_0x2c4c0e,_0x24d0c9[_0x42b780(0x27f)]);_0x2c4c0e++){const _0x3d96c2=_0x24d0c9[_0x2c4c0e];if(_0x5bf107['uvBvs'](_0x5bf107[_0x42b780(0x23c)],_0x3d96c2)||_0x5bf107[_0x42b780(0x241)]('-n',_0x3d96c2))_0xa5e7a4[_0x42b780(0x1f9)]=!0x0;else{if(_0x5bf107['QhVcV'](_0x5bf107[_0x42b780(0x185)],_0x3d96c2)||_0x5bf107[_0x42b780(0x19f)]('-y',_0x3d96c2))_0xa5e7a4['yes']=!0x0;else{if(_0x5bf107[_0x42b780(0x241)](_0x5bf107['tmyIt'],_0x3d96c2))_0xa5e7a4[_0x42b780(0x17e)]=_0x24d0c9[++_0x2c4c0e];else{if(_0x5bf107[_0x42b780(0x242)](_0x42b780(0x226),_0x3d96c2)||_0x5bf107[_0x42b780(0x19f)]('-h',_0x3d96c2))_0xa5e7a4[_0x42b780(0x26d)]=!0x0;else{if(_0x3d96c2[_0x42b780(0x187)]('--')&&_0x3d96c2['includes']('=')){const [_0x51ff97,_0x145864]=_0x3d96c2[_0x42b780(0x1bb)](0x2)[_0x42b780(0x218)](/=(.*)/,0x2);H[_0x42b780(0x1ba)](_0x51ff97)?_0xa5e7a4[_0x5bf107[_0x42b780(0x259)](K,_0x51ff97)]=!0x0:_0xa5e7a4[_0x51ff97]=_0x145864;}else{if(_0x3d96c2[_0x42b780(0x187)]('--')){const _0x337dfc=_0x3d96c2[_0x42b780(0x20d)](/^--/,'');H[_0x42b780(0x1ba)](_0x337dfc)?_0xa5e7a4[_0x5bf107[_0x42b780(0x259)](K,_0x337dfc)]=!0x0:_0xa5e7a4[_0x337dfc]=_0x24d0c9[++_0x2c4c0e];}else _0xa5e7a4['_'][_0x42b780(0x25f)](_0x3d96c2);}}}}}}return _0xa5e7a4;}function D(_0x5f0ff1,_0x3e8ac7){const _0x5cc410=_0x14467b,_0x3cf1cb={'bCgKF':function(_0x3e83f3,_0x44e407,_0x5a14d4){return _0x3e83f3(_0x44e407,_0x5a14d4);}};return _0x3cf1cb[_0x5cc410(0x1df)](_0x5b5618,_0x5f0ff1,{'isWindows':_0x3e8ac7});}function W(_0x3a7e23){const _0x425da3=_0x14467b;return(_0x3a7e23?B:N)[_0x425da3(0x296)](_0x33cd68=>D(_0x33cd68,_0x3a7e23));}const z='\x0a子命令:\x0a\x20\x20restore\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20从备份恢复(扫描\x20~/.codex\x20/\x20~/.claude\x20/\x20~/.gemini\x20下的\x20.bak.*\x20文件)\x0a\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20恢复官方默认(删\x202api.store\x20写入的配置,并从最新备份恢复)\x0a\x20\x20refresh-groups\x20\x20\x20刷新分组列表(只展示,不改\x20key/配置)\x0a\x20\x20diagnose\x20\x20\x20\x20\x20\x20\x20\x20\x20诊断连接并生成日志压缩包(环境收集+渠道实测+CLI实测,发给客服排障)\x0a\x0a所有子命令都支持\x20--api-base\x20<url>\x20覆盖端点,restore/reset\x20支持\x20--dry-run。\x0a'[_0x14467b(0x233)]();function F(_0x39af14){const _0xd3add6=_0x14467b,_0x2638dc={'yWKkr':function(_0x5e3cf9,_0x5cd2fe){return _0x5e3cf9<_0x5cd2fe;},'xAiMB':function(_0x397160,_0x4f4289){return _0x397160!=_0x4f4289;},'MQOgg':function(_0x19d537,_0x463e21){return _0x19d537>_0x463e21;},'sdpkg':'slow','EoHmr':_0xd3add6(0x1c1)};return _0x39af14[_0xd3add6(0x1d4)]>=0xc8&&_0x2638dc['yWKkr'](_0x39af14['status'],0x12c)?_0x2638dc['xAiMB'](null,_0x39af14[_0xd3add6(0x24b)])&&_0x2638dc['MQOgg'](_0x39af14[_0xd3add6(0x24b)],0x2710)?_0x2638dc[_0xd3add6(0x247)]:'ok':_0x2638dc[_0xd3add6(0x25a)];}function _0x8873(_0x31e5bc,_0x4890f0){_0x31e5bc=_0x31e5bc-0x178;const _0x4e67c8=_0x4e67();let _0x887319=_0x4e67c8[_0x31e5bc];return _0x887319;}function Y({zipPath:_0x317faa,summary:_0x33315c}){const _0x4cff57=_0x14467b,_0x109134={'DkLFe':function(_0x20be85,_0x14d0f1){return _0x20be85(_0x14d0f1);},'JLnBk':function(_0x4f252c,_0x244b51){return _0x4f252c(_0x244b51);},'GfPtT':function(_0x2d5239,_0x1f4f13){return _0x2d5239>_0x1f4f13;},'Asjtw':'ttfb/总延迟','jHXmG':function(_0x234aec,_0x22c237){return _0x234aec(_0x22c237);},'RxrHL':function(_0x41e532,_0x181b1c){return _0x41e532===_0x181b1c;},'QZoKg':function(_0x242476,_0x2a5e22){return _0x242476===_0x2a5e22;},'TVQxc':_0x4cff57(0x29f),'KEDRk':function(_0x3fccd6,_0xda621a){return _0x3fccd6(_0xda621a);},'HQnze':_0x4cff57(0x250),'GqXcF':_0x4cff57(0x20a),'NAxPC':function(_0x292e06,_0x78940c){return _0x292e06(_0x78940c);},'FZXUr':function(_0x28b5d7,_0x4b147d){return _0x28b5d7!=_0x4b147d;}};console[_0x4cff57(0x1dd)](),_0x109134[_0x4cff57(0x17b)](_0x24ea79,'诊断摘要');const _0x11164c=Array[_0x4cff57(0x1b6)](_0x33315c[_0x4cff57(0x252)])?_0x33315c[_0x4cff57(0x252)]:[];if(_0x109134[_0x4cff57(0x205)](_0x11164c[_0x4cff57(0x27f)],0x0)){const _0x16ab8d=Math['max'](0x6,..._0x11164c[_0x4cff57(0x296)](_0x3947fb=>String(_0x3947fb['model'])[_0x4cff57(0x27f)])),_0x320e72=Math['max'](0x6,..._0x11164c[_0x4cff57(0x296)](_0x14492c=>String(_0x14492c[_0x4cff57(0x26e)]??'-')[_0x4cff57(0x27f)]));_0x109134[_0x4cff57(0x17b)](_0x3861df,_0x2ee820['bold']['cyan']('\x20\x20'+'模型'[_0x4cff57(0x1b0)](_0x16ab8d)+'\x20\x20'+'判定'['padEnd'](_0x320e72)+'\x20\x20'+'状态'[_0x4cff57(0x1b0)](0x6)+'\x20\x20'+_0x109134['Asjtw'][_0x4cff57(0x1b0)](0x12)+_0x4cff57(0x1a1)));for(const _0x199ece of _0x11164c){const _0xb65fa3=_0x109134[_0x4cff57(0x274)](F,_0x199ece),_0x1309b9=String(_0x199ece['verdict']??'-')[_0x4cff57(0x1b0)](_0x320e72),_0x350aee=_0x109134[_0x4cff57(0x1b4)]('ok',_0xb65fa3)?_0x2ee820[_0x4cff57(0x195)](_0x1309b9):_0x109134[_0x4cff57(0x1b9)](_0x109134[_0x4cff57(0x19c)],_0xb65fa3)?_0x2ee820[_0x4cff57(0x256)](_0x1309b9):_0x2ee820['red'](_0x1309b9),_0x5c641a=(_0x199ece['ttfb_ms']??'-')+_0x4cff57(0x290)+(_0x199ece[_0x4cff57(0x1e8)]??'-')+'ms';_0x109134[_0x4cff57(0x1a6)](_0x3861df,'\x20\x20'+_0x109134[_0x4cff57(0x17b)](String,_0x199ece['model'])['padEnd'](_0x16ab8d)+'\x20\x20'+_0x350aee+'\x20\x20'+String(_0x199ece[_0x4cff57(0x1d4)]??_0x109134[_0x4cff57(0x255)])[_0x4cff57(0x1b0)](0x6)+'\x20\x20'+_0x5c641a[_0x4cff57(0x1b0)](0x12)+'\x20\x20'+(_0x199ece['request_id']??'-'));}}else _0x109134[_0x4cff57(0x17b)](_0xb8bd2c,_0x109134[_0x4cff57(0x263)]);const _0x52ee79=Array[_0x4cff57(0x1b6)](_0x33315c['cli_tests'])?_0x33315c['cli_tests']:[];if(_0x109134[_0x4cff57(0x205)](_0x52ee79[_0x4cff57(0x27f)],0x0)){const _0x3b5085=function(_0x4dfabe){const _0x3e0376=_0x4cff57,_0x46691a={};try{const _0x84abf0=_0x109134[_0x3e0376(0x29c)](_0x5b8abe,new Uint8Array(_0x178e02[_0x3e0376(0x1da)](_0x4dfabe))),_0x5b7cae=Object[_0x3e0376(0x1e7)](_0x84abf0)[_0x3e0376(0x20f)](_0x41601a=>_0x41601a[_0x3e0376(0x211)](_0x3e0376(0x206)));if(!_0x5b7cae)return _0x46691a;for(const _0x18decc of Buffer[_0x3e0376(0x272)](_0x84abf0[_0x5b7cae])['toString'](_0x3e0376(0x1de))['split']('\x0a'))if(_0x18decc[_0x3e0376(0x233)]())try{const _0x174a22=JSON[_0x3e0376(0x219)](_0x18decc);_0x174a22&&_0x174a22['cli']&&(_0x46691a[_0x174a22[_0x3e0376(0x228)]]=_0x174a22[_0x3e0376(0x1f4)]);}catch{}}catch{}return _0x46691a;}(_0x317faa),_0x1090d0=Math[_0x4cff57(0x22d)](0x6,..._0x52ee79[_0x4cff57(0x296)](_0x5a9a97=>String(_0x5a9a97['cli'])[_0x4cff57(0x27f)]));for(const _0x204c2e of _0x52ee79){const _0x2c3f57=_0x109134[_0x4cff57(0x1bc)](String,_0x204c2e[_0x4cff57(0x26e)]??'-'),_0x405b9b=_0x109134[_0x4cff57(0x1b4)]('ok',_0x2c3f57)?_0x2ee820[_0x4cff57(0x195)](_0x2c3f57):_0x2ee820['red'](_0x2c3f57),_0x5c39de=_0x109134[_0x4cff57(0x21c)](null,_0x3b5085[_0x204c2e[_0x4cff57(0x228)]])?_0x3b5085[_0x204c2e[_0x4cff57(0x228)]]+'ms':'-';_0x109134['KEDRk'](_0x3861df,'\x20\x20'+_0x109134[_0x4cff57(0x274)](String,_0x204c2e[_0x4cff57(0x228)])[_0x4cff57(0x1b0)](_0x1090d0)+'\x20\x20'+_0x405b9b[_0x4cff57(0x1b0)](0x6)+_0x4cff57(0x199)+(_0x204c2e['exit_code']??_0x4cff57(0x250))+'\x20\x20'+_0x5c39de);}}}export const SUBCOMMANDS={'restore':{'handler':async function(_0x5793c3){const _0x488961=_0x14467b,_0x3cd903={'pVMzf':function(_0x2f715a,_0x32de2b){return _0x2f715a(_0x32de2b);},'fUYIv':'dummy','rAOEH':function(_0x4a8f63,_0x14e2fb){return _0x4a8f63(_0x14e2fb);},'UuvOz':function(_0x5c778a,_0x499c9f){return _0x5c778a>_0x499c9f;},'jxmSW':_0x488961(0x23f),'ccIdM':function(_0x16601d){return _0x16601d();},'DjxNg':function(_0x3872eb,_0x19a9b5){return _0x3872eb(_0x19a9b5);},'JkSxG':function(_0x431d5a,_0x4a7347){return _0x431d5a(_0x4a7347);},'rPRdk':'扫描备份文件','qSQPv':function(_0x24d6f9,_0x1a2c9b){return _0x24d6f9(_0x1a2c9b);},'HhsKh':'【试运行模式\x20--dry-run】不会真实恢复文件','tMzGU':function(_0x353e04,_0x563f92){return _0x353e04===_0x563f92;},'LLZOx':function(_0x33f90b,_0x487db8){return _0x33f90b(_0x487db8);},'gcmtQ':_0x488961(0x1e0),'ZOYOY':function(_0x41cd41,_0x320737){return _0x41cd41(_0x320737);},'CwRMb':function(_0x240d2a,_0x336abf){return _0x240d2a(_0x336abf);},'vKjoa':_0x488961(0x29b),'GHRMt':function(_0x2258b3,_0xcf8611){return _0x2258b3(_0xcf8611);},'NioAw':_0x488961(0x267),'IToFJ':function(_0x2691d5,_0x2d02ef,_0x435bba,_0x3850d3){return _0x2691d5(_0x2d02ef,_0x435bba,_0x3850d3);},'ThuUh':_0x488961(0x215),'mKzgM':function(_0x4d7d5c,_0x3550a2){return _0x4d7d5c>=_0x3550a2;},'NSeEe':_0x488961(0x264),'MDYuS':function(_0x4270d8,_0x4b04d4){return _0x4270d8<_0x4b04d4;},'IAKsO':function(_0x9f793c,_0x2453bf){return _0x9f793c>=_0x2453bf;},'vcoQy':function(_0x3efe94,_0x110d07){return _0x3efe94(_0x110d07);},'Cqqwl':_0x488961(0x284),'VuYWb':_0x488961(0x1a7),'Logiu':function(_0x17b454,_0xe1a508){return _0x17b454(_0xe1a508);},'ARoLR':function(_0x342420,_0x187d51){return _0x342420(_0x187d51);}},_0x1c19a8=_0x3cd903['pVMzf'](U,_0x5793c3);if(_0x1c19a8['help'])return console['log']('npx\x20@2api-store/activate\x20restore\x20[options]\x0a\x0a'+z),0x0;_0x5e198b();const _0x501cf3=_0x3cd903[_0x488961(0x261)](_0x375296);if(!_0x501cf3[_0x488961(0x1d1)][_0x488961(0x278)])return _0x3cd903[_0x488961(0x23e)](_0x4b9df4,_0x488961(0x1b3)+_0x501cf3[_0x488961(0x1d1)][_0x488961(0x178)]),0x1;_0x3cd903[_0x488961(0x22f)](_0x24ea79,_0x3cd903[_0x488961(0x225)]);const _0x4777fa=_0x3cd903['pVMzf'](W,_0x501cf3['os'][_0x488961(0x1c0)]);_0x1c19a8[_0x488961(0x1f9)]&&_0x3cd903['qSQPv'](_0x183042,_0x3cd903['HhsKh']),_0x3cd903[_0x488961(0x280)](_0xb8bd2c,_0x488961(0x26a)+_0x4777fa[_0x488961(0x192)](',\x20'));const _0x13eab6=_0x3cd903[_0x488961(0x181)](_0x167215,_0x4777fa);if(_0x3cd903['tMzGU'](0x0,_0x13eab6[_0x488961(0x27f)]))return _0x3cd903['qSQPv'](_0xb8bd2c,_0x488961(0x24a)),_0x3cd903[_0x488961(0x22f)](_0xb8bd2c,'提示:只有运行过\x20npx\x20@2api-store/activate\x20后才会产生备份文件'),0x0;_0x3cd903['LLZOx'](_0x3e1f02,_0x488961(0x24d)+_0x13eab6[_0x488961(0x27f)]+_0x488961(0x283));const _0x14fed5={'.codex':'Codex\x20CLI','.claude':_0x488961(0x1af),'.gemini':_0x3cd903['gcmtQ']};function _0x5692fe(_0x14a4d3){const _0x3adbe2=_0x488961,_0xd88c69=process[_0x3adbe2(0x28b)][_0x3adbe2(0x186)]||process[_0x3adbe2(0x28b)][_0x3adbe2(0x249)]||'',_0x4fc9af=_0x2a326f[_0x3adbe2(0x279)](_0xd88c69,_0x14a4d3)['replace'](/\\/g,'/')[_0x3adbe2(0x218)]('/')[0x0];return _0x14fed5[_0x4fc9af]||_0x4fc9af;}function _0x44aec7(_0x32ac83){const _0x2395ba=_0x488961;return process[_0x2395ba(0x28b)][_0x2395ba(0x186)]||process[_0x2395ba(0x28b)][_0x2395ba(0x249)],_0x2a326f[_0x2395ba(0x1b1)](_0x32ac83);}const _0x12c22a={};for(const _0x2f0531 of _0x13eab6){const _0x345114=_0x3cd903[_0x488961(0x21f)](_0x44aec7,_0x2f0531[_0x488961(0x25c)]);_0x12c22a[_0x345114]||(_0x12c22a[_0x345114]=[]),_0x12c22a[_0x345114]['push'](_0x2f0531);}const _0x23072b=Object['keys'](_0x12c22a);if(_0x3cd903[_0x488961(0x232)](0x0,_0x23072b[_0x488961(0x27f)]))return _0x3cd903['CwRMb'](_0xb8bd2c,_0x3cd903[_0x488961(0x1ae)]),0x0;console['log'](),_0x3cd903['GHRMt'](_0x24ea79,_0x3cd903[_0x488961(0x212)]);const _0x1ec464=_0x23072b[_0x488961(0x296)](_0x379045=>{const _0x6c0073=_0x488961,_0x7381e3=_0x3cd903[_0x6c0073(0x265)](_0x5692fe,_0x2a326f['join'](_0x379045,_0x3cd903[_0x6c0073(0x217)])),_0x4fd3d3=_0x12c22a[_0x379045][_0x6c0073(0x27f)];return{'label':_0x2ee820[_0x6c0073(0x1f3)](_0x7381e3)+'('+_0x4fd3d3+_0x6c0073(0x286),'dir':_0x379045};}),_0x5469ad=await _0x3cd903[_0x488961(0x23d)](_0x4929aa,_0x3cd903[_0x488961(0x28d)],_0x1ec464,{'defaultIndex':0x0});if(_0x5469ad<0x0||_0x3cd903[_0x488961(0x1a4)](_0x5469ad,_0x1ec464[_0x488961(0x27f)]))return _0x4b9df4(_0x3cd903[_0x488961(0x19d)]),0x1;const _0x50cc00=_0x1ec464[_0x5469ad]['dir'],_0xa7efe7=_0x5692fe(_0x2a326f['join'](_0x50cc00,_0x3cd903[_0x488961(0x217)])),_0x36013d=_0x12c22a[_0x50cc00][_0x488961(0x1f6)]((_0x1dea72,_0x347868)=>_0x347868['mtime']-_0x1dea72[_0x488961(0x210)]),_0x2a0e1b={},_0x2ec879=[];for(const _0x5f0079 of _0x36013d){const _0x1dca6b=_0x2a326f['basename'](_0x5f0079[_0x488961(0x18c)])['match'](/\.bak\.(.+)$/),_0x5adeba=(_0x1dca6b?_0x1dca6b[0x1]:'')[_0x488961(0x20d)](/-\d{3}Z$/,'Z');_0x2a0e1b[_0x5adeba]||(_0x2a0e1b[_0x5adeba]=[],_0x2ec879['push'](_0x5adeba)),_0x2a0e1b[_0x5adeba]['push'](_0x5f0079);}for(const _0x5787eb of _0x2ec879){const _0x569a51=_0x2a0e1b[_0x5787eb],_0x59da8c={};for(const _0x23fcdc of _0x569a51)(!_0x59da8c[_0x23fcdc['origPath']]||_0x3cd903[_0x488961(0x1ee)](_0x23fcdc[_0x488961(0x210)],_0x59da8c[_0x23fcdc[_0x488961(0x25c)]][_0x488961(0x210)]))&&(_0x59da8c[_0x23fcdc[_0x488961(0x25c)]]=_0x23fcdc);_0x2a0e1b[_0x5787eb]=Object[_0x488961(0x222)](_0x59da8c)['sort']((_0x517991,_0x3fd60b)=>_0x3fd60b[_0x488961(0x210)]-_0x517991[_0x488961(0x210)]);}console[_0x488961(0x1dd)](),_0x24ea79('选择恢复时间点('+_0xa7efe7+')');const _0x30d97d=_0x2ec879['map'](_0x2ce40e=>{const _0x20473f=_0x488961,_0x2803b7=_0x2a0e1b[_0x2ce40e],_0x4db038=_0x2803b7[_0x20473f(0x296)](_0x2c8b08=>_0x2a326f[_0x20473f(0x297)](_0x2c8b08[_0x20473f(0x25c)]))[_0x20473f(0x192)](',\x20'),_0xda0d3f=function(_0x1aae5a){const _0x1c9ffd=_0x20473f;try{const _0x5b8cd6=new Date(_0x1aae5a),_0x2f4b2d=_0x46c710=>String(_0x46c710)['padStart'](0x2,'0');return _0x5b8cd6[_0x1c9ffd(0x1d3)]()+'-'+_0x3cd903['pVMzf'](_0x2f4b2d,_0x5b8cd6[_0x1c9ffd(0x25d)]()+0x1)+'-'+_0x2f4b2d(_0x5b8cd6[_0x1c9ffd(0x193)]())+'\x20'+_0x3cd903[_0x1c9ffd(0x181)](_0x2f4b2d,_0x5b8cd6[_0x1c9ffd(0x273)]())+':'+_0x2f4b2d(_0x5b8cd6[_0x1c9ffd(0x235)]())+':'+_0x2f4b2d(_0x5b8cd6[_0x1c9ffd(0x190)]());}catch{return new Date(_0x1aae5a)[_0x1c9ffd(0x194)]();}}(_0x2803b7[0x0][_0x20473f(0x210)]),_0xf31900=[];for(const _0xae94b1 of _0x2803b7)try{const _0x5198da=_0x178e02[_0x20473f(0x1da)](_0xae94b1[_0x20473f(0x18c)],_0x20473f(0x1de));if(!_0xf31900['find'](_0x7a6038=>_0x7a6038[_0x20473f(0x1b2)]('…'))){const _0x9190fe=_0x5198da[_0x20473f(0x1f8)](/sk-([a-zA-Z0-9]{10,})/);if(_0x9190fe)_0xf31900[_0x20473f(0x25f)](_0x20473f(0x1f5)+_0x9190fe[0x1][_0x20473f(0x1bb)](-0x6));else{const _0x19539d=_0x5198da[_0x20473f(0x1f8)](/(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["']([a-zA-Z0-9._-]{10,})["']/);if(_0x19539d)_0xf31900['push'](_0x20473f(0x1cd)+_0x19539d[0x1][_0x20473f(0x1bb)](-0x6));else{const _0x27ff6f=_0x5198da[_0x20473f(0x1f8)](/export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?)([a-zA-Z0-9._-]{10,})/);_0x27ff6f&&_0xf31900[_0x20473f(0x25f)](_0x20473f(0x1cd)+_0x27ff6f[0x2][_0x20473f(0x1bb)](-0x6));}}}if(!_0xf31900[_0x20473f(0x20f)](_0x2d5154=>_0x2d5154[_0x20473f(0x187)]('http'))){const _0x1877cf=_0x5198da[_0x20473f(0x1f8)](/(https?:\/\/[^\s"'`}]+)/);_0x1877cf&&_0xf31900[_0x20473f(0x25f)](_0x1877cf[0x1][_0x20473f(0x20d)](/\/+$/,''));}if(!_0xf31900[_0x20473f(0x20f)](_0x8d2d02=>_0x8d2d02[_0x20473f(0x187)](_0x20473f(0x268)))){const _0x521440=_0x5198da[_0x20473f(0x1f8)](/(?:^|\n)\s*model\s*[=:]\s*["']?([a-zA-Z0-9][\w.-]+)/);_0x521440&&_0xf31900[_0x20473f(0x25f)](_0x20473f(0x1a5)+_0x521440[0x1]);}}catch{}const _0x5c19f5=_0x3cd903[_0x20473f(0x1ee)](_0xf31900[_0x20473f(0x27f)],0x0)?'\x20'+_0x2ee820['yellow'](_0xf31900[_0x20473f(0x192)](_0x3cd903['jxmSW'])):'';return{'label':_0x2ee820[_0x20473f(0x19b)](_0xda0d3f)+'('+_0x2803b7[_0x20473f(0x27f)]+_0x20473f(0x1cf)+_0x4db038+')'+_0x5c19f5,'ts':_0x2ce40e,'group':_0x2803b7};}),_0x523eb0=await _0x3cd903[_0x488961(0x23d)](_0x4929aa,_0x488961(0x285),_0x30d97d,{'defaultIndex':0x0});if(_0x3cd903[_0x488961(0x1c9)](_0x523eb0,0x0)||_0x3cd903[_0x488961(0x1f0)](_0x523eb0,_0x30d97d[_0x488961(0x27f)]))return _0x3cd903[_0x488961(0x1c6)](_0x4b9df4,_0x3cd903[_0x488961(0x295)]),0x1;const _0x1c72c6=_0x30d97d[_0x523eb0][_0x488961(0x1c4)];console['log'](),_0xb8bd2c(_0x488961(0x20e)+_0xa7efe7+'('+_0x1c72c6[_0x488961(0x27f)]+_0x488961(0x179));for(const _0x248119 of _0x1c72c6)_0x3cd903[_0x488961(0x22f)](_0xb8bd2c,'\x20\x20'+_0x2a326f[_0x488961(0x297)](_0x248119[_0x488961(0x25c)])+_0x488961(0x24f)+_0x2a326f[_0x488961(0x297)](_0x248119[_0x488961(0x18c)]));if(_0x1c19a8[_0x488961(0x1f9)])return _0x3cd903['DjxNg'](_0x183042,_0x3cd903[_0x488961(0x1d0)]),0x0;let _0x594706=0x0;for(const _0x32e7ca of _0x1c72c6){if(_0x178e02[_0x488961(0x22a)](_0x32e7ca['origPath']))try{const _0x5db09a=_0x3cd903[_0x488961(0x1b5)](_0xdaa780,_0x32e7ca[_0x488961(0x25c)]);_0x5db09a&&_0x3cd903[_0x488961(0x17a)](_0xb8bd2c,_0x488961(0x1a8)+_0x2a326f[_0x488961(0x297)](_0x32e7ca['origPath'])+_0x488961(0x183)+_0x2a326f['basename'](_0x5db09a));}catch{}try{_0x49bc65(_0x32e7ca[_0x488961(0x18c)],_0x32e7ca[_0x488961(0x25c)]),_0x3cd903[_0x488961(0x1dc)](_0x3e1f02,_0x488961(0x1e4)+_0x32e7ca[_0x488961(0x25c)]),_0x594706++;}catch(_0x366df1){_0x3cd903[_0x488961(0x23e)](_0x4b9df4,_0x488961(0x262)+_0x32e7ca[_0x488961(0x25c)]+'('+_0x366df1[_0x488961(0x18f)]+')');}}return _0xb8bd2c(_0x488961(0x17c)+_0x594706+_0x488961(0x270)),_0x594706>0x0?0x0:0x3;},'description':_0x14467b(0x189)},'reset':{'handler':async function(_0x321110){const _0x180588=_0x14467b,_0x1d5056={'dOdij':function(_0x8b08aa){return _0x8b08aa();},'xPLln':function(_0x4fc72a,_0x439f17){return _0x4fc72a(_0x439f17);},'YXYPi':_0x180588(0x208),'lVQnX':function(_0x4e1952,_0x278717){return _0x4e1952===_0x278717;},'xsvgD':function(_0x40d866,_0x567a9e){return _0x40d866(_0x567a9e);},'vCLmN':_0x180588(0x209),'SBztY':_0x180588(0x19e),'nqKIT':_0x180588(0x1fc),'gLJql':function(_0x466eff,_0x48e5a8){return _0x466eff>_0x48e5a8;},'PAmXP':_0x180588(0x214),'MChhj':'确认操作','toOnx':_0x180588(0x1ad),'ttmOU':'\x20\x20\x20删除前会再备份一次(.bak.reset.<时间戳>),可手动恢复。','bNORP':function(_0x1d483f,_0x5264ef,_0x5999bb){return _0x1d483f(_0x5264ef,_0x5999bb);},'tUVUT':'确认\x20reset\x20吗?','wleBX':function(_0x225b8a,_0x43a60e){return _0x225b8a(_0x43a60e);},'lguyK':_0x180588(0x1e5),'IMrVn':function(_0x1132e6,_0x300b18){return _0x1132e6(_0x300b18);},'MBGVZ':_0x180588(0x29d),'nTRBt':function(_0x1fb877,_0x39f1ba){return _0x1fb877(_0x39f1ba);},'rpdfi':function(_0x507fd9,_0x196cc6){return _0x507fd9>_0x196cc6;},'cejBd':function(_0x5b7ead,_0x4ee541){return _0x5b7ead(_0x4ee541);},'XgxOU':_0x180588(0x260),'cuKva':function(_0xdd602b,_0x22486b){return _0xdd602b(_0x22486b);},'WwSOH':function(_0x15681c,_0xf76bbc){return _0x15681c(_0xf76bbc);},'eOWAG':function(_0x4eb90f,_0x24aed4){return _0x4eb90f>_0x24aed4;},'MxqRr':_0x180588(0x276),'UPoTW':function(_0x1d3d70,_0x5909df){return _0x1d3d70(_0x5909df);},'BBgsi':_0x180588(0x1ab),'Lzmzg':function(_0x1d4866,_0x1b9bc1){return _0x1d4866===_0x1b9bc1;},'VBMPA':_0x180588(0x289),'iPPAa':function(_0x370c8c,_0x5c582c){return _0x370c8c===_0x5c582c;},'sYFqO':function(_0x191388,_0x3d6fa5){return _0x191388(_0x3d6fa5);},'nEeMX':_0x180588(0x238),'dqmYg':function(_0x1f6aa7,_0x173bb4){return _0x1f6aa7(_0x173bb4);},'ZBQbX':_0x180588(0x29a),'iHrDl':'安全备份位置(如需撤销\x20reset,手动恢复这些文件):','todig':_0x180588(0x21a)},_0xefe07c=U(_0x321110);if(_0xefe07c[_0x180588(0x26d)])return console[_0x180588(0x1dd)](_0x180588(0x22e)+z),0x0;_0x1d5056[_0x180588(0x17f)](_0x5e198b);const _0x426773=_0x375296();if(!_0x426773[_0x180588(0x1d1)][_0x180588(0x278)])return _0x1d5056['xPLln'](_0x4b9df4,'需要\x20node\x20>=\x2018,当前\x20'+_0x426773[_0x180588(0x1d1)]['version']),0x1;var _0x3f82b2;_0x24ea79(_0x1d5056[_0x180588(0x26b)]);const _0x2fc239=((_0x3f82b2=_0x426773['os']['isWindows'])?M:R)[_0x180588(0x296)](_0x6d051f=>D(_0x6d051f,_0x3f82b2))['filter'](_0x3b227f=>{const _0x319eda=_0x180588;try{return _0x178e02[_0x319eda(0x22a)](_0x3b227f);}catch{return!0x1;}});if(_0x1d5056[_0x180588(0x202)](0x0,_0x2fc239[_0x180588(0x27f)]))return _0x1d5056[_0x180588(0x1f7)](_0x183042,_0x1d5056[_0x180588(0x227)]),_0x1d5056['xPLln'](_0xb8bd2c,_0x1d5056['SBztY']),0x0;_0xb8bd2c(_0x1d5056[_0x180588(0x23b)]),_0x2fc239[_0x180588(0x1b8)](_0x2699da=>_0x3861df(_0x180588(0x24e)+_0x2ee820[_0x180588(0x256)](_0x2699da))),console[_0x180588(0x1dd)]();const _0x2cc13a=W(_0x426773['os'][_0x180588(0x1c0)]),_0xce75b5=_0x1d5056[_0x180588(0x29e)](_0x167215,_0x2cc13a),_0x17192a=_0x1d5056['gLJql'](_0xce75b5[_0x180588(0x27f)],0x0);if(_0x17192a?_0x3e1f02('发现\x20'+_0xce75b5[_0x180588(0x27f)]+'\x20个备份文件(reset\x20后将尝试恢复每个配置的最新备份)'):_0x183042(_0x1d5056[_0x180588(0x294)]),console[_0x180588(0x1dd)](),_0x24ea79(_0x1d5056[_0x180588(0x18e)]),_0x1d5056[_0x180588(0x29e)](_0x183042,_0x1d5056[_0x180588(0x1eb)]),_0x183042(_0x1d5056[_0x180588(0x1fd)]),!await _0x1d5056[_0x180588(0x1fa)](_0x34f933,_0x1d5056[_0x180588(0x282)],{'defaultValue':!0x1}))return _0x3861df(_0x180588(0x21e)),0x0;if(console['log'](),_0xefe07c[_0x180588(0x1f9)])return _0x1d5056['wleBX'](_0x183042,_0x1d5056['lguyK']),_0x1d5056[_0x180588(0x243)](_0xb8bd2c,_0x1d5056[_0x180588(0x2a0)]),_0x2fc239[_0x180588(0x1b8)](_0x7a7b85=>_0x3861df('\x20\x20-\x20删除\x20'+_0x7a7b85)),_0x17192a&&(_0x1d5056[_0x180588(0x18b)](_0xb8bd2c,_0x180588(0x20c)),_0xce75b5[_0x180588(0x1bb)](0x0,0x5)[_0x180588(0x1b8)](_0x4d345a=>_0x3861df(_0x180588(0x24e)+_0x4d345a[_0x180588(0x18c)]+_0x180588(0x183)+_0x4d345a[_0x180588(0x25c)])),_0x1d5056['rpdfi'](_0xce75b5[_0x180588(0x27f)],0x5)&&_0x3861df(_0x180588(0x1d8)+_0xce75b5[_0x180588(0x27f)]+_0x180588(0x286))),0x0;_0x1d5056['cejBd'](_0x24ea79,_0x1d5056[_0x180588(0x1e1)]);const _0x37b151=[];for(const _0x41ad42 of _0x2fc239)try{const _0x99eac6=_0x41ad42+_0x180588(0x1fb)+new Date()[_0x180588(0x194)]()[_0x180588(0x20d)](/[:.]/g,'-');_0x178e02[_0x180588(0x234)](_0x41ad42,_0x99eac6),_0x37b151['push'](_0x99eac6),_0x1d5056['cuKva'](_0x3861df,_0x180588(0x23a)+_0x41ad42+_0x180588(0x183)+_0x99eac6);}catch(_0x3fb554){_0x1d5056[_0x180588(0x271)](_0x4b9df4,'安全备份失败\x20'+_0x41ad42+':'+_0x3fb554[_0x180588(0x18f)]+_0x180588(0x1d5));}_0x1d5056[_0x180588(0x287)](_0x37b151['length'],0x0)&&_0x1d5056['cejBd'](_0x3e1f02,_0x180588(0x188)+_0x37b151['length']+_0x180588(0x270)),console[_0x180588(0x1dd)](),_0x24ea79(_0x1d5056[_0x180588(0x18d)]);const _0x52a2e2=[];for(const _0x533e15 of _0x2fc239)try{_0x178e02[_0x180588(0x298)](_0x533e15),_0x1d5056['UPoTW'](_0x3e1f02,_0x180588(0x239)+_0x533e15),_0x52a2e2[_0x180588(0x25f)](_0x533e15);}catch(_0x1c91ca){_0x1d5056['lVQnX'](_0x1d5056[_0x180588(0x1a0)],_0x1c91ca[_0x180588(0x27e)])||_0x1d5056[_0x180588(0x180)](_0x1d5056[_0x180588(0x28f)],_0x1c91ca['code'])||_0x1d5056['iPPAa'](_0x180588(0x27a),_0x1c91ca[_0x180588(0x27e)])?_0x4b9df4(_0x180588(0x1ef)+_0x533e15+_0x180588(0x196)):_0x1d5056[_0x180588(0x224)](_0x4b9df4,'删除失败\x20'+_0x533e15+':'+_0x1c91ca[_0x180588(0x18f)]);}if(console[_0x180588(0x1dd)](),_0x17192a){_0x1d5056[_0x180588(0x203)](_0x24ea79,_0x1d5056[_0x180588(0x293)]);const _0x59c641=new Map();for(const _0x2b47a1 of _0xce75b5){const _0x46bbaa=_0x59c641[_0x180588(0x1ed)](_0x2b47a1[_0x180588(0x25c)]);(!_0x46bbaa||_0x1d5056[_0x180588(0x1e6)](_0x2b47a1[_0x180588(0x210)],_0x46bbaa[_0x180588(0x210)]))&&_0x59c641[_0x180588(0x246)](_0x2b47a1['origPath'],_0x2b47a1);}let _0x418a28=0x0;for(const [_0x4ffa0f,_0x57ecd1]of _0x59c641)try{_0x1d5056[_0x180588(0x1fa)](_0x49bc65,_0x57ecd1[_0x180588(0x18c)],_0x4ffa0f),_0x1d5056[_0x180588(0x27b)](_0x3e1f02,'已恢复:'+_0x57ecd1[_0x180588(0x18c)]+'\x20→\x20'+_0x4ffa0f),_0x418a28++;}catch(_0x1bbec1){_0x183042('恢复失败\x20'+_0x4ffa0f+':'+_0x1bbec1['message']+'(文件已删除,未恢复)');}_0x418a28>0x0&&_0xb8bd2c(_0x180588(0x20b)+_0x418a28+_0x180588(0x270)),console[_0x180588(0x1dd)]();}return _0x1d5056[_0x180588(0x271)](_0x24ea79,_0x1d5056[_0x180588(0x198)]),_0x3e1f02(_0x180588(0x231)+_0x52a2e2[_0x180588(0x27f)]+_0x180588(0x230)),_0x1d5056[_0x180588(0x287)](_0x37b151['length'],0x0)&&(_0x1d5056['IMrVn'](_0xb8bd2c,_0x1d5056[_0x180588(0x1a9)]),_0x37b151[_0x180588(0x1b8)](_0x52dac6=>_0x3861df('\x20\x20-\x20'+_0x52dac6))),_0x1d5056[_0x180588(0x271)](_0xb8bd2c,_0x1d5056[_0x180588(0x26c)]),_0x1d5056[_0x180588(0x287)](_0x52a2e2[_0x180588(0x27f)],0x0)?0x0:0x1;},'description':_0x14467b(0x1c5)},'refresh-groups':{'handler':async function(_0x4ddde9){const _0x418fd6=_0x14467b,_0x3315cf={'MbNzV':function(_0x4eae88,_0x580865){return _0x4eae88(_0x580865);},'MQUkV':function(_0x1c9ac7){return _0x1c9ac7();},'SHKYA':function(_0x3d38fa){return _0x3d38fa();},'iZsfQ':function(_0x50b578,_0x14015b){return _0x50b578===_0x14015b;},'vqZcN':function(_0x34056d,_0x270657){return _0x34056d(_0x270657);},'yLyqy':_0x418fd6(0x1c8),'sVlBV':function(_0x378804,_0x1b4201){return _0x378804(_0x1b4201);},'HvfAp':_0x418fd6(0x1bd),'Fvpgg':function(_0x11bdba,_0x376f12){return _0x11bdba(_0x376f12);},'gOELy':function(_0xc6f22c,_0x1f36c4){return _0xc6f22c+_0x1f36c4;},'XjWZT':function(_0x13bb7e,_0x367223){return _0x13bb7e(_0x367223);},'mRJvp':_0x418fd6(0x24c),'zdTlJ':_0x418fd6(0x22c),'WpBDC':function(_0x40d73f,_0x4edf33){return _0x40d73f(_0x4edf33);},'myNtm':_0x418fd6(0x1d9),'Snlcu':'(本命令仅展示分组,不修改\x20API\x20Key\x20或配置文件)'},_0x3e1178=_0x3315cf[_0x418fd6(0x248)](U,_0x4ddde9);if(_0x3e1178['help'])return console[_0x418fd6(0x1dd)](_0x418fd6(0x257)+z),0x0;_0x3315cf[_0x418fd6(0x1f1)](_0x5e198b);const _0x3fec42=_0x3315cf[_0x418fd6(0x1bf)](_0x375296);if(!_0x3fec42[_0x418fd6(0x1d1)]['supported'])return _0x4b9df4('需要\x20node\x20>=\x2018,当前\x20'+_0x3fec42[_0x418fd6(0x1d1)]['version']),0x1;const _0x379392=_0x3e1178['apiBase']||process[_0x418fd6(0x28b)][_0x418fd6(0x1e9)]||C;_0x3315cf[_0x418fd6(0x248)](_0xb8bd2c,'API\x20端点:'+_0x379392),console[_0x418fd6(0x1dd)](),_0x24ea79(_0x418fd6(0x1b7));let _0x53899f=[];try{_0x53899f=await _0x3315cf['MbNzV'](_0x403c03,{'apiBase':_0x379392});}catch(_0x411b6e){return _0x3315cf[_0x418fd6(0x248)](_0x4b9df4,_0x418fd6(0x291)+_0x411b6e['message']),0x1;}if(_0x3315cf[_0x418fd6(0x240)](0x0,_0x53899f['length']))return _0x3315cf['vqZcN'](_0x183042,_0x3315cf['yLyqy']),_0x3315cf[_0x418fd6(0x266)](_0xb8bd2c,_0x3315cf[_0x418fd6(0x200)]),_0xb8bd2c('当前端点:'+_0x379392+_0x418fd6(0x236)),0x0;_0x3315cf[_0x418fd6(0x28a)](_0x3e1f02,_0x418fd6(0x221)+_0x53899f[_0x418fd6(0x27f)]+_0x418fd6(0x254)),console[_0x418fd6(0x1dd)](),_0x3315cf[_0x418fd6(0x248)](_0x24ea79,_0x418fd6(0x207));const _0x58e355=Math['max'](0x4,..._0x53899f[_0x418fd6(0x296)](_0x500cc8=>String(_0x500cc8['id']??'')[_0x418fd6(0x27f)])),_0x45ce62=Math[_0x418fd6(0x22d)](0x6,..._0x53899f[_0x418fd6(0x296)](_0xa311e=>String(_0xa311e[_0x418fd6(0x229)]??'')[_0x418fd6(0x27f)])),_0x426c53='\x20\x20'+'ID'[_0x418fd6(0x1b0)](_0x58e355)+'\x20\x20'+'名称'['padEnd'](_0x45ce62)+_0x418fd6(0x1db);return _0x3861df(_0x2ee820[_0x418fd6(0x191)][_0x418fd6(0x1f3)](_0x426c53)),_0x3861df(_0x2ee820['dim'](_0x3315cf[_0x418fd6(0x27c)]('\x20\x20','─'['repeat'](_0x3315cf[_0x418fd6(0x27c)](_0x3315cf[_0x418fd6(0x27c)](_0x58e355,_0x45ce62),0xf))))),_0x53899f[_0x418fd6(0x1b8)]((_0x22db99,_0x539f47)=>{const _0x2378df=_0x418fd6,_0x4bec47=String(_0x22db99['id']??'')[_0x2378df(0x1b0)](_0x58e355),_0x7bdb67=String(_0x22db99['name']??'')[_0x2378df(0x1b0)](_0x45ce62),_0x82e833='\x20\x20'+_0x2ee820[_0x2378df(0x256)](_0x4bec47)+'\x20\x20'+_0x2ee820[_0x2378df(0x195)](_0x7bdb67);_0x3315cf[_0x2378df(0x248)](_0x3861df,_0x82e833);}),console[_0x418fd6(0x1dd)](),_0x3315cf[_0x418fd6(0x182)](_0xb8bd2c,_0x3315cf['mRJvp']),_0x3861df(_0x3315cf[_0x418fd6(0x1c2)]),_0x3315cf['WpBDC'](_0x3861df,_0x3315cf[_0x418fd6(0x288)]),_0xb8bd2c(_0x3315cf[_0x418fd6(0x216)]),0x0;},'description':_0x14467b(0x299)},'diagnose':{'handler':async function(_0x4799b7){const _0x5ac178=_0x14467b,_0x4aa2e1={'cfXaF':function(_0x2ec8b0,_0x93d39a){return _0x2ec8b0(_0x93d39a);},'MlwTd':function(_0x3c5bea){return _0x3c5bea();},'dDFQL':function(_0xa67a10,_0x308a2f){return _0xa67a10===_0x308a2f;},'wsmlC':_0x5ac178(0x1f2),'Sroxv':_0x5ac178(0x26f),'ZMaIE':function(_0x14e016,_0x13986b){return _0x14e016(_0x13986b);},'lhCkh':function(_0x406914,_0x495628){return _0x406914(_0x495628);},'DxkxZ':function(_0x28288b,_0x2f87e0){return _0x28288b(_0x2f87e0);},'rWzqT':_0x5ac178(0x1c3)},_0x2926f9=_0x4aa2e1['cfXaF'](U,_0x4799b7);if(_0x2926f9[_0x5ac178(0x26d)])return console[_0x5ac178(0x1dd)](_0x5ac178(0x244)+z),0x0;_0x4aa2e1[_0x5ac178(0x1d6)](_0x5e198b);const _0x1862e8=_0x375296();if(!_0x1862e8[_0x5ac178(0x1d1)][_0x5ac178(0x278)])return _0x4b9df4(_0x5ac178(0x1b3)+_0x1862e8['node'][_0x5ac178(0x178)]),0x1;const _0x2849ce=_0x2926f9[_0x5ac178(0x17e)]||process['env'][_0x5ac178(0x1e9)]||C;_0x4aa2e1['cfXaF'](_0xb8bd2c,_0x5ac178(0x22b)+_0x2849ce);const _0x2d9725={'yes':_0x4aa2e1['dDFQL'](!0x0,_0x2926f9[_0x5ac178(0x281)]),'models':_0x4aa2e1[_0x5ac178(0x1ea)]==typeof _0x2926f9['model']?_0x2926f9[_0x5ac178(0x268)]:void 0x0,'skipCliTests':_0x4aa2e1[_0x5ac178(0x1cc)](!0x0,_0x2926f9[_0x5ac178(0x275)]),'outDir':_0x2926f9[_0x5ac178(0x19a)]};let _0x2f30cf;_0x2d9725['yes']||_0x4aa2e1[_0x5ac178(0x21b)](_0xb8bd2c,_0x4aa2e1['Sroxv']);try{_0x2f30cf=await _0x58947d({'apiBase':_0x2849ce,'opts':_0x2d9725,'ui':{'banner':_0x5e198b,'ok':_0x3e1f02,'fail':_0x4b9df4,'warn':_0x183042,'info':_0xb8bd2c,'step':_0x24ea79,'plain':_0x3861df,'guide':_0x12c245,'chalk':_0x2ee820}});}catch(_0x4b39f5){return _0x4b9df4(_0x5ac178(0x1cb)+(_0x4b39f5?.[_0x5ac178(0x18f)]||_0x4b39f5)),0x1;}return _0x4aa2e1[_0x5ac178(0x269)](Y,_0x2f30cf),_0x4aa2e1[_0x5ac178(0x1c7)](_0x3e1f02,_0x5ac178(0x25b)+_0x2f30cf[_0x5ac178(0x18a)]),_0x4aa2e1[_0x5ac178(0x1ec)](_0xb8bd2c,_0x4aa2e1[_0x5ac178(0x1ac)]),0x0;},'description':_0x14467b(0x1e3)}};export const SUBCOMMAND_NAMES=new Set(Object[_0x14467b(0x1e7)](SUBCOMMANDS));export{z as SUB_HELP};
1
+ const _0x31b175=_0x2beb;(function(_0x374214,_0x30fd28){const _0xcbeb60=_0x2beb,_0x752100=_0x374214();while(!![]){try{const _0x2ca718=parseInt(_0xcbeb60(0x1cf))/0x1*(-parseInt(_0xcbeb60(0x167))/0x2)+parseInt(_0xcbeb60(0xed))/0x3*(-parseInt(_0xcbeb60(0x164))/0x4)+parseInt(_0xcbeb60(0xcb))/0x5*(parseInt(_0xcbeb60(0x1ac))/0x6)+parseInt(_0xcbeb60(0x1e8))/0x7*(-parseInt(_0xcbeb60(0x1ef))/0x8)+-parseInt(_0xcbeb60(0x1dc))/0x9*(parseInt(_0xcbeb60(0x1f3))/0xa)+parseInt(_0xcbeb60(0x15e))/0xb+parseInt(_0xcbeb60(0x114))/0xc;if(_0x2ca718===_0x30fd28)break;else _0x752100['push'](_0x752100['shift']());}catch(_0x1cacc3){_0x752100['push'](_0x752100['shift']());}}}(_0x34f5,0x28e7d));import _0x311276 from'node:fs';import _0x29d5cc from'node:path';import _0x15d443 from'node:os';import{unzipSync as _0x133dcd}from'fflate';import{backupFile as _0x1a958b,listBackups as _0x14ade9,restoreBackup as _0x3e8bf6}from'./backup.mjs';function _0x2beb(_0x3d5cd7,_0x231ba5){_0x3d5cd7=_0x3d5cd7-0xcb;const _0x34f57a=_0x34f5();let _0x2beba3=_0x34f57a[_0x3d5cd7];return _0x2beba3;}import{cliActivate as _0x428a38,listGroups as _0x3c446f}from'./api.mjs';import{writeFileWithPermission as _0x4ba249,PermissionDeniedError as _0x1f54eb}from'./write.mjs';import{renderContent as _0x2c34c8,expandPath as _0x4b527b,listModels as _0x415d50}from'./render.mjs';import{getCliMeta as _0x376212,isDefaultSelected as _0x4c1a07}from'./platforms.mjs';import{detectAll as _0x36c605}from'./detect.mjs';import{runDiagnose as _0x362806}from'./diagnose.mjs';import{ask as _0x3b6eb9,askSecret as _0xac1445,multiSelect as _0x3cc652,select as _0x3d0c95,confirm as _0x363530,closePrompt as _0x14124d}from'./prompt.mjs';import{banner as _0x209370,ok as _0x3ec7d7,fail as _0x11f69a,warn as _0x39bee0,info as _0x5a353d,step as _0x45c391,plain as _0x334721,guide as _0x1b59ca,chalk as _0x53d9b0}from'./ui.mjs';const C=_0x31b175(0xec),R=[_0x31b175(0x19b),_0x31b175(0xd6),'~/.claude/settings.json','~/.gemini/settings.json'],M=[_0x31b175(0x176),'%userprofile%\x5c.codex\x5cauth.json',_0x31b175(0x1bc),'%userprofile%\x5c.gemini\x5csettings.json'],N=[_0x31b175(0xea),_0x31b175(0x1d2),_0x31b175(0x19f)],B=[_0x31b175(0x18b),'%userprofile%\x5c.claude',_0x31b175(0x1f1)],H=new Set([_0x31b175(0x1b6),_0x31b175(0x11a)]);function K(_0x4c463a){const _0x4668a6=_0x31b175;return _0x4c463a[_0x4668a6(0x179)](/-([a-z])/g,(_0xe24259,_0x490113)=>_0x490113['toUpperCase']());}function U(_0x4eaa44){const _0x3e7297=_0x31b175,_0x27cd41={'pDwfC':function(_0x3ede4c,_0x2a8495){return _0x3ede4c===_0x2a8495;},'BXqcF':_0x3e7297(0x17b),'EwDyc':function(_0x391871,_0x556441){return _0x391871===_0x556441;},'iUsQC':_0x3e7297(0x16f),'Ccezz':function(_0x29d7eb,_0x4a64b3){return _0x29d7eb===_0x4a64b3;},'WTHJK':_0x3e7297(0x182),'QcGFa':function(_0x270bc6,_0xca85d1){return _0x270bc6===_0xca85d1;},'XqnjQ':function(_0x4a6c16,_0x454a28){return _0x4a6c16(_0x454a28);},'bRQbJ':function(_0x227644,_0x5d9b7c){return _0x227644(_0x5d9b7c);}},_0x151eae={'dryRun':!0x1,'_':[]};for(let _0x290ac4=0x0;_0x290ac4<_0x4eaa44[_0x3e7297(0x14e)];_0x290ac4++){const _0x2bdfe9=_0x4eaa44[_0x290ac4];if(_0x27cd41[_0x3e7297(0xd3)](_0x27cd41[_0x3e7297(0x1c1)],_0x2bdfe9)||'-n'===_0x2bdfe9)_0x151eae[_0x3e7297(0x1e7)]=!0x0;else{if(_0x27cd41[_0x3e7297(0xf5)](_0x3e7297(0x14c),_0x2bdfe9)||'-y'===_0x2bdfe9)_0x151eae[_0x3e7297(0x144)]=!0x0;else{if(_0x27cd41['EwDyc'](_0x27cd41['iUsQC'],_0x2bdfe9))_0x151eae[_0x3e7297(0x173)]=_0x4eaa44[++_0x290ac4];else{if(_0x27cd41[_0x3e7297(0x1a9)](_0x27cd41[_0x3e7297(0x1df)],_0x2bdfe9)||_0x27cd41['QcGFa']('-h',_0x2bdfe9))_0x151eae['help']=!0x0;else{if(_0x2bdfe9[_0x3e7297(0x12e)]('--')&&_0x2bdfe9[_0x3e7297(0x119)]('=')){const [_0x1a2902,_0x51a843]=_0x2bdfe9[_0x3e7297(0x149)](0x2)[_0x3e7297(0x1d0)](/=(.*)/,0x2);H[_0x3e7297(0x1cd)](_0x1a2902)?_0x151eae[_0x27cd41[_0x3e7297(0x123)](K,_0x1a2902)]=!0x0:_0x151eae[_0x1a2902]=_0x51a843;}else{if(_0x2bdfe9['startsWith']('--')){const _0x1a332d=_0x2bdfe9[_0x3e7297(0x179)](/^--/,'');H[_0x3e7297(0x1cd)](_0x1a332d)?_0x151eae[_0x27cd41[_0x3e7297(0x11f)](K,_0x1a332d)]=!0x0:_0x151eae[_0x1a332d]=_0x4eaa44[++_0x290ac4];}else _0x151eae['_'][_0x3e7297(0x18c)](_0x2bdfe9);}}}}}}return _0x151eae;}function D(_0x1f031e,_0x2e63ae){return _0x4b527b(_0x1f031e,{'isWindows':_0x2e63ae});}function W(_0x5861f4){const _0xe74da4=_0x31b175;return(_0x5861f4?B:N)[_0xe74da4(0x1a3)](_0x13c663=>D(_0x13c663,_0x5861f4));}const z=_0x31b175(0x14b)[_0x31b175(0x1c3)]();function F(_0x1a7599){const _0x3587db=_0x31b175,_0x2ac8ad={'aYmNJ':function(_0x4c775e,_0x2ae711){return _0x4c775e>=_0x2ae711;},'SNwMr':function(_0xe1f4d9,_0x42cae4){return _0xe1f4d9<_0x42cae4;},'LnYFJ':function(_0x7c54fc,_0x506cb9){return _0x7c54fc!=_0x506cb9;},'DDLid':function(_0x241dbc,_0x3124a){return _0x241dbc>_0x3124a;},'qNaoJ':_0x3587db(0x16e),'sJmIb':'fail'};return _0x2ac8ad['aYmNJ'](_0x1a7599[_0x3587db(0x18f)],0xc8)&&_0x2ac8ad[_0x3587db(0xcf)](_0x1a7599[_0x3587db(0x18f)],0x12c)?_0x2ac8ad[_0x3587db(0x183)](null,_0x1a7599[_0x3587db(0x1e6)])&&_0x2ac8ad[_0x3587db(0x10f)](_0x1a7599[_0x3587db(0x1e6)],0x2710)?_0x2ac8ad['qNaoJ']:'ok':_0x2ac8ad[_0x3587db(0x171)];}function Y({zipPath:_0x489b41,summary:_0x357c53}){const _0x351f48=_0x31b175,_0x5376b2={'XUolt':function(_0x2bdf26,_0x4d7f3c){return _0x2bdf26(_0x4d7f3c);},'mqKAM':_0x351f48(0xfd),'rLfAa':function(_0x5696c9,_0xf8adc9){return _0x5696c9>_0xf8adc9;},'xFXEa':function(_0x4d8f29,_0x8c2ab4){return _0x4d8f29===_0x8c2ab4;},'deKcL':_0x351f48(0x16e),'hzsCe':function(_0x180251,_0x15a40d){return _0x180251(_0x15a40d);},'weKeP':_0x351f48(0x158),'TDykD':function(_0x13e25c,_0x2c7de9){return _0x13e25c(_0x2c7de9);},'UdczC':_0x351f48(0x13e),'zJxQc':function(_0xfd7d56,_0x4ea80a){return _0xfd7d56!=_0x4ea80a;}};console[_0x351f48(0x148)](),_0x5376b2[_0x351f48(0x12f)](_0x45c391,_0x5376b2[_0x351f48(0xf7)]);const _0x43bc3b=Array[_0x351f48(0x141)](_0x357c53[_0x351f48(0xd0)])?_0x357c53['http_tests']:[];if(_0x5376b2['rLfAa'](_0x43bc3b[_0x351f48(0x14e)],0x0)){const _0x407236=Math[_0x351f48(0x15f)](0x6,..._0x43bc3b[_0x351f48(0x1a3)](_0x23321c=>String(_0x23321c['model'])[_0x351f48(0x14e)])),_0x3dd72f=Math[_0x351f48(0x15f)](0x6,..._0x43bc3b[_0x351f48(0x1a3)](_0x47491d=>String(_0x47491d[_0x351f48(0x1a4)]??'-')[_0x351f48(0x14e)]));_0x5376b2['XUolt'](_0x334721,_0x53d9b0[_0x351f48(0x15b)]['cyan']('\x20\x20'+'模型'[_0x351f48(0x1a7)](_0x407236)+'\x20\x20'+'判定'[_0x351f48(0x1a7)](_0x3dd72f)+'\x20\x20'+'状态'[_0x351f48(0x1a7)](0x6)+'\x20\x20'+_0x351f48(0xdc)['padEnd'](0x12)+_0x351f48(0x133)));for(const _0x40018d of _0x43bc3b){const _0x1f48e2=_0x5376b2[_0x351f48(0x12f)](F,_0x40018d),_0x2e3874=_0x5376b2['XUolt'](String,_0x40018d[_0x351f48(0x1a4)]??'-')['padEnd'](_0x3dd72f),_0x4a99e7='ok'===_0x1f48e2?_0x53d9b0[_0x351f48(0x190)](_0x2e3874):_0x5376b2[_0x351f48(0x174)](_0x5376b2['deKcL'],_0x1f48e2)?_0x53d9b0[_0x351f48(0x1f5)](_0x2e3874):_0x53d9b0[_0x351f48(0x1c2)](_0x2e3874),_0x3871b0=(_0x40018d[_0x351f48(0x1e6)]??'-')+_0x351f48(0x1ba)+(_0x40018d['total_ms']??'-')+'ms';_0x334721('\x20\x20'+_0x5376b2[_0x351f48(0x1b0)](String,_0x40018d['model'])[_0x351f48(0x1a7)](_0x407236)+'\x20\x20'+_0x4a99e7+'\x20\x20'+String(_0x40018d[_0x351f48(0x18f)]??_0x5376b2[_0x351f48(0x132)])[_0x351f48(0x1a7)](0x6)+'\x20\x20'+_0x3871b0[_0x351f48(0x1a7)](0x12)+'\x20\x20'+(_0x40018d[_0x351f48(0x1bb)]??'-'));}}else _0x5376b2[_0x351f48(0xe0)](_0x5a353d,_0x5376b2[_0x351f48(0x194)]);const _0x5856f7=Array[_0x351f48(0x141)](_0x357c53[_0x351f48(0x181)])?_0x357c53[_0x351f48(0x181)]:[];if(_0x5376b2[_0x351f48(0xf0)](_0x5856f7[_0x351f48(0x14e)],0x0)){const _0x510095=function(_0x2be8c9){const _0x536afb=_0x351f48,_0x3d54cc={};try{const _0x242537=_0x5376b2['XUolt'](_0x133dcd,new Uint8Array(_0x311276[_0x536afb(0xf2)](_0x2be8c9))),_0x7514a4=Object['keys'](_0x242537)[_0x536afb(0xd9)](_0x58f8e4=>_0x58f8e4[_0x536afb(0x11b)](_0x536afb(0x1e5)));if(!_0x7514a4)return _0x3d54cc;for(const _0x29e6ec of Buffer[_0x536afb(0x163)](_0x242537[_0x7514a4])[_0x536afb(0x113)](_0x536afb(0x155))[_0x536afb(0x1d0)]('\x0a'))if(_0x29e6ec[_0x536afb(0x1c3)]())try{const _0x36cfb1=JSON['parse'](_0x29e6ec);_0x36cfb1&&_0x36cfb1['cli']&&(_0x3d54cc[_0x36cfb1[_0x536afb(0xfe)]]=_0x36cfb1[_0x536afb(0x104)]);}catch{}}catch{}return _0x3d54cc;}(_0x489b41),_0x5ca680=Math[_0x351f48(0x15f)](0x6,..._0x5856f7[_0x351f48(0x1a3)](_0x571dd5=>String(_0x571dd5[_0x351f48(0xfe)])[_0x351f48(0x14e)]));for(const _0x203629 of _0x5856f7){const _0x396f28=_0x5376b2[_0x351f48(0x12f)](String,_0x203629[_0x351f48(0x1a4)]??'-'),_0x4fca72='ok'===_0x396f28?_0x53d9b0[_0x351f48(0x190)](_0x396f28):_0x53d9b0[_0x351f48(0x1c2)](_0x396f28),_0x20f15e=_0x5376b2[_0x351f48(0x165)](null,_0x510095[_0x203629[_0x351f48(0xfe)]])?_0x510095[_0x203629[_0x351f48(0xfe)]]+'ms':'-';_0x5376b2[_0x351f48(0x1b0)](_0x334721,'\x20\x20'+String(_0x203629['cli'])[_0x351f48(0x1a7)](_0x5ca680)+'\x20\x20'+_0x4fca72[_0x351f48(0x1a7)](0x6)+_0x351f48(0x116)+(_0x203629[_0x351f48(0x103)]??_0x5376b2[_0x351f48(0x132)])+'\x20\x20'+_0x20f15e);}}}export const SUBCOMMANDS={'restore':{'handler':async function(_0x50a669){const _0x8634b=_0x31b175,_0x1f3f27={'CjcRY':function(_0x2ffddf,_0x1fa895){return _0x2ffddf(_0x1fa895);},'lISPz':_0x8634b(0x189),'VEYDZ':function(_0x205fbc,_0x561fd5){return _0x205fbc(_0x561fd5);},'mHweH':function(_0x4fbff0,_0x1e86e8){return _0x4fbff0+_0x1e86e8;},'vzOaF':function(_0x5eaac9,_0x2987ef){return _0x5eaac9(_0x2987ef);},'yVfga':_0x8634b(0x155),'iiYCy':function(_0x498a76,_0x58b3ba){return _0x498a76>_0x58b3ba;},'iYzCA':_0x8634b(0x191),'Tnofz':function(_0x557481,_0x1d696f){return _0x557481(_0x1d696f);},'rBqzY':function(_0x32b4c5){return _0x32b4c5();},'fQdBx':_0x8634b(0xd4),'eZrkm':function(_0xe79c20,_0xf9a383){return _0xe79c20(_0xf9a383);},'vDGXJ':_0x8634b(0x126),'NNOmo':function(_0x5af00c,_0x127f53){return _0x5af00c(_0x127f53);},'vqIeO':function(_0x196af9,_0x1a3001){return _0x196af9===_0x1a3001;},'bTupP':_0x8634b(0x137),'XTRwX':function(_0x2cdeab,_0x3b07cd){return _0x2cdeab(_0x3b07cd);},'boTEm':_0x8634b(0x1c6),'gZLsi':_0x8634b(0x1bd),'cZjPJ':_0x8634b(0x1e4),'VaNOz':'Gemini\x20CLI','nyZML':_0x8634b(0xe6),'icglD':_0x8634b(0xfc),'cinPb':function(_0x9421ef,_0x11229f,_0x394885,_0x1b0035){return _0x9421ef(_0x11229f,_0x394885,_0x1b0035);},'lfXUC':_0x8634b(0x1cb),'kyEIh':function(_0x2446ff,_0x5ee667){return _0x2446ff>_0x5ee667;},'SZUQl':function(_0x4cc2ce,_0x1d71a8){return _0x4cc2ce(_0x1d71a8);},'AMfoa':function(_0x234c50,_0x3ad463){return _0x234c50<_0x3ad463;},'HRQGr':function(_0x709ad,_0x55c70a){return _0x709ad>=_0x55c70a;},'OoEDb':_0x8634b(0x106),'FVRkV':function(_0x50cb8f,_0x5f08b4){return _0x50cb8f(_0x5f08b4);},'cvqfM':function(_0x1d342f,_0x5c3d42){return _0x1d342f(_0x5c3d42);},'qBhNI':function(_0x2972e3,_0x345416){return _0x2972e3(_0x345416);},'Hnixy':function(_0x351275,_0x88f73f,_0x1d99e8){return _0x351275(_0x88f73f,_0x1d99e8);},'yUOvD':function(_0x165138,_0x315de6){return _0x165138(_0x315de6);}},_0x50ae4c=_0x1f3f27['Tnofz'](U,_0x50a669);if(_0x50ae4c['help'])return console['log']('npx\x20@2api-store/activate\x20restore\x20[options]\x0a\x0a'+z),0x0;_0x209370();const _0x2b6d64=_0x1f3f27[_0x8634b(0x1d7)](_0x36c605);if(!_0x2b6d64[_0x8634b(0x1c4)][_0x8634b(0x1b5)])return _0x11f69a(_0x8634b(0xdd)+_0x2b6d64[_0x8634b(0x1c4)][_0x8634b(0x145)]),0x1;_0x1f3f27['Tnofz'](_0x45c391,_0x1f3f27[_0x8634b(0x1a1)]);const _0x3367af=_0x1f3f27[_0x8634b(0xf4)](W,_0x2b6d64['os']['isWindows']);_0x50ae4c['dryRun']&&_0x39bee0(_0x1f3f27[_0x8634b(0xd1)]),_0x5a353d(_0x8634b(0x1a5)+_0x3367af['join'](',\x20'));const _0x15d611=_0x1f3f27[_0x8634b(0x192)](_0x14ade9,_0x3367af);if(_0x1f3f27[_0x8634b(0xd8)](0x0,_0x15d611['length']))return _0x1f3f27['CjcRY'](_0x5a353d,_0x1f3f27[_0x8634b(0xe4)]),_0x1f3f27[_0x8634b(0x150)](_0x5a353d,_0x1f3f27[_0x8634b(0xce)]),0x0;_0x3ec7d7(_0x8634b(0xcc)+_0x15d611[_0x8634b(0x14e)]+_0x8634b(0x118));const _0x46d5e8={'.codex':_0x1f3f27['gZLsi'],'.claude':_0x1f3f27[_0x8634b(0x19a)],'.gemini':_0x1f3f27[_0x8634b(0x1d4)]};function _0x2328eb(_0x106575){const _0xfddf1c=_0x8634b,_0x1f359a=process['env'][_0xfddf1c(0x1a8)]||process['env'][_0xfddf1c(0xd2)]||'',_0x20ea63=_0x29d5cc[_0xfddf1c(0x1ce)](_0x1f359a,_0x106575)[_0xfddf1c(0x179)](/\\/g,'/')[_0xfddf1c(0x1d0)]('/')[0x0];return _0x46d5e8[_0x20ea63]||_0x20ea63;}function _0x370ea3(_0x550807){const _0x115148=_0x8634b;return process['env'][_0x115148(0x1a8)]||process[_0x115148(0x17a)]['USERPROFILE'],_0x29d5cc[_0x115148(0x1e1)](_0x550807);}const _0x34f075={};for(const _0x49ebe of _0x15d611){const _0x38100d=_0x1f3f27['CjcRY'](_0x370ea3,_0x49ebe['origPath']);_0x34f075[_0x38100d]||(_0x34f075[_0x38100d]=[]),_0x34f075[_0x38100d][_0x8634b(0x18c)](_0x49ebe);}const _0x451bc1=Object[_0x8634b(0xef)](_0x34f075);if(_0x1f3f27[_0x8634b(0xd8)](0x0,_0x451bc1[_0x8634b(0x14e)]))return _0x1f3f27[_0x8634b(0xdf)](_0x5a353d,_0x1f3f27[_0x8634b(0x1af)]),0x0;console[_0x8634b(0x148)](),_0x45c391(_0x1f3f27[_0x8634b(0xfb)]);const _0x14ab55=_0x451bc1[_0x8634b(0x1a3)](_0x15834e=>{const _0x574a57=_0x8634b,_0x12b09c=_0x1f3f27['CjcRY'](_0x2328eb,_0x29d5cc['join'](_0x15834e,_0x1f3f27[_0x574a57(0xf6)])),_0x993ae2=_0x34f075[_0x15834e][_0x574a57(0x14e)];return{'label':_0x53d9b0['cyan'](_0x12b09c)+'('+_0x993ae2+_0x574a57(0x14f),'dir':_0x15834e};}),_0x2280f3=await _0x1f3f27[_0x8634b(0x1f2)](_0x3d0c95,'选择应用(回车=第一个)',_0x14ab55,{'defaultIndex':0x0});if(_0x2280f3<0x0||_0x2280f3>=_0x14ab55[_0x8634b(0x14e)])return _0x1f3f27['VEYDZ'](_0x11f69a,_0x1f3f27[_0x8634b(0x143)]),0x1;const _0x101f6e=_0x14ab55[_0x2280f3]['dir'],_0x4c15df=_0x1f3f27['vzOaF'](_0x2328eb,_0x29d5cc[_0x8634b(0x186)](_0x101f6e,_0x1f3f27[_0x8634b(0xf6)])),_0x2acc55=_0x34f075[_0x101f6e][_0x8634b(0x15c)]((_0x5e576e,_0x2022d0)=>_0x2022d0[_0x8634b(0x1cc)]-_0x5e576e[_0x8634b(0x1cc)]),_0x494c85={},_0x440254=[];for(const _0x4d54a2 of _0x2acc55){const _0xca185=_0x29d5cc['basename'](_0x4d54a2[_0x8634b(0x156)])[_0x8634b(0x18a)](/\.bak\.(.+)$/),_0x565669=(_0xca185?_0xca185[0x1]:'')[_0x8634b(0x179)](/-\d{3}Z$/,'Z');_0x494c85[_0x565669]||(_0x494c85[_0x565669]=[],_0x440254[_0x8634b(0x18c)](_0x565669)),_0x494c85[_0x565669][_0x8634b(0x18c)](_0x4d54a2);}for(const _0x21ca2f of _0x440254){const _0x28c6d4=_0x494c85[_0x21ca2f],_0x51aac6={};for(const _0x53de06 of _0x28c6d4)(!_0x51aac6[_0x53de06['origPath']]||_0x1f3f27[_0x8634b(0x195)](_0x53de06[_0x8634b(0x1cc)],_0x51aac6[_0x53de06['origPath']]['mtime']))&&(_0x51aac6[_0x53de06['origPath']]=_0x53de06);_0x494c85[_0x21ca2f]=Object[_0x8634b(0x1e9)](_0x51aac6)[_0x8634b(0x15c)]((_0x1f44e8,_0x3c3801)=>_0x3c3801[_0x8634b(0x1cc)]-_0x1f44e8['mtime']);}console[_0x8634b(0x148)](),_0x1f3f27['SZUQl'](_0x45c391,'选择恢复时间点('+_0x4c15df+')');const _0xc12186=_0x440254[_0x8634b(0x1a3)](_0x7a9021=>{const _0xccdfe9=_0x8634b,_0x312e68=_0x494c85[_0x7a9021],_0x3d23a3=_0x312e68[_0xccdfe9(0x1a3)](_0x545e46=>_0x29d5cc[_0xccdfe9(0x111)](_0x545e46[_0xccdfe9(0x152)]))[_0xccdfe9(0x186)](',\x20'),_0x1b3c12=function(_0x55327b){const _0x358501=_0xccdfe9;try{const _0x20d223=new Date(_0x55327b),_0x25c150=_0x3c04e6=>String(_0x3c04e6)['padStart'](0x2,'0');return _0x20d223[_0x358501(0xe5)]()+'-'+_0x1f3f27[_0x358501(0x134)](_0x25c150,_0x1f3f27[_0x358501(0x1e3)](_0x20d223[_0x358501(0x169)](),0x1))+'-'+_0x1f3f27[_0x358501(0x134)](_0x25c150,_0x20d223['getDate']())+'\x20'+_0x25c150(_0x20d223[_0x358501(0x13d)]())+':'+_0x1f3f27[_0x358501(0xdf)](_0x25c150,_0x20d223[_0x358501(0xf3)]())+':'+_0x1f3f27['vzOaF'](_0x25c150,_0x20d223[_0x358501(0x129)]());}catch{return new Date(_0x55327b)[_0x358501(0x10e)]();}}(_0x312e68[0x0][_0xccdfe9(0x1cc)]),_0x5a360a=[];for(const _0xdfd3d8 of _0x312e68)try{const _0x1847e5=_0x311276['readFileSync'](_0xdfd3d8[_0xccdfe9(0x156)],_0x1f3f27[_0xccdfe9(0x138)]);if(!_0x5a360a['find'](_0x4a5949=>_0x4a5949[_0xccdfe9(0x119)]('…'))){const _0x18590a=_0x1847e5[_0xccdfe9(0x18a)](/sk-([a-zA-Z0-9]{10,})/);if(_0x18590a)_0x5a360a[_0xccdfe9(0x18c)](_0xccdfe9(0x157)+_0x18590a[0x1][_0xccdfe9(0x149)](-0x6));else{const _0x50f2bd=_0x1847e5['match'](/(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["']([a-zA-Z0-9._-]{10,})["']/);if(_0x50f2bd)_0x5a360a[_0xccdfe9(0x18c)](_0xccdfe9(0x184)+_0x50f2bd[0x1][_0xccdfe9(0x149)](-0x6));else{const _0x1b6e8=_0x1847e5['match'](/export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?)([a-zA-Z0-9._-]{10,})/);_0x1b6e8&&_0x5a360a[_0xccdfe9(0x18c)](_0xccdfe9(0x184)+_0x1b6e8[0x2][_0xccdfe9(0x149)](-0x6));}}}if(!_0x5a360a['find'](_0x5a090e=>_0x5a090e[_0xccdfe9(0x12e)]('http'))){const _0x409b58=_0x1847e5['match'](/(https?:\/\/[^\s"'`}]+)/);_0x409b58&&_0x5a360a[_0xccdfe9(0x18c)](_0x409b58[0x1][_0xccdfe9(0x179)](/\/+$/,''));}if(!_0x5a360a[_0xccdfe9(0xd9)](_0x1d5081=>_0x1d5081[_0xccdfe9(0x12e)]('model'))){const _0x569b06=_0x1847e5[_0xccdfe9(0x18a)](/(?:^|\n)\s*model\s*[=:]\s*["']?([a-zA-Z0-9][\w.-]+)/);_0x569b06&&_0x5a360a[_0xccdfe9(0x18c)](_0xccdfe9(0x10a)+_0x569b06[0x1]);}}catch{}const _0x57fc82=_0x1f3f27[_0xccdfe9(0x1d9)](_0x5a360a[_0xccdfe9(0x14e)],0x0)?'\x20'+_0x53d9b0[_0xccdfe9(0x1f5)](_0x5a360a[_0xccdfe9(0x186)](_0x1f3f27['iYzCA'])):'';return{'label':_0x53d9b0[_0xccdfe9(0x1de)](_0x1b3c12)+'('+_0x312e68[_0xccdfe9(0x14e)]+_0xccdfe9(0x12d)+_0x3d23a3+')'+_0x57fc82,'ts':_0x7a9021,'group':_0x312e68};}),_0x140d24=await _0x3d0c95(_0x8634b(0x1b3),_0xc12186,{'defaultIndex':0x0});if(_0x1f3f27['AMfoa'](_0x140d24,0x0)||_0x1f3f27[_0x8634b(0x1b8)](_0x140d24,_0xc12186[_0x8634b(0x14e)]))return _0x1f3f27['VEYDZ'](_0x11f69a,_0x1f3f27[_0x8634b(0x1b4)]),0x1;const _0x3769ce=_0xc12186[_0x140d24][_0x8634b(0x13a)];console['log'](),_0x1f3f27['FVRkV'](_0x5a353d,_0x8634b(0x139)+_0x4c15df+'('+_0x3769ce[_0x8634b(0x14e)]+_0x8634b(0x11e));for(const _0x5d59c5 of _0x3769ce)_0x5a353d('\x20\x20'+_0x29d5cc['basename'](_0x5d59c5[_0x8634b(0x152)])+_0x8634b(0x1f4)+_0x29d5cc['basename'](_0x5d59c5[_0x8634b(0x156)]));if(_0x50ae4c[_0x8634b(0x1e7)])return _0x1f3f27[_0x8634b(0xe7)](_0x39bee0,_0x8634b(0x1ab)),0x0;let _0x14aee9=0x0;for(const _0x5a3ffd of _0x3769ce){if(_0x311276[_0x8634b(0x1d6)](_0x5a3ffd['origPath']))try{const _0x32486c=_0x1f3f27[_0x8634b(0x13f)](_0x1a958b,_0x5a3ffd[_0x8634b(0x152)]);_0x32486c&&_0x5a353d(_0x8634b(0x1a0)+_0x29d5cc[_0x8634b(0x111)](_0x5a3ffd[_0x8634b(0x152)])+_0x8634b(0x1bf)+_0x29d5cc['basename'](_0x32486c));}catch{}try{_0x1f3f27[_0x8634b(0x159)](_0x3e8bf6,_0x5a3ffd[_0x8634b(0x156)],_0x5a3ffd['origPath']),_0x1f3f27[_0x8634b(0x14a)](_0x3ec7d7,_0x8634b(0x107)+_0x5a3ffd[_0x8634b(0x152)]),_0x14aee9++;}catch(_0x1494a9){_0x1f3f27[_0x8634b(0xe7)](_0x11f69a,_0x8634b(0x1ec)+_0x5a3ffd['origPath']+'('+_0x1494a9[_0x8634b(0x160)]+')');}}return _0x5a353d('共恢复\x20'+_0x14aee9+_0x8634b(0x1db)),_0x1f3f27[_0x8634b(0x1d9)](_0x14aee9,0x0)?0x0:0x3;},'description':_0x31b175(0x1ca)},'reset':{'handler':async function(_0x383560){const _0x31a570=_0x31b175,_0x27b016={'EyQQJ':function(_0x784772){return _0x784772();},'neEeJ':function(_0x310ab5,_0x2a71c7){return _0x310ab5(_0x2a71c7);},'VcwQH':_0x31a570(0xe8),'WqAeJ':_0x31a570(0xee),'oahPi':function(_0x27b364,_0x370bc4){return _0x27b364(_0x370bc4);},'OnhVJ':_0x31a570(0x13b),'bNUww':_0x31a570(0x19c),'FuCAe':function(_0x429521,_0x37bf51){return _0x429521(_0x37bf51);},'CDPnn':function(_0x91f7ba,_0x427cc4){return _0x91f7ba>_0x427cc4;},'xihor':function(_0xacf13d,_0x1973de){return _0xacf13d(_0x1973de);},'wZfIy':_0x31a570(0x193),'nWifB':function(_0x33bafe,_0x2ff3ff){return _0x33bafe(_0x2ff3ff);},'BDXeo':_0x31a570(0x1ed),'nZhkB':function(_0x19565b,_0x5b1ebc){return _0x19565b(_0x5b1ebc);},'jepWg':'\x20\x20\x20删除前会再备份一次(.bak.reset.<时间戳>),可手动恢复。','jNZTO':function(_0x230b9b,_0x41d4af,_0x2b0ac3){return _0x230b9b(_0x41d4af,_0x2b0ac3);},'uRYbs':_0x31a570(0x128),'IoCWM':'【试运行模式\x20--dry-run】不会真实删除/恢复文件','ONqfb':function(_0xcddcef,_0xb7f33){return _0xcddcef(_0xb7f33);},'qGWYb':_0x31a570(0x168),'hUhkA':'并从最新备份恢复:','Sjseo':function(_0x5cf825,_0x4f161a){return _0x5cf825(_0x4f161a);},'yiHeH':function(_0x1b3a0d,_0x2572af){return _0x1b3a0d(_0x2572af);},'poRAZ':function(_0xc9a5ec,_0x280e85){return _0xc9a5ec(_0x280e85);},'kRYdu':_0x31a570(0x125),'nBHEA':function(_0x4a7357,_0x28d550){return _0x4a7357===_0x28d550;},'yWfai':_0x31a570(0x101),'fHSAb':_0x31a570(0xf8),'Suycv':function(_0x24b7de,_0x2d8b8d){return _0x24b7de===_0x2d8b8d;},'ZpXZe':function(_0x501ad6,_0x284bb9){return _0x501ad6(_0x284bb9);},'yOhAB':_0x31a570(0x196),'gzSqD':function(_0x17cbdb,_0x875cb5){return _0x17cbdb(_0x875cb5);},'quQwj':function(_0x281e0d,_0x569b08){return _0x281e0d(_0x569b08);},'PKpzc':_0x31a570(0x1ee),'lQmzI':function(_0x237f10,_0x2cbbf9){return _0x237f10(_0x2cbbf9);},'BEJCo':_0x31a570(0x130)},_0x1ae91e=U(_0x383560);if(_0x1ae91e[_0x31a570(0x19d)])return console['log']('npx\x20@2api-store/activate\x20reset\x20[options]\x0a\x0a'+z),0x0;_0x209370();const _0x431aa4=_0x27b016[_0x31a570(0xe9)](_0x36c605);if(!_0x431aa4[_0x31a570(0x1c4)][_0x31a570(0x1b5)])return _0x27b016[_0x31a570(0xf9)](_0x11f69a,_0x31a570(0xdd)+_0x431aa4[_0x31a570(0x1c4)]['version']),0x1;var _0x3e03e3;_0x45c391(_0x27b016[_0x31a570(0x185)]);const _0x5d050b=((_0x3e03e3=_0x431aa4['os'][_0x31a570(0x1d8)])?M:R)['map'](_0x2ce64c=>D(_0x2ce64c,_0x3e03e3))[_0x31a570(0x14d)](_0x52d55b=>{try{return _0x311276['existsSync'](_0x52d55b);}catch{return!0x1;}});if(0x0===_0x5d050b[_0x31a570(0x14e)])return _0x27b016[_0x31a570(0xf9)](_0x39bee0,_0x27b016[_0x31a570(0x1c5)]),_0x27b016[_0x31a570(0x1b1)](_0x5a353d,_0x27b016[_0x31a570(0xcd)]),0x0;_0x27b016[_0x31a570(0xf9)](_0x5a353d,_0x27b016[_0x31a570(0x188)]),_0x5d050b[_0x31a570(0x1d1)](_0x56c6c3=>_0x334721(_0x31a570(0x115)+_0x53d9b0[_0x31a570(0x1f5)](_0x56c6c3))),console['log']();const _0x4e8910=_0x27b016[_0x31a570(0xf9)](W,_0x431aa4['os'][_0x31a570(0x1d8)]),_0x56a9bf=_0x27b016[_0x31a570(0x10b)](_0x14ade9,_0x4e8910),_0x2fd88d=_0x27b016['CDPnn'](_0x56a9bf['length'],0x0);if(_0x2fd88d?_0x27b016[_0x31a570(0xf9)](_0x3ec7d7,'发现\x20'+_0x56a9bf[_0x31a570(0x14e)]+_0x31a570(0x122)):_0x27b016[_0x31a570(0x16b)](_0x39bee0,_0x27b016[_0x31a570(0x1aa)]),console[_0x31a570(0x148)](),_0x27b016[_0x31a570(0x16b)](_0x45c391,_0x31a570(0xe1)),_0x27b016[_0x31a570(0x1ea)](_0x39bee0,_0x27b016[_0x31a570(0x1e0)]),_0x27b016['nZhkB'](_0x39bee0,_0x27b016[_0x31a570(0x147)]),!await _0x27b016[_0x31a570(0x1c7)](_0x363530,_0x31a570(0x1ae),{'defaultValue':!0x1}))return _0x334721(_0x27b016[_0x31a570(0x131)]),0x0;if(console[_0x31a570(0x148)](),_0x1ae91e['dryRun'])return _0x39bee0(_0x27b016[_0x31a570(0x135)]),_0x27b016[_0x31a570(0x100)](_0x5a353d,_0x27b016['qGWYb']),_0x5d050b[_0x31a570(0x1d1)](_0x54114b=>_0x334721(_0x31a570(0x10d)+_0x54114b)),_0x2fd88d&&(_0x27b016[_0x31a570(0x1ea)](_0x5a353d,_0x27b016[_0x31a570(0x172)]),_0x56a9bf['slice'](0x0,0x5)['forEach'](_0x57b4ee=>_0x334721(_0x31a570(0x115)+_0x57b4ee[_0x31a570(0x156)]+_0x31a570(0x1bf)+_0x57b4ee['origPath'])),_0x56a9bf[_0x31a570(0x14e)]>0x5&&_0x27b016[_0x31a570(0x16b)](_0x334721,_0x31a570(0x124)+_0x56a9bf[_0x31a570(0x14e)]+'\x20个备份)')),0x0;_0x45c391(_0x31a570(0x161));const _0x3a2c4b=[];for(const _0x372fbd of _0x5d050b)try{const _0x4c3232=_0x372fbd+_0x31a570(0x1ad)+new Date()[_0x31a570(0x10e)]()[_0x31a570(0x179)](/[:.]/g,'-');_0x311276[_0x31a570(0x18d)](_0x372fbd,_0x4c3232),_0x3a2c4b[_0x31a570(0x18c)](_0x4c3232),_0x27b016['Sjseo'](_0x334721,_0x31a570(0x15a)+_0x372fbd+'\x20→\x20'+_0x4c3232);}catch(_0x59b53b){_0x11f69a(_0x31a570(0xfa)+_0x372fbd+':'+_0x59b53b[_0x31a570(0x160)]+_0x31a570(0x1a6));}_0x27b016[_0x31a570(0x109)](_0x3a2c4b['length'],0x0)&&_0x27b016[_0x31a570(0x12c)](_0x3ec7d7,_0x31a570(0x17d)+_0x3a2c4b[_0x31a570(0x14e)]+_0x31a570(0x1db)),console[_0x31a570(0x148)](),_0x27b016[_0x31a570(0x11d)](_0x45c391,_0x27b016[_0x31a570(0x110)]);const _0x4c7b45=[];for(const _0x186145 of _0x5d050b)try{_0x311276[_0x31a570(0xf1)](_0x186145),_0x27b016[_0x31a570(0x1b1)](_0x3ec7d7,_0x31a570(0x151)+_0x186145),_0x4c7b45['push'](_0x186145);}catch(_0x12884b){_0x27b016[_0x31a570(0x120)](_0x27b016[_0x31a570(0xda)],_0x12884b[_0x31a570(0x17e)])||_0x27b016[_0x31a570(0x120)](_0x27b016[_0x31a570(0xd5)],_0x12884b[_0x31a570(0x17e)])||_0x27b016[_0x31a570(0x142)]('EROFS',_0x12884b['code'])?_0x27b016[_0x31a570(0x1b1)](_0x11f69a,'权限不足,无法删除\x20'+_0x186145+_0x31a570(0x16d)):_0x27b016[_0x31a570(0x1d5)](_0x11f69a,_0x31a570(0x175)+_0x186145+':'+_0x12884b[_0x31a570(0x160)]);}if(console['log'](),_0x2fd88d){_0x27b016[_0x31a570(0x16b)](_0x45c391,_0x27b016['yOhAB']);const _0x597831=new Map();for(const _0x525d91 of _0x56a9bf){const _0x21f964=_0x597831[_0x31a570(0x112)](_0x525d91[_0x31a570(0x152)]);(!_0x21f964||_0x27b016['CDPnn'](_0x525d91[_0x31a570(0x1cc)],_0x21f964[_0x31a570(0x1cc)]))&&_0x597831['set'](_0x525d91[_0x31a570(0x152)],_0x525d91);}let _0x4ed093=0x0;for(const [_0x45e817,_0xed774]of _0x597831)try{_0x27b016[_0x31a570(0x1c7)](_0x3e8bf6,_0xed774[_0x31a570(0x156)],_0x45e817),_0x27b016['gzSqD'](_0x3ec7d7,'已恢复:'+_0xed774['bakPath']+_0x31a570(0x1bf)+_0x45e817),_0x4ed093++;}catch(_0x27c867){_0x27b016[_0x31a570(0x1c8)](_0x39bee0,_0x31a570(0xd7)+_0x45e817+':'+_0x27c867[_0x31a570(0x160)]+_0x31a570(0x1b7));}_0x27b016[_0x31a570(0x109)](_0x4ed093,0x0)&&_0x27b016[_0x31a570(0x197)](_0x5a353d,_0x31a570(0x102)+_0x4ed093+_0x31a570(0x1db)),console[_0x31a570(0x148)]();}return _0x45c391(_0x27b016['PKpzc']),_0x27b016[_0x31a570(0x177)](_0x3ec7d7,_0x31a570(0x198)+_0x4c7b45[_0x31a570(0x14e)]+_0x31a570(0x1c9)),_0x27b016[_0x31a570(0x109)](_0x3a2c4b[_0x31a570(0x14e)],0x0)&&(_0x27b016[_0x31a570(0x16b)](_0x5a353d,_0x27b016[_0x31a570(0x140)]),_0x3a2c4b[_0x31a570(0x1d1)](_0x224a99=>_0x334721(_0x31a570(0x115)+_0x224a99))),_0x27b016[_0x31a570(0x1ea)](_0x5a353d,'下一步:如需重新激活,运行\x20npx\x20@2api-store/activate'),_0x4c7b45['length']>0x0?0x0:0x1;},'description':_0x31b175(0x1e2)},'refresh-groups':{'handler':async function(_0x29412f){const _0x36a964=_0x31b175,_0x379f86={'MIIxD':function(_0x4a586a,_0x3d5417){return _0x4a586a(_0x3d5417);},'NxyJw':function(_0x3ba754,_0x47dc08){return _0x3ba754(_0x47dc08);},'FgCPB':function(_0x15370f,_0xd775db){return _0x15370f(_0xd775db);},'qGrsm':function(_0x4d8fb9,_0x362895){return _0x4d8fb9(_0x362895);},'eAncJ':function(_0xfbb95a){return _0xfbb95a();},'LViKk':function(_0x3b4606,_0x46cdd9){return _0x3b4606(_0x46cdd9);},'KzYzu':function(_0x408b0c,_0x365a2d){return _0x408b0c(_0x365a2d);},'KmFFG':_0x36a964(0x16c),'bCoos':function(_0x3e7ba5,_0x32ee2e){return _0x3e7ba5(_0x32ee2e);},'VxDlV':function(_0x3fb999,_0x274bf6){return _0x3fb999(_0x274bf6);},'HCaXp':function(_0x39d5c7,_0x2c2238){return _0x39d5c7===_0x2c2238;},'cDHLa':_0x36a964(0x15d),'qOwHC':function(_0x478bd,_0x5b16ae){return _0x478bd(_0x5b16ae);},'uMpRH':_0x36a964(0x108),'GOVJL':function(_0x277c04,_0x1de95e){return _0x277c04(_0x1de95e);},'orTMk':'分组列表','QmTbV':function(_0x4ef59d,_0x4dc905){return _0x4ef59d+_0x4dc905;},'YTmml':function(_0xb95290,_0x5c0eb2){return _0xb95290+_0x5c0eb2;},'nuUwN':function(_0x437350,_0x1328c0){return _0x437350(_0x1328c0);},'iTepj':function(_0x48e546,_0x549191){return _0x48e546(_0x549191);},'GcPWB':_0x36a964(0x187)},_0x241a76=_0x379f86['qGrsm'](U,_0x29412f);if(_0x241a76[_0x36a964(0x19d)])return console[_0x36a964(0x148)](_0x36a964(0x1b2)+z),0x0;_0x379f86['eAncJ'](_0x209370);const _0x56b6da=_0x379f86['eAncJ'](_0x36c605);if(!_0x56b6da[_0x36a964(0x1c4)][_0x36a964(0x1b5)])return _0x11f69a(_0x36a964(0xdd)+_0x56b6da['node'][_0x36a964(0x145)]),0x1;const _0xa4c287=_0x241a76['apiBase']||process[_0x36a964(0x17a)][_0x36a964(0x12a)]||C;_0x379f86[_0x36a964(0x162)](_0x5a353d,_0x36a964(0x1a2)+_0xa4c287),console[_0x36a964(0x148)](),_0x379f86[_0x36a964(0x1c0)](_0x45c391,_0x379f86['KmFFG']);let _0x22db37=[];try{_0x22db37=await _0x379f86['bCoos'](_0x3c446f,{'apiBase':_0xa4c287});}catch(_0x229039){return _0x379f86['VxDlV'](_0x11f69a,'获取分组失败:'+_0x229039[_0x36a964(0x160)]),0x1;}if(_0x379f86[_0x36a964(0x1dd)](0x0,_0x22db37[_0x36a964(0x14e)]))return _0x39bee0(_0x379f86['cDHLa']),_0x379f86['qOwHC'](_0x5a353d,_0x379f86[_0x36a964(0x16a)]),_0x379f86['VxDlV'](_0x5a353d,_0x36a964(0x19e)+_0xa4c287+'(可通过\x20--api-base\x20或\x20ACTIVATE_API_BASE\x20覆盖)'),0x0;_0x379f86['VxDlV'](_0x3ec7d7,'查询到\x20'+_0x22db37[_0x36a964(0x14e)]+'\x20个可用分组'),console[_0x36a964(0x148)](),_0x379f86[_0x36a964(0x146)](_0x45c391,_0x379f86[_0x36a964(0x1da)]);const _0x185137=Math[_0x36a964(0x15f)](0x4,..._0x22db37[_0x36a964(0x1a3)](_0x213682=>String(_0x213682['id']??'')[_0x36a964(0x14e)])),_0x2bf816=Math[_0x36a964(0x15f)](0x6,..._0x22db37['map'](_0x260828=>String(_0x260828[_0x36a964(0x1f0)]??'')[_0x36a964(0x14e)])),_0x327939='\x20\x20'+'ID'['padEnd'](_0x185137)+'\x20\x20'+'名称'[_0x36a964(0x1a7)](_0x2bf816)+_0x36a964(0x13c);return _0x334721(_0x53d9b0[_0x36a964(0x15b)][_0x36a964(0x180)](_0x327939)),_0x379f86['VxDlV'](_0x334721,_0x53d9b0[_0x36a964(0x1de)](_0x379f86[_0x36a964(0x1be)]('\x20\x20','─'[_0x36a964(0x105)](_0x379f86[_0x36a964(0x121)](_0x379f86[_0x36a964(0x121)](_0x185137,_0x2bf816),0xf))))),_0x22db37[_0x36a964(0x1d1)]((_0xeea5cb,_0x4e2822)=>{const _0x4f9814=_0x36a964,_0x405ef6=_0x379f86[_0x4f9814(0xe2)](String,_0xeea5cb['id']??'')[_0x4f9814(0x1a7)](_0x185137),_0x171a1a=_0x379f86[_0x4f9814(0x1eb)](String,_0xeea5cb[_0x4f9814(0x1f0)]??'')['padEnd'](_0x2bf816),_0x3ddb39='\x20\x20'+_0x53d9b0[_0x4f9814(0x1f5)](_0x405ef6)+'\x20\x20'+_0x53d9b0[_0x4f9814(0x190)](_0x171a1a);_0x379f86[_0x4f9814(0x117)](_0x334721,_0x3ddb39);}),console[_0x36a964(0x148)](),_0x379f86[_0x36a964(0x136)](_0x5a353d,_0x36a964(0x127)),_0x379f86[_0x36a964(0x170)](_0x334721,_0x379f86['GcPWB']),_0x379f86[_0x36a964(0x1eb)](_0x334721,_0x36a964(0xff)),_0x379f86[_0x36a964(0x1c0)](_0x5a353d,_0x36a964(0x18e)),0x0;},'description':_0x31b175(0x199)},'diagnose':{'handler':async function(_0x42bab5){const _0x258c0b=_0x31b175,_0x3a0a5c={'eEiBm':function(_0x13bba3,_0x2710b3){return _0x13bba3(_0x2710b3);},'nmjbu':function(_0x32124e){return _0x32124e();},'jYgOc':_0x258c0b(0x1d3),'KhVuc':function(_0x420398,_0x3381fe){return _0x420398===_0x3381fe;},'QvFUI':_0x258c0b(0x17c),'TFeNV':function(_0x469633,_0x444a56){return _0x469633(_0x444a56);},'YUWBB':_0x258c0b(0xde)},_0x1bb1d4=_0x3a0a5c['eEiBm'](U,_0x42bab5);if(_0x1bb1d4['help'])return console[_0x258c0b(0x148)](_0x258c0b(0x166)+z),0x0;_0x3a0a5c[_0x258c0b(0x10c)](_0x209370);const _0x5d19a3=_0x3a0a5c[_0x258c0b(0x10c)](_0x36c605);if(!_0x5d19a3[_0x258c0b(0x1c4)]['supported'])return _0x11f69a('需要\x20node\x20>=\x2018,当前\x20'+_0x5d19a3[_0x258c0b(0x1c4)][_0x258c0b(0x145)]),0x1;const _0x4a99fa=_0x1bb1d4[_0x258c0b(0x173)]||process[_0x258c0b(0x17a)]['ACTIVATE_API_BASE']||C;_0x3a0a5c[_0x258c0b(0x17f)](_0x5a353d,'API\x20端点:'+_0x4a99fa);const _0x598a82={'yes':!0x0===_0x1bb1d4[_0x258c0b(0x144)],'models':_0x3a0a5c[_0x258c0b(0x1b9)]==typeof _0x1bb1d4[_0x258c0b(0x153)]?_0x1bb1d4[_0x258c0b(0x153)]:void 0x0,'skipCliTests':_0x3a0a5c[_0x258c0b(0x178)](!0x0,_0x1bb1d4[_0x258c0b(0x12b)]),'outDir':_0x1bb1d4[_0x258c0b(0xeb)]};let _0x596d9a;_0x598a82[_0x258c0b(0x144)]||_0x5a353d(_0x3a0a5c[_0x258c0b(0xdb)]);try{_0x596d9a=await _0x3a0a5c[_0x258c0b(0x17f)](_0x362806,{'apiBase':_0x4a99fa,'opts':_0x598a82,'ui':{'banner':_0x209370,'ok':_0x3ec7d7,'fail':_0x11f69a,'warn':_0x39bee0,'info':_0x5a353d,'step':_0x45c391,'plain':_0x334721,'guide':_0x1b59ca,'chalk':_0x53d9b0}});}catch(_0x3405f1){return _0x11f69a(_0x258c0b(0x11c)+(_0x3405f1?.[_0x258c0b(0x160)]||_0x3405f1)),0x1;}return Y(_0x596d9a),_0x3ec7d7('诊断包已生成:'+_0x596d9a['zipPath']),_0x3a0a5c[_0x258c0b(0xe3)](_0x5a353d,_0x3a0a5c['YUWBB']),0x0;},'description':_0x31b175(0x154)}};export const SUBCOMMAND_NAMES=new Set(Object[_0x31b175(0xef)](SUBCOMMANDS));function _0x34f5(){const _0x4c3609=['\x20\x20request_id','VEYDZ','IoCWM','nuUwN','未找到任何备份文件(.bak.*)','yVfga','将恢复\x20','group','如需从备份恢复,请运行:npx\x20@2api-store/activate\x20restore','\x20\x20说明','getHours','无\x20HTTP\x20测试记录','qBhNI','BEJCo','isArray','Suycv','lfXUC','yes','version','GOVJL','jepWg','log','slice','yUOvD','\x0a子命令:\x0a\x20\x20restore\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20从备份恢复(扫描\x20~/.codex\x20/\x20~/.claude\x20/\x20~/.gemini\x20下的\x20.bak.*\x20文件)\x0a\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20恢复官方默认(删\x202api.store\x20写入的配置,并从最新备份恢复)\x0a\x20\x20refresh-groups\x20\x20\x20刷新分组列表(只展示,不改\x20key/配置)\x0a\x20\x20diagnose\x20\x20\x20\x20\x20\x20\x20\x20\x20诊断连接并生成日志压缩包(环境收集+渠道实测+CLI实测,发给客服排障)\x0a\x0a所有子命令都支持\x20--api-base\x20<url>\x20覆盖端点,restore/reset\x20支持\x20--dry-run。\x0a','--yes','filter','length','\x20个备份)','XTRwX','已删除:','origPath','model','诊断连接并生成日志压缩包(发给客服排障)','utf8','bakPath','sk-…','ERR','Hnixy','\x20\x20✓\x20','bold','sort','未查询到可用分组','1377684ionVND','max','message','安全备份当前文件','LViKk','from','88xVuxti','zJxQc','npx\x20@2api-store/activate\x20diagnose\x20[options]\x0a\x0a','184802upzlfU','将执行:','getMonth','uMpRH','xihor','获取可用分组','(请用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)','slow','--api-base','iTepj','sJmIb','hUhkA','apiBase','xFXEa','删除失败\x20','%userprofile%\x5c.codex\x5cconfig.toml','lQmzI','KhVuc','replace','env','--dry-run','将对每个测试模型发送真实计费的小请求(max_tokens=1,每模型约几分钱),用于连通性实测','已安全备份\x20','code','eEiBm','cyan','cli_tests','--help','LnYFJ','key:…','VcwQH','join','\x20\x20•\x20已有\x20API\x20Key\x20绑组:登录管理后台修改,或重新激活(npx\x20@2api-store/activate)','bNUww','dummy','match','%userprofile%\x5c.codex','push','copyFileSync','(本命令仅展示分组,不修改\x20API\x20Key\x20或配置文件)','status','green','\x20|\x20','NNOmo','未找到任何备份文件(reset\x20后这些文件将直接删除,无备份可恢复)','UdczC','kyEIh','从最新备份恢复','gzSqD','已删除\x20','查看可用分组(不改配置)','cZjPJ','~/.codex/config.toml','将处理以下文件:','help','当前端点:','~/.gemini','安全备份:','fQdBx','API\x20端点:','map','verdict','扫描目录:','(跳过删除此文件避免误伤)','padEnd','HOME','Ccezz','wZfIy','[试运行]\x20不真实恢复','3204LAYQTM','.bak.reset.','确认\x20reset\x20吗?','nyZML','hzsCe','oahPi','npx\x20@2api-store/activate\x20refresh-groups\x20[options]\x0a\x0a','选择时间点(回车=最新)','OoEDb','supported','dry-run','(文件已删除,未恢复)','HRQGr','jYgOc','ms/','request_id','%userprofile%\x5c.claude\x5csettings.json','Codex\x20CLI','QmTbV','\x20→\x20','KzYzu','BXqcF','red','trim','node','WqAeJ','提示:只有运行过\x20npx\x20@2api-store/activate\x20后才会产生备份文件','jNZTO','quQwj','\x20个\x202api.store\x20配置文件','从备份恢复配置','未选择应用','mtime','has','relative','2lEFxGz','split','forEach','~/.claude','string','VaNOz','ZpXZe','existsSync','rBqzY','isWindows','iiYCy','orTMk','\x20个文件','161442TnyqIP','HCaXp','dim','WTHJK','BDXeo','dirname','恢复官方默认(删\x202api.store\x20配置并从备份恢复)','mHweH','Claude\x20Code','/cli-tests.jsonl','ttfb_ms','dryRun','14kyasbv','values','nWifB','NxyJw','恢复失败:','⚠️\x20这是破坏性操作:将删除上述配置文件并尝试从备份恢复。','reset\x20报告','724232lDXZtA','name','%userprofile%\x5c.gemini','cinPb','90OkvthB','\x20←\x20','yellow','570UPUwIg','找到\x20','OnhVJ','boTEm','SNwMr','http_tests','vDGXJ','USERPROFILE','pDwfC','扫描备份文件','fHSAb','~/.codex/auth.json','恢复失败\x20','vqIeO','find','yWfai','QvFUI','ttfb/总延迟','需要\x20node\x20>=\x2018,当前\x20','请把\x20zip\x20压缩包发给客服排障(包内已脱敏,不含明文\x20key)','vzOaF','TDykD','确认操作','MIIxD','TFeNV','bTupP','getFullYear','无可恢复的备份','cvqfM','定位\x202api.store\x20写入的配置','EyQQJ','~/.codex','out','https://2api.store','20868SIAQRW','未发现\x202api.store\x20写入的配置文件(可能已\x20reset\x20或从未激活过)','keys','rLfAa','unlinkSync','readFileSync','getMinutes','eZrkm','EwDyc','lISPz','mqKAM','EPERM','neEeJ','安全备份失败\x20','icglD','选择要恢复的应用','诊断摘要','cli','\x20\x20•\x20使用兑换码:重新激活时选目标分组即可','ONqfb','EACCES','从备份恢复\x20','exit_code','duration_ms','repeat','未选择时间点','已恢复:','可能原因:服务端未配置分组\x20/\x20网络错误\x20/\x20端点错误','CDPnn','model:','FuCAe','nmjbu','\x20\x20-\x20删除\x20','toISOString','DDLid','kRYdu','basename','get','toString','7941156waTOQC','\x20\x20-\x20','\x20\x20exit\x20','FgCPB','\x20个备份文件','includes','skip-cli-tests','endsWith','诊断失败:','poRAZ','\x20个文件):','bRQbJ','nBHEA','YTmml','\x20个备份文件(reset\x20后将尝试恢复每个配置的最新备份)','XqnjQ','\x20\x20...(共\x20','删除\x202api.store\x20配置','【试运行模式\x20--dry-run】不会真实恢复文件','💡\x20如需切换分组:','已取消','getSeconds','ACTIVATE_API_BASE','skipCliTests','yiHeH','\x20文件:','startsWith','XUolt','安全备份位置(如需撤销\x20reset,手动恢复这些文件):','uRYbs','weKeP'];_0x34f5=function(){return _0x4c3609;};return _0x34f5();}export{z as SUB_HELP};
@@ -1 +1 @@
1
- const _0x4a7e99=_0x1772;(function(_0x55c9cc,_0x8c02b2){const _0xe377c3=_0x1772,_0x4eaf5e=_0x55c9cc();while(!![]){try{const _0x18935=parseInt(_0xe377c3(0x1be))/0x1*(-parseInt(_0xe377c3(0x1bd))/0x2)+parseInt(_0xe377c3(0x1bf))/0x3*(parseInt(_0xe377c3(0x1ca))/0x4)+parseInt(_0xe377c3(0x1de))/0x5+parseInt(_0xe377c3(0x1cd))/0x6*(-parseInt(_0xe377c3(0x1b4))/0x7)+-parseInt(_0xe377c3(0x1dc))/0x8*(-parseInt(_0xe377c3(0x1dd))/0x9)+parseInt(_0xe377c3(0x1b9))/0xa+-parseInt(_0xe377c3(0x1b5))/0xb;if(_0x18935===_0x8c02b2)break;else _0x4eaf5e['push'](_0x4eaf5e['shift']());}catch(_0x3313b7){_0x4eaf5e['push'](_0x4eaf5e['shift']());}}}(_0x33ff,0x75c6e));import{spawnSync as _0x1e5246}from'node:child_process';function _0x1772(_0x3fb75e,_0x283796){_0x3fb75e=_0x3fb75e-0x1b2;const _0x33ffa3=_0x33ff();let _0x177254=_0x33ffa3[_0x3fb75e];return _0x177254;}export function detectOS(){const _0x14a5cb=_0x1772,_0x54a9be={'uXFpN':function(_0x3c09c4,_0x50970d){return _0x3c09c4===_0x50970d;},'RelsE':_0x14a5cb(0x1e3),'FOwlW':_0x14a5cb(0x1db),'fHIYt':function(_0x329ce2,_0x1b1ec3){return _0x329ce2===_0x1b1ec3;},'VNBYm':_0x14a5cb(0x1d0),'UMOMN':_0x14a5cb(0x1da)},_0x1e2373=process[_0x14a5cb(0x1d3)],_0x84742e=_0x54a9be[_0x14a5cb(0x1e2)](_0x54a9be[_0x14a5cb(0x1cc)],_0x1e2373);return{'platform':_0x1e2373,'isWindows':_0x84742e,'isMac':_0x54a9be[_0x14a5cb(0x1cb)]===_0x1e2373,'isLinux':_0x54a9be['fHIYt'](_0x54a9be[_0x14a5cb(0x1d8)],_0x1e2373),'osType':_0x84742e?'windows':_0x54a9be[_0x14a5cb(0x1cf)]};}export function detectNode(){const _0x552e12=_0x1772,_0x44cc6e=process['versions']['node'],_0x5628cf=parseInt(_0x44cc6e[_0x552e12(0x1b8)]('.')[0x0],0xa);return{'version':_0x44cc6e,'major':_0x5628cf,'supported':_0x5628cf>=0x12};}const e=[_0x4a7e99(0x1c5),_0x4a7e99(0x1d1),_0x4a7e99(0x1d7),_0x4a7e99(0x1c1),_0x4a7e99(0x1bc)];function n(_0x41a4e5,_0x10b8f6){const _0x6bae3f=_0x4a7e99,_0x3d1ed0={'XzdYK':'which','CvNVt':function(_0x51e353,_0x35563f,_0x34eef9,_0x563370){return _0x51e353(_0x35563f,_0x34eef9,_0x563370);},'nLNVO':_0x6bae3f(0x1e0),'SpvSp':_0x6bae3f(0x1b2),'ZvRws':_0x6bae3f(0x1b6),'JzwMy':function(_0x3b84e4,_0x1eac8c){return _0x3b84e4===_0x1eac8c;}},_0x42613c=_0x10b8f6?'where':_0x3d1ed0[_0x6bae3f(0x1b3)];try{const _0x4c5d9f=_0x3d1ed0[_0x6bae3f(0x1bb)](_0x1e5246,_0x42613c,[_0x41a4e5],{'encoding':_0x3d1ed0['nLNVO'],'stdio':[_0x3d1ed0[_0x6bae3f(0x1e1)],_0x3d1ed0[_0x6bae3f(0x1d2)],_0x3d1ed0['SpvSp']],'timeout':0xbb8});if(_0x3d1ed0[_0x6bae3f(0x1c0)](0x0,_0x4c5d9f[_0x6bae3f(0x1b7)])&&_0x4c5d9f[_0x6bae3f(0x1c4)])return _0x4c5d9f[_0x6bae3f(0x1c4)][_0x6bae3f(0x1c7)]()[_0x6bae3f(0x1b8)](/\r?\n/)[0x0]||null;}catch{}return null;}function _0x33ff(){const _0xd03501=['codex','wzNNM','trim','COMSPEC','KfaHE','16XZzbte','FOwlW','RelsE','475644OcbqSK','UfEGy','UMOMN','linux','claude','ZvRws','platform','QHcJN','VeEJI','slice','gemini','VNBYm','XjgRq','unix','darwin','8LeqFkA','398421QloziL','3403930Midser','--version','utf8','SpvSp','uXFpN','win32','ignore','XzdYK','21lWmNnW','3954005weBvbi','pipe','status','split','6252400EXyBWC','cmd.exe','CvNVt','opencode','692768jXysPQ','2ypCMCR','316623ZVNtDs','JzwMy','grok','isWindows','match','stdout'];_0x33ff=function(){return _0xd03501;};return _0x33ff();}function o(_0x58ff2c,_0xb7dcec){const _0x4145e3=_0x4a7e99,_0x71a128={'oXtRx':_0x4145e3(0x1ba),'wzNNM':function(_0x3b80f6,_0x5c49f9,_0x42c0cc,_0x30ec70){return _0x3b80f6(_0x5c49f9,_0x42c0cc,_0x30ec70);},'XjgRq':_0x4145e3(0x1df),'KfaHE':'ignore','QHcJN':function(_0xc37724,_0x3efaeb){return _0xc37724===_0x3efaeb;}};try{const _0x31c4da=_0xb7dcec?process['env'][_0x4145e3(0x1c8)]||_0x71a128['oXtRx']:_0x58ff2c,_0x407547=_0x71a128[_0x4145e3(0x1c6)](_0x1e5246,_0x31c4da,_0xb7dcec?['/c',_0x58ff2c,_0x71a128[_0x4145e3(0x1d9)]]:[_0x71a128['XjgRq']],{'encoding':'utf8','stdio':[_0x71a128[_0x4145e3(0x1c9)],'pipe','pipe'],'timeout':0x1388});if(_0x71a128[_0x4145e3(0x1d4)](0x0,_0x407547[_0x4145e3(0x1b7)])&&_0x407547['stdout']){const _0x17061b=_0x407547['stdout'][_0x4145e3(0x1c7)]()[_0x4145e3(0x1b8)](/\r?\n/)[0x0],_0x407649=_0x17061b[_0x4145e3(0x1c3)](/(\d+\.\d+(?:\.\d+)?(?:[-.\w]*)?)/);return _0x407649?_0x407649[0x1]:_0x17061b[_0x4145e3(0x1d6)](0x0,0x28);}}catch{}return null;}export function detectInstalled(_0x33b15e){const _0x1399bc=_0x4a7e99,_0x1a993d={'fjdQV':function(_0x10f475){return _0x10f475();},'xTsRB':function(_0x4510b0,_0x2d0162,_0xee6e3d){return _0x4510b0(_0x2d0162,_0xee6e3d);}},_0x104955=_0x1a993d['fjdQV'](detectOS),_0x264372=_0x1a993d['xTsRB'](n,_0x33b15e,_0x104955[_0x1399bc(0x1c2)]);if(!_0x264372)return{'installed':!0x1,'path':null,'version':null};return{'installed':!0x0,'path':_0x264372,'version':o(_0x33b15e,_0x104955['isWindows'])};}export function detectInstalledCLIs(_0x38ff42){const _0x11f594=_0x4a7e99,_0xedb058={'VeEJI':function(_0x275514,_0x14994b,_0x1c326b){return _0x275514(_0x14994b,_0x1c326b);}},_0xb5a321={};for(const _0x3e5e05 of e){const _0x77056b=_0xedb058[_0x11f594(0x1d5)](n,_0x3e5e05,_0x38ff42);_0x77056b&&(_0xb5a321[_0x3e5e05]={'path':_0x77056b,'version':o(_0x3e5e05,_0x38ff42)});}return _0xb5a321;}export function detectAll(){const _0x5efeee=_0x4a7e99,_0x58f6cd={'UfEGy':function(_0x1e29b3,_0x12de63){return _0x1e29b3(_0x12de63);}},_0x5e7d1a=detectOS();return{'os':_0x5e7d1a,'node':detectNode(),'installed':_0x58f6cd[_0x5efeee(0x1ce)](detectInstalledCLIs,_0x5e7d1a[_0x5efeee(0x1c2)])};}
1
+ const _0x4a7d98=_0xfafb;(function(_0x150230,_0x2896fa){const _0x32a2ea=_0xfafb,_0x23ea8c=_0x150230();while(!![]){try{const _0xa911ca=parseInt(_0x32a2ea(0x18f))/0x1*(-parseInt(_0x32a2ea(0x174))/0x2)+parseInt(_0x32a2ea(0x181))/0x3+parseInt(_0x32a2ea(0x176))/0x4+parseInt(_0x32a2ea(0x16b))/0x5+parseInt(_0x32a2ea(0x182))/0x6+parseInt(_0x32a2ea(0x168))/0x7*(-parseInt(_0x32a2ea(0x193))/0x8)+-parseInt(_0x32a2ea(0x190))/0x9*(parseInt(_0x32a2ea(0x183))/0xa);if(_0xa911ca===_0x2896fa)break;else _0x23ea8c['push'](_0x23ea8c['shift']());}catch(_0x50f2c8){_0x23ea8c['push'](_0x23ea8c['shift']());}}}(_0x39cb,0xb3298));function _0xfafb(_0x120c59,_0x183ebf){_0x120c59=_0x120c59-0x166;const _0x39cb22=_0x39cb();let _0xfafbde=_0x39cb22[_0x120c59];return _0xfafbde;}import{spawnSync as _0x267027}from'node:child_process';export function detectOS(){const _0x1413b8=_0xfafb,_0x4827d2={'hgWxz':function(_0x2e21b9,_0x34ede4){return _0x2e21b9===_0x34ede4;},'hNnrn':function(_0x5d0610,_0x3af898){return _0x5d0610===_0x3af898;},'SHmaK':_0x1413b8(0x177),'VWoDe':'linux','UsoIF':_0x1413b8(0x178),'CrNMn':_0x1413b8(0x166)},_0xd7fd18=process[_0x1413b8(0x17b)],_0x29654c=_0x4827d2[_0x1413b8(0x169)](_0x1413b8(0x18e),_0xd7fd18);return{'platform':_0xd7fd18,'isWindows':_0x29654c,'isMac':_0x4827d2['hNnrn'](_0x4827d2[_0x1413b8(0x17e)],_0xd7fd18),'isLinux':_0x4827d2['hNnrn'](_0x4827d2[_0x1413b8(0x18d)],_0xd7fd18),'osType':_0x29654c?_0x4827d2[_0x1413b8(0x171)]:_0x4827d2[_0x1413b8(0x16a)]};}export function detectNode(){const _0x47931a=_0xfafb,_0x30cdb2={'hPxfg':function(_0x11d626,_0x1beaa4,_0x500399){return _0x11d626(_0x1beaa4,_0x500399);},'pjCTS':function(_0x513688,_0x427e5e){return _0x513688>=_0x427e5e;}},_0x540c66=process['versions']['node'],_0x1fe0a4=_0x30cdb2['hPxfg'](parseInt,_0x540c66[_0x47931a(0x189)]('.')[0x0],0xa);return{'version':_0x540c66,'major':_0x1fe0a4,'supported':_0x30cdb2['pjCTS'](_0x1fe0a4,0x12)};}const e=[_0x4a7d98(0x16f),_0x4a7d98(0x194),'gemini','grok',_0x4a7d98(0x187)];function n(_0x4dd04e,_0xb06c83){const _0x3d1924=_0x4a7d98,_0x4e24c6={'QgtTO':'where','RYYuL':'which','SSDxA':function(_0x499a40,_0x1f136d,_0x3a0cb4,_0xc9159d){return _0x499a40(_0x1f136d,_0x3a0cb4,_0xc9159d);},'xbrnx':_0x3d1924(0x170),'bYnhV':'ignore','fUDDb':function(_0x27985c,_0x163d36){return _0x27985c===_0x163d36;}},_0x11a871=_0xb06c83?_0x4e24c6[_0x3d1924(0x18a)]:_0x4e24c6[_0x3d1924(0x186)];try{const _0x4efc3a=_0x4e24c6[_0x3d1924(0x17d)](_0x267027,_0x11a871,[_0x4dd04e],{'encoding':_0x4e24c6['xbrnx'],'stdio':[_0x4e24c6[_0x3d1924(0x179)],'pipe',_0x4e24c6[_0x3d1924(0x179)]],'timeout':0xbb8});if(_0x4e24c6[_0x3d1924(0x18c)](0x0,_0x4efc3a[_0x3d1924(0x175)])&&_0x4efc3a[_0x3d1924(0x17f)])return _0x4efc3a[_0x3d1924(0x17f)][_0x3d1924(0x17a)]()[_0x3d1924(0x189)](/\r?\n/)[0x0]||null;}catch{}return null;}function o(_0x923a7,_0x4db2e4){const _0x532456=_0x4a7d98,_0x29cbe4={'DueXu':_0x532456(0x17c),'HgwlO':function(_0x32de84,_0x2e8551,_0x11f73c,_0x4826f5){return _0x32de84(_0x2e8551,_0x11f73c,_0x4826f5);},'oZEWl':'--version','jYukK':_0x532456(0x170),'sUpMk':_0x532456(0x16c),'EikRa':_0x532456(0x185),'TRhOq':function(_0x49f998,_0x11fb38){return _0x49f998===_0x11fb38;}};try{const _0x4c7574=_0x4db2e4?process[_0x532456(0x188)][_0x532456(0x16e)]||_0x29cbe4[_0x532456(0x18b)]:_0x923a7,_0x44ac28=_0x29cbe4[_0x532456(0x184)](_0x267027,_0x4c7574,_0x4db2e4?['/c',_0x923a7,'--version']:[_0x29cbe4[_0x532456(0x16d)]],{'encoding':_0x29cbe4[_0x532456(0x173)],'stdio':[_0x29cbe4['sUpMk'],_0x29cbe4[_0x532456(0x195)],_0x29cbe4[_0x532456(0x195)]],'timeout':0x1388});if(_0x29cbe4[_0x532456(0x180)](0x0,_0x44ac28[_0x532456(0x175)])&&_0x44ac28[_0x532456(0x17f)]){const _0x33e7be=_0x44ac28[_0x532456(0x17f)]['trim']()['split'](/\r?\n/)[0x0],_0x33fdbc=_0x33e7be['match'](/(\d+\.\d+(?:\.\d+)?(?:[-.\w]*)?)/);return _0x33fdbc?_0x33fdbc[0x1]:_0x33e7be['slice'](0x0,0x28);}}catch{}return null;}export function detectInstalled(_0x4a29d1){const _0x4c8914=_0x4a7d98,_0x51e251={'qiSlR':function(_0xed75de,_0x4d8e77,_0x3cb942){return _0xed75de(_0x4d8e77,_0x3cb942);}},_0x1dba76=detectOS(),_0x3be8ff=_0x51e251[_0x4c8914(0x172)](n,_0x4a29d1,_0x1dba76[_0x4c8914(0x192)]);if(!_0x3be8ff)return{'installed':!0x1,'path':null,'version':null};return{'installed':!0x0,'path':_0x3be8ff,'version':_0x51e251[_0x4c8914(0x172)](o,_0x4a29d1,_0x1dba76[_0x4c8914(0x192)])};}function _0x39cb(){const _0x37b03c=['fUDDb','VWoDe','win32','2NwMMim','9wzNUIN','kidhz','isWindows','7720iZvqoE','claude','EikRa','unix','QbTma','7189khMsiM','hgWxz','CrNMn','4105585bdimTR','ignore','oZEWl','COMSPEC','codex','utf8','UsoIF','qiSlR','jYukK','452668lDnNgB','status','3171684HlHDDj','darwin','windows','bYnhV','trim','platform','cmd.exe','SSDxA','SHmaK','stdout','TRhOq','1277409uSdyxJ','6698874CAZiyU','9787490xgZzyD','HgwlO','pipe','RYYuL','opencode','env','split','QgtTO','DueXu'];_0x39cb=function(){return _0x37b03c;};return _0x39cb();}export function detectInstalledCLIs(_0x7ac90e){const _0x1e1166=_0x4a7d98,_0xf89bc8={'QbTma':function(_0x309184,_0x218fe2,_0x5e5340){return _0x309184(_0x218fe2,_0x5e5340);},'kidhz':function(_0x1790a6,_0x3b0165,_0x4ce684){return _0x1790a6(_0x3b0165,_0x4ce684);}},_0x482dff={};for(const _0x5436d6 of e){const _0x4b56e1=_0xf89bc8[_0x1e1166(0x167)](n,_0x5436d6,_0x7ac90e);_0x4b56e1&&(_0x482dff[_0x5436d6]={'path':_0x4b56e1,'version':_0xf89bc8[_0x1e1166(0x191)](o,_0x5436d6,_0x7ac90e)});}return _0x482dff;}export function detectAll(){const _0x196b5b=_0x4a7d98,_0xd67041={'qFvhM':function(_0x482393){return _0x482393();}},_0x4eee3c=_0xd67041['qFvhM'](detectOS);return{'os':_0x4eee3c,'node':detectNode(),'installed':detectInstalledCLIs(_0x4eee3c[_0x196b5b(0x192)])};}