apiuikit 1.4.0 → 1.5.1
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/README.md +13 -5
- package/dist/{CodeSamples-BUKs-9f3.js → CodeSamples-3fEAwC7U.js} +940 -1016
- package/dist/CodeSamples-CtJp4xci.cjs +50 -0
- package/dist/LogoExtension-Cg0OHsOO.cjs +1 -0
- package/dist/LogoExtension-DBlTRKT3.js +17 -0
- package/dist/apiuikit.cjs.js +1 -1
- package/dist/apiuikit.css +1 -1
- package/dist/apiuikit.es.js +19 -18
- package/dist/components/AsyncCodeSample.d.ts +19 -0
- package/dist/components/DocumentTopBar.d.ts +13 -0
- package/dist/components/InfoMetadata.d.ts +1 -1
- package/dist/components/MarkdownExportMenu.d.ts +2 -4
- package/dist/components/SearchPanel.d.ts +2 -1
- package/dist/components/Section.d.ts +2 -0
- package/dist/config/config.d.ts +11 -1
- package/dist/containers/AsyncAPI/AsyncAPIDocumentProvider.d.ts +1 -1
- package/dist/containers/Information/Information.d.ts +1 -0
- package/dist/containers/Information/InformationSection.d.ts +9 -1
- package/dist/containers/Information/OpenAPIInformation.d.ts +2 -1
- package/dist/containers/OpenAPI/OpenAPIDocumentProvider.d.ts +1 -1
- package/dist/containers/Operation/Operations.d.ts +1 -2
- package/dist/containers/Path/Paths.d.ts +1 -2
- package/dist/contexts/useSpec.d.ts +6 -2
- package/dist/helpers/asyncCodeSample.d.ts +35 -0
- package/dist/helpers/codeSamples.d.ts +9 -4
- package/dist/helpers/markdownForLlm.d.ts +7 -0
- package/dist/helpers/toMarkdown.d.ts +5 -5
- package/dist/hooks/useDocumentProviderValue.d.ts +2 -0
- package/dist/{index-BBNb_Ixx.cjs → index-BBQWVHuB.cjs} +1 -1
- package/dist/{index-CKVSyzwW.js → index-BQeCkb1z.js} +1 -1
- package/dist/index-C2kuzQch.cjs +180 -0
- package/dist/{index-IshexNds.cjs → index-Cp1PIb8-.cjs} +1 -1
- package/dist/{index-C9v_6_ge.js → index-DS1UYBq6.js} +5278 -4182
- package/dist/{index-RSWJsjgH.js → index-DuK6tYTi.js} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/markdown.cjs +16 -13
- package/dist/markdown.d.ts +1 -0
- package/dist/markdown.es.js +201 -189
- package/dist/{protoToJsonSchema-3oaSqmPi.cjs → protoToJsonSchema-DehbDBi4.cjs} +1 -1
- package/dist/{protoToJsonSchema-CV3coy3B.js → protoToJsonSchema-lLl_CPoQ.js} +1 -1
- package/dist/{protobufSchemaParser-CH-kyi1k.cjs → protobufSchemaParser-5IiEfmHU.cjs} +1 -1
- package/dist/{protobufSchemaParser-gr8sPfks.js → protobufSchemaParser-Cmr_zqRL.js} +2 -2
- package/dist/utils/scrollLock.d.ts +6 -0
- package/package.json +4 -2
- package/dist/CodeSamples-pyaDwJRQ.cjs +0 -50
- package/dist/LogoExtension-BOYrY_RE.cjs +0 -1
- package/dist/LogoExtension-HOlSsQf-.js +0 -27
- package/dist/components/CopyMarkdownButton.d.ts +0 -15
- package/dist/index-BuNJJvOb.cjs +0 -133
package/dist/markdown.es.js
CHANGED
|
@@ -34,14 +34,14 @@ const Z = (t) => typeof t == "object" && t !== null && !Array.isArray(t), V = (t
|
|
|
34
34
|
record: "object",
|
|
35
35
|
uuid: "string"
|
|
36
36
|
}, Ne = (t) => typeof t == "object" && t !== null && !Array.isArray(t) ? t : {};
|
|
37
|
-
function
|
|
37
|
+
function he(t) {
|
|
38
38
|
const n = Ne(t);
|
|
39
39
|
if (typeof n.name == "string")
|
|
40
40
|
return typeof n.namespace == "string" ? `${n.namespace}.${n.name}` : n.name;
|
|
41
41
|
}
|
|
42
42
|
function je(t, n, r) {
|
|
43
43
|
t.doc && (n.description = t.doc), t.default !== void 0 && (n.default = t.default);
|
|
44
|
-
const i =
|
|
44
|
+
const i = he(t);
|
|
45
45
|
i !== void 0 && r[i] && (n["x-parser-schema-id"] = i);
|
|
46
46
|
}
|
|
47
47
|
function Je(t, n, r) {
|
|
@@ -55,7 +55,7 @@ function bt(t, n) {
|
|
|
55
55
|
}
|
|
56
56
|
return { type: r, jsonSchema: i };
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function $t(t, n, r) {
|
|
59
59
|
if (!(n === void 0 || r.examples || Array.isArray(t)))
|
|
60
60
|
switch (t) {
|
|
61
61
|
case "boolean":
|
|
@@ -80,11 +80,11 @@ function Me(t, n, r) {
|
|
|
80
80
|
t,
|
|
81
81
|
r
|
|
82
82
|
);
|
|
83
|
-
|
|
83
|
+
$t(i, n.example, u);
|
|
84
84
|
function a(...l) {
|
|
85
85
|
l.forEach((m) => {
|
|
86
|
-
let
|
|
87
|
-
m === "minLength" || m === "maxLength" ?
|
|
86
|
+
let h = !0;
|
|
87
|
+
m === "minLength" || m === "maxLength" ? h = n[m] > -1 : m === "multipleOf" && (h = n[m] > 0), n[m] !== void 0 && h && (u[m] = n[m]);
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
switch (i) {
|
|
@@ -112,7 +112,7 @@ function Me(t, n, r) {
|
|
|
112
112
|
function Le(t, n, r) {
|
|
113
113
|
n !== void 0 && (t[n] = r);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function ye(t, n) {
|
|
116
116
|
let r = {};
|
|
117
117
|
if (Array.isArray(t))
|
|
118
118
|
return St(r, t, n);
|
|
@@ -135,14 +135,14 @@ function he(t, n) {
|
|
|
135
135
|
break;
|
|
136
136
|
}
|
|
137
137
|
case "map": {
|
|
138
|
-
r.additionalProperties =
|
|
138
|
+
r.additionalProperties = ye(
|
|
139
139
|
i.values,
|
|
140
140
|
n
|
|
141
141
|
);
|
|
142
142
|
break;
|
|
143
143
|
}
|
|
144
144
|
case "array": {
|
|
145
|
-
r.items =
|
|
145
|
+
r.items = ye(
|
|
146
146
|
i.items,
|
|
147
147
|
n
|
|
148
148
|
);
|
|
@@ -159,23 +159,23 @@ function he(t, n) {
|
|
|
159
159
|
break;
|
|
160
160
|
}
|
|
161
161
|
case "record": {
|
|
162
|
-
const a =
|
|
162
|
+
const a = Rt(i, n, r);
|
|
163
163
|
Le(
|
|
164
164
|
n,
|
|
165
|
-
|
|
165
|
+
he(t),
|
|
166
166
|
r
|
|
167
167
|
), r.properties = Object.fromEntries(a.entries());
|
|
168
168
|
break;
|
|
169
169
|
}
|
|
170
170
|
default: {
|
|
171
|
-
const a = n[
|
|
171
|
+
const a = n[he(t)] ?? (typeof u == "string" ? n[u] : void 0);
|
|
172
172
|
a && (r = Ce(i) ? { ...a } : a);
|
|
173
173
|
break;
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
return je(i, r, n), Me(u, i, r), r;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function Rt(t, n, r) {
|
|
179
179
|
const i = /* @__PURE__ */ new Map();
|
|
180
180
|
for (const u of t.fields ?? []) {
|
|
181
181
|
const a = typeof u.type == "string" ? n[u.type] : void 0;
|
|
@@ -183,8 +183,8 @@ function $t(t, n, r) {
|
|
|
183
183
|
const l = Ce(u) ? { ...a } : a;
|
|
184
184
|
Je(u, r, u.default !== void 0), Ce(u) && (je(u, l, n), Me(u.type, u, l)), i.set(u.name, l);
|
|
185
185
|
} else {
|
|
186
|
-
const l =
|
|
187
|
-
Je(u, r, u.default !== void 0), je(u, l, n), Me(u.type, u, l), i.set(u.name, l), Le(n,
|
|
186
|
+
const l = ye(u.type, n);
|
|
187
|
+
Je(u, r, u.default !== void 0), je(u, l, n), Me(u.type, u, l), i.set(u.name, l), Le(n, he(u.type), l);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
return i;
|
|
@@ -193,13 +193,13 @@ function St(t, n, r) {
|
|
|
193
193
|
const i = [];
|
|
194
194
|
let u = null;
|
|
195
195
|
for (const a of n) {
|
|
196
|
-
const l =
|
|
197
|
-
(typeof a == "string" ? a : Ne(a).type) === "null" ? u = l : (i.push(l), Le(r,
|
|
196
|
+
const l = ye(a, r);
|
|
197
|
+
(typeof a == "string" ? a : Ne(a).type) === "null" ? u = l : (i.push(l), Le(r, he(a), l));
|
|
198
198
|
}
|
|
199
199
|
return u && i.push(u), t.oneOf = i, t;
|
|
200
200
|
}
|
|
201
201
|
function Ot(t) {
|
|
202
|
-
return
|
|
202
|
+
return ye(t, {});
|
|
203
203
|
}
|
|
204
204
|
const et = /* @__PURE__ */ new Set([
|
|
205
205
|
"null",
|
|
@@ -291,7 +291,7 @@ var nt;
|
|
|
291
291
|
function Ct() {
|
|
292
292
|
if (nt) return E;
|
|
293
293
|
nt = 1;
|
|
294
|
-
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), a = Symbol.for("react.consumer"), l = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"),
|
|
294
|
+
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), a = Symbol.for("react.consumer"), l = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), A = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), S = Symbol.for("react.activity"), w = Symbol.iterator;
|
|
295
295
|
function N(o) {
|
|
296
296
|
return o === null || typeof o != "object" ? null : (o = w && o[w] || o["@@iterator"], typeof o == "function" ? o : null);
|
|
297
297
|
}
|
|
@@ -305,9 +305,9 @@ function Ct() {
|
|
|
305
305
|
},
|
|
306
306
|
enqueueSetState: function() {
|
|
307
307
|
}
|
|
308
|
-
}, Y = Object.assign,
|
|
308
|
+
}, Y = Object.assign, q = {};
|
|
309
309
|
function B(o, f, _) {
|
|
310
|
-
this.props = o, this.context = f, this.refs =
|
|
310
|
+
this.props = o, this.context = f, this.refs = q, this.updater = _ || U;
|
|
311
311
|
}
|
|
312
312
|
B.prototype.isReactComponent = {}, B.prototype.setState = function(o, f) {
|
|
313
313
|
if (typeof o != "object" && typeof o != "function" && o != null)
|
|
@@ -322,7 +322,7 @@ function Ct() {
|
|
|
322
322
|
}
|
|
323
323
|
J.prototype = B.prototype;
|
|
324
324
|
function ue(o, f, _) {
|
|
325
|
-
this.props = o, this.context = f, this.refs =
|
|
325
|
+
this.props = o, this.context = f, this.refs = q, this.updater = _ || U;
|
|
326
326
|
}
|
|
327
327
|
var ee = ue.prototype = new J();
|
|
328
328
|
ee.constructor = ue, Y(ee, B.prototype), ee.isPureReactComponent = !0;
|
|
@@ -379,7 +379,7 @@ function Ct() {
|
|
|
379
379
|
}
|
|
380
380
|
throw o;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function z(o, f, _, v, O) {
|
|
383
383
|
var k = typeof o;
|
|
384
384
|
(k === "undefined" || k === "boolean") && (o = null);
|
|
385
385
|
var C = !1;
|
|
@@ -398,7 +398,7 @@ function Ct() {
|
|
|
398
398
|
C = !0;
|
|
399
399
|
break;
|
|
400
400
|
case g:
|
|
401
|
-
return C = o._init,
|
|
401
|
+
return C = o._init, z(
|
|
402
402
|
C(o._payload),
|
|
403
403
|
f,
|
|
404
404
|
_,
|
|
@@ -408,7 +408,7 @@ function Ct() {
|
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
if (C)
|
|
411
|
-
return O = O(o), C = v === "" ? "." + G(o, 0) : v, x(O) ? (_ = "", C != null && (_ = C.replace(ce, "$&/") + "/"),
|
|
411
|
+
return O = O(o), C = v === "" ? "." + G(o, 0) : v, x(O) ? (_ = "", C != null && (_ = C.replace(ce, "$&/") + "/"), z(O, f, _, "", function(X) {
|
|
412
412
|
return X;
|
|
413
413
|
})) : O != null && (ae(O) && (O = te(
|
|
414
414
|
O,
|
|
@@ -421,7 +421,7 @@ function Ct() {
|
|
|
421
421
|
var H = v === "" ? "." : v + ":";
|
|
422
422
|
if (x(o))
|
|
423
423
|
for (var I = 0; I < o.length; I++)
|
|
424
|
-
v = o[I], k = H + G(v, I), C +=
|
|
424
|
+
v = o[I], k = H + G(v, I), C += z(
|
|
425
425
|
v,
|
|
426
426
|
f,
|
|
427
427
|
_,
|
|
@@ -430,7 +430,7 @@ function Ct() {
|
|
|
430
430
|
);
|
|
431
431
|
else if (I = N(o), typeof I == "function")
|
|
432
432
|
for (o = I.call(o), I = 0; !(v = o.next()).done; )
|
|
433
|
-
v = v.value, k = H + G(v, I++), C +=
|
|
433
|
+
v = v.value, k = H + G(v, I++), C += z(
|
|
434
434
|
v,
|
|
435
435
|
f,
|
|
436
436
|
_,
|
|
@@ -439,7 +439,7 @@ function Ct() {
|
|
|
439
439
|
);
|
|
440
440
|
else if (k === "object") {
|
|
441
441
|
if (typeof o.then == "function")
|
|
442
|
-
return
|
|
442
|
+
return z(
|
|
443
443
|
Q(o),
|
|
444
444
|
f,
|
|
445
445
|
_,
|
|
@@ -455,7 +455,7 @@ function Ct() {
|
|
|
455
455
|
function F(o, f, _) {
|
|
456
456
|
if (o == null) return o;
|
|
457
457
|
var v = [], O = 0;
|
|
458
|
-
return
|
|
458
|
+
return z(o, v, "", "", function(k) {
|
|
459
459
|
return f.call(_, k, O++);
|
|
460
460
|
}), v;
|
|
461
461
|
}
|
|
@@ -518,7 +518,7 @@ function Ct() {
|
|
|
518
518
|
return o;
|
|
519
519
|
}
|
|
520
520
|
};
|
|
521
|
-
return E.Activity = S, E.Children = ve, E.Component = B, E.Fragment = r, E.Profiler = u, E.PureComponent = ue, E.StrictMode = i, E.Suspense =
|
|
521
|
+
return E.Activity = S, E.Children = ve, E.Component = B, E.Fragment = r, E.Profiler = u, E.PureComponent = ue, E.StrictMode = i, E.Suspense = h, E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = j, E.__COMPILER_RUNTIME = {
|
|
522
522
|
__proto__: null,
|
|
523
523
|
c: function(o) {
|
|
524
524
|
return j.H.useMemoCache(o);
|
|
@@ -692,7 +692,7 @@ function Mt() {
|
|
|
692
692
|
function m(e, s, c) {
|
|
693
693
|
this.props = e, this.context = s, this.refs = Se, this.updater = c || De;
|
|
694
694
|
}
|
|
695
|
-
function
|
|
695
|
+
function h() {
|
|
696
696
|
}
|
|
697
697
|
function A(e) {
|
|
698
698
|
return "" + e;
|
|
@@ -782,7 +782,7 @@ function Mt() {
|
|
|
782
782
|
}
|
|
783
783
|
return e.key !== void 0;
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function q(e, s) {
|
|
786
786
|
function c() {
|
|
787
787
|
We || (We = !0, console.error(
|
|
788
788
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
@@ -800,7 +800,7 @@ function Mt() {
|
|
|
800
800
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
801
801
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
802
802
|
}
|
|
803
|
-
function J(e, s, c, p,
|
|
803
|
+
function J(e, s, c, p, y, $) {
|
|
804
804
|
var T = c.ref;
|
|
805
805
|
return e = {
|
|
806
806
|
$$typeof: ne,
|
|
@@ -825,12 +825,12 @@ function Mt() {
|
|
|
825
825
|
configurable: !1,
|
|
826
826
|
enumerable: !1,
|
|
827
827
|
writable: !0,
|
|
828
|
-
value:
|
|
828
|
+
value: y
|
|
829
829
|
}), Object.defineProperty(e, "_debugTask", {
|
|
830
830
|
configurable: !1,
|
|
831
831
|
enumerable: !1,
|
|
832
832
|
writable: !0,
|
|
833
|
-
value:
|
|
833
|
+
value: $
|
|
834
834
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
835
835
|
}
|
|
836
836
|
function ue(e, s) {
|
|
@@ -865,7 +865,7 @@ function Mt() {
|
|
|
865
865
|
case "rejected":
|
|
866
866
|
throw e.reason;
|
|
867
867
|
default:
|
|
868
|
-
switch (typeof e.status == "string" ? e.then(
|
|
868
|
+
switch (typeof e.status == "string" ? e.then(h, h) : (e.status = "pending", e.then(
|
|
869
869
|
function(s) {
|
|
870
870
|
e.status === "pending" && (e.status = "fulfilled", e.value = s);
|
|
871
871
|
},
|
|
@@ -881,13 +881,13 @@ function Mt() {
|
|
|
881
881
|
}
|
|
882
882
|
throw e;
|
|
883
883
|
}
|
|
884
|
-
function W(e, s, c, p,
|
|
885
|
-
var
|
|
886
|
-
(
|
|
884
|
+
function W(e, s, c, p, y) {
|
|
885
|
+
var $ = typeof e;
|
|
886
|
+
($ === "undefined" || $ === "boolean") && (e = null);
|
|
887
887
|
var T = !1;
|
|
888
888
|
if (e === null) T = !0;
|
|
889
889
|
else
|
|
890
|
-
switch (
|
|
890
|
+
switch ($) {
|
|
891
891
|
case "bigint":
|
|
892
892
|
case "string":
|
|
893
893
|
case "number":
|
|
@@ -905,51 +905,51 @@ function Mt() {
|
|
|
905
905
|
s,
|
|
906
906
|
c,
|
|
907
907
|
p,
|
|
908
|
-
|
|
908
|
+
y
|
|
909
909
|
);
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
912
|
if (T) {
|
|
913
|
-
T = e,
|
|
913
|
+
T = e, y = y(T);
|
|
914
914
|
var M = p === "" ? "." + j(T, 0) : p;
|
|
915
|
-
return
|
|
915
|
+
return ze(y) ? (c = "", M != null && (c = M.replace(Ke, "$&/") + "/"), W(y, s, c, "", function(K) {
|
|
916
916
|
return K;
|
|
917
|
-
})) :
|
|
918
|
-
|
|
919
|
-
c + (
|
|
917
|
+
})) : y != null && (x(y) && (y.key != null && (T && T.key === y.key || g(y.key)), c = ue(
|
|
918
|
+
y,
|
|
919
|
+
c + (y.key == null || T && T.key === y.key ? "" : ("" + y.key).replace(
|
|
920
920
|
Ke,
|
|
921
921
|
"$&/"
|
|
922
922
|
) + "/") + M
|
|
923
|
-
), p !== "" && T != null && x(T) && T.key == null && T._store && !T._store.validated && (c._store.validated = 2),
|
|
923
|
+
), p !== "" && T != null && x(T) && T.key == null && T._store && !T._store.validated && (c._store.validated = 2), y = c), s.push(y)), 1;
|
|
924
924
|
}
|
|
925
|
-
if (T = 0, M = p === "" ? "." : p + ":",
|
|
926
|
-
for (var
|
|
927
|
-
p = e[
|
|
925
|
+
if (T = 0, M = p === "" ? "." : p + ":", ze(e))
|
|
926
|
+
for (var R = 0; R < e.length; R++)
|
|
927
|
+
p = e[R], $ = M + j(p, R), T += W(
|
|
928
928
|
p,
|
|
929
929
|
s,
|
|
930
930
|
c,
|
|
931
|
-
|
|
932
|
-
|
|
931
|
+
$,
|
|
932
|
+
y
|
|
933
933
|
);
|
|
934
|
-
else if (
|
|
935
|
-
for (
|
|
934
|
+
else if (R = i(e), typeof R == "function")
|
|
935
|
+
for (R === e.entries && (Fe || console.warn(
|
|
936
936
|
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
|
|
937
|
-
), Fe = !0), e =
|
|
938
|
-
p = p.value,
|
|
937
|
+
), Fe = !0), e = R.call(e), R = 0; !(p = e.next()).done; )
|
|
938
|
+
p = p.value, $ = M + j(p, R++), T += W(
|
|
939
939
|
p,
|
|
940
940
|
s,
|
|
941
941
|
c,
|
|
942
|
-
|
|
943
|
-
|
|
942
|
+
$,
|
|
943
|
+
y
|
|
944
944
|
);
|
|
945
|
-
else if (
|
|
945
|
+
else if ($ === "object") {
|
|
946
946
|
if (typeof e.then == "function")
|
|
947
947
|
return W(
|
|
948
948
|
ge(e),
|
|
949
949
|
s,
|
|
950
950
|
c,
|
|
951
951
|
p,
|
|
952
|
-
|
|
952
|
+
y
|
|
953
953
|
);
|
|
954
954
|
throw s = String(e), Error(
|
|
955
955
|
"Objects are not valid as a React child (found: " + (s === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : s) + "). If you meant to render a collection of children, use an array instead."
|
|
@@ -959,9 +959,9 @@ function Mt() {
|
|
|
959
959
|
}
|
|
960
960
|
function te(e, s, c) {
|
|
961
961
|
if (e == null) return e;
|
|
962
|
-
var p = [],
|
|
963
|
-
return W(e, p, "", "", function(
|
|
964
|
-
return s.call(c,
|
|
962
|
+
var p = [], y = 0;
|
|
963
|
+
return W(e, p, "", "", function($) {
|
|
964
|
+
return s.call(c, $, y++);
|
|
965
965
|
}), p;
|
|
966
966
|
}
|
|
967
967
|
function ae(e) {
|
|
@@ -970,18 +970,18 @@ function Mt() {
|
|
|
970
970
|
s != null && (s.start = s.end = performance.now()), s = e._result;
|
|
971
971
|
var c = s();
|
|
972
972
|
if (c.then(
|
|
973
|
-
function(
|
|
973
|
+
function(y) {
|
|
974
974
|
if (e._status === 0 || e._status === -1) {
|
|
975
|
-
e._status = 1, e._result =
|
|
976
|
-
var
|
|
977
|
-
|
|
975
|
+
e._status = 1, e._result = y;
|
|
976
|
+
var $ = e._ioInfo;
|
|
977
|
+
$ != null && ($.end = performance.now()), c.status === void 0 && (c.status = "fulfilled", c.value = y);
|
|
978
978
|
}
|
|
979
979
|
},
|
|
980
|
-
function(
|
|
980
|
+
function(y) {
|
|
981
981
|
if (e._status === 0 || e._status === -1) {
|
|
982
|
-
e._status = 2, e._result =
|
|
983
|
-
var
|
|
984
|
-
|
|
982
|
+
e._status = 2, e._result = y;
|
|
983
|
+
var $ = e._ioInfo;
|
|
984
|
+
$ != null && ($.end = performance.now()), c.status === void 0 && (c.status = "rejected", c.reason = y);
|
|
985
985
|
}
|
|
986
986
|
}
|
|
987
987
|
), s = e._ioInfo, s != null) {
|
|
@@ -1035,8 +1035,8 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1035
1035
|
Xe === !1 && (Xe = !0, typeof MessageChannel > "u" && console.error(
|
|
1036
1036
|
"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
|
|
1037
1037
|
));
|
|
1038
|
-
var
|
|
1039
|
-
|
|
1038
|
+
var y = new MessageChannel();
|
|
1039
|
+
y.port1.onmessage = p, y.port2.postMessage(void 0);
|
|
1040
1040
|
};
|
|
1041
1041
|
}
|
|
1042
1042
|
return Ee(e);
|
|
@@ -1044,7 +1044,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1044
1044
|
function Q(e) {
|
|
1045
1045
|
return 1 < e.length && typeof AggregateError == "function" ? new AggregateError(e) : e[0];
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function z(e, s) {
|
|
1048
1048
|
s !== we - 1 && console.error(
|
|
1049
1049
|
"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
|
|
1050
1050
|
), we = s;
|
|
@@ -1058,8 +1058,8 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1058
1058
|
return F(e, s, c);
|
|
1059
1059
|
});
|
|
1060
1060
|
return;
|
|
1061
|
-
} catch (
|
|
1062
|
-
b.thrownErrors.push(
|
|
1061
|
+
} catch (y) {
|
|
1062
|
+
b.thrownErrors.push(y);
|
|
1063
1063
|
}
|
|
1064
1064
|
else b.actQueue = null;
|
|
1065
1065
|
0 < b.thrownErrors.length ? (p = Q(b.thrownErrors), b.thrownErrors.length = 0, c(p)) : s(e);
|
|
@@ -1084,8 +1084,8 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1084
1084
|
} while (!0);
|
|
1085
1085
|
}
|
|
1086
1086
|
e.length = 0;
|
|
1087
|
-
} catch (
|
|
1088
|
-
e.splice(0, s + 1), b.thrownErrors.push(
|
|
1087
|
+
} catch (y) {
|
|
1088
|
+
e.splice(0, s + 1), b.thrownErrors.push(y);
|
|
1089
1089
|
} finally {
|
|
1090
1090
|
Oe = !1;
|
|
1091
1091
|
}
|
|
@@ -1105,7 +1105,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1105
1105
|
enqueueSetState: function(e) {
|
|
1106
1106
|
u(e, "setState");
|
|
1107
1107
|
}
|
|
1108
|
-
},
|
|
1108
|
+
}, qe = Object.assign, Se = {};
|
|
1109
1109
|
Object.freeze(Se), a.prototype.isReactComponent = {}, a.prototype.setState = function(e, s) {
|
|
1110
1110
|
if (typeof e != "object" && typeof e != "function" && e != null)
|
|
1111
1111
|
throw Error(
|
|
@@ -1127,8 +1127,8 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1127
1127
|
};
|
|
1128
1128
|
for (le in D)
|
|
1129
1129
|
D.hasOwnProperty(le) && r(le, D[le]);
|
|
1130
|
-
l.prototype = a.prototype, D = m.prototype = new l(), D.constructor = m,
|
|
1131
|
-
var
|
|
1130
|
+
l.prototype = a.prototype, D = m.prototype = new l(), D.constructor = m, qe(D, a.prototype), D.isPureReactComponent = !0;
|
|
1131
|
+
var ze = Array.isArray, dt = Symbol.for("react.client.reference"), b = {
|
|
1132
1132
|
H: null,
|
|
1133
1133
|
A: null,
|
|
1134
1134
|
T: null,
|
|
@@ -1152,7 +1152,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1152
1152
|
var We, xe, Ge = {}, mt = D.react_stack_bottom_frame.bind(
|
|
1153
1153
|
D,
|
|
1154
1154
|
U
|
|
1155
|
-
)(),
|
|
1155
|
+
)(), ht = Be(w(U)), Fe = !1, Ke = /\/+/g, Qe = typeof reportError == "function" ? reportError : function(e) {
|
|
1156
1156
|
if (typeof window == "object" && typeof window.ErrorEvent == "function") {
|
|
1157
1157
|
var s = new window.ErrorEvent("error", {
|
|
1158
1158
|
bubbles: !0,
|
|
@@ -1210,30 +1210,30 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1210
1210
|
n.Activity = Ie, n.Children = le, n.Component = a, n.Fragment = o, n.Profiler = _, n.PureComponent = m, n.StrictMode = f, n.Suspense = C, n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = b, n.__COMPILER_RUNTIME = D, n.act = function(e) {
|
|
1211
1211
|
var s = b.actQueue, c = we;
|
|
1212
1212
|
we++;
|
|
1213
|
-
var p = b.actQueue = s !== null ? s : [],
|
|
1213
|
+
var p = b.actQueue = s !== null ? s : [], y = !1;
|
|
1214
1214
|
try {
|
|
1215
|
-
var
|
|
1216
|
-
} catch (
|
|
1217
|
-
b.thrownErrors.push(
|
|
1215
|
+
var $ = e();
|
|
1216
|
+
} catch (R) {
|
|
1217
|
+
b.thrownErrors.push(R);
|
|
1218
1218
|
}
|
|
1219
1219
|
if (0 < b.thrownErrors.length)
|
|
1220
|
-
throw
|
|
1221
|
-
if (
|
|
1222
|
-
var T =
|
|
1220
|
+
throw z(s, c), e = Q(b.thrownErrors), b.thrownErrors.length = 0, e;
|
|
1221
|
+
if ($ !== null && typeof $ == "object" && typeof $.then == "function") {
|
|
1222
|
+
var T = $;
|
|
1223
1223
|
return Ve(function() {
|
|
1224
|
-
|
|
1224
|
+
y || Te || (Te = !0, console.error(
|
|
1225
1225
|
"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
|
|
1226
1226
|
));
|
|
1227
1227
|
}), {
|
|
1228
|
-
then: function(
|
|
1229
|
-
|
|
1228
|
+
then: function(R, K) {
|
|
1229
|
+
y = !0, T.then(
|
|
1230
1230
|
function(re) {
|
|
1231
|
-
if (
|
|
1231
|
+
if (z(s, c), c === 0) {
|
|
1232
1232
|
try {
|
|
1233
1233
|
fe(p), G(function() {
|
|
1234
1234
|
return F(
|
|
1235
1235
|
re,
|
|
1236
|
-
|
|
1236
|
+
R,
|
|
1237
1237
|
K
|
|
1238
1238
|
);
|
|
1239
1239
|
});
|
|
@@ -1241,15 +1241,15 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1241
1241
|
b.thrownErrors.push(gt);
|
|
1242
1242
|
}
|
|
1243
1243
|
if (0 < b.thrownErrors.length) {
|
|
1244
|
-
var
|
|
1244
|
+
var yt = Q(
|
|
1245
1245
|
b.thrownErrors
|
|
1246
1246
|
);
|
|
1247
|
-
b.thrownErrors.length = 0, K(
|
|
1247
|
+
b.thrownErrors.length = 0, K(yt);
|
|
1248
1248
|
}
|
|
1249
|
-
} else
|
|
1249
|
+
} else R(re);
|
|
1250
1250
|
},
|
|
1251
1251
|
function(re) {
|
|
1252
|
-
|
|
1252
|
+
z(s, c), 0 < b.thrownErrors.length && (re = Q(
|
|
1253
1253
|
b.thrownErrors
|
|
1254
1254
|
), b.thrownErrors.length = 0), K(re);
|
|
1255
1255
|
}
|
|
@@ -1257,22 +1257,22 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1257
1257
|
}
|
|
1258
1258
|
};
|
|
1259
1259
|
}
|
|
1260
|
-
var M =
|
|
1261
|
-
if (
|
|
1262
|
-
|
|
1260
|
+
var M = $;
|
|
1261
|
+
if (z(s, c), c === 0 && (fe(p), p.length !== 0 && Ve(function() {
|
|
1262
|
+
y || Te || (Te = !0, console.error(
|
|
1263
1263
|
"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
|
|
1264
1264
|
));
|
|
1265
1265
|
}), b.actQueue = null), 0 < b.thrownErrors.length)
|
|
1266
1266
|
throw e = Q(b.thrownErrors), b.thrownErrors.length = 0, e;
|
|
1267
1267
|
return {
|
|
1268
|
-
then: function(
|
|
1269
|
-
|
|
1268
|
+
then: function(R, K) {
|
|
1269
|
+
y = !0, c === 0 ? (b.actQueue = p, G(function() {
|
|
1270
1270
|
return F(
|
|
1271
1271
|
M,
|
|
1272
|
-
|
|
1272
|
+
R,
|
|
1273
1273
|
K
|
|
1274
1274
|
);
|
|
1275
|
-
})) :
|
|
1275
|
+
})) : R(M);
|
|
1276
1276
|
}
|
|
1277
1277
|
};
|
|
1278
1278
|
}, n.cache = function(e) {
|
|
@@ -1289,7 +1289,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1289
1289
|
throw Error(
|
|
1290
1290
|
"The argument must be a React element, but you passed " + e + "."
|
|
1291
1291
|
);
|
|
1292
|
-
var p =
|
|
1292
|
+
var p = qe({}, e.props), y = e.key, $ = e._owner;
|
|
1293
1293
|
if (s != null) {
|
|
1294
1294
|
var T;
|
|
1295
1295
|
e: {
|
|
@@ -1302,7 +1302,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1302
1302
|
}
|
|
1303
1303
|
T = s.ref !== void 0;
|
|
1304
1304
|
}
|
|
1305
|
-
T && (
|
|
1305
|
+
T && ($ = N()), Y(s) && (g(s.key), y = "" + s.key);
|
|
1306
1306
|
for (M in s)
|
|
1307
1307
|
!_e.call(s, M) || M === "key" || M === "__self" || M === "__source" || M === "ref" && s.ref === void 0 || (p[M] = s[M]);
|
|
1308
1308
|
}
|
|
@@ -1310,19 +1310,19 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1310
1310
|
if (M === 1) p.children = c;
|
|
1311
1311
|
else if (1 < M) {
|
|
1312
1312
|
T = Array(M);
|
|
1313
|
-
for (var
|
|
1314
|
-
T[
|
|
1313
|
+
for (var R = 0; R < M; R++)
|
|
1314
|
+
T[R] = arguments[R + 2];
|
|
1315
1315
|
p.children = T;
|
|
1316
1316
|
}
|
|
1317
1317
|
for (p = J(
|
|
1318
1318
|
e.type,
|
|
1319
|
-
|
|
1319
|
+
y,
|
|
1320
1320
|
p,
|
|
1321
|
-
|
|
1321
|
+
$,
|
|
1322
1322
|
e._debugStack,
|
|
1323
1323
|
e._debugTask
|
|
1324
|
-
),
|
|
1325
|
-
ee(arguments[
|
|
1324
|
+
), y = 2; y < arguments.length; y++)
|
|
1325
|
+
ee(arguments[y]);
|
|
1326
1326
|
return p;
|
|
1327
1327
|
}, n.createContext = function(e) {
|
|
1328
1328
|
return e = {
|
|
@@ -1340,34 +1340,34 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1340
1340
|
for (var p = 2; p < arguments.length; p++)
|
|
1341
1341
|
ee(arguments[p]);
|
|
1342
1342
|
p = {};
|
|
1343
|
-
var
|
|
1343
|
+
var y = null;
|
|
1344
1344
|
if (s != null)
|
|
1345
|
-
for (
|
|
1345
|
+
for (R in xe || !("__self" in s) || "key" in s || (xe = !0, console.warn(
|
|
1346
1346
|
"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
|
|
1347
|
-
)), Y(s) && (g(s.key),
|
|
1348
|
-
_e.call(s,
|
|
1349
|
-
var
|
|
1350
|
-
if (
|
|
1351
|
-
else if (1 <
|
|
1352
|
-
for (var T = Array(
|
|
1347
|
+
)), Y(s) && (g(s.key), y = "" + s.key), s)
|
|
1348
|
+
_e.call(s, R) && R !== "key" && R !== "__self" && R !== "__source" && (p[R] = s[R]);
|
|
1349
|
+
var $ = arguments.length - 2;
|
|
1350
|
+
if ($ === 1) p.children = c;
|
|
1351
|
+
else if (1 < $) {
|
|
1352
|
+
for (var T = Array($), M = 0; M < $; M++)
|
|
1353
1353
|
T[M] = arguments[M + 2];
|
|
1354
1354
|
Object.freeze && Object.freeze(T), p.children = T;
|
|
1355
1355
|
}
|
|
1356
1356
|
if (e && e.defaultProps)
|
|
1357
|
-
for (
|
|
1358
|
-
p[
|
|
1359
|
-
|
|
1357
|
+
for (R in $ = e.defaultProps, $)
|
|
1358
|
+
p[R] === void 0 && (p[R] = $[R]);
|
|
1359
|
+
y && q(
|
|
1360
1360
|
p,
|
|
1361
1361
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
1362
1362
|
);
|
|
1363
|
-
var
|
|
1363
|
+
var R = 1e4 > b.recentlyCreatedOwnerStacks++;
|
|
1364
1364
|
return J(
|
|
1365
1365
|
e,
|
|
1366
|
-
|
|
1366
|
+
y,
|
|
1367
1367
|
p,
|
|
1368
1368
|
N(),
|
|
1369
|
-
|
|
1370
|
-
|
|
1369
|
+
R ? Error("react-stack-top-frame") : mt,
|
|
1370
|
+
R ? Be(w(e)) : ht
|
|
1371
1371
|
);
|
|
1372
1372
|
}, n.createRef = function() {
|
|
1373
1373
|
var e = { current: null };
|
|
@@ -1435,10 +1435,10 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
1435
1435
|
var s = b.T, c = {};
|
|
1436
1436
|
c._updatedFibers = /* @__PURE__ */ new Set(), b.T = c;
|
|
1437
1437
|
try {
|
|
1438
|
-
var p = e(),
|
|
1439
|
-
|
|
1440
|
-
} catch (
|
|
1441
|
-
Qe(
|
|
1438
|
+
var p = e(), y = b.S;
|
|
1439
|
+
y !== null && y(c, p), typeof p == "object" && p !== null && typeof p.then == "function" && (b.asyncTransitions++, p.then(ce, ce), p.then(h, Qe));
|
|
1440
|
+
} catch ($) {
|
|
1441
|
+
Qe($);
|
|
1442
1442
|
} finally {
|
|
1443
1443
|
s === null && c._updatedFibers && (e = c._updatedFibers.size, c._updatedFibers.clear(), 10 < e && console.warn(
|
|
1444
1444
|
"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
|
|
@@ -1523,10 +1523,10 @@ function Ut() {
|
|
|
1523
1523
|
return Pe || Lt(), Pe;
|
|
1524
1524
|
}
|
|
1525
1525
|
const It = "x-parser-original-payload", Yt = "x-lib-conversion-error", Ht = /^application\/vnd\.apache\.avro(\+(json|yaml))?(\s*;\s*version=.+)?$/i, Dt = /^application\/vnd\.google\.protobuf(\s*;\s*version=.+)?$/i;
|
|
1526
|
-
function
|
|
1526
|
+
function qt(t) {
|
|
1527
1527
|
return typeof t == "string" && Ht.test(t);
|
|
1528
1528
|
}
|
|
1529
|
-
function
|
|
1529
|
+
function zt(t) {
|
|
1530
1530
|
return typeof t == "string" && Dt.test(t);
|
|
1531
1531
|
}
|
|
1532
1532
|
function at(t) {
|
|
@@ -1587,7 +1587,7 @@ function Ft(t) {
|
|
|
1587
1587
|
schemaFormat: n,
|
|
1588
1588
|
originalSchema: i
|
|
1589
1589
|
};
|
|
1590
|
-
if (
|
|
1590
|
+
if (qt(n) && xt(r)) {
|
|
1591
1591
|
const m = jt(r);
|
|
1592
1592
|
if (m.length > 0)
|
|
1593
1593
|
return {
|
|
@@ -1602,16 +1602,16 @@ function Ft(t) {
|
|
|
1602
1602
|
schemaFormat: n,
|
|
1603
1603
|
originalSchema: r
|
|
1604
1604
|
};
|
|
1605
|
-
} catch (
|
|
1605
|
+
} catch (h) {
|
|
1606
1606
|
return {
|
|
1607
1607
|
schema: V(r) ?? {},
|
|
1608
1608
|
schemaFormat: n,
|
|
1609
1609
|
originalSchema: r,
|
|
1610
|
-
conversionError:
|
|
1610
|
+
conversionError: h instanceof Error ? h.message : "Failed to convert Avro schema"
|
|
1611
1611
|
};
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
|
-
if (
|
|
1614
|
+
if (zt(n) && typeof r == "string") {
|
|
1615
1615
|
const m = Ut();
|
|
1616
1616
|
if (!m)
|
|
1617
1617
|
return {
|
|
@@ -1626,14 +1626,14 @@ function Ft(t) {
|
|
|
1626
1626
|
schemaFormat: n,
|
|
1627
1627
|
originalSchema: r
|
|
1628
1628
|
};
|
|
1629
|
-
} catch (
|
|
1629
|
+
} catch (h) {
|
|
1630
1630
|
return {
|
|
1631
1631
|
// Raw proto text is not tree-renderable; the JSON tab shows
|
|
1632
1632
|
// originalSchema instead.
|
|
1633
1633
|
schema: {},
|
|
1634
1634
|
schemaFormat: n,
|
|
1635
1635
|
originalSchema: r,
|
|
1636
|
-
conversionError:
|
|
1636
|
+
conversionError: h instanceof Error ? h.message : "Failed to convert Protobuf schema"
|
|
1637
1637
|
};
|
|
1638
1638
|
}
|
|
1639
1639
|
}
|
|
@@ -1659,7 +1659,7 @@ function Xt(t, n) {
|
|
|
1659
1659
|
}
|
|
1660
1660
|
return r;
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function Re(t) {
|
|
1663
1663
|
const n = /* @__PURE__ */ new Map();
|
|
1664
1664
|
return (r) => {
|
|
1665
1665
|
if (n.has(r)) return n.get(r);
|
|
@@ -1689,7 +1689,7 @@ function be(t, n, r = Vt) {
|
|
|
1689
1689
|
u[a] = be(l, n, i);
|
|
1690
1690
|
return u;
|
|
1691
1691
|
}
|
|
1692
|
-
function
|
|
1692
|
+
function $e(t, n, r) {
|
|
1693
1693
|
if (!n) return "";
|
|
1694
1694
|
const i = be(n, r);
|
|
1695
1695
|
return `${L(4, `\`${d(t)}\``)}
|
|
@@ -1708,7 +1708,7 @@ _(schema conversion still in progress)_`;
|
|
|
1708
1708
|
|
|
1709
1709
|
_(could not convert schema: ${d(a)})_`;
|
|
1710
1710
|
const m = u && !i.description ? { ...i, description: u } : i;
|
|
1711
|
-
return
|
|
1711
|
+
return $e(t, m, r);
|
|
1712
1712
|
}
|
|
1713
1713
|
function ct(t) {
|
|
1714
1714
|
var n;
|
|
@@ -1773,8 +1773,8 @@ function ft(t) {
|
|
|
1773
1773
|
const m = [`**Host:** \`${d(l.host)}${l.pathname ? d(l.pathname) : ""}\``];
|
|
1774
1774
|
m.push(`**Protocol:** ${d(l.protocol)}${l.protocolVersion ? ` ${d(l.protocolVersion)}` : ""}`), l.description && m.push(d(l.description)), u.push(m.join(`
|
|
1775
1775
|
`));
|
|
1776
|
-
const
|
|
1777
|
-
|
|
1776
|
+
const h = Zt(l.security);
|
|
1777
|
+
h && u.push(h);
|
|
1778
1778
|
}
|
|
1779
1779
|
n.push(u.join(`
|
|
1780
1780
|
|
|
@@ -1782,45 +1782,45 @@ function ft(t) {
|
|
|
1782
1782
|
}
|
|
1783
1783
|
return n;
|
|
1784
1784
|
}
|
|
1785
|
-
function Jt(t, n =
|
|
1785
|
+
function Jt(t, n = Re(t)) {
|
|
1786
1786
|
var a, l, m;
|
|
1787
1787
|
const r = ft(t);
|
|
1788
1788
|
if (t.operations && Object.keys(t.operations).length) {
|
|
1789
|
-
const
|
|
1789
|
+
const h = [L(2, "Operations")];
|
|
1790
1790
|
for (const [A, g] of Object.entries(t.operations)) {
|
|
1791
1791
|
const S = g.channel;
|
|
1792
|
-
|
|
1792
|
+
h.push(L(3, `${d((a = g.action) == null ? void 0 : a.toUpperCase())} \`${d(A)}\``));
|
|
1793
1793
|
const w = [];
|
|
1794
1794
|
S != null && S.address && w.push(`**Channel:** \`${d(S.address)}\``), g.summary && w.push(d(g.summary)), g.description && w.push(d(g.description));
|
|
1795
1795
|
const N = g.messages ?? [];
|
|
1796
|
-
N.length && w.push(`**Messages:** ${N.map((U) => `\`${d(U.name ?? U.title ?? "message")}\``).join(", ")}`),
|
|
1796
|
+
N.length && w.push(`**Messages:** ${N.map((U) => `\`${d(U.name ?? U.title ?? "message")}\``).join(", ")}`), h.push(w.join(`
|
|
1797
1797
|
|
|
1798
1798
|
`));
|
|
1799
1799
|
}
|
|
1800
|
-
r.push(
|
|
1800
|
+
r.push(h.join(`
|
|
1801
1801
|
|
|
1802
1802
|
`));
|
|
1803
1803
|
}
|
|
1804
1804
|
const i = (l = t.components) == null ? void 0 : l.messages;
|
|
1805
1805
|
if (i && Object.keys(i).length) {
|
|
1806
|
-
const
|
|
1806
|
+
const h = [L(2, "Messages")];
|
|
1807
1807
|
for (const [A, g] of Object.entries(i)) {
|
|
1808
|
-
|
|
1808
|
+
h.push(L(3, d(g.title ?? g.name ?? A)));
|
|
1809
1809
|
const S = [];
|
|
1810
|
-
g.summary && S.push(d(g.summary)), g.description && S.push(d(g.description)), g.contentType && S.push(`**Content-Type:** \`${d(g.contentType)}\``),
|
|
1810
|
+
g.summary && S.push(d(g.summary)), g.description && S.push(d(g.description)), g.contentType && S.push(`**Content-Type:** \`${d(g.contentType)}\``), h.push(S.join(`
|
|
1811
1811
|
|
|
1812
|
-
`)), g.payload &&
|
|
1812
|
+
`)), g.payload && h.push(me("payload", g.payload, n)), g.headers && h.push(me("headers", g.headers, n));
|
|
1813
1813
|
}
|
|
1814
|
-
r.push(
|
|
1814
|
+
r.push(h.join(`
|
|
1815
1815
|
|
|
1816
1816
|
`));
|
|
1817
1817
|
}
|
|
1818
1818
|
const u = (m = t.components) == null ? void 0 : m.schemas;
|
|
1819
1819
|
if (u && Object.keys(u).length) {
|
|
1820
|
-
const
|
|
1820
|
+
const h = [L(2, "Schemas")];
|
|
1821
1821
|
for (const [A, g] of Object.entries(u))
|
|
1822
|
-
|
|
1823
|
-
r.push(
|
|
1822
|
+
h.push(me(A, g, n));
|
|
1823
|
+
r.push(h.join(`
|
|
1824
1824
|
|
|
1825
1825
|
`));
|
|
1826
1826
|
}
|
|
@@ -1835,19 +1835,19 @@ function en(t, n, r) {
|
|
|
1835
1835
|
|
|
1836
1836
|
`));
|
|
1837
1837
|
const l = n.messages ?? [];
|
|
1838
|
-
for (const
|
|
1839
|
-
const A = [L(4, d(
|
|
1840
|
-
|
|
1838
|
+
for (const h of l) {
|
|
1839
|
+
const A = [L(4, d(h.title ?? h.name ?? "Message"))], g = [];
|
|
1840
|
+
h.summary && g.push(d(h.summary)), h.description && g.push(d(h.description)), h.contentType && g.push(`**Content-Type:** \`${d(h.contentType)}\``), g.length && A.push(g.join(`
|
|
1841
1841
|
|
|
1842
1842
|
`)), u.push(A.join(`
|
|
1843
1843
|
|
|
1844
|
-
`)),
|
|
1844
|
+
`)), h.payload && u.push(me("payload", h.payload, r)), h.headers && u.push(me("headers", h.headers, r));
|
|
1845
1845
|
}
|
|
1846
1846
|
return u.filter(Boolean).join(`
|
|
1847
1847
|
|
|
1848
1848
|
`);
|
|
1849
1849
|
}
|
|
1850
|
-
function tn(t, n, r =
|
|
1850
|
+
function tn(t, n, r = Re(t)) {
|
|
1851
1851
|
var a;
|
|
1852
1852
|
const i = (a = t.operations) == null ? void 0 : a[n];
|
|
1853
1853
|
if (!i) return "";
|
|
@@ -1862,8 +1862,8 @@ function nn(t, n) {
|
|
|
1862
1862
|
for (const a of t)
|
|
1863
1863
|
for (const [l, m] of Object.entries(a)) {
|
|
1864
1864
|
if (!m.length) continue;
|
|
1865
|
-
const
|
|
1866
|
-
r.set(l, Array.from(/* @__PURE__ */ new Set([...
|
|
1865
|
+
const h = r.get(l) ?? [];
|
|
1866
|
+
r.set(l, Array.from(/* @__PURE__ */ new Set([...h, ...m])));
|
|
1867
1867
|
}
|
|
1868
1868
|
const i = Array.from(new Set(t.flatMap((a) => Object.keys(a)))), u = [];
|
|
1869
1869
|
for (const a of i) {
|
|
@@ -1871,14 +1871,14 @@ function nn(t, n) {
|
|
|
1871
1871
|
if (!l) continue;
|
|
1872
1872
|
const m = r.get(a);
|
|
1873
1873
|
if (u.push(`- **${ct(l)}** (\`${d(a)}\`)`), l.description && u.push(` ${d(l.description)}`), l.type === "openIdConnect" && l.openIdConnectUrl && u.push(` - OpenID Connect URL: \`${d(l.openIdConnectUrl)}\``), l.type === "oauth2")
|
|
1874
|
-
for (const [
|
|
1875
|
-
u.push(` - Flow \`${d(
|
|
1874
|
+
for (const [h, A] of Object.entries(l.flows ?? {})) {
|
|
1875
|
+
u.push(` - Flow \`${d(h)}\`:`), A.authorizationUrl && u.push(` - Authorization URL: \`${d(A.authorizationUrl)}\``), A.tokenUrl && u.push(` - Token URL: \`${d(A.tokenUrl)}\``), A.refreshUrl && u.push(` - Refresh URL: \`${d(A.refreshUrl)}\``);
|
|
1876
1876
|
const g = m != null && m.length ? m : Object.keys(A.scopes ?? {});
|
|
1877
1877
|
g.length && u.push(
|
|
1878
1878
|
` - ${m != null && m.length ? "Required scopes" : "Scopes"}: ${g.map((S) => `\`${d(S)}\``).join(", ")}`
|
|
1879
1879
|
);
|
|
1880
1880
|
}
|
|
1881
|
-
else m != null && m.length && u.push(` - Required scopes: ${m.map((
|
|
1881
|
+
else m != null && m.length && u.push(` - Required scopes: ${m.map((h) => `\`${d(h)}\``).join(", ")}`);
|
|
1882
1882
|
}
|
|
1883
1883
|
return u.length ? ["**Authorization:**", u.join(`
|
|
1884
1884
|
`)].join(`
|
|
@@ -1889,16 +1889,16 @@ function lt(t, n, r, i, u, a) {
|
|
|
1889
1889
|
var w;
|
|
1890
1890
|
const l = [L(3, `${t.toUpperCase()} \`${d(n)}\``)], m = [];
|
|
1891
1891
|
r.summary && m.push(d(r.summary)), r.description && m.push(d(r.description)), r.deprecated && m.push("**Deprecated**");
|
|
1892
|
-
const
|
|
1892
|
+
const h = r.security ?? a ?? [], A = nn(h, u);
|
|
1893
1893
|
A && m.push(A);
|
|
1894
1894
|
for (const N of ["path", "query", "header", "cookie"]) {
|
|
1895
1895
|
const U = (r.parameters ?? []).filter((Y) => Y.in === N);
|
|
1896
1896
|
if (U.length) {
|
|
1897
1897
|
m.push(`**${N[0].toUpperCase()}${N.slice(1)} Parameters:**`);
|
|
1898
1898
|
for (const Y of U) {
|
|
1899
|
-
const
|
|
1899
|
+
const q = Y.schema;
|
|
1900
1900
|
m.push(
|
|
1901
|
-
`- \`${d(Y.name)}\`${Y.required ? " (required)" : ""}${
|
|
1901
|
+
`- \`${d(Y.name)}\`${Y.required ? " (required)" : ""}${q != null && q.type ? ` — ${d(q.type)}` : ""}${Y.description ? `: ${d(Y.description)}` : ""}`
|
|
1902
1902
|
);
|
|
1903
1903
|
}
|
|
1904
1904
|
}
|
|
@@ -1909,7 +1909,7 @@ function lt(t, n, r, i, u, a) {
|
|
|
1909
1909
|
const g = ((w = r.requestBody) == null ? void 0 : w.content) ?? {};
|
|
1910
1910
|
for (const [N, U] of Object.entries(g))
|
|
1911
1911
|
l.push(
|
|
1912
|
-
[`**Request Body** (\`${d(N)}\`)`,
|
|
1912
|
+
[`**Request Body** (\`${d(N)}\`)`, $e("body", U.schema, i)].join(
|
|
1913
1913
|
`
|
|
1914
1914
|
|
|
1915
1915
|
`
|
|
@@ -1918,9 +1918,9 @@ function lt(t, n, r, i, u, a) {
|
|
|
1918
1918
|
const S = r.responses ?? {};
|
|
1919
1919
|
for (const [N, U] of Object.entries(S)) {
|
|
1920
1920
|
const Y = [L(4, `${N}${U.description ? `: ${d(U.description)}` : ""}`)];
|
|
1921
|
-
for (const [
|
|
1921
|
+
for (const [q, B] of Object.entries(U.content ?? {}))
|
|
1922
1922
|
Y.push(
|
|
1923
|
-
[`**Body** (\`${d(
|
|
1923
|
+
[`**Body** (\`${d(q)}\`)`, $e("body", B.schema, i)].join(
|
|
1924
1924
|
`
|
|
1925
1925
|
|
|
1926
1926
|
`
|
|
@@ -1934,8 +1934,8 @@ function lt(t, n, r, i, u, a) {
|
|
|
1934
1934
|
|
|
1935
1935
|
`);
|
|
1936
1936
|
}
|
|
1937
|
-
function rn(t, n =
|
|
1938
|
-
var l, m,
|
|
1937
|
+
function rn(t, n = Re(t)) {
|
|
1938
|
+
var l, m, h, A, g;
|
|
1939
1939
|
const r = [], { info: i } = t;
|
|
1940
1940
|
if (r.push(L(1, d(i.title))), r.push(`**Version:** ${d(i.version)}`), i.description && r.push(d(i.description)), (l = t.servers) != null && l.length) {
|
|
1941
1941
|
const S = [L(2, "Servers")];
|
|
@@ -1948,7 +1948,7 @@ function rn(t, n = $e(t)) {
|
|
|
1948
1948
|
if (u.length) {
|
|
1949
1949
|
const S = [L(2, "Endpoints")];
|
|
1950
1950
|
for (const { method: w, path: N } of u) {
|
|
1951
|
-
const U = (
|
|
1951
|
+
const U = (h = (m = t.paths) == null ? void 0 : m[N]) == null ? void 0 : h[w];
|
|
1952
1952
|
U && S.push(
|
|
1953
1953
|
lt(w, N, U, n, (A = t.components) == null ? void 0 : A.securitySchemes, t.security)
|
|
1954
1954
|
);
|
|
@@ -1961,7 +1961,7 @@ function rn(t, n = $e(t)) {
|
|
|
1961
1961
|
if (a && Object.keys(a).length) {
|
|
1962
1962
|
const S = [L(2, "Schemas")];
|
|
1963
1963
|
for (const [w, N] of Object.entries(a))
|
|
1964
|
-
S.push(
|
|
1964
|
+
S.push($e(w, N, n));
|
|
1965
1965
|
r.push(S.join(`
|
|
1966
1966
|
|
|
1967
1967
|
`));
|
|
@@ -1970,9 +1970,9 @@ function rn(t, n = $e(t)) {
|
|
|
1970
1970
|
|
|
1971
1971
|
`);
|
|
1972
1972
|
}
|
|
1973
|
-
function on(t, n, r, i =
|
|
1974
|
-
var m,
|
|
1975
|
-
const u = (
|
|
1973
|
+
function on(t, n, r, i = Re(t)) {
|
|
1974
|
+
var m, h, A, g;
|
|
1975
|
+
const u = (h = (m = t.paths) == null ? void 0 : m[r]) == null ? void 0 : h[n];
|
|
1976
1976
|
if (!u) return "";
|
|
1977
1977
|
const a = [], { info: l } = t;
|
|
1978
1978
|
if (a.push(L(1, d(l.title))), a.push(`**Version:** ${d(l.version)}`), l.description && a.push(d(l.description)), (A = t.servers) != null && A.length) {
|
|
@@ -2063,19 +2063,19 @@ function Ue(t) {
|
|
|
2063
2063
|
function cn(t) {
|
|
2064
2064
|
return t.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
2065
2065
|
}
|
|
2066
|
-
function
|
|
2066
|
+
function ln(t) {
|
|
2067
2067
|
return Ue(t).targets(t);
|
|
2068
2068
|
}
|
|
2069
|
-
function
|
|
2069
|
+
function pn(t, n) {
|
|
2070
2070
|
const r = Ue(t);
|
|
2071
2071
|
if (n && n.document !== t)
|
|
2072
2072
|
throw new Error("[apiuikit] Markdown target belongs to a different document.");
|
|
2073
2073
|
return r.toMarkdown(t, n);
|
|
2074
2074
|
}
|
|
2075
|
-
function
|
|
2076
|
-
const r = Ue(t), { baseUrl: i, url: u, optional: a } = n, l = (i == null ? void 0 : i.replace(/\/+$/, "")) ?? "",
|
|
2075
|
+
function dn(t, n = {}) {
|
|
2076
|
+
const r = Ue(t), { baseUrl: i, url: u, optional: a } = n, l = (i == null ? void 0 : i.replace(/\/+$/, "")) ?? "", h = u ?? ((w) => `${l}/${cn(w.key)}.md`), A = [`# ${n.title ?? r.title(t)}`], g = n.summary ?? r.summary(t);
|
|
2077
2077
|
g && A.push("", `> ${g}`);
|
|
2078
|
-
const S = r.targets(t).map((w) => ({ entry: w, href:
|
|
2078
|
+
const S = r.targets(t).map((w) => ({ entry: w, href: h(w) })).filter((w) => !!w.href);
|
|
2079
2079
|
if (S.length) {
|
|
2080
2080
|
A.push("", `## ${r.sectionTitle}`, "");
|
|
2081
2081
|
for (const { entry: w, href: N } of S)
|
|
@@ -2089,12 +2089,24 @@ function pn(t, n = {}) {
|
|
|
2089
2089
|
return A.push(""), A.join(`
|
|
2090
2090
|
`);
|
|
2091
2091
|
}
|
|
2092
|
+
const fn = [
|
|
2093
|
+
"The following is API documentation in Markdown.",
|
|
2094
|
+
"Use it to answer questions about this API and help write client code.",
|
|
2095
|
+
"Stick to what is documented below - do not invent endpoints, fields, or behavior."
|
|
2096
|
+
];
|
|
2097
|
+
function mn(t) {
|
|
2098
|
+
return `${["> ## Agent Instructions", ...fn.map((r) => `> ${r}`)].join(`
|
|
2099
|
+
`)}
|
|
2100
|
+
|
|
2101
|
+
${t.trimStart()}`;
|
|
2102
|
+
}
|
|
2092
2103
|
export {
|
|
2093
2104
|
tn as asyncApiOperationToMarkdown,
|
|
2094
2105
|
Jt as asyncApiToMarkdown,
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2106
|
+
dn as documentToLlmsTxt,
|
|
2107
|
+
pn as documentToMarkdown,
|
|
2108
|
+
ln as listDocumentTargets,
|
|
2109
|
+
mn as markdownForLlm,
|
|
2098
2110
|
on as openApiEndpointToMarkdown,
|
|
2099
2111
|
rn as openApiToMarkdown,
|
|
2100
2112
|
cn as targetSlug
|