@modelcontextprotocol/inspector-client 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +16 -2
- package/dist/assets/{OAuthCallback-KG5AbO62.js → OAuthCallback-DrQsfqzq.js} +1 -1
- package/dist/assets/{index-Dt6l7sEy.css → index-BxIjx6su.css} +59 -12
- package/dist/assets/{index-BK1TrpAN.js → index-DrNN0pLZ.js} +1382 -866
- package/dist/index.html +2 -2
- package/package.json +13 -4
|
@@ -77,7 +77,7 @@ function A$2(a) {
|
|
|
77
77
|
a = z$3 && a[z$3] || a["@@iterator"];
|
|
78
78
|
return "function" === typeof a ? a : null;
|
|
79
79
|
}
|
|
80
|
-
var B$
|
|
80
|
+
var B$4 = { isMounted: function() {
|
|
81
81
|
return false;
|
|
82
82
|
}, enqueueForceUpdate: function() {
|
|
83
83
|
}, enqueueReplaceState: function() {
|
|
@@ -87,7 +87,7 @@ function E$2(a, b2, e) {
|
|
|
87
87
|
this.props = a;
|
|
88
88
|
this.context = b2;
|
|
89
89
|
this.refs = D$3;
|
|
90
|
-
this.updater = e || B$
|
|
90
|
+
this.updater = e || B$4;
|
|
91
91
|
}
|
|
92
92
|
E$2.prototype.isReactComponent = {};
|
|
93
93
|
E$2.prototype.setState = function(a, b2) {
|
|
@@ -100,20 +100,20 @@ E$2.prototype.forceUpdate = function(a) {
|
|
|
100
100
|
function F() {
|
|
101
101
|
}
|
|
102
102
|
F.prototype = E$2.prototype;
|
|
103
|
-
function G$
|
|
103
|
+
function G$2(a, b2, e) {
|
|
104
104
|
this.props = a;
|
|
105
105
|
this.context = b2;
|
|
106
106
|
this.refs = D$3;
|
|
107
|
-
this.updater = e || B$
|
|
107
|
+
this.updater = e || B$4;
|
|
108
108
|
}
|
|
109
|
-
var H$3 = G$
|
|
110
|
-
H$3.constructor = G$
|
|
109
|
+
var H$3 = G$2.prototype = new F();
|
|
110
|
+
H$3.constructor = G$2;
|
|
111
111
|
C$2(H$3, E$2.prototype);
|
|
112
112
|
H$3.isPureReactComponent = true;
|
|
113
|
-
var I$
|
|
114
|
-
function M$
|
|
113
|
+
var I$2 = Array.isArray, J$1 = Object.prototype.hasOwnProperty, K$3 = { current: null }, L$3 = { key: true, ref: true, __self: true, __source: true };
|
|
114
|
+
function M$2(a, b2, e) {
|
|
115
115
|
var d2, c2 = {}, k2 = null, h2 = null;
|
|
116
|
-
if (null != b2) for (d2 in void 0 !== b2.ref && (h2 = b2.ref), void 0 !== b2.key && (k2 = "" + b2.key), b2) J$1.call(b2, d2) && !L$
|
|
116
|
+
if (null != b2) for (d2 in void 0 !== b2.ref && (h2 = b2.ref), void 0 !== b2.key && (k2 = "" + b2.key), b2) J$1.call(b2, d2) && !L$3.hasOwnProperty(d2) && (c2[d2] = b2[d2]);
|
|
117
117
|
var g2 = arguments.length - 2;
|
|
118
118
|
if (1 === g2) c2.children = e;
|
|
119
119
|
else if (1 < g2) {
|
|
@@ -135,8 +135,8 @@ function escape(a) {
|
|
|
135
135
|
return b2[a2];
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
|
-
var P$
|
|
139
|
-
function Q$
|
|
138
|
+
var P$3 = /\/+/g;
|
|
139
|
+
function Q$2(a, b2) {
|
|
140
140
|
return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b2.toString(36);
|
|
141
141
|
}
|
|
142
142
|
function R$2(a, b2, e, d2, c2) {
|
|
@@ -156,17 +156,17 @@ function R$2(a, b2, e, d2, c2) {
|
|
|
156
156
|
h2 = true;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
if (h2) return h2 = a, c2 = c2(h2), a = "" === d2 ? "." + Q$
|
|
159
|
+
if (h2) return h2 = a, c2 = c2(h2), a = "" === d2 ? "." + Q$2(h2, 0) : d2, I$2(c2) ? (e = "", null != a && (e = a.replace(P$3, "$&/") + "/"), R$2(c2, b2, e, "", function(a2) {
|
|
160
160
|
return a2;
|
|
161
|
-
})) : null != c2 && (O$2(c2) && (c2 = N$3(c2, e + (!c2.key || h2 && h2.key === c2.key ? "" : ("" + c2.key).replace(P$
|
|
161
|
+
})) : null != c2 && (O$2(c2) && (c2 = N$3(c2, e + (!c2.key || h2 && h2.key === c2.key ? "" : ("" + c2.key).replace(P$3, "$&/") + "/") + a)), b2.push(c2)), 1;
|
|
162
162
|
h2 = 0;
|
|
163
163
|
d2 = "" === d2 ? "." : d2 + ":";
|
|
164
|
-
if (I$
|
|
164
|
+
if (I$2(a)) for (var g2 = 0; g2 < a.length; g2++) {
|
|
165
165
|
k2 = a[g2];
|
|
166
|
-
var f2 = d2 + Q$
|
|
166
|
+
var f2 = d2 + Q$2(k2, g2);
|
|
167
167
|
h2 += R$2(k2, b2, e, f2, c2);
|
|
168
168
|
}
|
|
169
|
-
else if (f2 = A$2(a), "function" === typeof f2) for (a = f2.call(a), g2 = 0; !(k2 = a.next()).done; ) k2 = k2.value, f2 = d2 + Q$
|
|
169
|
+
else if (f2 = A$2(a), "function" === typeof f2) for (a = f2.call(a), g2 = 0; !(k2 = a.next()).done; ) k2 = k2.value, f2 = d2 + Q$2(k2, g2++), h2 += R$2(k2, b2, e, f2, c2);
|
|
170
170
|
else if ("object" === k2) throw b2 = String(a), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b2 ? "object with keys {" + Object.keys(a).join(", ") + "}" : b2) + "). If you meant to render a collection of children, use an array instead.");
|
|
171
171
|
return h2;
|
|
172
172
|
}
|
|
@@ -217,7 +217,7 @@ react_production_min.Children = { map: S$2, forEach: function(a, b2, e) {
|
|
|
217
217
|
react_production_min.Component = E$2;
|
|
218
218
|
react_production_min.Fragment = p$4;
|
|
219
219
|
react_production_min.Profiler = r$1;
|
|
220
|
-
react_production_min.PureComponent = G$
|
|
220
|
+
react_production_min.PureComponent = G$2;
|
|
221
221
|
react_production_min.StrictMode = q$2;
|
|
222
222
|
react_production_min.Suspense = w$1;
|
|
223
223
|
react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W$2;
|
|
@@ -229,7 +229,7 @@ react_production_min.cloneElement = function(a, b2, e) {
|
|
|
229
229
|
void 0 !== b2.ref && (k2 = b2.ref, h2 = K$3.current);
|
|
230
230
|
void 0 !== b2.key && (c2 = "" + b2.key);
|
|
231
231
|
if (a.type && a.type.defaultProps) var g2 = a.type.defaultProps;
|
|
232
|
-
for (f2 in b2) J$1.call(b2, f2) && !L$
|
|
232
|
+
for (f2 in b2) J$1.call(b2, f2) && !L$3.hasOwnProperty(f2) && (d2[f2] = void 0 === b2[f2] && void 0 !== g2 ? g2[f2] : b2[f2]);
|
|
233
233
|
}
|
|
234
234
|
var f2 = arguments.length - 2;
|
|
235
235
|
if (1 === f2) d2.children = e;
|
|
@@ -245,9 +245,9 @@ react_production_min.createContext = function(a) {
|
|
|
245
245
|
a.Provider = { $$typeof: t, _context: a };
|
|
246
246
|
return a.Consumer = a;
|
|
247
247
|
};
|
|
248
|
-
react_production_min.createElement = M$
|
|
248
|
+
react_production_min.createElement = M$2;
|
|
249
249
|
react_production_min.createFactory = function(a) {
|
|
250
|
-
var b2 = M$
|
|
250
|
+
var b2 = M$2.bind(null, a);
|
|
251
251
|
b2.type = a;
|
|
252
252
|
return b2;
|
|
253
253
|
};
|
|
@@ -323,10 +323,10 @@ react_production_min.version = "18.3.1";
|
|
|
323
323
|
react.exports = react_production_min;
|
|
324
324
|
}
|
|
325
325
|
var reactExports = react.exports;
|
|
326
|
-
const React$
|
|
327
|
-
const React$
|
|
326
|
+
const React$1 = /* @__PURE__ */ getDefaultExportFromCjs(reactExports);
|
|
327
|
+
const React$2 = /* @__PURE__ */ _mergeNamespaces({
|
|
328
328
|
__proto__: null,
|
|
329
|
-
default: React$
|
|
329
|
+
default: React$1
|
|
330
330
|
}, [reactExports]);
|
|
331
331
|
/**
|
|
332
332
|
* @license React
|
|
@@ -1406,7 +1406,7 @@ function $b(a) {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
return null;
|
|
1408
1408
|
}
|
|
1409
|
-
var ac = ca.unstable_scheduleCallback, bc = ca.unstable_cancelCallback, cc = ca.unstable_shouldYield, dc = ca.unstable_requestPaint, B$
|
|
1409
|
+
var ac = ca.unstable_scheduleCallback, bc = ca.unstable_cancelCallback, cc = ca.unstable_shouldYield, dc = ca.unstable_requestPaint, B$3 = ca.unstable_now, ec = ca.unstable_getCurrentPriorityLevel, fc = ca.unstable_ImmediatePriority, gc = ca.unstable_UserBlockingPriority, hc = ca.unstable_NormalPriority, ic = ca.unstable_LowPriority, jc = ca.unstable_IdlePriority, kc = null, lc = null;
|
|
1410
1410
|
function mc(a) {
|
|
1411
1411
|
if (lc && "function" === typeof lc.onCommitFiberRoot) try {
|
|
1412
1412
|
lc.onCommitFiberRoot(kc, a, void 0, 128 === (a.current.flags & 128));
|
|
@@ -1986,7 +1986,7 @@ var Qd = A$1({}, ud, { key: function(a) {
|
|
|
1986
1986
|
deltaMode: 0
|
|
1987
1987
|
}), Zd = rd(Yd), $d = [9, 13, 27, 32], ae = ia && "CompositionEvent" in window, be$1 = null;
|
|
1988
1988
|
ia && "documentMode" in document && (be$1 = document.documentMode);
|
|
1989
|
-
var ce = ia && "TextEvent" in window && !be$1, de$1 = ia && (!ae || be$1 && 8 < be$1 && 11 >= be$1), ee$1 = String.fromCharCode(32), fe$1 = false;
|
|
1989
|
+
var ce$1 = ia && "TextEvent" in window && !be$1, de$1 = ia && (!ae || be$1 && 8 < be$1 && 11 >= be$1), ee$1 = String.fromCharCode(32), fe$1 = false;
|
|
1990
1990
|
function ge(a, b2) {
|
|
1991
1991
|
switch (a) {
|
|
1992
1992
|
case "keyup":
|
|
@@ -2135,8 +2135,8 @@ function Ke(a, b2) {
|
|
|
2135
2135
|
c2 = Je(c2);
|
|
2136
2136
|
}
|
|
2137
2137
|
}
|
|
2138
|
-
function Le
|
|
2139
|
-
return a && b2 ? a === b2 ? true : a && 3 === a.nodeType ? false : b2 && 3 === b2.nodeType ? Le
|
|
2138
|
+
function Le(a, b2) {
|
|
2139
|
+
return a && b2 ? a === b2 ? true : a && 3 === a.nodeType ? false : b2 && 3 === b2.nodeType ? Le(a, b2.parentNode) : "contains" in a ? a.contains(b2) : a.compareDocumentPosition ? !!(a.compareDocumentPosition(b2) & 16) : false : false;
|
|
2140
2140
|
}
|
|
2141
2141
|
function Me$1() {
|
|
2142
2142
|
for (var a = window, b2 = Xa(); b2 instanceof a.HTMLIFrameElement; ) {
|
|
@@ -2157,7 +2157,7 @@ function Ne(a) {
|
|
|
2157
2157
|
}
|
|
2158
2158
|
function Oe(a) {
|
|
2159
2159
|
var b2 = Me$1(), c2 = a.focusedElem, d2 = a.selectionRange;
|
|
2160
|
-
if (b2 !== c2 && c2 && c2.ownerDocument && Le
|
|
2160
|
+
if (b2 !== c2 && c2 && c2.ownerDocument && Le(c2.ownerDocument.documentElement, c2)) {
|
|
2161
2161
|
if (null !== d2 && Ne(c2)) {
|
|
2162
2162
|
if (b2 = d2.start, a = d2.end, void 0 === a && (a = b2), "selectionStart" in c2) c2.selectionStart = b2, c2.selectionEnd = Math.min(a, c2.value.length);
|
|
2163
2163
|
else if (a = (b2 = c2.ownerDocument || document) && b2.defaultView || window, a.getSelection) {
|
|
@@ -2179,19 +2179,19 @@ function Oe(a) {
|
|
|
2179
2179
|
for (c2 = 0; c2 < b2.length; c2++) a = b2[c2], a.element.scrollLeft = a.left, a.element.scrollTop = a.top;
|
|
2180
2180
|
}
|
|
2181
2181
|
}
|
|
2182
|
-
var Pe$1 = ia && "documentMode" in document && 11 >= document.documentMode, Qe = null, Re = null, Se$1 = null, Te$1 = false;
|
|
2182
|
+
var Pe$1 = ia && "documentMode" in document && 11 >= document.documentMode, Qe = null, Re$1 = null, Se$1 = null, Te$1 = false;
|
|
2183
2183
|
function Ue(a, b2, c2) {
|
|
2184
2184
|
var d2 = c2.window === c2 ? c2.document : 9 === c2.nodeType ? c2 : c2.ownerDocument;
|
|
2185
|
-
Te$1 || null == Qe || Qe !== Xa(d2) || (d2 = Qe, "selectionStart" in d2 && Ne(d2) ? d2 = { start: d2.selectionStart, end: d2.selectionEnd } : (d2 = (d2.ownerDocument && d2.ownerDocument.defaultView || window).getSelection(), d2 = { anchorNode: d2.anchorNode, anchorOffset: d2.anchorOffset, focusNode: d2.focusNode, focusOffset: d2.focusOffset }), Se$1 && Ie$1(Se$1, d2) || (Se$1 = d2, d2 = oe(Re, "onSelect"), 0 < d2.length && (b2 = new td("onSelect", "select", null, b2, c2), a.push({ event: b2, listeners: d2 }), b2.target = Qe)));
|
|
2185
|
+
Te$1 || null == Qe || Qe !== Xa(d2) || (d2 = Qe, "selectionStart" in d2 && Ne(d2) ? d2 = { start: d2.selectionStart, end: d2.selectionEnd } : (d2 = (d2.ownerDocument && d2.ownerDocument.defaultView || window).getSelection(), d2 = { anchorNode: d2.anchorNode, anchorOffset: d2.anchorOffset, focusNode: d2.focusNode, focusOffset: d2.focusOffset }), Se$1 && Ie$1(Se$1, d2) || (Se$1 = d2, d2 = oe(Re$1, "onSelect"), 0 < d2.length && (b2 = new td("onSelect", "select", null, b2, c2), a.push({ event: b2, listeners: d2 }), b2.target = Qe)));
|
|
2186
2186
|
}
|
|
2187
|
-
function Ve
|
|
2187
|
+
function Ve(a, b2) {
|
|
2188
2188
|
var c2 = {};
|
|
2189
2189
|
c2[a.toLowerCase()] = b2.toLowerCase();
|
|
2190
2190
|
c2["Webkit" + a] = "webkit" + b2;
|
|
2191
2191
|
c2["Moz" + a] = "moz" + b2;
|
|
2192
2192
|
return c2;
|
|
2193
2193
|
}
|
|
2194
|
-
var We = { animationend: Ve
|
|
2194
|
+
var We = { animationend: Ve("Animation", "AnimationEnd"), animationiteration: Ve("Animation", "AnimationIteration"), animationstart: Ve("Animation", "AnimationStart"), transitionend: Ve("Transition", "TransitionEnd") }, Xe = {}, Ye = {};
|
|
2195
2195
|
ia && (Ye = document.createElement("div").style, "AnimationEvent" in window || (delete We.animationend.animation, delete We.animationiteration.animation, delete We.animationstart.animation), "TransitionEvent" in window || delete We.transitionend.transition);
|
|
2196
2196
|
function Ze(a) {
|
|
2197
2197
|
if (Xe[a]) return Xe[a];
|
|
@@ -2486,10 +2486,10 @@ function hd(a, b2, c2, d2, e) {
|
|
|
2486
2486
|
xa = d3 ? ue$1(d3) : window;
|
|
2487
2487
|
switch (a) {
|
|
2488
2488
|
case "focusin":
|
|
2489
|
-
if (me$1(xa) || "true" === xa.contentEditable) Qe = xa, Re = d3, Se$1 = null;
|
|
2489
|
+
if (me$1(xa) || "true" === xa.contentEditable) Qe = xa, Re$1 = d3, Se$1 = null;
|
|
2490
2490
|
break;
|
|
2491
2491
|
case "focusout":
|
|
2492
|
-
Se$1 = Re = Qe = null;
|
|
2492
|
+
Se$1 = Re$1 = Qe = null;
|
|
2493
2493
|
break;
|
|
2494
2494
|
case "mousedown":
|
|
2495
2495
|
Te$1 = true;
|
|
@@ -2523,7 +2523,7 @@ function hd(a, b2, c2, d2, e) {
|
|
|
2523
2523
|
}
|
|
2524
2524
|
else ie ? ge(a, c2) && (ba = "onCompositionEnd") : "keydown" === a && 229 === c2.keyCode && (ba = "onCompositionStart");
|
|
2525
2525
|
ba && (de$1 && "ko" !== c2.locale && (ie || "onCompositionStart" !== ba ? "onCompositionEnd" === ba && ie && ($a = nd()) : (kd = e2, ld = "value" in kd ? kd.value : kd.textContent, ie = true)), xa = oe(d3, ba), 0 < xa.length && (ba = new Ld(ba, a, null, c2, e2), g3.push({ event: ba, listeners: xa }), $a ? ba.data = $a : ($a = he$1(c2), null !== $a && (ba.data = $a))));
|
|
2526
|
-
if ($a = ce ? je(a, c2) : ke$1(a, c2)) d3 = oe(d3, "onBeforeInput"), 0 < d3.length && (e2 = new Ld("onBeforeInput", "beforeinput", null, c2, e2), g3.push({ event: e2, listeners: d3 }), e2.data = $a);
|
|
2526
|
+
if ($a = ce$1 ? je(a, c2) : ke$1(a, c2)) d3 = oe(d3, "onBeforeInput"), 0 < d3.length && (e2 = new Ld("onBeforeInput", "beforeinput", null, c2, e2), g3.push({ event: e2, listeners: d3 }), e2.data = $a);
|
|
2527
2527
|
}
|
|
2528
2528
|
se(g3, b2);
|
|
2529
2529
|
});
|
|
@@ -2656,7 +2656,7 @@ function Uf(a) {
|
|
|
2656
2656
|
function E$1(a) {
|
|
2657
2657
|
0 > Tf || (a.current = Sf[Tf], Sf[Tf] = null, Tf--);
|
|
2658
2658
|
}
|
|
2659
|
-
function G$
|
|
2659
|
+
function G$1(a, b2) {
|
|
2660
2660
|
Tf++;
|
|
2661
2661
|
Sf[Tf] = a.current;
|
|
2662
2662
|
a.current = b2;
|
|
@@ -2682,8 +2682,8 @@ function $f() {
|
|
|
2682
2682
|
}
|
|
2683
2683
|
function ag(a, b2, c2) {
|
|
2684
2684
|
if (H$2.current !== Vf) throw Error(p$2(168));
|
|
2685
|
-
G$
|
|
2686
|
-
G$
|
|
2685
|
+
G$1(H$2, b2);
|
|
2686
|
+
G$1(Wf, c2);
|
|
2687
2687
|
}
|
|
2688
2688
|
function bg(a, b2, c2) {
|
|
2689
2689
|
var d2 = a.stateNode;
|
|
@@ -2696,15 +2696,15 @@ function bg(a, b2, c2) {
|
|
|
2696
2696
|
function cg(a) {
|
|
2697
2697
|
a = (a = a.stateNode) && a.__reactInternalMemoizedMergedChildContext || Vf;
|
|
2698
2698
|
Xf = H$2.current;
|
|
2699
|
-
G$
|
|
2700
|
-
G$
|
|
2699
|
+
G$1(H$2, a);
|
|
2700
|
+
G$1(Wf, Wf.current);
|
|
2701
2701
|
return true;
|
|
2702
2702
|
}
|
|
2703
2703
|
function dg(a, b2, c2) {
|
|
2704
2704
|
var d2 = a.stateNode;
|
|
2705
2705
|
if (!d2) throw Error(p$2(169));
|
|
2706
|
-
c2 ? (a = bg(a, b2, Xf), d2.__reactInternalMemoizedMergedChildContext = a, E$1(Wf), E$1(H$2), G$
|
|
2707
|
-
G$
|
|
2706
|
+
c2 ? (a = bg(a, b2, Xf), d2.__reactInternalMemoizedMergedChildContext = a, E$1(Wf), E$1(H$2), G$1(H$2, a)) : E$1(Wf);
|
|
2707
|
+
G$1(Wf, c2);
|
|
2708
2708
|
}
|
|
2709
2709
|
var eg = null, fg = false, gg = false;
|
|
2710
2710
|
function hg(a) {
|
|
@@ -2770,7 +2770,7 @@ function wg(a) {
|
|
|
2770
2770
|
for (; a === mg; ) mg = kg[--lg], kg[lg] = null, ng = kg[--lg], kg[lg] = null;
|
|
2771
2771
|
for (; a === qg; ) qg = og[--pg], og[pg] = null, sg = og[--pg], og[pg] = null, rg = og[--pg], og[pg] = null;
|
|
2772
2772
|
}
|
|
2773
|
-
var xg = null, yg = null, I$
|
|
2773
|
+
var xg = null, yg = null, I$1 = false, zg = null;
|
|
2774
2774
|
function Ag(a, b2) {
|
|
2775
2775
|
var c2 = Bg(5, null, null, 0);
|
|
2776
2776
|
c2.elementType = "DELETED";
|
|
@@ -2797,7 +2797,7 @@ function Dg(a) {
|
|
|
2797
2797
|
return 0 !== (a.mode & 1) && 0 === (a.flags & 128);
|
|
2798
2798
|
}
|
|
2799
2799
|
function Eg(a) {
|
|
2800
|
-
if (I$
|
|
2800
|
+
if (I$1) {
|
|
2801
2801
|
var b2 = yg;
|
|
2802
2802
|
if (b2) {
|
|
2803
2803
|
var c2 = b2;
|
|
@@ -2805,12 +2805,12 @@ function Eg(a) {
|
|
|
2805
2805
|
if (Dg(a)) throw Error(p$2(418));
|
|
2806
2806
|
b2 = Lf(c2.nextSibling);
|
|
2807
2807
|
var d2 = xg;
|
|
2808
|
-
b2 && Cg(a, b2) ? Ag(d2, c2) : (a.flags = a.flags & -4097 | 2, I$
|
|
2808
|
+
b2 && Cg(a, b2) ? Ag(d2, c2) : (a.flags = a.flags & -4097 | 2, I$1 = false, xg = a);
|
|
2809
2809
|
}
|
|
2810
2810
|
} else {
|
|
2811
2811
|
if (Dg(a)) throw Error(p$2(418));
|
|
2812
2812
|
a.flags = a.flags & -4097 | 2;
|
|
2813
|
-
I$
|
|
2813
|
+
I$1 = false;
|
|
2814
2814
|
xg = a;
|
|
2815
2815
|
}
|
|
2816
2816
|
}
|
|
@@ -2821,7 +2821,7 @@ function Fg(a) {
|
|
|
2821
2821
|
}
|
|
2822
2822
|
function Gg(a) {
|
|
2823
2823
|
if (a !== xg) return false;
|
|
2824
|
-
if (!I$
|
|
2824
|
+
if (!I$1) return Fg(a), I$1 = true, false;
|
|
2825
2825
|
var b2;
|
|
2826
2826
|
(b2 = 3 !== a.tag) && !(b2 = 5 !== a.tag) && (b2 = a.type, b2 = "head" !== b2 && "body" !== b2 && !Ef(a.type, a.memoizedProps));
|
|
2827
2827
|
if (b2 && (b2 = yg)) {
|
|
@@ -2858,7 +2858,7 @@ function Hg() {
|
|
|
2858
2858
|
}
|
|
2859
2859
|
function Ig() {
|
|
2860
2860
|
yg = xg = null;
|
|
2861
|
-
I$
|
|
2861
|
+
I$1 = false;
|
|
2862
2862
|
}
|
|
2863
2863
|
function Jg(a) {
|
|
2864
2864
|
null === zg ? zg = [a] : zg.push(a);
|
|
@@ -3027,17 +3027,17 @@ function Og(a) {
|
|
|
3027
3027
|
m3 = n3;
|
|
3028
3028
|
u2 = x2;
|
|
3029
3029
|
}
|
|
3030
|
-
if (w2 === h3.length) return c2(e2, u2), I$
|
|
3030
|
+
if (w2 === h3.length) return c2(e2, u2), I$1 && tg(e2, w2), l3;
|
|
3031
3031
|
if (null === u2) {
|
|
3032
3032
|
for (; w2 < h3.length; w2++) u2 = q2(e2, h3[w2], k3), null !== u2 && (g3 = f2(u2, g3, w2), null === m3 ? l3 = u2 : m3.sibling = u2, m3 = u2);
|
|
3033
|
-
I$
|
|
3033
|
+
I$1 && tg(e2, w2);
|
|
3034
3034
|
return l3;
|
|
3035
3035
|
}
|
|
3036
3036
|
for (u2 = d2(e2, u2); w2 < h3.length; w2++) x2 = y2(u2, e2, w2, h3[w2], k3), null !== x2 && (a && null !== x2.alternate && u2.delete(null === x2.key ? w2 : x2.key), g3 = f2(x2, g3, w2), null === m3 ? l3 = x2 : m3.sibling = x2, m3 = x2);
|
|
3037
3037
|
a && u2.forEach(function(a2) {
|
|
3038
3038
|
return b2(e2, a2);
|
|
3039
3039
|
});
|
|
3040
|
-
I$
|
|
3040
|
+
I$1 && tg(e2, w2);
|
|
3041
3041
|
return l3;
|
|
3042
3042
|
}
|
|
3043
3043
|
function t2(e2, g3, h3, k3) {
|
|
@@ -3061,17 +3061,17 @@ function Og(a) {
|
|
|
3061
3061
|
if (n3.done) return c2(
|
|
3062
3062
|
e2,
|
|
3063
3063
|
m3
|
|
3064
|
-
), I$
|
|
3064
|
+
), I$1 && tg(e2, w2), l3;
|
|
3065
3065
|
if (null === m3) {
|
|
3066
3066
|
for (; !n3.done; w2++, n3 = h3.next()) n3 = q2(e2, n3.value, k3), null !== n3 && (g3 = f2(n3, g3, w2), null === u2 ? l3 = n3 : u2.sibling = n3, u2 = n3);
|
|
3067
|
-
I$
|
|
3067
|
+
I$1 && tg(e2, w2);
|
|
3068
3068
|
return l3;
|
|
3069
3069
|
}
|
|
3070
3070
|
for (m3 = d2(e2, m3); !n3.done; w2++, n3 = h3.next()) n3 = y2(m3, e2, w2, n3.value, k3), null !== n3 && (a && null !== n3.alternate && m3.delete(null === n3.key ? w2 : n3.key), g3 = f2(n3, g3, w2), null === u2 ? l3 = n3 : u2.sibling = n3, u2 = n3);
|
|
3071
3071
|
a && m3.forEach(function(a2) {
|
|
3072
3072
|
return b2(e2, a2);
|
|
3073
3073
|
});
|
|
3074
|
-
I$
|
|
3074
|
+
I$1 && tg(e2, w2);
|
|
3075
3075
|
return l3;
|
|
3076
3076
|
}
|
|
3077
3077
|
function J2(a2, d3, f3, h3) {
|
|
@@ -3341,9 +3341,9 @@ function xh(a) {
|
|
|
3341
3341
|
return a;
|
|
3342
3342
|
}
|
|
3343
3343
|
function yh(a, b2) {
|
|
3344
|
-
G$
|
|
3345
|
-
G$
|
|
3346
|
-
G$
|
|
3344
|
+
G$1(wh, b2);
|
|
3345
|
+
G$1(vh, a);
|
|
3346
|
+
G$1(uh, th);
|
|
3347
3347
|
a = b2.nodeType;
|
|
3348
3348
|
switch (a) {
|
|
3349
3349
|
case 9:
|
|
@@ -3354,7 +3354,7 @@ function yh(a, b2) {
|
|
|
3354
3354
|
a = 8 === a ? b2.parentNode : b2, b2 = a.namespaceURI || null, a = a.tagName, b2 = lb(b2, a);
|
|
3355
3355
|
}
|
|
3356
3356
|
E$1(uh);
|
|
3357
|
-
G$
|
|
3357
|
+
G$1(uh, b2);
|
|
3358
3358
|
}
|
|
3359
3359
|
function zh() {
|
|
3360
3360
|
E$1(uh);
|
|
@@ -3365,12 +3365,12 @@ function Ah(a) {
|
|
|
3365
3365
|
xh(wh.current);
|
|
3366
3366
|
var b2 = xh(uh.current);
|
|
3367
3367
|
var c2 = lb(b2, a.type);
|
|
3368
|
-
b2 !== c2 && (G$
|
|
3368
|
+
b2 !== c2 && (G$1(vh, a), G$1(uh, c2));
|
|
3369
3369
|
}
|
|
3370
3370
|
function Bh(a) {
|
|
3371
3371
|
vh.current === a && (E$1(uh), E$1(vh));
|
|
3372
3372
|
}
|
|
3373
|
-
var L$
|
|
3373
|
+
var L$2 = Uf(0);
|
|
3374
3374
|
function Ch(a) {
|
|
3375
3375
|
for (var b2 = a; null !== b2; ) {
|
|
3376
3376
|
if (13 === b2.tag) {
|
|
@@ -3398,8 +3398,8 @@ function Eh() {
|
|
|
3398
3398
|
for (var a = 0; a < Dh.length; a++) Dh[a]._workInProgressVersionPrimary = null;
|
|
3399
3399
|
Dh.length = 0;
|
|
3400
3400
|
}
|
|
3401
|
-
var Fh = ua.ReactCurrentDispatcher, Gh = ua.ReactCurrentBatchConfig, Hh = 0, M$
|
|
3402
|
-
function P$
|
|
3401
|
+
var Fh = ua.ReactCurrentDispatcher, Gh = ua.ReactCurrentBatchConfig, Hh = 0, M$1 = null, N$2 = null, O$1 = null, Ih = false, Jh = false, Kh = 0, Lh = 0;
|
|
3402
|
+
function P$2() {
|
|
3403
3403
|
throw Error(p$2(321));
|
|
3404
3404
|
}
|
|
3405
3405
|
function Mh(a, b2) {
|
|
@@ -3409,7 +3409,7 @@ function Mh(a, b2) {
|
|
|
3409
3409
|
}
|
|
3410
3410
|
function Nh(a, b2, c2, d2, e, f2) {
|
|
3411
3411
|
Hh = f2;
|
|
3412
|
-
M$
|
|
3412
|
+
M$1 = b2;
|
|
3413
3413
|
b2.memoizedState = null;
|
|
3414
3414
|
b2.updateQueue = null;
|
|
3415
3415
|
b2.lanes = 0;
|
|
@@ -3431,7 +3431,7 @@ function Nh(a, b2, c2, d2, e, f2) {
|
|
|
3431
3431
|
Fh.current = Rh;
|
|
3432
3432
|
b2 = null !== N$2 && null !== N$2.next;
|
|
3433
3433
|
Hh = 0;
|
|
3434
|
-
O$1 = N$2 = M$
|
|
3434
|
+
O$1 = N$2 = M$1 = null;
|
|
3435
3435
|
Ih = false;
|
|
3436
3436
|
if (b2) throw Error(p$2(300));
|
|
3437
3437
|
return a;
|
|
@@ -3443,21 +3443,21 @@ function Sh() {
|
|
|
3443
3443
|
}
|
|
3444
3444
|
function Th() {
|
|
3445
3445
|
var a = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null };
|
|
3446
|
-
null === O$1 ? M$
|
|
3446
|
+
null === O$1 ? M$1.memoizedState = O$1 = a : O$1 = O$1.next = a;
|
|
3447
3447
|
return O$1;
|
|
3448
3448
|
}
|
|
3449
3449
|
function Uh() {
|
|
3450
3450
|
if (null === N$2) {
|
|
3451
|
-
var a = M$
|
|
3451
|
+
var a = M$1.alternate;
|
|
3452
3452
|
a = null !== a ? a.memoizedState : null;
|
|
3453
3453
|
} else a = N$2.next;
|
|
3454
|
-
var b2 = null === O$1 ? M$
|
|
3454
|
+
var b2 = null === O$1 ? M$1.memoizedState : O$1.next;
|
|
3455
3455
|
if (null !== b2) O$1 = b2, N$2 = a;
|
|
3456
3456
|
else {
|
|
3457
3457
|
if (null === a) throw Error(p$2(310));
|
|
3458
3458
|
N$2 = a;
|
|
3459
3459
|
a = { memoizedState: N$2.memoizedState, baseState: N$2.baseState, baseQueue: N$2.baseQueue, queue: N$2.queue, next: null };
|
|
3460
|
-
null === O$1 ? M$
|
|
3460
|
+
null === O$1 ? M$1.memoizedState = O$1 = a : O$1 = O$1.next = a;
|
|
3461
3461
|
}
|
|
3462
3462
|
return O$1;
|
|
3463
3463
|
}
|
|
@@ -3494,7 +3494,7 @@ function Wh(a) {
|
|
|
3494
3494
|
next: null
|
|
3495
3495
|
};
|
|
3496
3496
|
null === k2 ? (h2 = k2 = q2, g2 = d2) : k2 = k2.next = q2;
|
|
3497
|
-
M$
|
|
3497
|
+
M$1.lanes |= m2;
|
|
3498
3498
|
rh |= m2;
|
|
3499
3499
|
}
|
|
3500
3500
|
l2 = l2.next;
|
|
@@ -3510,7 +3510,7 @@ function Wh(a) {
|
|
|
3510
3510
|
if (null !== a) {
|
|
3511
3511
|
e = a;
|
|
3512
3512
|
do
|
|
3513
|
-
f2 = e.lane, M$
|
|
3513
|
+
f2 = e.lane, M$1.lanes |= f2, rh |= f2, e = e.next;
|
|
3514
3514
|
while (e !== a);
|
|
3515
3515
|
} else null === e && (c2.lanes = 0);
|
|
3516
3516
|
return [b2.memoizedState, c2.dispatch];
|
|
@@ -3536,14 +3536,14 @@ function Xh(a) {
|
|
|
3536
3536
|
function Yh() {
|
|
3537
3537
|
}
|
|
3538
3538
|
function Zh(a, b2) {
|
|
3539
|
-
var c2 = M$
|
|
3539
|
+
var c2 = M$1, d2 = Uh(), e = b2(), f2 = !He(d2.memoizedState, e);
|
|
3540
3540
|
f2 && (d2.memoizedState = e, dh = true);
|
|
3541
3541
|
d2 = d2.queue;
|
|
3542
3542
|
$h(ai.bind(null, c2, d2, a), [a]);
|
|
3543
3543
|
if (d2.getSnapshot !== b2 || f2 || null !== O$1 && O$1.memoizedState.tag & 1) {
|
|
3544
3544
|
c2.flags |= 2048;
|
|
3545
3545
|
bi(9, ci.bind(null, c2, d2, e, b2), void 0, null);
|
|
3546
|
-
if (null === Q$
|
|
3546
|
+
if (null === Q$1) throw Error(p$2(349));
|
|
3547
3547
|
0 !== (Hh & 30) || di(c2, b2, e);
|
|
3548
3548
|
}
|
|
3549
3549
|
return e;
|
|
@@ -3551,8 +3551,8 @@ function Zh(a, b2) {
|
|
|
3551
3551
|
function di(a, b2, c2) {
|
|
3552
3552
|
a.flags |= 16384;
|
|
3553
3553
|
a = { getSnapshot: b2, value: c2 };
|
|
3554
|
-
b2 = M$
|
|
3555
|
-
null === b2 ? (b2 = { lastEffect: null, stores: null }, M$
|
|
3554
|
+
b2 = M$1.updateQueue;
|
|
3555
|
+
null === b2 ? (b2 = { lastEffect: null, stores: null }, M$1.updateQueue = b2, b2.stores = [a]) : (c2 = b2.stores, null === c2 ? b2.stores = [a] : c2.push(a));
|
|
3556
3556
|
}
|
|
3557
3557
|
function ci(a, b2, c2, d2) {
|
|
3558
3558
|
b2.value = c2;
|
|
@@ -3584,13 +3584,13 @@ function hi(a) {
|
|
|
3584
3584
|
b2.memoizedState = b2.baseState = a;
|
|
3585
3585
|
a = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: Vh, lastRenderedState: a };
|
|
3586
3586
|
b2.queue = a;
|
|
3587
|
-
a = a.dispatch = ii.bind(null, M$
|
|
3587
|
+
a = a.dispatch = ii.bind(null, M$1, a);
|
|
3588
3588
|
return [b2.memoizedState, a];
|
|
3589
3589
|
}
|
|
3590
3590
|
function bi(a, b2, c2, d2) {
|
|
3591
3591
|
a = { tag: a, create: b2, destroy: c2, deps: d2, next: null };
|
|
3592
|
-
b2 = M$
|
|
3593
|
-
null === b2 ? (b2 = { lastEffect: null, stores: null }, M$
|
|
3592
|
+
b2 = M$1.updateQueue;
|
|
3593
|
+
null === b2 ? (b2 = { lastEffect: null, stores: null }, M$1.updateQueue = b2, b2.lastEffect = a.next = a) : (c2 = b2.lastEffect, null === c2 ? b2.lastEffect = a.next = a : (d2 = c2.next, c2.next = a, a.next = d2, b2.lastEffect = a));
|
|
3594
3594
|
return a;
|
|
3595
3595
|
}
|
|
3596
3596
|
function ji() {
|
|
@@ -3598,7 +3598,7 @@ function ji() {
|
|
|
3598
3598
|
}
|
|
3599
3599
|
function ki(a, b2, c2, d2) {
|
|
3600
3600
|
var e = Th();
|
|
3601
|
-
M$
|
|
3601
|
+
M$1.flags |= a;
|
|
3602
3602
|
e.memoizedState = bi(1 | b2, c2, void 0, void 0 === d2 ? null : d2);
|
|
3603
3603
|
}
|
|
3604
3604
|
function li(a, b2, c2, d2) {
|
|
@@ -3613,7 +3613,7 @@ function li(a, b2, c2, d2) {
|
|
|
3613
3613
|
return;
|
|
3614
3614
|
}
|
|
3615
3615
|
}
|
|
3616
|
-
M$
|
|
3616
|
+
M$1.flags |= a;
|
|
3617
3617
|
e.memoizedState = bi(1 | b2, c2, f2, d2);
|
|
3618
3618
|
}
|
|
3619
3619
|
function mi(a, b2) {
|
|
@@ -3661,7 +3661,7 @@ function ti(a, b2) {
|
|
|
3661
3661
|
}
|
|
3662
3662
|
function ui(a, b2, c2) {
|
|
3663
3663
|
if (0 === (Hh & 21)) return a.baseState && (a.baseState = false, dh = true), a.memoizedState = c2;
|
|
3664
|
-
He(c2, b2) || (c2 = yc(), M$
|
|
3664
|
+
He(c2, b2) || (c2 = yc(), M$1.lanes |= c2, rh |= c2, a.baseState = true);
|
|
3665
3665
|
return b2;
|
|
3666
3666
|
}
|
|
3667
3667
|
function vi(a, b2) {
|
|
@@ -3713,7 +3713,7 @@ function ii(a, b2, c2) {
|
|
|
3713
3713
|
}
|
|
3714
3714
|
function zi(a) {
|
|
3715
3715
|
var b2 = a.alternate;
|
|
3716
|
-
return a === M$
|
|
3716
|
+
return a === M$1 || null !== b2 && b2 === M$1;
|
|
3717
3717
|
}
|
|
3718
3718
|
function Ai(a, b2) {
|
|
3719
3719
|
Jh = Ih = true;
|
|
@@ -3730,7 +3730,7 @@ function Bi(a, b2, c2) {
|
|
|
3730
3730
|
Cc(a, c2);
|
|
3731
3731
|
}
|
|
3732
3732
|
}
|
|
3733
|
-
var Rh = { readContext: eh, useCallback: P$
|
|
3733
|
+
var Rh = { readContext: eh, useCallback: P$2, useContext: P$2, useEffect: P$2, useImperativeHandle: P$2, useInsertionEffect: P$2, useLayoutEffect: P$2, useMemo: P$2, useReducer: P$2, useRef: P$2, useState: P$2, useDebugValue: P$2, useDeferredValue: P$2, useTransition: P$2, useMutableSource: P$2, useSyncExternalStore: P$2, useId: P$2, unstable_isNewReconciler: false }, Oh = { readContext: eh, useCallback: function(a, b2) {
|
|
3734
3734
|
Th().memoizedState = [a, void 0 === b2 ? null : b2];
|
|
3735
3735
|
return a;
|
|
3736
3736
|
}, useContext: eh, useEffect: mi, useImperativeHandle: function(a, b2, c2) {
|
|
@@ -3757,7 +3757,7 @@ var Rh = { readContext: eh, useCallback: P$1, useContext: P$1, useEffect: P$1, u
|
|
|
3757
3757
|
d2.memoizedState = d2.baseState = b2;
|
|
3758
3758
|
a = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: a, lastRenderedState: b2 };
|
|
3759
3759
|
d2.queue = a;
|
|
3760
|
-
a = a.dispatch = xi.bind(null, M$
|
|
3760
|
+
a = a.dispatch = xi.bind(null, M$1, a);
|
|
3761
3761
|
return [d2.memoizedState, a];
|
|
3762
3762
|
}, useRef: function(a) {
|
|
3763
3763
|
var b2 = Th();
|
|
@@ -3772,13 +3772,13 @@ var Rh = { readContext: eh, useCallback: P$1, useContext: P$1, useEffect: P$1, u
|
|
|
3772
3772
|
return [b2, a];
|
|
3773
3773
|
}, useMutableSource: function() {
|
|
3774
3774
|
}, useSyncExternalStore: function(a, b2, c2) {
|
|
3775
|
-
var d2 = M$
|
|
3776
|
-
if (I$
|
|
3775
|
+
var d2 = M$1, e = Th();
|
|
3776
|
+
if (I$1) {
|
|
3777
3777
|
if (void 0 === c2) throw Error(p$2(407));
|
|
3778
3778
|
c2 = c2();
|
|
3779
3779
|
} else {
|
|
3780
3780
|
c2 = b2();
|
|
3781
|
-
if (null === Q$
|
|
3781
|
+
if (null === Q$1) throw Error(p$2(349));
|
|
3782
3782
|
0 !== (Hh & 30) || di(d2, b2, c2);
|
|
3783
3783
|
}
|
|
3784
3784
|
e.memoizedState = c2;
|
|
@@ -3794,8 +3794,8 @@ var Rh = { readContext: eh, useCallback: P$1, useContext: P$1, useEffect: P$1, u
|
|
|
3794
3794
|
bi(9, ci.bind(null, d2, f2, c2, b2), void 0, null);
|
|
3795
3795
|
return c2;
|
|
3796
3796
|
}, useId: function() {
|
|
3797
|
-
var a = Th(), b2 = Q$
|
|
3798
|
-
if (I$
|
|
3797
|
+
var a = Th(), b2 = Q$1.identifierPrefix;
|
|
3798
|
+
if (I$1) {
|
|
3799
3799
|
var c2 = sg;
|
|
3800
3800
|
var d2 = rg;
|
|
3801
3801
|
c2 = (d2 & ~(1 << 32 - oc(d2) - 1)).toString(32) + c2;
|
|
@@ -4011,7 +4011,7 @@ function Yi(a, b2, c2, d2, e) {
|
|
|
4011
4011
|
d2 = Nh(a, b2, c2, d2, f2, e);
|
|
4012
4012
|
c2 = Sh();
|
|
4013
4013
|
if (null !== a && !dh) return b2.updateQueue = a.updateQueue, b2.flags &= -2053, a.lanes &= ~e, Zi(a, b2, e);
|
|
4014
|
-
I$
|
|
4014
|
+
I$1 && c2 && vg(b2);
|
|
4015
4015
|
b2.flags |= 1;
|
|
4016
4016
|
Xi(a, b2, d2, e);
|
|
4017
4017
|
return b2.child;
|
|
@@ -4048,15 +4048,15 @@ function bj(a, b2, c2, d2, e) {
|
|
|
4048
4048
|
}
|
|
4049
4049
|
function dj(a, b2, c2) {
|
|
4050
4050
|
var d2 = b2.pendingProps, e = d2.children, f2 = null !== a ? a.memoizedState : null;
|
|
4051
|
-
if ("hidden" === d2.mode) if (0 === (b2.mode & 1)) b2.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, G$
|
|
4051
|
+
if ("hidden" === d2.mode) if (0 === (b2.mode & 1)) b2.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, G$1(ej, fj), fj |= c2;
|
|
4052
4052
|
else {
|
|
4053
|
-
if (0 === (c2 & 1073741824)) return a = null !== f2 ? f2.baseLanes | c2 : c2, b2.lanes = b2.childLanes = 1073741824, b2.memoizedState = { baseLanes: a, cachePool: null, transitions: null }, b2.updateQueue = null, G$
|
|
4053
|
+
if (0 === (c2 & 1073741824)) return a = null !== f2 ? f2.baseLanes | c2 : c2, b2.lanes = b2.childLanes = 1073741824, b2.memoizedState = { baseLanes: a, cachePool: null, transitions: null }, b2.updateQueue = null, G$1(ej, fj), fj |= a, null;
|
|
4054
4054
|
b2.memoizedState = { baseLanes: 0, cachePool: null, transitions: null };
|
|
4055
4055
|
d2 = null !== f2 ? f2.baseLanes : c2;
|
|
4056
|
-
G$
|
|
4056
|
+
G$1(ej, fj);
|
|
4057
4057
|
fj |= d2;
|
|
4058
4058
|
}
|
|
4059
|
-
else null !== f2 ? (d2 = f2.baseLanes | c2, b2.memoizedState = null) : d2 = c2, G$
|
|
4059
|
+
else null !== f2 ? (d2 = f2.baseLanes | c2, b2.memoizedState = null) : d2 = c2, G$1(ej, fj), fj |= d2;
|
|
4060
4060
|
Xi(a, b2, e, c2);
|
|
4061
4061
|
return b2.child;
|
|
4062
4062
|
}
|
|
@@ -4071,7 +4071,7 @@ function cj(a, b2, c2, d2, e) {
|
|
|
4071
4071
|
c2 = Nh(a, b2, c2, d2, f2, e);
|
|
4072
4072
|
d2 = Sh();
|
|
4073
4073
|
if (null !== a && !dh) return b2.updateQueue = a.updateQueue, b2.flags &= -2053, a.lanes &= ~e, Zi(a, b2, e);
|
|
4074
|
-
I$
|
|
4074
|
+
I$1 && d2 && vg(b2);
|
|
4075
4075
|
b2.flags |= 1;
|
|
4076
4076
|
Xi(a, b2, c2, e);
|
|
4077
4077
|
return b2.child;
|
|
@@ -4147,11 +4147,11 @@ function nj(a) {
|
|
|
4147
4147
|
return { baseLanes: a, cachePool: null, transitions: null };
|
|
4148
4148
|
}
|
|
4149
4149
|
function oj(a, b2, c2) {
|
|
4150
|
-
var d2 = b2.pendingProps, e = L$
|
|
4150
|
+
var d2 = b2.pendingProps, e = L$2.current, f2 = false, g2 = 0 !== (b2.flags & 128), h2;
|
|
4151
4151
|
(h2 = g2) || (h2 = null !== a && null === a.memoizedState ? false : 0 !== (e & 2));
|
|
4152
4152
|
if (h2) f2 = true, b2.flags &= -129;
|
|
4153
4153
|
else if (null === a || null !== a.memoizedState) e |= 1;
|
|
4154
|
-
G$
|
|
4154
|
+
G$1(L$2, e & 1);
|
|
4155
4155
|
if (null === a) {
|
|
4156
4156
|
Eg(b2);
|
|
4157
4157
|
a = b2.memoizedState;
|
|
@@ -4236,7 +4236,7 @@ function rj(a, b2, c2, d2, e, f2, g2) {
|
|
|
4236
4236
|
}
|
|
4237
4237
|
h2 = 0 !== (g2 & a.childLanes);
|
|
4238
4238
|
if (dh || h2) {
|
|
4239
|
-
d2 = Q$
|
|
4239
|
+
d2 = Q$1;
|
|
4240
4240
|
if (null !== d2) {
|
|
4241
4241
|
switch (g2 & -g2) {
|
|
4242
4242
|
case 4:
|
|
@@ -4285,7 +4285,7 @@ function rj(a, b2, c2, d2, e, f2, g2) {
|
|
|
4285
4285
|
a = f2.treeContext;
|
|
4286
4286
|
yg = Lf(e.nextSibling);
|
|
4287
4287
|
xg = b2;
|
|
4288
|
-
I$
|
|
4288
|
+
I$1 = true;
|
|
4289
4289
|
zg = null;
|
|
4290
4290
|
null !== a && (og[pg++] = rg, og[pg++] = sg, og[pg++] = qg, rg = a.id, sg = a.overflow, qg = b2);
|
|
4291
4291
|
b2 = qj(b2, d2.children);
|
|
@@ -4305,7 +4305,7 @@ function wj(a, b2, c2, d2, e) {
|
|
|
4305
4305
|
function xj(a, b2, c2) {
|
|
4306
4306
|
var d2 = b2.pendingProps, e = d2.revealOrder, f2 = d2.tail;
|
|
4307
4307
|
Xi(a, b2, d2.children, c2);
|
|
4308
|
-
d2 = L$
|
|
4308
|
+
d2 = L$2.current;
|
|
4309
4309
|
if (0 !== (d2 & 2)) d2 = d2 & 1 | 2, b2.flags |= 128;
|
|
4310
4310
|
else {
|
|
4311
4311
|
if (null !== a && 0 !== (a.flags & 128)) a: for (a = b2.child; null !== a; ) {
|
|
@@ -4326,7 +4326,7 @@ function xj(a, b2, c2) {
|
|
|
4326
4326
|
}
|
|
4327
4327
|
d2 &= 1;
|
|
4328
4328
|
}
|
|
4329
|
-
G$
|
|
4329
|
+
G$1(L$2, d2);
|
|
4330
4330
|
if (0 === (b2.mode & 1)) b2.memoizedState = null;
|
|
4331
4331
|
else switch (e) {
|
|
4332
4332
|
case "forwards":
|
|
@@ -4394,19 +4394,19 @@ function yj(a, b2, c2) {
|
|
|
4394
4394
|
break;
|
|
4395
4395
|
case 10:
|
|
4396
4396
|
var d2 = b2.type._context, e = b2.memoizedProps.value;
|
|
4397
|
-
G$
|
|
4397
|
+
G$1(Wg, d2._currentValue);
|
|
4398
4398
|
d2._currentValue = e;
|
|
4399
4399
|
break;
|
|
4400
4400
|
case 13:
|
|
4401
4401
|
d2 = b2.memoizedState;
|
|
4402
4402
|
if (null !== d2) {
|
|
4403
|
-
if (null !== d2.dehydrated) return G$
|
|
4403
|
+
if (null !== d2.dehydrated) return G$1(L$2, L$2.current & 1), b2.flags |= 128, null;
|
|
4404
4404
|
if (0 !== (c2 & b2.child.childLanes)) return oj(a, b2, c2);
|
|
4405
|
-
G$
|
|
4405
|
+
G$1(L$2, L$2.current & 1);
|
|
4406
4406
|
a = Zi(a, b2, c2);
|
|
4407
4407
|
return null !== a ? a.sibling : null;
|
|
4408
4408
|
}
|
|
4409
|
-
G$
|
|
4409
|
+
G$1(L$2, L$2.current & 1);
|
|
4410
4410
|
break;
|
|
4411
4411
|
case 19:
|
|
4412
4412
|
d2 = 0 !== (c2 & b2.childLanes);
|
|
@@ -4416,7 +4416,7 @@ function yj(a, b2, c2) {
|
|
|
4416
4416
|
}
|
|
4417
4417
|
e = b2.memoizedState;
|
|
4418
4418
|
null !== e && (e.rendering = null, e.tail = null, e.lastEffect = null);
|
|
4419
|
-
G$
|
|
4419
|
+
G$1(L$2, L$2.current);
|
|
4420
4420
|
if (d2) break;
|
|
4421
4421
|
else return null;
|
|
4422
4422
|
case 22:
|
|
@@ -4498,7 +4498,7 @@ Cj = function(a, b2, c2, d2) {
|
|
|
4498
4498
|
c2 !== d2 && (b2.flags |= 4);
|
|
4499
4499
|
};
|
|
4500
4500
|
function Dj(a, b2) {
|
|
4501
|
-
if (!I$
|
|
4501
|
+
if (!I$1) switch (a.tailMode) {
|
|
4502
4502
|
case "hidden":
|
|
4503
4503
|
b2 = a.tail;
|
|
4504
4504
|
for (var c2 = null; null !== b2; ) null !== b2.alternate && (c2 = b2), b2 = b2.sibling;
|
|
@@ -4775,10 +4775,10 @@ function Ej(a, b2, c2) {
|
|
|
4775
4775
|
S$1(b2);
|
|
4776
4776
|
return null;
|
|
4777
4777
|
case 13:
|
|
4778
|
-
E$1(L$
|
|
4778
|
+
E$1(L$2);
|
|
4779
4779
|
d2 = b2.memoizedState;
|
|
4780
4780
|
if (null === a || null !== a.memoizedState && null !== a.memoizedState.dehydrated) {
|
|
4781
|
-
if (I$
|
|
4781
|
+
if (I$1 && null !== yg && 0 !== (b2.mode & 1) && 0 === (b2.flags & 128)) Hg(), Ig(), b2.flags |= 98560, f2 = false;
|
|
4782
4782
|
else if (f2 = Gg(b2), null !== d2 && null !== d2.dehydrated) {
|
|
4783
4783
|
if (null === a) {
|
|
4784
4784
|
if (!f2) throw Error(p$2(318));
|
|
@@ -4794,7 +4794,7 @@ function Ej(a, b2, c2) {
|
|
|
4794
4794
|
}
|
|
4795
4795
|
if (0 !== (b2.flags & 128)) return b2.lanes = c2, b2;
|
|
4796
4796
|
d2 = null !== d2;
|
|
4797
|
-
d2 !== (null !== a && null !== a.memoizedState) && d2 && (b2.child.flags |= 8192, 0 !== (b2.mode & 1) && (null === a || 0 !== (L$
|
|
4797
|
+
d2 !== (null !== a && null !== a.memoizedState) && d2 && (b2.child.flags |= 8192, 0 !== (b2.mode & 1) && (null === a || 0 !== (L$2.current & 1) ? 0 === T$2 && (T$2 = 3) : tj()));
|
|
4798
4798
|
null !== b2.updateQueue && (b2.flags |= 4);
|
|
4799
4799
|
S$1(b2);
|
|
4800
4800
|
return null;
|
|
@@ -4805,7 +4805,7 @@ function Ej(a, b2, c2) {
|
|
|
4805
4805
|
case 17:
|
|
4806
4806
|
return Zf(b2.type) && $f(), S$1(b2), null;
|
|
4807
4807
|
case 19:
|
|
4808
|
-
E$1(L$
|
|
4808
|
+
E$1(L$2);
|
|
4809
4809
|
f2 = b2.memoizedState;
|
|
4810
4810
|
if (null === f2) return S$1(b2), null;
|
|
4811
4811
|
d2 = 0 !== (b2.flags & 128);
|
|
@@ -4822,20 +4822,20 @@ function Ej(a, b2, c2) {
|
|
|
4822
4822
|
b2.subtreeFlags = 0;
|
|
4823
4823
|
d2 = c2;
|
|
4824
4824
|
for (c2 = b2.child; null !== c2; ) f2 = c2, a = d2, f2.flags &= 14680066, g2 = f2.alternate, null === g2 ? (f2.childLanes = 0, f2.lanes = a, f2.child = null, f2.subtreeFlags = 0, f2.memoizedProps = null, f2.memoizedState = null, f2.updateQueue = null, f2.dependencies = null, f2.stateNode = null) : (f2.childLanes = g2.childLanes, f2.lanes = g2.lanes, f2.child = g2.child, f2.subtreeFlags = 0, f2.deletions = null, f2.memoizedProps = g2.memoizedProps, f2.memoizedState = g2.memoizedState, f2.updateQueue = g2.updateQueue, f2.type = g2.type, a = g2.dependencies, f2.dependencies = null === a ? null : { lanes: a.lanes, firstContext: a.firstContext }), c2 = c2.sibling;
|
|
4825
|
-
G$
|
|
4825
|
+
G$1(L$2, L$2.current & 1 | 2);
|
|
4826
4826
|
return b2.child;
|
|
4827
4827
|
}
|
|
4828
4828
|
a = a.sibling;
|
|
4829
4829
|
}
|
|
4830
|
-
null !== f2.tail && B$
|
|
4830
|
+
null !== f2.tail && B$3() > Gj && (b2.flags |= 128, d2 = true, Dj(f2, false), b2.lanes = 4194304);
|
|
4831
4831
|
}
|
|
4832
4832
|
else {
|
|
4833
4833
|
if (!d2) if (a = Ch(g2), null !== a) {
|
|
4834
|
-
if (b2.flags |= 128, d2 = true, c2 = a.updateQueue, null !== c2 && (b2.updateQueue = c2, b2.flags |= 4), Dj(f2, true), null === f2.tail && "hidden" === f2.tailMode && !g2.alternate && !I$
|
|
4835
|
-
} else 2 * B$
|
|
4834
|
+
if (b2.flags |= 128, d2 = true, c2 = a.updateQueue, null !== c2 && (b2.updateQueue = c2, b2.flags |= 4), Dj(f2, true), null === f2.tail && "hidden" === f2.tailMode && !g2.alternate && !I$1) return S$1(b2), null;
|
|
4835
|
+
} else 2 * B$3() - f2.renderingStartTime > Gj && 1073741824 !== c2 && (b2.flags |= 128, d2 = true, Dj(f2, false), b2.lanes = 4194304);
|
|
4836
4836
|
f2.isBackwards ? (g2.sibling = b2.child, b2.child = g2) : (c2 = f2.last, null !== c2 ? c2.sibling = g2 : b2.child = g2, f2.last = g2);
|
|
4837
4837
|
}
|
|
4838
|
-
if (null !== f2.tail) return b2 = f2.tail, f2.rendering = b2, f2.tail = b2.sibling, f2.renderingStartTime = B$
|
|
4838
|
+
if (null !== f2.tail) return b2 = f2.tail, f2.rendering = b2, f2.tail = b2.sibling, f2.renderingStartTime = B$3(), b2.sibling = null, c2 = L$2.current, G$1(L$2, d2 ? c2 & 1 | 2 : c2 & 1), b2;
|
|
4839
4839
|
S$1(b2);
|
|
4840
4840
|
return null;
|
|
4841
4841
|
case 22:
|
|
@@ -4858,7 +4858,7 @@ function Ij(a, b2) {
|
|
|
4858
4858
|
case 5:
|
|
4859
4859
|
return Bh(b2), null;
|
|
4860
4860
|
case 13:
|
|
4861
|
-
E$1(L$
|
|
4861
|
+
E$1(L$2);
|
|
4862
4862
|
a = b2.memoizedState;
|
|
4863
4863
|
if (null !== a && null !== a.dehydrated) {
|
|
4864
4864
|
if (null === b2.alternate) throw Error(p$2(340));
|
|
@@ -4867,7 +4867,7 @@ function Ij(a, b2) {
|
|
|
4867
4867
|
a = b2.flags;
|
|
4868
4868
|
return a & 65536 ? (b2.flags = a & -65537 | 128, b2) : null;
|
|
4869
4869
|
case 19:
|
|
4870
|
-
return E$1(L$
|
|
4870
|
+
return E$1(L$2), null;
|
|
4871
4871
|
case 4:
|
|
4872
4872
|
return zh(), null;
|
|
4873
4873
|
case 10:
|
|
@@ -5292,7 +5292,7 @@ function dk(a, b2) {
|
|
|
5292
5292
|
ck(b2, a);
|
|
5293
5293
|
ek(a);
|
|
5294
5294
|
e = a.child;
|
|
5295
|
-
e.flags & 8192 && (f2 = null !== e.memoizedState, e.stateNode.isHidden = f2, !f2 || null !== e.alternate && null !== e.alternate.memoizedState || (fk = B$
|
|
5295
|
+
e.flags & 8192 && (f2 = null !== e.memoizedState, e.stateNode.isHidden = f2, !f2 || null !== e.alternate && null !== e.alternate.memoizedState || (fk = B$3()));
|
|
5296
5296
|
d2 & 4 && ak(a);
|
|
5297
5297
|
break;
|
|
5298
5298
|
case 22:
|
|
@@ -5616,9 +5616,9 @@ function jk(a) {
|
|
|
5616
5616
|
V = b2.return;
|
|
5617
5617
|
}
|
|
5618
5618
|
}
|
|
5619
|
-
var lk = Math.ceil, mk = ua.ReactCurrentDispatcher, nk = ua.ReactCurrentOwner, ok = ua.ReactCurrentBatchConfig, K$2 = 0, Q$
|
|
5619
|
+
var lk = Math.ceil, mk = ua.ReactCurrentDispatcher, nk = ua.ReactCurrentOwner, ok = ua.ReactCurrentBatchConfig, K$2 = 0, Q$1 = null, Y$2 = null, Z$1 = 0, fj = 0, ej = Uf(0), T$2 = 0, pk = null, rh = 0, qk = 0, rk = 0, sk = null, tk = null, fk = 0, Gj = Infinity, uk = null, Oi = false, Pi = null, Ri = null, vk = false, wk = null, xk = 0, yk = 0, zk = null, Ak = -1, Bk = 0;
|
|
5620
5620
|
function R$1() {
|
|
5621
|
-
return 0 !== (K$2 & 6) ? B$
|
|
5621
|
+
return 0 !== (K$2 & 6) ? B$3() : -1 !== Ak ? Ak : Ak = B$3();
|
|
5622
5622
|
}
|
|
5623
5623
|
function yi(a) {
|
|
5624
5624
|
if (0 === (a.mode & 1)) return 1;
|
|
@@ -5633,12 +5633,12 @@ function yi(a) {
|
|
|
5633
5633
|
function gi(a, b2, c2, d2) {
|
|
5634
5634
|
if (50 < yk) throw yk = 0, zk = null, Error(p$2(185));
|
|
5635
5635
|
Ac(a, c2, d2);
|
|
5636
|
-
if (0 === (K$2 & 2) || a !== Q$
|
|
5636
|
+
if (0 === (K$2 & 2) || a !== Q$1) a === Q$1 && (0 === (K$2 & 2) && (qk |= c2), 4 === T$2 && Ck(a, Z$1)), Dk(a, d2), 1 === c2 && 0 === K$2 && 0 === (b2.mode & 1) && (Gj = B$3() + 500, fg && jg());
|
|
5637
5637
|
}
|
|
5638
5638
|
function Dk(a, b2) {
|
|
5639
5639
|
var c2 = a.callbackNode;
|
|
5640
5640
|
wc(a, b2);
|
|
5641
|
-
var d2 = uc(a, a === Q$
|
|
5641
|
+
var d2 = uc(a, a === Q$1 ? Z$1 : 0);
|
|
5642
5642
|
if (0 === d2) null !== c2 && bc(c2), a.callbackNode = null, a.callbackPriority = 0;
|
|
5643
5643
|
else if (b2 = d2 & -d2, a.callbackPriority !== b2) {
|
|
5644
5644
|
null != c2 && bc(c2);
|
|
@@ -5674,7 +5674,7 @@ function Gk(a, b2) {
|
|
|
5674
5674
|
if (0 !== (K$2 & 6)) throw Error(p$2(327));
|
|
5675
5675
|
var c2 = a.callbackNode;
|
|
5676
5676
|
if (Hk() && a.callbackNode !== c2) return null;
|
|
5677
|
-
var d2 = uc(a, a === Q$
|
|
5677
|
+
var d2 = uc(a, a === Q$1 ? Z$1 : 0);
|
|
5678
5678
|
if (0 === d2) return null;
|
|
5679
5679
|
if (0 !== (d2 & 30) || 0 !== (d2 & a.expiredLanes) || b2) b2 = Ik(a, d2);
|
|
5680
5680
|
else {
|
|
@@ -5682,7 +5682,7 @@ function Gk(a, b2) {
|
|
|
5682
5682
|
var e = K$2;
|
|
5683
5683
|
K$2 |= 2;
|
|
5684
5684
|
var f2 = Jk();
|
|
5685
|
-
if (Q$
|
|
5685
|
+
if (Q$1 !== a || Z$1 !== b2) uk = null, Gj = B$3() + 500, Kk(a, b2);
|
|
5686
5686
|
do
|
|
5687
5687
|
try {
|
|
5688
5688
|
Lk();
|
|
@@ -5694,15 +5694,15 @@ function Gk(a, b2) {
|
|
|
5694
5694
|
$g();
|
|
5695
5695
|
mk.current = f2;
|
|
5696
5696
|
K$2 = e;
|
|
5697
|
-
null !== Y$2 ? b2 = 0 : (Q$
|
|
5697
|
+
null !== Y$2 ? b2 = 0 : (Q$1 = null, Z$1 = 0, b2 = T$2);
|
|
5698
5698
|
}
|
|
5699
5699
|
if (0 !== b2) {
|
|
5700
5700
|
2 === b2 && (e = xc(a), 0 !== e && (d2 = e, b2 = Nk(a, e)));
|
|
5701
|
-
if (1 === b2) throw c2 = pk, Kk(a, 0), Ck(a, d2), Dk(a, B$
|
|
5701
|
+
if (1 === b2) throw c2 = pk, Kk(a, 0), Ck(a, d2), Dk(a, B$3()), c2;
|
|
5702
5702
|
if (6 === b2) Ck(a, d2);
|
|
5703
5703
|
else {
|
|
5704
5704
|
e = a.current.alternate;
|
|
5705
|
-
if (0 === (d2 & 30) && !Ok(e) && (b2 = Ik(a, d2), 2 === b2 && (f2 = xc(a), 0 !== f2 && (d2 = f2, b2 = Nk(a, f2))), 1 === b2)) throw c2 = pk, Kk(a, 0), Ck(a, d2), Dk(a, B$
|
|
5705
|
+
if (0 === (d2 & 30) && !Ok(e) && (b2 = Ik(a, d2), 2 === b2 && (f2 = xc(a), 0 !== f2 && (d2 = f2, b2 = Nk(a, f2))), 1 === b2)) throw c2 = pk, Kk(a, 0), Ck(a, d2), Dk(a, B$3()), c2;
|
|
5706
5706
|
a.finishedWork = e;
|
|
5707
5707
|
a.finishedLanes = d2;
|
|
5708
5708
|
switch (b2) {
|
|
@@ -5714,7 +5714,7 @@ function Gk(a, b2) {
|
|
|
5714
5714
|
break;
|
|
5715
5715
|
case 3:
|
|
5716
5716
|
Ck(a, d2);
|
|
5717
|
-
if ((d2 & 130023424) === d2 && (b2 = fk + 500 - B$
|
|
5717
|
+
if ((d2 & 130023424) === d2 && (b2 = fk + 500 - B$3(), 10 < b2)) {
|
|
5718
5718
|
if (0 !== uc(a, 0)) break;
|
|
5719
5719
|
e = a.suspendedLanes;
|
|
5720
5720
|
if ((e & d2) !== d2) {
|
|
@@ -5739,7 +5739,7 @@ function Gk(a, b2) {
|
|
|
5739
5739
|
d2 &= ~f2;
|
|
5740
5740
|
}
|
|
5741
5741
|
d2 = e;
|
|
5742
|
-
d2 = B$
|
|
5742
|
+
d2 = B$3() - d2;
|
|
5743
5743
|
d2 = (120 > d2 ? 120 : 480 > d2 ? 480 : 1080 > d2 ? 1080 : 1920 > d2 ? 1920 : 3e3 > d2 ? 3e3 : 4320 > d2 ? 4320 : 1960 * lk(d2 / 1960)) - d2;
|
|
5744
5744
|
if (10 < d2) {
|
|
5745
5745
|
a.timeoutHandle = Ff(Pk.bind(null, a, tk, uk), d2);
|
|
@@ -5755,7 +5755,7 @@ function Gk(a, b2) {
|
|
|
5755
5755
|
}
|
|
5756
5756
|
}
|
|
5757
5757
|
}
|
|
5758
|
-
Dk(a, B$
|
|
5758
|
+
Dk(a, B$3());
|
|
5759
5759
|
return a.callbackNode === c2 ? Gk.bind(null, a) : null;
|
|
5760
5760
|
}
|
|
5761
5761
|
function Nk(a, b2) {
|
|
@@ -5811,18 +5811,18 @@ function Ek(a) {
|
|
|
5811
5811
|
if (0 !== (K$2 & 6)) throw Error(p$2(327));
|
|
5812
5812
|
Hk();
|
|
5813
5813
|
var b2 = uc(a, 0);
|
|
5814
|
-
if (0 === (b2 & 1)) return Dk(a, B$
|
|
5814
|
+
if (0 === (b2 & 1)) return Dk(a, B$3()), null;
|
|
5815
5815
|
var c2 = Ik(a, b2);
|
|
5816
5816
|
if (0 !== a.tag && 2 === c2) {
|
|
5817
5817
|
var d2 = xc(a);
|
|
5818
5818
|
0 !== d2 && (b2 = d2, c2 = Nk(a, d2));
|
|
5819
5819
|
}
|
|
5820
|
-
if (1 === c2) throw c2 = pk, Kk(a, 0), Ck(a, b2), Dk(a, B$
|
|
5820
|
+
if (1 === c2) throw c2 = pk, Kk(a, 0), Ck(a, b2), Dk(a, B$3()), c2;
|
|
5821
5821
|
if (6 === c2) throw Error(p$2(345));
|
|
5822
5822
|
a.finishedWork = a.current.alternate;
|
|
5823
5823
|
a.finishedLanes = b2;
|
|
5824
5824
|
Pk(a, tk, uk);
|
|
5825
|
-
Dk(a, B$
|
|
5825
|
+
Dk(a, B$3());
|
|
5826
5826
|
return null;
|
|
5827
5827
|
}
|
|
5828
5828
|
function Qk(a, b2) {
|
|
@@ -5831,7 +5831,7 @@ function Qk(a, b2) {
|
|
|
5831
5831
|
try {
|
|
5832
5832
|
return a(b2);
|
|
5833
5833
|
} finally {
|
|
5834
|
-
K$2 = c2, 0 === K$2 && (Gj = B$
|
|
5834
|
+
K$2 = c2, 0 === K$2 && (Gj = B$3() + 500, fg && jg());
|
|
5835
5835
|
}
|
|
5836
5836
|
}
|
|
5837
5837
|
function Rk(a) {
|
|
@@ -5875,10 +5875,10 @@ function Kk(a, b2) {
|
|
|
5875
5875
|
zh();
|
|
5876
5876
|
break;
|
|
5877
5877
|
case 13:
|
|
5878
|
-
E$1(L$
|
|
5878
|
+
E$1(L$2);
|
|
5879
5879
|
break;
|
|
5880
5880
|
case 19:
|
|
5881
|
-
E$1(L$
|
|
5881
|
+
E$1(L$2);
|
|
5882
5882
|
break;
|
|
5883
5883
|
case 10:
|
|
5884
5884
|
ah(d2.type._context);
|
|
@@ -5889,7 +5889,7 @@ function Kk(a, b2) {
|
|
|
5889
5889
|
}
|
|
5890
5890
|
c2 = c2.return;
|
|
5891
5891
|
}
|
|
5892
|
-
Q$
|
|
5892
|
+
Q$1 = a;
|
|
5893
5893
|
Y$2 = a = Pg(a.current, null);
|
|
5894
5894
|
Z$1 = fj = b2;
|
|
5895
5895
|
T$2 = 0;
|
|
@@ -5918,7 +5918,7 @@ function Mk(a, b2) {
|
|
|
5918
5918
|
$g();
|
|
5919
5919
|
Fh.current = Rh;
|
|
5920
5920
|
if (Ih) {
|
|
5921
|
-
for (var d2 = M$
|
|
5921
|
+
for (var d2 = M$1.memoizedState; null !== d2; ) {
|
|
5922
5922
|
var e = d2.queue;
|
|
5923
5923
|
null !== e && (e.pending = null);
|
|
5924
5924
|
d2 = d2.next;
|
|
@@ -5926,7 +5926,7 @@ function Mk(a, b2) {
|
|
|
5926
5926
|
Ih = false;
|
|
5927
5927
|
}
|
|
5928
5928
|
Hh = 0;
|
|
5929
|
-
O$1 = N$2 = M$
|
|
5929
|
+
O$1 = N$2 = M$1 = null;
|
|
5930
5930
|
Jh = false;
|
|
5931
5931
|
Kh = 0;
|
|
5932
5932
|
nk.current = null;
|
|
@@ -5968,7 +5968,7 @@ function Mk(a, b2) {
|
|
|
5968
5968
|
}
|
|
5969
5969
|
k2 = Error(p$2(426));
|
|
5970
5970
|
}
|
|
5971
|
-
} else if (I$
|
|
5971
|
+
} else if (I$1 && h2.mode & 1) {
|
|
5972
5972
|
var J2 = Ui(g2);
|
|
5973
5973
|
if (null !== J2) {
|
|
5974
5974
|
0 === (J2.flags & 65536) && (J2.flags |= 256);
|
|
@@ -6021,13 +6021,13 @@ function Jk() {
|
|
|
6021
6021
|
}
|
|
6022
6022
|
function tj() {
|
|
6023
6023
|
if (0 === T$2 || 3 === T$2 || 2 === T$2) T$2 = 4;
|
|
6024
|
-
null === Q$
|
|
6024
|
+
null === Q$1 || 0 === (rh & 268435455) && 0 === (qk & 268435455) || Ck(Q$1, Z$1);
|
|
6025
6025
|
}
|
|
6026
6026
|
function Ik(a, b2) {
|
|
6027
6027
|
var c2 = K$2;
|
|
6028
6028
|
K$2 |= 2;
|
|
6029
6029
|
var d2 = Jk();
|
|
6030
|
-
if (Q$
|
|
6030
|
+
if (Q$1 !== a || Z$1 !== b2) uk = null, Kk(a, b2);
|
|
6031
6031
|
do
|
|
6032
6032
|
try {
|
|
6033
6033
|
Tk();
|
|
@@ -6040,7 +6040,7 @@ function Ik(a, b2) {
|
|
|
6040
6040
|
K$2 = c2;
|
|
6041
6041
|
mk.current = d2;
|
|
6042
6042
|
if (null !== Y$2) throw Error(p$2(261));
|
|
6043
|
-
Q$
|
|
6043
|
+
Q$1 = null;
|
|
6044
6044
|
Z$1 = 0;
|
|
6045
6045
|
return T$2;
|
|
6046
6046
|
}
|
|
@@ -6113,7 +6113,7 @@ function Wk(a, b2, c2, d2) {
|
|
|
6113
6113
|
a.callbackPriority = 0;
|
|
6114
6114
|
var f2 = c2.lanes | c2.childLanes;
|
|
6115
6115
|
Bc(a, f2);
|
|
6116
|
-
a === Q$
|
|
6116
|
+
a === Q$1 && (Y$2 = Q$1 = null, Z$1 = 0);
|
|
6117
6117
|
0 === (c2.subtreeFlags & 2064) && 0 === (c2.flags & 2064) || vk || (vk = true, Fk(hc, function() {
|
|
6118
6118
|
Hk();
|
|
6119
6119
|
return null;
|
|
@@ -6143,7 +6143,7 @@ function Wk(a, b2, c2, d2) {
|
|
|
6143
6143
|
f2 = a.pendingLanes;
|
|
6144
6144
|
0 === f2 && (Ri = null);
|
|
6145
6145
|
mc(c2.stateNode);
|
|
6146
|
-
Dk(a, B$
|
|
6146
|
+
Dk(a, B$3());
|
|
6147
6147
|
if (null !== b2) for (d2 = a.onRecoverableError, c2 = 0; c2 < b2.length; c2++) e = b2[c2], d2(e.value, { componentStack: e.stack, digest: e.digest });
|
|
6148
6148
|
if (Oi) throw Oi = false, a = Pi, Pi = null, a;
|
|
6149
6149
|
0 !== (xk & 1) && 0 !== a.tag && Hk();
|
|
@@ -6310,7 +6310,7 @@ function Ti(a, b2, c2) {
|
|
|
6310
6310
|
null !== d2 && d2.delete(b2);
|
|
6311
6311
|
b2 = R$1();
|
|
6312
6312
|
a.pingedLanes |= a.suspendedLanes & c2;
|
|
6313
|
-
Q$
|
|
6313
|
+
Q$1 === a && (Z$1 & c2) === c2 && (4 === T$2 || 3 === T$2 && (Z$1 & 130023424) === Z$1 && 500 > B$3() - fk ? Kk(a, 0) : rk |= c2);
|
|
6314
6314
|
Dk(a, b2);
|
|
6315
6315
|
}
|
|
6316
6316
|
function Yk(a, b2) {
|
|
@@ -6348,7 +6348,7 @@ Vk = function(a, b2, c2) {
|
|
|
6348
6348
|
if (0 === (a.lanes & c2) && 0 === (b2.flags & 128)) return dh = false, yj(a, b2, c2);
|
|
6349
6349
|
dh = 0 !== (a.flags & 131072) ? true : false;
|
|
6350
6350
|
}
|
|
6351
|
-
else dh = false, I$
|
|
6351
|
+
else dh = false, I$1 && 0 !== (b2.flags & 1048576) && ug(b2, ng, b2.index);
|
|
6352
6352
|
b2.lanes = 0;
|
|
6353
6353
|
switch (b2.tag) {
|
|
6354
6354
|
case 2:
|
|
@@ -6360,7 +6360,7 @@ Vk = function(a, b2, c2) {
|
|
|
6360
6360
|
e = Nh(null, b2, d2, a, e, c2);
|
|
6361
6361
|
var f2 = Sh();
|
|
6362
6362
|
b2.flags |= 1;
|
|
6363
|
-
"object" === typeof e && null !== e && "function" === typeof e.render && void 0 === e.$$typeof ? (b2.tag = 1, b2.memoizedState = null, b2.updateQueue = null, Zf(d2) ? (f2 = true, cg(b2)) : f2 = false, b2.memoizedState = null !== e.state && void 0 !== e.state ? e.state : null, kh(b2), e.updater = Ei, b2.stateNode = e, e._reactInternals = b2, Ii(b2, d2, a, c2), b2 = jj(null, b2, d2, true, f2, c2)) : (b2.tag = 0, I$
|
|
6363
|
+
"object" === typeof e && null !== e && "function" === typeof e.render && void 0 === e.$$typeof ? (b2.tag = 1, b2.memoizedState = null, b2.updateQueue = null, Zf(d2) ? (f2 = true, cg(b2)) : f2 = false, b2.memoizedState = null !== e.state && void 0 !== e.state ? e.state : null, kh(b2), e.updater = Ei, b2.stateNode = e, e._reactInternals = b2, Ii(b2, d2, a, c2), b2 = jj(null, b2, d2, true, f2, c2)) : (b2.tag = 0, I$1 && f2 && vg(b2), Xi(null, b2, e, c2), b2 = b2.child);
|
|
6364
6364
|
return b2;
|
|
6365
6365
|
case 16:
|
|
6366
6366
|
d2 = b2.elementType;
|
|
@@ -6416,7 +6416,7 @@ Vk = function(a, b2, c2) {
|
|
|
6416
6416
|
e = Ji(Error(p$2(424)), b2);
|
|
6417
6417
|
b2 = lj(a, b2, d2, c2, e);
|
|
6418
6418
|
break a;
|
|
6419
|
-
} else for (yg = Lf(b2.stateNode.containerInfo.firstChild), xg = b2, I$
|
|
6419
|
+
} else for (yg = Lf(b2.stateNode.containerInfo.firstChild), xg = b2, I$1 = true, zg = null, c2 = Vg(b2, null, d2, c2), b2.child = c2; c2; ) c2.flags = c2.flags & -3 | 4096, c2 = c2.sibling;
|
|
6420
6420
|
else {
|
|
6421
6421
|
Ig();
|
|
6422
6422
|
if (d2 === e) {
|
|
@@ -6450,7 +6450,7 @@ Vk = function(a, b2, c2) {
|
|
|
6450
6450
|
e = b2.pendingProps;
|
|
6451
6451
|
f2 = b2.memoizedProps;
|
|
6452
6452
|
g2 = e.value;
|
|
6453
|
-
G$
|
|
6453
|
+
G$1(Wg, d2._currentValue);
|
|
6454
6454
|
d2._currentValue = g2;
|
|
6455
6455
|
if (null !== f2) if (He(f2.value, g2)) {
|
|
6456
6456
|
if (f2.children === e.children && !Wf.current) {
|
|
@@ -6854,7 +6854,7 @@ Ec = function(a) {
|
|
|
6854
6854
|
var b2 = a.stateNode;
|
|
6855
6855
|
if (b2.current.memoizedState.isDehydrated) {
|
|
6856
6856
|
var c2 = tc(b2.pendingLanes);
|
|
6857
|
-
0 !== c2 && (Cc(b2, c2 | 1), Dk(b2, B$
|
|
6857
|
+
0 !== c2 && (Cc(b2, c2 | 1), Dk(b2, B$3()), 0 === (K$2 & 6) && (Gj = B$3() + 500, jg()));
|
|
6858
6858
|
}
|
|
6859
6859
|
break;
|
|
6860
6860
|
case 13:
|
|
@@ -7066,7 +7066,7 @@ function g(t2) {
|
|
|
7066
7066
|
e.removeEventListener("animationend", t4), l2 ? f(e, m2, c2) : m2();
|
|
7067
7067
|
};
|
|
7068
7068
|
y2 || (p2 ? t4() : (E2.current = 1, e.className += ` ${T2}`, e.addEventListener("animationend", t4)));
|
|
7069
|
-
}, [y2]), React$
|
|
7069
|
+
}, [y2]), React$1.createElement(React$1.Fragment, null, d2);
|
|
7070
7070
|
};
|
|
7071
7071
|
}
|
|
7072
7072
|
function y(e, t2) {
|
|
@@ -7075,7 +7075,7 @@ function y(e, t2) {
|
|
|
7075
7075
|
const v = /* @__PURE__ */ new Map();
|
|
7076
7076
|
let h = [];
|
|
7077
7077
|
const T$1 = /* @__PURE__ */ new Set(), E = (e) => T$1.forEach((t2) => t2(e)), b = () => v.size > 0;
|
|
7078
|
-
function I
|
|
7078
|
+
function I(e, t2) {
|
|
7079
7079
|
var n2;
|
|
7080
7080
|
if (t2) return !(null == (n2 = v.get(t2)) || !n2.isToastActive(e));
|
|
7081
7081
|
let o = false;
|
|
@@ -7093,7 +7093,7 @@ function C(e, t2) {
|
|
|
7093
7093
|
null != t2 && null != t2 && t2.containerId ? (null == t2 ? void 0 : t2.containerId) === n2.id && n2.toggle(e, null == t2 ? void 0 : t2.id) : n2.toggle(e, null == t2 ? void 0 : t2.id);
|
|
7094
7094
|
});
|
|
7095
7095
|
}
|
|
7096
|
-
function L(e) {
|
|
7096
|
+
function L$1(e) {
|
|
7097
7097
|
const { subscribe: o, getSnapshot: s, setProps: i } = reactExports.useRef(function(e2) {
|
|
7098
7098
|
const n2 = e2.containerId || 1;
|
|
7099
7099
|
return { subscribe(o2) {
|
|
@@ -7166,7 +7166,7 @@ function L(e) {
|
|
|
7166
7166
|
const { position: t3 } = e2.props;
|
|
7167
7167
|
n2.has(t3) || n2.set(t3, []), n2.get(t3).push(e2);
|
|
7168
7168
|
}), Array.from(n2, (e2) => t2(e2[0], e2[1]));
|
|
7169
|
-
}, isToastActive: I
|
|
7169
|
+
}, isToastActive: I, count: null == l2 ? void 0 : l2.length };
|
|
7170
7170
|
}
|
|
7171
7171
|
function N$1(e) {
|
|
7172
7172
|
const [t2, o] = reactExports.useState(false), [a, r2] = reactExports.useState(false), l2 = reactExports.useRef(null), c2 = reactExports.useRef({ start: 0, delta: 0, removalDistance: 0, canCloseOnClick: true, canDrag: false, didMove: false }).current, { autoClose: d2, pauseOnHover: u2, closeToast: p2, onClick: m2, closeOnClick: f2 } = e;
|
|
@@ -7215,35 +7215,35 @@ function $$1(t2) {
|
|
|
7215
7215
|
const h2 = clsx("Toastify__progress-bar", d2 ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${g2}`, `Toastify__progress-bar--${a}`, { "Toastify__progress-bar--rtl": m2 }), T2 = u$1(i) ? i({ rtl: m2, type: a, defaultClassName: h2 }) : clsx(h2, i), E2 = { [d2 && p2 >= 1 ? "onTransitionEnd" : "onAnimationEnd"]: d2 && p2 < 1 ? null : () => {
|
|
7216
7216
|
f2 && s();
|
|
7217
7217
|
} };
|
|
7218
|
-
return React$
|
|
7218
|
+
return React$1.createElement("div", { className: "Toastify__progress-bar--wrp", "data-hidden": y2 }, React$1.createElement("div", { className: `Toastify__progress-bar--bg Toastify__progress-bar-theme--${g2} Toastify__progress-bar--${a}` }), React$1.createElement("div", { role: "progressbar", "aria-hidden": y2 ? "true" : "false", "aria-label": "notification timer", className: T2, style: v2, ...E2 }));
|
|
7219
7219
|
}
|
|
7220
7220
|
let w = 1;
|
|
7221
7221
|
const k$2 = () => "" + w++;
|
|
7222
|
-
function P(e) {
|
|
7222
|
+
function P$1(e) {
|
|
7223
7223
|
return e && (d(e.toastId) || c(e.toastId)) ? e.toastId : k$2();
|
|
7224
7224
|
}
|
|
7225
|
-
function M
|
|
7225
|
+
function M(e, t2) {
|
|
7226
7226
|
return _(e, t2), t2.toastId;
|
|
7227
7227
|
}
|
|
7228
7228
|
function x(e, t2) {
|
|
7229
|
-
return { ...t2, type: t2 && t2.type || e, toastId: P(t2) };
|
|
7229
|
+
return { ...t2, type: t2 && t2.type || e, toastId: P$1(t2) };
|
|
7230
7230
|
}
|
|
7231
7231
|
function A(e) {
|
|
7232
|
-
return (t2, n2) => M
|
|
7232
|
+
return (t2, n2) => M(t2, x(e, n2));
|
|
7233
7233
|
}
|
|
7234
|
-
function B$
|
|
7235
|
-
return M
|
|
7234
|
+
function B$2(e, t2) {
|
|
7235
|
+
return M(e, x("default", t2));
|
|
7236
7236
|
}
|
|
7237
|
-
B$
|
|
7237
|
+
B$2.loading = (e, t2) => M(e, x("default", { isLoading: true, autoClose: false, closeOnClick: false, closeButton: false, draggable: false, ...t2 })), B$2.promise = function(e, t2, n2) {
|
|
7238
7238
|
let o, { pending: s, error: a, success: r2 } = t2;
|
|
7239
|
-
s && (o = d(s) ? B$
|
|
7239
|
+
s && (o = d(s) ? B$2.loading(s, n2) : B$2.loading(s.render, { ...n2, ...s }));
|
|
7240
7240
|
const i = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, l2 = (e2, t3, s2) => {
|
|
7241
|
-
if (null == t3) return void B$
|
|
7241
|
+
if (null == t3) return void B$2.dismiss(o);
|
|
7242
7242
|
const a2 = { type: e2, ...i, ...n2, data: s2 }, r3 = d(t3) ? { render: t3 } : t3;
|
|
7243
|
-
return o ? B$
|
|
7243
|
+
return o ? B$2.update(o, { ...a2, ...r3 }) : B$2(r3.render, { ...a2, ...r3 }), s2;
|
|
7244
7244
|
}, c2 = u$1(e) ? e() : e;
|
|
7245
7245
|
return c2.then((e2) => l2("success", r2, e2)).catch((e2) => l2("error", a, e2)), c2;
|
|
7246
|
-
}, B$
|
|
7246
|
+
}, B$2.success = A("success"), B$2.info = A("info"), B$2.error = A("error"), B$2.warning = A("warning"), B$2.warn = B$2.warning, B$2.dark = (e, t2) => M(e, x("default", { theme: "dark", ...t2 })), B$2.dismiss = function(e) {
|
|
7247
7247
|
!function(e2) {
|
|
7248
7248
|
var t2;
|
|
7249
7249
|
if (b()) {
|
|
@@ -7258,11 +7258,11 @@ B$1.loading = (e, t2) => M$1(e, x("default", { isLoading: true, autoClose: false
|
|
|
7258
7258
|
}
|
|
7259
7259
|
} else h = h.filter((t3) => null != e2 && t3.options.toastId !== e2);
|
|
7260
7260
|
}(e);
|
|
7261
|
-
}, B$
|
|
7261
|
+
}, B$2.clearWaitingQueue = function(e) {
|
|
7262
7262
|
void 0 === e && (e = {}), v.forEach((t2) => {
|
|
7263
7263
|
!t2.props.limit || e.containerId && t2.id !== e.containerId || t2.clearQueue();
|
|
7264
7264
|
});
|
|
7265
|
-
}, B$
|
|
7265
|
+
}, B$2.isActive = I, B$2.update = function(e, t2) {
|
|
7266
7266
|
void 0 === t2 && (t2 = {});
|
|
7267
7267
|
const n2 = ((e2, t3) => {
|
|
7268
7268
|
var n3;
|
|
@@ -7273,28 +7273,28 @@ B$1.loading = (e, t2) => M$1(e, x("default", { isLoading: true, autoClose: false
|
|
|
7273
7273
|
const { props: o, content: s } = n2, a = { delay: 100, ...o, ...t2, toastId: t2.toastId || e, updateId: k$2() };
|
|
7274
7274
|
a.toastId !== e && (a.staleId = e);
|
|
7275
7275
|
const r2 = a.render || s;
|
|
7276
|
-
delete a.render, M
|
|
7276
|
+
delete a.render, M(r2, a);
|
|
7277
7277
|
}
|
|
7278
|
-
}, B$
|
|
7279
|
-
B$
|
|
7280
|
-
}, B$
|
|
7278
|
+
}, B$2.done = (e) => {
|
|
7279
|
+
B$2.update(e, { progress: 1 });
|
|
7280
|
+
}, B$2.onChange = function(e) {
|
|
7281
7281
|
return T$1.add(e), () => {
|
|
7282
7282
|
T$1.delete(e);
|
|
7283
7283
|
};
|
|
7284
|
-
}, B$
|
|
7284
|
+
}, B$2.play = (e) => C(true, e), B$2.pause = (e) => C(false, e);
|
|
7285
7285
|
const O = "undefined" != typeof window ? reactExports.useLayoutEffect : reactExports.useEffect, D$1 = (t2) => {
|
|
7286
7286
|
let { theme: n2, type: o, isLoading: s, ...a } = t2;
|
|
7287
|
-
return React$
|
|
7287
|
+
return React$1.createElement("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%", fill: "colored" === n2 ? "currentColor" : `var(--toastify-icon-color-${o})`, ...a });
|
|
7288
7288
|
}, z$1 = { info: function(t2) {
|
|
7289
|
-
return React$
|
|
7289
|
+
return React$1.createElement(D$1, { ...t2 }, React$1.createElement("path", { d: "M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z" }));
|
|
7290
7290
|
}, warning: function(t2) {
|
|
7291
|
-
return React$
|
|
7291
|
+
return React$1.createElement(D$1, { ...t2 }, React$1.createElement("path", { d: "M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z" }));
|
|
7292
7292
|
}, success: function(t2) {
|
|
7293
|
-
return React$
|
|
7293
|
+
return React$1.createElement(D$1, { ...t2 }, React$1.createElement("path", { d: "M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z" }));
|
|
7294
7294
|
}, error: function(t2) {
|
|
7295
|
-
return React$
|
|
7295
|
+
return React$1.createElement(D$1, { ...t2 }, React$1.createElement("path", { d: "M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z" }));
|
|
7296
7296
|
}, spinner: function() {
|
|
7297
|
-
return React$
|
|
7297
|
+
return React$1.createElement("div", { className: "Toastify__spinner" });
|
|
7298
7298
|
} }, R = (n2) => {
|
|
7299
7299
|
const { isRunning: o, preventExitTransition: s, toastRef: r2, eventHandlers: i, playToast: c2 } = N$1(n2), { closeButton: d2, children: p2, autoClose: m2, onClick: f2, type: g2, hideProgressBar: y2, closeToast: v2, transition: h2, position: T2, className: E2, style: b2, bodyClassName: I2, bodyStyle: _2, progressClassName: C2, progressStyle: L2, updateId: w2, role: k2, progress: P2, rtl: M2, toastId: x2, deleteToast: A2, isIn: B2, isLoading: O2, closeOnClick: D2, theme: R2 } = n2, S2 = clsx("Toastify__toast", `Toastify__toast-theme--${R2}`, `Toastify__toast--${g2}`, { "Toastify__toast--rtl": M2 }, { "Toastify__toast--close-on-click": D2 }), H2 = u$1(E2) ? E2({ rtl: M2, position: T2, type: g2, defaultClassName: S2 }) : clsx(S2, E2), F2 = function(e) {
|
|
7300
7300
|
let { theme: n3, type: o2, isLoading: s2, icon: r3 } = e, i2 = null;
|
|
@@ -7304,10 +7304,10 @@ const O = "undefined" != typeof window ? reactExports.useLayoutEffect : reactExp
|
|
|
7304
7304
|
let q2 = null;
|
|
7305
7305
|
return false === d2 || (q2 = u$1(d2) ? d2(Y2) : reactExports.isValidElement(d2) ? reactExports.cloneElement(d2, Y2) : function(t2) {
|
|
7306
7306
|
let { closeToast: n3, theme: o2, ariaLabel: s2 = "close" } = t2;
|
|
7307
|
-
return React$
|
|
7307
|
+
return React$1.createElement("button", { className: `Toastify__close-button Toastify__close-button--${o2}`, type: "button", onClick: (e) => {
|
|
7308
7308
|
e.stopPropagation(), n3(e);
|
|
7309
|
-
}, "aria-label": s2 }, React$
|
|
7310
|
-
}(Y2)), React$
|
|
7309
|
+
}, "aria-label": s2 }, React$1.createElement("svg", { "aria-hidden": "true", viewBox: "0 0 14 16" }, React$1.createElement("path", { fillRule: "evenodd", d: "M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z" })));
|
|
7310
|
+
}(Y2)), React$1.createElement(h2, { isIn: B2, done: A2, position: T2, preventExitTransition: s, nodeRef: r2, playToast: c2 }, React$1.createElement("div", { id: x2, onClick: f2, "data-in": B2, className: H2, ...i, style: b2, ref: r2 }, React$1.createElement("div", { ...B2 && { role: k2 }, className: u$1(I2) ? I2({ type: g2 }) : clsx("Toastify__toast-body", I2), style: _2 }, null != F2 && React$1.createElement("div", { className: clsx("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !O2 }) }, F2), React$1.createElement("div", null, p2)), q2, React$1.createElement($$1, { ...w2 && !X2 ? { key: `pb-${w2}` } : {}, rtl: M2, theme: R2, delay: m2, isRunning: o, isIn: B2, closeToast: v2, hide: y2, type: g2, style: L2, className: C2, controlledProgress: X2, progress: P2 || 0 })));
|
|
7311
7311
|
}, S = function(e, t2) {
|
|
7312
7312
|
return void 0 === t2 && (t2 = false), { enter: `Toastify--animate Toastify__${e}-enter`, exit: `Toastify--animate Toastify__${e}-exit`, appendPosition: t2 };
|
|
7313
7313
|
}, H$1 = g(S("bounce", true));
|
|
@@ -7315,15 +7315,15 @@ g(S("slide", true));
|
|
|
7315
7315
|
g(S("zoom"));
|
|
7316
7316
|
g(S("flip"));
|
|
7317
7317
|
const q = { position: "top-right", transition: H$1, autoClose: 5e3, closeButton: true, pauseOnHover: true, pauseOnFocusLoss: true, draggable: "touch", draggablePercent: 80, draggableDirection: "x", role: "alert", theme: "light" };
|
|
7318
|
-
function Q
|
|
7318
|
+
function Q(t2) {
|
|
7319
7319
|
let o = { ...q, ...t2 };
|
|
7320
|
-
const s = t2.stacked, [a, r2] = reactExports.useState(true), c2 = reactExports.useRef(null), { getToastToRender: d2, isToastActive: m2, count: f2 } = L(o), { className: g2, style: y2, rtl: v2, containerId: h2 } = o;
|
|
7320
|
+
const s = t2.stacked, [a, r2] = reactExports.useState(true), c2 = reactExports.useRef(null), { getToastToRender: d2, isToastActive: m2, count: f2 } = L$1(o), { className: g2, style: y2, rtl: v2, containerId: h2 } = o;
|
|
7321
7321
|
function T2(e) {
|
|
7322
7322
|
const t3 = clsx("Toastify__toast-container", `Toastify__toast-container--${e}`, { "Toastify__toast-container--rtl": v2 });
|
|
7323
7323
|
return u$1(g2) ? g2({ position: e, rtl: v2, defaultClassName: t3 }) : clsx(t3, p$1(g2));
|
|
7324
7324
|
}
|
|
7325
7325
|
function E2() {
|
|
7326
|
-
s && (r2(true), B$
|
|
7326
|
+
s && (r2(true), B$2.play());
|
|
7327
7327
|
}
|
|
7328
7328
|
return O(() => {
|
|
7329
7329
|
if (s) {
|
|
@@ -7337,13 +7337,13 @@ function Q$1(t2) {
|
|
|
7337
7337
|
o2.style.setProperty("--y", `${s2 ? l2 : -1 * l2}px`), o2.style.setProperty("--g", `${n2}`), o2.style.setProperty("--s", "" + (1 - (a ? i : 0))), r3 += o2.offsetHeight, i += 0.025;
|
|
7338
7338
|
});
|
|
7339
7339
|
}
|
|
7340
|
-
}, [a, f2, s]), React$
|
|
7341
|
-
s && (r2(false), B$
|
|
7340
|
+
}, [a, f2, s]), React$1.createElement("div", { ref: c2, className: "Toastify", id: h2, onMouseEnter: () => {
|
|
7341
|
+
s && (r2(false), B$2.pause());
|
|
7342
7342
|
}, onMouseLeave: E2 }, d2((t3, n2) => {
|
|
7343
7343
|
const o2 = n2.length ? { ...y2 } : { ...y2, pointerEvents: "none" };
|
|
7344
|
-
return React$
|
|
7344
|
+
return React$1.createElement("div", { className: T2(t3), style: o2, key: `container-${t3}` }, n2.map((t4) => {
|
|
7345
7345
|
let { content: n3, props: o3 } = t4;
|
|
7346
|
-
return React$
|
|
7346
|
+
return React$1.createElement(R, { ...o3, stacked: s, collapseAll: E2, isIn: m2(o3.toastId, o3.containerId), style: o3.style, key: `toast-${o3.key}` }, n3);
|
|
7347
7347
|
}));
|
|
7348
7348
|
}));
|
|
7349
7349
|
}
|
|
@@ -7929,12 +7929,12 @@ const handleResult = (ctx, result) => {
|
|
|
7929
7929
|
function processCreateParams(params2) {
|
|
7930
7930
|
if (!params2)
|
|
7931
7931
|
return {};
|
|
7932
|
-
const { errorMap: errorMap2, invalid_type_error, required_error, description } = params2;
|
|
7932
|
+
const { errorMap: errorMap2, invalid_type_error, required_error, description: description2 } = params2;
|
|
7933
7933
|
if (errorMap2 && (invalid_type_error || required_error)) {
|
|
7934
7934
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
7935
7935
|
}
|
|
7936
7936
|
if (errorMap2)
|
|
7937
|
-
return { errorMap: errorMap2, description };
|
|
7937
|
+
return { errorMap: errorMap2, description: description2 };
|
|
7938
7938
|
const customMap = (iss, ctx) => {
|
|
7939
7939
|
var _a, _b;
|
|
7940
7940
|
const { message } = params2;
|
|
@@ -7948,7 +7948,7 @@ function processCreateParams(params2) {
|
|
|
7948
7948
|
return { message: ctx.defaultError };
|
|
7949
7949
|
return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
|
|
7950
7950
|
};
|
|
7951
|
-
return { errorMap: customMap, description };
|
|
7951
|
+
return { errorMap: customMap, description: description2 };
|
|
7952
7952
|
}
|
|
7953
7953
|
class ZodType {
|
|
7954
7954
|
get description() {
|
|
@@ -8215,11 +8215,11 @@ class ZodType {
|
|
|
8215
8215
|
typeName: ZodFirstPartyTypeKind.ZodCatch
|
|
8216
8216
|
});
|
|
8217
8217
|
}
|
|
8218
|
-
describe(
|
|
8218
|
+
describe(description2) {
|
|
8219
8219
|
const This = this.constructor;
|
|
8220
8220
|
return new This({
|
|
8221
8221
|
...this._def,
|
|
8222
|
-
description
|
|
8222
|
+
description: description2
|
|
8223
8223
|
});
|
|
8224
8224
|
}
|
|
8225
8225
|
pipe(target) {
|
|
@@ -10091,33 +10091,33 @@ ZodUnion.create = (types, params2) => {
|
|
|
10091
10091
|
...processCreateParams(params2)
|
|
10092
10092
|
});
|
|
10093
10093
|
};
|
|
10094
|
-
const getDiscriminator = (
|
|
10095
|
-
if (
|
|
10096
|
-
return getDiscriminator(
|
|
10097
|
-
} else if (
|
|
10098
|
-
return getDiscriminator(
|
|
10099
|
-
} else if (
|
|
10100
|
-
return [
|
|
10101
|
-
} else if (
|
|
10102
|
-
return
|
|
10103
|
-
} else if (
|
|
10104
|
-
return util.objectValues(
|
|
10105
|
-
} else if (
|
|
10106
|
-
return getDiscriminator(
|
|
10107
|
-
} else if (
|
|
10094
|
+
const getDiscriminator = (type2) => {
|
|
10095
|
+
if (type2 instanceof ZodLazy) {
|
|
10096
|
+
return getDiscriminator(type2.schema);
|
|
10097
|
+
} else if (type2 instanceof ZodEffects) {
|
|
10098
|
+
return getDiscriminator(type2.innerType());
|
|
10099
|
+
} else if (type2 instanceof ZodLiteral) {
|
|
10100
|
+
return [type2.value];
|
|
10101
|
+
} else if (type2 instanceof ZodEnum) {
|
|
10102
|
+
return type2.options;
|
|
10103
|
+
} else if (type2 instanceof ZodNativeEnum) {
|
|
10104
|
+
return util.objectValues(type2.enum);
|
|
10105
|
+
} else if (type2 instanceof ZodDefault) {
|
|
10106
|
+
return getDiscriminator(type2._def.innerType);
|
|
10107
|
+
} else if (type2 instanceof ZodUndefined) {
|
|
10108
10108
|
return [void 0];
|
|
10109
|
-
} else if (
|
|
10109
|
+
} else if (type2 instanceof ZodNull) {
|
|
10110
10110
|
return [null];
|
|
10111
|
-
} else if (
|
|
10112
|
-
return [void 0, ...getDiscriminator(
|
|
10113
|
-
} else if (
|
|
10114
|
-
return [null, ...getDiscriminator(
|
|
10115
|
-
} else if (
|
|
10116
|
-
return getDiscriminator(
|
|
10117
|
-
} else if (
|
|
10118
|
-
return getDiscriminator(
|
|
10119
|
-
} else if (
|
|
10120
|
-
return getDiscriminator(
|
|
10111
|
+
} else if (type2 instanceof ZodOptional) {
|
|
10112
|
+
return [void 0, ...getDiscriminator(type2.unwrap())];
|
|
10113
|
+
} else if (type2 instanceof ZodNullable) {
|
|
10114
|
+
return [null, ...getDiscriminator(type2.unwrap())];
|
|
10115
|
+
} else if (type2 instanceof ZodBranded) {
|
|
10116
|
+
return getDiscriminator(type2.unwrap());
|
|
10117
|
+
} else if (type2 instanceof ZodReadonly) {
|
|
10118
|
+
return getDiscriminator(type2.unwrap());
|
|
10119
|
+
} else if (type2 instanceof ZodCatch) {
|
|
10120
|
+
return getDiscriminator(type2._def.innerType);
|
|
10121
10121
|
} else {
|
|
10122
10122
|
return [];
|
|
10123
10123
|
}
|
|
@@ -10177,8 +10177,8 @@ class ZodDiscriminatedUnion extends ZodType {
|
|
|
10177
10177
|
*/
|
|
10178
10178
|
static create(discriminator, options, params2) {
|
|
10179
10179
|
const optionsMap = /* @__PURE__ */ new Map();
|
|
10180
|
-
for (const
|
|
10181
|
-
const discriminatorValues = getDiscriminator(
|
|
10180
|
+
for (const type2 of options) {
|
|
10181
|
+
const discriminatorValues = getDiscriminator(type2.shape[discriminator]);
|
|
10182
10182
|
if (!discriminatorValues.length) {
|
|
10183
10183
|
throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
|
|
10184
10184
|
}
|
|
@@ -10186,7 +10186,7 @@ class ZodDiscriminatedUnion extends ZodType {
|
|
|
10186
10186
|
if (optionsMap.has(value)) {
|
|
10187
10187
|
throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);
|
|
10188
10188
|
}
|
|
10189
|
-
optionsMap.set(value,
|
|
10189
|
+
optionsMap.set(value, type2);
|
|
10190
10190
|
}
|
|
10191
10191
|
}
|
|
10192
10192
|
return new ZodDiscriminatedUnion({
|
|
@@ -11014,9 +11014,9 @@ class ZodOptional extends ZodType {
|
|
|
11014
11014
|
return this._def.innerType;
|
|
11015
11015
|
}
|
|
11016
11016
|
}
|
|
11017
|
-
ZodOptional.create = (
|
|
11017
|
+
ZodOptional.create = (type2, params2) => {
|
|
11018
11018
|
return new ZodOptional({
|
|
11019
|
-
innerType:
|
|
11019
|
+
innerType: type2,
|
|
11020
11020
|
typeName: ZodFirstPartyTypeKind.ZodOptional,
|
|
11021
11021
|
...processCreateParams(params2)
|
|
11022
11022
|
});
|
|
@@ -11033,9 +11033,9 @@ class ZodNullable extends ZodType {
|
|
|
11033
11033
|
return this._def.innerType;
|
|
11034
11034
|
}
|
|
11035
11035
|
}
|
|
11036
|
-
ZodNullable.create = (
|
|
11036
|
+
ZodNullable.create = (type2, params2) => {
|
|
11037
11037
|
return new ZodNullable({
|
|
11038
|
-
innerType:
|
|
11038
|
+
innerType: type2,
|
|
11039
11039
|
typeName: ZodFirstPartyTypeKind.ZodNullable,
|
|
11040
11040
|
...processCreateParams(params2)
|
|
11041
11041
|
});
|
|
@@ -11057,9 +11057,9 @@ class ZodDefault extends ZodType {
|
|
|
11057
11057
|
return this._def.innerType;
|
|
11058
11058
|
}
|
|
11059
11059
|
}
|
|
11060
|
-
ZodDefault.create = (
|
|
11060
|
+
ZodDefault.create = (type2, params2) => {
|
|
11061
11061
|
return new ZodDefault({
|
|
11062
|
-
innerType:
|
|
11062
|
+
innerType: type2,
|
|
11063
11063
|
typeName: ZodFirstPartyTypeKind.ZodDefault,
|
|
11064
11064
|
defaultValue: typeof params2.default === "function" ? params2.default : () => params2.default,
|
|
11065
11065
|
...processCreateParams(params2)
|
|
@@ -11110,9 +11110,9 @@ class ZodCatch extends ZodType {
|
|
|
11110
11110
|
return this._def.innerType;
|
|
11111
11111
|
}
|
|
11112
11112
|
}
|
|
11113
|
-
ZodCatch.create = (
|
|
11113
|
+
ZodCatch.create = (type2, params2) => {
|
|
11114
11114
|
return new ZodCatch({
|
|
11115
|
-
innerType:
|
|
11115
|
+
innerType: type2,
|
|
11116
11116
|
typeName: ZodFirstPartyTypeKind.ZodCatch,
|
|
11117
11117
|
catchValue: typeof params2.catch === "function" ? params2.catch : () => params2.catch,
|
|
11118
11118
|
...processCreateParams(params2)
|
|
@@ -11224,9 +11224,9 @@ class ZodReadonly extends ZodType {
|
|
|
11224
11224
|
return this._def.innerType;
|
|
11225
11225
|
}
|
|
11226
11226
|
}
|
|
11227
|
-
ZodReadonly.create = (
|
|
11227
|
+
ZodReadonly.create = (type2, params2) => {
|
|
11228
11228
|
return new ZodReadonly({
|
|
11229
|
-
innerType:
|
|
11229
|
+
innerType: type2,
|
|
11230
11230
|
typeName: ZodFirstPartyTypeKind.ZodReadonly,
|
|
11231
11231
|
...processCreateParams(params2)
|
|
11232
11232
|
});
|
|
@@ -12180,7 +12180,7 @@ class McpError extends Error {
|
|
|
12180
12180
|
this.name = "McpError";
|
|
12181
12181
|
}
|
|
12182
12182
|
}
|
|
12183
|
-
const DEFAULT_REQUEST_TIMEOUT_MSEC
|
|
12183
|
+
const DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
|
|
12184
12184
|
class Protocol {
|
|
12185
12185
|
constructor(_options) {
|
|
12186
12186
|
this._options = _options;
|
|
@@ -12437,7 +12437,7 @@ class Protocol {
|
|
|
12437
12437
|
var _a2;
|
|
12438
12438
|
cancel((_a2 = options === null || options === void 0 ? void 0 : options.signal) === null || _a2 === void 0 ? void 0 : _a2.reason);
|
|
12439
12439
|
});
|
|
12440
|
-
const timeout = (_d = options === null || options === void 0 ? void 0 : options.timeout) !== null && _d !== void 0 ? _d : DEFAULT_REQUEST_TIMEOUT_MSEC
|
|
12440
|
+
const timeout = (_d = options === null || options === void 0 ? void 0 : options.timeout) !== null && _d !== void 0 ? _d : DEFAULT_REQUEST_TIMEOUT_MSEC;
|
|
12441
12441
|
const timeoutHandler = () => cancel(new McpError(ErrorCode.RequestTimeout, "Request timed out", { timeout }));
|
|
12442
12442
|
this._setupTimeout(messageId, timeout, options === null || options === void 0 ? void 0 : options.maxTotalTimeout, timeoutHandler);
|
|
12443
12443
|
this._transport.send(jsonrpcRequest).catch((error) => {
|
|
@@ -12583,7 +12583,7 @@ class Client extends Protocol {
|
|
|
12583
12583
|
return this._instructions;
|
|
12584
12584
|
}
|
|
12585
12585
|
assertCapabilityForMethod(method) {
|
|
12586
|
-
var _a, _b, _c, _d,
|
|
12586
|
+
var _a, _b, _c, _d, _e2;
|
|
12587
12587
|
switch (method) {
|
|
12588
12588
|
case "logging/setLevel":
|
|
12589
12589
|
if (!((_a = this._serverCapabilities) === null || _a === void 0 ? void 0 : _a.logging)) {
|
|
@@ -12615,7 +12615,7 @@ class Client extends Protocol {
|
|
|
12615
12615
|
}
|
|
12616
12616
|
break;
|
|
12617
12617
|
case "completion/complete":
|
|
12618
|
-
if (!((
|
|
12618
|
+
if (!((_e2 = this._serverCapabilities) === null || _e2 === void 0 ? void 0 : _e2.prompts)) {
|
|
12619
12619
|
throw new Error(`Server does not support prompts (required for ${method})`);
|
|
12620
12620
|
}
|
|
12621
12621
|
break;
|
|
@@ -12685,15 +12685,18 @@ class Client extends Protocol {
|
|
|
12685
12685
|
return this.notification({ method: "notifications/roots/list_changed" });
|
|
12686
12686
|
}
|
|
12687
12687
|
}
|
|
12688
|
-
var __defProp = Object.defineProperty, __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value, __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
|
|
12689
12688
|
class ParseError extends Error {
|
|
12690
12689
|
constructor(message, options) {
|
|
12691
|
-
super(message),
|
|
12690
|
+
super(message), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
|
|
12692
12691
|
}
|
|
12693
12692
|
}
|
|
12694
12693
|
function noop(_arg) {
|
|
12695
12694
|
}
|
|
12696
12695
|
function createParser(callbacks) {
|
|
12696
|
+
if (typeof callbacks == "function")
|
|
12697
|
+
throw new TypeError(
|
|
12698
|
+
"`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
|
|
12699
|
+
);
|
|
12697
12700
|
const { onEvent = noop, onError = noop, onRetry = noop, onComment } = callbacks;
|
|
12698
12701
|
let incompleteLine = "", isFirstChunk = true, id2, data = "", eventType = "";
|
|
12699
12702
|
function feed(newChunk) {
|
|
@@ -12761,19 +12764,25 @@ function createParser(callbacks) {
|
|
|
12761
12764
|
}), id2 = void 0, data = "", eventType = "";
|
|
12762
12765
|
}
|
|
12763
12766
|
function reset(options = {}) {
|
|
12764
|
-
incompleteLine && options.consume && parseLine(incompleteLine), id2 = void 0, data = "", eventType = "", incompleteLine = "";
|
|
12767
|
+
incompleteLine && options.consume && parseLine(incompleteLine), isFirstChunk = true, id2 = void 0, data = "", eventType = "", incompleteLine = "";
|
|
12765
12768
|
}
|
|
12766
12769
|
return { feed, reset };
|
|
12767
12770
|
}
|
|
12768
12771
|
function splitLines(chunk) {
|
|
12769
12772
|
const lines = [];
|
|
12770
|
-
let incompleteLine = "";
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
12774
|
-
|
|
12775
|
-
|
|
12776
|
-
|
|
12773
|
+
let incompleteLine = "", searchIndex = 0;
|
|
12774
|
+
for (; searchIndex < chunk.length; ) {
|
|
12775
|
+
const crIndex = chunk.indexOf("\r", searchIndex), lfIndex = chunk.indexOf(`
|
|
12776
|
+
`, searchIndex);
|
|
12777
|
+
let lineEnd = -1;
|
|
12778
|
+
if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = Math.min(crIndex, lfIndex) : crIndex !== -1 ? lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1) {
|
|
12779
|
+
incompleteLine = chunk.slice(searchIndex);
|
|
12780
|
+
break;
|
|
12781
|
+
} else {
|
|
12782
|
+
const line = chunk.slice(searchIndex, lineEnd);
|
|
12783
|
+
lines.push(line), searchIndex = lineEnd + 1, chunk[searchIndex - 1] === "\r" && chunk[searchIndex] === `
|
|
12784
|
+
` && searchIndex++;
|
|
12785
|
+
}
|
|
12777
12786
|
}
|
|
12778
12787
|
return [lines, incompleteLine];
|
|
12779
12788
|
}
|
|
@@ -12785,9 +12794,9 @@ class ErrorEvent extends Event {
|
|
|
12785
12794
|
* @param type - The type of the event (should be "error")
|
|
12786
12795
|
* @param errorEventInitDict - Optional properties to include in the error event
|
|
12787
12796
|
*/
|
|
12788
|
-
constructor(
|
|
12797
|
+
constructor(type2, errorEventInitDict) {
|
|
12789
12798
|
var _a, _b;
|
|
12790
|
-
super(
|
|
12799
|
+
super(type2), this.code = (_a = errorEventInitDict == null ? void 0 : errorEventInitDict.code) != null ? _a : void 0, this.message = (_b = errorEventInitDict == null ? void 0 : errorEventInitDict.message) != null ? _b : void 0;
|
|
12791
12800
|
}
|
|
12792
12801
|
/**
|
|
12793
12802
|
* Node.js "hides" the `message` and `code` properties of the `ErrorEvent` instance,
|
|
@@ -12954,13 +12963,13 @@ class EventSource extends EventTarget {
|
|
|
12954
12963
|
set onopen(value) {
|
|
12955
12964
|
__privateSet(this, _onOpen, value);
|
|
12956
12965
|
}
|
|
12957
|
-
addEventListener(
|
|
12966
|
+
addEventListener(type2, listener, options) {
|
|
12958
12967
|
const listen = listener;
|
|
12959
|
-
super.addEventListener(
|
|
12968
|
+
super.addEventListener(type2, listen, options);
|
|
12960
12969
|
}
|
|
12961
|
-
removeEventListener(
|
|
12970
|
+
removeEventListener(type2, listener, options) {
|
|
12962
12971
|
const listen = listener;
|
|
12963
|
-
super.removeEventListener(
|
|
12972
|
+
super.removeEventListener(type2, listen, options);
|
|
12964
12973
|
}
|
|
12965
12974
|
/**
|
|
12966
12975
|
* Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
|
|
@@ -13494,6 +13503,12 @@ const SESSION_KEYS = {
|
|
|
13494
13503
|
TOKENS: "mcp_tokens",
|
|
13495
13504
|
CLIENT_INFORMATION: "mcp_client_information"
|
|
13496
13505
|
};
|
|
13506
|
+
const DEFAULT_INSPECTOR_CONFIG = {
|
|
13507
|
+
MCP_SERVER_REQUEST_TIMEOUT: {
|
|
13508
|
+
description: "Timeout for requests to the MCP server (ms)",
|
|
13509
|
+
value: 1e4
|
|
13510
|
+
}
|
|
13511
|
+
};
|
|
13497
13512
|
const StdErrNotificationSchema = NotificationSchema.extend({
|
|
13498
13513
|
method: z.literal("notifications/stderr"),
|
|
13499
13514
|
params: z.object({
|
|
@@ -13502,7 +13517,7 @@ const StdErrNotificationSchema = NotificationSchema.extend({
|
|
|
13502
13517
|
});
|
|
13503
13518
|
ClientNotificationSchema.or(
|
|
13504
13519
|
StdErrNotificationSchema
|
|
13505
|
-
).or(ServerNotificationSchema);
|
|
13520
|
+
).or(ServerNotificationSchema).or(NotificationSchema);
|
|
13506
13521
|
class InspectorOAuthClientProvider {
|
|
13507
13522
|
get redirectUrl() {
|
|
13508
13523
|
return window.location.origin + "/oauth/callback";
|
|
@@ -13555,8 +13570,95 @@ class InspectorOAuthClientProvider {
|
|
|
13555
13570
|
}
|
|
13556
13571
|
}
|
|
13557
13572
|
const authProvider = new InspectorOAuthClientProvider();
|
|
13558
|
-
const
|
|
13559
|
-
const
|
|
13573
|
+
const name = "@modelcontextprotocol/inspector-client";
|
|
13574
|
+
const version$1 = "0.8.0";
|
|
13575
|
+
const description = "Client-side application for the Model Context Protocol inspector";
|
|
13576
|
+
const license = "MIT";
|
|
13577
|
+
const author = "Anthropic, PBC (https://anthropic.com)";
|
|
13578
|
+
const homepage = "https://modelcontextprotocol.io";
|
|
13579
|
+
const bugs = "https://github.com/modelcontextprotocol/inspector/issues";
|
|
13580
|
+
const type = "module";
|
|
13581
|
+
const bin = {
|
|
13582
|
+
"mcp-inspector-client": "./bin/cli.js"
|
|
13583
|
+
};
|
|
13584
|
+
const files = [
|
|
13585
|
+
"bin",
|
|
13586
|
+
"dist"
|
|
13587
|
+
];
|
|
13588
|
+
const scripts = {
|
|
13589
|
+
dev: "vite",
|
|
13590
|
+
build: "tsc -b && vite build",
|
|
13591
|
+
lint: "eslint .",
|
|
13592
|
+
preview: "vite preview --port 6274",
|
|
13593
|
+
test: "jest --config jest.config.cjs",
|
|
13594
|
+
"test:watch": "jest --config jest.config.cjs --watch"
|
|
13595
|
+
};
|
|
13596
|
+
const dependencies = {
|
|
13597
|
+
"@modelcontextprotocol/sdk": "^1.6.1",
|
|
13598
|
+
"@radix-ui/react-checkbox": "^1.1.4",
|
|
13599
|
+
"@radix-ui/react-dialog": "^1.1.3",
|
|
13600
|
+
"@radix-ui/react-icons": "^1.3.0",
|
|
13601
|
+
"@radix-ui/react-label": "^2.1.0",
|
|
13602
|
+
"@radix-ui/react-popover": "^1.1.3",
|
|
13603
|
+
"@radix-ui/react-select": "^2.1.2",
|
|
13604
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
13605
|
+
"@radix-ui/react-tabs": "^1.1.1",
|
|
13606
|
+
"@types/prismjs": "^1.26.5",
|
|
13607
|
+
"class-variance-authority": "^0.7.0",
|
|
13608
|
+
clsx: "^2.1.1",
|
|
13609
|
+
cmdk: "^1.0.4",
|
|
13610
|
+
"lucide-react": "^0.447.0",
|
|
13611
|
+
"pkce-challenge": "^4.1.0",
|
|
13612
|
+
prismjs: "^1.30.0",
|
|
13613
|
+
react: "^18.3.1",
|
|
13614
|
+
"react-dom": "^18.3.1",
|
|
13615
|
+
"react-simple-code-editor": "^0.14.1",
|
|
13616
|
+
"react-toastify": "^10.0.6",
|
|
13617
|
+
"serve-handler": "^6.1.6",
|
|
13618
|
+
"tailwind-merge": "^2.5.3",
|
|
13619
|
+
"tailwindcss-animate": "^1.0.7",
|
|
13620
|
+
zod: "^3.23.8"
|
|
13621
|
+
};
|
|
13622
|
+
const devDependencies = {
|
|
13623
|
+
"@eslint/js": "^9.11.1",
|
|
13624
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
13625
|
+
"@testing-library/react": "^16.2.0",
|
|
13626
|
+
"@types/jest": "^29.5.14",
|
|
13627
|
+
"@types/node": "^22.7.5",
|
|
13628
|
+
"@types/react": "^18.3.10",
|
|
13629
|
+
"@types/react-dom": "^18.3.0",
|
|
13630
|
+
"@types/serve-handler": "^6.1.4",
|
|
13631
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
13632
|
+
autoprefixer: "^10.4.20",
|
|
13633
|
+
co: "^4.6.0",
|
|
13634
|
+
eslint: "^9.11.1",
|
|
13635
|
+
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
|
13636
|
+
"eslint-plugin-react-refresh": "^0.4.12",
|
|
13637
|
+
globals: "^15.9.0",
|
|
13638
|
+
jest: "^29.7.0",
|
|
13639
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
13640
|
+
postcss: "^8.4.47",
|
|
13641
|
+
tailwindcss: "^3.4.13",
|
|
13642
|
+
"ts-jest": "^29.2.6",
|
|
13643
|
+
typescript: "^5.5.3",
|
|
13644
|
+
"typescript-eslint": "^8.7.0",
|
|
13645
|
+
vite: "^5.4.8"
|
|
13646
|
+
};
|
|
13647
|
+
const packageJson = {
|
|
13648
|
+
name,
|
|
13649
|
+
version: version$1,
|
|
13650
|
+
description,
|
|
13651
|
+
license,
|
|
13652
|
+
author,
|
|
13653
|
+
homepage,
|
|
13654
|
+
bugs,
|
|
13655
|
+
type,
|
|
13656
|
+
bin,
|
|
13657
|
+
files,
|
|
13658
|
+
scripts,
|
|
13659
|
+
dependencies,
|
|
13660
|
+
devDependencies
|
|
13661
|
+
};
|
|
13560
13662
|
function useConnection({
|
|
13561
13663
|
transportType,
|
|
13562
13664
|
command,
|
|
@@ -13565,7 +13667,7 @@ function useConnection({
|
|
|
13565
13667
|
env,
|
|
13566
13668
|
proxyServerUrl,
|
|
13567
13669
|
bearerToken,
|
|
13568
|
-
requestTimeout
|
|
13670
|
+
requestTimeout,
|
|
13569
13671
|
onNotification,
|
|
13570
13672
|
onStdErrNotification,
|
|
13571
13673
|
onPendingRequest,
|
|
@@ -13611,7 +13713,7 @@ function useConnection({
|
|
|
13611
13713
|
} catch (e) {
|
|
13612
13714
|
if (!(options == null ? void 0 : options.suppressToast)) {
|
|
13613
13715
|
const errorString = e.message ?? String(e);
|
|
13614
|
-
B$
|
|
13716
|
+
B$2.error(errorString);
|
|
13615
13717
|
}
|
|
13616
13718
|
throw e;
|
|
13617
13719
|
}
|
|
@@ -13641,14 +13743,14 @@ function useConnection({
|
|
|
13641
13743
|
setCompletionsSupported(false);
|
|
13642
13744
|
return [];
|
|
13643
13745
|
}
|
|
13644
|
-
B$
|
|
13746
|
+
B$2.error(e instanceof Error ? e.message : String(e));
|
|
13645
13747
|
throw e;
|
|
13646
13748
|
}
|
|
13647
13749
|
};
|
|
13648
13750
|
const sendNotification = async (notification) => {
|
|
13649
13751
|
if (!mcpClient) {
|
|
13650
13752
|
const error = new Error("MCP client not connected");
|
|
13651
|
-
B$
|
|
13753
|
+
B$2.error(error.message);
|
|
13652
13754
|
throw error;
|
|
13653
13755
|
}
|
|
13654
13756
|
try {
|
|
@@ -13658,7 +13760,7 @@ function useConnection({
|
|
|
13658
13760
|
if (e instanceof McpError) {
|
|
13659
13761
|
pushHistory(notification, { error: e.message });
|
|
13660
13762
|
}
|
|
13661
|
-
B$
|
|
13763
|
+
B$2.error(e instanceof Error ? e.message : String(e));
|
|
13662
13764
|
throw e;
|
|
13663
13765
|
}
|
|
13664
13766
|
};
|
|
@@ -13670,13 +13772,13 @@ function useConnection({
|
|
|
13670
13772
|
}
|
|
13671
13773
|
return false;
|
|
13672
13774
|
};
|
|
13673
|
-
const connect = async (
|
|
13775
|
+
const connect = async (_e2, retryCount = 0) => {
|
|
13674
13776
|
var _a;
|
|
13675
13777
|
try {
|
|
13676
13778
|
const client = new Client(
|
|
13677
13779
|
{
|
|
13678
13780
|
name: "mcp-inspector",
|
|
13679
|
-
version:
|
|
13781
|
+
version: packageJson.version
|
|
13680
13782
|
},
|
|
13681
13783
|
{
|
|
13682
13784
|
capabilities: {
|
|
@@ -13710,14 +13812,21 @@ function useConnection({
|
|
|
13710
13812
|
}
|
|
13711
13813
|
});
|
|
13712
13814
|
if (onNotification) {
|
|
13713
|
-
|
|
13815
|
+
[
|
|
13816
|
+
CancelledNotificationSchema,
|
|
13714
13817
|
ProgressNotificationSchema,
|
|
13715
|
-
|
|
13716
|
-
);
|
|
13717
|
-
client.setNotificationHandler(
|
|
13818
|
+
LoggingMessageNotificationSchema,
|
|
13718
13819
|
ResourceUpdatedNotificationSchema,
|
|
13719
|
-
|
|
13720
|
-
|
|
13820
|
+
ResourceListChangedNotificationSchema,
|
|
13821
|
+
ToolListChangedNotificationSchema,
|
|
13822
|
+
PromptListChangedNotificationSchema
|
|
13823
|
+
].forEach((notificationSchema) => {
|
|
13824
|
+
client.setNotificationHandler(notificationSchema, onNotification);
|
|
13825
|
+
});
|
|
13826
|
+
client.fallbackNotificationHandler = (notification) => {
|
|
13827
|
+
onNotification(notification);
|
|
13828
|
+
return Promise.resolve();
|
|
13829
|
+
};
|
|
13721
13830
|
}
|
|
13722
13831
|
if (onStdErrNotification) {
|
|
13723
13832
|
client.setNotificationHandler(
|
|
@@ -13760,6 +13869,13 @@ function useConnection({
|
|
|
13760
13869
|
setConnectionStatus("error");
|
|
13761
13870
|
}
|
|
13762
13871
|
};
|
|
13872
|
+
const disconnect = async () => {
|
|
13873
|
+
await (mcpClient == null ? void 0 : mcpClient.close());
|
|
13874
|
+
setMcpClient(null);
|
|
13875
|
+
setConnectionStatus("disconnected");
|
|
13876
|
+
setCompletionsSupported(false);
|
|
13877
|
+
setServerCapabilities(null);
|
|
13878
|
+
};
|
|
13763
13879
|
return {
|
|
13764
13880
|
connectionStatus,
|
|
13765
13881
|
serverCapabilities,
|
|
@@ -13769,7 +13885,8 @@ function useConnection({
|
|
|
13769
13885
|
sendNotification,
|
|
13770
13886
|
handleCompletion,
|
|
13771
13887
|
completionsSupported,
|
|
13772
|
-
connect
|
|
13888
|
+
connect,
|
|
13889
|
+
disconnect
|
|
13773
13890
|
};
|
|
13774
13891
|
}
|
|
13775
13892
|
function useDraggablePane(initialHeight) {
|
|
@@ -14010,8 +14127,8 @@ function getElementRef$1(element) {
|
|
|
14010
14127
|
}
|
|
14011
14128
|
return element.props.ref || element.ref;
|
|
14012
14129
|
}
|
|
14013
|
-
function createCollection(
|
|
14014
|
-
const PROVIDER_NAME =
|
|
14130
|
+
function createCollection(name2) {
|
|
14131
|
+
const PROVIDER_NAME = name2 + "CollectionProvider";
|
|
14015
14132
|
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME);
|
|
14016
14133
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
14017
14134
|
PROVIDER_NAME,
|
|
@@ -14019,13 +14136,13 @@ function createCollection(name) {
|
|
|
14019
14136
|
);
|
|
14020
14137
|
const CollectionProvider = (props) => {
|
|
14021
14138
|
const { scope, children } = props;
|
|
14022
|
-
const ref = React$
|
|
14023
|
-
const itemMap = React$
|
|
14139
|
+
const ref = React$1.useRef(null);
|
|
14140
|
+
const itemMap = React$1.useRef(/* @__PURE__ */ new Map()).current;
|
|
14024
14141
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
14025
14142
|
};
|
|
14026
14143
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
14027
|
-
const COLLECTION_SLOT_NAME =
|
|
14028
|
-
const CollectionSlot = React$
|
|
14144
|
+
const COLLECTION_SLOT_NAME = name2 + "CollectionSlot";
|
|
14145
|
+
const CollectionSlot = React$1.forwardRef(
|
|
14029
14146
|
(props, forwardedRef) => {
|
|
14030
14147
|
const { scope, children } = props;
|
|
14031
14148
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
@@ -14034,15 +14151,15 @@ function createCollection(name) {
|
|
|
14034
14151
|
}
|
|
14035
14152
|
);
|
|
14036
14153
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
14037
|
-
const ITEM_SLOT_NAME =
|
|
14154
|
+
const ITEM_SLOT_NAME = name2 + "CollectionItemSlot";
|
|
14038
14155
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
14039
|
-
const CollectionItemSlot = React$
|
|
14156
|
+
const CollectionItemSlot = React$1.forwardRef(
|
|
14040
14157
|
(props, forwardedRef) => {
|
|
14041
14158
|
const { scope, children, ...itemData } = props;
|
|
14042
|
-
const ref = React$
|
|
14159
|
+
const ref = React$1.useRef(null);
|
|
14043
14160
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
14044
14161
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
14045
|
-
React$
|
|
14162
|
+
React$1.useEffect(() => {
|
|
14046
14163
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
14047
14164
|
return () => void context.itemMap.delete(ref);
|
|
14048
14165
|
});
|
|
@@ -14051,8 +14168,8 @@ function createCollection(name) {
|
|
|
14051
14168
|
);
|
|
14052
14169
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
14053
14170
|
function useCollection2(scope) {
|
|
14054
|
-
const context = useCollectionContext(
|
|
14055
|
-
const getItems = React$
|
|
14171
|
+
const context = useCollectionContext(name2 + "CollectionConsumer", scope);
|
|
14172
|
+
const getItems = React$1.useCallback(() => {
|
|
14056
14173
|
const collectionNode = context.collectionRef.current;
|
|
14057
14174
|
if (!collectionNode) return [];
|
|
14058
14175
|
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
@@ -14072,7 +14189,7 @@ function createCollection(name) {
|
|
|
14072
14189
|
}
|
|
14073
14190
|
var useLayoutEffect2 = Boolean(globalThis == null ? void 0 : globalThis.document) ? reactExports.useLayoutEffect : () => {
|
|
14074
14191
|
};
|
|
14075
|
-
var useReactId = React$
|
|
14192
|
+
var useReactId = React$2["useId".toString()] || (() => void 0);
|
|
14076
14193
|
var count$1 = 0;
|
|
14077
14194
|
function useId(deterministicId) {
|
|
14078
14195
|
const [id2, setId] = reactExports.useState(useReactId());
|
|
@@ -17521,6 +17638,21 @@ const Plus = createLucideIcon("Plus", [
|
|
|
17521
17638
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
17522
17639
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
17523
17640
|
]);
|
|
17641
|
+
/**
|
|
17642
|
+
* @license lucide-react v0.447.0 - ISC
|
|
17643
|
+
*
|
|
17644
|
+
* This source code is licensed under the ISC license.
|
|
17645
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
17646
|
+
*/
|
|
17647
|
+
const RefreshCwOff = createLucideIcon("RefreshCwOff", [
|
|
17648
|
+
["path", { d: "M21 8L18.74 5.74A9.75 9.75 0 0 0 12 3C11 3 10.03 3.16 9.13 3.47", key: "1krf6h" }],
|
|
17649
|
+
["path", { d: "M8 16H3v5", key: "1cv678" }],
|
|
17650
|
+
["path", { d: "M3 12C3 9.51 4 7.26 5.64 5.64", key: "ruvoct" }],
|
|
17651
|
+
["path", { d: "m3 16 2.26 2.26A9.75 9.75 0 0 0 12 21c2.49 0 4.74-1 6.36-2.64", key: "19q130" }],
|
|
17652
|
+
["path", { d: "M21 12c0 1-.16 1.97-.47 2.87", key: "4w8emr" }],
|
|
17653
|
+
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
17654
|
+
["path", { d: "M22 22 2 2", key: "1r8tn9" }]
|
|
17655
|
+
]);
|
|
17524
17656
|
/**
|
|
17525
17657
|
* @license lucide-react v0.447.0 - ISC
|
|
17526
17658
|
*
|
|
@@ -17533,6 +17665,16 @@ const RefreshCw = createLucideIcon("RefreshCw", [
|
|
|
17533
17665
|
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
17534
17666
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
17535
17667
|
]);
|
|
17668
|
+
/**
|
|
17669
|
+
* @license lucide-react v0.447.0 - ISC
|
|
17670
|
+
*
|
|
17671
|
+
* This source code is licensed under the ISC license.
|
|
17672
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
17673
|
+
*/
|
|
17674
|
+
const RotateCcw = createLucideIcon("RotateCcw", [
|
|
17675
|
+
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
17676
|
+
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
17677
|
+
]);
|
|
17536
17678
|
/**
|
|
17537
17679
|
* @license lucide-react v0.447.0 - ISC
|
|
17538
17680
|
*
|
|
@@ -17566,7 +17708,182 @@ const Send = createLucideIcon("Send", [
|
|
|
17566
17708
|
],
|
|
17567
17709
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
17568
17710
|
]);
|
|
17711
|
+
/**
|
|
17712
|
+
* @license lucide-react v0.447.0 - ISC
|
|
17713
|
+
*
|
|
17714
|
+
* This source code is licensed under the ISC license.
|
|
17715
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
17716
|
+
*/
|
|
17717
|
+
const Settings = createLucideIcon("Settings", [
|
|
17718
|
+
[
|
|
17719
|
+
"path",
|
|
17720
|
+
{
|
|
17721
|
+
d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",
|
|
17722
|
+
key: "1qme2f"
|
|
17723
|
+
}
|
|
17724
|
+
],
|
|
17725
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
17726
|
+
]);
|
|
17569
17727
|
const ConsoleTab = () => /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "console", className: "h-96", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-gray-900 text-gray-100 p-4 rounded-lg h-full font-mono text-sm overflow-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "opacity-50", children: "Welcome to MCP Client Console" }) }) });
|
|
17728
|
+
function tryParseJson(str) {
|
|
17729
|
+
const trimmed = str.trim();
|
|
17730
|
+
if (!(trimmed.startsWith("{") && trimmed.endsWith("}")) && !(trimmed.startsWith("[") && trimmed.endsWith("]"))) {
|
|
17731
|
+
return { success: false, data: str };
|
|
17732
|
+
}
|
|
17733
|
+
try {
|
|
17734
|
+
return { success: true, data: JSON.parse(str) };
|
|
17735
|
+
} catch {
|
|
17736
|
+
return { success: false, data: str };
|
|
17737
|
+
}
|
|
17738
|
+
}
|
|
17739
|
+
const JsonView = reactExports.memo(
|
|
17740
|
+
({ data, name: name2, initialExpandDepth = 3 }) => {
|
|
17741
|
+
const normalizedData = typeof data === "string" ? tryParseJson(data).success ? tryParseJson(data).data : data : data;
|
|
17742
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-mono text-sm transition-all duration-300 ", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17743
|
+
JsonNode,
|
|
17744
|
+
{
|
|
17745
|
+
data: normalizedData,
|
|
17746
|
+
name: name2,
|
|
17747
|
+
depth: 0,
|
|
17748
|
+
initialExpandDepth
|
|
17749
|
+
}
|
|
17750
|
+
) });
|
|
17751
|
+
}
|
|
17752
|
+
);
|
|
17753
|
+
JsonView.displayName = "JsonView";
|
|
17754
|
+
const JsonNode = reactExports.memo(
|
|
17755
|
+
({ data, name: name2, depth = 0, initialExpandDepth }) => {
|
|
17756
|
+
const [isExpanded, setIsExpanded] = reactExports.useState(depth < initialExpandDepth);
|
|
17757
|
+
const getDataType = (value) => {
|
|
17758
|
+
if (Array.isArray(value)) return "array";
|
|
17759
|
+
if (value === null) return "null";
|
|
17760
|
+
return typeof value;
|
|
17761
|
+
};
|
|
17762
|
+
const dataType = getDataType(data);
|
|
17763
|
+
const typeStyleMap = {
|
|
17764
|
+
number: "text-blue-600",
|
|
17765
|
+
boolean: "text-amber-600",
|
|
17766
|
+
null: "text-purple-600",
|
|
17767
|
+
undefined: "text-gray-600",
|
|
17768
|
+
string: "text-green-600 break-all whitespace-pre-wrap",
|
|
17769
|
+
default: "text-gray-700"
|
|
17770
|
+
};
|
|
17771
|
+
const renderCollapsible = (isArray) => {
|
|
17772
|
+
const items = isArray ? data : Object.entries(data);
|
|
17773
|
+
const itemCount = items.length;
|
|
17774
|
+
const isEmpty = itemCount === 0;
|
|
17775
|
+
const symbolMap = {
|
|
17776
|
+
open: isArray ? "[" : "{",
|
|
17777
|
+
close: isArray ? "]" : "}",
|
|
17778
|
+
collapsed: isArray ? "[ ... ]" : "{ ... }",
|
|
17779
|
+
empty: isArray ? "[]" : "{}"
|
|
17780
|
+
};
|
|
17781
|
+
if (isEmpty) {
|
|
17782
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
|
|
17783
|
+
name2 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "mr-1 text-gray-600 dark:text-gray-400", children: [
|
|
17784
|
+
name2,
|
|
17785
|
+
":"
|
|
17786
|
+
] }),
|
|
17787
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-500", children: symbolMap.empty })
|
|
17788
|
+
] });
|
|
17789
|
+
}
|
|
17790
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col", children: [
|
|
17791
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
17792
|
+
"div",
|
|
17793
|
+
{
|
|
17794
|
+
className: "flex items-center mr-1 rounded cursor-pointer group hover:bg-gray-800/10 dark:hover:bg-gray-800/20",
|
|
17795
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
17796
|
+
children: [
|
|
17797
|
+
name2 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "mr-1 text-gray-600 dark:text-gray-400 dark:group-hover:text-gray-100 group-hover:text-gray-400", children: [
|
|
17798
|
+
name2,
|
|
17799
|
+
":"
|
|
17800
|
+
] }),
|
|
17801
|
+
isExpanded ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-600 dark:text-gray-400 dark:group-hover:text-gray-100 group-hover:text-gray-400", children: symbolMap.open }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
17802
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-600 dark:group-hover:text-gray-100 group-hover:text-gray-400", children: symbolMap.collapsed }),
|
|
17803
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "ml-1 text-gray-700 dark:group-hover:text-gray-100 group-hover:text-gray-400", children: [
|
|
17804
|
+
itemCount,
|
|
17805
|
+
" ",
|
|
17806
|
+
itemCount === 1 ? "item" : "items"
|
|
17807
|
+
] })
|
|
17808
|
+
] })
|
|
17809
|
+
]
|
|
17810
|
+
}
|
|
17811
|
+
),
|
|
17812
|
+
isExpanded && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
17813
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pl-2 ml-4 border-l border-gray-200 dark:border-gray-800", children: isArray ? items.map((item, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "my-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17814
|
+
JsonNode,
|
|
17815
|
+
{
|
|
17816
|
+
data: item,
|
|
17817
|
+
name: `${index2}`,
|
|
17818
|
+
depth: depth + 1,
|
|
17819
|
+
initialExpandDepth
|
|
17820
|
+
}
|
|
17821
|
+
) }, index2)) : items.map(([key, value]) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "my-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17822
|
+
JsonNode,
|
|
17823
|
+
{
|
|
17824
|
+
data: value,
|
|
17825
|
+
name: key,
|
|
17826
|
+
depth: depth + 1,
|
|
17827
|
+
initialExpandDepth
|
|
17828
|
+
}
|
|
17829
|
+
) }, key)) }),
|
|
17830
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-gray-600 dark:text-gray-400", children: symbolMap.close })
|
|
17831
|
+
] })
|
|
17832
|
+
] });
|
|
17833
|
+
};
|
|
17834
|
+
const renderString = (value) => {
|
|
17835
|
+
const maxLength = 100;
|
|
17836
|
+
const isTooLong = value.length > maxLength;
|
|
17837
|
+
if (!isTooLong) {
|
|
17838
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex mr-1 rounded hover:bg-gray-800/20", children: [
|
|
17839
|
+
name2 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "mr-1 text-gray-600 dark:text-gray-400", children: [
|
|
17840
|
+
name2,
|
|
17841
|
+
":"
|
|
17842
|
+
] }),
|
|
17843
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("pre", { className: typeStyleMap.string, children: [
|
|
17844
|
+
'"',
|
|
17845
|
+
value,
|
|
17846
|
+
'"'
|
|
17847
|
+
] })
|
|
17848
|
+
] });
|
|
17849
|
+
}
|
|
17850
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex mr-1 rounded group hover:bg-gray-800/20", children: [
|
|
17851
|
+
name2 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "mr-1 text-gray-600 dark:text-gray-400 dark:group-hover:text-gray-100 group-hover:text-gray-400", children: [
|
|
17852
|
+
name2,
|
|
17853
|
+
":"
|
|
17854
|
+
] }),
|
|
17855
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17856
|
+
"pre",
|
|
17857
|
+
{
|
|
17858
|
+
className: clsx(
|
|
17859
|
+
typeStyleMap.string,
|
|
17860
|
+
"cursor-pointer group-hover:text-green-500"
|
|
17861
|
+
),
|
|
17862
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
17863
|
+
title: isExpanded ? "Click to collapse" : "Click to expand",
|
|
17864
|
+
children: isExpanded ? `"${value}"` : `"${value.slice(0, maxLength)}..."`
|
|
17865
|
+
}
|
|
17866
|
+
)
|
|
17867
|
+
] });
|
|
17868
|
+
};
|
|
17869
|
+
switch (dataType) {
|
|
17870
|
+
case "object":
|
|
17871
|
+
case "array":
|
|
17872
|
+
return renderCollapsible(dataType === "array");
|
|
17873
|
+
case "string":
|
|
17874
|
+
return renderString(data);
|
|
17875
|
+
default:
|
|
17876
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center mr-1 rounded hover:bg-gray-800/20", children: [
|
|
17877
|
+
name2 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "mr-1 text-gray-600 dark:text-gray-400", children: [
|
|
17878
|
+
name2,
|
|
17879
|
+
":"
|
|
17880
|
+
] }),
|
|
17881
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: typeStyleMap[dataType] || typeStyleMap.default, children: data === null ? "null" : String(data) })
|
|
17882
|
+
] });
|
|
17883
|
+
}
|
|
17884
|
+
}
|
|
17885
|
+
);
|
|
17886
|
+
JsonNode.displayName = "JsonNode";
|
|
17570
17887
|
const HistoryAndNotifications = ({
|
|
17571
17888
|
requestHistory,
|
|
17572
17889
|
serverNotifications
|
|
@@ -17619,7 +17936,7 @@ const HistoryAndNotifications = ({
|
|
|
17619
17936
|
}
|
|
17620
17937
|
)
|
|
17621
17938
|
] }),
|
|
17622
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
17939
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-background p-2 rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx(JsonView, { data: request.request }) })
|
|
17623
17940
|
] }),
|
|
17624
17941
|
request.response && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2", children: [
|
|
17625
17942
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center mb-1", children: [
|
|
@@ -17633,11 +17950,7 @@ const HistoryAndNotifications = ({
|
|
|
17633
17950
|
}
|
|
17634
17951
|
)
|
|
17635
17952
|
] }),
|
|
17636
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
17637
|
-
JSON.parse(request.response),
|
|
17638
|
-
null,
|
|
17639
|
-
2
|
|
17640
|
-
) })
|
|
17953
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-background p-2 rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx(JsonView, { data: request.response }) })
|
|
17641
17954
|
] })
|
|
17642
17955
|
] })
|
|
17643
17956
|
]
|
|
@@ -17680,7 +17993,12 @@ const HistoryAndNotifications = ({
|
|
|
17680
17993
|
}
|
|
17681
17994
|
)
|
|
17682
17995
|
] }),
|
|
17683
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
17996
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-background p-2 rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17997
|
+
JsonView,
|
|
17998
|
+
{
|
|
17999
|
+
data: JSON.stringify(notification, null, 2)
|
|
18000
|
+
}
|
|
18001
|
+
) })
|
|
17684
18002
|
] })
|
|
17685
18003
|
]
|
|
17686
18004
|
},
|
|
@@ -17821,19 +18139,19 @@ const AlertDescription = reactExports.forwardRef(({ className: className2, ...pr
|
|
|
17821
18139
|
));
|
|
17822
18140
|
AlertDescription.displayName = "AlertDescription";
|
|
17823
18141
|
var U = 1, Y$1 = 0.9, H = 0.8, J = 0.17, p = 0.1, u = 0.999, $ = 0.9999;
|
|
17824
|
-
var k$1 = 0.99, m = /[\\\/_+.#"@\[\(\{&]/, B = /[\\\/_+.#"@\[\(\{&]/g, K$1 = /[\s-]/, X = /[\s-]/g;
|
|
17825
|
-
function G
|
|
18142
|
+
var k$1 = 0.99, m = /[\\\/_+.#"@\[\(\{&]/, B$1 = /[\\\/_+.#"@\[\(\{&]/g, K$1 = /[\s-]/, X = /[\s-]/g;
|
|
18143
|
+
function G(_2, C2, h2, P2, A2, f2, O2) {
|
|
17826
18144
|
if (f2 === C2.length) return A2 === _2.length ? U : k$1;
|
|
17827
18145
|
var T2 = `${A2},${f2}`;
|
|
17828
18146
|
if (O2[T2] !== void 0) return O2[T2];
|
|
17829
|
-
for (var L2 = P2.charAt(f2), c2 = h2.indexOf(L2, A2), S2 = 0, E2, N2, R2, M2; c2 >= 0; ) E2 = G
|
|
18147
|
+
for (var L2 = P2.charAt(f2), c2 = h2.indexOf(L2, A2), S2 = 0, E2, N2, R2, M2; c2 >= 0; ) E2 = G(_2, C2, h2, P2, c2 + 1, f2 + 1, O2), E2 > S2 && (c2 === A2 ? E2 *= U : m.test(_2.charAt(c2 - 1)) ? (E2 *= H, R2 = _2.slice(A2, c2 - 1).match(B$1), R2 && A2 > 0 && (E2 *= Math.pow(u, R2.length))) : K$1.test(_2.charAt(c2 - 1)) ? (E2 *= Y$1, M2 = _2.slice(A2, c2 - 1).match(X), M2 && A2 > 0 && (E2 *= Math.pow(u, M2.length))) : (E2 *= J, A2 > 0 && (E2 *= Math.pow(u, c2 - A2))), _2.charAt(c2) !== C2.charAt(f2) && (E2 *= $)), (E2 < p && h2.charAt(c2 - 1) === P2.charAt(f2 + 1) || P2.charAt(f2 + 1) === P2.charAt(f2) && h2.charAt(c2 - 1) !== P2.charAt(f2)) && (N2 = G(_2, C2, h2, P2, c2 + 1, f2 + 2, O2), N2 * p > E2 && (E2 = N2 * p)), E2 > S2 && (S2 = E2), c2 = h2.indexOf(L2, c2 + 1);
|
|
17830
18148
|
return O2[T2] = S2, S2;
|
|
17831
18149
|
}
|
|
17832
18150
|
function D(_2) {
|
|
17833
18151
|
return _2.toLowerCase().replace(X, " ");
|
|
17834
18152
|
}
|
|
17835
18153
|
function W(_2, C2, h2) {
|
|
17836
|
-
return _2 = h2 && h2.length > 0 ? `${_2 + " " + h2.join(" ")}` : _2, G
|
|
18154
|
+
return _2 = h2 && h2.length > 0 ? `${_2 + " " + h2.join(" ")}` : _2, G(_2, C2, D(_2), D(C2), 0, 0, {});
|
|
17837
18155
|
}
|
|
17838
18156
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
17839
18157
|
const onEscapeKeyDown = useCallbackRef$1(onEscapeKeyDownProp);
|
|
@@ -18038,10 +18356,10 @@ function dispatchUpdate() {
|
|
|
18038
18356
|
const event = new CustomEvent(CONTEXT_UPDATE);
|
|
18039
18357
|
document.dispatchEvent(event);
|
|
18040
18358
|
}
|
|
18041
|
-
function handleAndDispatchCustomEvent(
|
|
18359
|
+
function handleAndDispatchCustomEvent(name2, handler, detail, { discrete }) {
|
|
18042
18360
|
const target = detail.originalEvent.target;
|
|
18043
|
-
const event = new CustomEvent(
|
|
18044
|
-
if (handler) target.addEventListener(
|
|
18361
|
+
const event = new CustomEvent(name2, { bubbles: false, cancelable: true, detail });
|
|
18362
|
+
if (handler) target.addEventListener(name2, handler, { once: true });
|
|
18045
18363
|
if (discrete) {
|
|
18046
18364
|
dispatchDiscreteCustomEvent(target, event);
|
|
18047
18365
|
} else {
|
|
@@ -18875,8 +19193,8 @@ function RemoveScrollSideCar(props) {
|
|
|
18875
19193
|
}
|
|
18876
19194
|
}
|
|
18877
19195
|
}, []);
|
|
18878
|
-
var shouldCancel = reactExports.useCallback(function(
|
|
18879
|
-
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
19196
|
+
var shouldCancel = reactExports.useCallback(function(name2, delta, target, should) {
|
|
19197
|
+
var event = { name: name2, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
18880
19198
|
shouldPreventQueue.current.push(event);
|
|
18881
19199
|
setTimeout(function() {
|
|
18882
19200
|
shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
|
|
@@ -19359,204 +19677,157 @@ var Content$1 = DialogContent$1;
|
|
|
19359
19677
|
var Title = DialogTitle$1;
|
|
19360
19678
|
var Description = DialogDescription$1;
|
|
19361
19679
|
var Close = DialogClose;
|
|
19362
|
-
var
|
|
19363
|
-
|
|
19364
|
-
|
|
19365
|
-
|
|
19366
|
-
|
|
19367
|
-
|
|
19368
|
-
|
|
19369
|
-
|
|
19370
|
-
|
|
19371
|
-
|
|
19372
|
-
|
|
19373
|
-
|
|
19374
|
-
function is(x2, y2) {
|
|
19375
|
-
return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
|
|
19376
|
-
}
|
|
19377
|
-
var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React$1.useState, useEffect = React$1.useEffect, useLayoutEffect = React$1.useLayoutEffect, useDebugValue = React$1.useDebugValue;
|
|
19378
|
-
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
19379
|
-
var value = getSnapshot(), _useState = useState({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
19380
|
-
useLayoutEffect(
|
|
19381
|
-
function() {
|
|
19382
|
-
inst.value = value;
|
|
19383
|
-
inst.getSnapshot = getSnapshot;
|
|
19384
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
19385
|
-
},
|
|
19386
|
-
[subscribe, value, getSnapshot]
|
|
19387
|
-
);
|
|
19388
|
-
useEffect(
|
|
19389
|
-
function() {
|
|
19390
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
19391
|
-
return subscribe(function() {
|
|
19392
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
19393
|
-
});
|
|
19394
|
-
},
|
|
19395
|
-
[subscribe]
|
|
19396
|
-
);
|
|
19397
|
-
useDebugValue(value);
|
|
19398
|
-
return value;
|
|
19399
|
-
}
|
|
19400
|
-
function checkIfSnapshotChanged(inst) {
|
|
19401
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
19402
|
-
inst = inst.value;
|
|
19403
|
-
try {
|
|
19404
|
-
var nextValue = latestGetSnapshot();
|
|
19405
|
-
return !objectIs(inst, nextValue);
|
|
19406
|
-
} catch (error) {
|
|
19407
|
-
return true;
|
|
19408
|
-
}
|
|
19409
|
-
}
|
|
19410
|
-
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
19411
|
-
return getSnapshot();
|
|
19412
|
-
}
|
|
19413
|
-
var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
19414
|
-
useSyncExternalStoreShim_production.useSyncExternalStore = void 0 !== React$1.useSyncExternalStore ? React$1.useSyncExternalStore : shim;
|
|
19415
|
-
{
|
|
19416
|
-
shim$1.exports = useSyncExternalStoreShim_production;
|
|
19417
|
-
}
|
|
19418
|
-
var shimExports = shim$1.exports;
|
|
19419
|
-
var N = '[cmdk-group=""]', Q = '[cmdk-group-items=""]', be = '[cmdk-group-heading=""]', Z = '[cmdk-item=""]', le = `${Z}:not([aria-disabled="true"])`, Y = "cmdk-item-select", I = "data-value", he = (r2, o, t2) => W(r2, o, t2), ue = reactExports.createContext(void 0), K = () => reactExports.useContext(ue), de = reactExports.createContext(void 0), ee = () => reactExports.useContext(de), fe = reactExports.createContext(void 0);
|
|
19420
|
-
var me = reactExports.forwardRef((r2, o) => {
|
|
19421
|
-
let t2 = k(() => {
|
|
19422
|
-
var e, s;
|
|
19423
|
-
return { search: "", value: (s = (e = r2.value) != null ? e : r2.defaultValue) != null ? s : "", filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
19424
|
-
}), u2 = k(() => /* @__PURE__ */ new Set()), c2 = k(() => /* @__PURE__ */ new Map()), d2 = k(() => /* @__PURE__ */ new Map()), f2 = k(() => /* @__PURE__ */ new Set()), p2 = pe(r2), { label: v2, children: b2, value: l2, onValueChange: y2, filter: E2, shouldFilter: C2, loop: H2, disablePointerSelection: ge2 = false, vimBindings: $2 = true, ...O2 } = r2, te2 = useId(), B2 = useId(), F2 = useId(), x2 = reactExports.useRef(null), R2 = Te();
|
|
19425
|
-
M(() => {
|
|
19426
|
-
if (l2 !== void 0) {
|
|
19427
|
-
let e = l2.trim();
|
|
19428
|
-
t2.current.value = e, h2.emit();
|
|
19429
|
-
}
|
|
19430
|
-
}, [l2]), M(() => {
|
|
19431
|
-
R2(6, re2);
|
|
19680
|
+
var N = '[cmdk-group=""]', Y = '[cmdk-group-items=""]', be = '[cmdk-group-heading=""]', le = '[cmdk-item=""]', ce = `${le}:not([aria-disabled="true"])`, Z = "cmdk-item-select", T = "data-value", Re = (r2, o, n2) => W(r2, o, n2), ue = reactExports.createContext(void 0), K = () => reactExports.useContext(ue), de = reactExports.createContext(void 0), ee = () => reactExports.useContext(de), fe = reactExports.createContext(void 0), me = reactExports.forwardRef((r2, o) => {
|
|
19681
|
+
let n2 = L(() => {
|
|
19682
|
+
var e, a;
|
|
19683
|
+
return { search: "", value: (a = (e = r2.value) != null ? e : r2.defaultValue) != null ? a : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
19684
|
+
}), u2 = L(() => /* @__PURE__ */ new Set()), c2 = L(() => /* @__PURE__ */ new Map()), d2 = L(() => /* @__PURE__ */ new Map()), f2 = L(() => /* @__PURE__ */ new Set()), p2 = pe(r2), { label: b2, children: m2, value: R2, onValueChange: x2, filter: C2, shouldFilter: S2, loop: A2, disablePointerSelection: ge2 = false, vimBindings: j = true, ...O2 } = r2, $2 = useId(), q2 = useId(), _2 = useId(), I2 = reactExports.useRef(null), v2 = ke();
|
|
19685
|
+
k(() => {
|
|
19686
|
+
if (R2 !== void 0) {
|
|
19687
|
+
let e = R2.trim();
|
|
19688
|
+
n2.current.value = e, E2.emit();
|
|
19689
|
+
}
|
|
19690
|
+
}, [R2]), k(() => {
|
|
19691
|
+
v2(6, ne2);
|
|
19432
19692
|
}, []);
|
|
19433
|
-
let
|
|
19434
|
-
var
|
|
19435
|
-
if (!Object.is(
|
|
19436
|
-
if (
|
|
19437
|
-
else if (e === "value"
|
|
19438
|
-
|
|
19439
|
-
|
|
19440
|
-
|
|
19693
|
+
let E2 = reactExports.useMemo(() => ({ subscribe: (e) => (f2.current.add(e), () => f2.current.delete(e)), snapshot: () => n2.current, setState: (e, a, s) => {
|
|
19694
|
+
var i, l2, g2, y2;
|
|
19695
|
+
if (!Object.is(n2.current[e], a)) {
|
|
19696
|
+
if (n2.current[e] = a, e === "search") J2(), z2(), v2(1, W2);
|
|
19697
|
+
else if (e === "value") {
|
|
19698
|
+
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
19699
|
+
let h2 = document.getElementById(_2);
|
|
19700
|
+
h2 ? h2.focus() : (i = document.getElementById($2)) == null || i.focus();
|
|
19701
|
+
}
|
|
19702
|
+
if (v2(7, () => {
|
|
19703
|
+
var h2;
|
|
19704
|
+
n2.current.selectedItemId = (h2 = M2()) == null ? void 0 : h2.id, E2.emit();
|
|
19705
|
+
}), s || v2(5, ne2), ((l2 = p2.current) == null ? void 0 : l2.value) !== void 0) {
|
|
19706
|
+
let h2 = a != null ? a : "";
|
|
19707
|
+
(y2 = (g2 = p2.current).onValueChange) == null || y2.call(g2, h2);
|
|
19708
|
+
return;
|
|
19709
|
+
}
|
|
19441
19710
|
}
|
|
19442
|
-
|
|
19711
|
+
E2.emit();
|
|
19443
19712
|
}
|
|
19444
19713
|
}, emit: () => {
|
|
19445
19714
|
f2.current.forEach((e) => e());
|
|
19446
|
-
} }), []),
|
|
19447
|
-
var
|
|
19448
|
-
|
|
19449
|
-
|
|
19715
|
+
} }), []), U2 = reactExports.useMemo(() => ({ value: (e, a, s) => {
|
|
19716
|
+
var i;
|
|
19717
|
+
a !== ((i = d2.current.get(e)) == null ? void 0 : i.value) && (d2.current.set(e, { value: a, keywords: s }), n2.current.filtered.items.set(e, te2(a, s)), v2(2, () => {
|
|
19718
|
+
z2(), E2.emit();
|
|
19450
19719
|
}));
|
|
19451
|
-
}, item: (e,
|
|
19452
|
-
|
|
19720
|
+
}, item: (e, a) => (u2.current.add(e), a && (c2.current.has(a) ? c2.current.get(a).add(e) : c2.current.set(a, /* @__PURE__ */ new Set([e]))), v2(3, () => {
|
|
19721
|
+
J2(), z2(), n2.current.value || W2(), E2.emit();
|
|
19453
19722
|
}), () => {
|
|
19454
|
-
d2.current.delete(e), u2.current.delete(e),
|
|
19455
|
-
let
|
|
19456
|
-
|
|
19457
|
-
|
|
19723
|
+
d2.current.delete(e), u2.current.delete(e), n2.current.filtered.items.delete(e);
|
|
19724
|
+
let s = M2();
|
|
19725
|
+
v2(4, () => {
|
|
19726
|
+
J2(), (s == null ? void 0 : s.getAttribute("id")) === e && W2(), E2.emit();
|
|
19458
19727
|
});
|
|
19459
19728
|
}), group: (e) => (c2.current.has(e) || c2.current.set(e, /* @__PURE__ */ new Set()), () => {
|
|
19460
19729
|
d2.current.delete(e), c2.current.delete(e);
|
|
19461
|
-
}), filter: () => p2.current.shouldFilter, label:
|
|
19462
|
-
function
|
|
19463
|
-
var
|
|
19464
|
-
let
|
|
19465
|
-
return e ?
|
|
19466
|
-
}
|
|
19467
|
-
function
|
|
19468
|
-
if (!
|
|
19469
|
-
let e =
|
|
19470
|
-
|
|
19471
|
-
let
|
|
19472
|
-
|
|
19473
|
-
let
|
|
19474
|
-
g2 = Math.max(
|
|
19475
|
-
}),
|
|
19730
|
+
}), filter: () => p2.current.shouldFilter, label: b2 || r2["aria-label"], getDisablePointerSelection: () => p2.current.disablePointerSelection, listId: $2, inputId: _2, labelId: q2, listInnerRef: I2 }), []);
|
|
19731
|
+
function te2(e, a) {
|
|
19732
|
+
var i, l2;
|
|
19733
|
+
let s = (l2 = (i = p2.current) == null ? void 0 : i.filter) != null ? l2 : Re;
|
|
19734
|
+
return e ? s(e, n2.current.search, a) : 0;
|
|
19735
|
+
}
|
|
19736
|
+
function z2() {
|
|
19737
|
+
if (!n2.current.search || p2.current.shouldFilter === false) return;
|
|
19738
|
+
let e = n2.current.filtered.items, a = [];
|
|
19739
|
+
n2.current.filtered.groups.forEach((i) => {
|
|
19740
|
+
let l2 = c2.current.get(i), g2 = 0;
|
|
19741
|
+
l2.forEach((y2) => {
|
|
19742
|
+
let h2 = e.get(y2);
|
|
19743
|
+
g2 = Math.max(h2, g2);
|
|
19744
|
+
}), a.push([i, g2]);
|
|
19476
19745
|
});
|
|
19477
|
-
let
|
|
19478
|
-
|
|
19479
|
-
var
|
|
19480
|
-
let g2 =
|
|
19481
|
-
return ((
|
|
19482
|
-
}).forEach((
|
|
19483
|
-
let
|
|
19484
|
-
|
|
19485
|
-
}),
|
|
19746
|
+
let s = I2.current;
|
|
19747
|
+
V2().sort((i, l2) => {
|
|
19748
|
+
var h2, F2;
|
|
19749
|
+
let g2 = i.getAttribute("id"), y2 = l2.getAttribute("id");
|
|
19750
|
+
return ((h2 = e.get(y2)) != null ? h2 : 0) - ((F2 = e.get(g2)) != null ? F2 : 0);
|
|
19751
|
+
}).forEach((i) => {
|
|
19752
|
+
let l2 = i.closest(Y);
|
|
19753
|
+
l2 ? l2.appendChild(i.parentElement === l2 ? i : i.closest(`${Y} > *`)) : s.appendChild(i.parentElement === s ? i : i.closest(`${Y} > *`));
|
|
19754
|
+
}), a.sort((i, l2) => l2[1] - i[1]).forEach((i) => {
|
|
19486
19755
|
var g2;
|
|
19487
|
-
let
|
|
19488
|
-
|
|
19756
|
+
let l2 = (g2 = I2.current) == null ? void 0 : g2.querySelector(`${N}[${T}="${encodeURIComponent(i[0])}"]`);
|
|
19757
|
+
l2 == null || l2.parentElement.appendChild(l2);
|
|
19489
19758
|
});
|
|
19490
19759
|
}
|
|
19491
|
-
function z2() {
|
|
19492
|
-
let e = _2().find((i) => i.getAttribute("aria-disabled") !== "true"), s = e == null ? void 0 : e.getAttribute(I);
|
|
19493
|
-
h2.setState("value", s || void 0);
|
|
19494
|
-
}
|
|
19495
19760
|
function W2() {
|
|
19496
|
-
|
|
19497
|
-
|
|
19498
|
-
|
|
19761
|
+
let e = V2().find((s) => s.getAttribute("aria-disabled") !== "true"), a = e == null ? void 0 : e.getAttribute(T);
|
|
19762
|
+
E2.setState("value", a || void 0);
|
|
19763
|
+
}
|
|
19764
|
+
function J2() {
|
|
19765
|
+
var a, s, i, l2;
|
|
19766
|
+
if (!n2.current.search || p2.current.shouldFilter === false) {
|
|
19767
|
+
n2.current.filtered.count = u2.current.size;
|
|
19499
19768
|
return;
|
|
19500
19769
|
}
|
|
19501
|
-
|
|
19770
|
+
n2.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
19502
19771
|
let e = 0;
|
|
19503
19772
|
for (let g2 of u2.current) {
|
|
19504
|
-
let
|
|
19505
|
-
|
|
19773
|
+
let y2 = (s = (a = d2.current.get(g2)) == null ? void 0 : a.value) != null ? s : "", h2 = (l2 = (i = d2.current.get(g2)) == null ? void 0 : i.keywords) != null ? l2 : [], F2 = te2(y2, h2);
|
|
19774
|
+
n2.current.filtered.items.set(g2, F2), F2 > 0 && e++;
|
|
19506
19775
|
}
|
|
19507
|
-
for (let [g2,
|
|
19508
|
-
|
|
19776
|
+
for (let [g2, y2] of c2.current) for (let h2 of y2) if (n2.current.filtered.items.get(h2) > 0) {
|
|
19777
|
+
n2.current.filtered.groups.add(g2);
|
|
19509
19778
|
break;
|
|
19510
19779
|
}
|
|
19511
|
-
|
|
19780
|
+
n2.current.filtered.count = e;
|
|
19512
19781
|
}
|
|
19513
|
-
function
|
|
19514
|
-
var s, i
|
|
19515
|
-
let e =
|
|
19516
|
-
e && (((
|
|
19782
|
+
function ne2() {
|
|
19783
|
+
var a, s, i;
|
|
19784
|
+
let e = M2();
|
|
19785
|
+
e && (((a = e.parentElement) == null ? void 0 : a.firstChild) === e && ((i = (s = e.closest(N)) == null ? void 0 : s.querySelector(be)) == null || i.scrollIntoView({ block: "nearest" })), e.scrollIntoView({ block: "nearest" }));
|
|
19517
19786
|
}
|
|
19518
|
-
function
|
|
19787
|
+
function M2() {
|
|
19519
19788
|
var e;
|
|
19520
|
-
return (e =
|
|
19789
|
+
return (e = I2.current) == null ? void 0 : e.querySelector(`${le}[aria-selected="true"]`);
|
|
19521
19790
|
}
|
|
19522
|
-
function
|
|
19791
|
+
function V2() {
|
|
19523
19792
|
var e;
|
|
19524
|
-
return Array.from(((e =
|
|
19525
|
-
}
|
|
19526
|
-
function J2(e) {
|
|
19527
|
-
let i = _2()[e];
|
|
19528
|
-
i && h2.setState("value", i.getAttribute(I));
|
|
19793
|
+
return Array.from(((e = I2.current) == null ? void 0 : e.querySelectorAll(ce)) || []);
|
|
19529
19794
|
}
|
|
19530
19795
|
function X2(e) {
|
|
19796
|
+
let s = V2()[e];
|
|
19797
|
+
s && E2.setState("value", s.getAttribute(T));
|
|
19798
|
+
}
|
|
19799
|
+
function Q2(e) {
|
|
19531
19800
|
var g2;
|
|
19532
|
-
let
|
|
19533
|
-
(g2 = p2.current) != null && g2.loop && (
|
|
19801
|
+
let a = M2(), s = V2(), i = s.findIndex((y2) => y2 === a), l2 = s[i + e];
|
|
19802
|
+
(g2 = p2.current) != null && g2.loop && (l2 = i + e < 0 ? s[s.length - 1] : i + e === s.length ? s[0] : s[i + e]), l2 && E2.setState("value", l2.getAttribute(T));
|
|
19534
19803
|
}
|
|
19535
|
-
function
|
|
19536
|
-
let
|
|
19537
|
-
for (;
|
|
19538
|
-
|
|
19804
|
+
function re2(e) {
|
|
19805
|
+
let a = M2(), s = a == null ? void 0 : a.closest(N), i;
|
|
19806
|
+
for (; s && !i; ) s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
|
|
19807
|
+
i ? E2.setState("value", i.getAttribute(T)) : Q2(e);
|
|
19539
19808
|
}
|
|
19540
|
-
let
|
|
19541
|
-
e.preventDefault(), e.metaKey ?
|
|
19809
|
+
let oe2 = () => X2(V2().length - 1), ie2 = (e) => {
|
|
19810
|
+
e.preventDefault(), e.metaKey ? oe2() : e.altKey ? re2(1) : Q2(1);
|
|
19542
19811
|
}, se2 = (e) => {
|
|
19543
|
-
e.preventDefault(), e.metaKey ?
|
|
19812
|
+
e.preventDefault(), e.metaKey ? X2(0) : e.altKey ? re2(-1) : Q2(-1);
|
|
19544
19813
|
};
|
|
19545
19814
|
return reactExports.createElement(Primitive.div, { ref: o, tabIndex: -1, ...O2, "cmdk-root": "", onKeyDown: (e) => {
|
|
19546
19815
|
var s;
|
|
19547
|
-
|
|
19816
|
+
(s = O2.onKeyDown) == null || s.call(O2, e);
|
|
19817
|
+
let a = e.nativeEvent.isComposing || e.keyCode === 229;
|
|
19818
|
+
if (!(e.defaultPrevented || a)) switch (e.key) {
|
|
19548
19819
|
case "n":
|
|
19549
19820
|
case "j": {
|
|
19550
|
-
|
|
19821
|
+
j && e.ctrlKey && ie2(e);
|
|
19551
19822
|
break;
|
|
19552
19823
|
}
|
|
19553
19824
|
case "ArrowDown": {
|
|
19554
|
-
|
|
19825
|
+
ie2(e);
|
|
19555
19826
|
break;
|
|
19556
19827
|
}
|
|
19557
19828
|
case "p":
|
|
19558
19829
|
case "k": {
|
|
19559
|
-
|
|
19830
|
+
j && e.ctrlKey && se2(e);
|
|
19560
19831
|
break;
|
|
19561
19832
|
}
|
|
19562
19833
|
case "ArrowUp": {
|
|
@@ -19564,152 +19835,140 @@ var me = reactExports.forwardRef((r2, o) => {
|
|
|
19564
19835
|
break;
|
|
19565
19836
|
}
|
|
19566
19837
|
case "Home": {
|
|
19567
|
-
e.preventDefault(),
|
|
19838
|
+
e.preventDefault(), X2(0);
|
|
19568
19839
|
break;
|
|
19569
19840
|
}
|
|
19570
19841
|
case "End": {
|
|
19571
|
-
e.preventDefault(),
|
|
19842
|
+
e.preventDefault(), oe2();
|
|
19572
19843
|
break;
|
|
19573
19844
|
}
|
|
19574
|
-
case "Enter":
|
|
19575
|
-
|
|
19576
|
-
|
|
19577
|
-
|
|
19578
|
-
|
|
19579
|
-
|
|
19580
|
-
i.dispatchEvent(a);
|
|
19581
|
-
}
|
|
19845
|
+
case "Enter": {
|
|
19846
|
+
e.preventDefault();
|
|
19847
|
+
let i = M2();
|
|
19848
|
+
if (i) {
|
|
19849
|
+
let l2 = new Event(Z);
|
|
19850
|
+
i.dispatchEvent(l2);
|
|
19582
19851
|
}
|
|
19852
|
+
}
|
|
19583
19853
|
}
|
|
19584
|
-
} }, reactExports.createElement("label", { "cmdk-label": "", htmlFor:
|
|
19585
|
-
}),
|
|
19586
|
-
var
|
|
19587
|
-
let
|
|
19588
|
-
|
|
19589
|
-
if (!p2) return d2.item(
|
|
19854
|
+
} }, reactExports.createElement("label", { "cmdk-label": "", htmlFor: U2.inputId, id: U2.labelId, style: Te }, b2), B(r2, (e) => reactExports.createElement(de.Provider, { value: E2 }, reactExports.createElement(ue.Provider, { value: U2 }, e))));
|
|
19855
|
+
}), he = reactExports.forwardRef((r2, o) => {
|
|
19856
|
+
var _2, I2;
|
|
19857
|
+
let n2 = useId(), u2 = reactExports.useRef(null), c2 = reactExports.useContext(fe), d2 = K(), f2 = pe(r2), p2 = (I2 = (_2 = f2.current) == null ? void 0 : _2.forceMount) != null ? I2 : c2 == null ? void 0 : c2.forceMount;
|
|
19858
|
+
k(() => {
|
|
19859
|
+
if (!p2) return d2.item(n2, c2 == null ? void 0 : c2.id);
|
|
19590
19860
|
}, [p2]);
|
|
19591
|
-
let
|
|
19861
|
+
let b2 = ve(n2, u2, [r2.value, r2.children, u2], r2.keywords), m2 = ee(), R2 = P((v2) => v2.value && v2.value === b2.current), x2 = P((v2) => p2 || d2.filter() === false ? true : v2.search ? v2.filtered.items.get(n2) > 0 : true);
|
|
19592
19862
|
reactExports.useEffect(() => {
|
|
19593
|
-
let
|
|
19594
|
-
if (!(!
|
|
19595
|
-
}, [
|
|
19596
|
-
function E2() {
|
|
19597
|
-
var R2, h2;
|
|
19598
|
-
C2(), (h2 = (R2 = f2.current).onSelect) == null || h2.call(R2, v2.current);
|
|
19599
|
-
}
|
|
19863
|
+
let v2 = u2.current;
|
|
19864
|
+
if (!(!v2 || r2.disabled)) return v2.addEventListener(Z, C2), () => v2.removeEventListener(Z, C2);
|
|
19865
|
+
}, [x2, r2.onSelect, r2.disabled]);
|
|
19600
19866
|
function C2() {
|
|
19601
|
-
|
|
19867
|
+
var v2, E2;
|
|
19868
|
+
S2(), (E2 = (v2 = f2.current).onSelect) == null || E2.call(v2, b2.current);
|
|
19602
19869
|
}
|
|
19603
|
-
|
|
19604
|
-
|
|
19605
|
-
|
|
19606
|
-
|
|
19607
|
-
let {
|
|
19608
|
-
|
|
19609
|
-
let E2 = reactExports.useMemo(() => ({ id: f2, forceMount: c2 }), [c2]);
|
|
19610
|
-
return reactExports.createElement(Primitive.div, { ref: G([p2, o]), ...d2, "cmdk-group": "", role: "presentation", hidden: y2 ? void 0 : true }, t2 && reactExports.createElement("div", { ref: v2, "cmdk-group-heading": "", "aria-hidden": true, id: b2 }, t2), j(r2, (C2) => reactExports.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": t2 ? b2 : void 0 }, reactExports.createElement(fe.Provider, { value: E2 }, C2))));
|
|
19870
|
+
function S2() {
|
|
19871
|
+
m2.setState("value", b2.current, true);
|
|
19872
|
+
}
|
|
19873
|
+
if (!x2) return null;
|
|
19874
|
+
let { disabled: A2, value: ge2, onSelect: j, forceMount: O2, keywords: $2, ...q2 } = r2;
|
|
19875
|
+
return reactExports.createElement(Primitive.div, { ref: composeRefs(u2, o), ...q2, id: n2, "cmdk-item": "", role: "option", "aria-disabled": !!A2, "aria-selected": !!R2, "data-disabled": !!A2, "data-selected": !!R2, onPointerMove: A2 || d2.getDisablePointerSelection() ? void 0 : S2, onClick: A2 ? void 0 : C2 }, r2.children);
|
|
19611
19876
|
}), Ee = reactExports.forwardRef((r2, o) => {
|
|
19612
|
-
let {
|
|
19613
|
-
|
|
19614
|
-
|
|
19615
|
-
|
|
19616
|
-
|
|
19617
|
-
|
|
19618
|
-
|
|
19619
|
-
|
|
19877
|
+
let { heading: n2, children: u2, forceMount: c2, ...d2 } = r2, f2 = useId(), p2 = reactExports.useRef(null), b2 = reactExports.useRef(null), m2 = useId(), R2 = K(), x2 = P((S2) => c2 || R2.filter() === false ? true : S2.search ? S2.filtered.groups.has(f2) : true);
|
|
19878
|
+
k(() => R2.group(f2), []), ve(f2, p2, [r2.value, r2.heading, b2]);
|
|
19879
|
+
let C2 = reactExports.useMemo(() => ({ id: f2, forceMount: c2 }), [c2]);
|
|
19880
|
+
return reactExports.createElement(Primitive.div, { ref: composeRefs(p2, o), ...d2, "cmdk-group": "", role: "presentation", hidden: x2 ? void 0 : true }, n2 && reactExports.createElement("div", { ref: b2, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n2), B(r2, (S2) => reactExports.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n2 ? m2 : void 0 }, reactExports.createElement(fe.Provider, { value: C2 }, S2))));
|
|
19881
|
+
}), ye = reactExports.forwardRef((r2, o) => {
|
|
19882
|
+
let { alwaysRender: n2, ...u2 } = r2, c2 = reactExports.useRef(null), d2 = P((f2) => !f2.search);
|
|
19883
|
+
return !n2 && !d2 ? null : reactExports.createElement(Primitive.div, { ref: composeRefs(c2, o), ...u2, "cmdk-separator": "", role: "separator" });
|
|
19884
|
+
}), Se = reactExports.forwardRef((r2, o) => {
|
|
19885
|
+
let { onValueChange: n2, ...u2 } = r2, c2 = r2.value != null, d2 = ee(), f2 = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b2 = K();
|
|
19620
19886
|
return reactExports.useEffect(() => {
|
|
19621
19887
|
r2.value != null && d2.setState("search", r2.value);
|
|
19622
|
-
}, [r2.value]), reactExports.createElement(Primitive.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls":
|
|
19623
|
-
c2 || d2.setState("search",
|
|
19888
|
+
}, [r2.value]), reactExports.createElement(Primitive.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b2.listId, "aria-labelledby": b2.labelId, "aria-activedescendant": p2, id: b2.inputId, type: "text", value: c2 ? r2.value : f2, onChange: (m2) => {
|
|
19889
|
+
c2 || d2.setState("search", m2.target.value), n2 == null || n2(m2.target.value);
|
|
19624
19890
|
} });
|
|
19625
|
-
}),
|
|
19626
|
-
let { children:
|
|
19891
|
+
}), Ce = reactExports.forwardRef((r2, o) => {
|
|
19892
|
+
let { children: n2, label: u2 = "Suggestions", ...c2 } = r2, d2 = reactExports.useRef(null), f2 = reactExports.useRef(null), p2 = P((m2) => m2.selectedItemId), b2 = K();
|
|
19627
19893
|
return reactExports.useEffect(() => {
|
|
19628
19894
|
if (f2.current && d2.current) {
|
|
19629
|
-
let
|
|
19630
|
-
|
|
19631
|
-
let
|
|
19632
|
-
|
|
19895
|
+
let m2 = f2.current, R2 = d2.current, x2, C2 = new ResizeObserver(() => {
|
|
19896
|
+
x2 = requestAnimationFrame(() => {
|
|
19897
|
+
let S2 = m2.offsetHeight;
|
|
19898
|
+
R2.style.setProperty("--cmdk-list-height", S2.toFixed(1) + "px");
|
|
19633
19899
|
});
|
|
19634
19900
|
});
|
|
19635
|
-
return
|
|
19636
|
-
cancelAnimationFrame(
|
|
19901
|
+
return C2.observe(m2), () => {
|
|
19902
|
+
cancelAnimationFrame(x2), C2.unobserve(m2);
|
|
19637
19903
|
};
|
|
19638
19904
|
}
|
|
19639
|
-
}, []), reactExports.createElement(Primitive.div, { ref:
|
|
19640
|
-
}),
|
|
19641
|
-
let { open:
|
|
19642
|
-
return reactExports.createElement(Root$3, { open:
|
|
19643
|
-
}),
|
|
19644
|
-
let { progress:
|
|
19645
|
-
return reactExports.createElement(Primitive.div, { ref: o, ...d2, "cmdk-loading": "", role: "progressbar", "aria-valuenow":
|
|
19646
|
-
}),
|
|
19647
|
-
function
|
|
19648
|
-
let
|
|
19649
|
-
for (;
|
|
19650
|
-
if (
|
|
19651
|
-
|
|
19652
|
-
}
|
|
19653
|
-
}
|
|
19654
|
-
function
|
|
19655
|
-
let
|
|
19656
|
-
for (;
|
|
19657
|
-
if (
|
|
19658
|
-
|
|
19905
|
+
}, []), reactExports.createElement(Primitive.div, { ref: composeRefs(d2, o), ...c2, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b2.listId }, B(r2, (m2) => reactExports.createElement("div", { ref: composeRefs(f2, b2.listInnerRef), "cmdk-list-sizer": "" }, m2)));
|
|
19906
|
+
}), xe = reactExports.forwardRef((r2, o) => {
|
|
19907
|
+
let { open: n2, onOpenChange: u2, overlayClassName: c2, contentClassName: d2, container: f2, ...p2 } = r2;
|
|
19908
|
+
return reactExports.createElement(Root$3, { open: n2, onOpenChange: u2 }, reactExports.createElement(Portal$2, { container: f2 }, reactExports.createElement(Overlay, { "cmdk-overlay": "", className: c2 }), reactExports.createElement(Content$1, { "aria-label": r2.label, "cmdk-dialog": "", className: d2 }, reactExports.createElement(me, { ref: o, ...p2 }))));
|
|
19909
|
+
}), Ie = reactExports.forwardRef((r2, o) => P((u2) => u2.filtered.count === 0) ? reactExports.createElement(Primitive.div, { ref: o, ...r2, "cmdk-empty": "", role: "presentation" }) : null), Pe = reactExports.forwardRef((r2, o) => {
|
|
19910
|
+
let { progress: n2, children: u2, label: c2 = "Loading...", ...d2 } = r2;
|
|
19911
|
+
return reactExports.createElement(Primitive.div, { ref: o, ...d2, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n2, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c2 }, B(r2, (f2) => reactExports.createElement("div", { "aria-hidden": true }, f2)));
|
|
19912
|
+
}), _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe });
|
|
19913
|
+
function we(r2, o) {
|
|
19914
|
+
let n2 = r2.nextElementSibling;
|
|
19915
|
+
for (; n2; ) {
|
|
19916
|
+
if (n2.matches(o)) return n2;
|
|
19917
|
+
n2 = n2.nextElementSibling;
|
|
19918
|
+
}
|
|
19919
|
+
}
|
|
19920
|
+
function De(r2, o) {
|
|
19921
|
+
let n2 = r2.previousElementSibling;
|
|
19922
|
+
for (; n2; ) {
|
|
19923
|
+
if (n2.matches(o)) return n2;
|
|
19924
|
+
n2 = n2.previousElementSibling;
|
|
19659
19925
|
}
|
|
19660
19926
|
}
|
|
19661
19927
|
function pe(r2) {
|
|
19662
19928
|
let o = reactExports.useRef(r2);
|
|
19663
|
-
return
|
|
19929
|
+
return k(() => {
|
|
19664
19930
|
o.current = r2;
|
|
19665
19931
|
}), o;
|
|
19666
19932
|
}
|
|
19667
|
-
var
|
|
19668
|
-
function
|
|
19933
|
+
var k = typeof window == "undefined" ? reactExports.useEffect : reactExports.useLayoutEffect;
|
|
19934
|
+
function L(r2) {
|
|
19669
19935
|
let o = reactExports.useRef();
|
|
19670
19936
|
return o.current === void 0 && (o.current = r2()), o;
|
|
19671
19937
|
}
|
|
19672
|
-
function
|
|
19673
|
-
|
|
19674
|
-
|
|
19675
|
-
typeof t2 == "function" ? t2(o) : t2 != null && (t2.current = o);
|
|
19676
|
-
});
|
|
19677
|
-
};
|
|
19678
|
-
}
|
|
19679
|
-
function T(r2) {
|
|
19680
|
-
let o = ee(), t2 = () => r2(o.snapshot());
|
|
19681
|
-
return shimExports.useSyncExternalStore(o.subscribe, t2, t2);
|
|
19938
|
+
function P(r2) {
|
|
19939
|
+
let o = ee(), n2 = () => r2(o.snapshot());
|
|
19940
|
+
return reactExports.useSyncExternalStore(o.subscribe, n2, n2);
|
|
19682
19941
|
}
|
|
19683
|
-
function ve(r2, o,
|
|
19942
|
+
function ve(r2, o, n2, u2 = []) {
|
|
19684
19943
|
let c2 = reactExports.useRef(), d2 = K();
|
|
19685
|
-
return
|
|
19686
|
-
var
|
|
19944
|
+
return k(() => {
|
|
19945
|
+
var b2;
|
|
19687
19946
|
let f2 = (() => {
|
|
19688
|
-
var
|
|
19689
|
-
for (let
|
|
19690
|
-
if (typeof
|
|
19691
|
-
if (typeof
|
|
19947
|
+
var m2;
|
|
19948
|
+
for (let R2 of n2) {
|
|
19949
|
+
if (typeof R2 == "string") return R2.trim();
|
|
19950
|
+
if (typeof R2 == "object" && "current" in R2) return R2.current ? (m2 = R2.current.textContent) == null ? void 0 : m2.trim() : c2.current;
|
|
19692
19951
|
}
|
|
19693
|
-
})(), p2 = u2.map((
|
|
19694
|
-
d2.value(r2, f2, p2), (
|
|
19952
|
+
})(), p2 = u2.map((m2) => m2.trim());
|
|
19953
|
+
d2.value(r2, f2, p2), (b2 = o.current) == null || b2.setAttribute(T, f2), c2.current = f2;
|
|
19695
19954
|
}), c2;
|
|
19696
19955
|
}
|
|
19697
|
-
var
|
|
19698
|
-
let [r2, o] = reactExports.useState(),
|
|
19699
|
-
return
|
|
19700
|
-
|
|
19956
|
+
var ke = () => {
|
|
19957
|
+
let [r2, o] = reactExports.useState(), n2 = L(() => /* @__PURE__ */ new Map());
|
|
19958
|
+
return k(() => {
|
|
19959
|
+
n2.current.forEach((u2) => u2()), n2.current = /* @__PURE__ */ new Map();
|
|
19701
19960
|
}, [r2]), (u2, c2) => {
|
|
19702
|
-
|
|
19961
|
+
n2.current.set(u2, c2), o({});
|
|
19703
19962
|
};
|
|
19704
19963
|
};
|
|
19705
|
-
function
|
|
19964
|
+
function Me(r2) {
|
|
19706
19965
|
let o = r2.type;
|
|
19707
19966
|
return typeof o == "function" ? o(r2.props) : "render" in o ? o.render(r2.props) : r2;
|
|
19708
19967
|
}
|
|
19709
|
-
function
|
|
19710
|
-
return r2 && reactExports.isValidElement(o) ? reactExports.cloneElement(
|
|
19968
|
+
function B({ asChild: r2, children: o }, n2) {
|
|
19969
|
+
return r2 && reactExports.isValidElement(o) ? reactExports.cloneElement(Me(o), { ref: o.ref }, n2(o.props.children)) : n2(o);
|
|
19711
19970
|
}
|
|
19712
|
-
var
|
|
19971
|
+
var Te = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
19713
19972
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
19714
19973
|
if (source == null) return {};
|
|
19715
19974
|
var target = {};
|
|
@@ -19887,7 +20146,7 @@ const DialogDescription = reactExports.forwardRef(({ className: className2, ...p
|
|
|
19887
20146
|
));
|
|
19888
20147
|
DialogDescription.displayName = Description.displayName;
|
|
19889
20148
|
const Command = reactExports.forwardRef(({ className: className2, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19890
|
-
|
|
20149
|
+
_e,
|
|
19891
20150
|
{
|
|
19892
20151
|
ref,
|
|
19893
20152
|
className: cn(
|
|
@@ -19897,11 +20156,11 @@ const Command = reactExports.forwardRef(({ className: className2, ...props }, re
|
|
|
19897
20156
|
...props
|
|
19898
20157
|
}
|
|
19899
20158
|
));
|
|
19900
|
-
Command.displayName =
|
|
20159
|
+
Command.displayName = _e.displayName;
|
|
19901
20160
|
const CommandInput = reactExports.forwardRef(({ className: className2, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
19902
20161
|
/* @__PURE__ */ jsxRuntimeExports.jsx(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
19903
20162
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19904
|
-
|
|
20163
|
+
_e.Input,
|
|
19905
20164
|
{
|
|
19906
20165
|
ref,
|
|
19907
20166
|
className: cn(
|
|
@@ -19912,27 +20171,27 @@ const CommandInput = reactExports.forwardRef(({ className: className2, ...props
|
|
|
19912
20171
|
}
|
|
19913
20172
|
)
|
|
19914
20173
|
] }));
|
|
19915
|
-
CommandInput.displayName =
|
|
20174
|
+
CommandInput.displayName = _e.Input.displayName;
|
|
19916
20175
|
const CommandList = reactExports.forwardRef(({ className: className2, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19917
|
-
|
|
20176
|
+
_e.List,
|
|
19918
20177
|
{
|
|
19919
20178
|
ref,
|
|
19920
20179
|
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className2),
|
|
19921
20180
|
...props
|
|
19922
20181
|
}
|
|
19923
20182
|
));
|
|
19924
|
-
CommandList.displayName =
|
|
20183
|
+
CommandList.displayName = _e.List.displayName;
|
|
19925
20184
|
const CommandEmpty = reactExports.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19926
|
-
|
|
20185
|
+
_e.Empty,
|
|
19927
20186
|
{
|
|
19928
20187
|
ref,
|
|
19929
20188
|
className: "py-6 text-center text-sm",
|
|
19930
20189
|
...props
|
|
19931
20190
|
}
|
|
19932
20191
|
));
|
|
19933
|
-
CommandEmpty.displayName =
|
|
20192
|
+
CommandEmpty.displayName = _e.Empty.displayName;
|
|
19934
20193
|
const CommandGroup = reactExports.forwardRef(({ className: className2, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19935
|
-
|
|
20194
|
+
_e.Group,
|
|
19936
20195
|
{
|
|
19937
20196
|
ref,
|
|
19938
20197
|
className: cn(
|
|
@@ -19942,18 +20201,18 @@ const CommandGroup = reactExports.forwardRef(({ className: className2, ...props
|
|
|
19942
20201
|
...props
|
|
19943
20202
|
}
|
|
19944
20203
|
));
|
|
19945
|
-
CommandGroup.displayName =
|
|
20204
|
+
CommandGroup.displayName = _e.Group.displayName;
|
|
19946
20205
|
const CommandSeparator = reactExports.forwardRef(({ className: className2, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19947
|
-
|
|
20206
|
+
_e.Separator,
|
|
19948
20207
|
{
|
|
19949
20208
|
ref,
|
|
19950
20209
|
className: cn("-mx-1 h-px bg-border", className2),
|
|
19951
20210
|
...props
|
|
19952
20211
|
}
|
|
19953
20212
|
));
|
|
19954
|
-
CommandSeparator.displayName =
|
|
20213
|
+
CommandSeparator.displayName = _e.Separator.displayName;
|
|
19955
20214
|
const CommandItem = reactExports.forwardRef(({ className: className2, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19956
|
-
|
|
20215
|
+
_e.Item,
|
|
19957
20216
|
{
|
|
19958
20217
|
ref,
|
|
19959
20218
|
className: cn(
|
|
@@ -19963,7 +20222,7 @@ const CommandItem = reactExports.forwardRef(({ className: className2, ...props }
|
|
|
19963
20222
|
...props
|
|
19964
20223
|
}
|
|
19965
20224
|
));
|
|
19966
|
-
CommandItem.displayName =
|
|
20225
|
+
CommandItem.displayName = _e.Item.displayName;
|
|
19967
20226
|
const sides = ["top", "right", "bottom", "left"];
|
|
19968
20227
|
const min = Math.min;
|
|
19969
20228
|
const max = Math.max;
|
|
@@ -20171,7 +20430,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
20171
20430
|
let resetCount = 0;
|
|
20172
20431
|
for (let i = 0; i < validMiddleware.length; i++) {
|
|
20173
20432
|
const {
|
|
20174
|
-
name,
|
|
20433
|
+
name: name2,
|
|
20175
20434
|
fn
|
|
20176
20435
|
} = validMiddleware[i];
|
|
20177
20436
|
const {
|
|
@@ -20197,8 +20456,8 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
20197
20456
|
y2 = nextY != null ? nextY : y2;
|
|
20198
20457
|
middlewareData = {
|
|
20199
20458
|
...middlewareData,
|
|
20200
|
-
[
|
|
20201
|
-
...middlewareData[
|
|
20459
|
+
[name2]: {
|
|
20460
|
+
...middlewareData[name2],
|
|
20202
20461
|
...data
|
|
20203
20462
|
}
|
|
20204
20463
|
};
|
|
@@ -21888,7 +22147,7 @@ var CONTENT_NAME$2 = "PopperContent";
|
|
|
21888
22147
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$2);
|
|
21889
22148
|
var PopperContent = reactExports.forwardRef(
|
|
21890
22149
|
(props, forwardedRef) => {
|
|
21891
|
-
var _a, _b, _c, _d,
|
|
22150
|
+
var _a, _b, _c, _d, _e2, _f;
|
|
21892
22151
|
const {
|
|
21893
22152
|
__scopePopper,
|
|
21894
22153
|
side = "bottom",
|
|
@@ -21987,7 +22246,7 @@ var PopperContent = reactExports.forwardRef(
|
|
|
21987
22246
|
zIndex: contentZIndex,
|
|
21988
22247
|
["--radix-popper-transform-origin"]: [
|
|
21989
22248
|
(_d = middlewareData.transformOrigin) == null ? void 0 : _d.x,
|
|
21990
|
-
(
|
|
22249
|
+
(_e2 = middlewareData.transformOrigin) == null ? void 0 : _e2.y
|
|
21991
22250
|
].join(" "),
|
|
21992
22251
|
// hide the content if using the hide middleware and should be hidden
|
|
21993
22252
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
@@ -22431,15 +22690,15 @@ function Combobox({
|
|
|
22431
22690
|
emptyMessage = "No results found.",
|
|
22432
22691
|
id: id2
|
|
22433
22692
|
}) {
|
|
22434
|
-
const [open, setOpen] = React$
|
|
22435
|
-
const handleSelect = React$
|
|
22693
|
+
const [open, setOpen] = React$1.useState(false);
|
|
22694
|
+
const handleSelect = React$1.useCallback(
|
|
22436
22695
|
(option) => {
|
|
22437
22696
|
onChange(option);
|
|
22438
22697
|
setOpen(false);
|
|
22439
22698
|
},
|
|
22440
22699
|
[onChange]
|
|
22441
22700
|
);
|
|
22442
|
-
const handleInputChange = React$
|
|
22701
|
+
const handleInputChange = React$1.useCallback(
|
|
22443
22702
|
(value2) => {
|
|
22444
22703
|
onInputChange(value2);
|
|
22445
22704
|
},
|
|
@@ -22524,22 +22783,6 @@ const Label$1 = reactExports.forwardRef(({ className: className2, ...props }, re
|
|
|
22524
22783
|
}
|
|
22525
22784
|
));
|
|
22526
22785
|
Label$1.displayName = Root$1.displayName;
|
|
22527
|
-
const Textarea = reactExports.forwardRef(
|
|
22528
|
-
({ className: className2, ...props }, ref) => {
|
|
22529
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
22530
|
-
"textarea",
|
|
22531
|
-
{
|
|
22532
|
-
className: cn(
|
|
22533
|
-
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
22534
|
-
className2
|
|
22535
|
-
),
|
|
22536
|
-
ref,
|
|
22537
|
-
...props
|
|
22538
|
-
}
|
|
22539
|
-
);
|
|
22540
|
-
}
|
|
22541
|
-
);
|
|
22542
|
-
Textarea.displayName = "Textarea";
|
|
22543
22786
|
const ListPane = ({
|
|
22544
22787
|
items,
|
|
22545
22788
|
listItems,
|
|
@@ -22752,14 +22995,7 @@ const PromptsTab = ({
|
|
|
22752
22995
|
] })
|
|
22753
22996
|
] }, arg.name)),
|
|
22754
22997
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: handleGetPrompt, className: "w-full", children: "Get Prompt" }),
|
|
22755
|
-
promptContent && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
22756
|
-
Textarea,
|
|
22757
|
-
{
|
|
22758
|
-
value: promptContent,
|
|
22759
|
-
readOnly: true,
|
|
22760
|
-
className: "h-64 font-mono"
|
|
22761
|
-
}
|
|
22762
|
-
)
|
|
22998
|
+
promptContent && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 border rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx(JsonView, { data: promptContent }) })
|
|
22763
22999
|
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDescription, { children: "Select a prompt from the list to view and use it" }) }) })
|
|
22764
23000
|
] })
|
|
22765
23001
|
] });
|
|
@@ -22911,7 +23147,7 @@ const ResourcesTab = ({
|
|
|
22911
23147
|
/* @__PURE__ */ jsxRuntimeExports.jsx(CircleAlert, { className: "h-4 w-4" }),
|
|
22912
23148
|
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertTitle, { children: "Error" }),
|
|
22913
23149
|
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDescription, { children: error })
|
|
22914
|
-
] }) : selectedResource ? /* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
23150
|
+
] }) : selectedResource ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-gray-50 dark:bg-gray-800 p-4 rounded text-sm overflow-auto max-h-96 text-gray-900 dark:text-gray-100", children: /* @__PURE__ */ jsxRuntimeExports.jsx(JsonView, { data: resourceContent }) }) : selectedTemplate ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
|
|
22915
23151
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-600", children: selectedTemplate.description }),
|
|
22916
23152
|
(_a = selectedTemplate.uriTemplate.match(/{([^}]+)}/g)) == null ? void 0 : _a.map((param) => {
|
|
22917
23153
|
const key = param.slice(1, -1);
|
|
@@ -22943,11 +23179,11 @@ const ResourcesTab = ({
|
|
|
22943
23179
|
] });
|
|
22944
23180
|
};
|
|
22945
23181
|
const Input = reactExports.forwardRef(
|
|
22946
|
-
({ className: className2, type, ...props }, ref) => {
|
|
23182
|
+
({ className: className2, type: type2, ...props }, ref) => {
|
|
22947
23183
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
22948
23184
|
"input",
|
|
22949
23185
|
{
|
|
22950
|
-
type,
|
|
23186
|
+
type: type2,
|
|
22951
23187
|
className: cn(
|
|
22952
23188
|
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
22953
23189
|
className2
|
|
@@ -23031,7 +23267,7 @@ const SamplingTab = ({ pendingRequests, onApprove, onReject }) => {
|
|
|
23031
23267
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 space-y-4", children: [
|
|
23032
23268
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-lg font-semibold", children: "Recent Requests" }),
|
|
23033
23269
|
pendingRequests.map((request) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-4 border rounded-lg space-y-4", children: [
|
|
23034
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
23270
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-gray-50 dark:bg-gray-800 dark:text-gray-100 p-2 rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx(JsonView, { data: JSON.stringify(request.request) }) }),
|
|
23035
23271
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex space-x-2", children: [
|
|
23036
23272
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: () => handleApprove(request.id), children: "Approve" }),
|
|
23037
23273
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "outline", onClick: () => onReject(request.id), children: "Reject" })
|
|
@@ -23103,7 +23339,7 @@ var Select$1 = (props) => {
|
|
|
23103
23339
|
defaultValue,
|
|
23104
23340
|
onValueChange,
|
|
23105
23341
|
dir,
|
|
23106
|
-
name,
|
|
23342
|
+
name: name2,
|
|
23107
23343
|
autoComplete,
|
|
23108
23344
|
disabled,
|
|
23109
23345
|
required,
|
|
@@ -23171,7 +23407,7 @@ var Select$1 = (props) => {
|
|
|
23171
23407
|
"aria-hidden": true,
|
|
23172
23408
|
required,
|
|
23173
23409
|
tabIndex: -1,
|
|
23174
|
-
name,
|
|
23410
|
+
name: name2,
|
|
23175
23411
|
autoComplete,
|
|
23176
23412
|
value,
|
|
23177
23413
|
onChange: (event) => setValue(event.target.value),
|
|
@@ -24343,18 +24579,16 @@ const useTheme = () => {
|
|
|
24343
24579
|
darkModeMediaQuery.removeEventListener("change", handleDarkModeChange);
|
|
24344
24580
|
};
|
|
24345
24581
|
}, [theme]);
|
|
24346
|
-
|
|
24347
|
-
|
|
24348
|
-
|
|
24349
|
-
|
|
24350
|
-
|
|
24351
|
-
|
|
24352
|
-
|
|
24353
|
-
|
|
24354
|
-
}, [])
|
|
24355
|
-
];
|
|
24582
|
+
const setThemeWithSideEffect = reactExports.useCallback((newTheme) => {
|
|
24583
|
+
setTheme(newTheme);
|
|
24584
|
+
localStorage.setItem("theme", newTheme);
|
|
24585
|
+
if (newTheme !== "system") {
|
|
24586
|
+
document.documentElement.classList.toggle("dark", newTheme === "dark");
|
|
24587
|
+
}
|
|
24588
|
+
}, []);
|
|
24589
|
+
return reactExports.useMemo(() => [theme, setThemeWithSideEffect], [theme]);
|
|
24356
24590
|
};
|
|
24357
|
-
const version = "0.
|
|
24591
|
+
const version = "0.8.0";
|
|
24358
24592
|
const Sidebar = ({
|
|
24359
24593
|
connectionStatus,
|
|
24360
24594
|
transportType,
|
|
@@ -24370,11 +24604,18 @@ const Sidebar = ({
|
|
|
24370
24604
|
bearerToken,
|
|
24371
24605
|
setBearerToken,
|
|
24372
24606
|
onConnect,
|
|
24373
|
-
|
|
24607
|
+
onDisconnect,
|
|
24608
|
+
stdErrNotifications,
|
|
24609
|
+
logLevel,
|
|
24610
|
+
sendLogLevelRequest,
|
|
24611
|
+
loggingSupported,
|
|
24612
|
+
config,
|
|
24613
|
+
setConfig
|
|
24374
24614
|
}) => {
|
|
24375
24615
|
const [theme, setTheme] = useTheme();
|
|
24376
24616
|
const [showEnvVars, setShowEnvVars] = reactExports.useState(false);
|
|
24377
24617
|
const [showBearerToken, setShowBearerToken] = reactExports.useState(false);
|
|
24618
|
+
const [showConfig, setShowConfig] = reactExports.useState(false);
|
|
24378
24619
|
const [shownEnvVars, setShownEnvVars] = reactExports.useState(/* @__PURE__ */ new Set());
|
|
24379
24620
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-80 bg-card border-r border-border flex flex-col h-full", children: [
|
|
24380
24621
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between p-4 border-b border-gray-200", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h1", { className: "ml-2 text-lg font-semibold", children: [
|
|
@@ -24488,9 +24729,17 @@ const Sidebar = ({
|
|
|
24488
24729
|
value: key,
|
|
24489
24730
|
onChange: (e) => {
|
|
24490
24731
|
const newKey = e.target.value;
|
|
24491
|
-
const newEnv =
|
|
24492
|
-
|
|
24493
|
-
|
|
24732
|
+
const newEnv = Object.entries(env).reduce(
|
|
24733
|
+
(acc, [k2, v2]) => {
|
|
24734
|
+
if (k2 === key) {
|
|
24735
|
+
acc[newKey] = value;
|
|
24736
|
+
} else {
|
|
24737
|
+
acc[k2] = v2;
|
|
24738
|
+
}
|
|
24739
|
+
return acc;
|
|
24740
|
+
},
|
|
24741
|
+
{}
|
|
24742
|
+
);
|
|
24494
24743
|
setEnv(newEnv);
|
|
24495
24744
|
setShownEnvVars((prev) => {
|
|
24496
24745
|
const next = new Set(prev);
|
|
@@ -24575,7 +24824,91 @@ const Sidebar = ({
|
|
|
24575
24824
|
] })
|
|
24576
24825
|
] }),
|
|
24577
24826
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
24578
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
24827
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
24828
|
+
Button,
|
|
24829
|
+
{
|
|
24830
|
+
variant: "outline",
|
|
24831
|
+
onClick: () => setShowConfig(!showConfig),
|
|
24832
|
+
className: "flex items-center w-full",
|
|
24833
|
+
children: [
|
|
24834
|
+
showConfig ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "w-4 h-4 mr-2" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "w-4 h-4 mr-2" }),
|
|
24835
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Settings, { className: "w-4 h-4 mr-2" }),
|
|
24836
|
+
"Configuration"
|
|
24837
|
+
]
|
|
24838
|
+
}
|
|
24839
|
+
),
|
|
24840
|
+
showConfig && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2", children: Object.entries(config).map(([key, configItem]) => {
|
|
24841
|
+
const configKey = key;
|
|
24842
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
24843
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "text-sm font-medium", children: configItem.description }),
|
|
24844
|
+
typeof configItem.value === "number" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24845
|
+
Input,
|
|
24846
|
+
{
|
|
24847
|
+
type: "number",
|
|
24848
|
+
"data-testid": `${configKey}-input`,
|
|
24849
|
+
value: configItem.value,
|
|
24850
|
+
onChange: (e) => {
|
|
24851
|
+
const newConfig = { ...config };
|
|
24852
|
+
newConfig[configKey] = {
|
|
24853
|
+
...configItem,
|
|
24854
|
+
value: Number(e.target.value)
|
|
24855
|
+
};
|
|
24856
|
+
setConfig(newConfig);
|
|
24857
|
+
},
|
|
24858
|
+
className: "font-mono"
|
|
24859
|
+
}
|
|
24860
|
+
) : typeof configItem.value === "boolean" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
24861
|
+
Select,
|
|
24862
|
+
{
|
|
24863
|
+
"data-testid": `${configKey}-select`,
|
|
24864
|
+
value: configItem.value.toString(),
|
|
24865
|
+
onValueChange: (val) => {
|
|
24866
|
+
const newConfig = { ...config };
|
|
24867
|
+
newConfig[configKey] = {
|
|
24868
|
+
...configItem,
|
|
24869
|
+
value: val === "true"
|
|
24870
|
+
};
|
|
24871
|
+
setConfig(newConfig);
|
|
24872
|
+
},
|
|
24873
|
+
children: [
|
|
24874
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
|
|
24875
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectContent, { children: [
|
|
24876
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: "true", children: "True" }),
|
|
24877
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: "false", children: "False" })
|
|
24878
|
+
] })
|
|
24879
|
+
]
|
|
24880
|
+
}
|
|
24881
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24882
|
+
Input,
|
|
24883
|
+
{
|
|
24884
|
+
"data-testid": `${configKey}-input`,
|
|
24885
|
+
value: configItem.value,
|
|
24886
|
+
onChange: (e) => {
|
|
24887
|
+
const newConfig = { ...config };
|
|
24888
|
+
newConfig[configKey] = {
|
|
24889
|
+
...configItem,
|
|
24890
|
+
value: e.target.value
|
|
24891
|
+
};
|
|
24892
|
+
setConfig(newConfig);
|
|
24893
|
+
},
|
|
24894
|
+
className: "font-mono"
|
|
24895
|
+
}
|
|
24896
|
+
)
|
|
24897
|
+
] }, key);
|
|
24898
|
+
}) })
|
|
24899
|
+
] }),
|
|
24900
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
24901
|
+
connectionStatus === "connected" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
24902
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { onClick: onConnect, children: [
|
|
24903
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RotateCcw, { className: "w-4 h-4 mr-2" }),
|
|
24904
|
+
transportType === "stdio" ? "Restart" : "Reconnect"
|
|
24905
|
+
] }),
|
|
24906
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { onClick: onDisconnect, children: [
|
|
24907
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCwOff, { className: "w-4 h-4 mr-2" }),
|
|
24908
|
+
"Disconnect"
|
|
24909
|
+
] })
|
|
24910
|
+
] }),
|
|
24911
|
+
connectionStatus !== "connected" && /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { className: "w-full", onClick: onConnect, children: [
|
|
24579
24912
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Play, { className: "w-4 h-4 mr-2" }),
|
|
24580
24913
|
"Connect"
|
|
24581
24914
|
] }),
|
|
@@ -24588,6 +24921,20 @@ const Sidebar = ({
|
|
|
24588
24921
|
),
|
|
24589
24922
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-gray-600", children: connectionStatus === "connected" ? "Connected" : connectionStatus === "error" ? "Connection Error" : "Disconnected" })
|
|
24590
24923
|
] }),
|
|
24924
|
+
loggingSupported && connectionStatus === "connected" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
24925
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "text-sm font-medium", children: "Logging Level" }),
|
|
24926
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
24927
|
+
Select,
|
|
24928
|
+
{
|
|
24929
|
+
value: logLevel,
|
|
24930
|
+
onValueChange: (value) => sendLogLevelRequest(value),
|
|
24931
|
+
children: [
|
|
24932
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "Select logging level" }) }),
|
|
24933
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: Object.values(LoggingLevelSchema.enum).map((level) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: level, children: level })) })
|
|
24934
|
+
]
|
|
24935
|
+
}
|
|
24936
|
+
)
|
|
24937
|
+
] }),
|
|
24591
24938
|
stdErrNotifications.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 border-t border-gray-200 pt-4", children: [
|
|
24592
24939
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-sm font-medium", children: "Error output from MCP server" }),
|
|
24593
24940
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2 max-h-80 overflow-y-auto", children: stdErrNotifications.map((notification, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -24618,36 +24965,37 @@ const Sidebar = ({
|
|
|
24618
24965
|
}
|
|
24619
24966
|
),
|
|
24620
24967
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
24621
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24968
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "ghost", title: "Inspector Documentation", asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24622
24969
|
"a",
|
|
24623
24970
|
{
|
|
24624
24971
|
href: "https://modelcontextprotocol.io/docs/tools/inspector",
|
|
24625
24972
|
target: "_blank",
|
|
24626
24973
|
rel: "noopener noreferrer",
|
|
24627
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24974
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircleHelp, { className: "w-4 h-4 text-foreground" })
|
|
24628
24975
|
}
|
|
24629
|
-
),
|
|
24630
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24976
|
+
) }),
|
|
24977
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "ghost", title: "Debugging Guide", asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24631
24978
|
"a",
|
|
24632
24979
|
{
|
|
24633
24980
|
href: "https://modelcontextprotocol.io/docs/tools/debugging",
|
|
24634
24981
|
target: "_blank",
|
|
24635
24982
|
rel: "noopener noreferrer",
|
|
24636
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24983
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Bug, { className: "w-4 h-4 text-foreground" })
|
|
24637
24984
|
}
|
|
24638
|
-
),
|
|
24985
|
+
) }),
|
|
24639
24986
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24640
|
-
|
|
24987
|
+
Button,
|
|
24641
24988
|
{
|
|
24642
|
-
|
|
24643
|
-
|
|
24644
|
-
|
|
24989
|
+
variant: "ghost",
|
|
24990
|
+
title: "Report bugs or contribute on GitHub",
|
|
24991
|
+
asChild: true,
|
|
24645
24992
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24646
|
-
|
|
24993
|
+
"a",
|
|
24647
24994
|
{
|
|
24648
|
-
|
|
24649
|
-
|
|
24650
|
-
|
|
24995
|
+
href: "https://github.com/modelcontextprotocol/inspector",
|
|
24996
|
+
target: "_blank",
|
|
24997
|
+
rel: "noopener noreferrer",
|
|
24998
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Github, { className: "w-4 h-4 text-foreground" })
|
|
24651
24999
|
}
|
|
24652
25000
|
)
|
|
24653
25001
|
}
|
|
@@ -24663,7 +25011,7 @@ var Checkbox$1 = reactExports.forwardRef(
|
|
|
24663
25011
|
(props, forwardedRef) => {
|
|
24664
25012
|
const {
|
|
24665
25013
|
__scopeCheckbox,
|
|
24666
|
-
name,
|
|
25014
|
+
name: name2,
|
|
24667
25015
|
checked: checkedProp,
|
|
24668
25016
|
defaultChecked,
|
|
24669
25017
|
required,
|
|
@@ -24722,7 +25070,7 @@ var Checkbox$1 = reactExports.forwardRef(
|
|
|
24722
25070
|
{
|
|
24723
25071
|
control: button,
|
|
24724
25072
|
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
24725
|
-
name,
|
|
25073
|
+
name: name2,
|
|
24726
25074
|
value,
|
|
24727
25075
|
checked,
|
|
24728
25076
|
required,
|
|
@@ -24819,6 +25167,22 @@ const Checkbox = reactExports.forwardRef(({ className: className2, ...props }, r
|
|
|
24819
25167
|
}
|
|
24820
25168
|
));
|
|
24821
25169
|
Checkbox.displayName = Root.displayName;
|
|
25170
|
+
const Textarea = reactExports.forwardRef(
|
|
25171
|
+
({ className: className2, ...props }, ref) => {
|
|
25172
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
25173
|
+
"textarea",
|
|
25174
|
+
{
|
|
25175
|
+
className: cn(
|
|
25176
|
+
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
25177
|
+
className2
|
|
25178
|
+
),
|
|
25179
|
+
ref,
|
|
25180
|
+
...props
|
|
25181
|
+
}
|
|
25182
|
+
);
|
|
25183
|
+
}
|
|
25184
|
+
);
|
|
25185
|
+
Textarea.displayName = "Textarea";
|
|
24822
25186
|
var lib = {};
|
|
24823
25187
|
var __assign = commonjsGlobal && commonjsGlobal.__assign || function() {
|
|
24824
25188
|
__assign = Object.assign || function(t2) {
|
|
@@ -24888,13 +25252,13 @@ var cssText = (
|
|
|
24888
25252
|
"\n/**\n * Reset the text fill color so that placeholder is visible\n */\n.".concat(className, ":empty {\n -webkit-text-fill-color: inherit !important;\n}\n\n/**\n * Hack to apply on some CSS on IE10 and IE11\n */\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n /**\n * IE doesn't support '-webkit-text-fill-color'\n * So we use 'color: transparent' to make the text transparent on IE\n * Unlike other browsers, it doesn't affect caret color in IE\n */\n .").concat(className, " {\n color: transparent !important;\n }\n\n .").concat(className, "::selection {\n background-color: #accef7 !important;\n color: transparent !important;\n }\n}\n")
|
|
24889
25253
|
);
|
|
24890
25254
|
var Editor = React.forwardRef(function Editor2(props, ref) {
|
|
24891
|
-
var autoFocus = props.autoFocus, disabled = props.disabled, form = props.form, highlight = props.highlight, _a = props.ignoreTabKey, ignoreTabKey = _a === void 0 ? false : _a, _b = props.insertSpaces, insertSpaces = _b === void 0 ? true : _b, maxLength = props.maxLength, minLength = props.minLength,
|
|
25255
|
+
var autoFocus = props.autoFocus, disabled = props.disabled, form = props.form, highlight = props.highlight, _a = props.ignoreTabKey, ignoreTabKey = _a === void 0 ? false : _a, _b = props.insertSpaces, insertSpaces = _b === void 0 ? true : _b, maxLength = props.maxLength, minLength = props.minLength, name2 = props.name, onBlur = props.onBlur, onClick = props.onClick, onFocus = props.onFocus, onKeyDown = props.onKeyDown, onKeyUp = props.onKeyUp, onValueChange = props.onValueChange, _c = props.padding, padding = _c === void 0 ? 0 : _c, placeholder = props.placeholder, preClassName = props.preClassName, readOnly = props.readOnly, required = props.required, style = props.style, _d = props.tabSize, tabSize = _d === void 0 ? 2 : _d, textareaClassName = props.textareaClassName, textareaId = props.textareaId, value = props.value, rest = __rest(props, ["autoFocus", "disabled", "form", "highlight", "ignoreTabKey", "insertSpaces", "maxLength", "minLength", "name", "onBlur", "onClick", "onFocus", "onKeyDown", "onKeyUp", "onValueChange", "padding", "placeholder", "preClassName", "readOnly", "required", "style", "tabSize", "textareaClassName", "textareaId", "value"]);
|
|
24892
25256
|
var historyRef = React.useRef({
|
|
24893
25257
|
stack: [],
|
|
24894
25258
|
offset: -1
|
|
24895
25259
|
});
|
|
24896
25260
|
var inputRef = React.useRef(null);
|
|
24897
|
-
var
|
|
25261
|
+
var _e2 = React.useState(true), capture = _e2[0], setCapture = _e2[1];
|
|
24898
25262
|
var contentStyle = {
|
|
24899
25263
|
paddingTop: typeof padding === "object" ? padding.top : padding,
|
|
24900
25264
|
paddingRight: typeof padding === "object" ? padding.right : padding,
|
|
@@ -25161,7 +25525,7 @@ var Editor = React.forwardRef(function Editor2(props, ref) {
|
|
|
25161
25525
|
React.createElement("pre", __assign({ className: preClassName, "aria-hidden": "true", style: __assign(__assign(__assign({}, styles.editor), styles.highlight), contentStyle) }, typeof highlighted === "string" ? { dangerouslySetInnerHTML: { __html: highlighted + "<br />" } } : { children: highlighted })),
|
|
25162
25526
|
React.createElement("textarea", { ref: function(c2) {
|
|
25163
25527
|
return inputRef.current = c2;
|
|
25164
|
-
}, style: __assign(__assign(__assign({}, styles.editor), styles.textarea), contentStyle), className: className + (textareaClassName ? " ".concat(textareaClassName) : ""), id: textareaId, value, onChange: handleChange, onKeyDown: handleKeyDown, onClick, onKeyUp, onFocus, onBlur, disabled, form, maxLength, minLength, name, placeholder, readOnly, required, autoFocus, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", spellCheck: false, "data-gramm": false }),
|
|
25528
|
+
}, style: __assign(__assign(__assign({}, styles.editor), styles.textarea), contentStyle), className: className + (textareaClassName ? " ".concat(textareaClassName) : ""), id: textareaId, value, onChange: handleChange, onKeyDown: handleKeyDown, onClick, onKeyUp, onFocus, onBlur, disabled, form, maxLength, minLength, name: name2, placeholder, readOnly, required, autoFocus, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", spellCheck: false, "data-gramm": false }),
|
|
25165
25529
|
React.createElement("style", { dangerouslySetInnerHTML: { __html: cssText } })
|
|
25166
25530
|
);
|
|
25167
25531
|
});
|
|
@@ -25426,10 +25790,10 @@ var prism = { exports: {} };
|
|
|
25426
25790
|
} catch (err) {
|
|
25427
25791
|
var src = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(err.stack) || [])[1];
|
|
25428
25792
|
if (src) {
|
|
25429
|
-
var
|
|
25430
|
-
for (var i in
|
|
25431
|
-
if (
|
|
25432
|
-
return
|
|
25793
|
+
var scripts2 = document.getElementsByTagName("script");
|
|
25794
|
+
for (var i in scripts2) {
|
|
25795
|
+
if (scripts2[i].src == src) {
|
|
25796
|
+
return scripts2[i];
|
|
25433
25797
|
}
|
|
25434
25798
|
}
|
|
25435
25799
|
}
|
|
@@ -25624,12 +25988,12 @@ var prism = { exports: {} };
|
|
|
25624
25988
|
return ret;
|
|
25625
25989
|
},
|
|
25626
25990
|
// Traverse a language definition with Depth First Search
|
|
25627
|
-
DFS: function DFS(o, callback,
|
|
25991
|
+
DFS: function DFS(o, callback, type2, visited) {
|
|
25628
25992
|
visited = visited || {};
|
|
25629
25993
|
var objId = _2.util.objId;
|
|
25630
25994
|
for (var i in o) {
|
|
25631
25995
|
if (o.hasOwnProperty(i)) {
|
|
25632
|
-
callback.call(o, i, o[i],
|
|
25996
|
+
callback.call(o, i, o[i], type2 || i);
|
|
25633
25997
|
var property = o[i];
|
|
25634
25998
|
var propertyType = _2.util.type(property);
|
|
25635
25999
|
if (propertyType === "Object" && !visited[objId(property)]) {
|
|
@@ -25857,10 +26221,10 @@ var prism = { exports: {} };
|
|
|
25857
26221
|
* @param {HookCallback} callback The callback function which is given environment variables.
|
|
25858
26222
|
* @public
|
|
25859
26223
|
*/
|
|
25860
|
-
add: function(
|
|
26224
|
+
add: function(name2, callback) {
|
|
25861
26225
|
var hooks = _2.hooks.all;
|
|
25862
|
-
hooks[
|
|
25863
|
-
hooks[
|
|
26226
|
+
hooks[name2] = hooks[name2] || [];
|
|
26227
|
+
hooks[name2].push(callback);
|
|
25864
26228
|
},
|
|
25865
26229
|
/**
|
|
25866
26230
|
* Runs a hook invoking all registered callbacks with the given environment variables.
|
|
@@ -25871,8 +26235,8 @@ var prism = { exports: {} };
|
|
|
25871
26235
|
* @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
|
|
25872
26236
|
* @public
|
|
25873
26237
|
*/
|
|
25874
|
-
run: function(
|
|
25875
|
-
var callbacks = _2.hooks.all[
|
|
26238
|
+
run: function(name2, env) {
|
|
26239
|
+
var callbacks = _2.hooks.all[name2];
|
|
25876
26240
|
if (!callbacks || !callbacks.length) {
|
|
25877
26241
|
return;
|
|
25878
26242
|
}
|
|
@@ -25884,8 +26248,8 @@ var prism = { exports: {} };
|
|
|
25884
26248
|
Token
|
|
25885
26249
|
};
|
|
25886
26250
|
_self2.Prism = _2;
|
|
25887
|
-
function Token(
|
|
25888
|
-
this.type =
|
|
26251
|
+
function Token(type2, content, alias, matchedStr) {
|
|
26252
|
+
this.type = type2;
|
|
25889
26253
|
this.content = content;
|
|
25890
26254
|
this.alias = alias;
|
|
25891
26255
|
this.length = (matchedStr || "").length | 0;
|
|
@@ -25919,8 +26283,8 @@ var prism = { exports: {} };
|
|
|
25919
26283
|
}
|
|
25920
26284
|
_2.hooks.run("wrap", env);
|
|
25921
26285
|
var attributes = "";
|
|
25922
|
-
for (var
|
|
25923
|
-
attributes += " " +
|
|
26286
|
+
for (var name2 in env.attributes) {
|
|
26287
|
+
attributes += " " + name2 + '="' + (env.attributes[name2] || "").replace(/"/g, """) + '"';
|
|
25924
26288
|
}
|
|
25925
26289
|
return "<" + env.tag + ' class="' + env.classes.join(" ") + '"' + attributes + ">" + env.content + "</" + env.tag + ">";
|
|
25926
26290
|
};
|
|
@@ -25941,11 +26305,11 @@ var prism = { exports: {} };
|
|
|
25941
26305
|
}
|
|
25942
26306
|
var patterns = grammar[token];
|
|
25943
26307
|
patterns = Array.isArray(patterns) ? patterns : [patterns];
|
|
25944
|
-
for (var
|
|
25945
|
-
if (rematch && rematch.cause == token + "," +
|
|
26308
|
+
for (var j = 0; j < patterns.length; ++j) {
|
|
26309
|
+
if (rematch && rematch.cause == token + "," + j) {
|
|
25946
26310
|
return;
|
|
25947
26311
|
}
|
|
25948
|
-
var patternObj = patterns[
|
|
26312
|
+
var patternObj = patterns[j];
|
|
25949
26313
|
var inside = patternObj.inside;
|
|
25950
26314
|
var lookbehind = !!patternObj.lookbehind;
|
|
25951
26315
|
var greedy = !!patternObj.greedy;
|
|
@@ -26020,7 +26384,7 @@ var prism = { exports: {} };
|
|
|
26020
26384
|
}
|
|
26021
26385
|
if (removeCount > 1) {
|
|
26022
26386
|
var nestedRematch = {
|
|
26023
|
-
cause: token + "," +
|
|
26387
|
+
cause: token + "," + j,
|
|
26024
26388
|
reach
|
|
26025
26389
|
};
|
|
26026
26390
|
matchGrammar(text, tokenList, grammar, currentNode.prev, pos, nestedRematch);
|
|
@@ -26694,33 +27058,34 @@ Prism.languages.json = {
|
|
|
26694
27058
|
}
|
|
26695
27059
|
};
|
|
26696
27060
|
Prism.languages.webmanifest = Prism.languages.json;
|
|
26697
|
-
const JsonEditor = ({
|
|
26698
|
-
|
|
26699
|
-
|
|
26700
|
-
|
|
26701
|
-
|
|
26702
|
-
|
|
26703
|
-
|
|
27061
|
+
const JsonEditor = ({
|
|
27062
|
+
value,
|
|
27063
|
+
onChange,
|
|
27064
|
+
error: externalError
|
|
27065
|
+
}) => {
|
|
27066
|
+
const [editorContent, setEditorContent] = reactExports.useState(value || "");
|
|
27067
|
+
const [internalError, setInternalError] = reactExports.useState(
|
|
27068
|
+
void 0
|
|
27069
|
+
);
|
|
27070
|
+
reactExports.useEffect(() => {
|
|
27071
|
+
setEditorContent(value || "");
|
|
27072
|
+
}, [value]);
|
|
27073
|
+
const handleEditorChange = (newContent) => {
|
|
27074
|
+
setEditorContent(newContent);
|
|
27075
|
+
setInternalError(void 0);
|
|
27076
|
+
onChange(newContent);
|
|
26704
27077
|
};
|
|
26705
|
-
|
|
26706
|
-
|
|
26707
|
-
Button,
|
|
26708
|
-
{
|
|
26709
|
-
variant: "outline",
|
|
26710
|
-
size: "sm",
|
|
26711
|
-
onClick: () => onChange(formatJson(value)),
|
|
26712
|
-
children: "Format JSON"
|
|
26713
|
-
}
|
|
26714
|
-
) }),
|
|
27078
|
+
const displayError = internalError || externalError;
|
|
27079
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
|
|
26715
27080
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26716
27081
|
"div",
|
|
26717
27082
|
{
|
|
26718
|
-
className: `border rounded-md ${
|
|
27083
|
+
className: `border rounded-md ${displayError ? "border-red-500" : "border-gray-200 dark:border-gray-800"}`,
|
|
26719
27084
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26720
27085
|
_default,
|
|
26721
27086
|
{
|
|
26722
|
-
value,
|
|
26723
|
-
onValueChange:
|
|
27087
|
+
value: editorContent,
|
|
27088
|
+
onValueChange: handleEditorChange,
|
|
26724
27089
|
highlight: (code) => Prism$1.highlight(code, Prism$1.languages.json, "json"),
|
|
26725
27090
|
padding: 10,
|
|
26726
27091
|
style: {
|
|
@@ -26734,12 +27099,111 @@ const JsonEditor = ({ value, onChange, error }) => {
|
|
|
26734
27099
|
)
|
|
26735
27100
|
}
|
|
26736
27101
|
),
|
|
26737
|
-
|
|
27102
|
+
displayError && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-red-500 mt-1", children: displayError })
|
|
26738
27103
|
] });
|
|
26739
27104
|
};
|
|
26740
|
-
|
|
27105
|
+
function updateValueAtPath(obj, path, value) {
|
|
27106
|
+
if (path.length === 0) return value;
|
|
27107
|
+
if (obj === null || obj === void 0) {
|
|
27108
|
+
obj = !isNaN(Number(path[0])) ? [] : {};
|
|
27109
|
+
}
|
|
27110
|
+
if (Array.isArray(obj)) {
|
|
27111
|
+
return updateArray(obj, path, value);
|
|
27112
|
+
} else if (typeof obj === "object" && obj !== null) {
|
|
27113
|
+
return updateObject(obj, path, value);
|
|
27114
|
+
} else {
|
|
27115
|
+
console.error(
|
|
27116
|
+
`Cannot update path ${path.join(".")} in non-object/array value:`,
|
|
27117
|
+
obj
|
|
27118
|
+
);
|
|
27119
|
+
return obj;
|
|
27120
|
+
}
|
|
27121
|
+
}
|
|
27122
|
+
function updateArray(array, path, value) {
|
|
27123
|
+
const [index2, ...restPath] = path;
|
|
27124
|
+
const arrayIndex = Number(index2);
|
|
27125
|
+
if (isNaN(arrayIndex)) {
|
|
27126
|
+
console.error(`Invalid array index: ${index2}`);
|
|
27127
|
+
return array;
|
|
27128
|
+
}
|
|
27129
|
+
if (arrayIndex < 0) {
|
|
27130
|
+
console.error(`Array index out of bounds: ${arrayIndex} < 0`);
|
|
27131
|
+
return array;
|
|
27132
|
+
}
|
|
27133
|
+
let newArray = [];
|
|
27134
|
+
for (let i = 0; i < array.length; i++) {
|
|
27135
|
+
newArray[i] = i in array ? array[i] : null;
|
|
27136
|
+
}
|
|
27137
|
+
if (arrayIndex >= newArray.length) {
|
|
27138
|
+
const extendedArray = new Array(arrayIndex).fill(null);
|
|
27139
|
+
for (let i = 0; i < newArray.length; i++) {
|
|
27140
|
+
extendedArray[i] = newArray[i];
|
|
27141
|
+
}
|
|
27142
|
+
newArray = extendedArray;
|
|
27143
|
+
}
|
|
27144
|
+
if (restPath.length === 0) {
|
|
27145
|
+
newArray[arrayIndex] = value;
|
|
27146
|
+
} else {
|
|
27147
|
+
newArray[arrayIndex] = updateValueAtPath(
|
|
27148
|
+
newArray[arrayIndex],
|
|
27149
|
+
restPath,
|
|
27150
|
+
value
|
|
27151
|
+
);
|
|
27152
|
+
}
|
|
27153
|
+
return newArray;
|
|
27154
|
+
}
|
|
27155
|
+
function updateObject(obj, path, value) {
|
|
27156
|
+
const [key, ...restPath] = path;
|
|
27157
|
+
if (typeof key !== "string") {
|
|
27158
|
+
console.error(`Invalid object key: ${key}`);
|
|
27159
|
+
return obj;
|
|
27160
|
+
}
|
|
27161
|
+
const newObj = { ...obj };
|
|
27162
|
+
if (restPath.length === 0) {
|
|
27163
|
+
newObj[key] = value;
|
|
27164
|
+
} else {
|
|
27165
|
+
if (!(key in newObj)) {
|
|
27166
|
+
newObj[key] = {};
|
|
27167
|
+
}
|
|
27168
|
+
newObj[key] = updateValueAtPath(newObj[key], restPath, value);
|
|
27169
|
+
}
|
|
27170
|
+
return newObj;
|
|
27171
|
+
}
|
|
27172
|
+
function generateDefaultValue(schema) {
|
|
27173
|
+
if ("default" in schema) {
|
|
27174
|
+
return schema.default;
|
|
27175
|
+
}
|
|
27176
|
+
if (!schema.required) {
|
|
27177
|
+
if (schema.type === "array") return [];
|
|
27178
|
+
if (schema.type === "object") return {};
|
|
27179
|
+
return null;
|
|
27180
|
+
}
|
|
27181
|
+
switch (schema.type) {
|
|
27182
|
+
case "string":
|
|
27183
|
+
return "";
|
|
27184
|
+
case "number":
|
|
27185
|
+
case "integer":
|
|
27186
|
+
return 0;
|
|
27187
|
+
case "boolean":
|
|
27188
|
+
return false;
|
|
27189
|
+
case "array":
|
|
27190
|
+
return [];
|
|
27191
|
+
case "object": {
|
|
27192
|
+
if (!schema.properties) return {};
|
|
27193
|
+
const obj = {};
|
|
27194
|
+
Object.entries(schema.properties).filter(([, prop]) => prop.required).forEach(([key, prop]) => {
|
|
27195
|
+
const value = generateDefaultValue(prop);
|
|
27196
|
+
obj[key] = value;
|
|
27197
|
+
});
|
|
27198
|
+
return obj;
|
|
27199
|
+
}
|
|
27200
|
+
default:
|
|
27201
|
+
return null;
|
|
27202
|
+
}
|
|
27203
|
+
}
|
|
27204
|
+
function formatFieldLabel(key) {
|
|
26741
27205
|
return key.replace(/([A-Z])/g, " $1").replace(/_/g, " ").replace(/^\w/, (c2) => c2.toUpperCase());
|
|
26742
|
-
}
|
|
27206
|
+
}
|
|
26743
27207
|
const DynamicJsonForm = ({
|
|
26744
27208
|
schema,
|
|
26745
27209
|
value,
|
|
@@ -26748,28 +27212,61 @@ const DynamicJsonForm = ({
|
|
|
26748
27212
|
}) => {
|
|
26749
27213
|
const [isJsonMode, setIsJsonMode] = reactExports.useState(false);
|
|
26750
27214
|
const [jsonError, setJsonError] = reactExports.useState();
|
|
26751
|
-
const
|
|
26752
|
-
|
|
26753
|
-
|
|
26754
|
-
|
|
26755
|
-
|
|
26756
|
-
|
|
26757
|
-
|
|
26758
|
-
|
|
26759
|
-
|
|
26760
|
-
|
|
26761
|
-
|
|
26762
|
-
|
|
26763
|
-
|
|
26764
|
-
|
|
26765
|
-
|
|
26766
|
-
obj[key] = generateDefaultValue(prop);
|
|
26767
|
-
});
|
|
27215
|
+
const [rawJsonValue, setRawJsonValue] = reactExports.useState(
|
|
27216
|
+
JSON.stringify(value ?? generateDefaultValue(schema), null, 2)
|
|
27217
|
+
);
|
|
27218
|
+
const timeoutRef = reactExports.useRef();
|
|
27219
|
+
const debouncedUpdateParent = reactExports.useCallback(
|
|
27220
|
+
(jsonString) => {
|
|
27221
|
+
if (timeoutRef.current) {
|
|
27222
|
+
clearTimeout(timeoutRef.current);
|
|
27223
|
+
}
|
|
27224
|
+
timeoutRef.current = setTimeout(() => {
|
|
27225
|
+
try {
|
|
27226
|
+
const parsed = JSON.parse(jsonString);
|
|
27227
|
+
onChange(parsed);
|
|
27228
|
+
setJsonError(void 0);
|
|
27229
|
+
} catch {
|
|
26768
27230
|
}
|
|
26769
|
-
|
|
27231
|
+
}, 300);
|
|
27232
|
+
},
|
|
27233
|
+
[onChange, setJsonError]
|
|
27234
|
+
);
|
|
27235
|
+
reactExports.useEffect(() => {
|
|
27236
|
+
if (!isJsonMode) {
|
|
27237
|
+
setRawJsonValue(
|
|
27238
|
+
JSON.stringify(value ?? generateDefaultValue(schema), null, 2)
|
|
27239
|
+
);
|
|
27240
|
+
}
|
|
27241
|
+
}, [value, schema, isJsonMode]);
|
|
27242
|
+
const handleSwitchToFormMode = () => {
|
|
27243
|
+
if (isJsonMode) {
|
|
27244
|
+
try {
|
|
27245
|
+
const parsed = JSON.parse(rawJsonValue);
|
|
27246
|
+
onChange(parsed);
|
|
27247
|
+
setIsJsonMode(false);
|
|
27248
|
+
} catch (err) {
|
|
27249
|
+
setJsonError(err instanceof Error ? err.message : "Invalid JSON");
|
|
26770
27250
|
}
|
|
26771
|
-
|
|
26772
|
-
|
|
27251
|
+
} else {
|
|
27252
|
+
setRawJsonValue(
|
|
27253
|
+
JSON.stringify(value ?? generateDefaultValue(schema), null, 2)
|
|
27254
|
+
);
|
|
27255
|
+
setIsJsonMode(true);
|
|
27256
|
+
}
|
|
27257
|
+
};
|
|
27258
|
+
const formatJson = () => {
|
|
27259
|
+
try {
|
|
27260
|
+
const jsonStr = rawJsonValue.trim();
|
|
27261
|
+
if (!jsonStr) {
|
|
27262
|
+
return;
|
|
27263
|
+
}
|
|
27264
|
+
const formatted = JSON.stringify(JSON.parse(jsonStr), null, 2);
|
|
27265
|
+
setRawJsonValue(formatted);
|
|
27266
|
+
debouncedUpdateParent(formatted);
|
|
27267
|
+
setJsonError(void 0);
|
|
27268
|
+
} catch (err) {
|
|
27269
|
+
setJsonError(err instanceof Error ? err.message : "Invalid JSON");
|
|
26773
27270
|
}
|
|
26774
27271
|
};
|
|
26775
27272
|
const renderFormFields = (propSchema, currentValue, path = [], depth = 0) => {
|
|
@@ -26798,18 +27295,64 @@ const DynamicJsonForm = ({
|
|
|
26798
27295
|
}
|
|
26799
27296
|
switch (propSchema.type) {
|
|
26800
27297
|
case "string":
|
|
27298
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
27299
|
+
Input,
|
|
27300
|
+
{
|
|
27301
|
+
type: "text",
|
|
27302
|
+
value: currentValue ?? "",
|
|
27303
|
+
onChange: (e) => {
|
|
27304
|
+
const val = e.target.value;
|
|
27305
|
+
if (!val && !propSchema.required) {
|
|
27306
|
+
handleFieldChange(path, void 0);
|
|
27307
|
+
} else {
|
|
27308
|
+
handleFieldChange(path, val);
|
|
27309
|
+
}
|
|
27310
|
+
},
|
|
27311
|
+
placeholder: propSchema.description,
|
|
27312
|
+
required: propSchema.required
|
|
27313
|
+
}
|
|
27314
|
+
);
|
|
26801
27315
|
case "number":
|
|
27316
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
27317
|
+
Input,
|
|
27318
|
+
{
|
|
27319
|
+
type: "number",
|
|
27320
|
+
value: (currentValue == null ? void 0 : currentValue.toString()) ?? "",
|
|
27321
|
+
onChange: (e) => {
|
|
27322
|
+
const val = e.target.value;
|
|
27323
|
+
if (!val && !propSchema.required) {
|
|
27324
|
+
handleFieldChange(path, void 0);
|
|
27325
|
+
} else {
|
|
27326
|
+
const num = Number(val);
|
|
27327
|
+
if (!isNaN(num)) {
|
|
27328
|
+
handleFieldChange(path, num);
|
|
27329
|
+
}
|
|
27330
|
+
}
|
|
27331
|
+
},
|
|
27332
|
+
placeholder: propSchema.description,
|
|
27333
|
+
required: propSchema.required
|
|
27334
|
+
}
|
|
27335
|
+
);
|
|
26802
27336
|
case "integer":
|
|
26803
27337
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26804
27338
|
Input,
|
|
26805
27339
|
{
|
|
26806
|
-
type:
|
|
26807
|
-
|
|
26808
|
-
|
|
26809
|
-
|
|
26810
|
-
|
|
26811
|
-
|
|
26812
|
-
|
|
27340
|
+
type: "number",
|
|
27341
|
+
step: "1",
|
|
27342
|
+
value: (currentValue == null ? void 0 : currentValue.toString()) ?? "",
|
|
27343
|
+
onChange: (e) => {
|
|
27344
|
+
const val = e.target.value;
|
|
27345
|
+
if (!val && !propSchema.required) {
|
|
27346
|
+
handleFieldChange(path, void 0);
|
|
27347
|
+
} else {
|
|
27348
|
+
const num = Number(val);
|
|
27349
|
+
if (!isNaN(num) && Number.isInteger(num)) {
|
|
27350
|
+
handleFieldChange(path, num);
|
|
27351
|
+
}
|
|
27352
|
+
}
|
|
27353
|
+
},
|
|
27354
|
+
placeholder: propSchema.description,
|
|
27355
|
+
required: propSchema.required
|
|
26813
27356
|
}
|
|
26814
27357
|
);
|
|
26815
27358
|
case "boolean":
|
|
@@ -26819,20 +27362,37 @@ const DynamicJsonForm = ({
|
|
|
26819
27362
|
type: "checkbox",
|
|
26820
27363
|
checked: currentValue ?? false,
|
|
26821
27364
|
onChange: (e) => handleFieldChange(path, e.target.checked),
|
|
26822
|
-
className: "w-4 h-4"
|
|
27365
|
+
className: "w-4 h-4",
|
|
27366
|
+
required: propSchema.required
|
|
26823
27367
|
}
|
|
26824
27368
|
);
|
|
26825
|
-
case "object":
|
|
26826
|
-
|
|
26827
|
-
|
|
26828
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26829
|
-
|
|
26830
|
-
|
|
26831
|
-
|
|
26832
|
-
|
|
26833
|
-
|
|
26834
|
-
|
|
26835
|
-
|
|
27369
|
+
case "object": {
|
|
27370
|
+
const objectValue = currentValue || {};
|
|
27371
|
+
if (propSchema.properties) {
|
|
27372
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-4 border rounded-md p-4", children: Object.entries(propSchema.properties).map(([key, prop]) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
27373
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { children: formatFieldLabel(key) }),
|
|
27374
|
+
renderFormFields(
|
|
27375
|
+
prop,
|
|
27376
|
+
objectValue[key],
|
|
27377
|
+
[...path, key],
|
|
27378
|
+
depth + 1
|
|
27379
|
+
)
|
|
27380
|
+
] }, key)) });
|
|
27381
|
+
} else if (Object.keys(objectValue).length > 0) {
|
|
27382
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-4 border rounded-md p-4", children: Object.entries(objectValue).map(([key, value2]) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
27383
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { children: formatFieldLabel(key) }),
|
|
27384
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
27385
|
+
Input,
|
|
27386
|
+
{
|
|
27387
|
+
type: "text",
|
|
27388
|
+
value: String(value2),
|
|
27389
|
+
onChange: (e) => handleFieldChange([...path, key], e.target.value)
|
|
27390
|
+
}
|
|
27391
|
+
)
|
|
27392
|
+
] }, key)) });
|
|
27393
|
+
}
|
|
27394
|
+
return null;
|
|
27395
|
+
}
|
|
26836
27396
|
case "array": {
|
|
26837
27397
|
const arrayValue = Array.isArray(currentValue) ? currentValue : [];
|
|
26838
27398
|
if (!propSchema.items) return null;
|
|
@@ -26870,9 +27430,12 @@ const DynamicJsonForm = ({
|
|
|
26870
27430
|
variant: "outline",
|
|
26871
27431
|
size: "sm",
|
|
26872
27432
|
onClick: () => {
|
|
27433
|
+
const defaultValue = generateDefaultValue(
|
|
27434
|
+
propSchema.items
|
|
27435
|
+
);
|
|
26873
27436
|
handleFieldChange(path, [
|
|
26874
27437
|
...arrayValue,
|
|
26875
|
-
|
|
27438
|
+
defaultValue ?? null
|
|
26876
27439
|
]);
|
|
26877
27440
|
},
|
|
26878
27441
|
title: ((_b = propSchema.items) == null ? void 0 : _b.description) ? `Add new ${propSchema.items.description}` : "Add new item",
|
|
@@ -26891,107 +27454,44 @@ const DynamicJsonForm = ({
|
|
|
26891
27454
|
onChange(fieldValue);
|
|
26892
27455
|
return;
|
|
26893
27456
|
}
|
|
26894
|
-
const updateArray = (array, path2, value2) => {
|
|
26895
|
-
const [index2, ...restPath] = path2;
|
|
26896
|
-
const arrayIndex = Number(index2);
|
|
26897
|
-
if (isNaN(arrayIndex)) {
|
|
26898
|
-
console.error(`Invalid array index: ${index2}`);
|
|
26899
|
-
return array;
|
|
26900
|
-
}
|
|
26901
|
-
if (arrayIndex < 0) {
|
|
26902
|
-
console.error(`Array index out of bounds: ${arrayIndex} < 0`);
|
|
26903
|
-
return array;
|
|
26904
|
-
}
|
|
26905
|
-
const newArray = [...array];
|
|
26906
|
-
if (restPath.length === 0) {
|
|
26907
|
-
newArray[arrayIndex] = value2;
|
|
26908
|
-
} else {
|
|
26909
|
-
if (arrayIndex >= array.length) {
|
|
26910
|
-
console.warn(`Extending array to index ${arrayIndex}`);
|
|
26911
|
-
newArray.length = arrayIndex + 1;
|
|
26912
|
-
newArray.fill(null, array.length, arrayIndex);
|
|
26913
|
-
}
|
|
26914
|
-
newArray[arrayIndex] = updateValue(
|
|
26915
|
-
newArray[arrayIndex],
|
|
26916
|
-
restPath,
|
|
26917
|
-
value2
|
|
26918
|
-
);
|
|
26919
|
-
}
|
|
26920
|
-
return newArray;
|
|
26921
|
-
};
|
|
26922
|
-
const updateObject = (obj, path2, value2) => {
|
|
26923
|
-
const [key, ...restPath] = path2;
|
|
26924
|
-
if (typeof key !== "string") {
|
|
26925
|
-
console.error(`Invalid object key: ${key}`);
|
|
26926
|
-
return obj;
|
|
26927
|
-
}
|
|
26928
|
-
const newObj = { ...obj };
|
|
26929
|
-
if (restPath.length === 0) {
|
|
26930
|
-
newObj[key] = value2;
|
|
26931
|
-
} else {
|
|
26932
|
-
if (!(key in newObj)) {
|
|
26933
|
-
console.warn(`Creating new key in object: ${key}`);
|
|
26934
|
-
newObj[key] = {};
|
|
26935
|
-
}
|
|
26936
|
-
newObj[key] = updateValue(newObj[key], restPath, value2);
|
|
26937
|
-
}
|
|
26938
|
-
return newObj;
|
|
26939
|
-
};
|
|
26940
|
-
const updateValue = (current, path2, value2) => {
|
|
26941
|
-
if (path2.length === 0) return value2;
|
|
26942
|
-
try {
|
|
26943
|
-
if (!current) {
|
|
26944
|
-
current = !isNaN(Number(path2[0])) ? [] : {};
|
|
26945
|
-
}
|
|
26946
|
-
if (Array.isArray(current)) {
|
|
26947
|
-
return updateArray(current, path2, value2);
|
|
26948
|
-
} else if (typeof current === "object" && current !== null) {
|
|
26949
|
-
return updateObject(current, path2, value2);
|
|
26950
|
-
} else {
|
|
26951
|
-
console.error(
|
|
26952
|
-
`Cannot update path ${path2.join(".")} in non-object/array value:`,
|
|
26953
|
-
current
|
|
26954
|
-
);
|
|
26955
|
-
return current;
|
|
26956
|
-
}
|
|
26957
|
-
} catch (error) {
|
|
26958
|
-
console.error(`Error updating value at path ${path2.join(".")}:`, error);
|
|
26959
|
-
return current;
|
|
26960
|
-
}
|
|
26961
|
-
};
|
|
26962
27457
|
try {
|
|
26963
|
-
const newValue =
|
|
27458
|
+
const newValue = updateValueAtPath(value, path, fieldValue);
|
|
26964
27459
|
onChange(newValue);
|
|
26965
27460
|
} catch (error) {
|
|
26966
27461
|
console.error("Failed to update form value:", error);
|
|
26967
27462
|
onChange(value);
|
|
26968
27463
|
}
|
|
26969
27464
|
};
|
|
27465
|
+
const shouldUseJsonMode = schema.type === "object" && (!schema.properties || Object.keys(schema.properties).length === 0);
|
|
27466
|
+
reactExports.useEffect(() => {
|
|
27467
|
+
if (shouldUseJsonMode && !isJsonMode) {
|
|
27468
|
+
setIsJsonMode(true);
|
|
27469
|
+
}
|
|
27470
|
+
}, [shouldUseJsonMode, isJsonMode]);
|
|
26970
27471
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
|
|
26971
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
26972
|
-
Button,
|
|
26973
|
-
{
|
|
26974
|
-
|
|
26975
|
-
size: "sm",
|
|
26976
|
-
onClick: () => setIsJsonMode(!isJsonMode),
|
|
26977
|
-
children: isJsonMode ? "Switch to Form" : "Switch to JSON"
|
|
26978
|
-
}
|
|
26979
|
-
) }),
|
|
27472
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-end space-x-2", children: [
|
|
27473
|
+
isJsonMode && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", onClick: formatJson, children: "Format JSON" }),
|
|
27474
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", onClick: handleSwitchToFormMode, children: isJsonMode ? "Switch to Form" : "Switch to JSON" })
|
|
27475
|
+
] }),
|
|
26980
27476
|
isJsonMode ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26981
27477
|
JsonEditor,
|
|
26982
27478
|
{
|
|
26983
|
-
value:
|
|
27479
|
+
value: rawJsonValue,
|
|
26984
27480
|
onChange: (newValue) => {
|
|
26985
|
-
|
|
26986
|
-
|
|
26987
|
-
setJsonError(void 0);
|
|
26988
|
-
} catch (err) {
|
|
26989
|
-
setJsonError(err instanceof Error ? err.message : "Invalid JSON");
|
|
26990
|
-
}
|
|
27481
|
+
setRawJsonValue(newValue);
|
|
27482
|
+
debouncedUpdateParent(newValue);
|
|
26991
27483
|
},
|
|
26992
27484
|
error: jsonError
|
|
26993
27485
|
}
|
|
26994
|
-
) :
|
|
27486
|
+
) : (
|
|
27487
|
+
// If schema type is object but value is not an object or is empty, and we have actual JSON data,
|
|
27488
|
+
// render a simple representation of the JSON data
|
|
27489
|
+
schema.type === "object" && (typeof value !== "object" || value === null || Object.keys(value).length === 0) && rawJsonValue && rawJsonValue !== "{}" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4 border rounded-md p-4", children: [
|
|
27490
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-500", children: "Form view not available for this JSON structure. Using simplified view:" }),
|
|
27491
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "bg-gray-50 dark:bg-gray-800 dark:text-gray-100 p-4 rounded text-sm overflow-auto", children: rawJsonValue }),
|
|
27492
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-500", children: "Use JSON mode for full editing capabilities." })
|
|
27493
|
+
] }) : renderFormFields(schema, value)
|
|
27494
|
+
)
|
|
26995
27495
|
] });
|
|
26996
27496
|
};
|
|
26997
27497
|
const ToolsTab = ({
|
|
@@ -27002,8 +27502,7 @@ const ToolsTab = ({
|
|
|
27002
27502
|
selectedTool,
|
|
27003
27503
|
setSelectedTool,
|
|
27004
27504
|
toolResult,
|
|
27005
|
-
nextCursor
|
|
27006
|
-
error
|
|
27505
|
+
nextCursor
|
|
27007
27506
|
}) => {
|
|
27008
27507
|
const [params2, setParams] = reactExports.useState({});
|
|
27009
27508
|
reactExports.useEffect(() => {
|
|
@@ -27016,16 +27515,9 @@ const ToolsTab = ({
|
|
|
27016
27515
|
if (!parsedResult.success) {
|
|
27017
27516
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
27018
27517
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "font-semibold mb-2", children: "Invalid Tool Result:" }),
|
|
27019
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
27518
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 border rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx(JsonView, { data: toolResult }) }),
|
|
27020
27519
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "font-semibold mb-2", children: "Errors:" }),
|
|
27021
|
-
parsedResult.error.errors.map((
|
|
27022
|
-
"pre",
|
|
27023
|
-
{
|
|
27024
|
-
className: "bg-gray-50 dark:bg-gray-800 dark:text-gray-100 p-4 rounded text-sm overflow-auto max-h-64",
|
|
27025
|
-
children: JSON.stringify(error2, null, 2)
|
|
27026
|
-
},
|
|
27027
|
-
idx
|
|
27028
|
-
))
|
|
27520
|
+
parsedResult.error.errors.map((error, idx) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 border rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx(JsonView, { data: error }) }, idx))
|
|
27029
27521
|
] });
|
|
27030
27522
|
}
|
|
27031
27523
|
const structuredResult = parsedResult.data;
|
|
@@ -27038,7 +27530,7 @@ const ToolsTab = ({
|
|
|
27038
27530
|
structuredResult.content.map((item, index2) => {
|
|
27039
27531
|
var _a, _b;
|
|
27040
27532
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-2", children: [
|
|
27041
|
-
item.type === "text" && /* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
27533
|
+
item.type === "text" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 border rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx(JsonView, { data: item.text }) }),
|
|
27042
27534
|
item.type === "image" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
27043
27535
|
"img",
|
|
27044
27536
|
{
|
|
@@ -27055,14 +27547,14 @@ const ToolsTab = ({
|
|
|
27055
27547
|
className: "w-full",
|
|
27056
27548
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "Your browser does not support audio playback" })
|
|
27057
27549
|
}
|
|
27058
|
-
) : /* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
27550
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 border rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx(JsonView, { data: item.resource }) }))
|
|
27059
27551
|
] }, index2);
|
|
27060
27552
|
})
|
|
27061
27553
|
] });
|
|
27062
27554
|
} else if ("toolResult" in toolResult) {
|
|
27063
27555
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
27064
27556
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "font-semibold mb-2", children: "Tool Result (Legacy):" }),
|
|
27065
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
27557
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 border rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx(JsonView, { data: toolResult.toolResult }) })
|
|
27066
27558
|
] });
|
|
27067
27559
|
}
|
|
27068
27560
|
};
|
|
@@ -27088,11 +27580,7 @@ const ToolsTab = ({
|
|
|
27088
27580
|
),
|
|
27089
27581
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-card rounded-lg shadow", children: [
|
|
27090
27582
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 border-b border-gray-200", children: /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-semibold", children: selectedTool ? selectedTool.name : "Select a tool" }) }),
|
|
27091
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4", children:
|
|
27092
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(CircleAlert, { className: "h-4 w-4" }),
|
|
27093
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertTitle, { children: "Error" }),
|
|
27094
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDescription, { children: error })
|
|
27095
|
-
] }) : selectedTool ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
|
|
27583
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4", children: selectedTool ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
|
|
27096
27584
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-600", children: selectedTool.description }),
|
|
27097
27585
|
Object.entries(selectedTool.inputSchema.properties ?? []).map(
|
|
27098
27586
|
([key, value]) => {
|
|
@@ -27149,7 +27637,7 @@ const ToolsTab = ({
|
|
|
27149
27637
|
description: prop.description,
|
|
27150
27638
|
items: prop.items
|
|
27151
27639
|
},
|
|
27152
|
-
value: params2[key] ??
|
|
27640
|
+
value: params2[key] ?? generateDefaultValue(prop),
|
|
27153
27641
|
onChange: (newValue) => {
|
|
27154
27642
|
setParams({
|
|
27155
27643
|
...params2,
|
|
@@ -27160,13 +27648,14 @@ const ToolsTab = ({
|
|
|
27160
27648
|
) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
27161
27649
|
Input,
|
|
27162
27650
|
{
|
|
27163
|
-
type: prop.type === "number" ? "number" : "text",
|
|
27651
|
+
type: prop.type === "number" || prop.type === "integer" ? "number" : "text",
|
|
27164
27652
|
id: key,
|
|
27165
27653
|
name: key,
|
|
27166
27654
|
placeholder: prop.description,
|
|
27655
|
+
value: params2[key] ?? "",
|
|
27167
27656
|
onChange: (e) => setParams({
|
|
27168
27657
|
...params2,
|
|
27169
|
-
[key]: prop.type === "number" ? Number(e.target.value) : e.target.value
|
|
27658
|
+
[key]: prop.type === "number" || prop.type === "integer" ? Number(e.target.value) : e.target.value
|
|
27170
27659
|
}),
|
|
27171
27660
|
className: "mt-1"
|
|
27172
27661
|
}
|
|
@@ -27184,16 +27673,11 @@ const ToolsTab = ({
|
|
|
27184
27673
|
] });
|
|
27185
27674
|
};
|
|
27186
27675
|
const params = new URLSearchParams(window.location.search);
|
|
27187
|
-
const PROXY_PORT = params.get("proxyPort") ?? "
|
|
27188
|
-
const PROXY_SERVER_URL = `http
|
|
27676
|
+
const PROXY_PORT = params.get("proxyPort") ?? "6277";
|
|
27677
|
+
const PROXY_SERVER_URL = `http://${window.location.hostname}:${PROXY_PORT}`;
|
|
27678
|
+
const CONFIG_LOCAL_STORAGE_KEY = "inspectorConfig_v1";
|
|
27189
27679
|
const App = () => {
|
|
27190
27680
|
var _a;
|
|
27191
|
-
if (window.location.pathname === "/oauth/callback") {
|
|
27192
|
-
const OAuthCallback = React$2.lazy(
|
|
27193
|
-
() => __vitePreload(() => import("./OAuthCallback-KG5AbO62.js"), true ? [] : void 0)
|
|
27194
|
-
);
|
|
27195
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, {}) });
|
|
27196
|
-
}
|
|
27197
27681
|
const [resources, setResources] = reactExports.useState([]);
|
|
27198
27682
|
const [resourceTemplates, setResourceTemplates] = reactExports.useState([]);
|
|
27199
27683
|
const [resourceContent, setResourceContent] = reactExports.useState("");
|
|
@@ -27218,30 +27702,21 @@ const App = () => {
|
|
|
27218
27702
|
const [transportType, setTransportType] = reactExports.useState(() => {
|
|
27219
27703
|
return localStorage.getItem("lastTransportType") || "stdio";
|
|
27220
27704
|
});
|
|
27705
|
+
const [logLevel, setLogLevel] = reactExports.useState("debug");
|
|
27221
27706
|
const [notifications, setNotifications] = reactExports.useState([]);
|
|
27222
27707
|
const [stdErrNotifications, setStdErrNotifications] = reactExports.useState([]);
|
|
27223
27708
|
const [roots, setRoots] = reactExports.useState([]);
|
|
27224
27709
|
const [env, setEnv] = reactExports.useState({});
|
|
27710
|
+
const [config, setConfig] = reactExports.useState(() => {
|
|
27711
|
+
const savedConfig = localStorage.getItem(CONFIG_LOCAL_STORAGE_KEY);
|
|
27712
|
+
return savedConfig ? JSON.parse(savedConfig) : DEFAULT_INSPECTOR_CONFIG;
|
|
27713
|
+
});
|
|
27225
27714
|
const [bearerToken, setBearerToken] = reactExports.useState(() => {
|
|
27226
27715
|
return localStorage.getItem("lastBearerToken") || "";
|
|
27227
27716
|
});
|
|
27228
27717
|
const [pendingSampleRequests, setPendingSampleRequests] = reactExports.useState([]);
|
|
27229
27718
|
const nextRequestId = reactExports.useRef(0);
|
|
27230
27719
|
const rootsRef = reactExports.useRef([]);
|
|
27231
|
-
const handleApproveSampling = (id2, result) => {
|
|
27232
|
-
setPendingSampleRequests((prev) => {
|
|
27233
|
-
const request = prev.find((r2) => r2.id === id2);
|
|
27234
|
-
request == null ? void 0 : request.resolve(result);
|
|
27235
|
-
return prev.filter((r2) => r2.id !== id2);
|
|
27236
|
-
});
|
|
27237
|
-
};
|
|
27238
|
-
const handleRejectSampling = (id2) => {
|
|
27239
|
-
setPendingSampleRequests((prev) => {
|
|
27240
|
-
const request = prev.find((r2) => r2.id === id2);
|
|
27241
|
-
request == null ? void 0 : request.reject(new Error("Sampling request rejected"));
|
|
27242
|
-
return prev.filter((r2) => r2.id !== id2);
|
|
27243
|
-
});
|
|
27244
|
-
};
|
|
27245
27720
|
const [selectedResource, setSelectedResource] = reactExports.useState(
|
|
27246
27721
|
null
|
|
27247
27722
|
);
|
|
@@ -27263,7 +27738,8 @@ const App = () => {
|
|
|
27263
27738
|
sendNotification,
|
|
27264
27739
|
handleCompletion,
|
|
27265
27740
|
completionsSupported,
|
|
27266
|
-
connect: connectMcpServer
|
|
27741
|
+
connect: connectMcpServer,
|
|
27742
|
+
disconnect: disconnectMcpServer
|
|
27267
27743
|
} = useConnection({
|
|
27268
27744
|
transportType,
|
|
27269
27745
|
command,
|
|
@@ -27272,6 +27748,7 @@ const App = () => {
|
|
|
27272
27748
|
env,
|
|
27273
27749
|
bearerToken,
|
|
27274
27750
|
proxyServerUrl: PROXY_SERVER_URL,
|
|
27751
|
+
requestTimeout: config.MCP_SERVER_REQUEST_TIMEOUT.value,
|
|
27275
27752
|
onNotification: (notification) => {
|
|
27276
27753
|
setNotifications((prev) => [...prev, notification]);
|
|
27277
27754
|
},
|
|
@@ -27304,6 +27781,9 @@ const App = () => {
|
|
|
27304
27781
|
reactExports.useEffect(() => {
|
|
27305
27782
|
localStorage.setItem("lastBearerToken", bearerToken);
|
|
27306
27783
|
}, [bearerToken]);
|
|
27784
|
+
reactExports.useEffect(() => {
|
|
27785
|
+
localStorage.setItem(CONFIG_LOCAL_STORAGE_KEY, JSON.stringify(config));
|
|
27786
|
+
}, [config]);
|
|
27307
27787
|
reactExports.useEffect(() => {
|
|
27308
27788
|
const serverUrl = params.get("serverUrl");
|
|
27309
27789
|
if (serverUrl) {
|
|
@@ -27312,10 +27792,10 @@ const App = () => {
|
|
|
27312
27792
|
const newUrl = new URL(window.location.href);
|
|
27313
27793
|
newUrl.searchParams.delete("serverUrl");
|
|
27314
27794
|
window.history.replaceState({}, "", newUrl.toString());
|
|
27315
|
-
B$
|
|
27795
|
+
B$2.success("Successfully authenticated with OAuth");
|
|
27316
27796
|
connectMcpServer();
|
|
27317
27797
|
}
|
|
27318
|
-
}, []);
|
|
27798
|
+
}, [connectMcpServer]);
|
|
27319
27799
|
reactExports.useEffect(() => {
|
|
27320
27800
|
fetch(`${PROXY_SERVER_URL}/config`).then((response) => response.json()).then((data) => {
|
|
27321
27801
|
setEnv(data.defaultEnvironment);
|
|
@@ -27337,6 +27817,20 @@ const App = () => {
|
|
|
27337
27817
|
window.location.hash = "resources";
|
|
27338
27818
|
}
|
|
27339
27819
|
}, []);
|
|
27820
|
+
const handleApproveSampling = (id2, result) => {
|
|
27821
|
+
setPendingSampleRequests((prev) => {
|
|
27822
|
+
const request = prev.find((r2) => r2.id === id2);
|
|
27823
|
+
request == null ? void 0 : request.resolve(result);
|
|
27824
|
+
return prev.filter((r2) => r2.id !== id2);
|
|
27825
|
+
});
|
|
27826
|
+
};
|
|
27827
|
+
const handleRejectSampling = (id2) => {
|
|
27828
|
+
setPendingSampleRequests((prev) => {
|
|
27829
|
+
const request = prev.find((r2) => r2.id === id2);
|
|
27830
|
+
request == null ? void 0 : request.reject(new Error("Sampling request rejected"));
|
|
27831
|
+
return prev.filter((r2) => r2.id !== id2);
|
|
27832
|
+
});
|
|
27833
|
+
};
|
|
27340
27834
|
const clearError = (tabKey) => {
|
|
27341
27835
|
setErrors((prev) => ({ ...prev, [tabKey]: null }));
|
|
27342
27836
|
};
|
|
@@ -27437,11 +27931,11 @@ const App = () => {
|
|
|
27437
27931
|
setPrompts(response.prompts);
|
|
27438
27932
|
setNextPromptCursor(response.nextCursor);
|
|
27439
27933
|
};
|
|
27440
|
-
const getPrompt = async (
|
|
27934
|
+
const getPrompt = async (name2, args2 = {}) => {
|
|
27441
27935
|
const response = await makeRequest(
|
|
27442
27936
|
{
|
|
27443
27937
|
method: "prompts/get",
|
|
27444
|
-
params: { name, arguments: args2 }
|
|
27938
|
+
params: { name: name2, arguments: args2 }
|
|
27445
27939
|
},
|
|
27446
27940
|
GetPromptResultSchema,
|
|
27447
27941
|
"prompts"
|
|
@@ -27460,12 +27954,12 @@ const App = () => {
|
|
|
27460
27954
|
setTools(response.tools);
|
|
27461
27955
|
setNextToolCursor(response.nextCursor);
|
|
27462
27956
|
};
|
|
27463
|
-
const callTool = async (
|
|
27957
|
+
const callTool = async (name2, params2) => {
|
|
27464
27958
|
const response = await makeRequest(
|
|
27465
27959
|
{
|
|
27466
27960
|
method: "tools/call",
|
|
27467
27961
|
params: {
|
|
27468
|
-
name,
|
|
27962
|
+
name: name2,
|
|
27469
27963
|
arguments: params2,
|
|
27470
27964
|
_meta: {
|
|
27471
27965
|
progressToken: progressTokenRef.current++
|
|
@@ -27480,6 +27974,22 @@ const App = () => {
|
|
|
27480
27974
|
const handleRootsChange = async () => {
|
|
27481
27975
|
await sendNotification({ method: "notifications/roots/list_changed" });
|
|
27482
27976
|
};
|
|
27977
|
+
const sendLogLevelRequest = async (level) => {
|
|
27978
|
+
await makeRequest(
|
|
27979
|
+
{
|
|
27980
|
+
method: "logging/setLevel",
|
|
27981
|
+
params: { level }
|
|
27982
|
+
},
|
|
27983
|
+
z.object({})
|
|
27984
|
+
);
|
|
27985
|
+
setLogLevel(level);
|
|
27986
|
+
};
|
|
27987
|
+
if (window.location.pathname === "/oauth/callback") {
|
|
27988
|
+
const OAuthCallback = React$1.lazy(
|
|
27989
|
+
() => __vitePreload(() => import("./OAuthCallback-DrQsfqzq.js"), true ? [] : void 0)
|
|
27990
|
+
);
|
|
27991
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, {}) });
|
|
27992
|
+
}
|
|
27483
27993
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-screen bg-background", children: [
|
|
27484
27994
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
27485
27995
|
Sidebar,
|
|
@@ -27495,10 +28005,16 @@ const App = () => {
|
|
|
27495
28005
|
setSseUrl,
|
|
27496
28006
|
env,
|
|
27497
28007
|
setEnv,
|
|
28008
|
+
config,
|
|
28009
|
+
setConfig,
|
|
27498
28010
|
bearerToken,
|
|
27499
28011
|
setBearerToken,
|
|
27500
28012
|
onConnect: connectMcpServer,
|
|
27501
|
-
|
|
28013
|
+
onDisconnect: disconnectMcpServer,
|
|
28014
|
+
stdErrNotifications,
|
|
28015
|
+
logLevel,
|
|
28016
|
+
sendLogLevelRequest,
|
|
28017
|
+
loggingSupported: !!(serverCapabilities == null ? void 0 : serverCapabilities.logging) || false
|
|
27502
28018
|
}
|
|
27503
28019
|
),
|
|
27504
28020
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
|
|
@@ -27620,9 +28136,9 @@ const App = () => {
|
|
|
27620
28136
|
setPrompts([]);
|
|
27621
28137
|
setNextPromptCursor(void 0);
|
|
27622
28138
|
},
|
|
27623
|
-
getPrompt: (
|
|
28139
|
+
getPrompt: (name2, args2) => {
|
|
27624
28140
|
clearError("prompts");
|
|
27625
|
-
getPrompt(
|
|
28141
|
+
getPrompt(name2, args2);
|
|
27626
28142
|
},
|
|
27627
28143
|
selectedPrompt,
|
|
27628
28144
|
setSelectedPrompt: (prompt) => {
|
|
@@ -27648,9 +28164,9 @@ const App = () => {
|
|
|
27648
28164
|
setTools([]);
|
|
27649
28165
|
setNextToolCursor(void 0);
|
|
27650
28166
|
},
|
|
27651
|
-
callTool: (
|
|
28167
|
+
callTool: (name2, params2) => {
|
|
27652
28168
|
clearError("tools");
|
|
27653
|
-
callTool(
|
|
28169
|
+
callTool(name2, params2);
|
|
27654
28170
|
},
|
|
27655
28171
|
selectedTool,
|
|
27656
28172
|
setSelectedTool: (tool) => {
|
|
@@ -27729,7 +28245,7 @@ const App = () => {
|
|
|
27729
28245
|
createRoot(document.getElementById("root")).render(
|
|
27730
28246
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.StrictMode, { children: [
|
|
27731
28247
|
/* @__PURE__ */ jsxRuntimeExports.jsx(App, {}),
|
|
27732
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Q
|
|
28248
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Q, {})
|
|
27733
28249
|
] })
|
|
27734
28250
|
);
|
|
27735
28251
|
export {
|