@opentiny/next-sdk 0.1.4 → 0.1.6

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/dist/webmcp.es.js CHANGED
@@ -1,755 +1,747 @@
1
1
  import { default as pt } from "ajv";
2
- import { JSONRPCMessageSchema as ce, EmptyResultSchema as le, ElicitResultSchema as ue, CreateMessageResultSchema as de, ListRootsResultSchema as fe, SetLevelRequestSchema as te, SubscribeRequestSchema as he, UnsubscribeRequestSchema as pe, ListResourcesRequestSchema as _e, RootsListChangedNotificationSchema as xe, CallToolResultSchema as ve, ElicitRequestSchema as ge, CreateMessageRequestSchema as be, ListRootsRequestSchema as we, ToolListChangedNotificationSchema as me, PromptListChangedNotificationSchema as ye, ResourceListChangedNotificationSchema as Ie, ResourceUpdatedNotificationSchema as Re, LoggingMessageNotificationSchema as Ce } from "@modelcontextprotocol/sdk/types.js";
3
- import { Client as Z } from "@modelcontextprotocol/sdk/client/index.js";
4
- import { SSEClientTransport as O } from "@modelcontextprotocol/sdk/client/sse.js";
5
- import { StreamableHTTPClientTransport as B } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
6
- import { UnauthorizedError as Le } from "@modelcontextprotocol/sdk/client/auth.js";
2
+ import { JSONRPCMessageSchema as ae, EmptyResultSchema as ce, ElicitResultSchema as le, CreateMessageResultSchema as ue, ListRootsResultSchema as de, SetLevelRequestSchema as ee, SubscribeRequestSchema as fe, UnsubscribeRequestSchema as he, ListResourcesRequestSchema as _e, RootsListChangedNotificationSchema as xe, CallToolResultSchema as pe, ElicitRequestSchema as ve, CreateMessageRequestSchema as be, ListRootsRequestSchema as we, ToolListChangedNotificationSchema as ge, PromptListChangedNotificationSchema as me, ResourceListChangedNotificationSchema as ye, ResourceUpdatedNotificationSchema as Ie, LoggingMessageNotificationSchema as Ce } from "@modelcontextprotocol/sdk/types.js";
3
+ import { Client as V } from "@modelcontextprotocol/sdk/client/index.js";
4
+ import { SSEClientTransport as U } from "@modelcontextprotocol/sdk/client/sse.js";
5
+ import { StreamableHTTPClientTransport as N } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
6
+ import { WebSocketClientTransport as te } from "@modelcontextprotocol/sdk/client/websocket.js";
7
+ import { UnauthorizedError as Re } from "@modelcontextprotocol/sdk/client/auth.js";
7
8
  import { McpServer as ne } from "@modelcontextprotocol/sdk/server/mcp.js";
8
- import { ResourceTemplate as xt } from "@modelcontextprotocol/sdk/server/mcp.js";
9
+ import { ResourceTemplate as bt } from "@modelcontextprotocol/sdk/server/mcp.js";
9
10
  import { z as gt } from "zod";
10
- import { UriTemplate as wt } from "@modelcontextprotocol/sdk/shared/uriTemplate.js";
11
- import { completable as yt } from "@modelcontextprotocol/sdk/server/completable.js";
12
- import { getDisplayName as Rt } from "@modelcontextprotocol/sdk/shared/metadataUtils.js";
13
- const X = w;
11
+ import { UriTemplate as yt } from "@modelcontextprotocol/sdk/shared/uriTemplate.js";
12
+ import { completable as Ct } from "@modelcontextprotocol/sdk/server/completable.js";
13
+ import { getDisplayName as St } from "@modelcontextprotocol/sdk/shared/metadataUtils.js";
14
+ function A() {
15
+ const r = ["224340fQYLJj", "function", "onmessage", "port2", "341XVdnBD", "313767JEBgqL", "950bpstaX", "1354759gUhUbE", "wRKyh", "onclose", "2044SvCTUj", "endpoint", "24msSkHx", "164VuWYGY", "mOWMr", "EkZCC", "addEventListener", "postMessage", "120705iyGzUz", "8878392ivIdKn", "close", "_listen", "3619482FaLQHc", "start", "_endpoint", "kgkem", "bzNYT", "MessageChannel transport error: ", "stringify", "onmessageerror", "HvyCv", "undefined", "Jwyua", "message", "_globalObject", "parse", "authInfo", "thraG", "220pGvxgp", "_port", "EGhzU", "onerror", "data", "MhriV"];
16
+ return A = function() {
17
+ return r;
18
+ }, A();
19
+ }
14
20
  (function(r, e) {
15
- const t = w, n = w, s = r();
21
+ const t = g, n = g, s = r();
16
22
  for (; ; )
17
23
  try {
18
- if (parseInt(t(145)) / 1 * (-parseInt(n(169)) / 2) + -parseInt(t(143)) / 3 * (-parseInt(t(176)) / 4) + -parseInt(t(134)) / 5 * (-parseInt(n(154)) / 6) + -parseInt(t(160)) / 7 * (-parseInt(n(170)) / 8) + parseInt(t(133)) / 9 + parseInt(t(163)) / 10 * (parseInt(n(165)) / 11) + -parseInt(t(161)) / 12 === e) break;
24
+ if (parseInt(t(417)) / 1 * (parseInt(t(421)) / 2) + parseInt(t(433)) / 3 + parseInt(t(424)) / 4 * (-parseInt(n(429)) / 5) + parseInt(n(423)) / 6 * (-parseInt(n(418)) / 7) + -parseInt(n(430)) / 8 + -parseInt(t(416)) / 9 * (-parseInt(t(405)) / 10) + -parseInt(t(415)) / 11 * (-parseInt(t(411)) / 12) === e) break;
19
25
  s.push(s.shift());
20
26
  } catch {
21
27
  s.push(s.shift());
22
28
  }
23
- })(V, -1617767 + 7318 * 202 + 963472);
24
- function w(r, e) {
25
- const t = V();
26
- return w = function(n, s) {
27
- return n = n - 129, t[n];
28
- }, w(r, e);
29
- }
29
+ })(A, 650197);
30
30
  const se = () => {
31
- const r = w, e = w, t = { SUplI: function(n, s) {
32
- return n !== s;
33
- }, gdsVr: r(173), fDJxn: function(n, s) {
34
- return n !== s;
35
- }, FzgVC: function(n, s) {
36
- return n(s);
37
- }, RphJy: "return this" };
38
- return t[r(139)](typeof globalThis, t[e(164)]) ? globalThis : t[r(139)](typeof window, "undefined") ? window : t[r(172)](typeof global, t.gdsVr) ? global : typeof self !== t.gdsVr ? self : t[r(156)](Function, t[e(155)])();
31
+ const r = g, e = { EGhzU: function(t, n) {
32
+ return t !== n;
33
+ }, kIrDB: "undefined", llYQe: function(t, n) {
34
+ return t !== n;
35
+ }, PZfJg: function(t, n) {
36
+ return t(n);
37
+ }, Jwyua: "return this" };
38
+ return typeof globalThis < "u" ? globalThis : e[r(407)](typeof window, e.kIrDB) ? window : e.llYQe(typeof global, e.kIrDB) ? global : typeof self !== r(398) ? self : e.PZfJg(Function, e[r(399)])();
39
39
  }, Se = (r, e, t) => {
40
- const n = w, s = w, o = {};
41
- o.BODwV = function(a, c) {
42
- return a !== c;
43
- }, o.axlRk = "undefined", o.WGYMl = function(a, c) {
44
- return a in c;
45
- }, o[n(162)] = s(131), o[s(142)] = function(a, c) {
40
+ const n = g, s = g, o = {};
41
+ o[n(410)] = s(398), o.dBkaX = function(a, c) {
46
42
  return a === c;
47
- }, o[s(159)] = n(166);
43
+ }, o[s(393)] = "function";
48
44
  const i = o;
49
- i[s(147)](typeof window, i.axlRk) ? r.postMessage(e, "*", t) : i.WGYMl(i[n(162)], r) && i[n(142)](typeof r[n(131)], i.LnNVQ) && r.postMessage(e, t);
50
- }, qe = (r, e) => {
51
- const t = w, n = w, s = {};
52
- s.tblHl = t(152), s.CQBXk = function(i, a) {
45
+ typeof window !== i[s(410)] ? r.postMessage(e, "*", t) : s(428) in r && i.dBkaX(typeof r.postMessage, i[n(393)]) && r.postMessage(e, t);
46
+ }, Le = (r, e) => {
47
+ const t = g, n = g, s = {};
48
+ s.MbsGh = "addEventListener", s.PPniK = function(i, a) {
53
49
  return i === a;
54
- }, s.rzcdo = n(166), s[n(140)] = function(i, a) {
55
- return i in a;
56
- }, s[t(157)] = "onmessage", s.jnGTR = function(i, a) {
57
- return i !== a;
58
- }, s.xkAIW = "undefined";
50
+ }, s[t(419)] = n(412), s[n(404)] = "onmessage", s[t(397)] = "undefined";
59
51
  const o = s;
60
- o.tblHl in r && o.CQBXk(typeof r[n(152)], o.rzcdo) ? r[n(152)]("message", e) : o.SjhYv(o[n(157)], r) && o[n(158)](typeof r.onmessage, o.xkAIW) && (r[n(130)] = e);
52
+ o.MbsGh in r && o.PPniK(typeof r[t(427)], o.wRKyh) ? r[t(427)](t(400), e) : o.thraG in r && typeof r[n(413)] !== o[n(397)] && (r.onmessage = e);
61
53
  };
