mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
Compare commits
163 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
db5bd5c8a4 | ||
![]() |
ef94c2fe7c | ||
![]() |
72a25ed8e1 | ||
![]() |
eb065e218f | ||
![]() |
33426736fc | ||
![]() |
896658d5ce | ||
![]() |
b14135ed72 | ||
![]() |
a1baf2e32d | ||
![]() |
f9aa2d3bce | ||
![]() |
c95d0e0696 | ||
![]() |
ad4b84d446 | ||
![]() |
3e27d5fcb0 | ||
![]() |
48a100f49a | ||
![]() |
698649f981 | ||
![]() |
780078c3aa | ||
![]() |
4c25e4ddee | ||
![]() |
c0a5ac2ac5 | ||
![]() |
0435409870 | ||
![]() |
c521269409 | ||
![]() |
1e252b7e4c | ||
![]() |
d72b1edc48 | ||
![]() |
f7307e8e01 | ||
![]() |
127905f04b | ||
![]() |
261c6dabd5 | ||
![]() |
cae84bbf02 | ||
![]() |
cdb2bc52fa | ||
![]() |
cd2972eee0 | ||
![]() |
4036aa8d0e | ||
![]() |
52c6927c44 | ||
![]() |
a16e0a21a2 | ||
![]() |
e796b21157 | ||
![]() |
1c6bc478b4 | ||
![]() |
98f39c6388 | ||
![]() |
570c83571b | ||
![]() |
c0c38d89e0 | ||
![]() |
b866cfc03c | ||
![]() |
28c2755b37 | ||
![]() |
57bfc5c73a | ||
![]() |
0f3f7d53a3 | ||
![]() |
529e50fd7f | ||
![]() |
2fa283f91d | ||
![]() |
029a9ade93 | ||
![]() |
f1ca8b15c8 | ||
![]() |
4d8edd5da9 | ||
![]() |
6c63990653 | ||
![]() |
5b521409c6 | ||
![]() |
3268fc1014 | ||
![]() |
19afb4941b | ||
![]() |
40e5111d41 | ||
![]() |
a3a40e1e74 | ||
![]() |
101caa6826 | ||
![]() |
875fed8d77 | ||
![]() |
69e28eb000 | ||
![]() |
e5d3a8360c | ||
![]() |
4545d9285b | ||
![]() |
6702024805 | ||
![]() |
78bad4842b | ||
![]() |
b9a913cfed | ||
![]() |
6f5a6f353f | ||
![]() |
790c4f589d | ||
![]() |
cd1bd3461f | ||
![]() |
0280dcd6a8 | ||
![]() |
fc337292bc | ||
![]() |
fb1daa0e21 | ||
![]() |
579b9dc0c2 | ||
![]() |
dedd0be352 | ||
![]() |
1c7d9c3513 | ||
![]() |
0c7dfe2af4 | ||
![]() |
8d1351a8a3 | ||
![]() |
e6e68a6036 | ||
![]() |
24658edc45 | ||
![]() |
09eaa3116a | ||
![]() |
e9bff466b5 | ||
![]() |
5d77f50160 | ||
![]() |
2ab91e363f | ||
![]() |
34d881426f | ||
![]() |
13ecaa0ad4 | ||
![]() |
ce6185b1f7 | ||
![]() |
2cfde6b75a | ||
![]() |
37d0354751 | ||
![]() |
0a0edcf203 | ||
![]() |
d6aad2ea28 | ||
![]() |
63084506ee | ||
![]() |
c5d313574f | ||
![]() |
caab998212 | ||
![]() |
aa037cc3d9 | ||
![]() |
642bffe374 | ||
![]() |
d682b154fc | ||
![]() |
d4a06d98cf | ||
![]() |
856b5e16b1 | ||
![]() |
a0aa208860 | ||
![]() |
037a11e04f | ||
![]() |
bd8a1d715f | ||
![]() |
54ab1dc091 | ||
![]() |
9471e63857 | ||
![]() |
fa4a403f38 | ||
![]() |
d608d65bf4 | ||
![]() |
c0f2df172a | ||
![]() |
788ef5d81c | ||
![]() |
1c6b5cffe1 | ||
![]() |
c04382b623 | ||
![]() |
0bbe51f8fd | ||
![]() |
ff7d7d15a0 | ||
![]() |
4b3d083d3a | ||
![]() |
a566dd390b | ||
![]() |
7d1442da04 | ||
![]() |
17fc982f55 | ||
![]() |
ba417e2274 | ||
![]() |
d345094b75 | ||
![]() |
6da477480d | ||
![]() |
e274088c06 | ||
![]() |
1bcaa73c5c | ||
![]() |
ca94e8f621 | ||
![]() |
1c4e198f59 | ||
![]() |
fdd13f9c66 | ||
![]() |
4333ab624e | ||
![]() |
9fe1eb3a42 | ||
![]() |
ad251a7682 | ||
![]() |
1fa740de2d | ||
![]() |
466b89064a | ||
![]() |
2748cb0ba3 | ||
![]() |
aef0d5bdde | ||
![]() |
c71e8f024a | ||
![]() |
9411f07321 | ||
![]() |
9b2a5c9bbf | ||
![]() |
2b275523a0 | ||
![]() |
31fe2f6da4 | ||
![]() |
f95db623a5 | ||
![]() |
a46313e483 | ||
![]() |
31c330826e | ||
![]() |
c4cf800142 | ||
![]() |
b64a2b0006 | ||
![]() |
a3702f2270 | ||
![]() |
d221b1d470 | ||
![]() |
0b22a6bc1d | ||
![]() |
07e8acd003 | ||
![]() |
9fce617c57 | ||
![]() |
8d5c736975 | ||
![]() |
4ccec05186 | ||
![]() |
a4f456f002 | ||
![]() |
fbdb941c27 | ||
![]() |
a41cd42e8d | ||
![]() |
77521e4627 | ||
![]() |
b6a1242bac | ||
![]() |
2f325cfe26 | ||
![]() |
193b0ad0f0 | ||
![]() |
ed476b7793 | ||
![]() |
720fd94b7f | ||
![]() |
ff87da105c | ||
![]() |
a875e65536 | ||
![]() |
0b2c6bb662 | ||
![]() |
e44e2fbbb7 | ||
![]() |
b3c93644fd | ||
![]() |
a56b7ff636 | ||
![]() |
c724236930 | ||
![]() |
4853320b2b | ||
![]() |
ba1acb6ac1 | ||
![]() |
f32a6320fc | ||
![]() |
9f914ce36a | ||
![]() |
b037644e5a | ||
![]() |
afd8c59f83 | ||
![]() |
8aa4af3e91 | ||
![]() |
630a8a2b97 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,11 +1,11 @@
|
||||
# Logs
|
||||
|
||||
# Develop
|
||||
node_modules/
|
||||
package-lock.json
|
||||
pnpm-lock.yaml
|
||||
out/
|
||||
dist/
|
||||
src/core.lib/common/
|
||||
test
|
||||
|
||||
# Editor
|
||||
.vscode/*
|
||||
@@ -14,4 +14,4 @@ src/core.lib/common/
|
||||
|
||||
# Build
|
||||
*.db
|
||||
checkVersion.sh
|
||||
checkVersion.sh
|
||||
|
29
CHANGELOG.md
29
CHANGELOG.md
@@ -1,28 +1,13 @@
|
||||
# v1.2.0
|
||||
# v1.3.2
|
||||
|
||||
QQ Version: Windows 9.9.9-23361 / Linux 3.2.7-23361
|
||||
QQ Version: Windows 9.9.9-23424 / Linux 3.2.7-23361
|
||||
|
||||
## 修复与优化
|
||||
|
||||
* 修复图片URL,支持 Win/Linux X64 获取Rkey,暂时不支持arm64
|
||||
* 适配最新版 Windows 9.9.9-23361 / Linux 3.2.7-23361 提升了兼容性 - 修复 SYS: Listener Proxy
|
||||
* 修复群成员加入时间 上次活跃 活跃等级字段 - 影响 API: /get_group_member_info /get_group_member_list
|
||||
* 修复视频所需的 ffmpeg 路径不正确导致视频封面和时长获取失败 - 影响 Event/API
|
||||
* 优化数据库对消息储存,消耗储存减少 - 影响 Sys: OneBot
|
||||
* 修复他人管理员被撤销时没有上报
|
||||
* 重置Rkey获取机制,使用接口分发Rkey
|
||||
* 尝试修复启动时消息处理需要等待过长时间
|
||||
* 修复多图情况为同一张图片的问题
|
||||
|
||||
## 新增与调整
|
||||
* 支持商城表情发送和上报 url
|
||||
* 支持获取群公告 - 新增 API: /_get_group_notice
|
||||
* 支持了设置已读群/私聊消息接口 - 新增 API: /mark_private_msg_as_read /mark_group_msg_as_read
|
||||
* 支持了好友添加上报事件 - 新增 Event: AddFriend
|
||||
* 支持wsHost和httpHost配置
|
||||
* 支持获取官方Bot账号范围 - 新增 API: /get_robot_uin_range
|
||||
* 支持设置自身在线状态 - 新增 API: /set_online_status
|
||||
* 支持表情回应api和上报 - 新增 Event/API
|
||||
* 支持获取Cookies 实现更加稳定 且支持Skey缓存3600S Pskey每次刷新 - 新增 API: /get_cookies
|
||||
* 支持 服务端踢下线 / 其它设备上线 / 重复登录 / 自身在线状态变更 日志 - 新增 Sys: Log
|
||||
* 支持了消息统计 - API: /get_status
|
||||
* 支持单条消息转发 - API /forward_friend_single_msg、/forward_group_single_msg
|
||||
* 新增扩展获取好友分类列表 Api /get_friends_with_category
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
@@ -26,9 +26,7 @@ NapCatQQ 是基于 PC NTQQ 本体实现一套无头 Bot 框架。
|
||||
|
||||
## 鸣谢名单
|
||||
|
||||
[OpenShamrock]()
|
||||
|
||||
[Lagrange]()
|
||||
[Lagrange](https://github.com/LagrangeDev/Lagrange.Core)
|
||||
|
||||
<!--
|
||||
QQ群:545402644
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"name": "napcat",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.2",
|
||||
"scripts": {
|
||||
"watch:dev": "vite --mode development",
|
||||
"watch:prod": "vite --mode production",
|
||||
@@ -10,6 +10,7 @@
|
||||
"build:prod": "vite build --mode production",
|
||||
"build": "npm run build:dev",
|
||||
"build:core": "cd ./src/core && npm run build && cd ../.. && node ./script/copy-core.cjs",
|
||||
"build:webui": "cd ./src/webui && vite build",
|
||||
"watch": "npm run watch:dev",
|
||||
"debug-win": "powershell dist/napcat.ps1",
|
||||
"lint": "eslint --fix src/**/*.{js,ts}",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { sleep } from '@/common/utils/helper';
|
||||
|
||||
type AsyncQueueTask = (() => void) | Promise<void> ;
|
||||
type AsyncQueueTask = (() => void) | (()=>Promise<void>);
|
||||
|
||||
|
||||
export class AsyncQueue {
|
||||
@@ -8,20 +8,22 @@ export class AsyncQueue {
|
||||
|
||||
public addTask(task: AsyncQueueTask) {
|
||||
this.tasks.push(task);
|
||||
// console.log('addTask', this.tasks.length);
|
||||
if (this.tasks.length === 1) {
|
||||
this.runQueue().then().catch(()=>{});
|
||||
}
|
||||
}
|
||||
|
||||
private async runQueue() {
|
||||
// console.log('runQueue', this.tasks.length);
|
||||
while (this.tasks.length > 0) {
|
||||
const task = this.tasks[0];
|
||||
// console.log('typeof task', typeof task);
|
||||
try {
|
||||
if (task instanceof Promise) {
|
||||
await task;
|
||||
}
|
||||
else{
|
||||
task();
|
||||
const taskRet = task();
|
||||
// console.log('type of taskRet', typeof taskRet, taskRet);
|
||||
if (taskRet instanceof Promise) {
|
||||
await taskRet;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
@@ -193,6 +193,7 @@ export async function uri2local(uri: string, fileName: string | null = null): Pr
|
||||
// res.ext = pathInfo.ext
|
||||
}
|
||||
}
|
||||
fileName = fileName.replace(/[/\\:*?"<>|]/g, '_');
|
||||
res.fileName = fileName;
|
||||
filePath = path.join(getTempDir(), uuidv4() + fileName);
|
||||
fs.writeFileSync(filePath, buffer);
|
||||
|
15
src/common/utils/reboot.ts
Normal file
15
src/common/utils/reboot.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { exit } from "process";
|
||||
import { resolve } from "path";
|
||||
async function reboot() {
|
||||
let batScript = resolve(__dirname, './napcat.bat');
|
||||
let batUtf8Script = resolve(__dirname, './napcat-utf8.bat');
|
||||
let bashScript = resolve(__dirname, './napcat.sh');
|
||||
//如果是win系统写出 5s延迟启动 默认batUtf8Script启动
|
||||
// 如果是linux系统写出 5s延迟启动 默认bashScript启动
|
||||
if (process.platform === 'win32') {
|
||||
// console.log('正在重启...');
|
||||
} else if (process.platform === 'linux') {
|
||||
//console.log('正在重启...');
|
||||
}
|
||||
exit(0);
|
||||
}
|
@@ -34,7 +34,7 @@ export function postLoginStatus() {
|
||||
'screen': '1920x1080',
|
||||
'language': 'zh-CN',
|
||||
'title': 'OneBot.Login',
|
||||
'url': '/login/onebot11/1.2.0',
|
||||
'url': '/login/onebot11/1.3.2',
|
||||
'referrer': 'https://napcat.demo.cn/login?type=onebot11'
|
||||
}
|
||||
};
|
||||
|
2
src/core
2
src/core
Submodule src/core updated: db31eb4f35...5d0e576230
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
var _0x19cca1=_0x3b67;function _0x3b67(_0x4e2d62,_0x2b703c){var _0x43da95=_0x43da();return _0x3b67=function(_0x3b6794,_0x5e2486){_0x3b6794=_0x3b6794-0x186;var _0x30a87a=_0x43da95[_0x3b6794];return _0x30a87a;},_0x3b67(_0x4e2d62,_0x2b703c);}function _0x43da(){var _0x485bdb=['onMSFSsoError','2718873aSehtg','46326dbXYaL','13KNQOpC','getGroupCode','500FKyOoW','2825766sIjvqf','2443SNCuSJ','onMSFStatusChange','5149530LDXDOT','28430WpXmXq','6928nFtyJZ','25344720iHJUOk'];_0x43da=function(){return _0x485bdb;};return _0x43da();}(function(_0x503e40,_0x4b232d){var _0x5cda5a=_0x3b67,_0xa74c3b=_0x503e40();while(!![]){try{var _0x3b6569=-parseInt(_0x5cda5a(0x192))/0x1*(-parseInt(_0x5cda5a(0x191))/0x2)+-parseInt(_0x5cda5a(0x190))/0x3+parseInt(_0x5cda5a(0x187))/0x4*(-parseInt(_0x5cda5a(0x18c))/0x5)+-parseInt(_0x5cda5a(0x188))/0x6+parseInt(_0x5cda5a(0x189))/0x7*(parseInt(_0x5cda5a(0x18d))/0x8)+-parseInt(_0x5cda5a(0x18b))/0x9+parseInt(_0x5cda5a(0x18e))/0xa;if(_0x3b6569===_0x4b232d)break;else _0xa74c3b['push'](_0xa74c3b['shift']());}catch(_0x55844b){_0xa74c3b['push'](_0xa74c3b['shift']());}}}(_0x43da,0x749d5));export class DependsAdapter{[_0x19cca1(0x18a)](_0x1d14d4,_0x4f88a6){}[_0x19cca1(0x18f)](_0x156ded){}[_0x19cca1(0x186)](_0x4766d7){}}
|
||||
function _0x2447(){var _0x40715d=['767928djIDKx','2613555LtFJNB','88880ITNkwU','4272LXSycu','getGroupCode','7731ImFEuE','63sfXUOj','119514rxaZvL','6MAtdxI','5478560FwCVSe','3257401IvFXNP'];_0x2447=function(){return _0x40715d;};return _0x2447();}var _0x255d07=_0x41cd;function _0x41cd(_0x5cef73,_0x12e48d){var _0x24471d=_0x2447();return _0x41cd=function(_0x41cd42,_0xac0095){_0x41cd42=_0x41cd42-0x152;var _0x389d9=_0x24471d[_0x41cd42];return _0x389d9;},_0x41cd(_0x5cef73,_0x12e48d);}(function(_0x57a7ff,_0x3c0999){var _0x5414e6=_0x41cd,_0x591d70=_0x57a7ff();while(!![]){try{var _0x4d1a4a=parseInt(_0x5414e6(0x158))/0x1*(-parseInt(_0x5414e6(0x157))/0x2)+-parseInt(_0x5414e6(0x156))/0x3*(-parseInt(_0x5414e6(0x152))/0x4)+-parseInt(_0x5414e6(0x15c))/0x5+parseInt(_0x5414e6(0x15b))/0x6+parseInt(_0x5414e6(0x15a))/0x7+-parseInt(_0x5414e6(0x153))/0x8*(parseInt(_0x5414e6(0x155))/0x9)+parseInt(_0x5414e6(0x159))/0xa;if(_0x4d1a4a===_0x3c0999)break;else _0x591d70['push'](_0x591d70['shift']());}catch(_0x1503d5){_0x591d70['push'](_0x591d70['shift']());}}}(_0x2447,0x41648));export class DependsAdapter{['onMSFStatusChange'](_0x2e5ba0,_0x5859ee){}['onMSFSsoError'](_0x540230){}[_0x255d07(0x154)](_0x341797){}}
|
@@ -1 +1 @@
|
||||
function _0x5373(_0x2b9ce7,_0xffbb7d){var _0x2366ad=_0x2366();return _0x5373=function(_0x537331,_0x559829){_0x537331=_0x537331-0xd4;var _0x1f83da=_0x2366ad[_0x537331];return _0x1f83da;},_0x5373(_0x2b9ce7,_0xffbb7d);}var _0x278f04=_0x5373;(function(_0x367efd,_0x3f1bf7){var _0x384670=_0x5373,_0x565677=_0x367efd();while(!![]){try{var _0x26beb0=-parseInt(_0x384670(0xdf))/0x1*(parseInt(_0x384670(0xe1))/0x2)+parseInt(_0x384670(0xd5))/0x3*(parseInt(_0x384670(0xdd))/0x4)+-parseInt(_0x384670(0xda))/0x5*(parseInt(_0x384670(0xe0))/0x6)+-parseInt(_0x384670(0xd7))/0x7+-parseInt(_0x384670(0xdb))/0x8*(parseInt(_0x384670(0xde))/0x9)+-parseInt(_0x384670(0xd6))/0xa*(-parseInt(_0x384670(0xd4))/0xb)+parseInt(_0x384670(0xd9))/0xc;if(_0x26beb0===_0x3f1bf7)break;else _0x565677['push'](_0x565677['shift']());}catch(_0x4de050){_0x565677['push'](_0x565677['shift']());}}}(_0x2366,0x57694));export class DispatcherAdapter{[_0x278f04(0xd8)](_0x2a639c){}[_0x278f04(0xdc)](_0x3df573){}['dispatchCallWithJson'](_0x6e6a4c){}}function _0x2366(){var _0xc6638c=['1898568MMlxTI','dispatchCall','1799812jXdYXo','27pZjsRH','6007PSOqrs','625128YiqIDj','6meDdBF','362461TnDcTN','3EkkoSG','70NqnjQm','663054oxnAYm','dispatchRequest','13527120ltVhkv','30ruWnzX'];_0x2366=function(){return _0xc6638c;};return _0x2366();}
|
||||
var _0x3de2e4=_0x2540;function _0x232a(){var _0xfaa861=['13366TCpArG','114600bzkmxJ','12222dloHSn','217HnnbDg','2462142PwpkNp','2751925DTqjRJ','1511320MYXSpE','910szgNEo','dispatchCall','88swNYuM','63630fOvCkS','4GQwgLe'];_0x232a=function(){return _0xfaa861;};return _0x232a();}function _0x2540(_0x45ccb8,_0x573f47){var _0x232a07=_0x232a();return _0x2540=function(_0x2540df,_0x80e83c){_0x2540df=_0x2540df-0xd7;var _0x3c6216=_0x232a07[_0x2540df];return _0x3c6216;},_0x2540(_0x45ccb8,_0x573f47);}(function(_0x2f493a,_0x3c1636){var _0x241720=_0x2540,_0x37f272=_0x2f493a();while(!![]){try{var _0x44217c=-parseInt(_0x241720(0xdd))/0x1*(parseInt(_0x241720(0xde))/0x2)+parseInt(_0x241720(0xdc))/0x3*(parseInt(_0x241720(0xdb))/0x4)+parseInt(_0x241720(0xd8))/0x5+parseInt(_0x241720(0xe2))/0x6+-parseInt(_0x241720(0xe1))/0x7*(parseInt(_0x241720(0xdf))/0x8)+parseInt(_0x241720(0xe0))/0x9*(-parseInt(_0x241720(0xd9))/0xa)+-parseInt(_0x241720(0xd7))/0xb;if(_0x44217c===_0x3c1636)break;else _0x37f272['push'](_0x37f272['shift']());}catch(_0x169507){_0x37f272['push'](_0x37f272['shift']());}}}(_0x232a,0x51b59));export class DispatcherAdapter{['dispatchRequest'](_0xf06f3){}[_0x3de2e4(0xda)](_0x5d3ee4){}['dispatchCallWithJson'](_0x41bc9c){}}
|
@@ -1 +1 @@
|
||||
var _0x507796=_0x4dd4;(function(_0x5d8a39,_0x2e8960){var _0x151ed0=_0x4dd4,_0x5c0894=_0x5d8a39();while(!![]){try{var _0x412819=-parseInt(_0x151ed0(0x9a))/0x1+-parseInt(_0x151ed0(0x99))/0x2+parseInt(_0x151ed0(0x9c))/0x3*(parseInt(_0x151ed0(0xa4))/0x4)+-parseInt(_0x151ed0(0x9f))/0x5+-parseInt(_0x151ed0(0xa2))/0x6*(parseInt(_0x151ed0(0xa0))/0x7)+-parseInt(_0x151ed0(0x9d))/0x8*(-parseInt(_0x151ed0(0x9b))/0x9)+parseInt(_0x151ed0(0xa3))/0xa;if(_0x412819===_0x2e8960)break;else _0x5c0894['push'](_0x5c0894['shift']());}catch(_0x1543ea){_0x5c0894['push'](_0x5c0894['shift']());}}}(_0x1fbf,0x7ea3f));function _0x4dd4(_0x5acf60,_0x5e2498){var _0x1fbfa9=_0x1fbf();return _0x4dd4=function(_0x4dd4ed,_0x493fef){_0x4dd4ed=_0x4dd4ed-0x98;var _0xe69a6f=_0x1fbfa9[_0x4dd4ed];return _0xe69a6f;},_0x4dd4(_0x5acf60,_0x5e2498);}function _0x1fbf(){var _0x46492c=['726755BvXnhR','21eovJev','fixPicImgType','946908fciiBt','10083230HbWaVK','8wfvDYM','onGetOfflineMsg','onShowErrUITips','getAppSetting','1566992IQpUwL','299110syqAMD','27NHBruA','1243551NyRWug','1020728hSDVQy','onInstallFinished'];_0x1fbf=function(){return _0x46492c;};return _0x1fbf();}export class GlobalAdapter{['onLog'](..._0x5dfe5f){}['onGetSrvCalTime'](..._0x42ea71){}[_0x507796(0xa6)](..._0x1e2771){}[_0x507796(0xa1)](..._0x43eacc){}[_0x507796(0x98)](..._0x4fad89){}[_0x507796(0x9e)](..._0x3d6570){}['onUpdateGeneralFlag'](..._0x233bc3){}[_0x507796(0xa5)](..._0x13035d){}}
|
||||
function _0x4bec(){var _0x2affc4=['onShowErrUITips','6689450DqNZBP','34ZMyCSv','12LePUbj','1207507NfdXrz','1104025dBWvym','46614SyguOc','4zBaAhp','onInstallFinished','4959cKBJdo','11957682EFPufC','16003etUzGt','fixPicImgType','6704rugBBT','onGetSrvCalTime','onGetOfflineMsg'];_0x4bec=function(){return _0x2affc4;};return _0x4bec();}var _0x35d759=_0x4d9b;(function(_0x4bb643,_0x132819){var _0x50e673=_0x4d9b,_0x3322ef=_0x4bb643();while(!![]){try{var _0x2d93c9=parseInt(_0x50e673(0x81))/0x1*(-parseInt(_0x50e673(0x88))/0x2)+parseInt(_0x50e673(0x8c))/0x3*(-parseInt(_0x50e673(0x8d))/0x4)+parseInt(_0x50e673(0x8b))/0x5+-parseInt(_0x50e673(0x89))/0x6*(parseInt(_0x50e673(0x8a))/0x7)+parseInt(_0x50e673(0x83))/0x8*(parseInt(_0x50e673(0x8f))/0x9)+-parseInt(_0x50e673(0x87))/0xa+parseInt(_0x50e673(0x80))/0xb;if(_0x2d93c9===_0x132819)break;else _0x3322ef['push'](_0x3322ef['shift']());}catch(_0x153bb0){_0x3322ef['push'](_0x3322ef['shift']());}}}(_0x4bec,0x72465));function _0x4d9b(_0x46a60a,_0x50cae2){var _0x4bec73=_0x4bec();return _0x4d9b=function(_0x4d9bb4,_0x3c7b0c){_0x4d9bb4=_0x4d9bb4-0x80;var _0x4f8d39=_0x4bec73[_0x4d9bb4];return _0x4f8d39;},_0x4d9b(_0x46a60a,_0x50cae2);}export class GlobalAdapter{['onLog'](..._0x19b37e){}[_0x35d759(0x84)](..._0x4af973){}[_0x35d759(0x86)](..._0x2760d6){}[_0x35d759(0x82)](..._0x1a1083){}['getAppSetting'](..._0x19d531){}[_0x35d759(0x8e)](..._0x1771c2){}['onUpdateGeneralFlag'](..._0xf2cd68){}[_0x35d759(0x85)](..._0x50ea80){}}
|
@@ -1 +1 @@
|
||||
(function(_0x3ddc3c,_0x2196c4){var _0x19e16a=_0x18ea,_0x1b8482=_0x3ddc3c();while(!![]){try{var _0x4c96bb=-parseInt(_0x19e16a(0x1f5))/0x1*(parseInt(_0x19e16a(0x1f6))/0x2)+-parseInt(_0x19e16a(0x1fc))/0x3*(-parseInt(_0x19e16a(0x1f8))/0x4)+-parseInt(_0x19e16a(0x1fa))/0x5+-parseInt(_0x19e16a(0x1f3))/0x6*(-parseInt(_0x19e16a(0x1f9))/0x7)+-parseInt(_0x19e16a(0x1fb))/0x8*(parseInt(_0x19e16a(0x1f4))/0x9)+parseInt(_0x19e16a(0x1f7))/0xa+-parseInt(_0x19e16a(0x1f2))/0xb;if(_0x4c96bb===_0x2196c4)break;else _0x1b8482['push'](_0x1b8482['shift']());}catch(_0x5704d2){_0x1b8482['push'](_0x1b8482['shift']());}}}(_0x50c1,0x5914c));function _0x18ea(_0x59a999,_0xa62c8b){var _0x50c133=_0x50c1();return _0x18ea=function(_0x18eaf4,_0x5b2dd8){_0x18eaf4=_0x18eaf4-0x1f2;var _0xdb4126=_0x50c133[_0x18eaf4];return _0xdb4126;},_0x18ea(_0x59a999,_0xa62c8b);}export*from'./NodeIDependsAdapter';export*from'./NodeIDispatcherAdapter';export*from'./NodeIGlobalAdapter';function _0x50c1(){var _0x25f92a=['244svyoWI','18956RxJdBu','866245nHgMjv','40RonzIC','3126noqWuq','408672rSzKzb','864zoStvL','104022dAaYDi','260044qjwCVq','2UiMGjy','4395970MYGRWb'];_0x50c1=function(){return _0x25f92a;};return _0x50c1();}
|
||||
(function(_0x121fc4,_0x513dc8){var _0x382b5f=_0x3eed,_0x1eeb82=_0x121fc4();while(!![]){try{var _0x42bf76=parseInt(_0x382b5f(0x1e1))/0x1*(parseInt(_0x382b5f(0x1e7))/0x2)+parseInt(_0x382b5f(0x1e5))/0x3+parseInt(_0x382b5f(0x1e3))/0x4+-parseInt(_0x382b5f(0x1e6))/0x5+-parseInt(_0x382b5f(0x1e2))/0x6+parseInt(_0x382b5f(0x1e0))/0x7*(parseInt(_0x382b5f(0x1df))/0x8)+-parseInt(_0x382b5f(0x1e8))/0x9*(parseInt(_0x382b5f(0x1e4))/0xa);if(_0x42bf76===_0x513dc8)break;else _0x1eeb82['push'](_0x1eeb82['shift']());}catch(_0x5568d5){_0x1eeb82['push'](_0x1eeb82['shift']());}}}(_0x5362,0x4b025));export*from'./NodeIDependsAdapter';export*from'./NodeIDispatcherAdapter';function _0x5362(){var _0x5b8bb7=['2THrPyg','1204386qfLplf','81480LImlGI','74180WqyIyV','1546866ulozHJ','2985150zgfAhJ','90782mGRkJd','99ynFAmP','14128MfeylH','2219nBCbLB'];_0x5362=function(){return _0x5b8bb7;};return _0x5362();}function _0x3eed(_0xa277b3,_0x154c17){var _0x5362a8=_0x5362();return _0x3eed=function(_0x3eed41,_0x2772a6){_0x3eed41=_0x3eed41-0x1df;var _0x461db4=_0x5362a8[_0x3eed41];return _0x461db4;},_0x3eed(_0xa277b3,_0x154c17);}export*from'./NodeIGlobalAdapter';
|
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
const _0x327915=_0x564b;(function(_0x2e46de,_0x32429){const _0x25e762=_0x564b,_0x54d6c9=_0x2e46de();while(!![]){try{const _0x4d804f=parseInt(_0x25e762(0x141))/0x1+parseInt(_0x25e762(0x148))/0x2*(-parseInt(_0x25e762(0x12f))/0x3)+parseInt(_0x25e762(0x132))/0x4*(parseInt(_0x25e762(0x12d))/0x5)+parseInt(_0x25e762(0x136))/0x6+-parseInt(_0x25e762(0x142))/0x7+parseInt(_0x25e762(0x149))/0x8+parseInt(_0x25e762(0x138))/0x9;if(_0x4d804f===_0x32429)break;else _0x54d6c9['push'](_0x54d6c9['shift']());}catch(_0x3a2885){_0x54d6c9['push'](_0x54d6c9['shift']());}}}(_0x5b8c,0xeef4e));function _0x5b8c(){const _0x3261b2=['JpBwQ','friendUid','349292rZMGNe','reqTime','uid','Bltxv','3198366VaHWrP','rEjUL','4904334BJWSZt','getBuddyService','push','NSGct','approvalFriendRequest','addListener','uin','delete','onBuddyListChange','1782105sxSTUD','8412243LcAaMR','getBuddyList','erKVn','开始获取好友列表','getFriends','获取好友列表超时','2197058AvBzFy','557280jXZTqm','ysELY','rbzhB','onLoginSuccess','then','buddyList','session','20UKwLKb','获取好友列表完成','3vYxReh'];_0x5b8c=function(){return _0x3261b2;};return _0x5b8c();}import{BuddyListener,napCatCore}from'@/core';function _0x564b(_0x347121,_0x4157c3){const _0x5b8ce7=_0x5b8c();return _0x564b=function(_0x564b28,_0x4847e6){_0x564b28=_0x564b28-0x128;let _0x35e1df=_0x5b8ce7[_0x564b28];return _0x35e1df;},_0x564b(_0x347121,_0x4157c3);}import{logDebug}from'@/common/utils/log';import{uid2UinMap}from'@/core/data';import{randomUUID}from'crypto';const buddyChangeTasks=new Map(),buddyListener=new BuddyListener();buddyListener[_0x327915(0x140)]=_0x37416c=>{const _0x50bfe2=_0x327915,_0x529cf1={'EArLC':function(_0x3676f4,_0x2762b7){return _0x3676f4(_0x2762b7);}};for(const [_0x22967e,_0x11e636]of buddyChangeTasks){_0x529cf1['EArLC'](_0x11e636,_0x37416c),buddyChangeTasks[_0x50bfe2(0x13f)](_0x22967e);}},setTimeout(()=>{const _0xa7114d=_0x327915;napCatCore[_0xa7114d(0x129)](()=>{const _0x988e4=_0xa7114d;napCatCore[_0x988e4(0x13d)](buddyListener);});},0x64);export class NTQQFriendApi{static async[_0x327915(0x146)](_0x87cae5=![]){const _0x3d612f=_0x327915,_0x383a4a={'ysELY':function(_0x377aef,_0x630508){return _0x377aef(_0x630508);},'Bltxv':function(_0x302a07,_0x739814,_0x47d689){return _0x302a07(_0x739814,_0x47d689);},'erKVn':_0x3d612f(0x145),'NSGct':function(_0x9fad3f,_0x1428b9){return _0x9fad3f(_0x1428b9);},'rEjUL':_0x3d612f(0x147),'xkKTE':function(_0xfa4d95){return _0xfa4d95();}};return new Promise((_0xb5ffe5,_0x53cb63)=>{const _0xd25d1f=_0x3d612f,_0x4db5ff={'JpBwQ':function(_0x46165b,_0x23dcb3){const _0x17f1ef=_0x564b;return _0x383a4a[_0x17f1ef(0x13b)](_0x46165b,_0x23dcb3);},'rbzhB':_0x383a4a[_0xd25d1f(0x137)]};let _0x4e386c=![];_0x383a4a[_0xd25d1f(0x135)](setTimeout,()=>{const _0x25b6a5=_0xd25d1f;!_0x4e386c&&(_0x4db5ff[_0x25b6a5(0x130)](logDebug,_0x4db5ff[_0x25b6a5(0x128)]),_0x4db5ff['JpBwQ'](_0x53cb63,_0x4db5ff['rbzhB']));},0x1388);const _0x59b5fb=[],_0x4020d5=_0x1158ce=>{const _0x5d7db9=_0xd25d1f;for(const _0x2405ca of _0x1158ce){for(const _0x527fe3 of _0x2405ca[_0x5d7db9(0x12b)]){_0x59b5fb[_0x5d7db9(0x13a)](_0x527fe3),uid2UinMap[_0x527fe3[_0x5d7db9(0x134)]]=_0x527fe3[_0x5d7db9(0x13e)];}}_0x4e386c=!![],logDebug(_0x5d7db9(0x12e),_0x59b5fb),_0x383a4a[_0x5d7db9(0x14a)](_0xb5ffe5,_0x59b5fb);};buddyChangeTasks['set'](_0x383a4a['xkKTE'](randomUUID),_0x4020d5),napCatCore[_0xd25d1f(0x12c)][_0xd25d1f(0x139)]()[_0xd25d1f(0x143)](_0x87cae5)[_0xd25d1f(0x12a)](_0x248b5d=>{const _0x59fb5e=_0xd25d1f;_0x383a4a[_0x59fb5e(0x135)](logDebug,_0x383a4a[_0x59fb5e(0x144)],_0x248b5d);});});}static async['handleFriendRequest'](_0x1cf1f1,_0x5252ac){const _0x33a2ff=_0x327915;napCatCore[_0x33a2ff(0x12c)][_0x33a2ff(0x139)]()?.[_0x33a2ff(0x13c)]({'friendUid':_0x1cf1f1[_0x33a2ff(0x131)],'reqTime':_0x1cf1f1[_0x33a2ff(0x133)],'accept':_0x5252ac});}}
|
||||
const _0x4d4c43=_0x2778;(function(_0x183776,_0x42bef1){const _0x56a198=_0x2778,_0x3b6fff=_0x183776();while(!![]){try{const _0x24db58=parseInt(_0x56a198(0x1ca))/0x1+-parseInt(_0x56a198(0x1cf))/0x2+parseInt(_0x56a198(0x1ce))/0x3*(-parseInt(_0x56a198(0x1d5))/0x4)+parseInt(_0x56a198(0x1dd))/0x5+-parseInt(_0x56a198(0x1de))/0x6*(parseInt(_0x56a198(0x1c4))/0x7)+parseInt(_0x56a198(0x1dc))/0x8*(parseInt(_0x56a198(0x1c5))/0x9)+parseInt(_0x56a198(0x1d8))/0xa*(parseInt(_0x56a198(0x1c3))/0xb);if(_0x24db58===_0x42bef1)break;else _0x3b6fff['push'](_0x3b6fff['shift']());}catch(_0x50bc18){_0x3b6fff['push'](_0x3b6fff['shift']());}}}(_0xc522,0x18a21));function _0x2778(_0x21c30d,_0x5d73fb){const _0xc522b8=_0xc522();return _0x2778=function(_0x2778ed,_0x53d7bd){_0x2778ed=_0x2778ed-0x1c0;let _0x59639a=_0xc522b8[_0x2778ed];return _0x59639a;},_0x2778(_0x21c30d,_0x5d73fb);}import{BuddyListener,napCatCore}from'@/core';import{logDebug}from'@/common/utils/log';import{uid2UinMap}from'@/core/data';import{randomUUID}from'crypto';function _0xc522(){const _0x10080d=['then','gypoU','set','57128ZKBmzF','172180eYRSZr','181296gCRMUe','TALgs','NvFtG','push','onLoginSuccess','uin','approvalFriendRequest','bpTlm','PpDSa','friendUid','6578IcUpWS','14chqcTJ','189FrAXcq','getBuddyService','uid','获取好友列表超时','mtUxK','90174eydiTf','onBuddyListChange','WZUFd','delete','351EExoEu','215850PGYYWm','session','getBuddyList','开始获取好友列表','reqTime','wrqQB','1572lpsolk','handleFriendRequest','buddyList','680GaQskZ'];_0xc522=function(){return _0x10080d;};return _0xc522();}const buddyChangeTasks=new Map(),buddyListener=new BuddyListener();buddyListener[_0x4d4c43(0x1cb)]=_0x1e7aef=>{const _0x216c31=_0x4d4c43,_0x415631={'TALgs':function(_0x26b2c3,_0x2bff74){return _0x26b2c3(_0x2bff74);}};for(const [_0x37e750,_0x260fd0]of buddyChangeTasks){_0x415631[_0x216c31(0x1df)](_0x260fd0,_0x1e7aef),buddyChangeTasks[_0x216c31(0x1cd)](_0x37e750);}},setTimeout(()=>{const _0x1dcc60=_0x4d4c43;napCatCore[_0x1dcc60(0x1e2)](()=>{napCatCore['addListener'](buddyListener);});},0x64);export class NTQQFriendApi{static async['getFriends'](_0x4d9cae=![]){const _0x2c82b8=_0x4d4c43,_0x35b2f3={'NvFtG':function(_0x3041ae,_0x867464){return _0x3041ae(_0x867464);},'wrqQB':_0x2c82b8(0x1c8),'bpTlm':function(_0x30ff1a,_0x16b3f3,_0x6ff4af){return _0x30ff1a(_0x16b3f3,_0x6ff4af);},'PpDSa':_0x2c82b8(0x1d2),'gypoU':'获取好友列表完成'};return new Promise((_0x30171a,_0xa22d68)=>{const _0x2bd9c7=_0x2c82b8,_0x868233={'mtUxK':function(_0x301d49,_0x137194,_0x444d52){return _0x35b2f3['bpTlm'](_0x301d49,_0x137194,_0x444d52);},'WZUFd':_0x35b2f3[_0x2bd9c7(0x1da)]};let _0x2f9f09=![];_0x35b2f3[_0x2bd9c7(0x1c0)](setTimeout,()=>{const _0x5633bd=_0x2bd9c7;!_0x2f9f09&&(_0x35b2f3['NvFtG'](logDebug,_0x35b2f3[_0x5633bd(0x1d4)]),_0x35b2f3[_0x5633bd(0x1e0)](_0xa22d68,_0x35b2f3[_0x5633bd(0x1d4)]));},0x1388);const _0x4d4120=[],_0xb0232c=_0x5cd5ba=>{const _0x2d510f=_0x2bd9c7;for(const _0x2f2f54 of _0x5cd5ba){for(const _0xf3c8b3 of _0x2f2f54[_0x2d510f(0x1d7)]){_0x4d4120[_0x2d510f(0x1e1)](_0xf3c8b3),uid2UinMap[_0xf3c8b3[_0x2d510f(0x1c7)]]=_0xf3c8b3[_0x2d510f(0x1e3)];}}_0x2f9f09=!![],_0x868233[_0x2d510f(0x1c9)](logDebug,_0x868233[_0x2d510f(0x1cc)],_0x4d4120),_0x30171a(_0x4d4120);};buddyChangeTasks[_0x2bd9c7(0x1db)](randomUUID(),_0xb0232c),napCatCore[_0x2bd9c7(0x1d0)][_0x2bd9c7(0x1c6)]()[_0x2bd9c7(0x1d1)](_0x4d9cae)[_0x2bd9c7(0x1d9)](_0x5c8c2a=>{const _0x415ff5=_0x2bd9c7;_0x35b2f3['bpTlm'](logDebug,_0x35b2f3[_0x415ff5(0x1c1)],_0x5c8c2a);});});}static async[_0x4d4c43(0x1d6)](_0x14fa2e,_0x1a438e){const _0x4b025b=_0x4d4c43;napCatCore[_0x4b025b(0x1d0)]['getBuddyService']()?.[_0x4b025b(0x1e4)]({'friendUid':_0x14fa2e[_0x4b025b(0x1c2)],'reqTime':_0x14fa2e[_0x4b025b(0x1d3)],'accept':_0x1a438e});}}
|
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
function _0xbc1b(_0x3e9440,_0x4dd314){var _0x328cfa=_0x328c();return _0xbc1b=function(_0xbc1b91,_0x21cbab){_0xbc1b91=_0xbc1b91-0x139;var _0x23d317=_0x328cfa[_0xbc1b91];return _0x23d317;},_0xbc1b(_0x3e9440,_0x4dd314);}(function(_0x2a9ad9,_0x105444){var _0x4df036=_0xbc1b,_0x4404de=_0x2a9ad9();while(!![]){try{var _0xd6ff50=-parseInt(_0x4df036(0x13a))/0x1*(parseInt(_0x4df036(0x13e))/0x2)+-parseInt(_0x4df036(0x142))/0x3*(-parseInt(_0x4df036(0x143))/0x4)+-parseInt(_0x4df036(0x13b))/0x5*(parseInt(_0x4df036(0x140))/0x6)+-parseInt(_0x4df036(0x13d))/0x7+parseInt(_0x4df036(0x13c))/0x8+parseInt(_0x4df036(0x13f))/0x9+parseInt(_0x4df036(0x141))/0xa*(parseInt(_0x4df036(0x139))/0xb);if(_0xd6ff50===_0x105444)break;else _0x4404de['push'](_0x4404de['shift']());}catch(_0x5225ed){_0x4404de['push'](_0x4404de['shift']());}}}(_0x328c,0xcd7fc));export*from'./file';function _0x328c(){var _0x5319a9=['722LahlVI','55GwkVRA','13245072IDasaX','10379320ajSNYf','2086ucOfUp','1829565losmEC','315870NhUrBy','20LjcJxA','152457babiKn','120kEUETL','1502248smLhhN'];_0x328c=function(){return _0x5319a9;};return _0x328c();}export*from'./friend';export*from'./group';export*from'./msg';export*from'./user';export*from'./webapi';
|
||||
(function(_0x2e1c33,_0x2ce6ae){var _0x5724f4=_0x25f4,_0x44291e=_0x2e1c33();while(!![]){try{var _0x5af712=parseInt(_0x5724f4(0xb2))/0x1*(-parseInt(_0x5724f4(0xb4))/0x2)+-parseInt(_0x5724f4(0xae))/0x3+-parseInt(_0x5724f4(0xb0))/0x4*(-parseInt(_0x5724f4(0xb8))/0x5)+parseInt(_0x5724f4(0xb3))/0x6*(-parseInt(_0x5724f4(0xb1))/0x7)+-parseInt(_0x5724f4(0xb9))/0x8*(parseInt(_0x5724f4(0xb7))/0x9)+parseInt(_0x5724f4(0xb5))/0xa*(-parseInt(_0x5724f4(0xaf))/0xb)+parseInt(_0x5724f4(0xb6))/0xc;if(_0x5af712===_0x2ce6ae)break;else _0x44291e['push'](_0x44291e['shift']());}catch(_0x44e279){_0x44291e['push'](_0x44291e['shift']());}}}(_0xe13c,0x96439));function _0x25f4(_0x3a545d,_0x50d262){var _0xe13ceb=_0xe13c();return _0x25f4=function(_0x25f40c,_0x192405){_0x25f40c=_0x25f40c-0xae;var _0x581ba9=_0xe13ceb[_0x25f40c];return _0x581ba9;},_0x25f4(_0x3a545d,_0x50d262);}export*from'./file';export*from'./friend';export*from'./group';export*from'./msg';export*from'./user';export*from'./webapi';function _0xe13c(){var _0x3ef3a8=['3776340sjPwyn','7mpYUHQ','1jxwnlP','3409326QWKrFG','352470EAJUej','386790ywMqSw','34106520OKFuJB','81513DrsDkk','5cnXlCy','1016DihFfe','1971765RJThzk','176eInPyD'];_0xe13c=function(){return _0x3ef3a8;};return _0xe13c();}
|
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
function _0x1371(){var _0x4793ef=['zKNvo','POST','ylWlE','stringify','eGSZb','音乐消息生成成功','3842573ClTNPl','789790VQiXFB','42HWpbgl','then','10594112XlxlcW','url','Ehaay','sign','KUOdv','450792VRcmRa','974330rJPbvV','HmDrc','catch','840192kopfJB','json','418401ubuxyj'];_0x1371=function(){return _0x4793ef;};return _0x1371();}var _0x23b3aa=_0x4d96;(function(_0x53b1e4,_0x349af7){var _0xb4b8ef=_0x4d96,_0x2e6a39=_0x53b1e4();while(!![]){try{var _0x96ce6=parseInt(_0xb4b8ef(0x18f))/0x1+parseInt(_0xb4b8ef(0x190))/0x2+-parseInt(_0xb4b8ef(0x195))/0x3+parseInt(_0xb4b8ef(0x193))/0x4+parseInt(_0xb4b8ef(0x187))/0x5*(-parseInt(_0xb4b8ef(0x188))/0x6)+-parseInt(_0xb4b8ef(0x186))/0x7+parseInt(_0xb4b8ef(0x18a))/0x8;if(_0x96ce6===_0x349af7)break;else _0x2e6a39['push'](_0x2e6a39['shift']());}catch(_0x75665f){_0x2e6a39['push'](_0x2e6a39['shift']());}}}(_0x1371,0xa590d));function _0x4d96(_0x3d1c2f,_0x5c7b66){var _0x137148=_0x1371();return _0x4d96=function(_0x4d9690,_0x1aac65){_0x4d9690=_0x4d9690-0x181;var _0xe5dfb0=_0x137148[_0x4d9690];return _0xe5dfb0;},_0x4d96(_0x3d1c2f,_0x5c7b66);}import{logDebug}from'@/common/utils/log';export class MusicSign{[_0x23b3aa(0x18b)];constructor(_0x53fa4b){this['url']=_0x53fa4b;}[_0x23b3aa(0x18d)](_0x43cb2a){var _0x185715=_0x23b3aa,_0x37a66b={'ylWlE':function(_0x52b843,_0x53d245){return _0x52b843(_0x53d245);},'ZMnTO':_0x185715(0x185),'eGSZb':function(_0x548de7,_0x2137eb){return _0x548de7(_0x2137eb);},'HmDrc':function(_0xdbdb5a,_0x36baf9,_0x2dac2d){return _0xdbdb5a(_0x36baf9,_0x2dac2d);},'KUOdv':'application/json'};return new Promise((_0xed5963,_0x4f4aff)=>{var _0x233bc5=_0x185715,_0x334c4c={'zKNvo':function(_0x2417cf,_0xc697f6,_0x27c27f){return _0x2417cf(_0xc697f6,_0x27c27f);},'VNabJ':_0x37a66b['ZMnTO'],'Ehaay':function(_0x37993f,_0x5255ca){var _0x4d6b29=_0x4d96;return _0x37a66b[_0x4d6b29(0x184)](_0x37993f,_0x5255ca);}};_0x37a66b[_0x233bc5(0x191)](fetch,this[_0x233bc5(0x18b)],{'method':_0x233bc5(0x181),'headers':{'Content-Type':_0x37a66b[_0x233bc5(0x18e)]},'body':JSON[_0x233bc5(0x183)](_0x43cb2a)})[_0x233bc5(0x189)](_0x678827=>{var _0xce56=_0x233bc5;return!_0x678827['ok']&&_0x37a66b[_0xce56(0x182)](_0x4f4aff,_0x678827['statusText']),_0x678827[_0xce56(0x194)]();})[_0x233bc5(0x189)](_0x2dead6=>{var _0x2c7c00=_0x233bc5;_0x334c4c[_0x2c7c00(0x196)](logDebug,_0x334c4c['VNabJ'],_0x2dead6),_0xed5963(_0x2dead6);})[_0x233bc5(0x192)](_0xa4aeed=>{var _0x23d2c4=_0x233bc5;_0x334c4c[_0x23d2c4(0x18c)](_0x4f4aff,_0xa4aeed);});});}}
|
||||
var _0x452a5a=_0x1420;function _0x53a3(){var _0x1cf9c9=['448730mOAmJc','1055964ySbJsG','tMMUw','stringify','application/json','emJEW','51457TRlOVp','24ljGpRc','AbXDU','AdoVz','3434910fgXZcd','WGhPF','url','POST','24kKbVFL','jJWli','json','catch','音乐消息生成成功','JJXlO','15298EyAFcO','then','1826433RXBuLt','sign','60oLwcUo','30892MSKnOO'];_0x53a3=function(){return _0x1cf9c9;};return _0x53a3();}(function(_0x5f26ed,_0x1315a1){var _0x95fc47=_0x1420,_0x1c4296=_0x5f26ed();while(!![]){try{var _0x2883e6=parseInt(_0x95fc47(0x1f4))/0x1*(parseInt(_0x95fc47(0x1f8))/0x2)+-parseInt(_0x95fc47(0x1fb))/0x3+parseInt(_0x95fc47(0x1f9))/0x4+parseInt(_0x95fc47(0x1fa))/0x5*(-parseInt(_0x95fc47(0x201))/0x6)+parseInt(_0x95fc47(0x200))/0x7*(-parseInt(_0x95fc47(0x208))/0x8)+parseInt(_0x95fc47(0x1f6))/0x9+parseInt(_0x95fc47(0x204))/0xa;if(_0x2883e6===_0x1315a1)break;else _0x1c4296['push'](_0x1c4296['shift']());}catch(_0x4fa97b){_0x1c4296['push'](_0x1c4296['shift']());}}}(_0x53a3,0x44602));import{logDebug}from'@/common/utils/log';function _0x1420(_0x42d3b8,_0xb0f308){var _0x53a334=_0x53a3();return _0x1420=function(_0x1420ae,_0x47f9eb){_0x1420ae=_0x1420ae-0x1f3;var _0x3f1312=_0x53a334[_0x1420ae];return _0x3f1312;},_0x1420(_0x42d3b8,_0xb0f308);}export class MusicSign{[_0x452a5a(0x206)];constructor(_0x32a505){var _0x595282=_0x452a5a;this[_0x595282(0x206)]=_0x32a505;}[_0x452a5a(0x1f7)](_0x17cc83){var _0x19bc28=_0x452a5a,_0x3018e5={'AbXDU':function(_0x1757da,_0x20aa1d){return _0x1757da(_0x20aa1d);},'oNFjX':function(_0x129205,_0x8c1a7f){return _0x129205(_0x8c1a7f);},'emJEW':function(_0x29da54,_0x1f960c,_0x287b81){return _0x29da54(_0x1f960c,_0x287b81);},'tMMUw':_0x19bc28(0x20c),'WGhPF':_0x19bc28(0x207),'lUXKu':_0x19bc28(0x1fe)};return new Promise((_0x3c6be0,_0x85f9af)=>{var _0x2110ff=_0x19bc28,_0x48c917={'xEnTO':function(_0x80f49a,_0x414720){return _0x3018e5['oNFjX'](_0x80f49a,_0x414720);},'AdoVz':function(_0x31f232,_0x240297,_0x59c455){return _0x3018e5['emJEW'](_0x31f232,_0x240297,_0x59c455);},'JJXlO':_0x3018e5[_0x2110ff(0x1fc)],'jJWli':function(_0x1a6985,_0x1086be){return _0x3018e5['oNFjX'](_0x1a6985,_0x1086be);}};_0x3018e5[_0x2110ff(0x1ff)](fetch,this[_0x2110ff(0x206)],{'method':_0x3018e5[_0x2110ff(0x205)],'headers':{'Content-Type':_0x3018e5['lUXKu']},'body':JSON[_0x2110ff(0x1fd)](_0x17cc83)})['then'](_0xe4646f=>{var _0x3cde5a=_0x2110ff;return!_0xe4646f['ok']&&_0x48c917['xEnTO'](_0x85f9af,_0xe4646f['statusText']),_0xe4646f[_0x3cde5a(0x20a)]();})[_0x2110ff(0x1f5)](_0x5f5516=>{var _0x34bccb=_0x2110ff;_0x48c917[_0x34bccb(0x203)](logDebug,_0x48c917[_0x34bccb(0x1f3)],_0x5f5516),_0x48c917[_0x34bccb(0x209)](_0x3c6be0,_0x5f5516);})[_0x2110ff(0x20b)](_0x4e2517=>{var _0x3c85cf=_0x2110ff;_0x3018e5[_0x3c85cf(0x202)](_0x85f9af,_0x4e2517);});});}}
|
4
src/core.lib/src/apis/user.d.ts
vendored
4
src/core.lib/src/apis/user.d.ts
vendored
@@ -14,7 +14,7 @@ export declare class NTQQUserApi {
|
||||
static getSelfInfo(): Promise<void>;
|
||||
static getUserInfo(uid: string): Promise<void>;
|
||||
static getUserDetailInfo(uid: string): Promise<User>;
|
||||
static getPSkey(domainList: string[]): Promise<any>;
|
||||
static getPSkey(domainList: string[], cached?: boolean): Promise<any>;
|
||||
static getRobotUinRange(): Promise<Array<any>>;
|
||||
static getSkey(): Promise<string | undefined>;
|
||||
static getSkey(cached?: boolean): Promise<string | undefined>;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
4
src/core.lib/src/apis/webapi.d.ts
vendored
4
src/core.lib/src/apis/webapi.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
interface WebApiGroupMember {
|
||||
export interface WebApiGroupMember {
|
||||
uin: number;
|
||||
role: number;
|
||||
g: number;
|
||||
@@ -88,7 +88,7 @@ export interface GroupEssenceMsgRet {
|
||||
}
|
||||
export declare class WebApi {
|
||||
static getGroupEssenceMsg(GroupCode: string, page_start: string): Promise<GroupEssenceMsgRet | undefined>;
|
||||
static getGroupMembers(GroupCode: string): Promise<WebApiGroupMember[]>;
|
||||
static getGroupMembers(GroupCode: string, cached?: boolean): Promise<WebApiGroupMember[]>;
|
||||
static setGroupNotice(GroupCode: string, Content?: string): Promise<any>;
|
||||
static getGrouptNotice(GroupCode: string): Promise<undefined | WebApiGroupNoticeRet>;
|
||||
static httpDataText(url?: string, method?: string, data?: string, CookiesValue?: string): Promise<string>;
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6
src/core.lib/src/core.d.ts
vendored
6
src/core.lib/src/core.d.ts
vendored
@@ -22,11 +22,15 @@ export declare class NapCatCore {
|
||||
addListener(listener: BuddyListener | GroupListener | MsgListener | ProfileListener): number;
|
||||
onLoginSuccess(func: OnLoginSuccess): void;
|
||||
quickLogin(uin: string): Promise<QuickLoginResult>;
|
||||
qrLogin(): Promise<{
|
||||
qrLogin(cb: (url: string, base64: string, buffer: Buffer) => Promise<void>): Promise<{
|
||||
url: string;
|
||||
base64: string;
|
||||
buffer: Buffer;
|
||||
}>;
|
||||
passwordLogin(uin: string, password: string, proofSig?: string, proofRand?: string, proofSid?: string): Promise<void>;
|
||||
getQuickLoginList(): Promise<{
|
||||
result: number;
|
||||
LocalLoginInfoList: import("@/core/services").LoginListItem[];
|
||||
}>;
|
||||
}
|
||||
export declare const napCatCore: NapCatCore;
|
||||
|
File diff suppressed because one or more lines are too long
10
src/core.lib/src/data.d.ts
vendored
10
src/core.lib/src/data.d.ts
vendored
@@ -1,7 +1,14 @@
|
||||
import { type Friend, type FriendRequest, type Group, type GroupMember, GroupNotify, type SelfInfo } from './entities';
|
||||
import { type Friend, type FriendRequest, type Group, type GroupMember, GroupNotify, type SelfInfo, BuddyCategoryType } from './entities';
|
||||
import { WebApiGroupMember } from '@/core/apis';
|
||||
export declare const Credentials: {
|
||||
Skey: string;
|
||||
CreatTime: number;
|
||||
PskeyData: Map<string, string>;
|
||||
PskeyTime: Map<string, number>;
|
||||
};
|
||||
export declare const WebGroupData: {
|
||||
GroupData: Map<string, WebApiGroupMember[]>;
|
||||
GroupTime: Map<string, number>;
|
||||
};
|
||||
export declare const selfInfo: SelfInfo;
|
||||
export declare const groups: Map<string, Group>;
|
||||
@@ -22,6 +29,7 @@ export declare function getGroupMember(groupQQ: string | number, memberUinOrUid:
|
||||
export declare const uid2UinMap: Record<string, string>;
|
||||
export declare function getUidByUin(uin: string): string | undefined;
|
||||
export declare const tempGroupCodeMap: Record<string, string>;
|
||||
export declare const rawFriends: Array<BuddyCategoryType>;
|
||||
export declare const stat: {
|
||||
packet_received: number;
|
||||
packet_sent: number;
|
||||
|
@@ -1 +1 @@
|
||||
function _0x2473(){const _0x18c21f=['uin','3783375JlUlKS','length','find','get','7411248QXcWKo','2291634NYKsUf','set','38549TfOUBn','19344okpWwX','getGroupMembers','68190hpEPBl','getGroups','NapCat未能正常启动,请检查日志查看错误','40SaALam','fiOFQ','values','PeFnS','1005429jfwwtr','8LORkhL','toString','delete'];_0x2473=function(){return _0x18c21f;};return _0x2473();}const _0x4cb42f=_0x219f;(function(_0x2e71de,_0x4dc2a4){const _0x46e0eb=_0x219f,_0x38eeca=_0x2e71de();while(!![]){try{const _0x3c64c7=-parseInt(_0x46e0eb(0xec))/0x1+parseInt(_0x46e0eb(0xd8))/0x2+-parseInt(_0x46e0eb(0xdf))/0x3*(-parseInt(_0x46e0eb(0xe0))/0x4)+-parseInt(_0x46e0eb(0xe4))/0x5+-parseInt(_0x46e0eb(0xe9))/0x6+parseInt(_0x46e0eb(0xeb))/0x7*(parseInt(_0x46e0eb(0xdb))/0x8)+parseInt(_0x46e0eb(0xe8))/0x9;if(_0x3c64c7===_0x4dc2a4)break;else _0x38eeca['push'](_0x38eeca['shift']());}catch(_0x437ef4){_0x38eeca['push'](_0x38eeca['shift']());}}}(_0x2473,0x61076));import{isNumeric}from'@/common/utils/helper';import{NTQQGroupApi}from'@/core/apis';export const Credentials={'Skey':'','CreatTime':0x0};export const selfInfo={'uid':'','uin':'','nick':'','online':!![]};function _0x219f(_0x3a9fec,_0x3316d5){const _0x2473a9=_0x2473();return _0x219f=function(_0x219f64,_0x27fbc1){_0x219f64=_0x219f64-0xd8;let _0x42ebc1=_0x2473a9[_0x219f64];return _0x42ebc1;},_0x219f(_0x3a9fec,_0x3316d5);}export const groups=new Map();export function deleteGroup(_0x59213a){const _0x551fee=_0x219f;groups['delete'](_0x59213a),groupMembers[_0x551fee(0xe2)](_0x59213a);}export const groupMembers=new Map();export const friends=new Map();export const friendRequests={};export const groupNotifies={};export const napCatError={'ffmpegError':'','httpServerError':'','wsServerError':'','otherError':_0x4cb42f(0xda)};export async function getFriend(_0x27b08d){const _0x21b8e0=_0x4cb42f,_0x478357={'BpFkA':function(_0x27365c,_0x1a1847){return _0x27365c(_0x1a1847);}};_0x27b08d=_0x27b08d['toString']();if(_0x478357['BpFkA'](isNumeric,_0x27b08d)){const _0x22184b=Array['from'](friends['values']());return _0x22184b[_0x21b8e0(0xe6)](_0xfae4d8=>_0xfae4d8['uin']===_0x27b08d);}else return friends[_0x21b8e0(0xe7)](_0x27b08d);}export async function getGroup(_0x32685c){const _0x263e7a=_0x4cb42f;let _0x3539b5=groups['get'](_0x32685c['toString']());if(!_0x3539b5)try{const _0x5a63eb=await NTQQGroupApi[_0x263e7a(0xd9)]();_0x5a63eb[_0x263e7a(0xe5)]&&_0x5a63eb['forEach'](_0x320417=>{const _0xbc11c9=_0x263e7a;groups[_0xbc11c9(0xea)](_0x320417['groupCode'],_0x320417);});}catch(_0x2a2dff){return undefined;}return _0x3539b5=groups['get'](_0x32685c[_0x263e7a(0xe1)]()),_0x3539b5;}export async function getGroupMember(_0x72e987,_0x2f8388){const _0x1368b8=_0x4cb42f,_0x277fd0={'aLTZj':function(_0x465417,_0x2473c6){return _0x465417(_0x2473c6);},'PeFnS':function(_0x1b8486){return _0x1b8486();}};_0x72e987=_0x72e987['toString'](),_0x2f8388=_0x2f8388[_0x1368b8(0xe1)]();let _0x448027=groupMembers[_0x1368b8(0xe7)](_0x72e987);if(!_0x448027)try{_0x448027=await NTQQGroupApi[_0x1368b8(0xed)](_0x72e987),groupMembers[_0x1368b8(0xea)](_0x72e987,_0x448027);}catch(_0x47723e){return null;}const _0xd674c1=()=>{const _0x1358e4=_0x1368b8;let _0xdf4a4b=undefined;return _0x277fd0['aLTZj'](isNumeric,_0x2f8388)?_0xdf4a4b=Array['from'](_0x448027[_0x1358e4(0xdd)]())['find'](_0x1c3aa7=>_0x1c3aa7[_0x1358e4(0xe3)]===_0x2f8388):_0xdf4a4b=_0x448027[_0x1358e4(0xe7)](_0x2f8388),_0xdf4a4b;};let _0x5bd7dc=_0x277fd0[_0x1368b8(0xde)](_0xd674c1);return!_0x5bd7dc&&(_0x448027=await NTQQGroupApi['getGroupMembers'](_0x72e987),_0x5bd7dc=_0x277fd0[_0x1368b8(0xde)](_0xd674c1)),_0x5bd7dc;}export const uid2UinMap={};export function getUidByUin(_0x34b6de){const _0x2247aa=_0x4cb42f,_0x3d8b6b={'fiOFQ':function(_0x149107,_0x417269){return _0x149107===_0x417269;}};for(const _0x5e5c07 in uid2UinMap){if(_0x3d8b6b[_0x2247aa(0xdc)](uid2UinMap[_0x5e5c07],_0x34b6de))return _0x5e5c07;}}export const tempGroupCodeMap={};export const stat={'packet_received':0x0,'packet_sent':0x0,'message_received':0x0,'message_sent':0x0,'last_message_time':0x0,'disconnect_times':0x0,'lost_times':0x0,'packet_lost':0x0};
|
||||
const _0x2d6aac=_0x544d;(function(_0x1fca09,_0x1f4cbe){const _0x28bb4b=_0x544d,_0x4b01d8=_0x1fca09();while(!![]){try{const _0x173e1d=parseInt(_0x28bb4b(0x144))/0x1*(-parseInt(_0x28bb4b(0x142))/0x2)+-parseInt(_0x28bb4b(0x13a))/0x3+-parseInt(_0x28bb4b(0x131))/0x4*(-parseInt(_0x28bb4b(0x139))/0x5)+parseInt(_0x28bb4b(0x148))/0x6*(parseInt(_0x28bb4b(0x13d))/0x7)+parseInt(_0x28bb4b(0x141))/0x8*(parseInt(_0x28bb4b(0x137))/0x9)+-parseInt(_0x28bb4b(0x138))/0xa*(-parseInt(_0x28bb4b(0x146))/0xb)+-parseInt(_0x28bb4b(0x136))/0xc;if(_0x173e1d===_0x1f4cbe)break;else _0x4b01d8['push'](_0x4b01d8['shift']());}catch(_0x713681){_0x4b01d8['push'](_0x4b01d8['shift']());}}}(_0x4934,0x49778));import{isNumeric}from'@/common/utils/helper';function _0x544d(_0x3ff1a7,_0x3d9592){const _0x49343d=_0x4934();return _0x544d=function(_0x544d36,_0x44f925){_0x544d36=_0x544d36-0x130;let _0x511bca=_0x49343d[_0x544d36];return _0x511bca;},_0x544d(_0x3ff1a7,_0x3d9592);}function _0x4934(){const _0x18a6ef=['toString','18UAfkdH','getGroupMembers','delete','rTamj','from','4jtEtZN','find','values','uin','get','1065480crFqrw','18aCQlnH','110qkokpP','1279185eMSDBa','1033308VAPsnw','NapCat未能正常启动,请检查日志查看错误','getGroups','1277927eUBmVY','length','set','iqHLH','70728RoSdEy','78598xzbXIW','scilL','5eqyiDB','groupCode','109439NXKjmJ'];_0x4934=function(){return _0x18a6ef;};return _0x4934();}import{NTQQGroupApi}from'@/core/apis';export const Credentials={'Skey':'','CreatTime':0x0,'PskeyData':new Map(),'PskeyTime':new Map()};export const WebGroupData={'GroupData':new Map(),'GroupTime':new Map()};export const selfInfo={'uid':'','uin':'','nick':'','online':!![]};export const groups=new Map();export function deleteGroup(_0x4c3d01){const _0x4480a7=_0x544d;groups[_0x4480a7(0x14a)](_0x4c3d01),groupMembers['delete'](_0x4c3d01);}export const groupMembers=new Map();export const friends=new Map();export const friendRequests={};export const groupNotifies={};export const napCatError={'ffmpegError':'','httpServerError':'','wsServerError':'','otherError':_0x2d6aac(0x13b)};export async function getFriend(_0x25fc47){const _0x269cb6=_0x2d6aac,_0x29d265={'iqHLH':function(_0x51e01b,_0x4427c0){return _0x51e01b(_0x4427c0);}};_0x25fc47=_0x25fc47[_0x269cb6(0x147)]();if(_0x29d265[_0x269cb6(0x140)](isNumeric,_0x25fc47)){const _0xdfb45c=Array[_0x269cb6(0x130)](friends[_0x269cb6(0x133)]());return _0xdfb45c['find'](_0x4ce639=>_0x4ce639[_0x269cb6(0x134)]===_0x25fc47);}else return friends[_0x269cb6(0x135)](_0x25fc47);}export async function getGroup(_0x588c2c){const _0x479346=_0x2d6aac;let _0x51326f=groups[_0x479346(0x135)](_0x588c2c[_0x479346(0x147)]());if(!_0x51326f)try{const _0x2bbc81=await NTQQGroupApi[_0x479346(0x13c)]();_0x2bbc81[_0x479346(0x13e)]&&_0x2bbc81['forEach'](_0x369ea7=>{const _0x25eec5=_0x479346;groups[_0x25eec5(0x13f)](_0x369ea7[_0x25eec5(0x145)],_0x369ea7);});}catch(_0x291bf1){return undefined;}return _0x51326f=groups[_0x479346(0x135)](_0x588c2c[_0x479346(0x147)]()),_0x51326f;}export async function getGroupMember(_0x30533d,_0x15644f){const _0x552be2=_0x2d6aac,_0x5d3591={'rTamj':function(_0x58d0fa,_0x27f871){return _0x58d0fa(_0x27f871);},'scilL':function(_0x2fba63){return _0x2fba63();}};_0x30533d=_0x30533d[_0x552be2(0x147)](),_0x15644f=_0x15644f[_0x552be2(0x147)]();let _0x5289cc=groupMembers[_0x552be2(0x135)](_0x30533d);if(!_0x5289cc)try{_0x5289cc=await NTQQGroupApi[_0x552be2(0x149)](_0x30533d),groupMembers[_0x552be2(0x13f)](_0x30533d,_0x5289cc);}catch(_0x50cc8a){return null;}const _0x43aa11=()=>{const _0x199bc7=_0x552be2;let _0x5c8a6c=undefined;return _0x5d3591[_0x199bc7(0x14b)](isNumeric,_0x15644f)?_0x5c8a6c=Array['from'](_0x5289cc[_0x199bc7(0x133)]())[_0x199bc7(0x132)](_0x302a23=>_0x302a23[_0x199bc7(0x134)]===_0x15644f):_0x5c8a6c=_0x5289cc['get'](_0x15644f),_0x5c8a6c;};let _0x25d10e=_0x5d3591['scilL'](_0x43aa11);return!_0x25d10e&&(_0x5289cc=await NTQQGroupApi[_0x552be2(0x149)](_0x30533d),_0x25d10e=_0x5d3591[_0x552be2(0x143)](_0x43aa11)),_0x25d10e;}export const uid2UinMap={};export function getUidByUin(_0x77d83f){for(const _0x4737ff in uid2UinMap){if(uid2UinMap[_0x4737ff]===_0x77d83f)return _0x4737ff;}}export const tempGroupCodeMap={};export const rawFriends=[];export const stat={'packet_received':0x0,'packet_sent':0x0,'message_received':0x0,'message_sent':0x0,'last_message_time':0x0,'disconnect_times':0x0,'lost_times':0x0,'packet_lost':0x0};
|
@@ -1 +1 @@
|
||||
function _0xb790(_0x1d7a46,_0x78c48d){var _0x54178c=_0x5417();return _0xb790=function(_0xb7901c,_0x1a8c60){_0xb7901c=_0xb7901c-0x113;var _0x461f28=_0x54178c[_0xb7901c];return _0x461f28;},_0xb790(_0x1d7a46,_0x78c48d);}(function(_0x5ee3fc,_0x301352){var _0x1c92be=_0xb790,_0x54b9e3=_0x5ee3fc();while(!![]){try{var _0x5c06b3=-parseInt(_0x1c92be(0x122))/0x1*(-parseInt(_0x1c92be(0x11a))/0x2)+-parseInt(_0x1c92be(0x116))/0x3*(parseInt(_0x1c92be(0x126))/0x4)+-parseInt(_0x1c92be(0x119))/0x5+-parseInt(_0x1c92be(0x123))/0x6*(-parseInt(_0x1c92be(0x114))/0x7)+parseInt(_0x1c92be(0x11c))/0x8+-parseInt(_0x1c92be(0x113))/0x9*(-parseInt(_0x1c92be(0x124))/0xa)+parseInt(_0x1c92be(0x11f))/0xb*(-parseInt(_0x1c92be(0x117))/0xc);if(_0x5c06b3===_0x301352)break;else _0x54b9e3['push'](_0x54b9e3['shift']());}catch(_0x44b08d){_0x54b9e3['push'](_0x54b9e3['shift']());}}}(_0x5417,0x4d253));export var CacheFileType;(function(_0x47b42f){var _0x5b1841=_0xb790,_0x4c58ad={'MjjMg':_0x5b1841(0x127),'TApWt':_0x5b1841(0x11d),'kFhYU':_0x5b1841(0x121),'psbuV':_0x5b1841(0x118),'evwWp':_0x5b1841(0x11b)};_0x47b42f[_0x47b42f[_0x5b1841(0x127)]=0x0]=_0x4c58ad['MjjMg'],_0x47b42f[_0x47b42f[_0x4c58ad[_0x5b1841(0x120)]]=0x1]=_0x4c58ad[_0x5b1841(0x120)],_0x47b42f[_0x47b42f[_0x4c58ad[_0x5b1841(0x125)]]=0x2]=_0x4c58ad[_0x5b1841(0x125)],_0x47b42f[_0x47b42f[_0x4c58ad[_0x5b1841(0x11e)]]=0x3]=_0x4c58ad[_0x5b1841(0x11e)],_0x47b42f[_0x47b42f[_0x4c58ad[_0x5b1841(0x115)]]=0x4]=_0x4c58ad[_0x5b1841(0x115)];}(CacheFileType||(CacheFileType={})));function _0x5417(){var _0x576b99=['3131220NqBWIp','DOCUMENT','2411965XLWaRE','122MQINLg','OTHER','3107216XGToQO','VIDEO','psbuV','11wqXaJy','TApWt','AUDIO','6467exvmlg','162jfVGGF','382890MgLHqe','kFhYU','12RfRxxt','IMAGE','27fItuIN','43785AJGBQC','evwWp','7326ofsmmp'];_0x5417=function(){return _0x576b99;};return _0x5417();}
|
||||
function _0xba8a(){var _0x20f693=['7367244mXEVxV','4710cJocPO','uTDng','357897gXIOzN','4DDPQoN','871416IKcyZF','DOCUMENT','muxkU','AjKNb','94zTtmrt','9oNhhrj','742248TVQvrv','1|2|0|3|4','OTHER','VIDEO','AUDIO','914dGorUb','33KQwYZR','DKZTo','VlfAT','1060dUzuDA','958090ChPUsh'];_0xba8a=function(){return _0x20f693;};return _0xba8a();}(function(_0x55a1e8,_0x169950){var _0x139f96=_0x14e1,_0x295222=_0x55a1e8();while(!![]){try{var _0x357c52=parseInt(_0x139f96(0x1bf))/0x1*(parseInt(_0x139f96(0x1c6))/0x2)+-parseInt(_0x139f96(0x1b9))/0x3*(parseInt(_0x139f96(0x1ba))/0x4)+parseInt(_0x139f96(0x1ca))/0x5*(parseInt(_0x139f96(0x1b7))/0x6)+-parseInt(_0x139f96(0x1bb))/0x7+parseInt(_0x139f96(0x1c1))/0x8*(-parseInt(_0x139f96(0x1c0))/0x9)+-parseInt(_0x139f96(0x1cb))/0xa*(parseInt(_0x139f96(0x1c7))/0xb)+parseInt(_0x139f96(0x1cc))/0xc;if(_0x357c52===_0x169950)break;else _0x295222['push'](_0x295222['shift']());}catch(_0x18d025){_0x295222['push'](_0x295222['shift']());}}}(_0xba8a,0x30a98));;export var CacheFileType;function _0x14e1(_0x2c5c7c,_0xbc69bc){var _0xba8a78=_0xba8a();return _0x14e1=function(_0x14e121,_0xa17195){_0x14e121=_0x14e121-0x1b7;var _0x30c7ee=_0xba8a78[_0x14e121];return _0x30c7ee;},_0x14e1(_0x2c5c7c,_0xbc69bc);}(function(_0x35259c){var _0x3fe19d=_0x14e1,_0x22c8e7={'DKZTo':_0x3fe19d(0x1c2),'uTDng':_0x3fe19d(0x1c5),'AjKNb':'IMAGE','VlfAT':_0x3fe19d(0x1c4),'muxkU':'DOCUMENT','ntTyr':_0x3fe19d(0x1c3)},_0x156e60=_0x22c8e7[_0x3fe19d(0x1c8)]['split']('|'),_0x20b97a=0x0;while(!![]){switch(_0x156e60[_0x20b97a++]){case'0':_0x35259c[_0x35259c[_0x22c8e7[_0x3fe19d(0x1b8)]]=0x2]=_0x22c8e7[_0x3fe19d(0x1b8)];continue;case'1':_0x35259c[_0x35259c[_0x22c8e7['AjKNb']]=0x0]=_0x22c8e7[_0x3fe19d(0x1be)];continue;case'2':_0x35259c[_0x35259c[_0x22c8e7[_0x3fe19d(0x1c9)]]=0x1]=_0x22c8e7['VlfAT'];continue;case'3':_0x35259c[_0x35259c[_0x3fe19d(0x1bc)]=0x3]=_0x22c8e7[_0x3fe19d(0x1bd)];continue;case'4':_0x35259c[_0x35259c[_0x22c8e7['ntTyr']]=0x4]=_0x3fe19d(0x1c3);continue;}break;}}(CacheFileType||(CacheFileType={})));
|
File diff suppressed because one or more lines are too long
6
src/core.lib/src/entities/group.d.ts
vendored
6
src/core.lib/src/entities/group.d.ts
vendored
@@ -7,7 +7,7 @@ export interface Group {
|
||||
groupStatus: 0;
|
||||
memberRole: 2;
|
||||
isTop: boolean;
|
||||
toppedTimestamp: '0';
|
||||
toppedTimestamp: string;
|
||||
privilegeFlag: number;
|
||||
isConf: boolean;
|
||||
hasModifyConfGroupFace: boolean;
|
||||
@@ -24,8 +24,8 @@ export interface Group {
|
||||
groupCreditLevel: number;
|
||||
groupFlagExt3: number;
|
||||
groupOwnerId: {
|
||||
'memberUin': string;
|
||||
'memberUid': string;
|
||||
memberUin: string;
|
||||
memberUid: string;
|
||||
};
|
||||
}
|
||||
export declare enum GroupMemberRole {
|
||||
|
@@ -1 +1 @@
|
||||
(function(_0x47f2cd,_0x49b496){var _0x34b1c1=_0x30b0,_0x4b5f84=_0x47f2cd();while(!![]){try{var _0x1b076f=-parseInt(_0x34b1c1(0xa9))/0x1+-parseInt(_0x34b1c1(0xa6))/0x2*(parseInt(_0x34b1c1(0xa2))/0x3)+parseInt(_0x34b1c1(0xa3))/0x4+-parseInt(_0x34b1c1(0xa5))/0x5+parseInt(_0x34b1c1(0xa7))/0x6+parseInt(_0x34b1c1(0xa1))/0x7+-parseInt(_0x34b1c1(0xaa))/0x8;if(_0x1b076f===_0x49b496)break;else _0x4b5f84['push'](_0x4b5f84['shift']());}catch(_0x2cb483){_0x4b5f84['push'](_0x4b5f84['shift']());}}}(_0x3ab3,0xcff5d));function _0x30b0(_0x5e6c92,_0x403687){var _0x3ab307=_0x3ab3();return _0x30b0=function(_0x30b0b1,_0x343eda){_0x30b0b1=_0x30b0b1-0xa1;var _0x1810fe=_0x3ab307[_0x30b0b1];return _0x1810fe;},_0x30b0(_0x5e6c92,_0x403687);}export var GroupMemberRole;(function(_0x1dc42d){var _0xd67d1=_0x30b0,_0x3ae4e8={'hAAOs':'normal','uCYgN':'admin','NlkzU':'owner'};_0x1dc42d[_0x1dc42d[_0x3ae4e8[_0xd67d1(0xa8)]]=0x2]=_0x3ae4e8[_0xd67d1(0xa8)],_0x1dc42d[_0x1dc42d[_0x3ae4e8['uCYgN']]=0x3]=_0x3ae4e8[_0xd67d1(0xa4)],_0x1dc42d[_0x1dc42d[_0x3ae4e8['NlkzU']]=0x4]=_0x3ae4e8['NlkzU'];}(GroupMemberRole||(GroupMemberRole={})));function _0x3ab3(){var _0x45f512=['9737124BUkBaH','hAAOs','554138DjivcZ','3278968jcwWDm','10218229ngbsOW','150030ofEZFa','2616656bKvQUH','uCYgN','5603955ljoTeA','32wSgMeU'];_0x3ab3=function(){return _0x45f512;};return _0x3ab3();}
|
||||
function _0x2e05(){var _0x4ddf70=['ojEhQ','330286bdrrth','NVoGc','7AEyZKD','2185797xDbFMj','6625640GprRsw','ERQqL','normal','265184gQRLEL','520906gjjUJB','80mqgsLD','9nvBQVG','1440056UeeIak','7981836DgXNLd','owner'];_0x2e05=function(){return _0x4ddf70;};return _0x2e05();}(function(_0x3d022a,_0x536117){var _0x10f4c7=_0x5452,_0x5de07a=_0x3d022a();while(!![]){try{var _0x2a2816=-parseInt(_0x10f4c7(0x74))/0x1+-parseInt(_0x10f4c7(0x7b))/0x2+parseInt(_0x10f4c7(0x7e))/0x3+parseInt(_0x10f4c7(0x73))/0x4*(-parseInt(_0x10f4c7(0x75))/0x5)+parseInt(_0x10f4c7(0x78))/0x6*(parseInt(_0x10f4c7(0x7d))/0x7)+-parseInt(_0x10f4c7(0x77))/0x8*(parseInt(_0x10f4c7(0x76))/0x9)+parseInt(_0x10f4c7(0x7f))/0xa;if(_0x2a2816===_0x536117)break;else _0x5de07a['push'](_0x5de07a['shift']());}catch(_0xc97f23){_0x5de07a['push'](_0x5de07a['shift']());}}}(_0x2e05,0xc2035));function _0x5452(_0x43729c,_0x4809b0){var _0x2e05d9=_0x2e05();return _0x5452=function(_0x5452c6,_0x45f04f){_0x5452c6=_0x5452c6-0x73;var _0x3979c3=_0x2e05d9[_0x5452c6];return _0x3979c3;},_0x5452(_0x43729c,_0x4809b0);}export var GroupMemberRole;(function(_0x3cbbec){var _0x313b87=_0x5452,_0xdf8ebe={'ojEhQ':_0x313b87(0x81),'NVoGc':'admin','ERQqL':_0x313b87(0x79)};_0x3cbbec[_0x3cbbec[_0xdf8ebe[_0x313b87(0x7a)]]=0x2]=_0xdf8ebe[_0x313b87(0x7a)],_0x3cbbec[_0x3cbbec[_0xdf8ebe[_0x313b87(0x7c)]]=0x3]=_0xdf8ebe[_0x313b87(0x7c)],_0x3cbbec[_0x3cbbec[_0x313b87(0x79)]=0x4]=_0xdf8ebe[_0x313b87(0x80)];}(GroupMemberRole||(GroupMemberRole={})));
|
@@ -1 +1 @@
|
||||
function _0x24ae(_0x9e09ae,_0x2be9c8){var _0x803b8f=_0x803b();return _0x24ae=function(_0x24ae0a,_0x7bc5ca){_0x24ae0a=_0x24ae0a-0x17a;var _0x24241f=_0x803b8f[_0x24ae0a];return _0x24241f;},_0x24ae(_0x9e09ae,_0x2be9c8);}(function(_0xab9107,_0x3938d1){var _0x1a7314=_0x24ae,_0x243dce=_0xab9107();while(!![]){try{var _0x1e3d37=parseInt(_0x1a7314(0x184))/0x1*(-parseInt(_0x1a7314(0x17b))/0x2)+parseInt(_0x1a7314(0x17a))/0x3*(parseInt(_0x1a7314(0x17c))/0x4)+parseInt(_0x1a7314(0x183))/0x5+parseInt(_0x1a7314(0x182))/0x6+parseInt(_0x1a7314(0x17e))/0x7*(-parseInt(_0x1a7314(0x180))/0x8)+parseInt(_0x1a7314(0x17d))/0x9*(-parseInt(_0x1a7314(0x181))/0xa)+parseInt(_0x1a7314(0x17f))/0xb;if(_0x1e3d37===_0x3938d1)break;else _0x243dce['push'](_0x243dce['shift']());}catch(_0x564253){_0x243dce['push'](_0x243dce['shift']());}}}(_0x803b,0xa9ffe));export*from'./user';export*from'./group';export*from'./msg';function _0x803b(){var _0xec03d6=['136hYsiSi','4wxrqkR','36ctLSXG','21YysgYy','5112558ottcJD','2650216Rivkyi','2557670IYHjio','7534002guDlry','3778165jyiuGd','10333TTaHKc','2819349LvpPXu'];_0x803b=function(){return _0xec03d6;};return _0x803b();}export*from'./notify';export*from'./cache';export*from'./constructor';
|
||||
(function(_0x442a25,_0x28608f){var _0x5bf91c=_0x4185,_0x1a00df=_0x442a25();while(!![]){try{var _0x401c73=-parseInt(_0x5bf91c(0x172))/0x1+parseInt(_0x5bf91c(0x176))/0x2+parseInt(_0x5bf91c(0x174))/0x3+-parseInt(_0x5bf91c(0x171))/0x4+parseInt(_0x5bf91c(0x175))/0x5+-parseInt(_0x5bf91c(0x173))/0x6+parseInt(_0x5bf91c(0x177))/0x7;if(_0x401c73===_0x28608f)break;else _0x1a00df['push'](_0x1a00df['shift']());}catch(_0x3294b4){_0x1a00df['push'](_0x1a00df['shift']());}}}(_0x4d8a,0x31842));export*from'./user';function _0x4185(_0x2ec5c9,_0xb89b1a){var _0x4d8a6b=_0x4d8a();return _0x4185=function(_0x41856a,_0x531f4f){_0x41856a=_0x41856a-0x171;var _0x28f773=_0x4d8a6b[_0x41856a];return _0x28f773;},_0x4185(_0x2ec5c9,_0xb89b1a);}export*from'./group';export*from'./msg';export*from'./notify';export*from'./cache';function _0x4d8a(){var _0x70ae87=['3425254pKfpIw','1361236TUsWvm','112347xhZezN','2396184Jokkdh','755562nEzblh','692320dOPmSP','350396ncIOQA'];_0x4d8a=function(){return _0x70ae87;};return _0x4d8a();}export*from'./constructor';
|
187
src/core.lib/src/entities/msg.d.ts
vendored
187
src/core.lib/src/entities/msg.d.ts
vendored
@@ -2,7 +2,7 @@ import { GroupMemberRole } from './group';
|
||||
export interface Peer {
|
||||
chatType: ChatType;
|
||||
peerUid: string;
|
||||
guildId?: '';
|
||||
guildId?: string;
|
||||
}
|
||||
export declare enum ElementType {
|
||||
TEXT = 1,
|
||||
@@ -18,7 +18,7 @@ export declare enum ElementType {
|
||||
}
|
||||
export interface SendTextElement {
|
||||
elementType: ElementType.TEXT;
|
||||
elementId: '';
|
||||
elementId: string;
|
||||
textElement: {
|
||||
content: string;
|
||||
atType: number;
|
||||
@@ -29,7 +29,7 @@ export interface SendTextElement {
|
||||
}
|
||||
export interface SendPttElement {
|
||||
elementType: ElementType.PTT;
|
||||
elementId: '';
|
||||
elementId: string;
|
||||
pttElement: {
|
||||
fileName: string;
|
||||
filePath: string;
|
||||
@@ -41,7 +41,7 @@ export interface SendPttElement {
|
||||
voiceChangeType: number;
|
||||
canConvert2Text: boolean;
|
||||
waveAmplitudes: number[];
|
||||
fileSubId: '';
|
||||
fileSubId: string;
|
||||
playState: number;
|
||||
autoConvertText: number;
|
||||
};
|
||||
@@ -56,7 +56,7 @@ export declare enum PicSubType {
|
||||
}
|
||||
export interface SendPicElement {
|
||||
elementType: ElementType.PIC;
|
||||
elementId: '';
|
||||
elementId: string;
|
||||
picElement: {
|
||||
md5HexStr: string;
|
||||
fileSize: number | string;
|
||||
@@ -75,7 +75,7 @@ export interface SendPicElement {
|
||||
}
|
||||
export interface SendReplyElement {
|
||||
elementType: ElementType.REPLY;
|
||||
elementId: '';
|
||||
elementId: string;
|
||||
replyElement: {
|
||||
replayMsgSeq: string;
|
||||
replayMsgId: string;
|
||||
@@ -85,7 +85,7 @@ export interface SendReplyElement {
|
||||
}
|
||||
export interface SendFaceElement {
|
||||
elementType: ElementType.FACE;
|
||||
elementId: '';
|
||||
elementId: string;
|
||||
faceElement: FaceElement;
|
||||
}
|
||||
export interface SendMarketFaceElement {
|
||||
@@ -93,39 +93,39 @@ export interface SendMarketFaceElement {
|
||||
marketFaceElement: MarketFaceElement;
|
||||
}
|
||||
export interface FileElement {
|
||||
'fileMd5'?: '';
|
||||
'fileName': string;
|
||||
'filePath': string;
|
||||
fileMd5?: string;
|
||||
fileName: string;
|
||||
filePath: string;
|
||||
fileSize: string;
|
||||
'picHeight'?: number;
|
||||
'picWidth'?: number;
|
||||
'picThumbPath'?: Map<number, string>;
|
||||
'file10MMd5'?: '';
|
||||
'fileSha'?: '';
|
||||
'fileSha3'?: '';
|
||||
'fileUuid'?: '';
|
||||
'fileSubId'?: '';
|
||||
'thumbFileSize'?: number;
|
||||
picHeight?: number;
|
||||
picWidth?: number;
|
||||
picThumbPath?: Map<number, string>;
|
||||
file10MMd5?: string;
|
||||
fileSha?: string;
|
||||
fileSha3?: string;
|
||||
fileUuid?: string;
|
||||
fileSubId?: string;
|
||||
thumbFileSize?: number;
|
||||
fileBizId?: number;
|
||||
}
|
||||
export interface SendFileElement {
|
||||
elementType: ElementType.FILE;
|
||||
elementId: '';
|
||||
elementId: string;
|
||||
fileElement: FileElement;
|
||||
}
|
||||
export interface SendVideoElement {
|
||||
elementType: ElementType.VIDEO;
|
||||
elementId: '';
|
||||
elementId: string;
|
||||
videoElement: VideoElement;
|
||||
}
|
||||
export interface SendArkElement {
|
||||
elementType: ElementType.ARK;
|
||||
elementId: '';
|
||||
elementId: string;
|
||||
arkElement: ArkElement;
|
||||
}
|
||||
export interface SendMarkdownElement {
|
||||
elementType: ElementType.MARKDOWN;
|
||||
elementId: '';
|
||||
elementId: string;
|
||||
markdownElement: MarkdownElement;
|
||||
}
|
||||
export type SendMessageElement = SendTextElement | SendPttElement | SendPicElement | SendReplyElement | SendFaceElement | SendMarketFaceElement | SendFileElement | SendVideoElement | SendArkElement | SendMarkdownElement;
|
||||
@@ -137,6 +137,7 @@ export declare enum AtType {
|
||||
export declare enum ChatType {
|
||||
friend = 1,
|
||||
group = 2,
|
||||
chatDevice = 8,//移动设备?
|
||||
temp = 100
|
||||
}
|
||||
export interface PttElement {
|
||||
@@ -232,49 +233,49 @@ export interface MarketFaceElement {
|
||||
key: string;
|
||||
}
|
||||
export interface VideoElement {
|
||||
'filePath': string;
|
||||
'fileName': string;
|
||||
'videoMd5'?: string;
|
||||
'thumbMd5'?: string;
|
||||
'fileTime'?: number;
|
||||
'thumbSize'?: number;
|
||||
'fileFormat'?: number;
|
||||
'fileSize'?: string;
|
||||
'thumbWidth'?: number;
|
||||
'thumbHeight'?: number;
|
||||
'busiType'?: 0;
|
||||
'subBusiType'?: 0;
|
||||
'thumbPath'?: Map<number, any>;
|
||||
'transferStatus'?: 0;
|
||||
'progress'?: 0;
|
||||
'invalidState'?: 0;
|
||||
'fileUuid'?: string;
|
||||
'fileSubId'?: '';
|
||||
'fileBizId'?: null;
|
||||
'originVideoMd5'?: '';
|
||||
'import_rich_media_context'?: null;
|
||||
'sourceVideoCodecFormat'?: number;
|
||||
filePath: string;
|
||||
fileName: string;
|
||||
videoMd5?: string;
|
||||
thumbMd5?: string;
|
||||
fileTime?: number;
|
||||
thumbSize?: number;
|
||||
fileFormat?: number;
|
||||
fileSize?: string;
|
||||
thumbWidth?: number;
|
||||
thumbHeight?: number;
|
||||
busiType?: 0;
|
||||
subBusiType?: 0;
|
||||
thumbPath?: Map<number, any>;
|
||||
transferStatus?: 0;
|
||||
progress?: 0;
|
||||
invalidState?: 0;
|
||||
fileUuid?: string;
|
||||
fileSubId?: string;
|
||||
fileBizId?: null;
|
||||
originVideoMd5?: string;
|
||||
import_rich_media_context?: null;
|
||||
sourceVideoCodecFormat?: number;
|
||||
}
|
||||
export interface MarkdownElement {
|
||||
content: string;
|
||||
}
|
||||
export interface InlineKeyboardElementRowButton {
|
||||
'id': '';
|
||||
'label': string;
|
||||
'visitedLabel': string;
|
||||
'style': 1;
|
||||
'type': 2;
|
||||
'clickLimit': 0;
|
||||
'unsupportTips': '请升级新版手机QQ';
|
||||
'data': string;
|
||||
'atBotShowChannelList': false;
|
||||
'permissionType': 2;
|
||||
'specifyRoleIds': [];
|
||||
'specifyTinyids': [];
|
||||
'isReply': false;
|
||||
'anchor': 0;
|
||||
'enter': false;
|
||||
'subscribeDataTemplateIds': [];
|
||||
id: string;
|
||||
label: string;
|
||||
visitedLabel: string;
|
||||
style: 1;
|
||||
type: 2;
|
||||
clickLimit: 0;
|
||||
unsupportTips: string;
|
||||
data: string;
|
||||
atBotShowChannelList: boolean;
|
||||
permissionType: number;
|
||||
specifyRoleIds: [];
|
||||
specifyTinyids: [];
|
||||
isReply: false;
|
||||
anchor: 0;
|
||||
enter: false;
|
||||
subscribeDataTemplateIds: [];
|
||||
}
|
||||
export interface InlineKeyboardElement {
|
||||
rows: [
|
||||
@@ -294,40 +295,40 @@ export declare enum TipGroupElementType {
|
||||
ban = 8
|
||||
}
|
||||
export interface TipGroupElement {
|
||||
'type': TipGroupElementType;
|
||||
'role': 0;
|
||||
'groupName': string;
|
||||
'memberUid': string;
|
||||
'memberNick': string;
|
||||
'memberRemark': string;
|
||||
'adminUid': string;
|
||||
'adminNick': string;
|
||||
'adminRemark': string;
|
||||
'createGroup': null;
|
||||
'memberAdd'?: {
|
||||
'showType': 1;
|
||||
'otherAdd': null;
|
||||
'otherAddByOtherQRCode': null;
|
||||
'otherAddByYourQRCode': null;
|
||||
'youAddByOtherQRCode': null;
|
||||
'otherInviteOther': null;
|
||||
'otherInviteYou': null;
|
||||
'youInviteOther': null;
|
||||
type: TipGroupElementType;
|
||||
role: 0;
|
||||
groupName: string;
|
||||
memberUid: string;
|
||||
memberNick: string;
|
||||
memberRemark: string;
|
||||
adminUid: string;
|
||||
adminNick: string;
|
||||
adminRemark: string;
|
||||
createGroup: null;
|
||||
memberAdd?: {
|
||||
showType: 1;
|
||||
otherAdd: null;
|
||||
otherAddByOtherQRCode: null;
|
||||
otherAddByYourQRCode: null;
|
||||
youAddByOtherQRCode: null;
|
||||
otherInviteOther: null;
|
||||
otherInviteYou: null;
|
||||
youInviteOther: null;
|
||||
};
|
||||
'shutUp'?: {
|
||||
'curTime': string;
|
||||
'duration': string;
|
||||
'admin': {
|
||||
'uid': string;
|
||||
'card': string;
|
||||
'name': string;
|
||||
'role': GroupMemberRole;
|
||||
shutUp?: {
|
||||
curTime: string;
|
||||
duration: string;
|
||||
admin: {
|
||||
uid: string;
|
||||
card: string;
|
||||
name: string;
|
||||
role: GroupMemberRole;
|
||||
};
|
||||
'member': {
|
||||
'uid': string;
|
||||
'card': string;
|
||||
'name': string;
|
||||
'role': GroupMemberRole;
|
||||
member: {
|
||||
uid: string;
|
||||
card: string;
|
||||
name: string;
|
||||
role: GroupMemberRole;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
function _0x521a(_0x9e0d30,_0x2af5a9){var _0x1b9b0a=_0x1b9b();return _0x521a=function(_0x521a0e,_0x2d3b24){_0x521a0e=_0x521a0e-0x70;var _0x26f5d6=_0x1b9b0a[_0x521a0e];return _0x26f5d6;},_0x521a(_0x9e0d30,_0x2af5a9);}(function(_0x3ee827,_0x29a54a){var _0x3b89ef=_0x521a,_0x198fa2=_0x3ee827();while(!![]){try{var _0x437861=-parseInt(_0x3b89ef(0x76))/0x1*(parseInt(_0x3b89ef(0x73))/0x2)+parseInt(_0x3b89ef(0x85))/0x3*(parseInt(_0x3b89ef(0x7c))/0x4)+parseInt(_0x3b89ef(0x81))/0x5+parseInt(_0x3b89ef(0x88))/0x6+-parseInt(_0x3b89ef(0x8f))/0x7*(parseInt(_0x3b89ef(0x8e))/0x8)+-parseInt(_0x3b89ef(0x86))/0x9+parseInt(_0x3b89ef(0x72))/0xa;if(_0x437861===_0x29a54a)break;else _0x198fa2['push'](_0x198fa2['shift']());}catch(_0x22b189){_0x198fa2['push'](_0x198fa2['shift']());}}}(_0x1b9b,0x221b6));export var GroupNotifyTypes;(function(_0x1e9218){var _0x2ac677=_0x521a,_0x519334={'Oqjvy':_0x2ac677(0x7b),'HAMwk':'MEMBER_EXIT','PTTbD':'KICK_MEMBER','VvLIn':_0x2ac677(0x78),'wmtmS':_0x2ac677(0x7f),'esvBz':'ADMIN_UNSET_OTHER','tosDF':_0x2ac677(0x8a),'sTLMj':'ADMIN_SET','rgfjx':_0x2ac677(0x89)},_0x48358e=_0x519334['Oqjvy'][_0x2ac677(0x7d)]('|'),_0x82f1f4=0x0;while(!![]){switch(_0x48358e[_0x82f1f4++]){case'0':_0x1e9218[_0x1e9218[_0x519334[_0x2ac677(0x70)]]=0xb]=_0x519334[_0x2ac677(0x70)];continue;case'1':_0x1e9218[_0x1e9218[_0x519334[_0x2ac677(0x80)]]=0x9]=_0x519334[_0x2ac677(0x80)];continue;case'2':_0x1e9218[_0x1e9218[_0x519334['VvLIn']]=0x4]=_0x519334[_0x2ac677(0x71)];continue;case'3':_0x1e9218[_0x1e9218[_0x519334[_0x2ac677(0x84)]]=0xc]=_0x519334[_0x2ac677(0x84)];continue;case'4':_0x1e9218[_0x1e9218[_0x519334[_0x2ac677(0x75)]]=0xd]=_0x519334['esvBz'];continue;case'5':_0x1e9218[_0x1e9218[_0x519334['tosDF']]=0x1]=_0x2ac677(0x8a);continue;case'6':_0x1e9218[_0x1e9218[_0x519334[_0x2ac677(0x83)]]=0x8]=_0x519334[_0x2ac677(0x83)];continue;case'7':_0x1e9218[_0x1e9218[_0x519334[_0x2ac677(0x8b)]]=0x7]=_0x519334[_0x2ac677(0x8b)];continue;}break;}}(GroupNotifyTypes||(GroupNotifyTypes={})));function _0x1b9b(){var _0x12ff97=['408163qyuhQu','HAMwk','VvLIn','1911070nsvCQO','8sQYbIn','APPROVE','esvBz','36767quZqnp','mfwow','INVITED_JOIN','ZVRFw','sxbzd','5|2|7|6|1|0|3|4','158660puVDlU','split','WAIT_HANDLE','ADMIN_UNSET','PTTbD','1352375USrHmu','approve','sTLMj','wmtmS','3RLJiVA','1160496CWHgiO','reject','186510wzbZJy','JOIN_REQUEST','INVITE_ME','rgfjx','IGNORE','REJECT','16gGsXcT'];_0x1b9b=function(){return _0x12ff97;};return _0x1b9b();}export var GroupNotifyStatus;(function(_0x3948c1){var _0x832b66=_0x521a,_0x5a5de0={'mfwow':_0x832b66(0x7e),'ZVRFw':_0x832b66(0x74),'sxbzd':_0x832b66(0x8d)};_0x3948c1[_0x3948c1[_0x832b66(0x8c)]=0x0]='IGNORE',_0x3948c1[_0x3948c1[_0x5a5de0[_0x832b66(0x77)]]=0x1]=_0x5a5de0[_0x832b66(0x77)],_0x3948c1[_0x3948c1[_0x5a5de0[_0x832b66(0x79)]]=0x2]=_0x5a5de0[_0x832b66(0x79)],_0x3948c1[_0x3948c1[_0x5a5de0[_0x832b66(0x7a)]]=0x3]=_0x5a5de0['sxbzd'];}(GroupNotifyStatus||(GroupNotifyStatus={})));export var GroupRequestOperateTypes;(function(_0xba5dac){var _0x52cfce=_0x521a,_0x5cc00e={'JtMBU':_0x52cfce(0x82)};_0xba5dac[_0xba5dac[_0x5cc00e['JtMBU']]=0x1]=_0x52cfce(0x82),_0xba5dac[_0xba5dac[_0x52cfce(0x87)]=0x2]=_0x52cfce(0x87);}(GroupRequestOperateTypes||(GroupRequestOperateTypes={})));
|
||||
(function(_0x3ffe7e,_0x3dab47){var _0x5482e6=_0xfb87,_0x2ef63d=_0x3ffe7e();while(!![]){try{var _0x143dcc=parseInt(_0x5482e6(0x1b3))/0x1+parseInt(_0x5482e6(0x1c1))/0x2*(-parseInt(_0x5482e6(0x1a3))/0x3)+parseInt(_0x5482e6(0x1b1))/0x4+parseInt(_0x5482e6(0x1a5))/0x5+-parseInt(_0x5482e6(0x1bd))/0x6+-parseInt(_0x5482e6(0x1b2))/0x7*(-parseInt(_0x5482e6(0x1a6))/0x8)+-parseInt(_0x5482e6(0x1ae))/0x9;if(_0x143dcc===_0x3dab47)break;else _0x2ef63d['push'](_0x2ef63d['shift']());}catch(_0x368541){_0x2ef63d['push'](_0x2ef63d['shift']());}}}(_0x1d10,0x36aab));function _0xfb87(_0x508b2a,_0x2adca6){var _0x1d100a=_0x1d10();return _0xfb87=function(_0xfb878d,_0x19cffc){_0xfb878d=_0xfb878d-0x1a3;var _0x519e42=_0x1d100a[_0xfb878d];return _0x519e42;},_0xfb87(_0x508b2a,_0x2adca6);}export var GroupNotifyTypes;(function(_0x25e825){var _0x104dfb=_0xfb87,_0x22c6b4={'HZole':_0x104dfb(0x1ad),'jIvDs':'MEMBER_EXIT','lHVlp':_0x104dfb(0x1b0),'iKUZh':_0x104dfb(0x1b8),'hDQcD':_0x104dfb(0x1a8),'oEcxG':'INVITE_ME','IPImG':_0x104dfb(0x1b9),'wRSdv':_0x104dfb(0x1a9)},_0x5980af='5|6|2|3|0|1|7|4'[_0x104dfb(0x1ab)]('|'),_0x5c699d=0x0;while(!![]){switch(_0x5980af[_0x5c699d++]){case'0':_0x25e825[_0x25e825[_0x22c6b4[_0x104dfb(0x1bf)]]=0x9]=_0x104dfb(0x1ad);continue;case'1':_0x25e825[_0x25e825[_0x22c6b4[_0x104dfb(0x1c2)]]=0xb]=_0x22c6b4['jIvDs'];continue;case'2':_0x25e825[_0x25e825[_0x22c6b4[_0x104dfb(0x1c0)]]=0x7]=_0x22c6b4['lHVlp'];continue;case'3':_0x25e825[_0x25e825[_0x22c6b4['iKUZh']]=0x8]=_0x104dfb(0x1b8);continue;case'4':_0x25e825[_0x25e825['ADMIN_UNSET_OTHER']=0xd]=_0x22c6b4[_0x104dfb(0x1bc)];continue;case'5':_0x25e825[_0x25e825[_0x22c6b4['oEcxG']]=0x1]=_0x22c6b4[_0x104dfb(0x1b6)];continue;case'6':_0x25e825[_0x25e825[_0x22c6b4[_0x104dfb(0x1aa)]]=0x4]=_0x104dfb(0x1b9);continue;case'7':_0x25e825[_0x25e825[_0x22c6b4[_0x104dfb(0x1a7)]]=0xc]=_0x22c6b4[_0x104dfb(0x1a7)];continue;}break;}}(GroupNotifyTypes||(GroupNotifyTypes={})));export var GroupNotifyStatus;function _0x1d10(){var _0x101ed2=['APPROVE','JOIN_REQUEST','963492IsbpVS','54145isTSGh','335653eEnHau','InsEU','PyUeA','oEcxG','zXjrc','ADMIN_SET','INVITED_JOIN','approve','DleAn','hDQcD','1344252qSBytp','fYxOS','HZole','lHVlp','16412etYnoQ','jIvDs','129FAerJi','REJECT','2075940boWDyi','328QQTWTy','wRSdv','ADMIN_UNSET_OTHER','ADMIN_UNSET','IPImG','split','IGNORE','KICK_MEMBER','4572306IGRuHt'];_0x1d10=function(){return _0x101ed2;};return _0x1d10();}(function(_0x4f03b3){var _0x4696e6=_0xfb87,_0x1956a1={'PyUeA':_0x4696e6(0x1ac),'qljDs':'WAIT_HANDLE','DleAn':_0x4696e6(0x1af),'InsEU':_0x4696e6(0x1a4)};_0x4f03b3[_0x4f03b3['IGNORE']=0x0]=_0x1956a1[_0x4696e6(0x1b5)],_0x4f03b3[_0x4f03b3[_0x1956a1['qljDs']]=0x1]=_0x1956a1['qljDs'],_0x4f03b3[_0x4f03b3[_0x1956a1[_0x4696e6(0x1bb)]]=0x2]=_0x1956a1[_0x4696e6(0x1bb)],_0x4f03b3[_0x4f03b3[_0x1956a1[_0x4696e6(0x1b4)]]=0x3]=_0x1956a1[_0x4696e6(0x1b4)];}(GroupNotifyStatus||(GroupNotifyStatus={})));export var GroupRequestOperateTypes;(function(_0xfcdc73){var _0xf2aaa=_0xfb87,_0x476479={'fYxOS':_0xf2aaa(0x1ba),'zXjrc':'reject'};_0xfcdc73[_0xfcdc73[_0x476479[_0xf2aaa(0x1be)]]=0x1]=_0x476479[_0xf2aaa(0x1be)],_0xfcdc73[_0xfcdc73[_0x476479[_0xf2aaa(0x1b7)]]=0x2]=_0x476479['zXjrc'];}(GroupRequestOperateTypes||(GroupRequestOperateTypes={})));
|
110
src/core.lib/src/entities/user.d.ts
vendored
110
src/core.lib/src/entities/user.d.ts
vendored
@@ -3,11 +3,27 @@ export declare enum Sex {
|
||||
female = 2,
|
||||
unknown = 255
|
||||
}
|
||||
export interface BuddyCategoryType {
|
||||
categoryId: number;
|
||||
categroyName: string;
|
||||
categroyMbCount: number;
|
||||
buddyList: User[];
|
||||
}
|
||||
export interface BuddyProfileLikeReq {
|
||||
friendUids: string[];
|
||||
basic: number;
|
||||
vote: number;
|
||||
favorite: number;
|
||||
userProfile: number;
|
||||
type: number;
|
||||
start: number;
|
||||
limit: number;
|
||||
}
|
||||
export interface QQLevel {
|
||||
'crownNum': number;
|
||||
'sunNum': number;
|
||||
'moonNum': number;
|
||||
'starNum': number;
|
||||
crownNum: number;
|
||||
sunNum: number;
|
||||
moonNum: number;
|
||||
starNum: number;
|
||||
}
|
||||
export interface User {
|
||||
uid: string;
|
||||
@@ -19,52 +35,52 @@ export interface User {
|
||||
sex?: Sex;
|
||||
qqLevel?: QQLevel;
|
||||
qid?: string;
|
||||
'birthday_year'?: number;
|
||||
'birthday_month'?: number;
|
||||
'birthday_day'?: number;
|
||||
'topTime'?: string;
|
||||
'constellation'?: number;
|
||||
'shengXiao'?: number;
|
||||
'kBloodType'?: number;
|
||||
'homeTown'?: string;
|
||||
'makeFriendCareer'?: number;
|
||||
'pos'?: string;
|
||||
'eMail'?: string;
|
||||
'phoneNum'?: string;
|
||||
'college'?: string;
|
||||
'country'?: string;
|
||||
'province'?: string;
|
||||
'city'?: string;
|
||||
'postCode'?: string;
|
||||
'address'?: string;
|
||||
'isBlock'?: boolean;
|
||||
'isSpecialCareOpen'?: boolean;
|
||||
'isSpecialCareZone'?: boolean;
|
||||
'ringId'?: string;
|
||||
'regTime'?: number;
|
||||
birthday_year?: number;
|
||||
birthday_month?: number;
|
||||
birthday_day?: number;
|
||||
topTime?: string;
|
||||
constellation?: number;
|
||||
shengXiao?: number;
|
||||
kBloodType?: number;
|
||||
homeTown?: string;
|
||||
makeFriendCareer?: number;
|
||||
pos?: string;
|
||||
eMail?: string;
|
||||
phoneNum?: string;
|
||||
college?: string;
|
||||
country?: string;
|
||||
province?: string;
|
||||
city?: string;
|
||||
postCode?: string;
|
||||
address?: string;
|
||||
isBlock?: boolean;
|
||||
isSpecialCareOpen?: boolean;
|
||||
isSpecialCareZone?: boolean;
|
||||
ringId?: string;
|
||||
regTime?: number;
|
||||
interest?: string;
|
||||
'labels'?: string[];
|
||||
'isHideQQLevel'?: number;
|
||||
'privilegeIcon'?: {
|
||||
'jumpUrl': string;
|
||||
'openIconList': unknown[];
|
||||
'closeIconList': unknown[];
|
||||
labels?: string[];
|
||||
isHideQQLevel?: number;
|
||||
privilegeIcon?: {
|
||||
jumpUrl: string;
|
||||
openIconList: unknown[];
|
||||
closeIconList: unknown[];
|
||||
};
|
||||
'photoWall'?: {
|
||||
'picList': unknown[];
|
||||
photoWall?: {
|
||||
picList: unknown[];
|
||||
};
|
||||
'vipFlag'?: boolean;
|
||||
'yearVipFlag'?: boolean;
|
||||
'svipFlag'?: boolean;
|
||||
'vipLevel'?: number;
|
||||
'status'?: number;
|
||||
'qidianMasterFlag'?: number;
|
||||
'qidianCrewFlag'?: number;
|
||||
'qidianCrewFlag2'?: number;
|
||||
'extStatus'?: number;
|
||||
'recommendImgFlag'?: number;
|
||||
'disableEmojiShortCuts'?: number;
|
||||
'pendantId'?: string;
|
||||
vipFlag?: boolean;
|
||||
yearVipFlag?: boolean;
|
||||
svipFlag?: boolean;
|
||||
vipLevel?: number;
|
||||
status?: number;
|
||||
qidianMasterFlag?: number;
|
||||
qidianCrewFlag?: number;
|
||||
qidianCrewFlag2?: number;
|
||||
extStatus?: number;
|
||||
recommendImgFlag?: number;
|
||||
disableEmojiShortCuts?: number;
|
||||
pendantId?: string;
|
||||
}
|
||||
export interface SelfInfo extends User {
|
||||
online?: boolean;
|
||||
|
@@ -1 +1 @@
|
||||
(function(_0x43febf,_0x26cc5d){var _0x5a3ecf=_0x6a15,_0x577e8b=_0x43febf();while(!![]){try{var _0x312291=parseInt(_0x5a3ecf(0x64))/0x1*(-parseInt(_0x5a3ecf(0x66))/0x2)+parseInt(_0x5a3ecf(0x69))/0x3*(parseInt(_0x5a3ecf(0x71))/0x4)+-parseInt(_0x5a3ecf(0x65))/0x5*(-parseInt(_0x5a3ecf(0x6f))/0x6)+parseInt(_0x5a3ecf(0x6d))/0x7+-parseInt(_0x5a3ecf(0x72))/0x8*(parseInt(_0x5a3ecf(0x6a))/0x9)+-parseInt(_0x5a3ecf(0x74))/0xa*(parseInt(_0x5a3ecf(0x67))/0xb)+parseInt(_0x5a3ecf(0x6c))/0xc*(parseInt(_0x5a3ecf(0x70))/0xd);if(_0x312291===_0x26cc5d)break;else _0x577e8b['push'](_0x577e8b['shift']());}catch(_0x310ece){_0x577e8b['push'](_0x577e8b['shift']());}}}(_0x4077,0x66c73));function _0x4077(){var _0x325b58=['209ZREICU','xtsbZ','21danwfU','5013irDAtx','unknown','12TDknnS','1893549JYoJIE','ekyxd','1919370oWorId','12725193URyyLH','120532QQnsVJ','9400bgoZWF','male','281130UtUHNs','5503tfbscQ','5hnquPE','62ZQzKVd'];_0x4077=function(){return _0x325b58;};return _0x4077();}function _0x6a15(_0x335dbf,_0x5013a1){var _0x40776e=_0x4077();return _0x6a15=function(_0x6a15ee,_0x200ab1){_0x6a15ee=_0x6a15ee-0x64;var _0xfd942f=_0x40776e[_0x6a15ee];return _0xfd942f;},_0x6a15(_0x335dbf,_0x5013a1);}export var Sex;(function(_0x6d3970){var _0x5b3239=_0x6a15,_0x4d96cd={'PIzup':_0x5b3239(0x73),'ekyxd':'female','xtsbZ':_0x5b3239(0x6b)};_0x6d3970[_0x6d3970[_0x5b3239(0x73)]=0x1]=_0x4d96cd['PIzup'],_0x6d3970[_0x6d3970[_0x4d96cd[_0x5b3239(0x6e)]]=0x2]=_0x4d96cd[_0x5b3239(0x6e)],_0x6d3970[_0x6d3970[_0x4d96cd['xtsbZ']]=0xff]=_0x4d96cd[_0x5b3239(0x68)];}(Sex||(Sex={})));
|
||||
(function(_0x23da76,_0x2ec3a8){var _0x4d1862=_0x1dee,_0x136dbd=_0x23da76();while(!![]){try{var _0x40ae8d=-parseInt(_0x4d1862(0xd6))/0x1+parseInt(_0x4d1862(0xd5))/0x2*(-parseInt(_0x4d1862(0xd9))/0x3)+parseInt(_0x4d1862(0xd4))/0x4+parseInt(_0x4d1862(0xde))/0x5+parseInt(_0x4d1862(0xdc))/0x6+-parseInt(_0x4d1862(0xdb))/0x7*(-parseInt(_0x4d1862(0xd1))/0x8)+-parseInt(_0x4d1862(0xdd))/0x9*(parseInt(_0x4d1862(0xd8))/0xa);if(_0x40ae8d===_0x2ec3a8)break;else _0x136dbd['push'](_0x136dbd['shift']());}catch(_0x3141a6){_0x136dbd['push'](_0x136dbd['shift']());}}}(_0x3375,0x8c468));function _0x3375(){var _0x329309=['3946176EiWhKn','9aoWRHH','4045845ufUWXa','fmolJ','280ecIgAa','female','HUXWL','1018636cOKrHc','582mQxwpu','362862bZZdZb','male','11537370QgzAcj','3921OcZClr','unknown','149996NcqaMO'];_0x3375=function(){return _0x329309;};return _0x3375();}function _0x1dee(_0x195228,_0x5e3a7a){var _0x33756b=_0x3375();return _0x1dee=function(_0x1dee18,_0x59e203){_0x1dee18=_0x1dee18-0xd1;var _0x481d28=_0x33756b[_0x1dee18];return _0x481d28;},_0x1dee(_0x195228,_0x5e3a7a);}export var Sex;(function(_0x1dc690){var _0x470d12=_0x1dee,_0x5a3be5={'HUXWL':_0x470d12(0xd7),'jljek':_0x470d12(0xd2),'fmolJ':_0x470d12(0xda)};_0x1dc690[_0x1dc690[_0x470d12(0xd7)]=0x1]=_0x5a3be5[_0x470d12(0xd3)],_0x1dc690[_0x1dc690[_0x5a3be5['jljek']]=0x2]=_0x470d12(0xd2),_0x1dc690[_0x1dc690[_0x5a3be5[_0x470d12(0xdf)]]=0xff]=_0x5a3be5[_0x470d12(0xdf)];}(Sex||(Sex={})));
|
2
src/core.lib/src/external/hook.js
vendored
2
src/core.lib/src/external/hook.js
vendored
@@ -1 +1 @@
|
||||
const _0x531e70=_0xbb31;function _0x341f(){const _0x1a68fe=['MoeHoo','isAvailable','moeHook','VOqyi','kDyDl','4233678IuPUYT','209312eRILao','8771301nIMFbR','150aMTqnF','jYZqH','GetRkey','10HKKyDh','HookRkey','1764AqxeGn','getRKey','1807164oOIgUp','24699450wQoLcR','3130cyyIGP','26776DvDxtl','加载\x20moehoo\x20失败'];_0x341f=function(){return _0x1a68fe;};return _0x341f();}(function(_0x4b9b89,_0x17ca43){const _0x302118=_0xbb31,_0x37a98a=_0x4b9b89();while(!![]){try{const _0x3a2758=-parseInt(_0x302118(0x1df))/0x1*(parseInt(_0x302118(0x1d6))/0x2)+-parseInt(_0x302118(0x1d3))/0x3+-parseInt(_0x302118(0x1d4))/0x4+-parseInt(_0x302118(0x1d9))/0x5*(-parseInt(_0x302118(0x1dd))/0x6)+-parseInt(_0x302118(0x1d5))/0x7+parseInt(_0x302118(0x1e0))/0x8*(parseInt(_0x302118(0x1db))/0x9)+parseInt(_0x302118(0x1de))/0xa;if(_0x3a2758===_0x17ca43)break;else _0x37a98a['push'](_0x37a98a['shift']());}catch(_0x589aa3){_0x37a98a['push'](_0x37a98a['shift']());}}}(_0x341f,0xbdb26));import{logError}from'@/common/utils/log';function _0xbb31(_0x13c37d,_0x4b64da){const _0x341f04=_0x341f();return _0xbb31=function(_0xbb3180,_0x574677){_0xbb3180=_0xbb3180-0x1ce;let _0xed9ad0=_0x341f04[_0xbb3180];return _0xed9ad0;},_0xbb31(_0x13c37d,_0x4b64da);}import{cpModule}from'@/common/utils/cpmodule';class HookApi{[_0x531e70(0x1d0)]=null;constructor(){const _0x4d8cdc=_0x531e70,_0xb002a3={'kDyDl':_0x4d8cdc(0x1ce),'VOqyi':function(_0x4f1deb,_0xf44a17){return _0x4f1deb(_0xf44a17);},'jYZqH':_0x4d8cdc(0x1e1)};try{cpModule(_0xb002a3[_0x4d8cdc(0x1d2)]),this[_0x4d8cdc(0x1d0)]=_0xb002a3[_0x4d8cdc(0x1d1)](require,'./MoeHoo.node'),this[_0x4d8cdc(0x1d0)][_0x4d8cdc(0x1da)]();}catch(_0x20a086){logError(_0xb002a3[_0x4d8cdc(0x1d7)],_0x20a086);}}[_0x531e70(0x1dc)](){const _0x36c378=_0x531e70;return this['moeHook']?.[_0x36c378(0x1d8)]()||'';}[_0x531e70(0x1cf)](){const _0x23a108=_0x531e70;return!!this[_0x23a108(0x1d0)];}}export const hookApi=new HookApi();
|
||||
const _0x93cf25=_0x4510;(function(_0x55472c,_0x4634e1){const _0x14cda3=_0x4510,_0x3f0d48=_0x55472c();while(!![]){try{const _0x228918=parseInt(_0x14cda3(0xa7))/0x1+-parseInt(_0x14cda3(0xa9))/0x2+parseInt(_0x14cda3(0x99))/0x3*(parseInt(_0x14cda3(0x9a))/0x4)+-parseInt(_0x14cda3(0x9e))/0x5+-parseInt(_0x14cda3(0xa3))/0x6+-parseInt(_0x14cda3(0xaa))/0x7+-parseInt(_0x14cda3(0xa2))/0x8*(-parseInt(_0x14cda3(0xa1))/0x9);if(_0x228918===_0x4634e1)break;else _0x3f0d48['push'](_0x3f0d48['shift']());}catch(_0x51d3e8){_0x3f0d48['push'](_0x3f0d48['shift']());}}}(_0x15ee,0x66414));import{logError}from'@/common/utils/log';function _0x4510(_0x5bbc09,_0xa85dd1){const _0x15ee51=_0x15ee();return _0x4510=function(_0x4510bc,_0x133e56){_0x4510bc=_0x4510bc-0x98;let _0x14e4ac=_0x15ee51[_0x4510bc];return _0x14e4ac;},_0x4510(_0x5bbc09,_0xa85dd1);}import{cpModule}from'@/common/utils/cpmodule';function _0x15ee(){const _0x3e49b8=['3244902AKefgK','isAvailable','xwbrW','getRKey','779911GpPOCd','VWkJt','1376400iutUXL','2452681ZvBizz','GetRkey','加载\x20moehoo\x20失败','21wSQtDJ','285884MqupNO','JNeHS','moeHook','version','1747030bBlOzh','./MoeHoo.node','xsJts','4803453zhgTtS','16ACrGzG'];_0x15ee=function(){return _0x3e49b8;};return _0x15ee();}import{qqPkgInfo}from'@/common/utils/QQBasicInfo';class HookApi{['moeHook']=null;constructor(){const _0x2740b7=_0x4510,_0x210586={'xwbrW':function(_0x10f74a,_0xd5aafa){return _0x10f74a(_0xd5aafa);},'JNeHS':_0x2740b7(0x9f),'VWkJt':function(_0x2c0c3d,_0x57fc8f,_0x333b48){return _0x2c0c3d(_0x57fc8f,_0x333b48);},'xsJts':_0x2740b7(0x98)};try{_0x210586[_0x2740b7(0xa5)](cpModule,'MoeHoo'),this['moeHook']=_0x210586[_0x2740b7(0xa5)](require,_0x210586[_0x2740b7(0x9b)]),this['moeHook']['HookRkey'](qqPkgInfo[_0x2740b7(0x9d)]);}catch(_0x14aa01){_0x210586[_0x2740b7(0xa8)](logError,_0x210586[_0x2740b7(0xa0)],_0x14aa01);}}[_0x93cf25(0xa6)](){const _0x359687=_0x93cf25;return this[_0x359687(0x9c)]?.[_0x359687(0xab)]()||'';}[_0x93cf25(0xa4)](){const _0x57cf08=_0x93cf25;return!!this[_0x57cf08(0x9c)];}}export const hookApi=new HookApi();
|
@@ -1 +1 @@
|
||||
(function(_0x5c07f4,_0x2006a2){var _0x102273=_0x33d4,_0x1b2e4c=_0x5c07f4();while(!![]){try{var _0x4b36e1=-parseInt(_0x102273(0x11a))/0x1*(parseInt(_0x102273(0x119))/0x2)+parseInt(_0x102273(0x117))/0x3+-parseInt(_0x102273(0x118))/0x4+-parseInt(_0x102273(0x11d))/0x5*(-parseInt(_0x102273(0x11b))/0x6)+-parseInt(_0x102273(0x114))/0x7*(-parseInt(_0x102273(0x11c))/0x8)+-parseInt(_0x102273(0x115))/0x9*(parseInt(_0x102273(0x116))/0xa)+parseInt(_0x102273(0x113))/0xb;if(_0x4b36e1===_0x2006a2)break;else _0x1b2e4c['push'](_0x1b2e4c['shift']());}catch(_0xe443dc){_0x1b2e4c['push'](_0x1b2e4c['shift']());}}}(_0x7174,0xdf2ae));import _0x5a447f from'./wrapper';export*from'./adapters';export*from'./apis';export*from'./entities';export*from'./listeners';export*from'./services';export*as Adapters from'./adapters';function _0x7174(){var _0x4a9f2f=['7137280AHahjf','2SUZpYc','1426793iDSEok','186RrJIqb','14182024amFcHA','265xByRHE','30218584CtUJcy','7bgSnpW','5867460PHClRV','10IByhyg','766821Mkhnob'];_0x7174=function(){return _0x4a9f2f;};return _0x7174();}export*as APIs from'./apis';export*as Entities from'./entities';export*as Listeners from'./listeners';export*as Services from'./services';function _0x33d4(_0x2d407e,_0x521e3f){var _0x717458=_0x7174();return _0x33d4=function(_0x33d449,_0x2ab6ef){_0x33d449=_0x33d449-0x113;var _0x345d1a=_0x717458[_0x33d449];return _0x345d1a;},_0x33d4(_0x2d407e,_0x521e3f);}export{_0x5a447f as Wrapper};export*as WrapperInterface from'./wrapper';export*as SessionConfig from'./sessionConfig';export{napCatCore}from'./core';
|
||||
(function(_0x23c65a,_0x44ce6f){var _0x1a583c=_0x28b2,_0x51e2c4=_0x23c65a();while(!![]){try{var _0x26ed71=parseInt(_0x1a583c(0x92))/0x1*(-parseInt(_0x1a583c(0x91))/0x2)+-parseInt(_0x1a583c(0x93))/0x3*(-parseInt(_0x1a583c(0x97))/0x4)+-parseInt(_0x1a583c(0x9a))/0x5+parseInt(_0x1a583c(0x95))/0x6*(-parseInt(_0x1a583c(0x94))/0x7)+parseInt(_0x1a583c(0x9c))/0x8+-parseInt(_0x1a583c(0x96))/0x9*(parseInt(_0x1a583c(0x98))/0xa)+-parseInt(_0x1a583c(0x99))/0xb*(-parseInt(_0x1a583c(0x9b))/0xc);if(_0x26ed71===_0x44ce6f)break;else _0x51e2c4['push'](_0x51e2c4['shift']());}catch(_0x4847ee){_0x51e2c4['push'](_0x51e2c4['shift']());}}}(_0x2706,0x79d2e));function _0x28b2(_0x3c52d7,_0x42126b){var _0x2706b2=_0x2706();return _0x28b2=function(_0x28b279,_0x4b9667){_0x28b279=_0x28b279-0x91;var _0x4b55e6=_0x2706b2[_0x28b279];return _0x4b55e6;},_0x28b2(_0x3c52d7,_0x42126b);}import _0x700126 from'./wrapper';export*from'./adapters';export*from'./apis';export*from'./entities';function _0x2706(){var _0xb85847=['4490704JohuyB','308474jSXksG','5NxNPMz','2038695zXgYCs','1069887kxsDvN','12UqjzVW','1476Tvuwxr','4tEZZcK','15490zmPfHK','15310603sQWQfS','4014415nvPdmt','12wFFKwz'];_0x2706=function(){return _0xb85847;};return _0x2706();}export*from'./listeners';export*from'./services';export*as Adapters from'./adapters';export*as APIs from'./apis';export*as Entities from'./entities';export*as Listeners from'./listeners';export*as Services from'./services';export{_0x700126 as Wrapper};export*as WrapperInterface from'./wrapper';export*as SessionConfig from'./sessionConfig';export{napCatCore}from'./core';
|
@@ -1,10 +1,5 @@
|
||||
import { FriendRequestNotify, User } from '@/core/entities';
|
||||
export type OnBuddyChangeParams = {
|
||||
categoryId: number;
|
||||
categroyName: string;
|
||||
categroyMbCount: number;
|
||||
buddyList: User[];
|
||||
}[];
|
||||
import { BuddyCategoryType, FriendRequestNotify } from '@/core/entities';
|
||||
export type OnBuddyChangeParams = BuddyCategoryType[];
|
||||
interface IBuddyListener {
|
||||
onBuddyListChange(arg: OnBuddyChangeParams): void;
|
||||
onBuddyInfoChange(arg: unknown): void;
|
||||
|
@@ -1 +1 @@
|
||||
var _0x43ffb8=_0x34a5;function _0x34a5(_0xbd6dc2,_0x5e4dfa){var _0x41cd48=_0x41cd();return _0x34a5=function(_0x34a5e1,_0x31d0bf){_0x34a5e1=_0x34a5e1-0x131;var _0x40146c=_0x41cd48[_0x34a5e1];return _0x40146c;},_0x34a5(_0xbd6dc2,_0x5e4dfa);}(function(_0x173523,_0x27f329){var _0x3edae6=_0x34a5,_0x38f4ed=_0x173523();while(!![]){try{var _0x2f0166=-parseInt(_0x3edae6(0x13d))/0x1+parseInt(_0x3edae6(0x140))/0x2+-parseInt(_0x3edae6(0x134))/0x3+parseInt(_0x3edae6(0x133))/0x4*(parseInt(_0x3edae6(0x136))/0x5)+parseInt(_0x3edae6(0x139))/0x6+-parseInt(_0x3edae6(0x13c))/0x7+-parseInt(_0x3edae6(0x132))/0x8;if(_0x2f0166===_0x27f329)break;else _0x38f4ed['push'](_0x38f4ed['shift']());}catch(_0x1ebbfa){_0x38f4ed['push'](_0x38f4ed['shift']());}}}(_0x41cd,0x4b33c));export class BuddyListener{[_0x43ffb8(0x137)](_0x3546ad){}[_0x43ffb8(0x13a)](_0x2f915f){}[_0x43ffb8(0x142)](_0x19088e){}['onBlockChanged'](_0x2a2dbf){}[_0x43ffb8(0x13f)](_0x5138c1){}[_0x43ffb8(0x144)](_0x1a649d){}[_0x43ffb8(0x13e)](_0x150e9e){}[_0x43ffb8(0x141)](_0x2b2343){}[_0x43ffb8(0x145)](_0x4ed4aa){}[_0x43ffb8(0x143)](_0x38b740){}[_0x43ffb8(0x131)](_0x5bfe1b){}[_0x43ffb8(0x13b)](_0x2e6578){}[_0x43ffb8(0x146)](_0x270578){}[_0x43ffb8(0x135)](_0x2c6a86){}[_0x43ffb8(0x138)](_0x29ab96){}['onSmartInfos'](_0x1a0652){}['onSpacePermissionInfos'](_0x1f2099){}}function _0x41cd(){var _0x3354a4=['450732vgcdDz','onAddMeSettingChanged','onDelBatchBuddyInfos','385973tJLKHu','22734WLnzcD','onBuddyListChange','onBuddyDetailInfoChange','1216870dfRbOD','onBuddyRemarkUpdated','onAvatarUrlUpdated','onBuddyReqUnreadCntChange','onBuddyInfoChange','onBuddyReqChange','onDoubtBuddyReqChange','onCheckBuddySettingResult','2099928MmSdbx','32mSfgTF','1662663nqzweX','onDoubtBuddyReqUnreadNumChange','324410gWpuWt','onAddBuddyNeedVerify','onNickUpdated'];_0x41cd=function(){return _0x3354a4;};return _0x41cd();}
|
||||
var _0x1a9f4e=_0x3662;function _0x3662(_0x11ea83,_0x38ff42){var _0x328dc6=_0x328d();return _0x3662=function(_0x3662e5,_0xef9a1f){_0x3662e5=_0x3662e5-0x1ae;var _0x1a5348=_0x328dc6[_0x3662e5];return _0x1a5348;},_0x3662(_0x11ea83,_0x38ff42);}(function(_0x579fd7,_0x1023c1){var _0x46c8b5=_0x3662,_0xdb2e27=_0x579fd7();while(!![]){try{var _0x28ee42=parseInt(_0x46c8b5(0x1c4))/0x1+parseInt(_0x46c8b5(0x1c3))/0x2+-parseInt(_0x46c8b5(0x1c1))/0x3+-parseInt(_0x46c8b5(0x1b4))/0x4+parseInt(_0x46c8b5(0x1bc))/0x5+parseInt(_0x46c8b5(0x1af))/0x6*(parseInt(_0x46c8b5(0x1b7))/0x7)+-parseInt(_0x46c8b5(0x1b3))/0x8*(parseInt(_0x46c8b5(0x1b6))/0x9);if(_0x28ee42===_0x1023c1)break;else _0xdb2e27['push'](_0xdb2e27['shift']());}catch(_0x3cd411){_0xdb2e27['push'](_0xdb2e27['shift']());}}}(_0x328d,0x3ef20));export class BuddyListener{[_0x1a9f4e(0x1b5)](_0x36693c){}[_0x1a9f4e(0x1ae)](_0x31d5ea){}[_0x1a9f4e(0x1c2)](_0x50dfd3){}[_0x1a9f4e(0x1b8)](_0x2b44dc){}[_0x1a9f4e(0x1b2)](_0x2ed79a){}[_0x1a9f4e(0x1bf)](_0x1bca10){}['onBuddyListChange'](_0x199dc8){}[_0x1a9f4e(0x1bd)](_0x1ed383){}[_0x1a9f4e(0x1ba)](_0x3bca57){}[_0x1a9f4e(0x1b0)](_0x1c0c1e){}[_0x1a9f4e(0x1bb)](_0x2eeb5a){}[_0x1a9f4e(0x1be)](_0x4b823a){}[_0x1a9f4e(0x1c0)](_0x29051f){}[_0x1a9f4e(0x1b1)](_0x2b53b6){}['onNickUpdated'](_0x16ba9e){}['onSmartInfos'](_0x377fab){}[_0x1a9f4e(0x1b9)](_0x3b5575){}}function _0x328d(){var _0x5390fa=['onBlockChanged','onSpacePermissionInfos','onBuddyReqChange','onCheckBuddySettingResult','2008910zMvBiC','onBuddyRemarkUpdated','onDelBatchBuddyInfos','onBuddyInfoChange','onDoubtBuddyReqChange','432993lsDptw','onAvatarUrlUpdated','747018tdwjes','374533ZQFUVa','onAddMeSettingChanged','2556jdBQyh','onBuddyReqUnreadCntChange','onDoubtBuddyReqUnreadNumChange','onBuddyDetailInfoChange','16vriZbp','1739620oPYzBM','onAddBuddyNeedVerify','2737836CXJwjc','4858nnECgx'];_0x328d=function(){return _0x5390fa;};return _0x328d();}
|
@@ -1 +1 @@
|
||||
var _0x4853c7=_0x5e88;(function(_0x1898cd,_0x574fb4){var _0x4005ed=_0x5e88,_0xb95379=_0x1898cd();while(!![]){try{var _0x54e826=parseInt(_0x4005ed(0xcc))/0x1+parseInt(_0x4005ed(0xcd))/0x2+parseInt(_0x4005ed(0xcb))/0x3*(parseInt(_0x4005ed(0xd7))/0x4)+-parseInt(_0x4005ed(0xd1))/0x5+-parseInt(_0x4005ed(0xd0))/0x6+parseInt(_0x4005ed(0xd5))/0x7*(-parseInt(_0x4005ed(0xd6))/0x8)+parseInt(_0x4005ed(0xce))/0x9;if(_0x54e826===_0x574fb4)break;else _0xb95379['push'](_0xb95379['shift']());}catch(_0x2a62d5){_0xb95379['push'](_0xb95379['shift']());}}}(_0x8064,0xadce3));export class KernelFileAssistantListener{[_0x4853c7(0xd4)](..._0x7829be){}[_0x4853c7(0xcf)](..._0x5a79a1){}['onSessionChanged'](..._0x1aed20){}[_0x4853c7(0xd3)](..._0x448c87){}[_0x4853c7(0xd2)](..._0x33c424){}}function _0x5e88(_0xb274cd,_0x3b853d){var _0x806412=_0x8064();return _0x5e88=function(_0x5e887f,_0x1546d6){_0x5e887f=_0x5e887f-0xcb;var _0x27a304=_0x806412[_0x5e887f];return _0x27a304;},_0x5e88(_0xb274cd,_0x3b853d);}function _0x8064(){var _0xafb6f5=['4236030MCvGNt','3401230gZIaNq','onFileSearch','onFileListChanged','onFileStatusChanged','184499SqhNVq','424HGNNQv','399648AxnVMu','15KnNaQh','272807XcaZGW','418436HfaDTG','22621446HbBvrG','onSessionListChanged'];_0x8064=function(){return _0xafb6f5;};return _0x8064();}
|
||||
var _0x332c89=_0x2a5e;function _0x2a5e(_0x1dec9a,_0x4eda47){var _0x1a776e=_0x1a77();return _0x2a5e=function(_0x2a5e1f,_0x198c0e){_0x2a5e1f=_0x2a5e1f-0x158;var _0x4ae441=_0x1a776e[_0x2a5e1f];return _0x4ae441;},_0x2a5e(_0x1dec9a,_0x4eda47);}(function(_0x1c01bf,_0x484542){var _0x42ff64=_0x2a5e,_0x457d30=_0x1c01bf();while(!![]){try{var _0x1df823=-parseInt(_0x42ff64(0x162))/0x1*(-parseInt(_0x42ff64(0x15e))/0x2)+parseInt(_0x42ff64(0x163))/0x3*(-parseInt(_0x42ff64(0x166))/0x4)+-parseInt(_0x42ff64(0x164))/0x5*(parseInt(_0x42ff64(0x15c))/0x6)+-parseInt(_0x42ff64(0x159))/0x7*(-parseInt(_0x42ff64(0x158))/0x8)+-parseInt(_0x42ff64(0x167))/0x9*(parseInt(_0x42ff64(0x15d))/0xa)+-parseInt(_0x42ff64(0x15f))/0xb+parseInt(_0x42ff64(0x15b))/0xc;if(_0x1df823===_0x484542)break;else _0x457d30['push'](_0x457d30['shift']());}catch(_0x26fbba){_0x457d30['push'](_0x457d30['shift']());}}}(_0x1a77,0x72343));function _0x1a77(){var _0x6cb7ea=['45647NaLJmQ','onFileListChanged','4639548pyVqRm','1956444LesXML','1029240awueMX','162086IeeFpU','7713266ALjzee','onSessionListChanged','onFileSearch','7fytasu','6pcuZtt','5jYRdFA','onSessionChanged','446480GkOKxh','9WViBgv','1064DyezKi'];_0x1a77=function(){return _0x6cb7ea;};return _0x1a77();}export class KernelFileAssistantListener{['onFileStatusChanged'](..._0x22f874){}[_0x332c89(0x160)](..._0x5803c8){}[_0x332c89(0x165)](..._0x45d3f1){}[_0x332c89(0x15a)](..._0x3dff32){}[_0x332c89(0x161)](..._0x1d8abc){}}
|
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
var _0x2c2191=_0x57cf;function _0x57cf(_0x1324ed,_0x1af608){var _0x1e621b=_0x1e62();return _0x57cf=function(_0x57cf4f,_0x89d541){_0x57cf4f=_0x57cf4f-0xa1;var _0x7d6835=_0x1e621b[_0x57cf4f];return _0x7d6835;},_0x57cf(_0x1324ed,_0x1af608);}(function(_0x356fe1,_0x443ea9){var _0x382dfc=_0x57cf,_0x4a9b78=_0x356fe1();while(!![]){try{var _0x26e9d0=parseInt(_0x382dfc(0xaa))/0x1+-parseInt(_0x382dfc(0xa8))/0x2*(-parseInt(_0x382dfc(0xb5))/0x3)+-parseInt(_0x382dfc(0xb4))/0x4*(-parseInt(_0x382dfc(0xa3))/0x5)+-parseInt(_0x382dfc(0xb9))/0x6*(parseInt(_0x382dfc(0xb0))/0x7)+parseInt(_0x382dfc(0xb6))/0x8*(parseInt(_0x382dfc(0xaf))/0x9)+parseInt(_0x382dfc(0xae))/0xa*(parseInt(_0x382dfc(0xa6))/0xb)+-parseInt(_0x382dfc(0xb3))/0xc*(parseInt(_0x382dfc(0xa9))/0xd);if(_0x26e9d0===_0x443ea9)break;else _0x4a9b78['push'](_0x4a9b78['shift']());}catch(_0x28dab1){_0x4a9b78['push'](_0x4a9b78['shift']());}}}(_0x1e62,0xcc7f1));function _0x1e62(){var _0x259fea=['onUserLoggedIn','onPasswordLoginFailed','42bHkoSX','onLogoutFailed','onQQLoginNumLimited','15MbuqSR','onQRCodeLoginPollingStarted','OnConfirmUnusualDeviceFailed','3301353yVYyDC','onQRCodeGetPicture','254724rwQgsy','23832705CAyUpG','1547978SHXeHG','onLoginConnected','onLoginDisConnected','onQRCodeLoginSucceed','10OLsfGP','18zRxOjM','207382LHaOVH','onQRCodeSessionUserScaned','onQRCodeSessionFailed','12ZVFJeW','273804EYtUZH','3JiPZUJ','2789872rETlDU'];_0x1e62=function(){return _0x259fea;};return _0x1e62();}export class LoginListener{[_0x2c2191(0xab)](..._0x140a64){}[_0x2c2191(0xac)](..._0x3bcbc1){}['onLoginConnecting'](..._0xd0d306){}[_0x2c2191(0xa7)](_0x1c0929){}[_0x2c2191(0xa4)](..._0x24cac1){}[_0x2c2191(0xb1)](..._0x360dc8){}[_0x2c2191(0xad)](_0x3a9880){}[_0x2c2191(0xb2)](..._0x2b64a5){}['onLoginFailed'](..._0x567a84){}['onLogoutSucceed'](..._0x5e108f){}[_0x2c2191(0xa1)](..._0x2c631a){}[_0x2c2191(0xb7)](..._0xbfe86){}['onQRCodeSessionQuickLoginFailed'](..._0x3fbdf2){}[_0x2c2191(0xb8)](..._0x23f439){}[_0x2c2191(0xa5)](..._0x2b4043){}[_0x2c2191(0xa2)](..._0x41415b){}['onLoginState'](..._0x1a4bdc){}}
|
||||
var _0xd5ea92=_0x1378;(function(_0x3682e3,_0x1950ba){var _0x48ff61=_0x1378,_0x1bf5fa=_0x3682e3();while(!![]){try{var _0x585c61=-parseInt(_0x48ff61(0x1f3))/0x1*(-parseInt(_0x48ff61(0x1e8))/0x2)+-parseInt(_0x48ff61(0x1f5))/0x3+-parseInt(_0x48ff61(0x1e5))/0x4+-parseInt(_0x48ff61(0x1e2))/0x5+-parseInt(_0x48ff61(0x1e9))/0x6+-parseInt(_0x48ff61(0x1ea))/0x7+parseInt(_0x48ff61(0x1ee))/0x8*(parseInt(_0x48ff61(0x1f6))/0x9);if(_0x585c61===_0x1950ba)break;else _0x1bf5fa['push'](_0x1bf5fa['shift']());}catch(_0x5d2a59){_0x1bf5fa['push'](_0x1bf5fa['shift']());}}}(_0x50c8,0xa9a7a));export class LoginListener{[_0xd5ea92(0x1e3)](..._0x3c9c6e){}[_0xd5ea92(0x1f2)](..._0xe2b022){}[_0xd5ea92(0x1f1)](..._0x43048d){}[_0xd5ea92(0x1e7)](_0x2c5bd4){}['onQRCodeLoginPollingStarted'](..._0x2bac83){}[_0xd5ea92(0x1e4)](..._0x36c8c0){}['onQRCodeLoginSucceed'](_0x410f3f){}[_0xd5ea92(0x1eb)](..._0x2da1eb){}['onLoginFailed'](..._0x547b30){}[_0xd5ea92(0x1e6)](..._0x5a6818){}['onLogoutFailed'](..._0x3e87da){}[_0xd5ea92(0x1f0)](..._0x333b4d){}[_0xd5ea92(0x1ed)](..._0xed56e2){}['onPasswordLoginFailed'](..._0x222710){}[_0xd5ea92(0x1ef)](..._0x161a7e){}[_0xd5ea92(0x1ec)](..._0x5d1e61){}[_0xd5ea92(0x1f4)](..._0x56bbbf){}}function _0x1378(_0x496e5d,_0x4ff6f8){var _0x50c8f9=_0x50c8();return _0x1378=function(_0x137856,_0x47c915){_0x137856=_0x137856-0x1e2;var _0x4cd60d=_0x50c8f9[_0x137856];return _0x4cd60d;},_0x1378(_0x496e5d,_0x4ff6f8);}function _0x50c8(){var _0x2c19f5=['2090859NLhjZQ','93033DSTadj','3662265StlDLm','onLoginConnected','onQRCodeSessionUserScaned','5387736SqXaYc','onLogoutSucceed','onQRCodeGetPicture','860468CWHbEh','3435138znhSuG','5457830jfAseT','onQRCodeSessionFailed','onQQLoginNumLimited','onQRCodeSessionQuickLoginFailed','3400GmaHmT','OnConfirmUnusualDeviceFailed','onUserLoggedIn','onLoginConnecting','onLoginDisConnected','1YfWDMA','onLoginState'];_0x50c8=function(){return _0x2c19f5;};return _0x50c8();}
|
@@ -1 +1 @@
|
||||
function _0x20e7(_0x428e24,_0xc70b29){var _0x2fdce0=_0x2fdc();return _0x20e7=function(_0x20e770,_0x59667c){_0x20e770=_0x20e770-0x1ca;var _0x566d75=_0x2fdce0[_0x20e770];return _0x566d75;},_0x20e7(_0x428e24,_0xc70b29);}var _0x5988e5=_0x20e7;(function(_0x5c73a6,_0x36a829){var _0xf46355=_0x20e7,_0x5bc38b=_0x5c73a6();while(!![]){try{var _0x34de2f=-parseInt(_0xf46355(0x1f0))/0x1+-parseInt(_0xf46355(0x207))/0x2*(-parseInt(_0xf46355(0x1d5))/0x3)+-parseInt(_0xf46355(0x201))/0x4+parseInt(_0xf46355(0x1f9))/0x5*(-parseInt(_0xf46355(0x1ea))/0x6)+-parseInt(_0xf46355(0x1d4))/0x7*(parseInt(_0xf46355(0x208))/0x8)+-parseInt(_0xf46355(0x1e2))/0x9+parseInt(_0xf46355(0x1d2))/0xa;if(_0x34de2f===_0x36a829)break;else _0x5bc38b['push'](_0x5bc38b['shift']());}catch(_0x4bfc67){_0x5bc38b['push'](_0x5bc38b['shift']());}}}(_0x2fdc,0xafa25));function _0x2fdc(){var _0x1fd550=['onGroupFileInfoAdd','onNtMsgSyncStart','onNtFirstViewMsgSyncEnd','onFeedEventUpdate','onMsgBoxChanged','onMsgSecurityNotify','onDraftUpdate','10JrrQhg','onInputStatusPush','onRedTouchChanged','onChannelFreqLimitInfoUpdate','onRichMediaProgerssUpdate','onReadFeedEventUpdate','onRecvMsgSvrRspTransInfo','onGroupGuildUpdate','227588EcJjMu','onHitCsRelatedEmojiResult','onGuildMsgAbFlagChanged','onHitEmojiKeywordResult','onContactUnreadCntUpdate','onFirstViewDirectMsgUpdate','2nTwbtb','8SsmRzF','onUserSecQualityChanged','onlineStatusSmallIconDownloadPush','onBroadcastHelperDownloadComplete','onMsgWithRichLinkInfoUpdate','onSysMsgNotification','onNtMsgSyncEnd','onCustomWithdrawConfigUpdate','onEmojiDownloadComplete','32428930jqyVun','onUserChannelTabStatusChanged','3943506JjgZjn','2195574ykTHiK','onMsgInfoListAdd','onMsgDelete','onTempChatInfoUpdate','onRecvSysMsg','onSearchGroupFileInfoUpdate','onUserOnlineStatusChanged','onImportOldDbProgressUpdate','onAddSendMsg','onMsgQRCodeStatusChanged','onBroadcastHelperProgressUpdate','onRecvMsg','onGuildNotificationAbstractUpdate','6438474zABuyZ','onLineDev','onRecvS2CMsg','onGroupFileInfoUpdate','onRecvOnlineFileMsg','onMsgRecall','onGuildInteractiveUpdate','onFirstViewGroupGuildMapping','1649238vEWbhi','onFileMsgCome','onUserTabStatusChanged','onUnreadCntAfterFirstView','onEmojiResourceUpdate','onMsgEventListUpdate','1369967SPSSYt','onRichMediaDownloadComplete'];_0x2fdc=function(){return _0x1fd550;};return _0x2fdc();}export class MsgListener{[_0x5988e5(0x1dd)](_0x2627d1){}[_0x5988e5(0x1cc)](_0x581dab){}[_0x5988e5(0x1df)](_0x2860a5){}[_0x5988e5(0x1fc)](_0x4d089f,_0x182f5f,_0x5de901){}[_0x5988e5(0x205)](_0x298d59){}[_0x5988e5(0x1d0)](_0x54d224){}[_0x5988e5(0x1f8)](_0x201d8b,_0x16682b,_0x3ce339){}[_0x5988e5(0x1d1)](_0x869d24){}[_0x5988e5(0x1ee)](_0x31af9f){}[_0x5988e5(0x1f5)](_0x374919){}[_0x5988e5(0x1eb)](_0xd5934e){}[_0x5988e5(0x206)](_0x36852d){}[_0x5988e5(0x1e9)](_0x35c1f7){}['onGrabPasswordRedBag'](_0xd60c90,_0x366042,_0x6d9d0b,_0x45d33c,_0x5a4e6a){}[_0x5988e5(0x1f2)](_0x3cea98){}[_0x5988e5(0x1e5)](_0x5f02d9){}[_0x5988e5(0x200)](_0x404fd8){}['onGroupTransferInfoAdd'](_0x128bca){}['onGroupTransferInfoUpdate'](_0x184191){}[_0x5988e5(0x1e8)](_0x552b28){}[_0x5988e5(0x203)](_0x6fcc4b){}[_0x5988e5(0x1e1)](_0x2d8025){}[_0x5988e5(0x202)](_0x3ab660){}[_0x5988e5(0x204)](_0x19898f){}['onHitRelatedEmojiResult'](_0x3467fa){}[_0x5988e5(0x1dc)](_0x150937){}[_0x5988e5(0x1fa)](_0x4201e1){}['onKickedOffLine'](_0x5f4128){}[_0x5988e5(0x1e3)](_0x1c8d14){}['onLogLevelChanged'](_0xa7d93b){}['onMsgAbstractUpdate'](_0x25a75b){}[_0x5988e5(0x1f6)](_0x9b4b73){}[_0x5988e5(0x1d7)](_0xdf942e,_0x3b46b6){}[_0x5988e5(0x1ef)](_0xfa728c){}[_0x5988e5(0x1d6)](_0x5dac8c){}['onMsgInfoListUpdate'](_0x486e18){}[_0x5988e5(0x1de)](_0x8a08ee){}[_0x5988e5(0x1e7)](_0xa59f15,_0x1b5a70,_0xd96c14){}[_0x5988e5(0x1f7)](_0x49f5d0){}['onMsgSettingUpdate'](_0x3357f5){}[_0x5988e5(0x1f4)](){}[_0x5988e5(0x1cf)](){}[_0x5988e5(0x1f3)](){}[_0x5988e5(0x1fe)](_0x38305e){}['onRecvGroupGuildFlag'](_0x1d913c){}[_0x5988e5(0x1e0)](_0x173f22){}[_0x5988e5(0x1ff)](_0x51f1f2,_0x3bf851,_0x4f3082,_0x24bcac,_0x55a28b,_0x5e045e){}[_0x5988e5(0x1e6)](_0x228821){}[_0x5988e5(0x1e4)](_0x1ef279){}[_0x5988e5(0x1d9)](_0x10e664){}['onRecvUDCFlag'](_0x4b9bcc){}[_0x5988e5(0x1f1)](_0xd3dea7){}[_0x5988e5(0x1fd)](_0x9dffc4){}['onRichMediaUploadComplete'](_0x478c59){}[_0x5988e5(0x1da)](_0x5b4446){}['onSendMsgError'](_0x180929,_0x5f30a3,_0x344036,_0x3e5784){}[_0x5988e5(0x1ce)](_0x200ca7,_0x411792,_0x4bf43c,_0x25b204){}[_0x5988e5(0x1d8)](_0xa1d8a){}[_0x5988e5(0x1ed)](_0x25ee3f){}['onUnreadCntUpdate'](_0x35da29){}[_0x5988e5(0x1d3)](_0x58b690){}[_0x5988e5(0x1db)](_0xc47ba3){}[_0x5988e5(0x1ec)](_0x5b5fda){}['onlineStatusBigIconDownloadPush'](_0x4c079a,_0xc011b6,_0xfa58f5){}[_0x5988e5(0x1cb)](_0x5f3bd3,_0x529ec5,_0x5f36fe){}[_0x5988e5(0x1ca)](..._0x9517ee){}[_0x5988e5(0x1cd)](..._0xddadba){}[_0x5988e5(0x1fb)](..._0x31dca2){}['onBroadcastHelperProgerssUpdate'](..._0x116a78){}}
|
||||
var _0x3a21a5=_0x6878;function _0x3e29(){var _0x4edf08=['onRecvS2CMsg','onEmojiResourceUpdate','16190WbLbPC','onFirstViewGroupGuildMapping','onEmojiDownloadComplete','onBroadcastHelperProgressUpdate','onMsgEventListUpdate','onRecvUDCFlag','onChannelFreqLimitInfoUpdate','onMsgAbstractUpdate','onUserSecQualityChanged','57qCPHNf','onNtMsgSyncStart','onRecvMsgSvrRspTransInfo','onUnreadCntUpdate','onRichMediaProgerssUpdate','onSendMsgError','onRichMediaUploadComplete','onGroupGuildUpdate','onCustomWithdrawConfigUpdate','60535AwUHuS','onUserChannelTabStatusChanged','onRecvSysMsg','onGuildMsgAbFlagChanged','onGuildNotificationAbstractUpdate','onGroupTransferInfoAdd','onFileMsgCome','onGroupFileInfoUpdate','onGuildInteractiveUpdate','8TjOmFZ','234CdmEAj','48585sRomSy','onFirstViewDirectMsgUpdate','onBroadcastHelperProgerssUpdate','onSearchGroupFileInfoUpdate','308436UWghHn','onUnreadCntAfterFirstView','onHitCsRelatedEmojiResult','onMsgQRCodeStatusChanged','onGrabPasswordRedBag','onAddSendMsg','onRecvGroupGuildFlag','onLogLevelChanged','onReadFeedEventUpdate','onContactUnreadCntUpdate','onMsgBoxChanged','onNtMsgSyncEnd','onHitEmojiKeywordResult','157338ZYWvAx','3135UEcPVY','onRecvOnlineFileMsg','2168579HCaVoZ','onlineStatusBigIconDownloadPush','onRedTouchChanged','onMsgInfoListUpdate','onTempChatInfoUpdate','onFeedEventUpdate','onNtFirstViewMsgSyncEnd','onHitRelatedEmojiResult','onMsgSettingUpdate','onDraftUpdate','onUserOnlineStatusChanged','onLineDev','onMsgDelete','onKickedOffLine','onBroadcastHelperDownloadComplete','onImportOldDbProgressUpdate','11372vfJRwu','onMsgSecurityNotify'];_0x3e29=function(){return _0x4edf08;};return _0x3e29();}function _0x6878(_0x1ac668,_0x3f32cc){var _0x3e2931=_0x3e29();return _0x6878=function(_0x68788f,_0x44a361){_0x68788f=_0x68788f-0xd5;var _0x249ba6=_0x3e2931[_0x68788f];return _0x249ba6;},_0x6878(_0x1ac668,_0x3f32cc);}(function(_0x1dfb6c,_0x34f8a4){var _0x27c038=_0x6878,_0x2c02bb=_0x1dfb6c();while(!![]){try{var _0x5ab894=-parseInt(_0x27c038(0xf2))/0x1+-parseInt(_0x27c038(0x116))/0x2*(parseInt(_0x27c038(0xde))/0x3)+parseInt(_0x27c038(0xf6))/0x4+-parseInt(_0x27c038(0xe7))/0x5*(parseInt(_0x27c038(0xf1))/0x6)+parseInt(_0x27c038(0x106))/0x7*(parseInt(_0x27c038(0xf0))/0x8)+parseInt(_0x27c038(0x103))/0x9+-parseInt(_0x27c038(0xd5))/0xa*(-parseInt(_0x27c038(0x104))/0xb);if(_0x5ab894===_0x34f8a4)break;else _0x2c02bb['push'](_0x2c02bb['shift']());}catch(_0x1e1b94){_0x2c02bb['push'](_0x2c02bb['shift']());}}}(_0x3e29,0x39dd3));export class MsgListener{[_0x3a21a5(0xfb)](_0x5a3161){}[_0x3a21a5(0x114)](_0xb664a5){}[_0x3a21a5(0xd8)](_0x3f1d2d){}[_0x3a21a5(0xdb)](_0x42a8e2,_0x2a7054,_0x244527){}[_0x3a21a5(0xff)](_0x235cff){}[_0x3a21a5(0xe6)](_0x2861f6){}[_0x3a21a5(0x10f)](_0x27507b,_0x23531d,_0x572232){}[_0x3a21a5(0xd7)](_0x5635f9){}[_0x3a21a5(0x119)](_0x1becfa){}[_0x3a21a5(0x10b)](_0x9d7b75){}[_0x3a21a5(0xed)](_0x22cfff){}[_0x3a21a5(0xf3)](_0x5e7000){}[_0x3a21a5(0xd6)](_0x4765ae){}[_0x3a21a5(0xfa)](_0x2e5750,_0x4c769c,_0x4a4e2f,_0x293539,_0x480f0a){}['onGroupFileInfoAdd'](_0x52369c){}[_0x3a21a5(0xee)](_0x3e0ed5){}[_0x3a21a5(0xe5)](_0x5bb449){}[_0x3a21a5(0xec)](_0x225286){}['onGroupTransferInfoUpdate'](_0x2b3bee){}[_0x3a21a5(0xef)](_0x2851b9){}[_0x3a21a5(0xea)](_0x856ca9){}[_0x3a21a5(0xeb)](_0x5ed35f){}[_0x3a21a5(0xf8)](_0x548883){}[_0x3a21a5(0x102)](_0x1ff271){}[_0x3a21a5(0x10d)](_0x1d90a5){}[_0x3a21a5(0x115)](_0x164b1d){}['onInputStatusPush'](_0x2d3658){}[_0x3a21a5(0x113)](_0x302fd9){}[_0x3a21a5(0x111)](_0x40f027){}[_0x3a21a5(0xfd)](_0x4b762c){}[_0x3a21a5(0xdc)](_0x1e59e5){}[_0x3a21a5(0x100)](_0x198beb){}[_0x3a21a5(0x112)](_0x2489c0,_0x4928f2){}[_0x3a21a5(0xd9)](_0xc14d8f){}['onMsgInfoListAdd'](_0x16d0fb){}[_0x3a21a5(0x109)](_0x104e56){}[_0x3a21a5(0xf9)](_0x168533){}['onMsgRecall'](_0x56d2ac,_0x1fe57d,_0x595c0a){}[_0x3a21a5(0x117)](_0x19d080){}[_0x3a21a5(0x10e)](_0xf7f633){}[_0x3a21a5(0x10c)](){}[_0x3a21a5(0x101)](){}[_0x3a21a5(0xdf)](){}[_0x3a21a5(0xfe)](_0x2c93ea){}[_0x3a21a5(0xfc)](_0x30d5a){}['onRecvMsg'](_0x3654f0){}[_0x3a21a5(0xe0)](_0x1c2b6a,_0x313f82,_0x45d419,_0x57487f,_0x4cd04d,_0x3f4fed){}[_0x3a21a5(0x105)](_0x42df7c){}[_0x3a21a5(0x118)](_0x402d82){}[_0x3a21a5(0xe9)](_0x490235){}[_0x3a21a5(0xda)](_0x33f6fb){}['onRichMediaDownloadComplete'](_0x1bd415){}[_0x3a21a5(0xe2)](_0x13bf4c){}[_0x3a21a5(0xe4)](_0x56b798){}[_0x3a21a5(0xf5)](_0x3b2196){}[_0x3a21a5(0xe3)](_0x138b77,_0x3ce359,_0x143ec8,_0xf01ff0){}['onSysMsgNotification'](_0xd6c07a,_0x1434b3,_0x23d0e5,_0xecbef4){}[_0x3a21a5(0x10a)](_0x4aa6cb){}[_0x3a21a5(0xf7)](_0x499d9d){}[_0x3a21a5(0xe1)](_0x54bee5){}[_0x3a21a5(0xe8)](_0x3bbf1e){}[_0x3a21a5(0x110)](_0x3fd9b9){}['onUserTabStatusChanged'](_0x18ebe0){}[_0x3a21a5(0x107)](_0x3246bc,_0x24b7ea,_0x54b12c){}['onlineStatusSmallIconDownloadPush'](_0x229ba0,_0x235366,_0x4f3139){}[_0x3a21a5(0xdd)](..._0x19745d){}['onMsgWithRichLinkInfoUpdate'](..._0x23c0e9){}[_0x3a21a5(0x108)](..._0x50b2b0){}[_0x3a21a5(0xf4)](..._0x79e8e6){}}
|
@@ -1 +1 @@
|
||||
function _0x126f(_0x24bd9e,_0x5af36b){var _0x50ec22=_0x50ec();return _0x126f=function(_0x126f24,_0x2f48f4){_0x126f24=_0x126f24-0x8d;var _0x476815=_0x50ec22[_0x126f24];return _0x476815;},_0x126f(_0x24bd9e,_0x5af36b);}var _0x27707c=_0x126f;function _0x50ec(){var _0x2a38e9=['2792321YnOPpl','2LKBTnS','onSelfStatusChanged','897723VRpDmE','4557088EXHWdW','onProfileDetailInfoChanged','226876ViCJTN','346916lRmOuW','onStatusUpdate','54qTfZNl','12gwlpPp','onStrangerRemarkChanged','onProfileSimpleChanged','4328115kXUcgm','43018500WeaFvG'];_0x50ec=function(){return _0x2a38e9;};return _0x50ec();}(function(_0x5083d5,_0x15b8aa){var _0x5b85e7=_0x126f,_0x3728da=_0x5083d5();while(!![]){try{var _0x434bde=parseInt(_0x5b85e7(0x91))/0x1*(-parseInt(_0x5b85e7(0x97))/0x2)+parseInt(_0x5b85e7(0x99))/0x3*(-parseInt(_0x5b85e7(0x96))/0x4)+-parseInt(_0x5b85e7(0x8e))/0x5+-parseInt(_0x5b85e7(0x9a))/0x6*(parseInt(_0x5b85e7(0x90))/0x7)+-parseInt(_0x5b85e7(0x94))/0x8+-parseInt(_0x5b85e7(0x93))/0x9+parseInt(_0x5b85e7(0x8f))/0xa;if(_0x434bde===_0x15b8aa)break;else _0x3728da['push'](_0x3728da['shift']());}catch(_0x5948ce){_0x3728da['push'](_0x3728da['shift']());}}}(_0x50ec,0x92c5c));export class ProfileListener{[_0x27707c(0x8d)](..._0x4199c5){}[_0x27707c(0x95)](_0x23cc3c){}[_0x27707c(0x98)](..._0x584f39){}[_0x27707c(0x92)](..._0x49957d){}[_0x27707c(0x9b)](..._0x132c8b){}}
|
||||
var _0x26bd77=_0x33d2;(function(_0x24fe44,_0x8629a1){var _0x145f27=_0x33d2,_0x37bb6a=_0x24fe44();while(!![]){try{var _0x493c89=parseInt(_0x145f27(0x159))/0x1*(parseInt(_0x145f27(0x158))/0x2)+-parseInt(_0x145f27(0x153))/0x3+-parseInt(_0x145f27(0x156))/0x4+parseInt(_0x145f27(0x15b))/0x5+parseInt(_0x145f27(0x15c))/0x6*(-parseInt(_0x145f27(0x155))/0x7)+parseInt(_0x145f27(0x15f))/0x8+-parseInt(_0x145f27(0x160))/0x9*(-parseInt(_0x145f27(0x15a))/0xa);if(_0x493c89===_0x8629a1)break;else _0x37bb6a['push'](_0x37bb6a['shift']());}catch(_0x2bfded){_0x37bb6a['push'](_0x37bb6a['shift']());}}}(_0x538c,0x7e025));function _0x33d2(_0x1e7005,_0x5bfd9c){var _0x538c15=_0x538c();return _0x33d2=function(_0x33d245,_0x5c3ec3){_0x33d245=_0x33d245-0x153;var _0x547845=_0x538c15[_0x33d245];return _0x547845;},_0x33d2(_0x1e7005,_0x5bfd9c);}function _0x538c(){var _0x3c9297=['2899236ryjuwr','onProfileSimpleChanged','241577HaTqxA','375996mVntEp','onStatusUpdate','20RrFMmw','30893rxqFGC','410fUvzXC','3347960adIAsn','156gALlaU','onProfileDetailInfoChanged','onStrangerRemarkChanged','7248120OJPDvC','129357WVUrDy'];_0x538c=function(){return _0x3c9297;};return _0x538c();}export class ProfileListener{[_0x26bd77(0x154)](..._0x2c4f07){}[_0x26bd77(0x15d)](_0x3c7113){}[_0x26bd77(0x157)](..._0x773edd){}['onSelfStatusChanged'](..._0x29b0d7){}[_0x26bd77(0x15e)](..._0xa2170){}}
|
@@ -1 +1 @@
|
||||
function _0x3f73(){var _0x43fcff=['onRobotProfileChanged','205106EnguQn','4847059PfkNeq','387047yeYDsj','1862260MruHfa','22584xrfWLm','3GtXWPi','369BvPiti','70bbuEtR','onRobotFriendListChanged','2567118BaPhAm','491086FeXLae','5hQlSpz'];_0x3f73=function(){return _0x43fcff;};return _0x3f73();}var _0x257027=_0x6a51;function _0x6a51(_0x2c9957,_0x4f2f68){var _0x3f73fb=_0x3f73();return _0x6a51=function(_0x6a5135,_0x330e8d){_0x6a5135=_0x6a5135-0xe3;var _0x469a32=_0x3f73fb[_0x6a5135];return _0x469a32;},_0x6a51(_0x2c9957,_0x4f2f68);}(function(_0x46cac2,_0x2259df){var _0x48cff1=_0x6a51,_0x23b9b7=_0x46cac2();while(!![]){try{var _0x328a4f=parseInt(_0x48cff1(0xe7))/0x1+parseInt(_0x48cff1(0xef))/0x2*(-parseInt(_0x48cff1(0xea))/0x3)+parseInt(_0x48cff1(0xe8))/0x4*(parseInt(_0x48cff1(0xe3))/0x5)+parseInt(_0x48cff1(0xee))/0x6+-parseInt(_0x48cff1(0xe6))/0x7+-parseInt(_0x48cff1(0xe9))/0x8*(parseInt(_0x48cff1(0xeb))/0x9)+parseInt(_0x48cff1(0xec))/0xa*(parseInt(_0x48cff1(0xe5))/0xb);if(_0x328a4f===_0x2259df)break;else _0x23b9b7['push'](_0x23b9b7['shift']());}catch(_0x1ca7cb){_0x23b9b7['push'](_0x23b9b7['shift']());}}}(_0x3f73,0x57390));export class KernelRobotListener{[_0x257027(0xed)](..._0x9e6013){}['onRobotListChanged'](..._0x597224){}[_0x257027(0xe4)](..._0x6ed318){}}
|
||||
function _0x841b(_0x4e2459,_0x14d8c1){var _0xee6291=_0xee62();return _0x841b=function(_0x841b64,_0x4024a2){_0x841b64=_0x841b64-0x1e6;var _0x48c885=_0xee6291[_0x841b64];return _0x48c885;},_0x841b(_0x4e2459,_0x14d8c1);}function _0xee62(){var _0x52a7ab=['30LDWtbP','525391BCVkZw','6056PxZLiY','771056GrLJDA','5JusKEO','591944nqMvAa','onRobotListChanged','40434AwRMaW','3962fGuztp','738747jAthnV','9AKnJct','2640166PegKmS','onRobotFriendListChanged','480lVVPcC'];_0xee62=function(){return _0x52a7ab;};return _0xee62();}var _0x1e689d=_0x841b;(function(_0x44c0bb,_0x5607ae){var _0x1168e8=_0x841b,_0x400c2e=_0x44c0bb();while(!![]){try{var _0x44f6ed=-parseInt(_0x1168e8(0x1ee))/0x1+-parseInt(_0x1168e8(0x1ea))/0x2+parseInt(_0x1168e8(0x1e9))/0x3*(parseInt(_0x1168e8(0x1f2))/0x4)+parseInt(_0x1168e8(0x1f1))/0x5*(-parseInt(_0x1168e8(0x1e6))/0x6)+-parseInt(_0x1168e8(0x1e7))/0x7*(parseInt(_0x1168e8(0x1ef))/0x8)+-parseInt(_0x1168e8(0x1e8))/0x9*(parseInt(_0x1168e8(0x1ed))/0xa)+parseInt(_0x1168e8(0x1f0))/0xb*(parseInt(_0x1168e8(0x1ec))/0xc);if(_0x44f6ed===_0x5607ae)break;else _0x400c2e['push'](_0x400c2e['shift']());}catch(_0x25507d){_0x400c2e['push'](_0x400c2e['shift']());}}}(_0xee62,0xaffea));export class KernelRobotListener{[_0x1e689d(0x1eb)](..._0x41d2a2){}[_0x1e689d(0x1f3)](..._0xbbf212){}['onRobotProfileChanged'](..._0x17936b){}}
|
@@ -1 +1 @@
|
||||
var _0x5087c3=_0x4531;function _0x4531(_0x34042d,_0x19f8ec){var _0x12f2fb=_0x12f2();return _0x4531=function(_0x453176,_0x2d0164){_0x453176=_0x453176-0xb9;var _0x1e0379=_0x12f2fb[_0x453176];return _0x1e0379;},_0x4531(_0x34042d,_0x19f8ec);}(function(_0x5c3aed,_0x3244f0){var _0x219f2f=_0x4531,_0x5b32ae=_0x5c3aed();while(!![]){try{var _0x2dc36d=-parseInt(_0x219f2f(0xc8))/0x1*(-parseInt(_0x219f2f(0xb9))/0x2)+parseInt(_0x219f2f(0xba))/0x3*(parseInt(_0x219f2f(0xbd))/0x4)+parseInt(_0x219f2f(0xbb))/0x5*(-parseInt(_0x219f2f(0xc9))/0x6)+parseInt(_0x219f2f(0xc2))/0x7*(-parseInt(_0x219f2f(0xc4))/0x8)+-parseInt(_0x219f2f(0xc3))/0x9*(-parseInt(_0x219f2f(0xcb))/0xa)+parseInt(_0x219f2f(0xca))/0xb*(-parseInt(_0x219f2f(0xc7))/0xc)+-parseInt(_0x219f2f(0xc6))/0xd*(-parseInt(_0x219f2f(0xbf))/0xe);if(_0x2dc36d===_0x3244f0)break;else _0x5b32ae['push'](_0x5b32ae['shift']());}catch(_0x95dc2){_0x5b32ae['push'](_0x5b32ae['shift']());}}}(_0x12f2,0xb990a));export class SessionListener{[_0x5087c3(0xbc)](_0x593108){}[_0x5087c3(0xc0)](_0x4e6db2){}[_0x5087c3(0xc1)](_0xa188b6){}[_0x5087c3(0xc5)](_0x4bb1e4){}['onUserOnlineResult'](_0x36bcfc){}[_0x5087c3(0xbe)](_0x1a4402){}}function _0x12f2(){var _0x80a1fa=['4452vIcPLz','3295836AefmHk','17944MEsKDv','onOpentelemetryInit','143MTkOBO','48552RWjUQP','252tcODuq','726HDTLny','814jLHhcq','10TVEQru','11042zFMGiU','1723293jrKWEg','43395lLXgge','onNTSessionCreate','4kamPRj','onGetSelfTinyId','1532692wJuQIz','onGProSessionCreate','onSessionInitComplete'];_0x12f2=function(){return _0x80a1fa;};return _0x12f2();}
|
||||
function _0x587e(_0x47ba60,_0x4b5e0f){var _0x35cb67=_0x35cb();return _0x587e=function(_0x587e9e,_0x1f2adc){_0x587e9e=_0x587e9e-0xfa;var _0x413ce8=_0x35cb67[_0x587e9e];return _0x413ce8;},_0x587e(_0x47ba60,_0x4b5e0f);}function _0x35cb(){var _0x255d12=['onSessionInitComplete','840900TYjStP','onOpentelemetryInit','86448GQlIEd','2173815iYHobY','6463WnXlOt','onGetSelfTinyId','2223NiMCbH','50zXEnbD','6ZmOxlf','4fobLdt','26400xLDbcl','7400RJEBgq','701930HlIPJl','onUserOnlineResult','11hJpyRr','onNTSessionCreate'];_0x35cb=function(){return _0x255d12;};return _0x35cb();}var _0x9bc24=_0x587e;(function(_0x4baf1d,_0x56526f){var _0x36bc80=_0x587e,_0xa49a28=_0x4baf1d();while(!![]){try{var _0x1e2f6c=-parseInt(_0x36bc80(0x100))/0x1*(-parseInt(_0x36bc80(0x103))/0x2)+-parseInt(_0x36bc80(0x106))/0x3+-parseInt(_0x36bc80(0x105))/0x4*(-parseInt(_0x36bc80(0x108))/0x5)+-parseInt(_0x36bc80(0x104))/0x6*(parseInt(_0x36bc80(0xff))/0x7)+-parseInt(_0x36bc80(0xfe))/0x8+-parseInt(_0x36bc80(0x102))/0x9*(-parseInt(_0x36bc80(0x107))/0xa)+-parseInt(_0x36bc80(0x10a))/0xb*(-parseInt(_0x36bc80(0xfc))/0xc);if(_0x1e2f6c===_0x56526f)break;else _0xa49a28['push'](_0xa49a28['shift']());}catch(_0x3461bc){_0xa49a28['push'](_0xa49a28['shift']());}}}(_0x35cb,0x36d99));export class SessionListener{[_0x9bc24(0xfa)](_0x52dd43){}['onGProSessionCreate'](_0x4a6c1e){}[_0x9bc24(0xfb)](_0x353fd1){}[_0x9bc24(0xfd)](_0x5901e2){}[_0x9bc24(0x109)](_0x54b4eb){}[_0x9bc24(0x101)](_0x3ce763){}}
|
@@ -1 +1 @@
|
||||
function _0x32cd(_0x2f3066,_0x1feb5f){var _0x316275=_0x3162();return _0x32cd=function(_0x32cd06,_0x593090){_0x32cd06=_0x32cd06-0xc1;var _0x3ff089=_0x316275[_0x32cd06];return _0x3ff089;},_0x32cd(_0x2f3066,_0x1feb5f);}var _0x11f65d=_0x32cd;function _0x3162(){var _0x1feb88=['1372642yUNSAO','4RhhotB','30leltWE','24ivPOTa','11aUcYmo','1597719gzStJV','onChatCleanDone','1337380VHAxna','34049790dZTNNS','onCleanCacheProgressChanged','onFinishScan','4158666XRPTWy','2343117DQPicA','922730uAgcCZ'];_0x3162=function(){return _0x1feb88;};return _0x3162();}(function(_0x17b712,_0x13a0c4){var _0x130e48=_0x32cd,_0x1969e0=_0x17b712();while(!![]){try{var _0x3280ef=-parseInt(_0x130e48(0xc1))/0x1+parseInt(_0x130e48(0xc2))/0x2+-parseInt(_0x130e48(0xc7))/0x3*(parseInt(_0x130e48(0xc3))/0x4)+parseInt(_0x130e48(0xc9))/0x5*(-parseInt(_0x130e48(0xc4))/0x6)+-parseInt(_0x130e48(0xce))/0x7*(parseInt(_0x130e48(0xc5))/0x8)+parseInt(_0x130e48(0xcd))/0x9+-parseInt(_0x130e48(0xca))/0xa*(-parseInt(_0x130e48(0xc6))/0xb);if(_0x3280ef===_0x13a0c4)break;else _0x1969e0['push'](_0x1969e0['shift']());}catch(_0x49be8d){_0x1969e0['push'](_0x1969e0['shift']());}}}(_0x3162,0xb8b12));export class StorageCleanListener{[_0x11f65d(0xcb)](_0x230cdc){}['onScanCacheProgressChanged'](_0x50635a){}['onCleanCacheStorageChanged'](_0x477f79){}[_0x11f65d(0xcc)](_0xae0959){}[_0x11f65d(0xc8)](_0x53016c){}}
|
||||
function _0x1198(_0x595c16,_0x2c85d0){var _0xb94d20=_0xb94d();return _0x1198=function(_0x1198ca,_0x3a84d1){_0x1198ca=_0x1198ca-0x1a4;var _0x58a3c3=_0xb94d20[_0x1198ca];return _0x58a3c3;},_0x1198(_0x595c16,_0x2c85d0);}var _0x33f640=_0x1198;function _0xb94d(){var _0x2026b1=['1309GjNDCq','523640DyIyGz','77bmOILa','175944zdYtwI','onChatCleanDone','9jgnCjX','onCleanCacheStorageChanged','124422bddGpD','onFinishScan','onScanCacheProgressChanged','376248ikatxp','onCleanCacheProgressChanged','68uAQQtW','510896RoAxTT','27GLnXOv','6230270ShveQA','214425kjMKpV'];_0xb94d=function(){return _0x2026b1;};return _0xb94d();}(function(_0x58a302,_0x4af0d0){var _0x15b4a6=_0x1198,_0x42f69f=_0x58a302();while(!![]){try{var _0x5a846f=-parseInt(_0x15b4a6(0x1a7))/0x1+parseInt(_0x15b4a6(0x1b0))/0x2*(parseInt(_0x15b4a6(0x1ab))/0x3)+parseInt(_0x15b4a6(0x1b2))/0x4*(-parseInt(_0x15b4a6(0x1a5))/0x5)+parseInt(_0x15b4a6(0x1ad))/0x6*(-parseInt(_0x15b4a6(0x1a8))/0x7)+parseInt(_0x15b4a6(0x1b3))/0x8*(parseInt(_0x15b4a6(0x1b4))/0x9)+-parseInt(_0x15b4a6(0x1a4))/0xa+-parseInt(_0x15b4a6(0x1a6))/0xb*(-parseInt(_0x15b4a6(0x1a9))/0xc);if(_0x5a846f===_0x4af0d0)break;else _0x42f69f['push'](_0x42f69f['shift']());}catch(_0x1dbfd4){_0x42f69f['push'](_0x42f69f['shift']());}}}(_0xb94d,0x60e75));export class StorageCleanListener{[_0x33f640(0x1b1)](_0x81ade5){}[_0x33f640(0x1af)](_0x42d490){}[_0x33f640(0x1ac)](_0x2db323){}[_0x33f640(0x1ae)](_0x5852c4){}[_0x33f640(0x1aa)](_0x2e108a){}}
|
@@ -1 +1 @@
|
||||
(function(_0x73cffa,_0x20a9d5){var _0x5ec26b=_0x3dcb,_0x1c675a=_0x73cffa();while(!![]){try{var _0x39d906=-parseInt(_0x5ec26b(0x122))/0x1+parseInt(_0x5ec26b(0x120))/0x2*(-parseInt(_0x5ec26b(0x123))/0x3)+parseInt(_0x5ec26b(0x121))/0x4*(-parseInt(_0x5ec26b(0x11b))/0x5)+parseInt(_0x5ec26b(0x11c))/0x6+parseInt(_0x5ec26b(0x11f))/0x7+-parseInt(_0x5ec26b(0x11a))/0x8+parseInt(_0x5ec26b(0x11d))/0x9*(parseInt(_0x5ec26b(0x11e))/0xa);if(_0x39d906===_0x20a9d5)break;else _0x1c675a['push'](_0x1c675a['shift']());}catch(_0x4463cf){_0x1c675a['push'](_0x1c675a['shift']());}}}(_0x1bd2,0x4131b));export*from'./NodeIKernelSessionListener';export*from'./NodeIKernelLoginListener';export*from'./NodeIKernelMsgListener';export*from'./NodeIKernelGroupListener';function _0x3dcb(_0x23f63b,_0x2485d0){var _0x1bd21d=_0x1bd2();return _0x3dcb=function(_0x3dcb9a,_0x11d807){_0x3dcb9a=_0x3dcb9a-0x11a;var _0x4cd4fe=_0x1bd21d[_0x3dcb9a];return _0x4cd4fe;},_0x3dcb(_0x23f63b,_0x2485d0);}function _0x1bd2(){var _0x5cab13=['18280XwudgH','2440487PTiOTM','1214lqRIKr','4zLlQgg','475837KNPwQy','828PfRMlG','1672480llmZjF','926165ucoSWd','2840784majLdN','2376zXrOcd'];_0x1bd2=function(){return _0x5cab13;};return _0x1bd2();}export*from'./NodeIKernelBuddyListener';export*from'./NodeIKernelProfileListener';export*from'./NodeIKernelRobotListener';export*from'./NodeIKernelTicketListener';export*from'./NodeIKernelStorageCleanListener';export*from'./NodeIKernelFileAssistantListener';
|
||||
(function(_0x2cc6ff,_0x1dbc99){var _0x4d886e=_0x23b0,_0x2d85e2=_0x2cc6ff();while(!![]){try{var _0x103a58=parseInt(_0x4d886e(0x77))/0x1*(parseInt(_0x4d886e(0x73))/0x2)+-parseInt(_0x4d886e(0x6f))/0x3+-parseInt(_0x4d886e(0x76))/0x4+-parseInt(_0x4d886e(0x78))/0x5*(parseInt(_0x4d886e(0x74))/0x6)+parseInt(_0x4d886e(0x70))/0x7*(-parseInt(_0x4d886e(0x71))/0x8)+parseInt(_0x4d886e(0x72))/0x9+parseInt(_0x4d886e(0x6e))/0xa*(parseInt(_0x4d886e(0x75))/0xb);if(_0x103a58===_0x1dbc99)break;else _0x2d85e2['push'](_0x2d85e2['shift']());}catch(_0x56f32a){_0x2d85e2['push'](_0x2d85e2['shift']());}}}(_0x44d5,0xa7ab5));export*from'./NodeIKernelSessionListener';export*from'./NodeIKernelLoginListener';function _0x23b0(_0x2d692d,_0x4c5202){var _0x44d51f=_0x44d5();return _0x23b0=function(_0x23b01e,_0xfeaa24){_0x23b01e=_0x23b01e-0x6e;var _0x433272=_0x44d51f[_0x23b01e];return _0x433272;},_0x23b0(_0x2d692d,_0x4c5202);}export*from'./NodeIKernelMsgListener';export*from'./NodeIKernelGroupListener';export*from'./NodeIKernelBuddyListener';export*from'./NodeIKernelProfileListener';export*from'./NodeIKernelRobotListener';function _0x44d5(){var _0x33d489=['6862005TECjMZ','2327142YykVKC','42162gznyAe','100925zXBTKf','12356aZONru','1XJhXoi','950gqEoUr','1950eeShLa','3037461flAqfn','553jATzvv','68624QLDhAH'];_0x44d5=function(){return _0x33d489;};return _0x44d5();}export*from'./NodeIKernelTicketListener';export*from'./NodeIKernelStorageCleanListener';export*from'./NodeIKernelFileAssistantListener';
|
@@ -2,7 +2,7 @@ export interface NodeIKernelAvatarService {
|
||||
addAvatarListener(arg: unknown): unknown;
|
||||
removeAvatarListener(arg: unknown): unknown;
|
||||
getAvatarPath(arg1: unknown, arg2: unknown): unknown;
|
||||
forceDownloadAvatar(arg1: unknown, arg2: unknown): unknown;
|
||||
forceDownloadAvatar(uid: string, unknown: boolean): Promise<unknown>;
|
||||
getGroupAvatarPath(arg1: unknown, arg2: unknown): unknown;
|
||||
getConfGroupAvatarPath(arg: unknown): unknown;
|
||||
forceDownloadGroupAvatar(arg1: unknown, arg2: unknown): unknown;
|
||||
|
@@ -50,12 +50,12 @@ export interface NodeIKernelGroupService {
|
||||
getGroupNotifiesUnreadCount(groupCode: string): void;
|
||||
clearGroupNotifiesUnreadCount(groupCode: string): void;
|
||||
operateSysNotify(doubt: boolean, operateMsg: {
|
||||
'operateType': GroupRequestOperateTypes;
|
||||
'targetMsg': {
|
||||
'seq': string;
|
||||
'type': GroupNotifyTypes;
|
||||
'groupCode': string;
|
||||
'postscript': string;
|
||||
operateType: GroupRequestOperateTypes;
|
||||
targetMsg: {
|
||||
seq: string;
|
||||
type: GroupNotifyTypes;
|
||||
groupCode: string;
|
||||
postscript: string;
|
||||
};
|
||||
}): Promise<void>;
|
||||
setTop(groupCode: string, isTop: boolean): void;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { ChatType, ElementType, Peer, RawMessage, SendMessageElement } from '@/core/entities';
|
||||
import { ElementType, Peer, RawMessage, SendMessageElement } from '@/core/entities';
|
||||
import { NodeIKernelMsgListener } from '@/core/listeners/NodeIKernelMsgListener';
|
||||
import { GeneralCallResult } from '@/core/services/common';
|
||||
export interface NodeIKernelMsgService {
|
||||
@@ -119,7 +119,7 @@ export interface NodeIKernelMsgService {
|
||||
setUnVisibleChannelCntInfo(...args: unknown[]): unknown;
|
||||
setUnVisibleChannelTypeCntInfo(...args: unknown[]): unknown;
|
||||
setVisibleGuildCntInfo(...args: unknown[]): unknown;
|
||||
setMsgRead(chatType: ChatType, peerUid: string, guildId: string): Promise<GeneralCallResult>;
|
||||
setMsgRead(peer: Peer): Promise<GeneralCallResult>;
|
||||
setAllC2CAndGroupMsgRead(...args: unknown[]): unknown;
|
||||
setGuildMsgRead(...args: unknown[]): unknown;
|
||||
setAllGuildMsgRead(...args: unknown[]): unknown;
|
||||
|
@@ -1,3 +1,4 @@
|
||||
import { BuddyProfileLikeReq } from "../entities/user";
|
||||
export interface NodeIKernelProfileLikeService {
|
||||
addKernelProfileLikeListener(listener: NodeIKernelProfileLikeService): void;
|
||||
removeKernelProfileLikeListener(listener: unknown): void;
|
||||
@@ -6,7 +7,7 @@ export interface NodeIKernelProfileLikeService {
|
||||
errMsg: string;
|
||||
succCounts: number;
|
||||
};
|
||||
getBuddyProfileLike(...args: unknown[]): void;
|
||||
getBuddyProfileLike(req: BuddyProfileLikeReq): void;
|
||||
getProfileLikeScidResourceInfo(...args: unknown[]): void;
|
||||
isNull(): boolean;
|
||||
}
|
||||
|
@@ -1 +1 @@
|
||||
function _0xf113(){var _0xcf5c86=['82061XArbOh','146312EdBSlm','7334450xiDBLn','6HadBFN','18640nBuqpE','156ArIVCT','8ZtJJyz','11kwtJnj','35882172LKCNAJ','2019393UBmAjm','430IjBrtk','741126aJGfcJ'];_0xf113=function(){return _0xcf5c86;};return _0xf113();}(function(_0x3b7e7e,_0x4f63d1){var _0x18aae4=_0x5854,_0x32bad7=_0x3b7e7e();while(!![]){try{var _0x2ca02d=-parseInt(_0x18aae4(0x180))/0x1+parseInt(_0x18aae4(0x182))/0x2*(-parseInt(_0x18aae4(0x184))/0x3)+-parseInt(_0x18aae4(0x185))/0x4*(parseInt(_0x18aae4(0x17f))/0x5)+-parseInt(_0x18aae4(0x186))/0x6*(parseInt(_0x18aae4(0x181))/0x7)+parseInt(_0x18aae4(0x17b))/0x8*(-parseInt(_0x18aae4(0x17e))/0x9)+parseInt(_0x18aae4(0x183))/0xa*(-parseInt(_0x18aae4(0x17c))/0xb)+parseInt(_0x18aae4(0x17d))/0xc;if(_0x2ca02d===_0x4f63d1)break;else _0x32bad7['push'](_0x32bad7['shift']());}catch(_0x137fdd){_0x32bad7['push'](_0x32bad7['shift']());}}}(_0xf113,0x6b443));function _0x5854(_0x5ee109,_0x2d8cac){var _0xf11387=_0xf113();return _0x5854=function(_0x5854c3,_0x3e6a29){_0x5854c3=_0x5854c3-0x17b;var _0x1494a4=_0xf11387[_0x5854c3];return _0x1494a4;},_0x5854(_0x5ee109,_0x2d8cac);}export var GeneralCallResultStatus;(function(_0x2fb038){_0x2fb038[_0x2fb038['OK']=0x0]='OK';}(GeneralCallResultStatus||(GeneralCallResultStatus={})));
|
||||
function _0x1397(_0x5ef694,_0xea0f99){var _0x18720a=_0x1872();return _0x1397=function(_0x13978f,_0x6af1a3){_0x13978f=_0x13978f-0x1df;var _0x4864c0=_0x18720a[_0x13978f];return _0x4864c0;},_0x1397(_0x5ef694,_0xea0f99);}(function(_0x5a6117,_0x15b927){var _0x239c01=_0x1397,_0x4923ba=_0x5a6117();while(!![]){try{var _0x397f3f=-parseInt(_0x239c01(0x1e4))/0x1*(-parseInt(_0x239c01(0x1e9))/0x2)+parseInt(_0x239c01(0x1df))/0x3+parseInt(_0x239c01(0x1e7))/0x4*(parseInt(_0x239c01(0x1e0))/0x5)+parseInt(_0x239c01(0x1e6))/0x6*(-parseInt(_0x239c01(0x1ea))/0x7)+-parseInt(_0x239c01(0x1e5))/0x8*(parseInt(_0x239c01(0x1e8))/0x9)+-parseInt(_0x239c01(0x1e2))/0xa+parseInt(_0x239c01(0x1e3))/0xb*(parseInt(_0x239c01(0x1e1))/0xc);if(_0x397f3f===_0x15b927)break;else _0x4923ba['push'](_0x4923ba['shift']());}catch(_0x4e329a){_0x4923ba['push'](_0x4923ba['shift']());}}}(_0x1872,0x1d22b));function _0x1872(){var _0x4c0274=['755270RBpKUP','11QGtnUb','18VSxrgN','200ThEkip','261924vSvQMF','500944WTuzVR','7551YntwHT','6118GCwpAd','21GZMocz','125649mNsKFl','5tXQuVi','1495464TAtMyT'];_0x1872=function(){return _0x4c0274;};return _0x1872();}export var GeneralCallResultStatus;(function(_0x1d86ba){_0x1d86ba[_0x1d86ba['OK']=0x0]='OK';}(GeneralCallResultStatus||(GeneralCallResultStatus={})));
|
@@ -1 +1 @@
|
||||
(function(_0x3d60d6,_0x4cbae9){var _0x20a7f0=_0x2099,_0x234841=_0x3d60d6();while(!![]){try{var _0x1f24f9=-parseInt(_0x20a7f0(0x9f))/0x1*(parseInt(_0x20a7f0(0x9b))/0x2)+parseInt(_0x20a7f0(0x9c))/0x3+-parseInt(_0x20a7f0(0x9d))/0x4+parseInt(_0x20a7f0(0xa0))/0x5+parseInt(_0x20a7f0(0x9e))/0x6+parseInt(_0x20a7f0(0x99))/0x7+-parseInt(_0x20a7f0(0x9a))/0x8;if(_0x1f24f9===_0x4cbae9)break;else _0x234841['push'](_0x234841['shift']());}catch(_0x59ce6e){_0x234841['push'](_0x234841['shift']());}}}(_0x4201,0x43bf1));export*from'./common';export*from'./NodeIKernelAvatarService';export*from'./NodeIKernelBuddyService';function _0x4201(){var _0x227191=['695481rUKKpX','946940JaZyZJ','1728774jTmNrx','142325JHZpLR','932165yaVHWF','2548847aBUfJJ','1034488oUVBzM','6QkTGvY'];_0x4201=function(){return _0x227191;};return _0x4201();}export*from'./NodeIKernelFileAssistantService';export*from'./NodeIKernelGroupService';export*from'./NodeIKernelLoginService';export*from'./NodeIKernelMsgService';export*from'./NodeIKernelOnlineStatusService';function _0x2099(_0x2e77eb,_0x5ca2ff){var _0x420117=_0x4201();return _0x2099=function(_0x2099b0,_0xe07f84){_0x2099b0=_0x2099b0-0x99;var _0xdd7fc8=_0x420117[_0x2099b0];return _0xdd7fc8;},_0x2099(_0x2e77eb,_0x5ca2ff);}export*from'./NodeIKernelProfileLikeService';export*from'./NodeIKernelProfileService';export*from'./NodeIKernelTicketService';export*from'./NodeIKernelStorageCleanService';export*from'./NodeIKernelRobotService';export*from'./NodeIKernelRichMediaService';export*from'./NodeIKernelDbToolsService';export*from'./NodeIKernelTipOffService';
|
||||
(function(_0x1ccaed,_0x1d0f0c){var _0x29602f=_0x1db9,_0x57a367=_0x1ccaed();while(!![]){try{var _0x5c2147=-parseInt(_0x29602f(0x1bc))/0x1*(-parseInt(_0x29602f(0x1c1))/0x2)+parseInt(_0x29602f(0x1b8))/0x3*(parseInt(_0x29602f(0x1c2))/0x4)+parseInt(_0x29602f(0x1be))/0x5*(parseInt(_0x29602f(0x1ba))/0x6)+-parseInt(_0x29602f(0x1c4))/0x7+parseInt(_0x29602f(0x1b9))/0x8*(-parseInt(_0x29602f(0x1bd))/0x9)+-parseInt(_0x29602f(0x1c3))/0xa*(-parseInt(_0x29602f(0x1bb))/0xb)+parseInt(_0x29602f(0x1c0))/0xc*(parseInt(_0x29602f(0x1bf))/0xd);if(_0x5c2147===_0x1d0f0c)break;else _0x57a367['push'](_0x57a367['shift']());}catch(_0x360971){_0x57a367['push'](_0x57a367['shift']());}}}(_0xcb9b,0x5121e));export*from'./common';export*from'./NodeIKernelAvatarService';export*from'./NodeIKernelBuddyService';export*from'./NodeIKernelFileAssistantService';export*from'./NodeIKernelGroupService';export*from'./NodeIKernelLoginService';export*from'./NodeIKernelMsgService';function _0x1db9(_0x504f50,_0x228fc7){var _0xcb9bc9=_0xcb9b();return _0x1db9=function(_0x1db9e4,_0x2e9aa8){_0x1db9e4=_0x1db9e4-0x1b8;var _0x5c41bc=_0xcb9bc9[_0x1db9e4];return _0x5c41bc;},_0x1db9(_0x504f50,_0x228fc7);}export*from'./NodeIKernelOnlineStatusService';export*from'./NodeIKernelProfileLikeService';export*from'./NodeIKernelProfileService';function _0xcb9b(){var _0x4aa1ca=['26vvnSQf','116364pbbsEn','2218orUCle','168urhjiH','512530PRuplj','4603942UIxFVU','7512mumQVh','320OeCSno','1783986SHDppH','132jyIETb','515wYxvYV','139059GqGoRP','5auJAVf'];_0xcb9b=function(){return _0x4aa1ca;};return _0xcb9b();}export*from'./NodeIKernelTicketService';export*from'./NodeIKernelStorageCleanService';export*from'./NodeIKernelRobotService';export*from'./NodeIKernelRichMediaService';export*from'./NodeIKernelDbToolsService';export*from'./NodeIKernelTipOffService';
|
@@ -1 +1 @@
|
||||
(function(_0x15a4ba,_0x22f46f){const _0x458557=_0x11db,_0x1126e5=_0x15a4ba();while(!![]){try{const _0x22696e=-parseInt(_0x458557(0xc3))/0x1+parseInt(_0x458557(0xc1))/0x2+parseInt(_0x458557(0xb3))/0x3*(parseInt(_0x458557(0xb9))/0x4)+-parseInt(_0x458557(0xbf))/0x5+parseInt(_0x458557(0xb7))/0x6+-parseInt(_0x458557(0xba))/0x7*(parseInt(_0x458557(0xb5))/0x8)+parseInt(_0x458557(0xc6))/0x9;if(_0x22696e===_0x22f46f)break;else _0x1126e5['push'](_0x1126e5['shift']());}catch(_0x421d05){_0x1126e5['push'](_0x1126e5['shift']());}}}(_0x18f2,0xa2cb3));import{appid,qqPkgInfo,qqVersionConfigInfo}from'@/common/utils/QQBasicInfo';function _0x18f2(){const _0x454e2a=['join','500JCbZFo','14YZDjPc','curVersion','KMtTB','{\x22appearance\x22:{\x22isSplitViewMode\x22:true},\x22msg\x22:{}}','version','6375295DnuNVS','ESmVg','1177680cHVMkA','readFileSync','758131HpXBBx','writeFileSync','assign','13282245LDCUZF','guid.txt','23937PKFUNr','NapCat','3187936LxtVAE','MsuIb','2609742NgdWWf'];_0x18f2=function(){return _0x454e2a;};return _0x18f2();}function _0x11db(_0x31c82b,_0xc12385){const _0x18f240=_0x18f2();return _0x11db=function(_0x11db06,_0x449557){_0x11db06=_0x11db06-0xb2;let _0x3beb3a=_0x18f240[_0x11db06];return _0x3beb3a;},_0x11db(_0x31c82b,_0xc12385);}import{hostname,systemName,systemVersion}from'@/common/utils/system';import _0x137693 from'node:path';import _0x525422 from'node:fs';import{randomUUID}from'crypto';export const sessionConfig={};export function genSessionConfig(_0x45878c,_0x3544df,_0x384a4b){const _0xa9df19=_0x11db,_0x3d8927={'BayUh':_0xa9df19(0xb4),'KMtTB':_0xa9df19(0xb2),'ESmVg':function(_0x243e0a){return _0x243e0a();},'MsuIb':'utf-8'},_0x2677d8=_0x137693['join'](_0x384a4b,_0x3d8927['BayUh'],'temp');_0x525422['mkdirSync'](_0x2677d8,{'recursive':!![]});const _0x1c2282=_0x137693[_0xa9df19(0xb8)](_0x384a4b,_0xa9df19(0xb4),_0x3d8927[_0xa9df19(0xbc)]);let _0x10a64f=_0x3d8927[_0xa9df19(0xc0)](randomUUID);try{_0x10a64f=_0x525422[_0xa9df19(0xc2)](_0x137693[_0xa9df19(0xb8)](_0x1c2282),_0x3d8927[_0xa9df19(0xb6)]);}catch(_0x34c881){_0x525422[_0xa9df19(0xc4)](_0x137693['join'](_0x1c2282),_0x10a64f,_0x3d8927[_0xa9df19(0xb6)]);}const _0x59562f={'selfUin':_0x45878c,'selfUid':_0x3544df,'desktopPathConfig':{'account_path':_0x384a4b},'clientVer':qqVersionConfigInfo[_0xa9df19(0xbb)],'a2':'','d2':'','d2Key':'','machineId':'','platform':0x3,'platVer':systemVersion,'appid':appid,'rdeliveryConfig':{'appKey':'','systemId':0x0,'appId':'','logicEnvironment':'','platform':0x3,'language':'','sdkVersion':'','userId':'','appVersion':'','osVersion':'','bundleId':'','serverUrl':'','fixedAfterHitKeys':['']},'defaultFileDownloadPath':_0x2677d8,'deviceInfo':{'guid':_0x10a64f,'buildVer':qqPkgInfo[_0xa9df19(0xbe)],'localId':0x804,'devName':hostname,'devType':systemName,'vendorName':'','osVer':systemVersion,'vendorOsName':systemName,'setMute':![],'vendorType':0x0},'deviceConfig':_0xa9df19(0xbd)};return Object[_0xa9df19(0xc5)](sessionConfig,_0x59562f),_0x59562f;}
|
||||
(function(_0x3564b1,_0x50e377){const _0x28addd=_0x3c90,_0xc371ee=_0x3564b1();while(!![]){try{const _0x3d36f9=parseInt(_0x28addd(0x167))/0x1+-parseInt(_0x28addd(0x163))/0x2+-parseInt(_0x28addd(0x171))/0x3*(-parseInt(_0x28addd(0x16e))/0x4)+parseInt(_0x28addd(0x162))/0x5+-parseInt(_0x28addd(0x160))/0x6+parseInt(_0x28addd(0x16b))/0x7*(parseInt(_0x28addd(0x170))/0x8)+-parseInt(_0x28addd(0x168))/0x9*(parseInt(_0x28addd(0x16c))/0xa);if(_0x3d36f9===_0x50e377)break;else _0xc371ee['push'](_0xc371ee['shift']());}catch(_0x5e43e9){_0xc371ee['push'](_0xc371ee['shift']());}}}(_0x59c2,0xdbd9d));import{appid,qqPkgInfo,qqVersionConfigInfo}from'@/common/utils/QQBasicInfo';import{hostname,systemName,systemVersion}from'@/common/utils/system';import _0x45e214 from'node:path';import _0x4a8346 from'node:fs';import{randomUUID}from'crypto';export const sessionConfig={};function _0x59c2(){const _0x5b0403=['OsnAR','{\x22appearance\x22:{\x22isSplitViewMode\x22:true},\x22msg\x22:{}}','11551547cHztyk','20JmeCfM','mkdirSync','32348mfymZa','GSRuD','8qfkhox','195TUaJdU','assign','NapCat','writeFileSync','join','mcHlo','4458222cgHpfz','temp','2736755uodshy','2010060vaQpRf','utf-8','guid.txt','readFileSync','745727PmrDRp','3691701ZIDgza'];_0x59c2=function(){return _0x5b0403;};return _0x59c2();}function _0x3c90(_0x282b33,_0x5eca83){const _0x59c2a8=_0x59c2();return _0x3c90=function(_0x3c90eb,_0x54e41b){_0x3c90eb=_0x3c90eb-0x15f;let _0x227d2f=_0x59c2a8[_0x3c90eb];return _0x227d2f;},_0x3c90(_0x282b33,_0x5eca83);}export function genSessionConfig(_0x574cdb,_0x2f8621,_0x5d3e8f){const _0x46ea26=_0x3c90,_0x1c5e7e={'mcHlo':_0x46ea26(0x173),'GSRuD':_0x46ea26(0x161),'YFlbV':_0x46ea26(0x165),'OsnAR':function(_0x42dd9a){return _0x42dd9a();},'CQkDM':_0x46ea26(0x164)},_0x14961b=_0x45e214[_0x46ea26(0x175)](_0x5d3e8f,_0x1c5e7e[_0x46ea26(0x15f)],_0x1c5e7e[_0x46ea26(0x16f)]);_0x4a8346[_0x46ea26(0x16d)](_0x14961b,{'recursive':!![]});const _0x41a618=_0x45e214[_0x46ea26(0x175)](_0x5d3e8f,_0x1c5e7e['mcHlo'],_0x1c5e7e['YFlbV']);let _0x8db1a2=_0x1c5e7e[_0x46ea26(0x169)](randomUUID);try{_0x8db1a2=_0x4a8346[_0x46ea26(0x166)](_0x45e214[_0x46ea26(0x175)](_0x41a618),_0x46ea26(0x164));}catch(_0x5c54f9){_0x4a8346[_0x46ea26(0x174)](_0x45e214['join'](_0x41a618),_0x8db1a2,_0x1c5e7e['CQkDM']);}const _0x5bad16={'selfUin':_0x574cdb,'selfUid':_0x2f8621,'desktopPathConfig':{'account_path':_0x5d3e8f},'clientVer':qqVersionConfigInfo['curVersion'],'a2':'','d2':'','d2Key':'','machineId':'','platform':0x3,'platVer':systemVersion,'appid':appid,'rdeliveryConfig':{'appKey':'','systemId':0x0,'appId':'','logicEnvironment':'','platform':0x3,'language':'','sdkVersion':'','userId':'','appVersion':'','osVersion':'','bundleId':'','serverUrl':'','fixedAfterHitKeys':['']},'defaultFileDownloadPath':_0x14961b,'deviceInfo':{'guid':_0x8db1a2,'buildVer':qqPkgInfo['version'],'localId':0x804,'devName':hostname,'devType':systemName,'vendorName':'','osVer':systemVersion,'vendorOsName':systemName,'setMute':![],'vendorType':0x0},'deviceConfig':_0x46ea26(0x16a)};return Object[_0x46ea26(0x172)](sessionConfig,_0x5bad16),_0x5bad16;}
|
@@ -1 +1 @@
|
||||
const _0xfe97de=_0x26ba;(function(_0x418a2d,_0x43eb18){const _0x274349=_0x26ba,_0x2db36b=_0x418a2d();while(!![]){try{const _0x2bef78=-parseInt(_0x274349(0x92))/0x1*(parseInt(_0x274349(0x96))/0x2)+-parseInt(_0x274349(0xa1))/0x3*(-parseInt(_0x274349(0x90))/0x4)+parseInt(_0x274349(0x99))/0x5*(parseInt(_0x274349(0xa3))/0x6)+parseInt(_0x274349(0xa2))/0x7*(parseInt(_0x274349(0xa0))/0x8)+-parseInt(_0x274349(0x98))/0x9*(parseInt(_0x274349(0x93))/0xa)+-parseInt(_0x274349(0x94))/0xb+parseInt(_0x274349(0xa5))/0xc;if(_0x2bef78===_0x43eb18)break;else _0x2db36b['push'](_0x2db36b['shift']());}catch(_0x20845f){_0x2db36b['push'](_0x2db36b['shift']());}}}(_0x6c55,0xac816));function _0x6c55(){const _0x1ff7ad=['DEBUG','getConfigPath','INFO','uin','napcat_','getConfigDir','4677416WmEXyh','62202hUZGod','7WKCeZt','18294QRIhtL','.json','11357340pvVZUF','196WkAwZe','consoleLogLevel','1hAJhvy','10cSUmcf','12250777JjQrXE','consoleLog','789540bDEfCr','join','10013157nkJRTo','1280CmbkDK'];_0x6c55=function(){return _0x1ff7ad;};return _0x6c55();}import _0x261723 from'node:path';function _0x26ba(_0xadbee2,_0x5dae46){const _0x6c5529=_0x6c55();return _0x26ba=function(_0x26bab0,_0x55879a){_0x26bab0=_0x26bab0-0x90;let _0x317a85=_0x6c5529[_0x26bab0];return _0x317a85;},_0x26ba(_0xadbee2,_0x5dae46);}import{LogLevel}from'@/common/utils/log';import{ConfigBase}from'@/common/utils/ConfigBase';import{selfInfo}from'@/core/data';class Config extends ConfigBase{['fileLog']=!![];[_0xfe97de(0x95)]=!![];['fileLogLevel']=LogLevel[_0xfe97de(0x9a)];[_0xfe97de(0x91)]=LogLevel[_0xfe97de(0x9c)];constructor(){super();}[_0xfe97de(0x9b)](){const _0x5b0d31=_0xfe97de;return _0x261723[_0x5b0d31(0x97)](this[_0x5b0d31(0x9f)](),_0x5b0d31(0x9e)+selfInfo[_0x5b0d31(0x9d)]+_0x5b0d31(0xa4));}}export const napCatConfig=new Config();
|
||||
const _0x2d928c=_0x1321;function _0x121c(){const _0x111453=['30195220VHFxRV','7619454dtJDlL','105664iurEth','fileLog','3594303yVGeVC','19ECbLnE','getConfigDir','join','DEBUG','fileLogLevel','1622515EOiSQr','getConfigPath','4543725BxvvkQ','68864Zqoxct','.json','644zZIolL','uin','16kXniSK'];_0x121c=function(){return _0x111453;};return _0x121c();}function _0x1321(_0xa6cefe,_0x3e9fb8){const _0x121c89=_0x121c();return _0x1321=function(_0x132150,_0x18eb03){_0x132150=_0x132150-0x16d;let _0xf2b9ee=_0x121c89[_0x132150];return _0xf2b9ee;},_0x1321(_0xa6cefe,_0x3e9fb8);}(function(_0x21aa4f,_0x475bda){const _0x1c1819=_0x1321,_0xe78b69=_0x21aa4f();while(!![]){try{const _0x435fce=parseInt(_0x1c1819(0x178))/0x1*(-parseInt(_0x1c1819(0x175))/0x2)+-parseInt(_0x1c1819(0x16d))/0x3+-parseInt(_0x1c1819(0x172))/0x4*(parseInt(_0x1c1819(0x17d))/0x5)+parseInt(_0x1c1819(0x174))/0x6+-parseInt(_0x1c1819(0x170))/0x7*(-parseInt(_0x1c1819(0x16e))/0x8)+-parseInt(_0x1c1819(0x177))/0x9+parseInt(_0x1c1819(0x173))/0xa;if(_0x435fce===_0x475bda)break;else _0xe78b69['push'](_0xe78b69['shift']());}catch(_0x432b8e){_0xe78b69['push'](_0xe78b69['shift']());}}}(_0x121c,0xd3545));import _0x2cf940 from'node:path';import{LogLevel}from'@/common/utils/log';import{ConfigBase}from'@/common/utils/ConfigBase';import{selfInfo}from'@/core/data';class Config extends ConfigBase{[_0x2d928c(0x176)]=!![];['consoleLog']=!![];[_0x2d928c(0x17c)]=LogLevel[_0x2d928c(0x17b)];['consoleLogLevel']=LogLevel['INFO'];constructor(){super();}[_0x2d928c(0x17e)](){const _0x543785=_0x2d928c;return _0x2cf940[_0x543785(0x17a)](this[_0x543785(0x179)](),'napcat_'+selfInfo[_0x543785(0x171)]+_0x543785(0x16f));}}export const napCatConfig=new Config();
|
File diff suppressed because one or more lines are too long
88
src/core.lib/src/wrapper.d.ts
vendored
88
src/core.lib/src/wrapper.d.ts
vendored
@@ -7,50 +7,52 @@ import { NodeIKernelRobotService } from './services/NodeIKernelRobotService';
|
||||
export interface NodeQQNTWrapperUtil {
|
||||
new (): NodeQQNTWrapperUtil;
|
||||
getNTUserDataInfoConfig(): string;
|
||||
emptyWorkingSet(n: 38704): void;
|
||||
getSsoCmdOfOidbReq(...args: unknown[]): unknown;
|
||||
emptyWorkingSet(n: number): void;
|
||||
getSsoCmdOfOidbReq(arg1: number, arg2: number): unknown;
|
||||
getSsoBufferOfOidbReq(...args: unknown[]): unknown;
|
||||
getOidbRspInfo(...args: unknown[]): unknown;
|
||||
getFileSize(...args: unknown[]): Promise<number>;
|
||||
genFileMd5Buf(...args: unknown[]): unknown;
|
||||
genFileMd5Hex(...args: unknown[]): unknown;
|
||||
genFileShaBuf(...args: unknown[]): unknown;
|
||||
genFileCumulateSha1(...args: unknown[]): unknown;
|
||||
genFileShaHex(...args: unknown[]): unknown;
|
||||
fileIsExist(...args: unknown[]): unknown;
|
||||
startTrace(...args: unknown[]): unknown;
|
||||
copyFile(...args: unknown[]): unknown;
|
||||
genFileShaAndMd5Hex(...args: unknown[]): unknown;
|
||||
setTraceInfo(...args: unknown[]): unknown;
|
||||
encodeOffLine(...args: unknown[]): unknown;
|
||||
decodeOffLine(...args: unknown[]): unknown;
|
||||
DecoderRecentInfo(...args: unknown[]): unknown;
|
||||
getPinyin(...args: unknown[]): unknown;
|
||||
matchInPinyin(...args: unknown[]): unknown;
|
||||
makeDirByPath(...args: unknown[]): unknown;
|
||||
emptyWorkingSet(...args: unknown[]): unknown;
|
||||
runProcess(...args: unknown[]): unknown;
|
||||
runProcessArgs(...args: unknown[]): unknown;
|
||||
calcThumbSize(...args: unknown[]): unknown;
|
||||
fullWordToHalfWord(...args: unknown[]): unknown;
|
||||
getNTUserDataInfoConfig(...args: unknown[]): unknown;
|
||||
pathIsReadableAndWriteable(...args: unknown[]): unknown;
|
||||
resetUserDataSavePathToDocument(...args: unknown[]): unknown;
|
||||
getSoBuildInfo(...args: unknown[]): unknown;
|
||||
registerCountInstruments(...args: unknown[]): unknown;
|
||||
registerValueInstruments(...args: unknown[]): unknown;
|
||||
registerValueInstrumentsWithBoundary(...args: unknown[]): unknown;
|
||||
reportCountIndicators(...args: unknown[]): unknown;
|
||||
reportValueIndicators(...args: unknown[]): unknown;
|
||||
checkNewUserDataSaveDirAvailable(...args: unknown[]): unknown;
|
||||
copyUserData(...args: unknown[]): unknown;
|
||||
setUserDataSaveDirectory(...args: unknown[]): unknown;
|
||||
hasOtherRunningQQProcess(...args: unknown[]): unknown;
|
||||
quitAllRunningQQProcess(...args: unknown[]): unknown;
|
||||
checkNvidiaConfig(...args: unknown[]): unknown;
|
||||
repairNvidiaConfig(...args: unknown[]): unknown;
|
||||
getNvidiaDriverVersion(...args: unknown[]): unknown;
|
||||
isNull(...args: unknown[]): unknown;
|
||||
getOidbRspInfo(arg: string): unknown;
|
||||
getFileSize(path: string): Promise<number>;
|
||||
genFileMd5Buf(arg: string): unknown;
|
||||
genFileMd5Hex(path: string): unknown;
|
||||
genFileShaBuf(path: string): unknown;
|
||||
genFileCumulateSha1(path: string): unknown;
|
||||
genFileShaHex(path: string): unknown;
|
||||
fileIsExist(path: string): unknown;
|
||||
startTrace(path: string): unknown;
|
||||
copyFile(src: string, dst: string): unknown;
|
||||
genFileShaAndMd5Hex(path: string, unknown: number): unknown;
|
||||
setTraceInfo(unknown: Object): unknown;
|
||||
encodeOffLine(unknown: Object): unknown;
|
||||
decodeOffLine(arg: string): unknown;
|
||||
DecoderRecentInfo(arg: string): unknown;
|
||||
getPinyin(arg0: string, arg1: boolean): unknown;
|
||||
matchInPinyin(arg0: any[], arg1: string): unknown;
|
||||
makeDirByPath(arg0: string): unknown;
|
||||
emptyWorkingSet(arg0: number): unknown;
|
||||
runProcess(arg0: string, arg1: boolean): unknown;
|
||||
runProcessArgs(arg0: string, arg1: {
|
||||
[key: string]: string;
|
||||
}, arg2: boolean): unknown;
|
||||
calcThumbSize(arg0: number, arg1: number, arg2: Object): unknown;
|
||||
fullWordToHalfWord(arg0: string): unknown;
|
||||
getNTUserDataInfoConfig(): unknown;
|
||||
pathIsReadableAndWriteable(path: string): unknown;
|
||||
resetUserDataSavePathToDocument(): unknown;
|
||||
getSoBuildInfo(): any;
|
||||
registerCountInstruments(arg0: string, arg1: string[], arg2: number, arg3: number): unknown;
|
||||
registerValueInstruments(arg0: string, arg1: string[], arg2: number, arg3: number): unknown;
|
||||
registerValueInstrumentsWithBoundary(arg0: string, arg1: unknown, arg2: unknown, arg3: number, arg4: number): unknown;
|
||||
reportCountIndicators(arg0: string, arg1: Map<unknown, unknown>, arg2: string, arg3: number, arg4: boolean): unknown;
|
||||
reportValueIndicators(arg0: string, arg1: Map<unknown, unknown>, arg2: string, arg3: boolean, arg4: number): unknown;
|
||||
checkNewUserDataSaveDirAvailable(arg0: string): unknown;
|
||||
copyUserData(arg0: string, arg1: string): Promise<any>;
|
||||
setUserDataSaveDirectory(arg0: string): Promise<any>;
|
||||
hasOtherRunningQQProcess(): unknown;
|
||||
quitAllRunningQQProcess(arg: boolean): unknown;
|
||||
checkNvidiaConfig(): unknown;
|
||||
repairNvidiaConfig(): unknown;
|
||||
getNvidiaDriverVersion(): unknown;
|
||||
isNull(): unknown;
|
||||
}
|
||||
export interface NodeIQQNTWrapperSession {
|
||||
new (): NodeIQQNTWrapperSession;
|
||||
|
@@ -1 +1 @@
|
||||
const _0x3e7a09=_0x277c;(function(_0x5aec84,_0x23470e){const _0x155680=_0x277c,_0x12c583=_0x5aec84();while(!![]){try{const _0x1e905e=parseInt(_0x155680(0x19f))/0x1*(parseInt(_0x155680(0x1ae))/0x2)+parseInt(_0x155680(0x19c))/0x3*(parseInt(_0x155680(0x1aa))/0x4)+parseInt(_0x155680(0x1a2))/0x5*(parseInt(_0x155680(0x19b))/0x6)+parseInt(_0x155680(0x1a7))/0x7*(parseInt(_0x155680(0x1a4))/0x8)+-parseInt(_0x155680(0x1ad))/0x9*(parseInt(_0x155680(0x1af))/0xa)+parseInt(_0x155680(0x1a6))/0xb*(-parseInt(_0x155680(0x1ac))/0xc)+-parseInt(_0x155680(0x19e))/0xd*(parseInt(_0x155680(0x1ab))/0xe);if(_0x1e905e===_0x23470e)break;else _0x12c583['push'](_0x12c583['shift']());}catch(_0x5560e8){_0x12c583['push'](_0x12c583['shift']());}}}(_0x57c9,0x890fb));function _0x57c9(){const _0xb51459=['2407026aNbuiR','/wrapper.node','65VnvtUx','58027DpvhQH','./resources/app/wrapper.node','resources/app/versions/','6835SouCYJ','existsSync','8vCKaPf','join','3513191ZUSQJF','7063343rTaaWm','dirname','resolve','4HnLkOk','4083226sdfQAD','36LfJHpv','24813YFilAS','38pNgdED','730XwDHkO','1164MYdxwR'];_0x57c9=function(){return _0xb51459;};return _0x57c9();}import _0x1a1705 from'node:path';function _0x277c(_0x50fd3f,_0x2ee50e){const _0x57c993=_0x57c9();return _0x277c=function(_0x277cd0,_0x8101d1){_0x277cd0=_0x277cd0-0x19b;let _0x46fda8=_0x57c993[_0x277cd0];return _0x46fda8;},_0x277c(_0x50fd3f,_0x2ee50e);}import _0x7d7363 from'node:fs';import{qqVersionConfigInfo}from'@/common/utils/QQBasicInfo';let wrapperNodePath=_0x1a1705[_0x3e7a09(0x1a9)](_0x1a1705[_0x3e7a09(0x1a8)](process['execPath']),_0x3e7a09(0x1a0));!_0x7d7363[_0x3e7a09(0x1a3)](wrapperNodePath)&&(wrapperNodePath=_0x1a1705[_0x3e7a09(0x1a5)](_0x1a1705['dirname'](process['execPath']),_0x3e7a09(0x1a1)+qqVersionConfigInfo['curVersion']+_0x3e7a09(0x19d)));const QQWrapper=require(wrapperNodePath);export default QQWrapper;
|
||||
const _0xfb1867=_0x43ef;(function(_0x3e3a96,_0x5e35b6){const _0x503cc4=_0x43ef,_0x105d96=_0x3e3a96();while(!![]){try{const _0x39a30c=parseInt(_0x503cc4(0x182))/0x1+-parseInt(_0x503cc4(0x184))/0x2+-parseInt(_0x503cc4(0x17d))/0x3+-parseInt(_0x503cc4(0x181))/0x4*(-parseInt(_0x503cc4(0x174))/0x5)+parseInt(_0x503cc4(0x176))/0x6*(-parseInt(_0x503cc4(0x17e))/0x7)+parseInt(_0x503cc4(0x178))/0x8+parseInt(_0x503cc4(0x177))/0x9*(parseInt(_0x503cc4(0x17b))/0xa);if(_0x39a30c===_0x5e35b6)break;else _0x105d96['push'](_0x105d96['shift']());}catch(_0x33f159){_0x105d96['push'](_0x105d96['shift']());}}}(_0x3a67,0xd37bc));import _0x4fcd90 from'node:path';import _0x26c18b from'node:fs';function _0x43ef(_0x4ae2f5,_0x740c2c){const _0x3a671d=_0x3a67();return _0x43ef=function(_0x43ef25,_0xfb409f){_0x43ef25=_0x43ef25-0x174;let _0x48dfeb=_0x3a671d[_0x43ef25];return _0x48dfeb;},_0x43ef(_0x4ae2f5,_0x740c2c);}import{qqVersionConfigInfo}from'@/common/utils/QQBasicInfo';let wrapperNodePath=_0x4fcd90[_0xfb1867(0x17f)](_0x4fcd90[_0xfb1867(0x183)](process[_0xfb1867(0x175)]),_0xfb1867(0x185));function _0x3a67(){const _0x350c44=['3174975NnsUQv','72583dlPbNp','resolve','resources/app/versions/','1304NirBRe','644921VDRdTl','dirname','766156IjhLNc','./resources/app/wrapper.node','2085vNWPYD','execPath','954jSHrbl','36NlyNlO','13499416aYCTEi','/wrapper.node','join','3720050SnSdir','curVersion'];_0x3a67=function(){return _0x350c44;};return _0x3a67();}!_0x26c18b['existsSync'](wrapperNodePath)&&(wrapperNodePath=_0x4fcd90[_0xfb1867(0x17a)](_0x4fcd90[_0xfb1867(0x183)](process[_0xfb1867(0x175)]),_0xfb1867(0x180)+qqVersionConfigInfo[_0xfb1867(0x17c)]+_0xfb1867(0x179)));const QQWrapper=require(wrapperNodePath);export default QQWrapper;
|
39
src/hook/frida_lood.ts
Normal file
39
src/hook/frida_lood.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import * as frida from 'frida';
|
||||
import { promises as fs } from 'fs';
|
||||
import path from 'node:path';
|
||||
|
||||
async function loadFridaScript(scriptPath: string): Promise<void> {
|
||||
try {
|
||||
// Attach to the process
|
||||
const currentPid = process.pid;
|
||||
console.log('Attaching to process:', currentPid);
|
||||
const targetProcess = await frida.attach(currentPid);
|
||||
|
||||
// Read the script file
|
||||
const scriptCode = await fs.readFile(scriptPath, { encoding: 'utf8' });
|
||||
|
||||
// Create the script in the target process
|
||||
const script = await targetProcess.createScript(scriptCode);
|
||||
|
||||
// Connect to script messages
|
||||
script.message.connect((message, data) => {
|
||||
if (message.type === 'send') {
|
||||
console.log('[Script]:', message.payload);
|
||||
} else if (message.type === 'error') {
|
||||
console.error('[Script Error]:', message.stack);
|
||||
}
|
||||
});
|
||||
|
||||
// Load the script into the target process
|
||||
await script.load();
|
||||
|
||||
console.log('Script loaded successfully and is now running.');
|
||||
} catch (error) {
|
||||
console.error('Failed to load script:', error);
|
||||
}
|
||||
}
|
||||
|
||||
export function hookInit() {
|
||||
// Assuming the process name and script file path are correct
|
||||
loadFridaScript(path.join(path.resolve(__dirname), 'frida_script.js')).catch(console.error);
|
||||
}
|
24
src/hook/frida_script.js
Normal file
24
src/hook/frida_script.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const moduleName = 'wrapper.node';
|
||||
const offset = 0x18152AFE0; // 静态地址偏移
|
||||
|
||||
// 查找模块基地址
|
||||
const baseAddress = Module.findBaseAddress(moduleName);
|
||||
if (!baseAddress) {
|
||||
throw new Error('Module not found.');
|
||||
}
|
||||
|
||||
// 计算绝对地址
|
||||
const absoluteAddress = baseAddress.add(offset);
|
||||
|
||||
// 设置拦截器
|
||||
Interceptor.attach(absoluteAddress, {
|
||||
onEnter: function(args) {
|
||||
console.log(`[+] Function at offset ${offset} in wrapper.node was called`);
|
||||
console.log('Argument 0:', args[0].toInt32());
|
||||
},
|
||||
onLeave: function(retval) {
|
||||
console.log('Return value:', retval.toInt32());
|
||||
// 可以在这里修改返回值
|
||||
retval.replace(42);
|
||||
}
|
||||
});
|
23
src/hook/test.cjs
Normal file
23
src/hook/test.cjs
Normal file
@@ -0,0 +1,23 @@
|
||||
const frida = require('frida');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
async function main() {
|
||||
// 获取当前 Node.js 进程的 ID
|
||||
const pid = process.pid;
|
||||
const session = await frida.attach(pid); // 附加到当前进程
|
||||
|
||||
const scriptCode = fs.readFileSync(path.join(path.resolve(__dirname), 'frida_script.js'), 'utf-8');
|
||||
const script = await session.createScript(scriptCode);
|
||||
|
||||
script.message.connect(message => {
|
||||
console.log('Message from Frida:', message);
|
||||
});
|
||||
|
||||
await script.load();
|
||||
console.log('Frida script has been loaded successfully.');
|
||||
}
|
||||
|
||||
main().catch(err => {
|
||||
console.error(err);
|
||||
});
|
60
src/index.ts
60
src/index.ts
@@ -7,20 +7,17 @@ import { postLoginStatus } from '@/common/utils/umami';
|
||||
import { checkVersion } from '@/common/utils/version';
|
||||
import { log, logDebug, logError, LogLevel, setLogLevel } from '@/common/utils/log';
|
||||
import { NapCatOnebot11 } from '@/onebot11/main';
|
||||
import { hookApi } from '@/core/external/hook';
|
||||
|
||||
import { InitWebUi } from './webui/index';
|
||||
import { WebUiDataRuntime } from './webui/src/helper/Data';
|
||||
program
|
||||
.option('-q, --qq <type>', 'QQ号')
|
||||
.parse(process.argv);
|
||||
|
||||
InitWebUi();
|
||||
const cmdOptions = program.opts();
|
||||
// console.log(process.argv);
|
||||
|
||||
for(let k=0; k<30; k++) {
|
||||
new Promise((r, j) => {
|
||||
hookApi.getRKey();
|
||||
}).then();
|
||||
}
|
||||
|
||||
checkVersion().then((remoteVersion: string) => {
|
||||
const localVersion = require('./package.json').version;
|
||||
const localVersionList = localVersion.split('.');
|
||||
@@ -28,7 +25,7 @@ checkVersion().then((remoteVersion: string) => {
|
||||
log('[NapCat] 当前版本:', localVersion);
|
||||
for (const k of [0, 1, 2]) {
|
||||
if (parseInt(remoteVersionList[k]) > parseInt(localVersionList[k])) {
|
||||
console.log('[NapCat] 检测到更新,请前往 https://github.com/NapNeko/NapCatQQ 下载 NapCatQQ V', remoteVersion);
|
||||
console.log(`[NapCat] 检测到更新,请前往 https://github.com/NapNeko/NapCatQQ 下载 NapCatQQ V ${remoteVersion}`);
|
||||
return;
|
||||
} else if (parseInt(remoteVersionList[k]) < parseInt(localVersionList[k])) {
|
||||
break;
|
||||
@@ -40,16 +37,19 @@ checkVersion().then((remoteVersion: string) => {
|
||||
logError('[NapCat] 检测更新失败');
|
||||
});
|
||||
new NapCatOnebot11();
|
||||
napCatCore.onLoginSuccess(() => {
|
||||
napCatCore.onLoginSuccess((uin, uid) => {
|
||||
console.log('登录成功!');
|
||||
WebUiDataRuntime.setQQLoginStatus(true);
|
||||
WebUiDataRuntime.setQQLoginUin(uin.toString());
|
||||
postLoginStatus();
|
||||
});
|
||||
const showQRCode = (qrCodeData: { url: string, base64: string, buffer: Buffer }) => {
|
||||
const showQRCode = async (url: string, base64: string, buffer: Buffer) => {
|
||||
await WebUiDataRuntime.setQQLoginQrcodeURL(url);
|
||||
console.log('请扫描下面的二维码,然后在手Q上授权登录:');
|
||||
const qrcodePath = path.join(__dirname, 'qrcode.png');
|
||||
qrcode.generate(qrCodeData.url, { small: true }, (res) => {
|
||||
console.log(`${res}\n二维码解码URL: ${qrCodeData.url}\n如果控制台二维码无法扫码,可以复制解码url到二维码生成网站生成二维码再扫码,也可以打开下方的二维码路径图片进行扫码`);
|
||||
fs.writeFile(qrcodePath, qrCodeData.buffer).then(() => {
|
||||
qrcode.generate(url, { small: true }, (res) => {
|
||||
console.log(`${res}\n二维码解码URL: ${url}\n如果控制台二维码无法扫码,可以复制解码url到二维码生成网站生成二维码再扫码,也可以打开下方的二维码路径图片进行扫码`);
|
||||
fs.writeFile(qrcodePath, buffer).then(() => {
|
||||
console.log('二维码已保存到', qrcodePath);
|
||||
});
|
||||
});
|
||||
@@ -59,19 +59,45 @@ const quickLoginQQ = cmdOptions.qq;
|
||||
// console.error('登录失败', result);
|
||||
// napCatCore.qrLogin().then().catch(console.error);
|
||||
// });
|
||||
napCatCore.getQuickLoginList().then((res) => {
|
||||
// 遍历 res.LocalLoginInfoList[x].isQuickLogin是否可以可以 res.LocalLoginInfoList[x].uin 转为string 加入string[] 最后遍历完成调用WebUiDataRuntime.setQQQuickLoginList
|
||||
WebUiDataRuntime.setQQQuickLoginList(res.LocalLoginInfoList.filter((item) => item.isQuickLogin).map((item) => item.uin.toString()));
|
||||
});
|
||||
|
||||
WebUiDataRuntime.setQQQuickLogin(async (uin: string) => {
|
||||
const QuickLogin: Promise<{ result: boolean, message: string }> = new Promise((resolve, reject) => {
|
||||
if (quickLoginQQ) {
|
||||
log('正在快速登录 ', quickLoginQQ);
|
||||
napCatCore.quickLogin(quickLoginQQ).then(res => {
|
||||
if (res.loginErrorInfo.errMsg) {
|
||||
resolve({ result: false, message: res.loginErrorInfo.errMsg });
|
||||
}
|
||||
resolve({ result: true, message: '' });
|
||||
}).catch((e) => {
|
||||
console.error(e);
|
||||
resolve({ result: false, message: '快速登录发生错误' });
|
||||
});
|
||||
} else {
|
||||
resolve({ result: false, message: '快速登录失败' });
|
||||
}
|
||||
});
|
||||
const result = await QuickLogin;
|
||||
return result;
|
||||
});
|
||||
|
||||
if (quickLoginQQ) {
|
||||
log('正在快速登录 ', quickLoginQQ);
|
||||
napCatCore.quickLogin(quickLoginQQ).then(res=>{
|
||||
if (res.loginErrorInfo.errMsg){
|
||||
napCatCore.quickLogin(quickLoginQQ).then(res => {
|
||||
if (res.loginErrorInfo.errMsg) {
|
||||
logError('快速登录错误:', res.loginErrorInfo.errMsg);
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.error(e);
|
||||
napCatCore.qrLogin().then(showQRCode);
|
||||
napCatCore.qrLogin(showQRCode);
|
||||
});
|
||||
} else {
|
||||
log('没有 -q 参数指定快速登录的QQ,将使用二维码登录方式');
|
||||
napCatCore.qrLogin().then(showQRCode);
|
||||
napCatCore.qrLogin(showQRCode);
|
||||
}
|
||||
|
||||
// napCatCore.login.service.getLoginList().then((res) => {
|
||||
|
14
src/onebot11/action/extends/GetFriendWithCategory.ts
Normal file
14
src/onebot11/action/extends/GetFriendWithCategory.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { OB11User } from '../../types';
|
||||
import { OB11Constructor } from '../../constructor';
|
||||
import { rawFriends, friends } from '@/core/data';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
import { BuddyCategoryType } from '@/core/entities/';
|
||||
|
||||
export class GetFriendWithCategory extends BaseAction<void, Array<BuddyCategoryType>> {
|
||||
actionName = ActionName.GetFriendsWithCategory;
|
||||
|
||||
protected async _handle(payload: void) {
|
||||
return rawFriends;
|
||||
}
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
import { OB11GroupMember } from '../../types';
|
||||
import { getGroup, getGroupMember } from '@/core/data';
|
||||
import { getGroup, getGroupMember, groupMembers } from '@/core/data';
|
||||
import { OB11Constructor } from '../../constructor';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
@@ -7,11 +7,13 @@ import { NTQQUserApi } from '@/core/apis/user';
|
||||
import { log, logDebug } from '@/common/utils/log';
|
||||
import { isNull } from '../../../common/utils/helper';
|
||||
import { WebApi } from '@/core/apis/webapi';
|
||||
import { NTQQGroupApi } from '@/core';
|
||||
|
||||
|
||||
export interface PayloadType {
|
||||
group_id: number;
|
||||
user_id: number;
|
||||
no_cache?: boolean | string;
|
||||
}
|
||||
|
||||
class GetGroupMemberInfo extends BaseAction<PayloadType, OB11GroupMember> {
|
||||
@@ -22,7 +24,10 @@ class GetGroupMemberInfo extends BaseAction<PayloadType, OB11GroupMember> {
|
||||
if (!group) {
|
||||
throw (`群(${payload.group_id})不存在`);
|
||||
}
|
||||
const WebGroupMember = await WebApi.getGroupMembers(payload.group_id.toString());
|
||||
const webGroupMembers = await WebApi.getGroupMembers(payload.group_id.toString());
|
||||
if (payload.no_cache == true || payload.no_cache === 'true') {
|
||||
groupMembers.set(group.groupCode, await NTQQGroupApi.getGroupMembers(payload.group_id.toString()));
|
||||
}
|
||||
const member = await getGroupMember(payload.group_id.toString(), payload.user_id.toString());
|
||||
// log(member);
|
||||
if (member) {
|
||||
@@ -35,12 +40,12 @@ class GetGroupMemberInfo extends BaseAction<PayloadType, OB11GroupMember> {
|
||||
logDebug('获取群成员详细信息失败, 只能返回基础信息', e);
|
||||
}
|
||||
const retMember = OB11Constructor.groupMember(payload.group_id.toString(), member);
|
||||
for (let i = 0, len = WebGroupMember.length; i < len; i++) {
|
||||
if (WebGroupMember[i]?.uin && WebGroupMember[i].uin === retMember.user_id) {
|
||||
retMember.join_time = WebGroupMember[i]?.join_time;
|
||||
retMember.last_sent_time = WebGroupMember[i]?.last_speak_time;
|
||||
retMember.qage = WebGroupMember[i]?.qage;
|
||||
retMember.level = WebGroupMember[i]?.lv.level;
|
||||
for (let i = 0, len = webGroupMembers.length; i < len; i++) {
|
||||
if (webGroupMembers[i]?.uin && webGroupMembers[i].uin === retMember.user_id) {
|
||||
retMember.join_time = webGroupMembers[i]?.join_time;
|
||||
retMember.last_sent_time = webGroupMembers[i]?.last_speak_time;
|
||||
retMember.qage = webGroupMembers[i]?.qage;
|
||||
retMember.level = webGroupMembers[i]?.lv.level;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -18,13 +18,13 @@ class GetGroupMemberList extends BaseAction<PayloadType, OB11GroupMember[]> {
|
||||
|
||||
protected async _handle(payload: PayloadType) {
|
||||
const MemberMap: Map<number, OB11GroupMember> = new Map<number, OB11GroupMember>();
|
||||
const WebGroupMember = await WebApi.getGroupMembers(payload.group_id.toString());
|
||||
// await NTQQGroupApi.getGroupMembers(payload.group_id.toString());
|
||||
const webGroupMembers = await WebApi.getGroupMembers(payload.group_id.toString());
|
||||
const group = await getGroup(payload.group_id.toString());
|
||||
if (!group) {
|
||||
throw (`群${payload.group_id}不存在`);
|
||||
}
|
||||
if (payload.no_cache || payload.no_cache === 'true') {
|
||||
if (payload.no_cache == true || payload.no_cache === 'true') {
|
||||
// webGroupMembers = await WebApi.getGroupMembers(payload.group_id.toString());
|
||||
const _groupMembers = await NTQQGroupApi.getGroupMembers(payload.group_id.toString());
|
||||
groupMembers.set(group.groupCode, _groupMembers);
|
||||
}
|
||||
@@ -35,17 +35,17 @@ class GetGroupMemberList extends BaseAction<PayloadType, OB11GroupMember[]> {
|
||||
MemberMap.set(_groupMembers[i].user_id, _groupMembers[i]);
|
||||
}
|
||||
// 合并数据
|
||||
for (let i = 0, len = WebGroupMember.length; i < len; i++) {
|
||||
if (!WebGroupMember[i]?.uin) {
|
||||
for (let i = 0, len = webGroupMembers.length; i < len; i++) {
|
||||
if (!webGroupMembers[i]?.uin) {
|
||||
continue;
|
||||
}
|
||||
const MemberData = MemberMap.get(WebGroupMember[i]?.uin);
|
||||
const MemberData = MemberMap.get(webGroupMembers[i]?.uin);
|
||||
if (MemberData) {
|
||||
MemberData.join_time = WebGroupMember[i]?.join_time;
|
||||
MemberData.last_sent_time = WebGroupMember[i]?.last_speak_time;
|
||||
MemberData.qage = WebGroupMember[i]?.qage;
|
||||
MemberData.level = WebGroupMember[i]?.lv.level;
|
||||
MemberMap.set(WebGroupMember[i]?.uin, MemberData);
|
||||
MemberData.join_time = webGroupMembers[i]?.join_time;
|
||||
MemberData.last_sent_time = webGroupMembers[i]?.last_speak_time;
|
||||
MemberData.qage = webGroupMembers[i]?.qage;
|
||||
MemberData.level = webGroupMembers[i]?.lv.level;
|
||||
MemberMap.set(webGroupMembers[i]?.uin, MemberData);
|
||||
}
|
||||
}
|
||||
// 还原Map到Array
|
||||
|
@@ -52,6 +52,7 @@ import { SetOnlineStatus } from './extends/SetOnlineStatus';
|
||||
import { GetGroupNotice } from './group/GetGroupNotice';
|
||||
import { GetGroupEssence } from './group/GetGroupEssence';
|
||||
import { ForwardFriendSingleMsg, ForwardGroupSingleMsg } from '@/onebot11/action/msg/ForwardSingleMsg';
|
||||
import { GetFriendWithCategory } from './extends/GetFriendWithCategory';
|
||||
|
||||
export const actionHandlers = [
|
||||
new GetFile(),
|
||||
@@ -94,6 +95,7 @@ export const actionHandlers = [
|
||||
//
|
||||
new SetOnlineStatus(),
|
||||
new GetRobotUinRange(),
|
||||
new GetFriendWithCategory(),
|
||||
//以下为go-cqhttp api
|
||||
new GetGroupNotice(),
|
||||
new GetGroupEssence(),
|
||||
|
@@ -314,14 +314,18 @@ export async function createSendElements(messageData: OB11MessageData[], group:
|
||||
break;
|
||||
}
|
||||
}
|
||||
const musicMsgElement = await genMusicElement(sendMsg.data);
|
||||
const postData = { ...sendMsg.data } as IdMusicSignPostData | CustomMusicSignPostData;
|
||||
if (sendMsg.data.type === 'custom' && sendMsg.data.content) {
|
||||
(postData as CustomMusicSignPostData).singer = sendMsg.data.content;
|
||||
delete (postData as OB11MessageCustomMusic['data']).content;
|
||||
}
|
||||
const musicMsgElement = await genMusicElement(postData);
|
||||
logDebug('生成音乐消息', musicMsgElement);
|
||||
if (musicMsgElement) {
|
||||
sendElements.push(musicMsgElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return {
|
||||
|
@@ -57,8 +57,9 @@ export enum ActionName {
|
||||
// 以下为扩展napcat扩展
|
||||
GetRobotUinRange = 'get_robot_uin_range',
|
||||
SetOnlineStatus = 'set_online_status',
|
||||
GetFriendsWithCategory = 'get_friends_with_category',
|
||||
// 以下为go-cqhttp api
|
||||
GoCQHTTP_GetEssenceMsg='get_essence_msg_list',
|
||||
GoCQHTTP_GetEssenceMsg = 'get_essence_msg_list',
|
||||
GoCQHTTP_SetGroupNotice = '_send_group_notice',
|
||||
GoCQHTTP_GetGroupNotice = '_get_group_notice',
|
||||
GoCQHTTP_SendForwardMsg = 'send_forward_msg',
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { OB11User } from '../../types';
|
||||
import { OB11Constructor } from '../../constructor';
|
||||
import { friends } from '@/core/data';
|
||||
import { friends, selfInfo } from '@/core/data';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
import { NTQQUserApi } from '@/core/apis';
|
||||
@@ -44,7 +44,7 @@ export class GetCookies extends BaseAction<Payload, Response> {
|
||||
if (!_PSkey || !_Skey) {
|
||||
throw new Error('获取Cookies失败');
|
||||
}
|
||||
const cookies = `pskey=${_PSkey}; skey=${_Skey}`;
|
||||
const cookies = `p_skey=${_PSkey}; skey=${_Skey}; p_uin=o${selfInfo.uin}`;
|
||||
return {
|
||||
cookies
|
||||
};
|
||||
|
@@ -54,6 +54,7 @@ export class OB11Constructor {
|
||||
user_id: parseInt(msg.senderUin!),
|
||||
time: parseInt(msg.msgTime) || Date.now(),
|
||||
message_id: msg.id!,
|
||||
message_seq: msg.id!,
|
||||
real_id: msg.id!,
|
||||
message_type: msg.chatType == ChatType.group ? 'group' : 'private',
|
||||
sender: {
|
||||
@@ -91,7 +92,6 @@ export class OB11Constructor {
|
||||
resMsg.group_id = parseInt(tempGroupCode);
|
||||
}
|
||||
}
|
||||
|
||||
for (const element of msg.elements) {
|
||||
const message_data: OB11MessageData | any = {
|
||||
data: {},
|
||||
@@ -151,10 +151,11 @@ export class OB11Constructor {
|
||||
// let currentRKey = "CAQSKAB6JWENi5LMk0kc62l8Pm3Jn1dsLZHyRLAnNmHGoZ3y_gDZPqZt-64"
|
||||
|
||||
try {
|
||||
message_data['data']['url'] = await NTQQFileApi.getImageUrl(msg);
|
||||
message_data['data']['url'] = await NTQQFileApi.getImageUrl(element.picElement, msg.chatType !== ChatType.group);
|
||||
} catch (e: any) {
|
||||
logError('获取图片url失败', e.stack);
|
||||
}
|
||||
//console.log(message_data['data']['url'])
|
||||
// message_data["data"]["file_id"] = element.picElement.fileUuid
|
||||
message_data['data']['file_size'] = element.picElement.fileSize;
|
||||
dbUtil.addFileCache({
|
||||
|
@@ -15,7 +15,7 @@ import { ob11Config } from '@/onebot11/config';
|
||||
import { httpHeart, ob11HTTPServer } from '@/onebot11/server/http';
|
||||
import { ob11WebsocketServer } from '@/onebot11/server/ws/WebsocketServer';
|
||||
import { ob11ReverseWebsockets } from '@/onebot11/server/ws/ReverseWebsocket';
|
||||
import { friendRequests, getFriend, getGroup, getGroupMember, groupNotifies, selfInfo } from '@/core/data';
|
||||
import { friendRequests, getFriend, getGroup, getGroupMember, groupNotifies, selfInfo, uid2UinMap } from '@/core/data';
|
||||
import { dbUtil } from '@/core/utils/db';
|
||||
import { BuddyListener, GroupListener, NodeIKernelBuddyListener } from '../core/src/listeners';
|
||||
import { OB11FriendRequestEvent } from '@/onebot11/event/request/OB11FriendRequest';
|
||||
@@ -62,7 +62,7 @@ export class NapCatOnebot11 {
|
||||
if (ob11Config.enableWsReverse) {
|
||||
ob11ReverseWebsockets.start();
|
||||
}
|
||||
if (ob11Config.enableHttpHeart){
|
||||
if (ob11Config.enableHttpHeart) {
|
||||
// 启动http心跳
|
||||
httpHeart.start();
|
||||
}
|
||||
@@ -86,7 +86,8 @@ export class NapCatOnebot11 {
|
||||
// console.log('ob11 onRecvMsg', JSON.stringify(msg, null, 2));
|
||||
logDebug('收到消息', msg);
|
||||
for (const m of msg) {
|
||||
if (this.bootTime > parseInt(m.msgTime)) {
|
||||
// try: 减掉3s 试图修复消息半天收不到
|
||||
if (this.bootTime - 3> parseInt(m.msgTime)) {
|
||||
logDebug(`消息时间${m.msgTime}早于启动时间${this.bootTime},忽略上报`);
|
||||
continue;
|
||||
}
|
||||
@@ -126,8 +127,18 @@ export class NapCatOnebot11 {
|
||||
|
||||
// GroupListener
|
||||
const groupListener = new GroupListener();
|
||||
groupListener.onGroupNotifiesUpdated = (doubt, notifies) => {
|
||||
// console.log('ob11 onGroupNotifiesUpdated', notifies);
|
||||
groupListener.onGroupNotifiesUpdated = async (doubt, notifies) => {
|
||||
for (let i = 0; i < notifies.length; i++) {
|
||||
if (notifies[i].user1.uid && notifies[i].user1.uid.startsWith('u_')) {
|
||||
let UserInfo_User1 = await NTQQUserApi.getUserDetailInfo(notifies[i].user1.uid);
|
||||
uid2UinMap[UserInfo_User1.uid] = UserInfo_User1.uin;
|
||||
}
|
||||
if (notifies[i].user2.uid && notifies[i].user2.uid.startsWith('u_')) {
|
||||
let UserInfo_User2 = await NTQQUserApi.getUserDetailInfo(notifies[i].user2.uid);
|
||||
uid2UinMap[UserInfo_User2.uid] = UserInfo_User2.uin;
|
||||
}
|
||||
}
|
||||
//console.log('ob11 onGroupNotifiesUpdated', notifies[0]);
|
||||
this.postGroupNotifies(notifies).then().catch(e => logError('postGroupNotifies error: ', e));
|
||||
};
|
||||
groupListener.onJoinGroupNotify = (...notify) => {
|
||||
@@ -181,8 +192,8 @@ export class NapCatOnebot11 {
|
||||
postOB11Event(groupEvent);
|
||||
}
|
||||
}).catch(e => logError('constructGroupEvent error: ', e));
|
||||
OB11Constructor.FriendAddEvent(message).then(friendAddEvent=>{
|
||||
if(friendAddEvent){
|
||||
OB11Constructor.FriendAddEvent(message).then(friendAddEvent => {
|
||||
if (friendAddEvent) {
|
||||
postOB11Event(friendAddEvent);
|
||||
}
|
||||
}).catch(e => logError('constructFriendAddEvent error: ', e));
|
||||
|
@@ -57,7 +57,7 @@ export class ReverseWebsocket {
|
||||
}
|
||||
|
||||
public onclose = () => {
|
||||
logDebug('反向ws断开', this.url);
|
||||
logError('反向ws断开', this.url);
|
||||
unregisterWsEventSender(this.websocket!);
|
||||
if (this.running) {
|
||||
this.reconnect();
|
||||
|
@@ -77,6 +77,7 @@ export interface OB11Message {
|
||||
self_id?: number,
|
||||
time: number,
|
||||
message_id: number,
|
||||
message_seq: number, // 和message_id一样
|
||||
real_id: number,
|
||||
user_id: number,
|
||||
group_id?: number,
|
||||
@@ -211,7 +212,7 @@ export interface OB11MessageIdMusic {
|
||||
}
|
||||
export interface OB11MessageCustomMusic {
|
||||
type: OB11MessageDataType.music
|
||||
data: CustomMusicSignPostData
|
||||
data: Omit<CustomMusicSignPostData, 'singer'> & { content?: string }
|
||||
}
|
||||
|
||||
export interface OB11MessageJson {
|
||||
|
@@ -1 +1 @@
|
||||
export const version = '1.2.0';
|
||||
export const version = '1.3.2';
|
||||
|
@@ -1,52 +0,0 @@
|
||||
import http from 'http';
|
||||
|
||||
const privateRkey = '';
|
||||
function logDebug(...args) {
|
||||
console.log(...args);
|
||||
}
|
||||
|
||||
const checkUrl = new Promise((resolve, reject) => {
|
||||
const uri = new URL('https://gchat.qpic.cn/download?appid=1407&fileid=CgkzNzk0NTAzMjYSFECDMhodswV7nH5Npuf2O8dstvL1GNaGEiD_CijQycnZsuaFA1CAvaMB&spec=0&rkey=CAESKE4_cASDm1t1mbnPfSzEvPzS-iYGLyXhjXjTRIhOHeSVDKkPp6Luaao');
|
||||
const options = {
|
||||
method: 'GET',
|
||||
host: uri.host,
|
||||
path: uri.pathname + uri.search,
|
||||
headers: {
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36',
|
||||
'Accept': '*/*',
|
||||
'Range': 'bytes=0-0'
|
||||
}
|
||||
};
|
||||
const req = http.request(options, (res) => {
|
||||
logDebug(`Check rkey status: ${res.statusCode}`);
|
||||
logDebug(`Check rkey headers: ${JSON.stringify(res.headers)}`);
|
||||
if (res.statusCode == 200 || res.statusCode === 206) {
|
||||
// console.log('The image URL is accessible.');
|
||||
resolve('ok');
|
||||
} else {
|
||||
reject('The image URL is not accessible.');
|
||||
}
|
||||
});
|
||||
|
||||
req.setTimeout(3000, () => {
|
||||
req.destroy();
|
||||
reject('Check rkey request timed out');
|
||||
});
|
||||
|
||||
req.on('error', (e) => {
|
||||
console.error(`Problem with rkey request: ${e.message}`);
|
||||
// reject(e.message);
|
||||
});
|
||||
req.end();
|
||||
});
|
||||
|
||||
const startTime = Date.now();
|
||||
checkUrl.then((result) => {
|
||||
const endTime = Date.now();
|
||||
console.log(result);
|
||||
console.log(`Time elapsed: ${endTime - startTime}ms`);
|
||||
}).catch((error) => {
|
||||
const endTime = Date.now();
|
||||
console.error(error);
|
||||
console.log(`Time elapsed: ${endTime - startTime}ms`);
|
||||
});
|
2
src/webui/Readme.md
Normal file
2
src/webui/Readme.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# The Path of NapCatQQ
|
||||
Tiny WebUi for NapCatQQ
|
31
src/webui/index.ts
Normal file
31
src/webui/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import express from 'express';
|
||||
import { NextFunction, Request, Response } from 'express';
|
||||
import { AuthHelper } from './src/helper/SignToken';
|
||||
import { resolve } from 'node:path';
|
||||
import { ALLRouter } from './src/router';
|
||||
import { WebUiConfig } from './src/helper/config';
|
||||
const app = express();
|
||||
/**
|
||||
* 初始化并启动WebUI服务。
|
||||
* 该函数配置了Express服务器以支持JSON解析和静态文件服务,并监听6099端口。
|
||||
* 无需参数。
|
||||
* @returns {Promise<void>} 无返回值。
|
||||
*/
|
||||
export async function InitWebUi() {
|
||||
let config = await WebUiConfig.GetWebUIConfig();
|
||||
app.use(express.json());
|
||||
// 初始服务
|
||||
app.all('/', (_req, res) => {
|
||||
res.json({
|
||||
msg: 'NapCat WebAPI is now running!',
|
||||
});
|
||||
});
|
||||
// 配置静态文件服务,提供./static目录下的文件服务,访问路径为/webui
|
||||
app.use('/webui', express.static(resolve(__dirname, './static')));
|
||||
//挂载API接口
|
||||
app.use('/api', ALLRouter);
|
||||
app.listen(config.port, async () => {
|
||||
console.log(`[NapCat] [WebUi] Current WebUi is running at IP:${config.port}`);
|
||||
})
|
||||
|
||||
}
|
68
src/webui/src/api/Auth.ts
Normal file
68
src/webui/src/api/Auth.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
import { RequestHandler } from "express";
|
||||
import { AuthHelper } from "../helper/SignToken";
|
||||
import { WebUiConfig } from "../helper/config";
|
||||
import { WebUiDataRuntime } from "../helper/Data";
|
||||
const isEmpty = (data: any) => data === undefined || data === null || data === '';
|
||||
export const LoginHandler: RequestHandler = async (req, res) => {
|
||||
let WebUiConfigData = await WebUiConfig.GetWebUIConfig();
|
||||
const { token } = req.body;
|
||||
if (isEmpty(token)) {
|
||||
res.json({
|
||||
code: -1,
|
||||
message: 'token is empty'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!await WebUiDataRuntime.checkLoginRate(WebUiConfigData.loginRate)) {
|
||||
res.json({
|
||||
code: -1,
|
||||
message: 'login rate limit'
|
||||
});
|
||||
return;
|
||||
}
|
||||
//验证config.token是否等于token
|
||||
if (WebUiConfigData.token !== token) {
|
||||
res.json({
|
||||
code: -1,
|
||||
message: 'token is invalid'
|
||||
});
|
||||
return;
|
||||
}
|
||||
let signCredential = Buffer.from(JSON.stringify(await AuthHelper.signCredential(WebUiConfigData.token))).toString('base64');
|
||||
res.json({
|
||||
code: 0,
|
||||
message: 'success',
|
||||
data: {
|
||||
"Credential": signCredential
|
||||
}
|
||||
});
|
||||
return;
|
||||
};
|
||||
export const LogoutHandler: RequestHandler = (req, res) => {
|
||||
// 这玩意无状态销毁个灯 得想想办法
|
||||
res.json({
|
||||
code: 0,
|
||||
message: 'success'
|
||||
});
|
||||
return;
|
||||
};
|
||||
export const checkHandler: RequestHandler = async (req, res) => {
|
||||
let WebUiConfigData = await WebUiConfig.GetWebUIConfig();
|
||||
const authorization = req.headers.authorization;
|
||||
try {
|
||||
let CredentialBase64:string = authorization?.split(' ')[1] as string;
|
||||
let Credential = JSON.parse(Buffer.from(CredentialBase64, 'base64').toString());
|
||||
await AuthHelper.validateCredentialWithinOneHour(WebUiConfigData.token,Credential)
|
||||
res.json({
|
||||
code: 0,
|
||||
message: 'success'
|
||||
});
|
||||
return;
|
||||
} catch (e) {
|
||||
res.json({
|
||||
code: -1,
|
||||
message: 'failed'
|
||||
});
|
||||
}
|
||||
return;
|
||||
};
|
48
src/webui/src/api/LogConsole.ts
Normal file
48
src/webui/src/api/LogConsole.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import { RequestHandler } from "express";
|
||||
import { resolve } from "path";
|
||||
import { readdir, stat } from "fs/promises";
|
||||
import { existsSync } from "fs";
|
||||
export const GetLogFileListHandler: RequestHandler = async (req, res) => {
|
||||
try {
|
||||
let LogsPath = resolve(__dirname, "./logs/");
|
||||
let LogFiles = await readdir(LogsPath);
|
||||
res.json({
|
||||
code: 0,
|
||||
data: LogFiles
|
||||
});
|
||||
} catch (error) {
|
||||
res.json({ code: -1, msg: "Failed to retrieve log file list." });
|
||||
}
|
||||
};
|
||||
|
||||
export const GetLogFileHandler: RequestHandler = async (req, res) => {
|
||||
let LogsPath = resolve(__dirname, "./logs/");
|
||||
let LogFile = req.query.file as string;
|
||||
|
||||
if (!isValidFileName(LogFile)) {
|
||||
res.json({ code: -1, msg: "LogFile is not safe" });
|
||||
return;
|
||||
}
|
||||
|
||||
let filePath = `${LogsPath}/${LogFile}`;
|
||||
if (!existsSync(filePath)) {
|
||||
res.status(404).json({ code: -1, msg: "LogFile does not exist" });
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
let fileStats = await stat(filePath);
|
||||
if (!fileStats.isFile()) {
|
||||
res.json({ code: -1, msg: "LogFile must be a file" });
|
||||
return;
|
||||
}
|
||||
|
||||
res.sendFile(filePath);
|
||||
} catch (error) {
|
||||
res.json({ code: -1, msg: "Failed to send log file." });
|
||||
}
|
||||
};
|
||||
export function isValidFileName(fileName: string): boolean {
|
||||
const invalidChars = /[\.\:\*\?\"\<\>\|\/\\]/;
|
||||
return !invalidChars.test(fileName);
|
||||
}
|
70
src/webui/src/api/OB11Config.ts
Normal file
70
src/webui/src/api/OB11Config.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
import { RequestHandler } from "express";
|
||||
import { WebUiDataRuntime } from "../helper/Data";
|
||||
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
||||
import { resolve } from "node:path";
|
||||
import { OB11Config } from "@/webui/ui/components/WebUiApiOB11Config";
|
||||
const isEmpty = (data: any) => data === undefined || data === null || data === '';
|
||||
export const OB11GetConfigHandler: RequestHandler = async (req, res) => {
|
||||
let isLogin = await WebUiDataRuntime.getQQLoginStatus();
|
||||
if (!isLogin) {
|
||||
res.send({
|
||||
code: -1,
|
||||
message: 'Not Login'
|
||||
});
|
||||
return;
|
||||
}
|
||||
const uin = await WebUiDataRuntime.getQQLoginUin();
|
||||
let configFilePath = resolve(__dirname, `./config/onebot11_${uin}.json`);
|
||||
//console.log(configFilePath);
|
||||
let data: OB11Config;
|
||||
try {
|
||||
data = JSON.parse(existsSync(configFilePath) ? readFileSync(configFilePath).toString() : readFileSync(resolve(__dirname, `./config/onebot11.json`)).toString());
|
||||
}
|
||||
catch (e) {
|
||||
data = {} as OB11Config;
|
||||
res.send({
|
||||
code: -1,
|
||||
message: 'Config Get Error'
|
||||
});
|
||||
return;
|
||||
}
|
||||
res.send({
|
||||
code: 0,
|
||||
message: 'success',
|
||||
data: data
|
||||
});
|
||||
return;
|
||||
}
|
||||
export const OB11SetConfigHandler: RequestHandler = async (req, res) => {
|
||||
let isLogin = await WebUiDataRuntime.getQQLoginStatus();
|
||||
if (!isLogin) {
|
||||
res.send({
|
||||
code: -1,
|
||||
message: 'Not Login'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (isEmpty(req.body.config)) {
|
||||
res.send({
|
||||
code: -1,
|
||||
message: 'config is empty'
|
||||
});
|
||||
return;
|
||||
}
|
||||
let configFilePath = resolve(__dirname, `./config/onebot11_${await WebUiDataRuntime.getQQLoginUin()}.json`);
|
||||
try {
|
||||
JSON.parse(req.body.config)
|
||||
readFileSync(configFilePath);
|
||||
}
|
||||
catch (e) {
|
||||
//console.log(e);
|
||||
configFilePath = resolve(__dirname, `./config/onebot11.json`);
|
||||
}
|
||||
//console.log(configFilePath,JSON.parse(req.body.config));
|
||||
writeFileSync(configFilePath, JSON.stringify(JSON.parse(req.body.config), null, 4));
|
||||
res.send({
|
||||
code: 0,
|
||||
message: 'success'
|
||||
});
|
||||
return;
|
||||
}
|
77
src/webui/src/api/QQLogin.ts
Normal file
77
src/webui/src/api/QQLogin.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
import { RequestHandler } from "express";
|
||||
import { WebUiDataRuntime } from "../helper/Data";
|
||||
import { sleep } from "@/common/utils/helper";
|
||||
const isEmpty = (data: any) => data === undefined || data === null || data === '';
|
||||
export const QQGetQRcodeHandler: RequestHandler = async (req, res) => {
|
||||
if (await WebUiDataRuntime.getQQLoginStatus()) {
|
||||
res.send({
|
||||
code: -1,
|
||||
message: 'QQ Is Logined'
|
||||
});
|
||||
return;
|
||||
}
|
||||
let qrcodeUrl = await WebUiDataRuntime.getQQLoginQrcodeURL();
|
||||
if (isEmpty(qrcodeUrl)) {
|
||||
res.send({
|
||||
code: -1,
|
||||
message: 'QRCode Get Error'
|
||||
});
|
||||
return;
|
||||
}
|
||||
res.send({
|
||||
code: 0,
|
||||
message: 'success',
|
||||
data: {
|
||||
qrcode: qrcodeUrl
|
||||
}
|
||||
});
|
||||
return;
|
||||
};
|
||||
export const QQCheckLoginStatusHandler: RequestHandler = async (req, res) => {
|
||||
res.send({
|
||||
code: 0,
|
||||
message: 'success',
|
||||
data: {
|
||||
isLogin: await WebUiDataRuntime.getQQLoginStatus()
|
||||
}
|
||||
});
|
||||
};
|
||||
export const QQSetQuickLoginHandler: RequestHandler = async (req, res) => {
|
||||
let { uin } = req.body;
|
||||
let isLogin = await WebUiDataRuntime.getQQLoginStatus();
|
||||
if (isLogin) {
|
||||
res.send({
|
||||
code: -1,
|
||||
message: 'QQ Is Logined'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (isEmpty(uin)) {
|
||||
res.send({
|
||||
code: -1,
|
||||
message: 'uin is empty'
|
||||
});
|
||||
return;
|
||||
}
|
||||
const { result, message } = await WebUiDataRuntime.getQQQuickLogin(uin);
|
||||
if (!result) {
|
||||
res.send({
|
||||
code: -1,
|
||||
message: message
|
||||
});
|
||||
return;
|
||||
}
|
||||
//本来应该验证 但是http不宜这么搞 建议前端验证
|
||||
//isLogin = await WebUiDataRuntime.getQQLoginStatus();
|
||||
res.send({
|
||||
code: 0,
|
||||
message: 'success'
|
||||
});
|
||||
}
|
||||
export const QQGetQuickLoginListHandler: RequestHandler = async (req, res) => {
|
||||
const quickLoginList = await WebUiDataRuntime.getQQQuickLoginList();
|
||||
res.send({
|
||||
code: 0,
|
||||
data: quickLoginList
|
||||
});
|
||||
}
|
73
src/webui/src/helper/Data.ts
Normal file
73
src/webui/src/helper/Data.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
interface LoginRuntimeType {
|
||||
LoginCurrentTime: number;
|
||||
LoginCurrentRate: number;
|
||||
QQLoginStatus: boolean;
|
||||
QQQRCodeURL: string;
|
||||
QQLoginUin: string;
|
||||
NapCatHelper: {
|
||||
CoreQuickLogin: (uin: string) => Promise<{ result: boolean, message: string }>;
|
||||
QQLoginList: string[]
|
||||
}
|
||||
}
|
||||
let LoginRuntime: LoginRuntimeType = {
|
||||
LoginCurrentTime: Date.now(),
|
||||
LoginCurrentRate: 0,
|
||||
QQLoginStatus: false, //已实现 但太傻了 得去那边注册个回调刷新
|
||||
QQQRCodeURL: "",
|
||||
QQLoginUin: "",
|
||||
NapCatHelper: {
|
||||
CoreQuickLogin: async (uin: string) => { return { result: false, message: '' }; },
|
||||
QQLoginList: []
|
||||
}
|
||||
}
|
||||
export const WebUiDataRuntime = {
|
||||
checkLoginRate: async function (RateLimit: number): Promise<boolean> {
|
||||
LoginRuntime.LoginCurrentRate++;
|
||||
//console.log(RateLimit, LoginRuntime.LoginCurrentRate, Date.now() - LoginRuntime.LoginCurrentTime);
|
||||
if (Date.now() - LoginRuntime.LoginCurrentTime > 1000 * 60) {
|
||||
LoginRuntime.LoginCurrentRate = 0;//超出时间重置限速
|
||||
LoginRuntime.LoginCurrentTime = Date.now();
|
||||
return true;
|
||||
}
|
||||
if (LoginRuntime.LoginCurrentRate <= RateLimit) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
,
|
||||
getQQLoginStatus: async function (): Promise<boolean> {
|
||||
return LoginRuntime.QQLoginStatus;
|
||||
}
|
||||
,
|
||||
setQQLoginStatus: async function (status: boolean): Promise<void> {
|
||||
LoginRuntime.QQLoginStatus = status;
|
||||
}
|
||||
,
|
||||
setQQLoginQrcodeURL: async function (url: string): Promise<void> {
|
||||
LoginRuntime.QQQRCodeURL = url;
|
||||
}
|
||||
,
|
||||
getQQLoginQrcodeURL: async function (): Promise<string> {
|
||||
return LoginRuntime.QQQRCodeURL;
|
||||
}
|
||||
,
|
||||
setQQLoginUin: async function (uin: string): Promise<void> {
|
||||
LoginRuntime.QQLoginUin = uin;
|
||||
}
|
||||
,
|
||||
getQQLoginUin: async function (): Promise<string> {
|
||||
return LoginRuntime.QQLoginUin;
|
||||
},
|
||||
getQQQuickLoginList: async function (): Promise<any[]> {
|
||||
return LoginRuntime.NapCatHelper.QQLoginList;
|
||||
},
|
||||
setQQQuickLoginList: async function (list: string[]): Promise<void> {
|
||||
LoginRuntime.NapCatHelper.QQLoginList = list;
|
||||
},
|
||||
setQQQuickLogin(func: (uin: string) => Promise<{ result: boolean, message: string }>): void {
|
||||
LoginRuntime.NapCatHelper.CoreQuickLogin = func;
|
||||
},
|
||||
getQQQuickLogin: async function (uin: string): Promise<{ result: boolean, message: string }> {
|
||||
return await LoginRuntime.NapCatHelper.CoreQuickLogin(uin);
|
||||
}
|
||||
}
|
68
src/webui/src/helper/SignToken.ts
Normal file
68
src/webui/src/helper/SignToken.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
import crypto from 'crypto';
|
||||
|
||||
interface WebUiCredentialInnerJson {
|
||||
CreatedTime: number;
|
||||
TokenEncoded: string;
|
||||
}
|
||||
|
||||
interface WebUiCredentialJson {
|
||||
Data: WebUiCredentialInnerJson;
|
||||
Hmac: string;
|
||||
}
|
||||
|
||||
export class AuthHelper {
|
||||
private static secretKey = Math.random().toString(36).slice(2);
|
||||
|
||||
/**
|
||||
* 签名凭证方法。
|
||||
* @param token 待签名的凭证字符串。
|
||||
* @returns 签名后的凭证对象。
|
||||
*/
|
||||
public static async signCredential(token: string): Promise<WebUiCredentialJson> {
|
||||
const innerJson: WebUiCredentialInnerJson = {
|
||||
CreatedTime: Date.now(),
|
||||
TokenEncoded: token,
|
||||
};
|
||||
const jsonString = JSON.stringify(innerJson);
|
||||
const hmac = crypto.createHmac('sha256', AuthHelper.secretKey)
|
||||
.update(jsonString, 'utf8')
|
||||
.digest('hex');
|
||||
return { Data: innerJson, Hmac: hmac };
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查凭证是否被篡改的方法。
|
||||
* @param credentialJson 凭证的JSON对象。
|
||||
* @returns 布尔值,表示凭证是否有效。
|
||||
*/
|
||||
public static async checkCredential(credentialJson: WebUiCredentialJson): Promise<boolean> {
|
||||
try {
|
||||
const jsonString = JSON.stringify(credentialJson.Data);
|
||||
const calculatedHmac = crypto.createHmac('sha256', AuthHelper.secretKey)
|
||||
.update(jsonString, 'utf8')
|
||||
.digest('hex');
|
||||
return calculatedHmac === credentialJson.Hmac;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证凭证在1小时内有效且token与原始token相同。
|
||||
* @param token 待验证的原始token。
|
||||
* @param credentialJson 已签名的凭证JSON对象。
|
||||
* @returns 布尔值,表示凭证是否有效且token匹配。
|
||||
*/
|
||||
public static async validateCredentialWithinOneHour(token: string, credentialJson: WebUiCredentialJson): Promise<boolean> {
|
||||
const isValid = await AuthHelper.checkCredential(credentialJson);
|
||||
if (!isValid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const currentTime = Date.now() / 1000;
|
||||
const createdTime = credentialJson.Data.CreatedTime;
|
||||
const timeDifference = currentTime - createdTime;
|
||||
|
||||
return timeDifference <= 3600 && credentialJson.Data.TokenEncoded === token;
|
||||
}
|
||||
}
|
80
src/webui/src/helper/config.ts
Normal file
80
src/webui/src/helper/config.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
||||
import { resolve } from "node:path";
|
||||
const net = require('net');
|
||||
|
||||
// 限制尝试端口的次数,避免死循环
|
||||
const MAX_PORT_TRY = 100;
|
||||
|
||||
async function tryUsePort(port: number, tryCount: number = 0): Promise<number> {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
let server = net.createServer();
|
||||
server.on('listening', () => {
|
||||
server.close();
|
||||
resolve(port);
|
||||
});
|
||||
|
||||
server.on('error', (err: any) => {
|
||||
if (err.code === 'EADDRINUSE') {
|
||||
if (tryCount < MAX_PORT_TRY) {
|
||||
// 使用循环代替递归
|
||||
resolve(tryUsePort(port + 1, tryCount + 1));
|
||||
} else {
|
||||
reject(`端口尝试失败,达到最大尝试次数: ${MAX_PORT_TRY}`);
|
||||
}
|
||||
} else {
|
||||
reject(`遇到错误: ${err.code}`);
|
||||
}
|
||||
});
|
||||
|
||||
// 尝试监听端口
|
||||
server.listen(port);
|
||||
} catch (error) {
|
||||
// 这里捕获到的错误应该是启动服务器时的同步错误
|
||||
reject(`服务器启动时发生错误: ${error}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export interface WebUiConfigType {
|
||||
port: number;
|
||||
token: string;
|
||||
loginRate: number
|
||||
}
|
||||
// 读取当前目录下名为 webui.json 的配置文件,如果不存在则创建初始化配置文件
|
||||
class WebUiConfigWrapper {
|
||||
WebUiConfigData: WebUiConfigType | undefined = undefined;
|
||||
async GetWebUIConfig(): Promise<WebUiConfigType> {
|
||||
if (this.WebUiConfigData) {
|
||||
return this.WebUiConfigData;
|
||||
}
|
||||
try {
|
||||
let configPath = resolve(__dirname, "./config/webui.json");
|
||||
let config: WebUiConfigType = {
|
||||
port: 6099,
|
||||
token: Math.random().toString(36).slice(2),//生成随机密码
|
||||
loginRate: 3
|
||||
};
|
||||
|
||||
if (!existsSync(configPath)) {
|
||||
writeFileSync(configPath, JSON.stringify(config, null, 4));
|
||||
}
|
||||
|
||||
let fileContent = readFileSync(configPath, "utf-8");
|
||||
let parsedConfig = JSON.parse(fileContent) as WebUiConfigType;
|
||||
|
||||
// 修正端口占用情况
|
||||
const [err, data] = await tryUsePort(parsedConfig.port).then(data => [null, data as number]).catch(err => [err, null]);
|
||||
parsedConfig.port = data;
|
||||
if (err) {
|
||||
//一般没那么离谱 如果真有这么离谱 考虑下 向外抛出异常
|
||||
}
|
||||
this.WebUiConfigData = parsedConfig;
|
||||
return this.WebUiConfigData;
|
||||
} catch (e) {
|
||||
console.error("读取配置文件失败", e);
|
||||
}
|
||||
return {} as WebUiConfigType; // 理论上这行代码到不了,为了保持函数完整性而保留
|
||||
}
|
||||
}
|
||||
export const WebUiConfig = new WebUiConfigWrapper();
|
6
src/webui/src/router/OB11Config.ts
Normal file
6
src/webui/src/router/OB11Config.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { Router } from 'express';
|
||||
import { OB11GetConfigHandler,OB11SetConfigHandler} from '../api/OB11Config';
|
||||
const router = Router();
|
||||
router.post('/GetConfig', OB11GetConfigHandler)
|
||||
router.post('/SetConfig', OB11SetConfigHandler);
|
||||
export { router as OB11ConfigRouter };
|
8
src/webui/src/router/QQLogin.ts
Normal file
8
src/webui/src/router/QQLogin.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Router } from 'express';
|
||||
import { QQCheckLoginStatusHandler, QQGetQRcodeHandler, QQGetQuickLoginListHandler, QQSetQuickLoginHandler } from '../api/QQLogin';
|
||||
const router = Router();
|
||||
router.all('/GetQuickLoginList', QQGetQuickLoginListHandler)
|
||||
router.post('/CheckLoginStatus', QQCheckLoginStatusHandler);
|
||||
router.post('/GetQQLoginQrcode', QQGetQRcodeHandler);
|
||||
router.post('/SetQuickLogin', QQSetQuickLoginHandler);
|
||||
export { router as QQLoginRouter };
|
9
src/webui/src/router/auth.ts
Normal file
9
src/webui/src/router/auth.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Router } from 'express';
|
||||
import { LoginHandler, LogoutHandler, checkHandler } from '../api/Auth';
|
||||
|
||||
const router = Router();
|
||||
|
||||
router.post('/login', LoginHandler);
|
||||
router.post('/check', checkHandler);
|
||||
router.post('/logout', LogoutHandler);
|
||||
export { router as AuthRouter };
|
65
src/webui/src/router/index.ts
Normal file
65
src/webui/src/router/index.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
import { Router } from "express";
|
||||
import { AuthHelper } from '../../src/helper/SignToken';
|
||||
import { NextFunction, Request, Response } from 'express';
|
||||
import { QQLoginRouter } from "./QQLogin";
|
||||
import { AuthRouter } from "./auth";
|
||||
import { OB11ConfigRouter } from "./OB11Config";
|
||||
import { WebUiConfig } from "../helper/config";
|
||||
const router = Router();
|
||||
export async function AuthApi(req: Request, res: Response, next: NextFunction) {
|
||||
//判断当前url是否为/login 如果是跳过鉴权
|
||||
if (req.url == '/auth/login') {
|
||||
next();
|
||||
return;
|
||||
}
|
||||
if (req.headers?.authorization) {
|
||||
let authorization = req.headers.authorization.split(' ');
|
||||
if (authorization.length < 2) {
|
||||
res.json({
|
||||
code: -1,
|
||||
msg: 'Unauthorized',
|
||||
});
|
||||
return;
|
||||
}
|
||||
let token = authorization[1];
|
||||
let Credential: any;
|
||||
try {
|
||||
Credential = JSON.parse(Buffer.from(token, 'base64').toString('utf-8'));
|
||||
} catch (e) {
|
||||
res.json({
|
||||
code: -1,
|
||||
msg: 'Unauthorized',
|
||||
});
|
||||
return;
|
||||
}
|
||||
let config = await WebUiConfig.GetWebUIConfig();
|
||||
let credentialJson = await AuthHelper.validateCredentialWithinOneHour(config.token, Credential);
|
||||
if (credentialJson) {
|
||||
//通过验证
|
||||
next();
|
||||
return;
|
||||
}
|
||||
res.json({
|
||||
code: -1,
|
||||
msg: 'Unauthorized',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
res.json({
|
||||
code: -1,
|
||||
msg: 'Server Error',
|
||||
});
|
||||
return;
|
||||
}
|
||||
router.use(AuthApi);
|
||||
router.all("/test", (req, res) => {
|
||||
res.json({
|
||||
code: 0,
|
||||
msg: 'ok',
|
||||
});
|
||||
});
|
||||
router.use('/auth', AuthRouter);
|
||||
router.use('/QQLogin', QQLoginRouter);
|
||||
router.use('/OB11Config', OB11ConfigRouter);
|
||||
export { router as ALLRouter }
|
297
src/webui/ui/NapCat.ts
Normal file
297
src/webui/ui/NapCat.ts
Normal file
@@ -0,0 +1,297 @@
|
||||
import { SettingList } from "./components/SettingList";
|
||||
import { SettingItem } from "./components/SettingItem";
|
||||
import { SettingButton } from "./components/SettingButton";
|
||||
import { SettingSwitch } from "./components/SettingSwitch";
|
||||
import { SettingSelect } from "./components/SettingSelect";
|
||||
import { OB11Config, OB11ConfigWrapper } from "./components/WebUiApiOB11Config"
|
||||
async function onSettingWindowCreated(view: Element) {
|
||||
const isEmpty = (value: any) => value === undefined || value === undefined || value === '';
|
||||
await OB11ConfigWrapper.Init(localStorage.getItem('auth') as string);
|
||||
let ob11Config: OB11Config = await OB11ConfigWrapper.GetOB11Config();
|
||||
const setOB11Config = (key: string, value: any) => {
|
||||
const configKey = key.split('.');
|
||||
if (configKey.length === 2) {
|
||||
ob11Config[configKey[1]] = value;
|
||||
}
|
||||
OB11ConfigWrapper.SetOB11Config(ob11Config);
|
||||
}
|
||||
|
||||
const parser = new DOMParser();
|
||||
const doc = parser.parseFromString(
|
||||
[
|
||||
'<div>',
|
||||
`<setting-section id="napcat-error">
|
||||
<setting-panel><pre><code></code></pre></setting-panel>
|
||||
</setting-section>`,
|
||||
SettingList([
|
||||
SettingItem(
|
||||
'<span id="napcat-update-title">Napcat</span>',
|
||||
undefined,
|
||||
SettingButton('V1.3.2', 'napcat-update-button', 'secondary'),
|
||||
),
|
||||
]),
|
||||
SettingList([
|
||||
SettingItem(
|
||||
'启用 HTTP 服务',
|
||||
undefined,
|
||||
SettingSwitch('ob11.enableHttp', ob11Config.enableHttp, { 'control-display-id': 'config-ob11-httpPort' }),
|
||||
),
|
||||
SettingItem(
|
||||
'HTTP 服务监听端口',
|
||||
undefined,
|
||||
`<div class="q-input"><input class="q-input__inner" data-config-key="ob11.httpPort" type="number" min="1" max="65534" value="${ob11Config.httpPort}" placeholder="${ob11Config.httpPort}" /></div>`,
|
||||
'config-ob11-httpPort',
|
||||
ob11Config.enableHttp,
|
||||
),
|
||||
SettingItem(
|
||||
'启用 HTTP 心跳',
|
||||
undefined,
|
||||
SettingSwitch('ob11.enableHttpHeart', ob11Config.enableHttpHeart, {
|
||||
'control-display-id': 'config-ob11-enableHttpHeart',
|
||||
}),
|
||||
),
|
||||
SettingItem(
|
||||
'启用 HTTP 事件上报',
|
||||
undefined,
|
||||
SettingSwitch('ob11.enableHttpPost', ob11Config.enableHttpPost, {
|
||||
'control-display-id': 'config-ob11-httpPostUrls',
|
||||
}),
|
||||
),
|
||||
`<div class="config-host-list" id="config-ob11-httpPostUrls" ${ob11Config.enableHttpPost ? '' : 'is-hidden'}>
|
||||
<setting-item data-direction="row">
|
||||
<div>
|
||||
<setting-text>HTTP 事件上报密钥</setting-text>
|
||||
</div>
|
||||
<div class="q-input">
|
||||
<input id="config-ob11-httpSecret" class="q-input__inner" data-config-key="ob11.httpSecret" type="text" value="${ob11Config.httpSecret
|
||||
}" placeholder="未设置" />
|
||||
</div>
|
||||
</setting-item>
|
||||
<setting-item data-direction="row">
|
||||
<div>
|
||||
<setting-text>HTTP 事件上报地址</setting-text>
|
||||
</div>
|
||||
<setting-button id="config-ob11-httpPostUrls-add" data-type="primary">添加</setting-button>
|
||||
</setting-item>
|
||||
<div id="config-ob11-httpPostUrls-list"></div>
|
||||
</div>`,
|
||||
SettingItem(
|
||||
'启用正向 WebSocket 服务',
|
||||
undefined,
|
||||
SettingSwitch('ob11.enableWs', ob11Config.enableWs, { 'control-display-id': 'config-ob11-wsPort' }),
|
||||
),
|
||||
SettingItem(
|
||||
'正向 WebSocket 服务监听端口',
|
||||
undefined,
|
||||
`<div class="q-input"><input class="q-input__inner" data-config-key="ob11.wsPort" type="number" min="1" max="65534" value="${ob11Config.wsPort}" placeholder="${ob11Config.wsPort}" /></div>`,
|
||||
'config-ob11-wsPort',
|
||||
ob11Config.enableWs,
|
||||
),
|
||||
SettingItem(
|
||||
'启用反向 WebSocket 服务',
|
||||
undefined,
|
||||
SettingSwitch('ob11.enableWsReverse', ob11Config.enableWsReverse, {
|
||||
'control-display-id': 'config-ob11-wsReverseUrls',
|
||||
}),
|
||||
),
|
||||
`<div class="config-host-list" id="config-ob11-wsReverseUrls" ${ob11Config.enableWsReverse ? '' : 'is-hidden'}>
|
||||
<setting-item data-direction="row">
|
||||
<div>
|
||||
<setting-text>反向 WebSocket 监听地址</setting-text>
|
||||
</div>
|
||||
<setting-button id="config-ob11-wsReverseUrls-add" data-type="primary">添加</setting-button>
|
||||
</setting-item>
|
||||
<div id="config-ob11-wsReverseUrls-list"></div>
|
||||
</div>`,
|
||||
SettingItem(
|
||||
' WebSocket 服务心跳间隔',
|
||||
'控制每隔多久发送一个心跳包,单位为毫秒',
|
||||
`<div class="q-input"><input class="q-input__inner" data-config-key="ob11.heartInterval" type="number" min="1000" value="${ob11Config.heartInterval}" placeholder="${ob11Config.heartInterval}" /></div>`,
|
||||
),
|
||||
SettingItem(
|
||||
'Access token',
|
||||
undefined,
|
||||
`<div class="q-input" style="width:210px;"><input class="q-input__inner" data-config-key="ob11.token" type="text" value="${ob11Config.token}" placeholder="未设置" /></div>`,
|
||||
),
|
||||
SettingItem(
|
||||
'新消息上报格式',
|
||||
'如客户端无特殊需求推荐保持默认设置,两者的详细差异可参考 <a href="javascript:LiteLoader.api.openExternal(\'https://github.com/botuniverse/onebot-11/tree/master/message#readme\');">OneBot v11 文档</a>',
|
||||
SettingSelect(
|
||||
[
|
||||
{ text: '消息段', value: 'array' },
|
||||
{ text: 'CQ码', value: 'string' },
|
||||
],
|
||||
'ob11.messagePostFormat',
|
||||
ob11Config.messagePostFormat,
|
||||
),
|
||||
),
|
||||
SettingItem(
|
||||
'音乐卡片签名地址',
|
||||
undefined,
|
||||
`<div class="q-input" style="width:210px;"><input class="q-input__inner" data-config-key="ob11.musicSignUrl" type="text" value="${ob11Config.musicSignUrl}" placeholder="未设置" /></div>`,
|
||||
'ob11.musicSignUrl',
|
||||
),
|
||||
SettingItem('', undefined, SettingButton('保存', 'config-ob11-save', 'primary')),
|
||||
]),
|
||||
SettingList([
|
||||
SettingItem(
|
||||
'上报 Bot 自身发送的消息',
|
||||
'上报 event 为 message_sent',
|
||||
SettingSwitch('ob11.reportSelfMessage', ob11Config.reportSelfMessage),
|
||||
)
|
||||
]),
|
||||
SettingList([
|
||||
SettingItem('GitHub 仓库', `https://github.com/NapNeko/NapCatQQ`, SettingButton('点个星星', 'open-github')),
|
||||
SettingItem('NapCat 文档', ``, SettingButton('看看文档', 'open-docs')),
|
||||
SettingItem('Telegram 群', `https://t.me/+nLZEnpne-pQ1OWFl`, SettingButton('进去逛逛', 'open-telegram')),
|
||||
SettingItem('QQ 群', `545402644`, SettingButton('我要进去', 'open-qq-group')),
|
||||
]),
|
||||
'</div>',
|
||||
].join(''),
|
||||
'text/html',
|
||||
)
|
||||
|
||||
// 外链按钮
|
||||
doc.querySelector('#open-github')?.addEventListener('click', () => {
|
||||
window.open("https://napneko.github.io/", '_blank');
|
||||
})
|
||||
doc.querySelector('#open-telegram')?.addEventListener('click', () => {
|
||||
window.open('https://t.me/+nLZEnpne-pQ1OWFl')
|
||||
})
|
||||
doc.querySelector('#open-qq-group')?.addEventListener('click', () => {
|
||||
window.open('https://qm.qq.com/q/bDnHRG38aI')
|
||||
})
|
||||
doc.querySelector('#open-docs')?.addEventListener('click', () => {
|
||||
window.open('https://github.com/NapNeko/NapCatQQ')
|
||||
})
|
||||
// 生成反向地址列表
|
||||
const buildHostListItem = (type: string, host: string, index: number, inputAttrs: any = {}) => {
|
||||
const dom = {
|
||||
container: document.createElement('setting-item'),
|
||||
input: document.createElement('input'),
|
||||
inputContainer: document.createElement('div'),
|
||||
deleteBtn: document.createElement('setting-button'),
|
||||
}
|
||||
dom.container.classList.add('setting-host-list-item')
|
||||
dom.container.dataset.direction = 'row'
|
||||
Object.assign(dom.input, inputAttrs)
|
||||
dom.input.classList.add('q-input__inner')
|
||||
dom.input.type = 'url'
|
||||
dom.input.value = host
|
||||
dom.input.addEventListener('input', () => {
|
||||
ob11Config[type][index] = dom.input.value
|
||||
})
|
||||
|
||||
dom.inputContainer.classList.add('q-input')
|
||||
dom.inputContainer.appendChild(dom.input)
|
||||
|
||||
dom.deleteBtn.innerHTML = '删除'
|
||||
dom.deleteBtn.dataset.type = 'secondary'
|
||||
dom.deleteBtn.addEventListener('click', () => {
|
||||
ob11Config[type].splice(index, 1)
|
||||
initReverseHost(type)
|
||||
})
|
||||
|
||||
dom.container.appendChild(dom.inputContainer)
|
||||
dom.container.appendChild(dom.deleteBtn)
|
||||
|
||||
return dom.container
|
||||
}
|
||||
const buildHostList = (hosts: string[], type: string, inputAttr: any = {}) => {
|
||||
const result: HTMLElement[] = []
|
||||
|
||||
hosts.forEach((host, index) => {
|
||||
result.push(buildHostListItem(type, host, index, inputAttr))
|
||||
})
|
||||
|
||||
return result
|
||||
}
|
||||
const addReverseHost = (type: string, doc: Document = document, inputAttr: any = {}) => {
|
||||
const hostContainerDom = doc.body.querySelector(`#config-ob11-${type}-list`);
|
||||
hostContainerDom?.appendChild(buildHostListItem(type, '', ob11Config[type].length, inputAttr));
|
||||
ob11Config[type].push('');
|
||||
}
|
||||
const initReverseHost = (type: string, doc: Document = document) => {
|
||||
const hostContainerDom = doc.body?.querySelector(`#config-ob11-${type}-list`);
|
||||
if (hostContainerDom) {
|
||||
[...hostContainerDom.childNodes].forEach((dom) => dom.remove());
|
||||
buildHostList(ob11Config[type], type).forEach((dom) => {
|
||||
hostContainerDom?.appendChild(dom);
|
||||
})
|
||||
}
|
||||
}
|
||||
initReverseHost('httpPostUrls', doc);
|
||||
initReverseHost('wsReverseUrls', doc);
|
||||
|
||||
doc
|
||||
.querySelector('#config-ob11-httpPostUrls-add')
|
||||
?.addEventListener('click', () =>
|
||||
addReverseHost('httpPostUrls', document, { placeholder: '如:http://127.0.0.1:5140/onebot' }),
|
||||
)
|
||||
doc
|
||||
.querySelector('#config-ob11-wsReverseUrls-add')
|
||||
?.addEventListener('click', () =>
|
||||
addReverseHost('wsReverseUrls', document, { placeholder: '如:ws://127.0.0.1:5140/onebot' }),
|
||||
)
|
||||
|
||||
doc.querySelector('#config-ffmpeg-select')?.addEventListener('click', () => {
|
||||
//选择ffmpeg
|
||||
})
|
||||
|
||||
doc.querySelector('#config-open-log-path')?.addEventListener('click', () => {
|
||||
//打开日志
|
||||
})
|
||||
|
||||
// 开关
|
||||
doc.querySelectorAll('setting-switch[data-config-key]').forEach((dom: Element) => {
|
||||
dom.addEventListener('click', () => {
|
||||
const active = dom.getAttribute('is-active') == undefined;
|
||||
//@ts-ignore 扩展
|
||||
setOB11Config(dom.dataset.configKey, active)
|
||||
if (active) dom.setAttribute('is-active', '')
|
||||
else dom.removeAttribute('is-active')
|
||||
//@ts-ignore 等待修复
|
||||
if (!isEmpty(dom.dataset.controlDisplayId)) {
|
||||
//@ts-ignore 等待修复
|
||||
const displayDom = document.querySelector(`#${dom.dataset.controlDisplayId}`)
|
||||
if (active) displayDom?.removeAttribute('is-hidden')
|
||||
else displayDom?.setAttribute('is-hidden', '')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// 输入框
|
||||
doc
|
||||
.querySelectorAll('setting-item .q-input input.q-input__inner[data-config-key]')
|
||||
.forEach((dom: Element) => {
|
||||
dom.addEventListener('input', () => {
|
||||
const Type = dom.getAttribute('type')
|
||||
//@ts-ignore 等待修复
|
||||
const configKey = dom.dataset.configKey
|
||||
const configValue = Type === 'number' ? (parseInt((dom as HTMLInputElement).value) >= 1 ? parseInt((dom as HTMLInputElement).value) : 1) : (dom as HTMLInputElement).value
|
||||
|
||||
setOB11Config(configKey, configValue)
|
||||
})
|
||||
})
|
||||
|
||||
// 下拉框
|
||||
doc.querySelectorAll('ob-setting-select[data-config-key]').forEach((dom: Element) => {
|
||||
//@ts-ignore 等待修复
|
||||
dom?.addEventListener('selected', (e: CustomEvent) => {
|
||||
//@ts-ignore 等待修复
|
||||
const configKey = dom.dataset.configKey
|
||||
const configValue = e.detail.value
|
||||
setOB11Config(configKey, configValue);
|
||||
})
|
||||
})
|
||||
|
||||
// 保存按钮
|
||||
doc.querySelector('#config-ob11-save')?.addEventListener('click', () => {
|
||||
OB11ConfigWrapper.SetOB11Config(ob11Config);
|
||||
alert('保存成功');
|
||||
})
|
||||
doc.body.childNodes.forEach((node) => {
|
||||
view.appendChild(node)
|
||||
})
|
||||
}
|
||||
export { onSettingWindowCreated };
|
3
src/webui/ui/components/SettingButton.ts
Normal file
3
src/webui/ui/components/SettingButton.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export const SettingButton = (text: string, id?: string, type: string = 'secondary') => {
|
||||
return `<setting-button ${type ? `data-type="${type}"` : ''} ${id ? `id="${id}"` : ''}>${text}</setting-button>`
|
||||
}
|
15
src/webui/ui/components/SettingItem.ts
Normal file
15
src/webui/ui/components/SettingItem.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export const SettingItem = (
|
||||
title: string,
|
||||
subtitle?: string,
|
||||
action?: string,
|
||||
id?: string,
|
||||
visible: boolean = true,
|
||||
) => {
|
||||
return `<setting-item ${id ? `id="${id}"` : ''} ${!visible ? 'is-hidden' : ''}>
|
||||
<div>
|
||||
<setting-text>${title}</setting-text>
|
||||
${subtitle ? `<setting-text data-type="secondary">${subtitle}</setting-text>` : ''}
|
||||
</div>
|
||||
${action ? `<div>${action}</div>` : ''}
|
||||
</setting-item>`
|
||||
}
|
14
src/webui/ui/components/SettingList.ts
Normal file
14
src/webui/ui/components/SettingList.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export const SettingList = (
|
||||
items: string[],
|
||||
title?: string,
|
||||
isCollapsible: boolean = false,
|
||||
direction: string = 'column',
|
||||
) => {
|
||||
return `<setting-section ${title && !isCollapsible ? `data-title="${title}"` : ''}>
|
||||
<setting-panel>
|
||||
<setting-list ${direction ? `data-direction="${direction}"` : ''} ${isCollapsible ? 'is-collapsible' : ''} ${title && isCollapsible ? `data-title="${title}"` : ''}>
|
||||
${items.join('')}
|
||||
</setting-list>
|
||||
</setting-panel>
|
||||
</setting-section>`
|
||||
}
|
3
src/webui/ui/components/SettingOption.ts
Normal file
3
src/webui/ui/components/SettingOption.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export const SettingOption = (text: string, value?: string, isSelected: boolean = false) => {
|
||||
return `<setting-option ${value ? `data-value="${value}"` : ''} ${isSelected ? 'is-selected' : ''}>${text}</setting-option>`
|
||||
}
|
84
src/webui/ui/components/SettingSelect.ts
Normal file
84
src/webui/ui/components/SettingSelect.ts
Normal file
@@ -0,0 +1,84 @@
|
||||
import { SettingOption } from './SettingOption'
|
||||
|
||||
interface MouseEventExtend extends MouseEvent {
|
||||
target: HTMLElement
|
||||
}
|
||||
|
||||
// <ob-setting-select>
|
||||
const SelectTemplate = document.createElement('template')
|
||||
SelectTemplate.innerHTML = `<style>
|
||||
.hidden { display: none !important; }
|
||||
</style>
|
||||
<div part="parent">
|
||||
<div part="button">
|
||||
<input type="text" placeholder="请选择" part="current-text" />
|
||||
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" part="button-arrow">
|
||||
<path d="M12 6.0001L8.00004 10L4 6" stroke="currentColor" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<ul class="hidden" part="option-list"><slot></slot></ul>
|
||||
</div>`
|
||||
|
||||
window.customElements.define(
|
||||
'ob-setting-select',
|
||||
class extends HTMLElement {
|
||||
readonly _button: HTMLDivElement
|
||||
readonly _text: HTMLInputElement
|
||||
readonly _context: HTMLUListElement
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
|
||||
this.attachShadow({ mode: 'open' })
|
||||
this.shadowRoot?.append(SelectTemplate.content.cloneNode(true));
|
||||
|
||||
this._button = this.shadowRoot.querySelector('div[part="button"]');
|
||||
this._text = this.shadowRoot.querySelector('input[part="current-text"]');
|
||||
this._context = this.shadowRoot.querySelector('ul[part="option-list"]');
|
||||
|
||||
const buttonClick = () => {
|
||||
const isHidden = this._context.classList.toggle('hidden');
|
||||
window[`${isHidden ? 'remove' : 'add'}EventListener`]('pointerdown', windowPointerDown);
|
||||
}
|
||||
|
||||
const windowPointerDown = ({ target }) => {
|
||||
if (!this.contains(target)) buttonClick()
|
||||
}
|
||||
|
||||
this._button.addEventListener('click', buttonClick)
|
||||
this._context.addEventListener('click', ({ target }: MouseEventExtend) => {
|
||||
if (target.tagName !== 'SETTING-OPTION') return
|
||||
buttonClick()
|
||||
|
||||
if (target.hasAttribute('is-selected')) return
|
||||
|
||||
this.querySelectorAll('setting-option[is-selected]').forEach((dom) => dom.toggleAttribute('is-selected'))
|
||||
target.toggleAttribute('is-selected')
|
||||
|
||||
this._text.value = target.textContent as string;
|
||||
this.dispatchEvent(
|
||||
new CustomEvent('selected', {
|
||||
bubbles: true,
|
||||
composed: true,
|
||||
detail: {
|
||||
name: target.textContent,
|
||||
value: target.dataset.value,
|
||||
},
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
this._text.value = this.querySelector('setting-option[is-selected]')?.textContent as string;
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
export const SettingSelect = (items: Array<{ text: string; value: string }>, configKey?: string, configValue?: any) => {
|
||||
return `<ob-setting-select ${configKey ? `data-config-key="${configKey}"` : ''}>
|
||||
${items
|
||||
.map((e, i) => {
|
||||
return SettingOption(e.text, e.value, configKey && configValue ? configValue === e.value : i === 0)
|
||||
})
|
||||
.join('')}
|
||||
</ob-setting-select>`
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user