@opentiny/agent 0.3.2 → 0.3.4
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/LICENSE +0 -0
- package/README.md +97 -3
- package/index.d.ts +45 -7
- package/index.js +878 -734
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,957 +1,1098 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _0x42bb3b from "jsonwebtoken";
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
3
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
4
4
|
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
|
|
5
5
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
6
|
-
import { EmptyResultSchema, ElicitResultSchema, CreateMessageResultSchema, ListRootsResultSchema, isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import { JSONRPCMessageSchema, EmptyResultSchema, ElicitResultSchema, CreateMessageResultSchema, ListRootsResultSchema, isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
|
|
7
|
+
import _0x310cf0 from "cors";
|
|
8
|
+
import _0x5cd98a from "express";
|
|
9
9
|
import { getOAuthProtectedResourceMetadataUrl, createOAuthMetadata, mcpAuthRouter } from "@modelcontextprotocol/sdk/server/auth/router.js";
|
|
10
10
|
import { checkResourceAllowed } from "@modelcontextprotocol/sdk/shared/auth-utils.js";
|
|
11
11
|
import { requireBearerAuth } from "@modelcontextprotocol/sdk/server/auth/middleware/bearerAuth.js";
|
|
12
12
|
import { allowedMethods } from "@modelcontextprotocol/sdk/server/auth/middleware/allowedMethods.js";
|
|
13
13
|
import { InvalidGrantError, InvalidTokenError } from "@modelcontextprotocol/sdk/server/auth/errors.js";
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const _0x2891c6 = _0x3dac;
|
|
15
|
+
(function(_0x332e45, _0x27c64c) {
|
|
16
|
+
const _0x1b32d0 = _0x3dac, _0x27f092 = _0x3dac, _0x352d37 = _0x332e45();
|
|
16
17
|
while (!![]) {
|
|
17
18
|
try {
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
else
|
|
21
|
-
} catch (
|
|
22
|
-
|
|
19
|
+
const _0x24b621 = parseInt(_0x1b32d0(490)) / (643 * -11 + 4739 + 2335) + parseInt(_0x27f092(479)) / (7659 + 547 * -1 + -7110) + parseInt(_0x1b32d0(483)) / (-581 * 14 + 1 * -8503 + 16640) + parseInt(_0x27f092(492)) / (1338 * -3 + 6438 + -2420) + -parseInt(_0x27f092(485)) / (-5641 * -1 + -2755 + -2881) + parseInt(_0x1b32d0(484)) / (-31 * 218 + 3019 + -1 * -3745) * (-parseInt(_0x1b32d0(493)) / (-1002 * 1 + 689 + 320)) + -parseInt(_0x1b32d0(489)) / (239 * 7 + 8439 + -10104);
|
|
20
|
+
if (_0x24b621 === _0x27c64c) break;
|
|
21
|
+
else _0x352d37["push"](_0x352d37["shift"]());
|
|
22
|
+
} catch (_0xebda2e) {
|
|
23
|
+
_0x352d37["push"](_0x352d37["shift"]());
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
|
-
})(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
})(_0x3533, 3049 * -69 + 709411 + 1 * -57557);
|
|
27
|
+
const SUBPROTOCOL = "mcp";
|
|
28
|
+
function _0x3dac(_0x4d1ee5, _0x42e258) {
|
|
29
|
+
const _0x5de25c = _0x3533();
|
|
30
|
+
return _0x3dac = function(_0x31d554, _0x48d1d2) {
|
|
31
|
+
_0x31d554 = _0x31d554 - (3 * 2846 + 4146 + -12208);
|
|
32
|
+
let _0x4c57f4 = _0x5de25c[_0x31d554];
|
|
33
|
+
return _0x4c57f4;
|
|
34
|
+
}, _0x3dac(_0x4d1ee5, _0x42e258);
|
|
33
35
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
class WebSocketServerTransport {
|
|
37
|
+
constructor(_0x4f3ce8) {
|
|
38
|
+
const _0x34b022 = _0x3dac;
|
|
39
|
+
this[_0x34b022(488)] = _0x4f3ce8;
|
|
40
|
+
}
|
|
41
|
+
async ["start"]() {
|
|
42
|
+
const _0x56f695 = _0x3dac, _0x4d0111 = _0x3dac, _0x3e06a9 = {};
|
|
43
|
+
_0x3e06a9[_0x56f695(491)] = function(_0x5ba5f7, _0x24bd08) {
|
|
44
|
+
return _0x5ba5f7 !== _0x24bd08;
|
|
45
|
+
}, _0x3e06a9[_0x56f695(480)] = _0x56f695(477), _0x3e06a9["SmXiv"] = "close", _0x3e06a9["hQRmC"] = "message";
|
|
46
|
+
const _0x2ab248 = _0x3e06a9;
|
|
47
|
+
if (!this["_socket"]) return;
|
|
48
|
+
if (_0x2ab248["JMmdJ"](this["_socket"][_0x4d0111(487)], SUBPROTOCOL)) {
|
|
49
|
+
this["_socket"][_0x56f695(476)](1752 * -1 + 491 * -2 + 3736, "Unsupported websocket subprotocol");
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this["_socket"]["on"](_0x2ab248["EKPiV"], (_0x11c63f) => {
|
|
53
|
+
var _a;
|
|
54
|
+
(_a = this["onerror"]) == null ? void 0 : _a.call(this, _0x11c63f);
|
|
55
|
+
}), this["_socket"]["on"](_0x2ab248["SmXiv"], () => {
|
|
56
|
+
var _a;
|
|
57
|
+
const _0x1c1c36 = _0x56f695;
|
|
58
|
+
this[_0x1c1c36(488)] = void 0, (_a = this["onclose"]) == null ? void 0 : _a.call(this);
|
|
59
|
+
}), this["_socket"]["on"](_0x2ab248["hQRmC"], (_0x2d2a5d) => {
|
|
60
|
+
var _a, _b;
|
|
61
|
+
const _0x47d433 = _0x4d0111, _0x500ffa = _0x4d0111;
|
|
62
|
+
let _0x3a3905;
|
|
63
|
+
try {
|
|
64
|
+
_0x3a3905 = JSONRPCMessageSchema[_0x47d433(478)](JSON["parse"](_0x2d2a5d[_0x500ffa(482)]()));
|
|
65
|
+
} catch (_0x3151f4) {
|
|
66
|
+
(_a = this["onerror"]) == null ? void 0 : _a.call(this, _0x3151f4);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
(_b = this[_0x47d433(481)]) == null ? void 0 : _b.call(this, _0x3a3905);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
async [_0x2891c6(476)]() {
|
|
73
|
+
var _a;
|
|
74
|
+
const _0x408e37 = _0x2891c6, _0x13d168 = _0x2891c6;
|
|
75
|
+
(_a = this[_0x408e37(488)]) == null ? void 0 : _a[_0x13d168(476)]();
|
|
76
|
+
}
|
|
77
|
+
[_0x2891c6(494)](_0x495886) {
|
|
78
|
+
const _0x5683ef = { "YJyZD": function(_0x304fc0, _0xe8bf91) {
|
|
79
|
+
return _0x304fc0(_0xe8bf91);
|
|
80
|
+
}, "TxKcd": "Not connected", "zOrNR": function(_0x4cdc77) {
|
|
81
|
+
return _0x4cdc77();
|
|
82
|
+
} };
|
|
83
|
+
return new Promise((_0x1ab727, _0xd1e4bb) => {
|
|
84
|
+
var _a;
|
|
85
|
+
const _0x21b2ff = _0x3dac;
|
|
86
|
+
if (!this["_socket"]) {
|
|
87
|
+
_0x5683ef["YJyZD"](_0xd1e4bb, new Error(_0x5683ef[_0x21b2ff(486)]));
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
(_a = this["_socket"]) == null ? void 0 : _a[_0x21b2ff(494)](JSON[_0x21b2ff(495)](_0x495886)), _0x5683ef["zOrNR"](_0x1ab727);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function _0x3533() {
|
|
95
|
+
const _0x44f907 = ["356565GiPzgN", "JMmdJ", "1498940hVnlBx", "4295053dxdaHi", "send", "stringify", "close", "error", "parse", "1239054eqBjwD", "EKPiV", "onmessage", "toString", "2110668CEyjwG", "6FYZHXb", "1542420FAtsvs", "TxKcd", "protocol", "_socket", "5526776XaQyWR"];
|
|
96
|
+
_0x3533 = function() {
|
|
97
|
+
return _0x44f907;
|
|
38
98
|
};
|
|
39
|
-
return
|
|
99
|
+
return _0x3533();
|
|
40
100
|
}
|
|
41
|
-
|
|
101
|
+
(function(_0x176bdd, _0x56bfdd) {
|
|
102
|
+
const _0x387f6e = _0x1181, _0x46c97b = _0x1181, _0x490dd9 = _0x176bdd();
|
|
103
|
+
while (!![]) {
|
|
104
|
+
try {
|
|
105
|
+
const _0x4d5b93 = -parseInt(_0x387f6e(339)) / (8039 + 5219 + -13257) * (-parseInt(_0x387f6e(405)) / (700 * 2 + 1875 * -1 + -53 * -9)) + -parseInt(_0x46c97b(343)) / (5144 + -2040 * 1 + -443 * 7) + -parseInt(_0x387f6e(383)) / (848 * 5 + 6294 + -54 * 195) * (parseInt(_0x46c97b(385)) / (926 + 1994 * 2 + -4909)) + -parseInt(_0x46c97b(337)) / (2041 + -9639 + 7604) * (parseInt(_0x387f6e(420)) / (761 + -4391 + -3637 * -1)) + parseInt(_0x46c97b(361)) / (9 * -579 + -1 * -4637 + -291 * -2) * (parseInt(_0x387f6e(412)) / (1 * 5938 + -7351 + 158 * 9)) + parseInt(_0x46c97b(358)) / (5483 + -5550 + 11 * 7) * (parseInt(_0x387f6e(364)) / (-67 * 1 + 2488 + -2410)) + parseInt(_0x387f6e(330)) / (2500 + -8457 + 5969) * (-parseInt(_0x46c97b(377)) / (-6263 + 8845 + -367 * 7));
|
|
106
|
+
if (_0x4d5b93 === _0x56bfdd) break;
|
|
107
|
+
else _0x490dd9["push"](_0x490dd9["shift"]());
|
|
108
|
+
} catch (_0x568109) {
|
|
109
|
+
_0x490dd9["push"](_0x490dd9["shift"]());
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
})(_0x19ad, -3 * 487523 + -927748 + 3175987 * 1);
|
|
113
|
+
function _0x19ad() {
|
|
114
|
+
const _0x54a468 = ["removeResponseListener", "QqcZC", "get", "20SKJNGJ", "notifications/cancelled", "complete", "70184euqRDS", "jsonrpc", "addResponseListener", "5603851wxWhAo", "initialize", "EvGJT", "EPDgC", "Tjglr", "awyWl", "resources/subscribe", "xuySB", "_onrequest", "name", "OsntO", "prompts/list", "elicitation/create", "334711pfAseH", "addNotificationListener", "params", "KYLcN", "CevKb", "lwlhr", "6388TimbFA", "ZQTJd", "45BVKBYz", "indexOf", "addRequestListener", "transport", "level", "splice", "send", "completion/complete", "logging/setLevel", "gzXMQ", "_onresponse", "notifications/initialized", "setLoggingLevel", "removeNotificationListener", "handleListener", "roots/list", "MsQKG", "PwoZn", "2.0", "_requestHandlers", "8CMMYQS", "method", "jFgAA", "call", "zgMtg", "resources/list", "callTool", "1575JzqyMP", "length", "push", "listResourceTemplates", "LQlBY", "request", "error", "removeListener", "10661lWHBHG", "originalOnResponse", "result", "JGSLT", "900qmHDum", "clear", "LUzBE", "JqaEZ", "ZgDoK", "clearResponseListener", "tools/list", "2454kjcfpQ", "unsubscribeResource", "341615mqkABV", "AIQzg", "Yjaln", "bsFTc", "1699926JCRyGF", "onerror", "prompts/get", "addListener", "KHwEl", "IIDFo", "function", "eiTfc", "code", "message", "fallbackRequestHandler", "listPrompts"];
|
|
115
|
+
_0x19ad = function() {
|
|
116
|
+
return _0x54a468;
|
|
117
|
+
};
|
|
118
|
+
return _0x19ad();
|
|
119
|
+
}
|
|
120
|
+
const forwardServerRequest = async (_0x1eb6c0, _0x4cef98, _0xb59f9f) => {
|
|
42
121
|
var _a;
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
let
|
|
47
|
-
switch (
|
|
48
|
-
case
|
|
49
|
-
|
|
122
|
+
const _0x186e82 = _0x1181, _0x31ffb1 = _0x1181, _0x1b4ae5 = {};
|
|
123
|
+
_0x1b4ae5[_0x186e82(347)] = _0x186e82(336), _0x1b4ae5[_0x186e82(407)] = "tools/call", _0x1b4ae5[_0x186e82(401)] = _0x31ffb1(410), _0x1b4ae5["KYLcN"] = "resources/read", _0x1b4ae5["DsuFc"] = _0x186e82(370), _0x1b4ae5[_0x186e82(368)] = "resources/unsubscribe", _0x1b4ae5["GYqRq"] = _0x31ffb1(375), _0x1b4ae5["ZgDoK"] = _0x31ffb1(392), _0x1b4ae5[_0x186e82(340)] = _0x186e82(403);
|
|
124
|
+
const _0x5498bb = _0x1b4ae5, { id: _0x45a87a, method: _0xfd1956, params: _0x2448d8 } = _0xb59f9f;
|
|
125
|
+
let _0x1b5fe6 = {};
|
|
126
|
+
switch (_0xfd1956) {
|
|
127
|
+
case _0x5498bb[_0x31ffb1(347)]:
|
|
128
|
+
_0x1b5fe6 = await _0x4cef98["listTools"](_0x2448d8);
|
|
50
129
|
break;
|
|
51
|
-
case
|
|
52
|
-
|
|
130
|
+
case _0x5498bb["jFgAA"]:
|
|
131
|
+
_0x1b5fe6 = await _0x4cef98[_0x186e82(411)](_0x2448d8);
|
|
53
132
|
break;
|
|
54
|
-
case
|
|
55
|
-
|
|
133
|
+
case _0x5498bb[_0x31ffb1(401)]:
|
|
134
|
+
_0x1b5fe6 = await _0x4cef98["listResources"](_0x2448d8);
|
|
56
135
|
break;
|
|
57
|
-
case
|
|
58
|
-
|
|
136
|
+
case "resources/templates/list":
|
|
137
|
+
_0x1b5fe6 = await _0x4cef98[_0x31ffb1(415)](_0x2448d8);
|
|
59
138
|
break;
|
|
60
|
-
case
|
|
61
|
-
|
|
139
|
+
case _0x5498bb[_0x186e82(380)]:
|
|
140
|
+
_0x1b5fe6 = await _0x4cef98["readResource"](_0x2448d8);
|
|
62
141
|
break;
|
|
63
|
-
case
|
|
64
|
-
|
|
142
|
+
case _0x5498bb["DsuFc"]:
|
|
143
|
+
_0x1b5fe6 = await _0x4cef98["subscribeResource"](_0x2448d8);
|
|
65
144
|
break;
|
|
66
|
-
case
|
|
67
|
-
|
|
145
|
+
case _0x5498bb["Tjglr"]:
|
|
146
|
+
_0x1b5fe6 = await _0x4cef98[_0x31ffb1(338)](_0x2448d8);
|
|
68
147
|
break;
|
|
69
|
-
case
|
|
70
|
-
|
|
148
|
+
case _0x31ffb1(345):
|
|
149
|
+
_0x1b5fe6 = await _0x4cef98["getPrompt"](_0x2448d8);
|
|
71
150
|
break;
|
|
72
|
-
case
|
|
73
|
-
|
|
151
|
+
case _0x5498bb["GYqRq"]:
|
|
152
|
+
_0x1b5fe6 = await _0x4cef98[_0x31ffb1(354)](_0x2448d8);
|
|
74
153
|
break;
|
|
75
|
-
case
|
|
76
|
-
|
|
154
|
+
case "ping":
|
|
155
|
+
_0x1b5fe6 = await _0x4cef98["ping"]();
|
|
77
156
|
break;
|
|
78
|
-
case
|
|
79
|
-
|
|
157
|
+
case _0x5498bb[_0x186e82(334)]:
|
|
158
|
+
_0x1b5fe6 = await _0x4cef98[_0x31ffb1(360)](_0x2448d8);
|
|
80
159
|
break;
|
|
81
|
-
case
|
|
82
|
-
|
|
160
|
+
case _0x186e82(393):
|
|
161
|
+
_0x1b5fe6 = await _0x4cef98[_0x186e82(397)](_0x2448d8 == null ? void 0 : _0x2448d8[_0x186e82(389)]);
|
|
83
162
|
break;
|
|
84
163
|
}
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
}, forwardClientRequest = async (
|
|
164
|
+
const _0x39df96 = {};
|
|
165
|
+
_0x39df96[_0x186e82(328)] = _0x1b5fe6, _0x39df96[_0x186e82(362)] = _0x5498bb[_0x31ffb1(340)], _0x39df96["id"] = _0x45a87a, await ((_a = _0x1eb6c0 == null ? void 0 : _0x1eb6c0[_0x31ffb1(388)]) == null ? void 0 : _a[_0x186e82(391)](_0x39df96));
|
|
166
|
+
}, forwardClientRequest = async (_0x5664c1, _0x21c65c, _0x31a2df) => {
|
|
88
167
|
var _a;
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
let
|
|
93
|
-
switch (
|
|
94
|
-
case
|
|
95
|
-
const
|
|
96
|
-
|
|
168
|
+
const _0x563101 = _0x1181, _0x1d2a33 = _0x1181, _0xacb82a = {};
|
|
169
|
+
_0xacb82a["IIDFo"] = _0x563101(400), _0xacb82a[_0x563101(369)] = "sampling/createMessage", _0xacb82a["gzXMQ"] = _0x1d2a33(376), _0xacb82a["OsntO"] = "ping", _0xacb82a["xuySB"] = "2.0";
|
|
170
|
+
const _0x121fcc = _0xacb82a, { id: _0x537b65, method: _0xa1b4, params: _0x3f3a25 } = _0x31a2df;
|
|
171
|
+
let _0x509dc6 = {};
|
|
172
|
+
switch (_0xa1b4) {
|
|
173
|
+
case _0x121fcc[_0x563101(348)]:
|
|
174
|
+
const _0x394266 = {};
|
|
175
|
+
_0x394266[_0x1d2a33(406)] = _0xa1b4, _0x394266[_0x1d2a33(379)] = _0x3f3a25, _0x509dc6 = await _0x21c65c["request"](_0x394266, ListRootsResultSchema);
|
|
97
176
|
break;
|
|
98
|
-
case
|
|
99
|
-
const
|
|
100
|
-
|
|
177
|
+
case _0x121fcc[_0x563101(369)]:
|
|
178
|
+
const _0x4c40d6 = {};
|
|
179
|
+
_0x4c40d6[_0x563101(406)] = _0xa1b4, _0x4c40d6[_0x563101(379)] = _0x3f3a25, _0x509dc6 = await _0x21c65c[_0x563101(417)](_0x4c40d6, CreateMessageResultSchema);
|
|
101
180
|
break;
|
|
102
|
-
case
|
|
103
|
-
const
|
|
104
|
-
|
|
181
|
+
case _0x121fcc[_0x1d2a33(394)]:
|
|
182
|
+
const _0x3fc95d = {};
|
|
183
|
+
_0x3fc95d[_0x563101(406)] = _0xa1b4, _0x3fc95d[_0x563101(379)] = _0x3f3a25, _0x509dc6 = await _0x21c65c[_0x1d2a33(417)](_0x3fc95d, ElicitResultSchema);
|
|
105
184
|
break;
|
|
106
|
-
case
|
|
107
|
-
const
|
|
108
|
-
|
|
185
|
+
case _0x121fcc[_0x1d2a33(374)]:
|
|
186
|
+
const _0x272bb7 = {};
|
|
187
|
+
_0x272bb7[_0x563101(406)] = _0xa1b4, _0x509dc6 = await _0x21c65c[_0x563101(417)](_0x272bb7, EmptyResultSchema);
|
|
109
188
|
break;
|
|
110
189
|
}
|
|
111
|
-
const
|
|
112
|
-
return
|
|
190
|
+
const _0x8bb89c = {};
|
|
191
|
+
return _0x8bb89c["result"] = _0x509dc6, _0x8bb89c["jsonrpc"] = _0x121fcc[_0x563101(371)], _0x8bb89c["id"] = _0x537b65, await ((_a = _0x5664c1 == null ? void 0 : _0x5664c1["transport"]) == null ? void 0 : _a[_0x563101(391)](_0x8bb89c)), _0x509dc6;
|
|
113
192
|
};
|
|
114
|
-
const forwardServerOnRequest = (
|
|
115
|
-
const
|
|
116
|
-
return
|
|
117
|
-
}, "
|
|
118
|
-
return
|
|
119
|
-
} },
|
|
120
|
-
|
|
193
|
+
const forwardServerOnRequest = (_0xac7dd2, _0x36ea68) => {
|
|
194
|
+
const _0x26efa7 = _0x1181, _0x55bd73 = _0x1181, _0x835fee = { "pVhZK": function(_0x21266f, _0x1aa6cd) {
|
|
195
|
+
return _0x21266f === _0x1aa6cd;
|
|
196
|
+
}, "bsFTc": _0x26efa7(365), "ZQTJd": function(_0x19a6ef, _0x33220f, _0x5c71a5, _0x5d78be) {
|
|
197
|
+
return _0x19a6ef(_0x33220f, _0x5c71a5, _0x5d78be);
|
|
198
|
+
}, "DfdYr": _0x26efa7(403) }, _0x1ba832 = _0xac7dd2["_onrequest"];
|
|
199
|
+
_0xac7dd2[_0x26efa7(372)] = async (_0x1066e9, _0x22ef09) => {
|
|
121
200
|
var _a, _b, _c, _d, _e;
|
|
122
|
-
const
|
|
201
|
+
const _0x4d6f38 = _0x55bd73, _0x2dab97 = _0x55bd73, { id: _0x305ba1, method: _0x508758 } = _0x1066e9;
|
|
123
202
|
try {
|
|
124
|
-
|
|
125
|
-
} catch (
|
|
126
|
-
const { code:
|
|
203
|
+
_0x835fee["pVhZK"](_0x508758, _0x835fee[_0x4d6f38(342)]) ? await _0x1ba832["call"](_0xac7dd2, _0x1066e9, _0x22ef09) : await _0x835fee[_0x2dab97(384)](forwardServerRequest, _0xac7dd2, _0x36ea68, _0x1066e9);
|
|
204
|
+
} catch (_0xf9c543) {
|
|
205
|
+
const { code: _0x22a3ff, message: _0x4526cd, data: _0x4c84d1 } = _0xf9c543;
|
|
127
206
|
try {
|
|
128
|
-
if (
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
} else (_c = (_b =
|
|
134
|
-
} catch (
|
|
135
|
-
(_e = (_d =
|
|
207
|
+
if (_0x22a3ff) {
|
|
208
|
+
const _0x30bfe5 = {};
|
|
209
|
+
_0x30bfe5[_0x4d6f38(351)] = _0x22a3ff, _0x30bfe5["message"] = _0x4526cd, _0x30bfe5["data"] = _0x4c84d1;
|
|
210
|
+
const _0x2826a9 = {};
|
|
211
|
+
_0x2826a9[_0x2dab97(418)] = _0x30bfe5, _0x2826a9[_0x4d6f38(362)] = _0x835fee["DfdYr"], _0x2826a9["id"] = _0x305ba1, await ((_a = _0xac7dd2 == null ? void 0 : _0xac7dd2[_0x2dab97(388)]) == null ? void 0 : _a[_0x2dab97(391)](_0x2826a9));
|
|
212
|
+
} else (_c = (_b = _0xac7dd2 == null ? void 0 : _0xac7dd2[_0x4d6f38(388)]) == null ? void 0 : _b[_0x2dab97(344)]) == null ? void 0 : _c.call(_b, _0xf9c543);
|
|
213
|
+
} catch (_0x40eae9) {
|
|
214
|
+
(_e = (_d = _0xac7dd2 == null ? void 0 : _0xac7dd2["transport"]) == null ? void 0 : _d["onerror"]) == null ? void 0 : _e.call(_d, _0x40eae9);
|
|
136
215
|
}
|
|
137
216
|
}
|
|
138
217
|
};
|
|
139
218
|
};
|
|
140
|
-
const forwardServerOnNotification = (
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
return
|
|
144
|
-
},
|
|
145
|
-
const
|
|
146
|
-
|
|
219
|
+
const forwardServerOnNotification = (_0xb4ba8d, _0xf834ff) => {
|
|
220
|
+
const _0x51c3b7 = _0x1181, _0x5e43ec = _0x1181, _0x4fb04f = {};
|
|
221
|
+
_0x4fb04f[_0x51c3b7(416)] = function(_0x1e14c7, _0x4655ce) {
|
|
222
|
+
return _0x1e14c7 !== _0x4655ce;
|
|
223
|
+
}, _0x4fb04f[_0x51c3b7(341)] = _0x51c3b7(396), _0x4fb04f[_0x51c3b7(381)] = _0x5e43ec(359);
|
|
224
|
+
const _0x2c4e40 = _0x4fb04f;
|
|
225
|
+
_0xb4ba8d["_onnotification"] = async (_0x292553) => {
|
|
147
226
|
var _a, _b;
|
|
148
|
-
const
|
|
149
|
-
if (
|
|
150
|
-
await
|
|
151
|
-
} catch (
|
|
152
|
-
(_b = (_a =
|
|
227
|
+
const _0xeb083 = _0x51c3b7, _0x2fc11f = _0x5e43ec, { method: _0x5a72b5, params: _0x1b931b } = _0x292553;
|
|
228
|
+
if (_0x2c4e40["LQlBY"](_0x5a72b5, _0x2c4e40[_0xeb083(341)]) && (_0x2c4e40[_0x2fc11f(416)](_0x5a72b5, _0x2c4e40[_0x2fc11f(381)]) || (_0x1b931b == null ? void 0 : _0x1b931b["forward"]))) try {
|
|
229
|
+
await _0xf834ff["notification"](_0x292553);
|
|
230
|
+
} catch (_0x181fb6) {
|
|
231
|
+
(_b = (_a = _0xb4ba8d == null ? void 0 : _0xb4ba8d[_0x2fc11f(388)]) == null ? void 0 : _a[_0x2fc11f(344)]) == null ? void 0 : _b.call(_a, _0x181fb6);
|
|
153
232
|
}
|
|
154
233
|
};
|
|
155
234
|
};
|
|
156
|
-
const forwardClientOnRequest = (
|
|
235
|
+
const forwardClientOnRequest = (_0x32659b, _0x4b000c) => async (_0xe2dde8) => {
|
|
157
236
|
var _a, _b, _c, _d, _e;
|
|
158
|
-
const
|
|
159
|
-
return
|
|
160
|
-
}, "
|
|
237
|
+
const _0x22b4ad = _0x1181, _0x595874 = _0x1181, _0x5e1322 = { "EPDgC": function(_0xbc7e6a, _0x226d0b, _0x942db, _0xc2757d) {
|
|
238
|
+
return _0xbc7e6a(_0x226d0b, _0x942db, _0xc2757d);
|
|
239
|
+
}, "yXxfl": "2.0" };
|
|
161
240
|
try {
|
|
162
|
-
return await
|
|
163
|
-
} catch (
|
|
164
|
-
const { code:
|
|
241
|
+
return await _0x5e1322[_0x22b4ad(367)](forwardClientRequest, _0x32659b, _0x4b000c, _0xe2dde8);
|
|
242
|
+
} catch (_0x4cfcfa) {
|
|
243
|
+
const { code: _0x18ac33, message: _0x2c8a17, data: _0x1f7994 } = _0x4cfcfa;
|
|
165
244
|
try {
|
|
166
|
-
if (
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
} else (_c = (_b =
|
|
172
|
-
} catch (
|
|
173
|
-
(_e = (_d =
|
|
245
|
+
if (_0x18ac33) {
|
|
246
|
+
const _0x86d84d = {};
|
|
247
|
+
_0x86d84d["code"] = _0x18ac33, _0x86d84d[_0x22b4ad(352)] = _0x2c8a17, _0x86d84d["data"] = _0x1f7994;
|
|
248
|
+
const _0x193c35 = {};
|
|
249
|
+
_0x193c35[_0x595874(418)] = _0x86d84d, _0x193c35[_0x595874(362)] = _0x5e1322["yXxfl"], _0x193c35["id"] = _0xe2dde8["id"], await ((_a = _0x32659b == null ? void 0 : _0x32659b[_0x595874(388)]) == null ? void 0 : _a["send"](_0x193c35));
|
|
250
|
+
} else (_c = (_b = _0x32659b == null ? void 0 : _0x32659b[_0x22b4ad(388)]) == null ? void 0 : _b["onerror"]) == null ? void 0 : _c.call(_b, _0x4cfcfa);
|
|
251
|
+
} catch (_0x15b561) {
|
|
252
|
+
(_e = (_d = _0x32659b == null ? void 0 : _0x32659b[_0x595874(388)]) == null ? void 0 : _d[_0x22b4ad(344)]) == null ? void 0 : _e.call(_d, _0x15b561);
|
|
174
253
|
}
|
|
175
254
|
}
|
|
176
255
|
};
|
|
177
|
-
const forwardClientOnNotification = (
|
|
256
|
+
const forwardClientOnNotification = (_0x372fb8, _0x2de20b) => async (_0x36d5ea) => {
|
|
178
257
|
var _a, _b, _c;
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
return
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
258
|
+
const _0x278cea = _0x1181, _0x1310c9 = _0x1181, _0x162b13 = {};
|
|
259
|
+
_0x162b13[_0x278cea(350)] = function(_0x109b35, _0x2ed8c4) {
|
|
260
|
+
return _0x109b35 !== _0x2ed8c4;
|
|
261
|
+
}, _0x162b13["LbsLD"] = "notifications/initialized", _0x162b13[_0x1310c9(409)] = function(_0x1eb0d0, _0x1d1d78) {
|
|
262
|
+
return _0x1eb0d0 !== _0x1d1d78;
|
|
263
|
+
}, _0x162b13[_0x278cea(356)] = _0x278cea(359);
|
|
264
|
+
const _0x369e86 = _0x162b13, { method: _0xcd3b11, params: _0x379407 } = _0x36d5ea;
|
|
265
|
+
if (_0x369e86[_0x278cea(350)](_0xcd3b11, _0x369e86["LbsLD"]) && (_0x369e86[_0x1310c9(409)](_0xcd3b11, _0x369e86[_0x278cea(356)]) || (_0x379407 == null ? void 0 : _0x379407["forward"]))) try {
|
|
266
|
+
const _0x492ea3 = { ..._0x36d5ea };
|
|
267
|
+
_0x492ea3["jsonrpc"] = "2.0", await ((_a = _0x2de20b == null ? void 0 : _0x2de20b[_0x278cea(388)]) == null ? void 0 : _a[_0x278cea(391)](_0x492ea3));
|
|
268
|
+
} catch (_0x1b2458) {
|
|
269
|
+
(_c = (_b = _0x372fb8 == null ? void 0 : _0x372fb8["transport"]) == null ? void 0 : _b[_0x278cea(344)]) == null ? void 0 : _c.call(_b, _0x1b2458);
|
|
189
270
|
}
|
|
190
271
|
};
|
|
191
272
|
const createHandleListener = () => {
|
|
192
|
-
const
|
|
193
|
-
return
|
|
194
|
-
}, "
|
|
195
|
-
return
|
|
196
|
-
}, "
|
|
197
|
-
return
|
|
198
|
-
}, "
|
|
199
|
-
return
|
|
200
|
-
}
|
|
201
|
-
const
|
|
202
|
-
if (
|
|
203
|
-
const
|
|
204
|
-
for (const
|
|
273
|
+
const _0x3d420c = _0x1181, _0x1db963 = _0x1181, _0x67b429 = { "KRzLb": function(_0x47bd85, _0x3f5278, _0x49d5c8) {
|
|
274
|
+
return _0x47bd85(_0x3f5278, _0x49d5c8);
|
|
275
|
+
}, "VuaGF": function(_0x4c6cf1, _0x31b018) {
|
|
276
|
+
return _0x4c6cf1 !== _0x31b018;
|
|
277
|
+
}, "juaWL": function(_0x3f88e3, _0x27fe19) {
|
|
278
|
+
return _0x3f88e3(_0x27fe19);
|
|
279
|
+
}, "LUzBE": function(_0x2f3367, _0x5a57a4) {
|
|
280
|
+
return _0x2f3367 === _0x5a57a4;
|
|
281
|
+
} }, _0x364e0d = [], _0x20263d = (_0x1e2bf8, _0x249ad3) => {
|
|
282
|
+
const _0x52051f = _0x1181;
|
|
283
|
+
if (_0x249ad3) {
|
|
284
|
+
const _0x55ae80 = [];
|
|
285
|
+
for (const _0x5ac8c7 of _0x364e0d) {
|
|
205
286
|
try {
|
|
206
|
-
|
|
287
|
+
_0x55ae80[_0x52051f(414)](_0x67b429["KRzLb"](_0x5ac8c7, _0x1e2bf8, _0x249ad3));
|
|
207
288
|
} catch {
|
|
208
289
|
}
|
|
209
290
|
}
|
|
210
|
-
for (const
|
|
211
|
-
if (
|
|
291
|
+
for (const _0x4b4b76 of _0x55ae80) {
|
|
292
|
+
if (_0x67b429["VuaGF"](_0x4b4b76, null)) return _0x4b4b76;
|
|
212
293
|
}
|
|
213
|
-
} else for (const
|
|
294
|
+
} else for (const _0x108683 of _0x364e0d) {
|
|
214
295
|
try {
|
|
215
|
-
|
|
296
|
+
_0x67b429["juaWL"](_0x108683, _0x1e2bf8);
|
|
216
297
|
} catch {
|
|
217
298
|
}
|
|
218
299
|
}
|
|
219
|
-
},
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
},
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
},
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
},
|
|
229
|
-
return
|
|
230
|
-
}, setClientListener = (
|
|
231
|
-
const
|
|
232
|
-
return
|
|
233
|
-
}, "
|
|
234
|
-
return
|
|
235
|
-
}, "aktdr": function(_0x3ad61a) {
|
|
236
|
-
return _0x3ad61a();
|
|
300
|
+
}, _0x2d9cd8 = (_0x4531d5) => {
|
|
301
|
+
const _0x229534 = _0x1181;
|
|
302
|
+
_0x67b429[_0x229534(332)](typeof _0x4531d5, _0x229534(349)) && !_0x364e0d["includes"](_0x4531d5) && _0x364e0d[_0x229534(414)](_0x4531d5);
|
|
303
|
+
}, _0x9dc975 = (_0x4cfd2b) => {
|
|
304
|
+
const _0x27e710 = _0x1181, _0x58cdca = _0x1181, _0x5cfc9e = _0x364e0d[_0x27e710(386)](_0x4cfd2b);
|
|
305
|
+
_0x5cfc9e !== -1 && _0x364e0d[_0x58cdca(390)](_0x5cfc9e, 1497 + 900 + -2 * 1198);
|
|
306
|
+
}, _0x521014 = () => {
|
|
307
|
+
const _0x3e4310 = _0x1181;
|
|
308
|
+
_0x364e0d[_0x3e4310(413)] = 7203 + -5554 + 1649 * -1;
|
|
309
|
+
}, _0xa35486 = {};
|
|
310
|
+
return _0xa35486[_0x3d420c(399)] = _0x20263d, _0xa35486[_0x1db963(346)] = _0x2d9cd8, _0xa35486[_0x1db963(419)] = _0x9dc975, _0xa35486["clearListener"] = _0x521014, _0xa35486;
|
|
311
|
+
}, setClientListener = (_0x45257f) => {
|
|
312
|
+
const _0x5439a0 = _0x1181, _0x2c7f68 = _0x1181, _0x11a992 = { "lwlhr": function(_0x4c73bd) {
|
|
313
|
+
return _0x4c73bd();
|
|
314
|
+
}, "HSkRw": function(_0x27eeca) {
|
|
315
|
+
return _0x27eeca();
|
|
237
316
|
} };
|
|
238
317
|
{
|
|
239
|
-
const { handleListener:
|
|
240
|
-
|
|
318
|
+
const { handleListener: _0x45d201, addListener: _0x2aadec, removeListener: _0x5520cd, clearListener: _0x4e4a52 } = _0x11a992[_0x5439a0(382)](createHandleListener);
|
|
319
|
+
_0x45257f[_0x5439a0(395)] = _0x45d201, _0x45257f[_0x5439a0(363)] = _0x2aadec, _0x45257f[_0x5439a0(355)] = _0x5520cd, _0x45257f[_0x5439a0(335)] = _0x4e4a52;
|
|
241
320
|
}
|
|
242
321
|
{
|
|
243
|
-
const { handleListener:
|
|
244
|
-
|
|
322
|
+
const { handleListener: _0x125a7c, addListener: _0x287870, removeListener: _0x46d98a, clearListener: _0x5515a6 } = _0x11a992["HSkRw"](createHandleListener);
|
|
323
|
+
_0x45257f[_0x5439a0(353)] = _0x125a7c, _0x45257f[_0x2c7f68(387)] = _0x287870, _0x45257f["removeRequestListener"] = _0x46d98a, _0x45257f["clearRequestListener"] = _0x5515a6;
|
|
245
324
|
}
|
|
246
325
|
{
|
|
247
|
-
const { handleListener:
|
|
248
|
-
|
|
326
|
+
const { handleListener: _0x18b88f, addListener: _0x274f41, removeListener: _0x430102, clearListener: _0x1462dc } = _0x11a992["lwlhr"](createHandleListener);
|
|
327
|
+
_0x45257f["fallbackNotificationHandler"] = _0x18b88f, _0x45257f[_0x2c7f68(378)] = _0x274f41, _0x45257f[_0x2c7f68(398)] = _0x430102, _0x45257f["clearNotificationListener"] = _0x1462dc;
|
|
249
328
|
}
|
|
250
329
|
};
|
|
251
|
-
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
330
|
+
function _0x1181(_0x6bedb3, _0xe3189c) {
|
|
331
|
+
const _0x22bc1a = _0x19ad();
|
|
332
|
+
return _0x1181 = function(_0x671652, _0x29a241) {
|
|
333
|
+
_0x671652 = _0x671652 - (-7465 + -5032 + 12825);
|
|
334
|
+
let _0x1bde0e = _0x22bc1a[_0x671652];
|
|
335
|
+
return _0x1bde0e;
|
|
336
|
+
}, _0x1181(_0x6bedb3, _0xe3189c);
|
|
337
|
+
}
|
|
338
|
+
const initClientHandler = (_0x35f090, { beforeInit: _0x2967e8, afterInit: _0x27bcef } = {}) => {
|
|
339
|
+
const _0x4c142e = _0x1181, _0x4daaba = _0x1181, _0x1ecdc4 = { "PwoZn": function(_0x532ea1, _0x2e8b14) {
|
|
340
|
+
return _0x532ea1 === _0x2e8b14;
|
|
341
|
+
}, "JqaEZ": _0x4c142e(349), "RIPWm": function(_0x7f533c, _0x9dbf2b) {
|
|
342
|
+
return _0x7f533c(_0x9dbf2b);
|
|
343
|
+
}, "EvGJT": function(_0x3da6e9, _0xf9a90b) {
|
|
344
|
+
return _0x3da6e9 === _0xf9a90b;
|
|
345
|
+
}, "ARELI": function(_0xc67076) {
|
|
346
|
+
return _0xc67076();
|
|
347
|
+
}, "tGLCP": _0x4daaba(395), "NOoqd": function(_0x4de624, _0x3402d4) {
|
|
348
|
+
return _0x4de624(_0x3402d4);
|
|
349
|
+
} }, _0x5aa9d7 = new Map(_0x35f090["_notificationHandlers"]);
|
|
350
|
+
_0x35f090[_0x4c142e(404)][_0x4c142e(331)](), _0x35f090["_notificationHandlers"][_0x4daaba(331)](), _0x1ecdc4[_0x4c142e(366)](typeof _0x2967e8, _0x1ecdc4["JqaEZ"]) && _0x1ecdc4["ARELI"](_0x2967e8), _0x1ecdc4[_0x4daaba(402)](_0x35f090[_0x4c142e(395)][_0x4daaba(373)], _0x1ecdc4["tGLCP"]) && (_0x35f090["originalOnResponse"] = _0x35f090[_0x4daaba(395)]), _0x1ecdc4["NOoqd"](setClientListener, _0x35f090), _0x35f090["addResponseListener"]((_0x24a8a1) => {
|
|
351
|
+
const _0x4a7898 = _0x4c142e;
|
|
352
|
+
_0x35f090[_0x4a7898(421)][_0x4a7898(408)](_0x35f090, _0x24a8a1);
|
|
353
|
+
}), typeof _0x27bcef === "function" && _0x27bcef(), _0x35f090["addNotificationListener"]((_0x467dad) => {
|
|
354
|
+
const _0x318e0b = _0x4daaba, { method: _0x3f238f } = _0x467dad, _0x5e2a92 = _0x5aa9d7[_0x318e0b(357)](_0x3f238f);
|
|
355
|
+
_0x1ecdc4["PwoZn"](typeof _0x5e2a92, _0x1ecdc4[_0x318e0b(333)]) && _0x1ecdc4["RIPWm"](_0x5e2a92, _0x467dad);
|
|
265
356
|
});
|
|
266
357
|
};
|
|
267
|
-
const
|
|
268
|
-
(function(
|
|
269
|
-
const
|
|
358
|
+
const _0x57871e = _0x37cd;
|
|
359
|
+
(function(_0x4a2642, _0x4d53de) {
|
|
360
|
+
const _0x5a383b = _0x37cd, _0x11a9e7 = _0x37cd, _0x67e0b8 = _0x4a2642();
|
|
270
361
|
while (!![]) {
|
|
271
362
|
try {
|
|
272
|
-
const
|
|
273
|
-
if (
|
|
274
|
-
else
|
|
275
|
-
} catch (
|
|
276
|
-
|
|
363
|
+
const _0x459f4d = parseInt(_0x5a383b(323)) / (-1 * -1161 + 37 * -4 + -1012) * (parseInt(_0x5a383b(312)) / (4017 + -1 * -7765 + 62 * -190)) + parseInt(_0x11a9e7(319)) / (-34 * 203 + -3512 + -11 * -947) * (-parseInt(_0x5a383b(318)) / (1843 + 1 * 1880 + 3719 * -1)) + parseInt(_0x5a383b(327)) / (-8284 + -3 * -1387 + 4128) * (-parseInt(_0x11a9e7(313)) / (9217 * -1 + 157 * 1 + 9066)) + -parseInt(_0x5a383b(326)) / (7318 + -2177 * -2 + -5 * 2333) * (-parseInt(_0x11a9e7(309)) / (4427 * -1 + -4169 * 1 + 8604)) + parseInt(_0x5a383b(325)) / (8628 + 6564 + 5061 * -3) * (parseInt(_0x11a9e7(314)) / (-4305 + 11 * 87 + 3358)) + -parseInt(_0x5a383b(317)) / (9927 * 1 + -2802 + -7114) * (parseInt(_0x11a9e7(320)) / (4 * -2090 + 2 * 2826 + 2720)) + -parseInt(_0x5a383b(324)) / (-3484 + 6 * 186 + 2381) * (-parseInt(_0x11a9e7(322)) / (-6467 + 895 + 5586));
|
|
364
|
+
if (_0x459f4d === _0x4d53de) break;
|
|
365
|
+
else _0x67e0b8["push"](_0x67e0b8["shift"]());
|
|
366
|
+
} catch (_0x4b03b5) {
|
|
367
|
+
_0x67e0b8["push"](_0x67e0b8["shift"]());
|
|
277
368
|
}
|
|
278
369
|
}
|
|
279
|
-
})(
|
|
280
|
-
function _0x85e5(_0x52ead4, _0x32d1a9) {
|
|
281
|
-
const _0x1b6a32 = _0x3c31();
|
|
282
|
-
return _0x85e5 = function(_0x4d8349, _0xeb65a8) {
|
|
283
|
-
_0x4d8349 = _0x4d8349 - (-3 * 1 + 1171 * 6 + -6671);
|
|
284
|
-
let _0x463176 = _0x1b6a32[_0x4d8349];
|
|
285
|
-
return _0x463176;
|
|
286
|
-
}, _0x85e5(_0x52ead4, _0x32d1a9);
|
|
287
|
-
}
|
|
370
|
+
})(_0x4d6f, -70916 + 484898 + -157620);
|
|
288
371
|
const randomUUID = () => {
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
return
|
|
292
|
-
},
|
|
293
|
-
return
|
|
294
|
-
},
|
|
295
|
-
return
|
|
296
|
-
},
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
const _0x3e02dd = _0x54795d, _0x5e898d = _0x54795d, _0x25b62a = _0x321cf1[_0x3e02dd(365)](crypto["getRandomValues"](new Uint8Array(-4420 + -3564 + 1597 * 5))[-15 * 5 + -298 * -14 + -4097], 4 * -416 + -5 * 221 + 2784), _0x576ad7 = _0x321cf1[_0x5e898d(360)](_0x4a99d2, "x") ? _0x25b62a : _0x321cf1[_0x3e02dd(352)](_0x321cf1["UVwSO"](_0x25b62a, 331 * 7 + -9813 * 1 + 1 * 7499), -4294 * -1 + 28 * -356 + 5682);
|
|
303
|
-
return _0x576ad7[_0x3e02dd(363)](8896 + 47 * -50 + -653 * 10);
|
|
372
|
+
const _0x3fd457 = _0x37cd, _0x18b939 = {};
|
|
373
|
+
_0x18b939["iMLeY"] = function(_0xb95b8d, _0x357fb7) {
|
|
374
|
+
return _0xb95b8d & _0x357fb7;
|
|
375
|
+
}, _0x18b939["AfkFc"] = function(_0x5e1b5a, _0x4b4469) {
|
|
376
|
+
return _0x5e1b5a === _0x4b4469;
|
|
377
|
+
}, _0x18b939[_0x3fd457(315)] = function(_0x275556, _0x3086ab) {
|
|
378
|
+
return _0x275556 | _0x3086ab;
|
|
379
|
+
}, _0x18b939["lXWlJ"] = "object", _0x18b939[_0x3fd457(316)] = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";
|
|
380
|
+
const _0x360e1c = _0x18b939;
|
|
381
|
+
if (typeof crypto === _0x360e1c["lXWlJ"] && crypto["randomUUID"]) return crypto["randomUUID"]();
|
|
382
|
+
return _0x360e1c["TgEQJ"]["replace"](/[xy]/g, (_0x330643) => {
|
|
383
|
+
const _0x37133f = _0x3fd457, _0xb63864 = _0x360e1c["iMLeY"](crypto["getRandomValues"](new Uint8Array(-9498 + -129 * 38 + 1 * 14401))[6211 + -1441 * 3 + -16 * 118], 1481 * -1 + -1 * 5426 + 1 * 6922), _0x61d527 = _0x360e1c[_0x37133f(328)](_0x330643, "x") ? _0xb63864 : _0x360e1c[_0x37133f(315)](_0x360e1c["iMLeY"](_0xb63864, 355 * -8 + 7520 + 1 * -4677), -5610 + 1 * 1279 + 4339 * 1);
|
|
384
|
+
return _0x61d527["toString"](3137 * 3 + -5379 + -4016);
|
|
304
385
|
});
|
|
305
|
-
}, randomBytes = (
|
|
306
|
-
const
|
|
307
|
-
return crypto[
|
|
308
|
-
},
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
return _0x283233;
|
|
386
|
+
}, randomBytes = (_0x48bdb7) => {
|
|
387
|
+
const _0x26cb3f = _0x37cd, _0x301f84 = _0x37cd, _0x4aab8b = new Uint8Array(_0x48bdb7);
|
|
388
|
+
return crypto[_0x26cb3f(311)](_0x4aab8b), Array["from"](_0x4aab8b, (_0x2ea426) => _0x2ea426[_0x26cb3f(321)](-5686 + -83 * 11 + 6615 * 1)[_0x26cb3f(310)](-8945 * -1 + 5 * 525 + -48 * 241, "0"))[_0x301f84(308)]("");
|
|
389
|
+
}, _0x1a9a7a = {};
|
|
390
|
+
function _0x4d6f() {
|
|
391
|
+
const _0x19f64f = ["88nLAvAi", "padStart", "getRandomValues", "2IeXpGt", "1895970GWXOUI", "830SFAZva", "yGUWS", "TgEQJ", "5224769CnJgiw", "1950968yrcqKg", "3xizYBD", "12OMaoYl", "toString", "46718lIDNiA", "380701tBBDNK", "1235BBideQ", "44217UXxqNh", "273371RNKObV", "5GMHUki", "AfkFc", "randomUUID", "join"];
|
|
392
|
+
_0x4d6f = function() {
|
|
393
|
+
return _0x19f64f;
|
|
314
394
|
};
|
|
315
|
-
return
|
|
395
|
+
return _0x4d6f();
|
|
396
|
+
}
|
|
397
|
+
_0x1a9a7a[_0x57871e(329)] = randomUUID, _0x1a9a7a["randomBytes"] = randomBytes;
|
|
398
|
+
function _0x37cd(_0x4d9d7f, _0x350eae) {
|
|
399
|
+
const _0x53bced = _0x4d6f();
|
|
400
|
+
return _0x37cd = function(_0xe6858f, _0x46a480) {
|
|
401
|
+
_0xe6858f = _0xe6858f - (4 * -230 + -1 * 9874 + -427 * -26);
|
|
402
|
+
let _0x2c5757 = _0x53bced[_0xe6858f];
|
|
403
|
+
return _0x2c5757;
|
|
404
|
+
}, _0x37cd(_0x4d9d7f, _0x350eae);
|
|
316
405
|
}
|
|
317
|
-
const
|
|
318
|
-
(function(
|
|
319
|
-
const
|
|
406
|
+
const _0x41e2e9 = _0x51d3, _0x213126 = _0x51d3;
|
|
407
|
+
(function(_0x1164d4, _0x45d9de) {
|
|
408
|
+
const _0x26ba1f = _0x51d3, _0x4df724 = _0x51d3, _0x3581a6 = _0x1164d4();
|
|
320
409
|
while (!![]) {
|
|
321
410
|
try {
|
|
322
|
-
const
|
|
323
|
-
if (
|
|
324
|
-
else
|
|
325
|
-
} catch (
|
|
326
|
-
|
|
411
|
+
const _0x5574e4 = parseInt(_0x26ba1f(510)) / (2 * 731 + -19 * -373 + -8548 * 1) + parseInt(_0x26ba1f(561)) / (-8123 * 1 + -13 * 667 + 16796) + parseInt(_0x4df724(502)) / (1256 * 1 + 7534 + -2929 * 3) * (-parseInt(_0x4df724(522)) / (-9713 + 3183 + 6534)) + parseInt(_0x26ba1f(530)) / (-4278 + 8021 + -3738) * (parseInt(_0x26ba1f(572)) / (-3 * -1252 + -1837 + -1913)) + parseInt(_0x26ba1f(553)) / (6764 + 1 * 4331 + -11088) + parseInt(_0x26ba1f(559)) / (-8235 + -4855 + 13098) + parseInt(_0x4df724(484)) / (8350 + 1548 + -11 * 899) * (-parseInt(_0x26ba1f(516)) / (-4328 + -595 + 4933));
|
|
412
|
+
if (_0x5574e4 === _0x45d9de) break;
|
|
413
|
+
else _0x3581a6["push"](_0x3581a6["shift"]());
|
|
414
|
+
} catch (_0xaf8042) {
|
|
415
|
+
_0x3581a6["push"](_0x3581a6["shift"]());
|
|
327
416
|
}
|
|
328
417
|
}
|
|
329
|
-
})(
|
|
330
|
-
function
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
418
|
+
})(_0x546c, 7 * 47702 + -893118 + -227 * -5534);
|
|
419
|
+
function _0x546c() {
|
|
420
|
+
const _0x5f445d = ["client_id", "saveCodeData", "configuredResource", "access-control-allow-origin", "LYfiu", "yEBSy", "Authorization code was not issued to this client: ", "350TbRoZy", "use", "saveRefreshToken", "saveClient", "resource", "pRrjv", "KMJLb", "Token is invalid", "refreshTokenExpiresIn", "accessTokensStore", "NJOYh", "state", "expiresAt", "MnTVg", "authorize", "Access-Control-Allow-Origin", "getAccessToken", "redirect_uris", "accessTokens", "NtLNZ", "join", "generateAccessToken", "scope", "4256294hjXESV", "getRefreshToken", "refreshTokensStore", "Router", "token", "search", "7147200HrfFEz", "gnlGJ", "689926uXTJYY", "body", "scopes", "rhzvc", "registerClient", "RZFdN", "bearer", "codesStore", "redirect", "Refresh token is invalid or does not belong to this client: ", "access_token", "22662sytYEP", "VBcPV", "randomBytes", "now", "generateAuthorizationCode", "accessTokenExpiresIn", "Bearer", "94518WgSjRK", "split", "exp", "params", "client", "rbfjJ", "refreshTokens", "QSLMV", "href", "getHeader", "deleteCodeData", "clientId", "token_type_hint", "delete", "query", "redirectUri", "Invalid authorization code for this client: ", "generateRefreshToken", "118890VNbZaA", "get", "refresh_token", "/.well-known/oauth-authorization-server", "hwcVG", "json", "MZSsG", "codes", "1046851yvzKrR", "set", "HqYqs", "dYbbc", "clients", "rISOo", "1060oXrpJU", "extra", "getCodeDate", "setHeader", "verifyAccessToken", "getClient", "136GFWgmW"];
|
|
421
|
+
_0x546c = function() {
|
|
422
|
+
return _0x5f445d;
|
|
423
|
+
};
|
|
424
|
+
return _0x546c();
|
|
425
|
+
}
|
|
426
|
+
function _0x51d3(_0x51b50d, _0x46c74f) {
|
|
427
|
+
const _0x349c99 = _0x546c();
|
|
428
|
+
return _0x51d3 = function(_0x5b339e, _0x261678) {
|
|
429
|
+
_0x5b339e = _0x5b339e - (4093 * -1 + 9184 + -4611);
|
|
430
|
+
let _0x2d5fb8 = _0x349c99[_0x5b339e];
|
|
431
|
+
return _0x2d5fb8;
|
|
432
|
+
}, _0x51d3(_0x51b50d, _0x46c74f);
|
|
337
433
|
}
|
|
338
|
-
const ACCESS_TOKEN_EXPIRES_IN = (-
|
|
339
|
-
const REFRESH_TOKEN_EXPIRES_IN = (
|
|
434
|
+
const ACCESS_TOKEN_EXPIRES_IN = (-1931 + 3112 * -2 + 1 * 8179) * (-5 * -1779 + -9 * -491 + 4418 * -3) * (3389 + -4 * 905 + 3 * 97);
|
|
435
|
+
const REFRESH_TOKEN_EXPIRES_IN = (2899 * -3 + 5905 + 2799) * (8359 + -4353 + -22 * 181) * (-2 * -2425 + 3 * 1095 + -19 * 425) * (-1338 * 7 + -7381 + 16807);
|
|
340
436
|
const generateAuthorizationCodeFunction = () => {
|
|
341
|
-
const
|
|
342
|
-
return
|
|
437
|
+
const _0x17c020 = _0x51d3;
|
|
438
|
+
return _0x1a9a7a[_0x17c020(574)](-6291 + -7516 + 1 * 13831);
|
|
343
439
|
}, generateAccessTokenFunction = () => {
|
|
344
|
-
return
|
|
440
|
+
return _0x1a9a7a["randomBytes"](-7490 + -4299 + 1 * 11821);
|
|
345
441
|
}, generateRefreshTokenFunction = () => {
|
|
346
|
-
return
|
|
442
|
+
return _0x1a9a7a["randomBytes"](-808 * 1 + -9477 + -10333 * -1);
|
|
347
443
|
};
|
|
348
444
|
class MemoryClientsStore {
|
|
349
445
|
constructor() {
|
|
350
|
-
|
|
351
|
-
this[_0x47ee45(418)] = /* @__PURE__ */ new Map();
|
|
446
|
+
this["clients"] = /* @__PURE__ */ new Map();
|
|
352
447
|
}
|
|
353
|
-
async [
|
|
354
|
-
const
|
|
355
|
-
return this["clients"][
|
|
448
|
+
async [_0x41e2e9(521)](_0x4a3414) {
|
|
449
|
+
const _0x3ca175 = _0x41e2e9;
|
|
450
|
+
return this["clients"][_0x3ca175(503)](_0x4a3414);
|
|
356
451
|
}
|
|
357
|
-
async [
|
|
358
|
-
const
|
|
359
|
-
return this[
|
|
452
|
+
async [_0x41e2e9(533)](_0x4035d1) {
|
|
453
|
+
const _0x17f788 = _0x213126;
|
|
454
|
+
return this["clients"][_0x17f788(511)](_0x4035d1["client_id"], _0x4035d1), _0x4035d1;
|
|
360
455
|
}
|
|
361
|
-
async [
|
|
362
|
-
const
|
|
363
|
-
return this[
|
|
456
|
+
async ["deleteClient"](_0x301e29) {
|
|
457
|
+
const _0x1e5303 = _0x213126;
|
|
458
|
+
return this[_0x1e5303(514)]["delete"](_0x301e29);
|
|
364
459
|
}
|
|
365
|
-
async [
|
|
366
|
-
return this["saveClient"](
|
|
460
|
+
async [_0x41e2e9(565)](_0x41b149) {
|
|
461
|
+
return this["saveClient"](_0x41b149);
|
|
367
462
|
}
|
|
368
463
|
}
|
|
369
464
|
class MemoryAuthorizationCodeStore {
|
|
370
465
|
constructor() {
|
|
371
466
|
this["codes"] = /* @__PURE__ */ new Map();
|
|
372
467
|
}
|
|
373
|
-
async [
|
|
374
|
-
const
|
|
375
|
-
return this[
|
|
468
|
+
async [_0x41e2e9(518)](_0x17d56e) {
|
|
469
|
+
const _0x2672a5 = _0x213126;
|
|
470
|
+
return this["codes"][_0x2672a5(503)](_0x17d56e);
|
|
376
471
|
}
|
|
377
|
-
async [
|
|
378
|
-
const
|
|
379
|
-
return this[
|
|
472
|
+
async [_0x213126(524)](_0x288704, _0x403271) {
|
|
473
|
+
const _0x2cc2d6 = _0x213126, _0x40c5b7 = _0x41e2e9;
|
|
474
|
+
return this[_0x2cc2d6(509)][_0x40c5b7(511)](_0x288704, _0x403271), !![];
|
|
380
475
|
}
|
|
381
|
-
async [
|
|
382
|
-
const
|
|
383
|
-
return this[
|
|
476
|
+
async [_0x213126(494)](_0x2573f0) {
|
|
477
|
+
const _0x1255ff = _0x41e2e9;
|
|
478
|
+
return this["codes"][_0x1255ff(497)](_0x2573f0);
|
|
384
479
|
}
|
|
385
480
|
}
|
|
386
481
|
class MemoryAccessTokensStore {
|
|
387
482
|
constructor() {
|
|
388
483
|
this["accessTokens"] = /* @__PURE__ */ new Map();
|
|
389
484
|
}
|
|
390
|
-
async [
|
|
391
|
-
return this["accessTokens"]["get"](
|
|
485
|
+
async [_0x213126(546)](_0x4e2e6d) {
|
|
486
|
+
return this["accessTokens"]["get"](_0x4e2e6d);
|
|
392
487
|
}
|
|
393
|
-
async ["saveAccessToken"](
|
|
394
|
-
return this["accessTokens"]["set"](
|
|
488
|
+
async ["saveAccessToken"](_0x3dae91, _0x505c58) {
|
|
489
|
+
return this["accessTokens"]["set"](_0x3dae91, _0x505c58), !![];
|
|
395
490
|
}
|
|
396
|
-
async ["revokeAccessToken"](
|
|
397
|
-
|
|
491
|
+
async ["revokeAccessToken"](_0x5994c4) {
|
|
492
|
+
const _0x5e14ee = _0x213126;
|
|
493
|
+
return this[_0x5e14ee(548)]["delete"](_0x5994c4);
|
|
398
494
|
}
|
|
399
495
|
}
|
|
400
496
|
class MemoryRefreshTokensStore {
|
|
401
497
|
constructor() {
|
|
402
|
-
|
|
498
|
+
const _0x329aad = _0x41e2e9;
|
|
499
|
+
this[_0x329aad(490)] = /* @__PURE__ */ new Map();
|
|
403
500
|
}
|
|
404
|
-
async [
|
|
405
|
-
const
|
|
406
|
-
return this[
|
|
501
|
+
async [_0x213126(554)](_0x353cc6) {
|
|
502
|
+
const _0x4cbb73 = _0x41e2e9;
|
|
503
|
+
return this[_0x4cbb73(490)]["get"](_0x353cc6);
|
|
407
504
|
}
|
|
408
|
-
async [
|
|
409
|
-
|
|
505
|
+
async [_0x213126(532)](_0x9ee135, _0x3443ee) {
|
|
506
|
+
const _0x530e10 = _0x213126;
|
|
507
|
+
return this["refreshTokens"][_0x530e10(511)](_0x9ee135, _0x3443ee), !![];
|
|
410
508
|
}
|
|
411
|
-
async [
|
|
412
|
-
|
|
413
|
-
return this[_0x5a1b5a(427)][_0x2c4bd0(414)](_0x462845);
|
|
509
|
+
async ["revokeRefreshToken"](_0x5629c1) {
|
|
510
|
+
return this["refreshTokens"]["delete"](_0x5629c1);
|
|
414
511
|
}
|
|
415
512
|
}
|
|
416
513
|
class AuthServerProvider {
|
|
417
|
-
constructor(
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
return
|
|
514
|
+
constructor(_0x52b1ad = {}) {
|
|
515
|
+
const _0x3eba9c = _0x213126, _0x1f8da0 = _0x213126, _0x239d64 = {};
|
|
516
|
+
_0x239d64["KMJLb"] = function(_0x2ed2e7, _0x2716fc) {
|
|
517
|
+
return _0x2ed2e7 || _0x2716fc;
|
|
518
|
+
}, _0x239d64["mfqSi"] = function(_0xceb615, _0xf13f47) {
|
|
519
|
+
return _0xceb615 || _0xf13f47;
|
|
421
520
|
};
|
|
422
|
-
const
|
|
423
|
-
this["clientsStore"] =
|
|
424
|
-
}
|
|
425
|
-
async [
|
|
426
|
-
const
|
|
427
|
-
|
|
428
|
-
return
|
|
429
|
-
},
|
|
430
|
-
const
|
|
431
|
-
|
|
432
|
-
const
|
|
433
|
-
|
|
434
|
-
const
|
|
435
|
-
|
|
436
|
-
const
|
|
437
|
-
|
|
438
|
-
}
|
|
439
|
-
async [
|
|
440
|
-
const
|
|
441
|
-
if (!
|
|
442
|
-
return
|
|
443
|
-
}
|
|
444
|
-
async [
|
|
445
|
-
const
|
|
446
|
-
|
|
447
|
-
return
|
|
448
|
-
},
|
|
449
|
-
return
|
|
450
|
-
},
|
|
451
|
-
return
|
|
452
|
-
}, _0x5d0149[_0x5c6596(378)] = function(_0xef8ffd, _0x35dedd) {
|
|
453
|
-
return _0xef8ffd * _0x35dedd;
|
|
454
|
-
}, _0x5d0149[_0x597b57(429)] = _0x5c6596(387);
|
|
455
|
-
const _0x1c8357 = _0x5d0149, _0x50c85b = await this[_0x597b57(376)]["getCodeDate"](_0x19482b);
|
|
456
|
-
if (!_0x50c85b) throw new InvalidGrantError("Invalid authorization code for this client: " + _0x2adcff[_0x597b57(419)]);
|
|
457
|
-
if (_0x1c8357["sKcvw"](_0x50c85b[_0x5c6596(431)]["client_id"], _0x2adcff[_0x5c6596(419)])) throw new InvalidGrantError(_0x5c6596(339) + _0x2adcff["client_id"]);
|
|
458
|
-
const _0x111fa2 = _0x50c85b["params"]["redirectUri"] || _0x50c85b[_0x5c6596(431)][_0x597b57(384)][-9433 + 512 * -2 + -10457 * -1];
|
|
459
|
-
await this[_0x597b57(376)][_0x5c6596(401)](_0x19482b);
|
|
460
|
-
const _0x107f30 = this["generateAccessToken"](), _0x925d45 = this["generateRefreshToken"](), _0x3dbe82 = {};
|
|
461
|
-
_0x3dbe82[_0x5c6596(394)] = _0x111fa2;
|
|
462
|
-
const _0x5c96f5 = { "token": _0x107f30, "clientId": _0x2adcff[_0x5c6596(419)], "scopes": _0x50c85b[_0x5c6596(369)][_0x597b57(359)] || [], "expiresAt": _0x1c8357[_0x597b57(344)](Date[_0x597b57(354)](), _0x1c8357["XKVYr"](this[_0x597b57(412)], 6752 + 8165 + -13917)), "resource": _0x50c85b["params"]["resource"], "extra": _0x3dbe82 };
|
|
463
|
-
await this[_0x597b57(374)][_0x5c6596(367)](_0x107f30, _0x5c96f5);
|
|
464
|
-
const _0x2ce974 = {};
|
|
465
|
-
_0x2ce974["isRevoked"] = ![];
|
|
466
|
-
const _0xbf52b9 = { "token": _0x925d45, "clientId": _0x2adcff["client_id"], "scopes": _0x50c85b[_0x597b57(369)][_0x597b57(359)] || [], "expiresAt": _0x1c8357["WbEUC"](Date[_0x5c6596(354)](), _0x1c8357[_0x5c6596(378)](this[_0x5c6596(357)], 1 * -2921 + -1542 * -6 + -5331)), "extra": _0x2ce974 };
|
|
467
|
-
return await this["refreshTokensStore"]["saveRefreshToken"](_0x925d45, _0xbf52b9), { "access_token": _0x107f30, "refresh_token": _0x925d45, "token_type": _0x1c8357[_0x597b57(429)], "expires_in": this[_0x5c6596(412)], "scope": (_0x50c85b["params"][_0x5c6596(359)] || [])["join"](" ") };
|
|
468
|
-
}
|
|
469
|
-
async ["exchangeRefreshToken"](_0x1a781d, _0x27006f) {
|
|
470
|
-
const _0x478159 = _0x4f289c, _0x4d6ca4 = _0x4f289c, _0x3e04cb = {};
|
|
471
|
-
_0x3e04cb[_0x478159(389)] = function(_0xf7c948, _0x229ccf) {
|
|
472
|
-
return _0xf7c948 < _0x229ccf;
|
|
473
|
-
}, _0x3e04cb[_0x4d6ca4(362)] = function(_0x14ed30, _0x1fa976) {
|
|
474
|
-
return _0x14ed30 + _0x1fa976;
|
|
475
|
-
}, _0x3e04cb["DdiDW"] = function(_0xfb60e8, _0x1af7ae) {
|
|
476
|
-
return _0xfb60e8 * _0x1af7ae;
|
|
521
|
+
const _0x4359fc = _0x239d64, { clientsStore: _0x48d91d, codesStore: _0x1eb5f5, accessTokensStore: _0x6876fa, refreshTokensStore: _0x5a3fe2, generateAuthorizationCode: _0xca3e6c, generateAccessToken: _0x9277b, generateRefreshToken: _0x4e64d8, accessTokenExpiresIn: _0x2b2396, refreshTokenExpiresIn: _0x334795 } = _0x52b1ad;
|
|
522
|
+
this["clientsStore"] = _0x48d91d || new MemoryClientsStore(), this[_0x3eba9c(568)] = _0x1eb5f5 || new MemoryAuthorizationCodeStore(), this["accessTokensStore"] = _0x6876fa || new MemoryAccessTokensStore(), this[_0x1f8da0(555)] = _0x5a3fe2 || new MemoryRefreshTokensStore(), this[_0x1f8da0(481)] = _0x4359fc["KMJLb"](_0xca3e6c, generateAuthorizationCodeFunction), this[_0x3eba9c(551)] = _0x4359fc[_0x3eba9c(536)](_0x9277b, generateAccessTokenFunction), this["generateRefreshToken"] = _0x4359fc["KMJLb"](_0x4e64d8, generateRefreshTokenFunction), this[_0x1f8da0(482)] = _0x2b2396 || ACCESS_TOKEN_EXPIRES_IN, this[_0x3eba9c(538)] = _0x4359fc["mfqSi"](_0x334795, REFRESH_TOKEN_EXPIRES_IN);
|
|
523
|
+
}
|
|
524
|
+
async [_0x41e2e9(544)](_0x28a5d7, _0x1eece5, _0x20517b) {
|
|
525
|
+
const _0x4da09b = _0x41e2e9, _0x4c8d2f = _0x213126, _0x520389 = {};
|
|
526
|
+
_0x520389["gnlGJ"] = function(_0x463dc3, _0x1b8b49) {
|
|
527
|
+
return _0x463dc3 !== _0x1b8b49;
|
|
528
|
+
}, _0x520389["KibBY"] = "state";
|
|
529
|
+
const _0x4ea3f5 = _0x520389, _0x4fba03 = this[_0x4da09b(481)](), _0x2420a6 = {};
|
|
530
|
+
_0x2420a6["code"] = _0x4fba03;
|
|
531
|
+
const _0x51b78c = new URLSearchParams(_0x2420a6);
|
|
532
|
+
_0x4ea3f5[_0x4da09b(560)](_0x1eece5[_0x4c8d2f(541)], void 0) && _0x51b78c["set"](_0x4ea3f5["KibBY"], _0x1eece5["state"]);
|
|
533
|
+
const _0x4a093a = {};
|
|
534
|
+
_0x4a093a[_0x4c8d2f(488)] = _0x28a5d7, _0x4a093a[_0x4c8d2f(487)] = _0x1eece5, await this["codesStore"]["saveCodeData"](_0x4fba03, _0x4a093a);
|
|
535
|
+
const _0x4af24c = new URL(_0x1eece5["redirectUri"] || _0x28a5d7["redirect_uris"][-16 * 367 + 7394 + 2 * -761]);
|
|
536
|
+
_0x4af24c[_0x4c8d2f(558)] = _0x51b78c["toString"](), _0x20517b[_0x4c8d2f(569)](_0x4af24c["toString"]());
|
|
537
|
+
}
|
|
538
|
+
async ["challengeForAuthorizationCode"](_0x5486b9, _0x41cba7) {
|
|
539
|
+
const _0x3ad093 = _0x41e2e9, _0x4ff28c = await this[_0x3ad093(568)]["getCodeDate"](_0x41cba7);
|
|
540
|
+
if (!_0x4ff28c) throw new InvalidGrantError("Invalid authorization code for this client: " + _0x5486b9[_0x3ad093(523)]);
|
|
541
|
+
return _0x4ff28c[_0x3ad093(487)]["codeChallenge"];
|
|
542
|
+
}
|
|
543
|
+
async ["exchangeAuthorizationCode"](_0xe7634c, _0x1306a6) {
|
|
544
|
+
const _0x2e62a3 = _0x41e2e9, _0x164d9c = _0x41e2e9, _0x25b42e = {};
|
|
545
|
+
_0x25b42e["TPDdm"] = function(_0x4186f0, _0x3f2dd9) {
|
|
546
|
+
return _0x4186f0 !== _0x3f2dd9;
|
|
547
|
+
}, _0x25b42e["hwcVG"] = function(_0xf114e5, _0x282a69) {
|
|
548
|
+
return _0xf114e5 + _0x282a69;
|
|
549
|
+
}, _0x25b42e["NtLNZ"] = function(_0x4c9b64, _0x29bcf4) {
|
|
550
|
+
return _0x4c9b64 * _0x29bcf4;
|
|
477
551
|
};
|
|
478
|
-
const
|
|
479
|
-
if (!
|
|
480
|
-
if (
|
|
481
|
-
|
|
482
|
-
await this[
|
|
483
|
-
const
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
const
|
|
488
|
-
|
|
489
|
-
const
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
552
|
+
const _0x171cff = _0x25b42e, _0x12d412 = await this[_0x2e62a3(568)]["getCodeDate"](_0x1306a6);
|
|
553
|
+
if (!_0x12d412) throw new InvalidGrantError(_0x164d9c(500) + _0xe7634c["client_id"]);
|
|
554
|
+
if (_0x171cff["TPDdm"](_0x12d412["client"][_0x164d9c(523)], _0xe7634c[_0x164d9c(523)])) throw new InvalidGrantError(_0x164d9c(529) + _0xe7634c["client_id"]);
|
|
555
|
+
const _0x56dbb6 = _0x12d412["params"][_0x164d9c(499)] || _0x12d412["client"][_0x2e62a3(547)][-50 * 16 + -4 * -50 + -40 * -15];
|
|
556
|
+
await this[_0x2e62a3(568)][_0x164d9c(494)](_0x1306a6);
|
|
557
|
+
const _0xd56756 = this[_0x2e62a3(551)](), _0x1479aa = this[_0x2e62a3(501)](), _0x68d8ff = {};
|
|
558
|
+
_0x68d8ff["redirectUri"] = _0x56dbb6;
|
|
559
|
+
const _0x548e78 = { "token": _0xd56756, "clientId": _0xe7634c[_0x2e62a3(523)], "scopes": _0x12d412[_0x2e62a3(487)][_0x164d9c(563)] || [], "expiresAt": _0x171cff["hwcVG"](Date["now"](), this[_0x164d9c(482)] * (377 * 26 + 3260 * 1 + -12062)), "resource": _0x12d412[_0x2e62a3(487)]["resource"], "extra": _0x68d8ff };
|
|
560
|
+
await this[_0x2e62a3(539)]["saveAccessToken"](_0xd56756, _0x548e78);
|
|
561
|
+
const _0x42dbd7 = {};
|
|
562
|
+
_0x42dbd7["isRevoked"] = ![];
|
|
563
|
+
const _0x3fbe89 = { "token": _0x1479aa, "clientId": _0xe7634c["client_id"], "scopes": _0x12d412["params"][_0x2e62a3(563)] || [], "expiresAt": _0x171cff[_0x164d9c(506)](Date[_0x164d9c(480)](), _0x171cff[_0x2e62a3(549)](this["refreshTokenExpiresIn"], -169 * -28 + 1 * -2141 + -1591)), "extra": _0x42dbd7 };
|
|
564
|
+
return await this[_0x164d9c(555)][_0x2e62a3(532)](_0x1479aa, _0x3fbe89), { "access_token": _0xd56756, "refresh_token": _0x1479aa, "token_type": _0x2e62a3(567), "expires_in": this["accessTokenExpiresIn"], "scope": (_0x12d412[_0x2e62a3(487)][_0x164d9c(563)] || [])["join"](" ") };
|
|
565
|
+
}
|
|
566
|
+
async ["exchangeRefreshToken"](_0x200485, _0x3f1bf7) {
|
|
567
|
+
const _0x4cb376 = _0x41e2e9, _0x216041 = _0x41e2e9, _0x108810 = {};
|
|
568
|
+
_0x108810[_0x4cb376(508)] = function(_0x2743ba, _0x531785) {
|
|
569
|
+
return _0x2743ba !== _0x531785;
|
|
570
|
+
}, _0x108810["Qryol"] = function(_0x40cde2, _0x502f98) {
|
|
571
|
+
return _0x40cde2 * _0x502f98;
|
|
572
|
+
}, _0x108810[_0x216041(543)] = _0x4cb376(483);
|
|
573
|
+
const _0x4d15a6 = _0x108810, _0x38de8b = await this["refreshTokensStore"][_0x4cb376(554)](_0x3f1bf7);
|
|
574
|
+
if (!_0x38de8b) throw new InvalidGrantError("Refresh token is invalid or has been revoked for this client: " + _0x200485[_0x4cb376(523)]);
|
|
575
|
+
if (_0x38de8b[_0x4cb376(542)] < Date[_0x216041(480)]()) throw new InvalidGrantError("Refresh token has expired for this client: " + _0x200485["client_id"]);
|
|
576
|
+
if (_0x4d15a6["MZSsG"](_0x38de8b["clientId"], _0x200485["client_id"])) throw new InvalidGrantError("Refresh token was not issued to this client: " + _0x200485[_0x216041(523)]);
|
|
577
|
+
await this["refreshTokensStore"]["revokeRefreshToken"](_0x3f1bf7);
|
|
578
|
+
const _0x2a05b7 = this[_0x4cb376(551)](), _0x332e00 = this[_0x4cb376(501)](), _0x10af51 = { "token": _0x3f1bf7, "clientId": _0x200485[_0x216041(523)], "scopes": _0x38de8b["scopes"], "expiresAt": Date[_0x216041(480)]() + _0x4d15a6["Qryol"](this["refreshTokenExpiresIn"], -4 * 1709 + -9572 + 17408) };
|
|
579
|
+
return await this["refreshTokensStore"]["saveRefreshToken"](_0x3f1bf7, _0x10af51), { "access_token": _0x2a05b7, "refresh_token": _0x332e00, "token_type": _0x4d15a6["MnTVg"], "expires_in": this[_0x4cb376(482)], "scope": _0x38de8b[_0x4cb376(563)][_0x216041(550)](" ") };
|
|
580
|
+
}
|
|
581
|
+
async [_0x213126(520)](_0x4ac668) {
|
|
582
|
+
const _0x1e90c9 = _0x213126, _0x2cbf6e = _0x213126, _0x4a422f = await this[_0x1e90c9(539)]["getAccessToken"](_0x4ac668);
|
|
583
|
+
if (!_0x4a422f || !_0x4a422f["expiresAt"]) throw new InvalidTokenError(_0x1e90c9(537));
|
|
584
|
+
return { "token": _0x4ac668, "clientId": _0x4a422f["clientId"], "scopes": _0x4a422f["scopes"], "expiresAt": Math["floor"](_0x4a422f[_0x2cbf6e(542)] / (4735 + 8133 + -6 * 1978)), "resource": _0x4a422f["resource"], "extra": _0x4a422f[_0x1e90c9(517)] };
|
|
585
|
+
}
|
|
586
|
+
async ["revokeToken"](_0x4cc77e, _0x2657a1) {
|
|
587
|
+
const _0xf9eb84 = _0x213126, _0x532d81 = _0x41e2e9, _0x549cb0 = {};
|
|
588
|
+
_0x549cb0["sGkHE"] = function(_0x20dc9e, _0x21effd) {
|
|
589
|
+
return _0x20dc9e === _0x21effd;
|
|
590
|
+
}, _0x549cb0["NZKym"] = _0xf9eb84(571), _0x549cb0["HqYqs"] = _0x532d81(504), _0x549cb0[_0x532d81(515)] = function(_0x5c8d3c, _0x35a47b) {
|
|
591
|
+
return _0x5c8d3c !== _0x35a47b;
|
|
592
|
+
};
|
|
593
|
+
const _0x31e7e1 = _0x549cb0;
|
|
594
|
+
if (_0x31e7e1["sGkHE"](_0x2657a1["token_type_hint"], _0x31e7e1["NZKym"])) {
|
|
595
|
+
const _0x4e4762 = await this["accessTokensStore"]["getAccessToken"](_0x2657a1[_0x532d81(557)]);
|
|
596
|
+
if (!_0x4e4762 || _0x4e4762["clientId"] !== _0x4cc77e["client_id"]) throw new InvalidTokenError("Access token is invalid or does not belong to this client: " + _0x4cc77e[_0xf9eb84(523)]);
|
|
597
|
+
await this[_0xf9eb84(539)]["revokeAccessToken"](_0x2657a1["token"]);
|
|
503
598
|
} else {
|
|
504
|
-
if (
|
|
505
|
-
const
|
|
506
|
-
if (!
|
|
507
|
-
await this[
|
|
508
|
-
} else throw new InvalidGrantError("Unsupported token type hint: " +
|
|
599
|
+
if (_0x31e7e1["sGkHE"](_0x2657a1["token_type_hint"], _0x31e7e1[_0xf9eb84(512)])) {
|
|
600
|
+
const _0xcd1e76 = await this[_0xf9eb84(555)][_0x532d81(554)](_0x2657a1["token"]);
|
|
601
|
+
if (!_0xcd1e76 || _0x31e7e1[_0x532d81(515)](_0xcd1e76["clientId"], _0x4cc77e[_0x532d81(523)])) throw new InvalidTokenError(_0x532d81(570) + _0x4cc77e["client_id"]);
|
|
602
|
+
await this[_0x532d81(555)]["revokeRefreshToken"](_0x2657a1["token"]);
|
|
603
|
+
} else throw new InvalidGrantError("Unsupported token type hint: " + _0x2657a1[_0xf9eb84(496)] + " to this client: " + _0x4cc77e[_0x532d81(523)]);
|
|
509
604
|
}
|
|
510
605
|
}
|
|
511
606
|
}
|
|
512
|
-
const createAuthMiddleware = (
|
|
513
|
-
const
|
|
514
|
-
return
|
|
515
|
-
}
|
|
607
|
+
const createAuthMiddleware = (_0x19ddb5, _0x45de00) => {
|
|
608
|
+
const _0x5233a8 = _0x213126, _0x46a672 = { "pRrjv": function(_0x21b1f3, _0x4e0951) {
|
|
609
|
+
return _0x21b1f3(_0x4e0951);
|
|
610
|
+
}, "rhzvc": function(_0x102958, _0x5356f7) {
|
|
611
|
+
return _0x102958(_0x5356f7);
|
|
612
|
+
} }, _0xdd2a59 = async (_0x3006de) => {
|
|
516
613
|
var _a;
|
|
517
|
-
const
|
|
518
|
-
if (!
|
|
519
|
-
const
|
|
520
|
-
|
|
521
|
-
if (!
|
|
522
|
-
return { "token":
|
|
523
|
-
},
|
|
524
|
-
return
|
|
614
|
+
const _0x456b0b = _0x51d3, _0xde420c = _0x51d3, _0x2af921 = await _0x19ddb5["verifyAccessToken"](_0x3006de), _0xa4b0f = { "active": !![], "client_id": _0x2af921[_0x456b0b(495)], "scope": _0x2af921[_0x456b0b(563)]["join"](" "), "exp": _0x2af921[_0x456b0b(542)], "aud": _0x2af921[_0xde420c(534)] };
|
|
615
|
+
if (!_0xa4b0f["aud"]) throw new Error("Resource Indicator (RFC8707) missing");
|
|
616
|
+
const _0x1d833d = {};
|
|
617
|
+
_0x1d833d["requestedResource"] = _0xa4b0f["aud"], _0x1d833d[_0x456b0b(525)] = _0x45de00;
|
|
618
|
+
if (!_0x46a672[_0x456b0b(535)](checkResourceAllowed, _0x1d833d)) throw new Error("Expected resource indicator " + _0x45de00 + ", got: " + _0xa4b0f["aud"]);
|
|
619
|
+
return { "token": _0x3006de, "clientId": _0xa4b0f["client_id"], "scopes": _0xa4b0f[_0xde420c(552)] ? _0xa4b0f["scope"][_0xde420c(485)](" ") : [], "expiresAt": _0xa4b0f[_0xde420c(486)], "redirectUri": (_a = _0x2af921[_0xde420c(517)]) == null ? void 0 : _a["redirectUri"] };
|
|
620
|
+
}, _0x311312 = {};
|
|
621
|
+
return _0x311312["verifyAccessToken"] = _0xdd2a59, _0x46a672[_0x5233a8(564)](requireBearerAuth, { "verifier": _0x311312, "requiredScopes": [], "resourceMetadataUrl": getOAuthProtectedResourceMetadataUrl(new URL(_0x45de00)) });
|
|
525
622
|
};
|
|
526
|
-
const createAuthCallbackRouter = (
|
|
527
|
-
const
|
|
528
|
-
|
|
529
|
-
return
|
|
623
|
+
const createAuthCallbackRouter = (_0x42c312, ..._0x4f84c4) => {
|
|
624
|
+
const _0x296674 = _0x213126, _0x334879 = _0x213126, _0x4b6c4c = {};
|
|
625
|
+
_0x4b6c4c[_0x296674(527)] = function(_0x168cfc, _0x77f061) {
|
|
626
|
+
return _0x168cfc && _0x77f061;
|
|
530
627
|
};
|
|
531
|
-
const
|
|
532
|
-
|
|
533
|
-
const
|
|
534
|
-
if (
|
|
535
|
-
else
|
|
628
|
+
const _0x59a5b6 = _0x4b6c4c, _0x10e83a = _0x5cd98a[_0x296674(556)](), _0x5cf9bf = /* @__PURE__ */ new Map();
|
|
629
|
+
_0x10e83a[_0x334879(503)](_0x42c312, _0x5cd98a[_0x296674(507)](), (_0x1b45bf, _0x2c5f85) => {
|
|
630
|
+
const _0x202b1d = _0x296674, _0x427b06 = _0x296674, { code: _0x36b89c, state: _0x30815f, error: _0x36491c } = _0x1b45bf[_0x202b1d(498)];
|
|
631
|
+
if (_0x59a5b6[_0x427b06(527)](_0x36b89c, _0x30815f)) _0x5cf9bf[_0x427b06(511)](_0x30815f, _0x36b89c), _0x2c5f85["json"]({});
|
|
632
|
+
else _0x36491c && _0x2c5f85["status"](-1 * 501 + -581 * 3 + 2644)["send"]("OAuth authorization failed: " + _0x36491c);
|
|
536
633
|
});
|
|
537
|
-
const
|
|
538
|
-
const
|
|
539
|
-
if (
|
|
540
|
-
const
|
|
541
|
-
|
|
542
|
-
const
|
|
543
|
-
|
|
544
|
-
} else
|
|
634
|
+
const _0x267a0f = [_0x5cd98a[_0x296674(507)](), ..._0x4f84c4, (_0x654be, _0x2c907d) => {
|
|
635
|
+
const _0x4255dc = _0x334879, _0x29b965 = _0x334879, { state: _0x374377 } = _0x654be[_0x4255dc(562)];
|
|
636
|
+
if (_0x374377 && _0x5cf9bf["has"](_0x374377)) {
|
|
637
|
+
const _0x4c6f44 = _0x5cf9bf[_0x4255dc(503)](_0x374377);
|
|
638
|
+
_0x5cf9bf[_0x29b965(497)](_0x374377);
|
|
639
|
+
const _0x35c2a1 = {};
|
|
640
|
+
_0x35c2a1["code"] = _0x4c6f44, _0x2c907d["json"](_0x35c2a1);
|
|
641
|
+
} else _0x2c907d["status"](4333 + 263 * 31 + -12086)["send"]("No authorization code found for state: " + _0x374377);
|
|
545
642
|
}];
|
|
546
|
-
return
|
|
643
|
+
return _0x10e83a["post"](_0x42c312, ..._0x267a0f), _0x10e83a;
|
|
547
644
|
};
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
return _0x5bc079();
|
|
558
|
-
}, "UZDZv": "GET" }, _0x6a802d = _0x1ba5a3["Router"]();
|
|
559
|
-
return _0x6a802d["use"](_0x702826[_0x173faa(390)](_0x42d1ae)), _0x6a802d["use"](allowedMethods([_0x702826["UZDZv"]])), _0x6a802d[_0x29b53f(406)]("/", (_0x4b8b3f, _0x57e378) => {
|
|
560
|
-
_0x57e378["status"](-2898 * 1 + 4386 + -1288)["json"](_0x16cd97);
|
|
561
|
-
}), _0x6a802d;
|
|
645
|
+
const metadataHandler = (_0x524dad) => {
|
|
646
|
+
const _0xf76a65 = _0x213126, _0x2a8627 = _0x41e2e9, _0x34c2d2 = { "TvEhp": function(_0x19a545) {
|
|
647
|
+
return _0x19a545();
|
|
648
|
+
}, "vrwMC": function(_0x45346b, _0x3a2609) {
|
|
649
|
+
return _0x45346b(_0x3a2609);
|
|
650
|
+
}, "VBcPV": "GET", "yEBSy": "OPTIONS" }, _0x2cdeaf = _0x5cd98a[_0xf76a65(556)]();
|
|
651
|
+
return _0x2cdeaf["use"](_0x34c2d2["TvEhp"](_0x310cf0)), _0x2cdeaf[_0x2a8627(531)](_0x34c2d2["vrwMC"](allowedMethods, [_0x34c2d2[_0xf76a65(573)], _0x34c2d2[_0x2a8627(528)]])), _0x2cdeaf[_0xf76a65(531)]("/", (_0x3776bd, _0xacd5df) => {
|
|
652
|
+
_0xacd5df["status"](2126 * 2 + -8108 * 1 + -12 * -338)["json"](_0x524dad);
|
|
653
|
+
}), _0x2cdeaf;
|
|
562
654
|
};
|
|
563
|
-
const createAuthMetadataRouter = (
|
|
564
|
-
const
|
|
565
|
-
return
|
|
566
|
-
}, "
|
|
567
|
-
|
|
655
|
+
const createAuthMetadataRouter = (_0x55f315, _0x1cb019, _0x2fdcb0, _0x55df86) => {
|
|
656
|
+
const _0x25f842 = _0x41e2e9, _0x3846e0 = _0x213126, _0x46aeca = { "QSLMV": function(_0xd8f9f1, _0x5df111) {
|
|
657
|
+
return _0xd8f9f1(_0x5df111);
|
|
658
|
+
}, "NJOYh": function(_0x4a8cc2, _0x8ce4b1) {
|
|
659
|
+
return _0x4a8cc2 || _0x8ce4b1;
|
|
660
|
+
}, "dYbbc": function(_0x3cb297, _0x31d423) {
|
|
661
|
+
return _0x3cb297 === _0x31d423;
|
|
662
|
+
}, "RZFdN": _0x25f842(505) }, _0x384df7 = _0x5cd98a[_0x25f842(556)](), _0x38e1e3 = _0x46aeca[_0x3846e0(491)](createOAuthMetadata, { "provider": _0x55f315, "issuerUrl": new URL(_0x46aeca[_0x3846e0(540)](_0x55df86, _0x1cb019)) }), _0xff54b9 = { "resource": new URL(_0x2fdcb0)[_0x3846e0(492)], "authorization_servers": [new URL(_0x1cb019)["href"]] }, _0x47b025 = new URL(_0x2fdcb0)["pathname"];
|
|
663
|
+
return _0x384df7["use"]("/.well-known/oauth-protected-resource" + (_0x46aeca[_0x25f842(513)](_0x47b025, "/") ? "" : _0x47b025), _0x46aeca[_0x3846e0(491)](metadataHandler, _0xff54b9)), _0x384df7["use"](_0x46aeca[_0x25f842(566)], _0x46aeca[_0x3846e0(491)](metadataHandler, _0x38e1e3)), _0x384df7;
|
|
568
664
|
};
|
|
569
|
-
const createAuthRouter = (
|
|
570
|
-
const
|
|
571
|
-
return
|
|
665
|
+
const createAuthRouter = (_0x12bca1) => {
|
|
666
|
+
const _0x2baa3e = { "FHLti": function(_0x2e3a7d, _0x328c77) {
|
|
667
|
+
return _0x2e3a7d(_0x328c77);
|
|
572
668
|
} };
|
|
573
|
-
return
|
|
669
|
+
return _0x2baa3e["FHLti"](mcpAuthRouter, _0x12bca1);
|
|
574
670
|
};
|
|
575
|
-
|
|
576
|
-
const
|
|
577
|
-
|
|
578
|
-
|
|
671
|
+
const lockCors = (_0xbc1c61) => {
|
|
672
|
+
const _0x360019 = _0x213126, _0x27c834 = _0x213126, _0x277cee = { "muxSj": function(_0x51c2e0, _0x43db51) {
|
|
673
|
+
return _0x51c2e0 === _0x43db51;
|
|
674
|
+
}, "eqRUu": _0x360019(526), "FvGsU": _0x27c834(545), "rbfjJ": function(_0x98d564, _0x2b83a7, _0x534a29, _0x4113f6) {
|
|
675
|
+
return _0x98d564(_0x2b83a7, _0x534a29, _0x4113f6);
|
|
676
|
+
} }, _0x1acf55 = _0x310cf0(_0xbc1c61);
|
|
677
|
+
return (_0x518579, _0x4f24fb, _0x4bfa11) => {
|
|
678
|
+
const _0x2499e0 = _0x360019, _0x3152eb = _0x360019, _0x8eac0b = _0x4f24fb[_0x2499e0(519)];
|
|
679
|
+
_0x4f24fb["setHeader"] = function(_0x24a9af, _0x270df6) {
|
|
680
|
+
const _0x175656 = _0x2499e0;
|
|
681
|
+
if (_0x277cee["muxSj"](_0x24a9af["toLowerCase"](), _0x277cee["eqRUu"])) {
|
|
682
|
+
const _0x11e5ab = _0x4f24fb[_0x175656(493)](_0x277cee["FvGsU"]);
|
|
683
|
+
if (_0x11e5ab) return this;
|
|
684
|
+
}
|
|
685
|
+
return _0x8eac0b["apply"](this, [_0x24a9af, _0x270df6]);
|
|
686
|
+
}, _0x277cee[_0x3152eb(489)](_0x1acf55, _0x518579, _0x4f24fb, _0x4bfa11);
|
|
579
687
|
};
|
|
580
|
-
|
|
688
|
+
};
|
|
689
|
+
function _0x2101(_0x283b22, _0x172b74) {
|
|
690
|
+
const _0xde55ee = _0x4eb4();
|
|
691
|
+
return _0x2101 = function(_0x2845f4, _0x3f5577) {
|
|
692
|
+
_0x2845f4 = _0x2845f4 - (-47 * -194 + 7 * 526 + -1 * 12599);
|
|
693
|
+
let _0x57af8b = _0xde55ee[_0x2845f4];
|
|
694
|
+
return _0x57af8b;
|
|
695
|
+
}, _0x2101(_0x283b22, _0x172b74);
|
|
581
696
|
}
|
|
582
|
-
const
|
|
583
|
-
(function(
|
|
584
|
-
const
|
|
697
|
+
const _0x301a2 = _0x2101, _0x12c17d = _0x2101;
|
|
698
|
+
(function(_0x364076, _0x495627) {
|
|
699
|
+
const _0x597399 = _0x2101, _0x146110 = _0x2101, _0x21fb80 = _0x364076();
|
|
585
700
|
while (!![]) {
|
|
586
701
|
try {
|
|
587
|
-
const
|
|
588
|
-
if (
|
|
589
|
-
else
|
|
590
|
-
} catch (
|
|
591
|
-
|
|
702
|
+
const _0x2e82be = parseInt(_0x597399(264)) / (-3639 + -1028 + 4668) * (-parseInt(_0x146110(326)) / (-4506 + 6319 + -1811)) + -parseInt(_0x597399(322)) / (-4139 * -2 + 178 * 55 + -5 * 3613) * (-parseInt(_0x146110(215)) / (3422 + 4976 * -1 + -1558 * -1)) + -parseInt(_0x146110(299)) / (7094 + 373 * 5 + -242 * 37) * (parseInt(_0x146110(323)) / (20 * -376 + 470 * -14 + 14106)) + parseInt(_0x597399(218)) / (492 + 1 * 7833 + 1 * -8318) * (parseInt(_0x146110(283)) / (-1546 * 1 + -2697 + 4251)) + parseInt(_0x146110(311)) / (300 + 8357 + -8648) + -parseInt(_0x597399(286)) / (23 * -221 + 1 * 7182 + 1 * -2089) * (parseInt(_0x146110(342)) / (6571 + -5258 + -1 * 1302)) + -parseInt(_0x146110(211)) / (-4 * -577 + -4229 * -1 + -29 * 225) * (parseInt(_0x597399(334)) / (-5984 + 433 * 12 + -1 * -801));
|
|
703
|
+
if (_0x2e82be === _0x495627) break;
|
|
704
|
+
else _0x21fb80["push"](_0x21fb80["shift"]());
|
|
705
|
+
} catch (_0x416b08) {
|
|
706
|
+
_0x21fb80["push"](_0x21fb80["shift"]());
|
|
592
707
|
}
|
|
593
708
|
}
|
|
594
|
-
})(
|
|
595
|
-
function
|
|
596
|
-
const
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}, _0x46ad(_0x4a052d, _0x3a738d);
|
|
709
|
+
})(_0x4eb4, -73 * 12766 + 142643 * -1 + 1544570);
|
|
710
|
+
function _0x4eb4() {
|
|
711
|
+
const _0x51abca = ["KFXQU", "tYBNZ", "2.0", "length", "jsonrpc", "auth", "TmlVG", "BGZnq", "ping", "inspectors", "completions", "status", "headersSent", "stringify", "shouldClose", "dgfmu", "verify", "name", "http://localhost", "reset", "logging", "text/event-stream", "ImPVm", "type", "PAfsa", "PlIPJ", "mcp-server", "body", "subscribe", "message", "close", "_webStandardTransport", "set", "CuDLn", "rcexc", "handleStreamInspector", "values", "addNotificationListener", "azSTD", "GET", "removeNotificationListener", "send", "rGwIR", "1051BzFGMo", "_requestHandlers", "XkVIZ", "tools", "Allow", "client", "authorization", "kzfhr", "Bad Request: No valid session ID provided", "once", "CZTzM", "error", "fPZdc", "all", "onerror", "tcQpN", "remoterSessions", "yvXqV", "NhddI", "27064LNxORS", "transport", "roots", "644860XCDCRS", "map", "resolve", "query", "split", "notifications/initialized", "PYRrS", "allSettled", "Method not allowed.", "json", "end", "mcp-sse-twin-client", "handleStreamRequest", "10cKFySR", "yNhxA", "version", "get", "fTIRa", "kggHK", "handlePostMessage", "Invalid or missing session ID", "muQDP", "1.0.0", "No transport found", "user", "7544799fpiVma", "sampling", "referer", "onclose", "Invalid bearer token", "value", "capabilities", "GOskr", "push", "mcp-stream-twin-client", "mcpServer", "1239KXrjKL", "883716DumyzE", "url", "gweEn", "934MCCmjG", "handleWebSocket", "prompts", "LIZsT", "sessionIdGenerator", "headers", "handleSseMessage", "params", "3038867VkUuhS", "SSE", "_notificationHandlers", "Internal server error", "listChanged", "keys", "resources", "method", "33gIgkYQ", "DELETE", "ggQPt", "code", "connect", "handleSseProxy", "handleRequest", "WliyP", "sessionId", "WjQFk", "Qfisp", "fEkjP", "12oWQWOl", "remoters", "HwRPG", "stream-session-id", "4868qGusFh", "BuMZz", "forEach", "707anyqod", "zlCns", "onClientError"];
|
|
712
|
+
_0x4eb4 = function() {
|
|
713
|
+
return _0x51abca;
|
|
714
|
+
};
|
|
715
|
+
return _0x4eb4();
|
|
602
716
|
}
|
|
603
|
-
const auth = ({ secret:
|
|
717
|
+
const auth = ({ secret: _0x1729dd }) => (_0x5cfefe, _0x155b75, _0x473599) => {
|
|
604
718
|
var _a;
|
|
605
|
-
const
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
if (!
|
|
609
|
-
|
|
719
|
+
const _0x3022c7 = _0x2101, _0x304409 = _0x2101, _0x755060 = { "Qfisp": "Missing bearer token", "fPZdc": function(_0x3a6f61) {
|
|
720
|
+
return _0x3a6f61();
|
|
721
|
+
}, "lArCW": _0x3022c7(315) }, _0x22150b = (_a = _0x5cfefe[_0x3022c7(331)][_0x304409(270)]) == null ? void 0 : _a[_0x304409(290)](" ")[-2753 + -134 + 2888];
|
|
722
|
+
if (!_0x22150b) {
|
|
723
|
+
_0x155b75[_0x304409(232)](8650 + 3191 + -11440)["send"](_0x755060[_0x3022c7(209)]);
|
|
610
724
|
return;
|
|
611
725
|
}
|
|
612
726
|
try {
|
|
613
|
-
|
|
614
|
-
} catch (
|
|
615
|
-
const
|
|
616
|
-
|
|
727
|
+
_0x5cfefe["user"] = _0x42bb3b[_0x304409(237)](_0x22150b, _0x1729dd), _0x755060[_0x3022c7(276)](_0x473599);
|
|
728
|
+
} catch (_0x4ad0dd) {
|
|
729
|
+
const _0x200270 = {};
|
|
730
|
+
_0x200270[_0x3022c7(275)] = _0x755060["lArCW"], _0x200270["details"] = _0x4ad0dd[_0x304409(250)], _0x155b75[_0x3022c7(232)](9641 + -2329 + -6909)["json"](_0x200270);
|
|
617
731
|
}
|
|
618
732
|
};
|
|
619
|
-
const
|
|
620
|
-
const
|
|
621
|
-
|
|
733
|
+
const jwtAuth = (_0x366268, _0x5696aa) => {
|
|
734
|
+
const _0x5585f1 = _0x2101, _0x4922c5 = _0x2101, _0x19c857 = {};
|
|
735
|
+
_0x19c857[_0x5585f1(266)] = function(_0x54f919, _0x3642cd) {
|
|
736
|
+
return _0x54f919 + _0x3642cd;
|
|
737
|
+
}, _0x19c857[_0x4922c5(263)] = _0x4922c5(239), _0x19c857["yvXqV"] = "token", _0x19c857["LIZsT"] = "Missing bearer token", _0x19c857["eJVIE"] = _0x4922c5(315);
|
|
738
|
+
const _0x78ed1a = _0x19c857, _0xa2aa96 = new URL(_0x78ed1a[_0x5585f1(266)](_0x78ed1a[_0x4922c5(263)], _0x366268[_0x5585f1(324)])), _0x42c490 = _0xa2aa96["searchParams"][_0x4922c5(302)](_0x78ed1a[_0x5585f1(281)]);
|
|
739
|
+
if (!_0x42c490) throw new Error(_0x78ed1a[_0x5585f1(329)]);
|
|
740
|
+
try {
|
|
741
|
+
_0x366268[_0x5585f1(310)] = _0x42bb3b[_0x4922c5(237)](_0x42c490, _0x5696aa);
|
|
742
|
+
} catch (_0x5a0ab7) {
|
|
743
|
+
throw new Error(_0x78ed1a["eJVIE"]);
|
|
744
|
+
}
|
|
745
|
+
};
|
|
746
|
+
const getDeviceInfo = (_0x5cbc20) => ({ "ip": _0x5cbc20["headers"]["x-forwarded-for"] || _0x5cbc20["ip"] || "", "userAgent": _0x5cbc20["headers"]["user-agent"] || "", "acceptLanguage": _0x5cbc20[_0x301a2(331)]["accept-language"] || "", "referer": _0x5cbc20["headers"][_0x12c17d(313)] || "" }), forwardProxyServer = (_0x4fdab4, _0x30924e) => {
|
|
747
|
+
const _0x258634 = _0x12c17d, _0x50009e = _0x12c17d, _0x12c075 = { "dgfmu": function(_0x305a6f, _0x23f323, _0x1d92f8) {
|
|
748
|
+
return _0x305a6f(_0x23f323, _0x1d92f8);
|
|
749
|
+
}, "tYBNZ": function(_0x52afec, _0x469ccb, _0x17c074) {
|
|
750
|
+
return _0x52afec(_0x469ccb, _0x17c074);
|
|
622
751
|
} };
|
|
623
|
-
|
|
624
|
-
const
|
|
625
|
-
|
|
626
|
-
const
|
|
627
|
-
|
|
628
|
-
};
|
|
629
|
-
}, initTwinClientHandler = (_0xa5328e, _0x5a76ba) => {
|
|
630
|
-
const _0x515cc5 = _0x20a06a, _0x1dae9a = _0x294689, _0x129c13 = {};
|
|
631
|
-
_0x129c13["rcraz"] = _0x515cc5(291), _0x129c13[_0x515cc5(249)] = function(_0x22b4cc, _0x3d4a15) {
|
|
632
|
-
return _0x22b4cc instanceof _0x3d4a15;
|
|
752
|
+
_0x12c075[_0x258634(236)](forwardServerOnRequest, _0x4fdab4, _0x30924e), _0x12c075[_0x50009e(236)](forwardServerOnNotification, _0x4fdab4, _0x30924e);
|
|
753
|
+
const _0x582998 = _0x12c075[_0x258634(222)](forwardClientOnRequest, _0x30924e, _0x4fdab4), _0x34ea47 = forwardClientOnNotification(_0x30924e, _0x4fdab4);
|
|
754
|
+
_0x30924e["addRequestListener"](_0x582998), _0x30924e[_0x258634(258)](_0x34ea47), _0x4fdab4[_0x258634(314)] = () => {
|
|
755
|
+
const _0x33d269 = _0x258634;
|
|
756
|
+
_0x30924e["removeRequestListener"](_0x582998), _0x30924e[_0x33d269(261)](_0x34ea47);
|
|
633
757
|
};
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
758
|
+
}, initTwinClientHandler = (_0x1b6419, _0x55bdb2) => {
|
|
759
|
+
const _0x32cbe3 = _0x12c17d, _0x73ed6e = _0x301a2, _0x20196b = {};
|
|
760
|
+
_0x20196b[_0x32cbe3(245)] = "initialize", _0x20196b[_0x32cbe3(300)] = _0x73ed6e(291), _0x20196b["Utgwz"] = "event: close\ndata: \n\n";
|
|
761
|
+
const _0x1a9de1 = _0x20196b, _0x281e12 = () => {
|
|
762
|
+
const _0xa79966 = _0x73ed6e, _0x560db8 = _0x32cbe3, _0x9b41bf = {};
|
|
763
|
+
_0x9b41bf["listChanged"] = !![];
|
|
764
|
+
const _0x1627d8 = {};
|
|
765
|
+
_0x1627d8["subscribe"] = !![], _0x1627d8[_0xa79966(338)] = !![];
|
|
766
|
+
const _0x27bff6 = {};
|
|
767
|
+
_0x27bff6[_0xa79966(338)] = !![];
|
|
768
|
+
const _0x46e367 = {};
|
|
769
|
+
_0x46e367[_0x560db8(328)] = _0x9b41bf, _0x46e367["resources"] = _0x1627d8, _0x46e367["tools"] = _0x27bff6, _0x46e367[_0x560db8(231)] = {}, _0x46e367["logging"] = {};
|
|
770
|
+
const _0x1e53c8 = _0x46e367, _0x4d5661 = {};
|
|
771
|
+
_0x4d5661["name"] = _0xa79966(247), _0x4d5661[_0x560db8(301)] = _0x560db8(308), _0x1b6419[_0xa79966(265)]["set"](_0x1a9de1["PAfsa"], (_0xbc442c) => ({ "protocolVersion": _0xbc442c[_0x560db8(333)]["protocolVersion"], "capabilities": _0x1e53c8, "serverInfo": _0x4d5661 })), _0x1b6419[_0xa79966(336)][_0x560db8(253)](_0x1a9de1["yNhxA"], () => {
|
|
645
772
|
});
|
|
646
|
-
},
|
|
647
|
-
const
|
|
648
|
-
|
|
649
|
-
const _0x5011fa = _0x220345;
|
|
650
|
-
_0x366115["brEPQ"](_0x5a76ba, SSEServerTransport) && (_0x5a76ba["close"] = () => {
|
|
773
|
+
}, _0x2999f5 = () => {
|
|
774
|
+
const _0x4a667a = _0x32cbe3;
|
|
775
|
+
_0x55bdb2 instanceof SSEServerTransport && (_0x55bdb2[_0x4a667a(251)] = () => {
|
|
651
776
|
var _a, _b;
|
|
652
|
-
const
|
|
653
|
-
return (_a =
|
|
777
|
+
const _0x3e81d9 = _0x4a667a, _0x261d11 = _0x4a667a;
|
|
778
|
+
return (_a = _0x55bdb2["_sseResponse"]) == null ? void 0 : _a["write"](_0x1a9de1["Utgwz"])[_0x3e81d9(296)](), _0x55bdb2["_sseResponse"] = void 0, (_b = _0x55bdb2["onclose"]) == null ? void 0 : _b.call(_0x55bdb2), Promise[_0x261d11(288)]();
|
|
654
779
|
});
|
|
655
|
-
},
|
|
656
|
-
|
|
780
|
+
}, _0x1ad533 = {};
|
|
781
|
+
_0x1ad533["beforeInit"] = _0x281e12, _0x1ad533["afterInit"] = _0x2999f5, initClientHandler(_0x1b6419, _0x1ad533);
|
|
657
782
|
};
|
|
658
783
|
const useProxyHandles = () => {
|
|
659
|
-
const
|
|
660
|
-
return
|
|
661
|
-
}, "
|
|
662
|
-
return
|
|
663
|
-
}, "
|
|
664
|
-
return
|
|
665
|
-
}, "
|
|
666
|
-
return
|
|
667
|
-
}, "
|
|
668
|
-
return
|
|
669
|
-
}, "
|
|
670
|
-
return
|
|
671
|
-
}, "
|
|
672
|
-
return
|
|
673
|
-
}, "
|
|
674
|
-
return
|
|
675
|
-
}, "
|
|
676
|
-
return
|
|
677
|
-
}, "
|
|
678
|
-
return
|
|
679
|
-
}, "
|
|
680
|
-
return
|
|
681
|
-
}, "
|
|
682
|
-
return
|
|
683
|
-
}, "
|
|
684
|
-
return
|
|
685
|
-
}, "
|
|
686
|
-
return
|
|
687
|
-
}, "
|
|
688
|
-
return
|
|
689
|
-
}, "
|
|
690
|
-
return
|
|
691
|
-
}, "
|
|
692
|
-
|
|
693
|
-
}, "KMbUG": _0x51262c(247), "HOJlP": function(_0x58bba3, _0x3f1e4b) {
|
|
694
|
-
return _0x58bba3 === _0x3f1e4b;
|
|
695
|
-
} }, _0x20f02f = {}, _0x444bf8 = {}, _0x283b90 = {}, _0x1af8fb = {};
|
|
696
|
-
let _0x255a21 = () => {
|
|
784
|
+
const _0x2291e6 = _0x12c17d, _0x5639bd = _0x12c17d, _0x5e1a71 = { "CuDLn": _0x2291e6(335), "CZTzM": "close", "WGubu": _0x2291e6(297), "HwRPG": "1.0.0", "kggHK": function(_0x34e87c, _0x1e2fab) {
|
|
785
|
+
return _0x34e87c(_0x1e2fab);
|
|
786
|
+
}, "GNsDw": function(_0x534a1e, _0x95cd27, _0x37e86a) {
|
|
787
|
+
return _0x534a1e(_0x95cd27, _0x37e86a);
|
|
788
|
+
}, "fUOrr": "mcp-sse-proxy-server", "azSTD": function(_0x129fd2, _0x1db0c1) {
|
|
789
|
+
return _0x129fd2 === _0x1db0c1;
|
|
790
|
+
}, "BuMZz": _0x2291e6(260), "zlCns": _0x5639bd(343), "NhddI": function(_0x5650b0, _0x23bfbe, _0x20a4a7) {
|
|
791
|
+
return _0x5650b0(_0x23bfbe, _0x20a4a7);
|
|
792
|
+
}, "OKiBt": "GET, POST, DELETE", "crLLx": "2.0", "WcQJb": _0x5639bd(294), "uahNm": "mcp-session-id", "gptGR": function(_0x452e85, _0x1d4ba5) {
|
|
793
|
+
return _0x452e85 === _0x1d4ba5;
|
|
794
|
+
}, "PlIPJ": _0x2291e6(242), "WjQFk": function(_0x11d4d9, _0x5d7f50) {
|
|
795
|
+
return _0x11d4d9 === _0x5d7f50;
|
|
796
|
+
}, "sSlkJ": function(_0x2e7774) {
|
|
797
|
+
return _0x2e7774();
|
|
798
|
+
}, "fTIRa": function(_0x47b85d, _0x2bb400) {
|
|
799
|
+
return _0x47b85d(_0x2bb400);
|
|
800
|
+
}, "bcUJB": "StreamableHTTP", "fEkjP": _0x2291e6(214), "ZqEaq": _0x2291e6(320), "KFXQU": function(_0x28aa72, _0x328ad1, _0x24276b) {
|
|
801
|
+
return _0x28aa72(_0x328ad1, _0x24276b);
|
|
802
|
+
}, "WliyP": function(_0x6e09e0, _0x311406) {
|
|
803
|
+
return _0x6e09e0(_0x311406);
|
|
804
|
+
}, "tcQpN": _0x2291e6(272), "yCUbW": function(_0x4d5b81, _0x53d7f6, _0x4823f3) {
|
|
805
|
+
return _0x4d5b81(_0x53d7f6, _0x4823f3);
|
|
806
|
+
}, "kzfhr": function(_0x2dce06, _0x3687b9) {
|
|
807
|
+
return _0x2dce06 === _0x3687b9;
|
|
808
|
+
}, "muQDP": function(_0x5a9f29, _0x16b2f2, _0x220bd4) {
|
|
809
|
+
return _0x5a9f29(_0x16b2f2, _0x220bd4);
|
|
810
|
+
}, "ImPVm": "mcp-stream-proxy-server", "cvMUn": function(_0x46d3e0, _0x2c310e, _0x2684e6) {
|
|
811
|
+
return _0x46d3e0(_0x2c310e, _0x2684e6);
|
|
812
|
+
}, "BGZnq": _0x2291e6(337), "gtTgN": function(_0x4e9af7, _0x548bef) {
|
|
813
|
+
return _0x4e9af7(_0x548bef);
|
|
814
|
+
}, "HWXAa": function(_0x57649b, _0x246eb9) {
|
|
815
|
+
return _0x57649b + _0x246eb9;
|
|
816
|
+
}, "gweEn": _0x2291e6(239), "TmlVG": "WebSocket", "PYRrS": "fulfilled" }, _0x243b2b = {}, _0xc92a32 = {}, _0x1a9767 = {}, _0x26b49a = {};
|
|
817
|
+
let _0x11fd3e = () => {
|
|
697
818
|
};
|
|
698
|
-
const
|
|
699
|
-
|
|
819
|
+
const _0x11e558 = (_0x573be7) => {
|
|
820
|
+
_0x11fd3e = _0x573be7;
|
|
700
821
|
};
|
|
701
|
-
let
|
|
822
|
+
let _0x4f384e = () => {
|
|
702
823
|
};
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
},
|
|
706
|
-
const
|
|
707
|
-
|
|
708
|
-
const
|
|
709
|
-
|
|
710
|
-
|
|
824
|
+
const _0xb1dfd7 = (_0x44f0cc) => {
|
|
825
|
+
_0x4f384e = _0x44f0cc;
|
|
826
|
+
}, _0x539ed2 = async (_0x58908c, _0x3c813b, _0x374bfc) => {
|
|
827
|
+
const _0xcafd25 = _0x5639bd, _0x4ac3b3 = _0x2291e6, _0x553d45 = new SSEServerTransport(_0x374bfc, _0x3c813b), _0x2207df = _0x58908c["headers"]["sse-session-id"];
|
|
828
|
+
_0x2207df && (_0x553d45["_sessionId"] = _0x2207df);
|
|
829
|
+
const _0x2cf749 = _0x553d45["sessionId"];
|
|
830
|
+
_0x243b2b[_0x2cf749] = _0x553d45, _0x58908c["on"](_0x5e1a71[_0xcafd25(274)], () => {
|
|
831
|
+
_0x553d45["close"](), delete _0x243b2b[_0x2cf749], delete _0xc92a32[_0x2cf749];
|
|
711
832
|
});
|
|
712
|
-
const
|
|
713
|
-
|
|
714
|
-
const
|
|
715
|
-
|
|
716
|
-
const
|
|
717
|
-
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
const
|
|
721
|
-
|
|
722
|
-
const
|
|
723
|
-
|
|
724
|
-
const
|
|
725
|
-
|
|
726
|
-
const
|
|
727
|
-
|
|
728
|
-
const
|
|
729
|
-
|
|
730
|
-
},
|
|
731
|
-
},
|
|
833
|
+
const _0x5e8967 = {};
|
|
834
|
+
_0x5e8967[_0x4ac3b3(338)] = !![];
|
|
835
|
+
const _0x16e855 = {};
|
|
836
|
+
_0x16e855["subscribe"] = !![], _0x16e855[_0x4ac3b3(338)] = !![];
|
|
837
|
+
const _0x1b910e = {};
|
|
838
|
+
_0x1b910e[_0x4ac3b3(338)] = !![];
|
|
839
|
+
const _0x406a51 = {};
|
|
840
|
+
_0x406a51["listChanged"] = !![];
|
|
841
|
+
const _0x169d71 = {};
|
|
842
|
+
_0x169d71[_0x4ac3b3(328)] = _0x5e8967, _0x169d71["resources"] = _0x16e855, _0x169d71["tools"] = _0x1b910e, _0x169d71["completions"] = {}, _0x169d71["logging"] = {}, _0x169d71["roots"] = _0x406a51, _0x169d71[_0x4ac3b3(312)] = {}, _0x169d71["elicitation"] = {};
|
|
843
|
+
const _0x553488 = _0x169d71, _0x382087 = {};
|
|
844
|
+
_0x382087[_0x4ac3b3(238)] = _0x5e1a71["WGubu"], _0x382087[_0xcafd25(301)] = _0x5e1a71[_0x4ac3b3(213)];
|
|
845
|
+
const _0x31c28c = {};
|
|
846
|
+
_0x31c28c[_0x4ac3b3(317)] = _0x553488;
|
|
847
|
+
const _0x4d3d4b = new Client(_0x382087, _0x31c28c);
|
|
848
|
+
_0xc92a32[_0x2cf749] = { "client": _0x4d3d4b, "transport": _0x553d45, "user": _0x58908c[_0xcafd25(226)] || _0x58908c[_0x4ac3b3(310)], "device": _0x5e1a71[_0xcafd25(304)](getDeviceInfo, _0x58908c), "type": _0x5e1a71[_0xcafd25(254)] }, _0x553d45[_0xcafd25(278)] = (_0x23410b) => {
|
|
849
|
+
const _0x5327cb = _0xcafd25, _0x5968dd = {};
|
|
850
|
+
_0x5968dd["client"] = _0x4d3d4b, _0x5968dd[_0x5327cb(284)] = _0x553d45, _0x5968dd[_0x5327cb(275)] = _0x23410b, _0x5968dd["type"] = _0x5e1a71["CuDLn"], _0x11fd3e(_0x5968dd);
|
|
851
|
+
}, _0x5e1a71["GNsDw"](initTwinClientHandler, _0x4d3d4b, _0x553d45), await _0x4d3d4b[_0xcafd25(203)](_0x553d45);
|
|
852
|
+
}, _0x1e95b0 = async (_0x426fc1, _0x53614b, _0x12c7cf) => {
|
|
732
853
|
var _a;
|
|
733
|
-
const
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
if (!_0x2965e8) {
|
|
737
|
-
_0x34d664[_0xd3f124(288)](-6790 + 1 * 1502 + 5688)["send"]("No client found for session ID " + _0x2e83b6);
|
|
854
|
+
const _0x4892fb = _0x2291e6, _0x2937be = _0x5639bd, _0x24d812 = _0x426fc1["query"][_0x4892fb(207)], _0x56fffd = (_a = _0xc92a32[_0x24d812]) == null ? void 0 : _a["client"];
|
|
855
|
+
if (!_0x56fffd) {
|
|
856
|
+
_0x53614b["status"](-11 * 505 + -9540 + 1 * 15495)[_0x4892fb(262)]("No client found for session ID " + _0x24d812);
|
|
738
857
|
return;
|
|
739
858
|
}
|
|
740
|
-
const
|
|
741
|
-
|
|
742
|
-
|
|
859
|
+
const _0x17bdb4 = new SSEServerTransport(_0x12c7cf, _0x53614b), _0x5513f9 = _0x17bdb4["sessionId"];
|
|
860
|
+
_0x1a9767[_0x5513f9] = _0x17bdb4, _0x426fc1["on"](_0x5e1a71["CZTzM"], () => {
|
|
861
|
+
_0x17bdb4["close"](), delete _0x1a9767[_0x5513f9], delete _0x26b49a[_0x5513f9];
|
|
743
862
|
});
|
|
744
|
-
const
|
|
745
|
-
|
|
746
|
-
const
|
|
747
|
-
|
|
748
|
-
const
|
|
749
|
-
|
|
750
|
-
const
|
|
751
|
-
|
|
752
|
-
const
|
|
753
|
-
|
|
754
|
-
const
|
|
755
|
-
|
|
756
|
-
const
|
|
757
|
-
|
|
758
|
-
const
|
|
759
|
-
|
|
760
|
-
}, await
|
|
761
|
-
},
|
|
762
|
-
const
|
|
763
|
-
|
|
764
|
-
},
|
|
765
|
-
const
|
|
766
|
-
if (
|
|
767
|
-
else
|
|
768
|
-
},
|
|
769
|
-
const
|
|
770
|
-
|
|
771
|
-
const
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
_0x5c39f9[_0x465f4a(277)] = _0x35bafb["uixmn"], _0x5c39f9[_0x202c77(272)] = _0xab7381, _0x5c39f9["id"] = null, _0xccf4b7[_0x465f4a(300)](-3983 + 6788 + 30 * -80, _0x387d1b)[_0x465f4a(321)](JSON["stringify"](_0x5c39f9));
|
|
775
|
-
}, _0x434a15 = async (_0x50445f, _0x324b0c) => {
|
|
863
|
+
const _0x19440e = {};
|
|
864
|
+
_0x19440e["listChanged"] = !![];
|
|
865
|
+
const _0xe2c047 = {};
|
|
866
|
+
_0xe2c047[_0x2937be(249)] = !![], _0xe2c047["listChanged"] = !![];
|
|
867
|
+
const _0x339606 = {};
|
|
868
|
+
_0x339606[_0x4892fb(338)] = !![];
|
|
869
|
+
const _0x240e28 = {};
|
|
870
|
+
_0x240e28["prompts"] = _0x19440e, _0x240e28[_0x4892fb(340)] = _0xe2c047, _0x240e28["tools"] = _0x339606, _0x240e28["completions"] = {}, _0x240e28[_0x2937be(241)] = {};
|
|
871
|
+
const _0x1cabf9 = _0x240e28, _0x3cc7c9 = {};
|
|
872
|
+
_0x3cc7c9["name"] = _0x5e1a71["fUOrr"], _0x3cc7c9["version"] = _0x5e1a71["HwRPG"];
|
|
873
|
+
const _0x512484 = {};
|
|
874
|
+
_0x512484["capabilities"] = _0x1cabf9;
|
|
875
|
+
const _0x41a52f = new McpServer(_0x3cc7c9, _0x512484);
|
|
876
|
+
_0x26b49a[_0x5513f9] = { "mcpServer": _0x41a52f, "transport": _0x17bdb4, "client": _0x24d812, "user": _0x426fc1["auth"] || _0x426fc1[_0x4892fb(310)], "device": getDeviceInfo(_0x426fc1), "type": _0x5e1a71[_0x2937be(254)] }, _0x17bdb4["onerror"] = (_0x59da57) => {
|
|
877
|
+
const _0x4368d6 = _0x2937be, _0x1ca485 = _0x2937be, _0x5eadf2 = {};
|
|
878
|
+
_0x5eadf2[_0x4368d6(321)] = _0x41a52f, _0x5eadf2["transport"] = _0x17bdb4, _0x5eadf2[_0x4368d6(269)] = _0x24d812, _0x5eadf2[_0x1ca485(275)] = _0x59da57, _0x5eadf2[_0x4368d6(244)] = _0x4368d6(335), _0x4f384e(_0x5eadf2);
|
|
879
|
+
}, await _0x41a52f[_0x2937be(203)](_0x17bdb4), _0x5e1a71["GNsDw"](forwardProxyServer, _0x41a52f["server"], _0x56fffd);
|
|
880
|
+
}, _0x1a3e04 = async (_0x12f4e9, _0x5904a5) => {
|
|
881
|
+
const _0x4d4fd4 = _0x5639bd, _0x143856 = _0x2291e6, _0x2dce0c = _0x12f4e9[_0x4d4fd4(289)]["sessionId"], _0x43de07 = _0x243b2b[_0x2dce0c] || _0x1a9767[_0x2dce0c];
|
|
882
|
+
_0x43de07 ? await _0x43de07[_0x143856(305)](_0x12f4e9, _0x5904a5) : _0x5904a5["status"](2269 + 1 * -893 + -8 * 122)[_0x4d4fd4(262)](_0x143856(309));
|
|
883
|
+
}, _0x1b46da = async (_0x3ca457, _0x31fa6b) => {
|
|
884
|
+
const _0x5c0afa = _0x5639bd, _0xbbbeee = _0x5639bd;
|
|
885
|
+
if (_0x5e1a71[_0x5c0afa(259)](_0x3ca457[_0xbbbeee(341)], "POST")) await _0x472a74(_0x3ca457, _0x31fa6b);
|
|
886
|
+
else _0x5e1a71["azSTD"](_0x3ca457[_0xbbbeee(341)], _0x5e1a71["BuMZz"]) || _0x5e1a71["azSTD"](_0x3ca457[_0xbbbeee(341)], _0x5e1a71[_0xbbbeee(219)]) ? await _0x5e1a71[_0xbbbeee(282)](_0x12bd53, _0x3ca457, _0x31fa6b) : await _0x5e1a71["kggHK"](_0x388552, _0x31fa6b);
|
|
887
|
+
}, _0x388552 = async (_0xdbb902) => {
|
|
888
|
+
const _0x3c5dfb = _0x5639bd, _0x58b751 = _0x2291e6, _0x1a90dd = {};
|
|
889
|
+
_0x1a90dd[_0x3c5dfb(268)] = _0x5e1a71["OKiBt"];
|
|
890
|
+
const _0x3b4de6 = {};
|
|
891
|
+
_0x3b4de6["jsonrpc"] = _0x5e1a71["crLLx"], _0x3b4de6[_0x58b751(275)] = {}, _0x3b4de6["id"] = null, _0x3b4de6[_0x58b751(275)]["code"] = -32e3, _0x3b4de6[_0x58b751(275)]["message"] = _0x5e1a71["WcQJb"], _0xdbb902["writeHead"](-64 * 94 + 1370 + 5051, _0x1a90dd)["end"](JSON[_0x3c5dfb(234)](_0x3b4de6));
|
|
892
|
+
}, _0x12bd53 = async (_0x459e63, _0x3514b3) => {
|
|
776
893
|
var _a;
|
|
777
|
-
const
|
|
778
|
-
if (
|
|
779
|
-
await
|
|
780
|
-
const
|
|
781
|
-
delete
|
|
894
|
+
const _0x13b891 = _0x5639bd, _0x33ea02 = _0x2291e6, _0x23709e = _0x459e63["headers"][_0x5e1a71["uahNm"]], _0x18372e = _0x243b2b[_0x23709e];
|
|
895
|
+
if (_0x18372e) {
|
|
896
|
+
await _0x18372e[_0x13b891(205)](_0x459e63, _0x3514b3);
|
|
897
|
+
const _0x26bc37 = () => {
|
|
898
|
+
delete _0x243b2b[_0x23709e], delete _0xc92a32[_0x23709e];
|
|
782
899
|
};
|
|
783
|
-
if (
|
|
784
|
-
else
|
|
785
|
-
} else
|
|
786
|
-
},
|
|
787
|
-
const
|
|
900
|
+
if (_0x5e1a71["gptGR"](_0x459e63[_0x13b891(341)], _0x5e1a71[_0x33ea02(216)]) && ((_a = _0x459e63["headers"]["accept"]) == null ? void 0 : _a["includes"](_0x5e1a71[_0x33ea02(246)]))) _0x459e63[_0x13b891(273)](_0x5e1a71[_0x13b891(274)], _0x26bc37);
|
|
901
|
+
else _0x5e1a71[_0x33ea02(208)](_0x459e63[_0x13b891(341)], _0x5e1a71["zlCns"]) && _0x5e1a71["sSlkJ"](_0x26bc37);
|
|
902
|
+
} else _0x3514b3["status"](-550 + 9444 + -62 * 137)["send"]("Invalid or missing session ID");
|
|
903
|
+
}, _0x472a74 = async (_0x2a3ece, _0x5c8bcf) => {
|
|
904
|
+
const _0x3f5b52 = _0x5639bd, _0x5c94db = _0x5639bd;
|
|
788
905
|
try {
|
|
789
|
-
const
|
|
790
|
-
let
|
|
791
|
-
if (
|
|
906
|
+
const _0x52bc9a = _0x2a3ece["headers"]["mcp-session-id"], _0xc7383c = _0x2a3ece[_0x3f5b52(331)][_0x5e1a71[_0x5c94db(210)]];
|
|
907
|
+
let _0x167e59 = _0x243b2b[_0x52bc9a];
|
|
908
|
+
if (_0x167e59) await _0x167e59["handleRequest"](_0x2a3ece, _0x5c8bcf, _0x2a3ece["body"]);
|
|
792
909
|
else {
|
|
793
|
-
if (!
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
const
|
|
797
|
-
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
const
|
|
801
|
-
|
|
802
|
-
const
|
|
803
|
-
|
|
804
|
-
const
|
|
805
|
-
|
|
806
|
-
const
|
|
807
|
-
|
|
808
|
-
const
|
|
809
|
-
|
|
810
|
-
const
|
|
811
|
-
|
|
812
|
-
const
|
|
813
|
-
|
|
814
|
-
},
|
|
815
|
-
|
|
816
|
-
|
|
910
|
+
if (!_0x52bc9a && _0x5e1a71[_0x5c94db(304)](isInitializeRequest, _0x2a3ece[_0x3f5b52(248)])) {
|
|
911
|
+
const _0x455005 = {};
|
|
912
|
+
_0x455005["sessionIdGenerator"] = () => _0xc7383c, _0x167e59 = new StreamableHTTPServerTransport(_0x455005);
|
|
913
|
+
const _0x18772f = {};
|
|
914
|
+
_0x18772f["listChanged"] = !![];
|
|
915
|
+
const _0x693949 = {};
|
|
916
|
+
_0x693949["subscribe"] = !![], _0x693949["listChanged"] = !![];
|
|
917
|
+
const _0x13132b = {};
|
|
918
|
+
_0x13132b["listChanged"] = !![];
|
|
919
|
+
const _0x244ff5 = {};
|
|
920
|
+
_0x244ff5["listChanged"] = !![];
|
|
921
|
+
const _0x27a6f3 = {};
|
|
922
|
+
_0x27a6f3[_0x5c94db(328)] = _0x18772f, _0x27a6f3["resources"] = _0x693949, _0x27a6f3[_0x3f5b52(267)] = _0x13132b, _0x27a6f3["completions"] = {}, _0x27a6f3[_0x5c94db(241)] = {}, _0x27a6f3[_0x3f5b52(285)] = _0x244ff5, _0x27a6f3["sampling"] = {}, _0x27a6f3["elicitation"] = {};
|
|
923
|
+
const _0x13791b = _0x27a6f3, _0x591aee = {};
|
|
924
|
+
_0x591aee["name"] = _0x5e1a71["ZqEaq"], _0x591aee[_0x5c94db(301)] = _0x5e1a71["HwRPG"];
|
|
925
|
+
const _0x54ff00 = {};
|
|
926
|
+
_0x54ff00[_0x3f5b52(317)] = _0x13791b;
|
|
927
|
+
const _0x56bd0b = new Client(_0x591aee, _0x54ff00);
|
|
928
|
+
_0x5e1a71[_0x5c94db(221)](initTwinClientHandler, _0x56bd0b, _0x167e59), _0xc92a32[_0xc7383c] = { "client": _0x56bd0b, "transport": _0x167e59, "user": _0x2a3ece["auth"] || _0x2a3ece["user"], "device": _0x5e1a71[_0x3f5b52(206)](getDeviceInfo, _0x2a3ece), "type": _0x5e1a71["bcUJB"] }, _0x243b2b[_0xc7383c] = _0x167e59, _0x167e59[_0x3f5b52(252)] ? _0x167e59[_0x5c94db(252)][_0x5c94db(207)] = _0xc7383c : _0x167e59[_0x5c94db(207)] = _0xc7383c, _0x167e59[_0x3f5b52(314)] = () => {
|
|
929
|
+
const _0x565331 = _0x167e59["sessionId"];
|
|
930
|
+
_0x565331 && _0x243b2b[_0x565331] && (delete _0x243b2b[_0x565331], delete _0xc92a32[_0x565331]);
|
|
931
|
+
}, _0x167e59[_0x3f5b52(278)] = (_0x45b867) => {
|
|
932
|
+
const _0x2f910f = _0x5c94db;
|
|
933
|
+
_0x5e1a71[_0x2f910f(303)](_0x11fd3e, { "client": _0x56bd0b, "transport": _0x167e59, "error": _0x45b867, "type": _0x5e1a71["bcUJB"] });
|
|
934
|
+
}, await _0x56bd0b["connect"](_0x167e59), await _0x167e59[_0x3f5b52(205)](_0x2a3ece, _0x5c8bcf, _0x2a3ece["body"]);
|
|
817
935
|
} else {
|
|
818
|
-
const
|
|
819
|
-
|
|
936
|
+
const _0x3cca99 = {};
|
|
937
|
+
_0x3cca99[_0x5c94db(225)] = _0x5e1a71["crLLx"], _0x3cca99[_0x3f5b52(275)] = {}, _0x3cca99["id"] = null, _0x3cca99[_0x3f5b52(275)][_0x5c94db(202)] = -(-7746 + 5844 + 33902), _0x3cca99[_0x3f5b52(275)]["message"] = _0x5e1a71[_0x3f5b52(279)], _0x5c8bcf["status"](-7 * 141 + -1 * -7513 + 6 * -1021)["json"](_0x3cca99);
|
|
820
938
|
}
|
|
821
939
|
}
|
|
822
940
|
} catch {
|
|
823
|
-
if (!
|
|
824
|
-
const
|
|
825
|
-
|
|
826
|
-
const
|
|
827
|
-
|
|
941
|
+
if (!_0x5c8bcf[_0x3f5b52(233)]) {
|
|
942
|
+
const _0xb3f9d6 = {};
|
|
943
|
+
_0xb3f9d6[_0x3f5b52(202)] = -32603, _0xb3f9d6["message"] = "Internal server error";
|
|
944
|
+
const _0x33a1bb = {};
|
|
945
|
+
_0x33a1bb["jsonrpc"] = _0x5e1a71["crLLx"], _0x33a1bb[_0x5c94db(275)] = _0xb3f9d6, _0x33a1bb["id"] = null, _0x5c8bcf["status"](-4982 + 5301 + 181)["json"](_0x33a1bb);
|
|
828
946
|
}
|
|
829
947
|
}
|
|
830
|
-
},
|
|
831
|
-
const
|
|
832
|
-
if (
|
|
833
|
-
else
|
|
834
|
-
},
|
|
835
|
-
const
|
|
836
|
-
|
|
837
|
-
},
|
|
948
|
+
}, _0x3124bf = async (_0x377d8c, _0xa696f) => {
|
|
949
|
+
const _0x393684 = _0x2291e6, _0x1cecde = _0x2291e6;
|
|
950
|
+
if (_0x5e1a71[_0x393684(208)](_0x377d8c[_0x1cecde(341)], "POST")) await _0x5e1a71["yCUbW"](_0x3fd852, _0x377d8c, _0xa696f);
|
|
951
|
+
else _0x377d8c["method"] === _0x5e1a71[_0x393684(216)] || _0x5e1a71[_0x1cecde(271)](_0x377d8c["method"], "DELETE") ? await _0x5e1a71[_0x1cecde(307)](_0x2d8648, _0x377d8c, _0xa696f) : await _0x5e1a71[_0x1cecde(206)](_0x388552, _0xa696f);
|
|
952
|
+
}, _0x2d8648 = async (_0x2d1efa, _0x40f46f) => {
|
|
953
|
+
const _0x3fd616 = _0x5639bd, _0x56cd6d = _0x2d1efa["headers"][_0x5e1a71["uahNm"]], _0x2fb01b = _0x1a9767[_0x56cd6d];
|
|
954
|
+
_0x2fb01b ? (await _0x2fb01b["handleRequest"](_0x2d1efa, _0x40f46f), _0x5e1a71[_0x3fd616(259)](_0x2d1efa[_0x3fd616(341)], _0x5e1a71["zlCns"]) && (delete _0x1a9767[_0x56cd6d], delete _0x26b49a[_0x56cd6d])) : _0x40f46f[_0x3fd616(232)](-173 * -23 + -3 * -2749 + -54 * 219)["send"](_0x3fd616(306));
|
|
955
|
+
}, _0x3fd852 = async (_0x54c094, _0x304099) => {
|
|
838
956
|
var _a;
|
|
839
|
-
const
|
|
957
|
+
const _0x698917 = _0x5639bd, _0x16c550 = _0x2291e6;
|
|
840
958
|
try {
|
|
841
|
-
const
|
|
842
|
-
let
|
|
843
|
-
if (
|
|
959
|
+
const _0x47b312 = _0x54c094["headers"][_0x5e1a71["uahNm"]], _0x89ef2d = _0x54c094[_0x698917(289)]["sessionId"];
|
|
960
|
+
let _0x2e94c1 = _0x1a9767[_0x47b312];
|
|
961
|
+
if (_0x2e94c1) await _0x2e94c1["handleRequest"](_0x54c094, _0x304099, _0x54c094["body"]);
|
|
844
962
|
else {
|
|
845
|
-
if (!
|
|
846
|
-
const
|
|
847
|
-
if (!
|
|
848
|
-
|
|
963
|
+
if (!_0x47b312 && _0x5e1a71["fTIRa"](isInitializeRequest, _0x54c094[_0x698917(248)])) {
|
|
964
|
+
const _0x5437a4 = (_a = _0xc92a32[_0x89ef2d]) == null ? void 0 : _a["client"];
|
|
965
|
+
if (!_0x5437a4) {
|
|
966
|
+
_0x304099["status"](-9140 + -7339 * -1 + 71 * 31)["send"]("No client found for session ID " + _0x89ef2d);
|
|
849
967
|
return;
|
|
850
968
|
}
|
|
851
|
-
const
|
|
852
|
-
|
|
853
|
-
const
|
|
854
|
-
|
|
855
|
-
const
|
|
856
|
-
|
|
857
|
-
const
|
|
858
|
-
|
|
859
|
-
const
|
|
860
|
-
|
|
861
|
-
const
|
|
862
|
-
|
|
863
|
-
const
|
|
864
|
-
|
|
865
|
-
const
|
|
866
|
-
|
|
867
|
-
const
|
|
868
|
-
|
|
869
|
-
},
|
|
870
|
-
const
|
|
871
|
-
|
|
872
|
-
}, await
|
|
969
|
+
const _0x3921d8 = _0x1a9a7a["randomUUID"](), _0x17f978 = {};
|
|
970
|
+
_0x17f978[_0x16c550(330)] = () => _0x3921d8, _0x2e94c1 = new StreamableHTTPServerTransport(_0x17f978);
|
|
971
|
+
const _0x4c964b = {};
|
|
972
|
+
_0x4c964b["listChanged"] = !![];
|
|
973
|
+
const _0x13584e = {};
|
|
974
|
+
_0x13584e["subscribe"] = !![], _0x13584e[_0x698917(338)] = !![];
|
|
975
|
+
const _0x3d1790 = {};
|
|
976
|
+
_0x3d1790["listChanged"] = !![];
|
|
977
|
+
const _0x31bc09 = {};
|
|
978
|
+
_0x31bc09["prompts"] = _0x4c964b, _0x31bc09["resources"] = _0x13584e, _0x31bc09["tools"] = _0x3d1790, _0x31bc09[_0x16c550(231)] = {}, _0x31bc09[_0x16c550(241)] = {};
|
|
979
|
+
const _0x594354 = _0x31bc09, _0x36c823 = {};
|
|
980
|
+
_0x36c823[_0x16c550(238)] = _0x5e1a71[_0x698917(243)], _0x36c823[_0x16c550(301)] = _0x5e1a71[_0x698917(213)];
|
|
981
|
+
const _0x377b8a = {};
|
|
982
|
+
_0x377b8a["capabilities"] = _0x594354;
|
|
983
|
+
const _0x3c3ab1 = new McpServer(_0x36c823, _0x377b8a);
|
|
984
|
+
_0x26b49a[_0x3921d8] = { "mcpServer": _0x3c3ab1, "transport": _0x2e94c1, "client": _0x89ef2d, "user": _0x54c094["auth"] || _0x54c094[_0x16c550(310)], "device": _0x5e1a71["WliyP"](getDeviceInfo, _0x54c094), "type": _0x5e1a71["bcUJB"] }, _0x1a9767[_0x3921d8] = _0x2e94c1, _0x2e94c1[_0x698917(252)] ? _0x2e94c1["_webStandardTransport"]["sessionId"] = _0x3921d8 : _0x2e94c1["sessionId"] = _0x3921d8, _0x2e94c1["onclose"] = () => {
|
|
985
|
+
const _0x122b64 = _0x2e94c1["sessionId"];
|
|
986
|
+
_0x122b64 && _0x243b2b[_0x122b64] && (delete _0x1a9767[_0x122b64], delete _0x26b49a[_0x122b64]);
|
|
987
|
+
}, _0x2e94c1["onerror"] = (_0x37ed50) => {
|
|
988
|
+
const _0x52733b = _0x698917, _0x136c12 = _0x16c550, _0x40ee0b = {};
|
|
989
|
+
_0x40ee0b[_0x52733b(321)] = _0x3c3ab1, _0x40ee0b["transport"] = _0x2e94c1, _0x40ee0b["client"] = _0x89ef2d, _0x40ee0b[_0x136c12(275)] = _0x37ed50, _0x40ee0b["type"] = "StreamableHTTP", _0x4f384e(_0x40ee0b);
|
|
990
|
+
}, await _0x3c3ab1[_0x698917(203)](_0x2e94c1), _0x5e1a71["cvMUn"](forwardProxyServer, _0x3c3ab1["server"], _0x5437a4), await _0x2e94c1["handleRequest"](_0x54c094, _0x304099, _0x54c094[_0x16c550(248)]);
|
|
873
991
|
} else {
|
|
874
|
-
const
|
|
875
|
-
|
|
876
|
-
const _0x3f80bd = {};
|
|
877
|
-
_0x3f80bd[_0x3e9af9(277)] = _0x35bafb["uixmn"], _0x3f80bd["error"] = _0x23bc3c, _0x3f80bd["id"] = null, _0x1351e0["status"](-7031 + 1300 * -6 + 15231 * 1)["json"](_0x3f80bd);
|
|
992
|
+
const _0x2c88b4 = {};
|
|
993
|
+
_0x2c88b4["jsonrpc"] = _0x5e1a71["crLLx"], _0x2c88b4[_0x698917(275)] = {}, _0x2c88b4["id"] = null, _0x2c88b4[_0x698917(275)][_0x698917(202)] = -(16937 * -2 + 2531 + -1 * -63343), _0x2c88b4[_0x698917(275)][_0x698917(250)] = _0x5e1a71[_0x16c550(279)], _0x304099[_0x16c550(232)](4640 + 6435 + -1525 * 7)["json"](_0x2c88b4);
|
|
878
994
|
}
|
|
879
995
|
}
|
|
880
996
|
} catch {
|
|
881
|
-
if (!
|
|
882
|
-
const
|
|
883
|
-
|
|
997
|
+
if (!_0x304099["headersSent"]) {
|
|
998
|
+
const _0x46bf82 = {};
|
|
999
|
+
_0x46bf82[_0x698917(202)] = -32603, _0x46bf82[_0x698917(250)] = _0x5e1a71[_0x16c550(228)];
|
|
1000
|
+
const _0x3a1662 = {};
|
|
1001
|
+
_0x3a1662["jsonrpc"] = _0x698917(223), _0x3a1662["error"] = _0x46bf82, _0x3a1662["id"] = null, _0x304099["status"](-2452 + -803 + -1 * -3755)[_0x698917(295)](_0x3a1662);
|
|
884
1002
|
}
|
|
885
1003
|
}
|
|
886
|
-
},
|
|
887
|
-
const
|
|
1004
|
+
}, _0x3156fc = async (_0x2f7032, _0x4c0577) => {
|
|
1005
|
+
const _0x310ca7 = _0x2291e6, _0x3c6fe1 = _0x5639bd, _0x48ad44 = new URL(_0x5e1a71["HWXAa"](_0x5e1a71[_0x310ca7(325)], _0x4c0577[_0x310ca7(324)])), _0x1d6b9a = _0x48ad44["searchParams"][_0x310ca7(302)]("sessionId"), _0x5f1da6 = new WebSocketServerTransport(_0x2f7032), _0xeb3ed0 = {};
|
|
1006
|
+
_0xeb3ed0["listChanged"] = !![];
|
|
1007
|
+
const _0x20e0a0 = {};
|
|
1008
|
+
_0x20e0a0[_0x3c6fe1(249)] = !![], _0x20e0a0["listChanged"] = !![];
|
|
1009
|
+
const _0x1da0a6 = {};
|
|
1010
|
+
_0x1da0a6["listChanged"] = !![];
|
|
1011
|
+
const _0x54ebea = {};
|
|
1012
|
+
_0x54ebea[_0x3c6fe1(338)] = !![];
|
|
1013
|
+
const _0x2e5615 = {};
|
|
1014
|
+
_0x2e5615["prompts"] = _0xeb3ed0, _0x2e5615[_0x310ca7(340)] = _0x20e0a0, _0x2e5615[_0x310ca7(267)] = _0x1da0a6, _0x2e5615[_0x3c6fe1(231)] = {}, _0x2e5615["logging"] = {}, _0x2e5615["roots"] = _0x54ebea, _0x2e5615["sampling"] = {}, _0x2e5615["elicitation"] = {};
|
|
1015
|
+
const _0x4bd42d = _0x2e5615, _0x4a67ff = {};
|
|
1016
|
+
_0x4a67ff[_0x3c6fe1(238)] = "mcp-socket-twin-client", _0x4a67ff[_0x3c6fe1(301)] = "1.0.0";
|
|
1017
|
+
const _0x2984f2 = {};
|
|
1018
|
+
_0x2984f2["capabilities"] = _0x4bd42d;
|
|
1019
|
+
const _0x5a2c36 = new Client(_0x4a67ff, _0x2984f2);
|
|
1020
|
+
initTwinClientHandler(_0x5a2c36, _0x5f1da6), _0xc92a32[_0x1d6b9a] = { "client": _0x5a2c36, "transport": _0x5f1da6, "user": _0x4c0577[_0x3c6fe1(310)], "device": _0x5e1a71[_0x310ca7(304)](getDeviceInfo, _0x4c0577), "type": _0x5e1a71[_0x310ca7(227)] }, _0x243b2b[_0x1d6b9a] = _0x5f1da6, _0x5f1da6[_0x3c6fe1(207)] = _0x1d6b9a, _0x5f1da6[_0x3c6fe1(314)] = () => {
|
|
1021
|
+
delete _0x243b2b[_0x1d6b9a], delete _0xc92a32[_0x1d6b9a];
|
|
1022
|
+
}, _0x5f1da6["onerror"] = (_0x46c561) => {
|
|
1023
|
+
const _0x33104b = _0x310ca7, _0x526a22 = _0x3c6fe1, _0x16e60d = {};
|
|
1024
|
+
_0x16e60d["client"] = _0x5a2c36, _0x16e60d[_0x33104b(284)] = _0x5f1da6, _0x16e60d[_0x526a22(275)] = _0x46c561, _0x16e60d[_0x526a22(244)] = "WebSocket", _0x5e1a71["gtTgN"](_0x11fd3e, _0x16e60d);
|
|
1025
|
+
}, await _0x5a2c36["connect"](_0x5f1da6);
|
|
1026
|
+
}, _0x558163 = () => {
|
|
1027
|
+
const _0x36f8ac = _0x2291e6, _0xf4872e = _0x2291e6;
|
|
888
1028
|
try {
|
|
889
|
-
Object["values"](
|
|
1029
|
+
Object["values"](_0x243b2b)[_0x36f8ac(217)]((_0x1a7671) => _0x1a7671[_0xf4872e(251)]()), Object[_0xf4872e(257)](_0x1a9767)["forEach"]((_0x56ba51) => _0x56ba51[_0xf4872e(251)]()), Object["values"](_0xc92a32)["forEach"]((_0x3099b5) => _0x3099b5["client"][_0xf4872e(251)]()), Object[_0xf4872e(257)](_0x26b49a)[_0x36f8ac(217)]((_0x189756) => _0x189756[_0x36f8ac(321)][_0xf4872e(251)]());
|
|
890
1030
|
} catch {
|
|
891
1031
|
}
|
|
892
1032
|
try {
|
|
893
|
-
Object[
|
|
1033
|
+
Object[_0xf4872e(339)](_0x243b2b)["forEach"]((_0x4461f1) => delete _0x243b2b[_0x4461f1]), Object["keys"](_0x1a9767)["forEach"]((_0x18f9be) => delete _0x1a9767[_0x18f9be]), Object["keys"](_0xc92a32)["forEach"]((_0x36abc8) => delete _0xc92a32[_0x36abc8]), Object[_0xf4872e(339)](_0x26b49a)[_0x36f8ac(217)]((_0x2238c1) => delete _0x26b49a[_0x2238c1]);
|
|
894
1034
|
} catch {
|
|
895
1035
|
}
|
|
896
1036
|
return {};
|
|
897
|
-
},
|
|
898
|
-
const
|
|
899
|
-
|
|
900
|
-
return
|
|
901
|
-
},
|
|
902
|
-
|
|
1037
|
+
}, _0x4b6109 = async () => {
|
|
1038
|
+
const _0x25b4c1 = _0x5639bd, _0x3cd5e2 = _0x5639bd, _0x408d60 = {};
|
|
1039
|
+
_0x408d60[_0x25b4c1(255)] = function(_0x2199b0, _0x2e6d9e) {
|
|
1040
|
+
return _0x2199b0 !== _0x2e6d9e;
|
|
1041
|
+
}, _0x408d60[_0x25b4c1(318)] = function(_0x3cabfc, _0x1f1f21) {
|
|
1042
|
+
return _0x3cabfc === _0x1f1f21;
|
|
1043
|
+
}, _0x408d60[_0x3cd5e2(201)] = _0x5e1a71["PYRrS"];
|
|
1044
|
+
const _0x33f1f7 = _0x408d60, _0x12aab7 = Object["keys"](_0xc92a32)["map"](async (_0x5a39c4) => {
|
|
1045
|
+
const _0x4b4d03 = _0x3cd5e2, _0x4ff78c = _0x25b4c1, { client: _0x2f3026 } = _0xc92a32[_0x5a39c4];
|
|
903
1046
|
try {
|
|
904
|
-
const
|
|
905
|
-
return { "sessionId":
|
|
1047
|
+
const _0x5be026 = await _0x2f3026["ping"]();
|
|
1048
|
+
return { "sessionId": _0x5a39c4, "shouldClose": Object["keys"](_0x5be026)[_0x4b4d03(224)] !== -2712 + -44 * 39 + 108 * 41 };
|
|
906
1049
|
} catch {
|
|
907
|
-
const
|
|
908
|
-
return
|
|
1050
|
+
const _0x1ea4de = {};
|
|
1051
|
+
return _0x1ea4de[_0x4ff78c(207)] = _0x5a39c4, _0x1ea4de["shouldClose"] = !![], _0x1ea4de;
|
|
909
1052
|
}
|
|
910
|
-
}),
|
|
911
|
-
const
|
|
1053
|
+
}), _0x237578 = Object["keys"](_0x26b49a)[_0x3cd5e2(287)](async (_0x2520d3) => {
|
|
1054
|
+
const _0x28d6f6 = _0x3cd5e2, _0x167100 = _0x3cd5e2, { mcpServer: _0x3de407 } = _0x26b49a[_0x2520d3];
|
|
912
1055
|
try {
|
|
913
|
-
const
|
|
914
|
-
return { "sessionId":
|
|
1056
|
+
const _0xda04f2 = await _0x3de407["server"][_0x28d6f6(229)]();
|
|
1057
|
+
return { "sessionId": _0x2520d3, "shouldClose": _0x33f1f7[_0x28d6f6(255)](Object[_0x167100(339)](_0xda04f2)["length"], 2269 + -183 * 15 + 14 * 34) };
|
|
915
1058
|
} catch {
|
|
916
|
-
const
|
|
917
|
-
return
|
|
1059
|
+
const _0x2ac45f = {};
|
|
1060
|
+
return _0x2ac45f[_0x28d6f6(207)] = _0x2520d3, _0x2ac45f[_0x167100(235)] = !![], _0x2ac45f;
|
|
918
1061
|
}
|
|
919
|
-
}), [
|
|
920
|
-
|
|
921
|
-
const
|
|
922
|
-
|
|
923
|
-
}),
|
|
924
|
-
const
|
|
925
|
-
|
|
1062
|
+
}), [_0x20f18d, _0x907351] = await Promise[_0x3cd5e2(277)]([Promise[_0x3cd5e2(293)](_0x12aab7), Promise[_0x25b4c1(293)](_0x237578)]), _0x28db73 = [], _0x42e0d7 = [];
|
|
1063
|
+
_0x20f18d[_0x25b4c1(217)]((_0x4fbe8f) => {
|
|
1064
|
+
const _0x5e2d59 = _0x3cd5e2, _0x5bb210 = _0x25b4c1;
|
|
1065
|
+
_0x33f1f7[_0x5e2d59(318)](_0x4fbe8f["status"], _0x33f1f7[_0x5bb210(201)]) && _0x4fbe8f[_0x5e2d59(316)][_0x5e2d59(235)] && _0x28db73["push"](_0x4fbe8f["value"][_0x5e2d59(207)]);
|
|
1066
|
+
}), _0x907351[_0x25b4c1(217)]((_0x2de243) => {
|
|
1067
|
+
const _0x33cd9c = _0x25b4c1, _0x57c900 = _0x3cd5e2;
|
|
1068
|
+
_0x2de243[_0x33cd9c(232)] === _0x5e1a71[_0x57c900(292)] && _0x2de243[_0x57c900(316)]["shouldClose"] && _0x42e0d7[_0x33cd9c(319)](_0x2de243["value"][_0x57c900(207)]);
|
|
926
1069
|
});
|
|
927
|
-
const
|
|
1070
|
+
const _0x674358 = _0x28db73[_0x3cd5e2(287)](async (_0x101662) => {
|
|
928
1071
|
var _a, _b;
|
|
929
|
-
const _0x335446 = _0x5e8fae;
|
|
930
1072
|
try {
|
|
931
|
-
(_a =
|
|
1073
|
+
(_a = _0x243b2b[_0x101662]) == null ? void 0 : _a["close"](), (_b = _0xc92a32[_0x101662]) == null ? void 0 : _b["client"]["close"]();
|
|
932
1074
|
} catch {
|
|
933
1075
|
}
|
|
934
1076
|
try {
|
|
935
|
-
delete
|
|
1077
|
+
delete _0x243b2b[_0x101662], delete _0xc92a32[_0x101662];
|
|
936
1078
|
} catch {
|
|
937
1079
|
}
|
|
938
|
-
}),
|
|
1080
|
+
}), _0x1b0edc = _0x42e0d7["map"](async (_0x347e37) => {
|
|
939
1081
|
var _a, _b;
|
|
940
|
-
const _0x3adc1d = _0x50b983;
|
|
941
1082
|
try {
|
|
942
|
-
(_a =
|
|
1083
|
+
(_a = _0x1a9767[_0x347e37]) == null ? void 0 : _a["close"](), (_b = _0x26b49a[_0x347e37]) == null ? void 0 : _b["mcpServer"]["close"]();
|
|
943
1084
|
} catch {
|
|
944
1085
|
}
|
|
945
1086
|
try {
|
|
946
|
-
delete
|
|
1087
|
+
delete _0x1a9767[_0x347e37], delete _0x26b49a[_0x347e37];
|
|
947
1088
|
} catch {
|
|
948
1089
|
}
|
|
949
1090
|
});
|
|
950
|
-
await Promise[
|
|
951
|
-
const
|
|
952
|
-
return
|
|
953
|
-
},
|
|
954
|
-
return
|
|
1091
|
+
await Promise[_0x25b4c1(293)]([..._0x674358, ..._0x1b0edc]);
|
|
1092
|
+
const _0x2b4383 = {};
|
|
1093
|
+
return _0x2b4383["clientSessions"] = _0x28db73, _0x2b4383[_0x3cd5e2(280)] = _0x42e0d7, _0x2b4383;
|
|
1094
|
+
}, _0x57e304 = {};
|
|
1095
|
+
return _0x57e304[_0x5639bd(204)] = _0x539ed2, _0x57e304["handleSseInspector"] = _0x1e95b0, _0x57e304[_0x5639bd(332)] = _0x1a3e04, _0x57e304[_0x2291e6(298)] = _0x1b46da, _0x57e304[_0x5639bd(256)] = _0x3124bf, _0x57e304[_0x2291e6(327)] = _0x3156fc, _0x57e304["clients"] = _0xc92a32, _0x57e304[_0x5639bd(212)] = _0x26b49a, _0x57e304["transports"] = _0x243b2b, _0x57e304[_0x2291e6(230)] = _0x1a9767, _0x57e304[_0x5639bd(240)] = _0x558163, _0x57e304["ping"] = _0x4b6109, _0x57e304[_0x5639bd(220)] = _0x11e558, _0x57e304["onRemoterError"] = _0xb1dfd7, _0x57e304;
|
|
955
1096
|
};
|
|
956
1097
|
export {
|
|
957
1098
|
ACCESS_TOKEN_EXPIRES_IN,
|
|
@@ -961,10 +1102,13 @@ export {
|
|
|
961
1102
|
MemoryClientsStore,
|
|
962
1103
|
MemoryRefreshTokensStore,
|
|
963
1104
|
REFRESH_TOKEN_EXPIRES_IN,
|
|
1105
|
+
WebSocketServerTransport,
|
|
964
1106
|
auth,
|
|
965
1107
|
createAuthCallbackRouter,
|
|
966
1108
|
createAuthMetadataRouter,
|
|
967
1109
|
createAuthMiddleware,
|
|
968
1110
|
createAuthRouter,
|
|
1111
|
+
jwtAuth,
|
|
1112
|
+
lockCors,
|
|
969
1113
|
useProxyHandles
|
|
970
1114
|
};
|