zudoku 0.33.0 → 0.33.2-local.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/validators/common.d.ts +226 -8
- package/dist/config/validators/common.js +26 -8
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +89 -2
- package/dist/lib/authentication/hook.d.ts +1 -0
- package/dist/lib/authentication/hook.js +11 -1
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +6 -6
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/state.js +8 -2
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/index.d.ts +2 -1
- package/dist/lib/core/RouteGuard.d.ts +1 -1
- package/dist/lib/core/RouteGuard.js +24 -18
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +3 -1
- package/dist/lib/plugins/api-catalog/Catalog.js +7 -4
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-catalog/index.js +1 -1
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.d.ts +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -1
- package/dist/lib/plugins/openapi/ParameterList.js +3 -2
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js +3 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +4 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +10 -7
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.d.ts +6 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +66 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +8 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js +31 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/get-results.d.ts +3 -0
- package/dist/lib/plugins/search-pagefind/get-results.js +37 -0
- package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/index.d.ts +8 -0
- package/dist/lib/plugins/search-pagefind/index.js +9 -0
- package/dist/lib/plugins/search-pagefind/index.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/types.d.ts +85 -0
- package/dist/lib/plugins/search-pagefind/types.js +2 -0
- package/dist/lib/plugins/search-pagefind/types.js.map +1 -0
- package/dist/lib/ui/Command.d.ts +7 -1
- package/dist/lib/ui/Command.js +2 -2
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js +6 -8
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/build.js +4 -0
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +7 -2
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.js +8 -0
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/pagefind.d.ts +4 -0
- package/dist/vite/pagefind.js +15 -0
- package/dist/vite/pagefind.js.map +1 -0
- package/dist/vite/plugin-component.js +4 -0
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-search.js +4 -0
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/prerender/prerender.js +1 -1
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/sitemap.js +2 -1
- package/dist/vite/sitemap.js.map +1 -1
- package/lib/{AuthenticationPlugin-_gUMnGxb.js → AuthenticationPlugin-BCYuduZ9.js} +3 -3
- package/lib/{AuthenticationPlugin-_gUMnGxb.js.map → AuthenticationPlugin-BCYuduZ9.js.map} +1 -1
- package/lib/Command-CrTA1FX0.js +140 -0
- package/lib/Command-CrTA1FX0.js.map +1 -0
- package/lib/Dialog-mi6BrnrM.js +83 -0
- package/lib/Dialog-mi6BrnrM.js.map +1 -0
- package/lib/{Markdown-DePfm7oQ.js → Markdown-DofXBcqg.js} +2 -2
- package/lib/{Markdown-DePfm7oQ.js.map → Markdown-DofXBcqg.js.map} +1 -1
- package/lib/MdxPage-KJcNWIgt.js +200 -0
- package/lib/MdxPage-KJcNWIgt.js.map +1 -0
- package/lib/{OasProvider-Bvu4dDpX.js → OasProvider-HcqBeC4H.js} +4 -4
- package/lib/{OasProvider-Bvu4dDpX.js.map → OasProvider-HcqBeC4H.js.map} +1 -1
- package/lib/{OperationList-DWnNbwVg.js → OperationList-C3wnbFxp.js} +1857 -1816
- package/lib/OperationList-C3wnbFxp.js.map +1 -0
- package/lib/{Select-BmoX1iTH.js → Select-Co6MuS4j.js} +36 -36
- package/lib/{Select-BmoX1iTH.js.map → Select-Co6MuS4j.js.map} +1 -1
- package/lib/{SlotletProvider-DdtIOUi6.js → SlotletProvider-CYFNHuok.js} +4 -4
- package/lib/{SlotletProvider-DdtIOUi6.js.map → SlotletProvider-CYFNHuok.js.map} +1 -1
- package/lib/{chunk-IR6S3I6Y-D_3UmFIn.js → chunk-IR6S3I6Y-CRDBmIgK.js} +3 -3
- package/lib/{chunk-IR6S3I6Y-D_3UmFIn.js.map → chunk-IR6S3I6Y-CRDBmIgK.js.map} +1 -1
- package/lib/hook-LTe5qHSc.js +347 -0
- package/lib/hook-LTe5qHSc.js.map +1 -0
- package/lib/{index-DVBlM15k.js → index-CtkRMvMw.js} +696 -743
- package/lib/index-CtkRMvMw.js.map +1 -0
- package/lib/index-gQD2h1wX.js +447 -0
- package/lib/index-gQD2h1wX.js.map +1 -0
- package/lib/index-vn5bsvmU.js +1399 -0
- package/lib/index-vn5bsvmU.js.map +1 -0
- package/lib/{mutation-DTunCQKB.js → mutation-B81DztCT.js} +2 -2
- package/lib/{mutation-DTunCQKB.js.map → mutation-B81DztCT.js.map} +1 -1
- package/lib/ui/Command.js +105 -78
- package/lib/ui/Command.js.map +1 -1
- package/lib/{useExposedProps-RIvey2Oy.js → useExposedProps-D76yras4.js} +2 -2
- package/lib/{useExposedProps-RIvey2Oy.js.map → useExposedProps-D76yras4.js.map} +1 -1
- package/lib/useQuery-CQUwWR9i.js +1137 -0
- package/lib/useQuery-CQUwWR9i.js.map +1 -0
- package/lib/useScrollToAnchor-DKyrbZoy.js +977 -0
- package/lib/useScrollToAnchor-DKyrbZoy.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +29 -29
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +3 -3
- package/lib/zudoku.components.js +32 -1382
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +87 -71
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +16 -15
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +274 -0
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
- package/package.json +8 -3
- package/src/lib/authentication/hook.ts +12 -1
- package/src/lib/authentication/providers/clerk.tsx +10 -6
- package/src/lib/authentication/state.ts +8 -2
- package/src/lib/components/Banner.tsx +1 -0
- package/src/lib/components/Heading.tsx +1 -1
- package/src/lib/components/Layout.tsx +1 -0
- package/src/lib/core/RouteGuard.tsx +44 -18
- package/src/lib/plugins/api-catalog/Catalog.tsx +23 -7
- package/src/lib/plugins/api-catalog/index.tsx +1 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +5 -1
- package/src/lib/plugins/openapi/OperationList.tsx +15 -3
- package/src/lib/plugins/openapi/OperationListItem.tsx +8 -0
- package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +2 -1
- package/src/lib/plugins/openapi/playground/PathParams.tsx +8 -2
- package/src/lib/plugins/openapi/playground/Playground.tsx +61 -5
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +135 -0
- package/src/lib/plugins/search-pagefind/ResultList.tsx +104 -0
- package/src/lib/plugins/search-pagefind/get-results.tsx +54 -0
- package/src/lib/plugins/search-pagefind/index.tsx +21 -0
- package/src/lib/plugins/search-pagefind/types.ts +118 -0
- package/src/lib/ui/Command.tsx +25 -3
- package/src/lib/util/useScrollToAnchor.ts +8 -8
- package/README.md +0 -121
- package/lib/MdxPage-DM9mE-G-.js +0 -193
- package/lib/MdxPage-DM9mE-G-.js.map +0 -1
- package/lib/OperationList-DWnNbwVg.js.map +0 -1
- package/lib/hook-4_6pQSo4.js +0 -1460
- package/lib/hook-4_6pQSo4.js.map +0 -1
- package/lib/index-DVBlM15k.js.map +0 -1
- package/lib/index-Du5aNddU.js +0 -509
- package/lib/index-Du5aNddU.js.map +0 -1
- package/lib/index.esm-CQHE3GEU.js +0 -691
- package/lib/index.esm-CQHE3GEU.js.map +0 -1
- package/lib/objectEntries-yMIkr2mI.js +0 -5
- package/lib/objectEntries-yMIkr2mI.js.map +0 -1
- package/lib/useScrollToAnchor-BW8y_cwU.js +0 -290
- package/lib/useScrollToAnchor-BW8y_cwU.js.map +0 -1
|
@@ -1,84 +1,87 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var vt = Object.defineProperty;
|
|
2
|
+
var He = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var jt = (t, a, s) => a in t ? vt(t, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[a] = s;
|
|
6
|
+
var le = (t, a, s) => jt(t, typeof a != "symbol" ? a + "" : a, s), bt = (t, a, s) => a.has(t) || He("Cannot " + s);
|
|
7
|
+
var de = (t, a, s) => (bt(t, a, "read from private field"), s ? s.call(t) : a.get(t)), ce = (t, a, s) => a.has(t) ? He("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, s);
|
|
8
8
|
import { j as e } from "./jsx-runtime-CYK1ROHF.js";
|
|
9
|
-
import { s as
|
|
10
|
-
import { Circle as
|
|
11
|
-
import { r as
|
|
12
|
-
import {
|
|
13
|
-
import { Button as
|
|
14
|
-
import { j as
|
|
15
|
-
import { Z as
|
|
16
|
-
import { VisuallyHidden as
|
|
17
|
-
import * as
|
|
18
|
-
import { Fragment as
|
|
19
|
-
import {
|
|
20
|
-
import { S as
|
|
21
|
-
import { b as
|
|
22
|
-
import { c as
|
|
9
|
+
import { s as ee } from "./index-LNp6rxyU.js";
|
|
10
|
+
import { Circle as Nt, ChevronRightIcon as Q, CheckIcon as wt, DotIcon as Ct, Check as Tt, XIcon as $t, ChevronDownIcon as St, InfoIcon as Be, LogInIcon as Pt, CirclePlayIcon as kt } from "lucide-react";
|
|
11
|
+
import { r as Ot, m as Ue } from "./chunk-IR6S3I6Y-CRDBmIgK.js";
|
|
12
|
+
import { g as Rt, h as It, e as At } from "./hook-LTe5qHSc.js";
|
|
13
|
+
import { Button as te } from "./ui/Button.js";
|
|
14
|
+
import { j as E } from "./joinUrl-10po2Jdj.js";
|
|
15
|
+
import { Z as Et } from "./invariant-Caa8-XvF.js";
|
|
16
|
+
import { VisuallyHidden as qt } from "@radix-ui/react-visually-hidden";
|
|
17
|
+
import * as f from "react";
|
|
18
|
+
import { Fragment as R, useRef as V, useEffect as fe, useState as F, useCallback as Dt, useTransition as Lt } from "react";
|
|
19
|
+
import { D as Vt, c as Ft, a as zt, b as Ht } from "./Dialog-mi6BrnrM.js";
|
|
20
|
+
import { S as Ye, a as et, b as tt, c as at, e as Z, u as Bt } from "./Select-Co6MuS4j.js";
|
|
21
|
+
import { b as ye, u as ve, C as I, a as Ut, F as Mt } from "./index.esm--gIChbWs.js";
|
|
22
|
+
import { c as je } from "./index-CPNSgwSb.js";
|
|
23
23
|
import { c as m } from "./cn-qaFjX9_3.js";
|
|
24
|
-
import
|
|
25
|
-
import * as
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
24
|
+
import { B as q, S as Gt } from "./Spinner-1KrEmx1V.js";
|
|
25
|
+
import * as st from "@radix-ui/react-label";
|
|
26
|
+
import * as _ from "@radix-ui/react-radio-group";
|
|
27
|
+
import { Card as be, CardHeader as Jt, CardTitle as Qt, CardContent as _t } from "./ui/Card.js";
|
|
28
|
+
import { Tabs as nt, TabsList as rt, TabsTrigger as D, TabsContent as L } from "./ui/Tabs.js";
|
|
28
29
|
import { z as Wt } from "./index-DwT-v3zK.js";
|
|
29
|
-
import { B as Z, S as Kt } from "./Spinner-1KrEmx1V.js";
|
|
30
30
|
import * as j from "@radix-ui/react-dropdown-menu";
|
|
31
|
-
import * as
|
|
32
|
-
import * as
|
|
33
|
-
import { PopoverAnchor as
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import
|
|
39
|
-
import {
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
import * as xe from "@radix-ui/react-checkbox";
|
|
32
|
+
import * as ae from "@radix-ui/react-popover";
|
|
33
|
+
import { PopoverAnchor as Zt } from "@radix-ui/react-popover";
|
|
34
|
+
import { T as Kt } from "./index-gQD2h1wX.js";
|
|
35
|
+
import { f as Xt, g as Yt, C as ea, b as ta } from "./Command-CrTA1FX0.js";
|
|
36
|
+
import { Input as Ne } from "./ui/Input.js";
|
|
37
|
+
import { Slot as aa } from "@radix-ui/react-slot";
|
|
38
|
+
import { Callout as sa } from "./ui/Callout.js";
|
|
39
|
+
import { Collapsible as Me, CollapsibleTrigger as Ge, CollapsibleContent as Je } from "./ui/Collapsible.js";
|
|
40
|
+
import { d as na } from "./useQuery-CQUwWR9i.js";
|
|
41
|
+
import * as we from "@radix-ui/react-collapsible";
|
|
42
|
+
import { SyntaxHighlight as ra } from "./ui/SyntaxHighlight.js";
|
|
43
|
+
let me;
|
|
44
|
+
const oa = (t) => {
|
|
42
45
|
var a;
|
|
43
46
|
if ((a = t.errors) != null && a[0])
|
|
44
|
-
throw new
|
|
47
|
+
throw new Et(t.errors[0].message, {
|
|
45
48
|
developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
|
|
46
49
|
});
|
|
47
50
|
};
|
|
48
|
-
var
|
|
49
|
-
class
|
|
51
|
+
var re, oe;
|
|
52
|
+
class ia {
|
|
50
53
|
constructor(a) {
|
|
51
|
-
|
|
54
|
+
ce(this, re, async () => (me || (me = import("./createServer-DmusVVsi.js").then(
|
|
52
55
|
(a) => a.createServer(this.config)
|
|
53
|
-
)),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
)), me));
|
|
57
|
+
ce(this, oe, async (a) => this.config.server ? fetch(this.config.server, a) : (await de(this, re).call(this)).fetch("http://localhost/graphql", a));
|
|
58
|
+
le(this, "fetch", async (a, ...[s]) => {
|
|
56
59
|
var l;
|
|
57
|
-
const n = (l = a.match(/query (\w+)/)) == null ? void 0 : l[1], r = await
|
|
60
|
+
const n = (l = a.match(/query (\w+)/)) == null ? void 0 : l[1], r = await de(this, oe).call(this, {
|
|
58
61
|
method: "POST",
|
|
59
62
|
body: JSON.stringify({ query: a, variables: s, operationName: n }),
|
|
60
63
|
headers: { "Content-Type": "application/json" }
|
|
61
64
|
});
|
|
62
65
|
if (!r.ok)
|
|
63
66
|
throw new Error("Network response was not ok");
|
|
64
|
-
const
|
|
65
|
-
return
|
|
67
|
+
const o = await r.json();
|
|
68
|
+
return oa(o), o.data;
|
|
66
69
|
});
|
|
67
70
|
this.config = a;
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
|
-
|
|
71
|
-
class
|
|
73
|
+
re = new WeakMap(), oe = new WeakMap();
|
|
74
|
+
class z extends String {
|
|
72
75
|
constructor(s, n) {
|
|
73
76
|
super(s);
|
|
74
|
-
|
|
77
|
+
le(this, "__apiType");
|
|
75
78
|
this.value = s, this.__meta__ = n;
|
|
76
79
|
}
|
|
77
80
|
toString() {
|
|
78
81
|
return this.value;
|
|
79
82
|
}
|
|
80
83
|
}
|
|
81
|
-
const
|
|
84
|
+
const la = new z(
|
|
82
85
|
`
|
|
83
86
|
fragment OperationsFragment on OperationItem {
|
|
84
87
|
slug
|
|
@@ -143,7 +146,7 @@ const na = new D(
|
|
|
143
146
|
}
|
|
144
147
|
`,
|
|
145
148
|
{ fragmentName: "OperationsFragment" }
|
|
146
|
-
),
|
|
149
|
+
), da = new z(`
|
|
147
150
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
148
151
|
schema(input: $input, type: $type) {
|
|
149
152
|
url
|
|
@@ -152,7 +155,7 @@ const na = new D(
|
|
|
152
155
|
}
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
|
-
`),
|
|
158
|
+
`), ca = new z(`
|
|
156
159
|
query AllOperations($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
157
160
|
schema(input: $input, type: $type) {
|
|
158
161
|
servers {
|
|
@@ -233,7 +236,7 @@ const na = new D(
|
|
|
233
236
|
schema
|
|
234
237
|
}
|
|
235
238
|
}
|
|
236
|
-
}`),
|
|
239
|
+
}`), ma = new z(`
|
|
237
240
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
238
241
|
schema(input: $input, type: $type) {
|
|
239
242
|
url
|
|
@@ -242,7 +245,7 @@ const na = new D(
|
|
|
242
245
|
}
|
|
243
246
|
}
|
|
244
247
|
}
|
|
245
|
-
`),
|
|
248
|
+
`), ua = new z(`
|
|
246
249
|
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
247
250
|
schema(input: $input, type: $type) {
|
|
248
251
|
url
|
|
@@ -251,7 +254,7 @@ const na = new D(
|
|
|
251
254
|
}
|
|
252
255
|
}
|
|
253
256
|
}
|
|
254
|
-
`),
|
|
257
|
+
`), pa = new z(`
|
|
255
258
|
query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {
|
|
256
259
|
schema(input: $input, type: $type) {
|
|
257
260
|
operations(tag: $tag) {
|
|
@@ -275,18 +278,18 @@ const na = new D(
|
|
|
275
278
|
}
|
|
276
279
|
}
|
|
277
280
|
}
|
|
278
|
-
`),
|
|
279
|
-
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
280
|
-
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n":
|
|
281
|
-
"\n query AllOperations(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tags(name: $tag) {\n name\n description\n }\n operations(tag: $tag, untagged: $untagged) {\n slug\n ...OperationsFragment\n }\n }\n }\n":
|
|
282
|
-
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
283
|
-
"\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n name\n }\n }\n }\n":
|
|
284
|
-
"\n query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {\n schema(input: $input, type: $type) {\n operations(tag: $tag) {\n slug\n deprecated\n method\n summary\n operationId\n path\n tags {\n name\n }\n }\n untagged: operations(untagged: true) {\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n":
|
|
281
|
+
`), ha = {
|
|
282
|
+
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": da,
|
|
283
|
+
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": la,
|
|
284
|
+
"\n query AllOperations(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tags(name: $tag) {\n name\n description\n }\n operations(tag: $tag, untagged: $untagged) {\n slug\n ...OperationsFragment\n }\n }\n }\n": ca,
|
|
285
|
+
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": ma,
|
|
286
|
+
"\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n name\n }\n }\n }\n": ua,
|
|
287
|
+
"\n query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {\n schema(input: $input, type: $type) {\n operations(tag: $tag) {\n slug\n deprecated\n method\n summary\n operationId\n path\n tags {\n name\n }\n }\n untagged: operations(untagged: true) {\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n": pa
|
|
285
288
|
};
|
|
286
|
-
function
|
|
287
|
-
return
|
|
289
|
+
function ot(t) {
|
|
290
|
+
return ha[t] ?? {};
|
|
288
291
|
}
|
|
289
|
-
const
|
|
292
|
+
const xa = je(
|
|
290
293
|
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
291
294
|
{
|
|
292
295
|
variants: {
|
|
@@ -299,17 +302,17 @@ const ma = ve(
|
|
|
299
302
|
variant: "default"
|
|
300
303
|
}
|
|
301
304
|
}
|
|
302
|
-
),
|
|
305
|
+
), K = f.forwardRef(({ className: t, variant: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
303
306
|
"div",
|
|
304
307
|
{
|
|
305
308
|
ref: n,
|
|
306
309
|
role: "alert",
|
|
307
|
-
className: m(
|
|
310
|
+
className: m(xa({ variant: a }), t),
|
|
308
311
|
...s
|
|
309
312
|
}
|
|
310
313
|
));
|
|
311
|
-
|
|
312
|
-
const
|
|
314
|
+
K.displayName = "Alert";
|
|
315
|
+
const X = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
313
316
|
"h5",
|
|
314
317
|
{
|
|
315
318
|
ref: s,
|
|
@@ -317,8 +320,8 @@ const pe = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
317
320
|
...a
|
|
318
321
|
}
|
|
319
322
|
));
|
|
320
|
-
|
|
321
|
-
const
|
|
323
|
+
X.displayName = "AlertTitle";
|
|
324
|
+
const Y = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
322
325
|
"div",
|
|
323
326
|
{
|
|
324
327
|
ref: s,
|
|
@@ -326,55 +329,55 @@ const he = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
326
329
|
...a
|
|
327
330
|
}
|
|
328
331
|
));
|
|
329
|
-
|
|
330
|
-
const
|
|
332
|
+
Y.displayName = "AlertDescription";
|
|
333
|
+
const ga = ({
|
|
331
334
|
path: t,
|
|
332
335
|
renderParam: a
|
|
333
336
|
}) => {
|
|
334
337
|
let s = 0;
|
|
335
|
-
return t.split("/").map((n, r,
|
|
338
|
+
return t.split("/").map((n, r, o) => {
|
|
336
339
|
const l = Array.from(n.matchAll(/{([^}]+)}/g)), c = [];
|
|
337
340
|
let d = 0;
|
|
338
341
|
return l.forEach((u) => {
|
|
339
|
-
const [g,
|
|
340
|
-
if (!
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
/* @__PURE__ */ e.jsx(
|
|
342
|
+
const [g, N] = u;
|
|
343
|
+
if (!N) return;
|
|
344
|
+
const y = u.index;
|
|
345
|
+
y > d && c.push(
|
|
346
|
+
/* @__PURE__ */ e.jsx(R, { children: n.slice(d, y) }, `text-${d}-${y}`)
|
|
344
347
|
), c.push(
|
|
345
|
-
/* @__PURE__ */ e.jsx(
|
|
346
|
-
), d =
|
|
348
|
+
/* @__PURE__ */ e.jsx(R, { children: a({ name: N, originalValue: g, index: s++ }) }, `param-${N}`)
|
|
349
|
+
), d = y + g.length;
|
|
347
350
|
}), d < n.length && c.push(
|
|
348
|
-
/* @__PURE__ */ e.jsx(
|
|
351
|
+
/* @__PURE__ */ e.jsx(R, { children: n.slice(d) }, `text-${d}-${n.length}`)
|
|
349
352
|
), // eslint-disable-next-line react/no-array-index-key
|
|
350
|
-
/* @__PURE__ */ e.jsxs(
|
|
353
|
+
/* @__PURE__ */ e.jsxs(R, { children: [
|
|
351
354
|
c,
|
|
352
|
-
r <
|
|
355
|
+
r < o.length - 1 && "/",
|
|
353
356
|
/* @__PURE__ */ e.jsx("wbr", {})
|
|
354
357
|
] }, `${n}-${r}`);
|
|
355
358
|
});
|
|
356
|
-
},
|
|
359
|
+
}, fa = je(
|
|
357
360
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
358
|
-
),
|
|
359
|
-
|
|
361
|
+
), M = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
362
|
+
st.Root,
|
|
360
363
|
{
|
|
361
364
|
ref: s,
|
|
362
|
-
className: m(
|
|
365
|
+
className: m(fa(), t),
|
|
363
366
|
...a
|
|
364
367
|
}
|
|
365
368
|
));
|
|
366
|
-
|
|
367
|
-
const
|
|
368
|
-
|
|
369
|
+
M.displayName = st.Root.displayName;
|
|
370
|
+
const Ce = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
371
|
+
_.Root,
|
|
369
372
|
{
|
|
370
373
|
className: m("grid gap-2", t),
|
|
371
374
|
...a,
|
|
372
375
|
ref: s
|
|
373
376
|
}
|
|
374
377
|
));
|
|
375
|
-
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
+
Ce.displayName = _.Root.displayName;
|
|
379
|
+
const se = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
380
|
+
_.Item,
|
|
378
381
|
{
|
|
379
382
|
ref: s,
|
|
380
383
|
className: m(
|
|
@@ -382,11 +385,11 @@ const Y = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
382
385
|
t
|
|
383
386
|
),
|
|
384
387
|
...a,
|
|
385
|
-
children: /* @__PURE__ */ e.jsx(
|
|
388
|
+
children: /* @__PURE__ */ e.jsx(_.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(Nt, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
386
389
|
}
|
|
387
390
|
));
|
|
388
|
-
|
|
389
|
-
const
|
|
391
|
+
se.displayName = _.Item.displayName;
|
|
392
|
+
const it = f.forwardRef(
|
|
390
393
|
({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
391
394
|
"textarea",
|
|
392
395
|
{
|
|
@@ -399,51 +402,51 @@ const at = x.forwardRef(
|
|
|
399
402
|
}
|
|
400
403
|
)
|
|
401
404
|
);
|
|
402
|
-
|
|
403
|
-
const
|
|
405
|
+
it.displayName = "Textarea";
|
|
406
|
+
const ue = (t) => Math.abs(
|
|
404
407
|
isNaN(parseInt(t)) ? t.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(t)) ? 0 : parseInt(t)
|
|
405
|
-
),
|
|
406
|
-
const s = (3 *
|
|
408
|
+
), pe = (t) => t.length > 1 ? parseInt(t.split("").reduce((a, s) => `${ue(a) + ue(s)}`)) : ue(t), Qe = (t, a = {}) => {
|
|
409
|
+
const s = (3 * pe(t) + 2 * pe(t) + pe(t)) % 360, { saturation: n = 75, lightness: r = 60 } = a;
|
|
407
410
|
return `${s}deg ${n}% ${r}%`;
|
|
408
|
-
},
|
|
411
|
+
}, he = "data-linked-param", ya = (t) => {
|
|
409
412
|
const { resolvedTheme: a } = Wt();
|
|
410
413
|
return {
|
|
411
|
-
text:
|
|
414
|
+
text: Qe(
|
|
412
415
|
t,
|
|
413
416
|
a === "light" ? { saturation: 95, lightness: 38 } : {}
|
|
414
417
|
),
|
|
415
|
-
background:
|
|
418
|
+
background: Qe(
|
|
416
419
|
t,
|
|
417
420
|
a === "light" ? { saturation: 85, lightness: 40 } : {}
|
|
418
421
|
)
|
|
419
422
|
};
|
|
420
|
-
},
|
|
423
|
+
}, lt = ({
|
|
421
424
|
name: t,
|
|
422
425
|
className: a,
|
|
423
426
|
slug: s,
|
|
424
427
|
title: n,
|
|
425
428
|
children: r,
|
|
426
|
-
onClick:
|
|
429
|
+
onClick: o
|
|
427
430
|
}) => {
|
|
428
|
-
const l =
|
|
431
|
+
const l = V(null), c = s == null ? void 0 : s.replace(/[{}]/g, ""), d = t.replace(/[{}]/g, ""), { text: u, background: g } = ya(d), N = `hsl(${u} / 100%)`, y = `hsl(${g} / 10%)`, h = `hsl(${g} / 50%)`;
|
|
429
432
|
return fe(() => {
|
|
430
433
|
if (!c || !l.current) return;
|
|
431
|
-
const
|
|
432
|
-
document.querySelectorAll(`[${
|
|
433
|
-
|
|
434
|
+
const x = () => {
|
|
435
|
+
document.querySelectorAll(`[${he}="${c}"]`).forEach((v) => {
|
|
436
|
+
v instanceof HTMLElement && (v.dataset.active = "true");
|
|
434
437
|
});
|
|
435
|
-
},
|
|
436
|
-
document.querySelectorAll(`[${
|
|
437
|
-
|
|
438
|
+
}, p = () => {
|
|
439
|
+
document.querySelectorAll(`[${he}="${c}"]`).forEach((v) => {
|
|
440
|
+
v instanceof HTMLElement && (v.dataset.active = "false");
|
|
438
441
|
});
|
|
439
|
-
},
|
|
440
|
-
return
|
|
441
|
-
|
|
442
|
+
}, b = l.current;
|
|
443
|
+
return b.addEventListener("mouseenter", x), b.addEventListener("mouseleave", p), () => {
|
|
444
|
+
b.removeEventListener("mouseenter", x), b.removeEventListener("mouseleave", p);
|
|
442
445
|
};
|
|
443
446
|
}, [c]), /* @__PURE__ */ e.jsx(
|
|
444
447
|
"span",
|
|
445
448
|
{
|
|
446
|
-
[
|
|
449
|
+
[he]: c,
|
|
447
450
|
className: m(
|
|
448
451
|
// This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
|
|
449
452
|
"relative rounded transition-all duration-100 rounded-lg",
|
|
@@ -454,28 +457,28 @@ const le = (t) => Math.abs(
|
|
|
454
457
|
title: n,
|
|
455
458
|
suppressHydrationWarning: !0,
|
|
456
459
|
ref: l,
|
|
457
|
-
onClick:
|
|
460
|
+
onClick: o,
|
|
458
461
|
style: {
|
|
459
|
-
"--param-color":
|
|
460
|
-
"--border-color":
|
|
461
|
-
"--background-color":
|
|
462
|
+
"--param-color": N,
|
|
463
|
+
"--border-color": h,
|
|
464
|
+
"--background-color": y
|
|
462
465
|
},
|
|
463
466
|
children: r ?? t
|
|
464
467
|
}
|
|
465
468
|
);
|
|
466
|
-
},
|
|
467
|
-
const n = a.replace(/(:\w+|\{\w+})/g, (
|
|
469
|
+
}, va = (t, a, s) => {
|
|
470
|
+
const n = a.replace(/(:\w+|\{\w+})/g, (o) => {
|
|
468
471
|
var d;
|
|
469
|
-
const l =
|
|
470
|
-
return ((d = s.pathParams.find((u) => u.name === l)) == null ? void 0 : d.value) ??
|
|
472
|
+
const l = o.replace(/[:{}]/g, "");
|
|
473
|
+
return ((d = s.pathParams.find((u) => u.name === l)) == null ? void 0 : d.value) ?? o;
|
|
471
474
|
}), r = new URL(
|
|
472
475
|
n.replace(/^\//, ""),
|
|
473
476
|
t.endsWith("/") ? t : `${t}/`
|
|
474
477
|
);
|
|
475
|
-
return s.queryParams.filter((
|
|
476
|
-
r.searchParams.set(
|
|
478
|
+
return s.queryParams.filter((o) => o.active).forEach((o) => {
|
|
479
|
+
r.searchParams.set(o.name, o.value);
|
|
477
480
|
}), r;
|
|
478
|
-
},
|
|
481
|
+
}, dt = j.Root, ct = j.Trigger, ja = j.Group, ba = f.forwardRef(({ className: t, inset: a, children: s, ...n }, r) => /* @__PURE__ */ e.jsxs(
|
|
479
482
|
j.SubTrigger,
|
|
480
483
|
{
|
|
481
484
|
ref: r,
|
|
@@ -487,12 +490,12 @@ const le = (t) => Math.abs(
|
|
|
487
490
|
...n,
|
|
488
491
|
children: [
|
|
489
492
|
s,
|
|
490
|
-
/* @__PURE__ */ e.jsx(
|
|
493
|
+
/* @__PURE__ */ e.jsx(Q, { className: "ml-auto h-4 w-4" })
|
|
491
494
|
]
|
|
492
495
|
}
|
|
493
496
|
));
|
|
494
|
-
|
|
495
|
-
const
|
|
497
|
+
ba.displayName = j.SubTrigger.displayName;
|
|
498
|
+
const Na = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
496
499
|
j.SubContent,
|
|
497
500
|
{
|
|
498
501
|
ref: s,
|
|
@@ -503,8 +506,8 @@ const ya = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
503
506
|
...a
|
|
504
507
|
}
|
|
505
508
|
));
|
|
506
|
-
|
|
507
|
-
const
|
|
509
|
+
Na.displayName = j.SubContent.displayName;
|
|
510
|
+
const Te = f.forwardRef(({ className: t, sideOffset: a = 4, ...s }, n) => /* @__PURE__ */ e.jsx(j.Portal, { children: /* @__PURE__ */ e.jsx(
|
|
508
511
|
j.Content,
|
|
509
512
|
{
|
|
510
513
|
ref: n,
|
|
@@ -517,8 +520,8 @@ const Ce = x.forwardRef(({ className: t, sideOffset: a = 4, ...s }, n) => /* @__
|
|
|
517
520
|
...s
|
|
518
521
|
}
|
|
519
522
|
) }));
|
|
520
|
-
|
|
521
|
-
const
|
|
523
|
+
Te.displayName = j.Content.displayName;
|
|
524
|
+
const $e = f.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
522
525
|
j.Item,
|
|
523
526
|
{
|
|
524
527
|
ref: n,
|
|
@@ -530,8 +533,8 @@ const Te = x.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */
|
|
|
530
533
|
...s
|
|
531
534
|
}
|
|
532
535
|
));
|
|
533
|
-
|
|
534
|
-
const
|
|
536
|
+
$e.displayName = j.Item.displayName;
|
|
537
|
+
const wa = f.forwardRef(({ className: t, children: a, checked: s, ...n }, r) => /* @__PURE__ */ e.jsxs(
|
|
535
538
|
j.CheckboxItem,
|
|
536
539
|
{
|
|
537
540
|
ref: r,
|
|
@@ -542,13 +545,13 @@ const va = x.forwardRef(({ className: t, children: a, checked: s, ...n }, r) =>
|
|
|
542
545
|
checked: s,
|
|
543
546
|
...n,
|
|
544
547
|
children: [
|
|
545
|
-
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(j.ItemIndicator, { children: /* @__PURE__ */ e.jsx(
|
|
548
|
+
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(j.ItemIndicator, { children: /* @__PURE__ */ e.jsx(wt, { className: "h-4 w-4" }) }) }),
|
|
546
549
|
a
|
|
547
550
|
]
|
|
548
551
|
}
|
|
549
552
|
));
|
|
550
|
-
|
|
551
|
-
const
|
|
553
|
+
wa.displayName = j.CheckboxItem.displayName;
|
|
554
|
+
const Ca = f.forwardRef(({ className: t, children: a, ...s }, n) => /* @__PURE__ */ e.jsxs(
|
|
552
555
|
j.RadioItem,
|
|
553
556
|
{
|
|
554
557
|
ref: n,
|
|
@@ -558,13 +561,13 @@ const ja = x.forwardRef(({ className: t, children: a, ...s }, n) => /* @__PURE__
|
|
|
558
561
|
),
|
|
559
562
|
...s,
|
|
560
563
|
children: [
|
|
561
|
-
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(j.ItemIndicator, { children: /* @__PURE__ */ e.jsx(
|
|
564
|
+
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(j.ItemIndicator, { children: /* @__PURE__ */ e.jsx(Ct, { className: "h-4 w-4 fill-current" }) }) }),
|
|
562
565
|
a
|
|
563
566
|
]
|
|
564
567
|
}
|
|
565
568
|
));
|
|
566
|
-
|
|
567
|
-
const
|
|
569
|
+
Ca.displayName = j.RadioItem.displayName;
|
|
570
|
+
const mt = f.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
568
571
|
j.Label,
|
|
569
572
|
{
|
|
570
573
|
ref: n,
|
|
@@ -576,8 +579,8 @@ const ot = x.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */
|
|
|
576
579
|
...s
|
|
577
580
|
}
|
|
578
581
|
));
|
|
579
|
-
|
|
580
|
-
const
|
|
582
|
+
mt.displayName = j.Label.displayName;
|
|
583
|
+
const ut = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
581
584
|
j.Separator,
|
|
582
585
|
{
|
|
583
586
|
ref: s,
|
|
@@ -585,19 +588,19 @@ const it = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
585
588
|
...a
|
|
586
589
|
}
|
|
587
590
|
));
|
|
588
|
-
|
|
589
|
-
const
|
|
591
|
+
ut.displayName = j.Separator.displayName;
|
|
592
|
+
const Ta = ({
|
|
590
593
|
examples: t,
|
|
591
594
|
onSelect: a
|
|
592
|
-
}) => /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2 mt-2 items-end", children: /* @__PURE__ */ e.jsxs(
|
|
593
|
-
/* @__PURE__ */ e.jsx(
|
|
594
|
-
/* @__PURE__ */ e.jsx(
|
|
595
|
+
}) => /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2 mt-2 items-end", children: /* @__PURE__ */ e.jsxs(dt, { children: [
|
|
596
|
+
/* @__PURE__ */ e.jsx(ct, { asChild: !0, children: /* @__PURE__ */ e.jsx(q, { variant: "outline", children: "Use Example" }) }),
|
|
597
|
+
/* @__PURE__ */ e.jsx(Te, { className: "w-56", children: t.map((s) => {
|
|
595
598
|
var n;
|
|
596
599
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
597
|
-
/* @__PURE__ */ e.jsx(
|
|
598
|
-
/* @__PURE__ */ e.jsx(
|
|
599
|
-
/* @__PURE__ */ e.jsx(
|
|
600
|
-
|
|
600
|
+
/* @__PURE__ */ e.jsx(mt, { children: s.mediaType }),
|
|
601
|
+
/* @__PURE__ */ e.jsx(ut, {}),
|
|
602
|
+
/* @__PURE__ */ e.jsx(ja, { children: (n = s.examples) == null ? void 0 : n.map((r) => /* @__PURE__ */ e.jsx(
|
|
603
|
+
$e,
|
|
601
604
|
{
|
|
602
605
|
onSelect: () => a(r),
|
|
603
606
|
className: "line-clamp-1",
|
|
@@ -607,7 +610,7 @@ const ba = ({
|
|
|
607
610
|
)) })
|
|
608
611
|
] }, s.mediaType);
|
|
609
612
|
}) })
|
|
610
|
-
] }) }),
|
|
613
|
+
] }) }), ie = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
611
614
|
"div",
|
|
612
615
|
{
|
|
613
616
|
ref: s,
|
|
@@ -618,8 +621,8 @@ const ba = ({
|
|
|
618
621
|
...a
|
|
619
622
|
}
|
|
620
623
|
));
|
|
621
|
-
|
|
622
|
-
const
|
|
624
|
+
ie.displayName = "Card";
|
|
625
|
+
const $a = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
623
626
|
"div",
|
|
624
627
|
{
|
|
625
628
|
ref: s,
|
|
@@ -627,8 +630,8 @@ const Na = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
627
630
|
...a
|
|
628
631
|
}
|
|
629
632
|
));
|
|
630
|
-
|
|
631
|
-
const
|
|
633
|
+
$a.displayName = "CardHeader";
|
|
634
|
+
const Sa = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
632
635
|
"h3",
|
|
633
636
|
{
|
|
634
637
|
ref: s,
|
|
@@ -636,8 +639,8 @@ const wa = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
636
639
|
...a
|
|
637
640
|
}
|
|
638
641
|
));
|
|
639
|
-
|
|
640
|
-
const
|
|
642
|
+
Sa.displayName = "CardTitle";
|
|
643
|
+
const Pa = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
641
644
|
"p",
|
|
642
645
|
{
|
|
643
646
|
ref: s,
|
|
@@ -645,10 +648,10 @@ const Ca = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
645
648
|
...a
|
|
646
649
|
}
|
|
647
650
|
));
|
|
648
|
-
|
|
649
|
-
const
|
|
650
|
-
|
|
651
|
-
const
|
|
651
|
+
Pa.displayName = "CardDescription";
|
|
652
|
+
const ka = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx("div", { ref: s, className: m("p-6 pt-0", t), ...a }));
|
|
653
|
+
ka.displayName = "CardContent";
|
|
654
|
+
const Oa = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
652
655
|
"div",
|
|
653
656
|
{
|
|
654
657
|
ref: s,
|
|
@@ -656,8 +659,8 @@ const $a = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
656
659
|
...a
|
|
657
660
|
}
|
|
658
661
|
));
|
|
659
|
-
|
|
660
|
-
const
|
|
662
|
+
Oa.displayName = "CardFooter";
|
|
663
|
+
const Ra = je(
|
|
661
664
|
"peer h-4 w-4 shrink-0 rounded-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary",
|
|
662
665
|
{
|
|
663
666
|
variants: {
|
|
@@ -670,121 +673,24 @@ const Sa = ve(
|
|
|
670
673
|
variant: "default"
|
|
671
674
|
}
|
|
672
675
|
}
|
|
673
|
-
),
|
|
674
|
-
|
|
676
|
+
), Se = f.forwardRef(({ className: t, variant: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
677
|
+
xe.Root,
|
|
675
678
|
{
|
|
676
679
|
ref: n,
|
|
677
|
-
className: m(
|
|
680
|
+
className: m(Ra({ variant: a, className: t })),
|
|
678
681
|
...s,
|
|
679
682
|
children: /* @__PURE__ */ e.jsx(
|
|
680
|
-
|
|
683
|
+
xe.Indicator,
|
|
681
684
|
{
|
|
682
685
|
className: m("flex items-center justify-center text-current"),
|
|
683
|
-
children: /* @__PURE__ */ e.jsx(
|
|
686
|
+
children: /* @__PURE__ */ e.jsx(Tt, { className: "h-4 w-4" })
|
|
684
687
|
}
|
|
685
688
|
)
|
|
686
689
|
}
|
|
687
690
|
));
|
|
688
|
-
|
|
689
|
-
const
|
|
690
|
-
|
|
691
|
-
{
|
|
692
|
-
ref: s,
|
|
693
|
-
className: m(
|
|
694
|
-
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
695
|
-
t
|
|
696
|
-
),
|
|
697
|
-
...a
|
|
698
|
-
}
|
|
699
|
-
));
|
|
700
|
-
lt.displayName = $.displayName;
|
|
701
|
-
const Pa = x.forwardRef(({ className: t, ...a }, s) => (
|
|
702
|
-
// eslint-disable-next-line react/no-unknown-property
|
|
703
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
704
|
-
/* @__PURE__ */ e.jsx(Tt, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
705
|
-
/* @__PURE__ */ e.jsx(
|
|
706
|
-
$.Input,
|
|
707
|
-
{
|
|
708
|
-
ref: s,
|
|
709
|
-
className: m(
|
|
710
|
-
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
711
|
-
t
|
|
712
|
-
),
|
|
713
|
-
...a
|
|
714
|
-
}
|
|
715
|
-
)
|
|
716
|
-
] })
|
|
717
|
-
));
|
|
718
|
-
Pa.displayName = $.Input.displayName;
|
|
719
|
-
const dt = x.forwardRef(({ className: t, ...a }, s) => (
|
|
720
|
-
// eslint-disable-next-line react/no-unknown-property
|
|
721
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center", "cmdk-input-wrapper": "", children: /* @__PURE__ */ e.jsx(
|
|
722
|
-
$.Input,
|
|
723
|
-
{
|
|
724
|
-
ref: s,
|
|
725
|
-
className: m(
|
|
726
|
-
"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 placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
727
|
-
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
728
|
-
t
|
|
729
|
-
),
|
|
730
|
-
...a
|
|
731
|
-
}
|
|
732
|
-
) })
|
|
733
|
-
));
|
|
734
|
-
dt.displayName = $.Input.displayName;
|
|
735
|
-
const ct = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
736
|
-
$.List,
|
|
737
|
-
{
|
|
738
|
-
ref: s,
|
|
739
|
-
className: m("max-h-[300px] overflow-y-auto overflow-x-hidden", t),
|
|
740
|
-
...a
|
|
741
|
-
}
|
|
742
|
-
));
|
|
743
|
-
ct.displayName = $.List.displayName;
|
|
744
|
-
const Ra = x.forwardRef((t, a) => /* @__PURE__ */ e.jsx(
|
|
745
|
-
$.Empty,
|
|
746
|
-
{
|
|
747
|
-
ref: a,
|
|
748
|
-
className: "py-6 text-center text-sm",
|
|
749
|
-
...t
|
|
750
|
-
}
|
|
751
|
-
));
|
|
752
|
-
Ra.displayName = $.Empty.displayName;
|
|
753
|
-
const ka = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
754
|
-
$.Group,
|
|
755
|
-
{
|
|
756
|
-
ref: s,
|
|
757
|
-
className: m(
|
|
758
|
-
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
759
|
-
t
|
|
760
|
-
),
|
|
761
|
-
...a
|
|
762
|
-
}
|
|
763
|
-
));
|
|
764
|
-
ka.displayName = $.Group.displayName;
|
|
765
|
-
const Ia = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
766
|
-
$.Separator,
|
|
767
|
-
{
|
|
768
|
-
ref: s,
|
|
769
|
-
className: m("-mx-1 h-px bg-border", t),
|
|
770
|
-
...a
|
|
771
|
-
}
|
|
772
|
-
));
|
|
773
|
-
Ia.displayName = $.Separator.displayName;
|
|
774
|
-
const mt = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
775
|
-
$.Item,
|
|
776
|
-
{
|
|
777
|
-
ref: s,
|
|
778
|
-
className: m(
|
|
779
|
-
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
780
|
-
t
|
|
781
|
-
),
|
|
782
|
-
...a
|
|
783
|
-
}
|
|
784
|
-
));
|
|
785
|
-
mt.displayName = $.Item.displayName;
|
|
786
|
-
const Oa = X.Root, ut = x.forwardRef(({ className: t, align: a = "center", sideOffset: s = 4, ...n }, r) => /* @__PURE__ */ e.jsx(X.Portal, { children: /* @__PURE__ */ e.jsx(
|
|
787
|
-
X.Content,
|
|
691
|
+
Se.displayName = xe.Root.displayName;
|
|
692
|
+
const Ia = ae.Root, pt = f.forwardRef(({ className: t, align: a = "center", sideOffset: s = 4, ...n }, r) => /* @__PURE__ */ e.jsx(ae.Portal, { children: /* @__PURE__ */ e.jsx(
|
|
693
|
+
ae.Content,
|
|
788
694
|
{
|
|
789
695
|
ref: r,
|
|
790
696
|
align: a,
|
|
@@ -796,23 +702,23 @@ const Oa = X.Root, ut = x.forwardRef(({ className: t, align: a = "center", sideO
|
|
|
796
702
|
...n
|
|
797
703
|
}
|
|
798
704
|
) }));
|
|
799
|
-
|
|
800
|
-
const
|
|
705
|
+
pt.displayName = ae.Content.displayName;
|
|
706
|
+
const Aa = ({
|
|
801
707
|
value: t,
|
|
802
708
|
options: a,
|
|
803
709
|
onChange: s,
|
|
804
710
|
className: n,
|
|
805
711
|
placeholder: r = "Enter value",
|
|
806
|
-
onEnterPress:
|
|
712
|
+
onEnterPress: o,
|
|
807
713
|
ref: l
|
|
808
714
|
}) => {
|
|
809
|
-
const [c, d] =
|
|
810
|
-
return /* @__PURE__ */ e.jsxs(
|
|
811
|
-
/* @__PURE__ */ e.jsx(
|
|
812
|
-
|
|
715
|
+
const [c, d] = F(!1), [u, g] = F(!1), N = Kt((h) => h.filtered.count), y = V(null);
|
|
716
|
+
return /* @__PURE__ */ e.jsxs(Ia, { open: c, children: [
|
|
717
|
+
/* @__PURE__ */ e.jsx(Zt, { children: /* @__PURE__ */ e.jsx(
|
|
718
|
+
Yt,
|
|
813
719
|
{
|
|
814
|
-
ref: (
|
|
815
|
-
|
|
720
|
+
ref: (h) => {
|
|
721
|
+
y.current = h, typeof l == "function" ? l(h) : l && (l.current = h);
|
|
816
722
|
},
|
|
817
723
|
value: t,
|
|
818
724
|
placeholder: r,
|
|
@@ -821,62 +727,62 @@ const Ea = ({
|
|
|
821
727
|
onBlur: () => {
|
|
822
728
|
u || d(!1);
|
|
823
729
|
},
|
|
824
|
-
onKeyDown: (
|
|
825
|
-
var
|
|
826
|
-
|
|
730
|
+
onKeyDown: (h) => {
|
|
731
|
+
var x;
|
|
732
|
+
h.key === "Enter" && (d(!1), (x = y.current) == null || x.blur(), o == null || o(h));
|
|
827
733
|
},
|
|
828
|
-
onValueChange: (
|
|
734
|
+
onValueChange: (h) => s(h)
|
|
829
735
|
}
|
|
830
736
|
) }),
|
|
831
737
|
/* @__PURE__ */ e.jsx(
|
|
832
|
-
|
|
738
|
+
pt,
|
|
833
739
|
{
|
|
834
740
|
onMouseEnter: () => g(!0),
|
|
835
741
|
onMouseLeave: () => g(!1),
|
|
836
|
-
onOpenAutoFocus: (
|
|
742
|
+
onOpenAutoFocus: (h) => h.preventDefault(),
|
|
837
743
|
className: m("p-0 w-[--radix-popover-trigger-width]", {
|
|
838
|
-
"border-0":
|
|
744
|
+
"border-0": N === 0
|
|
839
745
|
}),
|
|
840
746
|
align: "start",
|
|
841
747
|
side: "bottom",
|
|
842
|
-
onWheel: (
|
|
843
|
-
|
|
748
|
+
onWheel: (h) => {
|
|
749
|
+
h.stopPropagation();
|
|
844
750
|
},
|
|
845
|
-
onTouchMove: (
|
|
846
|
-
|
|
751
|
+
onTouchMove: (h) => {
|
|
752
|
+
h.stopPropagation();
|
|
847
753
|
},
|
|
848
|
-
children: /* @__PURE__ */ e.jsx(
|
|
849
|
-
|
|
754
|
+
children: /* @__PURE__ */ e.jsx(ea, { className: "max-h-[140px]", children: a.map((h) => /* @__PURE__ */ e.jsx(
|
|
755
|
+
ta,
|
|
850
756
|
{
|
|
851
|
-
value:
|
|
852
|
-
onSelect: (
|
|
853
|
-
s(
|
|
757
|
+
value: h,
|
|
758
|
+
onSelect: (x) => {
|
|
759
|
+
s(x), d(!1);
|
|
854
760
|
},
|
|
855
761
|
className: "cursor-pointer",
|
|
856
|
-
children:
|
|
762
|
+
children: h
|
|
857
763
|
},
|
|
858
|
-
|
|
764
|
+
h
|
|
859
765
|
)) })
|
|
860
766
|
}
|
|
861
767
|
)
|
|
862
768
|
] });
|
|
863
|
-
},
|
|
864
|
-
const s =
|
|
865
|
-
const c = r ?
|
|
866
|
-
return
|
|
867
|
-
...
|
|
769
|
+
}, ne = ({ shouldFilter: t, ...a }) => /* @__PURE__ */ e.jsx(Xt, { className: "bg-transparent", shouldFilter: t, children: /* @__PURE__ */ e.jsx(Aa, { ...a }) }), Pe = (t, a) => {
|
|
770
|
+
const s = f.forwardRef(({ className: n, asChild: r, ...o }, l) => {
|
|
771
|
+
const c = r ? aa : t;
|
|
772
|
+
return f.createElement(c, {
|
|
773
|
+
...o,
|
|
868
774
|
ref: l,
|
|
869
775
|
className: typeof a == "function" ? a({ className: n }) : m(a, n)
|
|
870
776
|
});
|
|
871
777
|
});
|
|
872
778
|
return s.displayName = `VariantComponent(${t})`, s;
|
|
873
|
-
},
|
|
779
|
+
}, ke = Pe(
|
|
874
780
|
"div",
|
|
875
781
|
"grid grid-cols-[2fr_3fr] gap-2 items-center"
|
|
876
|
-
),
|
|
782
|
+
), Oe = Pe(
|
|
877
783
|
"div",
|
|
878
784
|
"group hover:bg-accent px-3 grid col-span-full grid-cols-subgrid"
|
|
879
|
-
),
|
|
785
|
+
), Ea = Object.freeze([
|
|
880
786
|
"Accept",
|
|
881
787
|
"Accept-Encoding",
|
|
882
788
|
"Accept-Language",
|
|
@@ -907,44 +813,44 @@ const Ea = ({
|
|
|
907
813
|
control: t,
|
|
908
814
|
headers: a
|
|
909
815
|
}) => {
|
|
910
|
-
const { fields: s, append: n, remove: r } =
|
|
816
|
+
const { fields: s, append: n, remove: r } = ye({
|
|
911
817
|
control: t,
|
|
912
818
|
name: "headers"
|
|
913
|
-
}), { setValue:
|
|
819
|
+
}), { setValue: o, watch: l } = ve(), c = V([]), d = V([]), u = l("headers"), g = Dt(() => {
|
|
914
820
|
n({ name: "", value: "", active: !1 });
|
|
915
821
|
}, [n]);
|
|
916
822
|
fe(() => {
|
|
917
823
|
u.length === 0 && g();
|
|
918
824
|
}, [u, g]);
|
|
919
|
-
const
|
|
920
|
-
var
|
|
921
|
-
(
|
|
922
|
-
},
|
|
825
|
+
const N = (x) => {
|
|
826
|
+
var p;
|
|
827
|
+
(p = c.current[x]) == null || p.focus();
|
|
828
|
+
}, y = (x) => {
|
|
923
829
|
g(), requestAnimationFrame(() => {
|
|
924
|
-
var
|
|
925
|
-
return (
|
|
830
|
+
var p;
|
|
831
|
+
return (p = d.current[x + 1]) == null ? void 0 : p.focus();
|
|
926
832
|
});
|
|
927
|
-
},
|
|
833
|
+
}, h = a.filter((x) => !u.some((p) => p.name === x.name)).map(({ name: x }) => x);
|
|
928
834
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
929
|
-
/* @__PURE__ */ e.jsx(
|
|
930
|
-
const
|
|
931
|
-
(
|
|
835
|
+
/* @__PURE__ */ e.jsx(ie, { className: "overflow-hidden", children: /* @__PURE__ */ e.jsx(ke, { children: s.map((x, p) => {
|
|
836
|
+
const b = a.find(
|
|
837
|
+
(v) => v.name === l(`headers.${p}.name`)
|
|
932
838
|
);
|
|
933
|
-
return /* @__PURE__ */ e.jsxs(
|
|
839
|
+
return /* @__PURE__ */ e.jsxs(Oe, { children: [
|
|
934
840
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 ", children: [
|
|
935
841
|
/* @__PURE__ */ e.jsx(
|
|
936
842
|
I,
|
|
937
843
|
{
|
|
938
844
|
control: t,
|
|
939
|
-
name: `headers.${
|
|
940
|
-
render: ({ field:
|
|
941
|
-
|
|
845
|
+
name: `headers.${p}.active`,
|
|
846
|
+
render: ({ field: v }) => /* @__PURE__ */ e.jsx(
|
|
847
|
+
Se,
|
|
942
848
|
{
|
|
943
849
|
variant: "outline",
|
|
944
|
-
id: `headers.${
|
|
945
|
-
checked:
|
|
946
|
-
onCheckedChange: (
|
|
947
|
-
|
|
850
|
+
id: `headers.${p}.active`,
|
|
851
|
+
checked: v.value,
|
|
852
|
+
onCheckedChange: (C) => {
|
|
853
|
+
v.onChange(C);
|
|
948
854
|
}
|
|
949
855
|
}
|
|
950
856
|
)
|
|
@@ -954,20 +860,20 @@ const Ea = ({
|
|
|
954
860
|
I,
|
|
955
861
|
{
|
|
956
862
|
control: t,
|
|
957
|
-
name: `headers.${
|
|
958
|
-
render: ({ field:
|
|
959
|
-
|
|
863
|
+
name: `headers.${p}.name`,
|
|
864
|
+
render: ({ field: v }) => /* @__PURE__ */ e.jsx(
|
|
865
|
+
ne,
|
|
960
866
|
{
|
|
961
|
-
...
|
|
867
|
+
...v,
|
|
962
868
|
placeholder: "Name",
|
|
963
869
|
className: "border-0 shadow-none bg-transparent text-xs font-mono",
|
|
964
|
-
options: [...
|
|
965
|
-
onEnterPress: () =>
|
|
966
|
-
onChange: (
|
|
967
|
-
|
|
870
|
+
options: [...h, ...Ea],
|
|
871
|
+
onEnterPress: () => N(p),
|
|
872
|
+
onChange: (C) => {
|
|
873
|
+
v.onChange(C), o(`headers.${p}.active`, !0);
|
|
968
874
|
},
|
|
969
|
-
ref: (
|
|
970
|
-
d.current[
|
|
875
|
+
ref: (C) => {
|
|
876
|
+
d.current[p] = C;
|
|
971
877
|
}
|
|
972
878
|
}
|
|
973
879
|
)
|
|
@@ -979,29 +885,29 @@ const Ea = ({
|
|
|
979
885
|
I,
|
|
980
886
|
{
|
|
981
887
|
control: t,
|
|
982
|
-
name: `headers.${
|
|
983
|
-
render: ({ field:
|
|
984
|
-
|
|
888
|
+
name: `headers.${p}.value`,
|
|
889
|
+
render: ({ field: v }) => (b == null ? void 0 : b.enum) && b.enum.length > 0 ? /* @__PURE__ */ e.jsx(
|
|
890
|
+
ne,
|
|
985
891
|
{
|
|
986
892
|
shouldFilter: !1,
|
|
987
|
-
value:
|
|
988
|
-
options:
|
|
989
|
-
onChange: (
|
|
990
|
-
|
|
893
|
+
value: v.value,
|
|
894
|
+
options: b.enum ?? [],
|
|
895
|
+
onChange: (T) => {
|
|
896
|
+
v.onChange(T), o(`headers.${p}.active`, !0);
|
|
991
897
|
},
|
|
992
898
|
className: "font-mono text-xs border-0"
|
|
993
899
|
}
|
|
994
900
|
) : /* @__PURE__ */ e.jsx(
|
|
995
|
-
|
|
901
|
+
Ne,
|
|
996
902
|
{
|
|
997
903
|
placeholder: "Value",
|
|
998
904
|
className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0",
|
|
999
|
-
...
|
|
1000
|
-
ref: (
|
|
1001
|
-
c.current[
|
|
905
|
+
...v,
|
|
906
|
+
ref: (T) => {
|
|
907
|
+
c.current[p] = T;
|
|
1002
908
|
},
|
|
1003
|
-
onKeyDown: (
|
|
1004
|
-
|
|
909
|
+
onKeyDown: (T) => {
|
|
910
|
+
T.key === "Enter" && T.currentTarget.value.trim() && y(p);
|
|
1005
911
|
},
|
|
1006
912
|
autoComplete: "off"
|
|
1007
913
|
}
|
|
@@ -1009,21 +915,21 @@ const Ea = ({
|
|
|
1009
915
|
}
|
|
1010
916
|
),
|
|
1011
917
|
/* @__PURE__ */ e.jsx(
|
|
1012
|
-
|
|
918
|
+
te,
|
|
1013
919
|
{
|
|
1014
920
|
size: "icon",
|
|
1015
921
|
variant: "ghost",
|
|
1016
922
|
className: "text-muted-foreground opacity-0 group-hover:opacity-100 rounded-full w-8 h-7",
|
|
1017
|
-
onClick: () => r(
|
|
923
|
+
onClick: () => r(p),
|
|
1018
924
|
type: "button",
|
|
1019
925
|
children: /* @__PURE__ */ e.jsx($t, { size: 16 })
|
|
1020
926
|
}
|
|
1021
927
|
)
|
|
1022
928
|
] })
|
|
1023
|
-
] },
|
|
929
|
+
] }, x.id);
|
|
1024
930
|
}) }) }),
|
|
1025
931
|
/* @__PURE__ */ e.jsx("div", { className: "text-end", children: /* @__PURE__ */ e.jsx(
|
|
1026
|
-
|
|
932
|
+
te,
|
|
1027
933
|
{
|
|
1028
934
|
className: "",
|
|
1029
935
|
onClick: g,
|
|
@@ -1034,23 +940,26 @@ const Ea = ({
|
|
|
1034
940
|
) })
|
|
1035
941
|
] });
|
|
1036
942
|
}, Da = ({
|
|
1037
|
-
control: t
|
|
943
|
+
control: t,
|
|
944
|
+
url: a
|
|
1038
945
|
}) => {
|
|
1039
|
-
const { fields:
|
|
946
|
+
const { fields: s } = ye({
|
|
1040
947
|
control: t,
|
|
1041
948
|
name: "pathParams"
|
|
1042
|
-
})
|
|
1043
|
-
|
|
949
|
+
}), n = [...s].sort(
|
|
950
|
+
(r, o) => a.indexOf(`{${r.name}}`) - a.indexOf(`{${o.name}}`)
|
|
951
|
+
);
|
|
952
|
+
return /* @__PURE__ */ e.jsx(ie, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx(ke, { children: n.map((r, o) => /* @__PURE__ */ e.jsxs(Oe, { children: [
|
|
1044
953
|
/* @__PURE__ */ e.jsx(
|
|
1045
954
|
I,
|
|
1046
955
|
{
|
|
1047
956
|
control: t,
|
|
1048
|
-
name: `pathParams.${
|
|
957
|
+
name: `pathParams.${o}.name`,
|
|
1049
958
|
render: () => /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
1050
|
-
|
|
959
|
+
lt,
|
|
1051
960
|
{
|
|
1052
|
-
slug:
|
|
1053
|
-
name:
|
|
961
|
+
slug: r.name,
|
|
962
|
+
name: r.name,
|
|
1054
963
|
className: "font-mono text-xs px-2"
|
|
1055
964
|
}
|
|
1056
965
|
) })
|
|
@@ -1060,11 +969,11 @@ const Ea = ({
|
|
|
1060
969
|
I,
|
|
1061
970
|
{
|
|
1062
971
|
control: t,
|
|
1063
|
-
name: `pathParams.${
|
|
1064
|
-
render: ({ field:
|
|
1065
|
-
|
|
972
|
+
name: `pathParams.${o}.value`,
|
|
973
|
+
render: ({ field: l }) => /* @__PURE__ */ e.jsx(
|
|
974
|
+
Ne,
|
|
1066
975
|
{
|
|
1067
|
-
...
|
|
976
|
+
...l,
|
|
1068
977
|
required: !0,
|
|
1069
978
|
placeholder: "Enter value",
|
|
1070
979
|
className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0"
|
|
@@ -1072,23 +981,23 @@ const Ea = ({
|
|
|
1072
981
|
)
|
|
1073
982
|
}
|
|
1074
983
|
) })
|
|
1075
|
-
] },
|
|
1076
|
-
}, La =
|
|
984
|
+
] }, r.id)) }) });
|
|
985
|
+
}, La = Pe(
|
|
1077
986
|
"input",
|
|
1078
987
|
"px-2 bg-transparent h-6 font-mono text-xs m-2"
|
|
1079
988
|
), Va = ({
|
|
1080
989
|
control: t,
|
|
1081
990
|
queryParams: a
|
|
1082
991
|
}) => {
|
|
1083
|
-
const { fields: s } =
|
|
992
|
+
const { fields: s } = ye({
|
|
1084
993
|
control: t,
|
|
1085
994
|
name: "queryParams"
|
|
1086
|
-
}), n =
|
|
1087
|
-
return /* @__PURE__ */ e.jsx(
|
|
995
|
+
}), n = ve(), r = a.map((o) => !!o.isRequired);
|
|
996
|
+
return /* @__PURE__ */ e.jsx(ie, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx("div", { className: "w-full ", children: /* @__PURE__ */ e.jsx(ke, { children: s.map((o, l) => {
|
|
1088
997
|
const c = a.find(
|
|
1089
998
|
(d) => d.name === n.watch(`queryParams.${l}.name`)
|
|
1090
999
|
);
|
|
1091
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1000
|
+
return /* @__PURE__ */ e.jsxs(Oe, { children: [
|
|
1092
1001
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1093
1002
|
/* @__PURE__ */ e.jsx(
|
|
1094
1003
|
I,
|
|
@@ -1096,7 +1005,7 @@ const Ea = ({
|
|
|
1096
1005
|
control: t,
|
|
1097
1006
|
name: `queryParams.${l}.active`,
|
|
1098
1007
|
render: ({ field: d }) => /* @__PURE__ */ e.jsx(
|
|
1099
|
-
|
|
1008
|
+
Se,
|
|
1100
1009
|
{
|
|
1101
1010
|
variant: "outline",
|
|
1102
1011
|
id: `queryParams.${l}.active`,
|
|
@@ -1123,7 +1032,7 @@ const Ea = ({
|
|
|
1123
1032
|
]
|
|
1124
1033
|
}
|
|
1125
1034
|
) }) : /* @__PURE__ */ e.jsx(
|
|
1126
|
-
|
|
1035
|
+
ne,
|
|
1127
1036
|
{
|
|
1128
1037
|
value: d.value,
|
|
1129
1038
|
options: a.map((u) => u.name),
|
|
@@ -1136,13 +1045,13 @@ const Ea = ({
|
|
|
1136
1045
|
name: `queryParams.${l}.name`
|
|
1137
1046
|
}
|
|
1138
1047
|
)
|
|
1139
|
-
] },
|
|
1048
|
+
] }, o.id),
|
|
1140
1049
|
/* @__PURE__ */ e.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ e.jsx(
|
|
1141
1050
|
I,
|
|
1142
1051
|
{
|
|
1143
1052
|
control: t,
|
|
1144
1053
|
render: ({ field: d }) => (c == null ? void 0 : c.enum) && c.enum.length > 0 ? /* @__PURE__ */ e.jsx(
|
|
1145
|
-
|
|
1054
|
+
ne,
|
|
1146
1055
|
{
|
|
1147
1056
|
value: d.value,
|
|
1148
1057
|
options: c.enum ?? [],
|
|
@@ -1152,7 +1061,7 @@ const Ea = ({
|
|
|
1152
1061
|
className: "font-mono text-xs border-0 ring-1 ring-ring"
|
|
1153
1062
|
}
|
|
1154
1063
|
) : /* @__PURE__ */ e.jsx(
|
|
1155
|
-
|
|
1064
|
+
Ne,
|
|
1156
1065
|
{
|
|
1157
1066
|
...d,
|
|
1158
1067
|
onChange: (g) => {
|
|
@@ -1165,7 +1074,7 @@ const Ea = ({
|
|
|
1165
1074
|
name: `queryParams.${l}.value`
|
|
1166
1075
|
}
|
|
1167
1076
|
) })
|
|
1168
|
-
] },
|
|
1077
|
+
] }, o.id);
|
|
1169
1078
|
}) }) }) });
|
|
1170
1079
|
}, P = {
|
|
1171
1080
|
green: "text-green-600",
|
|
@@ -1198,22 +1107,22 @@ const Ea = ({
|
|
|
1198
1107
|
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "HTTP/1.1" })
|
|
1199
1108
|
] }),
|
|
1200
1109
|
/* @__PURE__ */ e.jsxs("div", { className: "mx-1.5 flex flex-col gap-3", children: [
|
|
1201
|
-
/* @__PURE__ */ e.jsxs(
|
|
1202
|
-
/* @__PURE__ */ e.jsxs(
|
|
1203
|
-
/* @__PURE__ */ e.jsx(
|
|
1110
|
+
/* @__PURE__ */ e.jsxs(Me, { defaultOpen: !0, children: [
|
|
1111
|
+
/* @__PURE__ */ e.jsxs(Ge, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1112
|
+
/* @__PURE__ */ e.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1204
1113
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
1205
1114
|
] }),
|
|
1206
|
-
/* @__PURE__ */ e.jsx(
|
|
1115
|
+
/* @__PURE__ */ e.jsx(Je, { children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2", children: s.map(([r, o]) => /* @__PURE__ */ e.jsxs(R, { children: [
|
|
1207
1116
|
/* @__PURE__ */ e.jsx("div", { className: "text-primary", children: r }),
|
|
1208
|
-
/* @__PURE__ */ e.jsx("div", { className: "break-all", children:
|
|
1117
|
+
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: o })
|
|
1209
1118
|
] }, r)) }) })
|
|
1210
1119
|
] }),
|
|
1211
|
-
/* @__PURE__ */ e.jsxs(
|
|
1212
|
-
/* @__PURE__ */ e.jsxs(
|
|
1213
|
-
/* @__PURE__ */ e.jsx(
|
|
1120
|
+
/* @__PURE__ */ e.jsxs(Me, { defaultOpen: !0, children: [
|
|
1121
|
+
/* @__PURE__ */ e.jsxs(Ge, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1122
|
+
/* @__PURE__ */ e.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1214
1123
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Body" })
|
|
1215
1124
|
] }),
|
|
1216
|
-
/* @__PURE__ */ e.jsx(
|
|
1125
|
+
/* @__PURE__ */ e.jsx(Je, { children: /* @__PURE__ */ e.jsx("div", { className: "pl-0 pt-2", children: /* @__PURE__ */ e.jsx(
|
|
1217
1126
|
"div",
|
|
1218
1127
|
{
|
|
1219
1128
|
className: m(
|
|
@@ -1225,29 +1134,29 @@ const Ea = ({
|
|
|
1225
1134
|
) }) })
|
|
1226
1135
|
] })
|
|
1227
1136
|
] })
|
|
1228
|
-
] }),
|
|
1229
|
-
function
|
|
1137
|
+
] }), _e = we.Root, We = we.CollapsibleTrigger, Ze = we.CollapsibleContent;
|
|
1138
|
+
function Re(t) {
|
|
1230
1139
|
if (t === null) return "null";
|
|
1231
1140
|
if (Array.isArray(t)) {
|
|
1232
1141
|
if (t.length === 0) return "any[]";
|
|
1233
1142
|
const a = t[0];
|
|
1234
|
-
return a === void 0 ? "any[]" : `${
|
|
1143
|
+
return a === void 0 ? "any[]" : `${Re(a)}[]`;
|
|
1235
1144
|
}
|
|
1236
|
-
return typeof t == "object" ?
|
|
1145
|
+
return typeof t == "object" ? Ba(t) : typeof t;
|
|
1237
1146
|
}
|
|
1238
|
-
function
|
|
1147
|
+
function Ba(t, a = "") {
|
|
1239
1148
|
const s = ["{"];
|
|
1240
1149
|
for (const [n, r] of Object.entries(t)) {
|
|
1241
|
-
const
|
|
1242
|
-
s.push(` ${n}: ${
|
|
1150
|
+
const o = Re(r);
|
|
1151
|
+
s.push(` ${n}: ${o};`);
|
|
1243
1152
|
}
|
|
1244
1153
|
return s.push("}"), s.join(`
|
|
1245
1154
|
`);
|
|
1246
1155
|
}
|
|
1247
|
-
function
|
|
1248
|
-
return { lines: [`type GeneratedType = ${
|
|
1156
|
+
function Ua(t) {
|
|
1157
|
+
return { lines: [`type GeneratedType = ${Re(t)};`] };
|
|
1249
1158
|
}
|
|
1250
|
-
const
|
|
1159
|
+
const Ma = {
|
|
1251
1160
|
200: "OK",
|
|
1252
1161
|
201: "Created",
|
|
1253
1162
|
202: "Accepted",
|
|
@@ -1258,7 +1167,7 @@ const Ua = {
|
|
|
1258
1167
|
404: "Not Found",
|
|
1259
1168
|
405: "Method Not Allowed",
|
|
1260
1169
|
500: "Internal Server Error"
|
|
1261
|
-
},
|
|
1170
|
+
}, Ga = (t) => {
|
|
1262
1171
|
var s;
|
|
1263
1172
|
return (s = Object.entries({
|
|
1264
1173
|
"application/json": "json",
|
|
@@ -1271,17 +1180,17 @@ const Ua = {
|
|
|
1271
1180
|
}).find(
|
|
1272
1181
|
([n]) => t.includes(n)
|
|
1273
1182
|
)) == null ? void 0 : s[1];
|
|
1274
|
-
},
|
|
1183
|
+
}, Ja = (t) => {
|
|
1275
1184
|
var s;
|
|
1276
1185
|
const a = ((s = t.find(([n, r]) => n === "Content-Type")) == null ? void 0 : s[1]) || "";
|
|
1277
|
-
return
|
|
1278
|
-
},
|
|
1186
|
+
return Ga(a);
|
|
1187
|
+
}, Qa = (t) => {
|
|
1279
1188
|
try {
|
|
1280
1189
|
return JSON.stringify(JSON.parse(t), null, 2);
|
|
1281
1190
|
} catch {
|
|
1282
1191
|
return null;
|
|
1283
1192
|
}
|
|
1284
|
-
},
|
|
1193
|
+
}, _a = (t) => {
|
|
1285
1194
|
const a = [
|
|
1286
1195
|
"Content-Type",
|
|
1287
1196
|
"Content-Length",
|
|
@@ -1292,57 +1201,57 @@ const Ua = {
|
|
|
1292
1201
|
"ETag"
|
|
1293
1202
|
].map((s) => s.toLowerCase());
|
|
1294
1203
|
return [...t].sort(([s], [n]) => {
|
|
1295
|
-
const r = a.indexOf(s.toLowerCase()),
|
|
1296
|
-
return r ===
|
|
1204
|
+
const r = a.indexOf(s.toLowerCase()), o = a.indexOf(n.toLowerCase());
|
|
1205
|
+
return r === o ? 0 : r === -1 ? 1 : o === -1 ? -1 : r - o;
|
|
1297
1206
|
});
|
|
1298
|
-
},
|
|
1207
|
+
}, Wa = ({
|
|
1299
1208
|
body: t = "",
|
|
1300
1209
|
headers: a,
|
|
1301
1210
|
status: s,
|
|
1302
1211
|
time: n,
|
|
1303
1212
|
size: r,
|
|
1304
|
-
url:
|
|
1213
|
+
url: o
|
|
1305
1214
|
}) => {
|
|
1306
|
-
var
|
|
1307
|
-
const l =
|
|
1215
|
+
var h;
|
|
1216
|
+
const l = Ja(a), c = Qa(t), d = c || t, [u, g] = F(
|
|
1308
1217
|
c ? "formatted" : "raw"
|
|
1309
|
-
),
|
|
1218
|
+
), N = na({
|
|
1310
1219
|
queryKey: ["types", d],
|
|
1311
|
-
queryFn: async () =>
|
|
1220
|
+
queryFn: async () => Ua(JSON.parse(d)),
|
|
1312
1221
|
enabled: u === "types"
|
|
1313
|
-
}),
|
|
1222
|
+
}), y = _a([...a]);
|
|
1314
1223
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 h-full overflow-y-scroll max-h-[calc(100vh-220px)] py-4", children: [
|
|
1315
|
-
/* @__PURE__ */ e.jsxs(
|
|
1316
|
-
/* @__PURE__ */ e.jsxs(
|
|
1317
|
-
/* @__PURE__ */ e.jsx(
|
|
1224
|
+
/* @__PURE__ */ e.jsxs(_e, { defaultOpen: !0, children: [
|
|
1225
|
+
/* @__PURE__ */ e.jsxs(We, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1226
|
+
/* @__PURE__ */ e.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1318
1227
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
1319
1228
|
] }),
|
|
1320
|
-
/* @__PURE__ */ e.jsx(
|
|
1321
|
-
|
|
1322
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children:
|
|
1323
|
-
/* @__PURE__ */ e.jsx("div", { className: "break-all", children:
|
|
1324
|
-
] },
|
|
1325
|
-
|
|
1326
|
-
/* @__PURE__ */ e.jsxs(
|
|
1327
|
-
/* @__PURE__ */ e.jsx(
|
|
1229
|
+
/* @__PURE__ */ e.jsx(Ze, { children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2 font-mono text-xs", children: [
|
|
1230
|
+
y.slice(0, 5).map(([x, p]) => /* @__PURE__ */ e.jsxs(R, { children: [
|
|
1231
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: x }),
|
|
1232
|
+
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: p })
|
|
1233
|
+
] }, x)),
|
|
1234
|
+
y.length > 5 && /* @__PURE__ */ e.jsxs(_e, { className: "col-span-full grid-cols-subgrid grid", children: [
|
|
1235
|
+
/* @__PURE__ */ e.jsxs(We, { className: "col-span-2 text-xs text-muted-foreground hover:text-primary flex items-center gap-1 py-1", children: [
|
|
1236
|
+
/* @__PURE__ */ e.jsx(Q, { className: "h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1328
1237
|
"Show ",
|
|
1329
|
-
|
|
1238
|
+
y.length - 5,
|
|
1330
1239
|
" more headers"
|
|
1331
1240
|
] }),
|
|
1332
|
-
/* @__PURE__ */ e.jsx(
|
|
1333
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children:
|
|
1334
|
-
/* @__PURE__ */ e.jsx("div", { className: "break-all", children:
|
|
1335
|
-
] },
|
|
1241
|
+
/* @__PURE__ */ e.jsx(Ze, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: y.slice(5).map(([x, p]) => /* @__PURE__ */ e.jsxs(R, { children: [
|
|
1242
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: x }),
|
|
1243
|
+
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: p })
|
|
1244
|
+
] }, x)) })
|
|
1336
1245
|
] })
|
|
1337
1246
|
] }) })
|
|
1338
1247
|
] }),
|
|
1339
|
-
/* @__PURE__ */ e.jsx(
|
|
1340
|
-
|
|
1248
|
+
/* @__PURE__ */ e.jsx(be, { className: "shadow-none", children: /* @__PURE__ */ e.jsx(
|
|
1249
|
+
ra,
|
|
1341
1250
|
{
|
|
1342
1251
|
language: u === "types" ? "typescript" : u === "raw" ? c ? "plain" : l : "json",
|
|
1343
1252
|
noBackground: !0,
|
|
1344
1253
|
className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
|
|
1345
|
-
code: (u === "raw" ? t : u === "types" ? (
|
|
1254
|
+
code: (u === "raw" ? t : u === "types" ? (h = N.data) == null ? void 0 : h.lines.join(`
|
|
1346
1255
|
`) : d) ?? ""
|
|
1347
1256
|
}
|
|
1348
1257
|
) }),
|
|
@@ -1353,7 +1262,7 @@ const Ua = {
|
|
|
1353
1262
|
" ",
|
|
1354
1263
|
s,
|
|
1355
1264
|
" ",
|
|
1356
|
-
|
|
1265
|
+
Ma[s] ?? ""
|
|
1357
1266
|
] }),
|
|
1358
1267
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1359
1268
|
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Time" }),
|
|
@@ -1369,42 +1278,42 @@ const Ua = {
|
|
|
1369
1278
|
] })
|
|
1370
1279
|
] }),
|
|
1371
1280
|
c && /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
|
|
1372
|
-
|
|
1281
|
+
Ye,
|
|
1373
1282
|
{
|
|
1374
1283
|
value: u,
|
|
1375
|
-
onValueChange: (
|
|
1284
|
+
onValueChange: (x) => g(x),
|
|
1376
1285
|
children: [
|
|
1377
|
-
/* @__PURE__ */ e.jsx(
|
|
1378
|
-
/* @__PURE__ */ e.jsxs(
|
|
1379
|
-
/* @__PURE__ */ e.jsx(
|
|
1380
|
-
/* @__PURE__ */ e.jsx(
|
|
1381
|
-
/* @__PURE__ */ e.jsx(
|
|
1286
|
+
/* @__PURE__ */ e.jsx(et, { className: "min-w-32", children: /* @__PURE__ */ e.jsx(tt, { placeholder: "View" }) }),
|
|
1287
|
+
/* @__PURE__ */ e.jsxs(at, { children: [
|
|
1288
|
+
/* @__PURE__ */ e.jsx(Z, { value: "formatted", children: "Formatted" }),
|
|
1289
|
+
/* @__PURE__ */ e.jsx(Z, { value: "raw", children: "Raw" }),
|
|
1290
|
+
/* @__PURE__ */ e.jsx(Z, { value: "types", children: "Types" })
|
|
1382
1291
|
] })
|
|
1383
1292
|
]
|
|
1384
1293
|
}
|
|
1385
1294
|
) })
|
|
1386
1295
|
] })
|
|
1387
1296
|
] });
|
|
1388
|
-
},
|
|
1297
|
+
}, Za = ({
|
|
1389
1298
|
queryMutation: t,
|
|
1390
1299
|
showPathParamsWarning: a
|
|
1391
1300
|
}) => {
|
|
1392
1301
|
var n;
|
|
1393
1302
|
const s = ((((n = t.data) == null ? void 0 : n.status) ?? 0) / 100).toFixed(0);
|
|
1394
1303
|
return /* @__PURE__ */ e.jsx("div", { className: "min-w-0 p-8 bg-muted/70 overflow-y-auto", children: t.error ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1395
|
-
a && /* @__PURE__ */ e.jsx(
|
|
1396
|
-
/* @__PURE__ */ e.jsxs(
|
|
1304
|
+
a && /* @__PURE__ */ e.jsx(sa, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
|
|
1305
|
+
/* @__PURE__ */ e.jsxs(be, { children: [
|
|
1397
1306
|
/* @__PURE__ */ e.jsx(Jt, { children: /* @__PURE__ */ e.jsx(Qt, { children: "Request failed" }) }),
|
|
1398
|
-
/* @__PURE__ */ e.jsxs(
|
|
1307
|
+
/* @__PURE__ */ e.jsxs(_t, { children: [
|
|
1399
1308
|
"Error:",
|
|
1400
1309
|
" ",
|
|
1401
1310
|
t.error.message || String(t.error) || "Unexpected error"
|
|
1402
1311
|
] })
|
|
1403
1312
|
] })
|
|
1404
|
-
] }) : t.data ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs(
|
|
1405
|
-
/* @__PURE__ */ e.jsxs(
|
|
1406
|
-
/* @__PURE__ */ e.jsx(
|
|
1407
|
-
/* @__PURE__ */ e.jsxs(
|
|
1313
|
+
] }) : t.data ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs(nt, { defaultValue: "response", children: [
|
|
1314
|
+
/* @__PURE__ */ e.jsxs(rt, { children: [
|
|
1315
|
+
/* @__PURE__ */ e.jsx(D, { value: "request", children: "Request" }),
|
|
1316
|
+
/* @__PURE__ */ e.jsxs(D, { value: "response", children: [
|
|
1408
1317
|
"Response",
|
|
1409
1318
|
/* @__PURE__ */ e.jsxs(
|
|
1410
1319
|
"span",
|
|
@@ -1425,9 +1334,9 @@ const Ua = {
|
|
|
1425
1334
|
)
|
|
1426
1335
|
] })
|
|
1427
1336
|
] }),
|
|
1428
|
-
/* @__PURE__ */ e.jsx(
|
|
1429
|
-
/* @__PURE__ */ e.jsx(
|
|
1430
|
-
|
|
1337
|
+
/* @__PURE__ */ e.jsx(L, { value: "request", children: /* @__PURE__ */ e.jsx(Ha, { ...t.data.request }) }),
|
|
1338
|
+
/* @__PURE__ */ e.jsx(L, { value: "response", children: /* @__PURE__ */ e.jsx(
|
|
1339
|
+
Wa,
|
|
1431
1340
|
{
|
|
1432
1341
|
status: t.data.status,
|
|
1433
1342
|
time: t.data.time,
|
|
@@ -1437,16 +1346,16 @@ const Ua = {
|
|
|
1437
1346
|
url: t.data.request.url
|
|
1438
1347
|
}
|
|
1439
1348
|
) })
|
|
1440
|
-
] }) }) : /* @__PURE__ */ e.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ e.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: t.isPending ? /* @__PURE__ */ e.jsx(
|
|
1349
|
+
] }) }) : /* @__PURE__ */ e.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ e.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: t.isPending ? /* @__PURE__ */ e.jsx(Gt, {}) : "Send a request first to see the response here" }) }) });
|
|
1441
1350
|
}, Ka = ({
|
|
1442
1351
|
identities: t,
|
|
1443
1352
|
formRef: a,
|
|
1444
1353
|
disabled: s
|
|
1445
1354
|
}) => {
|
|
1446
|
-
const { setValue: n } =
|
|
1447
|
-
return t.length === 0 ? /* @__PURE__ */ e.jsx(
|
|
1355
|
+
const { setValue: n } = ve(), [r, o] = F();
|
|
1356
|
+
return t.length === 0 ? /* @__PURE__ */ e.jsx(q, { disabled: s, children: "Send" }) : /* @__PURE__ */ e.jsxs("div", { className: "flex", children: [
|
|
1448
1357
|
/* @__PURE__ */ e.jsx(
|
|
1449
|
-
|
|
1358
|
+
q,
|
|
1450
1359
|
{
|
|
1451
1360
|
className: "rounded-r-none inset-shadow-sm",
|
|
1452
1361
|
disabled: s,
|
|
@@ -1457,9 +1366,9 @@ const Ua = {
|
|
|
1457
1366
|
children: "Send"
|
|
1458
1367
|
}
|
|
1459
1368
|
),
|
|
1460
|
-
/* @__PURE__ */ e.jsxs(
|
|
1461
|
-
/* @__PURE__ */ e.jsx(
|
|
1462
|
-
|
|
1369
|
+
/* @__PURE__ */ e.jsxs(dt, { children: [
|
|
1370
|
+
/* @__PURE__ */ e.jsx(ct, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1371
|
+
q,
|
|
1463
1372
|
{
|
|
1464
1373
|
disabled: s,
|
|
1465
1374
|
className: "rounded-l-none border-l border-border/40 inset-shadow-sm w-6",
|
|
@@ -1467,18 +1376,18 @@ const Ua = {
|
|
|
1467
1376
|
children: /* @__PURE__ */ e.jsx(St, { className: "w-4 h-4" })
|
|
1468
1377
|
}
|
|
1469
1378
|
) }),
|
|
1470
|
-
/* @__PURE__ */ e.jsx(
|
|
1379
|
+
/* @__PURE__ */ e.jsx(Ce, { value: r, children: /* @__PURE__ */ e.jsx(Te, { className: "w-56", align: "end", alignOffset: -150, children: [{ id: G, label: "None" }, ...t].map(
|
|
1471
1380
|
(l) => /* @__PURE__ */ e.jsxs(
|
|
1472
|
-
|
|
1381
|
+
$e,
|
|
1473
1382
|
{
|
|
1474
1383
|
onClick: () => {
|
|
1475
1384
|
var c;
|
|
1476
|
-
|
|
1385
|
+
o(l.id), n("identity", l.id), (c = a == null ? void 0 : a.current) == null || c.requestSubmit();
|
|
1477
1386
|
},
|
|
1478
|
-
onMouseEnter: () =>
|
|
1479
|
-
onMouseLeave: () =>
|
|
1387
|
+
onMouseEnter: () => o(l.id),
|
|
1388
|
+
onMouseLeave: () => o(void 0),
|
|
1480
1389
|
children: [
|
|
1481
|
-
/* @__PURE__ */ e.jsx(
|
|
1390
|
+
/* @__PURE__ */ e.jsx(se, { value: l.id, className: "mr-2" }),
|
|
1482
1391
|
l.label
|
|
1483
1392
|
]
|
|
1484
1393
|
},
|
|
@@ -1487,28 +1396,31 @@ const Ua = {
|
|
|
1487
1396
|
) }) })
|
|
1488
1397
|
] })
|
|
1489
1398
|
] });
|
|
1490
|
-
},
|
|
1399
|
+
}, G = "__none", Xa = ({
|
|
1491
1400
|
server: t,
|
|
1492
1401
|
servers: a = [],
|
|
1493
1402
|
url: s,
|
|
1494
1403
|
method: n,
|
|
1495
1404
|
headers: r = [],
|
|
1496
|
-
queryParams:
|
|
1405
|
+
queryParams: o = [],
|
|
1497
1406
|
pathParams: l = [],
|
|
1498
1407
|
defaultBody: c = "",
|
|
1499
|
-
examples: d
|
|
1408
|
+
examples: d,
|
|
1409
|
+
requiresLogin: u = !1,
|
|
1410
|
+
onLogin: g,
|
|
1411
|
+
onSignUp: N
|
|
1500
1412
|
}) => {
|
|
1501
|
-
var
|
|
1502
|
-
const { selectedServer:
|
|
1503
|
-
a.map((
|
|
1504
|
-
), [,
|
|
1413
|
+
var Le, Ve, Fe;
|
|
1414
|
+
const { selectedServer: y, setSelectedServer: h } = Rt(
|
|
1415
|
+
a.map((i) => ({ url: i }))
|
|
1416
|
+
), [, x] = Lt(), [p, b] = F(!1), { register: v, control: C, handleSubmit: T, watch: H, setValue: k, ...B } = Ut({
|
|
1505
1417
|
defaultValues: {
|
|
1506
1418
|
body: c,
|
|
1507
|
-
queryParams:
|
|
1508
|
-
name:
|
|
1509
|
-
value:
|
|
1510
|
-
active:
|
|
1511
|
-
enum:
|
|
1419
|
+
queryParams: o.map((i) => ({
|
|
1420
|
+
name: i.name,
|
|
1421
|
+
value: i.defaultValue ?? "",
|
|
1422
|
+
active: i.defaultActive ?? !1,
|
|
1423
|
+
enum: i.enum ?? []
|
|
1512
1424
|
})).concat([
|
|
1513
1425
|
{
|
|
1514
1426
|
name: "",
|
|
@@ -1517,14 +1429,14 @@ const Ua = {
|
|
|
1517
1429
|
enum: []
|
|
1518
1430
|
}
|
|
1519
1431
|
]),
|
|
1520
|
-
pathParams: l.map((
|
|
1521
|
-
name:
|
|
1522
|
-
value:
|
|
1432
|
+
pathParams: l.map((i) => ({
|
|
1433
|
+
name: i.name,
|
|
1434
|
+
value: i.defaultValue ?? ""
|
|
1523
1435
|
})),
|
|
1524
|
-
headers: r.map((
|
|
1525
|
-
name:
|
|
1526
|
-
value:
|
|
1527
|
-
active:
|
|
1436
|
+
headers: r.map((i) => ({
|
|
1437
|
+
name: i.name,
|
|
1438
|
+
value: i.defaultValue ?? "",
|
|
1439
|
+
active: i.defaultActive ?? !1
|
|
1528
1440
|
})).concat([
|
|
1529
1441
|
{
|
|
1530
1442
|
name: "",
|
|
@@ -1532,253 +1444,294 @@ const Ua = {
|
|
|
1532
1444
|
active: !1
|
|
1533
1445
|
}
|
|
1534
1446
|
]),
|
|
1535
|
-
identity:
|
|
1447
|
+
identity: G
|
|
1536
1448
|
}
|
|
1537
|
-
}),
|
|
1449
|
+
}), S = H(), A = It(), Ie = V(!1);
|
|
1538
1450
|
fe(() => {
|
|
1539
|
-
var
|
|
1540
|
-
if (
|
|
1541
|
-
const
|
|
1542
|
-
|
|
1543
|
-
}, [
|
|
1544
|
-
const
|
|
1545
|
-
mutationFn: async (
|
|
1546
|
-
var
|
|
1547
|
-
const
|
|
1548
|
-
|
|
1451
|
+
var O;
|
|
1452
|
+
if (Ie.current) return;
|
|
1453
|
+
const i = (O = A.data) == null ? void 0 : O.at(0);
|
|
1454
|
+
i && (k("identity", i.id), Ie.current = !0);
|
|
1455
|
+
}, [k, A.data]);
|
|
1456
|
+
const Ae = V(null), Ee = Bt({
|
|
1457
|
+
mutationFn: async (i) => {
|
|
1458
|
+
var W, U;
|
|
1459
|
+
const O = performance.now(), $ = new Request(
|
|
1460
|
+
va(t ?? y, s, i),
|
|
1549
1461
|
{
|
|
1550
1462
|
method: n.toUpperCase(),
|
|
1551
1463
|
headers: Object.fromEntries(
|
|
1552
|
-
|
|
1464
|
+
i.headers.filter((w) => w.name && w.active).map((w) => [w.name, w.value])
|
|
1553
1465
|
),
|
|
1554
|
-
body:
|
|
1466
|
+
body: i.body ? i.body : void 0
|
|
1555
1467
|
}
|
|
1556
1468
|
);
|
|
1557
|
-
|
|
1469
|
+
i.identity !== G && await ((U = (W = A.data) == null ? void 0 : W.find((w) => w.id === i.identity)) == null ? void 0 : U.authorizeRequest($));
|
|
1558
1470
|
try {
|
|
1559
|
-
const
|
|
1471
|
+
const w = await fetch($, {
|
|
1560
1472
|
signal: AbortSignal.timeout(5e3)
|
|
1561
|
-
}), ft = performance.now() -
|
|
1473
|
+
}), ft = performance.now() - O, ze = await w.text(), yt = new URL($.url);
|
|
1562
1474
|
return {
|
|
1563
|
-
status:
|
|
1564
|
-
headers: Array.from(
|
|
1565
|
-
size:
|
|
1566
|
-
body:
|
|
1475
|
+
status: w.status,
|
|
1476
|
+
headers: Array.from(w.headers.entries()),
|
|
1477
|
+
size: ze.length,
|
|
1478
|
+
body: ze,
|
|
1567
1479
|
time: ft,
|
|
1568
1480
|
request: {
|
|
1569
|
-
method:
|
|
1570
|
-
url:
|
|
1481
|
+
method: $.method.toUpperCase(),
|
|
1482
|
+
url: $.url,
|
|
1571
1483
|
headers: [
|
|
1572
|
-
["Host",
|
|
1484
|
+
["Host", yt.host],
|
|
1573
1485
|
["User-Agent", "Zudoku Playground"],
|
|
1574
|
-
...Array.from(
|
|
1486
|
+
...Array.from($.headers.entries())
|
|
1575
1487
|
],
|
|
1576
|
-
body:
|
|
1488
|
+
body: i.body ? i.body : void 0
|
|
1577
1489
|
}
|
|
1578
1490
|
};
|
|
1579
|
-
} catch (
|
|
1580
|
-
throw
|
|
1491
|
+
} catch (w) {
|
|
1492
|
+
throw w instanceof TypeError ? new Error(
|
|
1581
1493
|
"The request failed, possibly due to network issues or CORS policy."
|
|
1582
|
-
) :
|
|
1494
|
+
) : w;
|
|
1583
1495
|
}
|
|
1584
1496
|
}
|
|
1585
|
-
}),
|
|
1586
|
-
|
|
1497
|
+
}), xt = /* @__PURE__ */ e.jsx(
|
|
1498
|
+
ga,
|
|
1587
1499
|
{
|
|
1588
1500
|
path: s,
|
|
1589
|
-
renderParam: ({ name:
|
|
1590
|
-
var
|
|
1591
|
-
const
|
|
1592
|
-
(
|
|
1593
|
-
)) == null ? void 0 :
|
|
1501
|
+
renderParam: ({ name: i, originalValue: O, index: $ }) => {
|
|
1502
|
+
var U;
|
|
1503
|
+
const W = (U = S.pathParams.find(
|
|
1504
|
+
(w) => w.name === i
|
|
1505
|
+
)) == null ? void 0 : U.value;
|
|
1594
1506
|
return /* @__PURE__ */ e.jsx(
|
|
1595
|
-
|
|
1507
|
+
lt,
|
|
1596
1508
|
{
|
|
1597
|
-
name:
|
|
1509
|
+
name: i,
|
|
1598
1510
|
backgroundOpacity: "0",
|
|
1599
|
-
slug:
|
|
1600
|
-
onClick: () =>
|
|
1601
|
-
children:
|
|
1511
|
+
slug: i,
|
|
1512
|
+
onClick: () => B.setFocus(`pathParams.${$}.value`),
|
|
1513
|
+
children: W || O
|
|
1602
1514
|
}
|
|
1603
1515
|
);
|
|
1604
1516
|
}
|
|
1605
1517
|
}
|
|
1606
|
-
),
|
|
1607
|
-
|
|
1518
|
+
), qe = S.queryParams.filter((i) => i.active).map((i, O, $) => /* @__PURE__ */ e.jsxs(R, { children: [
|
|
1519
|
+
i.name,
|
|
1608
1520
|
"=",
|
|
1609
|
-
encodeURIComponent(
|
|
1610
|
-
|
|
1521
|
+
encodeURIComponent(i.value).replaceAll("%20", "+"),
|
|
1522
|
+
O < $.length - 1 && "&",
|
|
1611
1523
|
/* @__PURE__ */ e.jsx("wbr", {})
|
|
1612
|
-
] },
|
|
1613
|
-
|
|
1524
|
+
] }, i.name)), gt = /* @__PURE__ */ e.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition translate-y-[4px]", children: t ? /* @__PURE__ */ e.jsx("span", { children: t.replace(/^https?:\/\//, "") }) : a.length > 1 && /* @__PURE__ */ e.jsxs(
|
|
1525
|
+
Ye,
|
|
1614
1526
|
{
|
|
1615
|
-
onValueChange: (
|
|
1616
|
-
|
|
1527
|
+
onValueChange: (i) => {
|
|
1528
|
+
x(() => h(i));
|
|
1617
1529
|
},
|
|
1618
|
-
value:
|
|
1619
|
-
defaultValue:
|
|
1530
|
+
value: y,
|
|
1531
|
+
defaultValue: y,
|
|
1620
1532
|
children: [
|
|
1621
|
-
/* @__PURE__ */ e.jsx(
|
|
1622
|
-
/* @__PURE__ */ e.jsx(
|
|
1533
|
+
/* @__PURE__ */ e.jsx(et, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto", children: /* @__PURE__ */ e.jsx(tt, {}) }),
|
|
1534
|
+
/* @__PURE__ */ e.jsx(at, { children: a.map((i) => /* @__PURE__ */ e.jsx(Z, { value: i, children: i.replace(/^https?:\/\//, "") }, i)) })
|
|
1623
1535
|
]
|
|
1624
1536
|
}
|
|
1625
|
-
) });
|
|
1537
|
+
) }), De = u && !p;
|
|
1626
1538
|
return /* @__PURE__ */ e.jsx(
|
|
1627
|
-
|
|
1539
|
+
Mt,
|
|
1628
1540
|
{
|
|
1629
|
-
register:
|
|
1630
|
-
control:
|
|
1631
|
-
handleSubmit:
|
|
1632
|
-
watch:
|
|
1633
|
-
setValue:
|
|
1634
|
-
...
|
|
1635
|
-
children: /* @__PURE__ */ e.
|
|
1541
|
+
register: v,
|
|
1542
|
+
control: C,
|
|
1543
|
+
handleSubmit: T,
|
|
1544
|
+
watch: H,
|
|
1545
|
+
setValue: k,
|
|
1546
|
+
...B,
|
|
1547
|
+
children: /* @__PURE__ */ e.jsxs(
|
|
1636
1548
|
"form",
|
|
1637
1549
|
{
|
|
1638
|
-
onSubmit:
|
|
1639
|
-
ref:
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
ht,
|
|
1648
|
-
Ie.length > 0 ? "?" : "",
|
|
1649
|
-
Ie
|
|
1650
|
-
] })
|
|
1651
|
-
] }),
|
|
1652
|
-
/* @__PURE__ */ e.jsx(
|
|
1653
|
-
Ka,
|
|
1654
|
-
{
|
|
1655
|
-
identities: w.data ?? [],
|
|
1656
|
-
formRef: V,
|
|
1657
|
-
disabled: y.formState.isSubmitting
|
|
1658
|
-
}
|
|
1659
|
-
)
|
|
1660
|
-
] }),
|
|
1661
|
-
/* @__PURE__ */ e.jsxs(Ye, { defaultValue: "parameters", children: [
|
|
1662
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1 justify-between", children: /* @__PURE__ */ e.jsxs(et, { children: [
|
|
1663
|
-
/* @__PURE__ */ e.jsxs(E, { value: "parameters", children: [
|
|
1664
|
-
"Parameters",
|
|
1665
|
-
(N.pathParams.some((o) => o.value !== "") || N.queryParams.some((o) => o.active)) && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1666
|
-
] }),
|
|
1667
|
-
/* @__PURE__ */ e.jsxs(E, { value: "headers", children: [
|
|
1668
|
-
"Headers",
|
|
1669
|
-
N.headers.filter((o) => o.active).length > 0 && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1670
|
-
] }),
|
|
1671
|
-
/* @__PURE__ */ e.jsxs(E, { value: "auth", children: [
|
|
1672
|
-
"Auth",
|
|
1673
|
-
N.identity !== H && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1674
|
-
] }),
|
|
1675
|
-
/* @__PURE__ */ e.jsx(E, { value: "body", children: "Body" })
|
|
1676
|
-
] }) }),
|
|
1677
|
-
/* @__PURE__ */ e.jsx(A, { value: "headers", children: /* @__PURE__ */ e.jsx(qa, { control: p, headers: r }) }),
|
|
1678
|
-
/* @__PURE__ */ e.jsxs(A, { value: "parameters", children: [
|
|
1679
|
-
l.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1680
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
|
|
1681
|
-
/* @__PURE__ */ e.jsx(Da, { control: p })
|
|
1682
|
-
] }),
|
|
1683
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1684
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
|
|
1685
|
-
/* @__PURE__ */ e.jsx(Va, { control: p, queryParams: i })
|
|
1686
|
-
] })
|
|
1687
|
-
] }),
|
|
1688
|
-
/* @__PURE__ */ e.jsxs(A, { value: "body", children: [
|
|
1689
|
-
!["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1690
|
-
n.toUpperCase()
|
|
1691
|
-
) && /* @__PURE__ */ e.jsxs(ue, { className: "mb-2", children: [
|
|
1692
|
-
/* @__PURE__ */ e.jsx(Le, { className: "w-4 h-4" }),
|
|
1693
|
-
/* @__PURE__ */ e.jsx(pe, { children: "Body" }),
|
|
1694
|
-
/* @__PURE__ */ e.jsx(he, { children: "Body is only supported for POST, PUT, PATCH, and DELETE requests" })
|
|
1695
|
-
] }),
|
|
1550
|
+
onSubmit: T((i) => Ee.mutateAsync(i)),
|
|
1551
|
+
ref: Ae,
|
|
1552
|
+
className: "relative",
|
|
1553
|
+
children: [
|
|
1554
|
+
De && /* @__PURE__ */ e.jsx("div", { className: "absolute top-1/2 right-1/2 -translate-y-1/2 translate-x-1/2 z-50 max-w-md", children: /* @__PURE__ */ e.jsxs(K, { children: [
|
|
1555
|
+
/* @__PURE__ */ e.jsx(X, { className: "mb-2", children: "Welcome to the Playground!" }),
|
|
1556
|
+
/* @__PURE__ */ e.jsxs(Y, { className: "flex flex-col gap-2", children: [
|
|
1557
|
+
/* @__PURE__ */ e.jsx("div", { className: "mb-2", children: "The Playground is a tool for developers to test and explore our APIs. To use the Playground, you need to login." }),
|
|
1558
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 justify-between", children: [
|
|
1696
1559
|
/* @__PURE__ */ e.jsx(
|
|
1697
|
-
|
|
1560
|
+
q,
|
|
1698
1561
|
{
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
n.toUpperCase()
|
|
1704
|
-
) && "h-20"
|
|
1705
|
-
),
|
|
1706
|
-
placeholder: ["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1707
|
-
n.toUpperCase()
|
|
1708
|
-
) ? void 0 : "This request does not support a body",
|
|
1709
|
-
disabled: !["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1710
|
-
n.toUpperCase()
|
|
1711
|
-
)
|
|
1562
|
+
type: "button",
|
|
1563
|
+
variant: "ghost",
|
|
1564
|
+
onClick: () => b(!0),
|
|
1565
|
+
children: "Skip"
|
|
1712
1566
|
}
|
|
1713
1567
|
),
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
/* @__PURE__ */ e.jsx(
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1568
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
1569
|
+
N && /* @__PURE__ */ e.jsx(
|
|
1570
|
+
q,
|
|
1571
|
+
{
|
|
1572
|
+
type: "button",
|
|
1573
|
+
variant: "outline",
|
|
1574
|
+
onClick: N,
|
|
1575
|
+
children: "Sign Up"
|
|
1576
|
+
}
|
|
1577
|
+
),
|
|
1578
|
+
g && /* @__PURE__ */ e.jsx(q, { type: "button", variant: "default", onClick: g, children: "Login" })
|
|
1579
|
+
] })
|
|
1580
|
+
] })
|
|
1581
|
+
] })
|
|
1582
|
+
] }) }),
|
|
1583
|
+
/* @__PURE__ */ e.jsxs(
|
|
1584
|
+
"div",
|
|
1585
|
+
{
|
|
1586
|
+
className: m(
|
|
1587
|
+
"grid grid-cols-2 text-sm h-full",
|
|
1588
|
+
De && "opacity-30 pointer-events-none"
|
|
1589
|
+
),
|
|
1590
|
+
children: [
|
|
1591
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 p-4 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:left-auto", children: [
|
|
1592
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-stretch", children: [
|
|
1593
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
|
|
1594
|
+
/* @__PURE__ */ e.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: n.toUpperCase() }),
|
|
1595
|
+
/* @__PURE__ */ e.jsxs("div", { className: "items-center px-2 py-0.5 font-mono text-xs break-all leading-6", children: [
|
|
1596
|
+
gt,
|
|
1597
|
+
xt,
|
|
1598
|
+
qe.length > 0 ? "?" : "",
|
|
1599
|
+
qe
|
|
1600
|
+
] })
|
|
1601
|
+
] }),
|
|
1602
|
+
/* @__PURE__ */ e.jsx(
|
|
1603
|
+
Ka,
|
|
1604
|
+
{
|
|
1605
|
+
identities: A.data ?? [],
|
|
1606
|
+
formRef: Ae,
|
|
1607
|
+
disabled: B.formState.isSubmitting
|
|
1608
|
+
}
|
|
1609
|
+
)
|
|
1610
|
+
] }),
|
|
1611
|
+
/* @__PURE__ */ e.jsxs(nt, { defaultValue: "parameters", children: [
|
|
1612
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1 justify-between", children: /* @__PURE__ */ e.jsxs(rt, { children: [
|
|
1613
|
+
/* @__PURE__ */ e.jsxs(D, { value: "parameters", children: [
|
|
1614
|
+
"Parameters",
|
|
1615
|
+
(S.pathParams.some((i) => i.value !== "") || S.queryParams.some((i) => i.active)) && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1616
|
+
] }),
|
|
1617
|
+
/* @__PURE__ */ e.jsxs(D, { value: "headers", children: [
|
|
1618
|
+
"Headers",
|
|
1619
|
+
S.headers.filter((i) => i.active).length > 0 && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1620
|
+
] }),
|
|
1621
|
+
/* @__PURE__ */ e.jsxs(D, { value: "auth", children: [
|
|
1622
|
+
"Auth",
|
|
1623
|
+
S.identity !== G && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1624
|
+
] }),
|
|
1625
|
+
/* @__PURE__ */ e.jsx(D, { value: "body", children: "Body" })
|
|
1626
|
+
] }) }),
|
|
1627
|
+
/* @__PURE__ */ e.jsx(L, { value: "headers", children: /* @__PURE__ */ e.jsx(qa, { control: C, headers: r }) }),
|
|
1628
|
+
/* @__PURE__ */ e.jsxs(L, { value: "parameters", children: [
|
|
1629
|
+
l.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1630
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
|
|
1631
|
+
/* @__PURE__ */ e.jsx(Da, { url: s, control: C })
|
|
1632
|
+
] }),
|
|
1633
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1634
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
|
|
1635
|
+
/* @__PURE__ */ e.jsx(Va, { control: C, queryParams: o })
|
|
1636
|
+
] })
|
|
1637
|
+
] }),
|
|
1638
|
+
/* @__PURE__ */ e.jsxs(L, { value: "body", children: [
|
|
1639
|
+
!["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1640
|
+
n.toUpperCase()
|
|
1641
|
+
) && /* @__PURE__ */ e.jsxs(K, { className: "mb-2", children: [
|
|
1642
|
+
/* @__PURE__ */ e.jsx(Be, { className: "w-4 h-4" }),
|
|
1643
|
+
/* @__PURE__ */ e.jsx(X, { children: "Body" }),
|
|
1644
|
+
/* @__PURE__ */ e.jsx(Y, { children: "Body is only supported for POST, PUT, PATCH, and DELETE requests" })
|
|
1645
|
+
] }),
|
|
1646
|
+
/* @__PURE__ */ e.jsx(
|
|
1647
|
+
it,
|
|
1739
1648
|
{
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1649
|
+
...v("body"),
|
|
1650
|
+
className: m(
|
|
1651
|
+
"border w-full rounded-lg p-2 bg-muted h-40 font-mono",
|
|
1652
|
+
!["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1653
|
+
n.toUpperCase()
|
|
1654
|
+
) && "h-20"
|
|
1655
|
+
),
|
|
1656
|
+
placeholder: ["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1657
|
+
n.toUpperCase()
|
|
1658
|
+
) ? void 0 : "This request does not support a body",
|
|
1659
|
+
disabled: !["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1660
|
+
n.toUpperCase()
|
|
1661
|
+
)
|
|
1746
1662
|
}
|
|
1747
1663
|
),
|
|
1748
|
-
|
|
1749
|
-
|
|
1664
|
+
d && /* @__PURE__ */ e.jsx(
|
|
1665
|
+
Ta,
|
|
1750
1666
|
{
|
|
1751
|
-
|
|
1667
|
+
examples: d,
|
|
1668
|
+
onSelect: (i) => k("body", JSON.stringify(i.value, null, 2))
|
|
1669
|
+
}
|
|
1670
|
+
)
|
|
1671
|
+
] }),
|
|
1672
|
+
/* @__PURE__ */ e.jsx(L, { value: "auth", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1673
|
+
((Le = A.data) == null ? void 0 : Le.length) === 0 && /* @__PURE__ */ e.jsxs(K, { children: [
|
|
1674
|
+
/* @__PURE__ */ e.jsx(Be, { className: "w-4 h-4" }),
|
|
1675
|
+
/* @__PURE__ */ e.jsx(X, { children: "Authentication" }),
|
|
1676
|
+
/* @__PURE__ */ e.jsx(Y, { children: "No identities found. Please create an identity first." })
|
|
1677
|
+
] }),
|
|
1678
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ e.jsx(be, { className: "w-full overflow-hidden", children: /* @__PURE__ */ e.jsxs(
|
|
1679
|
+
Ce,
|
|
1680
|
+
{
|
|
1681
|
+
onValueChange: (i) => k("identity", i),
|
|
1682
|
+
value: S.identity,
|
|
1683
|
+
defaultValue: S.identity,
|
|
1684
|
+
className: "gap-0",
|
|
1685
|
+
disabled: ((Ve = A.data) == null ? void 0 : Ve.length) === 0,
|
|
1752
1686
|
children: [
|
|
1753
|
-
/* @__PURE__ */ e.
|
|
1754
|
-
|
|
1687
|
+
/* @__PURE__ */ e.jsxs(
|
|
1688
|
+
M,
|
|
1755
1689
|
{
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
children:
|
|
1690
|
+
className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
|
|
1691
|
+
htmlFor: "none",
|
|
1692
|
+
children: [
|
|
1693
|
+
/* @__PURE__ */ e.jsx(se, { value: G, id: "none", children: "None" }),
|
|
1694
|
+
/* @__PURE__ */ e.jsx(M, { htmlFor: "none", className: "ml-2", children: "None" })
|
|
1695
|
+
]
|
|
1759
1696
|
}
|
|
1760
1697
|
),
|
|
1761
|
-
|
|
1698
|
+
(Fe = A.data) == null ? void 0 : Fe.map((i) => /* @__PURE__ */ e.jsxs(
|
|
1699
|
+
M,
|
|
1700
|
+
{
|
|
1701
|
+
className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
|
|
1702
|
+
children: [
|
|
1703
|
+
/* @__PURE__ */ e.jsx(
|
|
1704
|
+
se,
|
|
1705
|
+
{
|
|
1706
|
+
value: i.id,
|
|
1707
|
+
id: i.id,
|
|
1708
|
+
children: i.label
|
|
1709
|
+
}
|
|
1710
|
+
),
|
|
1711
|
+
/* @__PURE__ */ e.jsx(M, { htmlFor: i.id, className: "ml-2", children: i.label })
|
|
1712
|
+
]
|
|
1713
|
+
},
|
|
1714
|
+
i.id
|
|
1715
|
+
))
|
|
1762
1716
|
]
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1717
|
+
}
|
|
1718
|
+
) }) })
|
|
1719
|
+
] }) })
|
|
1720
|
+
] })
|
|
1721
|
+
] }),
|
|
1722
|
+
/* @__PURE__ */ e.jsx(
|
|
1723
|
+
Za,
|
|
1724
|
+
{
|
|
1725
|
+
queryMutation: Ee,
|
|
1726
|
+
showPathParamsWarning: S.pathParams.some(
|
|
1727
|
+
(i) => i.value === ""
|
|
1728
|
+
)
|
|
1767
1729
|
}
|
|
1768
|
-
)
|
|
1769
|
-
]
|
|
1770
|
-
] })
|
|
1771
|
-
] }),
|
|
1772
|
-
/* @__PURE__ */ e.jsx(
|
|
1773
|
-
Wa,
|
|
1774
|
-
{
|
|
1775
|
-
queryMutation: _,
|
|
1776
|
-
showPathParamsWarning: N.pathParams.some(
|
|
1777
|
-
(o) => o.value === ""
|
|
1778
|
-
)
|
|
1730
|
+
)
|
|
1731
|
+
]
|
|
1779
1732
|
}
|
|
1780
1733
|
)
|
|
1781
|
-
]
|
|
1734
|
+
]
|
|
1782
1735
|
}
|
|
1783
1736
|
)
|
|
1784
1737
|
}
|
|
@@ -1805,9 +1758,9 @@ const Ua = {
|
|
|
1805
1758
|
)
|
|
1806
1759
|
}
|
|
1807
1760
|
), es = (t) => {
|
|
1808
|
-
const [a, s] =
|
|
1809
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1810
|
-
/* @__PURE__ */ e.jsx(
|
|
1761
|
+
const [a, s] = F(!1);
|
|
1762
|
+
return /* @__PURE__ */ e.jsxs(Vt, { onOpenChange: (n) => s(n), children: [
|
|
1763
|
+
/* @__PURE__ */ e.jsx(Ft, { asChild: !0, children: t.children ?? /* @__PURE__ */ e.jsxs(
|
|
1811
1764
|
"button",
|
|
1812
1765
|
{
|
|
1813
1766
|
type: "button",
|
|
@@ -1819,12 +1772,12 @@ const Ua = {
|
|
|
1819
1772
|
}
|
|
1820
1773
|
) }),
|
|
1821
1774
|
/* @__PURE__ */ e.jsxs(
|
|
1822
|
-
|
|
1775
|
+
zt,
|
|
1823
1776
|
{
|
|
1824
1777
|
className: "max-w-screen-xl w-full h-5/6 overflow-hidden p-0",
|
|
1825
1778
|
"aria-describedby": void 0,
|
|
1826
1779
|
children: [
|
|
1827
|
-
/* @__PURE__ */ e.jsx(
|
|
1780
|
+
/* @__PURE__ */ e.jsx(qt, { children: /* @__PURE__ */ e.jsx(Ht, { children: "Playground" }) }),
|
|
1828
1781
|
a && /* @__PURE__ */ e.jsx(Xa, { ...t })
|
|
1829
1782
|
]
|
|
1830
1783
|
}
|
|
@@ -1838,7 +1791,7 @@ const Ua = {
|
|
|
1838
1791
|
patch: "purple",
|
|
1839
1792
|
options: "gray",
|
|
1840
1793
|
head: "gray"
|
|
1841
|
-
},
|
|
1794
|
+
}, Ke = ({
|
|
1842
1795
|
label: t,
|
|
1843
1796
|
path: a,
|
|
1844
1797
|
operations: s,
|
|
@@ -1854,22 +1807,22 @@ const Ua = {
|
|
|
1854
1807
|
},
|
|
1855
1808
|
collapsible: n,
|
|
1856
1809
|
collapsed: r,
|
|
1857
|
-
items: s.map((
|
|
1810
|
+
items: s.map((o) => ({
|
|
1858
1811
|
type: "link",
|
|
1859
|
-
label:
|
|
1860
|
-
href: `${a}#${
|
|
1861
|
-
...
|
|
1812
|
+
label: o.summary ?? o.path,
|
|
1813
|
+
href: `${a}#${o.slug}`,
|
|
1814
|
+
...o.method && {
|
|
1862
1815
|
badge: {
|
|
1863
|
-
label:
|
|
1864
|
-
color: ts[
|
|
1816
|
+
label: o.method,
|
|
1817
|
+
color: ts[o.method.toLowerCase()],
|
|
1865
1818
|
invert: !0
|
|
1866
1819
|
}
|
|
1867
1820
|
}
|
|
1868
1821
|
}))
|
|
1869
|
-
}),
|
|
1822
|
+
}), Xe = (t) => ({
|
|
1870
1823
|
path: t.routePath,
|
|
1871
1824
|
async lazy() {
|
|
1872
|
-
const { OasProvider: a } = await import("./OasProvider-
|
|
1825
|
+
const { OasProvider: a } = await import("./OasProvider-HcqBeC4H.js");
|
|
1873
1826
|
return {
|
|
1874
1827
|
element: /* @__PURE__ */ e.jsx(
|
|
1875
1828
|
a,
|
|
@@ -1883,38 +1836,38 @@ const Ua = {
|
|
|
1883
1836
|
};
|
|
1884
1837
|
},
|
|
1885
1838
|
children: t.routes
|
|
1886
|
-
}),
|
|
1839
|
+
}), ge = ({
|
|
1887
1840
|
path: t,
|
|
1888
1841
|
tag: a,
|
|
1889
1842
|
untagged: s
|
|
1890
1843
|
}) => ({
|
|
1891
1844
|
path: t,
|
|
1892
1845
|
async lazy() {
|
|
1893
|
-
const { OperationList: n } = await import("./OperationList-
|
|
1846
|
+
const { OperationList: n } = await import("./OperationList-C3wnbFxp.js");
|
|
1894
1847
|
return { element: /* @__PURE__ */ e.jsx(n, { tag: a, untagged: s }) };
|
|
1895
1848
|
}
|
|
1896
1849
|
}), as = (t, a) => {
|
|
1897
|
-
const s =
|
|
1850
|
+
const s = E(
|
|
1898
1851
|
t,
|
|
1899
|
-
a[0] ?
|
|
1852
|
+
a[0] ? ee(a[0]) : J
|
|
1900
1853
|
);
|
|
1901
1854
|
return [
|
|
1902
1855
|
// Redirect to first tag on the index route
|
|
1903
|
-
{ index: !0, loader: () =>
|
|
1856
|
+
{ index: !0, loader: () => Ot(s) },
|
|
1904
1857
|
// Create routes for each tag
|
|
1905
1858
|
...a.map(
|
|
1906
|
-
(n) =>
|
|
1907
|
-
path:
|
|
1859
|
+
(n) => ge({
|
|
1860
|
+
path: E(t, ee(n)),
|
|
1908
1861
|
tag: n
|
|
1909
1862
|
})
|
|
1910
1863
|
),
|
|
1911
1864
|
// Category without tagged operations
|
|
1912
|
-
|
|
1913
|
-
path:
|
|
1865
|
+
ge({
|
|
1866
|
+
path: E(t, J),
|
|
1914
1867
|
untagged: !0
|
|
1915
1868
|
})
|
|
1916
1869
|
];
|
|
1917
|
-
},
|
|
1870
|
+
}, ht = (t) => t.type === "file" ? Object.keys(t.input) : [], ss = ({
|
|
1918
1871
|
basePath: t,
|
|
1919
1872
|
config: a,
|
|
1920
1873
|
client: s
|
|
@@ -1922,18 +1875,18 @@ const Ua = {
|
|
|
1922
1875
|
const n = a.tagPages;
|
|
1923
1876
|
if (!n)
|
|
1924
1877
|
return [
|
|
1925
|
-
|
|
1878
|
+
Xe({
|
|
1926
1879
|
basePath: t,
|
|
1927
1880
|
routePath: t,
|
|
1928
|
-
routes: [
|
|
1881
|
+
routes: [ge({ path: t + "/:tag?" })],
|
|
1929
1882
|
client: s,
|
|
1930
1883
|
config: a
|
|
1931
1884
|
})
|
|
1932
1885
|
];
|
|
1933
|
-
const r =
|
|
1886
|
+
const r = ht(a);
|
|
1934
1887
|
return (r.length > 1 ? [void 0, ...r] : [void 0]).map((l) => {
|
|
1935
|
-
const c =
|
|
1936
|
-
return
|
|
1888
|
+
const c = E(t, l);
|
|
1889
|
+
return Xe({
|
|
1937
1890
|
basePath: t,
|
|
1938
1891
|
version: l,
|
|
1939
1892
|
routePath: c,
|
|
@@ -1942,7 +1895,7 @@ const Ua = {
|
|
|
1942
1895
|
config: a
|
|
1943
1896
|
});
|
|
1944
1897
|
});
|
|
1945
|
-
}, ns =
|
|
1898
|
+
}, ns = ot(`
|
|
1946
1899
|
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
1947
1900
|
schema(input: $input, type: $type) {
|
|
1948
1901
|
url
|
|
@@ -1951,7 +1904,7 @@ const Ua = {
|
|
|
1951
1904
|
}
|
|
1952
1905
|
}
|
|
1953
1906
|
}
|
|
1954
|
-
`), rs =
|
|
1907
|
+
`), rs = ot(`
|
|
1955
1908
|
query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {
|
|
1956
1909
|
schema(input: $input, type: $type) {
|
|
1957
1910
|
operations(tag: $tag) {
|
|
@@ -1975,8 +1928,8 @@ const Ua = {
|
|
|
1975
1928
|
}
|
|
1976
1929
|
}
|
|
1977
1930
|
}
|
|
1978
|
-
`),
|
|
1979
|
-
const a =
|
|
1931
|
+
`), J = "~endpoints", qs = (t) => {
|
|
1932
|
+
const a = E(t.navigationId ?? "/reference"), s = new ia(t);
|
|
1980
1933
|
return {
|
|
1981
1934
|
getHead: () => {
|
|
1982
1935
|
if (t.type === "url" && !t.skipPreload)
|
|
@@ -1996,7 +1949,7 @@ const Ua = {
|
|
|
1996
1949
|
OpenPlaygroundButton: ({
|
|
1997
1950
|
requireAuth: n,
|
|
1998
1951
|
server: r,
|
|
1999
|
-
method:
|
|
1952
|
+
method: o,
|
|
2000
1953
|
url: l,
|
|
2001
1954
|
children: c,
|
|
2002
1955
|
...d
|
|
@@ -2005,7 +1958,7 @@ const Ua = {
|
|
|
2005
1958
|
if (!r)
|
|
2006
1959
|
throw new Error("Server is required");
|
|
2007
1960
|
return n && !u.isAuthenticated ? /* @__PURE__ */ e.jsxs(
|
|
2008
|
-
|
|
1961
|
+
te,
|
|
2009
1962
|
{
|
|
2010
1963
|
className: "gap-2 items-center",
|
|
2011
1964
|
variant: "outline",
|
|
@@ -2019,63 +1972,63 @@ const Ua = {
|
|
|
2019
1972
|
es,
|
|
2020
1973
|
{
|
|
2021
1974
|
url: l ?? "/",
|
|
2022
|
-
method:
|
|
1975
|
+
method: o ?? "get",
|
|
2023
1976
|
server: r,
|
|
2024
1977
|
...d,
|
|
2025
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1978
|
+
children: /* @__PURE__ */ e.jsx(te, { className: "gap-2 items-center", variant: "outline", children: c ?? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2026
1979
|
"Open in Playground ",
|
|
2027
|
-
/* @__PURE__ */ e.jsx(
|
|
1980
|
+
/* @__PURE__ */ e.jsx(kt, { size: 16 })
|
|
2028
1981
|
] }) })
|
|
2029
1982
|
}
|
|
2030
1983
|
);
|
|
2031
1984
|
}
|
|
2032
1985
|
}),
|
|
2033
1986
|
getSidebar: async (n) => {
|
|
2034
|
-
var
|
|
2035
|
-
if (!
|
|
1987
|
+
var o;
|
|
1988
|
+
if (!Ue({ path: a, end: !1 }, n))
|
|
2036
1989
|
return [];
|
|
2037
|
-
const r =
|
|
1990
|
+
const r = Ue(
|
|
2038
1991
|
{ path: `${a}/:version?/:tag`, end: !0 },
|
|
2039
1992
|
n
|
|
2040
1993
|
);
|
|
2041
1994
|
try {
|
|
2042
|
-
const l = r == null ? void 0 : r.params.version, c = l ??
|
|
2043
|
-
(
|
|
2044
|
-
), [
|
|
1995
|
+
const l = r == null ? void 0 : r.params.version, c = l ?? ht(t).at(0), d = t.type, u = t.type === "file" ? t.input[c] : t.input, g = t.loadTags === !0 || t.type === "url", N = !t.loadTags && t.type !== "url", y = (o = t.tagPages) == null ? void 0 : o.find(
|
|
1996
|
+
(b) => ee(b) === (r == null ? void 0 : r.params.tag)
|
|
1997
|
+
), [h, x] = await Promise.all([
|
|
2045
1998
|
s.fetch(ns, { type: d, input: u }),
|
|
2046
1999
|
s.fetch(rs, {
|
|
2047
2000
|
type: d,
|
|
2048
2001
|
input: u,
|
|
2049
|
-
tag: t.loadTags ? void 0 :
|
|
2002
|
+
tag: t.loadTags ? void 0 : y
|
|
2050
2003
|
})
|
|
2051
|
-
]),
|
|
2052
|
-
const
|
|
2004
|
+
]), p = h.schema.tags.flatMap((b) => {
|
|
2005
|
+
const v = E(
|
|
2053
2006
|
a,
|
|
2054
2007
|
l,
|
|
2055
|
-
|
|
2056
|
-
),
|
|
2057
|
-
(
|
|
2058
|
-
var
|
|
2059
|
-
return ((
|
|
2008
|
+
ee(b.name)
|
|
2009
|
+
), C = x.schema.operations.filter(
|
|
2010
|
+
(T) => {
|
|
2011
|
+
var H, k;
|
|
2012
|
+
return ((H = T.tags) == null ? void 0 : H.length) !== 0 && ((k = T.tags) == null ? void 0 : k.map((B) => B.name).includes(b.name));
|
|
2060
2013
|
}
|
|
2061
2014
|
);
|
|
2062
|
-
return t.loadTags &&
|
|
2063
|
-
label:
|
|
2064
|
-
path:
|
|
2065
|
-
operations: (r == null ? void 0 : r.params.tag) !==
|
|
2015
|
+
return t.loadTags && C.length === 0 ? [] : Ke({
|
|
2016
|
+
label: b.name,
|
|
2017
|
+
path: v,
|
|
2018
|
+
operations: (r == null ? void 0 : r.params.tag) !== J || t.loadTags ? C : [],
|
|
2066
2019
|
collapsible: g,
|
|
2067
|
-
collapsed:
|
|
2020
|
+
collapsed: N
|
|
2068
2021
|
});
|
|
2069
2022
|
});
|
|
2070
|
-
return
|
|
2071
|
-
|
|
2023
|
+
return x.schema.untagged.length > 0 && p.push(
|
|
2024
|
+
Ke({
|
|
2072
2025
|
label: "Other endpoints",
|
|
2073
|
-
path:
|
|
2074
|
-
operations: (r == null ? void 0 : r.params.tag) ===
|
|
2026
|
+
path: E(a, l, J),
|
|
2027
|
+
operations: (r == null ? void 0 : r.params.tag) === J || t.loadTags ? x.schema.untagged : [],
|
|
2075
2028
|
collapsible: g,
|
|
2076
|
-
collapsed:
|
|
2029
|
+
collapsed: N
|
|
2077
2030
|
})
|
|
2078
|
-
),
|
|
2031
|
+
), p;
|
|
2079
2032
|
} catch {
|
|
2080
2033
|
return [];
|
|
2081
2034
|
}
|
|
@@ -2084,16 +2037,16 @@ const Ua = {
|
|
|
2084
2037
|
};
|
|
2085
2038
|
};
|
|
2086
2039
|
export {
|
|
2087
|
-
|
|
2040
|
+
lt as C,
|
|
2088
2041
|
es as P,
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2042
|
+
J as U,
|
|
2043
|
+
ot as a,
|
|
2044
|
+
_e as b,
|
|
2045
|
+
Ze as c,
|
|
2046
|
+
We as d,
|
|
2047
|
+
ga as e,
|
|
2048
|
+
ht as g,
|
|
2096
2049
|
za as m,
|
|
2097
|
-
|
|
2050
|
+
qs as o
|
|
2098
2051
|
};
|
|
2099
|
-
//# sourceMappingURL=index-
|
|
2052
|
+
//# sourceMappingURL=index-CtkRMvMw.js.map
|