62
- class j {
54
+ class W {
63
55
  constructor(e) {
64
- this._port = e;
56
+ const t = g;
57
+ this[t(406)] = e;
65
58
  }
66
59
  async start() {
67
- const e = w;
68
- this._port && (this[e(138)].onmessage = (t) => {
69
- var n, s;
70
- const o = e;
60
+ const e = g, t = g;
61
+ this[e(406)] && (this[e(406)][e(413)] = (n) => {
62
+ var s, o;
63
+ const i = e, a = t;
71
64
  try {
72
- const i = ce.parse(t[o(135)].message);
73
- (n = this.onmessage) == null || n.call(this, i, t[o(135)].extra);
74
- } catch (i) {
75
- const a = new Error("MessageChannel failed to parse message: " + i);
76
- (s = this.onerror) == null || s.call(this, a);
65
+ const c = ae[i(402)](n.data[i(400)]);
66
+ (s = this[i(413)]) == null || s.call(this, c, n[a(409)].extra);
67
+ } catch (c) {
68
+ const l = new Error("MessageChannel failed to parse message: " + c);
69
+ (o = this[a(408)]) == null || o.call(this, l);
77
70
  }
78
- }, this._port.onmessageerror = (t) => {
79
- var n;
80
- const s = new Error("MessageChannel transport error: " + JSON.stringify(t));
81
- (n = this.onerror) == null || n.call(this, s);
82
- }, this[e(138)][e(153)]());
71
+ }, this._port[e(396)] = (n) => {
72
+ var s;
73
+ const o = t, i = t, a = new Error(o(394) + JSON[i(395)](n));
74
+ (s = this.onerror) == null || s.call(this, a);
75
+ }, this[e(406)][e(434)]());
83
76
  }
84
77
  async send(e, t) {
85
- const n = { OXUfv: function(s) {
78
+ const n = { lEyuq: function(s) {
86
79
  return s();
87
- }, HGTbd: function(s, o) {
88
- return s(o);
89
- }, Pfhxv: function(s, o) {
80
+ }, YihNw: function(s, o) {
90
81
  return s(o);
91
82
  } };
92
83
  return new Promise((s, o) => {
93
84
  var i;
94
- const a = w, c = w;
85
+ const a = g, c = g;
95
86
  try {
96
87
  const l = {};
97
- l.authInfo = t == null ? void 0 : t[a(132)];
88
+ l[a(403)] = t == null ? void 0 : t[a(403)];
98
89
  const u = {};
99
- u[c(148)] = e, u[a(141)] = l, this[a(138)] && this[c(138)].postMessage(u), n[c(144)](s);
90
+ u[c(400)] = e, u.extra = l, this[c(406)] && this[a(406)].postMessage(u), n.lEyuq(s);
100
91
  } catch (l) {
101
- const u = l instanceof Error ? l : new Error(n.HGTbd(String, l));
102
- (i = this[a(137)]) == null || i.call(this, u), n[a(151)](o, u);
92
+ const u = l instanceof Error ? l : new Error(n.YihNw(String, l));
93
+ (i = this[c(408)]) == null || i.call(this, u), o(u);
103
94
  }
104
95
  });
105
96
  }
106
97
  async close() {
107
98
  var e, t;
108
- const n = w, s = w;
109
- (e = this._port) == null || e[n(129)](), this[s(138)] = void 0, (t = this.onclose) == null || t.call(this);
99
+ const n = g, s = g;
100
+ (e = this._port) == null || e[n(431)](), this._port = void 0, (t = this[s(420)]) == null || t.call(this);
110
101
  }
111
102
  }
112
- function V() {
113
- const r = ["start", "18osCtKg", "RphJy", "FzgVC", "MJJde", "jnGTR", "LnNVQ", "1051519VVnrnU", "33477396wnvbno", "sxstg", "5032460FukhmU", "gdsVr", "11iMeJBh", "function", "_endpoint", "_listen", "1275704COqcWf", "56LfVOEz", "listen", "fDJxn", "undefined", "ports", "JlLHy", "4dKwrPa", "close", "onmessage", "postMessage", "authInfo", "11129553jiEKRY", "776455JhRkBm", "data", "port2", "onerror", "_port", "SUplI", "SjhYv", "extra", "cgHZW", "2982963YuFHfk", "OXUfv", "1sYviCF", "port1", "BODwV", "message", "ZJoRh", "_globalObject", "Pfhxv", "addEventListener"];
114
- return V = function() {
115
- return r;
116
- }, V();
117
- }
118
- class $ extends j {
103
+ class X extends W {
119
104
  constructor(e, t = se()) {
120
- const n = w, s = { JlLHy: function(i, a, c, l) {
121
- return i(a, c, l);
105
+ const n = g, s = g, o = { EkZCC: function(a, c, l, u) {
106
+ return a(c, l, u);
122
107
  } };
123
- super(), this[n(167)] = e, this[n(150)] = t;
124
- const o = new MessageChannel();
125
- this._port = o.port1, s[n(175)](Se, this._globalObject, { endpoint: this._endpoint }, [o.port2]);
108
+ super(), this[n(391)] = e, this[s(401)] = t;
109
+ const i = new MessageChannel();
110
+ this[s(406)] = i.port1, o[s(426)](Se, this[n(401)], { endpoint: this[s(391)] }, [i[s(414)]]);
126
111
  }
127
112
  }
128
- class ee extends j {
113
+ class K extends W {
129
114
  constructor(e, t = se()) {
130
- const n = w, s = { vqpjH: function(o, i) {
115
+ const n = g, s = { mOWMr: function(o, i) {
131
116
  return o === i;
132
- }, iWjpS: function(o) {
133
- return o();
134
- }, ZJoRh: function(o, i, a) {
117
+ }, kgkem: function(o, i, a) {
135
118
  return o(i, a);
136
119
  } };
137
- super(), this._endpoint = e, this[n(150)] = t, this._listen = new Promise((o) => {
138
- const i = n;
139
- s[i(149)](qe, this[i(150)], (a) => {
140
- const c = i;
141
- a.data && s.vqpjH(a.data.endpoint, this._endpoint) && (this[c(138)] = a[c(174)][-9452 + -4726 * -2], s.iWjpS(o));
120
+ super(), this._endpoint = e, this._globalObject = t, this[n(432)] = new Promise((o) => {
121
+ const i = n, a = n;
122
+ s[i(392)](Le, this[a(401)], (c) => {
123
+ const l = a, u = a;
124
+ c.data && s[l(425)](c.data[u(422)], this[u(391)]) && (this[u(406)] = c.ports[-1 * 4852 + 1 * 1601 + 3251], o());
142
125
  });
143
126
  });
144
127
  }
145
- async [X(171)]() {
146
- return this[X(168)];
128
+ async listen() {
129
+ return this[g(432)];
147
130
  }
148
131
  }
149
- const He = () => {
150
- const r = X, e = new MessageChannel();
151
- return [new j(e[r(146)]), new j(e[r(136)])];
132
+ function g(r, e) {
133
+ const t = A();
134
+ return g = function(n, s) {
135
+ return n = n - (17 * -491 + -669 + 9407), t[n];
136
+ }, g(r, e);
137
+ }
138
+ const qe = () => {
139
+ const r = new MessageChannel();
140
+ return [new W(r.port1), new W(r.port2)];
152
141
  };
153
142
  (function(r, e) {
154
- const t = v, n = v, s = r();
143
+ const t = b, n = b, s = r();
155
144
  for (; ; )
156
145
  try {
157
- if (-parseInt(t(415)) / 1 + -parseInt(n(357)) / 2 * (parseInt(t(368)) / 3) + -parseInt(n(408)) / 4 + parseInt(t(371)) / 5 + -parseInt(n(429)) / 6 * (-parseInt(t(412)) / 7) + parseInt(t(407)) / 8 * (parseInt(t(423)) / 9) + -parseInt(t(375)) / 10 === e) break;
146
+ if (parseInt(t(355)) / 1 + -parseInt(t(356)) / 2 * (-parseInt(t(373)) / 3) + -parseInt(t(337)) / 4 + parseInt(n(357)) / 5 + -parseInt(n(389)) / 6 * (-parseInt(t(396)) / 7) + parseInt(n(325)) / 8 * (parseInt(t(382)) / 9) + -parseInt(t(366)) / 10 === e) break;
158
147
  s.push(s.shift());
159
148
  } catch {
160
149
  s.push(s.shift());
161
150
  }
162
- })(z, -7527 * 130 + 350160 + 1329539);
163
- const Te = async (r, e, t) => {
151
+ })(B, -763475 + -52067 * 10 + 1724410);
152
+ const ke = async (r, e, t) => {
164
153
  var n;
165
- const s = v, o = v, i = {};
166
- i.PgGRq = "tools/call", i[s(354)] = s(387), i[o(369)] = s(364), i[o(394)] = o(426), i[s(406)] = "ping", i.BWglk = s(360), i[o(409)] = "logging/setLevel", i.YTglM = o(399);
154
+ const s = b, o = b, i = {};
155
+ i[s(345)] = "tools/list", i.rqstG = "tools/call", i.WqUnk = "resources/list", i[s(329)] = o(358), i[s(365)] = s(335), i.ookoz = "resources/unsubscribe", i[s(385)] = s(340), i.VTIWq = "prompts/list", i.SkoRK = s(376), i.QUtUV = s(388), i.XtowM = o(332);
167
156
  const a = i, { id: c, method: l, params: u } = t;
168
157
  let f = {};
169
158
  switch (l) {
170
- case "tools/list":
159
+ case a[o(345)]:
171
160
  f = await e.listTools(u);
172
161
  break;
173
- case a.PgGRq:
162
+ case a.rqstG:
174
163
  f = await e.callTool(u);
175
164
  break;
176
- case s(390):
177
- f = await e.listResources(u);
165
+ case a[s(334)]:
166
+ f = await e[s(350)](u);
178
167
  break;
179
- case a[s(354)]:
180
- f = await e[s(382)](u);
168
+ case a[o(329)]:
169
+ f = await e.listResourceTemplates(u);
181
170
  break;
182
- case "resources/read":
183
- f = await e[s(376)](u);
171
+ case s(372):
172
+ f = await e[s(383)](u);
184
173
  break;
185
- case a.INhFO:
186
- f = await e[o(418)](u);
174
+ case a.HgYgW:
175
+ f = await e.subscribeResource(u);
187
176
  break;
188
- case "resources/unsubscribe":
189
- f = await e[s(393)](u);
177
+ case a.ookoz:
178
+ f = await e.unsubscribeResource(u);
190
179
  break;
191
- case "prompts/get":
180
+ case a[s(385)]:
192
181
  f = await e.getPrompt(u);
193
182
  break;
194
- case a[o(394)]:
195
- f = await e[s(422)](u);
183
+ case a.VTIWq:
184
+ f = await e.listPrompts(u);
196
185
  break;
197
- case a[o(406)]:
198
- f = await e.ping();
186
+ case a[s(344)]:
187
+ f = await e[s(376)]();
199
188
  break;
200
- case a.BWglk:
189
+ case a.QUtUV:
201
190
  f = await e.complete(u);
202
191
  break;
203
- case a.exSlO:
204
- f = await e.setLoggingLevel(u == null ? void 0 : u[o(355)]);
192
+ case s(390):
193
+ f = await e[s(336)](u == null ? void 0 : u.level);
205
194
  break;
206
195
  }
207
196
  const d = {};
208
- d.result = f, d[o(374)] = a[o(361)], d.id = c, await ((n = r == null ? void 0 : r.transport) == null ? void 0 : n.send(d));
209
- }, Me = async (r, e, t) => {
197
+ d[s(361)] = f, d[s(394)] = a[s(364)], d.id = c, await ((n = r == null ? void 0 : r.transport) == null ? void 0 : n[s(392)](d));
198
+ }, Te = async (r, e, t) => {
210
199
  var n;
211
- const s = v, o = v, i = {};
212
- i.mKgNI = "roots/list", i[s(391)] = s(380), i.BUcjm = "ping", i[o(367)] = "2.0";
200
+ const s = b, o = b, i = {};
201
+ i.jQBBS = "sampling/createMessage", i.EZqgC = "elicitation/create", i[s(370)] = o(376), i.aVeaL = o(332);
213
202
  const a = i, { id: c, method: l, params: u } = t;
214
203
  let f = {};
215
204
  switch (l) {
216
- case a[o(397)]:
205
+ case s(368):
217
206
  const h = {};
218
- h.method = l, h[o(395)] = u, f = await e[o(377)](h, fe);
207
+ h.method = l, h[o(367)] = u, f = await e.request(h, de);
219
208
  break;
220
- case "sampling/createMessage":
221
- const _ = {};
222
- _[s(365)] = l, _[s(395)] = u, f = await e[o(377)](_, de);
209
+ case a[o(391)]:
210
+ const x = {};
211
+ x.method = l, x[o(367)] = u, f = await e[o(381)](x, ue);
223
212
  break;
224
- case a.HHuTf:
213
+ case a.EZqgC:
225
214
  const p = {};
226
- p.method = l, p.params = u, f = await e.request(p, ue);
215
+ p.method = l, p.params = u, f = await e.request(p, le);
227
216
  break;
228
- case a.BUcjm:
229
- const g = {};
230
- g.method = l, f = await e.request(g, le);
217
+ case a[o(370)]:
218
+ const _ = {};
219
+ _.method = l, f = await e[o(381)](_, ce);
231
220
  break;
232
221
  }
233
222
  const d = {};
234
- return d[o(401)] = f, d.jsonrpc = a[s(367)], d.id = c, await ((n = r == null ? void 0 : r.transport) == null ? void 0 : n[s(388)](d)), f;
235
- }, ke = (r, e) => {
236
- const t = v, n = v, s = { lfNNa: function(i, a, c, l) {
237
- return i(a, c, l);
238
- }, ERLmZ: t(399) }, o = r[n(362)];
239
- r._onrequest = async (i, a) => {
240
- var c, l, u, f, d;
241
- const h = n, _ = t, { id: p, method: g } = i;
223
+ return d[o(361)] = f, d.jsonrpc = a[o(387)], d.id = c, await ((n = r == null ? void 0 : r[s(371)]) == null ? void 0 : n.send(d)), f;
224
+ }, He = (r, e) => {
225
+ const t = b, n = { gXsjT: function(o, i) {
226
+ return o === i;
227
+ }, oegpC: t(351), lZOUC: function(o, i, a, c) {
228
+ return o(i, a, c);
229
+ }, ifIKG: "2.0" }, s = r._onrequest;
230
+ r._onrequest = async (o, i) => {
231
+ var a, c, l, u, f;
232
+ const d = t, h = t, { id: x, method: p } = o;
242
233
  try {
243
- g === h(398) ? await o[_(428)](r, i, a) : await s[_(425)](Te, r, e, i);
244
- } catch (b) {
245
- const { code: y, message: C, data: U } = b;
234
+ n[d(333)](p, n.oegpC) ? await s[d(386)](r, o, i) : await n.lZOUC(ke, r, e, o);
235
+ } catch (_) {
236
+ const { code: v, message: m, data: y } = _;
246
237
  try {
247
- if (y) {
248
- const m = {};
249
- m.code = y, m.message = C, m.data = U;
250
- const q = {};
251
- q.error = m, q.jsonrpc = s[_(370)], q.id = p, await ((c = r == null ? void 0 : r[_(381)]) == null ? void 0 : c.send(q));
252
- } else (u = (l = r == null ? void 0 : r[h(381)]) == null ? void 0 : l.onerror) == null || u.call(l, b);
253
- } catch (m) {
254
- (d = (f = r == null ? void 0 : r[h(381)]) == null ? void 0 : f.onerror) == null || d.call(f, m);
238
+ if (v) {
239
+ const I = {};
240
+ I.code = v, I.message = m, I.data = y;
241
+ const L = {};
242
+ L.error = I, L[d(394)] = n[h(331)], L.id = x, await ((a = r == null ? void 0 : r.transport) == null ? void 0 : a.send(L));
243
+ } else (l = (c = r == null ? void 0 : r[h(371)]) == null ? void 0 : c.onerror) == null || l.call(c, _);
244
+ } catch (I) {
245
+ (f = (u = r == null ? void 0 : r[d(371)]) == null ? void 0 : u.onerror) == null || f.call(u, I);
255
246
  }
256
247
  }
257
248
  };
258
- }, Ue = (r, e) => {
259
- const t = v, n = v, s = {};
260
- s.HMnPG = function(i, a) {
249
+ }, Pe = (r, e) => {
250
+ const t = b, n = b, s = {};
251
+ s[t(363)] = function(i, a) {
261
252
  return i !== a;
262
- }, s[t(402)] = t(404), s.FwMpF = "notifications/cancelled";
253
+ }, s[t(398)] = t(353), s.hzhyg = "notifications/cancelled";
263
254
  const o = s;
264
- r[t(403)] = async (i) => {
255
+ r._onnotification = async (i) => {
265
256
  var a, c;
266
- const l = n, u = t, { method: f, params: d } = i;
267
- if (o.HMnPG(f, o[l(402)]) && (o[l(396)](f, o.FwMpF) || d != null && d[u(359)])) try {
257
+ const l = t, u = n, { method: f, params: d } = i;
258
+ if (o[l(363)](f, o[u(398)]) && (o[l(363)](f, o.hzhyg) || d != null && d.forward)) try {
268
259
  await e.notification(i);
269
260
  } catch (h) {
270
261
  (c = (a = r == null ? void 0 : r.transport) == null ? void 0 : a.onerror) == null || c.call(a, h);
271
262
  }
272
263
  };
273
- }, Ne = (r, e) => async (t) => {
264
+ }, Me = (r, e) => async (t) => {
274
265
  var n, s, o, i, a;
275
- const c = v, l = v, u = { SAxlc: function(f, d, h, _) {
276
- return f(d, h, _);
277
- }, dFopk: "2.0" };
266
+ const c = b, l = b, u = {};
267
+ u.SEmWX = c(332);
268
+ const f = u;
278
269
  try {
279
- return await u[c(383)](Me, r, e, t);
280
- } catch (f) {
281
- const { code: d, message: h, data: _ } = f;
270
+ return await Te(r, e, t);
271
+ } catch (d) {
272
+ const { code: h, message: x, data: p } = d;
282
273
  try {
283
- if (d) {
284
- const p = {};
285
- p[l(427)] = d, p[c(358)] = h, p[l(353)] = _;
286
- const g = {};
287
- g[c(392)] = p, g.jsonrpc = u[c(421)], g.id = t.id, await ((n = r == null ? void 0 : r.transport) == null ? void 0 : n.send(g));
288
- } else (o = (s = r == null ? void 0 : r[l(381)]) == null ? void 0 : s.onerror) == null || o.call(s, f);
289
- } catch (p) {
290
- (a = (i = r == null ? void 0 : r[c(381)]) == null ? void 0 : i.onerror) == null || a.call(i, p);
274
+ if (h) {
275
+ const _ = {};
276
+ _[l(377)] = h, _.message = x, _.data = p;
277
+ const v = {};
278
+ v[l(348)] = _, v.jsonrpc = f[c(338)], v.id = t.id, await ((n = r == null ? void 0 : r.transport) == null ? void 0 : n[l(392)](v));
279
+ } else (o = (s = r == null ? void 0 : r.transport) == null ? void 0 : s[l(339)]) == null || o.call(s, d);
280
+ } catch (_) {
281
+ (a = (i = r == null ? void 0 : r[c(371)]) == null ? void 0 : i[l(339)]) == null || a.call(i, _);
291
282
  }
292
283
  }
293
- };
294
- function z() {
295
- const r = ["level", "originalOnResponse", "55170mBdYDU", "message", "forward", "completion/complete", "YTglM", "_onrequest", "push", "resources/subscribe", "method", "evRYg", "IwJLf", "36vWOzfl", "INhFO", "ERLmZ", "4771400ICkNjz", "removeListener", "bepKH", "jsonrpc", "1588030zEKxZA", "readResource", "request", "indexOf", "_onresponse", "elicitation/create", "transport", "listResourceTemplates", "SAxlc", "TivTb", "VvMvg", "lKSxx", "resources/templates/list", "send", "removeRequestListener", "resources/list", "HHuTf", "error", "unsubscribeResource", "JgvOQ", "params", "HMnPG", "mKgNI", "initialize", "2.0", "clearListener", "result", "xAZkD", "_onnotification", "notifications/initialized", "DNAeN", "deQam", "18856juHcqp", "1408312pVrTzy", "exSlO", "_notificationHandlers", "fallbackRequestHandler", "1770391vhkQKM", "clear", "length", "917098eoebuK", "onerror", "eBAUu", "subscribeResource", "get", "clearRequestListener", "dFopk", "listPrompts", "2853mVPrjm", "addNotificationListener", "lfNNa", "prompts/list", "code", "call", "18wkYBws", "addResponseListener", "data", "RZSpk"];
296
- return z = function() {
297
- return r;
298
- }, z();
299
- }
300
- const Pe = (r, e) => async (t) => {
284
+ }, Ue = (r, e) => async (t) => {
301
285
  var n, s, o;
302
- const i = v, a = v, c = {};
303
- c[i(384)] = function(d, h) {
286
+ const i = b, a = b, c = {};
287
+ c.dtUgZ = function(d, h) {
304
288
  return d !== h;
305
- }, c.HBVzz = "notifications/cancelled", c.bepKH = "2.0";
289
+ }, c.jgCIb = i(353), c.uUjKY = "2.0";
306
290
  const l = c, { method: u, params: f } = t;
307
- if (l.TivTb(u, "notifications/initialized") && (u !== l.HBVzz || f != null && f[a(359)])) try {
291
+ if (l.dtUgZ(u, l.jgCIb) && (u !== i(400) || f != null && f.forward)) try {
308
292
  const d = { ...t };
309
- d[i(374)] = l[a(373)], await ((n = e == null ? void 0 : e.transport) == null ? void 0 : n[a(388)](d));
293
+ d[i(394)] = l[a(352)], await ((n = e == null ? void 0 : e[i(371)]) == null ? void 0 : n[i(392)](d));
310
294
  } catch (d) {
311
- (o = (s = r == null ? void 0 : r.transport) == null ? void 0 : s.onerror) == null || o.call(s, d);
295
+ (o = (s = r == null ? void 0 : r[i(371)]) == null ? void 0 : s[a(339)]) == null || o.call(s, d);
312
296
  }
313
297
  };
314
- function v(r, e) {
315
- const t = z();
316
- return v = function(n, s) {
317
- return n = n - (14 * -396 + -8764 + -2932 * -5), t[n];
318
- }, v(r, e);
298
+ function b(r, e) {
299
+ const t = B();
300
+ return b = function(n, s) {
301
+ return n = n - (9 * -113 + -1439 * -1 + -97), t[n];
302
+ }, b(r, e);
319
303
  }
320
304
  const Oe = (r, e) => async (t) => {
321
305
  var n, s, o, i, a, c;
322
- const l = v, u = v, f = {};
323
- f.lCWNU = "2.0";
306
+ const l = b, u = b, f = {};
307
+ f[l(401)] = u(332);
324
308
  const d = f;
325
309
  try {
326
310
  await ((n = e == null ? void 0 : e.transport) == null ? void 0 : n.send(t));
327
311
  } catch (h) {
328
- const { code: _, message: p, data: g } = h;
312
+ const { code: x, message: p, data: _ } = h;
329
313
  try {
330
- if (_) {
331
- const b = {};
332
- b.code = _, b[l(358)] = p, b[l(353)] = g;
333
- const y = {};
334
- y.error = b, y.jsonrpc = d.lCWNU, y.id = t.id, await ((s = r == null ? void 0 : r[l(381)]) == null ? void 0 : s[u(388)](y));
335
- } else (i = (o = r == null ? void 0 : r.transport) == null ? void 0 : o.onerror) == null || i.call(o, h);
336
- } catch (b) {
337
- (c = (a = r == null ? void 0 : r[l(381)]) == null ? void 0 : a[l(416)]) == null || c.call(a, b);
314
+ if (x) {
315
+ const v = {};
316
+ v.code = x, v[l(399)] = p, v.data = _;
317
+ const m = {};
318
+ m[l(348)] = v, m[l(394)] = d.OhJjz, m.id = t.id, await ((s = r == null ? void 0 : r[l(371)]) == null ? void 0 : s.send(m));
319
+ } else (i = (o = r == null ? void 0 : r.transport) == null ? void 0 : o[u(339)]) == null || i.call(o, h);
320
+ } catch (v) {
321
+ (c = (a = r == null ? void 0 : r.transport) == null ? void 0 : a.onerror) == null || c.call(a, v);
338
322
  }
339
323
  }
340
- }, G = () => {
341
- const r = v, e = { ppppd: function(c, l) {
342
- return c !== l;
343
- }, VvMvg: function(c, l) {
344
- return c(l);
345
- }, kyvea: function(c, l) {
346
- return c === l;
347
- }, Finqx: "function", DNAeN: function(c, l) {
348
- return c !== l;
349
- } }, t = [], n = (c, l) => {
350
- const u = v;
351
- if (l) {
352
- const f = [];
353
- for (const d of t)
324
+ }, Q = () => {
325
+ const r = b, e = b, t = { vnkqu: function(l, u) {
326
+ return l !== u;
327
+ }, wxDWr: function(l, u) {
328
+ return l(u);
329
+ }, GdkkV: function(l, u) {
330
+ return l === u;
331
+ } }, n = [], s = (l, u) => {
332
+ const f = b, d = b;
333
+ if (u) {
334
+ const h = [];
335
+ for (const x of n)
354
336
  try {
355
- f[u(363)](d(c, l));
337
+ h.push(x(l, u));
356
338
  } catch {
357
339
  }
358
- for (const d of f)
359
- if (e.ppppd(d, null)) return d;
360
- } else for (const f of t)
340
+ for (const x of h)
341
+ if (t[f(379)](x, null)) return x;
342
+ } else for (const h of n)
361
343
  try {
362
- e[u(385)](f, c);
344
+ t[d(343)](h, l);
363
345
  } catch {
364
346
  }
365
- }, s = (c) => {
366
- const l = v;
367
- e.kyvea(typeof c, e.Finqx) && !t.includes(c) && t[l(363)](c);
368
- }, o = (c) => {
369
- const l = v, u = t[l(378)](c);
370
- e[l(405)](u, -1) && t.splice(u, -9316 + -82 * 53 + -1 * -13663);
371
- }, i = () => {
372
- const c = v;
373
- t[c(414)] = -1 * -9084 + -3251 * -1 + 12335 * -1;
374
- }, a = {};
375
- return a.handleListener = n, a.addListener = s, a[r(372)] = o, a[r(400)] = i, a;
347
+ }, o = (l) => {
348
+ const u = b;
349
+ t[u(384)](typeof l, u(369)) && !n.includes(l) && n.push(l);
350
+ }, i = (l) => {
351
+ const u = n.indexOf(l);
352
+ u !== -1 && n.splice(u, 1 * -6854 + 8 * -33 + 7119);
353
+ }, a = () => {
354
+ const l = b;
355
+ n[l(374)] = 7102 * 1 + 5522 + -526 * 24;
356
+ }, c = {};
357
+ return c[r(346)] = s, c[e(330)] = o, c.removeListener = i, c[r(359)] = a, c;
376
358
  }, Fe = (r) => {
377
- const e = v, t = v, n = { nsbwy: function(s) {
378
- return s();
379
- }, evRYg: function(s) {
359
+ const e = b, t = b, n = { xwPeb: function(s) {
380
360
  return s();
381
- }, SwOnF: function(s) {
361
+ }, Mfvzm: function(s) {
382
362
  return s();
383
363
  } };
384
364
  {
385
- const { handleListener: s, addListener: o, removeListener: i, clearListener: a } = n.nsbwy(G);
386
- r._onresponse = s, r[e(352)] = o, r.removeResponseListener = i, r.clearResponseListener = a;
365
+ const { handleListener: s, addListener: o, removeListener: i, clearListener: a } = n[e(326)](Q);
366
+ r._onresponse = s, r[e(395)] = o, r.removeResponseListener = i, r.clearResponseListener = a;
387
367
  }
388
368
  {
389
- const { handleListener: s, addListener: o, removeListener: i, clearListener: a } = n[t(366)](G);
390
- r[e(411)] = s, r.addRequestListener = o, r[e(389)] = i, r[t(420)] = a;
369
+ const { handleListener: s, addListener: o, removeListener: i, clearListener: a } = n[t(326)](Q);
370
+ r[t(328)] = s, r.addRequestListener = o, r[t(354)] = i, r[t(341)] = a;
391
371
  }
392
372
  {
393
- const { handleListener: s, addListener: o, removeListener: i, clearListener: a } = n.SwOnF(G);
394
- r.fallbackNotificationHandler = s, r.addNotificationListener = o, r.removeNotificationListener = i, r.clearNotificationListener = a;
373
+ const { handleListener: s, addListener: o, removeListener: i, clearListener: a } = n[e(375)](Q);
374
+ r[e(342)] = s, r[e(327)] = o, r.removeNotificationListener = i, r.clearNotificationListener = a;
395
375
  }
396
- }, Ae = (r, { beforeInit: e, afterInit: t } = {}) => {
397
- const n = v, s = v, o = { eBAUu: "function", uldJU: function(a, c) {
398
- return a(c);
399
- }, nOioM: function(a, c) {
376
+ };
377
+ function B() {
378
+ const r = ["uUjKY", "notifications/initialized", "removeRequestListener", "96194JysfjF", "36346SGEWAV", "1357830AJaOeY", "resources/templates/list", "clearListener", "iQqcJ", "result", "tqDZP", "sSeCz", "XtowM", "HgYgW", "3913230mjiatC", "params", "roots/list", "function", "bfmJT", "transport", "resources/read", "27FNuDmk", "length", "Mfvzm", "ping", "code", "_onresponse", "vnkqu", "cjSoZ", "request", "9gIMIPC", "readResource", "GdkkV", "ptMjy", "call", "aVeaL", "completion/complete", "5035122lFbpzR", "logging/setLevel", "jQBBS", "send", "_requestHandlers", "jsonrpc", "addResponseListener", "7SpcenI", "ElOQH", "MDIkN", "message", "notifications/cancelled", "OhJjz", "clear", "672216JzFEyR", "xwPeb", "addNotificationListener", "fallbackRequestHandler", "sYzPD", "addListener", "ifIKG", "2.0", "gXsjT", "WqUnk", "resources/subscribe", "setLoggingLevel", "2491772kFUWFh", "SEmWX", "onerror", "prompts/get", "clearRequestListener", "fallbackNotificationHandler", "wxDWr", "SkoRK", "uTeHc", "handleListener", "Zybtx", "error", "originalOnResponse", "listResources", "initialize"];
379
+ return B = function() {
380
+ return r;
381
+ }, B();
382
+ }
383
+ const je = (r, { beforeInit: e, afterInit: t } = {}) => {
384
+ const n = b, s = b, o = { tqDZP: function(a, c) {
400
385
  return a === c;
401
- }, mYMiK: function(a) {
402
- return a();
403
- }, lKSxx: function(a) {
386
+ }, cjSoZ: "function", iQqcJ: n(378), Zybtx: function(a, c) {
387
+ return a(c);
388
+ }, ElOQH: function(a) {
404
389
  return a();
405
390
  } }, i = new Map(r._notificationHandlers);
406
- r._requestHandlers[n(413)](), r[s(410)][n(413)](), o.nOioM(typeof e, o.eBAUu) && o.mYMiK(e), r._onresponse.name === s(379) && (r[s(356)] = r._onresponse), Fe(r), r[s(352)]((a) => {
407
- r[n(356)].call(r, a);
408
- }), o.nOioM(typeof t, o[s(417)]) && o[n(386)](t), r[s(424)]((a) => {
409
- const c = n, { method: l } = a, u = i[c(419)](l);
410
- typeof u === o.eBAUu && o.uldJU(u, a);
391
+ r[n(393)][n(402)](), r._notificationHandlers[n(402)](), o.tqDZP(typeof e, o[n(380)]) && e(), o[n(362)](r._onresponse.name, o[n(360)]) && (r[s(349)] = r._onresponse), o[n(347)](Fe, r), r.addResponseListener((a) => {
392
+ const c = s;
393
+ r.originalOnResponse[c(386)](r, a);
394
+ }), o.tqDZP(typeof t, o[s(380)]) && o[n(397)](t), r[s(327)]((a) => {
395
+ const { method: c } = a, l = i.get(c);
396
+ o.tqDZP(typeof l, o.cjSoZ) && l(a);
411
397
  });
412
- }, Be = M;
413
- function M(r, e) {
414
- const t = W();
415
- return M = function(n, s) {
416
- return n = n - (-499 * 3 + 1 * -890 + -337 * -8), t[n];
417
- }, M(r, e);
418
- }
398
+ }, Ne = q, Ee = q;
419
399
  (function(r, e) {
420
- const t = M, n = M, s = r();
400
+ const t = q, n = q, s = r();
421
401
  for (; ; )
422
402
  try {
423
- if (parseInt(t(315)) / 1 * (-parseInt(t(316)) / 2) + parseInt(t(319)) / 3 * (-parseInt(t(320)) / 4) + -parseInt(n(324)) / 5 + parseInt(t(327)) / 6 * (-parseInt(n(323)) / 7) + parseInt(n(312)) / 8 + -parseInt(t(310)) / 9 + parseInt(t(325)) / 10 * (parseInt(t(322)) / 11) === e) break;
403
+ if (-parseInt(t(393)) / 1 + parseInt(t(397)) / 2 * (-parseInt(t(400)) / 3) + -parseInt(n(398)) / 4 + parseInt(t(390)) / 5 * (parseInt(n(388)) / 6) + -parseInt(t(389)) / 7 + -parseInt(t(402)) / 8 * (-parseInt(n(395)) / 9) + parseInt(n(399)) / 10 * (parseInt(n(385)) / 11) === e) break;
424
404
  s.push(s.shift());
425
405
  } catch {
426
406
  s.push(s.shift());
427
407
  }
428
- })(W, 815846 + -859697 * 1 + 650566);
429
- const Je = () => {
430
- const r = M, e = M, t = {};
431
- t[r(317)] = function(s, o) {
432
- return s & o;
433
- }, t[e(326)] = function(s, o) {
434
- return s | o;
435
- }, t.CJbSq = function(s, o) {
408
+ })(D, -1 * -881393 + 2 * 180895 + 1 * -644809);
409
+ function q(r, e) {
410
+ const t = D();
411
+ return q = function(n, s) {
412
+ return n = n - (-1861 + -499 * 4 + 4241), t[n];
413
+ }, q(r, e);
414
+ }
415
+ function D() {
416
+ const r = ["toString", "getRandomValues", "2101mUsYMI", "EQHzo", "padStart", "30UvDAkd", "1609706yzlqYx", "974735GrhZVO", "randomUUID", "REzPF", "562771BvAnoG", "dHTfU", "2047455boiYXf", "randomBytes", "14664qHAdbF", "3772144jLpQch", "52310AkWksx", "318MkjaVb", "from", "40WRwnSc"];
417
+ return D = function() {
418
+ return r;
419
+ }, D();
420
+ }
421
+ const Ve = () => {
422
+ const r = q, e = q, t = {};
423
+ t.REzPF = function(s, o) {
436
424
  return s & o;
437
- }, t[e(313)] = function(s, o) {
425
+ }, t.suJHI = function(s, o) {
438
426
  return s === o;
439
- }, t.aiAIs = e(309);
427
+ }, t[r(386)] = function(s, o) {
428
+ return s & o;
429
+ }, t[e(394)] = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";
440
430
  const n = t;
441
- return n[r(313)](typeof crypto, n.aiAIs) && crypto[r(314)] ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (s) => {
442
- const o = r, i = r, a = n[o(317)](crypto[i(321)](new Uint8Array(-8718 + 124 * 25 + 5619))[-6393 + -329 * -4 + 1 * 5077], 222 * -2 + -5419 * -1 + -496 * 10);
443
- return (s === "x" ? a : n.koxtC(n.CJbSq(a, 1510 + 1 * -1507), 737 * -3 + -3740 + 5959)).toString(16);
431
+ return n.suJHI(typeof crypto, "object") && crypto.randomUUID ? crypto[e(391)]() : n.dHTfU.replace(/[xy]/g, (s) => {
432
+ const o = r, i = r, a = n[o(392)](crypto[o(384)](new Uint8Array(-25 * -62 + 7113 + 2 * -4331))[741 * 2 + -1385 * -2 + 4252 * -1], 8648 + -107 * 62 + -1999);
433
+ return (n.suJHI(s, "x") ? a : n[i(386)](a, -4377 + 4 * 1095) | 5079 + 461 * -11).toString(9449 + 4 * -461 + -7589);
444
434
  });
445
- }, je = (r) => {
446
- const e = M, t = M, n = new Uint8Array(r);
447
- return crypto[e(321)](n), Array[e(311)](n, (s) => s.toString(-9830 * 1 + 15 * -389 + 15681).padStart(2, "0"))[t(328)]("");
435
+ }, ze = (r) => {
436
+ const e = q, t = q, n = new Uint8Array(r);
437
+ return crypto.getRandomValues(n), Array[e(401)](n, (s) => s[t(403)](-3 * 1739 + -6509 + 2 * 5871)[e(387)](2, "0")).join("");
448
438
  }, P = {};
449
- function W() {
450
- const r = ["322602YEeXTL", "cWMWo", "randomBytes", "360714cQwoni", "4jGlyZR", "getRandomValues", "11vuSHLa", "7coyLYd", "576200ZDqfSL", "25441610RPtFTZ", "koxtC", "4124070gqAgCl", "join", "object", "8383374JYLMHO", "from", "4496536egULKP", "bXzKK", "randomUUID", "4ZgaCxq"];
451
- return W = function() {
452
- return r;
453
- }, W();
454
- }
455
- P.randomUUID = Je, P[Be(318)] = je;
456
- const A = T, k = T;
439
+ P[Ne(391)] = Ve, P[Ee(396)] = ze;
440
+ const S = k;
457
441
  (function(r, e) {
458
- const t = T, n = T, s = r();
442
+ const t = k, n = k, s = r();
459
443
  for (; ; )
460
444
  try {
461
- if (-parseInt(t(202)) / 1 + -parseInt(n(206)) / 2 + -parseInt(n(205)) / 3 + parseInt(t(176)) / 4 + -parseInt(n(180)) / 5 + -parseInt(n(194)) / 6 + parseInt(t(188)) / 7 === e) break;
445
+ if (parseInt(t(521)) / 1 * (parseInt(n(499)) / 2) + parseInt(n(543)) / 3 * (parseInt(n(514)) / 4) + parseInt(t(502)) / 5 * (parseInt(n(539)) / 6) + parseInt(t(553)) / 7 + parseInt(t(516)) / 8 * (-parseInt(t(518)) / 9) + -parseInt(t(531)) / 10 + -parseInt(t(545)) / 11 * (parseInt(t(541)) / 12) === e) break;
462
446
  s.push(s.shift());
463
447
  } catch {
464
448
  s.push(s.shift());
465
449
  }
466
- })(Y, 112621 * 2 + -1 * -1870746 + -1103066);
467
- function Y() {
468
- const r = ["function", "JPlVw", "removeRequestListener", "authProvider", "1.0.0", "rmzgk", "ZXEHq", "KmDTz", "oHJBZ", "TIBus", "credentials", "197184QVZkrq", "removeResponseListener", "set", "searchParams", "9184715GDLahr", "version", "listChanged", "KaUfV", "include", "Authorization", "afterInit", "entries", "50977584KLIJFM", "sampling", "capabilities", "randomUUID", "close", "requestInit", "1757244qRFdUY", "headers", "transport", "mcp-sse-proxy-client", "sessionId", "wZCHj", "roots", "removeNotificationListener", "1628495nlouLW", "addRequestListener", "xZlrW", "4650435ijSJjJ", "2060858ZiIYSc", "SUlgi", "_eventSource", "eventSourceInit", "MRyfg", "mcp-stream-proxy-client", "sse-session-id", "name", "alwWV", "aDqLK"];
469
- return Y = function() {
470
- return r;
471
- }, Y();
472
- }
473
- const Ve = (r, e) => {
474
- const t = T, n = T, s = { MRyfg: function(c, l, u) {
450
+ })(Z, 1472653 * 1 + -2 * -897917 + -2275789);
451
+ const Ae = (r, e) => {
452
+ const t = k, n = k, s = { FyYHt: function(c, l, u) {
453
+ return c(l, u);
454
+ }, Fxtoq: function(c, l, u) {
475
455
  return c(l, u);
476
456
  } };
477
- s[t(210)](ke, r, e), s.MRyfg(Ue, r, e);
478
- const o = Ne(e, r), i = s.MRyfg(Oe, e, r), a = Pe(e, r);
479
- e[t(203)](o), e.addResponseListener(i), e.addNotificationListener(a), r.onclose = () => {
480
- const c = t, l = n;
481
- e[c(218)](o), e[c(177)](i), e[l(201)](a);
457
+ He(r, e), Pe(r, e);
458
+ const o = Me(e, r), i = s[t(510)](Oe, e, r), a = s[n(549)](Ue, e, r);
459
+ e[n(537)](o), e[t(519)](i), e.addNotificationListener(a), r[n(556)] = () => {
460
+ const c = n;
461
+ e.removeRequestListener(o), e[c(530)](i), e[c(529)](a);
482
462
  };
483
- }, re = (r, e, t) => {
484
- const n = T, s = T, o = { oHJBZ: function(c, l) {
485
- return c instanceof l;
486
- }, THMqs: n(192), Ukaqt: function(c, l, u) {
487
- return c(l, u);
488
- }, pgcGT: function(c, l, u) {
489
- return c(l, u);
490
- } }, i = () => {
491
- var c;
492
- const l = n, u = n;
493
- o[l(173)](t, O) && ((c = t[u(208)]) == null || c.addEventListener(o.THMqs, () => {
494
- var f;
495
- const d = l;
496
- (f = t._eventSource) == null || f[d(192)]();
497
- })), o.Ukaqt(Ve, r, e);
498
- }, a = {};
499
- a[s(186)] = i, o.pgcGT(Ae, e, a);
500
- }, oe = (r, e = P[A(191)]()) => {
501
- const t = A, n = A, s = { sFqUo: function(u, f, d) {
463
+ }, $ = (r, e, t) => {
464
+ const n = k, s = { pMiva: function(a, c) {
465
+ return a instanceof c;
466
+ }, TeTEy: n(546), fyZbd: function(a, c, l) {
467
+ return a(c, l);
468
+ } }, o = () => {
469
+ var a;
470
+ const c = n;
471
+ s.pMiva(t, U) && ((a = t._eventSource) == null || a.addEventListener(s[c(547)], () => {
472
+ var l;
473
+ const u = c;
474
+ (l = t[u(509)]) == null || l[u(546)]();
475
+ })), Ae(r, e);
476
+ }, i = {};
477
+ i.afterInit = o, s.fyZbd(je, e, i);
478
+ }, re = (r, e = P.randomUUID()) => {
479
+ const t = k, n = k, s = { OfssH: function(u, f, d) {
502
480
  return u(f, d);
503
- }, KmDTz: t(184) }, o = {};
504
- o[n(212)] = e;
481
+ } }, o = {};
482
+ o[t(528)] = e;
505
483
  const i = o, a = {};
506
- a["sse-session-id"] = e;
484
+ a[t(528)] = e;
507
485
  const c = {};
508
- c[n(195)] = a, c[t(175)] = s[t(172)];
486
+ c[n(558)] = a, c[t(534)] = t(524);
509
487
  const l = { requestInit: c, eventSourceInit: { async fetch(u, f) {
510
- const d = t, h = new Headers((f == null ? void 0 : f.headers) || {});
511
- Object[d(187)](i).forEach(([p, g]) => {
512
- h[d(178)](p, g);
488
+ const d = t, h = n, x = new Headers((f == null ? void 0 : f[d(558)]) || {});
489
+ Object.entries(i)[h(498)](([_, v]) => {
490
+ x[h(527)](_, v);
513
491
  });
514
- const _ = { ...f };
515
- return _.headers = h, s.sFqUo(fetch, u, _);
492
+ const p = { ...f };
493
+ return p[h(558)] = x, s.OfssH(fetch, u, p);
516
494
  }, withCredentials: !0 } };
517
- return r && (l[n(193)][t(195)].Authorization = "Bearer " + r, i.Authorization = "Bearer " + r), l;
518
- }, ie = (r, e = P[k(191)]()) => {
519
- const t = k, n = A, s = {};
520
- s["stream-session-id"] = e;
521
- const o = {};
522
- o.headers = s, o[t(175)] = t(184);
523
- const i = {};
524
- i[n(193)] = o;
525
- const a = i;
526
- return r && (a.requestInit[t(195)][t(185)] = "Bearer " + r), a;
495
+ return r && (l.requestInit[t(558)].Authorization = t(533) + r, i.Authorization = "Bearer " + r), l;
496
+ }, oe = (r, e = P[S(517)]()) => {
497
+ const t = S, n = S, s = {};
498
+ s.nwQhY = "include";
499
+ const o = s, i = {};
500
+ i["stream-session-id"] = e;
501
+ const a = {};
502
+ a.headers = i, a.credentials = o[t(520)];
503
+ const c = {};
504
+ c[t(544)] = a;
505
+ const l = c;
506
+ return r && (l.requestInit.headers[n(552)] = n(533) + r), l;
507
+ }, E = async (r, e, t) => {
508
+ const n = S, s = S, o = { CFfFC: function(a) {
509
+ return a();
510
+ }, egwVO: function(a, c, l, u) {
511
+ return a(c, l, u);
512
+ } }, i = o.CFfFC(t);
513
+ try {
514
+ return await r[n(538)](i), i;
515
+ } catch (a) {
516
+ if (a instanceof Re) {
517
+ const c = await e();
518
+ return await i[s(505)](c), await o[n(525)](E, r, e, t);
519
+ } else throw a;
520
+ }
527
521
  };
528
- function T(r, e) {
529
- const t = Y();
530
- return T = function(n, s) {
531
- return n = n - (-1 * -8402 + -921 * -6 + 13759 * -1), t[n];
532
- }, T(r, e);
522
+ function k(r, e) {
523
+ const t = Z();
524
+ return k = function(n, s) {
525
+ return n = n - (74 * -67 + -8341 + -73 * -189), t[n];
526
+ }, k(r, e);
533
527
  }
534
- const J = async (r, e, t) => {
535
- const n = k, s = { YdzuA: function(i, a) {
536
- return i instanceof a;
537
- }, uzBvt: function(i) {
538
- return i();
539
- }, alwWV: function(i, a, c, l) {
540
- return i(a, c, l);
541
- } }, o = t();
542
- try {
543
- return await r.connect(o), o;
544
- } catch (i) {
545
- if (s.YdzuA(i, Le)) {
546
- const a = await s.uzBvt(e);
547
- return await o.finishAuth(a), await s[n(214)](J, r, e, t);
548
- } else throw i;
549
- }
550
- }, ae = (r, e) => {
551
- const t = k, n = k, s = {};
552
- s[t(199)] = "waitForOAuthCode", s[t(183)] = function(i, a) {
553
- return i === a;
554
- }, s[n(207)] = t(216);
528
+ const ie = (r, e) => {
529
+ const t = S, n = S, s = {};
530
+ s.RsKXs = function(i, a) {
531
+ return i in a;
532
+ }, s.PBhps = "waitForOAuthCode", s[t(535)] = "function", s[t(507)] = "waitForOAuthCode need to be provided when authProvider is provided";
555
533
  const o = s;
556
- if (o.wZCHj in r) return r.waitForOAuthCode;
557
- if (o.KaUfV(typeof e, o[t(207)])) return e;
558
- throw new Error("waitForOAuthCode need to be provided when authProvider is provided");
559
- }, ze = async (r) => {
560
- const e = k, t = k, n = { rasho: e(197), rmzgk: t(169), JPlVw: function(x) {
561
- return x();
562
- }, TIBus: function(x, L, S) {
563
- return x(L, S);
564
- }, JyYqS: function(x, L, S, F) {
565
- return x(L, S, F);
566
- }, ywGtJ: function(x, L, S, F) {
567
- return x(L, S, F);
568
- } }, { client: s, url: o, token: i, sessionId: a, authProvider: c, requestInit: l, eventSourceInit: u, waitForOAuthCode: f } = r, d = {};
569
- d[e(219)] = c, d[e(193)] = l, d.eventSourceInit = u;
570
- const h = d, _ = a || P[t(191)](), p = oe(i, _);
534
+ if (o.RsKXs(o[n(551)], r)) return r[n(523)];
535
+ if (typeof e === o.yTKoP) return e;
536
+ throw new Error(o.RZhOv);
537
+ }, We = async (r) => {
538
+ const e = S, t = S, n = { TFSRn: function(w, T, H) {
539
+ return w(T, H);
540
+ }, HwvVa: "mcp-sse-proxy-client", ufTHS: function(w) {
541
+ return w();
542
+ }, WIVYl: function(w, T, H, F) {
543
+ return w(T, H, F);
544
+ }, jniGY: "sessionId" }, { client: s, url: o, token: i, sessionId: a, authProvider: c, requestInit: l, eventSourceInit: u, waitForOAuthCode: f } = r, d = {};
545
+ d.authProvider = c, d.requestInit = l, d.eventSourceInit = u;
546
+ const h = d, x = a || P.randomUUID(), p = n[e(506)](re, i, x);
571
547
  if (l) {
572
- const x = { ...p.requestInit, ...l };
573
- x.headers = { ...p[t(193)][t(195)], ...l[e(195)] }, h[t(193)] = x;
574
- } else h[e(193)] = p[t(193)];
548
+ const w = { ...p.requestInit, ...l };
549
+ w.headers = { ...p[e(544)].headers, ...l.headers }, h.requestInit = w;
550
+ } else h[t(544)] = p.requestInit;
575
551
  if (u) {
576
- const x = { ...p.eventSourceInit, ...u };
577
- h[e(209)] = x;
578
- } else h[e(209)] = p[e(209)];
579
- const g = {};
580
- g[t(182)] = !0;
581
- const b = {};
582
- b[t(200)] = g, b.sampling = {}, b.elicitation = {};
583
- const y = b, C = {};
584
- C[t(213)] = n.rasho, C[t(181)] = n[e(170)];
585
- const U = {};
586
- U.capabilities = y;
587
- const m = new Z(C, U), q = () => new O(new URL(o), h);
588
- let I = n[e(217)](q);
552
+ const w = { ...p[e(559)], ...u };
553
+ h.eventSourceInit = w;
554
+ } else h.eventSourceInit = p.eventSourceInit;
555
+ const _ = {};
556
+ _.listChanged = !0;
557
+ const v = {};
558
+ v.roots = _, v.sampling = {}, v[e(511)] = {};
559
+ const m = v, y = {};
560
+ y[t(536)] = n.HwvVa, y.version = e(526);
561
+ const I = {};
562
+ I.capabilities = m;
563
+ const L = new V(y, I), O = () => new U(new URL(o), h);
564
+ let R = n[t(504)](O);
589
565
  if (c) {
590
- const x = n[t(174)](ae, c, f);
591
- I = await n.JyYqS(J, m, x, q);
592
- } else await m.connect(I);
593
- n.ywGtJ(re, m, s, I), I[e(198)] = I._endpoint[t(179)].get("sessionId");
594
- const N = {};
595
- return N.transport = I, N[e(198)] = I[t(198)], N;
596
- }, We = async (r) => {
597
- const e = k, t = A, n = { AJbbW: function(x, L, S) {
598
- return x(L, S);
599
- }, ZXEHq: e(211), aDqLK: function(x) {
600
- return x();
601
- }, nKQkl: function(x, L, S) {
602
- return x(L, S);
603
- }, xZlrW: function(x, L, S, F) {
604
- return x(L, S, F);
566
+ const w = n[e(506)](ie, c, f);
567
+ R = await n[t(513)](E, L, w, O);
568
+ } else await L[e(538)](R);
569
+ n[t(513)]($, L, s, R), R[t(557)] = R[t(542)].searchParams[t(532)](n.jniGY);
570
+ const M = {};
571
+ return M.transport = R, M.sessionId = R[e(557)], M;
572
+ };
573
+ function Z() {
574
+ const r = ["ufTHS", "finishAuth", "TFSRn", "RZhOv", "Vajmx", "_eventSource", "FyYHt", "elicitation", "transport", "WIVYl", "13320uyrBtN", "sampling", "8WTwLJD", "randomUUID", "6438654bkJHij", "addResponseListener", "nwQhY", "11721GVgRMJ", "?sessionId=", "waitForOAuthCode", "include", "egwVO", "1.0.0", "set", "sse-session-id", "removeNotificationListener", "removeResponseListener", "11838520fNkjrV", "get", "Bearer ", "credentials", "yTKoP", "name", "addRequestListener", "connect", "18VhCgQv", "mcp-socket-proxy-client", "2819364JNqkQZ", "_endpoint", "699JyrxCR", "requestInit", "44ofbsvb", "close", "TeTEy", "QgzDy", "Fxtoq", "roots", "PBhps", "Authorization", "11309130xGCFwl", "&token=", "version", "onclose", "sessionId", "headers", "eventSourceInit", "forEach", "62FcOkCa", "mcp-stream-proxy-client", "zXcpO", "1794855cQEXDT", "biJOc"];
575
+ return Z = function() {
576
+ return r;
577
+ }, Z();
578
+ }
579
+ const Be = async (r) => {
580
+ const e = S, t = S, n = { Vajmx: e(500), biJOc: function(w) {
581
+ return w();
582
+ }, zXcpO: function(w, T, H) {
583
+ return w(T, H);
584
+ }, zDnjZ: function(w, T, H, F) {
585
+ return w(T, H, F);
586
+ }, FQMAh: function(w, T, H, F) {
587
+ return w(T, H, F);
605
588
  } }, { client: s, url: o, token: i, sessionId: a, authProvider: c, requestInit: l, reconnectionOptions: u, waitForOAuthCode: f } = r, d = {};
606
589
  d.authProvider = c, d.requestInit = l, d.reconnectionOptions = u;
607
- const h = d, _ = a || P.randomUUID(), p = n.AJbbW(ie, i, _);
590
+ const h = d, x = a || P.randomUUID(), p = oe(i, x);
608
591
  if (l) {
609
- const x = { ...p[e(193)], ...l };
610
- x.headers = { ...p.requestInit.headers, ...l[t(195)] }, h.requestInit = x;
611
- } else h[e(193)] = p[e(193)];
612
- const g = {};
613
- g[t(182)] = !0;
614
- const b = {};
615
- b[e(200)] = g, b[e(189)] = {}, b.elicitation = {};
616
- const y = b, C = {};
617
- C[e(213)] = n[e(171)], C.version = e(169);
618
- const U = {};
619
- U[e(190)] = y;
620
- const m = new Z(C, U), q = () => new B(new URL(o), h);
621
- let I = n[e(215)](q);
592
+ const w = { ...p.requestInit, ...l };
593
+ w.headers = { ...p.requestInit.headers, ...l.headers }, h[e(544)] = w;
594
+ } else h.requestInit = p.requestInit;
595
+ const _ = {};
596
+ _.listChanged = !0;
597
+ const v = {};
598
+ v[t(550)] = _, v.sampling = {}, v.elicitation = {};
599
+ const m = v, y = {};
600
+ y[e(536)] = n[t(508)], y[e(555)] = "1.0.0";
601
+ const I = {};
602
+ I.capabilities = m;
603
+ const L = new V(y, I), O = () => new N(new URL(o), h);
604
+ let R = n[e(503)](O);
622
605
  if (c) {
623
- const x = n.nKQkl(ae, c, f);
624
- I = await n[t(204)](J, m, x, q);
625
- } else await m.connect(I);
626
- re(m, s, I);
627
- const N = {};
628
- return N[t(196)] = I, N[e(198)] = I[e(198)], N;
629
- };
630
- function D() {
631
- const r = ["_callBackPromise", "clientMetadata", "clientInformation", "_redirectCallback", "134455mslyQC", "558338pOTNJB", "510616LiqUbS", "json", "7441KftUnn", "20YdRwwG", "POST", "code", "_getAuthCodeByState", "DjZmq", "statusText", "17336099YnGEHr", "saveCodeVerifier", "996bqURbL", "Failed to fetch auth code: ", "_clientMetadata", "saveTokens", "VGvoL", "No code verifier saved", "redirect_uris", "reject", "693422ltcndC", "Failed to redirect: ", "redirectUrl", "99IWgtlv", "6UDGeyf", "waitForOAuthCode", "codeVerifier", "waitForOAuthCodeFunction", "GET", "_codeVerifier", "_clientInformation", "resolve", "getAuthCodeByStateFunction", "_tokens", "8655150IwrNAp", "_state"];
632
- return D = function() {
633
- return r;
634
- }, D();
606
+ const w = n[e(501)](ie, c, f);
607
+ R = await n.zDnjZ(E, L, w, O);
608
+ } else await L.connect(R);
609
+ n.FQMAh($, L, s, R);
610
+ const M = {};
611
+ return M.transport = R, M[t(557)] = R.sessionId, M;
612
+ }, De = async (r) => {
613
+ const e = S, t = S, n = { QgzDy: e(540), jkaVB: function(v, m, y, I) {
614
+ return v(m, y, I);
615
+ } }, { client: s, url: o, token: i, sessionId: a } = r, c = {};
616
+ c.listChanged = !0;
617
+ const l = {};
618
+ l[e(550)] = c, l[e(515)] = {}, l[t(511)] = {};
619
+ const u = l, f = {};
620
+ f.name = n[t(548)], f[t(555)] = t(526);
621
+ const d = {};
622
+ d.capabilities = u;
623
+ const h = new V(f, d), x = a || P[t(517)](), p = new te(new URL(o + e(522) + x + t(554) + i));
624
+ await h.connect(p), n.jkaVB($, h, s, p);
625
+ const _ = {};
626
+ return _[e(512)] = p, _[t(557)] = x, _;
627
+ }, j = C, z = C;
628
+ function C(r, e) {
629
+ const t = Y();
630
+ return C = function(n, s) {
631
+ return n = n - (-16761 + 51 * 337), t[n];
632
+ }, C(r, e);
635
633
  }
636
- const H = R, Q = R;
637
634
  (function(r, e) {
638
- const t = R, n = R, s = r();
635
+ const t = C, n = C, s = r();
639
636
  for (; ; )
640
637
  try {
641
- if (parseInt(t(259)) / 1 + parseInt(n(239)) / 2 * (-parseInt(n(263)) / 3) + parseInt(t(243)) / 4 * (parseInt(n(238)) / 5) + parseInt(t(251)) / 6 * (parseInt(t(242)) / 7) + -parseInt(n(240)) / 8 * (-parseInt(t(262)) / 9) + parseInt(t(273)) / 10 + -parseInt(n(249)) / 11 === e) break;
638
+ if (-parseInt(t(440)) / 1 + -parseInt(t(458)) / 2 * (parseInt(t(448)) / 3) + -parseInt(t(451)) / 4 * (parseInt(n(449)) / 5) + -parseInt(n(455)) / 6 + -parseInt(t(427)) / 7 + -parseInt(n(438)) / 8 * (parseInt(n(459)) / 9) + parseInt(t(430)) / 10 * (parseInt(n(436)) / 11) === e) break;
642
639
  s.push(s.shift());
643
640
  } catch {
644
641
  s.push(s.shift());
645
642
  }
646
- })(D, 437600);
647
- const Ye = () => P.randomBytes(8128 + 115 * -5 + -7513);
648
- function R(r, e) {
649
- const t = D();
650
- return R = function(n, s) {
651
- return n = n - (-1 * 2069 + 9 * 832 + 54 * -96), t[n];
652
- }, R(r, e);
643
+ })(Y, -220880 + 1 * -333337 + -2 * -384996);
644
+ function Y() {
645
+ const r = ["650XPHLhD", "redirectToAuthorization", "10856jPvMVb", "GET", "qcFPW", "_redirectUrl", "2187414WnlGuZ", "resolve", "tokens", "3976YyOqUl", "27ejNHsa", "Content-Type", "waitForOAuthCode", "2903796yvWZFa", "_clientMetadata", "application/x-www-form-urlencoded", "10beEWJk", "json", "code", "_callBackPromise", "reject", "saveClientInformation", "20776349mLNCcF", "_codeVerifier", "629912aTknXq", "_tokens", "52074GwcpRo", "state", "_state", "_redirectCallback", "_clientInformation", "redirect_uris", "Failed to redirect: ", "clientInformation", "381aduWsB"];
646
+ return Y = function() {
647
+ return r;
648
+ }, Y();
653
649
  }
654
- class $e {
650
+ const Ze = () => P.randomBytes(3485 * 1 + -261 + -3184);
651
+ class tt {
655
652
  constructor(e) {
656
- const t = R, n = R;
657
- this[t(275)] = {};
653
+ const t = C, n = C;
654
+ this._callBackPromise = {};
658
655
  const { clientMetadata: s, state: o, redirectCallback: i, getAuthCodeByState: a, waitForOAuthCode: c } = e;
659
- this[n(253)] = s, this._redirectUrl = s[t(257)][-9616 + -4068 * -1 + 5548], this._state = o || Ye(), this[n(237)] = i || this.redirectCallbackFunction, this[n(246)] = a || this[t(271)], this[t(264)] = c || this[n(266)]();
656
+ this[t(428)] = s, this[t(454)] = s[t(445)][0], this._state = o || Ze(), this._redirectCallback = i || this.redirectCallbackFunction, this._getAuthCodeByState = a || this.getAuthCodeByStateFunction, this[n(426)] = c || this.waitForOAuthCodeFunction();
660
657
  }
661
658
  async redirectCallbackFunction(e) {
662
659
  var t, n, s, o, i, a;
663
- const c = R, l = R, u = {};
664
- u.TspJZ = c(267);
665
- const f = u, d = {};
666
- d.method = f.TspJZ;
667
- const h = await fetch(e, d);
668
- !h.ok && ((n = (t = this._callBackPromise).reject) == null || n.call(t, c(260) + h.statusText));
669
- const _ = await this[l(246)](this._redirectUrl, this[l(274)]);
670
- if (!_.ok) {
671
- (o = (s = this[l(275)])[l(258)]) == null || o.call(s, l(252) + _[l(248)]);
660
+ const c = C, l = C, u = { qITTp: function(x, p, _) {
661
+ return x(p, _);
662
+ }, qcFPW: c(452) }, f = await u.qITTp(fetch, e, { method: u[c(453)] });
663
+ !f.ok && ((n = (t = this._callBackPromise).reject) == null || n.call(t, l(446) + f.statusText));
664
+ const d = await this._getAuthCodeByState(this[l(454)], this[c(442)]);
665
+ if (!d.ok) {
666
+ (o = (s = this[c(433)]).reject) == null || o.call(s, "Failed to fetch auth code: " + d.statusText);
672
667
  return;
673
668
  }
674
- const p = await _[c(241)]();
675
- (a = (i = this[c(275)])[l(270)]) == null || a.call(i, p[l(245)]);
669
+ const h = await d[c(431)]();
670
+ (a = (i = this[l(433)])[c(456)]) == null || a.call(i, h[c(432)]);
676
671
  }
677
672
  async getAuthCodeByStateFunction(e, t) {
678
- const n = R, s = R, o = { DjZmq: function(a, c, l) {
679
- return a(c, l);
680
- }, WUtMg: "application/x-www-form-urlencoded" }, i = {};
681
- return i.state = t, o[n(247)](fetch, e, { method: s(244), headers: { "Content-Type": o.WUtMg }, body: new URLSearchParams(i) });
673
+ const n = C, s = C, o = {};
674
+ o.tuSmb = n(429);
675
+ const i = o, a = {};
676
+ a[n(460)] = i.tuSmb;
677
+ const c = {};
678
+ return c[s(441)] = t, fetch(e, { method: "POST", headers: a, body: new URLSearchParams(c) });
682
679
  }
683
680
  waitForOAuthCodeFunction() {
684
- const e = this._callBackPromise;
685
- return () => new Promise((t, n) => {
686
- const s = R;
687
- e.resolve = t, e[s(258)] = n;
681
+ const e = C, t = this[e(433)];
682
+ return () => new Promise((n, s) => {
683
+ const o = e;
684
+ t.resolve = n, t[o(434)] = s;
688
685
  });
689
686
  }
690
- get [H(261)]() {
691
- return this._redirectUrl;
687
+ get redirectUrl() {
688
+ return this[C(454)];
692
689
  }
693
- get [Q(235)]() {
690
+ get clientMetadata() {
694
691
  return this._clientMetadata;
695
692
  }
696
693
  state() {
697
- return this[H(274)];
694
+ return this._state;
698
695
  }
699
- [H(236)]() {
700
- return this._clientInformation;
696
+ [j(447)]() {
697
+ return this[j(444)];
701
698
  }
702
- saveClientInformation(e) {
703
- const t = Q;
704
- this[t(269)] = e;
699
+ [z(435)](e) {
700
+ const t = j;
701
+ this[t(444)] = e;
705
702
  }
706
- tokens() {
707
- return this._tokens;
703
+ [z(457)]() {
704
+ return this[z(439)];
708
705
  }
709
- [Q(254)](e) {
710
- const t = H;
711
- this[t(272)] = e;
706
+ saveTokens(e) {
707
+ this._tokens = e;
712
708
  }
713
- redirectToAuthorization(e) {
714
- this[H(237)](e);
709
+ [z(450)](e) {
710
+ this[j(443)](e);
715
711
  }
716
- [H(250)](e) {
717
- const t = H;
718
- this[t(268)] = e;
712
+ saveCodeVerifier(e) {
713
+ this._codeVerifier = e;
719
714
  }
720
- [H(265)]() {
721
- const e = H, t = H, n = {};
722
- n[e(255)] = e(256);
723
- const s = n;
724
- if (!this._codeVerifier) throw new Error(s[t(255)]);
725
- return this[t(268)];
715
+ codeVerifier() {
716
+ if (!this[j(437)]) throw new Error("No code verifier saved");
717
+ return this._codeVerifier;
726
718
  }
727
719
  }
728
720
  (function(r, e) {
729
- for (var t = K, n = K, s = r(); ; )
721
+ for (var t = G, n = G, s = r(); ; )
730
722
  try {
731
- var o = -parseInt(t(299)) / 1 * (-parseInt(n(296)) / 2) + -parseInt(n(298)) / 3 + parseInt(n(300)) / 4 + -parseInt(t(292)) / 5 + parseInt(n(295)) / 6 * (parseInt(t(294)) / 7) + -parseInt(t(297)) / 8 + -parseInt(n(293)) / 9;
723
+ var o = parseInt(t(361)) / 1 * (parseInt(n(363)) / 2) + -parseInt(t(358)) / 3 + parseInt(t(359)) / 4 * (parseInt(t(357)) / 5) + parseInt(n(354)) / 6 * (parseInt(t(360)) / 7) + parseInt(n(362)) / 8 + parseInt(n(364)) / 9 + -parseInt(n(356)) / 10 * (parseInt(t(355)) / 11);
732
724
  if (o === e) break;
733
725
  s.push(s.shift());
734
726
  } catch {
735
727
  s.push(s.shift());
736
728
  }
737
- })(E, 722500 + -10 * 107029 + 902741);
738
- function E() {
739
- var r = ["2iLxULY", "1547872TvYRpQ", "3124428cOXNRq", "1035197lJDFGt", "3486564wwalRD", "2645980SUHNlu", "872424UrZLEr", "2905TFXGtD", "7362fQOePf"];
740
- return E = function() {
729
+ })(J, -73523 * -3 + 1 * -407717 + 530518);
730
+ function J() {
731
+ var r = ["40ecBYYe", "1095owKKYD", "486870YOVwZy", "5752xWiyTO", "561484biNVMw", "1fWJmxQ", "1866064SPnyhb", "1109522vMiuMX", "1602351pPEGwH", "12sVyMLL", "2573296LTwOhv"];
732
+ return J = function() {
741
733
  return r;
742
- }, E();
734
+ }, J();
743
735
  }
744
- function K(r, e) {
745
- var t = E();
746
- return K = function(n, s) {
747
- n = n - (2152 * 2 + -563 * 12 + 2744);
736
+ function G(r, e) {
737
+ var t = J();
738
+ return G = function(n, s) {
739
+ n = n - (-1 * -642 + 503 * -5 + 2227);
748
740
  var o = t[n];
749
741
  return o;
750
- }, K(r, e);
742
+ }, G(r, e);
751
743
  }
752
- class et {
744
+ class nt {
753
745
  constructor(e, t) {
754
746
  const n = {
755
747
  name: "web-mcp-server",
@@ -770,13 +762,13 @@ class et {
770
762
  }, this.server.server.onerror = (o) => {
771
763
  var i;
772
764
  (i = this.onerror) == null || i.call(this, o);
773
- }, this.server.server.setRequestHandler(te, async () => ({}));
765
+ }, this.server.server.setRequestHandler(ee, async () => ({}));
774
766
  }
775
767
  /**
776
768
  * Connects the server to a transport via the specified option.
777
769
  */
778
770
  async connect(e) {
779
- return typeof e.start == "function" ? (this.transport = e, this.transport.onclose = void 0, this.transport.onerror = void 0, this.transport.onmessage = void 0) : (this.transport = new ee(e), await this.transport.listen()), await this.server.connect(this.transport), this.transport;
771
+ return typeof e.start == "function" ? (this.transport = e, this.transport.onclose = void 0, this.transport.onerror = void 0, this.transport.onmessage = void 0) : (this.transport = new K(e), await this.transport.listen()), await this.server.connect(this.transport), this.transport;
780
772
  }
781
773
  /**
782
774
  * Closes the connection.
@@ -918,19 +910,19 @@ class et {
918
910
  * Registers a handler for the subscribe request.
919
911
  */
920
912
  onSubscribe(e) {
921
- this.server.server.setRequestHandler(he, e);
913
+ this.server.server.setRequestHandler(fe, e);
922
914
  }
923
915
  /**
924
916
  * Registers a handler for the unsubscribe request.
925
917
  */
926
918
  onUnsubscribe(e) {
927
- this.server.server.setRequestHandler(pe, e);
919
+ this.server.server.setRequestHandler(he, e);
928
920
  }
929
921
  /**
930
922
  * Registers a handler for the set log level request.
931
923
  */
932
924
  onSetLogLevel(e) {
933
- this.server.server.setRequestHandler(te, e);
925
+ this.server.server.setRequestHandler(ee, e);
934
926
  }
935
927
  /**
936
928
  * Registers a handler for the list tools request.
@@ -951,8 +943,8 @@ class et {
951
943
  e.persisted || this.transport && typeof this.transport.close == "function" && await this.transport.close();
952
944
  }
953
945
  }
954
- const tt = (r, e) => new ee(r, e), nt = () => He(), st = (r) => r instanceof ee, rt = (r) => r instanceof ne;
955
- class ot {
946
+ const st = (r, e) => new K(r, e), rt = () => qe(), ot = (r) => r instanceof K, it = (r) => r instanceof ne;
947
+ class at {
956
948
  constructor(e, t) {
957
949
  const n = {
958
950
  name: "web-mcp-client",
@@ -962,7 +954,7 @@ class ot {
962
954
  sampling: {},
963
955
  elicitation: {}
964
956
  };
965
- this.client = new Z(e || n, t || { capabilities: s }), this.client.onclose = () => {
957
+ this.client = new V(e || n, t || { capabilities: s }), this.client.onclose = () => {
966
958
  var o;
967
959
  (o = this.onclose) == null || o.call(this);
968
960
  }, this.client.onerror = (o) => {
@@ -979,32 +971,32 @@ class ot {
979
971
  const { url: t, token: n, sessionId: s, authProvider: o, type: i, agent: a, onError: c, onUnauthorized: l, onReconnect: u } = e;
980
972
  if (a === !0) {
981
973
  const h = { client: this.client, url: t, token: n, sessionId: s, authProvider: o };
982
- let _ = !1, p;
983
- const g = async () => {
984
- const { transport: b, sessionId: y } = i === "sse" ? await ze(h) : await We(h);
985
- b.onerror = async (C) => {
986
- c == null || c(C), C.message === "Unauthorized" && !_ && (typeof l == "function" ? await l(g) : (_ = !0, await g(), _ = !1, await (u == null ? void 0 : u())));
987
- }, p = { transport: b, sessionId: y };
974
+ let x = !1, p;
975
+ const _ = async () => {
976
+ const { transport: v, sessionId: m } = i === "sse" ? await We(h) : i === "socket" ? await De(h) : await Be(h);
977
+ v.onerror = async (y) => {
978
+ c == null || c(y), y.message === "Unauthorized" && !x && (typeof l == "function" ? await l(_) : (x = !0, await _(), x = !1, await (u == null ? void 0 : u())));
979
+ }, p = { transport: v, sessionId: m };
988
980
  };
989
- return await g(), p;
981
+ return await _(), p;
990
982
  }
991
983
  const f = new URL(t);
992
984
  let d;
993
- if (i === "channel" && (d = new $(t), await this.client.connect(d)), i === "sse")
985
+ if (i === "channel" && (d = new X(t), await this.client.connect(d)), i === "sse")
994
986
  if (o) {
995
- const h = () => new O(f, { authProvider: o });
996
- d = await J(this.client, o.waitForOAuthCode, h);
987
+ const h = () => new U(f, { authProvider: o });
988
+ d = await E(this.client, o.waitForOAuthCode, h);
997
989
  } else {
998
- const h = oe(n, s);
999
- d = new O(f, h), await this.client.connect(d);
990
+ const h = re(n, s);
991
+ d = new U(f, h), await this.client.connect(d);
1000
992
  }
1001
- if (typeof d > "u")
993
+ if (i === "socket" && (d = new te(new URL(`${t}?sessionId=${s}&token=${n}`)), d.sessionId = s, await this.client.connect(d)), typeof d > "u")
1002
994
  if (o) {
1003
- const h = () => new B(f, { authProvider: o });
1004
- d = await J(this.client, o.waitForOAuthCode, h);
995
+ const h = () => new N(f, { authProvider: o });
996
+ d = await E(this.client, o.waitForOAuthCode, h);
1005
997
  } else {
1006
- const h = ie(n, s);
1007
- d = new B(f, h), await this.client.connect(d);
998
+ const h = oe(n, s);
999
+ d = new N(f, h), await this.client.connect(d);
1008
1000
  }
1009
1001
  return this.transport = d, { transport: this.transport, sessionId: this.transport.sessionId };
1010
1002
  }
@@ -1096,7 +1088,7 @@ class ot {
1096
1088
  * Calls a tool on the server with the given parameters.
1097
1089
  */
1098
1090
  async callTool(e, t) {
1099
- return await this.client.callTool(e, ve, t);
1091
+ return await this.client.callTool(e, pe, t);
1100
1092
  }
1101
1093
  /**
1102
1094
  * Lists all tools available on the server.
@@ -1156,7 +1148,7 @@ class ot {
1156
1148
  * Registers a handler for the elicitation request.
1157
1149
  */
1158
1150
  onElicit(e) {
1159
- this.client.setRequestHandler(ge, e);
1151
+ this.client.setRequestHandler(ve, e);
1160
1152
  }
1161
1153
  /**
1162
1154
  * Registers a handler for the create LLM message request.
@@ -1174,25 +1166,25 @@ class ot {
1174
1166
  * Registers a handler for the tool list changed notification.
1175
1167
  */
1176
1168
  onToolListChanged(e) {
1177
- this.client.setNotificationHandler(me, e);
1169
+ this.client.setNotificationHandler(ge, e);
1178
1170
  }
1179
1171
  /**
1180
1172
  * Registers a handler for the prompt list changed notification.
1181
1173
  */
1182
1174
  onPromptListChanged(e) {
1183
- this.client.setNotificationHandler(ye, e);
1175
+ this.client.setNotificationHandler(me, e);
1184
1176
  }
1185
1177
  /**
1186
1178
  * Registers a handler for the resource list changed notification.
1187
1179
  */
1188
1180
  onResourceListChanged(e) {
1189
- this.client.setNotificationHandler(Ie, e);
1181
+ this.client.setNotificationHandler(ye, e);
1190
1182
  }
1191
1183
  /**
1192
1184
  * Registers a handler for the resource updated notification.
1193
1185
  */
1194
1186
  onResourceUpdated(e) {
1195
- this.client.setNotificationHandler(Re, e);
1187
+ this.client.setNotificationHandler(Ie, e);
1196
1188
  }
1197
1189
  /**
1198
1190
  * Registers a handler for the logging message notification.
@@ -1204,29 +1196,29 @@ class ot {
1204
1196
  * Close the transport for window.addEventListener('pagehide')
1205
1197
  */
1206
1198
  async onPagehide(e) {
1207
- e.persisted || (De(this.transport) ? await this.transport.terminateSession() : this.transport && typeof this.transport.close == "function" && await this.transport.close());
1199
+ e.persisted || (Ye(this.transport) ? await this.transport.terminateSession() : this.transport && typeof this.transport.close == "function" && await this.transport.close());
1208
1200
  }
1209
1201
  }
1210
- const it = (r, e) => new O(r, e), at = (r, e) => new B(r, e), ct = (r, e) => new $(r, e), lt = (r) => r instanceof O, De = (r) => r instanceof B, ut = (r) => r instanceof $, dt = (r) => r instanceof Z;
1202
+ const ct = (r, e) => new U(r, e), lt = (r, e) => new N(r, e), ut = (r, e) => new X(r, e), dt = (r) => r instanceof U, Ye = (r) => r instanceof N, ft = (r) => r instanceof X, ht = (r) => r instanceof V;
1211
1203
  export {
1212
1204
  pt as Ajv,
1213
- $e as AuthClientProvider,
1214
- xt as ResourceTemplate,
1215
- wt as UriTemplate,
1216
- ot as WebMcpClient,
1217
- et as WebMcpServer,
1218
- yt as completable,
1219
- ct as createMessageChannelClientTransport,
1220
- nt as createMessageChannelPairTransport,
1221
- tt as createMessageChannelServerTransport,
1222
- it as createSSEClientTransport,
1223
- at as createStreamableHTTPClientTransport,
1224
- Rt as getDisplayName,
1225
- dt as isMcpClient,
1226
- rt as isMcpServer,
1227
- ut as isMessageChannelClientTransport,
1228
- st as isMessageChannelServerTransport,
1229
- lt as isSSEClientTransport,
1230
- De as isStreamableHTTPClientTransport,
1205
+ tt as AuthClientProvider,
1206
+ bt as ResourceTemplate,
1207
+ yt as UriTemplate,
1208
+ at as WebMcpClient,
1209
+ nt as WebMcpServer,
1210
+ Ct as completable,
1211
+ ut as createMessageChannelClientTransport,
1212
+ rt as createMessageChannelPairTransport,
1213
+ st as createMessageChannelServerTransport,
1214
+ ct as createSSEClientTransport,
1215
+ lt as createStreamableHTTPClientTransport,
1216
+ St as getDisplayName,
1217
+ ht as isMcpClient,
1218
+ it as isMcpServer,
1219
+ ft as isMessageChannelClientTransport,
1220
+ ot as isMessageChannelServerTransport,
1221
+ dt as isSSEClientTransport,
1222
+ Ye as isStreamableHTTPClientTransport,
1231
1223
  gt as z
1232
1224
  };