@2api-store/activate 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/dist/activate.mjs +1 -1
- package/dist/lib/api.mjs +1 -1
- package/dist/lib/backup.mjs +1 -1
- package/dist/lib/cmds.mjs +1 -1
- package/dist/lib/detect.mjs +1 -1
- package/dist/lib/device.mjs +1 -1
- package/dist/lib/diagnose.mjs +1 -1
- package/dist/lib/endpoints.mjs +1 -0
- package/dist/lib/install.mjs +1 -1
- package/dist/lib/platforms.mjs +1 -1
- package/dist/lib/pow.mjs +1 -1
- package/dist/lib/prompt.mjs +1 -1
- package/dist/lib/render.mjs +1 -1
- package/dist/lib/ui.mjs +1 -1
- package/dist/lib/write.mjs +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,14 +124,19 @@ npx @2api-store/activate <subcommand> [options] 运行子命令
|
|
|
124
124
|
选项(默认激活流程 + 所有子命令通用):
|
|
125
125
|
--dry-run, -n 不真写配置,只展示将写入什么(不适用 refresh-groups)
|
|
126
126
|
--platform <name> 只激活指定平台(openai/anthropic/gemini/grok/antigravity)
|
|
127
|
-
--api-base <url> 覆盖 API
|
|
127
|
+
--api-base <url> 覆盖 API 端点(逗号分隔多个;默认 https://www.2api.store →
|
|
128
|
+
https://2api.store,网络错误自动切换)
|
|
128
129
|
-h, --help 显示帮助
|
|
129
130
|
-v, --version 显示版本
|
|
130
131
|
```
|
|
131
132
|
|
|
132
133
|
### 环境变量
|
|
133
134
|
|
|
134
|
-
- `ACTIVATE_API_BASE`:覆盖 API 端点(同 `--api-base
|
|
135
|
+
- `ACTIVATE_API_BASE`:覆盖 API 端点(同 `--api-base`,支持逗号分隔多个)。本地开发指向 `http://127.0.0.1:5566`。
|
|
136
|
+
|
|
137
|
+
### 多端点故障转移
|
|
138
|
+
|
|
139
|
+
默认端点列表为 `https://www.2api.store`(DNS-only 直连源站,优先)→ `https://2api.store`(Cloudflare 兜底)。激活/分组/探测请求遇到网络层错误(连接重置、超时等)或服务端 5xx 时自动切换下一个端点重试(每端点最多 2 次);确定性失败(如 401/429)不切换直接报错。
|
|
135
140
|
|
|
136
141
|
### --dry-run
|
|
137
142
|
|
package/dist/activate.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
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);}));
|
|
2
|
+
const _0x5831c0=_0x1563;function _0x1563(_0x158c8b,_0x4a4dd8){_0x158c8b=_0x158c8b-0x150;const _0x146ddc=_0x146d();let _0x15633f=_0x146ddc[_0x158c8b];return _0x15633f;}(function(_0x5e5ee2,_0x452e6a){const _0x522a25=_0x1563,_0x360fb1=_0x5e5ee2();while(!![]){try{const _0x590980=parseInt(_0x522a25(0x163))/0x1*(-parseInt(_0x522a25(0x1ac))/0x2)+parseInt(_0x522a25(0x1cc))/0x3+-parseInt(_0x522a25(0x1b4))/0x4+-parseInt(_0x522a25(0x1c7))/0x5+-parseInt(_0x522a25(0x16a))/0x6+-parseInt(_0x522a25(0x265))/0x7*(-parseInt(_0x522a25(0x16b))/0x8)+parseInt(_0x522a25(0x22e))/0x9*(parseInt(_0x522a25(0x264))/0xa);if(_0x590980===_0x452e6a)break;else _0x360fb1['push'](_0x360fb1['shift']());}catch(_0x55526a){_0x360fb1['push'](_0x360fb1['shift']());}}}(_0x146d,0x2b600),(process[_0x5831c0(0x1c5)](_0x5831c0(0x220)),process[_0x5831c0(0x1bf)]['NODE_NO_WARNINGS']='1'));import{detectAll as _0x4e04bc}from'./lib/detect.mjs';import{cliActivate as _0x3c799b,listGroups as _0x5ce73c,verifyApiKey as _0x51d82f,probeModels as _0xe89c54}from'./lib/api.mjs';import{renderContent as _0xa47c3c,applyModelContextWindow as _0x4ffba5,expandPath as _0xb115b0,listModels as _0x22fae6}from'./lib/render.mjs';import{backupFile as _0x440149}from'./lib/backup.mjs';import{writeFileWithPermission as _0x5b9580,PermissionDeniedError as _0x3bd0a3}from'./lib/write.mjs';import{ask as _0xd54699,askSecret as _0x5a6f9c,multiSelect as _0x2b8665,select as _0x31253b,confirm as _0x487f34,closePrompt as _0x437b75}from'./lib/prompt.mjs';import{banner as _0xa0709,ok as _0x105a42,fail as _0x4b51ed,warn as _0x43ccab,info as _0x2932a8,step as _0xf98b,guide as _0x5a61af,plain as _0x182fbd,chalk as _0xe86476}from'./lib/ui.mjs';function _0x146d(){const _0x107941=['(跳过模型可用性探测:服务端暂不支持或网络不可达)','wjqIk','detectBin','MOvst','已检测到\x20CLI:','(配置已写入,请手动检查)','pdzbq','test','Linux','失败\x20','12oNQtbM','seJWD','BpKxr','未查询到可用分组。请联系管理员开通分组后再激活。','taLuD','isMac','aebhI','\x20→\x20','161964FJDLyD','anthropic','\x20\x20内容预览:','group','isArray','meta','DVVeG','\x0a@2api-store/activate\x20v','windows','Mbtjz','其他(手动输入模型\x20ID)','env','bkibv','zpqRg','isLinux','platform','installPackage','removeAllListeners','awJbG','52330XmIefG','输入模型\x20ID(如\x20gpt-5.6-terra)','已选分组:','redeem','\x20\x20\x20\x20','25287ppDTzL','\x20·\x20node\x20v','Udugs','stack','激活失败:','./package.json','/antigravity','已写入\x20','apiBase','pOHeD','YIAKw','请求\x20GET\x20/v1/models…','base_url_beta','get','unknown','NysUb','empty','shell-only','ejMHA','选择默认模型','zYxzr','map','EqBQX','选择\x20CLI','iSQCM','已选默认模型:','可能是分组不匹配或账号临时不可用,使用时会报\x20404/429','email','raqjd','models','permission-denied','uQrQR','(自动故障转移)','LZhBt','AEhBo','ThWtA','available','\x20个文件','version','zJCVu','pOpra','PXRYF','GoBtZ','lKpYC','yScgN','\x20\x20-\x20','PNlRe','exit','--help','激活报告','bJSVi','需手动执行的\x20shell\x20命令:','reason','iSmIx','model_context_windows','\x20个文件(未真实写入)','获取可用分组','label','gray','BmTzh','content','请输入\x20API\x20Key(sk-...)或兑换码','installed','已写入','JXIul','KDEmu','bRXSq','dry-run','备份位置:','\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或\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20https://www.2api.store\x20→\x20https://2api.store\x20自动故障转移)\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','handler','includes','configs','CnFnA','all','uzOOI','(ID\x20','平台过滤:','\x20已创建,请查收邮件获取初始密码,登录后尽快修改。','AcMWA','skipped','写入失败:','GDHji','未检测到\x20codex/claude/gemini/grok/opencode(可在后续步骤按需自动安装)','warning','YYiPW','PowerShell','zAMnz','path','--platform','hjZIk','api_key','(命令\x20','📧\x20新账号\x20','qHbUN','failed','base_url','oOWQc','410049QmAMoM','key','join','KwJDI','\x20──','sk-','lgrCI','未检测到\x20','(配置仍会写入,但请手动安装后使用)','GNeee','log','建议换用:','filter','未选择任何\x20CLI,退出。','兑换码','klMyB','服务端未返回适配当前系统的配置模板','ZgzjM','DQWXB','\x20项(见上方输出)','\x20\x20\x20\x20...(共\x20','EawQL','nBAWd','then','rwGgH','选择默认模型(最新优先)','catch','argv','config','supported','API\x20Key','MaQfQ','isWindows','has','files','display_name','模型可用性探测:','add','push','cli','凭据格式无法识别(应为\x20sk-\x20前缀的\x20API\x20Key\x20或兑换码)','lXtRz','【试运行模式\x20--dry-run】不会真写文件、不会真装\x20CLI','toLowerCase','name','YqmdP','fIsTl','dim','SnkCF','ELXDA','ACTIVATE_API_BASE','(新用户已创建)','keys','NNRwr','170eQrXsa','10815DSplJk','\x20\x20内容含非法控制字符(疑似服务端模板损坏),已跳过写入。请反馈客服并用\x20restore\x20子命令恢复备份','GumPK','──\x20','FKMxs','\x20安装成功','\x20当前无可用账号','(跳过此文件避免无备份覆盖)','新账号:','\x20已安装','\x20\x20sudo\x20npx\x20-y\x20@2api-store/activate','backup-failed','EiOQM','备份失败:','qQzIa','API\x20端点:','jayAF','请求激活服务','\x20安装(','检查\x20CLI\x20安装状态','clientType','--dry-run','displayName','\x20/\x20','40218NWydfd','trim','alreadyInstalled','startsWith','bdEfP','HTTP\x20','backup','1952382CZzVRQ','64qhZITP','未捕获错误:','HGvZe','IIJAq','Windows','Terminal','action','NxxWW','message','NzHqH','JEvQo','FWMNt','识别为:','help','dryRun','WXYkZ','length','SwhHu','tPCqP','split','client_type','replace','Xlbbl','statusCode','AEKXX','oEwqC','aiQTf','TANIl','user','ZssFT','\x20\x20备份:','未选择分组','\x20\x20[shell\x20命令,请手动执行]','dAjgT','cAuhL','os_type','openai','PmMHo','\x20平台,ID\x20','uXyOH','RiipQ','YbwoB','[试运行]\x20将写入\x20','forEach','BJmMm','(仍会写入配置;如需更换请重跑激活选择其他模型)','已跳过\x20','mode','服务端未返回模型列表,{{defaultModel}}\x20将留空','ONpWq','user-declined','error','--version','model','slice'];_0x146d=function(){return _0x107941;};return _0x146d();}import{getCliMeta as _0x4e6930,isDefaultSelected as _0x2688e1}from'./lib/platforms.mjs';import{ensureInstalled as _0x5c79de}from'./lib/install.mjs';import{SUBCOMMANDS as _0x22cb40,SUBCOMMAND_NAMES as _0x30d1c8,SUB_HELP as _0x3c02ad}from'./lib/cmds.mjs';import{toApiBases as _0x354f86}from'./lib/endpoints.mjs';import{createRequire as _0x4050e8}from'node:module';const L=_0x4050e8(import.meta.url)(_0x5831c0(0x1d1))['version'];(async function(){const _0x485a53=_0x5831c0,_0xa38bf7={'FWMNt':function(_0x41ccbd,_0x3cd361){return _0x41ccbd<_0x3cd361;},'aebhI':function(_0x30de97,_0x1b7134){return _0x30de97===_0x1b7134;},'SwhHu':function(_0x12e3af,_0x522e05){return _0x12e3af===_0x522e05;},'zYxzr':_0x485a53(0x225),'MaQfQ':function(_0xfd3b1e,_0x39b29c){return _0xfd3b1e===_0x39b29c;},'PmMHo':function(_0x3e4ea3,_0x55f16c){return _0x3e4ea3===_0x55f16c;},'LrEpD':'--api-base','HGvZe':function(_0x1d74ea,_0x265fab){return _0x1d74ea===_0x265fab;},'EawQL':_0x485a53(0x19f),'YqmdP':function(_0x266db7,_0x5a31fa){return _0x266db7===_0x5a31fa;},'qQzIa':'claude','ejMHA':'gemini','BTSzO':'grok','aiQTf':function(_0x1e2e45,_0xfb9af1){return _0x1e2e45(_0xfb9af1);},'Mbtjz':function(_0x23e439){return _0x23e439();},'nBAWd':function(_0x1f8a97){return _0x1f8a97();},'RiipQ':'macOS','Axblt':_0x485a53(0x16f),'ONpWq':function(_0x1d1f47,_0x146557){return _0x1d1f47(_0x146557);},'pOHeD':function(_0x20efe7,_0x3b21ec){return _0x20efe7(_0x3b21ec);},'ONGrB':_0x485a53(0x21f),'MOvst':function(_0x3a68aa,_0x5836b6){return _0x3a68aa>_0x5836b6;},'KDEmu':_0x485a53(0x1ec),'UjjnA':_0x485a53(0x209),'FKMxs':_0x485a53(0x233),'klMyB':_0x485a53(0x1da),'IIJAq':_0x485a53(0x1dc),'ZssFT':function(_0x226afe,_0xea3af7){return _0x226afe(_0xea3af7);},'qHbUN':_0x485a53(0x22f),'vYGad':_0x485a53(0x23c),'AEKXX':'redeem','oOWQc':'请输入邮箱(用于兑换码绑定\x20/\x20新账号创建)','lKpYC':'邮箱格式不正确','wjqIk':_0x485a53(0x204),'JEvQo':function(_0x4bddfa,_0x5d51e6){return _0x4bddfa(_0x5d51e6);},'ZgzjM':_0x485a53(0x1af),'taLuD':function(_0x2c2a8f,_0x8bdc3d,_0x11c48e,_0x5c8438){return _0x2c2a8f(_0x8bdc3d,_0x11c48e,_0x5c8438);},'oRNYS':'选择绑定的分组','NysUb':_0x485a53(0x18a),'dPzot':function(_0x2a0637,_0x80e235){return _0x2a0637(_0x80e235);},'NNRwr':_0x485a53(0x15c),'YbwoB':function(_0x3997fd,_0x31f775){return _0x3997fd(_0x31f775);},'AEhBo':function(_0x59e34f,_0x2476db){return _0x59e34f(_0x2476db);},'jayAF':function(_0x3ae17d,_0x2666d7){return _0x3ae17d(_0x2666d7);},'dAjgT':_0x485a53(0x261),'BpKxr':_0x485a53(0x23e),'kniij':'(默认不选)','cAuhL':_0x485a53(0x1e3),'tPCqP':function(_0x247831,_0x3d4a4d,_0x430b2a,_0xf9827e){return _0x247831(_0x3d4a4d,_0x430b2a,_0xf9827e);},'awJbG':'选择要激活的\x20CLI(绿色=已装,灰色=未装;默认只选\x20Codex\x20+\x20Claude\x20Code,其余按需勾选)','EqBQX':function(_0x306a9b,_0x3dfc61){return _0x306a9b===_0x3dfc61;},'NxxWW':function(_0x1d1e30,_0x1ecd51){return _0x1d1e30(_0x1ecd51);},'uQrQR':function(_0x2fc6cd,_0x375c9b){return _0x2fc6cd(_0x375c9b);},'xgqvt':_0x485a53(0x15e),'WXYkZ':function(_0x53cd13,_0x53b13a){return _0x53cd13(_0x53b13a);},'fIsTl':_0x485a53(0x19d),'YIAKw':function(_0xe76197,_0x37f4ea){return _0xe76197(_0x37f4ea);},'eGyLq':'未知错误','yScgN':_0x485a53(0x247),'pdzbq':_0x485a53(0x1a2),'raqjd':function(_0x18e463,_0x408001){return _0x18e463>_0x408001;},'BJmMm':function(_0x26523e,_0x281e1d,_0x1c9458,_0x2c806b){return _0x26523e(_0x281e1d,_0x1c9458,_0x2c806b);},'zAMnz':_0x485a53(0x1df),'Udugs':function(_0x97cc7c,_0x50f3be){return _0x97cc7c===_0x50f3be;},'iSQCM':function(_0x5e543a,_0x2fed0b){return _0x5e543a(_0x2fed0b);},'AcMWA':_0x485a53(0x1c8),'rwGgH':function(_0x399ebb,_0x3ae15f){return _0x399ebb(_0x3ae15f);},'omIxs':function(_0x552d90,_0x33792d){return _0x552d90===_0x33792d;},'TANIl':_0x485a53(0x1e6),'DVVeG':function(_0x219797,_0x337dae){return _0x219797>_0x337dae;},'MlvzM':_0x485a53(0x162),'JXIul':_0x485a53(0x198),'seJWD':function(_0x57b7a9,_0x42cdb9){return _0x57b7a9(_0x42cdb9);},'zpqRg':_0x485a53(0x19b),'SCZpw':function(_0x5e0719,_0x5ce000){return _0x5e0719(_0x5ce000);},'hjZIk':'备份并写入配置','PNlRe':function(_0x3b8c04,_0x24430d){return _0x3b8c04===_0x24430d;},'BmTzh':_0x485a53(0x222),'iSmIx':function(_0x268e06,_0x49bab9,_0xfa34bc){return _0x268e06(_0x49bab9,_0xfa34bc);},'LZhBt':function(_0x1b21ce,_0x10235e){return _0x1b21ce(_0x10235e);},'NzHqH':_0x485a53(0x266),'YYiPW':_0x485a53(0x18b),'oEwqC':function(_0x308af8,_0x4da7b9){return _0x308af8(_0x4da7b9);},'uXyOH':'\x20\x20[试运行]\x20不真实写入','zJCVu':_0x485a53(0x1b6),'ZuPGS':_0x485a53(0x20f),'Xlbbl':function(_0x280289,_0x272b21){return _0x280289(_0x272b21);},'avsXl':_0x485a53(0x156),'EiOQM':function(_0x21fd2b,_0x2759f0){return _0x21fd2b(_0x2759f0);},'ELXDA':_0x485a53(0x20b),'GDHji':'written','CnFnA':function(_0x33cc0e,_0x5ca513){return _0x33cc0e instanceof _0x5ca513;},'bRXSq':_0x485a53(0x1ea),'bkibv':function(_0x4170bf,_0x368114){return _0x4170bf(_0x368114);},'GoBtZ':'failed','bJSVi':'验证\x20API\x20Key','ThWtA':function(_0xa2ba06,_0x365512){return _0xa2ba06(_0x365512);},'bdEfP':_0x485a53(0x1d7),'KwJDI':'API\x20Key\x20验证通过(GET\x20/v1/models\x20→\x20200)','DQWXB':function(_0xccf3de,_0x3e9d23){return _0xccf3de(_0x3e9d23);},'GumPK':_0x485a53(0x1fd),'pOpra':function(_0x4d0eba,_0x22d2e0){return _0x4d0eba(_0x22d2e0);},'lgrCI':function(_0x4c73e4,_0x392451){return _0x4c73e4>_0x392451;},'NUZpb':function(_0x2047d8,_0x557346){return _0x2047d8(_0x557346);},'uzOOI':'部分文件权限不足,请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑:','lXtRz':_0x485a53(0x155),'SnkCF':function(_0x4103a6,_0x4b063d){return _0x4103a6>_0x4b063d;}},_0x5e76e2=process[_0x485a53(0x249)][0x2];if(_0x5e76e2&&!_0x5e76e2[_0x485a53(0x166)]('-')&&_0x30d1c8[_0x485a53(0x24f)](_0x5e76e2)){const _0x1a09b4=process[_0x485a53(0x249)][_0x485a53(0x1a1)](0x3),_0x175e1c=_0x22cb40[_0x5e76e2];try{return await _0x175e1c[_0x485a53(0x212)](_0x1a09b4)||0x0;}catch(_0x19a46b){return _0xa38bf7['aiQTf'](_0x4b51ed,'子命令\x20'+_0x5e76e2+'\x20异常:'+(_0x19a46b?.[_0x485a53(0x173)]||_0x19a46b)),_0x19a46b?.[_0x485a53(0x1cf)]&&console[_0x485a53(0x19e)](_0x19a46b[_0x485a53(0x1cf)]),0x1;}}const _0x16dc5a=function(_0x27367b){const _0x552d28=_0x485a53,_0x57d800={'dryRun':!0x1,'platform':null,'_':[]};for(let _0x343293=0x0;_0xa38bf7[_0x552d28(0x176)](_0x343293,_0x27367b[_0x552d28(0x17b)]);_0x343293++){const _0x5ad9f1=_0x27367b[_0x343293];if(_0x552d28(0x160)===_0x5ad9f1||_0xa38bf7[_0x552d28(0x1b2)]('-n',_0x5ad9f1))_0x57d800[_0x552d28(0x179)]=!0x0;else{if(_0xa38bf7[_0x552d28(0x17c)](_0xa38bf7[_0x552d28(0x1e0)],_0x5ad9f1)||_0xa38bf7[_0x552d28(0x24d)]('-p',_0x5ad9f1))_0x57d800[_0x552d28(0x1c3)]=_0x27367b[++_0x343293];else{if(_0xa38bf7[_0x552d28(0x190)](_0xa38bf7['LrEpD'],_0x5ad9f1))_0x57d800[_0x552d28(0x1d4)]=_0x27367b[++_0x343293];else{if(_0x552d28(0x1fc)===_0x5ad9f1||_0xa38bf7[_0x552d28(0x16d)]('-h',_0x5ad9f1))_0x57d800[_0x552d28(0x178)]=!0x0;else{if(_0xa38bf7[_0x552d28(0x24d)](_0xa38bf7[_0x552d28(0x243)],_0x5ad9f1)||_0xa38bf7[_0x552d28(0x25b)]('-v',_0x5ad9f1))_0x57d800['version']=!0x0;else{if(_0x5ad9f1[_0x552d28(0x166)]('--')&&_0x5ad9f1['includes']('=')){const [_0x3d87e8,_0x427b44]=_0x5ad9f1[_0x552d28(0x1a1)](0x2)[_0x552d28(0x17e)](/=(.*)/,0x2);_0x57d800[_0x3d87e8]=_0x427b44;}else _0x5ad9f1[_0x552d28(0x166)]('--')?_0x57d800[_0x5ad9f1[_0x552d28(0x180)](/^--/,'')]=_0x27367b[++_0x343293]:_0x57d800['_'][_0x552d28(0x254)](_0x5ad9f1);}}}}}}return _0x57d800;}(process[_0x485a53(0x249)][_0x485a53(0x1a1)](0x2));if(_0x16dc5a[_0x485a53(0x178)])return console['log']((_0x485a53(0x1bb)+L+_0x485a53(0x211)+_0x3c02ad+'\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')[_0x485a53(0x164)]()),0x0;if(_0x16dc5a['version'])return console[_0x485a53(0x238)](L),0x0;_0xa38bf7[_0x485a53(0x1bd)](_0xa0709);const _0x4c72df=_0xa38bf7[_0x485a53(0x244)](_0x4e04bc),_0x144455=_0x4c72df['os'][_0x485a53(0x1b1)]?_0xa38bf7[_0x485a53(0x193)]:_0x4c72df['os'][_0x485a53(0x1c2)]?_0x485a53(0x1aa):_0x4c72df['os'][_0x485a53(0x24e)]?_0xa38bf7['Axblt']:_0x4c72df['os'][_0x485a53(0x1c3)];if(_0xa38bf7['ONpWq'](_0x2932a8,'环境:'+_0x144455+_0x485a53(0x1cd)+_0x4c72df['node']['version']),!_0x4c72df['node'][_0x485a53(0x24b)])return _0xa38bf7[_0x485a53(0x19c)](_0x4b51ed,'需要\x20node\x20>=\x2018,当前\x20'+_0x4c72df['node'][_0x485a53(0x1f2)]),0x1;const _0x5c12a0=Object[_0x485a53(0x262)](_0x4c72df[_0x485a53(0x20a)]),_0x2966ca=_0x5c12a0[_0x485a53(0x1e1)](_0x1875d3=>{const _0x573ea8=_0x485a53,_0x218d10=_0x4c72df[_0x573ea8(0x20a)][_0x1875d3]?.[_0x573ea8(0x1f2)];return _0x218d10?_0x1875d3+'@'+_0x218d10:_0x1875d3;});_0x5c12a0['length']>0x0?_0xa38bf7[_0x485a53(0x1d5)](_0x105a42,_0x485a53(0x1a6)+_0x2966ca[_0x485a53(0x230)](',\x20')):_0xa38bf7[_0x485a53(0x1d5)](_0x2932a8,_0xa38bf7['ONGrB']);const _0x9e64f0=_0xa38bf7[_0x485a53(0x19c)](_0x354f86,_0x16dc5a[_0x485a53(0x1d4)]||process['env'][_0x485a53(0x260)]);_0xa38bf7[_0x485a53(0x1d5)](_0x2932a8,_0x485a53(0x15a)+_0x9e64f0[_0x485a53(0x230)](_0x485a53(0x1b3))+(_0xa38bf7[_0x485a53(0x1a5)](_0x9e64f0[_0x485a53(0x17b)],0x1)?_0xa38bf7[_0x485a53(0x20d)]:'')),_0x16dc5a['dryRun']&&_0x43ccab(_0x485a53(0x258)),_0x16dc5a[_0x485a53(0x1c3)]&&_0xa38bf7[_0x485a53(0x19c)](_0x2932a8,_0x485a53(0x219)+_0x16dc5a['platform']),console['log']();const _0x2d7e7a=(await _0xa38bf7[_0x485a53(0x185)](_0x5a6f9c,_0xa38bf7['UjjnA']))[_0x485a53(0x164)]();if(!_0x2d7e7a)return _0xa38bf7['pOHeD'](_0x4b51ed,'未输入凭据'),0x1;const _0x266780=(_0x464548=_0x2d7e7a)?_0x464548[_0x485a53(0x166)](_0xa38bf7[_0x485a53(0x269)])?_0x485a53(0x22f):/^[a-zA-Z0-9]{16,64}$/['test'](_0x464548)?_0x485a53(0x1ca):_0xa38bf7['klMyB']:_0xa38bf7[_0x485a53(0x16e)];var _0x464548;if(_0xa38bf7[_0x485a53(0x23d)]===_0x266780)return _0xa38bf7[_0x485a53(0x1d5)](_0x4b51ed,_0x485a53(0x256)),0x1;_0xa38bf7[_0x485a53(0x188)](_0x2932a8,_0x485a53(0x177)+(_0xa38bf7[_0x485a53(0x22a)]===_0x266780?_0x485a53(0x24c):_0xa38bf7['vYGad'])+'模式');let _0x4fe237,_0x26b022='',_0x574630=null;if(_0xa38bf7[_0x485a53(0x16d)](_0xa38bf7[_0x485a53(0x183)],_0x266780)){if(_0x26b022=(await _0xa38bf7[_0x485a53(0x1d5)](_0xd54699,_0xa38bf7[_0x485a53(0x22d)]))['trim'](),!_0x26b022||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/['test'](_0x26b022))return _0xa38bf7[_0x485a53(0x185)](_0x4b51ed,_0xa38bf7[_0x485a53(0x1f7)]),0x1;_0xf98b(_0xa38bf7[_0x485a53(0x1a3)]);const _0x305a4f=await _0xa38bf7[_0x485a53(0x175)](_0x5ce73c,{'apiBases':_0x9e64f0});if(_0xa38bf7[_0x485a53(0x16d)](0x0,_0x305a4f[_0x485a53(0x17b)]))return _0xa38bf7['ZssFT'](_0x4b51ed,_0xa38bf7[_0x485a53(0x23f)]),0x1;const _0x5b8b13=_0x305a4f['map'](_0x5e53ed=>({'label':''+_0x5e53ed[_0x485a53(0x25a)],'value':_0x5e53ed['id']})),_0x3fb18b=await _0xa38bf7['taLuD'](_0x31253b,_0xa38bf7['oRNYS'],_0x5b8b13,{'defaultIndex':0x0});if(_0x574630=_0x305a4f[_0x3fb18b]?.['id'],!_0x574630)return _0xa38bf7[_0x485a53(0x175)](_0x4b51ed,_0xa38bf7[_0x485a53(0x1db)]),0x1;_0xa38bf7['dPzot'](_0x105a42,_0x485a53(0x1c9)+_0x305a4f[_0x3fb18b][_0x485a53(0x25a)]+_0x485a53(0x218)+_0x574630+')'),console[_0x485a53(0x238)]();}_0xa38bf7[_0x485a53(0x188)](_0xf98b,_0xa38bf7[_0x485a53(0x263)]);try{_0x4fe237=await _0xa38bf7[_0x485a53(0x194)](_0x3c799b,{'credential':_0x2d7e7a,'email':_0x26b022,'platform':_0x16dc5a[_0x485a53(0x1c3)],'groupId':_0x574630,'apiBases':_0x9e64f0});}catch(_0x2076c0){return _0x4b51ed(_0x485a53(0x1d0)+_0x2076c0[_0x485a53(0x173)]),_0x2076c0[_0x485a53(0x182)]&&_0xa38bf7[_0x485a53(0x1ee)](_0x4b51ed,'\x20\x20HTTP\x20'+_0x2076c0[_0x485a53(0x182)]),0x1;}_0x4fe237[_0x485a53(0x1b7)]?.[_0x485a53(0x25a)]&&_0xa38bf7[_0x485a53(0x15b)](_0x2932a8,'你的\x20key\x20所属分组:'+_0x4fe237[_0x485a53(0x1b7)]['name']+'('+(_0x4fe237[_0x485a53(0x1b7)][_0x485a53(0x1c3)]||'未知')+_0x485a53(0x191)+_0x4fe237[_0x485a53(0x1b7)]['id']+')'),_0xa38bf7[_0x485a53(0x194)](_0x105a42,'模式:'+_0x4fe237[_0x485a53(0x19a)]+(_0x4fe237[_0x485a53(0x187)]?.['is_new']?_0xa38bf7[_0x485a53(0x18c)]:'')),_0x4fe237[_0x485a53(0x187)]?.['is_new']&&_0x4fe237['user']?.[_0x485a53(0x1e7)]&&(_0xa38bf7[_0x485a53(0x15b)](_0x2932a8,_0x485a53(0x153)+_0x4fe237[_0x485a53(0x187)][_0x485a53(0x1e7)]),_0x4fe237['user']['message']&&_0x2932a8(_0x4fe237[_0x485a53(0x187)][_0x485a53(0x173)])),console['log']();const _0x30670=function(_0xb2606a){const _0x53add6=_0x485a53,_0x55e4ce=new Set();for(const _0x1fc569 of _0xb2606a||[]){const _0x304933=('string'==typeof _0x1fc569?_0x1fc569:_0x1fc569?.['id']||'')[_0x53add6(0x259)]();/^(gpt|o1|o3|codex|glm|minimax|deepseek)/['test'](_0x304933)?_0x55e4ce[_0x53add6(0x253)](_0x53add6(0x18f)):_0x304933[_0x53add6(0x166)](_0xa38bf7[_0x53add6(0x159)])?_0x55e4ce[_0x53add6(0x253)](_0x53add6(0x1b5)):_0x304933[_0x53add6(0x166)](_0xa38bf7[_0x53add6(0x1de)])?_0x55e4ce[_0x53add6(0x253)](_0xa38bf7[_0x53add6(0x1de)]):_0x304933[_0x53add6(0x166)](_0xa38bf7['BTSzO'])&&_0x55e4ce[_0x53add6(0x253)](_0xa38bf7['BTSzO']);}return[..._0x55e4ce];}(_0x4fe237[_0x485a53(0x1e9)]||[]);_0x16dc5a[_0x485a53(0x1c3)]&&!_0x30670[_0x485a53(0x213)](_0x16dc5a['platform'])&&_0x30670['push'](_0x16dc5a[_0x485a53(0x1c3)]);const _0x123db0=(_0x4fe237[_0x485a53(0x214)]||[])[_0x485a53(0x23a)](_0x5df16f=>!!_0x5df16f&&(!(_0x30670[_0x485a53(0x17b)]>0x0&&!_0x30670[_0x485a53(0x213)](_0x5df16f[_0x485a53(0x1c3)]))&&((!_0x16dc5a[_0x485a53(0x1c3)]||_0x5df16f[_0x485a53(0x1c3)]===_0x16dc5a[_0x485a53(0x1c3)])&&(_0x4c72df['os']['isWindows']?_0x485a53(0x1bc)===_0x5df16f['os_type']||_0x485a53(0x216)===_0x5df16f[_0x485a53(0x18e)]:'unix'===_0x5df16f[_0x485a53(0x18e)]||_0x485a53(0x216)===_0x5df16f[_0x485a53(0x18e)]))));if(_0xa38bf7[_0x485a53(0x25b)](0x0,_0x123db0[_0x485a53(0x17b)]))return _0xa38bf7[_0x485a53(0x188)](_0x4b51ed,_0xa38bf7[_0x485a53(0x1ae)]),0x1;const _0x2118e4=new Set(),_0x466334=[];for(const _0x142821 of _0x123db0){const _0x3eb603=_0x142821[_0x485a53(0x1c3)]+'/'+_0x142821['client_type'];if(_0x2118e4['has'](_0x3eb603))continue;_0x2118e4[_0x485a53(0x253)](_0x3eb603);const _0x41c380=_0x4e6930(_0x142821[_0x485a53(0x17f)]),_0x3496d2=_0x142821[_0x485a53(0x251)]||_0x142821['displayName']||_0x41c380?.['name']||_0x142821['platform']+'\x20'+_0x142821[_0x485a53(0x17f)],_0x100e51=_0x4c72df[_0x485a53(0x20a)][_0x142821[_0x485a53(0x17f)]]?.[_0x485a53(0x224)]||_0x41c380&&_0x4c72df['installed'][_0x41c380[_0x485a53(0x1a4)]]?.['path'],_0x260c84=_0xa38bf7['ZssFT'](_0x2688e1,_0x142821[_0x485a53(0x17f)])?'':_0xa38bf7['kniij'],_0x21082b=_0x100e51?_0xe86476['green'](_0x3496d2):_0xe86476[_0x485a53(0x206)](_0x3496d2+'\x20(未装)');_0x466334[_0x485a53(0x254)]({'label':_0x21082b+'\x20'+_0xe86476[_0x485a53(0x25d)]('['+_0x142821[_0x485a53(0x1c3)]+'/'+_0x142821[_0x485a53(0x17f)]+']')+_0x260c84,'config':_0x142821,'clientType':_0x142821[_0x485a53(0x17f)],'meta':_0x41c380,'alreadyInstalled':!!_0x100e51});}const _0xebc66a=_0x466334[_0x485a53(0x1e1)]((_0x207f0f,_0x47944a)=>({'item':_0x207f0f,'i':_0x47944a}))[_0x485a53(0x23a)](({item:_0x320475})=>_0x2688e1(_0x320475[_0x485a53(0x15f)]))[_0x485a53(0x1e1)](({i:_0x114701})=>_0x114701);_0xa38bf7['dPzot'](_0xf98b,_0xa38bf7[_0x485a53(0x18d)]);const _0x35f5c4=await _0xa38bf7[_0x485a53(0x17d)](_0x2b8665,_0xa38bf7[_0x485a53(0x1c6)],_0x466334,{'defaultSelected':_0xebc66a});if(_0xa38bf7[_0x485a53(0x1e2)](0x0,_0x35f5c4[_0x485a53(0x17b)]))return _0xa38bf7['NxxWW'](_0x182fbd,_0x485a53(0x23b)),0x0;const _0x3632c7=_0x35f5c4['map'](_0x41bbad=>_0x466334[_0x41bbad]);if(console['log'](),!_0x16dc5a[_0x485a53(0x179)]){_0xa38bf7[_0x485a53(0x1eb)](_0xf98b,_0xa38bf7['xgqvt']);for(const _0x2bd4f1 of _0x3632c7){if(_0x2bd4f1[_0x485a53(0x165)]){const _0x13830a=_0x4c72df[_0x485a53(0x20a)][_0x2bd4f1['clientType']]?.['version']||_0x4c72df['installed'][_0x2bd4f1[_0x485a53(0x1b9)]?.[_0x485a53(0x1a4)]]?.['version'];_0xa38bf7[_0x485a53(0x17a)](_0x105a42,(_0x2bd4f1[_0x485a53(0x1b9)]?.[_0x485a53(0x25a)]||_0x2bd4f1[_0x485a53(0x15f)])+_0x485a53(0x154)+(_0x13830a?'(v'+_0x13830a+')':''));continue;}if(!_0x2bd4f1[_0x485a53(0x1b9)]||!_0x2bd4f1[_0x485a53(0x1b9)][_0x485a53(0x1c4)]){_0xa38bf7[_0x485a53(0x19c)](_0x43ccab,_0x2bd4f1[_0x485a53(0x15f)]+'\x20无可自动安装的\x20npm\x20包,请手动安装后重跑(配置仍会写入)');continue;}_0xa38bf7[_0x485a53(0x194)](_0x2932a8,_0x485a53(0x235)+_0x2bd4f1[_0x485a53(0x1b9)][_0x485a53(0x25a)]+_0x485a53(0x228)+_0x2bd4f1[_0x485a53(0x1b9)][_0x485a53(0x1a4)]+')');const _0x33c864=await _0x5c79de(_0x2bd4f1['meta'],{'dryRun':_0x16dc5a['dryRun']});_0x33c864[_0x485a53(0x20a)]?_0xa38bf7[_0x485a53(0x188)](_0x105a42,_0x2bd4f1[_0x485a53(0x1b9)][_0x485a53(0x25a)]+_0x485a53(0x150)+(_0x33c864['version']?'(v'+_0x33c864['version']+')':'')):_0x33c864[_0x485a53(0x21c)]&&_0xa38bf7[_0x485a53(0x17c)](_0xa38bf7[_0x485a53(0x25c)],_0x33c864['reason'])?_0x43ccab(_0x485a53(0x199)+_0x2bd4f1[_0x485a53(0x1b9)]['name']+'\x20安装(配置仍会写入,但请手动安装后使用)'):_0x33c864[_0x485a53(0x21c)]?_0xa38bf7[_0x485a53(0x1d6)](_0x2932a8,'已跳过\x20'+_0x2bd4f1[_0x485a53(0x1b9)][_0x485a53(0x25a)]+_0x485a53(0x15d)+_0x33c864[_0x485a53(0x200)]+')'):_0xa38bf7['YbwoB'](_0x4b51ed,_0x2bd4f1[_0x485a53(0x1b9)][_0x485a53(0x25a)]+'\x20安装失败:'+(_0x33c864[_0x485a53(0x19e)]||_0xa38bf7['eGyLq'])+_0x485a53(0x236));}console[_0x485a53(0x238)]();}const _0x2b2b3d=_0xa38bf7['uQrQR'](_0x22fae6,_0x4fe237[_0x485a53(0x1e9)]||[]);let _0x117d06='';if(_0xa38bf7[_0x485a53(0x1a5)](_0x2b2b3d[_0x485a53(0x17b)],0x0)){_0xa38bf7[_0x485a53(0x1eb)](_0xf98b,_0xa38bf7[_0x485a53(0x1f8)]);let _0x283ae4=null;if(_0x2d7e7a[_0x485a53(0x166)](_0xa38bf7[_0x485a53(0x269)]))try{const _0x598ead=await _0xe89c54({'credential':_0x2d7e7a,'apiBases':_0x9e64f0});_0x598ead&&Array[_0x485a53(0x1b8)](_0x598ead['models'])&&(_0x283ae4=new Map(_0x598ead[_0x485a53(0x1e9)][_0x485a53(0x1e1)](_0x3288be=>[_0x3288be[_0x485a53(0x1a0)],!!_0x3288be[_0x485a53(0x1f0)]])));}catch{_0xa38bf7['YIAKw'](_0x2932a8,_0xa38bf7[_0x485a53(0x1a8)]);}let _0x569ab6=_0x2b2b3d;if(_0x283ae4){_0x569ab6=[..._0x2b2b3d['filter'](_0x399daf=>!0x1!==_0x283ae4[_0x485a53(0x1d9)](_0x399daf['id'])),..._0x2b2b3d[_0x485a53(0x23a)](_0x54ad1f=>!0x1===_0x283ae4[_0x485a53(0x1d9)](_0x54ad1f['id']))];const _0xe5a495=_0x569ab6['filter'](_0x3bad84=>!0x1===_0x283ae4[_0x485a53(0x1d9)](_0x3bad84['id']))[_0x485a53(0x17b)];_0xa38bf7[_0x485a53(0x1e8)](_0xe5a495,0x0)&&_0xa38bf7[_0x485a53(0x172)](_0x2932a8,'⚠\x20'+_0xe5a495+'\x20个模型当前无可用账号(标注\x20⚠,可能是分组不匹配或账号临时不可用)');}const _0x563ec1=0xa,_0x373ca6=_0x569ab6[_0x485a53(0x1a1)](0x0,_0x563ec1),_0x2f5336=_0x569ab6[_0x485a53(0x17b)]>_0x563ec1,_0x2a33da=_0x2c37d5=>_0x283ae4?!0x1===_0x283ae4[_0x485a53(0x1d9)](_0x2c37d5['id'])?'⚠\x20':'✓\x20':'',_0x5d5c44=[..._0x373ca6['map'](_0x418949=>({'label':''+_0x2a33da(_0x418949)+_0x418949[_0x485a53(0x205)]+'\x20('+_0x418949['id']+')'})),..._0x2f5336?[{'label':_0xe86476['dim'](_0x485a53(0x1be))}]:[]],_0x22532e=await _0xa38bf7[_0x485a53(0x197)](_0x31253b,_0xa38bf7[_0x485a53(0x223)],_0x5d5c44,{'defaultIndex':0x0});if(_0x2f5336&&_0xa38bf7[_0x485a53(0x1ce)](_0x22532e,_0x373ca6[_0x485a53(0x17b)])?(_0x117d06=(await _0xa38bf7[_0x485a53(0x1e4)](_0xd54699,_0xa38bf7[_0x485a53(0x21b)]))['trim'](),_0x117d06||(_0x117d06=_0x373ca6[0x0]['id'])):_0x117d06=_0x373ca6[_0x22532e]['id'],_0xa38bf7[_0x485a53(0x246)](_0x105a42,_0x485a53(0x1e5)+_0x117d06),_0x283ae4&&_0xa38bf7['omIxs'](!0x1,_0x283ae4[_0x485a53(0x1d9)](_0x117d06))){const _0x25752e=_0x569ab6['filter'](_0x2ccb01=>!0x1!==_0x283ae4['get'](_0x2ccb01['id']))[_0x485a53(0x1a1)](0x0,0x3)['map'](_0x14d919=>_0x14d919['id']);_0xa38bf7[_0x485a53(0x1d5)](_0x43ccab,_0x485a53(0x252)+_0x117d06+_0x485a53(0x151)),_0xa38bf7[_0x485a53(0x246)](_0x43ccab,_0xa38bf7[_0x485a53(0x186)]),_0xa38bf7[_0x485a53(0x1ba)](_0x25752e[_0x485a53(0x17b)],0x0)&&_0xa38bf7[_0x485a53(0x175)](_0x43ccab,_0x485a53(0x239)+_0x25752e[_0x485a53(0x230)](_0xa38bf7['MlvzM'])),_0x43ccab(_0xa38bf7[_0x485a53(0x20c)]);}}else _0xa38bf7[_0x485a53(0x1ad)](_0x43ccab,_0xa38bf7[_0x485a53(0x1c1)]);console['log']();const _0x541168=_0x4fe237[_0x485a53(0x22c)]||'',_0x29b5ab=_0x4fe237[_0x485a53(0x1d8)]||_0x541168,_0x3de0bc={'apiKey':_0x4fe237[_0x485a53(0x227)]||'','baseUrl':_0x541168,'apiBase':_0x541168,'apiBaseBeta':_0x29b5ab,'antigravityApiBase':_0x541168+_0x485a53(0x1d2),'antigravityApiBaseBeta':_0x29b5ab+_0x485a53(0x1d2),'defaultModel':_0x117d06};_0xa38bf7['SCZpw'](_0xf98b,_0xa38bf7[_0x485a53(0x226)]);const _0x13db00=[];let _0x6ff443=null;for(const _0x27293f of _0x3632c7){const _0x29dbcd=_0x27293f[_0x485a53(0x24a)][_0x485a53(0x251)]||_0x27293f[_0x485a53(0x24a)][_0x485a53(0x161)]||_0x27293f['meta']?.[_0x485a53(0x25a)]||_0x27293f['clientType'];_0x182fbd(_0x485a53(0x268)+_0x29dbcd+_0x485a53(0x232));const _0x52e39b=_0x27293f['config'][_0x485a53(0x250)]||[];for(const _0x20e7f6 of _0x52e39b){const _0x4173ff=_0x20e7f6[_0x485a53(0x224)]||'',_0x2cb461=_0xa38bf7[_0x485a53(0x1fa)](_0x485a53(0x170),_0x4173ff)||_0xa38bf7[_0x485a53(0x190)](_0xa38bf7[_0x485a53(0x207)],_0x4173ff),_0x23bf90=_0x2cb461?_0x4173ff:_0xa38bf7[_0x485a53(0x201)](_0xb115b0,_0x4173ff,{'isWindows':_0x4c72df['os']['isWindows']}),_0x70d1cf=_0xa38bf7[_0x485a53(0x1b0)](_0x4ffba5,_0xa38bf7[_0x485a53(0x201)](_0xa47c3c,_0x20e7f6[_0x485a53(0x208)]||'',_0x3de0bc),_0x4fe237[_0x485a53(0x202)],_0x117d06);if(/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/[_0x485a53(0x1a9)](_0x70d1cf)){_0xa38bf7[_0x485a53(0x1ed)](_0x4b51ed,_0xa38bf7[_0x485a53(0x174)]),_0x13db00[_0x485a53(0x254)]({'cli':_0x29dbcd,'path':_0x23bf90,'action':'control-char-skipped'});continue;}if(_0x2cb461){_0xa38bf7['iSQCM'](_0x182fbd,_0xa38bf7[_0x485a53(0x221)]),_0xa38bf7['AEhBo'](_0x182fbd,_0x70d1cf['split']('\x0a')[_0x485a53(0x1e1)](_0x36182c=>'\x20\x20\x20\x20'+_0x36182c)[_0x485a53(0x230)]('\x0a')),_0x13db00[_0x485a53(0x254)]({'cli':_0x29dbcd,'path':_0x4173ff,'action':'shell-only'});continue;}if(_0xa38bf7[_0x485a53(0x184)](_0x182fbd,'\x20\x20目标:'+_0x23bf90),_0x16dc5a[_0x485a53(0x179)]){_0xa38bf7[_0x485a53(0x194)](_0x43ccab,_0xa38bf7[_0x485a53(0x192)]);const _0x31fa50=_0x70d1cf[_0x485a53(0x17e)]('\x0a'),_0x15b1c1=_0x31fa50[_0x485a53(0x1a1)](0x0,0x8)[_0x485a53(0x230)]('\x0a');_0xa38bf7[_0x485a53(0x1ed)](_0x182fbd,_0xa38bf7[_0x485a53(0x1f3)]),_0x182fbd(_0x15b1c1[_0x485a53(0x17e)]('\x0a')[_0x485a53(0x1e1)](_0x2fa45a=>_0x485a53(0x1cb)+_0x2fa45a)['join']('\x0a')),_0xa38bf7['DVVeG'](_0x31fa50[_0x485a53(0x17b)],0x8)&&_0xa38bf7[_0x485a53(0x1eb)](_0x182fbd,_0x485a53(0x242)+_0x31fa50[_0x485a53(0x17b)]+'\x20行)'),_0x13db00['push']({'cli':_0x29dbcd,'path':_0x23bf90,'action':_0xa38bf7['ZuPGS']}),console[_0x485a53(0x238)]();continue;}let _0x2994b6=null;try{_0x2994b6=_0xa38bf7[_0x485a53(0x181)](_0x440149,_0x23bf90),_0x2994b6&&_0xa38bf7[_0x485a53(0x1ed)](_0x182fbd,_0x485a53(0x189)+_0x2994b6);}catch(_0x149dfe){_0x4b51ed(_0x485a53(0x158)+_0x149dfe['message']+_0x485a53(0x152)),_0x13db00[_0x485a53(0x254)]({'cli':_0x29dbcd,'path':_0x23bf90,'action':_0xa38bf7['avsXl'],'error':_0x149dfe[_0x485a53(0x173)]});continue;}try{_0x5b9580(_0x23bf90,_0x70d1cf,{'isWindows':_0x4c72df['os'][_0x485a53(0x24e)]}),_0xa38bf7[_0x485a53(0x157)](_0x105a42,_0xa38bf7[_0x485a53(0x25f)]),_0x13db00[_0x485a53(0x254)]({'cli':_0x29dbcd,'path':_0x23bf90,'action':_0xa38bf7[_0x485a53(0x21e)],'backup':_0x2994b6});}catch(_0x88a349){_0xa38bf7[_0x485a53(0x215)](_0x88a349,_0x3bd0a3)?(_0x6ff443||(_0x6ff443=_0x88a349),_0x4b51ed(_0x88a349['message']),_0x13db00['push']({'cli':_0x29dbcd,'path':_0x23bf90,'action':_0xa38bf7[_0x485a53(0x20e)],'error':_0x88a349['message']})):(_0xa38bf7[_0x485a53(0x1c0)](_0x4b51ed,_0x485a53(0x21d)+_0x88a349[_0x485a53(0x173)]),_0x13db00[_0x485a53(0x254)]({'cli':_0x29dbcd,'path':_0x23bf90,'action':_0xa38bf7[_0x485a53(0x1f6)],'error':_0x88a349['message']}));}}console[_0x485a53(0x238)]();}if(_0xa38bf7['Mbtjz'](_0x437b75),!_0x16dc5a[_0x485a53(0x179)]&&_0x4fe237['api_key']&&_0x4fe237[_0x485a53(0x22c)]){_0xa38bf7[_0x485a53(0x246)](_0xf98b,_0xa38bf7[_0x485a53(0x1fe)]),_0xa38bf7[_0x485a53(0x1ef)](_0x2932a8,_0xa38bf7[_0x485a53(0x167)]);const _0x2441dc=await _0x51d82f({'apiKey':_0x4fe237['api_key'],'baseUrl':_0x4fe237[_0x485a53(0x22c)]});_0x2441dc['ok']?_0xa38bf7[_0x485a53(0x188)](_0x105a42,_0xa38bf7[_0x485a53(0x231)]):_0x43ccab('验证未通过:'+(_0x2441dc[_0x485a53(0x19e)]||_0x485a53(0x168)+_0x2441dc[_0x485a53(0x182)])+_0x485a53(0x1a7)),console['log']();}_0xa38bf7[_0x485a53(0x240)](_0xf98b,_0xa38bf7[_0x485a53(0x267)]);const _0x413541=_0x13db00[_0x485a53(0x23a)](_0x440c31=>'written'===_0x440c31[_0x485a53(0x171)]),_0x58c4de=_0x13db00[_0x485a53(0x23a)](_0x4b7cb7=>_0x485a53(0x22b)===_0x4b7cb7[_0x485a53(0x171)]||_0x485a53(0x1ea)===_0x4b7cb7[_0x485a53(0x171)]||_0x485a53(0x156)===_0x4b7cb7[_0x485a53(0x171)]),_0x1f3356=_0x13db00[_0x485a53(0x23a)](_0x13e50d=>_0x485a53(0x1dd)===_0x13e50d[_0x485a53(0x171)]),_0x56faea=_0x13db00[_0x485a53(0x23a)](_0x594884=>_0x485a53(0x20f)===_0x594884['action']);_0x16dc5a[_0x485a53(0x179)]?_0x182fbd(_0x485a53(0x195)+_0x56faea[_0x485a53(0x17b)]+_0x485a53(0x203)):_0xa38bf7[_0x485a53(0x175)](_0x105a42,_0x485a53(0x1d3)+_0x413541[_0x485a53(0x17b)]+_0x485a53(0x1f1)),_0x1f3356[_0x485a53(0x17b)]>0x0&&_0xa38bf7[_0x485a53(0x1f4)](_0x2932a8,_0x485a53(0x1ff)+_0x1f3356[_0x485a53(0x17b)]+_0x485a53(0x241)),_0xa38bf7[_0x485a53(0x234)](_0x58c4de[_0x485a53(0x17b)],0x0)&&(_0x43ccab(_0x485a53(0x1ab)+_0x58c4de['length']+'\x20项:'),_0x58c4de[_0x485a53(0x196)](_0x4f44c9=>_0x43ccab(_0x485a53(0x1f9)+_0x4f44c9[_0x485a53(0x255)]+'\x20'+_0x4f44c9[_0x485a53(0x224)])));const _0x4d09f3=_0x13db00[_0x485a53(0x23a)](_0x3e3d72=>_0x3e3d72[_0x485a53(0x169)])[_0x485a53(0x1e1)](_0x2629e8=>_0x2629e8[_0x485a53(0x169)]);if(_0xa38bf7[_0x485a53(0x1e8)](_0x4d09f3['length'],0x0)&&(_0xa38bf7['NUZpb'](_0x2932a8,_0x485a53(0x210)),_0x4d09f3['forEach'](_0x3b7687=>_0x182fbd(_0x485a53(0x1f9)+_0x3b7687))),_0x4fe237[_0x485a53(0x187)]?.['is_new']&&(console[_0x485a53(0x238)](),_0xa38bf7[_0x485a53(0x246)](_0x2932a8,_0x485a53(0x229)+(_0x4fe237[_0x485a53(0x187)][_0x485a53(0x1e7)]||'')+_0x485a53(0x21a))),!_0x16dc5a['dryRun']){const _0x19b402=_0x3632c7[_0x485a53(0x1e1)](_0x23a849=>_0x23a849['meta'])[_0x485a53(0x23a)](Boolean)[_0x485a53(0x1e1)](_0x327d12=>({'name':_0x327d12[_0x485a53(0x25a)],'startCmd':_0x327d12['startCmd'],'usage':_0x327d12['usage']}));_0xa38bf7[_0x485a53(0x194)](_0x5a61af,_0x19b402);}return _0x6ff443?(console['log'](),_0x4b51ed(_0xa38bf7[_0x485a53(0x217)]),_0x4b51ed(_0xa38bf7[_0x485a53(0x257)]),0x2):_0xa38bf7[_0x485a53(0x25e)](_0x58c4de[_0x485a53(0x17b)],0x0)?0x3:0x0;}()[_0x5831c0(0x245)](_0x2ad4d7=>{const _0xec3b7e=_0x5831c0,_0x380561={'GNeee':function(_0x1c6ac7){return _0x1c6ac7();}};_0x380561[_0xec3b7e(0x237)](_0x437b75),process['exit'](_0x2ad4d7||0x0);})[_0x5831c0(0x248)](_0x34ae0e=>{const _0x5d8f64=_0x5831c0,_0x3211be={'PXRYF':function(_0x217afa){return _0x217afa();}};_0x4b51ed(_0x5d8f64(0x16c)+(_0x34ae0e?.[_0x5d8f64(0x173)]||_0x34ae0e)),_0x34ae0e?.[_0x5d8f64(0x1cf)]&&console[_0x5d8f64(0x19e)](_0x34ae0e['stack']),_0x3211be[_0x5d8f64(0x1f5)](_0x437b75),process[_0x5d8f64(0x1fb)](0x1);}));
|
package/dist/lib/api.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
+
const _0x4af3f9=_0x1925;(function(_0x2fc845,_0x2aee40){const _0x4be75e=_0x1925,_0x2611a1=_0x2fc845();while(!![]){try{const _0x38b1e1=parseInt(_0x4be75e(0x17c))/0x1*(parseInt(_0x4be75e(0x1d7))/0x2)+parseInt(_0x4be75e(0x1c9))/0x3+parseInt(_0x4be75e(0x1d3))/0x4+parseInt(_0x4be75e(0x19f))/0x5+parseInt(_0x4be75e(0x1a9))/0x6*(parseInt(_0x4be75e(0x19a))/0x7)+-parseInt(_0x4be75e(0x186))/0x8*(parseInt(_0x4be75e(0x1a1))/0x9)+-parseInt(_0x4be75e(0x16d))/0xa*(parseInt(_0x4be75e(0x1aa))/0xb);if(_0x38b1e1===_0x2aee40)break;else _0x2611a1['push'](_0x2611a1['shift']());}catch(_0x438026){_0x2611a1['push'](_0x2611a1['shift']());}}}(_0x3e79,0xa21ea));function _0x1925(_0x5e7730,_0x114fc7){_0x5e7730=_0x5e7730-0x166;const _0x3e798f=_0x3e79();let _0x192519=_0x3e798f[_0x5e7730];return _0x192519;}import _0x211f6b from'node:https';import _0x12a053 from'node:http';import{createRequire as _0x19d101}from'node:module';function _0x3e79(){const _0x21675d=['ETIMEDOUT','641223uhuOVm','xxhFv','https:','protocol','无效的\x20API\x20端点:','vtlFK','base','tBGzR','53628BtEMmm','33HwkwXR','BEOdV','join','error','AGkjp','qrQuJ','GkzwQ','HYNJp','destroy','toString','iXMTT','knjmB','jekJE','UANFH','JWWnm','dqjWk','GET','YhIBU','difficulty','version','slice','hesoN','CSXCh','hyoUc','isArray','ljMbj','NyauI','bveSI','vIIne','message','jVGaT','2929578EBQeKw','end','Pgoej','ooPQs','wDseB','bvdSf','LuRnM','uYRjL','LZPWs','pjIGV','1589476asruYu','puPME','fPGNo','POST','666704SbMwBN','HTTP\x20','raw','dpDel','push','groups','IgtkK','WmlfB','aSaWl','request','statusCode','10171770ZHEmgt','write','application/json','mmTxI','QvVeR','data','XakOp','href','zfUAY','yQgco','oasUT','s)—\x20','challenge','timeout','body','2conHvx','rjSjg','byteLength','KkdXW','dCpXs','parse','Bearer\x20','@2api-store/activate/','响应非\x20JSON(HTTP\x20','utf8','16NarJNG','iLkBl','QyuMl','OsVqV','concat','GyZqT','/api/v1/cli/probe-models','XJdNw','GcHQj','qSjIe','object','GGPvN','OwXCM','/api/v1/cli/activate','llDtg','gulya','验证请求超时(15s)','uhkRD','../package.json','请求超时(30s)—\x20','903WYSWSZ','stringify','响应非\x20JSON','filter','XaXZN','3322330ZSJcjd'];_0x3e79=function(){return _0x21675d;};return _0x3e79();}import{getDeviceId as _0x1ca8c7}from'./device.mjs';import{getChallenge as _0x51fc13,solvePoW as _0x35ae7a}from'./pow.mjs';import{toApiBases as _0x11b14f,withFailover as _0x2421fc}from'./endpoints.mjs';const c=_0x19d101(import.meta.url)(_0x4af3f9(0x198))[_0x4af3f9(0x1bd)],d=_0x4af3f9(0x183)+c,u=0x7530;function p(_0x4a0fe3,_0x3bfc9e={}){return{'User-Agent':d,'X-Device-Id':_0x4a0fe3,..._0x3bfc9e};}export async function cliActivate({credential:_0xb6ad49,email:_0x12a056,platform:_0x713308,groupId:_0x451959,apiBase:_0x3820e5,apiBases:_0x52359f}){const _0x3055a8=_0x4af3f9,_0x47a3c1={'sYBFg':'utf8','IgtkK':function(_0x1b76fb,_0x209d9d){return _0x1b76fb(_0x209d9d);},'IOPRC':function(_0x28e0fd,_0x1293fb){return _0x28e0fd<_0x1293fb;},'GGPvN':function(_0x93a09a,_0x21d3f3){return _0x93a09a==_0x21d3f3;},'iXMTT':_0x3055a8(0x193),'mhvkg':function(_0x8802d2,_0x233ad8){return _0x8802d2===_0x233ad8;},'uYRjL':_0x3055a8(0x1a3),'hesoN':_0x3055a8(0x1d6),'WmlfB':function(_0x40a40e,_0x575f63,_0x52ffad){return _0x40a40e(_0x575f63,_0x52ffad);},'yvbau':_0x3055a8(0x16f),'rrgJB':_0x3055a8(0x17a),'dqjWk':_0x3055a8(0x1ad),'zfUAY':function(_0x5660fc,_0x39e255){return _0x5660fc(_0x39e255);},'OwXCM':function(_0x5769a0){return _0x5769a0();},'HYNJp':function(_0x54eca4,_0x5ebf10,_0x51f9fc,_0xa9514e){return _0x54eca4(_0x5ebf10,_0x51f9fc,_0xa9514e);}},_0x2a9696=_0x47a3c1[_0x3055a8(0x175)](_0x11b14f,_0x52359f??_0x3820e5),_0x3c2bc9=_0x47a3c1[_0x3055a8(0x192)](_0x1ca8c7);let _0x5d9663,_0x4492d4,_0x580f31;try{const _0x5cdcc1=await _0x47a3c1[_0x3055a8(0x169)](_0x2421fc,_0x2a9696,async _0x67632a=>({...await _0x51fc13({'apiBase':_0x67632a,'deviceId':_0x3c2bc9}),'base':_0x67632a}));_0x5d9663=_0x5cdcc1[_0x3055a8(0x179)],_0x4492d4=_0x47a3c1[_0x3055a8(0x169)](_0x35ae7a,_0x5cdcc1['challenge'],_0x5cdcc1[_0x3055a8(0x1bc)]),_0x580f31=_0x5cdcc1[_0x3055a8(0x1a7)];}catch(_0x365710){throw new Error('PoW\x20challenge\x20获取失败(已尝试\x20'+_0x2a9696[_0x3055a8(0x1ac)]('、')+'):'+_0x365710['message']);}const _0x40a657=[_0x580f31,..._0x2a9696[_0x3055a8(0x19d)](_0x4bcc82=>_0x4bcc82!==_0x580f31)];return _0x47a3c1[_0x3055a8(0x1b1)](_0x2421fc,_0x40a657,_0x5e12de=>function({base:_0x30aac8,deviceId:_0x27df33,credential:_0x4ed6e5,email:_0x4dc065,platform:_0xfbbaa2,groupId:_0x211ebf,powChallenge:_0x334a2b,powNonce:_0x584f53}){return new Promise((_0x14a22c,_0x2cf495)=>{const _0x322784=_0x1925,_0x30b4eb={'AGkjp':_0x47a3c1['sYBFg'],'XakOp':function(_0x5f5a14,_0x3b86f1){const _0x5a7a37=_0x1925;return _0x47a3c1[_0x5a7a37(0x168)](_0x5f5a14,_0x3b86f1);},'kBvfJ':function(_0x34e6d1,_0x3ec3b5){return _0x47a3c1['IOPRC'](_0x34e6d1,_0x3ec3b5);},'dpDel':function(_0x4ae66e,_0x16097d){const _0x4c780b=_0x1925;return _0x47a3c1[_0x4c780b(0x191)](_0x4ae66e,_0x16097d);},'GyZqT':_0x322784(0x190),'dCpXs':'end'};let _0x7fbc5e;try{_0x7fbc5e=new URL(_0x47a3c1[_0x322784(0x1b4)],_0x30aac8);}catch(_0x2819d0){return void _0x47a3c1[_0x322784(0x168)](_0x2cf495,new Error(_0x322784(0x1a5)+_0x30aac8+'('+_0x2819d0[_0x322784(0x1c7)]+')'));}const _0x4d2fcb=_0x47a3c1['mhvkg'](_0x47a3c1[_0x322784(0x1d0)],_0x7fbc5e[_0x322784(0x1a4)])?_0x211f6b:_0x12a053,_0x44fddd={'credential':_0x4ed6e5,'cli_version':c,..._0x4dc065?{'email':_0x4dc065}:{},..._0xfbbaa2?{'platform':_0xfbbaa2}:{},..._0x211ebf?{'group_id':_0x211ebf}:{}},_0xf342c8=JSON[_0x322784(0x19b)](_0x44fddd),_0x5aaee7=_0x4d2fcb['request'](_0x7fbc5e,{'method':_0x47a3c1[_0x322784(0x1bf)],'headers':_0x47a3c1[_0x322784(0x169)](p,_0x27df33,{'Content-Type':_0x47a3c1['yvbau'],'Content-Length':Buffer[_0x322784(0x17e)](_0xf342c8),'X-PoW-Challenge':_0x334a2b,'X-PoW-Nonce':_0x584f53}),'timeout':u},_0x479612=>{const _0x5e474c=_0x322784,_0x3850be=[];_0x479612['on']('data',_0x4c9450=>_0x3850be[_0x5e474c(0x166)](_0x4c9450)),_0x479612['on'](_0x30b4eb[_0x5e474c(0x180)],()=>{const _0xb6011e=_0x5e474c,_0x4728af=Buffer[_0xb6011e(0x18a)](_0x3850be)[_0xb6011e(0x1b3)](_0x30b4eb[_0xb6011e(0x1ae)]);let _0x1cd46e;try{_0x1cd46e=_0x4728af?JSON[_0xb6011e(0x181)](_0x4728af):{};}catch{const _0x2332e4=new Error(_0xb6011e(0x184)+_0x479612['statusCode']+'):'+_0x4728af[_0xb6011e(0x1be)](0x0,0xc8));return _0x2332e4['statusCode']=_0x479612[_0xb6011e(0x16c)],_0x2332e4[_0xb6011e(0x1d9)]=_0x4728af,void _0x30b4eb[_0xb6011e(0x173)](_0x2cf495,_0x2332e4);}if(_0x479612['statusCode']>=0xc8&&_0x30b4eb['kBvfJ'](_0x479612[_0xb6011e(0x16c)],0x12c))_0x30b4eb[_0xb6011e(0x173)](_0x14a22c,_0x1cd46e);else{const _0x767632=_0x1cd46e?.[_0xb6011e(0x1ad)],_0x538600=(_0x767632&&_0x30b4eb[_0xb6011e(0x1da)](_0x30b4eb[_0xb6011e(0x18b)],typeof _0x767632)?_0x767632[_0xb6011e(0x1c7)]:_0x767632)||_0x1cd46e?.['message']||_0xb6011e(0x1d8)+_0x479612['statusCode'],_0x451715=new Error(_0x538600);_0x451715[_0xb6011e(0x16c)]=_0x479612[_0xb6011e(0x16c)],_0x451715[_0xb6011e(0x17b)]=_0x1cd46e,_0x30b4eb[_0xb6011e(0x173)](_0x2cf495,_0x451715);}});});_0x5aaee7['on'](_0x47a3c1['rrgJB'],()=>{const _0x417918=_0x322784;_0x5aaee7[_0x417918(0x1b2)](new Error(_0x417918(0x199)+_0x7fbc5e[_0x417918(0x174)]));}),_0x5aaee7['on'](_0x47a3c1[_0x322784(0x1b9)],_0x2cf495),_0x5aaee7[_0x322784(0x16e)](_0xf342c8),_0x5aaee7['end']();});}({'base':_0x5e12de,'deviceId':_0x3c2bc9,'credential':_0xb6ad49,'email':_0x12a056,'platform':_0x713308,'groupId':_0x451959,'powChallenge':_0x5d9663,'powNonce':_0x4492d4}),{'rounds':0x1,'delayMs':0x12c});}export function probeModels({credential:_0x2efcb5,apiBase:_0x52a741,apiBases:_0x5feeb9,timeoutMs:_0x29f67f=0x2710}){const _0x1fe2b3=_0x4af3f9,_0x408dff={'jekJE':'utf8','pjIGV':function(_0x4e61f0,_0x3c11a1){return _0x4e61f0<_0x3c11a1;},'uhkRD':_0x1fe2b3(0x19c),'QvVeR':_0x1fe2b3(0x172),'JWWnm':function(_0x422339,_0x266fa9){return _0x422339(_0x266fa9);},'XsOkx':_0x1fe2b3(0x1a3),'wDseB':_0x1fe2b3(0x1d6),'COEFj':_0x1fe2b3(0x17a),'LZPWs':function(_0x306ad0,_0x3f8fcc){return _0x306ad0??_0x3f8fcc;},'rjSjg':function(_0x1fe850,_0x46609b,_0x583e87,_0x441a82){return _0x1fe850(_0x46609b,_0x583e87,_0x441a82);}},_0x588212=_0x408dff[_0x1fe2b3(0x1b8)](_0x11b14f,_0x408dff[_0x1fe2b3(0x1d1)](_0x5feeb9,_0x52a741)),_0x5aa92e=_0x1ca8c7();return _0x408dff[_0x1fe2b3(0x17d)](_0x2421fc,_0x588212,_0x499827=>function({base:_0xea29be,deviceId:_0x2876cd,credential:_0x51847c,timeoutMs:_0x4e5bae}){return new Promise((_0x1fcd09,_0x543cf2)=>{const _0x24c7c8=_0x1925,_0x522cb7={'YhIBU':_0x408dff[_0x24c7c8(0x1b6)],'WCGWv':function(_0x2f87bd,_0x581de6){const _0x38cf96=_0x24c7c8;return _0x408dff[_0x38cf96(0x1d2)](_0x2f87bd,_0x581de6);},'yQgco':function(_0x4ac404,_0x54fe09){return _0x4ac404>=_0x54fe09;},'gulya':function(_0x2cb440,_0x1ea1a4){return _0x2cb440(_0x1ea1a4);},'XJdNw':_0x408dff[_0x24c7c8(0x197)],'CSXCh':_0x408dff[_0x24c7c8(0x171)]};let _0x1ce8cc;try{_0x1ce8cc=new URL(_0x24c7c8(0x18c),_0xea29be);}catch(_0x37b42a){return void _0x408dff['JWWnm'](_0x543cf2,new Error('无效的\x20API\x20端点:'+_0xea29be+'('+_0x37b42a[_0x24c7c8(0x1c7)]+')'));}const _0x524bab=_0x408dff['XsOkx']===_0x1ce8cc['protocol']?_0x211f6b:_0x12a053,_0xf73604=JSON[_0x24c7c8(0x19b)]({'credential':_0x51847c}),_0x49d3ee=_0x524bab[_0x24c7c8(0x16b)](_0x1ce8cc,{'method':_0x408dff[_0x24c7c8(0x1cd)],'headers':p(_0x2876cd,{'Content-Type':_0x24c7c8(0x16f),'Content-Length':Buffer[_0x24c7c8(0x17e)](_0xf73604)}),'timeout':_0x4e5bae},_0x2dd057=>{const _0x156720=_0x24c7c8,_0x5575b2={'aSaWl':_0x522cb7[_0x156720(0x1bb)],'oasUT':function(_0x4d4939,_0x1e9170){return _0x522cb7['WCGWv'](_0x4d4939,_0x1e9170);},'QyuMl':function(_0x274fb1,_0x448e2b){const _0x22ce78=_0x156720;return _0x522cb7[_0x22ce78(0x176)](_0x274fb1,_0x448e2b);},'qrQuJ':function(_0x4d5847,_0x205439){const _0xafccd1=_0x156720;return _0x522cb7[_0xafccd1(0x195)](_0x4d5847,_0x205439);},'tBGzR':_0x522cb7[_0x156720(0x18d)]},_0x5c3950=[];_0x2dd057['on'](_0x522cb7[_0x156720(0x1c0)],_0x39b901=>_0x5c3950[_0x156720(0x166)](_0x39b901)),_0x2dd057['on'](_0x156720(0x1ca),()=>{const _0x4f7b83=_0x156720,_0x5d522f=Buffer[_0x4f7b83(0x18a)](_0x5c3950)[_0x4f7b83(0x1b3)](_0x5575b2[_0x4f7b83(0x16a)]);if(_0x5575b2[_0x4f7b83(0x177)](_0x2dd057[_0x4f7b83(0x16c)],0xc8)||_0x5575b2[_0x4f7b83(0x188)](_0x2dd057[_0x4f7b83(0x16c)],0x12c)){const _0x9f631d=new Error('HTTP\x20'+_0x2dd057[_0x4f7b83(0x16c)]);return _0x9f631d['statusCode']=_0x2dd057[_0x4f7b83(0x16c)],void _0x5575b2[_0x4f7b83(0x1af)](_0x543cf2,_0x9f631d);}try{_0x5575b2[_0x4f7b83(0x1af)](_0x1fcd09,_0x5d522f?JSON[_0x4f7b83(0x181)](_0x5d522f):{});}catch{_0x5575b2['qrQuJ'](_0x543cf2,new Error(_0x5575b2[_0x4f7b83(0x1a8)]));}});});_0x49d3ee['on'](_0x408dff['COEFj'],()=>{const _0x25e980=_0x24c7c8;_0x49d3ee[_0x25e980(0x1b2)](new Error('请求超时('+_0x4e5bae/0x3e8+_0x25e980(0x178)+_0x1ce8cc[_0x25e980(0x174)]));}),_0x49d3ee['on'](_0x24c7c8(0x1ad),_0x543cf2),_0x49d3ee[_0x24c7c8(0x16e)](_0xf73604),_0x49d3ee[_0x24c7c8(0x1ca)]();});}({'base':_0x499827,'deviceId':_0x5aa92e,'credential':_0x2efcb5,'timeoutMs':_0x29f67f}),{'rounds':0x2});}export async function listGroups({apiBase:_0x46b73a,apiBases:_0x1938be}){const _0x18415a=_0x4af3f9,_0x1acc76={'qSjIe':_0x18415a(0x185),'GkzwQ':function(_0x239c86,_0x1c775f){return _0x239c86(_0x1c775f);},'xxhFv':function(_0x450821,_0x3500c8){return _0x450821<_0x3500c8;},'mmTxI':function(_0x2e81ed,_0x221428){return _0x2e81ed(_0x221428);},'LuRnM':'/api/v1/cli/groups','NyauI':_0x18415a(0x1a3),'WxhkB':function(_0x3f959a){return _0x3f959a();},'gvIkT':function(_0x39f410,_0x24b0fc,_0x187107){return _0x39f410(_0x24b0fc,_0x187107);},'KkdXW':'timeout','YrIWl':'error','XmnCQ':'end','LEWtJ':function(_0x598c43,_0x3357f8){return _0x598c43(_0x3357f8);},'bvdSf':function(_0x39fe30,_0x3318c7){return _0x39fe30??_0x3318c7;},'knjmB':function(_0x433501,_0x40e26f,_0x995fd1,_0x7743cf){return _0x433501(_0x40e26f,_0x995fd1,_0x7743cf);}},_0x9c4f30=_0x1acc76['LEWtJ'](_0x11b14f,_0x1acc76[_0x18415a(0x1ce)](_0x1938be,_0x46b73a));try{return await _0x1acc76[_0x18415a(0x1b5)](_0x2421fc,_0x9c4f30,_0x4fef2c=>function({base:_0x3914c0}){const _0x498a4e=_0x18415a,_0xff901b={'NYXbP':_0x498a4e(0x172),'fPGNo':_0x1acc76['XmnCQ']};return new Promise((_0x347204,_0x395674)=>{const _0x5dec86=_0x498a4e,_0x3ead55={'MCbey':_0x1acc76[_0x5dec86(0x18f)],'XaXZN':function(_0x27eab2,_0x2e3656){const _0x463842=_0x5dec86;return _0x1acc76[_0x463842(0x1b0)](_0x27eab2,_0x2e3656);},'BEOdV':function(_0x2f98e1,_0x5e7ad6){const _0x1b1a6f=_0x5dec86;return _0x1acc76[_0x1b1a6f(0x1a2)](_0x2f98e1,_0x5e7ad6);},'GcHQj':function(_0x2ec306,_0x2924ee){return _0x2ec306(_0x2924ee);},'vIIne':function(_0x508c0a,_0x3320d2){const _0x1b1dcd=_0x5dec86;return _0x1acc76[_0x1b1dcd(0x170)](_0x508c0a,_0x3320d2);}};let _0x5105ad;try{_0x5105ad=new URL(_0x1acc76[_0x5dec86(0x1cf)],_0x3914c0);}catch(_0x179ea3){return void _0x1acc76[_0x5dec86(0x170)](_0x395674,new Error(_0x5dec86(0x1a5)+_0x3914c0+'('+_0x179ea3[_0x5dec86(0x1c7)]+')'));}const _0x4e7f85=_0x1acc76[_0x5dec86(0x1c4)]===_0x5105ad[_0x5dec86(0x1a4)]?_0x211f6b:_0x12a053,_0x7d7436=_0x1acc76['WxhkB'](_0x1ca8c7),_0x370bb0=_0x4e7f85[_0x5dec86(0x16b)](_0x5105ad,{'method':_0x5dec86(0x1ba),'headers':_0x1acc76['gvIkT'](p,_0x7d7436,{'Accept':_0x5dec86(0x16f)}),'timeout':u},_0x4fbc42=>{const _0x47070a=_0x5dec86,_0x5d237a=[];_0x4fbc42['on'](_0xff901b['NYXbP'],_0x4e8c39=>_0x5d237a[_0x47070a(0x166)](_0x4e8c39)),_0x4fbc42['on'](_0xff901b[_0x47070a(0x1d5)],()=>{const _0x4d2513=_0x47070a,_0x36b59f=Buffer[_0x4d2513(0x18a)](_0x5d237a)[_0x4d2513(0x1b3)](_0x3ead55['MCbey']);let _0x4818ce;try{_0x4818ce=_0x36b59f?JSON[_0x4d2513(0x181)](_0x36b59f):{};}catch{return void _0x3ead55[_0x4d2513(0x19e)](_0x347204,[]);}if(_0x4fbc42[_0x4d2513(0x16c)]>=0xc8&&_0x3ead55[_0x4d2513(0x1ab)](_0x4fbc42[_0x4d2513(0x16c)],0x12c)){const _0x5e47ad=Array[_0x4d2513(0x1c2)](_0x4818ce)?_0x4818ce:_0x4818ce?.[_0x4d2513(0x167)];_0x3ead55['GcHQj'](_0x347204,Array['isArray'](_0x5e47ad)?_0x5e47ad:[]);}else _0x3ead55[_0x4d2513(0x1c6)](_0x347204,[]);});});_0x370bb0['on'](_0x1acc76[_0x5dec86(0x17f)],()=>{const _0x20cb43=_0x5dec86,_0x157e85=new Error(_0x20cb43(0x199)+_0x5105ad['href']);_0x157e85['code']=_0x20cb43(0x1a0),_0x370bb0['destroy'](_0x157e85);}),_0x370bb0['on'](_0x1acc76['YrIWl'],_0x2a4163=>{const _0x29e866=_0x5dec86;_0x3ead55[_0x29e866(0x18e)](_0x395674,_0x2a4163);}),_0x370bb0[_0x5dec86(0x1ca)]();});}({'base':_0x4fef2c}),{'rounds':0x2});}catch{return[];}}export function verifyApiKey({apiKey:_0x160b26,baseUrl:_0x2a2894}){const _0x3ad3da=_0x4af3f9,_0x31533e={'puPME':_0x3ad3da(0x172),'dNRXD':function(_0xf0aceb,_0x546cdb){return _0xf0aceb>=_0x546cdb;},'jVGaT':function(_0x5a8c15,_0x2fca9c){return _0x5a8c15(_0x2fca9c);},'OsVqV':_0x3ad3da(0x196),'vtlFK':'/v1/models','hyoUc':function(_0x15040f,_0x4780e0){return _0x15040f(_0x4780e0);},'aQtBy':function(_0x1851bd,_0x4319){return _0x1851bd===_0x4319;},'llDtg':'https:','UANFH':_0x3ad3da(0x1ba),'Pgoej':'error'};return new Promise(_0x1dbdf6=>{const _0x65586c=_0x3ad3da,_0x494a1e={'iLkBl':function(_0x2a4c10,_0x79660c){return _0x31533e['dNRXD'](_0x2a4c10,_0x79660c);},'ljMbj':function(_0x3a1b32,_0x2271fc){const _0x228681=_0x1925;return _0x31533e[_0x228681(0x1c8)](_0x3a1b32,_0x2271fc);},'bveSI':function(_0x113061,_0x571623){return _0x113061(_0x571623);},'ooPQs':_0x31533e[_0x65586c(0x189)]};let _0x353973;try{_0x353973=new URL(_0x31533e[_0x65586c(0x1a6)],_0x2a2894);}catch{return void _0x31533e[_0x65586c(0x1c1)](_0x1dbdf6,{'ok':!0x1,'error':'无效的\x20baseUrl:'+_0x2a2894});}const _0x2c4a39=(_0x31533e['aQtBy'](_0x31533e[_0x65586c(0x194)],_0x353973[_0x65586c(0x1a4)])?_0x211f6b:_0x12a053)[_0x65586c(0x16b)](_0x353973,{'method':_0x31533e[_0x65586c(0x1b7)],'headers':{'Authorization':_0x65586c(0x182)+_0x160b26,'User-Agent':d},'timeout':0x3a98},_0x257432=>{const _0x511154=_0x65586c,_0x26177e=[];_0x257432['on'](_0x31533e[_0x511154(0x1d4)],_0x332c99=>_0x26177e[_0x511154(0x166)](_0x332c99)),_0x257432['on']('end',()=>{const _0x1abdc6=_0x511154,_0x2c6a7d=_0x494a1e[_0x1abdc6(0x187)](_0x257432[_0x1abdc6(0x16c)],0xc8)&&_0x257432[_0x1abdc6(0x16c)]<0x12c;_0x494a1e[_0x1abdc6(0x1c3)](_0x1dbdf6,{'ok':_0x2c6a7d,'statusCode':_0x257432[_0x1abdc6(0x16c)]});});});_0x2c4a39['on'](_0x65586c(0x17a),()=>{const _0x14ead5=_0x65586c;_0x2c4a39[_0x14ead5(0x1b2)](),_0x494a1e[_0x14ead5(0x1c5)](_0x1dbdf6,{'ok':!0x1,'error':_0x494a1e[_0x14ead5(0x1cc)]});}),_0x2c4a39['on'](_0x31533e[_0x65586c(0x1cb)],_0x2f61bc=>_0x1dbdf6({'ok':!0x1,'error':_0x2f61bc['message']})),_0x2c4a39[_0x65586c(0x1ca)]();});}
|
package/dist/lib/backup.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x34ac65,_0x248e3d){const _0x370f46=_0x3b7b,_0x316706=_0x34ac65();while(!![]){try{const _0x5cb0a1=-parseInt(_0x370f46(0xd6))/0x1*(parseInt(_0x370f46(0xcc))/0x2)+parseInt(_0x370f46(0xdd))/0x3*(-parseInt(_0x370f46(0xcb))/0x4)+parseInt(_0x370f46(0xc6))/0x5+-parseInt(_0x370f46(0xd5))/0x6*(parseInt(_0x370f46(0xce))/0x7)+parseInt(_0x370f46(0xd8))/0x8+parseInt(_0x370f46(0xc9))/0x9*(-parseInt(_0x370f46(0xcd))/0xa)+parseInt(_0x370f46(0xd1))/0xb;if(_0x5cb0a1===_0x248e3d)break;else _0x316706['push'](_0x316706['shift']());}catch(_0x5c4b85){_0x316706['push'](_0x316706['shift']());}}}(_0x319d,0xc462e));import _0x24c61c from'node:fs';import _0x156631 from'node:path';export function backupFile(_0x2000ab){const _0x132ed7=_0x3b7b;let _0x1f5830=!0x1;try{_0x1f5830=_0x24c61c[_0x132ed7(0xdf)](_0x2000ab);}catch{return null;}if(!_0x1f5830)return null;const _0x5a3bbe=_0x2000ab+'.bak.'+new Date()[_0x132ed7(0xc8)]()[_0x132ed7(0xd7)](/[:.]/g,'-');return _0x24c61c[_0x132ed7(0xd4)](_0x2000ab,_0x5a3bbe),_0x5a3bbe;}function _0x3b7b(_0x2746e0,_0x2f9c48){_0x2746e0=_0x2746e0-0xc6;const _0x319d23=_0x319d();let _0x3b7bb5=_0x319d23[_0x2746e0];return _0x3b7bb5;}export function listBackups(_0x3a2444){const _0x33675a=_0x3b7b,_0x1b26aa=[];for(const _0x595622 of _0x3a2444){if(!_0x595622)continue;let _0x8624db;try{_0x8624db=_0x24c61c[_0x33675a(0xd9)](_0x595622,{'withFileTypes':!0x0});}catch{continue;}for(const _0x5ee9e5 of _0x8624db){if(!_0x5ee9e5['isFile']())continue;const _0x249660=_0x5ee9e5[_0x33675a(0xcf)][_0x33675a(0xd3)](/^(.+)\.bak\.[\dTZ:-]+$/);if(!_0x249660)continue;const _0x5308c5=_0x249660[0x1],_0x97a18a=_0x156631[_0x33675a(0xd0)](_0x595622,_0x5ee9e5[_0x33675a(0xcf)]),_0x494bc0=_0x156631[_0x33675a(0xd0)](_0x595622,_0x5308c5);try{const _0x215336=_0x24c61c[_0x33675a(0xdb)](_0x97a18a);_0x1b26aa[_0x33675a(0xdc)]({'bakPath':_0x97a18a,'origPath':_0x494bc0,'mtime':_0x215336[_0x33675a(0xe0)],'dir':_0x595622,'file':_0x5ee9e5[_0x33675a(0xcf)],'origName':_0x5308c5,'size':_0x215336['size']});}catch{}}}return _0x1b26aa[_0x33675a(0xc7)]((_0xa29f1c,_0x5b29b4)=>_0x5b29b4[_0x33675a(0xde)]-_0xa29f1c['mtime']),_0x1b26aa;}function _0x319d(){const _0x1bef16=['2913555epTzSh','sort','toISOString','18OHFaHG','备份文件不存在:','4NTMJSd','89716xjukjG','173410VlcIIP','299334uoZvVY','name','join','32931998zLaROI','dirname','match','copyFileSync','210bqqfnl','1XhiLJS','replace','557184qDrHlX','readdirSync','mkdirSync','statSync','push','3796707eFsmSH','mtime','existsSync','mtimeMs'];_0x319d=function(){return _0x1bef16;};return _0x319d();}export function restoreBackup(_0x13e40f,_0x375fd8){const _0x261f20=_0x3b7b;if(!_0x24c61c['existsSync'](_0x13e40f))throw new Error(_0x261f20(0xca)+_0x13e40f);const _0x308be3=_0x156631[_0x261f20(0xd2)](_0x375fd8);try{_0x24c61c[_0x261f20(0xda)](_0x308be3,{'recursive':!0x0});}catch{}return _0x24c61c[_0x261f20(0xd4)](_0x13e40f,_0x375fd8),_0x375fd8;}
|
package/dist/lib/cmds.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
+
const _0x3d79d7=_0x5bf4;(function(_0x208977,_0x5d374d){const _0x25785c=_0x5bf4,_0x47fca6=_0x208977();while(!![]){try{const _0x56427d=parseInt(_0x25785c(0x16a))/0x1*(parseInt(_0x25785c(0x1c1))/0x2)+parseInt(_0x25785c(0x22f))/0x3+-parseInt(_0x25785c(0x202))/0x4*(parseInt(_0x25785c(0x161))/0x5)+-parseInt(_0x25785c(0x164))/0x6+parseInt(_0x25785c(0x187))/0x7*(parseInt(_0x25785c(0x1d5))/0x8)+-parseInt(_0x25785c(0x1e3))/0x9*(-parseInt(_0x25785c(0x1ac))/0xa)+-parseInt(_0x25785c(0x14d))/0xb;if(_0x56427d===_0x5d374d)break;else _0x47fca6['push'](_0x47fca6['shift']());}catch(_0x587cdb){_0x47fca6['push'](_0x47fca6['shift']());}}}(_0x522f,0xbce91));import _0x325c87 from'node:fs';import _0x33ddac from'node:path';import _0x13167b from'node:os';import{unzipSync as _0x3499be}from'fflate';import{backupFile as _0x207fbd,listBackups as _0x23aa20,restoreBackup as _0x48fff2}from'./backup.mjs';import{cliActivate as _0x2c7eef,listGroups as _0xd12718}from'./api.mjs';import{writeFileWithPermission as _0x2c1d7a,PermissionDeniedError as _0x153885}from'./write.mjs';import{renderContent as _0x2fd444,expandPath as _0x4b6a95,listModels as _0x39ee26}from'./render.mjs';function _0x522f(){const _0x2d2215=['SuKrQ','toISOString','cyan','下一步:如需重新激活,运行\x20npx\x20@2api-store/activate','ImJPk','EjUHS','origPath','已删除\x20','权限不足,无法删除\x20','IpGhc','CEFig','lwnzP','%userprofile%\x5c.claude\x5csettings.json','查看可用分组(不改配置)','wKVbh','utf8','WEHfQ','MOygo','已删除:','JvZom','将对每个测试模型发送真实计费的小请求(max_tokens=1,每模型约几分钱),用于连通性实测','从备份恢复配置','wjtEb','OYnnm','YWQub','MCIBh','startsWith','join','ACTIVATE_API_BASE','(本命令仅展示分组,不修改\x20API\x20Key\x20或配置文件)','yoKXe','verdict','未找到任何备份文件(reset\x20后这些文件将直接删除,无备份可恢复)','10474640FTuWQQ','从最新备份恢复','key:…','qvdnO','已安全备份\x20','dryRun','out','iudGI','\x20个可用分组','name','MBoys','\x20\x20request_id','max','未选择时间点','YdpdM','status','Edflb','qwWnr','npx\x20@2api-store/activate\x20diagnose\x20[options]\x0a\x0a','czBzF','376160LyevzR','reset\x20报告','AWJuD','2802972inMcGx','未发现\x202api.store\x20写入的配置文件(可能已\x20reset\x20或从未激活过)','删除失败\x20','forEach','【试运行模式\x20--dry-run】不会真实恢复文件','NfREA','6VgecVf','match','\x20个备份)','usrCP','RRiHZ','values','恢复失败:','split','\x20\x20-\x20删除\x20','未选择应用','yellow','toString','ZERqd','dCeWI','dDAtE','get','诊断包已生成:','pRaRC','parse','Ughcr','RaSag','\x20\x20exit\x20','lEpwd','length','诊断失败:','JWltF','⚠️\x20这是破坏性操作:将删除上述配置文件并尝试从备份恢复。','http_tests','skipCliTests','4396lQrGVy','%userprofile%\x5c.gemini\x5csettings.json','sk-…','spwXY','%userprofile%\x5c.codex','exit_code','slice','BINqG','可能原因:服务端未配置分组\x20/\x20网络错误\x20/\x20端点错误','删除\x202api.store\x20配置','zggfx','RVQzs','JAvCl','Gemini\x20CLI','恢复失败\x20','%userprofile%\x5c.claude','查询到\x20','诊断摘要','HSCCh','共恢复\x20','hvXnv','\x20\x20✓\x20','imqhg','💡\x20如需切换分组:','vrMVI','readFileSync','slow','erENk','VGddQ','将执行:','RNbjw','~/.codex/config.toml','\x20→\x20','\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','basename','log','cIXZC','180860AaqOaU','FSqwF','安全备份当前文件','node','PwvVf','gfGZg','toUpperCase','aRQlc','\x20\x20...(共\x20','getDate','eVHSd','ruXDw','--help','vgJHg','无可恢复的备份','help','(文件已删除,未恢复)','诊断连接并生成日志压缩包(发给客服排障)','UViwT','\x20←\x20','keys','272950LQcZWc','ms/','~/.claude','KBNxg','npx\x20@2api-store/activate\x20refresh-groups\x20[options]\x0a\x0a','将处理以下文件:','message','fail','unlinkSync','\x20\x20•\x20已有\x20API\x20Key\x20绑组:登录管理后台修改,或重新激活(npx\x20@2api-store/activate)','map','isArray','未找到任何备份文件(.bak.*)','\x20|\x20','push','fNwqO','(可通过\x20--api-base\x20或\x20ACTIVATE_API_BASE\x20覆盖)','--api-base','确认操作','bakPath','6584BEYsNA','getMonth','将恢复\x20','\x20\x20-\x20','BdsRH','BZHWy','(跳过删除此文件避免误伤)','ofujm','\x20\x20•\x20使用兑换码:重新激活时选目标分组即可','sort','model:','bold','owvlb','WhxlJ','333hIunwh','ZBrfF','EACCES','安全备份:','已恢复:','zhkwv','当前端点:','UJHTc','has','dhhQD','获取可用分组','trim','find','replace','xvdlY','lJaBZ','EDnuD','--yes','green','bXRto','dHnFF','%userprofile%\x5c.codex\x5cauth.json','zipPath','AcYVd','\x20个\x202api.store\x20配置文件','faClk','\x20个备份文件','%userprofile%\x5c.gemini','\x20个文件','aJAmf','(自动故障转移)','40tAFbLO','恢复官方默认(删\x202api.store\x20配置并从备份恢复)','zMlDX','bkbnC','ChFAV','isWindows','red','~/.claude/settings.json','--dry-run','npx\x20@2api-store/activate\x20restore\x20[options]\x0a\x0a','ttfb_ms','OYPVV','【试运行模式\x20--dry-run】不会真实删除/恢复文件','API\x20端点:','扫描备份文件','qsaYf','dim','cli_tests','padEnd','VacOF','LXMHg','EEFEO','yFkLt','PPbVQ','并从最新备份恢复:','padStart','repeat','~/.gemini/settings.json','MvWrH','选择恢复时间点(','UgiIb','getFullYear','duration_ms','NtkDp','zsqOG','bYAWx','~/.codex/auth.json','扫描目录:','endsWith','WONeQ','etBsu','确认\x20reset\x20吗?','model','.bak.reset.','ehIUV','2821869lTIuLv','dir','rPmfi','request_id','set','找到\x20','yes',',使用:','env','UcKvz','vFrso','Ozvvs','dummy','supported','bVtIA','选择时间点(回车=最新)','RTmBc','\x20个文件):','beOlq','从备份恢复\x20','请把\x20zip\x20压缩包发给客服排障(包内已脱敏,不含明文\x20key)','existsSync','version','EPERM','ChhTl','spfoz','Codex\x20CLI','dhYYW','group','code','ETeXO','mtime','~/.codex','ZlyGE','(请用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)','vqMVW','[试运行]\x20不真实恢复','qMsRO','USERPROFILE','需要\x20node\x20>=\x2018,当前\x20','includes','定位\x202api.store\x20写入的配置','/cli-tests.jsonl','apiBase','getSeconds','TSJYV','选择应用(回车=第一个)','KtcGh','rxWpM','UaGKo','AKKjv','zBchy','提示:只有运行过\x20npx\x20@2api-store/activate\x20后才会产生备份文件','ePSns','获取分组失败:','filter','ttfb/总延迟','cli','total_ms'];_0x522f=function(){return _0x2d2215;};return _0x522f();}import{getCliMeta as _0x248b47,isDefaultSelected as _0x3529d7}from'./platforms.mjs';import{detectAll as _0x21de1d}from'./detect.mjs';import{runDiagnose as _0x17c269}from'./diagnose.mjs';import{ask as _0x3c67ad,askSecret as _0x325798,multiSelect as _0x314468,select as _0x2b4aac,confirm as _0xc301e6,closePrompt as _0x3b37a5}from'./prompt.mjs';import{banner as _0x209291,ok as _0x29338b,fail as _0x257120,warn as _0x59cbbd,info as _0x57b7f7,step as _0x15ebc5,plain as _0x2552f2,guide as _0x2df0f2,chalk as _0x139616}from'./ui.mjs';import{toApiBases as _0x17c32c,pickApiBase as _0x15a8bc}from'./endpoints.mjs';const M=[_0x3d79d7(0x1a6),_0x3d79d7(0x226),_0x3d79d7(0x209),_0x3d79d7(0x21d)],N=['%userprofile%\x5c.codex\x5cconfig.toml',_0x3d79d7(0x1f8),_0x3d79d7(0x276),_0x3d79d7(0x188)],B=[_0x3d79d7(0x24f),_0x3d79d7(0x1c3),'~/.gemini'],H=[_0x3d79d7(0x18b),_0x3d79d7(0x196),_0x3d79d7(0x1fe)],K=new Set(['dry-run','skip-cli-tests']);function U(_0xbc9fcb){const _0x4e88f7=_0x3d79d7;return _0xbc9fcb['replace'](/-([a-z])/g,(_0x32dcc7,_0x122720)=>_0x122720[_0x4e88f7(0x1b2)]());}function D(_0x3fa69e){const _0x5cf199=_0x3d79d7,_0x530481={'TSJYV':function(_0x2a5142,_0x2676bf){return _0x2a5142<_0x2676bf;},'iudGI':function(_0x3096d1,_0x1f57f9){return _0x3096d1===_0x1f57f9;},'bXRto':_0x5cf199(0x1f4),'OYnnm':function(_0x1d3a05,_0x1c04fd){return _0x1d3a05===_0x1c04fd;},'Edflb':function(_0x4f7822,_0x17033e){return _0x4f7822===_0x17033e;},'Ughcr':_0x5cf199(0x1d2),'ImJPk':_0x5cf199(0x1b8),'BdsRH':function(_0x38bb52,_0xe524c8){return _0x38bb52(_0xe524c8);}},_0x99deb5={'dryRun':!0x1,'_':[]};for(let _0x210835=0x0;_0x530481[_0x5cf199(0x25c)](_0x210835,_0x3fa69e['length']);_0x210835++){const _0x47c24a=_0x3fa69e[_0x210835];if(_0x530481[_0x5cf199(0x154)](_0x5cf199(0x20a),_0x47c24a)||'-n'===_0x47c24a)_0x99deb5['dryRun']=!0x0;else{if(_0x530481[_0x5cf199(0x154)](_0x530481[_0x5cf199(0x1f6)],_0x47c24a)||_0x530481[_0x5cf199(0x281)]('-y',_0x47c24a))_0x99deb5[_0x5cf199(0x235)]=!0x0;else{if(_0x530481[_0x5cf199(0x15d)](_0x530481[_0x5cf199(0x17d)],_0x47c24a))_0x99deb5[_0x5cf199(0x25a)]=_0x3fa69e[++_0x210835];else{if(_0x530481[_0x5cf199(0x26e)]===_0x47c24a||'-h'===_0x47c24a)_0x99deb5[_0x5cf199(0x1bb)]=!0x0;else{if(_0x47c24a[_0x5cf199(0x284)]('--')&&_0x47c24a[_0x5cf199(0x257)]('=')){const [_0x890040,_0x36e089]=_0x47c24a['slice'](0x2)[_0x5cf199(0x171)](/=(.*)/,0x2);K[_0x5cf199(0x1eb)](_0x890040)?_0x99deb5[_0x530481[_0x5cf199(0x1d9)](U,_0x890040)]=!0x0:_0x99deb5[_0x890040]=_0x36e089;}else{if(_0x47c24a[_0x5cf199(0x284)]('--')){const _0x53eb4d=_0x47c24a[_0x5cf199(0x1f0)](/^--/,'');K[_0x5cf199(0x1eb)](_0x53eb4d)?_0x99deb5[_0x530481[_0x5cf199(0x1d9)](U,_0x53eb4d)]=!0x0:_0x99deb5[_0x53eb4d]=_0x3fa69e[++_0x210835];}else _0x99deb5['_']['push'](_0x47c24a);}}}}}}return _0x99deb5;}function W(_0x56bf83,_0x4f91a2){const _0x349fb0=_0x3d79d7,_0xd03c52={'zMlDX':function(_0x547c32,_0x2ceeb2,_0x1ebfe9){return _0x547c32(_0x2ceeb2,_0x1ebfe9);}};return _0xd03c52[_0x349fb0(0x204)](_0x4b6a95,_0x56bf83,{'isWindows':_0x4f91a2});}function _0x5bf4(_0x1c389e,_0x337b7f){_0x1c389e=_0x1c389e-0x14a;const _0x522fe3=_0x522f();let _0x5bf4d=_0x522fe3[_0x1c389e];return _0x5bf4d;}function z(_0x513f82){const _0xf4f7c9=_0x3d79d7;return(_0x513f82?H:B)[_0xf4f7c9(0x1cb)](_0x3726a3=>W(_0x3726a3,_0x513f82));}const F=_0x3d79d7(0x1a8)[_0x3d79d7(0x1ee)]();function Y(_0x4c4206){const _0x3ab4c2=_0x3d79d7,_0x2de283={'yFkLt':function(_0x43433b,_0x4a3ed2){return _0x43433b>=_0x4a3ed2;},'lEpwd':function(_0x415037,_0x161e87){return _0x415037<_0x161e87;},'ZERqd':function(_0x2f4b38,_0xb6b276){return _0x2f4b38!=_0xb6b276;},'ZBrfF':'slow'};return _0x2de283[_0x3ab4c2(0x218)](_0x4c4206['status'],0xc8)&&_0x2de283[_0x3ab4c2(0x180)](_0x4c4206[_0x3ab4c2(0x15c)],0x12c)?_0x2de283[_0x3ab4c2(0x176)](null,_0x4c4206['ttfb_ms'])&&_0x4c4206[_0x3ab4c2(0x20c)]>0x2710?_0x2de283[_0x3ab4c2(0x1e4)]:'ok':_0x3ab4c2(0x1c8);}function Z({zipPath:_0x3c8f99,summary:_0x323654}){const _0x2589d4=_0x3d79d7,_0x23ac65={'JAvCl':function(_0x2175e4,_0x301781){return _0x2175e4(_0x301781);},'PPbVQ':_0x2589d4(0x198),'KBNxg':function(_0x9637c2,_0x19e185){return _0x9637c2>_0x19e185;},'RVQzs':_0x2589d4(0x267),'Ozvvs':function(_0x1ddd1c,_0x3f0d4a){return _0x1ddd1c(_0x3f0d4a);},'OmsaE':function(_0x2a377f,_0x33fa21){return _0x2a377f(_0x33fa21);},'mqZuZ':function(_0x348f38,_0x4b72fd){return _0x348f38===_0x4b72fd;},'cIXZC':_0x2589d4(0x1a1),'XVvrA':function(_0x584f45,_0x38ffe5){return _0x584f45(_0x38ffe5);},'IpGhc':'ERR','wjtEb':function(_0x17c52b,_0xae5ffc){return _0x17c52b(_0xae5ffc);},'SuKrQ':'无\x20HTTP\x20测试记录','dhhQD':function(_0x8a6d69,_0x339162){return _0x8a6d69(_0x339162);},'JvZom':function(_0x3776fd,_0x15118d){return _0x3776fd!=_0x15118d;},'ruXDw':function(_0xac6624,_0x4fadcb){return _0xac6624(_0x4fadcb);}};console[_0x2589d4(0x1aa)](),_0x23ac65[_0x2589d4(0x193)](_0x15ebc5,_0x23ac65[_0x2589d4(0x219)]);const _0x2b2038=Array['isArray'](_0x323654[_0x2589d4(0x185)])?_0x323654[_0x2589d4(0x185)]:[];if(_0x23ac65[_0x2589d4(0x1c4)](_0x2b2038[_0x2589d4(0x181)],0x0)){const _0x26a611=Math[_0x2589d4(0x159)](0x6,..._0x2b2038[_0x2589d4(0x1cb)](_0x1cebd7=>String(_0x1cebd7[_0x2589d4(0x22c)])[_0x2589d4(0x181)])),_0x55b5a0=Math[_0x2589d4(0x159)](0x6,..._0x2b2038[_0x2589d4(0x1cb)](_0x2c6bd0=>String(_0x2c6bd0[_0x2589d4(0x14b)]??'-')['length']));_0x2552f2(_0x139616[_0x2589d4(0x1e0)]['cyan']('\x20\x20'+'模型'['padEnd'](_0x26a611)+'\x20\x20'+'判定'['padEnd'](_0x55b5a0)+'\x20\x20'+'状态'[_0x2589d4(0x214)](0x6)+'\x20\x20'+_0x23ac65[_0x2589d4(0x192)][_0x2589d4(0x214)](0x12)+_0x2589d4(0x158)));for(const _0x21bbb6 of _0x2b2038){const _0x524942=_0x23ac65[_0x2589d4(0x23a)](Y,_0x21bbb6),_0x5f6a7b=_0x23ac65['OmsaE'](String,_0x21bbb6[_0x2589d4(0x14b)]??'-')[_0x2589d4(0x214)](_0x55b5a0),_0x512cdd=_0x23ac65['mqZuZ']('ok',_0x524942)?_0x139616['green'](_0x5f6a7b):_0x23ac65[_0x2589d4(0x1ab)]===_0x524942?_0x139616['yellow'](_0x5f6a7b):_0x139616['red'](_0x5f6a7b),_0x8df719=(_0x21bbb6[_0x2589d4(0x20c)]??'-')+_0x2589d4(0x1c2)+(_0x21bbb6[_0x2589d4(0x269)]??'-')+'ms';_0x23ac65['OmsaE'](_0x2552f2,'\x20\x20'+_0x23ac65['XVvrA'](String,_0x21bbb6[_0x2589d4(0x22c)])[_0x2589d4(0x214)](_0x26a611)+'\x20\x20'+_0x512cdd+'\x20\x20'+_0x23ac65[_0x2589d4(0x23a)](String,_0x21bbb6['status']??_0x23ac65[_0x2589d4(0x273)])[_0x2589d4(0x214)](0x6)+'\x20\x20'+_0x8df719[_0x2589d4(0x214)](0x12)+'\x20\x20'+(_0x21bbb6[_0x2589d4(0x232)]??'-'));}}else _0x23ac65[_0x2589d4(0x280)](_0x57b7f7,_0x23ac65[_0x2589d4(0x26a)]);const _0x4bb608=Array[_0x2589d4(0x1cc)](_0x323654[_0x2589d4(0x213)])?_0x323654[_0x2589d4(0x213)]:[];if(_0x23ac65[_0x2589d4(0x1c4)](_0x4bb608[_0x2589d4(0x181)],0x0)){const _0x1a1b69=function(_0x4040ed){const _0x5962dc=_0x2589d4,_0x1206ad={};try{const _0x21bd05=_0x3499be(new Uint8Array(_0x325c87[_0x5962dc(0x1a0)](_0x4040ed))),_0x365bef=Object[_0x5962dc(0x1c0)](_0x21bd05)[_0x5962dc(0x1ef)](_0x57b2d3=>_0x57b2d3[_0x5962dc(0x228)](_0x5962dc(0x259)));if(!_0x365bef)return _0x1206ad;for(const _0x136253 of Buffer['from'](_0x21bd05[_0x365bef])[_0x5962dc(0x175)]('utf8')[_0x5962dc(0x171)]('\x0a'))if(_0x136253[_0x5962dc(0x1ee)]())try{const _0x56d797=JSON[_0x5962dc(0x17c)](_0x136253);_0x56d797&&_0x56d797[_0x5962dc(0x268)]&&(_0x1206ad[_0x56d797[_0x5962dc(0x268)]]=_0x56d797[_0x5962dc(0x222)]);}catch{}}catch{}return _0x1206ad;}(_0x3c8f99),_0x431a17=Math[_0x2589d4(0x159)](0x6,..._0x4bb608['map'](_0x362c52=>String(_0x362c52[_0x2589d4(0x268)])[_0x2589d4(0x181)]));for(const _0x4f9f94 of _0x4bb608){const _0x37b60d=_0x23ac65[_0x2589d4(0x1ec)](String,_0x4f9f94['verdict']??'-'),_0x1bea88='ok'===_0x37b60d?_0x139616[_0x2589d4(0x1f5)](_0x37b60d):_0x139616[_0x2589d4(0x208)](_0x37b60d),_0x4ab25f=_0x23ac65[_0x2589d4(0x27d)](null,_0x1a1b69[_0x4f9f94[_0x2589d4(0x268)]])?_0x1a1b69[_0x4f9f94['cli']]+'ms':'-';_0x23ac65['ruXDw'](_0x2552f2,'\x20\x20'+_0x23ac65[_0x2589d4(0x1b7)](String,_0x4f9f94[_0x2589d4(0x268)])[_0x2589d4(0x214)](_0x431a17)+'\x20\x20'+_0x1bea88[_0x2589d4(0x214)](0x6)+_0x2589d4(0x17f)+(_0x4f9f94[_0x2589d4(0x18c)]??_0x23ac65['IpGhc'])+'\x20\x20'+_0x4ab25f);}}}export const SUBCOMMANDS={'restore':{'handler':async function(_0xfdedc8){const _0x12e6a6=_0x3d79d7,_0x5a0a37={'dDAtE':function(_0x30dce6,_0x851e7b){return _0x30dce6(_0x851e7b);},'PwvVf':_0x12e6a6(0x23b),'RRiHZ':function(_0x2b0a8a,_0x341c5a){return _0x2b0a8a+_0x341c5a;},'vrMVI':function(_0x10660d,_0x1d8ee8){return _0x10660d(_0x1d8ee8);},'ChhTl':_0x12e6a6(0x279),'NfREA':function(_0x6caec4,_0x3d89b2){return _0x6caec4>_0x3d89b2;},'MvWrH':_0x12e6a6(0x1ce),'rlgRz':function(_0x5a2efb){return _0x5a2efb();},'dCeWI':function(_0x1b56e0,_0x9f636e){return _0x1b56e0(_0x9f636e);},'WhxlJ':_0x12e6a6(0x210),'pRaRC':function(_0x2a18cc,_0x51e272){return _0x2a18cc(_0x51e272);},'UJHTc':function(_0xa133c3,_0x445d67){return _0xa133c3(_0x445d67);},'Gdbam':_0x12e6a6(0x168),'YdpdM':function(_0x467788,_0x47e31b){return _0x467788(_0x47e31b);},'medeK':function(_0x1c8d34,_0x3c7330){return _0x1c8d34===_0x3c7330;},'UUWnQ':_0x12e6a6(0x1cd),'VGddQ':_0x12e6a6(0x263),'HSCCh':_0x12e6a6(0x194),'VuCoX':function(_0x20d88f,_0x3beb54){return _0x20d88f===_0x3beb54;},'zBchy':'选择要恢复的应用','erENk':function(_0x1fd64e,_0x240210,_0xa9a960,_0x510748){return _0x1fd64e(_0x240210,_0xa9a960,_0x510748);},'eVHSd':_0x12e6a6(0x25d),'UViwT':function(_0x66dc8e,_0x2a88c5){return _0x66dc8e>=_0x2a88c5;},'oVwlM':_0x12e6a6(0x173),'CEFig':function(_0xa61087,_0x380125){return _0xa61087(_0x380125);},'ZTMAU':function(_0x3d883a,_0x330abc){return _0x3d883a(_0x330abc);},'RTmBc':_0x12e6a6(0x23e),'BZHWy':function(_0x1ed688,_0x599664){return _0x1ed688>=_0x599664;},'JWltF':function(_0x4a6504,_0x4d7acd){return _0x4a6504(_0x4d7acd);},'qMsRO':_0x12e6a6(0x15a),'RaSag':_0x12e6a6(0x253),'spfoz':function(_0x2f6f36,_0x35c5c4){return _0x2f6f36(_0x35c5c4);},'WONeQ':function(_0x3d503b,_0x360d14,_0x21469b){return _0x3d503b(_0x360d14,_0x21469b);},'fNwqO':function(_0x35028b,_0x559f00){return _0x35028b(_0x559f00);},'gdfku':function(_0x5b45e8,_0x5622da){return _0x5b45e8>_0x5622da;}},_0x17548b=_0x5a0a37[_0x12e6a6(0x178)](D,_0xfdedc8);if(_0x17548b[_0x12e6a6(0x1bb)])return console[_0x12e6a6(0x1aa)](_0x12e6a6(0x20b)+F),0x0;_0x5a0a37['rlgRz'](_0x209291);const _0x558ac0=_0x21de1d();if(!_0x558ac0[_0x12e6a6(0x1af)][_0x12e6a6(0x23c)])return _0x5a0a37[_0x12e6a6(0x177)](_0x257120,_0x12e6a6(0x256)+_0x558ac0[_0x12e6a6(0x1af)][_0x12e6a6(0x245)]),0x1;_0x15ebc5(_0x5a0a37[_0x12e6a6(0x1e2)]);const _0x3effb7=_0x5a0a37[_0x12e6a6(0x17b)](z,_0x558ac0['os'][_0x12e6a6(0x207)]);_0x17548b['dryRun']&&_0x5a0a37[_0x12e6a6(0x1ea)](_0x59cbbd,_0x5a0a37['Gdbam']),_0x57b7f7(_0x12e6a6(0x227)+_0x3effb7[_0x12e6a6(0x285)](',\x20'));const _0x2995db=_0x5a0a37[_0x12e6a6(0x15b)](_0x23aa20,_0x3effb7);if(_0x5a0a37['medeK'](0x0,_0x2995db[_0x12e6a6(0x181)]))return _0x5a0a37['vrMVI'](_0x57b7f7,_0x5a0a37['UUWnQ']),_0x5a0a37['dCeWI'](_0x57b7f7,_0x5a0a37[_0x12e6a6(0x1a3)]),0x0;_0x5a0a37[_0x12e6a6(0x177)](_0x29338b,_0x12e6a6(0x234)+_0x2995db['length']+_0x12e6a6(0x1fd));const _0x32c95f={'.codex':_0x12e6a6(0x249),'.claude':'Claude\x20Code','.gemini':_0x5a0a37[_0x12e6a6(0x199)]};function _0x584440(_0x36ce94){const _0xf36ffe=_0x12e6a6,_0x5b1b6d=process['env']['HOME']||process[_0xf36ffe(0x237)][_0xf36ffe(0x255)]||'',_0x2e79db=_0x33ddac['relative'](_0x5b1b6d,_0x36ce94)[_0xf36ffe(0x1f0)](/\\/g,'/')['split']('/')[0x0];return _0x32c95f[_0x2e79db]||_0x2e79db;}function _0xb15ba7(_0x6ad8ea){const _0x1046da=_0x12e6a6;return process[_0x1046da(0x237)]['HOME']||process['env']['USERPROFILE'],_0x33ddac['dirname'](_0x6ad8ea);}const _0x3be07b={};for(const _0x337d0f of _0x2995db){const _0x3fd10c=_0xb15ba7(_0x337d0f['origPath']);_0x3be07b[_0x3fd10c]||(_0x3be07b[_0x3fd10c]=[]),_0x3be07b[_0x3fd10c][_0x12e6a6(0x1cf)](_0x337d0f);}const _0x1b5614=Object[_0x12e6a6(0x1c0)](_0x3be07b);if(_0x5a0a37['VuCoX'](0x0,_0x1b5614['length']))return _0x57b7f7(_0x12e6a6(0x1ba)),0x0;console[_0x12e6a6(0x1aa)](),_0x5a0a37[_0x12e6a6(0x15b)](_0x15ebc5,_0x5a0a37[_0x12e6a6(0x262)]);const _0x4be0bd=_0x1b5614[_0x12e6a6(0x1cb)](_0x46bfd1=>{const _0x2e1d9=_0x12e6a6,_0x2d98cd=_0x5a0a37[_0x2e1d9(0x178)](_0x584440,_0x33ddac[_0x2e1d9(0x285)](_0x46bfd1,_0x5a0a37[_0x2e1d9(0x1b0)])),_0x150139=_0x3be07b[_0x46bfd1][_0x2e1d9(0x181)];return{'label':_0x139616[_0x2e1d9(0x26c)](_0x2d98cd)+'('+_0x150139+_0x2e1d9(0x16c),'dir':_0x46bfd1};}),_0x4845d4=await _0x5a0a37[_0x12e6a6(0x1a2)](_0x2b4aac,_0x5a0a37[_0x12e6a6(0x1b6)],_0x4be0bd,{'defaultIndex':0x0});if(_0x4845d4<0x0||_0x5a0a37[_0x12e6a6(0x1be)](_0x4845d4,_0x4be0bd[_0x12e6a6(0x181)]))return _0x257120(_0x5a0a37['oVwlM']),0x1;const _0x3ff6d2=_0x4be0bd[_0x4845d4][_0x12e6a6(0x230)],_0x1eea35=_0x5a0a37[_0x12e6a6(0x274)](_0x584440,_0x33ddac[_0x12e6a6(0x285)](_0x3ff6d2,_0x12e6a6(0x23b))),_0x1d2ec8=_0x3be07b[_0x3ff6d2]['sort']((_0x30a17f,_0x248d8f)=>_0x248d8f[_0x12e6a6(0x24e)]-_0x30a17f[_0x12e6a6(0x24e)]),_0x19291b={},_0x250170=[];for(const _0x145238 of _0x1d2ec8){const _0x52e8a0=_0x33ddac[_0x12e6a6(0x1a9)](_0x145238['bakPath'])['match'](/\.bak\.(.+)$/),_0x50fc36=(_0x52e8a0?_0x52e8a0[0x1]:'')[_0x12e6a6(0x1f0)](/-\d{3}Z$/,'Z');_0x19291b[_0x50fc36]||(_0x19291b[_0x50fc36]=[],_0x250170[_0x12e6a6(0x1cf)](_0x50fc36)),_0x19291b[_0x50fc36][_0x12e6a6(0x1cf)](_0x145238);}for(const _0x4e0150 of _0x250170){const _0x294710=_0x19291b[_0x4e0150],_0x4a1d9e={};for(const _0x49f5a4 of _0x294710)(!_0x4a1d9e[_0x49f5a4['origPath']]||_0x49f5a4[_0x12e6a6(0x24e)]>_0x4a1d9e[_0x49f5a4['origPath']][_0x12e6a6(0x24e)])&&(_0x4a1d9e[_0x49f5a4[_0x12e6a6(0x270)]]=_0x49f5a4);_0x19291b[_0x4e0150]=Object[_0x12e6a6(0x16f)](_0x4a1d9e)[_0x12e6a6(0x1de)]((_0x10a674,_0x58a2ba)=>_0x58a2ba[_0x12e6a6(0x24e)]-_0x10a674['mtime']);}console[_0x12e6a6(0x1aa)](),_0x5a0a37['ZTMAU'](_0x15ebc5,_0x12e6a6(0x21f)+_0x1eea35+')');const _0x2f96b9=_0x250170['map'](_0x4b64f2=>{const _0x3d64e3=_0x12e6a6,_0x187125=_0x19291b[_0x4b64f2],_0x15e849=_0x187125[_0x3d64e3(0x1cb)](_0x47c9ef=>_0x33ddac['basename'](_0x47c9ef[_0x3d64e3(0x270)]))[_0x3d64e3(0x285)](',\x20'),_0x36600a=function(_0x2f73c2){const _0x531eb9=_0x3d64e3;try{const _0x31c67c=new Date(_0x2f73c2),_0x578033=_0x473a45=>String(_0x473a45)[_0x531eb9(0x21b)](0x2,'0');return _0x31c67c[_0x531eb9(0x221)]()+'-'+_0x578033(_0x5a0a37[_0x531eb9(0x16e)](_0x31c67c[_0x531eb9(0x1d6)](),0x1))+'-'+_0x5a0a37[_0x531eb9(0x19f)](_0x578033,_0x31c67c[_0x531eb9(0x1b5)]())+'\x20'+_0x578033(_0x31c67c['getHours']())+':'+_0x578033(_0x31c67c['getMinutes']())+':'+_0x5a0a37[_0x531eb9(0x178)](_0x578033,_0x31c67c[_0x531eb9(0x25b)]());}catch{return new Date(_0x2f73c2)[_0x531eb9(0x26b)]();}}(_0x187125[0x0][_0x3d64e3(0x24e)]),_0x79faf8=[];for(const _0x383045 of _0x187125)try{const _0x3737c4=_0x325c87[_0x3d64e3(0x1a0)](_0x383045[_0x3d64e3(0x1d4)],_0x5a0a37[_0x3d64e3(0x247)]);if(!_0x79faf8[_0x3d64e3(0x1ef)](_0x335192=>_0x335192[_0x3d64e3(0x257)]('…'))){const _0x1ad696=_0x3737c4[_0x3d64e3(0x16b)](/sk-([a-zA-Z0-9]{10,})/);if(_0x1ad696)_0x79faf8[_0x3d64e3(0x1cf)](_0x3d64e3(0x189)+_0x1ad696[0x1][_0x3d64e3(0x18d)](-0x6));else{const _0xb95c26=_0x3737c4[_0x3d64e3(0x16b)](/(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["']([a-zA-Z0-9._-]{10,})["']/);if(_0xb95c26)_0x79faf8[_0x3d64e3(0x1cf)](_0x3d64e3(0x14f)+_0xb95c26[0x1][_0x3d64e3(0x18d)](-0x6));else{const _0x4c2cbb=_0x3737c4['match'](/export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?)([a-zA-Z0-9._-]{10,})/);_0x4c2cbb&&_0x79faf8[_0x3d64e3(0x1cf)](_0x3d64e3(0x14f)+_0x4c2cbb[0x2][_0x3d64e3(0x18d)](-0x6));}}}if(!_0x79faf8[_0x3d64e3(0x1ef)](_0x81d8e5=>_0x81d8e5[_0x3d64e3(0x284)]('http'))){const _0x382b77=_0x3737c4[_0x3d64e3(0x16b)](/(https?:\/\/[^\s"'`}]+)/);_0x382b77&&_0x79faf8[_0x3d64e3(0x1cf)](_0x382b77[0x1][_0x3d64e3(0x1f0)](/\/+$/,''));}if(!_0x79faf8[_0x3d64e3(0x1ef)](_0x49da25=>_0x49da25[_0x3d64e3(0x284)](_0x3d64e3(0x22c)))){const _0x393254=_0x3737c4['match'](/(?:^|\n)\s*model\s*[=:]\s*["']?([a-zA-Z0-9][\w.-]+)/);_0x393254&&_0x79faf8['push'](_0x3d64e3(0x1df)+_0x393254[0x1]);}}catch{}const _0x5c5486=_0x5a0a37[_0x3d64e3(0x169)](_0x79faf8[_0x3d64e3(0x181)],0x0)?'\x20'+_0x139616[_0x3d64e3(0x174)](_0x79faf8[_0x3d64e3(0x285)](_0x5a0a37[_0x3d64e3(0x21e)])):'';return{'label':_0x139616['dim'](_0x36600a)+'('+_0x187125[_0x3d64e3(0x181)]+'\x20文件:'+_0x15e849+')'+_0x5c5486,'ts':_0x4b64f2,'group':_0x187125};}),_0x1e70f3=await _0x5a0a37[_0x12e6a6(0x1a2)](_0x2b4aac,_0x5a0a37[_0x12e6a6(0x23f)],_0x2f96b9,{'defaultIndex':0x0});if(_0x1e70f3<0x0||_0x5a0a37[_0x12e6a6(0x1da)](_0x1e70f3,_0x2f96b9[_0x12e6a6(0x181)]))return _0x5a0a37[_0x12e6a6(0x183)](_0x257120,_0x5a0a37[_0x12e6a6(0x254)]),0x1;const _0x321d66=_0x2f96b9[_0x1e70f3][_0x12e6a6(0x24b)];console['log'](),_0x5a0a37[_0x12e6a6(0x17b)](_0x57b7f7,_0x12e6a6(0x1d7)+_0x1eea35+'('+_0x321d66[_0x12e6a6(0x181)]+_0x12e6a6(0x240));for(const _0x34bd9a of _0x321d66)_0x57b7f7('\x20\x20'+_0x33ddac[_0x12e6a6(0x1a9)](_0x34bd9a[_0x12e6a6(0x270)])+_0x12e6a6(0x1bf)+_0x33ddac['basename'](_0x34bd9a['bakPath']));if(_0x17548b[_0x12e6a6(0x152)])return _0x5a0a37['UJHTc'](_0x59cbbd,_0x5a0a37[_0x12e6a6(0x17e)]),0x0;let _0x37c96e=0x0;for(const _0x17e64e of _0x321d66){if(_0x325c87[_0x12e6a6(0x244)](_0x17e64e['origPath']))try{const _0x53c4ae=_0x5a0a37[_0x12e6a6(0x248)](_0x207fbd,_0x17e64e['origPath']);_0x53c4ae&&_0x5a0a37[_0x12e6a6(0x178)](_0x57b7f7,_0x12e6a6(0x1e6)+_0x33ddac[_0x12e6a6(0x1a9)](_0x17e64e[_0x12e6a6(0x270)])+_0x12e6a6(0x1a7)+_0x33ddac['basename'](_0x53c4ae));}catch{}try{_0x5a0a37[_0x12e6a6(0x229)](_0x48fff2,_0x17e64e[_0x12e6a6(0x1d4)],_0x17e64e[_0x12e6a6(0x270)]),_0x29338b(_0x12e6a6(0x1e7)+_0x17e64e[_0x12e6a6(0x270)]),_0x37c96e++;}catch(_0x18a37a){_0x257120(_0x12e6a6(0x170)+_0x17e64e[_0x12e6a6(0x270)]+'('+_0x18a37a[_0x12e6a6(0x1c7)]+')');}}return _0x5a0a37[_0x12e6a6(0x1d0)](_0x57b7f7,_0x12e6a6(0x19a)+_0x37c96e+'\x20个文件'),_0x5a0a37['gdfku'](_0x37c96e,0x0)?0x0:0x3;},'description':_0x3d79d7(0x27f)},'reset':{'handler':async function(_0x2af96d){const _0x438c92=_0x3d79d7,_0x65dab7={'LXMHg':function(_0x24a425,_0x4117d6){return _0x24a425(_0x4117d6);},'pMYMu':function(_0x3cac17){return _0x3cac17();},'imqhg':function(_0x26a86f,_0x21f494){return _0x26a86f(_0x21f494);},'UgiIb':_0x438c92(0x258),'dhYYW':function(_0x2d690f,_0x27c258){return _0x2d690f===_0x27c258;},'owvlb':function(_0xbb1041,_0x5c3ef2){return _0xbb1041(_0x5c3ef2);},'UcKvz':_0x438c92(0x165),'gfGZg':'如需从备份恢复,请运行:npx\x20@2api-store/activate\x20restore','RNbjw':_0x438c92(0x1c6),'etBsu':function(_0x49366b,_0x7494a8){return _0x49366b(_0x7494a8);},'EEFEO':function(_0x1a6d6a,_0x454f5b){return _0x1a6d6a>_0x454f5b;},'NtkDp':function(_0x34d2c4,_0x233fb9){return _0x34d2c4(_0x233fb9);},'EDnuD':function(_0x1456cd,_0xe6bf0e){return _0x1456cd(_0xe6bf0e);},'lJaBZ':_0x438c92(0x1d3),'UnmUJ':'\x20\x20\x20删除前会再备份一次(.bak.reset.<时间戳>),可手动恢复。','MCIBh':function(_0x415d13,_0x4cee41,_0x26ca79){return _0x415d13(_0x4cee41,_0x26ca79);},'vqMVW':_0x438c92(0x20e),'amtzm':function(_0x3cc634,_0x3e3c52){return _0x3cc634(_0x3e3c52);},'aJAmf':function(_0x4a157d,_0x41ec01){return _0x4a157d>_0x41ec01;},'OYPVV':function(_0x4c25b4,_0x13c0a0){return _0x4c25b4(_0x13c0a0);},'AcYVd':_0x438c92(0x190),'WEHfQ':_0x438c92(0x1e5),'ePSns':_0x438c92(0x246),'csGck':function(_0x434c45,_0x1539ac){return _0x434c45===_0x1539ac;},'qvdnO':'EROFS','AWJuD':function(_0x22a60d,_0xc840bd){return _0x22a60d(_0xc840bd);},'jdTWK':_0x438c92(0x14e),'usrCP':function(_0x352cca,_0x8c68ee){return _0x352cca(_0x8c68ee);},'vFrso':function(_0x377dce,_0xa06d48){return _0x377dce(_0xa06d48);},'qwWnr':function(_0x418ab9,_0x9b5cfc){return _0x418ab9(_0x9b5cfc);},'aRQlc':_0x438c92(0x162),'BINqG':function(_0x5835dd,_0x2b2c02){return _0x5835dd(_0x2b2c02);},'spwXY':'安全备份位置(如需撤销\x20reset,手动恢复这些文件):','rPmfi':function(_0x312e9d,_0x525936){return _0x312e9d(_0x525936);}},_0x5753a3=_0x65dab7[_0x438c92(0x216)](D,_0x2af96d);if(_0x5753a3['help'])return console[_0x438c92(0x1aa)]('npx\x20@2api-store/activate\x20reset\x20[options]\x0a\x0a'+F),0x0;_0x209291();const _0x377954=_0x65dab7['pMYMu'](_0x21de1d);if(!_0x377954[_0x438c92(0x1af)][_0x438c92(0x23c)])return _0x65dab7[_0x438c92(0x216)](_0x257120,'需要\x20node\x20>=\x2018,当前\x20'+_0x377954[_0x438c92(0x1af)]['version']),0x1;var _0x4cdf2e;_0x65dab7[_0x438c92(0x19d)](_0x15ebc5,_0x65dab7[_0x438c92(0x220)]);const _0x52c5d2=((_0x4cdf2e=_0x377954['os'][_0x438c92(0x207)])?N:M)['map'](_0x5d1206=>W(_0x5d1206,_0x4cdf2e))[_0x438c92(0x266)](_0x1f8c7f=>{const _0x331977=_0x438c92;try{return _0x325c87[_0x331977(0x244)](_0x1f8c7f);}catch{return!0x1;}});if(_0x65dab7[_0x438c92(0x24a)](0x0,_0x52c5d2['length']))return _0x65dab7[_0x438c92(0x1e1)](_0x59cbbd,_0x65dab7[_0x438c92(0x238)]),_0x57b7f7(_0x65dab7[_0x438c92(0x1b1)]),0x0;_0x65dab7[_0x438c92(0x216)](_0x57b7f7,_0x65dab7[_0x438c92(0x1a5)]),_0x52c5d2[_0x438c92(0x167)](_0x3a5a1f=>_0x2552f2(_0x438c92(0x1d8)+_0x139616[_0x438c92(0x174)](_0x3a5a1f))),console['log']();const _0x5b397c=_0x65dab7[_0x438c92(0x22a)](z,_0x377954['os']['isWindows']),_0x14deb2=_0x65dab7[_0x438c92(0x1e1)](_0x23aa20,_0x5b397c),_0x545d18=_0x65dab7[_0x438c92(0x217)](_0x14deb2[_0x438c92(0x181)],0x0);if(_0x545d18?_0x29338b('发现\x20'+_0x14deb2['length']+'\x20个备份文件(reset\x20后将尝试恢复每个配置的最新备份)'):_0x65dab7[_0x438c92(0x223)](_0x59cbbd,_0x438c92(0x14c)),console[_0x438c92(0x1aa)](),_0x65dab7[_0x438c92(0x1f3)](_0x15ebc5,_0x65dab7[_0x438c92(0x1f2)]),_0x65dab7[_0x438c92(0x216)](_0x59cbbd,_0x438c92(0x184)),_0x59cbbd(_0x65dab7['UnmUJ']),!await _0x65dab7[_0x438c92(0x283)](_0xc301e6,_0x438c92(0x22b),{'defaultValue':!0x1}))return _0x2552f2('已取消'),0x0;if(console[_0x438c92(0x1aa)](),_0x5753a3[_0x438c92(0x152)])return _0x65dab7[_0x438c92(0x1f3)](_0x59cbbd,_0x65dab7[_0x438c92(0x252)]),_0x57b7f7(_0x438c92(0x1a4)),_0x52c5d2[_0x438c92(0x167)](_0x2aaf9f=>_0x2552f2(_0x438c92(0x172)+_0x2aaf9f)),_0x545d18&&(_0x65dab7[_0x438c92(0x216)](_0x57b7f7,_0x438c92(0x21a)),_0x14deb2['slice'](0x0,0x5)[_0x438c92(0x167)](_0x2666c6=>_0x2552f2('\x20\x20-\x20'+_0x2666c6[_0x438c92(0x1d4)]+_0x438c92(0x1a7)+_0x2666c6[_0x438c92(0x270)])),_0x14deb2[_0x438c92(0x181)]>0x5&&_0x65dab7['amtzm'](_0x2552f2,_0x438c92(0x1b4)+_0x14deb2['length']+_0x438c92(0x16c))),0x0;_0x15ebc5(_0x438c92(0x1ae));const _0x4c837a=[];for(const _0x5d476f of _0x52c5d2)try{const _0xee4dd4=_0x5d476f+_0x438c92(0x22d)+new Date()[_0x438c92(0x26b)]()[_0x438c92(0x1f0)](/[:.]/g,'-');_0x325c87['copyFileSync'](_0x5d476f,_0xee4dd4),_0x4c837a['push'](_0xee4dd4),_0x2552f2(_0x438c92(0x19c)+_0x5d476f+_0x438c92(0x1a7)+_0xee4dd4);}catch(_0x49e7f0){_0x257120('安全备份失败\x20'+_0x5d476f+':'+_0x49e7f0['message']+_0x438c92(0x1db));}_0x65dab7[_0x438c92(0x200)](_0x4c837a['length'],0x0)&&_0x65dab7[_0x438c92(0x20d)](_0x29338b,_0x438c92(0x151)+_0x4c837a[_0x438c92(0x181)]+_0x438c92(0x1ff)),console[_0x438c92(0x1aa)](),_0x15ebc5(_0x65dab7[_0x438c92(0x1fa)]);const _0x2bdbc6=[];for(const _0x20f475 of _0x52c5d2)try{_0x325c87[_0x438c92(0x1c9)](_0x20f475),_0x65dab7[_0x438c92(0x223)](_0x29338b,_0x438c92(0x27c)+_0x20f475),_0x2bdbc6[_0x438c92(0x1cf)](_0x20f475);}catch(_0x2a2f24){_0x65dab7['dhYYW'](_0x65dab7[_0x438c92(0x27a)],_0x2a2f24[_0x438c92(0x24c)])||_0x65dab7[_0x438c92(0x24a)](_0x65dab7[_0x438c92(0x264)],_0x2a2f24['code'])||_0x65dab7['csGck'](_0x65dab7[_0x438c92(0x150)],_0x2a2f24['code'])?_0x65dab7[_0x438c92(0x163)](_0x257120,_0x438c92(0x272)+_0x20f475+_0x438c92(0x251)):_0x65dab7[_0x438c92(0x223)](_0x257120,_0x438c92(0x166)+_0x20f475+':'+_0x2a2f24['message']);}if(console[_0x438c92(0x1aa)](),_0x545d18){_0x65dab7['owvlb'](_0x15ebc5,_0x65dab7['jdTWK']);const _0x501fe1=new Map();for(const _0x2db80e of _0x14deb2){const _0x58899a=_0x501fe1[_0x438c92(0x179)](_0x2db80e['origPath']);(!_0x58899a||_0x65dab7['aJAmf'](_0x2db80e[_0x438c92(0x24e)],_0x58899a[_0x438c92(0x24e)]))&&_0x501fe1[_0x438c92(0x233)](_0x2db80e['origPath'],_0x2db80e);}let _0x23bb09=0x0;for(const [_0x1e63f2,_0x4a0495]of _0x501fe1)try{_0x65dab7[_0x438c92(0x283)](_0x48fff2,_0x4a0495[_0x438c92(0x1d4)],_0x1e63f2),_0x65dab7[_0x438c92(0x16d)](_0x29338b,_0x438c92(0x1e7)+_0x4a0495['bakPath']+'\x20→\x20'+_0x1e63f2),_0x23bb09++;}catch(_0x3efeb6){_0x65dab7[_0x438c92(0x239)](_0x59cbbd,_0x438c92(0x195)+_0x1e63f2+':'+_0x3efeb6[_0x438c92(0x1c7)]+_0x438c92(0x1bc));}_0x23bb09>0x0&&_0x65dab7[_0x438c92(0x1e1)](_0x57b7f7,_0x438c92(0x242)+_0x23bb09+_0x438c92(0x1ff)),console[_0x438c92(0x1aa)]();}return _0x65dab7[_0x438c92(0x15e)](_0x15ebc5,_0x65dab7[_0x438c92(0x1b3)]),_0x65dab7[_0x438c92(0x18e)](_0x29338b,_0x438c92(0x271)+_0x2bdbc6[_0x438c92(0x181)]+_0x438c92(0x1fb)),_0x4c837a[_0x438c92(0x181)]>0x0&&(_0x65dab7[_0x438c92(0x1f3)](_0x57b7f7,_0x65dab7[_0x438c92(0x18a)]),_0x4c837a[_0x438c92(0x167)](_0x555509=>_0x2552f2('\x20\x20-\x20'+_0x555509))),_0x65dab7[_0x438c92(0x231)](_0x57b7f7,_0x438c92(0x26d)),_0x65dab7['EEFEO'](_0x2bdbc6[_0x438c92(0x181)],0x0)?0x0:0x1;},'description':_0x3d79d7(0x203)},'refresh-groups':{'handler':async function(_0x594fc9){const _0x4d88f9=_0x3d79d7,_0x2936b4={'dHnFF':function(_0x256fe7,_0x45d383){return _0x256fe7(_0x45d383);},'bYAWx':function(_0x81b88f,_0x10c590){return _0x81b88f(_0x10c590);},'bVtIA':function(_0x193db7,_0x477761){return _0x193db7(_0x477761);},'MBoys':function(_0x2057f1){return _0x2057f1();},'lwnzP':function(_0x5d2caa,_0x497150){return _0x5d2caa(_0x497150);},'ZlyGE':function(_0x174f0c,_0x4a2ae9){return _0x174f0c(_0x4a2ae9);},'YWQub':_0x4d88f9(0x1a7),'EjUHS':function(_0x395a61,_0x3289e7){return _0x395a61>_0x3289e7;},'faClk':_0x4d88f9(0x201),'hvXnv':function(_0x172180,_0x586d60){return _0x172180(_0x586d60);},'UaGKo':_0x4d88f9(0x1ed),'VacOF':function(_0x4dedec,_0x293b23){return _0x4dedec===_0x293b23;},'zhkwv':function(_0x54f6c8,_0x4ece66){return _0x54f6c8(_0x4ece66);},'FSqwF':'未查询到可用分组','bkbnC':function(_0x33f8c6,_0x3e5704){return _0x33f8c6(_0x3e5704);},'vgJHg':function(_0x5f593d,_0x24dd2e){return _0x5f593d(_0x24dd2e);},'KtcGh':function(_0x1af1b4,_0x5950f2){return _0x1af1b4(_0x5950f2);},'ehIUV':'分组列表','ChFAV':function(_0x5b4a6a,_0x2a2ed5){return _0x5b4a6a(_0x2a2ed5);},'zsqOG':function(_0x5eb176,_0x8d0ec){return _0x5eb176+_0x8d0ec;},'PGATc':function(_0x1135d0,_0x6681d3){return _0x1135d0+_0x6681d3;},'AKKjv':function(_0x2f7f4c,_0x32789a){return _0x2f7f4c+_0x32789a;},'KBfvs':_0x4d88f9(0x19e),'wKVbh':function(_0xeb47a5,_0x5a9511){return _0xeb47a5(_0x5a9511);},'rxWpM':_0x4d88f9(0x1ca),'tplXr':function(_0x4aeeb3,_0x2dc6bd){return _0x4aeeb3(_0x2dc6bd);},'xvdlY':_0x4d88f9(0x1dd),'zggfx':function(_0x304bde,_0x32ba0e){return _0x304bde(_0x32ba0e);},'QjdOy':_0x4d88f9(0x287)},_0x277389=_0x2936b4['bYAWx'](D,_0x594fc9);if(_0x277389[_0x4d88f9(0x1bb)])return console[_0x4d88f9(0x1aa)](_0x4d88f9(0x1c5)+F),0x0;_0x209291();const _0x535f48=_0x2936b4[_0x4d88f9(0x157)](_0x21de1d);if(!_0x535f48[_0x4d88f9(0x1af)][_0x4d88f9(0x23c)])return _0x2936b4[_0x4d88f9(0x275)](_0x257120,_0x4d88f9(0x256)+_0x535f48[_0x4d88f9(0x1af)]['version']),0x1;const _0x5025bb=_0x17c32c(_0x277389[_0x4d88f9(0x25a)]||process[_0x4d88f9(0x237)]['ACTIVATE_API_BASE']);_0x2936b4[_0x4d88f9(0x250)](_0x57b7f7,_0x4d88f9(0x20f)+_0x5025bb[_0x4d88f9(0x285)](_0x2936b4[_0x4d88f9(0x282)])+(_0x2936b4[_0x4d88f9(0x26f)](_0x5025bb['length'],0x1)?_0x2936b4[_0x4d88f9(0x1fc)]:'')),console['log'](),_0x2936b4[_0x4d88f9(0x19b)](_0x15ebc5,_0x2936b4[_0x4d88f9(0x260)]);let _0x23c1b4=[];try{_0x23c1b4=await _0xd12718({'apiBases':_0x5025bb});}catch(_0x5dccc8){return _0x257120(_0x4d88f9(0x265)+_0x5dccc8[_0x4d88f9(0x1c7)]),0x1;}if(_0x2936b4[_0x4d88f9(0x215)](0x0,_0x23c1b4[_0x4d88f9(0x181)]))return _0x2936b4[_0x4d88f9(0x1e8)](_0x59cbbd,_0x2936b4[_0x4d88f9(0x1ad)]),_0x2936b4[_0x4d88f9(0x205)](_0x57b7f7,_0x4d88f9(0x18f)),_0x2936b4[_0x4d88f9(0x1b9)](_0x57b7f7,_0x4d88f9(0x1e9)+_0x5025bb[_0x4d88f9(0x285)]('、')+_0x4d88f9(0x1d1)),0x0;_0x2936b4[_0x4d88f9(0x1f7)](_0x29338b,_0x4d88f9(0x197)+_0x23c1b4[_0x4d88f9(0x181)]+_0x4d88f9(0x155)),console[_0x4d88f9(0x1aa)](),_0x2936b4[_0x4d88f9(0x25e)](_0x15ebc5,_0x2936b4[_0x4d88f9(0x22e)]);const _0x35756b=Math[_0x4d88f9(0x159)](0x4,..._0x23c1b4[_0x4d88f9(0x1cb)](_0x2187f5=>String(_0x2187f5['id']??'')[_0x4d88f9(0x181)])),_0x49cdb8=Math[_0x4d88f9(0x159)](0x6,..._0x23c1b4[_0x4d88f9(0x1cb)](_0x141c77=>String(_0x141c77[_0x4d88f9(0x156)]??'')[_0x4d88f9(0x181)])),_0x423007='\x20\x20'+'ID'[_0x4d88f9(0x214)](_0x35756b)+'\x20\x20'+'名称'[_0x4d88f9(0x214)](_0x49cdb8)+'\x20\x20说明';return _0x2936b4[_0x4d88f9(0x206)](_0x2552f2,_0x139616['bold'][_0x4d88f9(0x26c)](_0x423007)),_0x2936b4[_0x4d88f9(0x225)](_0x2552f2,_0x139616[_0x4d88f9(0x212)](_0x2936b4[_0x4d88f9(0x224)]('\x20\x20','─'[_0x4d88f9(0x21c)](_0x2936b4['PGATc'](_0x2936b4[_0x4d88f9(0x261)](_0x35756b,_0x49cdb8),0xf))))),_0x23c1b4[_0x4d88f9(0x167)]((_0x25dba9,_0x5407a6)=>{const _0x38f72b=_0x4d88f9,_0x1c2ed6=_0x2936b4[_0x38f72b(0x1f7)](String,_0x25dba9['id']??'')['padEnd'](_0x35756b),_0x325b69=_0x2936b4[_0x38f72b(0x225)](String,_0x25dba9[_0x38f72b(0x156)]??'')[_0x38f72b(0x214)](_0x49cdb8),_0x4691f7='\x20\x20'+_0x139616[_0x38f72b(0x174)](_0x1c2ed6)+'\x20\x20'+_0x139616[_0x38f72b(0x1f5)](_0x325b69);_0x2936b4[_0x38f72b(0x23d)](_0x2552f2,_0x4691f7);}),console[_0x4d88f9(0x1aa)](),_0x2936b4[_0x4d88f9(0x1b9)](_0x57b7f7,_0x2936b4['KBfvs']),_0x2936b4[_0x4d88f9(0x278)](_0x2552f2,_0x2936b4[_0x4d88f9(0x25f)]),_0x2936b4['tplXr'](_0x2552f2,_0x2936b4[_0x4d88f9(0x1f1)]),_0x2936b4[_0x4d88f9(0x191)](_0x57b7f7,_0x2936b4['QjdOy']),0x0;},'description':_0x3d79d7(0x277)},'diagnose':{'handler':async function(_0xc12687){const _0x2cec5c=_0x3d79d7,_0x592514={'MOygo':function(_0xb2f0d3,_0x530448){return _0xb2f0d3(_0x530448);},'gkPgx':function(_0xd24ce3){return _0xd24ce3();},'czBzF':function(_0x309c7e){return _0x309c7e();},'luXsM':_0x2cec5c(0x1a7),'ETeXO':function(_0x5af4e0,_0x1fef30){return _0x5af4e0===_0x1fef30;},'beOlq':function(_0x14cb49,_0x5ccbc0){return _0x14cb49==_0x5ccbc0;},'qsaYf':'string','yoKXe':_0x2cec5c(0x27e),'FjfCC':function(_0x329e44,_0x10f36b){return _0x329e44(_0x10f36b);},'ofujm':function(_0x45ddb0,_0x441761){return _0x45ddb0(_0x441761);},'jbXTj':_0x2cec5c(0x243)},_0x38c257=_0x592514['MOygo'](D,_0xc12687);if(_0x38c257[_0x2cec5c(0x1bb)])return console['log'](_0x2cec5c(0x15f)+F),0x0;_0x592514['gkPgx'](_0x209291);const _0x57d618=_0x592514[_0x2cec5c(0x160)](_0x21de1d);if(!_0x57d618[_0x2cec5c(0x1af)]['supported'])return _0x257120(_0x2cec5c(0x256)+_0x57d618[_0x2cec5c(0x1af)][_0x2cec5c(0x245)]),0x1;const _0x5d9732=_0x17c32c(_0x38c257[_0x2cec5c(0x25a)]||process['env'][_0x2cec5c(0x286)]);let _0x36c925;try{_0x36c925=await _0x15a8bc(_0x5d9732);}catch(_0x922701){return _0x257120('所有端点均不可达(已尝试\x20'+_0x5d9732[_0x2cec5c(0x285)]('、')+'):'+_0x922701[_0x2cec5c(0x1c7)]),0x1;}_0x592514[_0x2cec5c(0x27b)](_0x57b7f7,_0x2cec5c(0x20f)+_0x5d9732[_0x2cec5c(0x285)](_0x592514['luXsM'])+_0x2cec5c(0x236)+_0x36c925);const _0x18bc08={'yes':_0x592514[_0x2cec5c(0x24d)](!0x0,_0x38c257[_0x2cec5c(0x235)]),'models':_0x592514[_0x2cec5c(0x241)](_0x592514[_0x2cec5c(0x211)],typeof _0x38c257['model'])?_0x38c257['model']:void 0x0,'skipCliTests':_0x592514['ETeXO'](!0x0,_0x38c257[_0x2cec5c(0x186)]),'outDir':_0x38c257[_0x2cec5c(0x153)]};let _0x4d7008;_0x18bc08[_0x2cec5c(0x235)]||_0x57b7f7(_0x592514[_0x2cec5c(0x14a)]);try{_0x4d7008=await _0x592514[_0x2cec5c(0x27b)](_0x17c269,{'apiBase':_0x36c925,'opts':_0x18bc08,'ui':{'banner':_0x209291,'ok':_0x29338b,'fail':_0x257120,'warn':_0x59cbbd,'info':_0x57b7f7,'step':_0x15ebc5,'plain':_0x2552f2,'guide':_0x2df0f2,'chalk':_0x139616}});}catch(_0x2e600f){return _0x592514['FjfCC'](_0x257120,_0x2cec5c(0x182)+(_0x2e600f?.[_0x2cec5c(0x1c7)]||_0x2e600f)),0x1;}return _0x592514['FjfCC'](Z,_0x4d7008),_0x592514[_0x2cec5c(0x1dc)](_0x29338b,_0x2cec5c(0x17a)+_0x4d7008[_0x2cec5c(0x1f9)]),_0x57b7f7(_0x592514['jbXTj']),0x0;},'description':_0x3d79d7(0x1bd)}};export const SUBCOMMAND_NAMES=new Set(Object['keys'](SUBCOMMANDS));export{F as SUB_HELP};
|