zudoku 0.43.0 → 0.43.2
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 +193 -0
- package/dist/config/validators/common.js +2 -0
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +70 -0
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +2 -2
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Main.js +3 -2
- package/dist/lib/components/Main.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +1 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/Pagination.js +2 -2
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/Search.js +1 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +1 -1
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/navigation/PoweredByZudoku.js +1 -1
- package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.js +1 -1
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +9 -5
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +2 -3
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/Toc.js +2 -2
- package/dist/lib/components/navigation/Toc.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +2 -1
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/oas/parser/upgrade/index.d.ts +1 -0
- package/dist/lib/oas/parser/upgrade/index.js +76 -24
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +4 -2
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +10 -4
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +3 -4
- package/dist/lib/plugins/openapi/index.js +6 -4
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +4 -3
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +2 -2
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/SubmitButton.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +2 -2
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js +33 -3
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/ui/SyntaxHighlight.js +1 -1
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/traverse.d.ts +1 -1
- package/dist/lib/util/traverse.js +6 -5
- package/dist/lib/util/traverse.js.map +1 -1
- package/dist/vite/build.js +1 -0
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/dev-server.js +5 -2
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/html.d.ts +6 -2
- package/dist/vite/html.js +11 -8
- package/dist/vite/html.js.map +1 -1
- package/dist/vite/plugin-api.js +2 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/lib/{AuthenticationPlugin-ByDF051g.js → AuthenticationPlugin-BxoEZCSJ.js} +4 -4
- package/lib/{AuthenticationPlugin-ByDF051g.js.map → AuthenticationPlugin-BxoEZCSJ.js.map} +1 -1
- package/lib/{Markdown-mFpg_n9p.js → Markdown-DvdVn1O7.js} +1839 -1836
- package/lib/Markdown-DvdVn1O7.js.map +1 -0
- package/lib/{MdxPage-Cm7atiW3.js → MdxPage-DUcuusMU.js} +7 -7
- package/lib/{MdxPage-Cm7atiW3.js.map → MdxPage-DUcuusMU.js.map} +1 -1
- package/lib/{OasProvider-DOs0v9u7.js → OasProvider-CjMm8pB7.js} +8 -9
- package/lib/{OasProvider-DOs0v9u7.js.map → OasProvider-CjMm8pB7.js.map} +1 -1
- package/lib/{OperationList-CKac6iap.js → OperationList-BhJcPgGi.js} +1269 -1261
- package/lib/{OperationList-CKac6iap.js.map → OperationList-BhJcPgGi.js.map} +1 -1
- package/lib/Pagination-BgQxwq5j.js +48 -0
- package/lib/Pagination-BgQxwq5j.js.map +1 -0
- package/lib/{RouteGuard-DRtEu9nh.js → RouteGuard-D2gX29iI.js} +3 -3
- package/lib/{RouteGuard-DRtEu9nh.js.map → RouteGuard-D2gX29iI.js.map} +1 -1
- package/lib/{SchemaList-BTX2mRMW.js → SchemaList-BexhT_Z0.js} +22 -23
- package/lib/{SchemaList-BTX2mRMW.js.map → SchemaList-BexhT_Z0.js.map} +1 -1
- package/lib/{SchemaView-BYRn_-2l.js → SchemaView-Dt_-u8rW.js} +123 -146
- package/lib/SchemaView-Dt_-u8rW.js.map +1 -0
- package/lib/{Select-CT64Ou40.js → Select-CYaEBIYK.js} +3 -3
- package/lib/{Select-CT64Ou40.js.map → Select-CYaEBIYK.js.map} +1 -1
- package/lib/{SlotletProvider-CS_nO-XT.js → SlotletProvider-wWbHYqWf.js} +7 -7
- package/lib/SlotletProvider-wWbHYqWf.js.map +1 -0
- package/lib/{SyntaxHighlight-CxhyyMkF.js → SyntaxHighlight-o7q0acut.js} +81 -81
- package/lib/{SyntaxHighlight-CxhyyMkF.js.map → SyntaxHighlight-o7q0acut.js.map} +1 -1
- package/lib/{Toc-D_tV8_Ri.js → Toc-BnN4zBb3.js} +17 -17
- package/lib/Toc-BnN4zBb3.js.map +1 -0
- package/lib/{chunk-BAXFHI7N-BVBOl9s0.js → chunk-BAXFHI7N-BLTsN6tl.js} +679 -659
- package/lib/{chunk-BAXFHI7N-BVBOl9s0.js.map → chunk-BAXFHI7N-BLTsN6tl.js.map} +1 -1
- package/lib/{circular-ByJI6Mci.js → circular-BWEIet3w.js} +4616 -5567
- package/lib/circular-BWEIet3w.js.map +1 -0
- package/lib/{createServer-IW7v5hWm.js → createServer-BQD3Eeqb.js} +1998 -1970
- package/lib/createServer-BQD3Eeqb.js.map +1 -0
- package/lib/{hook-CldJlP5c.js → hook-8GM2HXNM.js} +24 -24
- package/lib/{hook-CldJlP5c.js.map → hook-8GM2HXNM.js.map} +1 -1
- package/lib/index-CFf9AN-y.js +3208 -0
- package/lib/index-CFf9AN-y.js.map +1 -0
- package/lib/{index-DnQftvP4.js → index-DGNSSXgR.js} +77 -69
- package/lib/{index-DnQftvP4.js.map → index-DGNSSXgR.js.map} +1 -1
- package/lib/{mutation-DBQh7AOZ.js → mutation-Bq5bn7Hf.js} +2 -2
- package/lib/{mutation-DBQh7AOZ.js.map → mutation-Bq5bn7Hf.js.map} +1 -1
- package/lib/processors/traverse.js +9 -7
- package/lib/processors/traverse.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +1 -1
- package/lib/{useExposedProps-DbIZXspi.js → useExposedProps-DmTJxEXG.js} +2 -2
- package/lib/{useExposedProps-DbIZXspi.js.map → useExposedProps-DmTJxEXG.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +3 -3
- package/lib/zudoku.components.js +6 -6
- package/lib/zudoku.hooks.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +5 -5
- package/lib/zudoku.plugin-api-keys.js +4 -4
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +6 -5
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +3 -3
- package/package.json +3 -3
- package/src/app/demo.html +1 -1
- package/src/app/main.css +2 -2
- package/src/lib/components/Banner.tsx +1 -1
- package/src/lib/components/Heading.tsx +3 -3
- package/src/lib/components/Layout.tsx +1 -4
- package/src/lib/components/Main.tsx +4 -3
- package/src/lib/components/MobileTopNavigation.tsx +2 -2
- package/src/lib/components/Pagination.tsx +3 -3
- package/src/lib/components/Search.tsx +1 -1
- package/src/lib/components/TopNavigation.tsx +1 -1
- package/src/lib/components/navigation/PoweredByZudoku.tsx +6 -1
- package/src/lib/components/navigation/Sidebar.tsx +1 -1
- package/src/lib/components/navigation/SidebarCategory.tsx +9 -5
- package/src/lib/components/navigation/SidebarItem.tsx +2 -3
- package/src/lib/components/navigation/Toc.tsx +4 -4
- package/src/lib/core/ZudokuContext.ts +2 -1
- package/src/lib/oas/parser/upgrade/index.ts +97 -27
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +1 -1
- package/src/lib/plugins/openapi/OperationListItem.tsx +15 -6
- package/src/lib/plugins/openapi/SchemaList.tsx +1 -1
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +23 -4
- package/src/lib/plugins/openapi/index.tsx +8 -7
- package/src/lib/plugins/openapi/interfaces.ts +4 -3
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +2 -2
- package/src/lib/plugins/openapi/playground/Playground.tsx +5 -5
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +2 -2
- package/src/lib/plugins/openapi/playground/SubmitButton.tsx +2 -2
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +2 -2
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +1 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +1 -1
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +2 -2
- package/src/lib/plugins/openapi/util/getRoutes.tsx +67 -3
- package/src/lib/ui/SyntaxHighlight.tsx +2 -2
- package/src/lib/util/traverse.ts +8 -5
- package/lib/Markdown-mFpg_n9p.js.map +0 -1
- package/lib/Pagination-DLPL5z77.js +0 -48
- package/lib/Pagination-DLPL5z77.js.map +0 -1
- package/lib/SchemaView-BYRn_-2l.js.map +0 -1
- package/lib/SlotletProvider-CS_nO-XT.js.map +0 -1
- package/lib/Toc-D_tV8_Ri.js.map +0 -1
- package/lib/circular-ByJI6Mci.js.map +0 -1
- package/lib/context-Lrf2Y9bR.js +0 -22
- package/lib/context-Lrf2Y9bR.js.map +0 -1
- package/lib/createServer-IW7v5hWm.js.map +0 -1
- package/lib/index-DuB48L78.js +0 -2184
- package/lib/index-DuB48L78.js.map +0 -1
|
@@ -0,0 +1,3208 @@
|
|
|
1
|
+
var yn = Object.defineProperty;
|
|
2
|
+
var ht = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
|
+
};
|
|
5
|
+
var vn = (e, t, s) => t in e ? yn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
6
|
+
var Y = (e, t, s) => vn(e, typeof t != "symbol" ? t + "" : t, s), bn = (e, t, s) => t.has(e) || ht("Cannot " + s);
|
|
7
|
+
var Ne = (e, t, s) => (bn(e, t, "read from private field"), s ? s.call(e) : t.get(e)), Ce = (e, t, s) => t.has(e) ? ht("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
8
|
+
import { j as n } from "./jsx-runtime-C5mzlN2N.js";
|
|
9
|
+
import { ChevronRightIcon as te, CheckIcon as jn, DotIcon as Nn, Check as Cn, XIcon as Sn, Circle as wn, ChevronDownIcon as Tn, InfoIcon as ft, LogInIcon as An, CirclePlayIcon as On } from "lucide-react";
|
|
10
|
+
import { r as $n, c as En, u as Pn, N as Ln, h as Rn, m as xt } from "./chunk-BAXFHI7N-BLTsN6tl.js";
|
|
11
|
+
import { J as Lt, K as Rt, L as In, m as kn, M as Dn, f as I, d as qn, l as Vn } from "./hook-8GM2HXNM.js";
|
|
12
|
+
import { Button as ne } from "./ui/Button.js";
|
|
13
|
+
import { Z as Fn } from "./invariant-Caa8-XvF.js";
|
|
14
|
+
import * as S from "react";
|
|
15
|
+
import { createContext as It, use as _n, Fragment as D, useRef as X, useEffect as le, useMemo as Bn, useState as L, useCallback as zn, useTransition as Mn, useContext as Gn } from "react";
|
|
16
|
+
import { VisuallyHidden as Un } from "@radix-ui/react-visually-hidden";
|
|
17
|
+
import { D as Be, a as ze, b as Me, d as kt, e as Dt, f as Hn } from "./Dialog-ByYz4ABw.js";
|
|
18
|
+
import { S as Pe, a as Le, b as Re, c as Ie, e as ee, u as Qn } from "./Select-CYaEBIYK.js";
|
|
19
|
+
import { b as Ge, u as Ue, C as q, a as Jn, F as Wn } from "./index.esm-D2ZUREQN.js";
|
|
20
|
+
import { c as qt } from "./index-CPNSgwSb.js";
|
|
21
|
+
import { c as b } from "./cn-qaFjX9_3.js";
|
|
22
|
+
import { Tabs as Vt, TabsList as Ft, TabsTrigger as H, TabsContent as Q } from "./ui/Tabs.js";
|
|
23
|
+
import { o as Xn } from "./objectEntries-yMIkr2mI.js";
|
|
24
|
+
import { u as Zn } from "./useLatest-hmRS46UF.js";
|
|
25
|
+
import { z as Yn } from "./index-DwT-v3zK.js";
|
|
26
|
+
import { B as V } from "./Button-BBNrKpQd.js";
|
|
27
|
+
import * as N from "@radix-ui/react-dropdown-menu";
|
|
28
|
+
import { C as he } from "./Card-BtheiD7j.js";
|
|
29
|
+
import * as ke from "@radix-ui/react-checkbox";
|
|
30
|
+
import * as ce from "@radix-ui/react-popover";
|
|
31
|
+
import { PopoverAnchor as Kn } from "@radix-ui/react-popover";
|
|
32
|
+
import { P as es } from "./index-CuBIgTKC.js";
|
|
33
|
+
import { g as ts, h as ns, C as ss, b as rs, f as as } from "./Callout-D3Ja4OPX.js";
|
|
34
|
+
import { Input as He } from "./ui/Input.js";
|
|
35
|
+
import { Slot as os } from "@radix-ui/react-slot";
|
|
36
|
+
import * as _t from "@radix-ui/react-label";
|
|
37
|
+
import * as se from "@radix-ui/react-radio-group";
|
|
38
|
+
import { S as is } from "./Spinner-mNLZ6awP.js";
|
|
39
|
+
import { Callout as ls } from "./ui/Callout.js";
|
|
40
|
+
import { Card as Bt, CardHeader as cs, CardTitle as ds, CardContent as us } from "./ui/Card.js";
|
|
41
|
+
import { Collapsible as gt, CollapsibleTrigger as yt, CollapsibleContent as vt } from "./ui/Collapsible.js";
|
|
42
|
+
import * as Qe from "@radix-ui/react-collapsible";
|
|
43
|
+
import { S as ms } from "./SyntaxHighlight-o7q0acut.js";
|
|
44
|
+
let Se;
|
|
45
|
+
const ps = (e) => {
|
|
46
|
+
var t;
|
|
47
|
+
if ((t = e.errors) != null && t[0])
|
|
48
|
+
throw new Fn(e.errors[0].message, {
|
|
49
|
+
developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
var me, pe;
|
|
53
|
+
class hs {
|
|
54
|
+
constructor(t) {
|
|
55
|
+
Ce(this, me, async () => (Se || (Se = import("./createServer-BQD3Eeqb.js").then(
|
|
56
|
+
(t) => t.createServer(this.config)
|
|
57
|
+
)), Se));
|
|
58
|
+
Ce(this, pe, async (t) => this.config.server ? fetch(this.config.server, t) : (await Ne(this, me).call(this)).fetch("http://localhost/graphql", t));
|
|
59
|
+
Y(this, "fetch", async (t, s) => {
|
|
60
|
+
var i;
|
|
61
|
+
const a = (i = t.match(/query (\w+)/)) == null ? void 0 : i[1], r = await Ne(this, pe).call(this, {
|
|
62
|
+
method: "POST",
|
|
63
|
+
body: JSON.stringify({ query: t, variables: s, operationName: a }),
|
|
64
|
+
headers: { "Content-Type": "application/json" }
|
|
65
|
+
});
|
|
66
|
+
if (!r.ok)
|
|
67
|
+
throw new Error("Network response was not ok");
|
|
68
|
+
const o = await r.json();
|
|
69
|
+
return ps(o), o.data;
|
|
70
|
+
});
|
|
71
|
+
this.config = t;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
me = new WeakMap(), pe = new WeakMap();
|
|
75
|
+
function we(e, t) {
|
|
76
|
+
if (!!!e)
|
|
77
|
+
throw new Error(t);
|
|
78
|
+
}
|
|
79
|
+
function fs(e) {
|
|
80
|
+
return typeof e == "object" && e !== null;
|
|
81
|
+
}
|
|
82
|
+
function xs(e, t) {
|
|
83
|
+
if (!!!e)
|
|
84
|
+
throw new Error(
|
|
85
|
+
t ?? "Unexpected invariant triggered."
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
const gs = /\r\n|[\n\r]/g;
|
|
89
|
+
function De(e, t) {
|
|
90
|
+
let s = 0, a = 1;
|
|
91
|
+
for (const r of e.body.matchAll(gs)) {
|
|
92
|
+
if (typeof r.index == "number" || xs(!1), r.index >= t)
|
|
93
|
+
break;
|
|
94
|
+
s = r.index + r[0].length, a += 1;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
line: a,
|
|
98
|
+
column: t + 1 - s
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function ys(e) {
|
|
102
|
+
return zt(
|
|
103
|
+
e.source,
|
|
104
|
+
De(e.source, e.start)
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
function zt(e, t) {
|
|
108
|
+
const s = e.locationOffset.column - 1, a = "".padStart(s) + e.body, r = t.line - 1, o = e.locationOffset.line - 1, i = t.line + o, c = t.line === 1 ? s : 0, l = t.column + c, u = `${e.name}:${i}:${l}
|
|
109
|
+
`, m = a.split(/\r\n|[\n\r]/g), y = m[r];
|
|
110
|
+
if (y.length > 120) {
|
|
111
|
+
const x = Math.floor(l / 80), g = l % 80, f = [];
|
|
112
|
+
for (let p = 0; p < y.length; p += 80)
|
|
113
|
+
f.push(y.slice(p, p + 80));
|
|
114
|
+
return u + bt([
|
|
115
|
+
[`${i} |`, f[0]],
|
|
116
|
+
...f.slice(1, x + 1).map((p) => ["|", p]),
|
|
117
|
+
["|", "^".padStart(g)],
|
|
118
|
+
["|", f[x + 1]]
|
|
119
|
+
]);
|
|
120
|
+
}
|
|
121
|
+
return u + bt([
|
|
122
|
+
// Lines specified like this: ["prefix", "string"],
|
|
123
|
+
[`${i - 1} |`, m[r - 1]],
|
|
124
|
+
[`${i} |`, y],
|
|
125
|
+
["|", "^".padStart(l)],
|
|
126
|
+
[`${i + 1} |`, m[r + 1]]
|
|
127
|
+
]);
|
|
128
|
+
}
|
|
129
|
+
function bt(e) {
|
|
130
|
+
const t = e.filter(([a, r]) => r !== void 0), s = Math.max(...t.map(([a]) => a.length));
|
|
131
|
+
return t.map(([a, r]) => a.padStart(s) + (r ? " " + r : "")).join(`
|
|
132
|
+
`);
|
|
133
|
+
}
|
|
134
|
+
function vs(e) {
|
|
135
|
+
const t = e[0];
|
|
136
|
+
return t == null || "kind" in t || "length" in t ? {
|
|
137
|
+
nodes: t,
|
|
138
|
+
source: e[1],
|
|
139
|
+
positions: e[2],
|
|
140
|
+
path: e[3],
|
|
141
|
+
originalError: e[4],
|
|
142
|
+
extensions: e[5]
|
|
143
|
+
} : t;
|
|
144
|
+
}
|
|
145
|
+
class Je extends Error {
|
|
146
|
+
/**
|
|
147
|
+
* An array of `{ line, column }` locations within the source GraphQL document
|
|
148
|
+
* which correspond to this error.
|
|
149
|
+
*
|
|
150
|
+
* Errors during validation often contain multiple locations, for example to
|
|
151
|
+
* point out two things with the same name. Errors during execution include a
|
|
152
|
+
* single location, the field which produced the error.
|
|
153
|
+
*
|
|
154
|
+
* Enumerable, and appears in the result of JSON.stringify().
|
|
155
|
+
*/
|
|
156
|
+
/**
|
|
157
|
+
* An array describing the JSON-path into the execution response which
|
|
158
|
+
* corresponds to this error. Only included for errors during execution.
|
|
159
|
+
*
|
|
160
|
+
* Enumerable, and appears in the result of JSON.stringify().
|
|
161
|
+
*/
|
|
162
|
+
/**
|
|
163
|
+
* An array of GraphQL AST Nodes corresponding to this error.
|
|
164
|
+
*/
|
|
165
|
+
/**
|
|
166
|
+
* The source GraphQL document for the first location of this error.
|
|
167
|
+
*
|
|
168
|
+
* Note that if this Error represents more than one node, the source may not
|
|
169
|
+
* represent nodes after the first node.
|
|
170
|
+
*/
|
|
171
|
+
/**
|
|
172
|
+
* An array of character offsets within the source GraphQL document
|
|
173
|
+
* which correspond to this error.
|
|
174
|
+
*/
|
|
175
|
+
/**
|
|
176
|
+
* The original error thrown from a field resolver during execution.
|
|
177
|
+
*/
|
|
178
|
+
/**
|
|
179
|
+
* Extension fields to add to the formatted error.
|
|
180
|
+
*/
|
|
181
|
+
/**
|
|
182
|
+
* @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
|
|
183
|
+
*/
|
|
184
|
+
constructor(t, ...s) {
|
|
185
|
+
var a, r, o;
|
|
186
|
+
const { nodes: i, source: c, positions: l, path: u, originalError: m, extensions: y } = vs(s);
|
|
187
|
+
super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = m ?? void 0, this.nodes = jt(
|
|
188
|
+
Array.isArray(i) ? i : i ? [i] : void 0
|
|
189
|
+
);
|
|
190
|
+
const x = jt(
|
|
191
|
+
(a = this.nodes) === null || a === void 0 ? void 0 : a.map((f) => f.loc).filter((f) => f != null)
|
|
192
|
+
);
|
|
193
|
+
this.source = c ?? (x == null || (r = x[0]) === null || r === void 0 ? void 0 : r.source), this.positions = l ?? (x == null ? void 0 : x.map((f) => f.start)), this.locations = l && c ? l.map((f) => De(c, f)) : x == null ? void 0 : x.map((f) => De(f.source, f.start));
|
|
194
|
+
const g = fs(
|
|
195
|
+
m == null ? void 0 : m.extensions
|
|
196
|
+
) ? m == null ? void 0 : m.extensions : void 0;
|
|
197
|
+
this.extensions = (o = y ?? g) !== null && o !== void 0 ? o : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
|
|
198
|
+
message: {
|
|
199
|
+
writable: !0,
|
|
200
|
+
enumerable: !0
|
|
201
|
+
},
|
|
202
|
+
name: {
|
|
203
|
+
enumerable: !1
|
|
204
|
+
},
|
|
205
|
+
nodes: {
|
|
206
|
+
enumerable: !1
|
|
207
|
+
},
|
|
208
|
+
source: {
|
|
209
|
+
enumerable: !1
|
|
210
|
+
},
|
|
211
|
+
positions: {
|
|
212
|
+
enumerable: !1
|
|
213
|
+
},
|
|
214
|
+
originalError: {
|
|
215
|
+
enumerable: !1
|
|
216
|
+
}
|
|
217
|
+
}), m != null && m.stack ? Object.defineProperty(this, "stack", {
|
|
218
|
+
value: m.stack,
|
|
219
|
+
writable: !0,
|
|
220
|
+
configurable: !0
|
|
221
|
+
}) : Error.captureStackTrace ? Error.captureStackTrace(this, Je) : Object.defineProperty(this, "stack", {
|
|
222
|
+
value: Error().stack,
|
|
223
|
+
writable: !0,
|
|
224
|
+
configurable: !0
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
get [Symbol.toStringTag]() {
|
|
228
|
+
return "GraphQLError";
|
|
229
|
+
}
|
|
230
|
+
toString() {
|
|
231
|
+
let t = this.message;
|
|
232
|
+
if (this.nodes)
|
|
233
|
+
for (const s of this.nodes)
|
|
234
|
+
s.loc && (t += `
|
|
235
|
+
|
|
236
|
+
` + ys(s.loc));
|
|
237
|
+
else if (this.source && this.locations)
|
|
238
|
+
for (const s of this.locations)
|
|
239
|
+
t += `
|
|
240
|
+
|
|
241
|
+
` + zt(this.source, s);
|
|
242
|
+
return t;
|
|
243
|
+
}
|
|
244
|
+
toJSON() {
|
|
245
|
+
const t = {
|
|
246
|
+
message: this.message
|
|
247
|
+
};
|
|
248
|
+
return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
function jt(e) {
|
|
252
|
+
return e === void 0 || e.length === 0 ? void 0 : e;
|
|
253
|
+
}
|
|
254
|
+
function $(e, t, s) {
|
|
255
|
+
return new Je(`Syntax Error: ${s}`, {
|
|
256
|
+
source: e,
|
|
257
|
+
positions: [t]
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
class Sa {
|
|
261
|
+
/**
|
|
262
|
+
* The character offset at which this Node begins.
|
|
263
|
+
*/
|
|
264
|
+
/**
|
|
265
|
+
* The character offset at which this Node ends.
|
|
266
|
+
*/
|
|
267
|
+
/**
|
|
268
|
+
* The Token at which this Node begins.
|
|
269
|
+
*/
|
|
270
|
+
/**
|
|
271
|
+
* The Token at which this Node ends.
|
|
272
|
+
*/
|
|
273
|
+
/**
|
|
274
|
+
* The Source document the AST represents.
|
|
275
|
+
*/
|
|
276
|
+
constructor(t, s, a) {
|
|
277
|
+
this.start = t.start, this.end = s.end, this.startToken = t, this.endToken = s, this.source = a;
|
|
278
|
+
}
|
|
279
|
+
get [Symbol.toStringTag]() {
|
|
280
|
+
return "Location";
|
|
281
|
+
}
|
|
282
|
+
toJSON() {
|
|
283
|
+
return {
|
|
284
|
+
start: this.start,
|
|
285
|
+
end: this.end
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
class Mt {
|
|
290
|
+
/**
|
|
291
|
+
* The kind of Token.
|
|
292
|
+
*/
|
|
293
|
+
/**
|
|
294
|
+
* The character offset at which this Node begins.
|
|
295
|
+
*/
|
|
296
|
+
/**
|
|
297
|
+
* The character offset at which this Node ends.
|
|
298
|
+
*/
|
|
299
|
+
/**
|
|
300
|
+
* The 1-indexed line number on which this Token appears.
|
|
301
|
+
*/
|
|
302
|
+
/**
|
|
303
|
+
* The 1-indexed column number at which this Token begins.
|
|
304
|
+
*/
|
|
305
|
+
/**
|
|
306
|
+
* For non-punctuation tokens, represents the interpreted value of the token.
|
|
307
|
+
*
|
|
308
|
+
* Note: is undefined for punctuation tokens, but typed as string for
|
|
309
|
+
* convenience in the parser.
|
|
310
|
+
*/
|
|
311
|
+
/**
|
|
312
|
+
* Tokens exist as nodes in a double-linked-list amongst all tokens
|
|
313
|
+
* including ignored tokens. <SOF> is always the first node and <EOF>
|
|
314
|
+
* the last.
|
|
315
|
+
*/
|
|
316
|
+
constructor(t, s, a, r, o, i) {
|
|
317
|
+
this.kind = t, this.start = s, this.end = a, this.line = r, this.column = o, this.value = i, this.prev = null, this.next = null;
|
|
318
|
+
}
|
|
319
|
+
get [Symbol.toStringTag]() {
|
|
320
|
+
return "Token";
|
|
321
|
+
}
|
|
322
|
+
toJSON() {
|
|
323
|
+
return {
|
|
324
|
+
kind: this.kind,
|
|
325
|
+
value: this.value,
|
|
326
|
+
line: this.line,
|
|
327
|
+
column: this.column
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
const bs = {
|
|
332
|
+
Name: [],
|
|
333
|
+
Document: ["definitions"],
|
|
334
|
+
OperationDefinition: [
|
|
335
|
+
"name",
|
|
336
|
+
"variableDefinitions",
|
|
337
|
+
"directives",
|
|
338
|
+
"selectionSet"
|
|
339
|
+
],
|
|
340
|
+
VariableDefinition: ["variable", "type", "defaultValue", "directives"],
|
|
341
|
+
Variable: ["name"],
|
|
342
|
+
SelectionSet: ["selections"],
|
|
343
|
+
Field: ["alias", "name", "arguments", "directives", "selectionSet"],
|
|
344
|
+
Argument: ["name", "value"],
|
|
345
|
+
FragmentSpread: ["name", "directives"],
|
|
346
|
+
InlineFragment: ["typeCondition", "directives", "selectionSet"],
|
|
347
|
+
FragmentDefinition: [
|
|
348
|
+
"name",
|
|
349
|
+
// Note: fragment variable definitions are deprecated and will removed in v17.0.0
|
|
350
|
+
"variableDefinitions",
|
|
351
|
+
"typeCondition",
|
|
352
|
+
"directives",
|
|
353
|
+
"selectionSet"
|
|
354
|
+
],
|
|
355
|
+
IntValue: [],
|
|
356
|
+
FloatValue: [],
|
|
357
|
+
StringValue: [],
|
|
358
|
+
BooleanValue: [],
|
|
359
|
+
NullValue: [],
|
|
360
|
+
EnumValue: [],
|
|
361
|
+
ListValue: ["values"],
|
|
362
|
+
ObjectValue: ["fields"],
|
|
363
|
+
ObjectField: ["name", "value"],
|
|
364
|
+
Directive: ["name", "arguments"],
|
|
365
|
+
NamedType: ["name"],
|
|
366
|
+
ListType: ["type"],
|
|
367
|
+
NonNullType: ["type"],
|
|
368
|
+
SchemaDefinition: ["description", "directives", "operationTypes"],
|
|
369
|
+
OperationTypeDefinition: ["type"],
|
|
370
|
+
ScalarTypeDefinition: ["description", "name", "directives"],
|
|
371
|
+
ObjectTypeDefinition: [
|
|
372
|
+
"description",
|
|
373
|
+
"name",
|
|
374
|
+
"interfaces",
|
|
375
|
+
"directives",
|
|
376
|
+
"fields"
|
|
377
|
+
],
|
|
378
|
+
FieldDefinition: ["description", "name", "arguments", "type", "directives"],
|
|
379
|
+
InputValueDefinition: [
|
|
380
|
+
"description",
|
|
381
|
+
"name",
|
|
382
|
+
"type",
|
|
383
|
+
"defaultValue",
|
|
384
|
+
"directives"
|
|
385
|
+
],
|
|
386
|
+
InterfaceTypeDefinition: [
|
|
387
|
+
"description",
|
|
388
|
+
"name",
|
|
389
|
+
"interfaces",
|
|
390
|
+
"directives",
|
|
391
|
+
"fields"
|
|
392
|
+
],
|
|
393
|
+
UnionTypeDefinition: ["description", "name", "directives", "types"],
|
|
394
|
+
EnumTypeDefinition: ["description", "name", "directives", "values"],
|
|
395
|
+
EnumValueDefinition: ["description", "name", "directives"],
|
|
396
|
+
InputObjectTypeDefinition: ["description", "name", "directives", "fields"],
|
|
397
|
+
DirectiveDefinition: ["description", "name", "arguments", "locations"],
|
|
398
|
+
SchemaExtension: ["directives", "operationTypes"],
|
|
399
|
+
ScalarTypeExtension: ["name", "directives"],
|
|
400
|
+
ObjectTypeExtension: ["name", "interfaces", "directives", "fields"],
|
|
401
|
+
InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"],
|
|
402
|
+
UnionTypeExtension: ["name", "directives", "types"],
|
|
403
|
+
EnumTypeExtension: ["name", "directives", "values"],
|
|
404
|
+
InputObjectTypeExtension: ["name", "directives", "fields"]
|
|
405
|
+
}, js = new Set(Object.keys(bs));
|
|
406
|
+
function wa(e) {
|
|
407
|
+
const t = e == null ? void 0 : e.kind;
|
|
408
|
+
return typeof t == "string" && js.has(t);
|
|
409
|
+
}
|
|
410
|
+
var Nt;
|
|
411
|
+
(function(e) {
|
|
412
|
+
e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
|
|
413
|
+
})(Nt || (Nt = {}));
|
|
414
|
+
function qe(e) {
|
|
415
|
+
return e === 9 || e === 32;
|
|
416
|
+
}
|
|
417
|
+
function re(e) {
|
|
418
|
+
return e >= 48 && e <= 57;
|
|
419
|
+
}
|
|
420
|
+
function Gt(e) {
|
|
421
|
+
return e >= 97 && e <= 122 || // A-Z
|
|
422
|
+
e >= 65 && e <= 90;
|
|
423
|
+
}
|
|
424
|
+
function Ut(e) {
|
|
425
|
+
return Gt(e) || e === 95;
|
|
426
|
+
}
|
|
427
|
+
function Ns(e) {
|
|
428
|
+
return Gt(e) || re(e) || e === 95;
|
|
429
|
+
}
|
|
430
|
+
function Cs(e) {
|
|
431
|
+
var t;
|
|
432
|
+
let s = Number.MAX_SAFE_INTEGER, a = null, r = -1;
|
|
433
|
+
for (let i = 0; i < e.length; ++i) {
|
|
434
|
+
var o;
|
|
435
|
+
const c = e[i], l = Ss(c);
|
|
436
|
+
l !== c.length && (a = (o = a) !== null && o !== void 0 ? o : i, r = i, i !== 0 && l < s && (s = l));
|
|
437
|
+
}
|
|
438
|
+
return e.map((i, c) => c === 0 ? i : i.slice(s)).slice(
|
|
439
|
+
(t = a) !== null && t !== void 0 ? t : 0,
|
|
440
|
+
r + 1
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
function Ss(e) {
|
|
444
|
+
let t = 0;
|
|
445
|
+
for (; t < e.length && qe(e.charCodeAt(t)); )
|
|
446
|
+
++t;
|
|
447
|
+
return t;
|
|
448
|
+
}
|
|
449
|
+
function ws(e, t) {
|
|
450
|
+
const s = e.replace(/"""/g, '\\"""'), a = s.split(/\r\n|[\n\r]/g), r = a.length === 1, o = a.length > 1 && a.slice(1).every((g) => g.length === 0 || qe(g.charCodeAt(0))), i = s.endsWith('\\"""'), c = e.endsWith('"') && !i, l = e.endsWith("\\"), u = c || l, m = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
|
|
451
|
+
(!r || e.length > 70 || u || o || i);
|
|
452
|
+
let y = "";
|
|
453
|
+
const x = r && qe(e.charCodeAt(0));
|
|
454
|
+
return (m && !x || o) && (y += `
|
|
455
|
+
`), y += s, (m || u) && (y += `
|
|
456
|
+
`), '"""' + y + '"""';
|
|
457
|
+
}
|
|
458
|
+
var h;
|
|
459
|
+
(function(e) {
|
|
460
|
+
e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
|
|
461
|
+
})(h || (h = {}));
|
|
462
|
+
class Ts {
|
|
463
|
+
/**
|
|
464
|
+
* The previously focused non-ignored token.
|
|
465
|
+
*/
|
|
466
|
+
/**
|
|
467
|
+
* The currently focused non-ignored token.
|
|
468
|
+
*/
|
|
469
|
+
/**
|
|
470
|
+
* The (1-indexed) line containing the current token.
|
|
471
|
+
*/
|
|
472
|
+
/**
|
|
473
|
+
* The character offset at which the current line begins.
|
|
474
|
+
*/
|
|
475
|
+
constructor(t) {
|
|
476
|
+
const s = new Mt(h.SOF, 0, 0, 0, 0);
|
|
477
|
+
this.source = t, this.lastToken = s, this.token = s, this.line = 1, this.lineStart = 0;
|
|
478
|
+
}
|
|
479
|
+
get [Symbol.toStringTag]() {
|
|
480
|
+
return "Lexer";
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Advances the token stream to the next non-ignored token.
|
|
484
|
+
*/
|
|
485
|
+
advance() {
|
|
486
|
+
return this.lastToken = this.token, this.token = this.lookahead();
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Looks ahead and returns the next non-ignored token, but does not change
|
|
490
|
+
* the state of Lexer.
|
|
491
|
+
*/
|
|
492
|
+
lookahead() {
|
|
493
|
+
let t = this.token;
|
|
494
|
+
if (t.kind !== h.EOF)
|
|
495
|
+
do
|
|
496
|
+
if (t.next)
|
|
497
|
+
t = t.next;
|
|
498
|
+
else {
|
|
499
|
+
const s = Os(this, t.end);
|
|
500
|
+
t.next = s, s.prev = t, t = s;
|
|
501
|
+
}
|
|
502
|
+
while (t.kind === h.COMMENT);
|
|
503
|
+
return t;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
function As(e) {
|
|
507
|
+
return e === h.BANG || e === h.DOLLAR || e === h.AMP || e === h.PAREN_L || e === h.PAREN_R || e === h.SPREAD || e === h.COLON || e === h.EQUALS || e === h.AT || e === h.BRACKET_L || e === h.BRACKET_R || e === h.BRACE_L || e === h.PIPE || e === h.BRACE_R;
|
|
508
|
+
}
|
|
509
|
+
function Z(e) {
|
|
510
|
+
return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
|
|
511
|
+
}
|
|
512
|
+
function fe(e, t) {
|
|
513
|
+
return Ht(e.charCodeAt(t)) && Qt(e.charCodeAt(t + 1));
|
|
514
|
+
}
|
|
515
|
+
function Ht(e) {
|
|
516
|
+
return e >= 55296 && e <= 56319;
|
|
517
|
+
}
|
|
518
|
+
function Qt(e) {
|
|
519
|
+
return e >= 56320 && e <= 57343;
|
|
520
|
+
}
|
|
521
|
+
function B(e, t) {
|
|
522
|
+
const s = e.source.body.codePointAt(t);
|
|
523
|
+
if (s === void 0)
|
|
524
|
+
return h.EOF;
|
|
525
|
+
if (s >= 32 && s <= 126) {
|
|
526
|
+
const a = String.fromCodePoint(s);
|
|
527
|
+
return a === '"' ? `'"'` : `"${a}"`;
|
|
528
|
+
}
|
|
529
|
+
return "U+" + s.toString(16).toUpperCase().padStart(4, "0");
|
|
530
|
+
}
|
|
531
|
+
function C(e, t, s, a, r) {
|
|
532
|
+
const o = e.line, i = 1 + s - e.lineStart;
|
|
533
|
+
return new Mt(t, s, a, o, i, r);
|
|
534
|
+
}
|
|
535
|
+
function Os(e, t) {
|
|
536
|
+
const s = e.source.body, a = s.length;
|
|
537
|
+
let r = t;
|
|
538
|
+
for (; r < a; ) {
|
|
539
|
+
const o = s.charCodeAt(r);
|
|
540
|
+
switch (o) {
|
|
541
|
+
// Ignored ::
|
|
542
|
+
// - UnicodeBOM
|
|
543
|
+
// - WhiteSpace
|
|
544
|
+
// - LineTerminator
|
|
545
|
+
// - Comment
|
|
546
|
+
// - Comma
|
|
547
|
+
//
|
|
548
|
+
// UnicodeBOM :: "Byte Order Mark (U+FEFF)"
|
|
549
|
+
//
|
|
550
|
+
// WhiteSpace ::
|
|
551
|
+
// - "Horizontal Tab (U+0009)"
|
|
552
|
+
// - "Space (U+0020)"
|
|
553
|
+
//
|
|
554
|
+
// Comma :: ,
|
|
555
|
+
case 65279:
|
|
556
|
+
// <BOM>
|
|
557
|
+
case 9:
|
|
558
|
+
// \t
|
|
559
|
+
case 32:
|
|
560
|
+
// <space>
|
|
561
|
+
case 44:
|
|
562
|
+
++r;
|
|
563
|
+
continue;
|
|
564
|
+
// LineTerminator ::
|
|
565
|
+
// - "New Line (U+000A)"
|
|
566
|
+
// - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"]
|
|
567
|
+
// - "Carriage Return (U+000D)" "New Line (U+000A)"
|
|
568
|
+
case 10:
|
|
569
|
+
++r, ++e.line, e.lineStart = r;
|
|
570
|
+
continue;
|
|
571
|
+
case 13:
|
|
572
|
+
s.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
|
|
573
|
+
continue;
|
|
574
|
+
// Comment
|
|
575
|
+
case 35:
|
|
576
|
+
return $s(e, r);
|
|
577
|
+
// Token ::
|
|
578
|
+
// - Punctuator
|
|
579
|
+
// - Name
|
|
580
|
+
// - IntValue
|
|
581
|
+
// - FloatValue
|
|
582
|
+
// - StringValue
|
|
583
|
+
//
|
|
584
|
+
// Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
|
|
585
|
+
case 33:
|
|
586
|
+
return C(e, h.BANG, r, r + 1);
|
|
587
|
+
case 36:
|
|
588
|
+
return C(e, h.DOLLAR, r, r + 1);
|
|
589
|
+
case 38:
|
|
590
|
+
return C(e, h.AMP, r, r + 1);
|
|
591
|
+
case 40:
|
|
592
|
+
return C(e, h.PAREN_L, r, r + 1);
|
|
593
|
+
case 41:
|
|
594
|
+
return C(e, h.PAREN_R, r, r + 1);
|
|
595
|
+
case 46:
|
|
596
|
+
if (s.charCodeAt(r + 1) === 46 && s.charCodeAt(r + 2) === 46)
|
|
597
|
+
return C(e, h.SPREAD, r, r + 3);
|
|
598
|
+
break;
|
|
599
|
+
case 58:
|
|
600
|
+
return C(e, h.COLON, r, r + 1);
|
|
601
|
+
case 61:
|
|
602
|
+
return C(e, h.EQUALS, r, r + 1);
|
|
603
|
+
case 64:
|
|
604
|
+
return C(e, h.AT, r, r + 1);
|
|
605
|
+
case 91:
|
|
606
|
+
return C(e, h.BRACKET_L, r, r + 1);
|
|
607
|
+
case 93:
|
|
608
|
+
return C(e, h.BRACKET_R, r, r + 1);
|
|
609
|
+
case 123:
|
|
610
|
+
return C(e, h.BRACE_L, r, r + 1);
|
|
611
|
+
case 124:
|
|
612
|
+
return C(e, h.PIPE, r, r + 1);
|
|
613
|
+
case 125:
|
|
614
|
+
return C(e, h.BRACE_R, r, r + 1);
|
|
615
|
+
// StringValue
|
|
616
|
+
case 34:
|
|
617
|
+
return s.charCodeAt(r + 1) === 34 && s.charCodeAt(r + 2) === 34 ? ks(e, r) : Ps(e, r);
|
|
618
|
+
}
|
|
619
|
+
if (re(o) || o === 45)
|
|
620
|
+
return Es(e, r, o);
|
|
621
|
+
if (Ut(o))
|
|
622
|
+
return Ds(e, r);
|
|
623
|
+
throw $(
|
|
624
|
+
e.source,
|
|
625
|
+
r,
|
|
626
|
+
o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : Z(o) || fe(s, r) ? `Unexpected character: ${B(e, r)}.` : `Invalid character: ${B(e, r)}.`
|
|
627
|
+
);
|
|
628
|
+
}
|
|
629
|
+
return C(e, h.EOF, a, a);
|
|
630
|
+
}
|
|
631
|
+
function $s(e, t) {
|
|
632
|
+
const s = e.source.body, a = s.length;
|
|
633
|
+
let r = t + 1;
|
|
634
|
+
for (; r < a; ) {
|
|
635
|
+
const o = s.charCodeAt(r);
|
|
636
|
+
if (o === 10 || o === 13)
|
|
637
|
+
break;
|
|
638
|
+
if (Z(o))
|
|
639
|
+
++r;
|
|
640
|
+
else if (fe(s, r))
|
|
641
|
+
r += 2;
|
|
642
|
+
else
|
|
643
|
+
break;
|
|
644
|
+
}
|
|
645
|
+
return C(
|
|
646
|
+
e,
|
|
647
|
+
h.COMMENT,
|
|
648
|
+
t,
|
|
649
|
+
r,
|
|
650
|
+
s.slice(t + 1, r)
|
|
651
|
+
);
|
|
652
|
+
}
|
|
653
|
+
function Es(e, t, s) {
|
|
654
|
+
const a = e.source.body;
|
|
655
|
+
let r = t, o = s, i = !1;
|
|
656
|
+
if (o === 45 && (o = a.charCodeAt(++r)), o === 48) {
|
|
657
|
+
if (o = a.charCodeAt(++r), re(o))
|
|
658
|
+
throw $(
|
|
659
|
+
e.source,
|
|
660
|
+
r,
|
|
661
|
+
`Invalid number, unexpected digit after 0: ${B(
|
|
662
|
+
e,
|
|
663
|
+
r
|
|
664
|
+
)}.`
|
|
665
|
+
);
|
|
666
|
+
} else
|
|
667
|
+
r = Te(e, r, o), o = a.charCodeAt(r);
|
|
668
|
+
if (o === 46 && (i = !0, o = a.charCodeAt(++r), r = Te(e, r, o), o = a.charCodeAt(r)), (o === 69 || o === 101) && (i = !0, o = a.charCodeAt(++r), (o === 43 || o === 45) && (o = a.charCodeAt(++r)), r = Te(e, r, o), o = a.charCodeAt(r)), o === 46 || Ut(o))
|
|
669
|
+
throw $(
|
|
670
|
+
e.source,
|
|
671
|
+
r,
|
|
672
|
+
`Invalid number, expected digit but got: ${B(
|
|
673
|
+
e,
|
|
674
|
+
r
|
|
675
|
+
)}.`
|
|
676
|
+
);
|
|
677
|
+
return C(
|
|
678
|
+
e,
|
|
679
|
+
i ? h.FLOAT : h.INT,
|
|
680
|
+
t,
|
|
681
|
+
r,
|
|
682
|
+
a.slice(t, r)
|
|
683
|
+
);
|
|
684
|
+
}
|
|
685
|
+
function Te(e, t, s) {
|
|
686
|
+
if (!re(s))
|
|
687
|
+
throw $(
|
|
688
|
+
e.source,
|
|
689
|
+
t,
|
|
690
|
+
`Invalid number, expected digit but got: ${B(
|
|
691
|
+
e,
|
|
692
|
+
t
|
|
693
|
+
)}.`
|
|
694
|
+
);
|
|
695
|
+
const a = e.source.body;
|
|
696
|
+
let r = t + 1;
|
|
697
|
+
for (; re(a.charCodeAt(r)); )
|
|
698
|
+
++r;
|
|
699
|
+
return r;
|
|
700
|
+
}
|
|
701
|
+
function Ps(e, t) {
|
|
702
|
+
const s = e.source.body, a = s.length;
|
|
703
|
+
let r = t + 1, o = r, i = "";
|
|
704
|
+
for (; r < a; ) {
|
|
705
|
+
const c = s.charCodeAt(r);
|
|
706
|
+
if (c === 34)
|
|
707
|
+
return i += s.slice(o, r), C(e, h.STRING, t, r + 1, i);
|
|
708
|
+
if (c === 92) {
|
|
709
|
+
i += s.slice(o, r);
|
|
710
|
+
const l = s.charCodeAt(r + 1) === 117 ? s.charCodeAt(r + 2) === 123 ? Ls(e, r) : Rs(e, r) : Is(e, r);
|
|
711
|
+
i += l.value, r += l.size, o = r;
|
|
712
|
+
continue;
|
|
713
|
+
}
|
|
714
|
+
if (c === 10 || c === 13)
|
|
715
|
+
break;
|
|
716
|
+
if (Z(c))
|
|
717
|
+
++r;
|
|
718
|
+
else if (fe(s, r))
|
|
719
|
+
r += 2;
|
|
720
|
+
else
|
|
721
|
+
throw $(
|
|
722
|
+
e.source,
|
|
723
|
+
r,
|
|
724
|
+
`Invalid character within String: ${B(
|
|
725
|
+
e,
|
|
726
|
+
r
|
|
727
|
+
)}.`
|
|
728
|
+
);
|
|
729
|
+
}
|
|
730
|
+
throw $(e.source, r, "Unterminated string.");
|
|
731
|
+
}
|
|
732
|
+
function Ls(e, t) {
|
|
733
|
+
const s = e.source.body;
|
|
734
|
+
let a = 0, r = 3;
|
|
735
|
+
for (; r < 12; ) {
|
|
736
|
+
const o = s.charCodeAt(t + r++);
|
|
737
|
+
if (o === 125) {
|
|
738
|
+
if (r < 5 || !Z(a))
|
|
739
|
+
break;
|
|
740
|
+
return {
|
|
741
|
+
value: String.fromCodePoint(a),
|
|
742
|
+
size: r
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
if (a = a << 4 | K(o), a < 0)
|
|
746
|
+
break;
|
|
747
|
+
}
|
|
748
|
+
throw $(
|
|
749
|
+
e.source,
|
|
750
|
+
t,
|
|
751
|
+
`Invalid Unicode escape sequence: "${s.slice(
|
|
752
|
+
t,
|
|
753
|
+
t + r
|
|
754
|
+
)}".`
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
function Rs(e, t) {
|
|
758
|
+
const s = e.source.body, a = Ct(s, t + 2);
|
|
759
|
+
if (Z(a))
|
|
760
|
+
return {
|
|
761
|
+
value: String.fromCodePoint(a),
|
|
762
|
+
size: 6
|
|
763
|
+
};
|
|
764
|
+
if (Ht(a) && s.charCodeAt(t + 6) === 92 && s.charCodeAt(t + 7) === 117) {
|
|
765
|
+
const r = Ct(s, t + 8);
|
|
766
|
+
if (Qt(r))
|
|
767
|
+
return {
|
|
768
|
+
value: String.fromCodePoint(a, r),
|
|
769
|
+
size: 12
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
throw $(
|
|
773
|
+
e.source,
|
|
774
|
+
t,
|
|
775
|
+
`Invalid Unicode escape sequence: "${s.slice(t, t + 6)}".`
|
|
776
|
+
);
|
|
777
|
+
}
|
|
778
|
+
function Ct(e, t) {
|
|
779
|
+
return K(e.charCodeAt(t)) << 12 | K(e.charCodeAt(t + 1)) << 8 | K(e.charCodeAt(t + 2)) << 4 | K(e.charCodeAt(t + 3));
|
|
780
|
+
}
|
|
781
|
+
function K(e) {
|
|
782
|
+
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
|
|
783
|
+
}
|
|
784
|
+
function Is(e, t) {
|
|
785
|
+
const s = e.source.body;
|
|
786
|
+
switch (s.charCodeAt(t + 1)) {
|
|
787
|
+
case 34:
|
|
788
|
+
return {
|
|
789
|
+
value: '"',
|
|
790
|
+
size: 2
|
|
791
|
+
};
|
|
792
|
+
case 92:
|
|
793
|
+
return {
|
|
794
|
+
value: "\\",
|
|
795
|
+
size: 2
|
|
796
|
+
};
|
|
797
|
+
case 47:
|
|
798
|
+
return {
|
|
799
|
+
value: "/",
|
|
800
|
+
size: 2
|
|
801
|
+
};
|
|
802
|
+
case 98:
|
|
803
|
+
return {
|
|
804
|
+
value: "\b",
|
|
805
|
+
size: 2
|
|
806
|
+
};
|
|
807
|
+
case 102:
|
|
808
|
+
return {
|
|
809
|
+
value: "\f",
|
|
810
|
+
size: 2
|
|
811
|
+
};
|
|
812
|
+
case 110:
|
|
813
|
+
return {
|
|
814
|
+
value: `
|
|
815
|
+
`,
|
|
816
|
+
size: 2
|
|
817
|
+
};
|
|
818
|
+
case 114:
|
|
819
|
+
return {
|
|
820
|
+
value: "\r",
|
|
821
|
+
size: 2
|
|
822
|
+
};
|
|
823
|
+
case 116:
|
|
824
|
+
return {
|
|
825
|
+
value: " ",
|
|
826
|
+
size: 2
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
throw $(
|
|
830
|
+
e.source,
|
|
831
|
+
t,
|
|
832
|
+
`Invalid character escape sequence: "${s.slice(
|
|
833
|
+
t,
|
|
834
|
+
t + 2
|
|
835
|
+
)}".`
|
|
836
|
+
);
|
|
837
|
+
}
|
|
838
|
+
function ks(e, t) {
|
|
839
|
+
const s = e.source.body, a = s.length;
|
|
840
|
+
let r = e.lineStart, o = t + 3, i = o, c = "";
|
|
841
|
+
const l = [];
|
|
842
|
+
for (; o < a; ) {
|
|
843
|
+
const u = s.charCodeAt(o);
|
|
844
|
+
if (u === 34 && s.charCodeAt(o + 1) === 34 && s.charCodeAt(o + 2) === 34) {
|
|
845
|
+
c += s.slice(i, o), l.push(c);
|
|
846
|
+
const m = C(
|
|
847
|
+
e,
|
|
848
|
+
h.BLOCK_STRING,
|
|
849
|
+
t,
|
|
850
|
+
o + 3,
|
|
851
|
+
// Return a string of the lines joined with U+000A.
|
|
852
|
+
Cs(l).join(`
|
|
853
|
+
`)
|
|
854
|
+
);
|
|
855
|
+
return e.line += l.length - 1, e.lineStart = r, m;
|
|
856
|
+
}
|
|
857
|
+
if (u === 92 && s.charCodeAt(o + 1) === 34 && s.charCodeAt(o + 2) === 34 && s.charCodeAt(o + 3) === 34) {
|
|
858
|
+
c += s.slice(i, o), i = o + 1, o += 4;
|
|
859
|
+
continue;
|
|
860
|
+
}
|
|
861
|
+
if (u === 10 || u === 13) {
|
|
862
|
+
c += s.slice(i, o), l.push(c), u === 13 && s.charCodeAt(o + 1) === 10 ? o += 2 : ++o, c = "", i = o, r = o;
|
|
863
|
+
continue;
|
|
864
|
+
}
|
|
865
|
+
if (Z(u))
|
|
866
|
+
++o;
|
|
867
|
+
else if (fe(s, o))
|
|
868
|
+
o += 2;
|
|
869
|
+
else
|
|
870
|
+
throw $(
|
|
871
|
+
e.source,
|
|
872
|
+
o,
|
|
873
|
+
`Invalid character within String: ${B(
|
|
874
|
+
e,
|
|
875
|
+
o
|
|
876
|
+
)}.`
|
|
877
|
+
);
|
|
878
|
+
}
|
|
879
|
+
throw $(e.source, o, "Unterminated string.");
|
|
880
|
+
}
|
|
881
|
+
function Ds(e, t) {
|
|
882
|
+
const s = e.source.body, a = s.length;
|
|
883
|
+
let r = t + 1;
|
|
884
|
+
for (; r < a; ) {
|
|
885
|
+
const o = s.charCodeAt(r);
|
|
886
|
+
if (Ns(o))
|
|
887
|
+
++r;
|
|
888
|
+
else
|
|
889
|
+
break;
|
|
890
|
+
}
|
|
891
|
+
return C(
|
|
892
|
+
e,
|
|
893
|
+
h.NAME,
|
|
894
|
+
t,
|
|
895
|
+
r,
|
|
896
|
+
s.slice(t, r)
|
|
897
|
+
);
|
|
898
|
+
}
|
|
899
|
+
const qs = 10, Jt = 2;
|
|
900
|
+
function Wt(e) {
|
|
901
|
+
return xe(e, []);
|
|
902
|
+
}
|
|
903
|
+
function xe(e, t) {
|
|
904
|
+
switch (typeof e) {
|
|
905
|
+
case "string":
|
|
906
|
+
return JSON.stringify(e);
|
|
907
|
+
case "function":
|
|
908
|
+
return e.name ? `[function ${e.name}]` : "[function]";
|
|
909
|
+
case "object":
|
|
910
|
+
return Vs(e, t);
|
|
911
|
+
default:
|
|
912
|
+
return String(e);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
function Vs(e, t) {
|
|
916
|
+
if (e === null)
|
|
917
|
+
return "null";
|
|
918
|
+
if (t.includes(e))
|
|
919
|
+
return "[Circular]";
|
|
920
|
+
const s = [...t, e];
|
|
921
|
+
if (Fs(e)) {
|
|
922
|
+
const a = e.toJSON();
|
|
923
|
+
if (a !== e)
|
|
924
|
+
return typeof a == "string" ? a : xe(a, s);
|
|
925
|
+
} else if (Array.isArray(e))
|
|
926
|
+
return Bs(e, s);
|
|
927
|
+
return _s(e, s);
|
|
928
|
+
}
|
|
929
|
+
function Fs(e) {
|
|
930
|
+
return typeof e.toJSON == "function";
|
|
931
|
+
}
|
|
932
|
+
function _s(e, t) {
|
|
933
|
+
const s = Object.entries(e);
|
|
934
|
+
return s.length === 0 ? "{}" : t.length > Jt ? "[" + zs(e) + "]" : "{ " + s.map(
|
|
935
|
+
([r, o]) => r + ": " + xe(o, t)
|
|
936
|
+
).join(", ") + " }";
|
|
937
|
+
}
|
|
938
|
+
function Bs(e, t) {
|
|
939
|
+
if (e.length === 0)
|
|
940
|
+
return "[]";
|
|
941
|
+
if (t.length > Jt)
|
|
942
|
+
return "[Array]";
|
|
943
|
+
const s = Math.min(qs, e.length), a = e.length - s, r = [];
|
|
944
|
+
for (let o = 0; o < s; ++o)
|
|
945
|
+
r.push(xe(e[o], t));
|
|
946
|
+
return a === 1 ? r.push("... 1 more item") : a > 1 && r.push(`... ${a} more items`), "[" + r.join(", ") + "]";
|
|
947
|
+
}
|
|
948
|
+
function zs(e) {
|
|
949
|
+
const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
|
|
950
|
+
if (t === "Object" && typeof e.constructor == "function") {
|
|
951
|
+
const s = e.constructor.name;
|
|
952
|
+
if (typeof s == "string" && s !== "")
|
|
953
|
+
return s;
|
|
954
|
+
}
|
|
955
|
+
return t;
|
|
956
|
+
}
|
|
957
|
+
const Ms = globalThis.process && // eslint-disable-next-line no-undef
|
|
958
|
+
process.env.NODE_ENV === "production", Gs = (
|
|
959
|
+
/* c8 ignore next 6 */
|
|
960
|
+
// FIXME: https://github.com/graphql/graphql-js/issues/2317
|
|
961
|
+
Ms ? function(t, s) {
|
|
962
|
+
return t instanceof s;
|
|
963
|
+
} : function(t, s) {
|
|
964
|
+
if (t instanceof s)
|
|
965
|
+
return !0;
|
|
966
|
+
if (typeof t == "object" && t !== null) {
|
|
967
|
+
var a;
|
|
968
|
+
const r = s.prototype[Symbol.toStringTag], o = (
|
|
969
|
+
// We still need to support constructor's name to detect conflicts with older versions of this library.
|
|
970
|
+
Symbol.toStringTag in t ? t[Symbol.toStringTag] : (a = t.constructor) === null || a === void 0 ? void 0 : a.name
|
|
971
|
+
);
|
|
972
|
+
if (r === o) {
|
|
973
|
+
const i = Wt(t);
|
|
974
|
+
throw new Error(`Cannot use ${r} "${i}" from another module or realm.
|
|
975
|
+
|
|
976
|
+
Ensure that there is only one instance of "graphql" in the node_modules
|
|
977
|
+
directory. If different versions of "graphql" are the dependencies of other
|
|
978
|
+
relied on modules, use "resolutions" to ensure only one version is installed.
|
|
979
|
+
|
|
980
|
+
https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
981
|
+
|
|
982
|
+
Duplicate "graphql" modules cannot be used at the same time since different
|
|
983
|
+
versions may have different capabilities and behavior. The data from one
|
|
984
|
+
version used in the function from another could produce confusing and
|
|
985
|
+
spurious results.`);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
return !1;
|
|
989
|
+
}
|
|
990
|
+
);
|
|
991
|
+
class Xt {
|
|
992
|
+
constructor(t, s = "GraphQL request", a = {
|
|
993
|
+
line: 1,
|
|
994
|
+
column: 1
|
|
995
|
+
}) {
|
|
996
|
+
typeof t == "string" || we(!1, `Body must be a string. Received: ${Wt(t)}.`), this.body = t, this.name = s, this.locationOffset = a, this.locationOffset.line > 0 || we(
|
|
997
|
+
!1,
|
|
998
|
+
"line in locationOffset is 1-indexed and must be positive."
|
|
999
|
+
), this.locationOffset.column > 0 || we(
|
|
1000
|
+
!1,
|
|
1001
|
+
"column in locationOffset is 1-indexed and must be positive."
|
|
1002
|
+
);
|
|
1003
|
+
}
|
|
1004
|
+
get [Symbol.toStringTag]() {
|
|
1005
|
+
return "Source";
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
function Us(e) {
|
|
1009
|
+
return Gs(e, Xt);
|
|
1010
|
+
}
|
|
1011
|
+
function Hs(e) {
|
|
1012
|
+
const t = Us(e) ? e : new Xt(e), s = t.body, a = new Ts(t);
|
|
1013
|
+
let r = "", o = !1;
|
|
1014
|
+
for (; a.advance().kind !== h.EOF; ) {
|
|
1015
|
+
const i = a.token, c = i.kind, l = !As(i.kind);
|
|
1016
|
+
o && (l || i.kind === h.SPREAD) && (r += " ");
|
|
1017
|
+
const u = s.slice(i.start, i.end);
|
|
1018
|
+
c === h.BLOCK_STRING ? r += ws(i.value, {
|
|
1019
|
+
minimize: !0
|
|
1020
|
+
}) : r += u, o = l;
|
|
1021
|
+
}
|
|
1022
|
+
return r;
|
|
1023
|
+
}
|
|
1024
|
+
const Zt = It(
|
|
1025
|
+
void 0
|
|
1026
|
+
), Ta = ({
|
|
1027
|
+
children: e,
|
|
1028
|
+
client: t
|
|
1029
|
+
}) => /* @__PURE__ */ n.jsx(Zt.Provider, { value: t, children: e }), Yt = (e, t, ...[s]) => ({
|
|
1030
|
+
queryFn: () => e.fetch(t, s),
|
|
1031
|
+
queryKey: [Hs(t.toString()), s]
|
|
1032
|
+
}), Qs = (e, ...[t]) => {
|
|
1033
|
+
const s = _n(Zt);
|
|
1034
|
+
if (s === void 0)
|
|
1035
|
+
throw new Error("useGraphQL must be used within a GraphQLProvider");
|
|
1036
|
+
return Yt(s, e, ...t === void 0 ? [] : [t]);
|
|
1037
|
+
};
|
|
1038
|
+
class z extends String {
|
|
1039
|
+
constructor(s, a) {
|
|
1040
|
+
super(s);
|
|
1041
|
+
Y(this, "__apiType");
|
|
1042
|
+
Y(this, "value");
|
|
1043
|
+
Y(this, "__meta__");
|
|
1044
|
+
this.value = s, this.__meta__ = a;
|
|
1045
|
+
}
|
|
1046
|
+
toString() {
|
|
1047
|
+
return this.value;
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
const Js = new z(
|
|
1051
|
+
`
|
|
1052
|
+
fragment OperationsFragment on OperationItem {
|
|
1053
|
+
slug
|
|
1054
|
+
summary
|
|
1055
|
+
method
|
|
1056
|
+
description
|
|
1057
|
+
operationId
|
|
1058
|
+
contentTypes
|
|
1059
|
+
path
|
|
1060
|
+
deprecated
|
|
1061
|
+
extensions
|
|
1062
|
+
parameters {
|
|
1063
|
+
name
|
|
1064
|
+
in
|
|
1065
|
+
description
|
|
1066
|
+
required
|
|
1067
|
+
schema
|
|
1068
|
+
style
|
|
1069
|
+
explode
|
|
1070
|
+
examples {
|
|
1071
|
+
name
|
|
1072
|
+
description
|
|
1073
|
+
externalValue
|
|
1074
|
+
value
|
|
1075
|
+
summary
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
requestBody {
|
|
1079
|
+
content {
|
|
1080
|
+
mediaType
|
|
1081
|
+
encoding {
|
|
1082
|
+
name
|
|
1083
|
+
}
|
|
1084
|
+
examples {
|
|
1085
|
+
name
|
|
1086
|
+
description
|
|
1087
|
+
externalValue
|
|
1088
|
+
value
|
|
1089
|
+
summary
|
|
1090
|
+
}
|
|
1091
|
+
schema
|
|
1092
|
+
}
|
|
1093
|
+
description
|
|
1094
|
+
required
|
|
1095
|
+
}
|
|
1096
|
+
responses {
|
|
1097
|
+
statusCode
|
|
1098
|
+
links
|
|
1099
|
+
description
|
|
1100
|
+
content {
|
|
1101
|
+
examples {
|
|
1102
|
+
name
|
|
1103
|
+
description
|
|
1104
|
+
externalValue
|
|
1105
|
+
value
|
|
1106
|
+
summary
|
|
1107
|
+
}
|
|
1108
|
+
mediaType
|
|
1109
|
+
encoding {
|
|
1110
|
+
name
|
|
1111
|
+
}
|
|
1112
|
+
schema
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
`,
|
|
1117
|
+
{ fragmentName: "OperationsFragment" }
|
|
1118
|
+
), Ws = new z(`
|
|
1119
|
+
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
1120
|
+
schema(input: $input, type: $type) {
|
|
1121
|
+
url
|
|
1122
|
+
servers {
|
|
1123
|
+
url
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
`), Xs = new z(`
|
|
1128
|
+
query SchemaWarmup($input: JSON!, $type: SchemaType!) {
|
|
1129
|
+
schema(input: $input, type: $type) {
|
|
1130
|
+
openapi
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
`), Zs = new z(`
|
|
1134
|
+
query OperationsForTag($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
1135
|
+
schema(input: $input, type: $type) {
|
|
1136
|
+
servers {
|
|
1137
|
+
url
|
|
1138
|
+
}
|
|
1139
|
+
description
|
|
1140
|
+
summary
|
|
1141
|
+
title
|
|
1142
|
+
url
|
|
1143
|
+
version
|
|
1144
|
+
tag(slug: $tag, untagged: $untagged) {
|
|
1145
|
+
name
|
|
1146
|
+
description
|
|
1147
|
+
operations {
|
|
1148
|
+
slug
|
|
1149
|
+
...OperationsFragment
|
|
1150
|
+
}
|
|
1151
|
+
next {
|
|
1152
|
+
name
|
|
1153
|
+
slug
|
|
1154
|
+
}
|
|
1155
|
+
prev {
|
|
1156
|
+
name
|
|
1157
|
+
slug
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
fragment OperationsFragment on OperationItem {
|
|
1163
|
+
slug
|
|
1164
|
+
summary
|
|
1165
|
+
method
|
|
1166
|
+
description
|
|
1167
|
+
operationId
|
|
1168
|
+
contentTypes
|
|
1169
|
+
path
|
|
1170
|
+
deprecated
|
|
1171
|
+
extensions
|
|
1172
|
+
parameters {
|
|
1173
|
+
name
|
|
1174
|
+
in
|
|
1175
|
+
description
|
|
1176
|
+
required
|
|
1177
|
+
schema
|
|
1178
|
+
style
|
|
1179
|
+
explode
|
|
1180
|
+
examples {
|
|
1181
|
+
name
|
|
1182
|
+
description
|
|
1183
|
+
externalValue
|
|
1184
|
+
value
|
|
1185
|
+
summary
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
requestBody {
|
|
1189
|
+
content {
|
|
1190
|
+
mediaType
|
|
1191
|
+
encoding {
|
|
1192
|
+
name
|
|
1193
|
+
}
|
|
1194
|
+
examples {
|
|
1195
|
+
name
|
|
1196
|
+
description
|
|
1197
|
+
externalValue
|
|
1198
|
+
value
|
|
1199
|
+
summary
|
|
1200
|
+
}
|
|
1201
|
+
schema
|
|
1202
|
+
}
|
|
1203
|
+
description
|
|
1204
|
+
required
|
|
1205
|
+
}
|
|
1206
|
+
responses {
|
|
1207
|
+
statusCode
|
|
1208
|
+
links
|
|
1209
|
+
description
|
|
1210
|
+
content {
|
|
1211
|
+
examples {
|
|
1212
|
+
name
|
|
1213
|
+
description
|
|
1214
|
+
externalValue
|
|
1215
|
+
value
|
|
1216
|
+
summary
|
|
1217
|
+
}
|
|
1218
|
+
mediaType
|
|
1219
|
+
encoding {
|
|
1220
|
+
name
|
|
1221
|
+
}
|
|
1222
|
+
schema
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
}`), Ys = new z(`
|
|
1226
|
+
query GetSchemas($input: JSON!, $type: SchemaType!) {
|
|
1227
|
+
schema(input: $input, type: $type) {
|
|
1228
|
+
title
|
|
1229
|
+
description
|
|
1230
|
+
summary
|
|
1231
|
+
components {
|
|
1232
|
+
schemas {
|
|
1233
|
+
name
|
|
1234
|
+
schema
|
|
1235
|
+
extensions
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
`), Ks = new z(`
|
|
1241
|
+
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
1242
|
+
schema(input: $input, type: $type) {
|
|
1243
|
+
url
|
|
1244
|
+
servers {
|
|
1245
|
+
url
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
`), er = new z(`
|
|
1250
|
+
query GetSidebarOperations($input: JSON!, $type: SchemaType!) {
|
|
1251
|
+
schema(input: $input, type: $type) {
|
|
1252
|
+
tags {
|
|
1253
|
+
slug
|
|
1254
|
+
name
|
|
1255
|
+
extensions
|
|
1256
|
+
operations {
|
|
1257
|
+
summary
|
|
1258
|
+
slug
|
|
1259
|
+
method
|
|
1260
|
+
operationId
|
|
1261
|
+
path
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
components {
|
|
1265
|
+
schemas {
|
|
1266
|
+
__typename
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
`), tr = {
|
|
1272
|
+
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": Ws,
|
|
1273
|
+
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\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": Js,
|
|
1274
|
+
"\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n": Xs,
|
|
1275
|
+
"\n query OperationsForTag(\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 tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n next {\n name\n slug\n }\n prev {\n name\n slug\n }\n }\n }\n }\n": Zs,
|
|
1276
|
+
"\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n": Ys,
|
|
1277
|
+
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": Ks,
|
|
1278
|
+
"\n query GetSidebarOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n": er
|
|
1279
|
+
};
|
|
1280
|
+
function nr(e) {
|
|
1281
|
+
return tr[e] ?? {};
|
|
1282
|
+
}
|
|
1283
|
+
const sr = qt(
|
|
1284
|
+
"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",
|
|
1285
|
+
{
|
|
1286
|
+
variants: {
|
|
1287
|
+
variant: {
|
|
1288
|
+
default: "bg-background text-foreground",
|
|
1289
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
1290
|
+
}
|
|
1291
|
+
},
|
|
1292
|
+
defaultVariants: {
|
|
1293
|
+
variant: "default"
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
), Ve = S.forwardRef(({ className: e, variant: t, ...s }, a) => /* @__PURE__ */ n.jsx(
|
|
1297
|
+
"div",
|
|
1298
|
+
{
|
|
1299
|
+
ref: a,
|
|
1300
|
+
role: "alert",
|
|
1301
|
+
className: b(sr({ variant: t }), e),
|
|
1302
|
+
...s
|
|
1303
|
+
}
|
|
1304
|
+
));
|
|
1305
|
+
Ve.displayName = "Alert";
|
|
1306
|
+
const Fe = S.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1307
|
+
"h5",
|
|
1308
|
+
{
|
|
1309
|
+
ref: s,
|
|
1310
|
+
className: b("mb-1 font-medium leading-none tracking-tight", e),
|
|
1311
|
+
...t
|
|
1312
|
+
}
|
|
1313
|
+
));
|
|
1314
|
+
Fe.displayName = "AlertTitle";
|
|
1315
|
+
const _e = S.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1316
|
+
"div",
|
|
1317
|
+
{
|
|
1318
|
+
ref: s,
|
|
1319
|
+
className: b("text-sm [&_p]:leading-relaxed", e),
|
|
1320
|
+
...t
|
|
1321
|
+
}
|
|
1322
|
+
));
|
|
1323
|
+
_e.displayName = "AlertDescription";
|
|
1324
|
+
const rr = ({
|
|
1325
|
+
path: e,
|
|
1326
|
+
renderParam: t
|
|
1327
|
+
}) => {
|
|
1328
|
+
let s = 0;
|
|
1329
|
+
return e.split("/").map((a, r, o) => {
|
|
1330
|
+
const i = Array.from(a.matchAll(/{([^}]+)}/g)), c = [];
|
|
1331
|
+
let l = 0;
|
|
1332
|
+
return i.forEach((u) => {
|
|
1333
|
+
const [m, y] = u;
|
|
1334
|
+
if (!y) return;
|
|
1335
|
+
const x = u.index;
|
|
1336
|
+
x > l && c.push(
|
|
1337
|
+
/* @__PURE__ */ n.jsx(D, { children: a.slice(l, x) }, `text-${l}-${x}`)
|
|
1338
|
+
), c.push(
|
|
1339
|
+
/* @__PURE__ */ n.jsx(D, { children: t({ name: y, originalValue: m, index: s++ }) }, `param-${y}`)
|
|
1340
|
+
), l = x + m.length;
|
|
1341
|
+
}), l < a.length && c.push(
|
|
1342
|
+
/* @__PURE__ */ n.jsx(D, { children: a.slice(l) }, `text-${l}-${a.length}`)
|
|
1343
|
+
), // eslint-disable-next-line react/no-array-index-key
|
|
1344
|
+
/* @__PURE__ */ n.jsxs(D, { children: [
|
|
1345
|
+
c,
|
|
1346
|
+
r < o.length - 1 && "/",
|
|
1347
|
+
/* @__PURE__ */ n.jsx("wbr", {})
|
|
1348
|
+
] }, `${a}-${r}`);
|
|
1349
|
+
});
|
|
1350
|
+
}, Kt = S.forwardRef(
|
|
1351
|
+
({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1352
|
+
"textarea",
|
|
1353
|
+
{
|
|
1354
|
+
className: b(
|
|
1355
|
+
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1356
|
+
e
|
|
1357
|
+
),
|
|
1358
|
+
ref: s,
|
|
1359
|
+
...t
|
|
1360
|
+
}
|
|
1361
|
+
)
|
|
1362
|
+
);
|
|
1363
|
+
Kt.displayName = "Textarea";
|
|
1364
|
+
const Ae = (e) => Math.abs(
|
|
1365
|
+
isNaN(parseInt(e)) ? e.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(e)) ? 0 : parseInt(e)
|
|
1366
|
+
), Oe = (e) => e.length > 1 ? parseInt(e.split("").reduce((t, s) => `${Ae(t) + Ae(s)}`)) : Ae(e), St = (e, t = {}) => {
|
|
1367
|
+
const s = (3 * Oe(e) + 2 * Oe(e) + Oe(e)) % 360, { saturation: a = 75, lightness: r = 60 } = t;
|
|
1368
|
+
return `${s}deg ${a}% ${r}%`;
|
|
1369
|
+
}, $e = "data-linked-param", ar = (e) => {
|
|
1370
|
+
const { resolvedTheme: t } = Yn();
|
|
1371
|
+
return {
|
|
1372
|
+
text: St(
|
|
1373
|
+
e,
|
|
1374
|
+
t === "light" ? { saturation: 95, lightness: 38 } : {}
|
|
1375
|
+
),
|
|
1376
|
+
background: St(
|
|
1377
|
+
e,
|
|
1378
|
+
t === "light" ? { saturation: 85, lightness: 40 } : {}
|
|
1379
|
+
)
|
|
1380
|
+
};
|
|
1381
|
+
}, en = ({
|
|
1382
|
+
name: e,
|
|
1383
|
+
className: t,
|
|
1384
|
+
slug: s,
|
|
1385
|
+
title: a,
|
|
1386
|
+
children: r,
|
|
1387
|
+
onClick: o
|
|
1388
|
+
}) => {
|
|
1389
|
+
const i = X(null), c = s == null ? void 0 : s.replace(/[{}]/g, ""), l = e.replace(/[{}]/g, ""), { text: u, background: m } = ar(l), y = `hsl(${u} / 100%)`, x = `hsl(${m} / 10%)`, g = `hsl(${m} / 50%)`;
|
|
1390
|
+
return le(() => {
|
|
1391
|
+
if (!c || !i.current) return;
|
|
1392
|
+
const f = () => {
|
|
1393
|
+
document.querySelectorAll(`[${$e}="${c}"]`).forEach((j) => {
|
|
1394
|
+
j instanceof HTMLElement && (j.dataset.active = "true");
|
|
1395
|
+
});
|
|
1396
|
+
}, p = () => {
|
|
1397
|
+
document.querySelectorAll(`[${$e}="${c}"]`).forEach((j) => {
|
|
1398
|
+
j instanceof HTMLElement && (j.dataset.active = "false");
|
|
1399
|
+
});
|
|
1400
|
+
}, v = i.current;
|
|
1401
|
+
return v.addEventListener("mouseenter", f), v.addEventListener("mouseleave", p), () => {
|
|
1402
|
+
v.removeEventListener("mouseenter", f), v.removeEventListener("mouseleave", p);
|
|
1403
|
+
};
|
|
1404
|
+
}, [c]), /* @__PURE__ */ n.jsx(
|
|
1405
|
+
"span",
|
|
1406
|
+
{
|
|
1407
|
+
[$e]: c,
|
|
1408
|
+
className: b(
|
|
1409
|
+
// This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
|
|
1410
|
+
"relative transition-all duration-100 rounded-lg",
|
|
1411
|
+
"border border-[--border-color] p-0.5 text-[--param-color] bg-[--background-color]",
|
|
1412
|
+
"data-[active=true]:border-[--param-color] data-[active=true]:shadow data-[active=true]:bottom-px",
|
|
1413
|
+
t
|
|
1414
|
+
),
|
|
1415
|
+
title: a,
|
|
1416
|
+
suppressHydrationWarning: !0,
|
|
1417
|
+
ref: i,
|
|
1418
|
+
onClick: o,
|
|
1419
|
+
style: {
|
|
1420
|
+
"--param-color": y,
|
|
1421
|
+
"--border-color": g,
|
|
1422
|
+
"--background-color": x
|
|
1423
|
+
},
|
|
1424
|
+
children: r ?? e
|
|
1425
|
+
}
|
|
1426
|
+
);
|
|
1427
|
+
}, or = Lt()(
|
|
1428
|
+
Rt(
|
|
1429
|
+
(e) => ({
|
|
1430
|
+
selectedServer: void 0,
|
|
1431
|
+
setSelectedServer: (t) => e({ selectedServer: t })
|
|
1432
|
+
}),
|
|
1433
|
+
{ name: "zudoku-selected-server" }
|
|
1434
|
+
)
|
|
1435
|
+
), ir = (e) => {
|
|
1436
|
+
const { selectedServer: t, setSelectedServer: s } = or();
|
|
1437
|
+
return { selectedServer: Bn(
|
|
1438
|
+
() => {
|
|
1439
|
+
var r;
|
|
1440
|
+
return t && e.some((o) => o.url === t) ? t : ((r = e.at(0)) == null ? void 0 : r.url) ?? "";
|
|
1441
|
+
},
|
|
1442
|
+
[t, e]
|
|
1443
|
+
), setSelectedServer: s };
|
|
1444
|
+
}, lr = (e, t, s) => {
|
|
1445
|
+
const a = t.replace(/(:\w+|\{\w+})/g, (o) => {
|
|
1446
|
+
var l;
|
|
1447
|
+
const i = o.replace(/[:{}]/g, "");
|
|
1448
|
+
return ((l = s.pathParams.find((u) => u.name === i)) == null ? void 0 : l.value) ?? o;
|
|
1449
|
+
}), r = new URL(
|
|
1450
|
+
a.replace(/^\//, ""),
|
|
1451
|
+
e.endsWith("/") ? e : `${e}/`
|
|
1452
|
+
);
|
|
1453
|
+
return s.queryParams.filter((o) => o.active).forEach((o) => {
|
|
1454
|
+
r.searchParams.set(o.name, o.value);
|
|
1455
|
+
}), r;
|
|
1456
|
+
}, tn = N.Root, nn = N.Trigger, cr = N.Group, dr = S.forwardRef(({ className: e, inset: t, children: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
|
|
1457
|
+
N.SubTrigger,
|
|
1458
|
+
{
|
|
1459
|
+
ref: r,
|
|
1460
|
+
className: b(
|
|
1461
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
1462
|
+
t && "pl-8",
|
|
1463
|
+
e
|
|
1464
|
+
),
|
|
1465
|
+
...a,
|
|
1466
|
+
children: [
|
|
1467
|
+
s,
|
|
1468
|
+
/* @__PURE__ */ n.jsx(te, { className: "ml-auto h-4 w-4" })
|
|
1469
|
+
]
|
|
1470
|
+
}
|
|
1471
|
+
));
|
|
1472
|
+
dr.displayName = N.SubTrigger.displayName;
|
|
1473
|
+
const ur = S.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1474
|
+
N.SubContent,
|
|
1475
|
+
{
|
|
1476
|
+
ref: s,
|
|
1477
|
+
className: b(
|
|
1478
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1479
|
+
e
|
|
1480
|
+
),
|
|
1481
|
+
...t
|
|
1482
|
+
}
|
|
1483
|
+
));
|
|
1484
|
+
ur.displayName = N.SubContent.displayName;
|
|
1485
|
+
const We = S.forwardRef(({ className: e, sideOffset: t = 4, ...s }, a) => /* @__PURE__ */ n.jsx(N.Portal, { children: /* @__PURE__ */ n.jsx(
|
|
1486
|
+
N.Content,
|
|
1487
|
+
{
|
|
1488
|
+
ref: a,
|
|
1489
|
+
sideOffset: t,
|
|
1490
|
+
className: b(
|
|
1491
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1492
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1493
|
+
e
|
|
1494
|
+
),
|
|
1495
|
+
...s
|
|
1496
|
+
}
|
|
1497
|
+
) }));
|
|
1498
|
+
We.displayName = N.Content.displayName;
|
|
1499
|
+
const Xe = S.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
|
|
1500
|
+
N.Item,
|
|
1501
|
+
{
|
|
1502
|
+
ref: a,
|
|
1503
|
+
className: b(
|
|
1504
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1505
|
+
t && "pl-8",
|
|
1506
|
+
e
|
|
1507
|
+
),
|
|
1508
|
+
...s
|
|
1509
|
+
}
|
|
1510
|
+
));
|
|
1511
|
+
Xe.displayName = N.Item.displayName;
|
|
1512
|
+
const mr = S.forwardRef(({ className: e, children: t, checked: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
|
|
1513
|
+
N.CheckboxItem,
|
|
1514
|
+
{
|
|
1515
|
+
ref: r,
|
|
1516
|
+
className: b(
|
|
1517
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1518
|
+
e
|
|
1519
|
+
),
|
|
1520
|
+
checked: s,
|
|
1521
|
+
...a,
|
|
1522
|
+
children: [
|
|
1523
|
+
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(N.ItemIndicator, { children: /* @__PURE__ */ n.jsx(jn, { className: "h-4 w-4" }) }) }),
|
|
1524
|
+
t
|
|
1525
|
+
]
|
|
1526
|
+
}
|
|
1527
|
+
));
|
|
1528
|
+
mr.displayName = N.CheckboxItem.displayName;
|
|
1529
|
+
const pr = S.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
|
|
1530
|
+
N.RadioItem,
|
|
1531
|
+
{
|
|
1532
|
+
ref: a,
|
|
1533
|
+
className: b(
|
|
1534
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1535
|
+
e
|
|
1536
|
+
),
|
|
1537
|
+
...s,
|
|
1538
|
+
children: [
|
|
1539
|
+
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(N.ItemIndicator, { children: /* @__PURE__ */ n.jsx(Nn, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1540
|
+
t
|
|
1541
|
+
]
|
|
1542
|
+
}
|
|
1543
|
+
));
|
|
1544
|
+
pr.displayName = N.RadioItem.displayName;
|
|
1545
|
+
const sn = S.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
|
|
1546
|
+
N.Label,
|
|
1547
|
+
{
|
|
1548
|
+
ref: a,
|
|
1549
|
+
className: b(
|
|
1550
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
1551
|
+
t && "pl-8",
|
|
1552
|
+
e
|
|
1553
|
+
),
|
|
1554
|
+
...s
|
|
1555
|
+
}
|
|
1556
|
+
));
|
|
1557
|
+
sn.displayName = N.Label.displayName;
|
|
1558
|
+
const rn = S.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1559
|
+
N.Separator,
|
|
1560
|
+
{
|
|
1561
|
+
ref: s,
|
|
1562
|
+
className: b("-mx-1 my-1 h-px bg-muted", e),
|
|
1563
|
+
...t
|
|
1564
|
+
}
|
|
1565
|
+
));
|
|
1566
|
+
rn.displayName = N.Separator.displayName;
|
|
1567
|
+
const hr = ({
|
|
1568
|
+
examples: e,
|
|
1569
|
+
onSelect: t
|
|
1570
|
+
}) => /* @__PURE__ */ n.jsxs(tn, { children: [
|
|
1571
|
+
/* @__PURE__ */ n.jsx(nn, { asChild: !0, children: /* @__PURE__ */ n.jsx(V, { variant: "outline", children: "Use Example" }) }),
|
|
1572
|
+
/* @__PURE__ */ n.jsx(We, { className: "max-w-72", children: e.map((s) => {
|
|
1573
|
+
var a;
|
|
1574
|
+
return /* @__PURE__ */ n.jsxs("div", { children: [
|
|
1575
|
+
/* @__PURE__ */ n.jsx(sn, { children: s.mediaType }),
|
|
1576
|
+
/* @__PURE__ */ n.jsx(rn, {}),
|
|
1577
|
+
/* @__PURE__ */ n.jsx(cr, { children: (a = s.examples) == null ? void 0 : a.map((r) => /* @__PURE__ */ n.jsx(
|
|
1578
|
+
Xe,
|
|
1579
|
+
{
|
|
1580
|
+
onSelect: () => t(r, s.mediaType),
|
|
1581
|
+
children: /* @__PURE__ */ n.jsx(
|
|
1582
|
+
"span",
|
|
1583
|
+
{
|
|
1584
|
+
className: "line-clamp-1",
|
|
1585
|
+
title: r.summary ?? r.name,
|
|
1586
|
+
children: r.summary ?? r.name
|
|
1587
|
+
}
|
|
1588
|
+
)
|
|
1589
|
+
},
|
|
1590
|
+
r.name
|
|
1591
|
+
)) })
|
|
1592
|
+
] }, s.mediaType);
|
|
1593
|
+
}) })
|
|
1594
|
+
] }), ge = S.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1595
|
+
ke.Root,
|
|
1596
|
+
{
|
|
1597
|
+
ref: s,
|
|
1598
|
+
className: b(
|
|
1599
|
+
"peer h-4 w-4 shrink-0 rounded-[min(6px,var(--radius)-4px)] 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",
|
|
1600
|
+
"border border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary",
|
|
1601
|
+
e
|
|
1602
|
+
),
|
|
1603
|
+
...t,
|
|
1604
|
+
children: /* @__PURE__ */ n.jsx(
|
|
1605
|
+
ke.Indicator,
|
|
1606
|
+
{
|
|
1607
|
+
className: b("flex items-center justify-center text-current"),
|
|
1608
|
+
children: /* @__PURE__ */ n.jsx(Cn, { className: "h-4 w-4" })
|
|
1609
|
+
}
|
|
1610
|
+
)
|
|
1611
|
+
}
|
|
1612
|
+
));
|
|
1613
|
+
ge.displayName = ke.Root.displayName;
|
|
1614
|
+
const fr = ce.Root, an = S.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...a }, r) => /* @__PURE__ */ n.jsx(ce.Portal, { children: /* @__PURE__ */ n.jsx(
|
|
1615
|
+
ce.Content,
|
|
1616
|
+
{
|
|
1617
|
+
ref: r,
|
|
1618
|
+
align: t,
|
|
1619
|
+
sideOffset: s,
|
|
1620
|
+
className: b(
|
|
1621
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1622
|
+
e
|
|
1623
|
+
),
|
|
1624
|
+
...a
|
|
1625
|
+
}
|
|
1626
|
+
) }));
|
|
1627
|
+
an.displayName = ce.Content.displayName;
|
|
1628
|
+
const xr = ({
|
|
1629
|
+
value: e,
|
|
1630
|
+
options: t,
|
|
1631
|
+
onChange: s,
|
|
1632
|
+
className: a,
|
|
1633
|
+
placeholder: r = "Enter value",
|
|
1634
|
+
onEnterPress: o,
|
|
1635
|
+
ref: i
|
|
1636
|
+
}) => {
|
|
1637
|
+
const [c, l] = L(!1), [u, m] = L(!1), y = es((g) => g.filtered.count), x = X(null);
|
|
1638
|
+
return /* @__PURE__ */ n.jsxs(fr, { open: c, children: [
|
|
1639
|
+
/* @__PURE__ */ n.jsx(Kn, { children: /* @__PURE__ */ n.jsx(
|
|
1640
|
+
ns,
|
|
1641
|
+
{
|
|
1642
|
+
ref: (g) => {
|
|
1643
|
+
x.current = g, typeof i == "function" ? i(g) : i && (i.current = g);
|
|
1644
|
+
},
|
|
1645
|
+
value: e,
|
|
1646
|
+
placeholder: r,
|
|
1647
|
+
className: b("h-9 bg-transparent", a),
|
|
1648
|
+
onFocus: () => l(!0),
|
|
1649
|
+
onBlur: () => {
|
|
1650
|
+
u || l(!1);
|
|
1651
|
+
},
|
|
1652
|
+
onKeyDown: (g) => {
|
|
1653
|
+
var f;
|
|
1654
|
+
g.key === "Enter" && (l(!1), (f = x.current) == null || f.blur(), o == null || o(g));
|
|
1655
|
+
},
|
|
1656
|
+
onValueChange: (g) => s(g)
|
|
1657
|
+
}
|
|
1658
|
+
) }),
|
|
1659
|
+
/* @__PURE__ */ n.jsx(
|
|
1660
|
+
an,
|
|
1661
|
+
{
|
|
1662
|
+
onMouseEnter: () => m(!0),
|
|
1663
|
+
onMouseLeave: () => m(!1),
|
|
1664
|
+
onOpenAutoFocus: (g) => g.preventDefault(),
|
|
1665
|
+
className: b("p-0 w-[--radix-popover-trigger-width]", {
|
|
1666
|
+
"border-0": y === 0
|
|
1667
|
+
}),
|
|
1668
|
+
align: "start",
|
|
1669
|
+
side: "bottom",
|
|
1670
|
+
onWheel: (g) => {
|
|
1671
|
+
g.stopPropagation();
|
|
1672
|
+
},
|
|
1673
|
+
onTouchMove: (g) => {
|
|
1674
|
+
g.stopPropagation();
|
|
1675
|
+
},
|
|
1676
|
+
children: /* @__PURE__ */ n.jsx(ss, { className: "max-h-[140px]", children: t.map((g) => /* @__PURE__ */ n.jsx(
|
|
1677
|
+
rs,
|
|
1678
|
+
{
|
|
1679
|
+
value: g,
|
|
1680
|
+
onSelect: (f) => {
|
|
1681
|
+
s(f), l(!1);
|
|
1682
|
+
},
|
|
1683
|
+
className: "cursor-pointer",
|
|
1684
|
+
children: g
|
|
1685
|
+
},
|
|
1686
|
+
g
|
|
1687
|
+
)) })
|
|
1688
|
+
}
|
|
1689
|
+
)
|
|
1690
|
+
] });
|
|
1691
|
+
}, de = ({ shouldFilter: e, ...t }) => /* @__PURE__ */ n.jsx(ts, { className: "bg-transparent", shouldFilter: e, children: /* @__PURE__ */ n.jsx(xr, { ...t }) }), Ze = (e, t) => {
|
|
1692
|
+
const s = S.forwardRef(({ className: a, asChild: r, ...o }, i) => {
|
|
1693
|
+
const c = r ? os : e;
|
|
1694
|
+
return S.createElement(c, {
|
|
1695
|
+
...o,
|
|
1696
|
+
ref: i,
|
|
1697
|
+
className: typeof t == "function" ? t({ className: a }) : b(t, a)
|
|
1698
|
+
});
|
|
1699
|
+
});
|
|
1700
|
+
return s.displayName = `VariantComponent(${e})`, s;
|
|
1701
|
+
}, Ye = Ze(
|
|
1702
|
+
"div",
|
|
1703
|
+
"grid grid-cols-[2fr_3fr] gap-2 items-center"
|
|
1704
|
+
), Ke = Ze(
|
|
1705
|
+
"div",
|
|
1706
|
+
"group hover:bg-accent px-3 grid col-span-full grid-cols-subgrid"
|
|
1707
|
+
), gr = Object.freeze([
|
|
1708
|
+
"Accept",
|
|
1709
|
+
"Accept-Encoding",
|
|
1710
|
+
"Accept-Language",
|
|
1711
|
+
"Authorization",
|
|
1712
|
+
"Cache-Control",
|
|
1713
|
+
"Connection",
|
|
1714
|
+
"Content-Disposition",
|
|
1715
|
+
"Content-Encoding",
|
|
1716
|
+
"Content-Language",
|
|
1717
|
+
"Content-Length",
|
|
1718
|
+
"Content-Range",
|
|
1719
|
+
"Content-Security-Policy",
|
|
1720
|
+
"Content-Type",
|
|
1721
|
+
"Cookie",
|
|
1722
|
+
"Date",
|
|
1723
|
+
"ETag",
|
|
1724
|
+
"Expires",
|
|
1725
|
+
"Host",
|
|
1726
|
+
"If-Modified-Since",
|
|
1727
|
+
"Location",
|
|
1728
|
+
"Origin",
|
|
1729
|
+
"Pragma",
|
|
1730
|
+
"Referer",
|
|
1731
|
+
"Set-Cookie",
|
|
1732
|
+
"User-Agent",
|
|
1733
|
+
"X-Requested-With"
|
|
1734
|
+
]), yr = ({
|
|
1735
|
+
control: e,
|
|
1736
|
+
headers: t
|
|
1737
|
+
}) => {
|
|
1738
|
+
const { fields: s, append: a, remove: r } = Ge({
|
|
1739
|
+
control: e,
|
|
1740
|
+
name: "headers"
|
|
1741
|
+
}), { setValue: o, watch: i } = Ue(), c = X([]), l = X([]), u = i("headers"), m = zn(() => {
|
|
1742
|
+
a({ name: "", value: "", active: !1 });
|
|
1743
|
+
}, [a]);
|
|
1744
|
+
le(() => {
|
|
1745
|
+
u.length === 0 && m();
|
|
1746
|
+
}, [u, m]);
|
|
1747
|
+
const y = (f) => {
|
|
1748
|
+
var p;
|
|
1749
|
+
(p = c.current[f]) == null || p.focus();
|
|
1750
|
+
}, x = (f) => {
|
|
1751
|
+
m(), requestAnimationFrame(() => {
|
|
1752
|
+
var p;
|
|
1753
|
+
return (p = l.current[f + 1]) == null ? void 0 : p.focus();
|
|
1754
|
+
});
|
|
1755
|
+
}, g = t.filter((f) => !u.some((p) => p.name === f.name)).map(({ name: f }) => f);
|
|
1756
|
+
return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1757
|
+
/* @__PURE__ */ n.jsx(he, { className: "overflow-hidden", children: /* @__PURE__ */ n.jsx(Ye, { children: s.map((f, p) => {
|
|
1758
|
+
const v = t.find(
|
|
1759
|
+
(j) => j.name === i(`headers.${p}.name`)
|
|
1760
|
+
);
|
|
1761
|
+
return /* @__PURE__ */ n.jsxs(Ke, { children: [
|
|
1762
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 ", children: [
|
|
1763
|
+
/* @__PURE__ */ n.jsx(
|
|
1764
|
+
q,
|
|
1765
|
+
{
|
|
1766
|
+
control: e,
|
|
1767
|
+
name: `headers.${p}.active`,
|
|
1768
|
+
render: ({ field: j }) => /* @__PURE__ */ n.jsx(
|
|
1769
|
+
ge,
|
|
1770
|
+
{
|
|
1771
|
+
id: `headers.${p}.active`,
|
|
1772
|
+
checked: j.value,
|
|
1773
|
+
onCheckedChange: (w) => {
|
|
1774
|
+
j.onChange(w);
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
)
|
|
1778
|
+
}
|
|
1779
|
+
),
|
|
1780
|
+
/* @__PURE__ */ n.jsx(
|
|
1781
|
+
q,
|
|
1782
|
+
{
|
|
1783
|
+
control: e,
|
|
1784
|
+
name: `headers.${p}.name`,
|
|
1785
|
+
render: ({ field: j }) => /* @__PURE__ */ n.jsx(
|
|
1786
|
+
de,
|
|
1787
|
+
{
|
|
1788
|
+
...j,
|
|
1789
|
+
placeholder: "Name",
|
|
1790
|
+
className: "border-0 shadow-none bg-transparent text-xs font-mono",
|
|
1791
|
+
options: [...g, ...gr],
|
|
1792
|
+
onEnterPress: () => y(p),
|
|
1793
|
+
onChange: (w) => {
|
|
1794
|
+
j.onChange(w), o(`headers.${p}.active`, !0);
|
|
1795
|
+
},
|
|
1796
|
+
ref: (w) => {
|
|
1797
|
+
l.current[p] = w;
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
)
|
|
1801
|
+
}
|
|
1802
|
+
)
|
|
1803
|
+
] }),
|
|
1804
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1805
|
+
/* @__PURE__ */ n.jsx(
|
|
1806
|
+
q,
|
|
1807
|
+
{
|
|
1808
|
+
control: e,
|
|
1809
|
+
name: `headers.${p}.value`,
|
|
1810
|
+
render: ({ field: j }) => (v == null ? void 0 : v.enum) && v.enum.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
1811
|
+
de,
|
|
1812
|
+
{
|
|
1813
|
+
shouldFilter: !1,
|
|
1814
|
+
value: j.value,
|
|
1815
|
+
options: v.enum ?? [],
|
|
1816
|
+
onChange: (E) => {
|
|
1817
|
+
j.onChange(E), o(`headers.${p}.active`, !0);
|
|
1818
|
+
},
|
|
1819
|
+
className: "font-mono text-xs border-0"
|
|
1820
|
+
}
|
|
1821
|
+
) : /* @__PURE__ */ n.jsx(
|
|
1822
|
+
He,
|
|
1823
|
+
{
|
|
1824
|
+
placeholder: "Value",
|
|
1825
|
+
className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0",
|
|
1826
|
+
...j,
|
|
1827
|
+
ref: (E) => {
|
|
1828
|
+
c.current[p] = E;
|
|
1829
|
+
},
|
|
1830
|
+
onKeyDown: (E) => {
|
|
1831
|
+
E.key === "Enter" && E.currentTarget.value.trim() && x(p);
|
|
1832
|
+
},
|
|
1833
|
+
autoComplete: "off"
|
|
1834
|
+
}
|
|
1835
|
+
)
|
|
1836
|
+
}
|
|
1837
|
+
),
|
|
1838
|
+
/* @__PURE__ */ n.jsx(
|
|
1839
|
+
ne,
|
|
1840
|
+
{
|
|
1841
|
+
size: "icon",
|
|
1842
|
+
variant: "ghost",
|
|
1843
|
+
className: "text-muted-foreground opacity-0 group-hover:opacity-100 rounded-full w-8 h-7",
|
|
1844
|
+
onClick: () => r(p),
|
|
1845
|
+
type: "button",
|
|
1846
|
+
children: /* @__PURE__ */ n.jsx(Sn, { size: 16 })
|
|
1847
|
+
}
|
|
1848
|
+
)
|
|
1849
|
+
] })
|
|
1850
|
+
] }, f.id);
|
|
1851
|
+
}) }) }),
|
|
1852
|
+
/* @__PURE__ */ n.jsx("div", { className: "text-end", children: /* @__PURE__ */ n.jsx(
|
|
1853
|
+
ne,
|
|
1854
|
+
{
|
|
1855
|
+
className: "",
|
|
1856
|
+
onClick: m,
|
|
1857
|
+
type: "button",
|
|
1858
|
+
variant: "secondary",
|
|
1859
|
+
children: "Add header"
|
|
1860
|
+
}
|
|
1861
|
+
) })
|
|
1862
|
+
] });
|
|
1863
|
+
}, vr = qt(
|
|
1864
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1865
|
+
), J = S.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1866
|
+
_t.Root,
|
|
1867
|
+
{
|
|
1868
|
+
ref: s,
|
|
1869
|
+
className: b(vr(), e),
|
|
1870
|
+
...t
|
|
1871
|
+
}
|
|
1872
|
+
));
|
|
1873
|
+
J.displayName = _t.Root.displayName;
|
|
1874
|
+
const et = S.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1875
|
+
se.Root,
|
|
1876
|
+
{
|
|
1877
|
+
className: b("grid gap-2", e),
|
|
1878
|
+
...t,
|
|
1879
|
+
ref: s
|
|
1880
|
+
}
|
|
1881
|
+
));
|
|
1882
|
+
et.displayName = se.Root.displayName;
|
|
1883
|
+
const ue = S.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1884
|
+
se.Item,
|
|
1885
|
+
{
|
|
1886
|
+
ref: s,
|
|
1887
|
+
className: b(
|
|
1888
|
+
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1889
|
+
e
|
|
1890
|
+
),
|
|
1891
|
+
...t,
|
|
1892
|
+
children: /* @__PURE__ */ n.jsx(se.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ n.jsx(wn, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
1893
|
+
}
|
|
1894
|
+
));
|
|
1895
|
+
ue.displayName = se.Item.displayName;
|
|
1896
|
+
const on = ({
|
|
1897
|
+
identities: e,
|
|
1898
|
+
setValue: t,
|
|
1899
|
+
value: s
|
|
1900
|
+
}) => /* @__PURE__ */ n.jsx(he, { className: "w-full overflow-hidden", children: /* @__PURE__ */ n.jsxs(
|
|
1901
|
+
et,
|
|
1902
|
+
{
|
|
1903
|
+
onValueChange: (a) => t(a),
|
|
1904
|
+
value: s,
|
|
1905
|
+
defaultValue: W,
|
|
1906
|
+
className: "gap-0",
|
|
1907
|
+
disabled: (e == null ? void 0 : e.length) === 0,
|
|
1908
|
+
children: [
|
|
1909
|
+
/* @__PURE__ */ n.jsxs(
|
|
1910
|
+
J,
|
|
1911
|
+
{
|
|
1912
|
+
className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
|
|
1913
|
+
htmlFor: "none",
|
|
1914
|
+
children: [
|
|
1915
|
+
/* @__PURE__ */ n.jsx(ue, { value: W, id: "none", children: "None" }),
|
|
1916
|
+
/* @__PURE__ */ n.jsx(J, { htmlFor: "none", className: "ms-2", children: "None" })
|
|
1917
|
+
]
|
|
1918
|
+
}
|
|
1919
|
+
),
|
|
1920
|
+
e == null ? void 0 : e.map((a) => /* @__PURE__ */ n.jsxs(
|
|
1921
|
+
J,
|
|
1922
|
+
{
|
|
1923
|
+
className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
|
|
1924
|
+
children: [
|
|
1925
|
+
/* @__PURE__ */ n.jsx(ue, { value: a.id, id: a.id, children: a.label }),
|
|
1926
|
+
/* @__PURE__ */ n.jsx(J, { htmlFor: a.id, className: "ms-2", children: a.label })
|
|
1927
|
+
]
|
|
1928
|
+
},
|
|
1929
|
+
a.id
|
|
1930
|
+
))
|
|
1931
|
+
]
|
|
1932
|
+
}
|
|
1933
|
+
) }), br = ({
|
|
1934
|
+
onSubmit: e,
|
|
1935
|
+
identities: t,
|
|
1936
|
+
open: s,
|
|
1937
|
+
onOpenChange: a
|
|
1938
|
+
}) => {
|
|
1939
|
+
const [r, o] = L(void 0), [i, c] = L(!1);
|
|
1940
|
+
return /* @__PURE__ */ n.jsx(Be, { open: s, onOpenChange: a, children: /* @__PURE__ */ n.jsxs(ze, { children: [
|
|
1941
|
+
/* @__PURE__ */ n.jsx(Me, { children: "Select an auth identity" }),
|
|
1942
|
+
/* @__PURE__ */ n.jsx(kt, { children: "Please select an identity for this request." }),
|
|
1943
|
+
/* @__PURE__ */ n.jsx("div", { className: "max-h-80 overflow-auto", children: /* @__PURE__ */ n.jsx(
|
|
1944
|
+
on,
|
|
1945
|
+
{
|
|
1946
|
+
identities: t,
|
|
1947
|
+
setValue: o,
|
|
1948
|
+
value: r
|
|
1949
|
+
}
|
|
1950
|
+
) }),
|
|
1951
|
+
/* @__PURE__ */ n.jsxs(Dt, { className: "flex flex-col gap-2", children: [
|
|
1952
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1953
|
+
/* @__PURE__ */ n.jsx(
|
|
1954
|
+
ge,
|
|
1955
|
+
{
|
|
1956
|
+
id: "remember",
|
|
1957
|
+
checked: i,
|
|
1958
|
+
onCheckedChange: (l) => c(
|
|
1959
|
+
l === "indeterminate" ? !1 : !!l
|
|
1960
|
+
)
|
|
1961
|
+
}
|
|
1962
|
+
),
|
|
1963
|
+
/* @__PURE__ */ n.jsx(J, { htmlFor: "remember", children: "Remember my choice" })
|
|
1964
|
+
] }),
|
|
1965
|
+
/* @__PURE__ */ n.jsx(
|
|
1966
|
+
V,
|
|
1967
|
+
{
|
|
1968
|
+
onClick: () => e({ identity: r, rememberedIdentity: i }),
|
|
1969
|
+
children: "Send"
|
|
1970
|
+
}
|
|
1971
|
+
)
|
|
1972
|
+
] })
|
|
1973
|
+
] }) });
|
|
1974
|
+
}, jr = ({
|
|
1975
|
+
control: e,
|
|
1976
|
+
url: t
|
|
1977
|
+
}) => {
|
|
1978
|
+
const { fields: s } = Ge({
|
|
1979
|
+
control: e,
|
|
1980
|
+
name: "pathParams"
|
|
1981
|
+
}), a = [...s].sort(
|
|
1982
|
+
(r, o) => t.indexOf(`{${r.name}}`) - t.indexOf(`{${o.name}}`)
|
|
1983
|
+
);
|
|
1984
|
+
return /* @__PURE__ */ n.jsx(he, { className: "rounded-lg", children: /* @__PURE__ */ n.jsx(Ye, { children: a.map((r, o) => /* @__PURE__ */ n.jsxs(Ke, { children: [
|
|
1985
|
+
/* @__PURE__ */ n.jsx(
|
|
1986
|
+
q,
|
|
1987
|
+
{
|
|
1988
|
+
control: e,
|
|
1989
|
+
name: `pathParams.${o}.name`,
|
|
1990
|
+
render: () => /* @__PURE__ */ n.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ n.jsx(
|
|
1991
|
+
en,
|
|
1992
|
+
{
|
|
1993
|
+
slug: r.name,
|
|
1994
|
+
name: r.name,
|
|
1995
|
+
className: "font-mono text-xs px-2"
|
|
1996
|
+
}
|
|
1997
|
+
) })
|
|
1998
|
+
}
|
|
1999
|
+
),
|
|
2000
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ n.jsx(
|
|
2001
|
+
q,
|
|
2002
|
+
{
|
|
2003
|
+
control: e,
|
|
2004
|
+
name: `pathParams.${o}.value`,
|
|
2005
|
+
render: ({ field: i }) => /* @__PURE__ */ n.jsx(
|
|
2006
|
+
He,
|
|
2007
|
+
{
|
|
2008
|
+
...i,
|
|
2009
|
+
required: !0,
|
|
2010
|
+
placeholder: "Enter value",
|
|
2011
|
+
className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0"
|
|
2012
|
+
}
|
|
2013
|
+
)
|
|
2014
|
+
}
|
|
2015
|
+
) })
|
|
2016
|
+
] }, r.id)) }) });
|
|
2017
|
+
}, Nr = Ze(
|
|
2018
|
+
"input",
|
|
2019
|
+
"px-2 bg-transparent h-6 font-mono text-xs m-2"
|
|
2020
|
+
), Cr = ({
|
|
2021
|
+
control: e,
|
|
2022
|
+
queryParams: t
|
|
2023
|
+
}) => {
|
|
2024
|
+
const { fields: s } = Ge({
|
|
2025
|
+
control: e,
|
|
2026
|
+
name: "queryParams"
|
|
2027
|
+
}), a = Ue(), r = t.map((o) => !!o.isRequired);
|
|
2028
|
+
return /* @__PURE__ */ n.jsx(he, { className: "rounded-lg", children: /* @__PURE__ */ n.jsx("div", { className: "w-full ", children: /* @__PURE__ */ n.jsx(Ye, { children: s.map((o, i) => {
|
|
2029
|
+
const c = t.find(
|
|
2030
|
+
(l) => l.name === a.watch(`queryParams.${i}.name`)
|
|
2031
|
+
);
|
|
2032
|
+
return /* @__PURE__ */ n.jsxs(Ke, { children: [
|
|
2033
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2034
|
+
/* @__PURE__ */ n.jsx(
|
|
2035
|
+
q,
|
|
2036
|
+
{
|
|
2037
|
+
control: e,
|
|
2038
|
+
name: `queryParams.${i}.active`,
|
|
2039
|
+
render: ({ field: l }) => /* @__PURE__ */ n.jsx(
|
|
2040
|
+
ge,
|
|
2041
|
+
{
|
|
2042
|
+
id: `queryParams.${i}.active`,
|
|
2043
|
+
className: "me-2",
|
|
2044
|
+
checked: l.value,
|
|
2045
|
+
onCheckedChange: l.onChange
|
|
2046
|
+
}
|
|
2047
|
+
)
|
|
2048
|
+
}
|
|
2049
|
+
),
|
|
2050
|
+
/* @__PURE__ */ n.jsx(
|
|
2051
|
+
q,
|
|
2052
|
+
{
|
|
2053
|
+
control: e,
|
|
2054
|
+
render: ({ field: l }) => r[i] ? /* @__PURE__ */ n.jsx(Nr, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
|
|
2055
|
+
"label",
|
|
2056
|
+
{
|
|
2057
|
+
className: "flex items-center cursor-pointer gap-1",
|
|
2058
|
+
htmlFor: `queryParams.${i}.active`,
|
|
2059
|
+
title: r[i] ? "Required field" : void 0,
|
|
2060
|
+
children: [
|
|
2061
|
+
l.value,
|
|
2062
|
+
r[i] && /* @__PURE__ */ n.jsx("sup", { children: " *" })
|
|
2063
|
+
]
|
|
2064
|
+
}
|
|
2065
|
+
) }) : /* @__PURE__ */ n.jsx(
|
|
2066
|
+
de,
|
|
2067
|
+
{
|
|
2068
|
+
value: l.value,
|
|
2069
|
+
options: t.map((u) => u.name),
|
|
2070
|
+
onChange: (u) => {
|
|
2071
|
+
l.onChange(u);
|
|
2072
|
+
},
|
|
2073
|
+
className: "border-0 font-mono text-xs bg-transparent hover:bg-transparent"
|
|
2074
|
+
}
|
|
2075
|
+
),
|
|
2076
|
+
name: `queryParams.${i}.name`
|
|
2077
|
+
}
|
|
2078
|
+
)
|
|
2079
|
+
] }, o.id),
|
|
2080
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ n.jsx(
|
|
2081
|
+
q,
|
|
2082
|
+
{
|
|
2083
|
+
control: e,
|
|
2084
|
+
render: ({ field: l }) => (c == null ? void 0 : c.enum) && c.enum.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
2085
|
+
de,
|
|
2086
|
+
{
|
|
2087
|
+
value: l.value,
|
|
2088
|
+
options: c.enum ?? [],
|
|
2089
|
+
onChange: (m) => {
|
|
2090
|
+
l.onChange(m), a.setValue(`queryParams.${i}.active`, !0);
|
|
2091
|
+
},
|
|
2092
|
+
className: "font-mono text-xs border-0 ring-1 ring-ring"
|
|
2093
|
+
}
|
|
2094
|
+
) : /* @__PURE__ */ n.jsx(
|
|
2095
|
+
He,
|
|
2096
|
+
{
|
|
2097
|
+
...l,
|
|
2098
|
+
onChange: (m) => {
|
|
2099
|
+
l.onChange(m.target.value), m.target.value.length > 0 && a.setValue(`queryParams.${i}.active`, !0);
|
|
2100
|
+
},
|
|
2101
|
+
placeholder: "Enter value",
|
|
2102
|
+
className: "w-full border-0 shadow-none focus-visible:ring-0 text-xs font-mono"
|
|
2103
|
+
}
|
|
2104
|
+
),
|
|
2105
|
+
name: `queryParams.${i}.value`
|
|
2106
|
+
}
|
|
2107
|
+
) })
|
|
2108
|
+
] }, o.id);
|
|
2109
|
+
}) }) }) });
|
|
2110
|
+
}, Sr = Lt()(
|
|
2111
|
+
Rt(
|
|
2112
|
+
(e, t) => ({
|
|
2113
|
+
rememberedIdentity: null,
|
|
2114
|
+
setRememberedIdentity: (s) => e({ rememberedIdentity: s }),
|
|
2115
|
+
getRememberedIdentity: (s) => s.find(
|
|
2116
|
+
(a) => a === t().rememberedIdentity
|
|
2117
|
+
)
|
|
2118
|
+
}),
|
|
2119
|
+
{
|
|
2120
|
+
name: "identity-storage",
|
|
2121
|
+
storage: In(() => sessionStorage)
|
|
2122
|
+
}
|
|
2123
|
+
)
|
|
2124
|
+
), wr = ({
|
|
2125
|
+
open: e,
|
|
2126
|
+
setOpen: t,
|
|
2127
|
+
onSignUp: s,
|
|
2128
|
+
onLogin: a
|
|
2129
|
+
}) => /* @__PURE__ */ n.jsx(Be, { open: e, onOpenChange: t, children: /* @__PURE__ */ n.jsxs(ze, { children: [
|
|
2130
|
+
/* @__PURE__ */ n.jsx(Me, { children: "Welcome to the Playground!" }),
|
|
2131
|
+
/* @__PURE__ */ n.jsx(kt, { children: "The Playground is a tool for developers to test and explore our APIs. To use the Playground, you need to login." }),
|
|
2132
|
+
/* @__PURE__ */ n.jsxs(Dt, { className: "flex gap-2 sm:justify-between", children: [
|
|
2133
|
+
/* @__PURE__ */ n.jsx(V, { type: "button", variant: "ghost", onClick: () => t(!1), children: "Skip" }),
|
|
2134
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex gap-2", children: [
|
|
2135
|
+
s && /* @__PURE__ */ n.jsx(V, { type: "button", variant: "outline", onClick: s, children: "Sign Up" }),
|
|
2136
|
+
a && /* @__PURE__ */ n.jsx(V, { type: "button", variant: "default", onClick: a, children: "Login" })
|
|
2137
|
+
] })
|
|
2138
|
+
] })
|
|
2139
|
+
] }) }), R = {
|
|
2140
|
+
green: "text-green-600",
|
|
2141
|
+
blue: "text-sky-600",
|
|
2142
|
+
yellow: "text-yellow-600",
|
|
2143
|
+
red: "text-red-600",
|
|
2144
|
+
purple: "text-purple-600",
|
|
2145
|
+
indigo: "text-indigo-600",
|
|
2146
|
+
gray: "text-gray-600"
|
|
2147
|
+
}, Tr = {
|
|
2148
|
+
get: R.green,
|
|
2149
|
+
post: R.blue,
|
|
2150
|
+
put: R.yellow,
|
|
2151
|
+
delete: R.red,
|
|
2152
|
+
patch: R.purple,
|
|
2153
|
+
options: R.indigo,
|
|
2154
|
+
head: R.gray,
|
|
2155
|
+
trace: R.gray
|
|
2156
|
+
}, Ar = (e) => Tr[e.toLocaleLowerCase()] ?? R.gray, Or = ({
|
|
2157
|
+
method: e,
|
|
2158
|
+
url: t,
|
|
2159
|
+
headers: s,
|
|
2160
|
+
body: a
|
|
2161
|
+
}) => /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 font-mono text-xs", children: [
|
|
2162
|
+
/* @__PURE__ */ n.jsxs("div", { className: "gap-2 p-2 bg-muted rounded-md", children: [
|
|
2163
|
+
/* @__PURE__ */ n.jsx("span", { className: b(Ar(e), "font-semibold"), children: e }),
|
|
2164
|
+
" ",
|
|
2165
|
+
/* @__PURE__ */ n.jsx("span", { className: "break-all", children: t }),
|
|
2166
|
+
" ",
|
|
2167
|
+
/* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "HTTP/1.1" })
|
|
2168
|
+
] }),
|
|
2169
|
+
/* @__PURE__ */ n.jsxs("div", { className: "mx-1.5 flex flex-col gap-3", children: [
|
|
2170
|
+
/* @__PURE__ */ n.jsxs(gt, { defaultOpen: !0, children: [
|
|
2171
|
+
/* @__PURE__ */ n.jsxs(yt, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
2172
|
+
/* @__PURE__ */ n.jsx(te, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
2173
|
+
/* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
2174
|
+
] }),
|
|
2175
|
+
/* @__PURE__ */ n.jsx(vt, { children: /* @__PURE__ */ n.jsx("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 ps-1.5 pt-2", children: s.map(([r, o]) => /* @__PURE__ */ n.jsxs(D, { children: [
|
|
2176
|
+
/* @__PURE__ */ n.jsx("div", { className: "text-primary", children: r }),
|
|
2177
|
+
/* @__PURE__ */ n.jsx("div", { className: "break-all", children: o })
|
|
2178
|
+
] }, r)) }) })
|
|
2179
|
+
] }),
|
|
2180
|
+
/* @__PURE__ */ n.jsxs(gt, { defaultOpen: !0, children: [
|
|
2181
|
+
/* @__PURE__ */ n.jsxs(yt, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
2182
|
+
/* @__PURE__ */ n.jsx(te, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
2183
|
+
/* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Body" })
|
|
2184
|
+
] }),
|
|
2185
|
+
/* @__PURE__ */ n.jsx(vt, { children: /* @__PURE__ */ n.jsx("div", { className: "ps-0 pt-2", children: /* @__PURE__ */ n.jsx(
|
|
2186
|
+
"div",
|
|
2187
|
+
{
|
|
2188
|
+
className: b(
|
|
2189
|
+
"whitespace-pre-wrap break-all bg-muted p-2 rounded-md",
|
|
2190
|
+
!a && "text-muted-foreground"
|
|
2191
|
+
),
|
|
2192
|
+
children: a ?? "Empty body"
|
|
2193
|
+
}
|
|
2194
|
+
) }) })
|
|
2195
|
+
] })
|
|
2196
|
+
] })
|
|
2197
|
+
] }), wt = Qe.Root, Tt = Qe.CollapsibleTrigger, At = Qe.CollapsibleContent;
|
|
2198
|
+
function tt(e) {
|
|
2199
|
+
if (e === null) return "null";
|
|
2200
|
+
if (Array.isArray(e)) {
|
|
2201
|
+
if (e.length === 0) return "any[]";
|
|
2202
|
+
const t = e[0];
|
|
2203
|
+
return t === void 0 ? "any[]" : `${tt(t)}[]`;
|
|
2204
|
+
}
|
|
2205
|
+
return typeof e == "object" ? $r(e) : typeof e;
|
|
2206
|
+
}
|
|
2207
|
+
function $r(e, t = "") {
|
|
2208
|
+
const s = ["{"];
|
|
2209
|
+
for (const [a, r] of Object.entries(e)) {
|
|
2210
|
+
const o = tt(r);
|
|
2211
|
+
s.push(` ${a}: ${o};`);
|
|
2212
|
+
}
|
|
2213
|
+
return s.push("}"), s.join(`
|
|
2214
|
+
`);
|
|
2215
|
+
}
|
|
2216
|
+
function Er(e) {
|
|
2217
|
+
return { lines: [`type GeneratedType = ${tt(e)};`] };
|
|
2218
|
+
}
|
|
2219
|
+
const Pr = {
|
|
2220
|
+
200: "OK",
|
|
2221
|
+
201: "Created",
|
|
2222
|
+
202: "Accepted",
|
|
2223
|
+
204: "No Content",
|
|
2224
|
+
400: "Bad Request",
|
|
2225
|
+
401: "Unauthorized",
|
|
2226
|
+
403: "Forbidden",
|
|
2227
|
+
404: "Not Found",
|
|
2228
|
+
405: "Method Not Allowed",
|
|
2229
|
+
500: "Internal Server Error"
|
|
2230
|
+
}, Ot = (e) => {
|
|
2231
|
+
const t = Math.floor(Math.log(e) / Math.log(1e3));
|
|
2232
|
+
return `${(e / Math.pow(1e3, t)).toFixed(
|
|
2233
|
+
t ? 2 : 0
|
|
2234
|
+
)} ${t ? `${"kMGTPEZY"[t - 1]}B` : "B"}`;
|
|
2235
|
+
}, Lr = (e) => {
|
|
2236
|
+
var s;
|
|
2237
|
+
return (s = Object.entries({
|
|
2238
|
+
"application/json": "json",
|
|
2239
|
+
"text/json": "json",
|
|
2240
|
+
"text/html": "html",
|
|
2241
|
+
"text/css": "css",
|
|
2242
|
+
"text/javascript": "javascript",
|
|
2243
|
+
"application/xml": "xml",
|
|
2244
|
+
"application/xhtml+xml": "xhtml"
|
|
2245
|
+
}).find(
|
|
2246
|
+
([a]) => e.includes(a)
|
|
2247
|
+
)) == null ? void 0 : s[1];
|
|
2248
|
+
}, Rr = (e) => {
|
|
2249
|
+
var s;
|
|
2250
|
+
const t = ((s = e.find(([a, r]) => a === "Content-Type")) == null ? void 0 : s[1]) || "";
|
|
2251
|
+
return Lr(t);
|
|
2252
|
+
}, Ir = (e) => {
|
|
2253
|
+
try {
|
|
2254
|
+
return JSON.stringify(JSON.parse(e), null, 2);
|
|
2255
|
+
} catch {
|
|
2256
|
+
return null;
|
|
2257
|
+
}
|
|
2258
|
+
}, kr = (e) => {
|
|
2259
|
+
const t = [
|
|
2260
|
+
"Content-Type",
|
|
2261
|
+
"Content-Length",
|
|
2262
|
+
"Authorization",
|
|
2263
|
+
"X-RateLimit-Remaining",
|
|
2264
|
+
"X-RateLimit-Limit",
|
|
2265
|
+
"Cache-Control",
|
|
2266
|
+
"ETag"
|
|
2267
|
+
].map((s) => s.toLowerCase());
|
|
2268
|
+
return [...e].sort(([s], [a]) => {
|
|
2269
|
+
const r = t.indexOf(s.toLowerCase()), o = t.indexOf(a.toLowerCase());
|
|
2270
|
+
return r === o ? 0 : r === -1 ? 1 : o === -1 ? -1 : r - o;
|
|
2271
|
+
});
|
|
2272
|
+
}, $t = 64e3, Dr = ({
|
|
2273
|
+
body: e = "",
|
|
2274
|
+
headers: t,
|
|
2275
|
+
status: s,
|
|
2276
|
+
time: a,
|
|
2277
|
+
size: r,
|
|
2278
|
+
url: o
|
|
2279
|
+
}) => {
|
|
2280
|
+
var f;
|
|
2281
|
+
const i = Rr(t), c = Ir(e), l = c || e, [u, m] = L(
|
|
2282
|
+
c ? "formatted" : "raw"
|
|
2283
|
+
), y = kn({
|
|
2284
|
+
queryKey: ["types", l],
|
|
2285
|
+
queryFn: async () => Er(JSON.parse(l)),
|
|
2286
|
+
enabled: u === "types"
|
|
2287
|
+
}), x = kr([...t]), g = r > $t;
|
|
2288
|
+
return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 h-full overflow-auto max-h-[calc(100vh-220px)] ", children: [
|
|
2289
|
+
/* @__PURE__ */ n.jsxs(wt, { defaultOpen: !0, children: [
|
|
2290
|
+
/* @__PURE__ */ n.jsxs(Tt, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
2291
|
+
/* @__PURE__ */ n.jsx(te, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
2292
|
+
/* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
2293
|
+
] }),
|
|
2294
|
+
/* @__PURE__ */ n.jsx(At, { children: /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 ps-1.5 pt-2 font-mono text-xs", children: [
|
|
2295
|
+
x.slice(0, 5).map(([p, v]) => /* @__PURE__ */ n.jsxs(D, { children: [
|
|
2296
|
+
/* @__PURE__ */ n.jsx("div", { className: "text-primary whitespace-pre", children: p }),
|
|
2297
|
+
/* @__PURE__ */ n.jsx("div", { className: "break-all", children: v })
|
|
2298
|
+
] }, p)),
|
|
2299
|
+
x.length > 5 && /* @__PURE__ */ n.jsxs(wt, { className: "col-span-full grid-cols-subgrid grid", children: [
|
|
2300
|
+
/* @__PURE__ */ n.jsxs(Tt, { className: "col-span-2 text-xs text-muted-foreground hover:text-primary flex items-center gap-1 py-1", children: [
|
|
2301
|
+
/* @__PURE__ */ n.jsx(te, { className: "h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
2302
|
+
"Show ",
|
|
2303
|
+
x.length - 5,
|
|
2304
|
+
" more headers"
|
|
2305
|
+
] }),
|
|
2306
|
+
/* @__PURE__ */ n.jsx(At, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: x.slice(5).map(([p, v]) => /* @__PURE__ */ n.jsxs(D, { children: [
|
|
2307
|
+
/* @__PURE__ */ n.jsx("div", { className: "text-primary whitespace-pre", children: p }),
|
|
2308
|
+
/* @__PURE__ */ n.jsx("div", { className: "break-all", children: v })
|
|
2309
|
+
] }, p)) })
|
|
2310
|
+
] })
|
|
2311
|
+
] }) })
|
|
2312
|
+
] }),
|
|
2313
|
+
/* @__PURE__ */ n.jsxs(Bt, { className: "shadow-none", children: [
|
|
2314
|
+
g && /* @__PURE__ */ n.jsxs(as, { type: "info", className: "my-0 p-2", children: [
|
|
2315
|
+
"Code highlight is disabled for responses larger than",
|
|
2316
|
+
" ",
|
|
2317
|
+
Ot($t)
|
|
2318
|
+
] }),
|
|
2319
|
+
/* @__PURE__ */ n.jsx(
|
|
2320
|
+
ms,
|
|
2321
|
+
{
|
|
2322
|
+
language: u === "types" ? "typescript" : u === "raw" ? c ? "plain" : i : "json",
|
|
2323
|
+
showCopy: "always",
|
|
2324
|
+
disabled: g,
|
|
2325
|
+
noBackground: !0,
|
|
2326
|
+
className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
|
|
2327
|
+
code: (u === "raw" ? e : u === "types" ? (f = y.data) == null ? void 0 : f.lines.join(`
|
|
2328
|
+
`) : l) ?? ""
|
|
2329
|
+
}
|
|
2330
|
+
)
|
|
2331
|
+
] }),
|
|
2332
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex gap-2 justify-between items-center", children: [
|
|
2333
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex text-xs gap-2 border bg-muted rounded-md p-2 items-center h-8 font-mono divide-x", children: [
|
|
2334
|
+
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
2335
|
+
/* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Status" }),
|
|
2336
|
+
" ",
|
|
2337
|
+
s,
|
|
2338
|
+
" ",
|
|
2339
|
+
Pr[s] ?? ""
|
|
2340
|
+
] }),
|
|
2341
|
+
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
2342
|
+
/* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Time" }),
|
|
2343
|
+
" ",
|
|
2344
|
+
a.toFixed(0),
|
|
2345
|
+
"ms"
|
|
2346
|
+
] }),
|
|
2347
|
+
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
2348
|
+
/* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Size" }),
|
|
2349
|
+
" ",
|
|
2350
|
+
Ot(r)
|
|
2351
|
+
] })
|
|
2352
|
+
] }),
|
|
2353
|
+
c && /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsxs(
|
|
2354
|
+
Pe,
|
|
2355
|
+
{
|
|
2356
|
+
value: u,
|
|
2357
|
+
onValueChange: (p) => m(p),
|
|
2358
|
+
children: [
|
|
2359
|
+
/* @__PURE__ */ n.jsx(Le, { className: "min-w-32", children: /* @__PURE__ */ n.jsx(Re, { placeholder: "View" }) }),
|
|
2360
|
+
/* @__PURE__ */ n.jsxs(Ie, { children: [
|
|
2361
|
+
/* @__PURE__ */ n.jsx(ee, { value: "formatted", children: "Formatted" }),
|
|
2362
|
+
/* @__PURE__ */ n.jsx(ee, { value: "raw", children: "Raw" }),
|
|
2363
|
+
/* @__PURE__ */ n.jsx(ee, { value: "types", children: "Types" })
|
|
2364
|
+
] })
|
|
2365
|
+
]
|
|
2366
|
+
}
|
|
2367
|
+
) })
|
|
2368
|
+
] })
|
|
2369
|
+
] });
|
|
2370
|
+
}, qr = ({
|
|
2371
|
+
queryMutation: e,
|
|
2372
|
+
showPathParamsWarning: t,
|
|
2373
|
+
showLongRunningWarning: s,
|
|
2374
|
+
onCancel: a
|
|
2375
|
+
}) => {
|
|
2376
|
+
var o;
|
|
2377
|
+
const r = ((((o = e.data) == null ? void 0 : o.status) ?? 0) / 100).toFixed(0);
|
|
2378
|
+
return /* @__PURE__ */ n.jsx("div", { className: "min-w-0 p-4 py-8 bg-muted/50", children: e.error ? /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2379
|
+
t && /* @__PURE__ */ n.jsx(ls, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
|
|
2380
|
+
/* @__PURE__ */ n.jsxs(Bt, { children: [
|
|
2381
|
+
/* @__PURE__ */ n.jsx(cs, { children: /* @__PURE__ */ n.jsx(ds, { children: "Request failed" }) }),
|
|
2382
|
+
/* @__PURE__ */ n.jsxs(us, { children: [
|
|
2383
|
+
"Error:",
|
|
2384
|
+
" ",
|
|
2385
|
+
e.error.message || String(e.error) || "Unexpected error"
|
|
2386
|
+
] })
|
|
2387
|
+
] })
|
|
2388
|
+
] }) : e.data ? /* @__PURE__ */ n.jsxs(Vt, { defaultValue: "response", children: [
|
|
2389
|
+
/* @__PURE__ */ n.jsxs(Ft, { children: [
|
|
2390
|
+
/* @__PURE__ */ n.jsx(H, { value: "request", children: "Request" }),
|
|
2391
|
+
/* @__PURE__ */ n.jsxs(H, { value: "response", children: [
|
|
2392
|
+
"Response",
|
|
2393
|
+
/* @__PURE__ */ n.jsxs(
|
|
2394
|
+
"span",
|
|
2395
|
+
{
|
|
2396
|
+
className: b(
|
|
2397
|
+
"text-xs font-mono ms-1",
|
|
2398
|
+
r === "2" && "text-green-500",
|
|
2399
|
+
r === "3" && "text-blue-500",
|
|
2400
|
+
r === "4" && "text-yellow-500",
|
|
2401
|
+
r === "5" && "text-red-500"
|
|
2402
|
+
),
|
|
2403
|
+
children: [
|
|
2404
|
+
"(",
|
|
2405
|
+
e.data.status,
|
|
2406
|
+
")"
|
|
2407
|
+
]
|
|
2408
|
+
}
|
|
2409
|
+
)
|
|
2410
|
+
] })
|
|
2411
|
+
] }),
|
|
2412
|
+
/* @__PURE__ */ n.jsx(Q, { value: "request", children: /* @__PURE__ */ n.jsx(Or, { ...e.data.request }) }),
|
|
2413
|
+
/* @__PURE__ */ n.jsx(Q, { value: "response", children: /* @__PURE__ */ n.jsx(
|
|
2414
|
+
Dr,
|
|
2415
|
+
{
|
|
2416
|
+
status: e.data.status,
|
|
2417
|
+
time: e.data.time,
|
|
2418
|
+
size: e.data.size,
|
|
2419
|
+
headers: e.data.headers,
|
|
2420
|
+
body: e.data.body,
|
|
2421
|
+
url: e.data.request.url
|
|
2422
|
+
}
|
|
2423
|
+
) })
|
|
2424
|
+
] }) : /* @__PURE__ */ n.jsx("div", { className: "grid place-items-center h-full", children: e.isPending ? /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 items-center mt-20", children: [
|
|
2425
|
+
/* @__PURE__ */ n.jsx(is, { size: 20 }),
|
|
2426
|
+
/* @__PURE__ */ n.jsxs(
|
|
2427
|
+
"div",
|
|
2428
|
+
{
|
|
2429
|
+
className: b(
|
|
2430
|
+
"opacity-0 pointer-events-none transition-opacity h-20 text-sm text-muted-foreground duration-300 flex flex-col gap-2 items-center",
|
|
2431
|
+
s && "opacity-100 pointer-events-auto"
|
|
2432
|
+
),
|
|
2433
|
+
children: [
|
|
2434
|
+
"Looks like the request is taking longer than expected.",
|
|
2435
|
+
/* @__PURE__ */ n.jsx(
|
|
2436
|
+
ne,
|
|
2437
|
+
{
|
|
2438
|
+
type: "button",
|
|
2439
|
+
onClick: a,
|
|
2440
|
+
size: "sm",
|
|
2441
|
+
className: "w-fit",
|
|
2442
|
+
variant: "outline",
|
|
2443
|
+
children: "Cancel"
|
|
2444
|
+
}
|
|
2445
|
+
)
|
|
2446
|
+
]
|
|
2447
|
+
}
|
|
2448
|
+
)
|
|
2449
|
+
] }) : /* @__PURE__ */ n.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: "Send a request first to see the response here" }) }) });
|
|
2450
|
+
}, Vr = ({
|
|
2451
|
+
identities: e,
|
|
2452
|
+
formRef: t,
|
|
2453
|
+
disabled: s
|
|
2454
|
+
}) => {
|
|
2455
|
+
const { setValue: a } = Ue(), [r, o] = L();
|
|
2456
|
+
return e.length === 0 ? /* @__PURE__ */ n.jsx(V, { disabled: s, children: "Send" }) : /* @__PURE__ */ n.jsxs("div", { className: "flex", children: [
|
|
2457
|
+
/* @__PURE__ */ n.jsx(
|
|
2458
|
+
V,
|
|
2459
|
+
{
|
|
2460
|
+
className: "rounded-r-none inset-shadow-sm",
|
|
2461
|
+
disabled: s,
|
|
2462
|
+
onClick: () => {
|
|
2463
|
+
var i;
|
|
2464
|
+
return (i = t == null ? void 0 : t.current) == null ? void 0 : i.requestSubmit();
|
|
2465
|
+
},
|
|
2466
|
+
children: "Send"
|
|
2467
|
+
}
|
|
2468
|
+
),
|
|
2469
|
+
/* @__PURE__ */ n.jsxs(tn, { children: [
|
|
2470
|
+
/* @__PURE__ */ n.jsx(nn, { asChild: !0, children: /* @__PURE__ */ n.jsx(
|
|
2471
|
+
V,
|
|
2472
|
+
{
|
|
2473
|
+
disabled: s,
|
|
2474
|
+
className: "rounded-l-none border-l border-border/40 inset-shadow-sm w-6",
|
|
2475
|
+
size: "icon",
|
|
2476
|
+
children: /* @__PURE__ */ n.jsx(Tn, { className: "w-4 h-4" })
|
|
2477
|
+
}
|
|
2478
|
+
) }),
|
|
2479
|
+
/* @__PURE__ */ n.jsx(et, { value: r, children: /* @__PURE__ */ n.jsx(We, { className: "w-56", align: "end", alignOffset: -150, children: [{ id: W, label: "None" }, ...e].map(
|
|
2480
|
+
(i) => /* @__PURE__ */ n.jsxs(
|
|
2481
|
+
Xe,
|
|
2482
|
+
{
|
|
2483
|
+
onClick: () => {
|
|
2484
|
+
var c;
|
|
2485
|
+
o(i.id), a("identity", i.id), (c = t == null ? void 0 : t.current) == null || c.requestSubmit();
|
|
2486
|
+
},
|
|
2487
|
+
onMouseEnter: () => o(i.id),
|
|
2488
|
+
onMouseLeave: () => o(void 0),
|
|
2489
|
+
children: [
|
|
2490
|
+
/* @__PURE__ */ n.jsx(ue, { value: i.id, className: "me-2" }),
|
|
2491
|
+
i.label
|
|
2492
|
+
]
|
|
2493
|
+
},
|
|
2494
|
+
i.id
|
|
2495
|
+
)
|
|
2496
|
+
) }) })
|
|
2497
|
+
] })
|
|
2498
|
+
] });
|
|
2499
|
+
}, W = "__none", Ee = {
|
|
2500
|
+
Plain: "text/plain",
|
|
2501
|
+
JSON: "application/json",
|
|
2502
|
+
XML: "application/xml",
|
|
2503
|
+
YAML: "application/yaml",
|
|
2504
|
+
CSV: "text/csv"
|
|
2505
|
+
}, Fr = ({
|
|
2506
|
+
server: e,
|
|
2507
|
+
servers: t = [],
|
|
2508
|
+
url: s,
|
|
2509
|
+
method: a,
|
|
2510
|
+
headers: r = [],
|
|
2511
|
+
queryParams: o = [],
|
|
2512
|
+
pathParams: i = [],
|
|
2513
|
+
defaultBody: c = "",
|
|
2514
|
+
examples: l,
|
|
2515
|
+
requiresLogin: u = !1,
|
|
2516
|
+
onLogin: m,
|
|
2517
|
+
onSignUp: y
|
|
2518
|
+
}) => {
|
|
2519
|
+
var ct, dt;
|
|
2520
|
+
const { selectedServer: x, setSelectedServer: g } = ir(
|
|
2521
|
+
t.map((d) => ({ url: d }))
|
|
2522
|
+
), [f, p] = L(!1), v = Dn(), { setRememberedIdentity: j, getRememberedIdentity: w } = Sr(), [, E] = Mn(), [ye, ve] = L(!1), [ae, F] = L(!1), _ = X(void 0), st = Zn(j), { register: rt, control: oe, handleSubmit: at, watch: ot, setValue: M, ...be } = Jn({
|
|
2523
|
+
defaultValues: {
|
|
2524
|
+
body: c,
|
|
2525
|
+
bodyContentType: "JSON",
|
|
2526
|
+
queryParams: o.map((d) => ({
|
|
2527
|
+
name: d.name,
|
|
2528
|
+
value: d.defaultValue ?? "",
|
|
2529
|
+
active: d.defaultActive ?? !1,
|
|
2530
|
+
enum: d.enum ?? []
|
|
2531
|
+
})).concat([
|
|
2532
|
+
{
|
|
2533
|
+
name: "",
|
|
2534
|
+
value: "",
|
|
2535
|
+
active: !1,
|
|
2536
|
+
enum: []
|
|
2537
|
+
}
|
|
2538
|
+
]),
|
|
2539
|
+
pathParams: i.map((d) => ({
|
|
2540
|
+
name: d.name,
|
|
2541
|
+
value: d.defaultValue ?? ""
|
|
2542
|
+
})),
|
|
2543
|
+
headers: r.map((d) => ({
|
|
2544
|
+
name: d.name,
|
|
2545
|
+
value: d.defaultValue ?? "",
|
|
2546
|
+
active: d.defaultActive ?? !1
|
|
2547
|
+
})).concat([
|
|
2548
|
+
{
|
|
2549
|
+
name: "",
|
|
2550
|
+
value: "",
|
|
2551
|
+
active: !1
|
|
2552
|
+
}
|
|
2553
|
+
]),
|
|
2554
|
+
identity: w(
|
|
2555
|
+
((ct = v.data) == null ? void 0 : ct.map((d) => d.id)) ?? []
|
|
2556
|
+
)
|
|
2557
|
+
}
|
|
2558
|
+
}), A = ot(), it = X(null);
|
|
2559
|
+
le(() => {
|
|
2560
|
+
A.identity && st.current(A.identity);
|
|
2561
|
+
}, [st, A.identity]);
|
|
2562
|
+
const je = Qn({
|
|
2563
|
+
mutationFn: async (d) => {
|
|
2564
|
+
var ut, mt;
|
|
2565
|
+
const O = performance.now(), k = !d.headers.some(
|
|
2566
|
+
(T) => T.active && T.name.toLowerCase() === "content-type"
|
|
2567
|
+
), G = Object.fromEntries([
|
|
2568
|
+
...d.headers.filter((T) => T.name && T.active).map((T) => [T.name, T.value]),
|
|
2569
|
+
...k ? [["content-type", Ee[d.bodyContentType]]] : []
|
|
2570
|
+
]), P = new Request(
|
|
2571
|
+
lr(e ?? x, s, d),
|
|
2572
|
+
{
|
|
2573
|
+
method: a.toUpperCase(),
|
|
2574
|
+
headers: G,
|
|
2575
|
+
body: d.body ? d.body : void 0
|
|
2576
|
+
}
|
|
2577
|
+
);
|
|
2578
|
+
d.identity !== W && await ((mt = (ut = v.data) == null ? void 0 : ut.find((T) => T.id === d.identity)) == null ? void 0 : mt.authorizeRequest(P));
|
|
2579
|
+
const U = setTimeout(
|
|
2580
|
+
() => F(!0),
|
|
2581
|
+
3210
|
|
2582
|
+
);
|
|
2583
|
+
_.current = new AbortController();
|
|
2584
|
+
try {
|
|
2585
|
+
const T = await fetch(P, {
|
|
2586
|
+
signal: _.current.signal
|
|
2587
|
+
});
|
|
2588
|
+
clearTimeout(U), F(!1);
|
|
2589
|
+
const xn = performance.now() - O, pt = await T.text(), gn = new URL(P.url);
|
|
2590
|
+
return {
|
|
2591
|
+
status: T.status,
|
|
2592
|
+
headers: Array.from(T.headers.entries()),
|
|
2593
|
+
size: pt.length,
|
|
2594
|
+
body: pt,
|
|
2595
|
+
time: xn,
|
|
2596
|
+
request: {
|
|
2597
|
+
method: P.method.toUpperCase(),
|
|
2598
|
+
url: P.url,
|
|
2599
|
+
headers: [
|
|
2600
|
+
["Host", gn.host],
|
|
2601
|
+
["User-Agent", "Zudoku Playground"],
|
|
2602
|
+
...Array.from(P.headers.entries())
|
|
2603
|
+
],
|
|
2604
|
+
body: d.body ? d.body : void 0
|
|
2605
|
+
}
|
|
2606
|
+
};
|
|
2607
|
+
} catch (T) {
|
|
2608
|
+
throw clearTimeout(U), F(!1), T instanceof TypeError ? new Error(
|
|
2609
|
+
"The request failed, possibly due to network issues or CORS policy."
|
|
2610
|
+
) : T;
|
|
2611
|
+
}
|
|
2612
|
+
}
|
|
2613
|
+
});
|
|
2614
|
+
le(() => () => {
|
|
2615
|
+
var d;
|
|
2616
|
+
(d = _.current) == null || d.abort();
|
|
2617
|
+
}, []);
|
|
2618
|
+
const pn = /* @__PURE__ */ n.jsx(
|
|
2619
|
+
rr,
|
|
2620
|
+
{
|
|
2621
|
+
path: s,
|
|
2622
|
+
renderParam: ({ name: d, originalValue: O, index: k }) => {
|
|
2623
|
+
var P;
|
|
2624
|
+
const G = (P = A.pathParams.find(
|
|
2625
|
+
(U) => U.name === d
|
|
2626
|
+
)) == null ? void 0 : P.value;
|
|
2627
|
+
return /* @__PURE__ */ n.jsx(
|
|
2628
|
+
en,
|
|
2629
|
+
{
|
|
2630
|
+
name: d,
|
|
2631
|
+
backgroundOpacity: "0",
|
|
2632
|
+
slug: d,
|
|
2633
|
+
onClick: () => be.setFocus(`pathParams.${k}.value`),
|
|
2634
|
+
children: G || O
|
|
2635
|
+
}
|
|
2636
|
+
);
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
), lt = A.queryParams.filter((d) => d.active).map((d, O, k) => /* @__PURE__ */ n.jsxs(D, { children: [
|
|
2640
|
+
d.name,
|
|
2641
|
+
"=",
|
|
2642
|
+
encodeURIComponent(d.value).replaceAll("%20", "+"),
|
|
2643
|
+
O < k.length - 1 && "&",
|
|
2644
|
+
/* @__PURE__ */ n.jsx("wbr", {})
|
|
2645
|
+
] }, d.name)), hn = /* @__PURE__ */ n.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: e ? /* @__PURE__ */ n.jsx("span", { children: e.replace(/^https?:\/\//, "").replace(/\/$/, "") }) : t.length > 1 && /* @__PURE__ */ n.jsxs(
|
|
2646
|
+
Pe,
|
|
2647
|
+
{
|
|
2648
|
+
onValueChange: (d) => {
|
|
2649
|
+
E(() => g(d));
|
|
2650
|
+
},
|
|
2651
|
+
value: x,
|
|
2652
|
+
defaultValue: x,
|
|
2653
|
+
children: [
|
|
2654
|
+
/* @__PURE__ */ n.jsx(Le, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto translate-y-[4px]", children: /* @__PURE__ */ n.jsx(Re, {}) }),
|
|
2655
|
+
/* @__PURE__ */ n.jsx(Ie, { children: t.map((d) => /* @__PURE__ */ n.jsx(ee, { value: d, children: d.replace(/^https?:\/\//, "").replace(/\/$/, "") }, d)) })
|
|
2656
|
+
]
|
|
2657
|
+
}
|
|
2658
|
+
) }), fn = u && !ye, ie = ["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
2659
|
+
a.toUpperCase()
|
|
2660
|
+
);
|
|
2661
|
+
return /* @__PURE__ */ n.jsx(
|
|
2662
|
+
Wn,
|
|
2663
|
+
{
|
|
2664
|
+
register: rt,
|
|
2665
|
+
control: oe,
|
|
2666
|
+
handleSubmit: at,
|
|
2667
|
+
watch: ot,
|
|
2668
|
+
setValue: M,
|
|
2669
|
+
...be,
|
|
2670
|
+
children: /* @__PURE__ */ n.jsxs(
|
|
2671
|
+
"form",
|
|
2672
|
+
{
|
|
2673
|
+
onSubmit: at((d) => {
|
|
2674
|
+
var O;
|
|
2675
|
+
((O = v.data) == null ? void 0 : O.length) === 0 || d.identity ? je.mutate(d) : p(!0);
|
|
2676
|
+
}),
|
|
2677
|
+
ref: it,
|
|
2678
|
+
className: "relative",
|
|
2679
|
+
children: [
|
|
2680
|
+
/* @__PURE__ */ n.jsx(
|
|
2681
|
+
br,
|
|
2682
|
+
{
|
|
2683
|
+
identities: v.data ?? [],
|
|
2684
|
+
open: f,
|
|
2685
|
+
onOpenChange: p,
|
|
2686
|
+
onSubmit: ({ rememberedIdentity: d, identity: O }) => {
|
|
2687
|
+
d && M("identity", O ?? W), p(!1), je.mutate({ ...A, identity: O });
|
|
2688
|
+
}
|
|
2689
|
+
}
|
|
2690
|
+
),
|
|
2691
|
+
/* @__PURE__ */ n.jsx(
|
|
2692
|
+
wr,
|
|
2693
|
+
{
|
|
2694
|
+
open: fn,
|
|
2695
|
+
setOpen: (d) => ve(!d),
|
|
2696
|
+
onSignUp: y,
|
|
2697
|
+
onLogin: m
|
|
2698
|
+
}
|
|
2699
|
+
),
|
|
2700
|
+
/* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-2 text-sm h-full", children: [
|
|
2701
|
+
/* @__PURE__ */ n.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:start-auto", children: [
|
|
2702
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex gap-2 items-stretch", children: [
|
|
2703
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
|
|
2704
|
+
/* @__PURE__ */ n.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: a.toUpperCase() }),
|
|
2705
|
+
/* @__PURE__ */ n.jsxs("div", { className: "items-center px-2 py-0.5 font-mono text-xs break-all leading-6", children: [
|
|
2706
|
+
hn,
|
|
2707
|
+
pn,
|
|
2708
|
+
lt.length > 0 ? "?" : "",
|
|
2709
|
+
lt
|
|
2710
|
+
] })
|
|
2711
|
+
] }),
|
|
2712
|
+
/* @__PURE__ */ n.jsx(
|
|
2713
|
+
Vr,
|
|
2714
|
+
{
|
|
2715
|
+
identities: v.data ?? [],
|
|
2716
|
+
formRef: it,
|
|
2717
|
+
disabled: v.isLoading || be.formState.isSubmitting
|
|
2718
|
+
}
|
|
2719
|
+
)
|
|
2720
|
+
] }),
|
|
2721
|
+
/* @__PURE__ */ n.jsxs(Vt, { defaultValue: "parameters", children: [
|
|
2722
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex flex-wrap gap-1 justify-between", children: /* @__PURE__ */ n.jsxs(Ft, { children: [
|
|
2723
|
+
/* @__PURE__ */ n.jsxs(H, { value: "parameters", children: [
|
|
2724
|
+
"Parameters",
|
|
2725
|
+
(A.pathParams.some((d) => d.value !== "") || A.queryParams.some((d) => d.active)) && /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ms-2" })
|
|
2726
|
+
] }),
|
|
2727
|
+
/* @__PURE__ */ n.jsxs(H, { value: "headers", children: [
|
|
2728
|
+
"Headers",
|
|
2729
|
+
A.headers.filter((d) => d.active).length > 0 && /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ms-2" })
|
|
2730
|
+
] }),
|
|
2731
|
+
/* @__PURE__ */ n.jsxs(H, { value: "auth", children: [
|
|
2732
|
+
"Auth",
|
|
2733
|
+
A.identity !== W && /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ms-2" })
|
|
2734
|
+
] }),
|
|
2735
|
+
/* @__PURE__ */ n.jsxs(H, { value: "body", children: [
|
|
2736
|
+
"Body",
|
|
2737
|
+
A.body && /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ms-2" })
|
|
2738
|
+
] })
|
|
2739
|
+
] }) }),
|
|
2740
|
+
/* @__PURE__ */ n.jsx(Q, { value: "headers", children: /* @__PURE__ */ n.jsx(yr, { control: oe, headers: r }) }),
|
|
2741
|
+
/* @__PURE__ */ n.jsxs(Q, { value: "parameters", children: [
|
|
2742
|
+
i.length > 0 && /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
2743
|
+
/* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
|
|
2744
|
+
/* @__PURE__ */ n.jsx(jr, { url: s, control: oe })
|
|
2745
|
+
] }),
|
|
2746
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
2747
|
+
/* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
|
|
2748
|
+
/* @__PURE__ */ n.jsx(Cr, { control: oe, queryParams: o })
|
|
2749
|
+
] })
|
|
2750
|
+
] }),
|
|
2751
|
+
/* @__PURE__ */ n.jsxs(Q, { value: "body", children: [
|
|
2752
|
+
!["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
2753
|
+
a.toUpperCase()
|
|
2754
|
+
) && /* @__PURE__ */ n.jsxs(Ve, { className: "mb-2", children: [
|
|
2755
|
+
/* @__PURE__ */ n.jsx(ft, { className: "w-4 h-4" }),
|
|
2756
|
+
/* @__PURE__ */ n.jsx(Fe, { children: "Body" }),
|
|
2757
|
+
/* @__PURE__ */ n.jsx(_e, { children: "Body is only supported for POST, PUT, PATCH, and DELETE requests" })
|
|
2758
|
+
] }),
|
|
2759
|
+
/* @__PURE__ */ n.jsx(
|
|
2760
|
+
Kt,
|
|
2761
|
+
{
|
|
2762
|
+
...rt("body"),
|
|
2763
|
+
className: b(
|
|
2764
|
+
"border w-full rounded-lg bg-muted/40 p-2 h-64 font-mono text-[13px]",
|
|
2765
|
+
!ie && "h-20 bg-muted"
|
|
2766
|
+
),
|
|
2767
|
+
placeholder: ie ? void 0 : "This request does not support a body",
|
|
2768
|
+
disabled: !ie
|
|
2769
|
+
}
|
|
2770
|
+
),
|
|
2771
|
+
ie && /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 mt-2 justify-between", children: [
|
|
2772
|
+
/* @__PURE__ */ n.jsxs(
|
|
2773
|
+
Pe,
|
|
2774
|
+
{
|
|
2775
|
+
value: A.bodyContentType,
|
|
2776
|
+
onValueChange: (d) => M(
|
|
2777
|
+
"bodyContentType",
|
|
2778
|
+
d
|
|
2779
|
+
),
|
|
2780
|
+
children: [
|
|
2781
|
+
/* @__PURE__ */ n.jsx(Le, { className: "w-[100px]", children: /* @__PURE__ */ n.jsx(Re, {}) }),
|
|
2782
|
+
/* @__PURE__ */ n.jsx(Ie, { children: Object.keys(Ee).map((d) => /* @__PURE__ */ n.jsx(ee, { value: d, children: d }, d)) })
|
|
2783
|
+
]
|
|
2784
|
+
}
|
|
2785
|
+
),
|
|
2786
|
+
l && l.length > 0 && /* @__PURE__ */ n.jsx(
|
|
2787
|
+
hr,
|
|
2788
|
+
{
|
|
2789
|
+
examples: l,
|
|
2790
|
+
onSelect: (d, O) => {
|
|
2791
|
+
var G;
|
|
2792
|
+
M(
|
|
2793
|
+
"body",
|
|
2794
|
+
JSON.stringify(d.value, null, 2)
|
|
2795
|
+
);
|
|
2796
|
+
const k = (G = Xn(Ee).find(
|
|
2797
|
+
([P, U]) => U === O
|
|
2798
|
+
)) == null ? void 0 : G[0];
|
|
2799
|
+
k && M("bodyContentType", k);
|
|
2800
|
+
}
|
|
2801
|
+
}
|
|
2802
|
+
)
|
|
2803
|
+
] })
|
|
2804
|
+
] }),
|
|
2805
|
+
/* @__PURE__ */ n.jsx(Q, { value: "auth", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
2806
|
+
((dt = v.data) == null ? void 0 : dt.length) === 0 && /* @__PURE__ */ n.jsxs(Ve, { children: [
|
|
2807
|
+
/* @__PURE__ */ n.jsx(ft, { className: "w-4 h-4" }),
|
|
2808
|
+
/* @__PURE__ */ n.jsx(Fe, { children: "Authentication" }),
|
|
2809
|
+
/* @__PURE__ */ n.jsx(_e, { children: "No identities found. Please create an identity first." })
|
|
2810
|
+
] }),
|
|
2811
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ n.jsx(
|
|
2812
|
+
on,
|
|
2813
|
+
{
|
|
2814
|
+
value: A.identity,
|
|
2815
|
+
identities: v.data ?? [],
|
|
2816
|
+
setValue: (d) => M("identity", d)
|
|
2817
|
+
}
|
|
2818
|
+
) })
|
|
2819
|
+
] }) })
|
|
2820
|
+
] })
|
|
2821
|
+
] }),
|
|
2822
|
+
/* @__PURE__ */ n.jsx(
|
|
2823
|
+
qr,
|
|
2824
|
+
{
|
|
2825
|
+
queryMutation: je,
|
|
2826
|
+
showPathParamsWarning: A.pathParams.some(
|
|
2827
|
+
(d) => d.value === ""
|
|
2828
|
+
),
|
|
2829
|
+
showLongRunningWarning: ae,
|
|
2830
|
+
onCancel: () => {
|
|
2831
|
+
var d;
|
|
2832
|
+
(d = _.current) == null || d.abort(
|
|
2833
|
+
"Request cancelled by the user"
|
|
2834
|
+
), F(!1);
|
|
2835
|
+
}
|
|
2836
|
+
}
|
|
2837
|
+
)
|
|
2838
|
+
] })
|
|
2839
|
+
]
|
|
2840
|
+
}
|
|
2841
|
+
)
|
|
2842
|
+
}
|
|
2843
|
+
);
|
|
2844
|
+
}, _r = ({
|
|
2845
|
+
className: e,
|
|
2846
|
+
size: t = 16
|
|
2847
|
+
}) => /* @__PURE__ */ n.jsx(
|
|
2848
|
+
"svg",
|
|
2849
|
+
{
|
|
2850
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2851
|
+
viewBox: "0 0 24 24",
|
|
2852
|
+
fill: "currentColor",
|
|
2853
|
+
className: e,
|
|
2854
|
+
width: t,
|
|
2855
|
+
height: t,
|
|
2856
|
+
children: /* @__PURE__ */ n.jsx(
|
|
2857
|
+
"path",
|
|
2858
|
+
{
|
|
2859
|
+
fillRule: "evenodd",
|
|
2860
|
+
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm14.024-.983a1.125 1.125 0 0 1 0 1.966l-5.603 3.113A1.125 1.125 0 0 1 9 15.113V8.887c0-.857.921-1.4 1.671-.983l5.603 3.113Z",
|
|
2861
|
+
clipRule: "evenodd"
|
|
2862
|
+
}
|
|
2863
|
+
)
|
|
2864
|
+
}
|
|
2865
|
+
), Br = (e) => {
|
|
2866
|
+
const [t, s] = L(!1);
|
|
2867
|
+
return /* @__PURE__ */ n.jsxs(Be, { onOpenChange: (a) => s(a), children: [
|
|
2868
|
+
/* @__PURE__ */ n.jsx(Hn, { asChild: !0, children: e.children ?? /* @__PURE__ */ n.jsxs(
|
|
2869
|
+
"button",
|
|
2870
|
+
{
|
|
2871
|
+
type: "button",
|
|
2872
|
+
className: "flex gap-1 items-center px-2 py-1 rounded-md transition text-xs bg-primary text-primary-foreground shadow-sm hover:bg-primary/80",
|
|
2873
|
+
children: [
|
|
2874
|
+
"Test",
|
|
2875
|
+
/* @__PURE__ */ n.jsx(_r, { size: 14 })
|
|
2876
|
+
]
|
|
2877
|
+
}
|
|
2878
|
+
) }),
|
|
2879
|
+
/* @__PURE__ */ n.jsxs(
|
|
2880
|
+
ze,
|
|
2881
|
+
{
|
|
2882
|
+
className: "max-w-screen-xl w-full h-5/6 overflow-hidden p-0",
|
|
2883
|
+
"aria-describedby": void 0,
|
|
2884
|
+
children: [
|
|
2885
|
+
/* @__PURE__ */ n.jsx(Un, { children: /* @__PURE__ */ n.jsx(Me, { children: "Playground" }) }),
|
|
2886
|
+
t && /* @__PURE__ */ n.jsx(Fr, { ...e })
|
|
2887
|
+
]
|
|
2888
|
+
}
|
|
2889
|
+
)
|
|
2890
|
+
] });
|
|
2891
|
+
}, zr = {
|
|
2892
|
+
get: "green",
|
|
2893
|
+
post: "blue",
|
|
2894
|
+
put: "yellow",
|
|
2895
|
+
delete: "red",
|
|
2896
|
+
patch: "purple",
|
|
2897
|
+
options: "gray",
|
|
2898
|
+
head: "gray"
|
|
2899
|
+
}, Et = ({
|
|
2900
|
+
label: e,
|
|
2901
|
+
path: t,
|
|
2902
|
+
operations: s,
|
|
2903
|
+
collapsible: a,
|
|
2904
|
+
collapsed: r
|
|
2905
|
+
}) => ({
|
|
2906
|
+
type: "category",
|
|
2907
|
+
label: e,
|
|
2908
|
+
link: {
|
|
2909
|
+
type: "doc",
|
|
2910
|
+
id: t,
|
|
2911
|
+
label: e
|
|
2912
|
+
},
|
|
2913
|
+
collapsible: a,
|
|
2914
|
+
collapsed: r,
|
|
2915
|
+
items: s.map((o) => ({
|
|
2916
|
+
type: "link",
|
|
2917
|
+
label: o.summary ?? o.path,
|
|
2918
|
+
href: `${t}#${o.slug}`,
|
|
2919
|
+
badge: {
|
|
2920
|
+
label: o.method,
|
|
2921
|
+
color: zr[o.method.toLowerCase()],
|
|
2922
|
+
invert: !0
|
|
2923
|
+
}
|
|
2924
|
+
}))
|
|
2925
|
+
}), ln = It(
|
|
2926
|
+
void 0
|
|
2927
|
+
), Aa = ln.Provider, Mr = () => {
|
|
2928
|
+
const e = Gn(ln);
|
|
2929
|
+
if (!e)
|
|
2930
|
+
throw new Error("useOasConfig must be used within a OasConfigProvider");
|
|
2931
|
+
return e.config;
|
|
2932
|
+
}, Pt = (e) => ({
|
|
2933
|
+
path: e.routePath,
|
|
2934
|
+
async lazy() {
|
|
2935
|
+
const { OasProvider: t } = await import("./OasProvider-CjMm8pB7.js");
|
|
2936
|
+
return {
|
|
2937
|
+
element: /* @__PURE__ */ n.jsx(
|
|
2938
|
+
t,
|
|
2939
|
+
{
|
|
2940
|
+
basePath: e.basePath,
|
|
2941
|
+
version: e.version,
|
|
2942
|
+
client: e.client,
|
|
2943
|
+
config: e.config
|
|
2944
|
+
}
|
|
2945
|
+
)
|
|
2946
|
+
};
|
|
2947
|
+
},
|
|
2948
|
+
children: e.routes
|
|
2949
|
+
}), cn = ({
|
|
2950
|
+
path: e,
|
|
2951
|
+
tag: t,
|
|
2952
|
+
untagged: s
|
|
2953
|
+
}) => ({
|
|
2954
|
+
path: e,
|
|
2955
|
+
async lazy() {
|
|
2956
|
+
const { OperationList: a } = await import("./OperationList-BhJcPgGi.js");
|
|
2957
|
+
return { element: /* @__PURE__ */ n.jsx(a, { tag: t, untagged: s }) };
|
|
2958
|
+
}
|
|
2959
|
+
}), Gr = ({
|
|
2960
|
+
render: e,
|
|
2961
|
+
path: t
|
|
2962
|
+
}) => {
|
|
2963
|
+
const { type: s, input: a } = Mr(), { tag: r } = En(), o = Pn(), i = Qs(mn, { type: s, input: a }), {
|
|
2964
|
+
data: { schema: c }
|
|
2965
|
+
} = qn(i), l = c.tags.at(0);
|
|
2966
|
+
return !r && (l != null && l.slug) ? /* @__PURE__ */ n.jsx(
|
|
2967
|
+
Ln,
|
|
2968
|
+
{
|
|
2969
|
+
to: {
|
|
2970
|
+
pathname: Rn(t, { tag: l.slug }),
|
|
2971
|
+
search: o.search
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
) : r && c.tags.some((u) => u.slug === r) ? e(r) : null;
|
|
2975
|
+
}, Ur = ({ path: e }) => ({
|
|
2976
|
+
path: e,
|
|
2977
|
+
async lazy() {
|
|
2978
|
+
const { OperationList: t } = await import("./OperationList-BhJcPgGi.js");
|
|
2979
|
+
return {
|
|
2980
|
+
element: /* @__PURE__ */ n.jsx(
|
|
2981
|
+
Gr,
|
|
2982
|
+
{
|
|
2983
|
+
path: e,
|
|
2984
|
+
render: (s) => /* @__PURE__ */ n.jsx(t, { tag: s })
|
|
2985
|
+
}
|
|
2986
|
+
)
|
|
2987
|
+
};
|
|
2988
|
+
}
|
|
2989
|
+
}), dn = (e) => [
|
|
2990
|
+
// Category without tagged operations
|
|
2991
|
+
cn({
|
|
2992
|
+
path: I(e, nt),
|
|
2993
|
+
untagged: !0
|
|
2994
|
+
}),
|
|
2995
|
+
// Schema list route
|
|
2996
|
+
{
|
|
2997
|
+
path: I(e, "~schemas"),
|
|
2998
|
+
lazy: async () => {
|
|
2999
|
+
const { SchemaList: t } = await import("./SchemaList-BexhT_Z0.js");
|
|
3000
|
+
return { element: /* @__PURE__ */ n.jsx(t, {}) };
|
|
3001
|
+
}
|
|
3002
|
+
}
|
|
3003
|
+
], Hr = (e, t) => {
|
|
3004
|
+
const s = I(e, t.at(0) ?? nt);
|
|
3005
|
+
return [
|
|
3006
|
+
// Redirect to first tag on the index route
|
|
3007
|
+
{ index: !0, loader: () => $n(s) },
|
|
3008
|
+
// Create routes for each tag
|
|
3009
|
+
...t.map(
|
|
3010
|
+
(a) => cn({
|
|
3011
|
+
path: I(e, a),
|
|
3012
|
+
tag: a
|
|
3013
|
+
})
|
|
3014
|
+
),
|
|
3015
|
+
...dn(e)
|
|
3016
|
+
];
|
|
3017
|
+
}, un = (e) => e.type === "file" ? Object.keys(e.input) : [], Qr = ({
|
|
3018
|
+
basePath: e,
|
|
3019
|
+
config: t,
|
|
3020
|
+
client: s
|
|
3021
|
+
}) => {
|
|
3022
|
+
const a = t.tagPages;
|
|
3023
|
+
if (!a)
|
|
3024
|
+
return [
|
|
3025
|
+
Pt({
|
|
3026
|
+
basePath: e,
|
|
3027
|
+
routePath: e,
|
|
3028
|
+
routes: [
|
|
3029
|
+
Ur({ path: e + "/:tag?" }),
|
|
3030
|
+
...dn(e)
|
|
3031
|
+
],
|
|
3032
|
+
client: s,
|
|
3033
|
+
config: t
|
|
3034
|
+
})
|
|
3035
|
+
];
|
|
3036
|
+
const r = un(t);
|
|
3037
|
+
return (r.length > 1 ? [void 0, ...r] : [void 0]).map((i) => {
|
|
3038
|
+
const c = I(e, i);
|
|
3039
|
+
return Pt({
|
|
3040
|
+
basePath: e,
|
|
3041
|
+
version: i,
|
|
3042
|
+
routePath: c,
|
|
3043
|
+
routes: Hr(c, a),
|
|
3044
|
+
client: s,
|
|
3045
|
+
config: t
|
|
3046
|
+
});
|
|
3047
|
+
});
|
|
3048
|
+
}, mn = nr(`
|
|
3049
|
+
query GetSidebarOperations($input: JSON!, $type: SchemaType!) {
|
|
3050
|
+
schema(input: $input, type: $type) {
|
|
3051
|
+
tags {
|
|
3052
|
+
slug
|
|
3053
|
+
name
|
|
3054
|
+
extensions
|
|
3055
|
+
operations {
|
|
3056
|
+
summary
|
|
3057
|
+
slug
|
|
3058
|
+
method
|
|
3059
|
+
operationId
|
|
3060
|
+
path
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
components {
|
|
3064
|
+
schemas {
|
|
3065
|
+
__typename
|
|
3066
|
+
}
|
|
3067
|
+
}
|
|
3068
|
+
}
|
|
3069
|
+
}
|
|
3070
|
+
`), nt = "~endpoints", Oa = (e) => {
|
|
3071
|
+
const t = I(e.navigationId ?? "/reference"), s = new hs(e);
|
|
3072
|
+
return {
|
|
3073
|
+
getHead: () => {
|
|
3074
|
+
if (e.type === "url" && !e.skipPreload)
|
|
3075
|
+
return /* @__PURE__ */ n.jsx(
|
|
3076
|
+
"link",
|
|
3077
|
+
{
|
|
3078
|
+
rel: "preload",
|
|
3079
|
+
href: e.input,
|
|
3080
|
+
as: "fetch",
|
|
3081
|
+
crossOrigin: "anonymous"
|
|
3082
|
+
}
|
|
3083
|
+
);
|
|
3084
|
+
if (e.server)
|
|
3085
|
+
return /* @__PURE__ */ n.jsx("link", { rel: "preconnect", href: e.server });
|
|
3086
|
+
},
|
|
3087
|
+
getMdxComponents: () => ({
|
|
3088
|
+
OpenPlaygroundButton: ({
|
|
3089
|
+
requireAuth: a,
|
|
3090
|
+
server: r,
|
|
3091
|
+
method: o,
|
|
3092
|
+
url: i,
|
|
3093
|
+
children: c,
|
|
3094
|
+
...l
|
|
3095
|
+
}) => {
|
|
3096
|
+
const u = Vn();
|
|
3097
|
+
if (!r)
|
|
3098
|
+
throw new Error("Server is required");
|
|
3099
|
+
return a && !u.isAuthenticated ? /* @__PURE__ */ n.jsxs(
|
|
3100
|
+
ne,
|
|
3101
|
+
{
|
|
3102
|
+
className: "gap-2 items-center",
|
|
3103
|
+
variant: "outline",
|
|
3104
|
+
onClick: u.login,
|
|
3105
|
+
children: [
|
|
3106
|
+
"Login to open in Playground ",
|
|
3107
|
+
/* @__PURE__ */ n.jsx(An, { size: 16 })
|
|
3108
|
+
]
|
|
3109
|
+
}
|
|
3110
|
+
) : /* @__PURE__ */ n.jsx(
|
|
3111
|
+
Br,
|
|
3112
|
+
{
|
|
3113
|
+
url: i ?? "/",
|
|
3114
|
+
method: o ?? "get",
|
|
3115
|
+
server: r,
|
|
3116
|
+
...l,
|
|
3117
|
+
children: /* @__PURE__ */ n.jsx(ne, { className: "gap-2 items-center", variant: "outline", children: c ?? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3118
|
+
"Open in Playground ",
|
|
3119
|
+
/* @__PURE__ */ n.jsx(On, { size: 16 })
|
|
3120
|
+
] }) })
|
|
3121
|
+
}
|
|
3122
|
+
);
|
|
3123
|
+
}
|
|
3124
|
+
}),
|
|
3125
|
+
getSidebar: async (a, r) => {
|
|
3126
|
+
var i, c, l, u;
|
|
3127
|
+
if (!xt({ path: t, end: !1 }, a))
|
|
3128
|
+
return [];
|
|
3129
|
+
const o = xt(
|
|
3130
|
+
{ path: `${t}/:version?/:tag`, end: !0 },
|
|
3131
|
+
a
|
|
3132
|
+
);
|
|
3133
|
+
try {
|
|
3134
|
+
const m = o == null ? void 0 : o.params.version, y = m ?? un(e).at(0), { type: x } = e, g = x === "file" ? e.input[y] : e.input, f = Yt(s, mn, {
|
|
3135
|
+
type: x,
|
|
3136
|
+
input: g
|
|
3137
|
+
}), p = await r.queryClient.ensureQueryData(f), v = p.schema.tags.flatMap((w) => {
|
|
3138
|
+
var ae, F, _;
|
|
3139
|
+
if (!w.name || w.operations.length === 0) return [];
|
|
3140
|
+
const E = I(t, m, w.slug), ye = ((ae = w.extensions) == null ? void 0 : ae["x-zudoku-collapsed"]) ?? !((F = e.options) != null && F.expandAllTags), ve = ((_ = w.extensions) == null ? void 0 : _["x-zudoku-collapsible"]) ?? !0;
|
|
3141
|
+
return Et({
|
|
3142
|
+
label: w.name,
|
|
3143
|
+
path: E,
|
|
3144
|
+
operations: w.operations,
|
|
3145
|
+
collapsed: ye,
|
|
3146
|
+
collapsible: ve
|
|
3147
|
+
});
|
|
3148
|
+
}), j = (i = p.schema.tags.find(
|
|
3149
|
+
(w) => !w.name
|
|
3150
|
+
)) == null ? void 0 : i.operations;
|
|
3151
|
+
return j && v.push(
|
|
3152
|
+
Et({
|
|
3153
|
+
label: "Other endpoints",
|
|
3154
|
+
path: I(t, m, nt),
|
|
3155
|
+
operations: j,
|
|
3156
|
+
collapsed: !((c = e.options) != null && c.expandAllTags)
|
|
3157
|
+
})
|
|
3158
|
+
), (u = (l = p.schema.components) == null ? void 0 : l.schemas) != null && u.length && v.push({
|
|
3159
|
+
type: "link",
|
|
3160
|
+
label: "Schemas",
|
|
3161
|
+
href: I(t, m, "~schemas")
|
|
3162
|
+
}), v;
|
|
3163
|
+
} catch {
|
|
3164
|
+
return [];
|
|
3165
|
+
}
|
|
3166
|
+
},
|
|
3167
|
+
getRoutes: () => Qr({ basePath: t, config: e, client: s })
|
|
3168
|
+
};
|
|
3169
|
+
};
|
|
3170
|
+
export {
|
|
3171
|
+
Oa as A,
|
|
3172
|
+
wt as C,
|
|
3173
|
+
Ta as G,
|
|
3174
|
+
Ts as L,
|
|
3175
|
+
Aa as O,
|
|
3176
|
+
Br as P,
|
|
3177
|
+
bs as Q,
|
|
3178
|
+
Xt as S,
|
|
3179
|
+
h as T,
|
|
3180
|
+
nt as U,
|
|
3181
|
+
Qs as a,
|
|
3182
|
+
Tt as b,
|
|
3183
|
+
At as c,
|
|
3184
|
+
nr as d,
|
|
3185
|
+
ir as e,
|
|
3186
|
+
en as f,
|
|
3187
|
+
un as g,
|
|
3188
|
+
rr as h,
|
|
3189
|
+
Us as i,
|
|
3190
|
+
Nt as j,
|
|
3191
|
+
Sa as k,
|
|
3192
|
+
As as l,
|
|
3193
|
+
Ar as m,
|
|
3194
|
+
Je as n,
|
|
3195
|
+
Wt as o,
|
|
3196
|
+
fs as p,
|
|
3197
|
+
Gs as q,
|
|
3198
|
+
we as r,
|
|
3199
|
+
$ as s,
|
|
3200
|
+
xs as t,
|
|
3201
|
+
Mr as u,
|
|
3202
|
+
wa as v,
|
|
3203
|
+
ws as w,
|
|
3204
|
+
Ns as x,
|
|
3205
|
+
Ut as y,
|
|
3206
|
+
mn as z
|
|
3207
|
+
};
|
|
3208
|
+
//# sourceMappingURL=index-CFf9AN-y.js.map
|