@2api-store/activate 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -1
- 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 -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 +3 -2
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ npx @2api-store/activate
|
|
|
27
27
|
|
|
28
28
|
## 子命令
|
|
29
29
|
|
|
30
|
-
除了默认激活流程,还提供
|
|
30
|
+
除了默认激活流程,还提供 5 个子命令用于后续维护:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
33
|
npx @2api-store/activate <subcommand> [options]
|
|
@@ -38,6 +38,7 @@ npx @2api-store/activate <subcommand> [options]
|
|
|
38
38
|
| `restore` | 从备份恢复:扫描 `~/.codex/`、`~/.claude/`、`~/.gemini/` 下的 `.bak.*` 文件,选择一个恢复(覆盖当前) |
|
|
39
39
|
| `reset` | 恢复官方默认:删除 2api.store 写入的配置文件(`~/.codex/config.toml`、`~/.codex/auth.json`、`~/.claude/settings.json`、`~/.gemini/settings.json`),并尝试从最新备份恢复。**破坏性操作,需确认** |
|
|
40
40
|
| `refresh-groups` | 查看可用分组:`GET /cli/groups` → 彩色表格展示。只读,不改 key/配置 |
|
|
41
|
+
| `diagnose` | 一键诊断连接并生成日志压缩包:环境收集 + 渠道 HTTP 实测(真实小请求)+ 已装 CLI 实测,zip 已脱敏,发给客服排障 |
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
### restore — 从备份恢复
|
|
@@ -82,6 +83,38 @@ npx @2api-store/activate refresh-groups
|
|
|
82
83
|
- 只读,不改 key/配置
|
|
83
84
|
- 如需切组:已有 API Key 走管理后台,或重新激活(兑换码可重选分组)
|
|
84
85
|
|
|
86
|
+
### diagnose — 连接诊断与日志收集
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
npx @2api-store/activate diagnose # 一键诊断(执行前有确认)
|
|
90
|
+
npx @2api-store/activate diagnose --yes # 免确认(客服远程指导可直接贴这条命令)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
连接不通 / 时快时慢 / 想让客服排查时使用。自动完成:凭据发现(按序扫 `~/.codex/auth.json` → `~/.claude/settings.json` → `~/.gemini/settings.json`,找不到会提示输入)→ 环境快照(OS / Node / 已装 CLI / 配置文件元信息 / 代理环境变量)→ 拉后端诊断矩阵(不可用时走内置兜底)→ 对每个测试模型发真实小请求实测 → 已装 CLI 非交互实测(各 30s 超时)→ 脱敏打包 zip + 打印摘要表。
|
|
94
|
+
|
|
95
|
+
| 参数 | 说明 |
|
|
96
|
+
|------|------|
|
|
97
|
+
| `--yes, -y` | 免确认直接执行(真实小请求,正常计费) |
|
|
98
|
+
| `--model <m1,m2>` | 覆盖测试模型(逗号分隔;默认用后端下发矩阵 / 内置兜底) |
|
|
99
|
+
| `--skip-cli-tests` | 只测 HTTP,不运行本地 CLI |
|
|
100
|
+
| `--out <dir>` | 诊断包输出目录(默认当前目录) |
|
|
101
|
+
| `--api-base <url>` | 覆盖 API 端点(同其他子命令) |
|
|
102
|
+
|
|
103
|
+
**zip 包内文件**(顶层目录 `tokenshop-diagnose-<时间戳>/`):
|
|
104
|
+
|
|
105
|
+
| 文件 | 内容 |
|
|
106
|
+
|------|------|
|
|
107
|
+
| `summary.json` | 环境 + 测试结果汇总(客服先看这个) |
|
|
108
|
+
| `env.json` | OS / Node 版本 / 已装 CLI / 配置文件元信息 / 代理环境变量 |
|
|
109
|
+
| `http-tests.jsonl` | 每个模型一行:request_id / 状态码 / ttfb / 总延迟 / 错误 / 响应片段 |
|
|
110
|
+
| `cli-tests.jsonl` | 每个已装 CLI 一行:命令 / 退出码 / 耗时 / 是否超时 / stdout+stderr(截断 10KB) |
|
|
111
|
+
| `configs/` | 本地配置文件的**脱敏副本**(不存在的文件跳过) |
|
|
112
|
+
| `README.txt` | 给客服的说明(含 request_id 对账用法) |
|
|
113
|
+
|
|
114
|
+
**隐私说明**:包内所有密钥全程掩码(`sk-…尾6` 形态,绝不落明文);Bearer 凭证、邮箱、代理 URL 内嵌的账号密码均自动脱敏;`configs/` 是脱敏副本,本地原始配置文件不会被修改。
|
|
115
|
+
|
|
116
|
+
**计费提示**:HTTP 实测会对每个测试模型发送**真实计费**的小请求(`max_tokens=1`,每模型约几分钱)。每条 HTTP 记录的 `request_id` 取自响应头 `X-Request-Id`,客服凭它可在生产后台 usage_logs / 网关日志中精确对账该次请求。
|
|
117
|
+
|
|
85
118
|
## 命令行选项
|
|
86
119
|
|
|
87
120
|
```
|
package/dist/activate.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const _0x1a5267=_0x4a37;(function(_0x109892,_0x30bde3){const _0x3b5d45=_0x4a37,_0x1b9405=_0x109892();while(!![]){try{const _0x1c3a4a=parseInt(_0x3b5d45(0x1e0))/0x1*(-parseInt(_0x3b5d45(0x1da))/0x2)+-parseInt(_0x3b5d45(0x22a))/0x3+-parseInt(_0x3b5d45(0x187))/0x4+-parseInt(_0x3b5d45(0x1ea))/0x5*(parseInt(_0x3b5d45(0x252))/0x6)+-parseInt(_0x3b5d45(0x215))/0x7*(-parseInt(_0x3b5d45(0x1bb))/0x8)+parseInt(_0x3b5d45(0x1b1))/0x9*(parseInt(_0x3b5d45(0x265))/0xa)+-parseInt(_0x3b5d45(0x18e))/0xb*(-parseInt(_0x3b5d45(0x264))/0xc);if(_0x1c3a4a===_0x30bde3)break;else _0x1b9405['push'](_0x1b9405['shift']());}catch(_0x147c8b){_0x1b9405['push'](_0x1b9405['shift']());}}}(_0x2c7f,0x3192a),(process[_0x1a5267(0x1e1)]('warning'),process['env'][_0x1a5267(0x24a)]='1'));import{detectAll as _0x554da3}from'./lib/detect.mjs';import{cliActivate as _0x49454e,listGroups as _0x3de344,verifyApiKey as _0xbc128b}from'./lib/api.mjs';import{renderContent as _0x2e8cd3,expandPath as _0x4cf4c7,listModels as _0x4241e9}from'./lib/render.mjs';import{backupFile as _0x7b87ad}from'./lib/backup.mjs';import{writeFileWithPermission as _0x1edfeb,PermissionDeniedError as _0x4e346a}from'./lib/write.mjs';function _0x2c7f(){const _0x122d6a=['uBkCp','已写入\x20','(ID\x20','api_key','configs','选择\x20CLI','PowerShell','\x20\x20备份:','wlmdt','API\x20Key','--dry-run','uTEPL','dSImR','2OoVaka','EEZIg','client_type','hotWX','is_new','激活失败:','280743umuWjh','removeAllListeners','env','\x20无可自动安装的\x20npm\x20包,请手动安装后重跑(配置仍会写入)','xqACY','redeem','clientType','lWaAG','XztpQ','sk-','105SXZRqk','handler','usage','startCmd','email','macOS','toLowerCase','ukPyq','未检测到\x20codex/claude/gemini/grok/opencode(可在后续步骤按需自动安装)','部分文件权限不足,请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑:','CfVPB','已选默认模型:','RpSqr','\x20安装失败:','\x20\x20sudo\x20npx\x20-y\x20@2api-store/activate','has','已写入','\x20安装成功','replace','startsWith','BWyWY','cGYSk','stack','TgYJe','apiBase','QEroQ','nPXuy','选择默认模型(最新优先)','TJYJr','选择要激活的\x20CLI(绿色=已装,灰色=未装;默认选主\x20CLI,独立\x20CLI\x20默认不选)','AKouQ','请求\x20GET\x20/v1/models…','\x20\x20[试运行]\x20不真实写入','NQTRV','xbOcA','isLinux','error','aEVBt','DMAQV','GKfMJ','\x20个文件','FMpup','IDnPf','7plalvG','\x20\x20内容预览:','dim','qqyPH','VcydN','需要\x20node\x20>=\x2018,当前\x20','displayName','\x20项:','DjuMX','rBCSF','cOobr','OOxjn','\x20已创建,请查收邮件获取初始密码,登录后尽快修改。','CDhVT','isWindows','请输入邮箱(用于兑换码绑定\x20/\x20新账号创建)','node','输入模型\x20ID(如\x20gpt-5.6-terra)','join','PalhW','supported','435264OSXvyO','user-declined','Linux','action','catch','(新用户已创建)','iAujG','/antigravity','lCrOb','获取可用分组','jxorM','--version','name','map','QsAur','验证未通过:','请求激活服务','includes','hFlmE','UmKOv','user','forEach','alreadyInstalled','cli','cuoOW','written','IVfuf','key','green','content','MdBZC','未选择分组','NODE_NO_WARNINGS','\x20\x20目标:','message','unknown','filter','help','kZJhY','已跳过\x20','2154loQmzf','\x20安装(','all','已选分组:','(命令\x20','未查询到可用分组。请联系管理员开通分组后再激活。','string','exit','models','iVfEQ','\x20·\x20node\x20v','MVaGj','\x20\x20\x20\x20','(独立\x20CLI)','empty','version','hJeOE','HTTP\x20','1373292fCtFge','148830zznJtZ','(配置仍会写入,但请手动安装后使用)','chwQd','ETsuu','eQaam','platform','【试运行模式\x20--dry-run】不会真写文件、不会真装\x20CLI','写入失败:','log','服务端未返回适配当前系统的配置模板','bGZTy','子命令\x20','服务端未返回模型列表,{{defaultModel}}\x20将留空','检查\x20CLI\x20安装状态','QbRMg','rftqM','\x20──','Windows','VpMTT','验证\x20API\x20Key','\x20个文件(未真实写入)','dxtGL','\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','config','kaslt','iSpvB','(跳过此文件避免无备份覆盖)','statusCode','backup','AegBr','os_type','cYwAK','WOVFF','DcHds','hJtXf','length','需手动执行的\x20shell\x20命令:','anthropic','Zceum','467860taYqmX','add','split','EqCqk','\x20安装(配置仍会写入,但请手动安装后使用)','API\x20端点:','detectBin','55Gaukad','windows','skipped','dry-run','installed','shell-only','──\x20','WQZxR','argv','gAifO','VwcvQ','模式:','DcKUm','ESuPZ','base_url','--api-base','\x20(未装)','QIsjZ','VcUCf','邮箱格式不正确','backup-failed','GvUPx','test','\x20\x20-\x20','ACTIVATE_API_BASE','./package.json','sQkzC','display_name','yEBGp','BIaJg','slice','FDzGz','meta','备份并写入配置','https://2api.store','99jIvAtI','yItdT','reason','permission-denied','path','\x20\x20[shell\x20命令,请手动执行]','push','gemini','\x0a@2api-store/activate\x20v','mkcNC','139736fWmfhh','label','TWSbC','新账号:','then','环境:','rYbCd','已检测到\x20CLI:','未输入凭据','mode','eYXJP','未知错误','FcueM','pGjcf','dryRun','ZxQqf','trim','(配置已写入,请手动检查)'];_0x2c7f=function(){return _0x122d6a;};return _0x2c7f();}import{ask as _0x40267d,askSecret as _0x223174,multiSelect as _0x1a7330,select as _0xd43561,confirm as _0x220760,closePrompt as _0x3cd086}from'./lib/prompt.mjs';import{banner as _0x3fabc7,ok as _0x183821,fail as _0x209486,warn as _0x3817ff,info as _0x5ed366,step as _0x51f4b6,guide as _0x322f21,plain as _0x599dc1,chalk as _0x1c34c9}from'./lib/ui.mjs';import{getCliMeta as _0x185173,isDefaultSelected as _0x1f8546}from'./lib/platforms.mjs';import{ensureInstalled as _0x5288b4}from'./lib/install.mjs';function _0x4a37(_0x42533c,_0x383a2){_0x42533c=_0x42533c-0x187;const _0x2c7f60=_0x2c7f();let _0x4a37ae=_0x2c7f60[_0x42533c];return _0x4a37ae;}import{SUBCOMMANDS as _0x3f31ad,SUBCOMMAND_NAMES as _0x255b0c,SUB_HELP as _0x32a3b9}from'./lib/cmds.mjs';import{createRequire as _0x232411}from'node:module';const L=_0x232411(import.meta.url)(_0x1a5267(0x1a7))[_0x1a5267(0x261)],W=_0x1a5267(0x1b0);(async function(){const _0x525297=_0x1a5267,_0x446692={'vBYwq':function(_0x2e45c1,_0x4507b3){return _0x2e45c1<_0x4507b3;},'eQaam':function(_0x3b040c,_0x49c1a4){return _0x3b040c===_0x49c1a4;},'GvUPx':function(_0x2e3bcd,_0x4104fc){return _0x2e3bcd===_0x4104fc;},'esCXS':'--platform','hotWX':_0x525297(0x19d),'HYaFE':'--help','dxtGL':function(_0x50ead2,_0x35dd8f){return _0x50ead2===_0x35dd8f;},'OOxjn':_0x525297(0x235),'BIaJg':function(_0x1840c0,_0x5da25c){return _0x1840c0===_0x5da25c;},'uBkCp':function(_0x273fe6,_0x5cfb37){return _0x273fe6==_0x5cfb37;},'cGYSk':_0x525297(0x258),'zlHvd':'openai','TJYJr':'claude','lCrOb':_0x525297(0x1b8),'XztpQ':'grok','CPoTs':function(_0x1667f9){return _0x1667f9();},'vhqIG':_0x525297(0x1ef),'itoRf':_0x525297(0x22c),'gSpGi':_0x525297(0x276),'NQTRV':function(_0x320748,_0x2d9dd8){return _0x320748(_0x2d9dd8);},'TnqEa':function(_0x5880e0,_0x50ddda){return _0x5880e0>_0x50ddda;},'EqCqk':function(_0x1c6478,_0x5c56b4){return _0x1c6478(_0x5c56b4);},'AegBr':_0x525297(0x1f2),'WQZxR':function(_0x1371d,_0x7bae97){return _0x1371d(_0x7bae97);},'FcueM':_0x525297(0x26b),'EEZIg':function(_0x5133d5,_0x27b0eb){return _0x5133d5(_0x27b0eb);},'dSImR':_0x525297(0x1c3),'ShMKB':_0x525297(0x1e9),'eYatx':_0x525297(0x245),'bGZTy':_0x525297(0x24d),'VwcvQ':_0x525297(0x260),'QbRMg':function(_0x15ac4e,_0x2c1cbe){return _0x15ac4e(_0x2c1cbe);},'chwQd':'凭据格式无法识别(应为\x20sk-\x20前缀的\x20API\x20Key\x20或兑换码)','CDhVT':_0x525297(0x1d6),'VwcRS':'兑换码','CXwhB':_0x525297(0x1e5),'mkcNC':_0x525297(0x224),'GKfMJ':function(_0x10e9ce,_0x2c01da){return _0x10e9ce(_0x2c01da);},'CfVPB':_0x525297(0x233),'ETsuu':function(_0x4a643c,_0x5b233c){return _0x4a643c(_0x5b233c);},'iVfEQ':function(_0x397904,_0x1218a4){return _0x397904(_0x1218a4);},'TWSbC':_0x525297(0x257),'MdBZC':'选择绑定的分组','USJLd':_0x525297(0x249),'MVaGj':function(_0x285483,_0x4d2734){return _0x285483(_0x4d2734);},'cuoOW':function(_0x572e42,_0x52d6b5){return _0x572e42(_0x52d6b5);},'VpMTT':_0x525297(0x23a),'ESuPZ':function(_0x5b2de9,_0x14ade9){return _0x5b2de9(_0x14ade9);},'uTEPL':function(_0xdddde9,_0x39633b){return _0xdddde9(_0x39633b);},'IVfuf':function(_0x5cb3ce,_0x3b04d1){return _0x5cb3ce(_0x3b04d1);},'QIsjZ':function(_0x5df067,_0xddddc7){return _0x5df067(_0xddddc7);},'TgYJe':function(_0x33e6b7,_0x5018a8){return _0x33e6b7(_0x5018a8);},'DcHds':function(_0xb2e24c,_0x5a1a7e){return _0xb2e24c(_0x5a1a7e);},'mmfQk':_0x525297(0x25f),'VcUCf':function(_0x17e698,_0x4aa337,_0x340917,_0x28f75b){return _0x17e698(_0x4aa337,_0x340917,_0x28f75b);},'lWaAG':_0x525297(0x207),'RpSqr':'未选择任何\x20CLI,退出。','vJcrV':_0x525297(0x272),'AKouQ':function(_0x2c0b80,_0x39939c){return _0x2c0b80(_0x39939c);},'wlmdt':function(_0x20cdc6,_0x23cdab){return _0x20cdc6(_0x23cdab);},'aEVBt':function(_0x46c40a,_0x509692,_0x4b1a76){return _0x46c40a(_0x509692,_0x4b1a76);},'xqACY':_0x525297(0x22b),'xbOcA':function(_0xc2f53,_0x2cc91e){return _0xc2f53(_0x2cc91e);},'iAujG':function(_0x2163ff,_0x30f33e){return _0x2163ff(_0x30f33e);},'ukPyq':_0x525297(0x1c6),'BWyWY':function(_0x2328a9,_0x26d2d4){return _0x2328a9(_0x26d2d4);},'yEBGp':function(_0x450f36,_0x4340a2){return _0x450f36>_0x4340a2;},'cOobr':function(_0x2a33eb,_0x200664){return _0x2a33eb(_0x200664);},'Zceum':_0x525297(0x205),'yNKEl':function(_0x56d7bb,_0x2f03c3){return _0x56d7bb>_0x2f03c3;},'jxorM':function(_0x574b53,_0x77a663,_0x58b5fa,_0x24aef7){return _0x574b53(_0x77a663,_0x58b5fa,_0x24aef7);},'eYXJP':'选择默认模型','cYwAK':function(_0x596260,_0x47135d){return _0x596260===_0x47135d;},'rftqM':_0x525297(0x226),'uAnOp':_0x525297(0x271),'sQkzC':_0x525297(0x1d3),'rBCSF':function(_0x585431,_0x4faa61){return _0x585431(_0x4faa61);},'SMwWY':_0x525297(0x1b6),'rYbCd':_0x525297(0x193),'FMpup':function(_0x3f116d,_0x1032a6){return _0x3f116d(_0x1032a6);},'LgVFB':_0x525297(0x20a),'IDnPf':function(_0x41c1e1,_0x594a39){return _0x41c1e1(_0x594a39);},'hFlmE':_0x525297(0x216),'WOVFF':function(_0x7f69f8,_0x45ada8){return _0x7f69f8(_0x45ada8);},'iSpvB':_0x525297(0x191),'QEroQ':function(_0x1b2eba,_0x2446dd){return _0x1b2eba(_0x2446dd);},'QsAur':'backup-failed','jGrzo':_0x525297(0x1fa),'kZJhY':function(_0x2cd4c5,_0x1bc084){return _0x2cd4c5 instanceof _0x1bc084;},'hJeOE':_0x525297(0x1b4),'qqyPH':'failed','UmKOv':function(_0x37dafb){return _0x37dafb();},'ZxQqf':_0x525297(0x278),'DjuMX':function(_0x444cca,_0x2f1990){return _0x444cca(_0x2f1990);},'nPXuy':_0x525297(0x209),'DMAQV':function(_0x44710f,_0x196326){return _0x44710f(_0x196326);},'yItdT':'API\x20Key\x20验证通过(GET\x20/v1/models\x20→\x20200)','PalhW':function(_0x2f06b5,_0x2f3869){return _0x2f06b5(_0x2f3869);},'gAifO':'激活报告','VcydN':function(_0x1d0abd,_0x1f55c3){return _0x1d0abd>_0x1f55c3;},'FDzGz':function(_0x5110bb,_0x18a3a8){return _0x5110bb>_0x18a3a8;},'pGjcf':'备份位置:','tRaJH':_0x525297(0x1f3),'DcKUm':_0x525297(0x1f8)},_0x12c43e=process['argv'][0x2];if(_0x12c43e&&!_0x12c43e[_0x525297(0x1fd)]('-')&&_0x255b0c[_0x525297(0x1f9)](_0x12c43e)){const _0x31ae1e=process[_0x525297(0x196)][_0x525297(0x1ac)](0x3),_0x16ec78=_0x3f31ad[_0x12c43e];try{return await _0x16ec78[_0x525297(0x1eb)](_0x31ae1e)||0x0;}catch(_0x4e3c10){return _0x209486(_0x525297(0x270)+_0x12c43e+'\x20异常:'+(_0x4e3c10?.[_0x525297(0x24c)]||_0x4e3c10)),_0x4e3c10?.[_0x525297(0x200)]&&console[_0x525297(0x20e)](_0x4e3c10[_0x525297(0x200)]),0x1;}}const _0xb27d0=function(_0x1dbffb){const _0xf12193=_0x525297,_0x21b0d4={'dryRun':!0x1,'platform':null,'_':[]};for(let _0x4b355c=0x0;_0x446692['vBYwq'](_0x4b355c,_0x1dbffb['length']);_0x4b355c++){const _0x5a2782=_0x1dbffb[_0x4b355c];if(_0x446692[_0xf12193(0x269)](_0xf12193(0x1d7),_0x5a2782)||_0x446692[_0xf12193(0x269)]('-n',_0x5a2782))_0x21b0d4['dryRun']=!0x0;else{if(_0x446692[_0xf12193(0x1a3)](_0x446692['esCXS'],_0x5a2782)||_0x446692[_0xf12193(0x269)]('-p',_0x5a2782))_0x21b0d4[_0xf12193(0x26a)]=_0x1dbffb[++_0x4b355c];else{if(_0x446692[_0xf12193(0x1a3)](_0x446692[_0xf12193(0x1dd)],_0x5a2782))_0x21b0d4[_0xf12193(0x202)]=_0x1dbffb[++_0x4b355c];else{if(_0x446692[_0xf12193(0x1a3)](_0x446692['HYaFE'],_0x5a2782)||_0x446692['dxtGL']('-h',_0x5a2782))_0x21b0d4[_0xf12193(0x24f)]=!0x0;else{if(_0x446692['eQaam'](_0x446692[_0xf12193(0x220)],_0x5a2782)||_0x446692['BIaJg']('-v',_0x5a2782))_0x21b0d4[_0xf12193(0x261)]=!0x0;else{if(_0x5a2782[_0xf12193(0x1fd)]('--')&&_0x5a2782[_0xf12193(0x23b)]('=')){const [_0x312021,_0x328617]=_0x5a2782[_0xf12193(0x1ac)](0x2)[_0xf12193(0x189)](/=(.*)/,0x2);_0x21b0d4[_0x312021]=_0x328617;}else _0x5a2782[_0xf12193(0x1fd)]('--')?_0x21b0d4[_0x5a2782[_0xf12193(0x1fc)](/^--/,'')]=_0x1dbffb[++_0x4b355c]:_0x21b0d4['_'][_0xf12193(0x1b7)](_0x5a2782);}}}}}}return _0x21b0d4;}(process[_0x525297(0x196)][_0x525297(0x1ac)](0x2));if(_0xb27d0[_0x525297(0x24f)])return console['log']((_0x525297(0x1b9)+L+'\x20—\x20TokenShop\x20CLI\x20一键激活\x0a\x0a用法:\x0a\x20\x20npx\x20@2api-store/activate\x20[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20默认激活流程\x0a\x20\x20npx\x20@2api-store/activate\x20<subcommand>\x20[options]\x20\x20\x20运行子命令\x0a\x0a选项(默认激活流程):\x0a\x20\x20--dry-run,\x20-n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20不真写配置/不真装\x20CLI,只展示将做什么\x0a\x20\x20--platform\x20<name>\x20\x20\x20\x20\x20\x20只激活指定平台(openai/anthropic/gemini/grok/antigravity)\x0a\x20\x20--api-base\x20<url>\x20\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(默认\x20$ACTIVATE_API_BASE\x20或\x20'+W+')\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'+_0x32a3b9+_0x525297(0x27b))['trim']()),0x0;if(_0xb27d0['version'])return console[_0x525297(0x26d)](L),0x0;_0x446692['CPoTs'](_0x3fabc7);const _0x5920f6=_0x554da3(),_0x40b6bd=_0x5920f6['os']['isMac']?_0x446692['vhqIG']:_0x5920f6['os'][_0x525297(0x20d)]?_0x446692['itoRf']:_0x5920f6['os'][_0x525297(0x223)]?_0x446692['gSpGi']:_0x5920f6['os'][_0x525297(0x26a)];if(_0x5ed366(_0x525297(0x1c0)+_0x40b6bd+_0x525297(0x25c)+_0x5920f6[_0x525297(0x225)][_0x525297(0x261)]),!_0x5920f6['node'][_0x525297(0x229)])return _0x446692[_0x525297(0x20b)](_0x209486,_0x525297(0x21a)+_0x5920f6[_0x525297(0x225)][_0x525297(0x261)]),0x1;const _0x42b406=Object['keys'](_0x5920f6[_0x525297(0x192)]),_0x37c378=_0x42b406[_0x525297(0x237)](_0x27491f=>{const _0x15df51=_0x525297,_0x181117=_0x5920f6[_0x15df51(0x192)][_0x27491f]?.['version'];return _0x181117?_0x27491f+'@'+_0x181117:_0x27491f;});_0x446692['TnqEa'](_0x42b406['length'],0x0)?_0x446692[_0x525297(0x20b)](_0x183821,_0x525297(0x1c2)+_0x37c378[_0x525297(0x227)](',\x20')):_0x446692['EqCqk'](_0x5ed366,_0x446692[_0x525297(0x282)]);const _0x491f75=_0xb27d0[_0x525297(0x202)]||process[_0x525297(0x1e2)][_0x525297(0x1a6)]||W;_0x446692['EqCqk'](_0x5ed366,_0x525297(0x18c)+_0x491f75),_0xb27d0[_0x525297(0x1c9)]&&_0x446692[_0x525297(0x195)](_0x3817ff,_0x446692[_0x525297(0x1c7)]),_0xb27d0['platform']&&_0x5ed366('平台过滤:'+_0xb27d0[_0x525297(0x26a)]),console[_0x525297(0x26d)]();const _0x5c4562=(await _0x446692[_0x525297(0x195)](_0x223174,'请输入\x20API\x20Key(sk-...)或兑换码'))[_0x525297(0x1cb)]();if(!_0x5c4562)return _0x446692[_0x525297(0x1db)](_0x209486,_0x446692[_0x525297(0x1d9)]),0x1;const _0x36dcfa=(_0x33bded=_0x5c4562)?_0x33bded[_0x525297(0x1fd)](_0x446692['ShMKB'])?_0x446692['eYatx']:/^[a-zA-Z0-9]{16,64}$/[_0x525297(0x1a4)](_0x33bded)?_0x525297(0x1e5):_0x446692['bGZTy']:_0x446692[_0x525297(0x198)];var _0x33bded;if(_0x446692[_0x525297(0x1a3)](_0x446692[_0x525297(0x26f)],_0x36dcfa))return _0x446692[_0x525297(0x273)](_0x209486,_0x446692[_0x525297(0x267)]),0x1;_0x446692[_0x525297(0x18a)](_0x5ed366,'识别为:'+(_0x446692[_0x525297(0x269)](_0x446692['eYatx'],_0x36dcfa)?_0x446692[_0x525297(0x222)]:_0x446692['VwcRS'])+'模式');let _0x41e77a,_0x4ce4aa='',_0x2a41a4=null;if(_0x446692[_0x525297(0x1ab)](_0x446692['CXwhB'],_0x36dcfa)){if(_0x4ce4aa=(await _0x446692[_0x525297(0x1db)](_0x40267d,_0x446692[_0x525297(0x1ba)]))['trim'](),!_0x4ce4aa||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/[_0x525297(0x1a4)](_0x4ce4aa))return _0x446692[_0x525297(0x1db)](_0x209486,_0x525297(0x1a1)),0x1;_0x446692[_0x525297(0x211)](_0x51f4b6,_0x446692[_0x525297(0x1f4)]);const _0x2a050b=await _0x446692[_0x525297(0x268)](_0x3de344,{'apiBase':_0x491f75});if(_0x446692[_0x525297(0x269)](0x0,_0x2a050b[_0x525297(0x288)]))return _0x446692[_0x525297(0x25b)](_0x209486,_0x446692[_0x525297(0x1bd)]),0x1;const _0x4ba440=_0x2a050b[_0x525297(0x237)](_0x36d1d8=>({'label':''+_0x36d1d8[_0x525297(0x236)],'value':_0x36d1d8['id']})),_0x351fb3=await _0xd43561(_0x446692[_0x525297(0x248)],_0x4ba440,{'defaultIndex':0x0});if(_0x2a41a4=_0x2a050b[_0x351fb3]?.['id'],!_0x2a41a4)return _0x446692['EEZIg'](_0x209486,_0x446692['USJLd']),0x1;_0x446692[_0x525297(0x25d)](_0x183821,_0x525297(0x255)+_0x2a050b[_0x351fb3][_0x525297(0x236)]+_0x525297(0x1cf)+_0x2a41a4+')'),console['log']();}_0x446692[_0x525297(0x242)](_0x51f4b6,_0x446692[_0x525297(0x277)]);try{_0x41e77a=await _0x49454e({'credential':_0x5c4562,'email':_0x4ce4aa,'platform':_0xb27d0[_0x525297(0x26a)],'groupId':_0x2a41a4,'apiBase':_0x491f75});}catch(_0x9ca20a){return _0x209486(_0x525297(0x1df)+_0x9ca20a['message']),_0x9ca20a[_0x525297(0x280)]&&_0x446692[_0x525297(0x19b)](_0x209486,'\x20\x20HTTP\x20'+_0x9ca20a[_0x525297(0x280)]),0x1;}_0x446692[_0x525297(0x273)](_0x183821,_0x525297(0x199)+_0x41e77a[_0x525297(0x1c4)]+(_0x41e77a[_0x525297(0x23e)]?.[_0x525297(0x1de)]?_0x525297(0x22f):'')),_0x41e77a[_0x525297(0x23e)]?.[_0x525297(0x1de)]&&_0x41e77a[_0x525297(0x23e)]?.[_0x525297(0x1ee)]&&(_0x446692[_0x525297(0x1d8)](_0x5ed366,_0x525297(0x1be)+_0x41e77a[_0x525297(0x23e)][_0x525297(0x1ee)]),_0x41e77a[_0x525297(0x23e)][_0x525297(0x24c)]&&_0x446692[_0x525297(0x244)](_0x5ed366,_0x41e77a[_0x525297(0x23e)]['message'])),console[_0x525297(0x26d)]();const _0x79aee3=function(_0x1fede9){const _0x12a57e=_0x525297,_0x5815fa=new Set();for(const _0x22c040 of _0x1fede9||[]){const _0x321a97=(_0x446692[_0x12a57e(0x1cd)](_0x446692[_0x12a57e(0x1ff)],typeof _0x22c040)?_0x22c040:_0x22c040?.['id']||'')[_0x12a57e(0x1f0)]();/^(gpt|o1|o3|codex|glm|minimax|deepseek)/[_0x12a57e(0x1a4)](_0x321a97)?_0x5815fa[_0x12a57e(0x188)](_0x446692['zlHvd']):_0x321a97[_0x12a57e(0x1fd)](_0x446692[_0x12a57e(0x206)])?_0x5815fa[_0x12a57e(0x188)](_0x12a57e(0x28a)):_0x321a97[_0x12a57e(0x1fd)](_0x446692['lCrOb'])?_0x5815fa['add'](_0x446692[_0x12a57e(0x232)]):_0x321a97[_0x12a57e(0x1fd)](_0x446692[_0x12a57e(0x1e8)])&&_0x5815fa[_0x12a57e(0x188)](_0x446692[_0x12a57e(0x1e8)]);}return[..._0x5815fa];}(_0x41e77a[_0x525297(0x25a)]||[]);_0xb27d0['platform']&&!_0x79aee3[_0x525297(0x23b)](_0xb27d0[_0x525297(0x26a)])&&_0x79aee3[_0x525297(0x1b7)](_0xb27d0['platform']);const _0x223c3a=(_0x41e77a[_0x525297(0x1d1)]||[])[_0x525297(0x24e)](_0x5a64da=>!!_0x5a64da&&(!(_0x79aee3['length']>0x0&&!_0x79aee3[_0x525297(0x23b)](_0x5a64da[_0x525297(0x26a)]))&&((!_0xb27d0[_0x525297(0x26a)]||_0x5a64da[_0x525297(0x26a)]===_0xb27d0[_0x525297(0x26a)])&&(_0x5920f6['os'][_0x525297(0x223)]?_0x525297(0x18f)===_0x5a64da[_0x525297(0x283)]||_0x525297(0x254)===_0x5a64da[_0x525297(0x283)]:'unix'===_0x5a64da['os_type']||_0x525297(0x254)===_0x5a64da[_0x525297(0x283)]))));if(_0x446692[_0x525297(0x1a3)](0x0,_0x223c3a[_0x525297(0x288)]))return _0x446692[_0x525297(0x19f)](_0x209486,_0x525297(0x26e)),0x1;const _0x1168f5=new Set(),_0x485836=[];for(const _0xf86afc of _0x223c3a){const _0x22be44=_0xf86afc[_0x525297(0x26a)]+'/'+_0xf86afc[_0x525297(0x1dc)];if(_0x1168f5['has'](_0x22be44))continue;_0x1168f5[_0x525297(0x188)](_0x22be44);const _0x2ccba4=_0x446692[_0x525297(0x201)](_0x185173,_0xf86afc[_0x525297(0x1dc)]),_0x26c607=_0xf86afc[_0x525297(0x1a9)]||_0xf86afc[_0x525297(0x21b)]||_0x2ccba4?.[_0x525297(0x236)]||_0xf86afc['platform']+'\x20'+_0xf86afc[_0x525297(0x1dc)],_0x5845bb=_0x5920f6[_0x525297(0x192)][_0xf86afc[_0x525297(0x1dc)]]?.[_0x525297(0x1b5)]||_0x2ccba4&&_0x5920f6[_0x525297(0x192)][_0x2ccba4['detectBin']]?.['path'],_0x568c37=_0x446692[_0x525297(0x286)](_0x1f8546,_0xf86afc[_0x525297(0x1dc)])?'':_0x446692['mmfQk'],_0x2e3eb9=_0x5845bb?_0x1c34c9[_0x525297(0x246)](_0x26c607):_0x1c34c9['gray'](_0x26c607+_0x525297(0x19e));_0x485836['push']({'label':_0x2e3eb9+'\x20'+_0x1c34c9[_0x525297(0x217)]('['+_0xf86afc[_0x525297(0x26a)]+'/'+_0xf86afc[_0x525297(0x1dc)]+']')+_0x568c37,'config':_0xf86afc,'clientType':_0xf86afc[_0x525297(0x1dc)],'meta':_0x2ccba4,'alreadyInstalled':!!_0x5845bb});}const _0x399f5b=_0x485836[_0x525297(0x237)]((_0x4a3b56,_0x491191)=>({'item':_0x4a3b56,'i':_0x491191}))[_0x525297(0x24e)](({item:_0x390eb3})=>_0x1f8546(_0x390eb3[_0x525297(0x1e6)]))[_0x525297(0x237)](({i:_0x28df5c})=>_0x28df5c);_0x51f4b6(_0x525297(0x1d2));const _0x68b875=await _0x446692[_0x525297(0x1a0)](_0x1a7330,_0x446692[_0x525297(0x1e7)],_0x485836,{'defaultSelected':_0x399f5b});if(0x0===_0x68b875['length'])return _0x446692[_0x525297(0x244)](_0x599dc1,_0x446692[_0x525297(0x1f6)]),0x0;const _0x3a4b44=_0x68b875[_0x525297(0x237)](_0x30ca73=>_0x485836[_0x30ca73]);if(console[_0x525297(0x26d)](),!_0xb27d0['dryRun']){_0x51f4b6(_0x446692['vJcrV']);for(const _0xf8747d of _0x3a4b44){if(_0xf8747d[_0x525297(0x240)]){const _0x3758b6=_0x5920f6[_0x525297(0x192)][_0xf8747d[_0x525297(0x1e6)]]?.['version']||_0x5920f6[_0x525297(0x192)][_0xf8747d[_0x525297(0x1ae)]?.['detectBin']]?.['version'];_0x446692[_0x525297(0x18a)](_0x183821,(_0xf8747d[_0x525297(0x1ae)]?.[_0x525297(0x236)]||_0xf8747d[_0x525297(0x1e6)])+'\x20已安装'+(_0x3758b6?'(v'+_0x3758b6+')':''));continue;}if(!_0xf8747d[_0x525297(0x1ae)]||!_0xf8747d[_0x525297(0x1ae)]['installPackage']){_0x446692[_0x525297(0x208)](_0x3817ff,_0xf8747d['clientType']+_0x525297(0x1e3));continue;}_0x446692[_0x525297(0x1d5)](_0x5ed366,'未检测到\x20'+_0xf8747d[_0x525297(0x1ae)]['name']+_0x525297(0x256)+_0xf8747d[_0x525297(0x1ae)][_0x525297(0x18d)]+')');const _0xb73d99=await _0x446692[_0x525297(0x20f)](_0x5288b4,_0xf8747d['meta'],{'dryRun':_0xb27d0[_0x525297(0x1c9)]});_0xb73d99[_0x525297(0x192)]?_0x183821(_0xf8747d['meta'][_0x525297(0x236)]+_0x525297(0x1fb)+(_0xb73d99[_0x525297(0x261)]?'(v'+_0xb73d99['version']+')':'')):_0xb73d99[_0x525297(0x190)]&&_0x446692[_0x525297(0x27a)](_0x446692[_0x525297(0x1e4)],_0xb73d99[_0x525297(0x1b3)])?_0x446692[_0x525297(0x20c)](_0x3817ff,_0x525297(0x251)+_0xf8747d[_0x525297(0x1ae)][_0x525297(0x236)]+_0x525297(0x18b)):_0xb73d99['skipped']?_0x446692[_0x525297(0x230)](_0x5ed366,_0x525297(0x251)+_0xf8747d[_0x525297(0x1ae)][_0x525297(0x236)]+_0x525297(0x253)+_0xb73d99[_0x525297(0x1b3)]+')'):_0x446692[_0x525297(0x201)](_0x209486,_0xf8747d['meta'][_0x525297(0x236)]+_0x525297(0x1f7)+(_0xb73d99['error']||_0x446692[_0x525297(0x1f1)])+_0x525297(0x266));}console['log']();}const _0x4ea273=_0x446692[_0x525297(0x1fe)](_0x4241e9,_0x41e77a[_0x525297(0x25a)]||[]);let _0x52430a='';if(_0x446692[_0x525297(0x1aa)](_0x4ea273['length'],0x0)){_0x446692['cOobr'](_0x51f4b6,_0x446692[_0x525297(0x28b)]);const _0x1b9c09=0xa,_0x553547=_0x4ea273[_0x525297(0x1ac)](0x0,_0x1b9c09),_0x2af53f=_0x446692['yNKEl'](_0x4ea273[_0x525297(0x288)],_0x1b9c09),_0xb2d386=[..._0x553547[_0x525297(0x237)](_0x55f1b9=>({'label':_0x55f1b9[_0x525297(0x1bc)]+'\x20('+_0x55f1b9['id']+')'})),..._0x2af53f?[{'label':_0x1c34c9[_0x525297(0x217)]('其他(手动输入模型\x20ID)')}]:[]],_0x569e19=await _0x446692[_0x525297(0x234)](_0xd43561,_0x446692[_0x525297(0x1c5)],_0xb2d386,{'defaultIndex':0x0});_0x2af53f&&_0x446692[_0x525297(0x284)](_0x569e19,_0x553547[_0x525297(0x288)])?(_0x52430a=(await _0x446692[_0x525297(0x208)](_0x40267d,_0x446692[_0x525297(0x274)]))[_0x525297(0x1cb)](),_0x52430a||(_0x52430a=_0x553547[0x0]['id'])):_0x52430a=_0x553547[_0x569e19]['id'],_0x446692[_0x525297(0x21f)](_0x183821,_0x525297(0x1f5)+_0x52430a);}else _0x446692[_0x525297(0x20c)](_0x3817ff,_0x446692['uAnOp']);console[_0x525297(0x26d)]();const _0x5da2fd=_0x41e77a[_0x525297(0x19c)]||'',_0x2eeaeb=_0x41e77a['base_url_beta']||_0x5da2fd,_0x58a299={'apiKey':_0x41e77a[_0x525297(0x1d0)]||'','baseUrl':_0x5da2fd,'apiBase':_0x5da2fd,'apiBaseBeta':_0x2eeaeb,'antigravityApiBase':_0x5da2fd+_0x525297(0x231),'antigravityApiBaseBeta':_0x2eeaeb+_0x525297(0x231),'defaultModel':_0x52430a};_0x51f4b6(_0x525297(0x1af));const _0x4b4c0f=[];let _0x4a06d0=null;for(const _0x1785ca of _0x3a4b44){const _0x374f8c=_0x1785ca[_0x525297(0x27c)][_0x525297(0x1a9)]||_0x1785ca['config'][_0x525297(0x21b)]||_0x1785ca[_0x525297(0x1ae)]?.[_0x525297(0x236)]||_0x1785ca[_0x525297(0x1e6)];_0x446692[_0x525297(0x1d5)](_0x599dc1,_0x525297(0x194)+_0x374f8c+_0x525297(0x275));const _0x54206b=_0x1785ca[_0x525297(0x27c)]['files']||[];for(const _0x2a8170 of _0x54206b){const _0x4933e4=_0x2a8170[_0x525297(0x1b5)]||'',_0x16c04f=_0x446692[_0x525297(0x1ab)]('Terminal',_0x4933e4)||_0x446692[_0x525297(0x1a8)]===_0x4933e4,_0x40ffcb=_0x16c04f?_0x4933e4:_0x4cf4c7(_0x4933e4,{'isWindows':_0x5920f6['os'][_0x525297(0x223)]}),_0x706fef=_0x2e8cd3(_0x2a8170[_0x525297(0x247)]||'',_0x58a299);if(_0x16c04f){_0x446692[_0x525297(0x21e)](_0x599dc1,_0x446692['SMwWY']),_0x599dc1(_0x706fef[_0x525297(0x189)]('\x0a')[_0x525297(0x237)](_0x203beb=>'\x20\x20\x20\x20'+_0x203beb)['join']('\x0a')),_0x4b4c0f[_0x525297(0x1b7)]({'cli':_0x374f8c,'path':_0x4933e4,'action':_0x446692[_0x525297(0x1c1)]});continue;}if(_0x446692[_0x525297(0x213)](_0x599dc1,_0x525297(0x24b)+_0x40ffcb),_0xb27d0['dryRun']){_0x3817ff(_0x446692['LgVFB']);const _0xbde3bb=_0x706fef[_0x525297(0x189)]('\x0a'),_0x2532ce=_0xbde3bb[_0x525297(0x1ac)](0x0,0x8)[_0x525297(0x227)]('\x0a');_0x446692[_0x525297(0x214)](_0x599dc1,_0x446692[_0x525297(0x23c)]),_0x446692[_0x525297(0x285)](_0x599dc1,_0x2532ce['split']('\x0a')['map'](_0x3fdbf6=>_0x525297(0x25e)+_0x3fdbf6)[_0x525297(0x227)]('\x0a')),_0xbde3bb[_0x525297(0x288)]>0x8&&_0x446692[_0x525297(0x25b)](_0x599dc1,'\x20\x20\x20\x20...(共\x20'+_0xbde3bb[_0x525297(0x288)]+'\x20行)'),_0x4b4c0f[_0x525297(0x1b7)]({'cli':_0x374f8c,'path':_0x40ffcb,'action':_0x446692[_0x525297(0x27e)]}),console['log']();continue;}let _0xd06eff=null;try{_0xd06eff=_0x446692[_0x525297(0x203)](_0x7b87ad,_0x40ffcb),_0xd06eff&&_0x446692[_0x525297(0x201)](_0x599dc1,_0x525297(0x1d4)+_0xd06eff);}catch(_0x2eed64){_0x209486('备份失败:'+_0x2eed64[_0x525297(0x24c)]+_0x525297(0x27f)),_0x4b4c0f['push']({'cli':_0x374f8c,'path':_0x40ffcb,'action':_0x446692[_0x525297(0x238)],'error':_0x2eed64['message']});continue;}try{_0x446692[_0x525297(0x234)](_0x1edfeb,_0x40ffcb,_0x706fef,{'isWindows':_0x5920f6['os'][_0x525297(0x223)]}),_0x183821(_0x446692['jGrzo']),_0x4b4c0f[_0x525297(0x1b7)]({'cli':_0x374f8c,'path':_0x40ffcb,'action':_0x525297(0x243),'backup':_0xd06eff});}catch(_0xacc32a){_0x446692[_0x525297(0x250)](_0xacc32a,_0x4e346a)?(_0x4a06d0||(_0x4a06d0=_0xacc32a),_0x446692[_0x525297(0x1fe)](_0x209486,_0xacc32a[_0x525297(0x24c)]),_0x4b4c0f['push']({'cli':_0x374f8c,'path':_0x40ffcb,'action':_0x446692[_0x525297(0x262)],'error':_0xacc32a['message']})):(_0x209486(_0x525297(0x26c)+_0xacc32a[_0x525297(0x24c)]),_0x4b4c0f[_0x525297(0x1b7)]({'cli':_0x374f8c,'path':_0x40ffcb,'action':_0x446692[_0x525297(0x218)],'error':_0xacc32a[_0x525297(0x24c)]}));}}console[_0x525297(0x26d)]();}if(_0x446692[_0x525297(0x23d)](_0x3cd086),!_0xb27d0['dryRun']&&_0x41e77a[_0x525297(0x1d0)]&&_0x41e77a[_0x525297(0x19c)]){_0x51f4b6(_0x446692[_0x525297(0x1ca)]),_0x446692[_0x525297(0x21d)](_0x5ed366,_0x446692[_0x525297(0x204)]);const _0x1bc9e3=await _0x446692[_0x525297(0x210)](_0xbc128b,{'apiKey':_0x41e77a['api_key'],'baseUrl':_0x41e77a[_0x525297(0x19c)]});_0x1bc9e3['ok']?_0x446692[_0x525297(0x214)](_0x183821,_0x446692[_0x525297(0x1b2)]):_0x446692[_0x525297(0x228)](_0x3817ff,_0x525297(0x239)+(_0x1bc9e3[_0x525297(0x20e)]||_0x525297(0x263)+_0x1bc9e3['statusCode'])+_0x525297(0x1cc)),console['log']();}_0x51f4b6(_0x446692[_0x525297(0x197)]);const _0x17c098=_0x4b4c0f[_0x525297(0x24e)](_0x3a3452=>'written'===_0x3a3452[_0x525297(0x22d)]),_0x5e88ce=_0x4b4c0f[_0x525297(0x24e)](_0x202f0d=>'failed'===_0x202f0d['action']||_0x525297(0x1b4)===_0x202f0d[_0x525297(0x22d)]||_0x525297(0x1a2)===_0x202f0d[_0x525297(0x22d)]),_0x3f4d9c=_0x4b4c0f[_0x525297(0x24e)](_0x2b464b=>_0x525297(0x193)===_0x2b464b[_0x525297(0x22d)]),_0x53cd8e=_0x4b4c0f['filter'](_0x23289f=>_0x525297(0x191)===_0x23289f['action']);_0xb27d0[_0x525297(0x1c9)]?_0x446692[_0x525297(0x25b)](_0x599dc1,'[试运行]\x20将写入\x20'+_0x53cd8e['length']+_0x525297(0x279)):_0x446692[_0x525297(0x195)](_0x183821,_0x525297(0x1ce)+_0x17c098[_0x525297(0x288)]+_0x525297(0x212)),_0x446692[_0x525297(0x219)](_0x3f4d9c[_0x525297(0x288)],0x0)&&_0x5ed366(_0x525297(0x289)+_0x3f4d9c[_0x525297(0x288)]+'\x20项(见上方输出)'),_0x446692[_0x525297(0x1ad)](_0x5e88ce[_0x525297(0x288)],0x0)&&(_0x446692['FMpup'](_0x3817ff,'失败\x20'+_0x5e88ce[_0x525297(0x288)]+_0x525297(0x21c)),_0x5e88ce[_0x525297(0x23f)](_0x332389=>_0x3817ff(_0x525297(0x1a5)+_0x332389[_0x525297(0x241)]+'\x20'+_0x332389[_0x525297(0x1b5)])));const _0x559654=_0x4b4c0f['filter'](_0x57160e=>_0x57160e[_0x525297(0x281)])['map'](_0x41913a=>_0x41913a[_0x525297(0x281)]);if(_0x559654[_0x525297(0x288)]>0x0&&(_0x5ed366(_0x446692[_0x525297(0x1c8)]),_0x559654[_0x525297(0x23f)](_0x374b34=>_0x599dc1(_0x525297(0x1a5)+_0x374b34))),_0x41e77a['user']?.[_0x525297(0x1de)]&&(console[_0x525297(0x26d)](),_0x446692[_0x525297(0x20b)](_0x5ed366,'📧\x20新账号\x20'+(_0x41e77a[_0x525297(0x23e)]['email']||'')+_0x525297(0x221))),!_0xb27d0[_0x525297(0x1c9)]){const _0x52111c=_0x3a4b44[_0x525297(0x237)](_0xfc790e=>_0xfc790e[_0x525297(0x1ae)])['filter'](Boolean)['map'](_0x43e8a4=>({'name':_0x43e8a4['name'],'startCmd':_0x43e8a4[_0x525297(0x1ed)],'usage':_0x43e8a4[_0x525297(0x1ec)]}));_0x322f21(_0x52111c);}return _0x4a06d0?(console[_0x525297(0x26d)](),_0x446692['IVfuf'](_0x209486,_0x446692['tRaJH']),_0x446692[_0x525297(0x19b)](_0x209486,_0x446692[_0x525297(0x19a)]),0x2):_0x5e88ce[_0x525297(0x288)]>0x0?0x3:0x0;}()[_0x1a5267(0x1bf)](_0x6b2586=>{const _0x17886d=_0x1a5267,_0x183396={'HIXVG':function(_0x2323c2,_0x2fc322){return _0x2323c2||_0x2fc322;}};_0x3cd086(),process[_0x17886d(0x259)](_0x183396['HIXVG'](_0x6b2586,0x0));})[_0x1a5267(0x22e)](_0x234660=>{const _0x12ca99=_0x1a5267,_0x10fce6={'hJtXf':function(_0x4c542e,_0x257c16){return _0x4c542e(_0x257c16);},'kaslt':function(_0xaf5aff){return _0xaf5aff();}};_0x10fce6[_0x12ca99(0x287)](_0x209486,'未捕获错误:'+(_0x234660?.['message']||_0x234660)),_0x234660?.['stack']&&console[_0x12ca99(0x20e)](_0x234660['stack']),_0x10fce6[_0x12ca99(0x27d)](_0x3cd086),process[_0x12ca99(0x259)](0x1);}));
|
|
2
|
+
function _0xa4cb(_0xc50c4b,_0x21c29e){_0xc50c4b=_0xc50c4b-0x186;const _0x22920a=_0x2292();let _0xa4cbf3=_0x22920a[_0xc50c4b];return _0xa4cbf3;}const _0x3700ab=_0xa4cb;(function(_0x40907b,_0x3220fa){const _0x49b935=_0xa4cb,_0x408abf=_0x40907b();while(!![]){try{const _0x37d3ba=-parseInt(_0x49b935(0x260))/0x1+parseInt(_0x49b935(0x1fc))/0x2*(parseInt(_0x49b935(0x275))/0x3)+-parseInt(_0x49b935(0x262))/0x4+-parseInt(_0x49b935(0x222))/0x5+-parseInt(_0x49b935(0x1da))/0x6+-parseInt(_0x49b935(0x237))/0x7*(-parseInt(_0x49b935(0x24e))/0x8)+parseInt(_0x49b935(0x26a))/0x9*(parseInt(_0x49b935(0x243))/0xa);if(_0x37d3ba===_0x3220fa)break;else _0x408abf['push'](_0x408abf['shift']());}catch(_0x25d9d6){_0x408abf['push'](_0x408abf['shift']());}}}(_0x2292,0x2c6ad),(process[_0x3700ab(0x24c)](_0x3700ab(0x24a)),process[_0x3700ab(0x20d)][_0x3700ab(0x1db)]='1'));import{detectAll as _0x5e3a08}from'./lib/detect.mjs';function _0x2292(){const _0x2adc78=['MydyO','KmUMD','选择\x20CLI','usage','\x20(未装)','available','GqvXS','exit','length','grok','(新用户已创建)','\x0a@2api-store/activate\x20v','qoqrQ','backup-failed','model','请求\x20GET\x20/v1/models…','label','Mzokc','has','isMac','可能是分组不匹配或账号临时不可用,使用时会报\x20404/429','[试运行]\x20将写入\x20','group','rfUMy','未捕获错误:','key','备份失败:','shell-only','失败\x20','FArdr','UkJXT','content','zDYvA','pDcKd','handler','NNCpW','base_url','请求激活服务','1053120QEdljd','NODE_NO_WARNINGS','ibhsA','bLSnm','GwFbs','LRkvT','node','兑换码','XMSpq','ckQzY','MUzmb','VMrrc','dryRun','dim','未查询到可用分组。请联系管理员开通分组后再激活。','configs','dFSQO','\x20\x20[shell\x20命令,请手动执行]','client_type','isLinux','(跳过此文件避免无备份覆盖)','\x20已安装','pTUTA','RNMyj','未选择任何\x20CLI,退出。','email','gxleF','YbLsu','isWindows','gemini','unknown','kUvPK','CECgw','path','910aFbqxu','检查\x20CLI\x20安装状态','验证未通过:','PowerShell','\x20异常:','stack','alreadyInstalled','yTGGf','qWNJB','action','未知错误','MxSsd','未检测到\x20','\x20\x20备份:','error','version','split','env','获取可用分组','inIyQ','【试运行模式\x20--dry-run】不会真写文件、不会真装\x20CLI','permission-denied','clientType','Linux','config','argv','\x20/\x20','\x20安装(','\x20项(见上方输出)','\x20\x20目标:','环境:','(仍会写入配置;如需更换请重跑激活选择其他模型)','邮箱格式不正确','--api-base','haeuO','凭据格式无法识别(应为\x20sk-\x20前缀的\x20API\x20Key\x20或兑换码)','files','TPjFS','1677470dEVwVY','macOS','rBaty','wfayt','installed','rLMgJ','map','YqMVK','sk-','📧\x20新账号\x20','displayName','models','help','(ID\x20','log','\x20\x20\x20\x20','doBKu','cVkOs','oVodu','https://2api.store','\x20个模型当前无可用账号(标注\x20⚠,可能是分组不匹配或账号临时不可用)','7DbJKFU','lcEOv','yZAoC','meta','LljLk','\x20·\x20node\x20v','wxRzw','push','Windows','已写入','zCkgD','add','80YsLLxj','startsWith',')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示帮助\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示版本\x0a\x0a','已写入\x20','fewYZ','backup','base_url_beta','warning','message','removeAllListeners','XonrU','120016rOxxwy','lvEVn','reason','mBKuX','\x20\x20[试运行]\x20不真实写入','未输入凭据','UoJtm','你的\x20key\x20所属分组:','GPDsy','user','statusCode','选择绑定的分组','\x20项:','\x20\x20\x20\x20...(共\x20','zWfhe','string','FBYwc','claude','91684rDfvNM','HTTP\x20','386188iRbUrx','YWUMc','JFMNx','detectBin','failed','ACTIVATE_API_BASE','iNfHU','redeem','683703WufMgb','JndXg','apiBase','all','平台过滤:','test','KHUnJ','replace','(配置已写入,请手动检查)','kbjFe','green','1704ADxmMm','get','选择默认模型(最新优先)','已检测到\x20CLI:','\x20安装失败:','catch','vnYfr','选择默认模型','\x20平台,ID\x20','name','display_name','cli','uoAHB','(配置仍会写入,但请手动安装后使用)','/antigravity','written','sSQAD','备份并写入配置','isArray','rdLUI','trim','UexZs','(跳过模型可用性探测:服务端暂不支持或网络不可达)','\x20个文件','dSGwu','BkXOH','os_type','\x20\x20内容预览:','platform','rHXea','fiqfl','需要\x20node\x20>=\x2018,当前\x20','激活报告','AknMY','服务端未返回模型列表,{{defaultModel}}\x20将留空','join','keys','aFyNv','需手动执行的\x20shell\x20命令:','is_new','dry-run','备份位置:','\x0a\x0a环境变量:\x0a\x20\x20ACTIVATE_API_BASE\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(同\x20--api-base)\x0a\x0a示例:\x0a\x20\x20npx\x20@2api-store/activate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20默认激活\x0a\x20\x20npx\x20@2api-store/activate\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20试运行\x0a\x20\x20npx\x20@2api-store/activate\x20--platform\x20openai\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20只激活\x20openai\x0a\x20\x20npx\x20@2api-store/activate\x20restore\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20从备份恢复\x0a\x20\x20npx\x20@2api-store/activate\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20恢复官方默认\x0a\x20\x20npx\x20@2api-store/activate\x20refresh-groups\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20查看可用分组\x0a\x20\x20ACTIVATE_API_BASE=http://127.0.0.1:5566\x20npx\x20@2api-store/activate\x0a\x0a退出码:\x0a\x20\x200\x20\x20成功\x0a\x20\x201\x20\x20输入错误\x20/\x20网络失败\x20/\x20致命错误\x0a\x20\x202\x20\x20部分文件权限不足(请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)\x0a\x20\x203\x20\x20其他写入失败\x0a','filter','slice','windows','ZGLyI','请输入邮箱(用于兑换码绑定\x20/\x20新账号创建)','\x20个文件(未真实写入)','EUCEd','TAnsl','includes','YPtHS','YcmIo','toLowerCase','anthropic','api_key','CxRrl','Ezlpj','未选择分组','startCmd','mDXxK','Tmafq','\x20\x20-\x20','输入模型\x20ID(如\x20gpt-5.6-terra)','KulHW','fCBKG','写入失败:','JPimb','──\x20','模式:','\x20──','YiXHQ','已选分组:','sSYmb','新账号:','pnmbr'];_0x2292=function(){return _0x2adc78;};return _0x2292();}import{cliActivate as _0x5ef493,listGroups as _0x403a67,verifyApiKey as _0x56a247,probeModels as _0x505e25}from'./lib/api.mjs';import{renderContent as _0x31fc6a,expandPath as _0x5ada4f,listModels as _0x336686}from'./lib/render.mjs';import{backupFile as _0x167607}from'./lib/backup.mjs';import{writeFileWithPermission as _0x2896fa,PermissionDeniedError as _0x188d82}from'./lib/write.mjs';import{ask as _0x1bda94,askSecret as _0x217568,multiSelect as _0x46af81,select as _0x1395c7,confirm as _0x57e916,closePrompt as _0x436960}from'./lib/prompt.mjs';import{banner as _0x3fb386,ok as _0x14dad2,fail as _0x5e2d7e,warn as _0x3a2d60,info as _0x698c48,step as _0x5ebcd4,guide as _0x4de158,plain as _0x32db3f,chalk as _0x4d25a8}from'./lib/ui.mjs';import{getCliMeta as _0x19419e,isDefaultSelected as _0x21a56d}from'./lib/platforms.mjs';import{ensureInstalled as _0x2db027}from'./lib/install.mjs';import{SUBCOMMANDS as _0x30a335,SUBCOMMAND_NAMES as _0x1d9840,SUB_HELP as _0x15490d}from'./lib/cmds.mjs';import{createRequire as _0x278540}from'node:module';const L=_0x278540(import.meta.url)('./package.json')[_0x3700ab(0x20b)],E=_0x3700ab(0x235);(async function(){const _0x17f543=_0x3700ab,_0x283394={'sSQAD':function(_0x19b15a,_0x216ee6){return _0x19b15a===_0x216ee6;},'ZybhU':'--dry-run','mBKuX':function(_0x483fb3,_0x1f5c1b){return _0x483fb3===_0x1f5c1b;},'ibhsA':'--platform','Hysri':_0x17f543(0x21d),'iNfHU':'--version','YiXHQ':function(_0x4752c6,_0x40b1f8){return _0x4752c6==_0x40b1f8;},'EUCEd':_0x17f543(0x25d),'wfayt':_0x17f543(0x25f),'EUHUS':_0x17f543(0x19e),'YcmIo':_0x17f543(0x1f7),'cVkOs':_0x17f543(0x1bd),'Mzokc':function(_0x24593f,_0xfa7d4e){return _0x24593f(_0xfa7d4e);},'rfUMy':function(_0x3d4b8b){return _0x3d4b8b();},'haeuO':_0x17f543(0x223),'yZAoC':_0x17f543(0x23f),'KulHW':function(_0x221626,_0x920008){return _0x221626(_0x920008);},'rLMgJ':function(_0x1b05f2,_0x26fe9a){return _0x1b05f2>_0x26fe9a;},'zWfhe':function(_0x70cb42,_0x558a66){return _0x70cb42(_0x558a66);},'pnmbr':function(_0x44879b,_0x4d5dd2){return _0x44879b(_0x4d5dd2);},'JndXg':'未检测到\x20codex/claude/gemini/grok/opencode(可在后续步骤按需自动安装)','wxRzw':function(_0xa92d7b,_0x4bab2b){return _0xa92d7b(_0x4bab2b);},'gxleF':_0x17f543(0x210),'JFMNx':function(_0x43f4b0,_0x1a3d7e){return _0x43f4b0(_0x1a3d7e);},'Tmafq':function(_0x24ca8a,_0x1312eb){return _0x24ca8a(_0x1312eb);},'vadMj':'请输入\x20API\x20Key(sk-...)或兑换码','kbjFe':function(_0x1d06c2,_0x28a8ec){return _0x1d06c2(_0x28a8ec);},'sSYmb':_0x17f543(0x253),'pTUTA':_0x17f543(0x22a),'MUzmb':_0x17f543(0x1cd),'inIyQ':_0x17f543(0x269),'zDYvA':_0x17f543(0x1f8),'Ezlpj':'empty','LljLk':_0x17f543(0x21f),'NNCpW':'API\x20Key','lcEOv':_0x17f543(0x21c),'zCkgD':function(_0x1ce554,_0x1544e2){return _0x1ce554(_0x1544e2);},'GqvXS':function(_0x4787f8,_0x291cb2){return _0x4787f8===_0x291cb2;},'qoqrQ':_0x17f543(0x1e8),'kUvPK':function(_0xbc8929,_0x31f5da){return _0xbc8929(_0x31f5da);},'bLSnm':function(_0x7e4d3a,_0x4ba843){return _0x7e4d3a(_0x4ba843);},'BkXOH':function(_0x4bea26,_0x15c1c3){return _0x4bea26(_0x15c1c3);},'rBaty':_0x17f543(0x1be),'GwFbs':function(_0x1df5ea,_0x5339b5){return _0x1df5ea(_0x5339b5);},'fCBKG':function(_0x3bf64e,_0x43c711){return _0x3bf64e===_0x43c711;},'fewYZ':'服务端未返回适配当前系统的配置模板','AknMY':function(_0x2cd333,_0xc011de){return _0x2cd333(_0xc011de);},'eGoZD':'(独立\x20CLI)','MxSsd':function(_0x5a0ffe,_0x5d9ea1){return _0x5a0ffe(_0x5d9ea1);},'qWNJB':_0x17f543(0x1b6),'lvEVn':function(_0x37eb57,_0x28cb83,_0x4c10c0,_0x24a1e8){return _0x37eb57(_0x28cb83,_0x4c10c0,_0x24a1e8);},'UkJXT':'选择要激活的\x20CLI(绿色=已装,灰色=未装;默认选主\x20CLI,独立\x20CLI\x20默认不选)','ckQzY':function(_0x7873cf,_0x570ae2){return _0x7873cf===_0x570ae2;},'MydyO':function(_0x6f7256,_0xc827ea){return _0x6f7256(_0xc827ea);},'bDPsY':_0x17f543(0x1f2),'RNMyj':_0x17f543(0x1fd),'GPDsy':function(_0x55fdbd,_0x270243,_0x30a0a4){return _0x55fdbd(_0x270243,_0x30a0a4);},'aFyNv':function(_0x3e3d5b,_0x1f8e92){return _0x3e3d5b===_0x1f8e92;},'TAnsl':_0x17f543(0x206),'LRkvT':function(_0x4489af,_0x2873ad){return _0x4489af(_0x2873ad);},'jcafQ':_0x17f543(0x277),'VMrrc':_0x17f543(0x28b),'THHvk':function(_0x3dea43,_0x172bfa){return _0x3dea43>_0x172bfa;},'VthcO':'其他(手动输入模型\x20ID)','KHUnJ':function(_0x4053ea,_0x44ed8e,_0x546a16,_0x524085){return _0x4053ea(_0x44ed8e,_0x546a16,_0x524085);},'UoJtm':_0x17f543(0x1a7),'UexZs':function(_0x274404,_0xc402c8){return _0x274404(_0xc402c8);},'doBKu':function(_0x2658a2,_0x2e54e9){return _0x2658a2(_0x2e54e9);},'sFUBw':_0x17f543(0x1c8),'dSGwu':_0x17f543(0x216),'XMSpq':function(_0x58b27f,_0x1c1ffe){return _0x58b27f(_0x1c1ffe);},'wOPTk':_0x17f543(0x189),'hmCMl':_0x17f543(0x286),'YbLsu':function(_0x32f463,_0x2463e8){return _0x32f463(_0x2463e8);},'vnYfr':'Terminal','rdLUI':_0x17f543(0x1ff),'jPXBA':_0x17f543(0x1eb),'YPtHS':function(_0xba2519,_0x5eb73c){return _0xba2519(_0x5eb73c);},'TPjFS':_0x17f543(0x252),'KPtCe':_0x17f543(0x290),'rHXea':'dry-run','FooeG':function(_0x5ed25e,_0x573bbf){return _0x5ed25e(_0x573bbf);},'KmUMD':function(_0x44a2dc,_0x20651b){return _0x44a2dc(_0x20651b);},'yTGGf':_0x17f543(0x240),'FArdr':_0x17f543(0x284),'NRGfF':function(_0x43ff27,_0x16cd77){return _0x43ff27 instanceof _0x16cd77;},'pDcKd':_0x17f543(0x211),'YqMVK':'failed','CECgw':'验证\x20API\x20Key','NBTMt':function(_0x360c0d,_0x185139){return _0x360c0d(_0x185139);},'YWUMc':_0x17f543(0x1c3),'oVodu':'API\x20Key\x20验证通过(GET\x20/v1/models\x20→\x20200)','dFSQO':function(_0x31be10,_0x297ccd){return _0x31be10(_0x297ccd);},'fiqfl':function(_0x1d3b69,_0x372f14){return _0x1d3b69(_0x372f14);},'JPimb':_0x17f543(0x187),'uoAHB':function(_0xaa65ee,_0x3233ea){return _0xaa65ee(_0x3233ea);},'CxRrl':function(_0x4294e8,_0x2a6a6e){return _0x4294e8>_0x2a6a6e;},'FBYwc':function(_0x3a47c5,_0x199249){return _0x3a47c5(_0x199249);},'mDXxK':'部分文件权限不足,请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑:','FPIbb':function(_0x2823b0,_0x446d63){return _0x2823b0(_0x446d63);},'XonrU':'\x20\x20sudo\x20npx\x20-y\x20@2api-store/activate'},_0x1b72cf=process[_0x17f543(0x215)][0x2];if(_0x1b72cf&&!_0x1b72cf[_0x17f543(0x244)]('-')&&_0x1d9840[_0x17f543(0x1c6)](_0x1b72cf)){const _0x314cea=process['argv']['slice'](0x3),_0x3e3f74=_0x30a335[_0x1b72cf];try{return await _0x3e3f74[_0x17f543(0x1d6)](_0x314cea)||0x0;}catch(_0x213b21){return _0x283394[_0x17f543(0x1c5)](_0x5e2d7e,'子命令\x20'+_0x1b72cf+_0x17f543(0x200)+(_0x213b21?.[_0x17f543(0x24b)]||_0x213b21)),_0x213b21?.[_0x17f543(0x201)]&&console[_0x17f543(0x20a)](_0x213b21['stack']),0x1;}}const _0x2b5f59=function(_0x235a6a){const _0x53f2e6=_0x17f543,_0x157f05={'dryRun':!0x1,'platform':null,'_':[]};for(let _0x2914ec=0x0;_0x2914ec<_0x235a6a[_0x53f2e6(0x1bc)];_0x2914ec++){const _0x5b30df=_0x235a6a[_0x2914ec];if(_0x283394[_0x53f2e6(0x285)](_0x283394['ZybhU'],_0x5b30df)||_0x283394[_0x53f2e6(0x251)]('-n',_0x5b30df))_0x157f05[_0x53f2e6(0x1e6)]=!0x0;else{if(_0x283394[_0x53f2e6(0x251)](_0x283394[_0x53f2e6(0x1dc)],_0x5b30df)||_0x283394[_0x53f2e6(0x285)]('-p',_0x5b30df))_0x157f05[_0x53f2e6(0x291)]=_0x235a6a[++_0x2914ec];else{if(_0x283394[_0x53f2e6(0x251)](_0x283394['Hysri'],_0x5b30df))_0x157f05[_0x53f2e6(0x26c)]=_0x235a6a[++_0x2914ec];else{if('--help'===_0x5b30df||_0x283394['mBKuX']('-h',_0x5b30df))_0x157f05[_0x53f2e6(0x22e)]=!0x0;else{if(_0x283394[_0x53f2e6(0x268)]===_0x5b30df||_0x283394[_0x53f2e6(0x251)]('-v',_0x5b30df))_0x157f05[_0x53f2e6(0x20b)]=!0x0;else{if(_0x5b30df[_0x53f2e6(0x244)]('--')&&_0x5b30df['includes']('=')){const [_0x399f9f,_0x12aec8]=_0x5b30df[_0x53f2e6(0x193)](0x2)[_0x53f2e6(0x20c)](/=(.*)/,0x2);_0x157f05[_0x399f9f]=_0x12aec8;}else _0x5b30df[_0x53f2e6(0x244)]('--')?_0x157f05[_0x5b30df[_0x53f2e6(0x271)](/^--/,'')]=_0x235a6a[++_0x2914ec]:_0x157f05['_'][_0x53f2e6(0x23e)](_0x5b30df);}}}}}}return _0x157f05;}(process[_0x17f543(0x215)][_0x17f543(0x193)](0x2));if(_0x2b5f59[_0x17f543(0x22e)])return console[_0x17f543(0x230)]((_0x17f543(0x1bf)+L+'\x20—\x20TokenShop\x20CLI\x20一键激活\x0a\x0a用法:\x0a\x20\x20npx\x20@2api-store/activate\x20[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20默认激活流程\x0a\x20\x20npx\x20@2api-store/activate\x20<subcommand>\x20[options]\x20\x20\x20运行子命令\x0a\x0a选项(默认激活流程):\x0a\x20\x20--dry-run,\x20-n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20不真写配置/不真装\x20CLI,只展示将做什么\x0a\x20\x20--platform\x20<name>\x20\x20\x20\x20\x20\x20只激活指定平台(openai/anthropic/gemini/grok/antigravity)\x0a\x20\x20--api-base\x20<url>\x20\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(默认\x20$ACTIVATE_API_BASE\x20或\x20'+E+_0x17f543(0x245)+_0x15490d+_0x17f543(0x191))['trim']()),0x0;if(_0x2b5f59[_0x17f543(0x20b)])return console[_0x17f543(0x230)](L),0x0;_0x283394[_0x17f543(0x1cb)](_0x3fb386);const _0xcf590e=_0x283394[_0x17f543(0x1cb)](_0x5e3a08),_0xdbe859=_0xcf590e['os'][_0x17f543(0x1c7)]?_0x283394[_0x17f543(0x21e)]:_0xcf590e['os'][_0x17f543(0x1ed)]?_0x17f543(0x213):_0xcf590e['os'][_0x17f543(0x1f6)]?_0x283394[_0x17f543(0x239)]:_0xcf590e['os'][_0x17f543(0x291)];if(_0x283394[_0x17f543(0x1c5)](_0x698c48,_0x17f543(0x21a)+_0xdbe859+_0x17f543(0x23c)+_0xcf590e[_0x17f543(0x1e0)]['version']),!_0xcf590e['node']['supported'])return _0x283394[_0x17f543(0x1a8)](_0x5e2d7e,_0x17f543(0x186)+_0xcf590e[_0x17f543(0x1e0)]['version']),0x1;const _0x2d3fe5=Object[_0x17f543(0x18b)](_0xcf590e[_0x17f543(0x226)]),_0x5dc7ee=_0x2d3fe5[_0x17f543(0x228)](_0x37dd71=>{const _0x3f2c08=_0x17f543,_0x2fddae=_0xcf590e[_0x3f2c08(0x226)][_0x37dd71]?.[_0x3f2c08(0x20b)];return _0x2fddae?_0x37dd71+'@'+_0x2fddae:_0x37dd71;});_0x283394[_0x17f543(0x227)](_0x2d3fe5[_0x17f543(0x1bc)],0x0)?_0x283394[_0x17f543(0x25c)](_0x14dad2,_0x17f543(0x278)+_0x5dc7ee[_0x17f543(0x18a)](',\x20')):_0x283394[_0x17f543(0x1b3)](_0x698c48,_0x283394[_0x17f543(0x26b)]);const _0x2325e7=_0x2b5f59[_0x17f543(0x26c)]||process[_0x17f543(0x20d)][_0x17f543(0x267)]||E;_0x283394[_0x17f543(0x23d)](_0x698c48,'API\x20端点:'+_0x2325e7),_0x2b5f59[_0x17f543(0x1e6)]&&_0x283394['Mzokc'](_0x3a2d60,_0x283394[_0x17f543(0x1f4)]),_0x2b5f59[_0x17f543(0x291)]&&_0x283394['JFMNx'](_0x698c48,_0x17f543(0x26e)+_0x2b5f59['platform']),console[_0x17f543(0x230)]();const _0x597548=(await _0x283394[_0x17f543(0x1a5)](_0x217568,_0x283394['vadMj']))['trim']();if(!_0x597548)return _0x283394[_0x17f543(0x273)](_0x5e2d7e,_0x283394[_0x17f543(0x1b1)]),0x1;const _0x5f1289=(_0x3d40ae=_0x597548)?_0x3d40ae['startsWith'](_0x283394[_0x17f543(0x1f0)])?_0x283394[_0x17f543(0x1e4)]:/^[a-zA-Z0-9]{16,64}$/[_0x17f543(0x26f)](_0x3d40ae)?_0x283394[_0x17f543(0x20f)]:_0x283394[_0x17f543(0x1d4)]:_0x283394[_0x17f543(0x1a1)];var _0x3d40ae;if(_0x283394[_0x17f543(0x1d4)]===_0x5f1289)return _0x5e2d7e(_0x283394[_0x17f543(0x23b)]),0x1;_0x698c48('识别为:'+(_0x283394[_0x17f543(0x251)](_0x283394['MUzmb'],_0x5f1289)?_0x283394[_0x17f543(0x1d7)]:_0x17f543(0x1e1))+'模式');let _0x4bf03a,_0x3ddd2d='',_0x18cdfe=null;if(_0x283394[_0x17f543(0x20f)]===_0x5f1289){if(_0x3ddd2d=(await _0x283394['KulHW'](_0x1bda94,_0x17f543(0x196)))['trim'](),!_0x3ddd2d||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/[_0x17f543(0x26f)](_0x3ddd2d))return _0x5e2d7e(_0x283394[_0x17f543(0x238)]),0x1;_0x283394[_0x17f543(0x241)](_0x5ebcd4,_0x17f543(0x20e));const _0x44bf9d=await _0x283394[_0x17f543(0x1a8)](_0x403a67,{'apiBase':_0x2325e7});if(_0x283394[_0x17f543(0x1ba)](0x0,_0x44bf9d[_0x17f543(0x1bc)]))return _0x283394[_0x17f543(0x25c)](_0x5e2d7e,_0x283394[_0x17f543(0x1c0)]),0x1;const _0x256c08=_0x44bf9d['map'](_0x21522a=>({'label':''+_0x21522a[_0x17f543(0x27e)],'value':_0x21522a['id']})),_0x478689=await _0x1395c7(_0x17f543(0x259),_0x256c08,{'defaultIndex':0x0});if(_0x18cdfe=_0x44bf9d[_0x478689]?.['id'],!_0x18cdfe)return _0x283394[_0x17f543(0x1a8)](_0x5e2d7e,_0x17f543(0x1a2)),0x1;_0x14dad2(_0x17f543(0x1b0)+_0x44bf9d[_0x478689][_0x17f543(0x27e)]+_0x17f543(0x22f)+_0x18cdfe+')'),console['log']();}_0x283394[_0x17f543(0x1f9)](_0x5ebcd4,_0x17f543(0x1d9));try{_0x4bf03a=await _0x283394[_0x17f543(0x1dd)](_0x5ef493,{'credential':_0x597548,'email':_0x3ddd2d,'platform':_0x2b5f59[_0x17f543(0x291)],'groupId':_0x18cdfe,'apiBase':_0x2325e7});}catch(_0x2f830e){return _0x283394['kbjFe'](_0x5e2d7e,'激活失败:'+_0x2f830e[_0x17f543(0x24b)]),_0x2f830e[_0x17f543(0x258)]&&_0x283394[_0x17f543(0x28e)](_0x5e2d7e,'\x20\x20HTTP\x20'+_0x2f830e[_0x17f543(0x258)]),0x1;}_0x4bf03a[_0x17f543(0x1ca)]?.['name']&&_0x283394[_0x17f543(0x273)](_0x698c48,_0x17f543(0x255)+_0x4bf03a['group'][_0x17f543(0x27e)]+'('+(_0x4bf03a['group'][_0x17f543(0x291)]||'未知')+_0x17f543(0x27d)+_0x4bf03a['group']['id']+')'),_0x283394[_0x17f543(0x23d)](_0x14dad2,_0x17f543(0x1ad)+_0x4bf03a['mode']+(_0x4bf03a[_0x17f543(0x257)]?.['is_new']?_0x283394[_0x17f543(0x224)]:'')),_0x4bf03a[_0x17f543(0x257)]?.[_0x17f543(0x18e)]&&_0x4bf03a['user']?.[_0x17f543(0x1f3)]&&(_0x283394[_0x17f543(0x1a8)](_0x698c48,_0x17f543(0x1b2)+_0x4bf03a[_0x17f543(0x257)][_0x17f543(0x1f3)]),_0x4bf03a[_0x17f543(0x257)][_0x17f543(0x24b)]&&_0x283394['GwFbs'](_0x698c48,_0x4bf03a[_0x17f543(0x257)][_0x17f543(0x24b)])),console[_0x17f543(0x230)]();const _0x2a1bae=function(_0x458869){const _0x570638=_0x17f543,_0x123629=new Set();for(const _0x47332b of _0x458869||[]){const _0x2333b2=(_0x283394[_0x570638(0x1af)](_0x283394[_0x570638(0x198)],typeof _0x47332b)?_0x47332b:_0x47332b?.['id']||'')[_0x570638(0x19d)]();/^(gpt|o1|o3|codex|glm|minimax|deepseek)/['test'](_0x2333b2)?_0x123629[_0x570638(0x242)]('openai'):_0x2333b2[_0x570638(0x244)](_0x283394[_0x570638(0x225)])?_0x123629['add'](_0x283394['EUHUS']):_0x2333b2[_0x570638(0x244)](_0x283394['YcmIo'])?_0x123629[_0x570638(0x242)](_0x283394[_0x570638(0x19c)]):_0x2333b2[_0x570638(0x244)](_0x283394[_0x570638(0x233)])&&_0x123629['add'](_0x283394[_0x570638(0x233)]);}return[..._0x123629];}(_0x4bf03a[_0x17f543(0x22d)]||[]);_0x2b5f59[_0x17f543(0x291)]&&!_0x2a1bae[_0x17f543(0x19a)](_0x2b5f59[_0x17f543(0x291)])&&_0x2a1bae['push'](_0x2b5f59[_0x17f543(0x291)]);const _0x241880=(_0x4bf03a[_0x17f543(0x1e9)]||[])[_0x17f543(0x192)](_0xab48a2=>!!_0xab48a2&&(!(_0x2a1bae['length']>0x0&&!_0x2a1bae[_0x17f543(0x19a)](_0xab48a2[_0x17f543(0x291)]))&&((!_0x2b5f59[_0x17f543(0x291)]||_0xab48a2[_0x17f543(0x291)]===_0x2b5f59['platform'])&&(_0xcf590e['os'][_0x17f543(0x1f6)]?_0x17f543(0x194)===_0xab48a2['os_type']||'all'===_0xab48a2[_0x17f543(0x28f)]:'unix'===_0xab48a2[_0x17f543(0x28f)]||_0x17f543(0x26d)===_0xab48a2[_0x17f543(0x28f)]))));if(_0x283394['fCBKG'](0x0,_0x241880[_0x17f543(0x1bc)]))return _0x5e2d7e(_0x283394[_0x17f543(0x247)]),0x1;const _0x13e740=new Set(),_0x4c9212=[];for(const _0x7307d3 of _0x241880){const _0x2b58af=_0x7307d3[_0x17f543(0x291)]+'/'+_0x7307d3[_0x17f543(0x1ec)];if(_0x13e740[_0x17f543(0x1c6)](_0x2b58af))continue;_0x13e740[_0x17f543(0x242)](_0x2b58af);const _0x58fb99=_0x283394['AknMY'](_0x19419e,_0x7307d3['client_type']),_0x302f79=_0x7307d3[_0x17f543(0x27f)]||_0x7307d3[_0x17f543(0x22c)]||_0x58fb99?.['name']||_0x7307d3['platform']+'\x20'+_0x7307d3['client_type'],_0x160bb7=_0xcf590e[_0x17f543(0x226)][_0x7307d3[_0x17f543(0x1ec)]]?.[_0x17f543(0x1fb)]||_0x58fb99&&_0xcf590e[_0x17f543(0x226)][_0x58fb99['detectBin']]?.[_0x17f543(0x1fb)],_0x37e9b2=_0x21a56d(_0x7307d3[_0x17f543(0x1ec)])?'':_0x283394['eGoZD'],_0x481568=_0x160bb7?_0x4d25a8[_0x17f543(0x274)](_0x302f79):_0x4d25a8['gray'](_0x302f79+_0x17f543(0x1b8));_0x4c9212[_0x17f543(0x23e)]({'label':_0x481568+'\x20'+_0x4d25a8[_0x17f543(0x1e7)]('['+_0x7307d3['platform']+'/'+_0x7307d3[_0x17f543(0x1ec)]+']')+_0x37e9b2,'config':_0x7307d3,'clientType':_0x7307d3[_0x17f543(0x1ec)],'meta':_0x58fb99,'alreadyInstalled':!!_0x160bb7});}const _0x443d34=_0x4c9212[_0x17f543(0x228)]((_0x51bb8b,_0x47cbf5)=>({'item':_0x51bb8b,'i':_0x47cbf5}))[_0x17f543(0x192)](({item:_0xd27ce})=>_0x21a56d(_0xd27ce[_0x17f543(0x212)]))[_0x17f543(0x228)](({i:_0x535e08})=>_0x535e08);_0x283394[_0x17f543(0x207)](_0x5ebcd4,_0x283394[_0x17f543(0x204)]);const _0x1dfdd5=await _0x283394[_0x17f543(0x24f)](_0x46af81,_0x283394[_0x17f543(0x1d2)],_0x4c9212,{'defaultSelected':_0x443d34});if(_0x283394[_0x17f543(0x1e3)](0x0,_0x1dfdd5[_0x17f543(0x1bc)]))return _0x283394[_0x17f543(0x1b4)](_0x32db3f,_0x283394['bDPsY']),0x0;const _0x4c469b=_0x1dfdd5['map'](_0x253569=>_0x4c9212[_0x253569]);if(console[_0x17f543(0x230)](),!_0x2b5f59[_0x17f543(0x1e6)]){_0x5ebcd4(_0x283394[_0x17f543(0x1f1)]);for(const _0x3cc90e of _0x4c469b){if(_0x3cc90e[_0x17f543(0x202)]){const _0x3bbc1a=_0xcf590e[_0x17f543(0x226)][_0x3cc90e[_0x17f543(0x212)]]?.['version']||_0xcf590e[_0x17f543(0x226)][_0x3cc90e[_0x17f543(0x23a)]?.[_0x17f543(0x265)]]?.[_0x17f543(0x20b)];_0x283394[_0x17f543(0x264)](_0x14dad2,(_0x3cc90e[_0x17f543(0x23a)]?.['name']||_0x3cc90e[_0x17f543(0x212)])+_0x17f543(0x1ef)+(_0x3bbc1a?'(v'+_0x3bbc1a+')':''));continue;}if(!_0x3cc90e[_0x17f543(0x23a)]||!_0x3cc90e[_0x17f543(0x23a)]['installPackage']){_0x283394[_0x17f543(0x1de)](_0x3a2d60,_0x3cc90e['clientType']+'\x20无可自动安装的\x20npm\x20包,请手动安装后重跑(配置仍会写入)');continue;}_0x698c48(_0x17f543(0x208)+_0x3cc90e[_0x17f543(0x23a)][_0x17f543(0x27e)]+'(命令\x20'+_0x3cc90e[_0x17f543(0x23a)][_0x17f543(0x265)]+')');const _0x5413e2=await _0x283394[_0x17f543(0x256)](_0x2db027,_0x3cc90e[_0x17f543(0x23a)],{'dryRun':_0x2b5f59[_0x17f543(0x1e6)]});_0x5413e2['installed']?_0x283394[_0x17f543(0x23d)](_0x14dad2,_0x3cc90e[_0x17f543(0x23a)]['name']+'\x20安装成功'+(_0x5413e2[_0x17f543(0x20b)]?'(v'+_0x5413e2['version']+')':'')):_0x5413e2['skipped']&&_0x283394[_0x17f543(0x18c)]('user-declined',_0x5413e2[_0x17f543(0x250)])?_0x3a2d60('已跳过\x20'+_0x3cc90e['meta'][_0x17f543(0x27e)]+'\x20安装(配置仍会写入,但请手动安装后使用)'):_0x5413e2['skipped']?_0x283394[_0x17f543(0x188)](_0x698c48,'已跳过\x20'+_0x3cc90e['meta']['name']+_0x17f543(0x217)+_0x5413e2[_0x17f543(0x250)]+')'):_0x5e2d7e(_0x3cc90e[_0x17f543(0x23a)]['name']+_0x17f543(0x279)+(_0x5413e2[_0x17f543(0x20a)]||_0x283394[_0x17f543(0x199)])+_0x17f543(0x282));}console[_0x17f543(0x230)]();}const _0x3e1ab7=_0x283394[_0x17f543(0x1df)](_0x336686,_0x4bf03a[_0x17f543(0x22d)]||[]);let _0x62a04b='';if(_0x3e1ab7['length']>0x0){_0x283394['MydyO'](_0x5ebcd4,_0x283394['jcafQ']);let _0xf73fcf=null;if(_0x597548[_0x17f543(0x244)](_0x283394[_0x17f543(0x1f0)]))try{const _0x1e0980=await _0x505e25({'credential':_0x597548,'apiBase':_0x2325e7});_0x1e0980&&Array[_0x17f543(0x287)](_0x1e0980[_0x17f543(0x22d)])&&(_0xf73fcf=new Map(_0x1e0980[_0x17f543(0x22d)]['map'](_0x113ab7=>[_0x113ab7[_0x17f543(0x1c2)],!!_0x113ab7[_0x17f543(0x1b9)]])));}catch{_0x698c48(_0x283394[_0x17f543(0x1e5)]);}let _0x495b4b=_0x3e1ab7;if(_0xf73fcf){_0x495b4b=[..._0x3e1ab7[_0x17f543(0x192)](_0x4f6f18=>!0x1!==_0xf73fcf[_0x17f543(0x276)](_0x4f6f18['id'])),..._0x3e1ab7[_0x17f543(0x192)](_0xcefe8e=>!0x1===_0xf73fcf['get'](_0xcefe8e['id']))];const _0x14e4db=_0x495b4b[_0x17f543(0x192)](_0x32dc1c=>!0x1===_0xf73fcf['get'](_0x32dc1c['id']))['length'];_0x283394['rLMgJ'](_0x14e4db,0x0)&&_0x283394[_0x17f543(0x273)](_0x698c48,'⚠\x20'+_0x14e4db+_0x17f543(0x236));}const _0x2267d9=0xa,_0x3fd29c=_0x495b4b[_0x17f543(0x193)](0x0,_0x2267d9),_0x8212ae=_0x283394['THHvk'](_0x495b4b['length'],_0x2267d9),_0x41c7c9=_0x49263e=>_0xf73fcf?!0x1===_0xf73fcf[_0x17f543(0x276)](_0x49263e['id'])?'⚠\x20':'✓\x20':'',_0x5909a9=[..._0x3fd29c[_0x17f543(0x228)](_0x56e3bc=>({'label':''+_0x41c7c9(_0x56e3bc)+_0x56e3bc[_0x17f543(0x1c4)]+'\x20('+_0x56e3bc['id']+')'})),..._0x8212ae?[{'label':_0x4d25a8[_0x17f543(0x1e7)](_0x283394['VthcO'])}]:[]],_0x4f6c0f=await _0x283394[_0x17f543(0x270)](_0x1395c7,_0x17f543(0x27c),_0x5909a9,{'defaultIndex':0x0});if(_0x8212ae&&_0x283394[_0x17f543(0x1e3)](_0x4f6c0f,_0x3fd29c[_0x17f543(0x1bc)])?(_0x62a04b=(await _0x283394[_0x17f543(0x1de)](_0x1bda94,_0x283394[_0x17f543(0x254)]))[_0x17f543(0x289)](),_0x62a04b||(_0x62a04b=_0x3fd29c[0x0]['id'])):_0x62a04b=_0x3fd29c[_0x4f6c0f]['id'],_0x283394[_0x17f543(0x1df)](_0x14dad2,'已选默认模型:'+_0x62a04b),_0xf73fcf&&!0x1===_0xf73fcf[_0x17f543(0x276)](_0x62a04b)){const _0x47b238=_0x495b4b[_0x17f543(0x192)](_0x3b25cd=>!0x1!==_0xf73fcf['get'](_0x3b25cd['id']))['slice'](0x0,0x3)[_0x17f543(0x228)](_0x21dfe5=>_0x21dfe5['id']);_0x283394[_0x17f543(0x28a)](_0x3a2d60,'模型可用性探测:'+_0x62a04b+'\x20当前无可用账号'),_0x283394['doBKu'](_0x3a2d60,_0x283394['sFUBw']),_0x47b238[_0x17f543(0x1bc)]>0x0&&_0x283394[_0x17f543(0x1f9)](_0x3a2d60,'建议换用:'+_0x47b238[_0x17f543(0x18a)](_0x283394[_0x17f543(0x28d)])),_0x283394[_0x17f543(0x1e2)](_0x3a2d60,_0x17f543(0x21b));}}else _0x3a2d60(_0x283394['wOPTk']);console[_0x17f543(0x230)]();const _0x26d2fd=_0x4bf03a[_0x17f543(0x1d8)]||'',_0x4426b7=_0x4bf03a[_0x17f543(0x249)]||_0x26d2fd,_0x32a228={'apiKey':_0x4bf03a[_0x17f543(0x19f)]||'','baseUrl':_0x26d2fd,'apiBase':_0x26d2fd,'apiBaseBeta':_0x4426b7,'antigravityApiBase':_0x26d2fd+'/antigravity','antigravityApiBaseBeta':_0x4426b7+_0x17f543(0x283),'defaultModel':_0x62a04b};_0x5ebcd4(_0x283394['hmCMl']);const _0x39b9ec=[];let _0xa517b8=null;for(const _0x1aac8e of _0x4c469b){const _0x272ce1=_0x1aac8e[_0x17f543(0x214)][_0x17f543(0x27f)]||_0x1aac8e[_0x17f543(0x214)][_0x17f543(0x22c)]||_0x1aac8e[_0x17f543(0x23a)]?.['name']||_0x1aac8e['clientType'];_0x283394[_0x17f543(0x1f5)](_0x32db3f,_0x17f543(0x1ac)+_0x272ce1+_0x17f543(0x1ae));const _0x1440e8=_0x1aac8e[_0x17f543(0x214)][_0x17f543(0x220)]||[];for(const _0x125e2f of _0x1440e8){const _0xa87c5e=_0x125e2f[_0x17f543(0x1fb)]||'',_0x42ed3d=_0x283394[_0x17f543(0x1a9)](_0x283394[_0x17f543(0x27b)],_0xa87c5e)||_0x283394[_0x17f543(0x285)](_0x283394[_0x17f543(0x288)],_0xa87c5e),_0x26ab9d=_0x42ed3d?_0xa87c5e:_0x5ada4f(_0xa87c5e,{'isWindows':_0xcf590e['os']['isWindows']}),_0x77f75c=_0x31fc6a(_0x125e2f[_0x17f543(0x1d3)]||'',_0x32a228);if(_0x42ed3d){_0x283394[_0x17f543(0x232)](_0x32db3f,_0x283394['jPXBA']),_0x32db3f(_0x77f75c[_0x17f543(0x20c)]('\x0a')[_0x17f543(0x228)](_0x279434=>'\x20\x20\x20\x20'+_0x279434)[_0x17f543(0x18a)]('\x0a')),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0xa87c5e,'action':_0x17f543(0x1cf)});continue;}if(_0x283394[_0x17f543(0x19b)](_0x32db3f,_0x17f543(0x219)+_0x26ab9d),_0x2b5f59[_0x17f543(0x1e6)]){_0x3a2d60(_0x283394[_0x17f543(0x221)]);const _0x2275c9=_0x77f75c[_0x17f543(0x20c)]('\x0a'),_0x41c684=_0x2275c9[_0x17f543(0x193)](0x0,0x8)['join']('\x0a');_0x283394[_0x17f543(0x19b)](_0x32db3f,_0x283394['KPtCe']),_0x283394['doBKu'](_0x32db3f,_0x41c684[_0x17f543(0x20c)]('\x0a')[_0x17f543(0x228)](_0x4d30e5=>_0x17f543(0x231)+_0x4d30e5)[_0x17f543(0x18a)]('\x0a')),_0x2275c9['length']>0x8&&_0x283394[_0x17f543(0x1b3)](_0x32db3f,_0x17f543(0x25b)+_0x2275c9[_0x17f543(0x1bc)]+'\x20行)'),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x283394[_0x17f543(0x292)]}),console[_0x17f543(0x230)]();continue;}let _0x27be4e=null;try{_0x27be4e=_0x167607(_0x26ab9d),_0x27be4e&&_0x283394['kbjFe'](_0x32db3f,_0x17f543(0x209)+_0x27be4e);}catch(_0x29b5e5){_0x283394['FooeG'](_0x5e2d7e,_0x17f543(0x1ce)+_0x29b5e5['message']+_0x17f543(0x1ee)),_0x39b9ec['push']({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x17f543(0x1c1),'error':_0x29b5e5[_0x17f543(0x24b)]});continue;}try{_0x2896fa(_0x26ab9d,_0x77f75c,{'isWindows':_0xcf590e['os'][_0x17f543(0x1f6)]}),_0x283394[_0x17f543(0x1b5)](_0x14dad2,_0x283394[_0x17f543(0x203)]),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x283394[_0x17f543(0x1d1)],'backup':_0x27be4e});}catch(_0x6eb284){_0x283394['NRGfF'](_0x6eb284,_0x188d82)?(_0xa517b8||(_0xa517b8=_0x6eb284),_0x5e2d7e(_0x6eb284[_0x17f543(0x24b)]),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x283394[_0x17f543(0x1d5)],'error':_0x6eb284[_0x17f543(0x24b)]})):(_0x5e2d7e(_0x17f543(0x1aa)+_0x6eb284[_0x17f543(0x24b)]),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x283394[_0x17f543(0x229)],'error':_0x6eb284[_0x17f543(0x24b)]}));}}console[_0x17f543(0x230)]();}if(_0x436960(),!_0x2b5f59[_0x17f543(0x1e6)]&&_0x4bf03a['api_key']&&_0x4bf03a[_0x17f543(0x1d8)]){_0x283394[_0x17f543(0x19b)](_0x5ebcd4,_0x283394[_0x17f543(0x1fa)]),_0x283394['NBTMt'](_0x698c48,_0x283394[_0x17f543(0x263)]);const _0x550899=await _0x283394[_0x17f543(0x28a)](_0x56a247,{'apiKey':_0x4bf03a[_0x17f543(0x19f)],'baseUrl':_0x4bf03a[_0x17f543(0x1d8)]});_0x550899['ok']?_0x283394[_0x17f543(0x207)](_0x14dad2,_0x283394[_0x17f543(0x234)]):_0x283394[_0x17f543(0x1ea)](_0x3a2d60,_0x17f543(0x1fe)+(_0x550899[_0x17f543(0x20a)]||_0x17f543(0x261)+_0x550899[_0x17f543(0x258)])+_0x17f543(0x272)),console[_0x17f543(0x230)]();}_0x283394[_0x17f543(0x293)](_0x5ebcd4,_0x283394[_0x17f543(0x1ab)]);const _0x1202cf=_0x39b9ec[_0x17f543(0x192)](_0x206c42=>_0x17f543(0x284)===_0x206c42[_0x17f543(0x205)]),_0x439c91=_0x39b9ec[_0x17f543(0x192)](_0x25ffa1=>_0x17f543(0x266)===_0x25ffa1[_0x17f543(0x205)]||'permission-denied'===_0x25ffa1[_0x17f543(0x205)]||_0x17f543(0x1c1)===_0x25ffa1[_0x17f543(0x205)]),_0x42d3eb=_0x39b9ec[_0x17f543(0x192)](_0x19f88b=>_0x17f543(0x1cf)===_0x19f88b[_0x17f543(0x205)]),_0x39f722=_0x39b9ec[_0x17f543(0x192)](_0x579911=>_0x17f543(0x18f)===_0x579911[_0x17f543(0x205)]);_0x2b5f59[_0x17f543(0x1e6)]?_0x283394['FooeG'](_0x32db3f,_0x17f543(0x1c9)+_0x39f722['length']+_0x17f543(0x197)):_0x14dad2(_0x17f543(0x246)+_0x1202cf[_0x17f543(0x1bc)]+_0x17f543(0x28c)),_0x283394[_0x17f543(0x227)](_0x42d3eb[_0x17f543(0x1bc)],0x0)&&_0x698c48(_0x17f543(0x18d)+_0x42d3eb[_0x17f543(0x1bc)]+_0x17f543(0x218)),_0x439c91[_0x17f543(0x1bc)]>0x0&&(_0x283394[_0x17f543(0x281)](_0x3a2d60,_0x17f543(0x1d0)+_0x439c91[_0x17f543(0x1bc)]+_0x17f543(0x25a)),_0x439c91['forEach'](_0x5d8c19=>_0x3a2d60('\x20\x20-\x20'+_0x5d8c19[_0x17f543(0x280)]+'\x20'+_0x5d8c19[_0x17f543(0x1fb)])));const _0x22ec17=_0x39b9ec[_0x17f543(0x192)](_0x5c989b=>_0x5c989b['backup'])[_0x17f543(0x228)](_0x3f8484=>_0x3f8484[_0x17f543(0x248)]);if(_0x283394[_0x17f543(0x1a0)](_0x22ec17[_0x17f543(0x1bc)],0x0)&&(_0x283394[_0x17f543(0x1ea)](_0x698c48,_0x17f543(0x190)),_0x22ec17['forEach'](_0x115504=>_0x32db3f(_0x17f543(0x1a6)+_0x115504))),_0x4bf03a[_0x17f543(0x257)]?.['is_new']&&(console[_0x17f543(0x230)](),_0x283394[_0x17f543(0x188)](_0x698c48,_0x17f543(0x22b)+(_0x4bf03a['user'][_0x17f543(0x1f3)]||'')+'\x20已创建,请查收邮件获取初始密码,登录后尽快修改。')),!_0x2b5f59[_0x17f543(0x1e6)]){const _0x524d07=_0x4c469b[_0x17f543(0x228)](_0x58e8b4=>_0x58e8b4['meta'])[_0x17f543(0x192)](Boolean)[_0x17f543(0x228)](_0x1a4737=>({'name':_0x1a4737[_0x17f543(0x27e)],'startCmd':_0x1a4737[_0x17f543(0x1a3)],'usage':_0x1a4737[_0x17f543(0x1b7)]}));_0x283394[_0x17f543(0x25e)](_0x4de158,_0x524d07);}return _0xa517b8?(console[_0x17f543(0x230)](),_0x283394['wxRzw'](_0x5e2d7e,_0x283394[_0x17f543(0x1a4)]),_0x283394['FPIbb'](_0x5e2d7e,_0x283394[_0x17f543(0x24d)]),0x2):_0x283394[_0x17f543(0x227)](_0x439c91['length'],0x0)?0x3:0x0;}()['then'](_0x395193=>{const _0x393dc2=_0x3700ab,_0x24078b={'ZGLyI':function(_0x4805d2){return _0x4805d2();}};_0x24078b[_0x393dc2(0x195)](_0x436960),process[_0x393dc2(0x1bb)](_0x395193||0x0);})[_0x3700ab(0x27a)](_0x883d4e=>{const _0x5ec43b=_0x3700ab,_0x2ca743={'xxoSj':function(_0x1e2ccf,_0xe9b1de){return _0x1e2ccf(_0xe9b1de);}};_0x2ca743['xxoSj'](_0x5e2d7e,_0x5ec43b(0x1cc)+(_0x883d4e?.[_0x5ec43b(0x24b)]||_0x883d4e)),_0x883d4e?.[_0x5ec43b(0x201)]&&console[_0x5ec43b(0x20a)](_0x883d4e['stack']),_0x436960(),process[_0x5ec43b(0x1bb)](0x1);}));
|
package/dist/lib/api.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x550a(){const _0x1e5e42=['byteLength','mxDaZ','1416CkAyOb','@2api-store/activate/0.1.0','slice','HTTP\x20','ApxFu','lrxkT','QDtkw','MrRAr','https:','rIDrL','ewZGE','验证请求超时(15s)','PiJCO','error','application/json','yJXPa','UfUrw','kkZGq','destroy','20lqjmoC','GET','OTLdM','4833XFIRVI','rhrwd','mFBbu','llLHU','KzPDW','VxuPc','156906hboGuD','write','raw','szZKs','/api/v1/cli/activate','utf8','UdJdG','statusCode','TkINN','57138tjbJMU','object','lMoZV','message','XxAPg','HfGwf','protocol','push','POST','MiSVI','NnhWJ','86774uoikVA','/api/v1/cli/groups','904686yHplMl','bkhfF','QdJXC','53212cSvkbe','响应非\x20JSON(HTTP\x20','href','HGsRj','request','WlqqV','jtObK','KMXsO','请求超时(30s)—\x20','EcgQl','PoW\x20challenge\x20获取失败:','data','vsaTY','PbeTd','stringify','concat','fJBDc','DrAbr','end','1011157ACsDQA','bwBSr','toString','timeout','WSdWH','szVsb','OjWdW','chLmi','Bearer\x20','MdOrB','bZWdp'];_0x550a=function(){return _0x1e5e42;};return _0x550a();}const _0x1b2fed=_0x57d5;(function(_0x59f40a,_0x19d0e4){const _0xa453a7=_0x57d5,_0x33a2e4=_0x59f40a();while(!![]){try{const _0x548ccc=parseInt(_0xa453a7(0x1c3))/0x1+parseInt(_0xa453a7(0x179))/0x2+parseInt(_0xa453a7(0x1ba))/0x3+-parseInt(_0xa453a7(0x17e))/0x4*(-parseInt(_0xa453a7(0x1b1))/0x5)+parseInt(_0xa453a7(0x17b))/0x6+-parseInt(_0xa453a7(0x191))/0x7+parseInt(_0xa453a7(0x19e))/0x8*(-parseInt(_0xa453a7(0x1b4))/0x9);if(_0x548ccc===_0x19d0e4)break;else _0x33a2e4['push'](_0x33a2e4['shift']());}catch(_0xddbfc9){_0x33a2e4['push'](_0x33a2e4['shift']());}}}(_0x550a,0x1ca48));import _0x4a124b from'node:https';import _0x2e2060 from'node:http';import{getDeviceId as _0x1ce896}from'./device.mjs';import{getChallenge as _0x14f424,solvePoW as _0x4b27e4}from'./pow.mjs';const n=_0x1b2fed(0x19f),a=0x7530;function i(_0x318f7c,_0xf8d2dd={}){return{'User-Agent':n,'X-Device-Id':_0x318f7c,..._0xf8d2dd};}function _0x57d5(_0x226fc3,_0x593566){_0x226fc3=_0x226fc3-0x173;const _0x550a63=_0x550a();let _0x57d5ad=_0x550a63[_0x226fc3];return _0x57d5ad;}export async function cliActivate({credential:_0x1c0509,email:_0xe90f4e,platform:_0x5d568b,groupId:_0x480b6d,apiBase:_0x50845a}){const _0x147be6=_0x1b2fed,_0xf46eab={'jtObK':function(_0x3549a6,_0x298b5f){return _0x3549a6(_0x298b5f);},'WlqqV':function(_0x3832f8,_0xa9fae4){return _0x3832f8<_0xa9fae4;},'DrAbr':function(_0x122f79,_0x32f22e){return _0x122f79(_0x32f22e);},'szZKs':function(_0x4fd6e4,_0x20ed4e){return _0x4fd6e4==_0x20ed4e;},'MdOrB':_0x147be6(0x1c4),'MiSVI':'data','ApxFu':_0x147be6(0x190),'ewZGE':_0x147be6(0x1a6),'bkhfF':_0x147be6(0x176),'HfGwf':function(_0x19608f,_0x4dfe01,_0x54fb70){return _0x19608f(_0x4dfe01,_0x54fb70);},'bZWdp':_0x147be6(0x1ac),'VxuPc':_0x147be6(0x194),'mxDaZ':_0x147be6(0x1ab),'MrRAr':function(_0x484b83,_0x32169c,_0x51f0c6){return _0x484b83(_0x32169c,_0x51f0c6);}},_0x5a292c=_0x1ce896();let _0x2f59f4,_0x48216d;try{const {challenge:_0x10e697,difficulty:_0x8ad87a}=await _0xf46eab['DrAbr'](_0x14f424,{'apiBase':_0x50845a,'deviceId':_0x5a292c});_0x2f59f4=_0x10e697,_0x48216d=_0xf46eab[_0x147be6(0x1a5)](_0x4b27e4,_0x10e697,_0x8ad87a);}catch(_0xc01557){throw new Error(_0x147be6(0x188)+_0xc01557[_0x147be6(0x1c6)]);}return new Promise((_0x5382fa,_0x14bd9e)=>{const _0x490342=_0x147be6;let _0x799db3;try{_0x799db3=new URL(_0x490342(0x1be),_0x50845a);}catch(_0x3f307a){return void _0xf46eab['jtObK'](_0x14bd9e,new Error('无效的\x20apiBase:'+_0x50845a+'('+_0x3f307a[_0x490342(0x1c6)]+')'));}const _0x27103c=_0xf46eab[_0x490342(0x1a8)]===_0x799db3[_0x490342(0x174)]?_0x4a124b:_0x2e2060,_0x2e3eb9={'credential':_0x1c0509,..._0xe90f4e?{'email':_0xe90f4e}:{},..._0x5d568b?{'platform':_0x5d568b}:{},..._0x480b6d?{'group_id':_0x480b6d}:{}},_0x81a747=JSON[_0x490342(0x18c)](_0x2e3eb9),_0x116d3a=_0x27103c[_0x490342(0x182)](_0x799db3,{'method':_0xf46eab[_0x490342(0x17c)],'headers':_0xf46eab[_0x490342(0x173)](i,_0x5a292c,{'Content-Type':_0xf46eab[_0x490342(0x19b)],'Content-Length':Buffer[_0x490342(0x19c)](_0x81a747),'X-PoW-Challenge':_0x2f59f4,'X-PoW-Nonce':_0x48216d}),'timeout':a},_0x442ec5=>{const _0x40b280=_0x490342,_0x43cefd={'PbeTd':function(_0x570ee3,_0xef851){const _0xed9760=_0x57d5;return _0xf46eab[_0xed9760(0x184)](_0x570ee3,_0xef851);},'kkZGq':function(_0x12e790,_0x454c5c){const _0x1d2ba5=_0x57d5;return _0xf46eab[_0x1d2ba5(0x183)](_0x12e790,_0x454c5c);},'TkINN':function(_0x3fe6be,_0x23da99){const _0x464c69=_0x57d5;return _0xf46eab[_0x464c69(0x18f)](_0x3fe6be,_0x23da99);},'lMoZV':function(_0x3a3a21,_0x1cf1ba){const _0x5e39d6=_0x57d5;return _0xf46eab[_0x5e39d6(0x1bd)](_0x3a3a21,_0x1cf1ba);},'HGsRj':_0xf46eab[_0x40b280(0x19a)]},_0x56450d=[];_0x442ec5['on'](_0xf46eab[_0x40b280(0x177)],_0x346632=>_0x56450d['push'](_0x346632)),_0x442ec5['on'](_0xf46eab[_0x40b280(0x1a2)],()=>{const _0x178e38=_0x40b280,_0x5e744d=Buffer[_0x178e38(0x18d)](_0x56450d)['toString'](_0x178e38(0x1bf));let _0xb73a72;try{_0xb73a72=_0x5e744d?JSON['parse'](_0x5e744d):{};}catch{const _0x2ac37a=new Error(_0x178e38(0x17f)+_0x442ec5[_0x178e38(0x1c1)]+'):'+_0x5e744d[_0x178e38(0x1a0)](0x0,0xc8));return _0x2ac37a['statusCode']=_0x442ec5[_0x178e38(0x1c1)],_0x2ac37a[_0x178e38(0x1bc)]=_0x5e744d,void _0x43cefd[_0x178e38(0x18b)](_0x14bd9e,_0x2ac37a);}if(_0x442ec5[_0x178e38(0x1c1)]>=0xc8&&_0x43cefd[_0x178e38(0x1af)](_0x442ec5[_0x178e38(0x1c1)],0x12c))_0x43cefd[_0x178e38(0x1c2)](_0x5382fa,_0xb73a72);else{const _0x4ac434=_0xb73a72?.[_0x178e38(0x1ab)],_0x15b015=(_0x4ac434&&_0x43cefd[_0x178e38(0x1c5)](_0x43cefd[_0x178e38(0x181)],typeof _0x4ac434)?_0x4ac434[_0x178e38(0x1c6)]:_0x4ac434)||_0xb73a72?.[_0x178e38(0x1c6)]||_0x178e38(0x1a1)+_0x442ec5[_0x178e38(0x1c1)],_0x311de3=new Error(_0x15b015);_0x311de3['statusCode']=_0x442ec5[_0x178e38(0x1c1)],_0x311de3['body']=_0xb73a72,_0x43cefd['PbeTd'](_0x14bd9e,_0x311de3);}});});_0x116d3a['on'](_0xf46eab[_0x490342(0x1b9)],()=>{const _0x17445e=_0x490342;_0x116d3a[_0x17445e(0x1b0)](new Error(_0x17445e(0x186)+_0x799db3[_0x17445e(0x180)]));}),_0x116d3a['on'](_0xf46eab[_0x490342(0x19d)],_0x14bd9e),_0x116d3a[_0x490342(0x1bb)](_0x81a747),_0x116d3a[_0x490342(0x190)]();});}export function listGroups({apiBase:_0x125208}){const _0x2b01a9=_0x1b2fed,_0x1f8368={'jJKjL':'utf8','WSdWH':function(_0x26518c,_0x55f1fb){return _0x26518c(_0x55f1fb);},'mFBbu':function(_0x483550,_0x3a0e70){return _0x483550<_0x3a0e70;},'XxAPg':_0x2b01a9(0x189),'UdJdG':_0x2b01a9(0x190),'KMXsO':function(_0x17d0f9,_0x2d88a1){return _0x17d0f9(_0x2d88a1);},'dkcQS':function(_0x401d0c,_0x268ff4){return _0x401d0c===_0x268ff4;},'lmFxQ':_0x2b01a9(0x1a6),'llLHU':function(_0x3cfc3f){return _0x3cfc3f();},'OTLdM':'GET','rIDrL':function(_0x133e25,_0x3fd0d8,_0x199297){return _0x133e25(_0x3fd0d8,_0x199297);},'fJBDc':_0x2b01a9(0x1ac),'TGRmx':_0x2b01a9(0x194),'QDtkw':_0x2b01a9(0x1ab)};return new Promise((_0x524c0a,_0x556d26)=>{const _0x60c6ae=_0x2b01a9,_0x5a8c2b={'szVsb':_0x1f8368['jJKjL'],'QdJXC':function(_0x523955,_0x38f76b){const _0x575167=_0x57d5;return _0x1f8368[_0x575167(0x195)](_0x523955,_0x38f76b);},'chLmi':function(_0xda1e81,_0x46f98b){return _0xda1e81>=_0x46f98b;},'UfUrw':function(_0x47ef25,_0x548868){const _0x13813e=_0x57d5;return _0x1f8368[_0x13813e(0x1b6)](_0x47ef25,_0x548868);},'EcgQl':_0x1f8368[_0x60c6ae(0x1c7)],'yJXPa':_0x1f8368[_0x60c6ae(0x1c0)]};let _0x1cced4;try{_0x1cced4=new URL(_0x60c6ae(0x17a),_0x125208);}catch(_0x51d647){return void _0x1f8368[_0x60c6ae(0x185)](_0x556d26,new Error('无效的\x20apiBase:'+_0x125208+'('+_0x51d647[_0x60c6ae(0x1c6)]+')'));}const _0x8dc3c5=_0x1f8368['dkcQS'](_0x1f8368['lmFxQ'],_0x1cced4[_0x60c6ae(0x174)])?_0x4a124b:_0x2e2060,_0x19d2d2=_0x1f8368[_0x60c6ae(0x1b7)](_0x1ce896),_0x133313=_0x8dc3c5[_0x60c6ae(0x182)](_0x1cced4,{'method':_0x1f8368[_0x60c6ae(0x1b3)],'headers':_0x1f8368[_0x60c6ae(0x1a7)](i,_0x19d2d2,{'Accept':_0x1f8368[_0x60c6ae(0x18e)]}),'timeout':a},_0x2ca7e7=>{const _0x51bc67=_0x60c6ae,_0x1ab271=[];_0x2ca7e7['on'](_0x5a8c2b[_0x51bc67(0x187)],_0x4e20a2=>_0x1ab271['push'](_0x4e20a2)),_0x2ca7e7['on'](_0x5a8c2b[_0x51bc67(0x1ad)],()=>{const _0x8b7171=_0x51bc67,_0x4aa4bb=Buffer[_0x8b7171(0x18d)](_0x1ab271)[_0x8b7171(0x193)](_0x5a8c2b[_0x8b7171(0x196)]);let _0x28393d;try{_0x28393d=_0x4aa4bb?JSON['parse'](_0x4aa4bb):{};}catch{return void _0x5a8c2b[_0x8b7171(0x17d)](_0x524c0a,[]);}if(_0x5a8c2b[_0x8b7171(0x198)](_0x2ca7e7[_0x8b7171(0x1c1)],0xc8)&&_0x5a8c2b[_0x8b7171(0x1ae)](_0x2ca7e7[_0x8b7171(0x1c1)],0x12c)){const _0x273206=Array['isArray'](_0x28393d)?_0x28393d:_0x28393d?.['groups'];_0x5a8c2b['QdJXC'](_0x524c0a,Array['isArray'](_0x273206)?_0x273206:[]);}else _0x524c0a([]);});});_0x133313['on'](_0x1f8368['TGRmx'],()=>{const _0x2cd11d=_0x60c6ae;_0x133313['destroy'](new Error(_0x2cd11d(0x186)+_0x1cced4[_0x2cd11d(0x180)]));}),_0x133313['on'](_0x1f8368[_0x60c6ae(0x1a4)],_0x598d92=>{const _0x3ec889=_0x60c6ae;_0x5a8c2b[_0x3ec889(0x17d)](_0x524c0a,[]);}),_0x133313[_0x60c6ae(0x190)]();});}export function verifyApiKey({apiKey:_0x38b46c,baseUrl:_0x25b839}){const _0x4f2c97=_0x1b2fed,_0x30bfdd={'KzPDW':_0x4f2c97(0x189),'rhrwd':'end','bwBSr':function(_0x280267,_0x427e40){return _0x280267(_0x427e40);},'PiJCO':function(_0x5c1535,_0x35067a){return _0x5c1535(_0x35067a);},'OjWdW':'https:','lrxkT':_0x4f2c97(0x1b2),'NnhWJ':_0x4f2c97(0x194)};return new Promise(_0x4691ae=>{const _0x48c6b3=_0x4f2c97,_0x1aea18={'vsaTY':function(_0x3d1e13,_0x3cbbeb){return _0x3d1e13<_0x3cbbeb;}};let _0x25da5a;try{_0x25da5a=new URL('/v1/models',_0x25b839);}catch{return void _0x30bfdd[_0x48c6b3(0x1aa)](_0x4691ae,{'ok':!0x1,'error':'无效的\x20baseUrl:'+_0x25b839});}const _0x191160=(_0x30bfdd[_0x48c6b3(0x197)]===_0x25da5a['protocol']?_0x4a124b:_0x2e2060)[_0x48c6b3(0x182)](_0x25da5a,{'method':_0x30bfdd[_0x48c6b3(0x1a3)],'headers':{'Authorization':_0x48c6b3(0x199)+_0x38b46c,'User-Agent':n},'timeout':0x3a98},_0x5cd697=>{const _0x194704=_0x48c6b3,_0x4b1884=[];_0x5cd697['on'](_0x30bfdd[_0x194704(0x1b8)],_0x1e466a=>_0x4b1884[_0x194704(0x175)](_0x1e466a)),_0x5cd697['on'](_0x30bfdd[_0x194704(0x1b5)],()=>{const _0x44d05e=_0x194704,_0x3a379f=_0x5cd697[_0x44d05e(0x1c1)]>=0xc8&&_0x1aea18[_0x44d05e(0x18a)](_0x5cd697[_0x44d05e(0x1c1)],0x12c);_0x4691ae({'ok':_0x3a379f,'statusCode':_0x5cd697[_0x44d05e(0x1c1)]});});});_0x191160['on'](_0x30bfdd[_0x48c6b3(0x178)],()=>{const _0x24c637=_0x48c6b3;_0x191160['destroy'](),_0x30bfdd[_0x24c637(0x192)](_0x4691ae,{'ok':!0x1,'error':_0x24c637(0x1a9)});}),_0x191160['on'](_0x48c6b3(0x1ab),_0x3cee97=>_0x4691ae({'ok':!0x1,'error':_0x3cee97[_0x48c6b3(0x1c6)]})),_0x191160[_0x48c6b3(0x190)]();});}
|
|
1
|
+
const _0x5e1e03=_0x498b;(function(_0x38692d,_0xff5dd7){const _0x21f384=_0x498b,_0x38d1d0=_0x38692d();while(!![]){try{const _0x3b04e9=parseInt(_0x21f384(0xf6))/0x1*(-parseInt(_0x21f384(0x12f))/0x2)+parseInt(_0x21f384(0x114))/0x3*(-parseInt(_0x21f384(0x107))/0x4)+-parseInt(_0x21f384(0x132))/0x5*(-parseInt(_0x21f384(0x127))/0x6)+parseInt(_0x21f384(0x104))/0x7+parseInt(_0x21f384(0xd2))/0x8*(-parseInt(_0x21f384(0x135))/0x9)+parseInt(_0x21f384(0x129))/0xa+parseInt(_0x21f384(0xef))/0xb;if(_0x3b04e9===_0xff5dd7)break;else _0x38d1d0['push'](_0x38d1d0['shift']());}catch(_0x94d33c){_0x38d1d0['push'](_0x38d1d0['shift']());}}}(_0x2604,0x2c86f));function _0x2604(){const _0x8814df=['hxorJ','GET','153321iloBcn','TRXug','parse','4QlqAaP','write','body','无效的\x20baseUrl:','POST','bDJJw','xrkWa','push','LWtij','xshWW','jdfLT','uOQJT','xwNRh','519069TxhYpD','smAuL','JgvUj','响应非\x20JSON','cihTp','UdOTI','aCzpi','isArray','GKndi','toString','statusCode','end','bGWXM','PODbC','data','/api/v1/cli/probe-models','Coxsw','kKOss','YEpqF','16644XBEezU','destroy','1346470rvEpJo','slice','XkAaL','error','FtvLp','WWpGz','91406PjyhbL','sqBvN','响应非\x20JSON(HTTP\x20','380tXUoRw','fWwGg','QmKze','931005tqFdEu','PoW\x20challenge\x20获取失败:','ZRNNj','seDKY','/api/v1/cli/activate','HTTP\x20','验证请求超时(15s)','TNmXh','niVqm','24ERuCxM','WtZYE','s)—\x20','FDePY','sEnlY','tDhOC','fAQvd','ZGGzt','sdDzr','object','请求超时(30s)—\x20','message','XKtUo','application/json','LxBah','protocol','QUDjM','raw','dneIk','LJNgZ','timeout','UacfF','pCKNx','/v1/models','iLYQL','byteLength','tvXon','concat','request','4790236bKINTw','stringify','rDTIN','SqYlC','utf8','xvfYs','dLDwF','3jfLUba','@2api-store/activate/0.1.0','dhWll','ZFqwq','/api/v1/cli/groups','lMrwV','无效的\x20apiBase:','href','wMxnY','https:','uQDmV','iZQGu'];_0x2604=function(){return _0x8814df;};return _0x2604();}import _0x456539 from'node:https';import _0x384e51 from'node:http';import{getDeviceId as _0x403d4c}from'./device.mjs';import{getChallenge as _0x4ec1f2,solvePoW as _0x29609d}from'./pow.mjs';function _0x498b(_0x5d983b,_0x440d88){_0x5d983b=_0x5d983b-0xd0;const _0x2604e9=_0x2604();let _0x498b6f=_0x2604e9[_0x5d983b];return _0x498b6f;}const n=_0x5e1e03(0xf7),a=0x7530;function i(_0x3add83,_0x5b29fb={}){return{'User-Agent':n,'X-Device-Id':_0x3add83,..._0x5b29fb};}export async function cliActivate({credential:_0x117f52,email:_0x35a533,platform:_0x1cca2f,groupId:_0x55f3bb,apiBase:_0x4d299f}){const _0x26a073=_0x5e1e03,_0x1b42e5={'LxBah':'utf8','PODbC':function(_0x5a3c6a,_0x482476){return _0x5a3c6a(_0x482476);},'seDKY':function(_0x3e58d9,_0x122241){return _0x3e58d9>=_0x122241;},'fWwGg':_0x26a073(0xdb),'cihTp':_0x26a073(0x11f),'uOQJT':_0x26a073(0x139),'smAuL':function(_0x589032,_0x590993){return _0x589032(_0x590993);},'sljYN':function(_0x4e6231,_0x2eb24d){return _0x4e6231===_0x2eb24d;},'doSIw':_0x26a073(0x10b),'jdfLT':_0x26a073(0xdf),'sEnlY':_0x26a073(0xe6),'XDgBA':function(_0x20972b){return _0x20972b();},'tDhOC':function(_0x360580,_0xf820fd,_0x3c3f27){return _0x360580(_0xf820fd,_0x3c3f27);}},_0x48d132=_0x1b42e5['XDgBA'](_0x403d4c);let _0x1dc718,_0x358c12;try{const {challenge:_0xc6a53,difficulty:_0x1628f4}=await _0x4ec1f2({'apiBase':_0x4d299f,'deviceId':_0x48d132});_0x1dc718=_0xc6a53,_0x358c12=_0x1b42e5[_0x26a073(0xd7)](_0x29609d,_0xc6a53,_0x1628f4);}catch(_0x2919cb){throw new Error(_0x26a073(0x136)+_0x2919cb[_0x26a073(0xdd)]);}return new Promise((_0x3574c3,_0x3b2b4a)=>{const _0x18b956=_0x26a073;let _0x5e38ee;try{_0x5e38ee=new URL(_0x1b42e5[_0x18b956(0x112)],_0x4d299f);}catch(_0x4a50b6){return void _0x1b42e5[_0x18b956(0x115)](_0x3b2b4a,new Error(_0x18b956(0xfc)+_0x4d299f+'('+_0x4a50b6[_0x18b956(0xdd)]+')'));}const _0x5819ea=_0x1b42e5['sljYN'](_0x18b956(0xff),_0x5e38ee[_0x18b956(0xe1)])?_0x456539:_0x384e51,_0x35adff={'credential':_0x117f52,..._0x35a533?{'email':_0x35a533}:{},..._0x1cca2f?{'platform':_0x1cca2f}:{},..._0x55f3bb?{'group_id':_0x55f3bb}:{}},_0x6a4a4e=JSON[_0x18b956(0xf0)](_0x35adff),_0x59e906=_0x5819ea['request'](_0x5e38ee,{'method':_0x1b42e5['doSIw'],'headers':i(_0x48d132,{'Content-Type':_0x1b42e5[_0x18b956(0x111)],'Content-Length':Buffer[_0x18b956(0xeb)](_0x6a4a4e),'X-PoW-Challenge':_0x1dc718,'X-PoW-Nonce':_0x358c12}),'timeout':a},_0x1487b8=>{const _0xe3cf11=_0x18b956,_0x2e5e86={'sqBvN':_0x1b42e5[_0xe3cf11(0xe0)],'WtZYE':function(_0x440422,_0x4d2f35){return _0x1b42e5['PODbC'](_0x440422,_0x4d2f35);},'iLYQL':function(_0x47d381,_0x9c4dc3){const _0x4998e8=_0xe3cf11;return _0x1b42e5[_0x4998e8(0x138)](_0x47d381,_0x9c4dc3);},'UdOTI':function(_0x1bd19d,_0x228833){return _0x1bd19d<_0x228833;},'FDePY':function(_0x7dfec9,_0xb8d1){const _0x51e477=_0xe3cf11;return _0x1b42e5[_0x51e477(0x121)](_0x7dfec9,_0xb8d1);},'TRXug':_0x1b42e5[_0xe3cf11(0x133)],'wHEpJ':function(_0x100c6c,_0x1fe4bc){return _0x100c6c(_0x1fe4bc);}},_0x97cb0=[];_0x1487b8['on'](_0xe3cf11(0x122),_0x501cdb=>_0x97cb0['push'](_0x501cdb)),_0x1487b8['on'](_0x1b42e5[_0xe3cf11(0x118)],()=>{const _0x476ae7=_0xe3cf11,_0x4d9b5e=Buffer['concat'](_0x97cb0)[_0x476ae7(0x11d)](_0x2e5e86[_0x476ae7(0x130)]);let _0x4db5c4;try{_0x4db5c4=_0x4d9b5e?JSON[_0x476ae7(0x106)](_0x4d9b5e):{};}catch{const _0x603290=new Error(_0x476ae7(0x131)+_0x1487b8[_0x476ae7(0x11e)]+'):'+_0x4d9b5e[_0x476ae7(0x12a)](0x0,0xc8));return _0x603290[_0x476ae7(0x11e)]=_0x1487b8[_0x476ae7(0x11e)],_0x603290[_0x476ae7(0xe3)]=_0x4d9b5e,void _0x2e5e86[_0x476ae7(0xd3)](_0x3b2b4a,_0x603290);}if(_0x2e5e86[_0x476ae7(0xea)](_0x1487b8[_0x476ae7(0x11e)],0xc8)&&_0x2e5e86[_0x476ae7(0x119)](_0x1487b8['statusCode'],0x12c))_0x2e5e86[_0x476ae7(0xd5)](_0x3574c3,_0x4db5c4);else{const _0x63019c=_0x4db5c4?.[_0x476ae7(0x12c)],_0x4e5f4b=(_0x63019c&&_0x2e5e86[_0x476ae7(0x105)]==typeof _0x63019c?_0x63019c[_0x476ae7(0xdd)]:_0x63019c)||_0x4db5c4?.[_0x476ae7(0xdd)]||_0x476ae7(0x13a)+_0x1487b8[_0x476ae7(0x11e)],_0x42f98d=new Error(_0x4e5f4b);_0x42f98d['statusCode']=_0x1487b8[_0x476ae7(0x11e)],_0x42f98d[_0x476ae7(0x109)]=_0x4db5c4,_0x2e5e86['wHEpJ'](_0x3b2b4a,_0x42f98d);}});});_0x59e906['on'](_0x1b42e5[_0x18b956(0xd6)],()=>{const _0x659338=_0x18b956;_0x59e906[_0x659338(0x128)](new Error('请求超时(30s)—\x20'+_0x5e38ee[_0x659338(0xfd)]));}),_0x59e906['on'](_0x18b956(0x12c),_0x3b2b4a),_0x59e906[_0x18b956(0x108)](_0x6a4a4e),_0x59e906[_0x18b956(0x11f)]();});}export function probeModels({credential:_0x2b38be,apiBase:_0x1a7a32,timeoutMs:_0x5dcbf1=0x2710}){const _0x1b673c=_0x5e1e03,_0x16fc3f={'LJNgZ':function(_0x189a32,_0x5427c4){return _0x189a32<_0x5427c4;},'ZRNNj':function(_0x19c0f8,_0x47164c){return _0x19c0f8>=_0x47164c;},'zixiA':_0x1b673c(0x122),'XKtUo':'end','uQDmV':_0x1b673c(0x123),'YEpqF':function(_0x2210c4,_0x31097f){return _0x2210c4===_0x31097f;},'uNnvi':'https:','JgvUj':_0x1b673c(0x10b),'WWpGz':function(_0x3f053f,_0x2788e7,_0x588878){return _0x3f053f(_0x2788e7,_0x588878);},'rDTIN':_0x1b673c(0xdf),'QUDjM':'error','efvoe':function(_0x2f10ba){return _0x2f10ba();}},_0x291c3f=_0x16fc3f['efvoe'](_0x403d4c);return new Promise((_0x483e0a,_0x4c9e84)=>{const _0x4a39f9=_0x1b673c,_0x24421f={'XNDGH':'utf8','XkAaL':function(_0x255c85,_0x568275){const _0x5b93ec=_0x498b;return _0x16fc3f[_0x5b93ec(0xe5)](_0x255c85,_0x568275);},'bDJJw':function(_0x17dd00,_0x2ce162){const _0x27bea7=_0x498b;return _0x16fc3f[_0x27bea7(0x137)](_0x17dd00,_0x2ce162);},'lMrwV':function(_0x13b545,_0x2267a8){return _0x13b545(_0x2267a8);},'kHZeF':_0x4a39f9(0x117),'LWtij':_0x16fc3f['zixiA'],'aCzpi':_0x16fc3f[_0x4a39f9(0xde)]};let _0x354702;try{_0x354702=new URL(_0x16fc3f[_0x4a39f9(0x100)],_0x1a7a32);}catch(_0x2c5b95){return void _0x4c9e84(new Error(_0x4a39f9(0xfc)+_0x1a7a32+'('+_0x2c5b95[_0x4a39f9(0xdd)]+')'));}const _0x30fc02=_0x16fc3f[_0x4a39f9(0x126)](_0x16fc3f['uNnvi'],_0x354702['protocol'])?_0x456539:_0x384e51,_0x31e860=JSON[_0x4a39f9(0xf0)]({'credential':_0x2b38be}),_0x35211d=_0x30fc02[_0x4a39f9(0xee)](_0x354702,{'method':_0x16fc3f[_0x4a39f9(0x116)],'headers':_0x16fc3f[_0x4a39f9(0x12e)](i,_0x291c3f,{'Content-Type':_0x16fc3f[_0x4a39f9(0xf1)],'Content-Length':Buffer['byteLength'](_0x31e860)}),'timeout':_0x5dcbf1},_0x37ef91=>{const _0x3a2caf=_0x4a39f9,_0x4823bf={'xwNRh':_0x24421f['XNDGH'],'EyfKY':function(_0x48f4e7,_0x50b34c){const _0x419a6d=_0x498b;return _0x24421f[_0x419a6d(0x12b)](_0x48f4e7,_0x50b34c);},'pjRlk':function(_0x3b89e9,_0x2608a8){const _0xba2c7b=_0x498b;return _0x24421f[_0xba2c7b(0x10c)](_0x3b89e9,_0x2608a8);},'QmKze':function(_0x3a1267,_0x842eea){return _0x3a1267(_0x842eea);},'sdDzr':function(_0x339453,_0x567737){const _0x148762=_0x498b;return _0x24421f[_0x148762(0xfb)](_0x339453,_0x567737);},'fAQvd':function(_0x33fe7b,_0x12b9b5){return _0x33fe7b(_0x12b9b5);},'dhWll':_0x24421f['kHZeF']},_0x2ad5f3=[];_0x37ef91['on'](_0x24421f[_0x3a2caf(0x10f)],_0x645698=>_0x2ad5f3[_0x3a2caf(0x10e)](_0x645698)),_0x37ef91['on'](_0x24421f[_0x3a2caf(0x11a)],()=>{const _0x361b7b=_0x3a2caf,_0x50da9c=Buffer['concat'](_0x2ad5f3)[_0x361b7b(0x11d)](_0x4823bf[_0x361b7b(0x113)]);if(_0x4823bf['EyfKY'](_0x37ef91['statusCode'],0xc8)||_0x4823bf['pjRlk'](_0x37ef91['statusCode'],0x12c)){const _0x59bdf3=new Error(_0x361b7b(0x13a)+_0x37ef91[_0x361b7b(0x11e)]);return _0x59bdf3['statusCode']=_0x37ef91['statusCode'],void _0x4823bf[_0x361b7b(0x134)](_0x4c9e84,_0x59bdf3);}try{_0x4823bf[_0x361b7b(0xda)](_0x483e0a,_0x50da9c?JSON[_0x361b7b(0x106)](_0x50da9c):{});}catch{_0x4823bf[_0x361b7b(0xd8)](_0x4c9e84,new Error(_0x4823bf[_0x361b7b(0xf8)]));}});});_0x35211d['on'](_0x4a39f9(0xe6),()=>{const _0x586093=_0x4a39f9;_0x35211d['destroy'](new Error('请求超时('+_0x5dcbf1/0x3e8+_0x586093(0xd4)+_0x354702[_0x586093(0xfd)]));}),_0x35211d['on'](_0x16fc3f[_0x4a39f9(0xe2)],_0x4c9e84),_0x35211d['write'](_0x31e860),_0x35211d['end']();});}export function listGroups({apiBase:_0x3195e9}){const _0x38ea9b=_0x5e1e03,_0x49a520={'wMxnY':function(_0x5c6375,_0x365675){return _0x5c6375(_0x365675);},'EsfEs':function(_0x37228c,_0x5a8803){return _0x37228c>=_0x5a8803;},'ZGGzt':function(_0x2cdda3,_0x39311b){return _0x2cdda3<_0x39311b;},'puMWh':'data','xshWW':_0x38ea9b(0xff),'iZQGu':function(_0x1a2520){return _0x1a2520();},'GKndi':_0x38ea9b(0xe6),'TNmXh':_0x38ea9b(0x12c)};return new Promise((_0x440d42,_0x5bbf9c)=>{const _0x499c22=_0x38ea9b,_0x2c65fb={'dneIk':function(_0x2c135c,_0x18787d){const _0x3c44e6=_0x498b;return _0x49a520[_0x3c44e6(0xfe)](_0x2c135c,_0x18787d);},'UacfF':function(_0x850e1c,_0x34f8b3){return _0x49a520['EsfEs'](_0x850e1c,_0x34f8b3);},'VtlhS':function(_0x4610ed,_0x416b77){const _0x595569=_0x498b;return _0x49a520[_0x595569(0xd9)](_0x4610ed,_0x416b77);},'niVqm':_0x49a520['puMWh'],'YUbJu':_0x499c22(0x11f)};let _0x58e36b;try{_0x58e36b=new URL(_0x499c22(0xfa),_0x3195e9);}catch(_0x5a634b){return void _0x5bbf9c(new Error('无效的\x20apiBase:'+_0x3195e9+'('+_0x5a634b[_0x499c22(0xdd)]+')'));}const _0x5f2b19=_0x49a520[_0x499c22(0x110)]===_0x58e36b[_0x499c22(0xe1)]?_0x456539:_0x384e51,_0x572d7a=_0x49a520[_0x499c22(0x101)](_0x403d4c),_0x4e0200=_0x5f2b19['request'](_0x58e36b,{'method':_0x499c22(0x103),'headers':i(_0x572d7a,{'Accept':_0x499c22(0xdf)}),'timeout':a},_0x1aa4b0=>{const _0x4e5c1f=_0x499c22,_0x5d36c7={'FtvLp':_0x4e5c1f(0xf3),'kKOss':function(_0x507f4c,_0x36dfaa){const _0x4ca73f=_0x4e5c1f;return _0x2c65fb[_0x4ca73f(0xe4)](_0x507f4c,_0x36dfaa);},'Coxsw':function(_0x10e520,_0x1032f9){const _0x2c7ba9=_0x4e5c1f;return _0x2c65fb[_0x2c7ba9(0xe7)](_0x10e520,_0x1032f9);},'xLuxJ':function(_0x426f2b,_0x3082c1){return _0x2c65fb['VtlhS'](_0x426f2b,_0x3082c1);},'KwgiE':function(_0x202637,_0x4fcda1){return _0x202637(_0x4fcda1);}},_0x700eaa=[];_0x1aa4b0['on'](_0x2c65fb[_0x4e5c1f(0xd1)],_0x3ff973=>_0x700eaa[_0x4e5c1f(0x10e)](_0x3ff973)),_0x1aa4b0['on'](_0x2c65fb['YUbJu'],()=>{const _0x525037=_0x4e5c1f,_0x33bb71=Buffer[_0x525037(0xed)](_0x700eaa)[_0x525037(0x11d)](_0x5d36c7[_0x525037(0x12d)]);let _0x764f55;try{_0x764f55=_0x33bb71?JSON[_0x525037(0x106)](_0x33bb71):{};}catch{return void _0x5d36c7[_0x525037(0x125)](_0x440d42,[]);}if(_0x5d36c7[_0x525037(0x124)](_0x1aa4b0['statusCode'],0xc8)&&_0x5d36c7['xLuxJ'](_0x1aa4b0[_0x525037(0x11e)],0x12c)){const _0x1e7108=Array['isArray'](_0x764f55)?_0x764f55:_0x764f55?.['groups'];_0x5d36c7['KwgiE'](_0x440d42,Array[_0x525037(0x11b)](_0x1e7108)?_0x1e7108:[]);}else _0x440d42([]);});});_0x4e0200['on'](_0x49a520[_0x499c22(0x11c)],()=>{const _0x3b0f1f=_0x499c22;_0x4e0200[_0x3b0f1f(0x128)](new Error(_0x3b0f1f(0xdc)+_0x58e36b[_0x3b0f1f(0xfd)]));}),_0x4e0200['on'](_0x49a520[_0x499c22(0xd0)],_0x183b2d=>{_0x49a520['wMxnY'](_0x440d42,[]);}),_0x4e0200[_0x499c22(0x11f)]();});}export function verifyApiKey({apiKey:_0x4c5dcb,baseUrl:_0x493a83}){const _0x3eb931=_0x5e1e03,_0x1c15b2={'LwHgL':function(_0x17765b,_0x32f6d8){return _0x17765b<_0x32f6d8;},'xrkWa':function(_0x4c7b0c,_0x1acb75){return _0x4c7b0c(_0x1acb75);},'pCKNx':'data','iASMZ':function(_0x1f2e28,_0x38c5cb){return _0x1f2e28(_0x38c5cb);},'dLDwF':function(_0x402a20,_0x34433c){return _0x402a20(_0x34433c);},'bGWXM':function(_0x3a6db6,_0x4253be){return _0x3a6db6===_0x4253be;},'SqYlC':_0x3eb931(0x103)};return new Promise(_0x454834=>{const _0x3d5bd8=_0x3eb931,_0x46e0c1={'xvfYs':function(_0x24edd4,_0x133cf7){return _0x1c15b2['iASMZ'](_0x24edd4,_0x133cf7);},'tvXon':_0x3d5bd8(0x13b)};let _0x445960;try{_0x445960=new URL(_0x3d5bd8(0xe9),_0x493a83);}catch{return void _0x1c15b2[_0x3d5bd8(0xf5)](_0x454834,{'ok':!0x1,'error':_0x3d5bd8(0x10a)+_0x493a83});}const _0xd3f819=(_0x1c15b2[_0x3d5bd8(0x120)](_0x3d5bd8(0xff),_0x445960[_0x3d5bd8(0xe1)])?_0x456539:_0x384e51)['request'](_0x445960,{'method':_0x1c15b2[_0x3d5bd8(0xf2)],'headers':{'Authorization':'Bearer\x20'+_0x4c5dcb,'User-Agent':n},'timeout':0x3a98},_0x42aeea=>{const _0x212e2b=_0x3d5bd8,_0x487517={'hxorJ':function(_0x521db8,_0x3fb145){return _0x521db8>=_0x3fb145;},'ZFqwq':function(_0x42b9c5,_0x462927){return _0x1c15b2['LwHgL'](_0x42b9c5,_0x462927);},'SYqnv':function(_0x43ce9f,_0x1ed2b7){const _0x4bb33c=_0x498b;return _0x1c15b2[_0x4bb33c(0x10d)](_0x43ce9f,_0x1ed2b7);}},_0xc0c53d=[];_0x42aeea['on'](_0x1c15b2[_0x212e2b(0xe8)],_0x1851c7=>_0xc0c53d[_0x212e2b(0x10e)](_0x1851c7)),_0x42aeea['on'](_0x212e2b(0x11f),()=>{const _0x4fdf79=_0x212e2b,_0x13ddf6=_0x487517[_0x4fdf79(0x102)](_0x42aeea[_0x4fdf79(0x11e)],0xc8)&&_0x487517[_0x4fdf79(0xf9)](_0x42aeea[_0x4fdf79(0x11e)],0x12c);_0x487517['SYqnv'](_0x454834,{'ok':_0x13ddf6,'statusCode':_0x42aeea[_0x4fdf79(0x11e)]});});});_0xd3f819['on']('timeout',()=>{const _0x4da7fa=_0x3d5bd8;_0xd3f819[_0x4da7fa(0x128)](),_0x46e0c1[_0x4da7fa(0xf4)](_0x454834,{'ok':!0x1,'error':_0x46e0c1[_0x4da7fa(0xec)]});}),_0xd3f819['on'](_0x3d5bd8(0x12c),_0x346ee6=>_0x454834({'ok':!0x1,'error':_0x346ee6[_0x3d5bd8(0xdd)]})),_0xd3f819['end']();});}
|
package/dist/lib/backup.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3291d9,_0x558501){const _0x390124=_0x35d0,_0x65e1fe=_0x3291d9();while(!![]){try{const _0x4715bc=-parseInt(_0x390124(0x194))/0x1+-parseInt(_0x390124(0x1a7))/0x2*(-parseInt(_0x390124(0x19a))/0x3)+-parseInt(_0x390124(0x1ac))/0x4*(-parseInt(_0x390124(0x199))/0x5)+-parseInt(_0x390124(0x196))/0x6+-parseInt(_0x390124(0x1ab))/0x7*(parseInt(_0x390124(0x195))/0x8)+parseInt(_0x390124(0x19e))/0x9*(-parseInt(_0x390124(0x1a2))/0xa)+parseInt(_0x390124(0x19d))/0xb*(parseInt(_0x390124(0x1a0))/0xc);if(_0x4715bc===_0x558501)break;else _0x65e1fe['push'](_0x65e1fe['shift']());}catch(_0x7d6e27){_0x65e1fe['push'](_0x65e1fe['shift']());}}}(_0x2c9c,0x3cd64));import _0x295c7c from'node:fs';import _0x4726ac from'node:path';function _0x2c9c(){const _0x343b50=['sort','existsSync','14344LuOnQe','1065384BVFyvE','mtime','5820cWqBic','.bak.','40asngAc','isFile','toISOString','name','push','15518GiACxd','mtimeMs','备份文件不存在:','size','49piGfFX','1693388rGONPb','join','30841VEewDS','216464xujDzF','723642WaxKgW','readdirSync','match','5iLHvco','3qrZMab'];_0x2c9c=function(){return _0x343b50;};return _0x2c9c();}export function backupFile(_0x42ae30){const _0x5194c0=_0x35d0;let _0xfc1730=!0x1;try{_0xfc1730=_0x295c7c[_0x5194c0(0x19c)](_0x42ae30);}catch{return null;}if(!_0xfc1730)return null;const _0x1089fb=_0x42ae30+_0x5194c0(0x1a1)+new Date()[_0x5194c0(0x1a4)]()['replace'](/[:.]/g,'-');return _0x295c7c['copyFileSync'](_0x42ae30,_0x1089fb),_0x1089fb;}function _0x35d0(_0x89ac25,_0x5e8728){_0x89ac25=_0x89ac25-0x193;const _0x2c9ccd=_0x2c9c();let _0x35d0d6=_0x2c9ccd[_0x89ac25];return _0x35d0d6;}export function listBackups(_0xd00aef){const _0x1edca0=_0x35d0,_0x306623=[];for(const _0x274503 of _0xd00aef){if(!_0x274503)continue;let _0x52189f;try{_0x52189f=_0x295c7c[_0x1edca0(0x197)](_0x274503,{'withFileTypes':!0x0});}catch{continue;}for(const _0x33afcd of _0x52189f){if(!_0x33afcd[_0x1edca0(0x1a3)]())continue;const _0x426fd1=_0x33afcd[_0x1edca0(0x1a5)][_0x1edca0(0x198)](/^(.+)\.bak\.[\dTZ:-]+$/);if(!_0x426fd1)continue;const _0x7889cb=_0x426fd1[0x1],_0x3bf9be=_0x4726ac['join'](_0x274503,_0x33afcd[_0x1edca0(0x1a5)]),_0x30238a=_0x4726ac[_0x1edca0(0x193)](_0x274503,_0x7889cb);try{const _0x4a653d=_0x295c7c['statSync'](_0x3bf9be);_0x306623[_0x1edca0(0x1a6)]({'bakPath':_0x3bf9be,'origPath':_0x30238a,'mtime':_0x4a653d[_0x1edca0(0x1a8)],'dir':_0x274503,'file':_0x33afcd[_0x1edca0(0x1a5)],'origName':_0x7889cb,'size':_0x4a653d[_0x1edca0(0x1aa)]});}catch{}}}return _0x306623[_0x1edca0(0x19b)]((_0xa3271f,_0x1fca8a)=>_0x1fca8a['mtime']-_0xa3271f[_0x1edca0(0x19f)]),_0x306623;}export function restoreBackup(_0x4f2434,_0x1f182f){const _0x1da558=_0x35d0;if(!_0x295c7c[_0x1da558(0x19c)](_0x4f2434))throw new Error(_0x1da558(0x1a9)+_0x4f2434);const _0x69b28c=_0x4726ac['dirname'](_0x1f182f);try{_0x295c7c['mkdirSync'](_0x69b28c,{'recursive':!0x0});}catch{}return _0x295c7c['copyFileSync'](_0x4f2434,_0x1f182f),_0x1f182f;}
|
package/dist/lib/cmds.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x541bdf=_0x3845;(function(_0x3644fd,_0x49fc82){const _0x396948=_0x3845,_0x3aa2e2=_0x3644fd();while(!![]){try{const _0x38fec4=-parseInt(_0x396948(0x1c4))/0x1*(-parseInt(_0x396948(0x219))/0x2)+parseInt(_0x396948(0x19f))/0x3*(-parseInt(_0x396948(0x20a))/0x4)+parseInt(_0x396948(0x1aa))/0x5+-parseInt(_0x396948(0x1cb))/0x6*(-parseInt(_0x396948(0x216))/0x7)+parseInt(_0x396948(0x215))/0x8*(parseInt(_0x396948(0x25e))/0x9)+-parseInt(_0x396948(0x21f))/0xa*(-parseInt(_0x396948(0x191))/0xb)+-parseInt(_0x396948(0x180))/0xc;if(_0x38fec4===_0x49fc82)break;else _0x3aa2e2['push'](_0x3aa2e2['shift']());}catch(_0x39a93e){_0x3aa2e2['push'](_0x3aa2e2['shift']());}}}(_0x2af3,0x34112));import _0x145f0a from'node:fs';import _0x42c520 from'node:path';import _0x5ba66f from'node:os';import{backupFile as _0x2861f6,listBackups as _0x51f281,restoreBackup as _0x52f4f8}from'./backup.mjs';import{cliActivate as _0x30e125,listGroups as _0x36a3c3}from'./api.mjs';import{writeFileWithPermission as _0x1fec93,PermissionDeniedError as _0x54e376}from'./write.mjs';import{renderContent as _0x2ccff1,expandPath as _0x2c1556,listModels as _0xf75ce6}from'./render.mjs';import{getCliMeta as _0x5149cd,isDefaultSelected as _0x5f0096}from'./platforms.mjs';import{detectAll as _0x3797fa}from'./detect.mjs';import{ask as _0x3e6009,askSecret as _0x511f02,multiSelect as _0xc96d09,select as _0x589ec1,confirm as _0x54f7b2,closePrompt as _0x4def35}from'./prompt.mjs';import{banner as _0x139e42,ok as _0x59a1c7,fail as _0x131ec2,warn as _0x16122d,info as _0xb27f4f,step as _0x154257,plain as _0x10fb6d,guide as _0x2b76ed,chalk as _0x2976ea}from'./ui.mjs';const v=[_0x541bdf(0x1b4),_0x541bdf(0x1f3),_0x541bdf(0x232),'~/.gemini/settings.json'],C=[_0x541bdf(0x1ec),'%userprofile%\x5c.codex\x5cauth.json',_0x541bdf(0x1c9),_0x541bdf(0x1b0)],T=[_0x541bdf(0x1dc),_0x541bdf(0x1a3),_0x541bdf(0x213)],M=[_0x541bdf(0x1bc),_0x541bdf(0x253),'%userprofile%\x5c.gemini'];function R(_0x557296){const _0x2c6a03=_0x541bdf,_0x17327b={'SjgfL':function(_0x1e92b3,_0x59ca9b){return _0x1e92b3<_0x59ca9b;},'WZmss':_0x2c6a03(0x24b),'hQATL':function(_0x1f8f8e,_0x2f15bd){return _0x1f8f8e===_0x2f15bd;},'DOSun':_0x2c6a03(0x18c),'hEQUi':function(_0x148e8b,_0x9f72f){return _0x148e8b===_0x9f72f;}},_0x3d07a7={'dryRun':!0x1,'_':[]};for(let _0x224fec=0x0;_0x17327b[_0x2c6a03(0x23f)](_0x224fec,_0x557296[_0x2c6a03(0x19a)]);_0x224fec++){const _0xfb4309=_0x557296[_0x224fec];if(_0x17327b[_0x2c6a03(0x1d1)]===_0xfb4309||'-n'===_0xfb4309)_0x3d07a7[_0x2c6a03(0x226)]=!0x0;else{if(_0x2c6a03(0x230)===_0xfb4309)_0x3d07a7[_0x2c6a03(0x235)]=_0x557296[++_0x224fec];else{if(_0x17327b['hQATL'](_0x17327b['DOSun'],_0xfb4309)||_0x17327b[_0x2c6a03(0x1ab)]('-h',_0xfb4309))_0x3d07a7['help']=!0x0;else{if(_0xfb4309[_0x2c6a03(0x185)]('--')&&_0xfb4309['includes']('=')){const [_0x4d16b7,_0x3889cf]=_0xfb4309[_0x2c6a03(0x23c)](0x2)[_0x2c6a03(0x234)](/=(.*)/,0x2);_0x3d07a7[_0x4d16b7]=_0x3889cf;}else _0xfb4309['startsWith']('--')?_0x3d07a7[_0xfb4309[_0x2c6a03(0x1d0)](/^--/,'')]=_0x557296[++_0x224fec]:_0x3d07a7['_'][_0x2c6a03(0x193)](_0xfb4309);}}}}return _0x3d07a7;}function N(_0x1050c2,_0x217d3e){const _0x4a2285=_0x541bdf,_0x49306d={'Lqhti':function(_0x3da75d,_0x2babc5,_0x130cf4){return _0x3da75d(_0x2babc5,_0x130cf4);}};return _0x49306d[_0x4a2285(0x1ee)](_0x2c1556,_0x1050c2,{'isWindows':_0x217d3e});}function K(_0xeb98c9){const _0x56d8b0=_0x541bdf;return(_0xeb98c9?M:T)[_0x56d8b0(0x21e)](_0x783558=>N(_0x783558,_0xeb98c9));}const H=_0x541bdf(0x257)['trim']();export const SUBCOMMANDS={'restore':{'handler':async function(_0x2a59f7){const _0x83f830=_0x541bdf,_0x5d6106={'WyYKI':function(_0x13421b,_0x1a4ddb){return _0x13421b(_0x1a4ddb);},'efMyd':function(_0x34c081,_0x23daeb){return _0x34c081(_0x23daeb);},'CoYNd':function(_0x5d88d8,_0x43e555){return _0x5d88d8(_0x43e555);},'TdSQk':function(_0x110a5d,_0x552fab){return _0x110a5d(_0x552fab);},'bgtsH':'\x20|\x20','qoiOo':function(_0x599443){return _0x599443();},'Yvcvp':'扫描备份文件','xhVLV':function(_0x2df0ae,_0x1cb8aa){return _0x2df0ae(_0x1cb8aa);},'RQcdh':function(_0xc9b822,_0x2b0e34){return _0xc9b822(_0x2b0e34);},'rtlML':function(_0xc9ce13,_0x567ef0){return _0xc9ce13(_0x567ef0);},'NRcds':function(_0x28412c,_0x28f201){return _0x28412c===_0x28f201;},'YABHp':_0x83f830(0x19e),'XnhAe':function(_0x19083b,_0x322e6b){return _0x19083b(_0x322e6b);},'hZYNa':'Codex\x20CLI','bboTZ':_0x83f830(0x224),'JVesy':function(_0x41774b,_0x496cac,_0x45d61a,_0x1ace6a){return _0x41774b(_0x496cac,_0x45d61a,_0x1ace6a);},'HxyGd':_0x83f830(0x208),'gRVps':function(_0x2744b1,_0x158e7b){return _0x2744b1<_0x158e7b;},'TcXxp':function(_0x29ada1,_0x8a1c8e){return _0x29ada1>=_0x8a1c8e;},'UIQKt':function(_0x2c6aad,_0x205b0b){return _0x2c6aad(_0x205b0b);},'tDkbQ':_0x83f830(0x192),'JuoBW':function(_0x41d0f9,_0x18de06){return _0x41d0f9>_0x18de06;},'HxAnS':function(_0x55a1f6,_0x56ed50,_0x37fc6c,_0x5ae632){return _0x55a1f6(_0x56ed50,_0x37fc6c,_0x5ae632);},'bFMsj':_0x83f830(0x244),'fckzF':function(_0x2ed236,_0x1bd09e){return _0x2ed236<_0x1bd09e;},'aDSrE':_0x83f830(0x256),'HlWRm':function(_0x28768f,_0x57c2f8){return _0x28768f(_0x57c2f8);},'ocEKJ':function(_0x518d94,_0xb6a8b5){return _0x518d94(_0xb6a8b5);},'roojv':function(_0x359167,_0x16f828){return _0x359167(_0x16f828);},'sEOpK':function(_0x2d5d69,_0x59b9a6,_0x1849b6){return _0x2d5d69(_0x59b9a6,_0x1849b6);},'ykMNd':function(_0xdf72d5,_0x126676){return _0xdf72d5>_0x126676;}},_0x1ec2e1=_0x5d6106[_0x83f830(0x22a)](R,_0x2a59f7);if(_0x1ec2e1[_0x83f830(0x1db)])return console[_0x83f830(0x1e9)]('npx\x20@2api-store/activate\x20restore\x20[options]\x0a\x0a'+H),0x0;_0x5d6106[_0x83f830(0x204)](_0x139e42);const _0x5cb513=_0x3797fa();if(!_0x5cb513[_0x83f830(0x1ad)][_0x83f830(0x172)])return _0x5d6106[_0x83f830(0x1ed)](_0x131ec2,_0x83f830(0x202)+_0x5cb513[_0x83f830(0x1ad)]['version']),0x1;_0x154257(_0x5d6106[_0x83f830(0x177)]);const _0x3d6f00=_0x5d6106[_0x83f830(0x246)](K,_0x5cb513['os']['isWindows']);_0x1ec2e1[_0x83f830(0x226)]&&_0x5d6106[_0x83f830(0x1b2)](_0x16122d,_0x83f830(0x1d9)),_0x5d6106[_0x83f830(0x1f1)](_0xb27f4f,_0x83f830(0x1f7)+_0x3d6f00[_0x83f830(0x1b5)](',\x20'));const _0x11a425=_0x5d6106[_0x83f830(0x23d)](_0x51f281,_0x3d6f00);if(_0x5d6106[_0x83f830(0x1d7)](0x0,_0x11a425['length']))return _0xb27f4f(_0x5d6106['YABHp']),_0x5d6106[_0x83f830(0x23d)](_0xb27f4f,_0x83f830(0x1e3)),0x0;_0x5d6106[_0x83f830(0x20b)](_0x59a1c7,_0x83f830(0x211)+_0x11a425[_0x83f830(0x19a)]+_0x83f830(0x186));const _0x4b39f9={'.codex':_0x5d6106[_0x83f830(0x196)],'.claude':_0x83f830(0x1e4),'.gemini':_0x5d6106[_0x83f830(0x1f8)]};function _0x30a935(_0x293d7f){const _0x34fc10=_0x83f830,_0x511a74=process['env'][_0x34fc10(0x24c)]||process[_0x34fc10(0x1ae)][_0x34fc10(0x228)]||'',_0x3456b6=_0x42c520[_0x34fc10(0x1af)](_0x511a74,_0x293d7f)[_0x34fc10(0x1d0)](/\\/g,'/')['split']('/')[0x0];return _0x4b39f9[_0x3456b6]||_0x3456b6;}function _0x1ec306(_0x48d4a2){const _0x34a009=_0x83f830;return process['env']['HOME']||process[_0x34a009(0x1ae)][_0x34a009(0x228)],_0x42c520['dirname'](_0x48d4a2);}const _0xf31a6e={};for(const _0x160709 of _0x11a425){const _0x25db51=_0x5d6106['efMyd'](_0x1ec306,_0x160709[_0x83f830(0x203)]);_0xf31a6e[_0x25db51]||(_0xf31a6e[_0x25db51]=[]),_0xf31a6e[_0x25db51]['push'](_0x160709);}const _0x2c1c68=Object[_0x83f830(0x1cd)](_0xf31a6e);if(_0x5d6106[_0x83f830(0x1d7)](0x0,_0x2c1c68[_0x83f830(0x19a)]))return _0xb27f4f(_0x83f830(0x183)),0x0;console['log'](),_0x154257('选择要恢复的应用');const _0x4e055f=_0x2c1c68[_0x83f830(0x21e)](_0x3c836b=>{const _0x30a4ae=_0x83f830,_0x4fb377=_0x5d6106[_0x30a4ae(0x1f1)](_0x30a935,_0x42c520[_0x30a4ae(0x1b5)](_0x3c836b,'dummy')),_0x1ac226=_0xf31a6e[_0x3c836b]['length'];return{'label':_0x2976ea[_0x30a4ae(0x17e)](_0x4fb377)+'('+_0x1ac226+_0x30a4ae(0x1a7),'dir':_0x3c836b};}),_0x5e3408=await _0x5d6106[_0x83f830(0x25d)](_0x589ec1,_0x5d6106['HxyGd'],_0x4e055f,{'defaultIndex':0x0});if(_0x5d6106[_0x83f830(0x1ac)](_0x5e3408,0x0)||_0x5d6106[_0x83f830(0x198)](_0x5e3408,_0x4e055f[_0x83f830(0x19a)]))return _0x5d6106['XnhAe'](_0x131ec2,_0x83f830(0x19c)),0x1;const _0x32338f=_0x4e055f[_0x5e3408][_0x83f830(0x243)],_0x466821=_0x5d6106[_0x83f830(0x1a5)](_0x30a935,_0x42c520['join'](_0x32338f,_0x5d6106[_0x83f830(0x22f)])),_0xc9be2b=_0xf31a6e[_0x32338f][_0x83f830(0x1d4)]((_0x49d05c,_0x271988)=>_0x271988['mtime']-_0x49d05c[_0x83f830(0x25c)]),_0x2c8923={},_0x4a017b=[];for(const _0x323c9e of _0xc9be2b){const _0x202d05=_0x42c520['basename'](_0x323c9e[_0x83f830(0x1b1)])[_0x83f830(0x175)](/\.bak\.(.+)$/),_0x2ff0e2=(_0x202d05?_0x202d05[0x1]:'')[_0x83f830(0x1d0)](/-\d{3}Z$/,'Z');_0x2c8923[_0x2ff0e2]||(_0x2c8923[_0x2ff0e2]=[],_0x4a017b[_0x83f830(0x193)](_0x2ff0e2)),_0x2c8923[_0x2ff0e2]['push'](_0x323c9e);}for(const _0x4819c6 of _0x4a017b){const _0x34714a=_0x2c8923[_0x4819c6],_0x38d08c={};for(const _0x6c2488 of _0x34714a)(!_0x38d08c[_0x6c2488[_0x83f830(0x203)]]||_0x5d6106[_0x83f830(0x260)](_0x6c2488[_0x83f830(0x25c)],_0x38d08c[_0x6c2488[_0x83f830(0x203)]][_0x83f830(0x25c)]))&&(_0x38d08c[_0x6c2488[_0x83f830(0x203)]]=_0x6c2488);_0x2c8923[_0x4819c6]=Object[_0x83f830(0x19b)](_0x38d08c)[_0x83f830(0x1d4)]((_0xf77249,_0x292dda)=>_0x292dda[_0x83f830(0x25c)]-_0xf77249[_0x83f830(0x25c)]);}console[_0x83f830(0x1e9)](),_0x5d6106['RQcdh'](_0x154257,_0x83f830(0x22d)+_0x466821+')');const _0x3b9825=_0x4a017b[_0x83f830(0x21e)](_0x53d4f9=>{const _0x5199dd=_0x83f830,_0x1c89aa={'scIyW':function(_0x19654b,_0x4a15f3){const _0x245cd7=_0x3845;return _0x5d6106[_0x245cd7(0x22a)](_0x19654b,_0x4a15f3);},'KQdzq':function(_0xbed221,_0x2a1dd4){return _0xbed221+_0x2a1dd4;},'uckDY':function(_0x5b0e86,_0x64c29b){const _0xe3b891=_0x3845;return _0x5d6106[_0xe3b891(0x23b)](_0x5b0e86,_0x64c29b);},'RGTfb':function(_0x1e5857,_0x37dd56){const _0x3d606d=_0x3845;return _0x5d6106[_0x3d606d(0x1ed)](_0x1e5857,_0x37dd56);}},_0x52c3ec=_0x2c8923[_0x53d4f9],_0x255136=_0x52c3ec[_0x5199dd(0x21e)](_0x493d84=>_0x42c520['basename'](_0x493d84['origPath']))[_0x5199dd(0x1b5)](',\x20'),_0x19d1ee=function(_0x57349e){const _0x41b0a6=_0x5199dd;try{const _0x1282b2=new Date(_0x57349e),_0x17a05f=_0x1508e9=>String(_0x1508e9)['padStart'](0x2,'0');return _0x1282b2[_0x41b0a6(0x201)]()+'-'+_0x1c89aa[_0x41b0a6(0x1f5)](_0x17a05f,_0x1c89aa[_0x41b0a6(0x22e)](_0x1282b2[_0x41b0a6(0x1c5)](),0x1))+'-'+_0x17a05f(_0x1282b2[_0x41b0a6(0x1c8)]())+'\x20'+_0x1c89aa[_0x41b0a6(0x1f5)](_0x17a05f,_0x1282b2['getHours']())+':'+_0x1c89aa[_0x41b0a6(0x1e8)](_0x17a05f,_0x1282b2[_0x41b0a6(0x241)]())+':'+_0x1c89aa[_0x41b0a6(0x1a1)](_0x17a05f,_0x1282b2[_0x41b0a6(0x173)]());}catch{return new Date(_0x57349e)[_0x41b0a6(0x240)]();}}(_0x52c3ec[0x0][_0x5199dd(0x25c)]),_0x515a60=[];for(const _0x2dd569 of _0x52c3ec)try{const _0x1a649a=_0x145f0a['readFileSync'](_0x2dd569[_0x5199dd(0x1b1)],_0x5199dd(0x239));if(!_0x515a60[_0x5199dd(0x1ff)](_0x56ae87=>_0x56ae87[_0x5199dd(0x25b)]('…'))){const _0x1493b8=_0x1a649a[_0x5199dd(0x175)](/sk-([a-zA-Z0-9]{10,})/);if(_0x1493b8)_0x515a60[_0x5199dd(0x193)](_0x5199dd(0x245)+_0x1493b8[0x1]['slice'](-0x6));else{const _0x52c98e=_0x1a649a[_0x5199dd(0x175)](/(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["']([a-zA-Z0-9._-]{10,})["']/);if(_0x52c98e)_0x515a60[_0x5199dd(0x193)](_0x5199dd(0x1b8)+_0x52c98e[0x1]['slice'](-0x6));else{const _0xfce456=_0x1a649a[_0x5199dd(0x175)](/export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?)([a-zA-Z0-9._-]{10,})/);_0xfce456&&_0x515a60['push']('key:…'+_0xfce456[0x2][_0x5199dd(0x23c)](-0x6));}}}if(!_0x515a60[_0x5199dd(0x1ff)](_0x51e2c9=>_0x51e2c9[_0x5199dd(0x185)](_0x5199dd(0x261)))){const _0x8ce233=_0x1a649a[_0x5199dd(0x175)](/(https?:\/\/[^\s"'`}]+)/);_0x8ce233&&_0x515a60[_0x5199dd(0x193)](_0x8ce233[0x1][_0x5199dd(0x1d0)](/\/+$/,''));}if(!_0x515a60[_0x5199dd(0x1ff)](_0x1c3a96=>_0x1c3a96['startsWith'](_0x5199dd(0x1e2)))){const _0x45c57f=_0x1a649a[_0x5199dd(0x175)](/(?:^|\n)\s*model\s*[=:]\s*["']?([a-zA-Z0-9][\w.-]+)/);_0x45c57f&&_0x515a60[_0x5199dd(0x193)](_0x5199dd(0x1c6)+_0x45c57f[0x1]);}}catch{}const _0x259f93=_0x515a60[_0x5199dd(0x19a)]>0x0?'\x20'+_0x2976ea[_0x5199dd(0x1a6)](_0x515a60[_0x5199dd(0x1b5)](_0x5d6106[_0x5199dd(0x1e6)])):'';return{'label':_0x2976ea[_0x5199dd(0x23e)](_0x19d1ee)+'('+_0x52c3ec[_0x5199dd(0x19a)]+_0x5199dd(0x194)+_0x255136+')'+_0x259f93,'ts':_0x53d4f9,'group':_0x52c3ec};}),_0x70c84d=await _0x5d6106[_0x83f830(0x25a)](_0x589ec1,_0x5d6106[_0x83f830(0x1b7)],_0x3b9825,{'defaultIndex':0x0});if(_0x5d6106[_0x83f830(0x1e1)](_0x70c84d,0x0)||_0x70c84d>=_0x3b9825[_0x83f830(0x19a)])return _0x131ec2(_0x5d6106[_0x83f830(0x1fc)]),0x1;const _0x4d1e59=_0x3b9825[_0x70c84d][_0x83f830(0x200)];console[_0x83f830(0x1e9)](),_0x5d6106[_0x83f830(0x246)](_0xb27f4f,'将恢复\x20'+_0x466821+'('+_0x4d1e59['length']+_0x83f830(0x187));for(const _0x82a76a of _0x4d1e59)_0xb27f4f('\x20\x20'+_0x42c520[_0x83f830(0x23a)](_0x82a76a[_0x83f830(0x203)])+_0x83f830(0x242)+_0x42c520['basename'](_0x82a76a[_0x83f830(0x1b1)]));if(_0x1ec2e1[_0x83f830(0x226)])return _0x5d6106[_0x83f830(0x171)](_0x16122d,_0x83f830(0x1f6)),0x0;let _0x1f9813=0x0;for(const _0x484548 of _0x4d1e59){if(_0x145f0a[_0x83f830(0x1f9)](_0x484548[_0x83f830(0x203)]))try{const _0x2effe3=_0x5d6106['ocEKJ'](_0x2861f6,_0x484548[_0x83f830(0x203)]);_0x2effe3&&_0x5d6106[_0x83f830(0x1ef)](_0xb27f4f,_0x83f830(0x1c2)+_0x42c520[_0x83f830(0x23a)](_0x484548[_0x83f830(0x203)])+_0x83f830(0x184)+_0x42c520[_0x83f830(0x23a)](_0x2effe3));}catch{}try{_0x5d6106[_0x83f830(0x206)](_0x52f4f8,_0x484548[_0x83f830(0x1b1)],_0x484548['origPath']),_0x5d6106[_0x83f830(0x23d)](_0x59a1c7,'已恢复:'+_0x484548['origPath']),_0x1f9813++;}catch(_0x21b91d){_0x5d6106[_0x83f830(0x246)](_0x131ec2,'恢复失败:'+_0x484548[_0x83f830(0x203)]+'('+_0x21b91d[_0x83f830(0x1a9)]+')');}}return _0x5d6106[_0x83f830(0x182)](_0xb27f4f,_0x83f830(0x251)+_0x1f9813+_0x83f830(0x1cf)),_0x5d6106['ykMNd'](_0x1f9813,0x0)?0x0:0x3;},'description':_0x541bdf(0x225)},'reset':{'handler':async function(_0x473c7b){const _0x50551e=_0x541bdf,_0x460fed={'kjfyz':function(_0x41a2d4,_0x2b14d3){return _0x41a2d4(_0x2b14d3);},'uDvqB':function(_0x529598){return _0x529598();},'KOoLd':function(_0x3fba2d){return _0x3fba2d();},'rdLKh':function(_0x521c31,_0x4403bb){return _0x521c31(_0x4403bb);},'PRjOa':_0x50551e(0x19d),'fARqZ':function(_0x49e144,_0x37210a){return _0x49e144===_0x37210a;},'zDyBU':function(_0x1b4b58,_0x2f7792){return _0x1b4b58(_0x2f7792);},'euokp':'将处理以下文件:','oMbyQ':function(_0x520bb8,_0x5e3736){return _0x520bb8(_0x5e3736);},'HEkMd':function(_0x9bf43e,_0x5def32){return _0x9bf43e>_0x5def32;},'WEROt':_0x50551e(0x254),'tsKYS':'⚠️\x20这是破坏性操作:将删除上述配置文件并尝试从备份恢复。','saSKE':function(_0x427631,_0x12962c){return _0x427631(_0x12962c);},'awoRN':_0x50551e(0x223),'keryX':function(_0x45e4c6,_0x588e52,_0x38ef57){return _0x45e4c6(_0x588e52,_0x38ef57);},'zoPjt':_0x50551e(0x1d5),'EoYIN':_0x50551e(0x258),'ortof':function(_0x5660b2,_0x423585){return _0x5660b2(_0x423585);},'NWZRv':_0x50551e(0x1b3),'lGRVw':_0x50551e(0x247),'oLbHf':function(_0x3e1907,_0x162ca1){return _0x3e1907>_0x162ca1;},'fLOAr':function(_0xba18e5,_0x7cad00){return _0xba18e5(_0x7cad00);},'OfGhD':_0x50551e(0x1d3),'XWovl':function(_0xab5ecf,_0xb01e2d){return _0xab5ecf(_0xb01e2d);},'zCxfY':_0x50551e(0x207),'PYFlK':'EPERM','SnPwi':_0x50551e(0x236),'wuhqx':function(_0x40c37f,_0x52d97f){return _0x40c37f(_0x52d97f);},'zWTcI':function(_0x2acbfd,_0x519b26){return _0x2acbfd(_0x519b26);},'ASjzg':_0x50551e(0x176),'HUnYn':function(_0x422bb1,_0x4160d0){return _0x422bb1>_0x4160d0;},'ywWvi':function(_0x556f47,_0x4d2562){return _0x556f47(_0x4d2562);},'MwCTQ':function(_0x1f9061,_0x3167a0){return _0x1f9061(_0x3167a0);},'MuITC':function(_0x3608e4,_0x3b2181){return _0x3608e4(_0x3b2181);},'YbQEj':_0x50551e(0x212),'PiNla':function(_0x42a79e,_0x2ff937){return _0x42a79e(_0x2ff937);},'DFnyz':function(_0x1ec286,_0x21a4ec){return _0x1ec286(_0x21a4ec);},'SEyFK':_0x50551e(0x227),'ouOsG':function(_0x2e87aa,_0x46940a){return _0x2e87aa>_0x46940a;}},_0x280734=_0x460fed[_0x50551e(0x1da)](R,_0x473c7b);if(_0x280734[_0x50551e(0x1db)])return console[_0x50551e(0x1e9)]('npx\x20@2api-store/activate\x20reset\x20[options]\x0a\x0a'+H),0x0;_0x460fed['uDvqB'](_0x139e42);const _0x3ca8d2=_0x460fed[_0x50551e(0x217)](_0x3797fa);if(!_0x3ca8d2[_0x50551e(0x1ad)][_0x50551e(0x172)])return _0x460fed[_0x50551e(0x24d)](_0x131ec2,_0x50551e(0x202)+_0x3ca8d2[_0x50551e(0x1ad)]['version']),0x1;var _0x35a3b3;_0x460fed[_0x50551e(0x24d)](_0x154257,_0x460fed[_0x50551e(0x1d2)]);const _0x12dde1=((_0x35a3b3=_0x3ca8d2['os'][_0x50551e(0x1a4)])?C:v)[_0x50551e(0x21e)](_0x57a805=>N(_0x57a805,_0x35a3b3))[_0x50551e(0x1a2)](_0x35a6cc=>{const _0x1646f5=_0x50551e;try{return _0x145f0a[_0x1646f5(0x1f9)](_0x35a6cc);}catch{return!0x1;}});if(_0x460fed[_0x50551e(0x1ca)](0x0,_0x12dde1[_0x50551e(0x19a)]))return _0x460fed['zDyBU'](_0x16122d,_0x50551e(0x1c3)),_0xb27f4f(_0x50551e(0x1df)),0x0;_0x460fed['kjfyz'](_0xb27f4f,_0x460fed[_0x50551e(0x178)]),_0x12dde1[_0x50551e(0x1ce)](_0x238cb5=>_0x10fb6d('\x20\x20-\x20'+_0x2976ea['yellow'](_0x238cb5))),console[_0x50551e(0x1e9)]();const _0x348be2=_0x460fed[_0x50551e(0x221)](K,_0x3ca8d2['os'][_0x50551e(0x1a4)]),_0x3702d5=_0x51f281(_0x348be2),_0x53cb3a=_0x460fed['HEkMd'](_0x3702d5[_0x50551e(0x19a)],0x0);if(_0x53cb3a?_0x59a1c7(_0x50551e(0x222)+_0x3702d5['length']+_0x50551e(0x1e7)):_0x460fed[_0x50551e(0x24d)](_0x16122d,_0x460fed[_0x50551e(0x1bb)]),console[_0x50551e(0x1e9)](),_0x460fed[_0x50551e(0x1da)](_0x154257,_0x50551e(0x1cc)),_0x460fed[_0x50551e(0x24d)](_0x16122d,_0x460fed[_0x50551e(0x20c)]),_0x460fed['saSKE'](_0x16122d,_0x460fed['awoRN']),!await _0x460fed[_0x50551e(0x24a)](_0x54f7b2,'确认\x20reset\x20吗?',{'defaultValue':!0x1}))return _0x10fb6d(_0x460fed[_0x50551e(0x188)]),0x0;if(console[_0x50551e(0x1e9)](),_0x280734[_0x50551e(0x226)])return _0x16122d(_0x460fed['EoYIN']),_0x460fed[_0x50551e(0x20e)](_0xb27f4f,_0x460fed['NWZRv']),_0x12dde1[_0x50551e(0x1ce)](_0x4606aa=>_0x10fb6d(_0x50551e(0x189)+_0x4606aa)),_0x53cb3a&&(_0xb27f4f(_0x460fed['lGRVw']),_0x3702d5[_0x50551e(0x23c)](0x0,0x5)[_0x50551e(0x1ce)](_0x505fad=>_0x10fb6d(_0x50551e(0x1bf)+_0x505fad[_0x50551e(0x1b1)]+'\x20→\x20'+_0x505fad[_0x50551e(0x203)])),_0x460fed[_0x50551e(0x214)](_0x3702d5['length'],0x5)&&_0x460fed[_0x50551e(0x218)](_0x10fb6d,'\x20\x20...(共\x20'+_0x3702d5[_0x50551e(0x19a)]+_0x50551e(0x1a7))),0x0;_0x154257(_0x460fed[_0x50551e(0x1fe)]);const _0x56204e=[];for(const _0x10762a of _0x12dde1)try{const _0x225eaf=_0x10762a+_0x50551e(0x1fa)+new Date()['toISOString']()['replace'](/[:.]/g,'-');_0x145f0a[_0x50551e(0x1be)](_0x10762a,_0x225eaf),_0x56204e[_0x50551e(0x193)](_0x225eaf),_0x460fed[_0x50551e(0x252)](_0x10fb6d,_0x50551e(0x1d8)+_0x10762a+_0x50551e(0x184)+_0x225eaf);}catch(_0x3b8827){_0x131ec2(_0x50551e(0x20d)+_0x10762a+':'+_0x3b8827['message']+'(跳过删除此文件避免误伤)');}_0x56204e[_0x50551e(0x19a)]>0x0&&_0x59a1c7(_0x50551e(0x1de)+_0x56204e[_0x50551e(0x19a)]+'\x20个文件'),console[_0x50551e(0x1e9)](),_0x460fed[_0x50551e(0x1da)](_0x154257,_0x50551e(0x229));const _0x8e2061=[];for(const _0x3aebe9 of _0x12dde1)try{_0x145f0a[_0x50551e(0x17b)](_0x3aebe9),_0x59a1c7(_0x50551e(0x1c7)+_0x3aebe9),_0x8e2061[_0x50551e(0x193)](_0x3aebe9);}catch(_0x5c1e0b){_0x460fed[_0x50551e(0x21d)]===_0x5c1e0b[_0x50551e(0x22b)]||_0x460fed['fARqZ'](_0x460fed['PYFlK'],_0x5c1e0b[_0x50551e(0x22b)])||_0x460fed[_0x50551e(0x1ca)](_0x460fed['SnPwi'],_0x5c1e0b[_0x50551e(0x22b)])?_0x460fed[_0x50551e(0x21c)](_0x131ec2,'权限不足,无法删除\x20'+_0x3aebe9+_0x50551e(0x17a)):_0x460fed[_0x50551e(0x1ea)](_0x131ec2,_0x50551e(0x209)+_0x3aebe9+':'+_0x5c1e0b[_0x50551e(0x1a9)]);}if(console[_0x50551e(0x1e9)](),_0x53cb3a){_0x154257(_0x460fed[_0x50551e(0x174)]);const _0x25a734=new Map();for(const _0x3f16ef of _0x3702d5){const _0x1c95ff=_0x25a734[_0x50551e(0x210)](_0x3f16ef['origPath']);(!_0x1c95ff||_0x460fed[_0x50551e(0x20f)](_0x3f16ef[_0x50551e(0x25c)],_0x1c95ff['mtime']))&&_0x25a734[_0x50551e(0x1c0)](_0x3f16ef[_0x50551e(0x203)],_0x3f16ef);}let _0x55b806=0x0;for(const [_0x556f38,_0x44c6d9]of _0x25a734)try{_0x460fed[_0x50551e(0x24a)](_0x52f4f8,_0x44c6d9[_0x50551e(0x1b1)],_0x556f38),_0x460fed[_0x50551e(0x1fd)](_0x59a1c7,_0x50551e(0x1eb)+_0x44c6d9['bakPath']+_0x50551e(0x184)+_0x556f38),_0x55b806++;}catch(_0x4e20cb){_0x16122d(_0x50551e(0x205)+_0x556f38+':'+_0x4e20cb[_0x50551e(0x1a9)]+_0x50551e(0x1a8));}_0x460fed['HUnYn'](_0x55b806,0x0)&&_0x460fed[_0x50551e(0x1bd)](_0xb27f4f,'从备份恢复\x20'+_0x55b806+_0x50551e(0x1cf)),console[_0x50551e(0x1e9)]();}return _0x460fed[_0x50551e(0x249)](_0x154257,_0x460fed['YbQEj']),_0x460fed['PiNla'](_0x59a1c7,_0x50551e(0x190)+_0x8e2061[_0x50551e(0x19a)]+_0x50551e(0x195)),_0x460fed[_0x50551e(0x1b6)](_0x56204e['length'],0x0)&&(_0xb27f4f('安全备份位置(如需撤销\x20reset,手动恢复这些文件):'),_0x56204e[_0x50551e(0x1ce)](_0x1f476a=>_0x10fb6d(_0x50551e(0x1bf)+_0x1f476a))),_0x460fed[_0x50551e(0x199)](_0xb27f4f,_0x460fed['SEyFK']),_0x460fed[_0x50551e(0x255)](_0x8e2061[_0x50551e(0x19a)],0x0)?0x0:0x1;},'description':_0x541bdf(0x1dd)},'refresh-groups':{'handler':async function(_0x4fd85e){const _0x1db2f6=_0x541bdf,_0x8198f1={'DjmPB':function(_0x50964e,_0x8f5783){return _0x50964e(_0x8f5783);},'zEoyF':function(_0x2bdb75,_0x4f24c5){return _0x2bdb75(_0x4f24c5);},'kKhag':function(_0x3ace05){return _0x3ace05();},'vcQdX':function(_0x543bbd,_0x5e513e){return _0x543bbd(_0x5e513e);},'Wddzh':_0x1db2f6(0x220),'EirbR':function(_0xf1dff0,_0x6edff8){return _0xf1dff0(_0x6edff8);},'CbHpm':function(_0x110798,_0x5f5d63){return _0x110798(_0x5f5d63);},'NUKTh':_0x1db2f6(0x1ba),'uSwHf':function(_0x5bfbb5,_0x26a13f){return _0x5bfbb5(_0x26a13f);},'HjZqm':function(_0x1a1b36,_0xedb6ff){return _0x1a1b36(_0xedb6ff);},'JAhwJ':function(_0x36322d,_0x578479){return _0x36322d===_0x578479;},'zCEYY':'未查询到可用分组','iJWuT':_0x1db2f6(0x17f),'Kidqw':function(_0x732f3,_0x2df891){return _0x732f3(_0x2df891);},'OBwKP':_0x1db2f6(0x1f0),'MuQvV':function(_0x5228d8,_0x37a013){return _0x5228d8+_0x37a013;},'wKdVG':function(_0x139683,_0x391dc7){return _0x139683(_0x391dc7);},'PhKVq':_0x1db2f6(0x1f2),'bWsla':_0x1db2f6(0x1b9),'Wwdoo':function(_0x512ec7,_0xfec5e1){return _0x512ec7(_0xfec5e1);},'xEOwo':'\x20\x20•\x20使用兑换码:重新激活时选目标分组即可'},_0x3995e6=_0x8198f1[_0x1db2f6(0x17c)](R,_0x4fd85e);if(_0x3995e6[_0x1db2f6(0x1db)])return console[_0x1db2f6(0x1e9)](_0x1db2f6(0x231)+H),0x0;_0x8198f1[_0x1db2f6(0x18e)](_0x139e42);const _0x25ea7b=_0x3797fa();if(!_0x25ea7b[_0x1db2f6(0x1ad)][_0x1db2f6(0x172)])return _0x8198f1[_0x1db2f6(0x24e)](_0x131ec2,'需要\x20node\x20>=\x2018,当前\x20'+_0x25ea7b[_0x1db2f6(0x1ad)][_0x1db2f6(0x197)]),0x1;const _0x33f889=_0x3995e6[_0x1db2f6(0x235)]||process[_0x1db2f6(0x1ae)][_0x1db2f6(0x21a)]||_0x8198f1[_0x1db2f6(0x181)];_0x8198f1[_0x1db2f6(0x18d)](_0xb27f4f,'API\x20端点:'+_0x33f889),console[_0x1db2f6(0x1e9)](),_0x8198f1['CbHpm'](_0x154257,_0x8198f1['NUKTh']);let _0x838033=[];try{_0x838033=await _0x8198f1[_0x1db2f6(0x259)](_0x36a3c3,{'apiBase':_0x33f889});}catch(_0x41ee77){return _0x8198f1['HjZqm'](_0x131ec2,_0x1db2f6(0x1e0)+_0x41ee77['message']),0x1;}if(_0x8198f1[_0x1db2f6(0x18b)](0x0,_0x838033[_0x1db2f6(0x19a)]))return _0x16122d(_0x8198f1[_0x1db2f6(0x263)]),_0x8198f1[_0x1db2f6(0x18d)](_0xb27f4f,_0x8198f1[_0x1db2f6(0x1f4)]),_0x8198f1[_0x1db2f6(0x18d)](_0xb27f4f,_0x1db2f6(0x25f)+_0x33f889+_0x1db2f6(0x1a0)),0x0;_0x8198f1['Kidqw'](_0x59a1c7,_0x1db2f6(0x1d6)+_0x838033[_0x1db2f6(0x19a)]+'\x20个可用分组'),console['log'](),_0x8198f1[_0x1db2f6(0x18f)](_0x154257,_0x8198f1[_0x1db2f6(0x250)]);const _0x765333=Math[_0x1db2f6(0x24f)](0x4,..._0x838033['map'](_0x266ee5=>String(_0x266ee5['id']??'')[_0x1db2f6(0x19a)])),_0x4aca32=Math['max'](0x6,..._0x838033[_0x1db2f6(0x21e)](_0x59fd5c=>String(_0x59fd5c[_0x1db2f6(0x233)]??'')[_0x1db2f6(0x19a)])),_0x5b87c5='\x20\x20'+'ID'[_0x1db2f6(0x22c)](_0x765333)+'\x20\x20'+'名称'['padEnd'](_0x4aca32)+_0x1db2f6(0x1fb);return _0x8198f1[_0x1db2f6(0x24e)](_0x10fb6d,_0x2976ea[_0x1db2f6(0x262)][_0x1db2f6(0x17e)](_0x5b87c5)),_0x10fb6d(_0x2976ea[_0x1db2f6(0x23e)](_0x8198f1['MuQvV']('\x20\x20','─'[_0x1db2f6(0x248)](_0x8198f1['MuQvV'](_0x8198f1[_0x1db2f6(0x21b)](_0x765333,_0x4aca32),0xf))))),_0x838033[_0x1db2f6(0x1ce)]((_0x1486ce,_0x562694)=>{const _0x3a35c5=_0x1db2f6,_0x46829d=_0x8198f1[_0x3a35c5(0x18f)](String,_0x1486ce['id']??'')[_0x3a35c5(0x22c)](_0x765333),_0x497769=String(_0x1486ce['name']??'')[_0x3a35c5(0x22c)](_0x4aca32),_0x1f4b81='\x20\x20'+_0x2976ea['yellow'](_0x46829d)+'\x20\x20'+_0x2976ea[_0x3a35c5(0x17d)](_0x497769);_0x10fb6d(_0x1f4b81);}),console['log'](),_0x8198f1[_0x1db2f6(0x238)](_0xb27f4f,_0x8198f1['PhKVq']),_0x8198f1[_0x1db2f6(0x237)](_0x10fb6d,_0x8198f1[_0x1db2f6(0x1c1)]),_0x8198f1[_0x1db2f6(0x18a)](_0x10fb6d,_0x8198f1[_0x1db2f6(0x179)]),_0x8198f1[_0x1db2f6(0x18a)](_0xb27f4f,_0x1db2f6(0x1e5)),0x0;},'description':'查看可用分组(不改配置)'}};export const SUBCOMMAND_NAMES=new Set(Object[_0x541bdf(0x1cd)](SUBCOMMANDS));export{H as SUB_HELP};function _0x3845(_0x5ea60b,_0x4e3509){_0x5ea60b=_0x5ea60b-0x171;const _0x2af347=_0x2af3();let _0x384555=_0x2af347[_0x5ea60b];return _0x384555;}function _0x2af3(){const _0x40788b=['获取可用分组','WEROt','%userprofile%\x5c.codex','MwCTQ','copyFileSync','\x20\x20-\x20','set','bWsla','安全备份:','未发现\x202api.store\x20写入的配置文件(可能已\x20reset\x20或从未激活过)','145519ZMjbyc','getMonth','model:','已删除:','getDate','%userprofile%\x5c.claude\x5csettings.json','fARqZ','78QqfIRj','确认操作','keys','forEach','\x20个文件','replace','WZmss','PRjOa','安全备份当前文件','sort','已取消','查询到\x20','NRcds','\x20\x20✓\x20','【试运行模式\x20--dry-run】不会真实恢复文件','kjfyz','help','~/.codex','恢复官方默认(删\x202api.store\x20配置并从备份恢复)','已安全备份\x20','如需从备份恢复,请运行:npx\x20@2api-store/activate\x20restore','获取分组失败:','fckzF','model','提示:只有运行过\x20npx\x20@2api-store/activate\x20后才会产生备份文件','Claude\x20Code','(本命令仅展示分组,不修改\x20API\x20Key\x20或配置文件)','bgtsH','\x20个备份文件(reset\x20后将尝试恢复每个配置的最新备份)','uckDY','log','zWTcI','已恢复:','%userprofile%\x5c.codex\x5cconfig.toml','TdSQk','Lqhti','roojv','分组列表','WyYKI','💡\x20如需切换分组:','~/.codex/auth.json','iJWuT','scIyW','[试运行]\x20不真实恢复','扫描目录:','bboTZ','existsSync','.bak.reset.','\x20\x20说明','aDSrE','ywWvi','OfGhD','find','group','getFullYear','需要\x20node\x20>=\x2018,当前\x20','origPath','qoiOo','恢复失败\x20','sEOpK','EACCES','选择应用(回车=第一个)','删除失败\x20','116NhrkCO','XnhAe','tsKYS','安全备份失败\x20','ortof','HUnYn','get','找到\x20','reset\x20报告','~/.gemini','oLbHf','1592TeTHnW','25529NbNGjN','KOoLd','fLOAr','2cLnudH','ACTIVATE_API_BASE','MuQvV','wuhqx','zCxfY','map','110PxCRmq','https://2api.store','oMbyQ','发现\x20','\x20\x20\x20删除前会再备份一次(.bak.reset.<时间戳>),可手动恢复。','Gemini\x20CLI','从备份恢复配置','dryRun','下一步:如需重新激活,运行\x20npx\x20@2api-store/activate','USERPROFILE','删除\x202api.store\x20配置','efMyd','code','padEnd','选择恢复时间点(','KQdzq','tDkbQ','--api-base','npx\x20@2api-store/activate\x20refresh-groups\x20[options]\x0a\x0a','~/.claude/settings.json','name','split','apiBase','EROFS','Kidqw','wKdVG','utf8','basename','CoYNd','slice','rtlML','dim','SjgfL','toISOString','getMinutes','\x20←\x20','dir','选择时间点(回车=最新)','sk-…','xhVLV','并从最新备份恢复:','repeat','MuITC','keryX','--dry-run','HOME','rdLKh','vcQdX','max','OBwKP','共恢复\x20','XWovl','%userprofile%\x5c.claude','未找到任何备份文件(reset\x20后这些文件将直接删除,无备份可恢复)','ouOsG','未选择时间点','\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\x0a所有子命令都支持\x20--api-base\x20<url>\x20覆盖端点,restore/reset\x20支持\x20--dry-run。\x0a','【试运行模式\x20--dry-run】不会真实删除/恢复文件','uSwHf','HxAnS','includes','mtime','JVesy','5823fevZlT','当前端点:','JuoBW','http','bold','zCEYY','HlWRm','supported','getSeconds','ASjzg','match','从最新备份恢复','Yvcvp','euokp','xEOwo','(请用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)','unlinkSync','zEoyF','green','cyan','可能原因:服务端未配置分组\x20/\x20网络错误\x20/\x20端点错误','5284884WoJIjC','Wddzh','ocEKJ','无可恢复的备份','\x20→\x20','startsWith','\x20个备份文件','\x20个文件):','zoPjt','\x20\x20-\x20删除\x20','Wwdoo','JAhwJ','--help','EirbR','kKhag','DjmPB','已删除\x20','198451Eevwat','dummy','push','\x20文件:','\x20个\x202api.store\x20配置文件','hZYNa','version','TcXxp','DFnyz','length','values','未选择应用','定位\x202api.store\x20写入的配置','未找到任何备份文件(.bak.*)','5988QEGvyv','(可通过\x20--api-base\x20或\x20ACTIVATE_API_BASE\x20覆盖)','RGTfb','filter','~/.claude','isWindows','UIQKt','yellow','\x20个备份)','(文件已删除,未恢复)','message','957115didKRz','hEQUi','gRVps','node','env','relative','%userprofile%\x5c.gemini\x5csettings.json','bakPath','RQcdh','将执行:','~/.codex/config.toml','join','HEkMd','bFMsj','key:…','\x20\x20•\x20已有\x20API\x20Key\x20绑组:登录管理后台修改,或重新激活(npx\x20@2api-store/activate)'];_0x2af3=function(){return _0x40788b;};return _0x2af3();}
|
|
1
|
+
const _0x14467b=_0x8873;(function(_0x4f6526,_0x2eb365){const _0x6e2156=_0x8873,_0x4e11da=_0x4f6526();while(!![]){try{const _0x2219fa=parseInt(_0x6e2156(0x213))/0x1+-parseInt(_0x6e2156(0x27d))/0x2*(-parseInt(_0x6e2156(0x184))/0x3)+parseInt(_0x6e2156(0x277))/0x4+parseInt(_0x6e2156(0x1ff))/0x5+-parseInt(_0x6e2156(0x25e))/0x6*(-parseInt(_0x6e2156(0x245))/0x7)+parseInt(_0x6e2156(0x1a3))/0x8*(-parseInt(_0x6e2156(0x1fe))/0x9)+-parseInt(_0x6e2156(0x223))/0xa*(parseInt(_0x6e2156(0x1d2))/0xb);if(_0x2219fa===_0x2eb365)break;else _0x4e11da['push'](_0x4e11da['shift']());}catch(_0x48f25c){_0x4e11da['push'](_0x4e11da['shift']());}}}(_0x4e67,0xd68de));import _0x178e02 from'node:fs';import _0x2a326f from'node:path';import _0x31d95c from'node:os';import{unzipSync as _0x5b8abe}from'fflate';import{backupFile as _0xdaa780,listBackups as _0x167215,restoreBackup as _0x49bc65}from'./backup.mjs';import{cliActivate as _0x3b404b,listGroups as _0x403c03}from'./api.mjs';function _0x4e67(){const _0x296c0b=['iHrDl','%userprofile%\x5c.claude\x5csettings.json','EACCES','rWzqT','⚠️\x20这是破坏性操作:将删除上述配置文件并尝试从备份恢复。','vKjoa','Claude\x20Code','padEnd','dirname','includes','需要\x20node\x20>=\x2018,当前\x20','RxrHL','Logiu','isArray','获取可用分组','forEach','QZoKg','has','slice','NAxPC','可能原因:服务端未配置分组\x20/\x20网络错误\x20/\x20端点错误','%userprofile%\x5c.gemini','SHKYA','isWindows','fail','zdTlJ','请把\x20zip\x20压缩包发给客服排障(包内已脱敏,不含明文\x20key)','group','恢复官方默认(删\x202api.store\x20配置并从备份恢复)','vcoQy','lhCkh','未查询到可用分组','MDYuS','%userprofile%\x5c.gemini\x5csettings.json','诊断失败:','dDFQL','key:…','%userprofile%\x5c.codex\x5cconfig.toml','\x20文件:','VuYWb','node','79849QpKORz','getFullYear','status','(跳过删除此文件避免误伤)','MlwTd','toUpperCase','\x20\x20...(共\x20','\x20\x20•\x20使用兑换码:重新激活时选目标分组即可','readFileSync','\x20\x20说明','LLZOx','log','utf8','bCgKF','Gemini\x20CLI','XgxOU','skip-cli-tests','诊断连接并生成日志压缩包(发给客服排障)','已恢复:','【试运行模式\x20--dry-run】不会真实删除/恢复文件','gLJql','keys','total_ms','ACTIVATE_API_BASE','wsmlC','toOnx','DxkxZ','get','UuvOz','权限不足,无法删除\x20','IAKsO','MQUkV','string','cyan','duration_ms','sk-…','sort','xsvgD','match','dryRun','bNORP','.bak.reset.','将处理以下文件:','ttmOU','765459IKUrMM','4038055MQRXCa','HvfAp','~/.claude','lVQnX','cuKva','%userprofile%\x5c.codex\x5cauth.json','GfPtT','/cli-tests.jsonl','分组列表','定位\x202api.store\x20写入的配置','未发现\x202api.store\x20写入的配置文件(可能已\x20reset\x20或从未激活过)','无\x20HTTP\x20测试记录','从备份恢复\x20','并从最新备份恢复:','replace','将恢复\x20','find','mtime','endsWith','NioAw','57231nudMAI','未找到任何备份文件(reset\x20后这些文件将直接删除,无备份可恢复)','选择应用(回车=第一个)','Snlcu','fUYIv','split','parse','下一步:如需重新激活,运行\x20npx\x20@2api-store/activate','cfXaF','FZXUr','dry-run','已取消','ZOYOY','~/.claude/settings.json','查询到\x20','values','1930MQcHBG','sYFqO','rPRdk','--help','vCLmN','cli','name','existsSync','API\x20端点:','\x20\x20•\x20已有\x20API\x20Key\x20绑组:登录管理后台修改,或重新激活(npx\x20@2api-store/activate)','max','npx\x20@2api-store/activate\x20reset\x20[options]\x0a\x0a','JkSxG','\x20个\x202api.store\x20配置文件','已删除\x20','tMzGU','trim','copyFileSync','getMinutes','(可通过\x20--api-base\x20或\x20ACTIVATE_API_BASE\x20覆盖)','~/.gemini/settings.json','从最新备份恢复','已删除:','\x20\x20✓\x20','nqKIT','XmpLt','IToFJ','DjxNg','\x20|\x20','iZsfQ','QhVcV','uvBvs','IMrVn','npx\x20@2api-store/activate\x20diagnose\x20[options]\x0a\x0a','5397LloCcB','set','sdpkg','MbNzV','USERPROFILE','未找到任何备份文件(.bak.*)','ttfb_ms','💡\x20如需切换分组:','找到\x20','\x20\x20-\x20','\x20←\x20','ERR','--yes','http_tests','--dry-run','\x20个可用分组','HQnze','yellow','npx\x20@2api-store/activate\x20refresh-groups\x20[options]\x0a\x0a','%userprofile%\x5c.claude','inowj','EoHmr','诊断包已生成:','origPath','getMonth','3186rgElQo','push','安全备份当前文件','ccIdM','恢复失败:','GqXcF','未选择应用','pVMzf','sVlBV','选择要恢复的应用','model','ZMaIE','扫描目录:','YXYPi','todig','help','verdict','将对每个测试模型发送真实计费的小请求(max_tokens=1,每模型约几分钱),用于连通性实测','\x20个文件','WwSOH','from','getHours','jHXmG','skipCliTests','删除\x202api.store\x20配置','4072344tUVClu','supported','relative','EROFS','dqmYg','gOELy','180LKmFDJ','code','length','qSQPv','yes','tUVUT','\x20个备份文件','未选择时间点','选择时间点(回车=最新)','\x20个备份)','eOWAG','myNtm','EPERM','Fvpgg','env','--api-base','ThuUh','~/.gemini','VBMPA','ms/','获取分组失败:','~/.codex/config.toml','nEeMX','PAmXP','Cqqwl','map','basename','unlinkSync','查看可用分组(不改配置)','reset\x20报告','无可恢复的备份','DkLFe','将执行:','xPLln','slow','MBGVZ','~/.codex','version','\x20个文件):','ARoLR','JLnBk','共恢复\x20','%userprofile%\x5c.codex','apiBase','dOdij','Lzmzg','rAOEH','XjWZT','\x20→\x20','50613GIhKwS','wqthn','HOME','startsWith','已安全备份\x20','从备份恢复配置','zipPath','nTRBt','bakPath','MxqRr','MChhj','message','getSeconds','bold','join','getDate','toISOString','green','(请用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)','qrCnj','ZBQbX','\x20\x20exit\x20','out','dim','TVQxc','NSeEe','如需从备份恢复,请运行:npx\x20@2api-store/activate\x20restore','boruH','BBgsi','\x20\x20request_id','~/.codex/auth.json','144JgUsJp','mKzgM','model:','KEDRk','[试运行]\x20不真实恢复','安全备份:'];_0x4e67=function(){return _0x296c0b;};return _0x4e67();}import{writeFileWithPermission as _0x2975d6,PermissionDeniedError as _0x4ba144}from'./write.mjs';import{renderContent as _0x2d9268,expandPath as _0x5b5618,listModels as _0x20ebc7}from'./render.mjs';import{getCliMeta as _0x5ee762,isDefaultSelected as _0x25dba2}from'./platforms.mjs';import{detectAll as _0x375296}from'./detect.mjs';import{runDiagnose as _0x58947d}from'./diagnose.mjs';import{ask as _0x30a1d3,askSecret as _0x35231d,multiSelect as _0x47b223,select as _0x4929aa,confirm as _0x34f933,closePrompt as _0x3ced5f}from'./prompt.mjs';import{banner as _0x5e198b,ok as _0x3e1f02,fail as _0x4b9df4,warn as _0x183042,info as _0xb8bd2c,step as _0x24ea79,plain as _0x3861df,guide as _0x12c245,chalk as _0x2ee820}from'./ui.mjs';const C='https://2api.store',R=[_0x14467b(0x292),_0x14467b(0x1a2),_0x14467b(0x220),_0x14467b(0x237)],M=[_0x14467b(0x1ce),_0x14467b(0x204),_0x14467b(0x1aa),_0x14467b(0x1ca)],N=[_0x14467b(0x2a1),_0x14467b(0x201),_0x14467b(0x28e)],B=[_0x14467b(0x17d),_0x14467b(0x258),_0x14467b(0x1be)],H=new Set([_0x14467b(0x21d),_0x14467b(0x1e2)]);function K(_0x374a23){const _0x348009=_0x14467b;return _0x374a23[_0x348009(0x20d)](/-([a-z])/g,(_0x61f4d3,_0x56356e)=>_0x56356e[_0x348009(0x1d7)]());}function U(_0x24d0c9){const _0x42b780=_0x14467b,_0x5bf107={'qrCnj':function(_0x242569,_0x1fc1c4){return _0x242569<_0x1fc1c4;},'uvBvs':function(_0x3186f8,_0x46d51e){return _0x3186f8===_0x46d51e;},'XmpLt':_0x42b780(0x253),'QhVcV':function(_0x4e1fff,_0x31e7d9){return _0x4e1fff===_0x31e7d9;},'wqthn':_0x42b780(0x251),'boruH':function(_0x4f9cd8,_0x4e11f7){return _0x4f9cd8===_0x4e11f7;},'tmyIt':_0x42b780(0x28c),'inowj':function(_0x593c03,_0x14864f){return _0x593c03(_0x14864f);}},_0xa5e7a4={'dryRun':!0x1,'_':[]};for(let _0x2c4c0e=0x0;_0x5bf107[_0x42b780(0x197)](_0x2c4c0e,_0x24d0c9[_0x42b780(0x27f)]);_0x2c4c0e++){const _0x3d96c2=_0x24d0c9[_0x2c4c0e];if(_0x5bf107['uvBvs'](_0x5bf107[_0x42b780(0x23c)],_0x3d96c2)||_0x5bf107[_0x42b780(0x241)]('-n',_0x3d96c2))_0xa5e7a4[_0x42b780(0x1f9)]=!0x0;else{if(_0x5bf107['QhVcV'](_0x5bf107[_0x42b780(0x185)],_0x3d96c2)||_0x5bf107[_0x42b780(0x19f)]('-y',_0x3d96c2))_0xa5e7a4['yes']=!0x0;else{if(_0x5bf107[_0x42b780(0x241)](_0x5bf107['tmyIt'],_0x3d96c2))_0xa5e7a4[_0x42b780(0x17e)]=_0x24d0c9[++_0x2c4c0e];else{if(_0x5bf107[_0x42b780(0x242)](_0x42b780(0x226),_0x3d96c2)||_0x5bf107[_0x42b780(0x19f)]('-h',_0x3d96c2))_0xa5e7a4[_0x42b780(0x26d)]=!0x0;else{if(_0x3d96c2[_0x42b780(0x187)]('--')&&_0x3d96c2['includes']('=')){const [_0x51ff97,_0x145864]=_0x3d96c2[_0x42b780(0x1bb)](0x2)[_0x42b780(0x218)](/=(.*)/,0x2);H[_0x42b780(0x1ba)](_0x51ff97)?_0xa5e7a4[_0x5bf107[_0x42b780(0x259)](K,_0x51ff97)]=!0x0:_0xa5e7a4[_0x51ff97]=_0x145864;}else{if(_0x3d96c2[_0x42b780(0x187)]('--')){const _0x337dfc=_0x3d96c2[_0x42b780(0x20d)](/^--/,'');H[_0x42b780(0x1ba)](_0x337dfc)?_0xa5e7a4[_0x5bf107[_0x42b780(0x259)](K,_0x337dfc)]=!0x0:_0xa5e7a4[_0x337dfc]=_0x24d0c9[++_0x2c4c0e];}else _0xa5e7a4['_'][_0x42b780(0x25f)](_0x3d96c2);}}}}}}return _0xa5e7a4;}function D(_0x5f0ff1,_0x3e8ac7){const _0x5cc410=_0x14467b,_0x3cf1cb={'bCgKF':function(_0x3e83f3,_0x44e407,_0x5a14d4){return _0x3e83f3(_0x44e407,_0x5a14d4);}};return _0x3cf1cb[_0x5cc410(0x1df)](_0x5b5618,_0x5f0ff1,{'isWindows':_0x3e8ac7});}function W(_0x3a7e23){const _0x425da3=_0x14467b;return(_0x3a7e23?B:N)[_0x425da3(0x296)](_0x33cd68=>D(_0x33cd68,_0x3a7e23));}const z='\x0a子命令:\x0a\x20\x20restore\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20从备份恢复(扫描\x20~/.codex\x20/\x20~/.claude\x20/\x20~/.gemini\x20下的\x20.bak.*\x20文件)\x0a\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20恢复官方默认(删\x202api.store\x20写入的配置,并从最新备份恢复)\x0a\x20\x20refresh-groups\x20\x20\x20刷新分组列表(只展示,不改\x20key/配置)\x0a\x20\x20diagnose\x20\x20\x20\x20\x20\x20\x20\x20\x20诊断连接并生成日志压缩包(环境收集+渠道实测+CLI实测,发给客服排障)\x0a\x0a所有子命令都支持\x20--api-base\x20<url>\x20覆盖端点,restore/reset\x20支持\x20--dry-run。\x0a'[_0x14467b(0x233)]();function F(_0x39af14){const _0xd3add6=_0x14467b,_0x2638dc={'yWKkr':function(_0x5e3cf9,_0x5cd2fe){return _0x5e3cf9<_0x5cd2fe;},'xAiMB':function(_0x397160,_0x4f4289){return _0x397160!=_0x4f4289;},'MQOgg':function(_0x19d537,_0x463e21){return _0x19d537>_0x463e21;},'sdpkg':'slow','EoHmr':_0xd3add6(0x1c1)};return _0x39af14[_0xd3add6(0x1d4)]>=0xc8&&_0x2638dc['yWKkr'](_0x39af14['status'],0x12c)?_0x2638dc['xAiMB'](null,_0x39af14[_0xd3add6(0x24b)])&&_0x2638dc['MQOgg'](_0x39af14[_0xd3add6(0x24b)],0x2710)?_0x2638dc[_0xd3add6(0x247)]:'ok':_0x2638dc[_0xd3add6(0x25a)];}function _0x8873(_0x31e5bc,_0x4890f0){_0x31e5bc=_0x31e5bc-0x178;const _0x4e67c8=_0x4e67();let _0x887319=_0x4e67c8[_0x31e5bc];return _0x887319;}function Y({zipPath:_0x317faa,summary:_0x33315c}){const _0x4cff57=_0x14467b,_0x109134={'DkLFe':function(_0x20be85,_0x14d0f1){return _0x20be85(_0x14d0f1);},'JLnBk':function(_0x4f252c,_0x244b51){return _0x4f252c(_0x244b51);},'GfPtT':function(_0x2d5239,_0x1f4f13){return _0x2d5239>_0x1f4f13;},'Asjtw':'ttfb/总延迟','jHXmG':function(_0x234aec,_0x22c237){return _0x234aec(_0x22c237);},'RxrHL':function(_0x41e532,_0x181b1c){return _0x41e532===_0x181b1c;},'QZoKg':function(_0x242476,_0x2a5e22){return _0x242476===_0x2a5e22;},'TVQxc':_0x4cff57(0x29f),'KEDRk':function(_0x3fccd6,_0xda621a){return _0x3fccd6(_0xda621a);},'HQnze':_0x4cff57(0x250),'GqXcF':_0x4cff57(0x20a),'NAxPC':function(_0x292e06,_0x78940c){return _0x292e06(_0x78940c);},'FZXUr':function(_0x28b5d7,_0x4b147d){return _0x28b5d7!=_0x4b147d;}};console[_0x4cff57(0x1dd)](),_0x109134[_0x4cff57(0x17b)](_0x24ea79,'诊断摘要');const _0x11164c=Array[_0x4cff57(0x1b6)](_0x33315c[_0x4cff57(0x252)])?_0x33315c[_0x4cff57(0x252)]:[];if(_0x109134[_0x4cff57(0x205)](_0x11164c[_0x4cff57(0x27f)],0x0)){const _0x16ab8d=Math['max'](0x6,..._0x11164c[_0x4cff57(0x296)](_0x3947fb=>String(_0x3947fb['model'])[_0x4cff57(0x27f)])),_0x320e72=Math['max'](0x6,..._0x11164c[_0x4cff57(0x296)](_0x14492c=>String(_0x14492c[_0x4cff57(0x26e)]??'-')[_0x4cff57(0x27f)]));_0x109134[_0x4cff57(0x17b)](_0x3861df,_0x2ee820['bold']['cyan']('\x20\x20'+'模型'[_0x4cff57(0x1b0)](_0x16ab8d)+'\x20\x20'+'判定'['padEnd'](_0x320e72)+'\x20\x20'+'状态'[_0x4cff57(0x1b0)](0x6)+'\x20\x20'+_0x109134['Asjtw'][_0x4cff57(0x1b0)](0x12)+_0x4cff57(0x1a1)));for(const _0x199ece of _0x11164c){const _0xb65fa3=_0x109134[_0x4cff57(0x274)](F,_0x199ece),_0x1309b9=String(_0x199ece['verdict']??'-')[_0x4cff57(0x1b0)](_0x320e72),_0x350aee=_0x109134[_0x4cff57(0x1b4)]('ok',_0xb65fa3)?_0x2ee820[_0x4cff57(0x195)](_0x1309b9):_0x109134[_0x4cff57(0x1b9)](_0x109134[_0x4cff57(0x19c)],_0xb65fa3)?_0x2ee820[_0x4cff57(0x256)](_0x1309b9):_0x2ee820['red'](_0x1309b9),_0x5c641a=(_0x199ece['ttfb_ms']??'-')+_0x4cff57(0x290)+(_0x199ece[_0x4cff57(0x1e8)]??'-')+'ms';_0x109134[_0x4cff57(0x1a6)](_0x3861df,'\x20\x20'+_0x109134[_0x4cff57(0x17b)](String,_0x199ece['model'])['padEnd'](_0x16ab8d)+'\x20\x20'+_0x350aee+'\x20\x20'+String(_0x199ece[_0x4cff57(0x1d4)]??_0x109134[_0x4cff57(0x255)])[_0x4cff57(0x1b0)](0x6)+'\x20\x20'+_0x5c641a[_0x4cff57(0x1b0)](0x12)+'\x20\x20'+(_0x199ece['request_id']??'-'));}}else _0x109134[_0x4cff57(0x17b)](_0xb8bd2c,_0x109134[_0x4cff57(0x263)]);const _0x52ee79=Array[_0x4cff57(0x1b6)](_0x33315c['cli_tests'])?_0x33315c['cli_tests']:[];if(_0x109134[_0x4cff57(0x205)](_0x52ee79[_0x4cff57(0x27f)],0x0)){const _0x3b5085=function(_0x4dfabe){const _0x3e0376=_0x4cff57,_0x46691a={};try{const _0x84abf0=_0x109134[_0x3e0376(0x29c)](_0x5b8abe,new Uint8Array(_0x178e02[_0x3e0376(0x1da)](_0x4dfabe))),_0x5b7cae=Object[_0x3e0376(0x1e7)](_0x84abf0)[_0x3e0376(0x20f)](_0x41601a=>_0x41601a[_0x3e0376(0x211)](_0x3e0376(0x206)));if(!_0x5b7cae)return _0x46691a;for(const _0x18decc of Buffer[_0x3e0376(0x272)](_0x84abf0[_0x5b7cae])['toString'](_0x3e0376(0x1de))['split']('\x0a'))if(_0x18decc[_0x3e0376(0x233)]())try{const _0x174a22=JSON[_0x3e0376(0x219)](_0x18decc);_0x174a22&&_0x174a22['cli']&&(_0x46691a[_0x174a22[_0x3e0376(0x228)]]=_0x174a22[_0x3e0376(0x1f4)]);}catch{}}catch{}return _0x46691a;}(_0x317faa),_0x1090d0=Math[_0x4cff57(0x22d)](0x6,..._0x52ee79[_0x4cff57(0x296)](_0x5a9a97=>String(_0x5a9a97['cli'])[_0x4cff57(0x27f)]));for(const _0x204c2e of _0x52ee79){const _0x2c3f57=_0x109134[_0x4cff57(0x1bc)](String,_0x204c2e[_0x4cff57(0x26e)]??'-'),_0x405b9b=_0x109134[_0x4cff57(0x1b4)]('ok',_0x2c3f57)?_0x2ee820[_0x4cff57(0x195)](_0x2c3f57):_0x2ee820['red'](_0x2c3f57),_0x5c39de=_0x109134[_0x4cff57(0x21c)](null,_0x3b5085[_0x204c2e[_0x4cff57(0x228)]])?_0x3b5085[_0x204c2e[_0x4cff57(0x228)]]+'ms':'-';_0x109134['KEDRk'](_0x3861df,'\x20\x20'+_0x109134[_0x4cff57(0x274)](String,_0x204c2e[_0x4cff57(0x228)])[_0x4cff57(0x1b0)](_0x1090d0)+'\x20\x20'+_0x405b9b[_0x4cff57(0x1b0)](0x6)+_0x4cff57(0x199)+(_0x204c2e['exit_code']??_0x4cff57(0x250))+'\x20\x20'+_0x5c39de);}}}export const SUBCOMMANDS={'restore':{'handler':async function(_0x5793c3){const _0x488961=_0x14467b,_0x3cd903={'pVMzf':function(_0x2f715a,_0x32de2b){return _0x2f715a(_0x32de2b);},'fUYIv':'dummy','rAOEH':function(_0x4a8f63,_0x14e2fb){return _0x4a8f63(_0x14e2fb);},'UuvOz':function(_0x5c778a,_0x499c9f){return _0x5c778a>_0x499c9f;},'jxmSW':_0x488961(0x23f),'ccIdM':function(_0x16601d){return _0x16601d();},'DjxNg':function(_0x3872eb,_0x19a9b5){return _0x3872eb(_0x19a9b5);},'JkSxG':function(_0x431d5a,_0x4a7347){return _0x431d5a(_0x4a7347);},'rPRdk':'扫描备份文件','qSQPv':function(_0x24d6f9,_0x1a2c9b){return _0x24d6f9(_0x1a2c9b);},'HhsKh':'【试运行模式\x20--dry-run】不会真实恢复文件','tMzGU':function(_0x353e04,_0x563f92){return _0x353e04===_0x563f92;},'LLZOx':function(_0x33f90b,_0x487db8){return _0x33f90b(_0x487db8);},'gcmtQ':_0x488961(0x1e0),'ZOYOY':function(_0x41cd41,_0x320737){return _0x41cd41(_0x320737);},'CwRMb':function(_0x240d2a,_0x336abf){return _0x240d2a(_0x336abf);},'vKjoa':_0x488961(0x29b),'GHRMt':function(_0x2258b3,_0xcf8611){return _0x2258b3(_0xcf8611);},'NioAw':_0x488961(0x267),'IToFJ':function(_0x2691d5,_0x2d02ef,_0x435bba,_0x3850d3){return _0x2691d5(_0x2d02ef,_0x435bba,_0x3850d3);},'ThuUh':_0x488961(0x215),'mKzgM':function(_0x4d7d5c,_0x3550a2){return _0x4d7d5c>=_0x3550a2;},'NSeEe':_0x488961(0x264),'MDYuS':function(_0x4270d8,_0x4b04d4){return _0x4270d8<_0x4b04d4;},'IAKsO':function(_0x9f793c,_0x2453bf){return _0x9f793c>=_0x2453bf;},'vcoQy':function(_0x3efe94,_0x110d07){return _0x3efe94(_0x110d07);},'Cqqwl':_0x488961(0x284),'VuYWb':_0x488961(0x1a7),'Logiu':function(_0x17b454,_0xe1a508){return _0x17b454(_0xe1a508);},'ARoLR':function(_0x342420,_0x187d51){return _0x342420(_0x187d51);}},_0x1c19a8=_0x3cd903['pVMzf'](U,_0x5793c3);if(_0x1c19a8['help'])return console['log']('npx\x20@2api-store/activate\x20restore\x20[options]\x0a\x0a'+z),0x0;_0x5e198b();const _0x501cf3=_0x3cd903[_0x488961(0x261)](_0x375296);if(!_0x501cf3[_0x488961(0x1d1)][_0x488961(0x278)])return _0x3cd903[_0x488961(0x23e)](_0x4b9df4,_0x488961(0x1b3)+_0x501cf3[_0x488961(0x1d1)][_0x488961(0x178)]),0x1;_0x3cd903[_0x488961(0x22f)](_0x24ea79,_0x3cd903[_0x488961(0x225)]);const _0x4777fa=_0x3cd903['pVMzf'](W,_0x501cf3['os'][_0x488961(0x1c0)]);_0x1c19a8[_0x488961(0x1f9)]&&_0x3cd903['qSQPv'](_0x183042,_0x3cd903['HhsKh']),_0x3cd903[_0x488961(0x280)](_0xb8bd2c,_0x488961(0x26a)+_0x4777fa[_0x488961(0x192)](',\x20'));const _0x13eab6=_0x3cd903[_0x488961(0x181)](_0x167215,_0x4777fa);if(_0x3cd903['tMzGU'](0x0,_0x13eab6[_0x488961(0x27f)]))return _0x3cd903['qSQPv'](_0xb8bd2c,_0x488961(0x24a)),_0x3cd903[_0x488961(0x22f)](_0xb8bd2c,'提示:只有运行过\x20npx\x20@2api-store/activate\x20后才会产生备份文件'),0x0;_0x3cd903['LLZOx'](_0x3e1f02,_0x488961(0x24d)+_0x13eab6[_0x488961(0x27f)]+_0x488961(0x283));const _0x14fed5={'.codex':'Codex\x20CLI','.claude':_0x488961(0x1af),'.gemini':_0x3cd903['gcmtQ']};function _0x5692fe(_0x14a4d3){const _0x3adbe2=_0x488961,_0xd88c69=process[_0x3adbe2(0x28b)][_0x3adbe2(0x186)]||process[_0x3adbe2(0x28b)][_0x3adbe2(0x249)]||'',_0x4fc9af=_0x2a326f[_0x3adbe2(0x279)](_0xd88c69,_0x14a4d3)['replace'](/\\/g,'/')[_0x3adbe2(0x218)]('/')[0x0];return _0x14fed5[_0x4fc9af]||_0x4fc9af;}function _0x44aec7(_0x32ac83){const _0x2395ba=_0x488961;return process[_0x2395ba(0x28b)][_0x2395ba(0x186)]||process[_0x2395ba(0x28b)][_0x2395ba(0x249)],_0x2a326f[_0x2395ba(0x1b1)](_0x32ac83);}const _0x12c22a={};for(const _0x2f0531 of _0x13eab6){const _0x345114=_0x3cd903[_0x488961(0x21f)](_0x44aec7,_0x2f0531[_0x488961(0x25c)]);_0x12c22a[_0x345114]||(_0x12c22a[_0x345114]=[]),_0x12c22a[_0x345114]['push'](_0x2f0531);}const _0x23072b=Object['keys'](_0x12c22a);if(_0x3cd903[_0x488961(0x232)](0x0,_0x23072b[_0x488961(0x27f)]))return _0x3cd903['CwRMb'](_0xb8bd2c,_0x3cd903[_0x488961(0x1ae)]),0x0;console['log'](),_0x3cd903['GHRMt'](_0x24ea79,_0x3cd903[_0x488961(0x212)]);const _0x1ec464=_0x23072b[_0x488961(0x296)](_0x379045=>{const _0x6c0073=_0x488961,_0x7381e3=_0x3cd903[_0x6c0073(0x265)](_0x5692fe,_0x2a326f['join'](_0x379045,_0x3cd903[_0x6c0073(0x217)])),_0x4fd3d3=_0x12c22a[_0x379045][_0x6c0073(0x27f)];return{'label':_0x2ee820[_0x6c0073(0x1f3)](_0x7381e3)+'('+_0x4fd3d3+_0x6c0073(0x286),'dir':_0x379045};}),_0x5469ad=await _0x3cd903[_0x488961(0x23d)](_0x4929aa,_0x3cd903[_0x488961(0x28d)],_0x1ec464,{'defaultIndex':0x0});if(_0x5469ad<0x0||_0x3cd903[_0x488961(0x1a4)](_0x5469ad,_0x1ec464[_0x488961(0x27f)]))return _0x4b9df4(_0x3cd903[_0x488961(0x19d)]),0x1;const _0x50cc00=_0x1ec464[_0x5469ad]['dir'],_0xa7efe7=_0x5692fe(_0x2a326f['join'](_0x50cc00,_0x3cd903[_0x488961(0x217)])),_0x36013d=_0x12c22a[_0x50cc00][_0x488961(0x1f6)]((_0x1dea72,_0x347868)=>_0x347868['mtime']-_0x1dea72[_0x488961(0x210)]),_0x2a0e1b={},_0x2ec879=[];for(const _0x5f0079 of _0x36013d){const _0x1dca6b=_0x2a326f['basename'](_0x5f0079[_0x488961(0x18c)])['match'](/\.bak\.(.+)$/),_0x5adeba=(_0x1dca6b?_0x1dca6b[0x1]:'')[_0x488961(0x20d)](/-\d{3}Z$/,'Z');_0x2a0e1b[_0x5adeba]||(_0x2a0e1b[_0x5adeba]=[],_0x2ec879['push'](_0x5adeba)),_0x2a0e1b[_0x5adeba]['push'](_0x5f0079);}for(const _0x5787eb of _0x2ec879){const _0x569a51=_0x2a0e1b[_0x5787eb],_0x59da8c={};for(const _0x23fcdc of _0x569a51)(!_0x59da8c[_0x23fcdc['origPath']]||_0x3cd903[_0x488961(0x1ee)](_0x23fcdc[_0x488961(0x210)],_0x59da8c[_0x23fcdc[_0x488961(0x25c)]][_0x488961(0x210)]))&&(_0x59da8c[_0x23fcdc[_0x488961(0x25c)]]=_0x23fcdc);_0x2a0e1b[_0x5787eb]=Object[_0x488961(0x222)](_0x59da8c)['sort']((_0x517991,_0x3fd60b)=>_0x3fd60b[_0x488961(0x210)]-_0x517991[_0x488961(0x210)]);}console[_0x488961(0x1dd)](),_0x24ea79('选择恢复时间点('+_0xa7efe7+')');const _0x30d97d=_0x2ec879['map'](_0x2ce40e=>{const _0x20473f=_0x488961,_0x2803b7=_0x2a0e1b[_0x2ce40e],_0x4db038=_0x2803b7[_0x20473f(0x296)](_0x2c8b08=>_0x2a326f[_0x20473f(0x297)](_0x2c8b08[_0x20473f(0x25c)]))[_0x20473f(0x192)](',\x20'),_0xda0d3f=function(_0x1aae5a){const _0x1c9ffd=_0x20473f;try{const _0x5b8cd6=new Date(_0x1aae5a),_0x2f4b2d=_0x46c710=>String(_0x46c710)['padStart'](0x2,'0');return _0x5b8cd6[_0x1c9ffd(0x1d3)]()+'-'+_0x3cd903['pVMzf'](_0x2f4b2d,_0x5b8cd6[_0x1c9ffd(0x25d)]()+0x1)+'-'+_0x2f4b2d(_0x5b8cd6[_0x1c9ffd(0x193)]())+'\x20'+_0x3cd903[_0x1c9ffd(0x181)](_0x2f4b2d,_0x5b8cd6[_0x1c9ffd(0x273)]())+':'+_0x2f4b2d(_0x5b8cd6[_0x1c9ffd(0x235)]())+':'+_0x2f4b2d(_0x5b8cd6[_0x1c9ffd(0x190)]());}catch{return new Date(_0x1aae5a)[_0x1c9ffd(0x194)]();}}(_0x2803b7[0x0][_0x20473f(0x210)]),_0xf31900=[];for(const _0xae94b1 of _0x2803b7)try{const _0x5198da=_0x178e02[_0x20473f(0x1da)](_0xae94b1[_0x20473f(0x18c)],_0x20473f(0x1de));if(!_0xf31900['find'](_0x7a6038=>_0x7a6038[_0x20473f(0x1b2)]('…'))){const _0x9190fe=_0x5198da[_0x20473f(0x1f8)](/sk-([a-zA-Z0-9]{10,})/);if(_0x9190fe)_0xf31900[_0x20473f(0x25f)](_0x20473f(0x1f5)+_0x9190fe[0x1][_0x20473f(0x1bb)](-0x6));else{const _0x19539d=_0x5198da[_0x20473f(0x1f8)](/(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["']([a-zA-Z0-9._-]{10,})["']/);if(_0x19539d)_0xf31900['push'](_0x20473f(0x1cd)+_0x19539d[0x1][_0x20473f(0x1bb)](-0x6));else{const _0x27ff6f=_0x5198da[_0x20473f(0x1f8)](/export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?)([a-zA-Z0-9._-]{10,})/);_0x27ff6f&&_0xf31900[_0x20473f(0x25f)](_0x20473f(0x1cd)+_0x27ff6f[0x2][_0x20473f(0x1bb)](-0x6));}}}if(!_0xf31900[_0x20473f(0x20f)](_0x2d5154=>_0x2d5154[_0x20473f(0x187)]('http'))){const _0x1877cf=_0x5198da[_0x20473f(0x1f8)](/(https?:\/\/[^\s"'`}]+)/);_0x1877cf&&_0xf31900[_0x20473f(0x25f)](_0x1877cf[0x1][_0x20473f(0x20d)](/\/+$/,''));}if(!_0xf31900[_0x20473f(0x20f)](_0x8d2d02=>_0x8d2d02[_0x20473f(0x187)](_0x20473f(0x268)))){const _0x521440=_0x5198da[_0x20473f(0x1f8)](/(?:^|\n)\s*model\s*[=:]\s*["']?([a-zA-Z0-9][\w.-]+)/);_0x521440&&_0xf31900[_0x20473f(0x25f)](_0x20473f(0x1a5)+_0x521440[0x1]);}}catch{}const _0x5c19f5=_0x3cd903[_0x20473f(0x1ee)](_0xf31900[_0x20473f(0x27f)],0x0)?'\x20'+_0x2ee820['yellow'](_0xf31900[_0x20473f(0x192)](_0x3cd903['jxmSW'])):'';return{'label':_0x2ee820[_0x20473f(0x19b)](_0xda0d3f)+'('+_0x2803b7[_0x20473f(0x27f)]+_0x20473f(0x1cf)+_0x4db038+')'+_0x5c19f5,'ts':_0x2ce40e,'group':_0x2803b7};}),_0x523eb0=await _0x3cd903[_0x488961(0x23d)](_0x4929aa,_0x488961(0x285),_0x30d97d,{'defaultIndex':0x0});if(_0x3cd903[_0x488961(0x1c9)](_0x523eb0,0x0)||_0x3cd903[_0x488961(0x1f0)](_0x523eb0,_0x30d97d[_0x488961(0x27f)]))return _0x3cd903[_0x488961(0x1c6)](_0x4b9df4,_0x3cd903[_0x488961(0x295)]),0x1;const _0x1c72c6=_0x30d97d[_0x523eb0][_0x488961(0x1c4)];console['log'](),_0xb8bd2c(_0x488961(0x20e)+_0xa7efe7+'('+_0x1c72c6[_0x488961(0x27f)]+_0x488961(0x179));for(const _0x248119 of _0x1c72c6)_0x3cd903[_0x488961(0x22f)](_0xb8bd2c,'\x20\x20'+_0x2a326f[_0x488961(0x297)](_0x248119[_0x488961(0x25c)])+_0x488961(0x24f)+_0x2a326f[_0x488961(0x297)](_0x248119[_0x488961(0x18c)]));if(_0x1c19a8[_0x488961(0x1f9)])return _0x3cd903['DjxNg'](_0x183042,_0x3cd903[_0x488961(0x1d0)]),0x0;let _0x594706=0x0;for(const _0x32e7ca of _0x1c72c6){if(_0x178e02[_0x488961(0x22a)](_0x32e7ca['origPath']))try{const _0x5db09a=_0x3cd903[_0x488961(0x1b5)](_0xdaa780,_0x32e7ca[_0x488961(0x25c)]);_0x5db09a&&_0x3cd903[_0x488961(0x17a)](_0xb8bd2c,_0x488961(0x1a8)+_0x2a326f[_0x488961(0x297)](_0x32e7ca['origPath'])+_0x488961(0x183)+_0x2a326f['basename'](_0x5db09a));}catch{}try{_0x49bc65(_0x32e7ca[_0x488961(0x18c)],_0x32e7ca[_0x488961(0x25c)]),_0x3cd903[_0x488961(0x1dc)](_0x3e1f02,_0x488961(0x1e4)+_0x32e7ca[_0x488961(0x25c)]),_0x594706++;}catch(_0x366df1){_0x3cd903[_0x488961(0x23e)](_0x4b9df4,_0x488961(0x262)+_0x32e7ca[_0x488961(0x25c)]+'('+_0x366df1[_0x488961(0x18f)]+')');}}return _0xb8bd2c(_0x488961(0x17c)+_0x594706+_0x488961(0x270)),_0x594706>0x0?0x0:0x3;},'description':_0x14467b(0x189)},'reset':{'handler':async function(_0x321110){const _0x180588=_0x14467b,_0x1d5056={'dOdij':function(_0x8b08aa){return _0x8b08aa();},'xPLln':function(_0x4fc72a,_0x439f17){return _0x4fc72a(_0x439f17);},'YXYPi':_0x180588(0x208),'lVQnX':function(_0x4e1952,_0x278717){return _0x4e1952===_0x278717;},'xsvgD':function(_0x40d866,_0x567a9e){return _0x40d866(_0x567a9e);},'vCLmN':_0x180588(0x209),'SBztY':_0x180588(0x19e),'nqKIT':_0x180588(0x1fc),'gLJql':function(_0x466eff,_0x48e5a8){return _0x466eff>_0x48e5a8;},'PAmXP':_0x180588(0x214),'MChhj':'确认操作','toOnx':_0x180588(0x1ad),'ttmOU':'\x20\x20\x20删除前会再备份一次(.bak.reset.<时间戳>),可手动恢复。','bNORP':function(_0x1d483f,_0x5264ef,_0x5999bb){return _0x1d483f(_0x5264ef,_0x5999bb);},'tUVUT':'确认\x20reset\x20吗?','wleBX':function(_0x225b8a,_0x43a60e){return _0x225b8a(_0x43a60e);},'lguyK':_0x180588(0x1e5),'IMrVn':function(_0x1132e6,_0x300b18){return _0x1132e6(_0x300b18);},'MBGVZ':_0x180588(0x29d),'nTRBt':function(_0x1fb877,_0x39f1ba){return _0x1fb877(_0x39f1ba);},'rpdfi':function(_0x507fd9,_0x196cc6){return _0x507fd9>_0x196cc6;},'cejBd':function(_0x5b7ead,_0x4ee541){return _0x5b7ead(_0x4ee541);},'XgxOU':_0x180588(0x260),'cuKva':function(_0xdd602b,_0x22486b){return _0xdd602b(_0x22486b);},'WwSOH':function(_0x15681c,_0xf76bbc){return _0x15681c(_0xf76bbc);},'eOWAG':function(_0x4eb90f,_0x24aed4){return _0x4eb90f>_0x24aed4;},'MxqRr':_0x180588(0x276),'UPoTW':function(_0x1d3d70,_0x5909df){return _0x1d3d70(_0x5909df);},'BBgsi':_0x180588(0x1ab),'Lzmzg':function(_0x1d4866,_0x1b9bc1){return _0x1d4866===_0x1b9bc1;},'VBMPA':_0x180588(0x289),'iPPAa':function(_0x370c8c,_0x5c582c){return _0x370c8c===_0x5c582c;},'sYFqO':function(_0x191388,_0x3d6fa5){return _0x191388(_0x3d6fa5);},'nEeMX':_0x180588(0x238),'dqmYg':function(_0x1f6aa7,_0x173bb4){return _0x1f6aa7(_0x173bb4);},'ZBQbX':_0x180588(0x29a),'iHrDl':'安全备份位置(如需撤销\x20reset,手动恢复这些文件):','todig':_0x180588(0x21a)},_0xefe07c=U(_0x321110);if(_0xefe07c[_0x180588(0x26d)])return console[_0x180588(0x1dd)](_0x180588(0x22e)+z),0x0;_0x1d5056[_0x180588(0x17f)](_0x5e198b);const _0x426773=_0x375296();if(!_0x426773[_0x180588(0x1d1)][_0x180588(0x278)])return _0x1d5056['xPLln'](_0x4b9df4,'需要\x20node\x20>=\x2018,当前\x20'+_0x426773[_0x180588(0x1d1)]['version']),0x1;var _0x3f82b2;_0x24ea79(_0x1d5056[_0x180588(0x26b)]);const _0x2fc239=((_0x3f82b2=_0x426773['os']['isWindows'])?M:R)[_0x180588(0x296)](_0x6d051f=>D(_0x6d051f,_0x3f82b2))['filter'](_0x3b227f=>{const _0x319eda=_0x180588;try{return _0x178e02[_0x319eda(0x22a)](_0x3b227f);}catch{return!0x1;}});if(_0x1d5056[_0x180588(0x202)](0x0,_0x2fc239[_0x180588(0x27f)]))return _0x1d5056[_0x180588(0x1f7)](_0x183042,_0x1d5056[_0x180588(0x227)]),_0x1d5056['xPLln'](_0xb8bd2c,_0x1d5056['SBztY']),0x0;_0xb8bd2c(_0x1d5056[_0x180588(0x23b)]),_0x2fc239[_0x180588(0x1b8)](_0x2699da=>_0x3861df(_0x180588(0x24e)+_0x2ee820[_0x180588(0x256)](_0x2699da))),console[_0x180588(0x1dd)]();const _0x2cc13a=W(_0x426773['os'][_0x180588(0x1c0)]),_0xce75b5=_0x1d5056[_0x180588(0x29e)](_0x167215,_0x2cc13a),_0x17192a=_0x1d5056['gLJql'](_0xce75b5[_0x180588(0x27f)],0x0);if(_0x17192a?_0x3e1f02('发现\x20'+_0xce75b5[_0x180588(0x27f)]+'\x20个备份文件(reset\x20后将尝试恢复每个配置的最新备份)'):_0x183042(_0x1d5056[_0x180588(0x294)]),console[_0x180588(0x1dd)](),_0x24ea79(_0x1d5056[_0x180588(0x18e)]),_0x1d5056[_0x180588(0x29e)](_0x183042,_0x1d5056[_0x180588(0x1eb)]),_0x183042(_0x1d5056[_0x180588(0x1fd)]),!await _0x1d5056[_0x180588(0x1fa)](_0x34f933,_0x1d5056[_0x180588(0x282)],{'defaultValue':!0x1}))return _0x3861df(_0x180588(0x21e)),0x0;if(console['log'](),_0xefe07c[_0x180588(0x1f9)])return _0x1d5056['wleBX'](_0x183042,_0x1d5056['lguyK']),_0x1d5056[_0x180588(0x243)](_0xb8bd2c,_0x1d5056[_0x180588(0x2a0)]),_0x2fc239[_0x180588(0x1b8)](_0x7a7b85=>_0x3861df('\x20\x20-\x20删除\x20'+_0x7a7b85)),_0x17192a&&(_0x1d5056[_0x180588(0x18b)](_0xb8bd2c,_0x180588(0x20c)),_0xce75b5[_0x180588(0x1bb)](0x0,0x5)[_0x180588(0x1b8)](_0x4d345a=>_0x3861df(_0x180588(0x24e)+_0x4d345a[_0x180588(0x18c)]+_0x180588(0x183)+_0x4d345a[_0x180588(0x25c)])),_0x1d5056['rpdfi'](_0xce75b5[_0x180588(0x27f)],0x5)&&_0x3861df(_0x180588(0x1d8)+_0xce75b5[_0x180588(0x27f)]+_0x180588(0x286))),0x0;_0x1d5056['cejBd'](_0x24ea79,_0x1d5056[_0x180588(0x1e1)]);const _0x37b151=[];for(const _0x41ad42 of _0x2fc239)try{const _0x99eac6=_0x41ad42+_0x180588(0x1fb)+new Date()[_0x180588(0x194)]()[_0x180588(0x20d)](/[:.]/g,'-');_0x178e02[_0x180588(0x234)](_0x41ad42,_0x99eac6),_0x37b151['push'](_0x99eac6),_0x1d5056['cuKva'](_0x3861df,_0x180588(0x23a)+_0x41ad42+_0x180588(0x183)+_0x99eac6);}catch(_0x3fb554){_0x1d5056[_0x180588(0x271)](_0x4b9df4,'安全备份失败\x20'+_0x41ad42+':'+_0x3fb554[_0x180588(0x18f)]+_0x180588(0x1d5));}_0x1d5056[_0x180588(0x287)](_0x37b151['length'],0x0)&&_0x1d5056['cejBd'](_0x3e1f02,_0x180588(0x188)+_0x37b151['length']+_0x180588(0x270)),console[_0x180588(0x1dd)](),_0x24ea79(_0x1d5056[_0x180588(0x18d)]);const _0x52a2e2=[];for(const _0x533e15 of _0x2fc239)try{_0x178e02[_0x180588(0x298)](_0x533e15),_0x1d5056['UPoTW'](_0x3e1f02,_0x180588(0x239)+_0x533e15),_0x52a2e2[_0x180588(0x25f)](_0x533e15);}catch(_0x1c91ca){_0x1d5056['lVQnX'](_0x1d5056[_0x180588(0x1a0)],_0x1c91ca[_0x180588(0x27e)])||_0x1d5056[_0x180588(0x180)](_0x1d5056[_0x180588(0x28f)],_0x1c91ca['code'])||_0x1d5056['iPPAa'](_0x180588(0x27a),_0x1c91ca[_0x180588(0x27e)])?_0x4b9df4(_0x180588(0x1ef)+_0x533e15+_0x180588(0x196)):_0x1d5056[_0x180588(0x224)](_0x4b9df4,'删除失败\x20'+_0x533e15+':'+_0x1c91ca[_0x180588(0x18f)]);}if(console[_0x180588(0x1dd)](),_0x17192a){_0x1d5056[_0x180588(0x203)](_0x24ea79,_0x1d5056[_0x180588(0x293)]);const _0x59c641=new Map();for(const _0x2b47a1 of _0xce75b5){const _0x46bbaa=_0x59c641[_0x180588(0x1ed)](_0x2b47a1[_0x180588(0x25c)]);(!_0x46bbaa||_0x1d5056[_0x180588(0x1e6)](_0x2b47a1[_0x180588(0x210)],_0x46bbaa[_0x180588(0x210)]))&&_0x59c641[_0x180588(0x246)](_0x2b47a1['origPath'],_0x2b47a1);}let _0x418a28=0x0;for(const [_0x4ffa0f,_0x57ecd1]of _0x59c641)try{_0x1d5056[_0x180588(0x1fa)](_0x49bc65,_0x57ecd1[_0x180588(0x18c)],_0x4ffa0f),_0x1d5056[_0x180588(0x27b)](_0x3e1f02,'已恢复:'+_0x57ecd1[_0x180588(0x18c)]+'\x20→\x20'+_0x4ffa0f),_0x418a28++;}catch(_0x1bbec1){_0x183042('恢复失败\x20'+_0x4ffa0f+':'+_0x1bbec1['message']+'(文件已删除,未恢复)');}_0x418a28>0x0&&_0xb8bd2c(_0x180588(0x20b)+_0x418a28+_0x180588(0x270)),console[_0x180588(0x1dd)]();}return _0x1d5056[_0x180588(0x271)](_0x24ea79,_0x1d5056[_0x180588(0x198)]),_0x3e1f02(_0x180588(0x231)+_0x52a2e2[_0x180588(0x27f)]+_0x180588(0x230)),_0x1d5056[_0x180588(0x287)](_0x37b151['length'],0x0)&&(_0x1d5056['IMrVn'](_0xb8bd2c,_0x1d5056[_0x180588(0x1a9)]),_0x37b151[_0x180588(0x1b8)](_0x52dac6=>_0x3861df('\x20\x20-\x20'+_0x52dac6))),_0x1d5056[_0x180588(0x271)](_0xb8bd2c,_0x1d5056[_0x180588(0x26c)]),_0x1d5056[_0x180588(0x287)](_0x52a2e2[_0x180588(0x27f)],0x0)?0x0:0x1;},'description':_0x14467b(0x1c5)},'refresh-groups':{'handler':async function(_0x4ddde9){const _0x418fd6=_0x14467b,_0x3315cf={'MbNzV':function(_0x4eae88,_0x580865){return _0x4eae88(_0x580865);},'MQUkV':function(_0x1c9ac7){return _0x1c9ac7();},'SHKYA':function(_0x3d38fa){return _0x3d38fa();},'iZsfQ':function(_0x50b578,_0x14015b){return _0x50b578===_0x14015b;},'vqZcN':function(_0x34056d,_0x270657){return _0x34056d(_0x270657);},'yLyqy':_0x418fd6(0x1c8),'sVlBV':function(_0x378804,_0x1b4201){return _0x378804(_0x1b4201);},'HvfAp':_0x418fd6(0x1bd),'Fvpgg':function(_0x11bdba,_0x376f12){return _0x11bdba(_0x376f12);},'gOELy':function(_0xc6f22c,_0x1f36c4){return _0xc6f22c+_0x1f36c4;},'XjWZT':function(_0x13bb7e,_0x367223){return _0x13bb7e(_0x367223);},'mRJvp':_0x418fd6(0x24c),'zdTlJ':_0x418fd6(0x22c),'WpBDC':function(_0x40d73f,_0x4edf33){return _0x40d73f(_0x4edf33);},'myNtm':_0x418fd6(0x1d9),'Snlcu':'(本命令仅展示分组,不修改\x20API\x20Key\x20或配置文件)'},_0x3e1178=_0x3315cf[_0x418fd6(0x248)](U,_0x4ddde9);if(_0x3e1178['help'])return console[_0x418fd6(0x1dd)](_0x418fd6(0x257)+z),0x0;_0x3315cf[_0x418fd6(0x1f1)](_0x5e198b);const _0x3fec42=_0x3315cf[_0x418fd6(0x1bf)](_0x375296);if(!_0x3fec42[_0x418fd6(0x1d1)]['supported'])return _0x4b9df4('需要\x20node\x20>=\x2018,当前\x20'+_0x3fec42[_0x418fd6(0x1d1)]['version']),0x1;const _0x379392=_0x3e1178['apiBase']||process[_0x418fd6(0x28b)][_0x418fd6(0x1e9)]||C;_0x3315cf[_0x418fd6(0x248)](_0xb8bd2c,'API\x20端点:'+_0x379392),console[_0x418fd6(0x1dd)](),_0x24ea79(_0x418fd6(0x1b7));let _0x53899f=[];try{_0x53899f=await _0x3315cf['MbNzV'](_0x403c03,{'apiBase':_0x379392});}catch(_0x411b6e){return _0x3315cf[_0x418fd6(0x248)](_0x4b9df4,_0x418fd6(0x291)+_0x411b6e['message']),0x1;}if(_0x3315cf[_0x418fd6(0x240)](0x0,_0x53899f['length']))return _0x3315cf['vqZcN'](_0x183042,_0x3315cf['yLyqy']),_0x3315cf[_0x418fd6(0x266)](_0xb8bd2c,_0x3315cf[_0x418fd6(0x200)]),_0xb8bd2c('当前端点:'+_0x379392+_0x418fd6(0x236)),0x0;_0x3315cf[_0x418fd6(0x28a)](_0x3e1f02,_0x418fd6(0x221)+_0x53899f[_0x418fd6(0x27f)]+_0x418fd6(0x254)),console[_0x418fd6(0x1dd)](),_0x3315cf[_0x418fd6(0x248)](_0x24ea79,_0x418fd6(0x207));const _0x58e355=Math['max'](0x4,..._0x53899f[_0x418fd6(0x296)](_0x500cc8=>String(_0x500cc8['id']??'')[_0x418fd6(0x27f)])),_0x45ce62=Math[_0x418fd6(0x22d)](0x6,..._0x53899f[_0x418fd6(0x296)](_0xa311e=>String(_0xa311e[_0x418fd6(0x229)]??'')[_0x418fd6(0x27f)])),_0x426c53='\x20\x20'+'ID'[_0x418fd6(0x1b0)](_0x58e355)+'\x20\x20'+'名称'['padEnd'](_0x45ce62)+_0x418fd6(0x1db);return _0x3861df(_0x2ee820[_0x418fd6(0x191)][_0x418fd6(0x1f3)](_0x426c53)),_0x3861df(_0x2ee820['dim'](_0x3315cf[_0x418fd6(0x27c)]('\x20\x20','─'['repeat'](_0x3315cf[_0x418fd6(0x27c)](_0x3315cf[_0x418fd6(0x27c)](_0x58e355,_0x45ce62),0xf))))),_0x53899f[_0x418fd6(0x1b8)]((_0x22db99,_0x539f47)=>{const _0x2378df=_0x418fd6,_0x4bec47=String(_0x22db99['id']??'')[_0x2378df(0x1b0)](_0x58e355),_0x7bdb67=String(_0x22db99['name']??'')[_0x2378df(0x1b0)](_0x45ce62),_0x82e833='\x20\x20'+_0x2ee820[_0x2378df(0x256)](_0x4bec47)+'\x20\x20'+_0x2ee820[_0x2378df(0x195)](_0x7bdb67);_0x3315cf[_0x2378df(0x248)](_0x3861df,_0x82e833);}),console[_0x418fd6(0x1dd)](),_0x3315cf[_0x418fd6(0x182)](_0xb8bd2c,_0x3315cf['mRJvp']),_0x3861df(_0x3315cf[_0x418fd6(0x1c2)]),_0x3315cf['WpBDC'](_0x3861df,_0x3315cf[_0x418fd6(0x288)]),_0xb8bd2c(_0x3315cf[_0x418fd6(0x216)]),0x0;},'description':_0x14467b(0x299)},'diagnose':{'handler':async function(_0x4799b7){const _0x5ac178=_0x14467b,_0x4aa2e1={'cfXaF':function(_0x2ec8b0,_0x93d39a){return _0x2ec8b0(_0x93d39a);},'MlwTd':function(_0x3c5bea){return _0x3c5bea();},'dDFQL':function(_0xa67a10,_0x308a2f){return _0xa67a10===_0x308a2f;},'wsmlC':_0x5ac178(0x1f2),'Sroxv':_0x5ac178(0x26f),'ZMaIE':function(_0x14e016,_0x13986b){return _0x14e016(_0x13986b);},'lhCkh':function(_0x406914,_0x495628){return _0x406914(_0x495628);},'DxkxZ':function(_0x28288b,_0x2f87e0){return _0x28288b(_0x2f87e0);},'rWzqT':_0x5ac178(0x1c3)},_0x2926f9=_0x4aa2e1['cfXaF'](U,_0x4799b7);if(_0x2926f9[_0x5ac178(0x26d)])return console[_0x5ac178(0x1dd)](_0x5ac178(0x244)+z),0x0;_0x4aa2e1[_0x5ac178(0x1d6)](_0x5e198b);const _0x1862e8=_0x375296();if(!_0x1862e8[_0x5ac178(0x1d1)][_0x5ac178(0x278)])return _0x4b9df4(_0x5ac178(0x1b3)+_0x1862e8['node'][_0x5ac178(0x178)]),0x1;const _0x2849ce=_0x2926f9[_0x5ac178(0x17e)]||process['env'][_0x5ac178(0x1e9)]||C;_0x4aa2e1['cfXaF'](_0xb8bd2c,_0x5ac178(0x22b)+_0x2849ce);const _0x2d9725={'yes':_0x4aa2e1['dDFQL'](!0x0,_0x2926f9[_0x5ac178(0x281)]),'models':_0x4aa2e1[_0x5ac178(0x1ea)]==typeof _0x2926f9['model']?_0x2926f9[_0x5ac178(0x268)]:void 0x0,'skipCliTests':_0x4aa2e1[_0x5ac178(0x1cc)](!0x0,_0x2926f9[_0x5ac178(0x275)]),'outDir':_0x2926f9[_0x5ac178(0x19a)]};let _0x2f30cf;_0x2d9725['yes']||_0x4aa2e1[_0x5ac178(0x21b)](_0xb8bd2c,_0x4aa2e1['Sroxv']);try{_0x2f30cf=await _0x58947d({'apiBase':_0x2849ce,'opts':_0x2d9725,'ui':{'banner':_0x5e198b,'ok':_0x3e1f02,'fail':_0x4b9df4,'warn':_0x183042,'info':_0xb8bd2c,'step':_0x24ea79,'plain':_0x3861df,'guide':_0x12c245,'chalk':_0x2ee820}});}catch(_0x4b39f5){return _0x4b9df4(_0x5ac178(0x1cb)+(_0x4b39f5?.[_0x5ac178(0x18f)]||_0x4b39f5)),0x1;}return _0x4aa2e1[_0x5ac178(0x269)](Y,_0x2f30cf),_0x4aa2e1[_0x5ac178(0x1c7)](_0x3e1f02,_0x5ac178(0x25b)+_0x2f30cf[_0x5ac178(0x18a)]),_0x4aa2e1[_0x5ac178(0x1ec)](_0xb8bd2c,_0x4aa2e1[_0x5ac178(0x1ac)]),0x0;},'description':_0x14467b(0x1e3)}};export const SUBCOMMAND_NAMES=new Set(Object[_0x14467b(0x1e7)](SUBCOMMANDS));export{z as SUB_HELP};
|
package/dist/lib/detect.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4a7e99=_0x1772;(function(_0x55c9cc,_0x8c02b2){const _0xe377c3=_0x1772,_0x4eaf5e=_0x55c9cc();while(!![]){try{const _0x18935=parseInt(_0xe377c3(0x1be))/0x1*(-parseInt(_0xe377c3(0x1bd))/0x2)+parseInt(_0xe377c3(0x1bf))/0x3*(parseInt(_0xe377c3(0x1ca))/0x4)+parseInt(_0xe377c3(0x1de))/0x5+parseInt(_0xe377c3(0x1cd))/0x6*(-parseInt(_0xe377c3(0x1b4))/0x7)+-parseInt(_0xe377c3(0x1dc))/0x8*(-parseInt(_0xe377c3(0x1dd))/0x9)+parseInt(_0xe377c3(0x1b9))/0xa+-parseInt(_0xe377c3(0x1b5))/0xb;if(_0x18935===_0x8c02b2)break;else _0x4eaf5e['push'](_0x4eaf5e['shift']());}catch(_0x3313b7){_0x4eaf5e['push'](_0x4eaf5e['shift']());}}}(_0x33ff,0x75c6e));import{spawnSync as _0x1e5246}from'node:child_process';function _0x1772(_0x3fb75e,_0x283796){_0x3fb75e=_0x3fb75e-0x1b2;const _0x33ffa3=_0x33ff();let _0x177254=_0x33ffa3[_0x3fb75e];return _0x177254;}export function detectOS(){const _0x14a5cb=_0x1772,_0x54a9be={'uXFpN':function(_0x3c09c4,_0x50970d){return _0x3c09c4===_0x50970d;},'RelsE':_0x14a5cb(0x1e3),'FOwlW':_0x14a5cb(0x1db),'fHIYt':function(_0x329ce2,_0x1b1ec3){return _0x329ce2===_0x1b1ec3;},'VNBYm':_0x14a5cb(0x1d0),'UMOMN':_0x14a5cb(0x1da)},_0x1e2373=process[_0x14a5cb(0x1d3)],_0x84742e=_0x54a9be[_0x14a5cb(0x1e2)](_0x54a9be[_0x14a5cb(0x1cc)],_0x1e2373);return{'platform':_0x1e2373,'isWindows':_0x84742e,'isMac':_0x54a9be[_0x14a5cb(0x1cb)]===_0x1e2373,'isLinux':_0x54a9be['fHIYt'](_0x54a9be[_0x14a5cb(0x1d8)],_0x1e2373),'osType':_0x84742e?'windows':_0x54a9be[_0x14a5cb(0x1cf)]};}export function detectNode(){const _0x552e12=_0x1772,_0x44cc6e=process['versions']['node'],_0x5628cf=parseInt(_0x44cc6e[_0x552e12(0x1b8)]('.')[0x0],0xa);return{'version':_0x44cc6e,'major':_0x5628cf,'supported':_0x5628cf>=0x12};}const e=[_0x4a7e99(0x1c5),_0x4a7e99(0x1d1),_0x4a7e99(0x1d7),_0x4a7e99(0x1c1),_0x4a7e99(0x1bc)];function n(_0x41a4e5,_0x10b8f6){const _0x6bae3f=_0x4a7e99,_0x3d1ed0={'XzdYK':'which','CvNVt':function(_0x51e353,_0x35563f,_0x34eef9,_0x563370){return _0x51e353(_0x35563f,_0x34eef9,_0x563370);},'nLNVO':_0x6bae3f(0x1e0),'SpvSp':_0x6bae3f(0x1b2),'ZvRws':_0x6bae3f(0x1b6),'JzwMy':function(_0x3b84e4,_0x1eac8c){return _0x3b84e4===_0x1eac8c;}},_0x42613c=_0x10b8f6?'where':_0x3d1ed0[_0x6bae3f(0x1b3)];try{const _0x4c5d9f=_0x3d1ed0[_0x6bae3f(0x1bb)](_0x1e5246,_0x42613c,[_0x41a4e5],{'encoding':_0x3d1ed0['nLNVO'],'stdio':[_0x3d1ed0[_0x6bae3f(0x1e1)],_0x3d1ed0[_0x6bae3f(0x1d2)],_0x3d1ed0['SpvSp']],'timeout':0xbb8});if(_0x3d1ed0[_0x6bae3f(0x1c0)](0x0,_0x4c5d9f[_0x6bae3f(0x1b7)])&&_0x4c5d9f[_0x6bae3f(0x1c4)])return _0x4c5d9f[_0x6bae3f(0x1c4)][_0x6bae3f(0x1c7)]()[_0x6bae3f(0x1b8)](/\r?\n/)[0x0]||null;}catch{}return null;}function _0x33ff(){const _0xd03501=['codex','wzNNM','trim','COMSPEC','KfaHE','16XZzbte','FOwlW','RelsE','475644OcbqSK','UfEGy','UMOMN','linux','claude','ZvRws','platform','QHcJN','VeEJI','slice','gemini','VNBYm','XjgRq','unix','darwin','8LeqFkA','398421QloziL','3403930Midser','--version','utf8','SpvSp','uXFpN','win32','ignore','XzdYK','21lWmNnW','3954005weBvbi','pipe','status','split','6252400EXyBWC','cmd.exe','CvNVt','opencode','692768jXysPQ','2ypCMCR','316623ZVNtDs','JzwMy','grok','isWindows','match','stdout'];_0x33ff=function(){return _0xd03501;};return _0x33ff();}function o(_0x58ff2c,_0xb7dcec){const _0x4145e3=_0x4a7e99,_0x71a128={'oXtRx':_0x4145e3(0x1ba),'wzNNM':function(_0x3b80f6,_0x5c49f9,_0x42c0cc,_0x30ec70){return _0x3b80f6(_0x5c49f9,_0x42c0cc,_0x30ec70);},'XjgRq':_0x4145e3(0x1df),'KfaHE':'ignore','QHcJN':function(_0xc37724,_0x3efaeb){return _0xc37724===_0x3efaeb;}};try{const _0x31c4da=_0xb7dcec?process['env'][_0x4145e3(0x1c8)]||_0x71a128['oXtRx']:_0x58ff2c,_0x407547=_0x71a128[_0x4145e3(0x1c6)](_0x1e5246,_0x31c4da,_0xb7dcec?['/c',_0x58ff2c,_0x71a128[_0x4145e3(0x1d9)]]:[_0x71a128['XjgRq']],{'encoding':'utf8','stdio':[_0x71a128[_0x4145e3(0x1c9)],'pipe','pipe'],'timeout':0x1388});if(_0x71a128[_0x4145e3(0x1d4)](0x0,_0x407547[_0x4145e3(0x1b7)])&&_0x407547['stdout']){const _0x17061b=_0x407547['stdout'][_0x4145e3(0x1c7)]()[_0x4145e3(0x1b8)](/\r?\n/)[0x0],_0x407649=_0x17061b[_0x4145e3(0x1c3)](/(\d+\.\d+(?:\.\d+)?(?:[-.\w]*)?)/);return _0x407649?_0x407649[0x1]:_0x17061b[_0x4145e3(0x1d6)](0x0,0x28);}}catch{}return null;}export function detectInstalled(_0x33b15e){const _0x1399bc=_0x4a7e99,_0x1a993d={'fjdQV':function(_0x10f475){return _0x10f475();},'xTsRB':function(_0x4510b0,_0x2d0162,_0xee6e3d){return _0x4510b0(_0x2d0162,_0xee6e3d);}},_0x104955=_0x1a993d['fjdQV'](detectOS),_0x264372=_0x1a993d['xTsRB'](n,_0x33b15e,_0x104955[_0x1399bc(0x1c2)]);if(!_0x264372)return{'installed':!0x1,'path':null,'version':null};return{'installed':!0x0,'path':_0x264372,'version':o(_0x33b15e,_0x104955['isWindows'])};}export function detectInstalledCLIs(_0x38ff42){const _0x11f594=_0x4a7e99,_0xedb058={'VeEJI':function(_0x275514,_0x14994b,_0x1c326b){return _0x275514(_0x14994b,_0x1c326b);}},_0xb5a321={};for(const _0x3e5e05 of e){const _0x77056b=_0xedb058[_0x11f594(0x1d5)](n,_0x3e5e05,_0x38ff42);_0x77056b&&(_0xb5a321[_0x3e5e05]={'path':_0x77056b,'version':o(_0x3e5e05,_0x38ff42)});}return _0xb5a321;}export function detectAll(){const _0x5efeee=_0x4a7e99,_0x58f6cd={'UfEGy':function(_0x1e29b3,_0x12de63){return _0x1e29b3(_0x12de63);}},_0x5e7d1a=detectOS();return{'os':_0x5e7d1a,'node':detectNode(),'installed':_0x58f6cd[_0x5efeee(0x1ce)](detectInstalledCLIs,_0x5e7d1a[_0x5efeee(0x1c2)])};}
|
package/dist/lib/device.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x5ebf8d=_0x211a;(function(_0x2e779d,_0x3177a2){const _0x3274c0=_0x211a,_0x1a9aea=_0x2e779d();while(!![]){try{const _0x524e8f=parseInt(_0x3274c0(0x11c))/0x1+parseInt(_0x3274c0(0x110))/0x2*(parseInt(_0x3274c0(0x109))/0x3)+parseInt(_0x3274c0(0x129))/0x4*(parseInt(_0x3274c0(0x119))/0x5)+-parseInt(_0x3274c0(0x11a))/0x6*(parseInt(_0x3274c0(0x125))/0x7)+parseInt(_0x3274c0(0x12a))/0x8*(parseInt(_0x3274c0(0x106))/0x9)+parseInt(_0x3274c0(0x113))/0xa+-parseInt(_0x3274c0(0x121))/0xb;if(_0x524e8f===_0x3177a2)break;else _0x1a9aea['push'](_0x1a9aea['shift']());}catch(_0xb73b30){_0x1a9aea['push'](_0x1a9aea['shift']());}}}(_0x533f,0x67db8));import _0x445179 from'node:crypto';import _0x32c891 from'node:fs';function _0x533f(){const _0x1fbe8b=['linux','2194083noLkqu','join','utf8','867UgMTfC','sha256','mkdirSync','win32','darwin','trim','MbicJ','4438axwTMY','randomBytes','2api-store-activate','3789070ZHjotJ','toLowerCase','exec','zryWm','device-id','readFileSync','230gqfRNJ','150mbYpwk','yPMYo','326930ASefUj','ioreg\x20-rd1\x20-c\x20IOPlatformExpertDevice','hex','homedir','hqXAh','15976587eBORXN','WHuij','MWDuM','KgNgJ','136850idVQgi','JQUTQ','digest','wDSVK','67448lTPhui','8EsoZTq','test','/var/lib/dbus/machine-id','DvVlr','createHmac','toString'];_0x533f=function(){return _0x1fbe8b;};return _0x533f();}import _0x2b019c from'node:path';import _0x2af9ea from'node:os';import{execSync as _0x3a0b3}from'node:child_process';const c=_0x2b019c[_0x5ebf8d(0x107)](_0x2af9ea[_0x5ebf8d(0x11f)](),'.2api'),n=_0x2b019c[_0x5ebf8d(0x107)](c,_0x5ebf8d(0x117)),a=/^[0-9a-f]{64}$/;function s(){const _0x33f72e=_0x5ebf8d,_0x143f73={'DvVlr':_0x33f72e(0x10d),'yPMYo':_0x33f72e(0x11d),'hqXAh':_0x33f72e(0x108),'sDrkF':_0x33f72e(0x105),'JQUTQ':_0x33f72e(0x12c),'vfrYm':_0x33f72e(0x10c),'MbicJ':function(_0x16e9bf,_0x57d531,_0x27e271){return _0x16e9bf(_0x57d531,_0x27e271);},'KgNgJ':'reg\x20query\x20HKLM\x5cSOFTWARE\x5cMicrosoft\x5cCryptography\x20/v\x20MachineGuid','zryWm':_0x33f72e(0x11e),'MWDuM':_0x33f72e(0x112)},_0x374844=(function(){const _0x403cfe=_0x33f72e;try{switch(process['platform']){case _0x143f73[_0x403cfe(0x12d)]:{const _0xb394ca=_0x3a0b3(_0x143f73[_0x403cfe(0x11b)],{'encoding':_0x143f73['hqXAh']}),_0x5858d1=/IOPlatformUUID"\s*=\s*"([^"]+)"/[_0x403cfe(0x115)](_0xb394ca);if(_0x5858d1&&_0x5858d1[0x1])return _0x5858d1[0x1][_0x403cfe(0x10e)]();break;}case _0x143f73['sDrkF']:for(const _0x1f3c03 of['/etc/machine-id',_0x143f73[_0x403cfe(0x126)]])try{const _0x1d5e93=_0x32c891[_0x403cfe(0x118)](_0x1f3c03,_0x143f73[_0x403cfe(0x120)])[_0x403cfe(0x10e)]();if(_0x1d5e93)return _0x1d5e93;}catch{}break;case _0x143f73['vfrYm']:{const _0x5d3485=_0x143f73[_0x403cfe(0x10f)](_0x3a0b3,_0x143f73[_0x403cfe(0x124)],{'encoding':_0x143f73[_0x403cfe(0x120)]}),_0x138a95=/MachineGuid\s+REG_SZ\s+([0-9a-fA-F-]+)/[_0x403cfe(0x115)](_0x5d3485);if(_0x138a95&&_0x138a95[0x1])return _0x138a95[0x1]['trim']()[_0x403cfe(0x114)]();break;}}}catch{}return _0x445179[_0x403cfe(0x111)](0x20)[_0x403cfe(0x12f)](_0x143f73[_0x403cfe(0x116)]);}());return _0x445179[_0x33f72e(0x12e)](_0x33f72e(0x10a),_0x143f73[_0x33f72e(0x123)])['update'](_0x374844)[_0x33f72e(0x127)](_0x143f73[_0x33f72e(0x116)]);}function _0x211a(_0x242f3c,_0x3320b3){_0x242f3c=_0x242f3c-0x105;const _0x533f2a=_0x533f();let _0x211a8f=_0x533f2a[_0x242f3c];return _0x211a8f;}export function getDeviceId(){const _0x3ea787=_0x5ebf8d,_0x3b078d={'wDSVK':function(_0x3d79ff){return _0x3d79ff();},'WHuij':_0x3ea787(0x108)};try{const _0x114df1=_0x32c891['readFileSync'](n,_0x3ea787(0x108))[_0x3ea787(0x10e)]();if(a[_0x3ea787(0x12b)](_0x114df1))return _0x114df1;}catch{}const _0x178c00=_0x3b078d[_0x3ea787(0x128)](s);try{_0x32c891[_0x3ea787(0x10b)](c,{'recursive':!0x0,'mode':0x1c0}),_0x32c891['writeFileSync'](n,_0x178c00,{'encoding':_0x3b078d[_0x3ea787(0x122)],'mode':0x180});}catch{}return _0x178c00;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x47433b=_0x1c64;(function(_0x2e91bb,_0x1cdaf1){const _0x1ddcb0=_0x1c64,_0x45fd66=_0x2e91bb();while(!![]){try{const _0x4b904e=-parseInt(_0x1ddcb0(0xe2))/0x1*(-parseInt(_0x1ddcb0(0x163))/0x2)+parseInt(_0x1ddcb0(0x17c))/0x3+-parseInt(_0x1ddcb0(0x1bc))/0x4*(parseInt(_0x1ddcb0(0x10f))/0x5)+parseInt(_0x1ddcb0(0x119))/0x6+-parseInt(_0x1ddcb0(0x1ac))/0x7*(parseInt(_0x1ddcb0(0x1aa))/0x8)+-parseInt(_0x1ddcb0(0xf9))/0x9*(parseInt(_0x1ddcb0(0x169))/0xa)+-parseInt(_0x1ddcb0(0x14f))/0xb*(-parseInt(_0x1ddcb0(0x143))/0xc);if(_0x4b904e===_0x1cdaf1)break;else _0x45fd66['push'](_0x45fd66['shift']());}catch(_0x45de38){_0x45fd66['push'](_0x45fd66['shift']());}}}(_0x2770,0xa2e71));import _0x218346 from'node:fs';import _0x705772 from'node:path';function _0x2770(){const _0x222b5f=['ZdsGg','server','gpfUG','22941poiLKG','pjkro','gdaKz','\x0a工具版本:','CskIq','TRQNj','https:','lfaAI','OcNlK','utf8','end','KzKJG','claude-sonnet-4-5','fallback','fecqj','PnVNy','s)—\x20','凭据发现','YDFIu','cWvcG','rvnlv','wnZvC','519900IkFPqa','/v1/chat/completions','gemini','destroy','gTlyO','SIGKILL','vietp','OCcNO','split','\x20/\x20失败\x20','4927848osHdga','无效的\x20baseUrl:','join','readFileSync','win32','~/.codex/auth.json','yAgcg','message','headers','发现凭据:','后端下发矩阵:','ttfb_ms','环境快照','timed_out','xOTpg','mtime','lLLGv','YnnET','诊断包已生成:','rUVBg','label','请输入\x20API\x20Key(仅用于本次诊断,包内不落明文)','kmakj','stderr','\x20/\x20ttfb\x20','BWKCD','zip_path','skipCliTests','失败(非\x202xx\x20或请求出错)','OMbpd','EHaBF','../package.json','slow','HTTP_PROXY','(key\x20已脱敏:','RigDd','DQkxE','gxfxi','.redacted','size','toLowerCase','GMlmb','47748vbzaeF','JdwGb','isFinite','indexOf','object','打包诊断\x20zip','\x0a凭据来源:','gemini-2.5-pro','XVoUJ','TUdke','getSeconds','Shndt','1738qziYea','\x20项。请把\x20zip\x20发给客服排障。','\x20→\x20','lTGHT','spawn\x20失败:','tqdwL','timeout_ms','\x0a\x0a一、包内文件\x0a-\x20summary.json\x20\x20\x20\x20\x20环境\x20+\x20测试结果汇总(请先看这个)\x0a-\x20env.json\x20\x20\x20\x20\x20\x20\x20\x20\x20操作系统\x20/\x20Node\x20版本\x20/\x20已装\x20CLI\x20/\x20配置文件元信息\x20/\x20代理环境变量\x0a-\x20http-tests.jsonl\x20每个模型一行:模型\x20/\x20request_id\x20/\x20状态码\x20/\x20首字节延迟(ttfb_ms)\x20/\x20总延迟(total_ms)\x20/\x20错误\x20/\x20响应片段\x0a-\x20cli-tests.jsonl\x20\x20每个已装\x20CLI\x20一行:命令\x20/\x20退出码\x20/\x20耗时\x20/\x20是否超时\x20/\x20stdout+stderr(截断\x2010KB)\x0a-\x20configs/\x20\x20\x20\x20\x20\x20\x20\x20\x20本地配置文件脱敏副本(key\x20已掩码,不存在的文件跳过)\x0a\x0a二、request_id\x20的用法\x0ahttp-tests.jsonl\x20每条记录的\x20request_id\x20对应服务端网关该次请求的标识(响应头\x20X-Request-Id)。\x0a客服凭\x20request_id\x20可在生产后台\x20usage_logs\x20/\x20网关日志中精确对账:该请求走了哪个账号、\x0a哪个模型、计费多少、错误详情。本次共测\x20','QfQUt','xANjR','MOOIn','duration_ms','slice','manual-input','tool_version','push','SFJgY','request_id','内置兜底(后端诊断配置不可用)','generated_at','22zMkqYY','未发现已安装的可测\x20CLI,跳过\x20CLI\x20实测','ms\x20/\x20','JFYzp','HTTP\x20直测\x20','rKafi','3730eMcLoo','stringify','/configs/','XnKxe','installed_clis','OS\x20','***','YpyII','platform','/summary.json','seUfP','HBJSu','HlxDE','application/json','statusCode','wTASr','trim','\x20/\x20node\x20','byteLength','1952976KHFRMW','uSMUu','\x20模型\x20/\x20超时\x20','kill','model',',正常计费)','wViGo','FUrWm','imXog','lbOPt','vlFsj','hints','SBius',',并运行已装\x20CLI\x20实测','data','win','***…','://***@','%userprofile%\x5c.codex\x5cauth.json','ERR','@2api-store/activate/','缓慢(2xx\x20但首字节延迟超过\x2010s)','error','key','vRnNM','\x20退出码\x20','info','models','CLI\x20实测(','cQgDG','max_tokens','wWAZj','\x20—\x20HTTP\x20','status','s\x20/\x20并发\x20','qxmMq','request','xboEI','padStart','已按参数跳过\x20CLI\x20实测','dehMf','\x20退出码\x200\x20/\x20','from','XYovh','href','source','16AElvWI','exit_code','857661DwWIpc','SgOOX','WxXIE','UfVIK','floor','code','test','qJYtT','BHcfI','all','zishI','HvTSz','拉取诊断配置','cmd.exe','%userprofile%\x5c.claude\x5csettings.json','LEsXA','12NYTJUD','mode','fvMpI','WGZiy','map','sLmKp','node','cli','sk-…','writeFileSync','未在\x20~/.codex/auth.json\x20/\x20~/.claude/settings.json\x20/\x20~/.gemini/settings.json\x20中发现\x20API\x20Key','tkBIc','env','未提供\x20API\x20Key,诊断中止','/http-tests.jsonl','ignore','credential','close','jmovC','\x0aspawn\x20error:\x20','http_tests','timeout','lJsps','api_base','WxxVh','XHoMV','yes','getHours','qOTUy','concurrency','\x20个模型,并发\x20','mkWSY','\x20个模型各发起\x201\x20个真实小请求(max_tokens=','~/.gemini/settings.json','PAqeE','COMSPEC','woMoV','FYZyv','opencode','cwd','QCsDR','warn','UlhAX','rkULO','wboCS','pid','mkdirSync',');CLI\x20实测\x20','KsoQw','filter','.zip','isArray','tMauL','使用手动输入的凭据(','MZGqd','hKGpi','response_preview','QHlOK','DxbTq','brvEO','content','BAaRJ','~/.claude/settings.json','gcofe','\x20超时(30s)已终止','ZKjXt','replace','Bearer\x20***','vwhHG','\x20个模型(max_tokens\x20极小,计费可忽略)。\x0a\x0a三、隐私说明\x0a包内所有密钥(sk-…)、Bearer\x20凭证、邮箱、代理内嵌账号均已自动脱敏;\x0aconfigs/\x20为脱敏副本,本地原始配置文件未被修改。\x0a\x0a四、联系方式\x0a客服/QQ/邮箱:__________(由客服填写)\x0a','tWMSP','RmapU','stdout','/cli-tests.jsonl','/api/v1/cli/diagnose-config','\x20项(通过\x20','step','aIMzs','\x0aAPI\x20地址:','length','key_redacted','exists','string','baseUrl','pipe','xPFPW','version','6730iifypb','ZlJEF','\x20/\x20已装\x20CLI\x20','\x20的\x20','now','keys','toString','fail','EGkmV','installed','TokenShop\x20诊断包说明\x0a====================\x0a\x0a生成时间:','gNUoZ','sk-','total_ms','match','exec','oYofx','outDir','LwOaF','ePIry'];_0x2770=function(){return _0x222b5f;};return _0x2770();}import _0x11d069 from'node:https';import _0x411298 from'node:http';function _0x1c64(_0x4cf086,_0x3d7ed2){_0x4cf086=_0x4cf086-0xc2;const _0x27701a=_0x2770();let _0x1c6454=_0x27701a[_0x4cf086];return _0x1c6454;}import{spawn as _0x341d9f,spawnSync as _0x35ecae}from'node:child_process';import{createRequire as _0x39797b}from'node:module';import{zipSync as _0x254954,strToU8 as _0x49ae04}from'fflate';import{detectAll as _0x1190f2}from'./detect.mjs';import{getDeviceId as _0x348855}from'./device.mjs';import{expandPath as _0x4ca98b}from'./render.mjs';import{askSecret as _0x1e410f,confirm as _0x18edf9}from'./prompt.mjs';import*as _0x29b0ad from'./ui.mjs';const f=_0x39797b(import.meta.url)(_0x47433b(0x138))[_0x47433b(0xe1)],g=_0x47433b(0x190)+f,h=[{'label':_0x47433b(0x11e),'win':_0x47433b(0x18e)},{'label':_0x47433b(0xc9),'win':_0x47433b(0x1ba)},{'label':_0x47433b(0x1dd),'win':'%userprofile%\x5c.gemini\x5csettings.json'}],$=['claude','codex',_0x47433b(0x111),'grok',_0x47433b(0x1e2)],y={'claude':['-p','hi'],'codex':[_0x47433b(0xf1),'hi'],'gemini':['-p','hi'],'grok':['-p','hi'],'opencode':['run','hi']},A=0x2800,w={'ok':'正常(HTTP\x202xx)','slow':_0x47433b(0x191),'fail':_0x47433b(0x135)},k=/sk-([a-zA-Z0-9]{10,})/,T=/(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["']([a-zA-Z0-9._-]{10,})["']/,I=/export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?)([a-zA-Z0-9._-]{10,})/,v=/(?:base_url|api_base_url|api_base|apiBase|ANTHROPIC_BASE_URL|BASE_URL)["':\s=]+["']?(https?:\/\/[^\s"'`]+)/i,P=/https?:\/\/[^\s"'`}]+/;function b(){const _0x29aef8=_0x47433b,_0x2075ed={'ZKjXt':_0x29aef8(0x11d)};return _0x2075ed[_0x29aef8(0xcc)]===process[_0x29aef8(0x171)];}function x(_0xa0b3c7){const _0x16eaa1=_0x47433b,_0x45de93={'xboEI':function(_0x4a2e45){return _0x4a2e45();}};return _0x4ca98b(_0x45de93[_0x16eaa1(0x1a1)](b)?_0xa0b3c7[_0x16eaa1(0x18b)]:_0xa0b3c7[_0x16eaa1(0x12d)],{'isWindows':b()});}function O(_0x2a4bd8){const _0x8771a7=_0x47433b,_0xcaed92={'pjkro':_0x8771a7(0x16f)};return _0x2a4bd8?/^sk-[A-Za-z0-9_-]{20,}$/[_0x8771a7(0x1b2)](_0x2a4bd8)?_0x8771a7(0x1c4)+_0x2a4bd8[_0x8771a7(0x15b)](-0x6):_0x2a4bd8[_0x8771a7(0xda)]<=0x8?_0xcaed92[_0x8771a7(0xfa)]:_0x8771a7(0x18c)+_0x2a4bd8[_0x8771a7(0x15b)](-0x6):null;}function E(_0x29aa5e){const _0x198341=_0x47433b,_0x472dbe={'wboCS':function(_0x4b05b7,_0x2b542b){return _0x4b05b7==_0x2b542b;},'HvTSz':_0x198341(0xdd),'SBius':_0x198341(0x18d)};return _0x472dbe[_0x198341(0x1e8)](_0x472dbe[_0x198341(0x1b7)],typeof _0x29aa5e)?_0x29aa5e[_0x198341(0xcd)](/:\/\/[^@/\s]+@/,_0x472dbe[_0x198341(0x188)]):_0x29aa5e;}export function redact(_0x4a00a1){const _0x2b6d45=_0x47433b,_0x492eb2={'qPFwX':function(_0x3e3e50,_0x176256){return _0x3e3e50!=_0x176256;},'LkQQl':'string','jmovC':function(_0x362410,_0x44664c){return _0x362410===_0x44664c;}};if(_0x492eb2['qPFwX'](_0x492eb2['LkQQl'],typeof _0x4a00a1)||_0x492eb2[_0x2b6d45(0x1ce)]('',_0x4a00a1))return _0x4a00a1;let _0x24edf0=_0x4a00a1;return _0x24edf0=_0x24edf0[_0x2b6d45(0xcd)](/sk-[A-Za-z0-9_-]{20,}/g,_0x4b34ce=>_0x2b6d45(0x1c4)+_0x4b34ce[_0x2b6d45(0x15b)](-0x6)),_0x24edf0=_0x24edf0['replace'](/[Bb]earer\s+\S+/g,_0x2b6d45(0xce)),_0x24edf0=_0x24edf0[_0x2b6d45(0xcd)](/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,_0x30718d=>{const _0x3b6e71=_0x2b6d45,_0x115262=_0x30718d[_0x3b6e71(0x146)]('@');return _0x30718d[0x0]+_0x3b6e71(0x16f)+_0x30718d[_0x3b6e71(0x15b)](_0x115262);}),_0x24edf0;}function S(_0xf6297f){const _0x80cce0=_0x47433b,_0x1d7adf={'LwOaF':function(_0x4bde93,_0xfcc4eb){return _0x4bde93(_0xfcc4eb);}};let _0x98c3ac=_0x1d7adf[_0x80cce0(0xf4)](redact,_0xf6297f);return _0x98c3ac=_0x98c3ac[_0x80cce0(0xcd)](/((?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["'])([a-zA-Z0-9._-]{10,})(["'])/gi,(_0x2b80d2,_0x164cbd,_0x61c90f,_0x95d8d9)=>''+_0x164cbd+O(_0x61c90f)+_0x95d8d9),_0x98c3ac=_0x98c3ac['replace'](/(export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?))([a-zA-Z0-9._-]{10,})/gi,(_0x464fc8,_0x52a7c7)=>_0x52a7c7+_0x80cce0(0x16f)),_0x98c3ac;}function j(_0x47aed5){const _0x1f5627=_0x47433b,_0x3893b6=_0x47aed5[_0x1f5627(0xf0)](k);if(_0x3893b6)return _0x1f5627(0xee)+_0x3893b6[0x1];const _0x2fd114=_0x47aed5['match'](T);if(_0x2fd114)return _0x2fd114[0x1];const _0x46e202=_0x47aed5['match'](I);return _0x46e202?_0x46e202[0x2]:null;}function C(_0x30dc76,_0x54431b){const _0x1540cd=_0x47433b,_0xb0deb2=_0x30dc76[_0x1540cd(0xf0)](v);if(_0xb0deb2)return _0xb0deb2[0x1]['replace'](/\/+$/,'');const _0x51fbdc=_0x30dc76[_0x1540cd(0xf0)](P);return _0x51fbdc?_0x51fbdc[0x1][_0x1540cd(0xcd)](/\/+$/,''):_0x54431b;}function N(_0x110aba,_0x42ea5e,_0x481d06,_0xe20eef){const _0xba8fea=_0x47433b,_0x2a0b93={'qvZxY':function(_0x42236d,_0x147d72){return _0x42236d(_0x147d72);},'MiZLk':function(_0x362987,_0x303e4b){return _0x362987>=_0x303e4b;},'lJsps':function(_0x26b436,_0x5d8557){return _0x26b436<=_0x5d8557;}},_0x6f9837=_0x2a0b93['qvZxY'](Number,_0x110aba);return Number[_0xba8fea(0x145)](_0x6f9837)&&_0x2a0b93['MiZLk'](_0x6f9837,_0x481d06)&&_0x2a0b93[_0xba8fea(0x1d2)](_0x6f9837,_0xe20eef)?Math[_0xba8fea(0x1b0)](_0x6f9837):_0x42ea5e;}function K(_0xfcef67){const _0x2f3427=_0x47433b,_0x3edd21={'seUfP':function(_0x4cbf5d,_0x210c65){return _0x4cbf5d===_0x210c65;},'SFJgY':_0x2f3427(0x147),'NHZAG':function(_0xef0308,_0x5da618){return _0xef0308>=_0x5da618;},'gcofe':function(_0x5f0153,_0x514cb0){return _0x5f0153(_0x514cb0);},'jrEEd':_0x2f3427(0x18a),'KzKJG':_0x2f3427(0x103),'brvEO':_0x2f3427(0xd5),'tqdwL':'https:','Dlqmc':'GET','uSMUu':function(_0x56dec7){return _0x56dec7();},'EgjHl':_0x2f3427(0x176),'YDFIu':_0x2f3427(0x1d1),'NNYVs':'error','OCcNO':'builtin','PnVNy':'gpt-5.5','aIMzs':_0x2f3427(0x105),'wTASr':_0x2f3427(0x106)},_0x55e8fa={'profile_version':_0x3edd21[_0x2f3427(0x116)],'models':[_0x3edd21[_0x2f3427(0x108)],_0x3edd21[_0x2f3427(0xd8)],_0x2f3427(0x14a)],'timeout_ms':0x7530,'max_tokens':0x1,'concurrency':0x2,'hints':{...w},'source':_0x3edd21[_0x2f3427(0x178)]};return new Promise(_0x3e4356=>{const _0x4a5901=_0x2f3427,_0x5b20be={'HlxDE':function(_0x310baa,_0x20db25){const _0x13932e=_0x1c64;return _0x3edd21[_0x13932e(0x173)](_0x310baa,_0x20db25);},'xPFPW':_0x3edd21[_0x4a5901(0x15f)],'rkULO':function(_0x4c8d8e,_0x38f88d,_0x50aab5,_0x369885,_0x429daf){return _0x4c8d8e(_0x38f88d,_0x50aab5,_0x369885,_0x429daf);},'Ajdce':_0x4a5901(0xf7),'JFYzp':function(_0x479b30,_0x46e44c){return _0x3edd21['NHZAG'](_0x479b30,_0x46e44c);},'ZlJEF':function(_0x546063,_0x5202ce){const _0x1500c1=_0x4a5901;return _0x3edd21[_0x1500c1(0xca)](_0x546063,_0x5202ce);},'oMgiE':_0x3edd21['jrEEd'],'faRNx':_0x3edd21[_0x4a5901(0x104)]};let _0x5afbef;try{_0x5afbef=new URL(_0x3edd21[_0x4a5901(0xc6)],_0xfcef67);}catch{return void _0x3edd21[_0x4a5901(0xca)](_0x3e4356,_0x55e8fa);}const _0x1af3b5=(_0x3edd21[_0x4a5901(0x173)](_0x3edd21[_0x4a5901(0x154)],_0x5afbef['protocol'])?_0x11d069:_0x411298)[_0x4a5901(0x1a0)](_0x5afbef,{'method':_0x3edd21['Dlqmc'],'headers':{'User-Agent':g,'X-Device-Id':_0x3edd21[_0x4a5901(0x17d)](_0x348855),'Accept':_0x3edd21['EgjHl']},'timeout':0x2710},_0x2af0a4=>{const _0xc4b28=_0x4a5901,_0x1b0772={'Ywzzd':function(_0x144ca2,_0x20fa08){const _0x16c7e9=_0x1c64;return _0x5b20be[_0x16c7e9(0x175)](_0x144ca2,_0x20fa08);},'hUMPx':_0x5b20be[_0xc4b28(0xe0)],'OMbpd':function(_0x1b37f9,_0x24f168,_0x571191,_0x236223,_0x56f8e2){const _0x4b63cf=_0xc4b28;return _0x5b20be[_0x4b63cf(0x1e7)](_0x1b37f9,_0x24f168,_0x571191,_0x236223,_0x56f8e2);},'RmapU':_0x5b20be['Ajdce'],'UlhAX':function(_0x31c129,_0x306a6e){const _0x4bc2c2=_0xc4b28;return _0x5b20be[_0x4bc2c2(0x166)](_0x31c129,_0x306a6e);},'BWKCD':function(_0x42c596,_0x4a0dc6){const _0x326c20=_0xc4b28;return _0x5b20be[_0x326c20(0xe3)](_0x42c596,_0x4a0dc6);},'EGkmV':_0xc4b28(0x102)},_0x489931=[];_0x2af0a4['on'](_0x5b20be['oMgiE'],_0x1faad6=>_0x489931[_0xc4b28(0x15e)](_0x1faad6)),_0x2af0a4['on'](_0x5b20be['faRNx'],()=>{const _0x45ff81=_0xc4b28;if(_0x2af0a4[_0x45ff81(0x177)]<0xc8||_0x1b0772[_0x45ff81(0x1e6)](_0x2af0a4[_0x45ff81(0x177)],0x12c))_0x1b0772['BWKCD'](_0x3e4356,_0x55e8fa);else try{const _0x34758e=Buffer['concat'](_0x489931)[_0x45ff81(0xe8)](_0x1b0772[_0x45ff81(0xea)]);_0x1b0772[_0x45ff81(0x132)](_0x3e4356,function(_0x3b4762,_0x35a208){const _0x2c7d83=_0x45ff81,_0x29f353=Array[_0x2c7d83(0x1ef)](_0x3b4762[_0x2c7d83(0x197)])?_0x3b4762[_0x2c7d83(0x197)][_0x2c7d83(0x1ed)](_0x4c7a49=>_0x2c7d83(0xdd)==typeof _0x4c7a49&&_0x4c7a49[_0x2c7d83(0x179)]()):[];if(_0x1b0772['Ywzzd'](0x0,_0x29f353[_0x2c7d83(0xda)]))return _0x35a208;const _0x428165=_0x3b4762[_0x2c7d83(0x187)]&&_0x1b0772['hUMPx']==typeof _0x3b4762[_0x2c7d83(0x187)]&&!Array['isArray'](_0x3b4762[_0x2c7d83(0x187)])?{..._0x35a208[_0x2c7d83(0x187)],..._0x3b4762[_0x2c7d83(0x187)]}:{..._0x35a208[_0x2c7d83(0x187)]};return{'profile_version':_0x3b4762['profile_version']??null,'models':_0x29f353,'timeout_ms':_0x1b0772[_0x2c7d83(0x136)](N,_0x3b4762[_0x2c7d83(0x155)],_0x35a208[_0x2c7d83(0x155)],0x3e8,0x1d4c0),'max_tokens':N(_0x3b4762[_0x2c7d83(0x19a)],_0x35a208[_0x2c7d83(0x19a)],0x1,0x40),'concurrency':_0x1b0772[_0x2c7d83(0x136)](N,_0x3b4762[_0x2c7d83(0x1d9)],_0x35a208[_0x2c7d83(0x1d9)],0x1,0x8),'hints':_0x428165,'source':_0x1b0772[_0x2c7d83(0xd2)]};}(_0x34758e?JSON['parse'](_0x34758e):{},_0x55e8fa));}catch{_0x3e4356(_0x55e8fa);}});});_0x1af3b5['on'](_0x3edd21[_0x4a5901(0x10b)],()=>_0x1af3b5['destroy'](new Error(_0x4a5901(0x1d1)))),_0x1af3b5['on'](_0x3edd21['NNYVs'],()=>_0x3e4356(_0x55e8fa)),_0x1af3b5['end']();});}function H({baseUrl:_0x363849,apiKey:_0x3e0e26,model:_0x2acd43,maxTokens:_0x45e202,timeoutMs:_0x329d54,deviceId:_0x39767e}){const _0x3cf10d=_0x47433b,_0x152baf={'lCFrq':function(_0x5b8340,_0x160fe3){return _0x5b8340<=_0x160fe3;},'LeZIF':'utf8','wWAZj':function(_0x53b98c,_0x4bada2){return _0x53b98c-_0x4bada2;},'lLLGv':function(_0x170766,_0x562863){return _0x170766-_0x562863;},'imXog':_0x3cf10d(0x18a),'BHcfI':_0x3cf10d(0x103),'gpfUG':function(_0x37eb1c,_0x11f79a){return _0x37eb1c/_0x11f79a;},'YnnET':function(_0x40729f,_0x1e0d28){return _0x40729f(_0x1e0d28);},'XbGpU':function(_0x14fcac,_0xd15ab1){return _0x14fcac(_0xd15ab1);},'lfaAI':function(_0x361391,_0x2e14e5){return _0x361391===_0x2e14e5;},'RFlIO':_0x3cf10d(0xff),'EawyD':'user','rKafi':'POST','DQkxE':_0x3cf10d(0x176),'wnZvC':_0x3cf10d(0x192)};return new Promise(_0x14d741=>{const _0x158ed6=_0x3cf10d,_0xf17cf={'qOTUy':function(_0x42b5fb,_0xe80b6){const _0x415db5=_0x1c64;return _0x152baf[_0x415db5(0x12a)](_0x42b5fb,_0xe80b6);}},_0x20a547=Date[_0x158ed6(0xe6)]();let _0x222cd0,_0x5dfecb=null;try{_0x222cd0=new URL(_0x158ed6(0x110),_0x363849);}catch{return void _0x152baf['XbGpU'](_0x14d741,{'request_id':null,'status':null,'ttfb_ms':null,'total_ms':Date['now']()-_0x20a547,'error':_0x158ed6(0x11a)+_0x363849,'response_preview':''});}const _0x3181f6=_0x152baf[_0x158ed6(0x100)](_0x152baf['RFlIO'],_0x222cd0['protocol'])?_0x11d069:_0x411298,_0x59ef3c=JSON[_0x158ed6(0x16a)]({'model':_0x2acd43,'messages':[{'role':_0x152baf['EawyD'],'content':'hi'}],'max_tokens':_0x45e202,'stream':!0x1}),_0x5a2341=_0x3181f6[_0x158ed6(0x1a0)](_0x222cd0,{'method':_0x152baf[_0x158ed6(0x168)],'headers':{'Authorization':'Bearer\x20'+_0x3e0e26,'User-Agent':g,'X-Device-Id':_0x39767e,'Content-Type':_0x152baf[_0x158ed6(0x13d)],'Content-Length':Buffer[_0x158ed6(0x17b)](_0x59ef3c)},'timeout':_0x329d54},_0x5e0264=>{const _0x2dedc5=_0x158ed6,_0x11acaa={'jJJUW':function(_0x1bbb7b,_0x2186f4){return _0x152baf['lCFrq'](_0x1bbb7b,_0x2186f4);},'YpyII':_0x152baf['LeZIF'],'QHlOK':'x-request-id','rvnlv':function(_0x563f7a,_0x1b818a){const _0x213c06=_0x1c64;return _0x152baf[_0x213c06(0x19b)](_0x563f7a,_0x1b818a);}};_0x5dfecb=_0x152baf[_0x2dedc5(0x129)](Date[_0x2dedc5(0xe6)](),_0x20a547);const _0x10639c=[];let _0x5186d4=0x0;_0x5e0264['on'](_0x152baf[_0x2dedc5(0x184)],_0x41054b=>{const _0x3e9e1f=_0x2dedc5;_0x5186d4+=_0x41054b[_0x3e9e1f(0xda)],_0x11acaa['jJJUW'](_0x5186d4,0x40000)&&_0x10639c['push'](_0x41054b);}),_0x5e0264['on'](_0x152baf[_0x2dedc5(0x1b4)],()=>{const _0x617295=_0x2dedc5,_0x42a3b0=Buffer['concat'](_0x10639c)[_0x617295(0xe8)](_0x11acaa[_0x617295(0x170)]);_0x14d741({'request_id':_0x5e0264[_0x617295(0x121)][_0x11acaa[_0x617295(0xc4)]]||null,'status':_0x5e0264[_0x617295(0x177)],'ttfb_ms':_0x5dfecb,'total_ms':_0x11acaa[_0x617295(0x10d)](Date[_0x617295(0xe6)](),_0x20a547),'error':null,'response_preview':_0x42a3b0[_0x617295(0x15b)](0x0,0x1f4)});});});_0x5a2341['on'](_0x158ed6(0x1d1),()=>{const _0x11476d=_0x158ed6;_0x5a2341[_0x11476d(0x112)](new Error('请求超时('+_0x152baf[_0x11476d(0xf8)](_0x329d54,0x3e8)+_0x11476d(0x109)+_0x222cd0[_0x11476d(0x1a8)]));}),_0x5a2341['on'](_0x152baf[_0x158ed6(0x10e)],_0x5a04b4=>{const _0x2ce279=_0x158ed6;_0xf17cf[_0x2ce279(0x1d8)](_0x14d741,{'request_id':null,'status':null,'ttfb_ms':_0x5dfecb,'total_ms':Date[_0x2ce279(0xe6)]()-_0x20a547,'error':_0x5a04b4[_0x2ce279(0x120)],'response_preview':''});}),_0x5a2341[_0x158ed6(0x103)](_0x59ef3c);});}function L(_0x571137){const _0x11f501=_0x47433b,_0x45c8ee={'ePIry':function(_0xf2c80e,_0x21554a){return _0xf2c80e>=_0x21554a;},'qRqjF':function(_0x544955,_0x51c9db){return _0x544955<_0x51c9db;},'wViGo':function(_0x1c2746,_0x1562f1){return _0x1c2746>_0x1562f1;},'sLmKp':_0x11f501(0x139),'WxxVh':'fail'};return _0x45c8ee[_0x11f501(0xf5)](_0x571137['status'],0xc8)&&_0x45c8ee['qRqjF'](_0x571137[_0x11f501(0x19d)],0x12c)?null!=_0x571137[_0x11f501(0x124)]&&_0x45c8ee[_0x11f501(0x182)](_0x571137[_0x11f501(0x124)],0x2710)?_0x45c8ee[_0x11f501(0x1c1)]:'ok':_0x45c8ee[_0x11f501(0x1d4)];}function R(_0x388dcf,_0x3874a8){const _0x237c32=_0x47433b,_0x581ba5={'vwhHG':function(_0x11a5e9,_0x83f4da){return _0x11a5e9(_0x83f4da);},'FUrWm':function(_0x12be0e,_0x2abbb0){return _0x12be0e(_0x2abbb0);},'MZGqd':function(_0x4b03bd,_0xbfb459){return _0x4b03bd-_0xbfb459;},'DnMBK':function(_0x128175,_0x3d6f18,_0x5cd856,_0x3818ad){return _0x128175(_0x3d6f18,_0x5cd856,_0x3818ad);},'vRnNM':'taskkill','cQgDG':_0x237c32(0x1cb),'tWMSP':_0x237c32(0x114),'gdaKz':function(_0x432929,_0x545aea){return _0x432929<_0x545aea;},'mQKvw':_0x237c32(0x102),'yAgcg':_0x237c32(0xdf),'tPDFi':function(_0x4ba17a,_0x44ce46){return _0x4ba17a(_0x44ce46);},'xOTpg':function(_0x2b9251,_0x3006d4,_0x17322a){return _0x2b9251(_0x3006d4,_0x17322a);},'JdwGb':_0x237c32(0x18a),'FdPjA':_0x237c32(0x192),'WGZiy':_0x237c32(0x1cd)};return new Promise(_0x12d34d=>{const _0x455f1b=_0x237c32,_0x24e098={'gTlyO':function(_0x29fac9){return _0x29fac9();},'vietp':function(_0x83fd75,_0x41e2a6,_0x31958b,_0xa19d9b){return _0x581ba5['DnMBK'](_0x83fd75,_0x41e2a6,_0x31958b,_0xa19d9b);},'TRQNj':_0x581ba5[_0x455f1b(0x194)],'GMlmb':'/pid','JiPzg':function(_0x1b9b81,_0x499572){const _0x3944d3=_0x455f1b;return _0x581ba5[_0x3944d3(0xcf)](_0x1b9b81,_0x499572);},'DxbTq':_0x581ba5[_0x455f1b(0x199)],'DxrSx':_0x581ba5[_0x455f1b(0xd1)],'qxmMq':function(_0x263c84,_0x3cb076){const _0x155b7a=_0x455f1b;return _0x581ba5[_0x155b7a(0xfb)](_0x263c84,_0x3cb076);},'qJYtT':_0x581ba5['mQKvw'],'mkWSY':function(_0x1038ca,_0x17e0c5){return _0x1038ca(_0x17e0c5);}},_0xe49d0a=[_0x388dcf,..._0x3874a8[_0x455f1b(0x1c0)](_0x430f66=>/\s/[_0x455f1b(0x1b2)](_0x430f66)?JSON[_0x455f1b(0x16a)](_0x430f66):_0x430f66)][_0x455f1b(0x11b)]('\x20'),_0x6e4b50=Date[_0x455f1b(0xe6)]();let _0x4c997f='',_0x4d9d22='',_0x1e8c6f=!0x1,_0x2be2d0=!0x1;const _0x475a7a=_0x265742=>{const _0x29819e=_0x455f1b;_0x2be2d0||(_0x2be2d0=!0x0,_0x581ba5[_0x29819e(0xcf)](clearTimeout,_0x560211),_0x581ba5['FUrWm'](_0x12d34d,{'cli':_0x388dcf,'cmd':_0xe49d0a,'exit_code':_0x265742,'duration_ms':_0x581ba5[_0x29819e(0x1f2)](Date['now'](),_0x6e4b50),'timed_out':_0x1e8c6f,'stdout':redact(_0x4c997f[_0x29819e(0x15b)](0x0,A)),'stderr':_0x581ba5[_0x29819e(0x183)](redact,_0x4d9d22[_0x29819e(0x15b)](0x0,A))}));};let _0x2c1f1c;try{const _0x334f25=b()?process[_0x455f1b(0x1c8)][_0x455f1b(0x1df)]||_0x455f1b(0x1b9):_0x388dcf,_0x1efc13=b()?['/c',_0x388dcf,..._0x3874a8]:_0x3874a8;_0x2c1f1c=_0x341d9f(_0x334f25,_0x1efc13,{'stdio':[_0x581ba5[_0x455f1b(0x199)],_0x455f1b(0xdf),_0x581ba5[_0x455f1b(0x11f)]],'env':process['env']});}catch(_0x29d67b){return _0x4d9d22=_0x455f1b(0x153)+_0x29d67b[_0x455f1b(0x120)],void _0x581ba5['tPDFi'](_0x475a7a,null);}const _0x560211=_0x581ba5[_0x455f1b(0x127)](setTimeout,()=>{_0x1e8c6f=!0x0,function(_0x54c59d){const _0x142375=_0x1c64;if(_0x54c59d&&!_0x54c59d['killed']){if(_0x24e098[_0x142375(0x113)](b)&&_0x54c59d[_0x142375(0x1e9)])try{return void _0x24e098[_0x142375(0x115)](_0x35ecae,_0x24e098[_0x142375(0xfe)],[_0x24e098[_0x142375(0x142)],_0x24e098['JiPzg'](String,_0x54c59d[_0x142375(0x1e9)]),'/T','/F'],{'stdio':_0x24e098[_0x142375(0xc5)]});}catch{}try{_0x54c59d[_0x142375(0x17f)](_0x24e098['DxrSx']);}catch{}}}(_0x2c1f1c);},0x7530);_0x2c1f1c[_0x455f1b(0xd3)]&&_0x2c1f1c[_0x455f1b(0xd3)]['on'](_0x581ba5['JdwGb'],_0x10cc98=>{const _0x3b297d=_0x455f1b;_0x24e098[_0x3b297d(0x19f)](_0x4c997f[_0x3b297d(0xda)],0x5000)&&(_0x4c997f+=_0x10cc98[_0x3b297d(0xe8)](_0x24e098[_0x3b297d(0x1b3)]));}),_0x2c1f1c[_0x455f1b(0x130)]&&_0x2c1f1c[_0x455f1b(0x130)]['on'](_0x581ba5[_0x455f1b(0x144)],_0x57dc76=>{const _0x2e0d3f=_0x455f1b;_0x24e098[_0x2e0d3f(0x19f)](_0x4d9d22[_0x2e0d3f(0xda)],0x5000)&&(_0x4d9d22+=_0x57dc76[_0x2e0d3f(0xe8)]('utf8'));}),_0x2c1f1c['on'](_0x581ba5['FdPjA'],_0x2e900f=>{const _0x47ea1a=_0x455f1b;_0x4d9d22+=_0x47ea1a(0x1cf)+_0x2e900f[_0x47ea1a(0x120)],_0x24e098[_0x47ea1a(0x1db)](_0x475a7a,null);}),_0x2c1f1c['on'](_0x581ba5[_0x455f1b(0x1bf)],_0x3b6857=>_0x475a7a(_0x3b6857));});}function U(_0x4f4979){const _0x1e8bf1=_0x47433b,_0x535d2a=_0x4f4979[_0x1e8bf1(0xf0)](/~\/\.([^/]+)\/(.+)$/);return _0x535d2a?_0x535d2a[0x1]+'_'+_0x535d2a[0x2]:_0x4f4979[_0x1e8bf1(0xcd)](/[~\\/]/g,'_');}function z({summary:_0x3fe9a5,modelCount:_0x13d9c6}){const _0xc2a2da=_0x47433b,_0x5cf365={'tMauL':_0xc2a2da(0xf7),'woMoV':'后端下发'};return _0xc2a2da(0xec)+_0x3fe9a5['generated_at']+_0xc2a2da(0xfc)+_0x3fe9a5[_0xc2a2da(0x15d)]+_0xc2a2da(0xd9)+_0x3fe9a5[_0xc2a2da(0x1d3)]+_0xc2a2da(0x149)+_0x3fe9a5[_0xc2a2da(0x1cc)][_0xc2a2da(0x1a9)]+_0xc2a2da(0x13b)+_0x3fe9a5[_0xc2a2da(0x1cc)][_0xc2a2da(0xdb)]+')\x0a配置来源:'+(_0x5cf365[_0xc2a2da(0x1f0)]===_0x3fe9a5['config_source']?_0x5cf365[_0xc2a2da(0x1e0)]:_0xc2a2da(0x161))+_0xc2a2da(0x156)+_0x13d9c6+_0xc2a2da(0xd0);}function D(_0x177942){const _0xade40f=_0x47433b,_0x172e14={'fecqj':function(_0x5838e5,_0x352dbe){return _0x5838e5>_0x352dbe;},'FCkhi':function(_0x1dcb69,_0xb9c55b){return _0x1dcb69+_0xb9c55b;}};return _0x172e14[_0xade40f(0x107)](_0x177942[_0xade40f(0xda)],0x0)?_0x172e14['FCkhi'](_0x177942[_0xade40f(0x11b)]('\x0a'),'\x0a'):'';}function Y(_0x7b6e69,_0x2cbb28){const _0x38c685=_0x47433b;return _0x705772[_0x38c685(0x11b)](_0x2cbb28||process[_0x38c685(0x1e3)](),'tokenshop-diagnose-'+_0x7b6e69+_0x38c685(0x1ee));}export async function runDiagnose({apiBase:_0x49dac8,opts:_0x293594={},ui:_0x385d3b={}}){const _0x7a1689=_0x47433b,_0x2f75d1={'CskIq':function(_0x2bfaae,_0x4f3dea){return _0x2bfaae(_0x4f3dea);},'Shndt':_0x7a1689(0x102),'XnKxe':function(_0x3f680d){return _0x3f680d();},'BAaRJ':function(_0x341d50,_0x1f0d0e){return _0x341d50+_0x1f0d0e;},'TUdke':function(_0x510c86,_0x420167){return _0x510c86&_0x420167;},'zishI':_0x7a1689(0x13a),'cWvcG':'ALL_PROXY','vlFsj':function(_0x59f208,_0x4ac49e){return _0x59f208(_0x4ac49e);},'PAqeE':function(_0x2d7089,_0x3ec536){return _0x2d7089==_0x3ec536;},'xANjR':_0x7a1689(0xdd),'QCsDR':function(_0x555bb1,_0x1aa05a){return _0x555bb1>_0x1aa05a;},'QfQUt':function(_0x49f0e8,_0x5a21bc){return _0x49f0e8(_0x5a21bc);},'zdlpp':function(_0xeeaf38,_0x35e378){return _0xeeaf38<_0x35e378;},'WxXIE':function(_0xf58eee,_0x356221){return _0xf58eee+_0x356221;},'KsoQw':function(_0x286ff7,_0x5f179a){return _0x286ff7(_0x5f179a);},'ZdsGg':function(_0x42bd20,_0x1f3c0b){return _0x42bd20(_0x1f3c0b);},'UhBys':function(_0x2ee48a,_0x90d6b8){return _0x2ee48a(_0x90d6b8);},'dehMf':function(_0xb2135,_0x2aa83d){return _0xb2135(_0x2aa83d);},'BLVth':function(_0x4be4ae,_0x105049){return _0x4be4ae(_0x105049);},'MOOIn':_0x7a1689(0x10a),'kmakj':_0x7a1689(0x1c6),'tkBIc':function(_0x13af95,_0x51cfa5){return _0x13af95(_0x51cfa5);},'scJYW':_0x7a1689(0x12e),'MTBAd':_0x7a1689(0x1c9),'FYZyv':_0x7a1689(0x15c),'hKGpi':function(_0x3fedc9,_0x4bedb4){return _0x3fedc9(_0x4bedb4);},'rUVBg':_0x7a1689(0x125),'XYovh':_0x7a1689(0x1b8),'oYofx':function(_0x1afaed,_0x17ba14){return _0x1afaed(_0x17ba14);},'lbOPt':function(_0x3736d2,_0x20a966){return _0x3736d2===_0x20a966;},'lTGHT':_0x7a1689(0xf7),'RigDd':function(_0x5b3513,_0xb52795){return _0x5b3513/_0xb52795;},'EHaBF':function(_0x14fa40,_0x18d0bd){return _0x14fa40(_0x18d0bd);},'XVoUJ':function(_0x477c0f,_0x256805){return _0x477c0f+_0x256805;},'OcNlK':'。继续?','OvPwW':'用户取消诊断','gxfxi':function(_0x1ff30a,_0x24c1e9){return _0x1ff30a===_0x24c1e9;},'gNUoZ':_0x7a1689(0x139),'FaLEc':_0x7a1689(0x1a3),'fvMpI':_0x7a1689(0x164),'LEsXA':function(_0x171bba,_0x223fc6,_0x21a2e0){return _0x171bba(_0x223fc6,_0x21a2e0);},'UfVIK':function(_0x219084,_0x50648a){return _0x219084===_0x50648a;},'HBJSu':_0x7a1689(0x18f),'AALiY':_0x7a1689(0x148),'SgOOX':function(_0xfa60e7,_0x4f34c8){return _0xfa60e7(_0x4f34c8);},'XHoMV':function(_0x5973ef,_0x5d3abd){return _0x5973ef(_0x5d3abd);}},_0x4873eb={..._0x29b0ad,..._0x385d3b},_0x2d305b={'yes':!0x1,'models':void 0x0,'skipCliTests':!0x1,'outDir':void 0x0,..._0x293594};_0x4873eb[_0x7a1689(0xd7)](_0x2f75d1[_0x7a1689(0x159)]);let _0x3a1829=function(_0xb10a57){const _0x32bea9=_0x7a1689;for(const _0x5ea08e of h){const _0x3e5e02=_0x2f75d1[_0x32bea9(0xfd)](x,_0x5ea08e);let _0x4fee44;try{_0x4fee44=_0x218346[_0x32bea9(0x11c)](_0x3e5e02,_0x2f75d1[_0x32bea9(0x14e)]);}catch{continue;}const _0x2633ae=_0x2f75d1[_0x32bea9(0xfd)](j,_0x4fee44);if(_0x2633ae)return{'key':_0x2633ae,'baseUrl':C(_0x4fee44,_0xb10a57),'source':_0x5ea08e[_0x32bea9(0x12d)]};}return null;}(_0x49dac8);if(_0x3a1829)_0x4873eb['ok'](_0x7a1689(0x122)+_0x3a1829[_0x7a1689(0x1a9)]+'('+_0x2f75d1[_0x7a1689(0x1ec)](O,_0x3a1829[_0x7a1689(0x193)])+_0x7a1689(0x151)+_0x3a1829[_0x7a1689(0xde)]+')');else{_0x4873eb[_0x7a1689(0x1e5)](_0x2f75d1[_0x7a1689(0x12f)]);const _0x5c05aa=(await _0x2f75d1[_0x7a1689(0x1c7)](_0x1e410f,_0x2f75d1['scJYW']))[_0x7a1689(0x179)]();if(!_0x5c05aa)throw new Error(_0x2f75d1['MTBAd']);_0x3a1829={'key':_0x5c05aa,'baseUrl':_0x49dac8,'source':_0x2f75d1[_0x7a1689(0x1e1)]},_0x4873eb['ok'](_0x7a1689(0x1f1)+_0x2f75d1[_0x7a1689(0xc2)](O,_0x5c05aa)+_0x7a1689(0x151)+_0x3a1829[_0x7a1689(0xde)]+')');}_0x4873eb['step'](_0x2f75d1[_0x7a1689(0x12c)]);const _0x3a0ee0=(function(){const _0x4051e8=_0x7a1689,_0x4ab745=_0x2f75d1[_0x4051e8(0x16c)](_0x1190f2),_0x1c36a6={};for(const _0x3b8f67 of h){const _0x1da996=x(_0x3b8f67),_0x12252a={'path':_0x1da996,'exists':!0x1};try{const _0x1d1476=_0x218346['statSync'](_0x1da996);_0x12252a[_0x4051e8(0xdc)]=!0x0,_0x12252a[_0x4051e8(0x140)]=_0x1d1476[_0x4051e8(0x140)],_0x12252a[_0x4051e8(0x128)]=_0x1d1476[_0x4051e8(0x128)]['toISOString'](),_0x12252a[_0x4051e8(0x1bd)]=_0x2f75d1[_0x4051e8(0xc8)]('0',_0x2f75d1[_0x4051e8(0x14c)](0x1ff,_0x1d1476[_0x4051e8(0x1bd)])[_0x4051e8(0xe8)](0x8));}catch{}_0x1c36a6[_0x3b8f67['label']]=_0x12252a;}const _0xdd76b1={};for(const _0x335393 of[_0x2f75d1[_0x4051e8(0x1b6)],'HTTPS_PROXY',_0x2f75d1[_0x4051e8(0x10c)],'NO_PROXY']){const _0x435b05=process['env'][_0x335393]??process[_0x4051e8(0x1c8)][_0x335393[_0x4051e8(0x141)]()]??null;_0xdd76b1[_0x335393]=_0x2f75d1[_0x4051e8(0x186)](E,_0x435b05);}return{'os':_0x4ab745['os'],'node':_0x4ab745[_0x4051e8(0x1c2)],'installed_clis':_0x4ab745[_0x4051e8(0xeb)],'config_files':_0x1c36a6,'proxy_env':_0xdd76b1};}());_0x4873eb[_0x7a1689(0x196)](_0x7a1689(0x16e)+_0x3a0ee0['os'][_0x7a1689(0x171)]+_0x7a1689(0x17a)+_0x3a0ee0[_0x7a1689(0x1c2)]['version']+_0x7a1689(0xe4)+Object[_0x7a1689(0xe7)](_0x3a0ee0[_0x7a1689(0x16d)])[_0x7a1689(0xda)]+'\x20个'),_0x4873eb['step'](_0x2f75d1[_0x7a1689(0x1a7)]);const _0x552d93=await _0x2f75d1[_0x7a1689(0xf2)](K,_0x49dac8);_0x2f75d1[_0x7a1689(0x185)](_0x2f75d1[_0x7a1689(0x152)],_0x552d93[_0x7a1689(0x1a9)])?_0x4873eb['ok'](_0x7a1689(0x123)+_0x552d93['models']['length']+_0x7a1689(0x17e)+_0x2f75d1[_0x7a1689(0x13c)](_0x552d93[_0x7a1689(0x155)],0x3e8)+_0x7a1689(0x19e)+_0x552d93[_0x7a1689(0x1d9)]):_0x4873eb[_0x7a1689(0x1e5)]('后端诊断配置不可用(404/超时/非法),使用内置兜底矩阵');const _0x52d7f0=function(_0x3b13f4,_0x150743){const _0x442e29=_0x7a1689;let _0x4b19a0=_0x3b13f4;return _0x2f75d1[_0x442e29(0x1de)](_0x2f75d1[_0x442e29(0x158)],typeof _0x4b19a0)&&(_0x4b19a0=_0x4b19a0[_0x442e29(0x117)](',')),Array[_0x442e29(0x1ef)](_0x4b19a0)&&(_0x4b19a0=_0x4b19a0['map'](_0x367d49=>String(_0x367d49)[_0x442e29(0x179)]())['filter'](Boolean),_0x2f75d1[_0x442e29(0x1e4)](_0x4b19a0[_0x442e29(0xda)],0x0))?[...new Set(_0x4b19a0)]:_0x150743;}(_0x2d305b[_0x7a1689(0x197)],_0x552d93[_0x7a1689(0x197)]);if(!_0x2d305b[_0x7a1689(0x1d6)]){if(!await _0x2f75d1[_0x7a1689(0x137)](_0x18edf9,_0x2f75d1[_0x7a1689(0x14b)](_0x2f75d1['BAaRJ']('将对\x20'+_0x3a1829['baseUrl']+_0x7a1689(0xe5)+_0x52d7f0['length']+_0x7a1689(0x1dc)+_0x552d93[_0x7a1689(0x19a)]+_0x7a1689(0x181),_0x2d305b['skipCliTests']?'':_0x7a1689(0x189)),_0x2f75d1[_0x7a1689(0x101)])))throw new Error(_0x2f75d1['OvPwW']);}_0x4873eb[_0x7a1689(0xd7)]('HTTP\x20直测('+_0x52d7f0[_0x7a1689(0xda)]+_0x7a1689(0x1da)+_0x552d93[_0x7a1689(0x1d9)]+')');const _0x127f61=await async function({cred:_0x292254,models:_0x31f840,cfg:_0x14206f,deviceId:_0x2b4dc7}){const _0x707183=_0x7a1689,_0x4fc4c8=Math['max'](0x1,_0x14206f[_0x707183(0x1d9)]),_0x291b83=[];for(let _0x591afb=0x0;_0x2f75d1['zdlpp'](_0x591afb,_0x31f840['length']);_0x591afb+=_0x4fc4c8){const _0x486a76=_0x31f840[_0x707183(0x15b)](_0x591afb,_0x2f75d1[_0x707183(0x1ae)](_0x591afb,_0x4fc4c8)),_0x5c765d=await Promise[_0x707183(0x1b5)](_0x486a76['map'](async _0xd6fcdb=>{const _0x295b8f=_0x707183,_0x319c31=await _0x2f75d1['vlFsj'](H,{'baseUrl':_0x292254[_0x295b8f(0xde)],'apiKey':_0x292254['key'],'model':_0xd6fcdb,'maxTokens':_0x14206f[_0x295b8f(0x19a)],'timeoutMs':_0x14206f['timeout_ms'],'deviceId':_0x2b4dc7});return{'model':_0xd6fcdb,..._0x319c31,'code':_0x2f75d1[_0x295b8f(0x157)](L,_0x319c31)};}));_0x291b83['push'](..._0x5c765d);}return _0x291b83;}({'cred':_0x3a1829,'models':_0x52d7f0,'cfg':_0x552d93,'deviceId':_0x2f75d1[_0x7a1689(0x16c)](_0x348855)});for(const _0x35d70 of _0x127f61){const _0x4701e1=_0x35d70['model']+_0x7a1689(0x19c)+(_0x35d70[_0x7a1689(0x19d)]??'ERR')+_0x7a1689(0x131)+(_0x35d70[_0x7a1689(0x124)]??'-')+_0x7a1689(0x165)+_0x552d93['hints'][_0x35d70[_0x7a1689(0x1b1)]];'ok'===_0x35d70['code']?_0x4873eb['ok'](_0x4701e1):_0x2f75d1['gxfxi'](_0x2f75d1[_0x7a1689(0xed)],_0x35d70[_0x7a1689(0x1b1)])?_0x4873eb[_0x7a1689(0x1e5)](_0x4701e1):_0x4873eb[_0x7a1689(0xe9)](_0x4701e1);}const _0x25823e=[];if(_0x2d305b[_0x7a1689(0x134)])_0x4873eb[_0x7a1689(0x196)](_0x2f75d1['FaLEc']);else{const _0x3d9a2f=$[_0x7a1689(0x1ed)](_0x17c5c5=>_0x3a0ee0['installed_clis'][_0x17c5c5]);if(_0x2f75d1[_0x7a1689(0x13e)](0x0,_0x3d9a2f[_0x7a1689(0xda)]))_0x4873eb[_0x7a1689(0x1e5)](_0x2f75d1[_0x7a1689(0x1be)]);else{_0x4873eb[_0x7a1689(0xd7)](_0x7a1689(0x198)+_0x3d9a2f[_0x7a1689(0xda)]+'\x20个,各\x2030s\x20超时)');for(const _0x372ba7 of _0x3d9a2f){_0x4873eb['info']('运行\x20'+_0x372ba7+'\x20'+y[_0x372ba7][_0x7a1689(0x11b)]('\x20')+'\x20…');const _0x233280=await _0x2f75d1[_0x7a1689(0x1bb)](R,_0x372ba7,y[_0x372ba7]);_0x25823e[_0x7a1689(0x15e)](_0x233280),_0x233280[_0x7a1689(0x126)]?_0x4873eb[_0x7a1689(0x1e5)](_0x372ba7+_0x7a1689(0xcb)):_0x2f75d1[_0x7a1689(0x1af)](0x0,_0x233280['exit_code'])?_0x4873eb['ok'](_0x372ba7+_0x7a1689(0x1a5)+_0x233280[_0x7a1689(0x15a)]+'ms'):_0x4873eb[_0x7a1689(0xe9)](_0x372ba7+_0x7a1689(0x195)+(_0x233280[_0x7a1689(0x1ab)]??_0x2f75d1[_0x7a1689(0x174)])+'\x20/\x20'+_0x233280[_0x7a1689(0x15a)]+'ms');}}}_0x4873eb[_0x7a1689(0xd7)](_0x2f75d1['AALiY']);const _0x5742cc=(function(){const _0xe5a68d=_0x7a1689,_0x97d6d4=new Date(),_0x49747e=_0x252ff0=>String(_0x252ff0)[_0xe5a68d(0x1a2)](0x2,'0');return''+_0x97d6d4['getFullYear']()+_0x49747e(_0x97d6d4['getMonth']()+0x1)+_0x2f75d1[_0xe5a68d(0x1ec)](_0x49747e,_0x97d6d4['getDate']())+'T'+_0x49747e(_0x97d6d4[_0xe5a68d(0x1d7)]())+_0x2f75d1[_0xe5a68d(0xf6)](_0x49747e,_0x97d6d4['getMinutes']())+_0x49747e(_0x97d6d4[_0xe5a68d(0x14d)]());}()),_0x160b12=_0x127f61[_0x7a1689(0x1c0)](_0x1ec21f=>JSON[_0x7a1689(0x16a)]({'model':_0x1ec21f[_0x7a1689(0x180)],'request_id':_0x1ec21f[_0x7a1689(0x160)]??null,'status':_0x1ec21f[_0x7a1689(0x19d)]??null,'ttfb_ms':_0x1ec21f[_0x7a1689(0x124)]??null,'total_ms':_0x1ec21f[_0x7a1689(0xef)]??null,'error':_0x1ec21f[_0x7a1689(0x192)]?redact(_0x1ec21f['error']):null,'response_preview':_0x1ec21f[_0x7a1689(0xc3)]?redact(_0x1ec21f['response_preview']):''})),_0x480fed=_0x25823e[_0x7a1689(0x1c0)](_0x4aeae1=>JSON[_0x7a1689(0x16a)](_0x4aeae1)),_0x2ae133=[];for(const _0x36557a of h){let _0x25405f;try{_0x25405f=_0x218346[_0x7a1689(0x11c)](_0x2f75d1['BLVth'](x,_0x36557a),_0x2f75d1[_0x7a1689(0x14e)]);}catch{continue;}_0x2ae133['push']({'name':_0x2f75d1[_0x7a1689(0x1ad)](U,_0x36557a[_0x7a1689(0x12d)])+_0x7a1689(0x13f),'content':_0x2f75d1[_0x7a1689(0x1d5)](S,_0x25405f)});}const _0x44a277={'tool_version':f,'generated_at':new Date()['toISOString'](),'api_base':_0x49dac8,'credential':{'source':_0x3a1829[_0x7a1689(0x1a9)],'key_redacted':_0x2f75d1[_0x7a1689(0xfd)](O,_0x3a1829['key'])},'config_source':_0x552d93[_0x7a1689(0x1a9)],'http_tests':_0x127f61[_0x7a1689(0x1c0)](_0x4a07cf=>({'model':_0x4a07cf[_0x7a1689(0x180)],'status':_0x4a07cf[_0x7a1689(0x19d)]??null,'verdict':_0x552d93[_0x7a1689(0x187)][_0x4a07cf[_0x7a1689(0x1b1)]],'ttfb_ms':_0x4a07cf[_0x7a1689(0x124)]??null,'total_ms':_0x4a07cf['total_ms']??null,'request_id':_0x4a07cf[_0x7a1689(0x160)]??null})),'cli_tests':_0x25823e[_0x7a1689(0x1c0)](_0xf1d085=>({'cli':_0xf1d085[_0x7a1689(0x1c3)],'exit_code':_0xf1d085['exit_code'],'verdict':0x0!==_0xf1d085['exit_code']||_0xf1d085[_0x7a1689(0x126)]?_0x7a1689(0xe9):'ok'})),'zip_path':''},_0x10d23d={'generated_at':_0x44a277[_0x7a1689(0x162)],'tool_version':f,..._0x3a0ee0},_0x3ec1e8=function({stamp:_0x214306,summary:_0x2ab6c6,envJson:_0x489bfd,httpLines:_0x11dea0,cliLines:_0x1640b6,configCopies:_0x510b92,outDir:_0x121245}){const _0x4df23c=_0x7a1689,_0x29eda7='tokenshop-diagnose-'+_0x214306,_0x4d96b1=_0x29eda7+_0x4df23c(0x1ee),_0x5cbf7b={[_0x29eda7+_0x4df23c(0x172)]:_0x2f75d1[_0x4df23c(0x157)](_0x49ae04,JSON['stringify'](_0x2ab6c6,null,0x2)),[_0x29eda7+'/env.json']:_0x2f75d1['UhBys'](_0x49ae04,JSON[_0x4df23c(0x16a)](_0x489bfd,null,0x2)),[_0x29eda7+_0x4df23c(0x1ca)]:_0x49ae04(_0x2f75d1[_0x4df23c(0x186)](D,_0x11dea0)),[_0x29eda7+_0x4df23c(0xd4)]:_0x2f75d1[_0x4df23c(0x1a4)](_0x49ae04,D(_0x1640b6)),[_0x29eda7+'/README.txt']:_0x49ae04(z({'summary':_0x2ab6c6,'modelCount':_0x2ab6c6[_0x4df23c(0x1d0)][_0x4df23c(0xda)]}))};for(const _0x1d7c91 of _0x510b92)_0x5cbf7b[_0x29eda7+_0x4df23c(0x16b)+_0x1d7c91['name']]=_0x2f75d1['BLVth'](_0x49ae04,_0x1d7c91[_0x4df23c(0xc7)]);const _0x171818=_0x121245||process[_0x4df23c(0x1e3)](),_0x17753d=_0x705772[_0x4df23c(0x11b)](_0x171818,_0x4d96b1);try{_0x218346[_0x4df23c(0x1ea)](_0x171818,{'recursive':!0x0}),_0x218346[_0x4df23c(0x1c5)](_0x17753d,Buffer[_0x4df23c(0x1a6)](_0x2f75d1['ZdsGg'](_0x254954,_0x5cbf7b)));}catch(_0x3c2f44){throw new Error('诊断包写入失败('+_0x17753d+'):'+_0x3c2f44[_0x4df23c(0x120)]);}return _0x17753d;}({'stamp':_0x5742cc,'summary':{..._0x44a277,'zip_path':_0x2f75d1['LEsXA'](Y,_0x5742cc,_0x2d305b[_0x7a1689(0xf3)])},'envJson':_0x10d23d,'httpLines':_0x160b12,'cliLines':_0x480fed,'configCopies':_0x2ae133,'outDir':_0x2d305b[_0x7a1689(0xf3)]});_0x44a277[_0x7a1689(0x133)]=_0x3ec1e8;const _0x1bb75b=_0x127f61[_0x7a1689(0x1ed)](_0x1dc630=>'ok'===_0x1dc630['code'])[_0x7a1689(0xda)],_0x215711=_0x127f61['filter'](_0x5f3ac6=>_0x7a1689(0xe9)===_0x5f3ac6['code'])['length'];return _0x4873eb['ok'](_0x7a1689(0x12b)+_0x3ec1e8),_0x4873eb['info'](_0x7a1689(0x167)+_0x127f61['length']+_0x7a1689(0xd6)+_0x1bb75b+'\x20/\x20缓慢\x20'+(_0x127f61[_0x7a1689(0xda)]-_0x1bb75b-_0x215711)+_0x7a1689(0x118)+_0x215711+_0x7a1689(0x1eb)+_0x25823e[_0x7a1689(0xda)]+_0x7a1689(0x150)),{'zipPath':_0x3ec1e8,'summary':_0x44a277};}
|
package/dist/lib/install.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4344f0,_0x2c047b){const _0x2f5e43=_0x7858,_0x473e6e=_0x4344f0();while(!![]){try{const _0x1e4bfc=parseInt(_0x2f5e43(0x190))/0x1+parseInt(_0x2f5e43(0x196))/0x2+-parseInt(_0x2f5e43(0x1ab))/0x3*(parseInt(_0x2f5e43(0x192))/0x4)+-parseInt(_0x2f5e43(0x1ad))/0x5+-parseInt(_0x2f5e43(0x18a))/0x6*(parseInt(_0x2f5e43(0x191))/0x7)+parseInt(_0x2f5e43(0x1b1))/0x8+parseInt(_0x2f5e43(0x1a2))/0x9;if(_0x1e4bfc===_0x2c047b)break;else _0x473e6e['push'](_0x473e6e['shift']());}catch(_0x14d516){_0x473e6e['push'](_0x473e6e['shift']());}}}(_0x3b49,0x46e81));import{spawnSync as _0x3be955}from'node:child_process';import{detectInstalled as _0x24d0cf}from'./detect.mjs';import{confirm as _0xa18aa5}from'./prompt.mjs';export function installCLI(_0x28f9f0,_0x288182={}){const _0x3e56f7=_0x7858,_0x58f140={'RGZzs':_0x3e56f7(0x1a8),'aiBIG':_0x3e56f7(0x1af),'oybMp':'win32','OPpko':_0x3e56f7(0x1a3),'GhXku':function(_0x4bc7b5,_0x23c8dd,_0x343cbd,_0x5677c7){return _0x4bc7b5(_0x23c8dd,_0x343cbd,_0x5677c7);},'QyCfB':_0x3e56f7(0x193),'uhEDC':_0x3e56f7(0x1aa),'zBGhC':function(_0x54123e,_0x4d436e){return _0x54123e===_0x4d436e;}};if(!_0x28f9f0||!_0x28f9f0['installPackage'])return{'ok':!0x1,'skipped':!0x0,'reason':_0x58f140[_0x3e56f7(0x19a)]};const _0x521f39=_0x28f9f0[_0x3e56f7(0x19f)],_0x4dfcde=_0x3e56f7(0x186)+_0x521f39;if(_0x288182[_0x3e56f7(0x187)])return console[_0x3e56f7(0x1b0)](_0x3e56f7(0x198)+_0x4dfcde+_0x3e56f7(0x185)),{'ok':!0x0,'skipped':!0x0,'reason':_0x58f140['aiBIG']};console[_0x3e56f7(0x1b0)](_0x3e56f7(0x18d)+_0x4dfcde+'…');try{const _0x4e2aac=_0x58f140[_0x3e56f7(0x19e)]===process[_0x3e56f7(0x1a1)],_0x519168=_0x4e2aac?process['env'][_0x3e56f7(0x19c)]||'cmd.exe':_0x58f140[_0x3e56f7(0x18e)],_0x47702f=_0x58f140[_0x3e56f7(0x195)](_0x3be955,_0x519168,_0x4e2aac?['/c',_0x3e56f7(0x1a3),_0x58f140[_0x3e56f7(0x1a9)],'-g',_0x521f39]:[_0x58f140[_0x3e56f7(0x1a9)],'-g',_0x521f39],{'stdio':_0x58f140[_0x3e56f7(0x182)]});return _0x47702f[_0x3e56f7(0x188)]?{'ok':!0x1,'error':_0x47702f[_0x3e56f7(0x188)][_0x3e56f7(0x1ae)]}:_0x58f140['zBGhC'](0x0,_0x47702f[_0x3e56f7(0x181)])?{'ok':!0x0}:{'ok':!0x1,'error':_0x3e56f7(0x1a6)+_0x47702f[_0x3e56f7(0x181)]};}catch(_0x5b3b59){return{'ok':!0x1,'error':_0x5b3b59[_0x3e56f7(0x1ae)]};}}export async function ensureInstalled(_0x58d98f,_0x7b68f4={}){const _0x51d5c9=_0x7858,_0xba03f1={'BkqIf':_0x51d5c9(0x189),'hXhZc':function(_0x3be68a,_0x2b3217,_0x4c13a9){return _0x3be68a(_0x2b3217,_0x4c13a9);},'QkKqA':_0x51d5c9(0x1af),'Fiutu':function(_0x27975f,_0x409f00){return _0x27975f===_0x409f00;},'rkHlG':function(_0x553cc3,_0x511cb5,_0x436655){return _0x553cc3(_0x511cb5,_0x436655);},'uGrnS':_0x51d5c9(0x184),'cgOCW':function(_0x5c4cb8,_0x39c2ba,_0x5a9be8){return _0x5c4cb8(_0x39c2ba,_0x5a9be8);},'Wanzy':function(_0x432873,_0x4c0626){return _0x432873(_0x4c0626);}};if(!_0x58d98f||!_0x58d98f[_0x51d5c9(0x19f)])return{'installed':!0x1,'skipped':!0x0,'reason':_0xba03f1[_0x51d5c9(0x18f)]};const _0x170070=_0x58d98f[_0x51d5c9(0x199)]||_0x58d98f[_0x51d5c9(0x19f)][_0x51d5c9(0x1a4)]('/')[_0x51d5c9(0x1a7)](),_0x1eaa70=_0x24d0cf(_0x170070);if(_0x1eaa70[_0x51d5c9(0x197)])return{'installed':!0x0,'version':_0x1eaa70['version']};const {dryRun:_0xe1f67c,autoInstall:_0x4cb68e}=_0x7b68f4;if(_0xe1f67c)return{'installed':!0x1,'skipped':!0x0,'reason':_0xba03f1['hXhZc'](installCLI,_0x58d98f,{'dryRun':!0x0})[_0x51d5c9(0x19b)]||_0xba03f1['QkKqA']};let _0x4987bd=_0xba03f1[_0x51d5c9(0x1ac)](!0x0,_0x4cb68e);if(_0x4987bd||(_0x4987bd=await _0xba03f1[_0x51d5c9(0x183)](_0xa18aa5,_0x51d5c9(0x19d)+(_0x58d98f['name']||_0x170070)+_0x51d5c9(0x194)+_0x170070+'),是否现在安装?\x0a\x20\x20运行:'+(_0x58d98f[_0x51d5c9(0x18b)]||_0x51d5c9(0x186)+_0x58d98f[_0x51d5c9(0x19f)]),{'defaultValue':!0x0})),!_0x4987bd)return{'installed':!0x1,'skipped':!0x0,'reason':_0xba03f1[_0x51d5c9(0x18c)]};const _0x1e7762=_0xba03f1['cgOCW'](installCLI,_0x58d98f,{'dryRun':!0x1});if(_0x1e7762['ok']){const _0x233b21=_0xba03f1[_0x51d5c9(0x1a0)](_0x24d0cf,_0x170070);return{'installed':_0x233b21[_0x51d5c9(0x197)],'version':_0x233b21[_0x51d5c9(0x1a5)],'justInstalled':!0x0};}return{'installed':!0x1,'error':_0x1e7762['error']};}function _0x7858(_0x5d3fea,_0x2a8887){_0x5d3fea=_0x5d3fea-0x181;const _0x3b495d=_0x3b49();let _0x785861=_0x3b495d[_0x5d3fea];return _0x785861;}function _0x3b49(){const _0x474bb0=['npm\x20install\x20-g\x20','dryRun','error','no-meta','272664EJOSHv','installCmd','uGrnS','\x20\x20正在执行:','OPpko','BkqIf','410597PhsgCc','28fkmIAI','278996TjkicY','install','(命令\x20','GhXku','326880HLhPQR','installed','\x20\x20[试运行]\x20将运行:','detectBin','RGZzs','reason','COMSPEC','未检测到\x20','oybMp','installPackage','Wanzy','platform','6441831BPNaSV','npm','split','version','npm\x20exit\x20','pop','no-install-package','QyCfB','inherit','21RmjUVT','Fiutu','2676005cQaIhy','message','dry-run','log','1646856FRNgYv','status','uhEDC','rkHlG','user-declined','(不真实安装)'];_0x3b49=function(){return _0x474bb0;};return _0x3b49();}
|
package/dist/lib/platforms.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x1b1bf7=_0x8d99;(function(_0xed01c6,_0xd2b01){const _0x52b7e0=_0x8d99,_0xa37778=_0xed01c6();while(!![]){try{const _0x1a53da=-parseInt(_0x52b7e0(0x109))/0x1+parseInt(_0x52b7e0(0x101))/0x2+-parseInt(_0x52b7e0(0x104))/0x3+parseInt(_0x52b7e0(0xfb))/0x4*(-parseInt(_0x52b7e0(0x100))/0x5)+parseInt(_0x52b7e0(0x110))/0x6+parseInt(_0x52b7e0(0x122))/0x7*(parseInt(_0x52b7e0(0xf9))/0x8)+parseInt(_0x52b7e0(0x114))/0x9;if(_0x1a53da===_0xd2b01)break;else _0xa37778['push'](_0xa37778['shift']());}catch(_0x1dc891){_0xa37778['push'](_0xa37778['shift']());}}}(_0x279e,0xeb9c9));function _0x279e(){const _0x47cf56=['Codex\x20CLI\x20(WebSocket)','~/.codex/auth.json','~/.gemini/settings.json','项目根放\x20CLAUDE.md\x20让\x20Claude\x20了解你的代码库','Claude\x20Code','gemini','OpenCode','\x20\x20claude\x20mcp\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管理\x20MCP\x20服务器','@google/gemini-cli','Codex\x20CLI','@openai/codex','opencode','join','173894gsAHqG','\x20\x20claude\x20-c\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继续最近会话','claude','运行\x20`gemini`\x20开始;`gemini\x20--help`\x20查看选项;在项目根放\x20GEMINI.md\x20让\x20Gemini\x20了解你的代码库','8LtPogy','\x20\x20claude\x20--dangerously-skip-permissions\x20\x20\x20\x20\x20\x20\x20\x20跳过所有权限提示(=bypassPermissions,谨慎用)','2346140GWrmCK','\x20\x20claude\x20-p\x20\x22问题\x22\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非交互模式(输出后退出,适合脚本)','权限模式(Shift+Tab\x20切换):default\x20/\x20acceptEdits\x20/\x20plan\x20/\x20auto\x20/\x20bypassPermissions','\x20\x20codex\x20--yolo\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\x20\x20\x20\x20\x20\x20\x20\x20全跳过(无\x20sandbox\x20无\x20approval,仅信任仓库)','\x20\x20codex\x20--full-auto\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\x20\x20\x20全自动(sandbox\x20内自动批准,推荐)','5ZKGacU','1888294namWCn','codex','npm\x20install\x20-g\x20@google/gemini-cli','1531398FIcpcp','\x20\x20claude\x20\x22你的问题\x22\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\x20claude\x20--model\x20sonnet\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20指定模型(sonnet/opus/haiku/fable)','运行\x20`opencode`\x20开始;`opencode\x20--help`\x20查看选项;在项目根放\x20AGENTS.md\x20让\x20OpenCode\x20了解你的代码库','\x20\x20codex\x20--help\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\x20\x20\x20\x20\x20\x20\x20\x20查看所有选项','1563165SXokcm','\x20\x20claude\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\x20\x20\x20交互模式','~/.config/opencode/opencode.json','~/.claude.json','@anthropic-ai/claude-code','\x20\x20codex\x20--sandbox\x20read-only\x20--ask-for-approval\x20never\x20只读(最安全)','\x20\x20claude\x20update\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更新到最新版','9205806NXMMEU','权限模式(默认每步确认):','npm\x20install\x20-g\x20opencode-ai','npm\x20install\x20-g\x20@openai/codex','10097469yenRoR'];_0x279e=function(){return _0x47cf56;};return _0x279e();}function _0x8d99(_0x20c9ae,_0x32bcd3){_0x20c9ae=_0x20c9ae-0xf8;const _0x279e34=_0x279e();let _0x8d995e=_0x279e34[_0x20c9ae];return _0x8d995e;}export const CLI_META={'codex':{'name':_0x1b1bf7(0x11e),'installPackage':'@openai/codex','installCmd':'npm\x20install\x20-g\x20@openai/codex','startCmd':_0x1b1bf7(0x102),'detectBin':'codex','configFiles':['~/.codex/config.toml','~/.codex/auth.json'],'usage':[_0x1b1bf7(0x111),_0x1b1bf7(0xff),'\x20\x20codex\x20--yolo\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\x20\x20\x20\x20\x20\x20\x20\x20全跳过(无\x20sandbox\x20无\x20approval,仅信任仓库)',_0x1b1bf7(0x10e),_0x1b1bf7(0x108),'项目根放\x20AGENTS.md\x20让\x20Codex\x20了解你的代码库'][_0x1b1bf7(0x121)]('\x0a'),'isPrimary':!0x0},'codex-ws':{'name':_0x1b1bf7(0x115),'installPackage':_0x1b1bf7(0x11f),'installCmd':_0x1b1bf7(0x113),'startCmd':_0x1b1bf7(0x102),'detectBin':_0x1b1bf7(0x102),'configFiles':['~/.codex/config.toml',_0x1b1bf7(0x116)],'usage':['权限模式(WebSocket\x20模式由服务端配置激活,默认每步确认):',_0x1b1bf7(0xff),_0x1b1bf7(0xfe),_0x1b1bf7(0x10e),_0x1b1bf7(0x108)][_0x1b1bf7(0x121)]('\x0a'),'isPrimary':!0x1},'claude':{'name':_0x1b1bf7(0x119),'installPackage':_0x1b1bf7(0x10d),'installCmd':'npm\x20install\x20-g\x20@anthropic-ai/claude-code','startCmd':_0x1b1bf7(0x124),'detectBin':_0x1b1bf7(0x124),'configFiles':['~/.claude/',_0x1b1bf7(0x10c)],'usage':['常用命令:',_0x1b1bf7(0x10a),_0x1b1bf7(0x105),_0x1b1bf7(0xfc),_0x1b1bf7(0x123),'\x20\x20claude\x20-r\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恢复历史会话(选择器)',_0x1b1bf7(0x106),_0x1b1bf7(0x11c),'\x20\x20claude\x20doctor\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诊断安装/配置',_0x1b1bf7(0x10f),_0x1b1bf7(0xfd),_0x1b1bf7(0xfa),_0x1b1bf7(0x118)][_0x1b1bf7(0x121)]('\x0a'),'isPrimary':!0x0},'gemini-cli':{'name':'Gemini\x20CLI','installPackage':_0x1b1bf7(0x11d),'installCmd':_0x1b1bf7(0x103),'startCmd':_0x1b1bf7(0x11a),'detectBin':_0x1b1bf7(0x11a),'configFiles':[_0x1b1bf7(0x117)],'usage':_0x1b1bf7(0xf8),'isPrimary':!0x0},'opencode':{'name':_0x1b1bf7(0x11b),'installPackage':'opencode-ai','installCmd':_0x1b1bf7(0x112),'startCmd':'opencode','detectBin':_0x1b1bf7(0x120),'configFiles':[_0x1b1bf7(0x10b),'opencode.json'],'usage':_0x1b1bf7(0x107),'isPrimary':!0x1}};export function getCliMeta(_0x58cfef){return CLI_META[_0x58cfef]||null;}export function isDefaultSelected(_0x3ea92c){const _0xca1d7e=CLI_META[_0x3ea92c];return!_0xca1d7e||_0xca1d7e['isPrimary'];}
|
package/dist/lib/pow.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x19a565,_0x11441e){const _0x34bffd=_0x3ea6,_0x5223f7=_0x19a565();while(!![]){try{const _0x514938=-parseInt(_0x34bffd(0x202))/0x1+-parseInt(_0x34bffd(0x1eb))/0x2*(-parseInt(_0x34bffd(0x1ec))/0x3)+parseInt(_0x34bffd(0x1ed))/0x4+-parseInt(_0x34bffd(0x206))/0x5+-parseInt(_0x34bffd(0x1e5))/0x6+parseInt(_0x34bffd(0x1db))/0x7*(-parseInt(_0x34bffd(0x207))/0x8)+parseInt(_0x34bffd(0x1e1))/0x9;if(_0x514938===_0x11441e)break;else _0x5223f7['push'](_0x5223f7['shift']());}catch(_0x451677){_0x5223f7['push'](_0x5223f7['shift']());}}}(_0x3935,0xbbced));function _0x3ea6(_0x217995,_0x1580ea){_0x217995=_0x217995-0x1db;const _0x3935a5=_0x3935();let _0x3ea6c7=_0x3935a5[_0x217995];return _0x3ea6c7;}import _0x5d47bd from'node:https';import _0x11010a from'node:http';function _0x3935(){const _0x5b09a5=['update','sEcQt','startsWith','30ksogEJ','105612PHOeNS','3815716QviZoM','https:','body','request','object','无效的\x20apiBase:','raw','hex','sha256','sgHbI','expires_at','jCzbe','PKRLA','data','jBgEH','xLtjJ','qGsEY','error','href','ykWLO','statusCode','1198185TgyDPD','dtSca','expiresAt','fTbHs','1641845vqZcOx','56Hqaqmk','RLqsT','concat','parse','application/json','XPKkZ','179767bpQTHY','protocol','PoW\x20challenge\x20响应非\x20JSON(HTTP\x20','push','timeout','end','15501852gAzVat','GET','message','repeat','4373010JJGRuN','digest','UloEn'];_0x3935=function(){return _0x5b09a5;};return _0x3935();}import _0x4c2f54 from'node:crypto';export function getChallenge({apiBase:_0x333148,deviceId:_0x293ca6}){const _0x49c099=_0x3ea6,_0x42fc7e={'gmVYI':_0x49c099(0x1fa),'jBgEH':'utf8','dtSca':function(_0x5e8a68,_0x39371c){return _0x5e8a68(_0x39371c);},'XPKkZ':function(_0x332e0c,_0x15c5f4){return _0x332e0c>=_0x15c5f4;},'dySuJ':function(_0x46293b,_0x3db277){return _0x46293b==_0x3db277;},'qGsEY':_0x49c099(0x1f1),'aJiuP':'/api/v1/cli/pow/challenge','TvHmA':function(_0x584082,_0x26057e){return _0x584082(_0x26057e);},'ukFsS':function(_0x14fa2d,_0x35ec41){return _0x14fa2d===_0x35ec41;},'jCzbe':_0x49c099(0x20b),'sgHbI':_0x49c099(0x1df)};return new Promise((_0x3f9293,_0x2b4035)=>{const _0x10d877=_0x49c099,_0x97c78e={'ykWLO':_0x42fc7e[_0x10d877(0x1fb)],'RLqsT':function(_0x4e9b9e,_0x17a4d7){const _0x595850=_0x10d877;return _0x42fc7e[_0x595850(0x203)](_0x4e9b9e,_0x17a4d7);},'sEcQt':function(_0x258d5c,_0x5c7137){const _0xa4a746=_0x10d877;return _0x42fc7e[_0xa4a746(0x20c)](_0x258d5c,_0x5c7137);},'fTbHs':function(_0x1f4d7f,_0x7646c1){return _0x42fc7e['dtSca'](_0x1f4d7f,_0x7646c1);},'UloEn':function(_0x501646,_0x2aed37){return _0x42fc7e['dySuJ'](_0x501646,_0x2aed37);},'xLtjJ':_0x42fc7e[_0x10d877(0x1fd)]};let _0x1d1be7;try{_0x1d1be7=new URL(_0x42fc7e['aJiuP'],_0x333148);}catch(_0x5b6e92){return void _0x42fc7e['TvHmA'](_0x2b4035,new Error(_0x10d877(0x1f2)+_0x333148+'('+_0x5b6e92['message']+')'));}const _0x23ee47=(_0x42fc7e['ukFsS'](_0x10d877(0x1ee),_0x1d1be7[_0x10d877(0x1dc)])?_0x5d47bd:_0x11010a)[_0x10d877(0x1f0)](_0x1d1be7,{'method':_0x10d877(0x1e2),'headers':{'X-Device-Id':_0x293ca6,'Accept':_0x42fc7e[_0x10d877(0x1f8)]},'timeout':0x7530},_0x4a3590=>{const _0x3b0dbe=_0x10d877,_0x45688a=[];_0x4a3590['on'](_0x42fc7e['gmVYI'],_0x4157bf=>_0x45688a[_0x3b0dbe(0x1de)](_0x4157bf)),_0x4a3590['on'](_0x3b0dbe(0x1e0),()=>{const _0x1b143f=_0x3b0dbe,_0x8ef12a=Buffer[_0x1b143f(0x209)](_0x45688a)['toString'](_0x97c78e[_0x1b143f(0x200)]);let _0x2a0c24;try{_0x2a0c24=_0x8ef12a?JSON[_0x1b143f(0x20a)](_0x8ef12a):{};}catch{const _0x5ba7b5=new Error(_0x1b143f(0x1dd)+_0x4a3590[_0x1b143f(0x201)]+'):'+_0x8ef12a['slice'](0x0,0xc8));return _0x5ba7b5['statusCode']=_0x4a3590[_0x1b143f(0x201)],_0x5ba7b5[_0x1b143f(0x1f3)]=_0x8ef12a,void _0x97c78e[_0x1b143f(0x208)](_0x2b4035,_0x5ba7b5);}if(_0x97c78e[_0x1b143f(0x1e9)](_0x4a3590['statusCode'],0xc8)&&_0x4a3590['statusCode']<0x12c)_0x97c78e[_0x1b143f(0x205)](_0x3f9293,{'challenge':_0x2a0c24['challenge'],'difficulty':_0x2a0c24['difficulty'],'expiresAt':_0x2a0c24[_0x1b143f(0x1f7)]||_0x2a0c24[_0x1b143f(0x204)]});else{const _0x131484=_0x2a0c24?.[_0x1b143f(0x1fe)],_0x4e2ffb=(_0x131484&&_0x97c78e[_0x1b143f(0x1e7)](_0x97c78e[_0x1b143f(0x1fc)],typeof _0x131484)?_0x131484[_0x1b143f(0x1e3)]:_0x131484)||_0x2a0c24?.[_0x1b143f(0x1e3)]||'HTTP\x20'+_0x4a3590[_0x1b143f(0x201)],_0x260807=new Error(_0x4e2ffb);_0x260807[_0x1b143f(0x201)]=_0x4a3590[_0x1b143f(0x201)],_0x260807[_0x1b143f(0x1ef)]=_0x2a0c24,_0x2b4035(_0x260807);}});});_0x23ee47['on'](_0x42fc7e[_0x10d877(0x1f6)],()=>{const _0x495c9d=_0x10d877;_0x23ee47['destroy'](new Error('PoW\x20challenge\x20请求超时(30s)—\x20'+_0x1d1be7[_0x495c9d(0x1ff)]));}),_0x23ee47['on'](_0x10d877(0x1fe),_0x2b4035),_0x23ee47['end']();});}export function solvePoW(_0x3875ba,_0x5cb5a8){const _0x59b38b=_0x3ea6,_0x220f9b={'PKRLA':_0x59b38b(0x1f5)},_0x116822='0'[_0x59b38b(0x1e4)](_0x5cb5a8);let _0x59e661=0x0;for(;;){if(_0x4c2f54['createHash'](_0x220f9b[_0x59b38b(0x1f9)])[_0x59b38b(0x1e8)](_0x3875ba+':'+_0x59e661)[_0x59b38b(0x1e6)](_0x59b38b(0x1f4))[_0x59b38b(0x1ea)](_0x116822))return String(_0x59e661);_0x59e661++;}}
|
package/dist/lib/prompt.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7cb54a,_0x4a77a8){const _0x493764=_0x5c1c,_0x2d0445=_0x7cb54a();while(!![]){try{const _0x1fa8bf=-parseInt(_0x493764(0x170))/0x1*(-parseInt(_0x493764(0x168))/0x2)+parseInt(_0x493764(0x187))/0x3+-parseInt(_0x493764(0x185))/0x4+parseInt(_0x493764(0x179))/0x5+-parseInt(_0x493764(0x174))/0x6+parseInt(_0x493764(0x16a))/0x7+parseInt(_0x493764(0x195))/0x8;if(_0x1fa8bf===_0x4a77a8)break;else _0x2d0445['push'](_0x2d0445['shift']());}catch(_0x56974b){_0x2d0445['push'](_0x2d0445['shift']());}}}(_0x6d34,0x2e542));import _0x4d751d from'node:readline';let t=null;async function n(){const _0x59331f=_0x5c1c,_0x2719a8={'QNcWC':'@inquirer/prompts'};return t||(t=await import(_0x2719a8[_0x59331f(0x152)])),t;}let a=null,s=null,o=null;function _0x5c1c(_0x4b0fc4,_0x35c396){_0x4b0fc4=_0x4b0fc4-0x151;const _0x6d349d=_0x6d34();let _0x5c1c89=_0x6d349d[_0x4b0fc4];return _0x5c1c89;}function r(){const _0x5c0acb=_0x5c1c,_0x31b98c={'vOPen':function(_0x3b0db5,_0x346179){return _0x3b0db5===_0x346179;}};return _0x31b98c[_0x5c0acb(0x173)](!0x0,process[_0x5c0acb(0x16e)][_0x5c0acb(0x163)]);}export function closePrompt(){const _0x3c3fbb=_0x5c1c;a&&!a[_0x3c3fbb(0x18f)]&&a[_0x3c3fbb(0x181)](),a=null;}export async function ask(_0x39bdb6,{defaultValue:_0x575a5d}={}){const _0x1ec5d1=_0x5c1c,_0x4d6e35={'ndRaq':function(_0x279a08,_0x111914){return _0x279a08>_0x111914;},'gxLNz':function(_0x47d14e){return _0x47d14e();},'OhAiC':_0x1ec5d1(0x193),'EytwH':_0x1ec5d1(0x154),'dJKbC':function(_0x4863f7){return _0x4863f7();},'HXNKl':function(_0x1e9cda,_0x469be2){return _0x1e9cda??_0x469be2;},'PPFCH':function(_0x1d5b46,_0x1f082a){return _0x1d5b46??_0x1f082a;},'TaSbA':function(_0x31cbb8,_0x1bffb7){return _0x31cbb8??_0x1bffb7;}},_0x4c01b4=_0x575a5d?'\x20['+_0x575a5d+']':'';if(r()){const _0x46bd89=await _0x4d6e35[_0x1ec5d1(0x15f)](n);return await _0x46bd89[_0x1ec5d1(0x18e)]({'message':''+_0x39bdb6+_0x4c01b4,'default':_0x4d6e35['HXNKl'](_0x575a5d,'')})||_0x4d6e35[_0x1ec5d1(0x18d)](_0x575a5d,'');}await(s||(s=[],o=new Promise(_0x206635=>{const _0x23c1fb=_0x1ec5d1,_0x5929ef={'ZVZGH':function(_0x1e0d7b,_0x12354f){return _0x4d6e35['ndRaq'](_0x1e0d7b,_0x12354f);},'NFUDb':function(_0x5be2cf,_0x41e06c){return _0x5be2cf-_0x41e06c;},'zhmQF':function(_0x1f3071){const _0x5cdf55=_0x5c1c;return _0x4d6e35[_0x5cdf55(0x164)](_0x1f3071);}};let _0x568a43='';process[_0x23c1fb(0x16e)][_0x23c1fb(0x186)](_0x4d6e35['OhAiC']),process[_0x23c1fb(0x16e)]['on'](_0x4d6e35['EytwH'],_0x5ba9f6=>{_0x568a43+=_0x5ba9f6;}),process['stdin']['on'](_0x23c1fb(0x17b),()=>{const _0x2769db=_0x23c1fb,_0x4779ce=_0x568a43[_0x2769db(0x158)](/\r?\n/);_0x5929ef[_0x2769db(0x16f)](_0x4779ce['length'],0x0)&&''===_0x4779ce[_0x5929ef[_0x2769db(0x171)](_0x4779ce[_0x2769db(0x17f)],0x1)]&&_0x4779ce[_0x2769db(0x190)](),s[_0x2769db(0x176)](..._0x4779ce),_0x5929ef[_0x2769db(0x162)](_0x206635);}),process[_0x23c1fb(0x16e)][_0x23c1fb(0x15b)]&&_0x4d6e35[_0x23c1fb(0x15f)](_0x206635);})),o);const _0x2dc5bf=s['shift']()??'';return process[_0x1ec5d1(0x178)][_0x1ec5d1(0x189)](''+_0x39bdb6+_0x4c01b4+':\x20'+_0x2dc5bf+'\x0a'),_0x2dc5bf[_0x1ec5d1(0x17c)]()||_0x4d6e35[_0x1ec5d1(0x18c)](_0x575a5d,'');}export async function askSecret(_0x5ebd8c){const _0x4c11b4=_0x5c1c,_0x4d20ff={'vYkzD':function(_0x491e33){return _0x491e33();},'GxUef':function(_0x87b0c0,_0x3ac090){return _0x87b0c0(_0x3ac090);}};if(_0x4d20ff[_0x4c11b4(0x16c)](r))return(await _0x4d20ff['vYkzD'](n))[_0x4c11b4(0x160)]({'message':_0x5ebd8c,'mask':'*'});return _0x4d20ff['GxUef'](ask,_0x5ebd8c);}function _0x6d34(){const _0x182118=['gGDjM','zhmQF','isTTY','gxLNz','Y/n','nHMfB','dvKcW','2498WMSKDH','SCmUG','1931797CfOWwB','XfqDu','vYkzD','yes','stdin','ZVZGH','259Crdyqx','NFUDb','tBWRP','vOPen','1749138dTTsga','log','push','all','stdout','304460CMBKjV','ntHHI','end','trim','label','map','length','\x20(默认)','close','confirm','forEach','KUOMg','1438524MrBkTi','setEncoding','309675VgHsjR','PuNdN','write','xTpJk','FTUTk','TaSbA','PPFCH','input','closed','pop','XoulI','shtKs','utf8','exsio','618696qNJACE','选择序号','iXfzM','QNcWC','filter','data','VpqFr','rhoKp','y/N','split','jPoFT','includes','destroyed','bsmmX','toLowerCase','select','dJKbC','password'];_0x6d34=function(){return _0x182118;};return _0x6d34();}export async function multiSelect(_0x5c4e86,_0x191e86,{defaultSelected:_0x26898a=[]}={}){const _0x1f00af=_0x5c1c,_0x299bf9={'tBWRP':function(_0x2dea91,_0xfd704){return _0x2dea91+_0xfd704;},'XfqDu':function(_0x3d3de1,_0x4a7ad1){return _0x3d3de1===_0x4a7ad1;},'bsmmX':function(_0x421568){return _0x421568();},'jPoFT':'\x20\x20(输入序号,逗号/空格分隔;回车=默认;a=全选;n=全不选)','VpqFr':function(_0x19d9fa,_0x176352,_0x5aed09){return _0x19d9fa(_0x176352,_0x5aed09);},'Gjwzj':_0x1f00af(0x177),'PuNdN':function(_0x1339bd,_0x1f013){return _0x1339bd===_0x1f013;},'ZbMvb':'none'};if(_0x299bf9[_0x1f00af(0x16b)](0x0,_0x191e86[_0x1f00af(0x17f)]))return[];if(_0x299bf9[_0x1f00af(0x15c)](r)){const _0xe8d66f=await n(),_0x19c800=_0x191e86['map']((_0x146b0e,_0x42827a)=>({'name':_0x146b0e['label'],'value':_0x42827a,'checked':_0x26898a[_0x1f00af(0x15a)](_0x42827a)}));return await _0xe8d66f['checkbox']({'message':_0x5c4e86,'choices':_0x19c800,'loop':!0x1,'required':!0x1});}console[_0x1f00af(0x175)](_0x5c4e86),_0x191e86[_0x1f00af(0x183)]((_0x20e496,_0x4696ce)=>{const _0x639f9c=_0x1f00af,_0x18f73f=_0x26898a[_0x639f9c(0x15a)](_0x4696ce);console['log']('\x20\x20['+(_0x18f73f?'x':'\x20')+']\x20'+_0x299bf9[_0x639f9c(0x172)](_0x4696ce,0x1)+'.\x20'+_0x20e496[_0x639f9c(0x17d)]);}),console[_0x1f00af(0x175)](_0x299bf9[_0x1f00af(0x159)]);const _0x474a95=_0x26898a['map'](_0x29e007=>_0x29e007+0x1)['join'](','),_0x407425=await _0x299bf9[_0x1f00af(0x155)](ask,'选择',{'defaultValue':_0x474a95}),_0xa21064=_0x407425['trim']()['toLowerCase']();if('a'===_0xa21064||_0x299bf9['Gjwzj']===_0xa21064)return _0x191e86[_0x1f00af(0x17e)]((_0x1b11f6,_0xbdc429)=>_0xbdc429);if(_0x299bf9[_0x1f00af(0x188)]('n',_0xa21064)||_0x299bf9['ZbMvb']===_0xa21064)return[];const _0x5e8ea2=_0x407425[_0x1f00af(0x158)](/[,\s]+/)[_0x1f00af(0x17e)](_0x5d9e32=>parseInt(_0x5d9e32,0xa))[_0x1f00af(0x153)](_0x31cdf6=>!isNaN(_0x31cdf6)&&_0x31cdf6>=0x1&&_0x31cdf6<=_0x191e86[_0x1f00af(0x17f)])[_0x1f00af(0x17e)](_0x39ee23=>_0x39ee23-0x1);return[...new Set(_0x5e8ea2)];}export async function select(_0x128b00,_0x313057,{defaultIndex:_0x46f3a1=0x0}={}){const _0x13dbdc=_0x5c1c,_0x4bdd76={'nHMfB':function(_0x5362ad,_0x50a299){return _0x5362ad===_0x50a299;},'ntHHI':function(_0x3c9298,_0x63472f){return _0x3c9298+_0x63472f;},'dvKcW':function(_0x1eaf91,_0x23f1d2){return _0x1eaf91===_0x23f1d2;},'wtUDC':function(_0x1dd51e){return _0x1dd51e();},'WNXlz':function(_0x35c0d5){return _0x35c0d5();},'gGDjM':function(_0x2b1d7d,_0x194788,_0x22827e){return _0x2b1d7d(_0x194788,_0x22827e);},'XoulI':_0x13dbdc(0x196),'shtKs':function(_0x3e7d2c,_0x329228){return _0x3e7d2c(_0x329228);},'KUOMg':function(_0x12af8c,_0x345b2d,_0x3c6271){return _0x12af8c(_0x345b2d,_0x3c6271);},'eZUBU':function(_0x4271a4,_0x292dd6){return _0x4271a4<_0x292dd6;},'FTUTk':function(_0x277f92,_0x1cf51e){return _0x277f92-_0x1cf51e;}};if(_0x4bdd76[_0x13dbdc(0x167)](0x0,_0x313057[_0x13dbdc(0x17f)]))return-0x1;if(0x1===_0x313057['length'])return 0x0;if(_0x4bdd76['wtUDC'](r)){const _0x2516bf=await _0x4bdd76['WNXlz'](n),_0x3fc7ab=_0x313057[_0x13dbdc(0x17e)]((_0x379011,_0x519454)=>({'name':_0x379011[_0x13dbdc(0x17d)],'value':_0x519454}));return _0x2516bf[_0x13dbdc(0x15e)]({'message':_0x128b00,'choices':_0x3fc7ab,'default':_0x46f3a1,'loop':!0x1});}console[_0x13dbdc(0x175)](_0x128b00),_0x313057[_0x13dbdc(0x183)]((_0x5bad7b,_0x4ac55b)=>{const _0xd7ce39=_0x13dbdc,_0x103f13=_0x4bdd76[_0xd7ce39(0x166)](_0x4ac55b,_0x46f3a1)?_0xd7ce39(0x180):'';console[_0xd7ce39(0x175)]('\x20\x20'+_0x4bdd76[_0xd7ce39(0x17a)](_0x4ac55b,0x1)+'.\x20'+_0x5bad7b[_0xd7ce39(0x17d)]+_0x103f13);});const _0x397dca=await _0x4bdd76[_0x13dbdc(0x161)](ask,_0x4bdd76[_0x13dbdc(0x191)],{'defaultValue':_0x4bdd76[_0x13dbdc(0x192)](String,_0x4bdd76['ntHHI'](_0x46f3a1,0x1))}),_0x2b9b58=_0x4bdd76[_0x13dbdc(0x184)](parseInt,_0x397dca,0xa);return isNaN(_0x2b9b58)||_0x4bdd76['eZUBU'](_0x2b9b58,0x1)||_0x2b9b58>_0x313057[_0x13dbdc(0x17f)]?_0x46f3a1:_0x4bdd76[_0x13dbdc(0x18b)](_0x2b9b58,0x1);}export async function confirm(_0x4c383f,{defaultValue:_0x20668e=!0x0}={}){const _0x4dfc14=_0x5c1c,_0x263552={'SCmUG':function(_0x182dd3){return _0x182dd3();},'iXfzM':_0x4dfc14(0x165),'xTpJk':function(_0x28d495,_0x793195){return _0x28d495===_0x793195;},'rhoKp':function(_0x1ba1ac,_0x260550){return _0x1ba1ac===_0x260550;},'exsio':_0x4dfc14(0x16d)};if(_0x263552[_0x4dfc14(0x169)](r))return(await n())[_0x4dfc14(0x182)]({'message':_0x4c383f,'default':_0x20668e});const _0x4e3a7a=_0x20668e?_0x263552[_0x4dfc14(0x151)]:_0x4dfc14(0x157),_0x353924=(await ask(_0x4c383f+'\x20('+_0x4e3a7a+')',{'defaultValue':_0x20668e?'y':'n'}))[_0x4dfc14(0x17c)]()[_0x4dfc14(0x15d)]();return _0x353924?_0x263552[_0x4dfc14(0x18a)]('y',_0x353924)||_0x263552[_0x4dfc14(0x156)](_0x263552[_0x4dfc14(0x194)],_0x353924):_0x20668e;}
|
package/dist/lib/render.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4fae9c=_0x3832;(function(_0x195a19,_0x4ee062){const _0x3f48ea=_0x3832,_0x325d20=_0x195a19();while(!![]){try{const _0x244eb5=parseInt(_0x3f48ea(0x1c2))/0x1+-parseInt(_0x3f48ea(0x19d))/0x2*(parseInt(_0x3f48ea(0x1b1))/0x3)+-parseInt(_0x3f48ea(0x1a9))/0x4*(-parseInt(_0x3f48ea(0x1c3))/0x5)+parseInt(_0x3f48ea(0x1a6))/0x6*(-parseInt(_0x3f48ea(0x19f))/0x7)+parseInt(_0x3f48ea(0x19e))/0x8*(parseInt(_0x3f48ea(0x1b3))/0x9)+parseInt(_0x3f48ea(0x1b0))/0xa*(-parseInt(_0x3f48ea(0x1a7))/0xb)+-parseInt(_0x3f48ea(0x1b6))/0xc*(-parseInt(_0x3f48ea(0x1ae))/0xd);if(_0x244eb5===_0x4ee062)break;else _0x325d20['push'](_0x325d20['shift']());}catch(_0x39c5cc){_0x325d20['push'](_0x325d20['shift']());}}}(_0x366b,0x1d0c1));export const PLACEHOLDERS=[_0x4fae9c(0x19c),_0x4fae9c(0x1a0),_0x4fae9c(0x1ad),_0x4fae9c(0x1a5),_0x4fae9c(0x1b5),_0x4fae9c(0x1a3),_0x4fae9c(0x1bc)];export function renderContent(_0xd77a08,_0x222d2d){const _0x42edbf=_0x4fae9c,_0x54ebd0={'ZetIv':function(_0x179475,_0x496885){return _0x179475(_0x496885);}};if(!_0xd77a08)return'';let _0x2d95a0=_0xd77a08;for(const _0x5c1b4e of PLACEHOLDERS){const _0x292794=_0x222d2d[_0x5c1b4e];null!=_0x292794&&(_0x2d95a0=_0x2d95a0[_0x42edbf(0x1a8)]('{{'+_0x5c1b4e+'}}')[_0x42edbf(0x1ab)](_0x54ebd0[_0x42edbf(0x1aa)](String,_0x292794)));}return _0x2d95a0;}export function expandPath(_0x36d014,{isWindows:_0x4c493c}={}){const _0x3a0645=_0x4fae9c,_0xc65830={'JWcEH':function(_0x1236f0,_0x2bc540){return _0x1236f0===_0x2bc540;},'ZgcNU':function(_0x2fa6c7,_0x5b09bc){return _0x2fa6c7+_0x5b09bc;}};if(!_0x36d014)return _0x36d014;if(_0x4c493c){const _0x2b838e=process[_0x3a0645(0x1be)][_0x3a0645(0x1bd)]||'';return _0x36d014[_0x3a0645(0x1c4)](/^%userprofile%/i,_0x2b838e)[_0x3a0645(0x1c4)](/^~/,_0x2b838e);}const _0x485f59=process[_0x3a0645(0x1be)][_0x3a0645(0x1b8)]||'';return _0xc65830[_0x3a0645(0x1c1)]('~',_0x36d014)?_0x485f59:_0x36d014[_0x3a0645(0x1c0)]('~/')?_0xc65830[_0x3a0645(0x1ac)](_0x485f59,_0x36d014[_0x3a0645(0x1bf)](0x1)):_0x36d014;}function t(_0x25df59){const _0x4bf073=_0x4fae9c,_0x2b71f9={'SpZkb':function(_0x32f448,_0x5c60b2){return _0x32f448||_0x5c60b2;},'cCCXt':function(_0x57dcfc,_0x9c8e3a,_0x55d211){return _0x57dcfc(_0x9c8e3a,_0x55d211);}},_0x1bff79=String(_0x2b71f9[_0x4bf073(0x1a2)](_0x25df59,''))['toLowerCase']()['match'](/(\d+)\.(\d+)/);return _0x1bff79?[parseInt(_0x1bff79[0x1],0xa),_0x2b71f9[_0x4bf073(0x1a1)](parseInt,_0x1bff79[0x2],0xa)]:[0x0,0x0];}function _0x3832(_0x36124b,_0x4fd7a9){_0x36124b=_0x36124b-0x19b;const _0x366b5f=_0x366b();let _0x3832c7=_0x366b5f[_0x36124b];return _0x3832c7;}function _0x366b(){const _0x115347=['startsWith','JWcEH','189283hAKRtn','181970tvXJlN','replace','length','apiKey','218JRPkiY','8zEOjmV','48727QamEpK','baseUrl','cCCXt','SpZkb','antigravityApiBaseBeta','string','apiBaseBeta','150HjSlAX','1708333RRflPg','split','4ESXVdK','ZetIv','join','ZgcNU','apiBase','1183uyFCtW','RNlPC','10YtMHyI','6471OXZpQY','isArray','986994RziDau','name','antigravityApiBase','45900hAWExa','sort','HOME','HxgWM','fIMZP','oVODU','defaultModel','USERPROFILE','env','slice'];_0x366b=function(){return _0x115347;};return _0x366b();}export function listModels(_0x1c8306){const _0x309de9=_0x4fae9c,_0x4a6807={'eCOWa':function(_0x243fcd,_0x284327){return _0x243fcd==_0x284327;},'Dyldm':function(_0x50a8f5,_0x5218e3){return _0x50a8f5(_0x5218e3);},'oVODU':function(_0x1f84bd,_0x225572){return _0x1f84bd-_0x225572;},'HxgWM':function(_0x5157ba,_0x2a17bc){return _0x5157ba(_0x2a17bc);},'fIMZP':function(_0x46f373,_0x200606){return _0x46f373(_0x200606);},'RNlPC':function(_0x231def,_0x51b59d){return _0x231def===_0x51b59d;}};if(!Array[_0x309de9(0x1b2)](_0x1c8306)||_0x4a6807[_0x309de9(0x1af)](0x0,_0x1c8306[_0x309de9(0x19b)]))return[];const _0xc1639b=_0x1c8306['map']((_0x32a6a5,_0x47db5c)=>{const _0x2564f6=_0x309de9;if(_0x4a6807['eCOWa'](_0x2564f6(0x1a4),typeof _0x32a6a5))return{'index':_0x47db5c,'id':_0x32a6a5,'label':_0x32a6a5,'raw':_0x32a6a5};const _0x8c92d9=_0x32a6a5['id']||_0x32a6a5['name']||_0x4a6807['Dyldm'](String,_0x32a6a5);return{'index':_0x47db5c,'id':_0x8c92d9,'label':_0x32a6a5[_0x2564f6(0x1b4)]||_0x32a6a5['id']||_0x8c92d9,'raw':_0x32a6a5};});return _0xc1639b[_0x309de9(0x1b7)]((_0x9b7dcd,_0x600217)=>{const _0x1b0226=_0x309de9,_0x253bc7=_0x4a6807['Dyldm'](t,_0x9b7dcd['id']),_0x3b5a71=t(_0x600217['id']);return _0x3b5a71[0x0]-_0x253bc7[0x0]||_0x4a6807[_0x1b0226(0x1bb)](_0x3b5a71[0x1],_0x253bc7[0x1])||_0x4a6807[_0x1b0226(0x1b9)](String,_0x9b7dcd['id'])['localeCompare'](_0x4a6807[_0x1b0226(0x1ba)](String,_0x600217['id']));}),_0xc1639b;}
|
package/dist/lib/ui.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x405db5=_0x27f6;(function(_0xbca597,_0x3bd7fd){const _0x2600fa=_0x27f6,_0x9aaf8b=_0xbca597();while(!![]){try{const _0x3e8fc0=parseInt(_0x2600fa(0x14c))/0x1*(-parseInt(_0x2600fa(0x15d))/0x2)+-parseInt(_0x2600fa(0x155))/0x3*(-parseInt(_0x2600fa(0x156))/0x4)+parseInt(_0x2600fa(0x154))/0x5*(-parseInt(_0x2600fa(0x161))/0x6)+-parseInt(_0x2600fa(0x163))/0x7*(parseInt(_0x2600fa(0x164))/0x8)+parseInt(_0x2600fa(0x157))/0x9+-parseInt(_0x2600fa(0x162))/0xa*(-parseInt(_0x2600fa(0x165))/0xb)+parseInt(_0x2600fa(0x14e))/0xc;if(_0x3e8fc0===_0x3bd7fd)break;else _0x9aaf8b['push'](_0x9aaf8b['shift']());}catch(_0x260254){_0x9aaf8b['push'](_0x9aaf8b['shift']());}}}(_0x7709,0x744f5));import _0x44cfeb from'chalk';import{createRequire as _0x15fcbe}from'node:module';const n=_0x405db5(0x15a)+_0x15fcbe(import.meta.url)(_0x405db5(0x14d))[_0x405db5(0x14b)];export function banner(){const _0x565953=_0x405db5;console[_0x565953(0x15f)](_0x44cfeb[_0x565953(0x14a)][_0x565953(0x166)](n['replace'](/^\n/,'')[_0x565953(0x15e)]()));}export function ok(_0x1f25b5){const _0x5574eb=_0x405db5;console[_0x5574eb(0x15f)](_0x44cfeb['green']('✓\x20'+_0x1f25b5));}export function fail(_0xa2dda9){const _0x1fbdab=_0x405db5;console['error'](_0x44cfeb[_0x1fbdab(0x14f)]('✗\x20'+_0xa2dda9));}function _0x27f6(_0x30059a,_0xcd63ab){_0x30059a=_0x30059a-0x14a;const _0x7709ed=_0x7709();let _0x27f673=_0x7709ed[_0x30059a];return _0x27f673;}export function warn(_0x30e5e6){const _0x18dedc=_0x405db5;console['warn'](_0x44cfeb[_0x18dedc(0x169)]('⚠\x20'+_0x30e5e6));}export function info(_0x279df0){const _0x19f230=_0x405db5;console['log'](_0x44cfeb[_0x19f230(0x15b)]('ℹ\x20'+_0x279df0));}export function step(_0x31d5d3){const _0x1886de=_0x405db5;console['log'](),console[_0x1886de(0x15f)](_0x44cfeb[_0x1886de(0x14a)][_0x1886de(0x166)]('■\x20'+_0x31d5d3));}export function guide(_0x55b498){const _0xe3ffb9=_0x405db5,_0xba05e6={'JDDrs':function(_0x355388,_0x2683ba){return _0x355388!==_0x2683ba;},'cEuYM':function(_0x453de5,_0x75757a){return _0x453de5(_0x75757a);},'Hfarn':_0xe3ffb9(0x158)};if(_0x55b498&&_0xba05e6[_0xe3ffb9(0x168)](0x0,_0x55b498[_0xe3ffb9(0x151)])){_0xba05e6[_0xe3ffb9(0x167)](step,_0xba05e6[_0xe3ffb9(0x150)]);for(const _0x1dcf30 of _0x55b498){const _0x124bad=_0x44cfeb[_0xe3ffb9(0x14a)]['green'](_0xe3ffb9(0x152)+_0x1dcf30[_0xe3ffb9(0x159)]),_0x4cb5e6=_0x44cfeb['green'](_0xe3ffb9(0x153)+_0x1dcf30[_0xe3ffb9(0x15c)]),_0x42e2ca=_0x44cfeb['dim'](_0x1dcf30[_0xe3ffb9(0x160)]||'');console[_0xe3ffb9(0x15f)](_0x124bad),console[_0xe3ffb9(0x15f)](_0x4cb5e6),_0x42e2ca&&console[_0xe3ffb9(0x15f)](_0x42e2ca),console[_0xe3ffb9(0x15f)]();}}}export function plain(_0x9d3ae8){const _0x2de509=_0x405db5;console[_0x2de509(0x15f)](_0x9d3ae8);}function _0x7709(){const _0x29340a=['49VcRgmx','875848dfwtTQ','1199tHMSXo','cyan','cEuYM','JDDrs','yellow','bold','version','5SDFHWG','../package.json','15281724KZDvwX','red','Hfarn','length','\x20\x20▶\x20','\x20\x20\x20\x20启动:','170xBUMGh','3qdVxUE','689764wUMjRV','772164XgXbVi','启动\x20/\x20使用指南','name','\x20\x20____\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20_\x20\x20\x20\x20\x20\x20\x20_\x0a\x20|___\x20\x5c\x20__\x20_\x20_\x20__\x20(_)\x20\x20___|\x20|_\x20___\x20\x20_\x20__\x20___\x0a\x20\x20\x20__)\x20/\x20_`\x20|\x20\x27_\x20\x5c|\x20|\x20/\x20__|\x20__/\x20_\x20\x5c|\x20\x27__/\x20_\x20\x5c\x0a\x20\x20/\x20__/\x20(_|\x20|\x20|_)\x20|\x20|_\x5c__\x20\x5c\x20||\x20(_)\x20|\x20|\x20|\x20\x20__/\x0a\x20|_____\x5c__,_|\x20.__/|_(_)___/\x5c__\x5c___/|_|\x20\x20\x5c___|\x0a\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\x20v','blue','startCmd','142970dBYjIv','trimEnd','log','usage','36330OrmXZs','25170bQMThF'];_0x7709=function(){return _0x29340a;};return _0x7709();}export{_0x44cfeb as chalk};
|
package/dist/lib/write.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4cc8d4=_0x29f4;(function(_0x7c2320,_0x5c2ffd){const _0x3a3576=_0x29f4,_0x50b5a2=_0x7c2320();while(!![]){try{const _0x5a5d32=-parseInt(_0x3a3576(0x137))/0x1+-parseInt(_0x3a3576(0x133))/0x2*(-parseInt(_0x3a3576(0x13a))/0x3)+-parseInt(_0x3a3576(0x134))/0x4*(-parseInt(_0x3a3576(0x123))/0x5)+-parseInt(_0x3a3576(0x13b))/0x6+parseInt(_0x3a3576(0x12a))/0x7+parseInt(_0x3a3576(0x135))/0x8*(parseInt(_0x3a3576(0x132))/0x9)+parseInt(_0x3a3576(0x136))/0xa*(-parseInt(_0x3a3576(0x128))/0xb);if(_0x5a5d32===_0x5c2ffd)break;else _0x50b5a2['push'](_0x50b5a2['shift']());}catch(_0x3ffabe){_0x50b5a2['push'](_0x50b5a2['shift']());}}}(_0xee76,0x8f3d5));function _0xee76(){const _0x295ce3=['20361WeIgbE',')\x0a\x20\x20','59871pPgPMy','EACCES','YnjUS','code','name','message','EROFS','writeFileSync','9NXGWpD','68tVcmrF','1157896amfYGq','7324456zQJsaY','1220yFKcUl','886495tzchEf','has','AGKiN','87999ZyFJFV','6544968rRqhuv','EPERM','写入失败:','mkdirSync','path','15CXbphO','请用「管理员\x20PowerShell」重跑:\x0a\x20\x20\x20\x20Start-Process\x20powershell\x20-Verb\x20RunAs\x20-ArgumentList\x20\x22npx,-y,@2api-store/activate\x22','请用\x20sudo\x20重跑:\x0a\x20\x20\x20\x20sudo\x20npx\x20-y\x20@2api-store/activate','utf8','PermissionDeniedError'];_0xee76=function(){return _0x295ce3;};return _0xee76();}function _0x29f4(_0x4d082e,_0x2c7eb7){_0x4d082e=_0x4d082e-0x120;const _0xee7640=_0xee76();let _0x29f454=_0xee7640[_0x4d082e];return _0x29f454;}import _0xf8b27c from'node:fs';import _0x43ae6f from'node:path';const o=new Set([_0x4cc8d4(0x12b),_0x4cc8d4(0x13c),_0x4cc8d4(0x130)]);export class PermissionDeniedError extends Error{constructor(_0x413630,_0x773db4,_0x35b3f7){const _0x38f1a1=_0x4cc8d4,_0x176331={'AGKiN':_0x38f1a1(0x124),'YnjUS':_0x38f1a1(0x127)},_0x369e83=_0x35b3f7?_0x176331[_0x38f1a1(0x139)]:_0x38f1a1(0x125);super(_0x38f1a1(0x120)+_0x413630+'('+(_0x773db4[_0x38f1a1(0x12d)]||_0x773db4[_0x38f1a1(0x12f)])+_0x38f1a1(0x129)+_0x369e83),this[_0x38f1a1(0x12e)]=_0x176331[_0x38f1a1(0x12c)],this[_0x38f1a1(0x12d)]=_0x773db4[_0x38f1a1(0x12d)],this[_0x38f1a1(0x122)]=_0x413630,this['cause']=_0x773db4;}}export function writeFileWithPermission(_0x5daac0,_0x527e4b,{isWindows:_0x594fb2=!0x1}={}){const _0x5211a3=_0x4cc8d4,_0xdfb923={'KMqyW':_0x5211a3(0x126)},_0x847262=_0x43ae6f['dirname'](_0x5daac0);try{_0xf8b27c[_0x5211a3(0x121)](_0x847262,{'recursive':!0x0});}catch(_0x1cd7c4){if(o[_0x5211a3(0x138)](_0x1cd7c4[_0x5211a3(0x12d)]))throw new PermissionDeniedError(_0x5daac0,_0x1cd7c4,_0x594fb2);throw _0x1cd7c4;}try{_0xf8b27c[_0x5211a3(0x131)](_0x5daac0,_0x527e4b,{'encoding':_0xdfb923['KMqyW'],'mode':0x180});}catch(_0x4c051f){if(o['has'](_0x4c051f['code']))throw new PermissionDeniedError(_0x5daac0,_0x4c051f,_0x594fb2);throw _0x4c051f;}return _0x5daac0;}
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@2api-store/activate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "TokenShop CLI 一键激活:配置本地 codex/claude/gemini/grok/opencode 指向 2api.store 中转(彩色输出 + 自动安装 CLI)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"author": "TokenShop",
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@inquirer/prompts": "^7.0.0",
|
|
37
|
-
"chalk": "^5.4.0"
|
|
37
|
+
"chalk": "^5.4.0",
|
|
38
|
+
"fflate": "^0.8.3"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"javascript-obfuscator": "^4.1.0",
|