koishi-plugin-ets2-tools-tmp 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/evmOpenApi.js +1 -136
- package/lib/api/truckersMpApi.js +1 -133
- package/lib/api/truckersMpMapApi.js +1 -25
- package/lib/api/truckyAppApi.js +1 -48
- package/lib/command/ets-app/queryPoint.js +1 -77
- package/lib/command/ets-app/resetPassword.js +1 -270
- package/lib/command/tmpActivityService.js +1 -603
- package/lib/command/tmpBind.js +1 -19
- package/lib/command/tmpDlcMap.js +1 -33
- package/lib/command/tmpFootprint.js +1 -68
- package/lib/command/tmpMileageRanking.js +1 -55
- package/lib/command/tmpPosition.js +1 -123
- package/lib/command/tmpQuery/tmpQuery.js +1 -12
- package/lib/command/tmpQuery/tmpQueryImg.js +1 -103
- package/lib/command/tmpQuery/tmpQueryText.js +1 -181
- package/lib/command/tmpServer.js +1 -41
- package/lib/command/tmpTraffic/tmpTraffic.js +1 -15
- package/lib/command/tmpTraffic/tmpTrafficMap.js +1 -163
- package/lib/command/tmpTraffic/tmpTrafficText.js +1 -60
- package/lib/command/tmpVersion.js +1 -14
- package/lib/command/tmpVtc.js +1 -29
- package/lib/database/guildBind.js +1 -41
- package/lib/database/model.js +1 -65
- package/lib/database/translateCache.js +1 -31
- package/lib/index.js +1 -323
- package/lib/resource/package/ets-map.js +1 -63
- package/lib/resource/package/leaflet/heatmap.min.js +1 -9
- package/lib/resource/package/leaflet/leaflet-heatmap.js +1 -246
- package/lib/util/baiduTranslate.js +1 -24
- package/lib/util/common.js +1 -5
- package/lib/util/constant.js +1 -29
- package/package.json +1 -1
|
@@ -1,41 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* 获取绑定信息
|
|
4
|
-
* @param db 数据源
|
|
5
|
-
* @param platform 平台
|
|
6
|
-
* @param userId 用户编号
|
|
7
|
-
*/
|
|
8
|
-
async get(db, platform, userId) {
|
|
9
|
-
const guildBindList = await db.get('tmp_guild_bind', {
|
|
10
|
-
platform,
|
|
11
|
-
user_id: userId
|
|
12
|
-
});
|
|
13
|
-
if (guildBindList && guildBindList.length > 0) {
|
|
14
|
-
return guildBindList[0];
|
|
15
|
-
}
|
|
16
|
-
return null;
|
|
17
|
-
},
|
|
18
|
-
/**
|
|
19
|
-
* 新增或更新绑定信息
|
|
20
|
-
* @param db 数据源
|
|
21
|
-
* @param platform 平台
|
|
22
|
-
* @param userId 用户编号
|
|
23
|
-
* @param tmpId TMP ID
|
|
24
|
-
*/
|
|
25
|
-
saveOrUpdate(db, platform, userId, tmpId) {
|
|
26
|
-
this.get(db, platform, userId).then((data) => {
|
|
27
|
-
if (data) {
|
|
28
|
-
db.set('tmp_guild_bind', data.id, {
|
|
29
|
-
tmp_id: tmpId
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
db.create('tmp_guild_bind', {
|
|
34
|
-
platform: platform,
|
|
35
|
-
user_id: userId,
|
|
36
|
-
tmp_id: tmpId
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
};
|
|
1
|
+
const _0x48f91c=_0x564f;(function(_0x48c553,_0x22b5df){const _0x3058dc=_0x564f,_0x6d44c0=_0x48c553();while(!![]){try{const _0x13a564=parseInt(_0x3058dc(0xe5))/0x1*(parseInt(_0x3058dc(0xdb))/0x2)+parseInt(_0x3058dc(0xd9))/0x3+parseInt(_0x3058dc(0xd8))/0x4+parseInt(_0x3058dc(0xe0))/0x5+-parseInt(_0x3058dc(0xee))/0x6+-parseInt(_0x3058dc(0xd3))/0x7+-parseInt(_0x3058dc(0xe1))/0x8*(parseInt(_0x3058dc(0xd6))/0x9);if(_0x13a564===_0x22b5df)break;else _0x6d44c0['push'](_0x6d44c0['shift']());}catch(_0x2acb05){_0x6d44c0['push'](_0x6d44c0['shift']());}}}(_0x3ca2,0xed964));function _0x3ca2(){const _0x39fec0=['2914720KZbWRO','59484mqexAt','bind','2363218FhRHfl','get','constructor','console','error','6284645FZMYDA','16oSvQUM','length','warn','prototype','1KcUmRa','apply','exports','__proto__','table','log','(((.+)+)+)+$','set','tmp_guild_bind','4497000XsmEgh','{}.constructor(\x22return\x20this\x22)(\x20)','6377224zYqgYK','toString','return\x20(function()\x20','2490111sGMrLJ','info'];_0x3ca2=function(){return _0x39fec0;};return _0x3ca2();}const _0x3fb062=(function(){let _0x1feea9=!![];return function(_0x588192,_0x2ec1df){const _0x4e8b90=_0x1feea9?function(){const _0x42c063=_0x564f;if(_0x2ec1df){const _0x35f873=_0x2ec1df[_0x42c063(0xe6)](_0x588192,arguments);return _0x2ec1df=null,_0x35f873;}}:function(){};return _0x1feea9=![],_0x4e8b90;};}()),_0x35d918=_0x3fb062(this,function(){const _0x4bd80a=_0x564f;return _0x35d918[_0x4bd80a(0xd4)]()['search'](_0x4bd80a(0xeb))[_0x4bd80a(0xd4)]()[_0x4bd80a(0xdd)](_0x35d918)['search']('(((.+)+)+)+$');});_0x35d918();const _0xb510e=(function(){let _0x5054bb=!![];return function(_0x40b083,_0x5a4421){const _0xccdfa8=_0x5054bb?function(){const _0x4b4e62=_0x564f;if(_0x5a4421){const _0x401d68=_0x5a4421[_0x4b4e62(0xe6)](_0x40b083,arguments);return _0x5a4421=null,_0x401d68;}}:function(){};return _0x5054bb=![],_0xccdfa8;};}()),_0x5e95f0=_0xb510e(this,function(){const _0x4afbea=_0x564f,_0x359d29=function(){const _0x15ee27=_0x564f;let _0x317151;try{_0x317151=Function(_0x15ee27(0xd5)+_0x15ee27(0xd2)+');')();}catch(_0x2711aa){_0x317151=window;}return _0x317151;},_0x215e2f=_0x359d29(),_0x149d94=_0x215e2f['console']=_0x215e2f[_0x4afbea(0xde)]||{},_0x108206=[_0x4afbea(0xea),_0x4afbea(0xe3),_0x4afbea(0xd7),_0x4afbea(0xdf),'exception',_0x4afbea(0xe9),'trace'];for(let _0xef6c70=0x0;_0xef6c70<_0x108206[_0x4afbea(0xe2)];_0xef6c70++){const _0x18d05a=_0xb510e[_0x4afbea(0xdd)][_0x4afbea(0xe4)]['bind'](_0xb510e),_0x1afa92=_0x108206[_0xef6c70],_0x4fd310=_0x149d94[_0x1afa92]||_0x18d05a;_0x18d05a[_0x4afbea(0xe8)]=_0xb510e[_0x4afbea(0xda)](_0xb510e),_0x18d05a[_0x4afbea(0xd4)]=_0x4fd310[_0x4afbea(0xd4)]['bind'](_0x4fd310),_0x149d94[_0x1afa92]=_0x18d05a;}});function _0x564f(_0x4bca7d,_0x3792ae){const _0x1fea18=_0x3ca2();return _0x564f=function(_0x5e95f0,_0xb510e){_0x5e95f0=_0x5e95f0-0xd2;let _0x35ae8f=_0x1fea18[_0x5e95f0];return _0x35ae8f;},_0x564f(_0x4bca7d,_0x3792ae);}_0x5e95f0(),module[_0x48f91c(0xe7)]={async 'get'(_0x2ad5b9,_0x405e85,_0x1b675d){const _0x26f7c4=_0x48f91c,_0x525f1c=await _0x2ad5b9[_0x26f7c4(0xdc)](_0x26f7c4(0xed),{'platform':_0x405e85,'user_id':_0x1b675d});if(_0x525f1c&&_0x525f1c[_0x26f7c4(0xe2)]>0x0)return _0x525f1c[0x0];return null;},'saveOrUpdate'(_0x16a5a9,_0x331380,_0x36fcab,_0x146003){const _0x30c69d=_0x48f91c;this[_0x30c69d(0xdc)](_0x16a5a9,_0x331380,_0x36fcab)['then'](_0x5ef330=>{const _0x14c0f7=_0x30c69d;_0x5ef330?_0x16a5a9[_0x14c0f7(0xec)](_0x14c0f7(0xed),_0x5ef330['id'],{'tmp_id':_0x146003}):_0x16a5a9['create'](_0x14c0f7(0xed),{'platform':_0x331380,'user_id':_0x36fcab,'tmp_id':_0x146003});});}};
|
package/lib/database/model.js
CHANGED
|
@@ -1,65 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* 数据表声明
|
|
3
|
-
*/
|
|
4
|
-
const modelArray = {
|
|
5
|
-
tmp_guild_bind: {
|
|
6
|
-
id: {
|
|
7
|
-
type: 'unsigned',
|
|
8
|
-
length: 10,
|
|
9
|
-
nullable: false,
|
|
10
|
-
comment: '主键'
|
|
11
|
-
},
|
|
12
|
-
platform: {
|
|
13
|
-
type: 'string',
|
|
14
|
-
length: 50,
|
|
15
|
-
nullable: false,
|
|
16
|
-
comment: '所属平台'
|
|
17
|
-
},
|
|
18
|
-
user_id: {
|
|
19
|
-
type: 'string',
|
|
20
|
-
length: 50,
|
|
21
|
-
nullable: false,
|
|
22
|
-
comment: '用户编号'
|
|
23
|
-
},
|
|
24
|
-
tmp_id: {
|
|
25
|
-
type: 'unsigned',
|
|
26
|
-
length: 50,
|
|
27
|
-
nullable: false,
|
|
28
|
-
comment: 'TMP ID'
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
tmp_translate_cache: {
|
|
32
|
-
id: {
|
|
33
|
-
type: 'unsigned',
|
|
34
|
-
length: 10,
|
|
35
|
-
nullable: false,
|
|
36
|
-
comment: '主键'
|
|
37
|
-
},
|
|
38
|
-
content: {
|
|
39
|
-
type: 'string',
|
|
40
|
-
nullable: false,
|
|
41
|
-
length: 200,
|
|
42
|
-
comment: '原文文本'
|
|
43
|
-
},
|
|
44
|
-
content_md5: {
|
|
45
|
-
type: 'string',
|
|
46
|
-
nullable: false,
|
|
47
|
-
length: 32,
|
|
48
|
-
comment: '原文文本md5'
|
|
49
|
-
},
|
|
50
|
-
translate_content: {
|
|
51
|
-
type: 'string',
|
|
52
|
-
nullable: false,
|
|
53
|
-
length: 200,
|
|
54
|
-
comment: '翻译文本'
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* 初始化数据库
|
|
60
|
-
*/
|
|
61
|
-
module.exports = (ctx) => {
|
|
62
|
-
for (let modelName in modelArray) {
|
|
63
|
-
ctx.model.extend(modelName, modelArray[modelName], { autoInc: true });
|
|
64
|
-
}
|
|
65
|
-
};
|
|
1
|
+
function _0x3669(_0x1ed26e,_0x3bc28b){const _0x152e28=_0x1a7d();return _0x3669=function(_0x46d947,_0x1ec3d4){_0x46d947=_0x46d947-0x14f;let _0x45b395=_0x152e28[_0x46d947];return _0x45b395;},_0x3669(_0x1ed26e,_0x3bc28b);}const _0x3bfddd=_0x3669;(function(_0x37ee7b,_0x1cec4b){const _0x38001c=_0x3669,_0x35ab08=_0x37ee7b();while(!![]){try{const _0x7b9f14=parseInt(_0x38001c(0x16e))/0x1+-parseInt(_0x38001c(0x155))/0x2*(-parseInt(_0x38001c(0x16b))/0x3)+parseInt(_0x38001c(0x154))/0x4+-parseInt(_0x38001c(0x15a))/0x5+parseInt(_0x38001c(0x15f))/0x6+parseInt(_0x38001c(0x15e))/0x7+parseInt(_0x38001c(0x160))/0x8*(-parseInt(_0x38001c(0x165))/0x9);if(_0x7b9f14===_0x1cec4b)break;else _0x35ab08['push'](_0x35ab08['shift']());}catch(_0x43bf99){_0x35ab08['push'](_0x35ab08['shift']());}}}(_0x1a7d,0x97178));const _0x50b99a=(function(){let _0x344b6=!![];return function(_0x5bf801,_0x17bd60){const _0x352856=_0x344b6?function(){const _0x3bf543=_0x3669;if(_0x17bd60){const _0x14248c=_0x17bd60[_0x3bf543(0x15c)](_0x5bf801,arguments);return _0x17bd60=null,_0x14248c;}}:function(){};return _0x344b6=![],_0x352856;};}()),_0x5743b0=_0x50b99a(this,function(){const _0x2b5a71=_0x3669;return _0x5743b0['toString']()[_0x2b5a71(0x172)](_0x2b5a71(0x169))[_0x2b5a71(0x163)]()[_0x2b5a71(0x16a)](_0x5743b0)[_0x2b5a71(0x172)](_0x2b5a71(0x169));});_0x5743b0();const _0x1ec3d4=(function(){let _0x1d5c77=!![];return function(_0x1f2ccd,_0x286ef7){const _0x575fdf=_0x1d5c77?function(){if(_0x286ef7){const _0x2cece7=_0x286ef7['apply'](_0x1f2ccd,arguments);return _0x286ef7=null,_0x2cece7;}}:function(){};return _0x1d5c77=![],_0x575fdf;};}()),_0x46d947=_0x1ec3d4(this,function(){const _0x54d555=_0x3669,_0x4fa106=function(){const _0x18001d=_0x3669;let _0x52b074;try{_0x52b074=Function(_0x18001d(0x152)+_0x18001d(0x153)+');')();}catch(_0x15f372){_0x52b074=window;}return _0x52b074;},_0x3290d7=_0x4fa106(),_0x27cc28=_0x3290d7['console']=_0x3290d7[_0x54d555(0x167)]||{},_0x5315bc=[_0x54d555(0x162),_0x54d555(0x158),_0x54d555(0x173),_0x54d555(0x14f),_0x54d555(0x151),_0x54d555(0x15d),_0x54d555(0x157)];for(let _0x1f4a0e=0x0;_0x1f4a0e<_0x5315bc['length'];_0x1f4a0e++){const _0x11ac8a=_0x1ec3d4[_0x54d555(0x16a)][_0x54d555(0x16d)][_0x54d555(0x171)](_0x1ec3d4),_0x34ce2b=_0x5315bc[_0x1f4a0e],_0x281977=_0x27cc28[_0x34ce2b]||_0x11ac8a;_0x11ac8a[_0x54d555(0x170)]=_0x1ec3d4['bind'](_0x1ec3d4),_0x11ac8a['toString']=_0x281977[_0x54d555(0x163)][_0x54d555(0x171)](_0x281977),_0x27cc28[_0x34ce2b]=_0x11ac8a;}});_0x46d947();const modelArray={'tmp_guild_bind':{'id':{'type':_0x3bfddd(0x168),'length':0xa,'nullable':![],'comment':'主键'},'platform':{'type':_0x3bfddd(0x15b),'length':0x32,'nullable':![],'comment':_0x3bfddd(0x166)},'user_id':{'type':_0x3bfddd(0x15b),'length':0x32,'nullable':![],'comment':_0x3bfddd(0x161)},'tmp_id':{'type':_0x3bfddd(0x168),'length':0x32,'nullable':![],'comment':_0x3bfddd(0x150)}},'tmp_translate_cache':{'id':{'type':_0x3bfddd(0x168),'length':0xa,'nullable':![],'comment':'主键'},'content':{'type':_0x3bfddd(0x15b),'nullable':![],'length':0xc8,'comment':_0x3bfddd(0x16f)},'content_md5':{'type':'string','nullable':![],'length':0x20,'comment':_0x3bfddd(0x159)},'translate_content':{'type':_0x3bfddd(0x15b),'nullable':![],'length':0xc8,'comment':_0x3bfddd(0x16c)}}};function _0x1a7d(){const _0x9d2692=['return\x20(function()\x20','{}.constructor(\x22return\x20this\x22)(\x20)','230352kFRDye','2Emayyr','model','trace','warn','原文文本md5','3137085xVCLvn','string','apply','table','4880113fKZFcU','5179818IrhRmG','8580904EoVvNb','用户编号','log','toString','exports','18pHIFJa','所属平台','console','unsigned','(((.+)+)+)+$','constructor','2459961rxylpQ','翻译文本','prototype','953478kjhEXH','原文文本','__proto__','bind','search','info','error','TMP\x20ID','exception'];_0x1a7d=function(){return _0x9d2692;};return _0x1a7d();}module[_0x3bfddd(0x164)]=_0x44e817=>{const _0x37317a=_0x3bfddd;for(let _0x93527e in modelArray){_0x44e817[_0x37317a(0x156)]['extend'](_0x93527e,modelArray[_0x93527e],{'autoInc':!![]});}};
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
module
|
|
2
|
-
/**
|
|
3
|
-
* 查询翻译
|
|
4
|
-
* @param db 数据源
|
|
5
|
-
* @param contentMd5 文本MD5
|
|
6
|
-
*/
|
|
7
|
-
async getTranslate(db, contentMd5) {
|
|
8
|
-
const translateCacheList = await db.get('tmp_translate_cache', {
|
|
9
|
-
content_md5: contentMd5
|
|
10
|
-
});
|
|
11
|
-
// 如果查询到了缓存,直接返回翻译文本
|
|
12
|
-
if (translateCacheList && translateCacheList.length > 0) {
|
|
13
|
-
return translateCacheList[0].translate_content;
|
|
14
|
-
}
|
|
15
|
-
return null;
|
|
16
|
-
},
|
|
17
|
-
/**
|
|
18
|
-
* 保存翻译缓存信息
|
|
19
|
-
* @param db 数据源
|
|
20
|
-
* @param contentMd5 原文文本MD5
|
|
21
|
-
* @param content 原文文本
|
|
22
|
-
* @param translateContent 翻译文本
|
|
23
|
-
*/
|
|
24
|
-
save(db, contentMd5, content, translateContent) {
|
|
25
|
-
db.create('tmp_translate_cache', {
|
|
26
|
-
content,
|
|
27
|
-
content_md5: contentMd5,
|
|
28
|
-
translate_content: translateContent
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
};
|
|
1
|
+
(function(_0x2e4323,_0x4f479b){const _0x15246d=_0x56a1,_0x1bb38a=_0x2e4323();while(!![]){try{const _0x1a79d1=parseInt(_0x15246d(0xc0))/0x1+parseInt(_0x15246d(0xcc))/0x2*(-parseInt(_0x15246d(0xcd))/0x3)+-parseInt(_0x15246d(0xd1))/0x4+parseInt(_0x15246d(0xc8))/0x5*(-parseInt(_0x15246d(0xc2))/0x6)+parseInt(_0x15246d(0xce))/0x7+parseInt(_0x15246d(0xd2))/0x8+parseInt(_0x15246d(0xbc))/0x9;if(_0x1a79d1===_0x4f479b)break;else _0x1bb38a['push'](_0x1bb38a['shift']());}catch(_0x18a0e4){_0x1bb38a['push'](_0x1bb38a['shift']());}}}(_0x16b1,0x42fbb));function _0x16b1(){const _0x4cd0ca=['search','get','2635632kHYxsr','exception','return\x20(function()\x20','__proto__','33238yjwhSI','(((.+)+)+)+$','6Egowdf','table','console','bind','prototype','length','731065KrkKXr','create','warn','error','505252TvbIgl','3gILfwh','2583266QQeVjz','apply','toString','1470852KDvcKw','2766328MVLXVO','trace'];_0x16b1=function(){return _0x4cd0ca;};return _0x16b1();}function _0x56a1(_0x4b3ff1,_0x4b2f30){const _0x11ef36=_0x16b1();return _0x56a1=function(_0x2613d5,_0x8b6f99){_0x2613d5=_0x2613d5-0xb9;let _0x351335=_0x11ef36[_0x2613d5];return _0x351335;},_0x56a1(_0x4b3ff1,_0x4b2f30);}const _0x5e1165=(function(){let _0x44dfd1=!![];return function(_0x20a0b5,_0x2e1438){const _0x776dad=_0x44dfd1?function(){if(_0x2e1438){const _0x2a8400=_0x2e1438['apply'](_0x20a0b5,arguments);return _0x2e1438=null,_0x2a8400;}}:function(){};return _0x44dfd1=![],_0x776dad;};}()),_0x246003=_0x5e1165(this,function(){const _0x46563e=_0x56a1;return _0x246003[_0x46563e(0xd0)]()[_0x46563e(0xba)]('(((.+)+)+)+$')[_0x46563e(0xd0)]()['constructor'](_0x246003)[_0x46563e(0xba)](_0x46563e(0xc1));});_0x246003();const _0x8b6f99=(function(){let _0x59d7f3=!![];return function(_0xf4de85,_0x47201f){const _0x16c531=_0x59d7f3?function(){const _0x207a58=_0x56a1;if(_0x47201f){const _0x16ff9f=_0x47201f[_0x207a58(0xcf)](_0xf4de85,arguments);return _0x47201f=null,_0x16ff9f;}}:function(){};return _0x59d7f3=![],_0x16c531;};}()),_0x2613d5=_0x8b6f99(this,function(){const _0x441cc0=_0x56a1,_0x4061f0=function(){const _0x2bdeab=_0x56a1;let _0x29c06b;try{_0x29c06b=Function(_0x2bdeab(0xbe)+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0x45356b){_0x29c06b=window;}return _0x29c06b;},_0x306c29=_0x4061f0(),_0x7ba122=_0x306c29['console']=_0x306c29[_0x441cc0(0xc4)]||{},_0x5e0c26=['log',_0x441cc0(0xca),'info',_0x441cc0(0xcb),_0x441cc0(0xbd),_0x441cc0(0xc3),_0x441cc0(0xb9)];for(let _0x5939db=0x0;_0x5939db<_0x5e0c26[_0x441cc0(0xc7)];_0x5939db++){const _0x33d11d=_0x8b6f99['constructor'][_0x441cc0(0xc6)]['bind'](_0x8b6f99),_0x26bca0=_0x5e0c26[_0x5939db],_0x28f92d=_0x7ba122[_0x26bca0]||_0x33d11d;_0x33d11d[_0x441cc0(0xbf)]=_0x8b6f99['bind'](_0x8b6f99),_0x33d11d[_0x441cc0(0xd0)]=_0x28f92d[_0x441cc0(0xd0)][_0x441cc0(0xc5)](_0x28f92d),_0x7ba122[_0x26bca0]=_0x33d11d;}});_0x2613d5(),module['exports']={async 'getTranslate'(_0x21d9a9,_0x179172){const _0x3d2c68=_0x56a1,_0x3c3384=await _0x21d9a9[_0x3d2c68(0xbb)]('tmp_translate_cache',{'content_md5':_0x179172});if(_0x3c3384&&_0x3c3384[_0x3d2c68(0xc7)]>0x0)return _0x3c3384[0x0]['translate_content'];return null;},'save'(_0x3bd0fa,_0x450e4b,_0x101b63,_0x2d0151){const _0x1d5aaa=_0x56a1;_0x3bd0fa[_0x1d5aaa(0xc9)]('tmp_translate_cache',{'content':_0x101b63,'content_md5':_0x450e4b,'translate_content':_0x2d0151});}};
|
package/lib/index.js
CHANGED
|
@@ -1,323 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Config = exports.inject = exports.name = void 0;
|
|
4
|
-
exports.apply = apply;
|
|
5
|
-
|
|
6
|
-
const koishi_1 = require("koishi");
|
|
7
|
-
const model = require('./database/model');
|
|
8
|
-
const { MileageRankingType } = require('./util/constant');
|
|
9
|
-
|
|
10
|
-
const commands = {
|
|
11
|
-
tmpQuery: require('./command/tmpQuery/tmpQuery'),
|
|
12
|
-
tmpServer: require('./command/tmpServer'),
|
|
13
|
-
tmpBind: require('./command/tmpBind'),
|
|
14
|
-
tmpTraffic: require('./command/tmpTraffic/tmpTraffic'),
|
|
15
|
-
tmpPosition: require('./command/tmpPosition'),
|
|
16
|
-
tmpVersion: require('./command/tmpVersion'),
|
|
17
|
-
tmpDlcMap: require('./command/tmpDlcMap'),
|
|
18
|
-
tmpMileageRanking: require('./command/tmpMileageRanking'),
|
|
19
|
-
resetPassword: require('./command/ets-app/resetPassword'),
|
|
20
|
-
queryPoint: require('./command/ets-app/queryPoint'),
|
|
21
|
-
tmpVtc: require('./command/tmpVtc'),
|
|
22
|
-
tmpFootprint: require('./command/tmpFootprint')
|
|
23
|
-
};
|
|
24
|
-
const { ActivityService } = require('./command/tmpActivityService');
|
|
25
|
-
|
|
26
|
-
const __defProp = Object.defineProperty;
|
|
27
|
-
const __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
28
|
-
const __getOwnPropNames = Object.getOwnPropertyNames;
|
|
29
|
-
const __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
30
|
-
const __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
31
|
-
const __export = (target, all) => {
|
|
32
|
-
for (const name2 in all)
|
|
33
|
-
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
34
|
-
};
|
|
35
|
-
const __copyProps = (to, from, except, desc) => {
|
|
36
|
-
if (from && (typeof from === "object" || typeof from === "function")) {
|
|
37
|
-
for (const key of __getOwnPropNames(from))
|
|
38
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
39
|
-
__defProp(to, key, {
|
|
40
|
-
get: () => from[key],
|
|
41
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
return to;
|
|
45
|
-
};
|
|
46
|
-
const __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
47
|
-
|
|
48
|
-
const src_exports = {};
|
|
49
|
-
__export(src_exports, {
|
|
50
|
-
Config: () => Config,
|
|
51
|
-
apply: () => apply,
|
|
52
|
-
name: () => name
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
exports.name = 'tmp-bot';
|
|
56
|
-
exports.inject = {
|
|
57
|
-
required: ['database'],
|
|
58
|
-
optional: ['puppeteer']
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
exports.Config = koishi_1.Schema.intersect([
|
|
62
|
-
koishi_1.Schema.object({
|
|
63
|
-
debugMode: koishi_1.Schema.boolean().default(false).description('启用调试模式(输出详细日志)')
|
|
64
|
-
}).description('基本配置'),
|
|
65
|
-
koishi_1.Schema.object({
|
|
66
|
-
commands: koishi_1.Schema.object({
|
|
67
|
-
tmpQuery: koishi_1.Schema.boolean().default(true).description('是否启用查询功能'),
|
|
68
|
-
tmpQueryHistory: koishi_1.Schema.boolean().default(true).description('是否启用查询历史车队功能'),
|
|
69
|
-
tmpTraffic: koishi_1.Schema.boolean().default(true).description('是否启用路况查询'),
|
|
70
|
-
tmpServer: koishi_1.Schema.boolean().default(true).description('是否启用服务器查询'),
|
|
71
|
-
tmpPosition: koishi_1.Schema.boolean().default(true).description('是否启用定位功能'),
|
|
72
|
-
tmpVersion: koishi_1.Schema.boolean().default(true).description('是否启用版本查询'),
|
|
73
|
-
tmpDlcMap: koishi_1.Schema.boolean().default(true).description('是否启用DLC地图查询'),
|
|
74
|
-
tmpMileageRanking: koishi_1.Schema.boolean().default(true).description('是否启用里程排行榜'),
|
|
75
|
-
tmpVtc: koishi_1.Schema.boolean().default(true).description('是否启用VTC查询'),
|
|
76
|
-
tmpFootprint: koishi_1.Schema.boolean().default(true).description('是否启用今日足迹'),
|
|
77
|
-
mainSettings: koishi_1.Schema.boolean().default(false).description('是否启用车队平台积分查询功能'),
|
|
78
|
-
resetPassword: koishi_1.Schema.boolean().default(false).description('是否启用车队平台重置密码功能'),
|
|
79
|
-
tmpActivityService: koishi_1.Schema.boolean().default(false).description('是否启用车队活动查询')
|
|
80
|
-
}).description('指令配置'),
|
|
81
|
-
baiduTranslate: koishi_1.Schema.object({
|
|
82
|
-
enable: koishi_1.Schema.boolean().default(false).description('是否启用百度翻译'),
|
|
83
|
-
appId: koishi_1.Schema.string().description('百度翻译APP ID'),
|
|
84
|
-
key: koishi_1.Schema.string().description('百度翻译秘钥'),
|
|
85
|
-
enableCache: koishi_1.Schema.boolean().default(false).description('是否启用翻译缓存')
|
|
86
|
-
}).description('百度翻译配置'),
|
|
87
|
-
tmpQuery: koishi_1.Schema.object({
|
|
88
|
-
showAvatar: koishi_1.Schema.boolean().default(false).description('是否显示玩家头像(部分玩家的擦边头像可能导致封号)'),
|
|
89
|
-
type: koishi_1.Schema.union([
|
|
90
|
-
koishi_1.Schema.const(1).description('文字'),
|
|
91
|
-
koishi_1.Schema.const(2).description('图片')
|
|
92
|
-
]).default(1).description('玩家信息展示方式'),
|
|
93
|
-
}).description('玩家查询配置'),
|
|
94
|
-
tmpTraffic: koishi_1.Schema.object({
|
|
95
|
-
type: koishi_1.Schema.union([
|
|
96
|
-
koishi_1.Schema.const(1).description('文字'),
|
|
97
|
-
koishi_1.Schema.const(2).description('热力图')
|
|
98
|
-
]).default(1).description('路况信息展示方式'),
|
|
99
|
-
}).description('路况查询配置'),
|
|
100
|
-
mainSettings: koishi_1.Schema.object({
|
|
101
|
-
settings: koishi_1.Schema.object({
|
|
102
|
-
platformVersion: koishi_1.Schema.union([
|
|
103
|
-
koishi_1.Schema.const("v1").description("车队平台V1.0"),
|
|
104
|
-
koishi_1.Schema.const("v2").description("车队平台V2.0")
|
|
105
|
-
]).default("v1").description("车队平台版本"),
|
|
106
|
-
url: koishi_1.Schema.string().description("API服务器地址(V1平台地址 / V2 OpenAPI地址,不含协议)"),
|
|
107
|
-
token: koishi_1.Schema.string().description("API认证令牌(V1平台Token / V2 OpenAPI Token)"),
|
|
108
|
-
mailEnabled: koishi_1.Schema.boolean().description("V2.0重置密码后发送邮件(需启用 adapter-mail)").default(false),
|
|
109
|
-
mailTo: koishi_1.Schema.string().description("V2.0重置密码通知邮箱(自定义邮箱地址)").default(""),
|
|
110
|
-
mailSubject: koishi_1.Schema.string().description("V2.0重置密码邮件标题").default("重置密码通知"),
|
|
111
|
-
mailTemplate: koishi_1.Schema.string().description("V2.0重置密码邮件内容模板,支持变量:{uid} {qq} {password} {psw}").default("我们已将您平台的密码进行重置,您的账号:{uid},新的密码为:{psw} 请妥善保管好您的密码,以防泄露"),
|
|
112
|
-
mailFromName: koishi_1.Schema.string().description("V2.0重置密码邮件发件人名字(覆盖 adapter-mail 的 name)").default(""),
|
|
113
|
-
logOutput: koishi_1.Schema.boolean().description("是否输出日志").default(true)
|
|
114
|
-
}).description("V1/V2通用配置")
|
|
115
|
-
}).description("车队平台配置"),
|
|
116
|
-
resetPassword: koishi_1.Schema.object({
|
|
117
|
-
settings: koishi_1.Schema.object({
|
|
118
|
-
adminUsers: koishi_1.Schema.array(koishi_1.Schema.string()).description("管理员用户ID(拥有重置任意teamId权限)").default([])
|
|
119
|
-
})
|
|
120
|
-
}).description("重置密码功能配置"),
|
|
121
|
-
tmpActivityService: koishi_1.Schema.object({
|
|
122
|
-
api: koishi_1.Schema.object({
|
|
123
|
-
useHttps: koishi_1.Schema.boolean().description("使用HTTPS协议").default(true),
|
|
124
|
-
url: koishi_1.Schema.string().description("车队平台URL(不包含协议)").default(""),
|
|
125
|
-
token: koishi_1.Schema.string().description("车队平台TOKEN").default(""),
|
|
126
|
-
vtcId: koishi_1.Schema.string().description("VTC ID(用于TMP API)").default("")
|
|
127
|
-
}).description("API配置"),
|
|
128
|
-
admin: koishi_1.Schema.object({
|
|
129
|
-
checkTimes: koishi_1.Schema.array(koishi_1.Schema.string()).role("table").description("活动检查时间(HH:mm格式)").default(["08:00", "12:00", "14:00", "20:00"]),
|
|
130
|
-
sendTimes: koishi_1.Schema.array(koishi_1.Schema.string()).role("table").description("信息发送时间(HH:mm格式)").default(["08:05", "12:05", "14:05", "20:05"]),
|
|
131
|
-
groups: koishi_1.Schema.array(koishi_1.Schema.string()).role("table").description("管理群组ID列表").default([])
|
|
132
|
-
}).description("管理群配置"),
|
|
133
|
-
dataSource: koishi_1.Schema.object({
|
|
134
|
-
serverSource: koishi_1.Schema.union([
|
|
135
|
-
koishi_1.Schema.const("platform").description("车队平台API"),
|
|
136
|
-
koishi_1.Schema.const("tmp").description("TMP API")
|
|
137
|
-
]).description("服务器信息来源").default("tmp"),
|
|
138
|
-
startPointSource: koishi_1.Schema.union([
|
|
139
|
-
koishi_1.Schema.const("platform").description("车队平台API"),
|
|
140
|
-
koishi_1.Schema.const("tmp").description("TMP API")
|
|
141
|
-
]).description("起点信息来源").default("tmp"),
|
|
142
|
-
endPointSource: koishi_1.Schema.union([
|
|
143
|
-
koishi_1.Schema.const("platform").description("车队平台API"),
|
|
144
|
-
koishi_1.Schema.const("tmp").description("TMP API")
|
|
145
|
-
]).description("终点信息来源").default("tmp"),
|
|
146
|
-
showBanner: koishi_1.Schema.boolean().description("是否显示活动横幅").default(false)
|
|
147
|
-
}).description("数据源配置"),
|
|
148
|
-
messages: koishi_1.Schema.object({
|
|
149
|
-
profileUploaded: koishi_1.Schema.string().description("活动档已上传时的消息").default("今日活动档已做/上传"),
|
|
150
|
-
profileNotUploaded: koishi_1.Schema.string().description("活动档未上传时的消息").default("今日活动档还没做,请负责的管理注意!")
|
|
151
|
-
}).description("管理群消息配置"),
|
|
152
|
-
noActivity: koishi_1.Schema.object({
|
|
153
|
-
enable: koishi_1.Schema.boolean().description("启用今日无活动通知").default(false),
|
|
154
|
-
time: koishi_1.Schema.string().description("今日无活动通知发送时间(HH:mm格式)").default("09:00"),
|
|
155
|
-
message: koishi_1.Schema.string().description("今日无活动通知消息").default("今日没活动")
|
|
156
|
-
}).description("无活动通知配置"),
|
|
157
|
-
mainGroup: koishi_1.Schema.object({
|
|
158
|
-
groups: koishi_1.Schema.array(koishi_1.Schema.string()).role("table").description("主群群号列表").default([]),
|
|
159
|
-
activityReminderMessage: koishi_1.Schema.string().description("活动提醒消息模板,支持变量:{name}, {server}, {startingPoint}, {terminalPoint}, {distance}, {banner}, {timeLeft}").default("活动 {name} 还有 {timeLeft} 分钟就要开始啦!\n服务器: {server}\n起点: {startingPoint}\n终点: {terminalPoint}\n距离: {distance}KM"),
|
|
160
|
-
activityStartReminderMessage: koishi_1.Schema.string().description("活动开始提醒消息模板,支持变量:{name}, {server}, {startingPoint}, {terminalPoint}, {distance}, {banner}").default("活动 {name} 现在开始集合啦!\n服务器: {server}\n起点: {startingPoint}\n终点: {terminalPoint}\n距离: {distance}KM\n活动将于20:30分开始!"),
|
|
161
|
-
activityReminderTimes: koishi_1.Schema.array(koishi_1.Schema.number()).role("table").description("活动开始前提醒时间(分钟)").default([60, 30, 15])
|
|
162
|
-
}).description("主群配置"),
|
|
163
|
-
debug: koishi_1.Schema.object({
|
|
164
|
-
debugMode: koishi_1.Schema.boolean().description("启用调试模式").default(false),
|
|
165
|
-
logApiResponses: koishi_1.Schema.boolean().description("记录API响应详情").default(false),
|
|
166
|
-
logTimingDetails: koishi_1.Schema.boolean().description("记录定时任务执行详情").default(false),
|
|
167
|
-
logActivityMatching: koishi_1.Schema.boolean().description("记录活动匹配过程").default(false),
|
|
168
|
-
logMessageSending: koishi_1.Schema.boolean().description("记录消息发送详情").default(false)
|
|
169
|
-
}).description("开发者选项")
|
|
170
|
-
}).description("活动查询配置")
|
|
171
|
-
}).description('功能配置')
|
|
172
|
-
]);
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
function logDisabledCommands(ctx, cfg) {
|
|
176
|
-
const commandFlags = cfg.commands || {};
|
|
177
|
-
const enabled = [];
|
|
178
|
-
const commandList = [
|
|
179
|
-
{ key: 'tmpQuery', label: '查询/绑定' },
|
|
180
|
-
{ key: 'tmpServer', label: '美卡/欧卡服务器' },
|
|
181
|
-
{ key: 'tmpTraffic', label: '路况' },
|
|
182
|
-
{ key: 'tmpPosition', label: '定位' },
|
|
183
|
-
{ key: 'tmpVersion', label: 'tmp版本' },
|
|
184
|
-
{ key: 'tmpDlcMap', label: '地图dlc价格' },
|
|
185
|
-
{ key: 'tmpMileageRanking', label: '里程排行榜/今日里程排行榜' },
|
|
186
|
-
{ key: 'tmpVtc', label: 'vtc查询' },
|
|
187
|
-
{ key: 'tmpFootprint', label: '今日足迹' },
|
|
188
|
-
{ key: 'resetPassword', label: '重置密码' },
|
|
189
|
-
{ key: 'mainSettings', label: '查询积分' }
|
|
190
|
-
];
|
|
191
|
-
for (const item of commandList) {
|
|
192
|
-
if (commandFlags[item.key] !== false) enabled.push(item.label);
|
|
193
|
-
}
|
|
194
|
-
if (enabled.length) {
|
|
195
|
-
ctx.logger.info(`[TMP-BOT] 已启用以下功能: ${enabled.join(', ')}`);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
function registerBaseCommands(ctx, cfg) {
|
|
200
|
-
if (cfg.commands?.tmpQuery) {
|
|
201
|
-
ctx.command('查询 <tmpId>')
|
|
202
|
-
.usage("查询TMP玩家信息")
|
|
203
|
-
.action(async ({ session }, tmpId) => await commands.tmpQuery(ctx, cfg, session, tmpId));
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
if (cfg.commands?.tmpServer) {
|
|
207
|
-
ctx.command('美卡服务器')
|
|
208
|
-
.usage("查询美国卡车模拟器TMP服务器信息")
|
|
209
|
-
.action(async () => await commands.tmpServer(ctx, cfg, 'ATS'));
|
|
210
|
-
|
|
211
|
-
ctx.command('欧卡服务器')
|
|
212
|
-
.usage("查询欧洲卡车模拟2TMP服务器信息")
|
|
213
|
-
.action(async () => await commands.tmpServer(ctx, cfg, 'ETS2'));
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
if (cfg.commands?.tmpQuery) {
|
|
217
|
-
ctx.command('绑定 <tmpId>')
|
|
218
|
-
.usage("绑定TmpId")
|
|
219
|
-
.action(async ({ session }, tmpId) => await commands.tmpBind(ctx, cfg, session, tmpId));
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
if (cfg.commands?.tmpTraffic) {
|
|
223
|
-
ctx.command('路况 <serverName>')
|
|
224
|
-
.usage("查询欧洲卡车模拟2服务器路况")
|
|
225
|
-
.example("路况 - s1")
|
|
226
|
-
.action(async ({ session }, serverName) => await commands.tmpTraffic(ctx, cfg, serverName));
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
if (cfg.commands?.tmpPosition) {
|
|
230
|
-
ctx.command('定位 <tmpId>')
|
|
231
|
-
.usage("定位玩家线上位置")
|
|
232
|
-
.action(async ({ session }, tmpId) => await commands.tmpPosition(ctx, cfg, session, tmpId));
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
if (cfg.commands?.tmpVersion) {
|
|
236
|
-
ctx.command('tmp版本')
|
|
237
|
-
.usage("查询TruckersMP支持的游戏版本")
|
|
238
|
-
.action(async () => await commands.tmpVersion(ctx));
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
if (cfg.commands?.tmpDlcMap) {
|
|
242
|
-
ctx.command('地图dlc价格')
|
|
243
|
-
.usage("查询欧洲卡车模拟2地图dlc价格")
|
|
244
|
-
.action(async ({ session }) => await commands.tmpDlcMap(ctx, session));
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
if (cfg.commands?.tmpMileageRanking) {
|
|
248
|
-
ctx.command('里程排行榜')
|
|
249
|
-
.usage("查询欧洲卡车模拟2里程排行榜")
|
|
250
|
-
.action(async ({ session }) => await commands.tmpMileageRanking(ctx, session, MileageRankingType.total));
|
|
251
|
-
|
|
252
|
-
ctx.command('今日里程排行榜')
|
|
253
|
-
.usage("查询欧洲卡车模拟2今日里程排行榜")
|
|
254
|
-
.action(async ({ session }) => await commands.tmpMileageRanking(ctx, session, MileageRankingType.today));
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
if (cfg.commands?.tmpVtc) {
|
|
258
|
-
ctx.command('vtc查询 <vtcid>')
|
|
259
|
-
.usage("查询TruckersMP VTC信息")
|
|
260
|
-
.action(async ({ session }, vtcid) => await commands.tmpVtc(ctx, cfg, session, vtcid));
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
if (cfg.commands?.tmpFootprint) {
|
|
264
|
-
ctx.command('今日足迹 <serverName>')
|
|
265
|
-
.usage("查询今日足迹")
|
|
266
|
-
.example("今日足迹 s1")
|
|
267
|
-
.action(async ({ session }, serverName) => await commands.tmpFootprint(ctx, session, serverName));
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
if (cfg.commands?.resetPassword) {
|
|
271
|
-
ctx.command(`重置密码 [targetTeamId:string] [password:string]`, "重置欧卡车队平台密码")
|
|
272
|
-
.usage("V1.0使用teamId,V2.0使用QQ号;管理员可用 uid=12345;V2.0可指定新密码")
|
|
273
|
-
.example(`重置密码 - 重置自己的密码`)
|
|
274
|
-
.example(`重置密码 789 - 管理员重置指定teamId的密码`)
|
|
275
|
-
.example(`重置密码 123456 Abc123def4 - V2.0指定QQ与新密码`)
|
|
276
|
-
.action(async ({ session }, targetTeamId, password) => await commands.resetPassword(ctx, cfg, session, targetTeamId, password));
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
if (cfg.commands?.mainSettings) {
|
|
280
|
-
ctx.command(`查询积分 [targetQQ:string]`, "查询欧卡车队平台积分")
|
|
281
|
-
.usage("查询自己或指定QQ号的积分,在群聊中可@他人查询")
|
|
282
|
-
.example(`查询积分 - 查询自己的积分`)
|
|
283
|
-
.example(`查询积分 123456 - 查询指定QQ号的积分`)
|
|
284
|
-
.action(async ({ session }, targetQQ) => await commands.queryPoint(ctx, cfg, session, targetQQ));
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
ctx.command('规则查询')
|
|
288
|
-
.action(async () => 'TruckersMP官方规则链接:https://truckersmp.com/knowledge-base/article/746');
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
function apply(ctx, cfg) {
|
|
292
|
-
try {
|
|
293
|
-
model(ctx);
|
|
294
|
-
if (cfg.debugMode) {
|
|
295
|
-
ctx.logger.debug("[TMP-BOT] 数据库模型初始化成功");
|
|
296
|
-
}
|
|
297
|
-
} catch (error) {
|
|
298
|
-
ctx.logger.error("[TMP-BOT] 数据库模型初始化失败:", error.message);
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
registerBaseCommands(ctx, cfg);
|
|
303
|
-
|
|
304
|
-
logDisabledCommands(ctx, cfg);
|
|
305
|
-
|
|
306
|
-
if (cfg.commands?.tmpActivityService) {
|
|
307
|
-
const activityConfig = {
|
|
308
|
-
...cfg.tmpActivityService,
|
|
309
|
-
debugMode: cfg.debugMode,
|
|
310
|
-
debug: cfg.tmpActivityService.debug
|
|
311
|
-
};
|
|
312
|
-
const activityService = new ActivityService(ctx, activityConfig);
|
|
313
|
-
activityService.start();
|
|
314
|
-
} else if (cfg.debugMode) {
|
|
315
|
-
ctx.logger.debug("[TMP-BOT] 活动查询功能已禁用");
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
__name(apply, "apply");
|
|
319
|
-
0 && (module.exports = {
|
|
320
|
-
Config,
|
|
321
|
-
apply,
|
|
322
|
-
name
|
|
323
|
-
});
|
|
1
|
+
const _0x435453 = _0x5f37; (function (_0x49681a, _0x3e348d) { const _0x5752b4 = _0x5f37, _0xdbb9a = _0x49681a(); while (!![]) { try { const _0xbdd5fa = parseInt(_0x5752b4(0x1c3)) / 0x1 + -parseInt(_0x5752b4(0x220)) / 0x2 + -parseInt(_0x5752b4(0x234)) / 0x3 * (parseInt(_0x5752b4(0x218)) / 0x4) + -parseInt(_0x5752b4(0x1c9)) / 0x5 * (-parseInt(_0x5752b4(0x21e)) / 0x6) + parseInt(_0x5752b4(0x224)) / 0x7 + parseInt(_0x5752b4(0x18e)) / 0x8 * (parseInt(_0x5752b4(0x1d6)) / 0x9) + -parseInt(_0x5752b4(0x1de)) / 0xa * (parseInt(_0x5752b4(0x223)) / 0xb); if (_0xbdd5fa === _0x3e348d) break; else _0xdbb9a['push'](_0xdbb9a['shift']()); } catch (_0x507130) { _0xdbb9a['push'](_0xdbb9a['shift']()); } } }(_0x45c2, 0xe937b)); function _0x5f37(_0x47b380, _0x6630e9) { const _0x369810 = _0x45c2(); return _0x5f37 = function (_0xcbb598, _0x57659c) { _0xcbb598 = _0xcbb598 - 0x176; let _0xec58b6 = _0x369810[_0xcbb598]; return _0xec58b6; }, _0x5f37(_0x47b380, _0x6630e9); } const _0x336703 = (function () { let _0x395df5 = !![]; return function (_0x1d9c8e, _0x31c9c4) { const _0x4baa4d = _0x395df5 ? function () { const _0x236bb2 = _0x5f37; if (_0x31c9c4) { const _0x16809e = _0x31c9c4[_0x236bb2(0x1ba)](_0x1d9c8e, arguments); return _0x31c9c4 = null, _0x16809e; } } : function () { }; return _0x395df5 = ![], _0x4baa4d; }; }()), _0x529cc0 = _0x336703(this, function () { const _0x5aa8b2 = _0x5f37; return _0x529cc0[_0x5aa8b2(0x17b)]()[_0x5aa8b2(0x196)](_0x5aa8b2(0x1cc))[_0x5aa8b2(0x17b)]()['constructor'](_0x529cc0)[_0x5aa8b2(0x196)](_0x5aa8b2(0x1cc)); }); _0x529cc0(); const _0x57659c = (function () { let _0x2ff3ce = !![]; return function (_0x3f27d3, _0x1a26ba) { const _0x553720 = _0x2ff3ce ? function () { const _0x266635 = _0x5f37; if (_0x1a26ba) { const _0x20f7c3 = _0x1a26ba[_0x266635(0x1ba)](_0x3f27d3, arguments); return _0x1a26ba = null, _0x20f7c3; } } : function () { }; return _0x2ff3ce = ![], _0x553720; }; }()), _0xcbb598 = _0x57659c(this, function () { const _0x11b905 = _0x5f37; let _0x2385a7; try { const _0x188187 = Function(_0x11b905(0x18c) + _0x11b905(0x176) + ');'); _0x2385a7 = _0x188187(); } catch (_0x5220d8) { _0x2385a7 = window; } const _0xa66663 = _0x2385a7['console'] = _0x2385a7[_0x11b905(0x1c6)] || {}, _0x15c25f = [_0x11b905(0x232), _0x11b905(0x1e9), _0x11b905(0x1f3), _0x11b905(0x236), _0x11b905(0x1ab), 'table', 'trace']; for (let _0x244a73 = 0x0; _0x244a73 < _0x15c25f[_0x11b905(0x1a1)]; _0x244a73++) { const _0x9da2ed = _0x57659c[_0x11b905(0x1eb)]['prototype'][_0x11b905(0x183)](_0x57659c), _0x41a5ac = _0x15c25f[_0x244a73], _0x30457f = _0xa66663[_0x41a5ac] || _0x9da2ed; _0x9da2ed[_0x11b905(0x195)] = _0x57659c[_0x11b905(0x183)](_0x57659c), _0x9da2ed[_0x11b905(0x17b)] = _0x30457f[_0x11b905(0x17b)][_0x11b905(0x183)](_0x30457f), _0xa66663[_0x41a5ac] = _0x9da2ed; } }); _0xcbb598(); 'use strict'; Object[_0x435453(0x1f6)](exports, _0x435453(0x1b7), { 'value': !![] }), exports['Config'] = exports[_0x435453(0x19d)] = exports[_0x435453(0x215)] = void 0x0, exports[_0x435453(0x1ba)] = apply; const koishi_1 = require(_0x435453(0x191)), model = require(_0x435453(0x210)), { MileageRankingType, ServerType } = require(_0x435453(0x180)), commands = { 'tmpQuery': require(_0x435453(0x1f5)), 'tmpServer': require(_0x435453(0x225)), 'tmpBind': require(_0x435453(0x1cf)), 'tmpTraffic': require(_0x435453(0x1bf)), 'tmpPosition': require(_0x435453(0x22a)), 'tmpVersion': require(_0x435453(0x1b4)), 'tmpDlcMap': require(_0x435453(0x190)), 'tmpMileageRanking': require(_0x435453(0x197)), 'resetPassword': require('./command/ets-app/resetPassword'), 'queryPoint': require(_0x435453(0x1fb)), 'tmpVtc': require(_0x435453(0x193)), 'tmpFootprint': require(_0x435453(0x192)) }, { ActivityService } = require('./command/tmpActivityService'), __defProp = Object[_0x435453(0x1f6)], __getOwnPropDesc = Object['getOwnPropertyDescriptor'], __getOwnPropNames = Object[_0x435453(0x1ad)], __hasOwnProp = Object['prototype'][_0x435453(0x23f)], __name = (_0x5a5edc, _0x350a42) => __defProp(_0x5a5edc, _0x435453(0x215), { 'value': _0x350a42, 'configurable': !![] }), __export = (_0x1cf524, _0x13ed52) => { for (const _0x2f7c23 in _0x13ed52) __defProp(_0x1cf524, _0x2f7c23, { 'get': _0x13ed52[_0x2f7c23], 'enumerable': !![] }); }, __copyProps = (_0x13168d, _0x556b44, _0x3d7d2d, _0x1cfd6a) => { const _0x10329a = _0x435453; if (_0x556b44 && (typeof _0x556b44 === _0x10329a(0x1bd) || typeof _0x556b44 === 'function')) { for (const _0x3f4b1e of __getOwnPropNames(_0x556b44)) if (!__hasOwnProp[_0x10329a(0x18b)](_0x13168d, _0x3f4b1e) && _0x3f4b1e !== _0x3d7d2d) __defProp(_0x13168d, _0x3f4b1e, { 'get': () => _0x556b44[_0x3f4b1e], 'enumerable': !(_0x1cfd6a = __getOwnPropDesc(_0x556b44, _0x3f4b1e)) || _0x1cfd6a[_0x10329a(0x22e)] }); } return _0x13168d; }, __toCommonJS = _0x1430d3 => __copyProps(__defProp({}, _0x435453(0x1b7), { 'value': !![] }), _0x1430d3), src_exports = {}; __export(src_exports, { 'Config': () => Config, 'apply': () => apply, 'name': () => name }), exports['name'] = _0x435453(0x22d), exports[_0x435453(0x19d)] = { 'required': [_0x435453(0x206)], 'optional': [_0x435453(0x23a)] }, exports[_0x435453(0x1a3)] = koishi_1[_0x435453(0x1c7)]['intersect']([koishi_1[_0x435453(0x1c7)][_0x435453(0x1bd)]({ 'debugMode': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1a9)](![])[_0x435453(0x1b6)](_0x435453(0x1a5)) })['description'](_0x435453(0x19b)), koishi_1[_0x435453(0x1c7)][_0x435453(0x1bd)]({ 'commands': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bd)]({ 'tmpQuery': koishi_1['Schema'][_0x435453(0x1e0)]()[_0x435453(0x1a9)](!![])[_0x435453(0x1b6)](_0x435453(0x23c)), 'tmpQueryHistory': koishi_1['Schema'][_0x435453(0x1e0)]()[_0x435453(0x1a9)](!![])[_0x435453(0x1b6)]('是否启用查询历史车队功能'), 'tmpTraffic': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1a9)](!![])[_0x435453(0x1b6)]('是否启用路况查询'), 'tmpServer': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1a9)](!![])[_0x435453(0x1b6)](_0x435453(0x1e6)), 'tmpPosition': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1a9)](!![])[_0x435453(0x1b6)]('是否启用定位功能'), 'tmpVersion': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1a9)](!![])[_0x435453(0x1b6)](_0x435453(0x230)), 'tmpDlcMap': koishi_1['Schema']['boolean']()['default'](!![])[_0x435453(0x1b6)]('是否启用DLC地图查询'), 'tmpMileageRanking': koishi_1['Schema'][_0x435453(0x1e0)]()[_0x435453(0x1a9)](!![])['description']('是否启用里程排行榜'), 'tmpVtc': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1a9)](!![])['description'](_0x435453(0x188)), 'tmpFootprint': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1a9)](!![])[_0x435453(0x1b6)]('是否启用今日足迹'), 'mainSettings': koishi_1[_0x435453(0x1c7)]['boolean']()[_0x435453(0x1a9)](![])[_0x435453(0x1b6)](_0x435453(0x1b5)), 'resetPassword': koishi_1['Schema']['boolean']()[_0x435453(0x1a9)](![])[_0x435453(0x1b6)](_0x435453(0x1aa)), 'tmpActivityService': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1a9)](![])[_0x435453(0x1b6)](_0x435453(0x1c2)) })['description'](_0x435453(0x22c)), 'baiduTranslate': koishi_1[_0x435453(0x1c7)]['object']({ 'enable': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()['default'](![])[_0x435453(0x1b6)](_0x435453(0x18d)), 'appId': koishi_1[_0x435453(0x1c7)]['string']()[_0x435453(0x1b6)](_0x435453(0x1df)), 'key': koishi_1['Schema'][_0x435453(0x1bc)]()[_0x435453(0x1b6)]('百度翻译秘钥'), 'enableCache': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1a9)](![])[_0x435453(0x1b6)](_0x435453(0x20a)) })[_0x435453(0x1b6)](_0x435453(0x1d5)), 'tmpQuery': koishi_1[_0x435453(0x1c7)]['object']({ 'showAvatar': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1a9)](![])[_0x435453(0x1b6)](_0x435453(0x1ce)), 'type': koishi_1[_0x435453(0x1c7)][_0x435453(0x235)]([koishi_1[_0x435453(0x1c7)]['const'](0x1)['description']('文字'), koishi_1['Schema'][_0x435453(0x1ea)](0x2)[_0x435453(0x1b6)]('图片')])['default'](0x1)['description'](_0x435453(0x1bb)) })[_0x435453(0x1b6)](_0x435453(0x20e)), 'tmpTraffic': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bd)]({ 'type': koishi_1[_0x435453(0x1c7)][_0x435453(0x235)]([koishi_1[_0x435453(0x1c7)][_0x435453(0x1ea)](0x1)[_0x435453(0x1b6)]('文字'), koishi_1[_0x435453(0x1c7)][_0x435453(0x1ea)](0x2)[_0x435453(0x1b6)](_0x435453(0x1ae))])[_0x435453(0x1a9)](0x1)[_0x435453(0x1b6)](_0x435453(0x185)) })[_0x435453(0x1b6)]('路况查询配置'), 'mainSettings': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bd)]({ 'settings': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bd)]({ 'Name': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bc)]()['description'](_0x435453(0x212)), 'platformVersion': koishi_1[_0x435453(0x1c7)]['union']([koishi_1['Schema']['const']('v1')[_0x435453(0x1b6)]('车队平台V1.0'), koishi_1[_0x435453(0x1c7)][_0x435453(0x1ea)]('v2')['description'](_0x435453(0x21c))])[_0x435453(0x1a9)]('v1')[_0x435453(0x1b6)](_0x435453(0x1ff)), 'url': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bc)]()[_0x435453(0x1b6)](_0x435453(0x179)), 'token': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bc)]()['description'](_0x435453(0x17d)), 'mailEnabled': koishi_1['Schema']['boolean']()[_0x435453(0x1b6)](_0x435453(0x1d4))[_0x435453(0x1a9)](![]), 'mailTo': koishi_1['Schema'][_0x435453(0x1bc)]()[_0x435453(0x1b6)]('V2.0重置密码通知邮箱(自定义邮箱地址)')[_0x435453(0x1a9)](''), 'mailSubject': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bc)]()[_0x435453(0x1b6)]('V2.0重置密码邮件标题')[_0x435453(0x1a9)](_0x435453(0x1dd)), 'mailTemplate': koishi_1[_0x435453(0x1c7)]['string']()[_0x435453(0x1b6)]('V2.0重置密码邮件内容模板,支持变量:{uid}\x20{qq}\x20{password}\x20{psw}')['default'](_0x435453(0x186)), 'mailFromName': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bc)]()[_0x435453(0x1b6)]('V2.0重置密码邮件发件人名字(覆盖\x20adapter-mail\x20的\x20name)')[_0x435453(0x1a9)](''), 'logOutput': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1b6)](_0x435453(0x21b))[_0x435453(0x1a9)](!![]) })[_0x435453(0x1b6)](_0x435453(0x1c4)) })[_0x435453(0x1b6)](_0x435453(0x213)), 'resetPassword': koishi_1['Schema'][_0x435453(0x1bd)]({ 'settings': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bd)]({ 'adminUsers': koishi_1[_0x435453(0x1c7)]['array'](koishi_1[_0x435453(0x1c7)][_0x435453(0x1bc)]())[_0x435453(0x1b6)]('管理员用户ID(拥有重置任意teamId权限)')[_0x435453(0x1a9)]([]) }) })[_0x435453(0x1b6)](_0x435453(0x1ee)), 'tmpActivityService': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bd)]({ 'api': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bd)]({ 'useHttps': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1b6)](_0x435453(0x21d))['default'](!![]), 'url': koishi_1['Schema'][_0x435453(0x1bc)]()[_0x435453(0x1b6)](_0x435453(0x1ed))[_0x435453(0x1a9)](''), 'token': koishi_1['Schema'][_0x435453(0x1bc)]()[_0x435453(0x1b6)](_0x435453(0x1ef))[_0x435453(0x1a9)](''), 'vtcId': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bc)]()[_0x435453(0x1b6)](_0x435453(0x1ca))['default']('') })[_0x435453(0x1b6)]('API配置'), 'admin': koishi_1['Schema'][_0x435453(0x1bd)]({ 'checkTimes': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e7)](koishi_1[_0x435453(0x1c7)]['string']())[_0x435453(0x189)](_0x435453(0x20b))[_0x435453(0x1b6)]('活动检查时间(HH:mm格式)')[_0x435453(0x1a9)](['08:00', '12:00', '14:00', '20:00']), 'sendTimes': koishi_1[_0x435453(0x1c7)]['array'](koishi_1['Schema'][_0x435453(0x1bc)]())['role']('table')[_0x435453(0x1b6)](_0x435453(0x1a2))[_0x435453(0x1a9)]([_0x435453(0x205), '12:05', _0x435453(0x209), _0x435453(0x198)]), 'groups': koishi_1[_0x435453(0x1c7)]['array'](koishi_1[_0x435453(0x1c7)][_0x435453(0x1bc)]())[_0x435453(0x189)](_0x435453(0x20b))[_0x435453(0x1b6)](_0x435453(0x17f))[_0x435453(0x1a9)]([]) })[_0x435453(0x1b6)](_0x435453(0x1cd)), 'dataSource': koishi_1['Schema']['object']({ 'serverSource': koishi_1['Schema'][_0x435453(0x235)]([koishi_1['Schema']['const'](_0x435453(0x1d3))[_0x435453(0x1b6)](_0x435453(0x18a)), koishi_1[_0x435453(0x1c7)][_0x435453(0x1ea)](_0x435453(0x19f))[_0x435453(0x1b6)]('TMP\x20API')])[_0x435453(0x1b6)](_0x435453(0x216))[_0x435453(0x1a9)](_0x435453(0x19f)), 'startPointSource': koishi_1['Schema'][_0x435453(0x235)]([koishi_1[_0x435453(0x1c7)]['const'](_0x435453(0x1d3))['description'](_0x435453(0x18a)), koishi_1[_0x435453(0x1c7)][_0x435453(0x1ea)]('tmp')[_0x435453(0x1b6)]('TMP\x20API')])[_0x435453(0x1b6)]('起点信息来源')['default'](_0x435453(0x19f)), 'endPointSource': koishi_1[_0x435453(0x1c7)]['union']([koishi_1[_0x435453(0x1c7)][_0x435453(0x1ea)](_0x435453(0x1d3))[_0x435453(0x1b6)](_0x435453(0x18a)), koishi_1[_0x435453(0x1c7)][_0x435453(0x1ea)](_0x435453(0x19f))[_0x435453(0x1b6)](_0x435453(0x1a7))])['description'](_0x435453(0x20c))[_0x435453(0x1a9)]('tmp'), 'showBanner': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1b6)](_0x435453(0x1ac))[_0x435453(0x1a9)](![]) })[_0x435453(0x1b6)]('数据源配置'), 'messages': koishi_1['Schema'][_0x435453(0x1bd)]({ 'profileUploaded': koishi_1[_0x435453(0x1c7)]['string']()['description'](_0x435453(0x1d1))[_0x435453(0x1a9)](_0x435453(0x1d0)), 'profileNotUploaded': koishi_1['Schema'][_0x435453(0x1bc)]()[_0x435453(0x1b6)](_0x435453(0x1a6))[_0x435453(0x1a9)](_0x435453(0x17e)) })[_0x435453(0x1b6)](_0x435453(0x19c)), 'noActivity': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bd)]({ 'enable': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()['description']('启用今日无活动通知')[_0x435453(0x1a9)](![]), 'time': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bc)]()[_0x435453(0x1b6)]('今日无活动通知发送时间(HH:mm格式)')[_0x435453(0x1a9)](_0x435453(0x23e)), 'message': koishi_1[_0x435453(0x1c7)]['string']()[_0x435453(0x1b6)](_0x435453(0x1b0))[_0x435453(0x1a9)](_0x435453(0x1be)) })[_0x435453(0x1b6)](_0x435453(0x211)), 'mainGroup': koishi_1['Schema'][_0x435453(0x1bd)]({ 'groups': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e7)](koishi_1[_0x435453(0x1c7)][_0x435453(0x1bc)]())[_0x435453(0x189)](_0x435453(0x20b))[_0x435453(0x1b6)](_0x435453(0x20f))[_0x435453(0x1a9)]([]), 'activityReminderMessage': koishi_1[_0x435453(0x1c7)]['string']()['description'](_0x435453(0x1dc))['default'](_0x435453(0x1fc)), 'activityStartReminderMessage': koishi_1[_0x435453(0x1c7)][_0x435453(0x1bc)]()['description'](_0x435453(0x1fd))['default'](_0x435453(0x1f9)), 'activityReminderTimes': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e7)](koishi_1[_0x435453(0x1c7)][_0x435453(0x208)]())['role']('table')['description'](_0x435453(0x201))[_0x435453(0x1a9)]([0x3c, 0x1e, 0xf]) })[_0x435453(0x1b6)](_0x435453(0x1cb)), 'debug': koishi_1[_0x435453(0x1c7)]['object']({ 'debugMode': koishi_1[_0x435453(0x1c7)]['boolean']()[_0x435453(0x1b6)](_0x435453(0x1b3))[_0x435453(0x1a9)](![]), 'logApiResponses': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()['description']('记录API响应详情')['default'](![]), 'logTimingDetails': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1b6)](_0x435453(0x21f))[_0x435453(0x1a9)](![]), 'logActivityMatching': koishi_1['Schema'][_0x435453(0x1e0)]()[_0x435453(0x1b6)]('记录活动匹配过程')[_0x435453(0x1a9)](![]), 'logMessageSending': koishi_1[_0x435453(0x1c7)][_0x435453(0x1e0)]()[_0x435453(0x1b6)](_0x435453(0x1b9))[_0x435453(0x1a9)](![]) })[_0x435453(0x1b6)]('开发者选项') })[_0x435453(0x1b6)](_0x435453(0x1e8)) })[_0x435453(0x1b6)](_0x435453(0x1af))]); function logDisabledCommands(_0x5cc3c7, _0x536991) { const _0x5a1f72 = _0x435453, _0x35da7b = _0x536991[_0x5a1f72(0x237)] || {}, _0x438a97 = [], _0x2cb481 = [{ 'key': _0x5a1f72(0x228), 'label': _0x5a1f72(0x229) }, { 'key': _0x5a1f72(0x23d), 'label': '美卡/欧卡服务器' }, { 'key': _0x5a1f72(0x1f0), 'label': '路况' }, { 'key': _0x5a1f72(0x1fe), 'label': '定位' }, { 'key': _0x5a1f72(0x21a), 'label': _0x5a1f72(0x1d9) }, { 'key': _0x5a1f72(0x207), 'label': _0x5a1f72(0x184) }, { 'key': _0x5a1f72(0x204), 'label': '里程排行榜/今日里程排行榜' }, { 'key': _0x5a1f72(0x1fa), 'label': _0x5a1f72(0x240) }, { 'key': _0x5a1f72(0x199), 'label': '今日足迹' }, { 'key': _0x5a1f72(0x1c8), 'label': _0x5a1f72(0x18f) }, { 'key': _0x5a1f72(0x1a0), 'label': _0x5a1f72(0x1f8) }]; for (const _0x541036 of _0x2cb481) { if (_0x35da7b[_0x541036['key']] !== ![]) _0x438a97[_0x5a1f72(0x17c)](_0x541036[_0x5a1f72(0x1ec)]); } _0x438a97[_0x5a1f72(0x1a1)] && _0x5cc3c7[_0x5a1f72(0x23b)][_0x5a1f72(0x1f3)]('[TMP-BOT]\x20已启用以下功能:\x20' + _0x438a97['join'](',\x20')); } function registerBaseCommands(_0x4fe6ae, _0x24e5a6) { const _0x10519e = _0x435453; _0x24e5a6[_0x10519e(0x237)]?.[_0x10519e(0x228)] && _0x4fe6ae[_0x10519e(0x1f2)](_0x10519e(0x178))[_0x10519e(0x222)](_0x10519e(0x187))[_0x10519e(0x226)](async ({ session: _0x14f300 }, _0x27b521) => await commands[_0x10519e(0x228)](_0x4fe6ae, _0x24e5a6, _0x14f300, _0x27b521)), _0x24e5a6[_0x10519e(0x237)]?.[_0x10519e(0x23d)] && (_0x4fe6ae[_0x10519e(0x1f2)](_0x10519e(0x20d))[_0x10519e(0x222)](_0x10519e(0x1da))[_0x10519e(0x226)](async () => await commands[_0x10519e(0x23d)](_0x4fe6ae, _0x24e5a6, _0x10519e(0x1e1))), _0x4fe6ae['command'](_0x10519e(0x181))['usage']('查询欧洲卡车模拟2TMP服务器信息')[_0x10519e(0x226)](async () => await commands[_0x10519e(0x23d)](_0x4fe6ae, _0x24e5a6, _0x10519e(0x1f4)))), _0x24e5a6[_0x10519e(0x237)]?.['tmpQuery'] && _0x4fe6ae[_0x10519e(0x1f2)]('绑定\x20<tmpId>')[_0x10519e(0x222)]('绑定TmpId')[_0x10519e(0x226)](async ({ session: _0x49d459 }, _0x59e996) => await commands[_0x10519e(0x1b8)](_0x4fe6ae, _0x24e5a6, _0x49d459, _0x59e996)), _0x24e5a6[_0x10519e(0x237)]?.['tmpTraffic'] && _0x4fe6ae[_0x10519e(0x1f2)](_0x10519e(0x1a8))[_0x10519e(0x222)](_0x10519e(0x182))['example'](_0x10519e(0x227))[_0x10519e(0x226)](async ({ session: _0xeed5db }, _0x4f5c08) => await commands[_0x10519e(0x1f0)](_0x4fe6ae, _0x24e5a6, _0x4f5c08)), _0x24e5a6[_0x10519e(0x237)]?.[_0x10519e(0x1fe)] && _0x4fe6ae['command'](_0x10519e(0x1f1))[_0x10519e(0x222)]('定位玩家线上位置')[_0x10519e(0x226)](async ({ session: _0x55ade1 }, _0x485ba7) => await commands[_0x10519e(0x1fe)](_0x4fe6ae, _0x24e5a6, _0x55ade1, _0x485ba7)), _0x24e5a6[_0x10519e(0x237)]?.[_0x10519e(0x21a)] && _0x4fe6ae[_0x10519e(0x1f2)]('tmp版本')[_0x10519e(0x222)](_0x10519e(0x219))[_0x10519e(0x226)](async () => await commands['tmpVersion'](_0x4fe6ae)), _0x24e5a6[_0x10519e(0x237)]?.[_0x10519e(0x207)] && _0x4fe6ae[_0x10519e(0x1f2)](_0x10519e(0x184))[_0x10519e(0x222)](_0x10519e(0x238))[_0x10519e(0x226)](async ({ session: _0x3a64d2 }) => await commands[_0x10519e(0x207)](_0x4fe6ae, _0x3a64d2)), _0x24e5a6[_0x10519e(0x237)]?.['tmpMileageRanking'] && (_0x4fe6ae[_0x10519e(0x1f2)]('里程排行榜')[_0x10519e(0x222)](_0x10519e(0x1d8))[_0x10519e(0x226)](async ({ session: _0x55ecc8 }) => await commands[_0x10519e(0x204)](_0x4fe6ae, _0x55ecc8, MileageRankingType[_0x10519e(0x1c5)])), _0x4fe6ae[_0x10519e(0x1f2)](_0x10519e(0x1c0))[_0x10519e(0x222)]('查询欧洲卡车模拟2今日里程排行榜')['action'](async ({ session: _0x2651f6 }) => await commands['tmpMileageRanking'](_0x4fe6ae, _0x2651f6, MileageRankingType[_0x10519e(0x202)]))), _0x24e5a6['commands']?.[_0x10519e(0x1fa)] && _0x4fe6ae[_0x10519e(0x1f2)]('vtc查询\x20<vtcid>')['usage'](_0x10519e(0x1c1))[_0x10519e(0x226)](async ({ session: _0x1453f1 }, _0x47ece9) => await commands[_0x10519e(0x1fa)](_0x4fe6ae, _0x24e5a6, _0x1453f1, _0x47ece9)), _0x24e5a6[_0x10519e(0x237)]?.[_0x10519e(0x199)] && (_0x4fe6ae['command']('今日足迹\x20[tmpId:string]')[_0x10519e(0x222)]('查询ETS服务器今日足迹')[_0x10519e(0x194)](_0x10519e(0x1d2))[_0x10519e(0x194)]('今日足迹\x2012345')['action'](async ({ session: _0x15eae0 }, _0x17b36f) => await commands[_0x10519e(0x199)](_0x4fe6ae, _0x15eae0, ServerType[_0x10519e(0x203)], _0x17b36f)), _0x4fe6ae[_0x10519e(0x1f2)]('今日足迹p\x20[tmpId:string]')[_0x10519e(0x222)](_0x10519e(0x1e4))[_0x10519e(0x194)](_0x10519e(0x1d7))[_0x10519e(0x194)]('今日足迹p\x2012345')[_0x10519e(0x226)](async ({ session: _0x1fee3e }, _0x85e141) => await commands[_0x10519e(0x199)](_0x4fe6ae, _0x1fee3e, ServerType[_0x10519e(0x214)], _0x85e141))), _0x24e5a6[_0x10519e(0x237)]?.[_0x10519e(0x1c8)] && _0x4fe6ae[_0x10519e(0x1f2)](_0x10519e(0x200), '重置欧卡车队平台密码')[_0x10519e(0x222)](_0x10519e(0x1f7))[_0x10519e(0x194)](_0x10519e(0x177))['example'](_0x10519e(0x231))[_0x10519e(0x194)](_0x10519e(0x221))[_0x10519e(0x226)](async ({ session: _0x272985 }, _0x45d32b, _0x58f21b) => await commands[_0x10519e(0x1c8)](_0x4fe6ae, _0x24e5a6, _0x272985, _0x45d32b, _0x58f21b)), _0x24e5a6[_0x10519e(0x237)]?.['mainSettings'] && _0x4fe6ae[_0x10519e(0x1f2)](_0x10519e(0x22b), _0x10519e(0x1b1))[_0x10519e(0x222)](_0x10519e(0x19e))[_0x10519e(0x194)](_0x10519e(0x1a4))['example'](_0x10519e(0x239))[_0x10519e(0x226)](async ({ session: _0x5c7bd7 }, _0x206681) => await commands[_0x10519e(0x19a)](_0x4fe6ae, _0x24e5a6, _0x5c7bd7, _0x206681)), _0x4fe6ae[_0x10519e(0x1f2)](_0x10519e(0x217))[_0x10519e(0x226)](async () => _0x10519e(0x1e2)); } function _0x45c2() { const _0x5c1665 = ['ets', 'tmpMileageRanking', '08:05', 'database', 'tmpDlcMap', 'number', '14:05', '是否启用翻译缓存', 'table', '终点信息来源', '美卡服务器', '玩家查询配置', '主群群号列表', './database/model', '无活动通知配置', '车队名称', '车队平台配置', 'promods', 'name', '服务器信息来源', '规则查询', '510452jjdLZA', '查询TruckersMP支持的游戏版本', 'tmpVersion', '是否输出日志', '车队平台V2.0', '使用HTTPS协议', '6TQClsR', '记录定时任务执行详情', '587638oUMzLJ', '重置密码\x20123456\x20Abc123def4\x20-\x20V2.0指定QQ与新密码', 'usage', '127831nKuAsM', '11918865goehul', './command/tmpServer', 'action', '路况\x20-\x20s1', 'tmpQuery', '查询/绑定', './command/tmpPosition', '查询积分\x20[targetQQ:string]', '指令配置', 'tmp-bot', 'enumerable', 'debugMode', '是否启用版本查询', '重置密码\x20789\x20-\x20管理员重置指定teamId的密码', 'log', 'message', '21EWqcUm', 'union', 'error', 'commands', '查询欧洲卡车模拟2地图dlc价格', '查询积分\x20123456\x20-\x20查询指定QQ号的积分', 'puppeteer', 'logger', '是否启用查询功能', 'tmpServer', '09:00', 'hasOwnProperty', 'vtc查询', '{}.constructor(\x22return\x20this\x22)(\x20)', '重置密码\x20-\x20重置自己的密码', '查询\x20<tmpId>', 'API服务器地址(V1平台地址\x20/\x20V2\x20OpenAPI地址,不含协议)', 'start', 'toString', 'push', 'API认证令牌(V1平台Token\x20/\x20V2\x20OpenAPI\x20Token)', '今日活动档还没做,请负责的管理注意!', '管理群组ID列表', './util/constant', '欧卡服务器', '查询欧洲卡车模拟2服务器路况', 'bind', '地图dlc价格', '路况信息展示方式', '我们已将您平台的密码进行重置,您的账号:{uid},新的密码为:{psw}\x20请妥善保管好您的密码,以防泄露', '查询TMP玩家信息', '是否启用VTC查询', 'role', '车队平台API', 'call', 'return\x20(function()\x20', '是否启用百度翻译', '248uHSYQi', '重置密码', './command/tmpDlcMap', 'koishi', './command/tmpFootprint', './command/tmpVtc', 'example', '__proto__', 'search', './command/tmpMileageRanking', '20:05', 'tmpFootprint', 'queryPoint', '基本配置', '管理群消息配置', 'inject', '查询自己或指定QQ号的积分,在群聊中可@他人查询', 'tmp', 'mainSettings', 'length', '信息发送时间(HH:mm格式)', 'Config', '查询积分\x20-\x20查询自己的积分', '启用调试模式(输出详细日志)', '活动档未上传时的消息', 'TMP\x20API', '路况\x20<serverName>', 'default', '是否启用车队平台重置密码功能', 'exception', '是否显示活动横幅', 'getOwnPropertyNames', '热力图', '功能配置', '今日无活动通知消息', '查询欧卡车队平台积分', 'exports', '启用调试模式', './command/tmpVersion', '是否启用车队平台积分查询功能', 'description', '__esModule', 'tmpBind', '记录消息发送详情', 'apply', '玩家信息展示方式', 'string', 'object', '今日没活动', './command/tmpTraffic/tmpTraffic', '今日里程排行榜', '查询TruckersMP\x20VTC信息', '是否启用车队活动查询', '226473uUTHMV', '通用配置', 'total', 'console', 'Schema', 'resetPassword', '5542895jifUCE', 'VTC\x20ID(用于TMP\x20API)', '主群配置', '(((.+)+)+)+$', '管理群配置', '是否显示玩家头像(部分玩家的擦边头像可能导致封号)', './command/tmpBind', '今日活动档已做/上传', '活动档已上传时的消息', '今日足迹', 'platform', 'V2.0重置密码后发送邮件(需启用\x20adapter-mail)', '百度翻译配置', '337221mDDaDt', '今日足迹p', '查询欧洲卡车模拟2里程排行榜', 'tmp版本', '查询美国卡车模拟器TMP服务器信息', '[TMP-BOT]\x20数据库模型初始化失败:', '活动提醒消息模板,支持变量:{name},\x20{server},\x20{startingPoint},\x20{terminalPoint},\x20{distance},\x20{banner},\x20{timeLeft}', '重置密码通知', '1770xfxgcw', '百度翻译APP\x20ID', 'boolean', 'ATS', 'TruckersMP官方规则链接:https://truckersmp.com/knowledge-base/article/746', 'tmpActivityService', '查询Promods服务器今日足迹', 'debug', '是否启用服务器查询', 'array', '活动查询配置', 'warn', 'const', 'constructor', 'label', '车队平台URL(不包含协议)', '重置密码功能配置', '车队平台TOKEN', 'tmpTraffic', '定位\x20<tmpId>', 'command', 'info', 'ETS2', './command/tmpQuery/tmpQuery', 'defineProperty', 'V1.0使用teamId,V2.0使用QQ号;管理员可用\x20uid=12345;V2.0可指定新密码', '查询积分', '活动\x20{name}\x20现在开始集合啦!\x0a服务器:\x20{server}\x0a起点:\x20{startingPoint}\x0a终点:\x20{terminalPoint}\x0a距离:\x20{distance}KM\x0a活动将于20:30分开始!', 'tmpVtc', './command/ets-app/queryPoint', '活动\x20{name}\x20还有\x20{timeLeft}\x20分钟就要开始啦!\x0a服务器:\x20{server}\x0a起点:\x20{startingPoint}\x0a终点:\x20{terminalPoint}\x0a距离:\x20{distance}KM', '活动开始提醒消息模板,支持变量:{name},\x20{server},\x20{startingPoint},\x20{terminalPoint},\x20{distance},\x20{banner}', 'tmpPosition', '车队平台版本', '重置密码\x20[targetTeamId:string]\x20[password:string]', '活动开始前提醒时间(分钟)', 'today']; _0x45c2 = function () { return _0x5c1665; }; return _0x45c2(); } function apply(_0x37dc54, _0x53e9ea) { const _0x2bf2b3 = _0x435453; try { model(_0x37dc54), _0x53e9ea['debugMode'] && _0x37dc54['logger'][_0x2bf2b3(0x1e5)]('[TMP-BOT]\x20数据库模型初始化成功'); } catch (_0x1008c1) { _0x37dc54[_0x2bf2b3(0x23b)][_0x2bf2b3(0x236)](_0x2bf2b3(0x1db), _0x1008c1[_0x2bf2b3(0x233)]); return; } registerBaseCommands(_0x37dc54, _0x53e9ea), logDisabledCommands(_0x37dc54, _0x53e9ea); if (_0x53e9ea[_0x2bf2b3(0x237)]?.[_0x2bf2b3(0x1e3)]) { const _0x12f510 = { ..._0x53e9ea[_0x2bf2b3(0x1e3)], 'debugMode': _0x53e9ea[_0x2bf2b3(0x22f)], 'debug': _0x53e9ea[_0x2bf2b3(0x1e3)]['debug'] }, _0x2280dd = new ActivityService(_0x37dc54, _0x12f510); _0x2280dd[_0x2bf2b3(0x17a)](); } else _0x53e9ea['debugMode'] && _0x37dc54[_0x2bf2b3(0x23b)]['debug']('[TMP-BOT]\x20活动查询功能已禁用'); } __name(apply, _0x435453(0x1ba)), 0x0 && (module[_0x435453(0x1b2)] = { 'Config': Config, 'apply': apply, 'name': name });
|
|
@@ -1,63 +1 @@
|
|
|
1
|
-
let mapConfig = {
|
|
2
|
-
ets: {
|
|
3
|
-
tileUrl: 'https://ets-map.oss-cn-beijing.aliyuncs.com/ets2/05102019/{z}/{x}/{y}.png',
|
|
4
|
-
multipliers: {
|
|
5
|
-
x: 70272,
|
|
6
|
-
y: 76157
|
|
7
|
-
},
|
|
8
|
-
breakpoints: {
|
|
9
|
-
uk: {
|
|
10
|
-
x: -31056.8,
|
|
11
|
-
y: -5832.867
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
bounds: {
|
|
15
|
-
y: 131072,
|
|
16
|
-
x: 131072
|
|
17
|
-
},
|
|
18
|
-
maxZoom: 8,
|
|
19
|
-
minZoom: 2,
|
|
20
|
-
// 游戏地转地图坐标
|
|
21
|
-
calculateMapCoordinate (x, y) {
|
|
22
|
-
return [
|
|
23
|
-
x / 1.609055 + mapConfig.ets.multipliers.x,
|
|
24
|
-
y / 1.609055 + mapConfig.ets.multipliers.y
|
|
25
|
-
];
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
promods: {
|
|
29
|
-
tileUrl: 'https://ets-map.oss-cn-beijing.aliyuncs.com/promods/05102019/{z}/{x}/{y}.png',
|
|
30
|
-
multipliers: {
|
|
31
|
-
x: 51953,
|
|
32
|
-
y: 76024
|
|
33
|
-
},
|
|
34
|
-
breakpoints: {
|
|
35
|
-
uk: {
|
|
36
|
-
x: -31056.8,
|
|
37
|
-
y: -5832.867
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
bounds: {
|
|
41
|
-
y: 131072,
|
|
42
|
-
x: 131072
|
|
43
|
-
},
|
|
44
|
-
maxZoom: 8,
|
|
45
|
-
minZoom: 2,
|
|
46
|
-
// 游戏地转地图坐标
|
|
47
|
-
calculateMapCoordinate (x, y) {
|
|
48
|
-
return [
|
|
49
|
-
x / 2.598541 + mapConfig.promods.multipliers.x,
|
|
50
|
-
y / 2.598541 + mapConfig.promods.multipliers.y
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// 定义地图
|
|
57
|
-
let map = L.map('map', {
|
|
58
|
-
attributionControl: false,
|
|
59
|
-
crs: L.CRS.Simple,
|
|
60
|
-
zoomControl: false,
|
|
61
|
-
zoomSnap: 0.2,
|
|
62
|
-
zoomDelta: 0.2
|
|
63
|
-
});
|
|
1
|
+
function _0x5849(_0x4c1e81,_0x20400c){const _0x53e494=_0x144c();return _0x5849=function(_0x3f736f,_0x5f5423){_0x3f736f=_0x3f736f-0x156;let _0x55451a=_0x53e494[_0x3f736f];return _0x55451a;},_0x5849(_0x4c1e81,_0x20400c);}const _0xc55665=_0x5849;function _0x144c(){const _0x40ef69=['table','prototype','search','error','promods','multipliers','2198346rnjJKr','log','https://ets-map.oss-cn-beijing.aliyuncs.com/promods/05102019/{z}/{x}/{y}.png','return\x20(function()\x20','constructor','map','ets','__proto__','Simple','https://ets-map.oss-cn-beijing.aliyuncs.com/ets2/05102019/{z}/{x}/{y}.png','6RRvUCG','(((.+)+)+)+$','toString','exception','4254484bHNpNh','54112rNMJnN','info','12007413IyIltA','apply','855240RpPRMj','1419322fFmZPG','5sQkkDF','CRS','warn','bind','console','791SgGtys','1674538pAtpDF'];_0x144c=function(){return _0x40ef69;};return _0x144c();}(function(_0x4db139,_0x33f777){const _0x49accb=_0x5849,_0x381791=_0x4db139();while(!![]){try{const _0x202e3b=-parseInt(_0x49accb(0x175))/0x1+-parseInt(_0x49accb(0x15a))/0x2*(-parseInt(_0x49accb(0x16b))/0x3)+-parseInt(_0x49accb(0x16f))/0x4+parseInt(_0x49accb(0x176))/0x5*(-parseInt(_0x49accb(0x161))/0x6)+parseInt(_0x49accb(0x159))/0x7*(parseInt(_0x49accb(0x170))/0x8)+parseInt(_0x49accb(0x172))/0x9+-parseInt(_0x49accb(0x174))/0xa;if(_0x202e3b===_0x33f777)break;else _0x381791['push'](_0x381791['shift']());}catch(_0x1b0d69){_0x381791['push'](_0x381791['shift']());}}}(_0x144c,0xcca19));const _0x1ff1d2=(function(){let _0x55c3d8=!![];return function(_0x9fdfde,_0x5e09d4){const _0x3e2686=_0x55c3d8?function(){const _0x5a41d6=_0x5849;if(_0x5e09d4){const _0xf34e6e=_0x5e09d4[_0x5a41d6(0x173)](_0x9fdfde,arguments);return _0x5e09d4=null,_0xf34e6e;}}:function(){};return _0x55c3d8=![],_0x3e2686;};}()),_0x56861f=_0x1ff1d2(this,function(){const _0x166fe5=_0x5849;return _0x56861f[_0x166fe5(0x16d)]()[_0x166fe5(0x15d)](_0x166fe5(0x16c))[_0x166fe5(0x16d)]()[_0x166fe5(0x165)](_0x56861f)[_0x166fe5(0x15d)](_0x166fe5(0x16c));});_0x56861f();const _0x5f5423=(function(){let _0xbe0a05=!![];return function(_0x5a864d,_0x9b0bc9){const _0x223c92=_0xbe0a05?function(){const _0x2ebd8e=_0x5849;if(_0x9b0bc9){const _0x8dbfee=_0x9b0bc9[_0x2ebd8e(0x173)](_0x5a864d,arguments);return _0x9b0bc9=null,_0x8dbfee;}}:function(){};return _0xbe0a05=![],_0x223c92;};}()),_0x3f736f=_0x5f5423(this,function(){const _0x22379e=_0x5849,_0xe23c0b=function(){const _0x463c77=_0x5849;let _0x1278dd;try{_0x1278dd=Function(_0x463c77(0x164)+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0x5754a8){_0x1278dd=window;}return _0x1278dd;},_0x28b974=_0xe23c0b(),_0x145b0c=_0x28b974[_0x22379e(0x158)]=_0x28b974['console']||{},_0xba661=[_0x22379e(0x162),_0x22379e(0x156),_0x22379e(0x171),_0x22379e(0x15e),_0x22379e(0x16e),_0x22379e(0x15b),'trace'];for(let _0x4330f8=0x0;_0x4330f8<_0xba661['length'];_0x4330f8++){const _0x5e297a=_0x5f5423[_0x22379e(0x165)][_0x22379e(0x15c)][_0x22379e(0x157)](_0x5f5423),_0x43608f=_0xba661[_0x4330f8],_0x501310=_0x145b0c[_0x43608f]||_0x5e297a;_0x5e297a[_0x22379e(0x168)]=_0x5f5423[_0x22379e(0x157)](_0x5f5423),_0x5e297a[_0x22379e(0x16d)]=_0x501310[_0x22379e(0x16d)][_0x22379e(0x157)](_0x501310),_0x145b0c[_0x43608f]=_0x5e297a;}});_0x3f736f();let mapConfig={'ets':{'tileUrl':_0xc55665(0x16a),'multipliers':{'x':0x11280,'y':0x1297d},'breakpoints':{'uk':{'x':-31056.8,'y':-5832.867}},'bounds':{'y':0x20000,'x':0x20000},'maxZoom':0x8,'minZoom':0x2,'calculateMapCoordinate'(_0x5cd570,_0x53dd85){const _0x449184=_0xc55665;return[_0x5cd570/1.609055+mapConfig[_0x449184(0x167)]['multipliers']['x'],_0x53dd85/1.609055+mapConfig[_0x449184(0x167)][_0x449184(0x160)]['y']];}},'promods':{'tileUrl':_0xc55665(0x163),'multipliers':{'x':0xcaf1,'y':0x128f8},'breakpoints':{'uk':{'x':-31056.8,'y':-5832.867}},'bounds':{'y':0x20000,'x':0x20000},'maxZoom':0x8,'minZoom':0x2,'calculateMapCoordinate'(_0x4f8c71,_0x504c62){const _0x4ab45e=_0xc55665;return[_0x4f8c71/2.598541+mapConfig[_0x4ab45e(0x15f)]['multipliers']['x'],_0x504c62/2.598541+mapConfig[_0x4ab45e(0x15f)][_0x4ab45e(0x160)]['y']];}}},map=L[_0xc55665(0x166)](_0xc55665(0x166),{'attributionControl':![],'crs':L[_0xc55665(0x177)][_0xc55665(0x169)],'zoomControl':![],'zoomSnap':0.2,'zoomDelta':0.2});
|