zudoku 0.0.0-z6bcd96da → 0.0.0-z6e949a6d
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/loader.js +3 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +170 -120
- package/dist/config/validators/InputNavigationSchema.js +17 -0
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/NavigationSchema.d.ts +10 -2
- package/dist/config/validators/NavigationSchema.js +6 -0
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +7 -7
- package/dist/flat-config.d.ts +35 -24
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/MobileTopNavigation.js +2 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +7 -1
- package/dist/lib/components/TopNavigation.js +7 -2
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +8 -1
- package/dist/lib/components/context/ZudokuContext.js +2 -0
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +18 -74
- package/dist/lib/components/index.js +19 -36
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Navigation.js +4 -3
- package/dist/lib/components/navigation/Navigation.js.map +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js +8 -0
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
- package/dist/lib/components/navigation/NavigationFilterContext.d.ts +8 -0
- package/dist/lib/components/navigation/NavigationFilterContext.js +12 -0
- package/dist/lib/components/navigation/NavigationFilterContext.js.map +1 -0
- package/dist/lib/components/navigation/NavigationFilterInput.d.ts +3 -0
- package/dist/lib/components/navigation/NavigationFilterInput.js +9 -0
- package/dist/lib/components/navigation/NavigationFilterInput.js.map +1 -0
- package/dist/lib/components/navigation/NavigationItem.js +11 -1
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/utils.d.ts +2 -1
- package/dist/lib/components/navigation/utils.js +22 -1
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +11 -1
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/core/transform-config.d.ts +2 -0
- package/dist/lib/core/transform-config.js +22 -0
- package/dist/lib/core/transform-config.js.map +1 -0
- package/dist/lib/hooks/index.d.ts +7 -30
- package/dist/lib/hooks/index.js +7 -15
- package/dist/lib/hooks/index.js.map +1 -1
- package/dist/lib/oas/graphql/circular.d.ts +1 -1
- package/dist/lib/oas/graphql/circular.js +18 -35
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/graphql/circular.test.js +33 -2
- package/dist/lib/oas/graphql/circular.test.js.map +1 -1
- package/dist/lib/oas/parser/index.js +14 -5
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js +3 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js +20 -0
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +7 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +3 -3
- package/dist/lib/ui/InputGroup.d.ts +16 -0
- package/dist/lib/ui/InputGroup.js +65 -0
- package/dist/lib/ui/InputGroup.js.map +1 -0
- package/dist/lib/util/flattenAllOf.d.ts +0 -2
- package/dist/lib/util/flattenAllOf.js +0 -46
- package/dist/lib/util/flattenAllOf.js.map +1 -1
- package/dist/lib/util/flattenAllOf.test.js +2 -1
- package/dist/lib/util/flattenAllOf.test.js.map +1 -1
- package/dist/lib/util/flattenAllOfProcessor.d.ts +2 -0
- package/dist/lib/util/flattenAllOfProcessor.js +48 -0
- package/dist/lib/util/flattenAllOfProcessor.js.map +1 -0
- package/dist/lib/util/readFrontmatter.js +2 -1
- package/dist/lib/util/readFrontmatter.js.map +1 -1
- package/dist/vite/api/SchemaManager.js +1 -1
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +1 -1
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/build.js +91 -73
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/mdx/remark-inject-filepath.js +5 -1
- package/dist/vite/mdx/remark-inject-filepath.js.map +1 -1
- package/dist/vite/mdx/remark-link-rewrite.js +3 -2
- package/dist/vite/mdx/remark-link-rewrite.js.map +1 -1
- package/dist/vite/plugin-docs.js +9 -7
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-markdown-export.js +4 -2
- package/dist/vite/plugin-markdown-export.js.map +1 -1
- package/lib/{ClaudeLogo-DJ9bU-sO.js → ClaudeLogo-OpUSMQJe.js} +26 -22
- package/lib/{ClaudeLogo-DJ9bU-sO.js.map → ClaudeLogo-OpUSMQJe.js.map} +1 -1
- package/lib/{MdxPage-stpAoBtx.js → MdxPage-dzCPGdvD.js} +8 -8
- package/lib/{MdxPage-stpAoBtx.js.map → MdxPage-dzCPGdvD.js.map} +1 -1
- package/lib/{Mermaid-Koc3z8mU.js → Mermaid-JEnWyK0s.js} +3 -2
- package/lib/{Mermaid-Koc3z8mU.js.map → Mermaid-JEnWyK0s.js.map} +1 -1
- package/lib/{OAuthErrorPage-DJ811Bn_.js → OAuthErrorPage-D7n-_cqN.js} +20 -18
- package/lib/{OAuthErrorPage-DJ811Bn_.js.map → OAuthErrorPage-D7n-_cqN.js.map} +1 -1
- package/lib/{OasProvider-CS_ASmBB.js → OasProvider-DPPdikt_.js} +3 -3
- package/lib/{OasProvider-CS_ASmBB.js.map → OasProvider-DPPdikt_.js.map} +1 -1
- package/lib/{OperationList-Dq_AB4W9.js → OperationList-cEveQ_l5.js} +948 -946
- package/lib/OperationList-cEveQ_l5.js.map +1 -0
- package/lib/{RouteGuard--A04ESy8.js → RouteGuard-BMbu_Yb7.js} +5 -5
- package/lib/{RouteGuard--A04ESy8.js.map → RouteGuard-BMbu_Yb7.js.map} +1 -1
- package/lib/{SchemaList-BJZJv1gD.js → SchemaList-CRC8n5co.js} +7 -7
- package/lib/{SchemaList-BJZJv1gD.js.map → SchemaList-CRC8n5co.js.map} +1 -1
- package/lib/{SchemaView-U4JMYB3N.js → SchemaView-BR6dtnPg.js} +3 -3
- package/lib/{SchemaView-U4JMYB3N.js.map → SchemaView-BR6dtnPg.js.map} +1 -1
- package/lib/{SignUp-DCBViNUi.js → SignUp-ChqXj9vd.js} +31 -26
- package/lib/{SignUp-DCBViNUi.js.map → SignUp-ChqXj9vd.js.map} +1 -1
- package/lib/{SyntaxHighlight-Dshjn3Zf.js → SyntaxHighlight-O-IZOPLg.js} +3 -3
- package/lib/{SyntaxHighlight-Dshjn3Zf.js.map → SyntaxHighlight-O-IZOPLg.js.map} +1 -1
- package/lib/{Toc-Cgz6CPiE.js → Toc-DQF7trHT.js} +2 -2
- package/lib/{Toc-Cgz6CPiE.js.map → Toc-DQF7trHT.js.map} +1 -1
- package/lib/{index-CL8eDnQW.js → Zudoku-DA1yA-te.js} +2609 -2452
- package/lib/Zudoku-DA1yA-te.js.map +1 -0
- package/lib/{ZudokuContext-BZB1TWdT.js → ZudokuContext-C6wlLMUH.js} +137 -135
- package/lib/{ZudokuContext-BZB1TWdT.js.map → ZudokuContext-C6wlLMUH.js.map} +1 -1
- package/lib/{circular-BmMJjG1v.js → circular-C4l1Kj1N.js} +1327 -1346
- package/lib/{circular-BmMJjG1v.js.map → circular-C4l1Kj1N.js.map} +1 -1
- package/lib/createServer-DoRZ6tMa.js +13036 -0
- package/lib/createServer-DoRZ6tMa.js.map +1 -0
- package/lib/{errors-b9I-fAOY.js → errors-CYLN8SNc.js} +3 -3
- package/lib/{errors-b9I-fAOY.js.map → errors-CYLN8SNc.js.map} +1 -1
- package/lib/{firebase-BCXX7Qv5.js → firebase-DF-VVKB7.js} +14 -14
- package/lib/firebase-DF-VVKB7.js.map +1 -0
- package/lib/{hook-BGlHBdET.js → hook-C35h0YhF.js} +2 -2
- package/lib/{hook-BGlHBdET.js.map → hook-C35h0YhF.js.map} +1 -1
- package/lib/{index-O9RHI87z.js → index-Ck4TmzTO.js} +574 -538
- package/lib/index-Ck4TmzTO.js.map +1 -0
- package/lib/index-DAWHN3cH.js +86 -0
- package/lib/index-DAWHN3cH.js.map +1 -0
- package/lib/{index-UOLtazB8.js → index-DrAVvbXa.js} +2 -2
- package/lib/{index-UOLtazB8.js.map → index-DrAVvbXa.js.map} +1 -1
- package/lib/{index.esm-C5CBsVzN.js → index.esm-B2cLXwjS.js} +2 -2
- package/lib/index.esm-B2cLXwjS.js.map +1 -0
- package/lib/{index.esm-B_0dvNjB.js → index.esm-Ca5zvoff.js} +20 -20
- package/lib/{index.esm-B_0dvNjB.js.map → index.esm-Ca5zvoff.js.map} +1 -1
- package/lib/{invariant-BJAl77rw.js → invariant-B_t_F2s_.js} +3 -3
- package/lib/{invariant-BJAl77rw.js.map → invariant-B_t_F2s_.js.map} +1 -1
- package/lib/ui/InputGroup.js +155 -0
- package/lib/ui/InputGroup.js.map +1 -0
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/useExposedProps-CzTDfXfq.js +30 -0
- package/lib/useExposedProps-CzTDfXfq.js.map +1 -0
- package/lib/zudoku.__internal.js +1493 -1031
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +4 -4
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-firebase.js +5 -5
- package/lib/zudoku.auth-openid.js +5 -5
- package/lib/zudoku.auth-supabase.js +4 -4
- package/lib/zudoku.components.js +31 -29
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +24 -11
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.mermaid.js +4 -3
- package/lib/zudoku.mermaid.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +36 -32
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +131 -130
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/lib/zudoku.plugin-search-pagefind.js +2 -2
- package/lib/zudoku.plugins.js +9 -8
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +6 -4
- package/src/lib/components/MobileTopNavigation.tsx +13 -8
- package/src/lib/components/TopNavigation.tsx +25 -7
- package/src/lib/components/context/ZudokuContext.ts +1 -0
- package/src/lib/components/index.ts +19 -39
- package/src/lib/components/navigation/Navigation.tsx +4 -3
- package/src/lib/components/navigation/NavigationCategory.tsx +9 -0
- package/src/lib/components/navigation/NavigationFilterContext.tsx +28 -0
- package/src/lib/components/navigation/NavigationFilterInput.tsx +35 -0
- package/src/lib/components/navigation/NavigationItem.tsx +17 -1
- package/src/lib/components/navigation/utils.ts +32 -1
- package/src/lib/core/plugins.ts +21 -1
- package/src/lib/core/transform-config.ts +29 -0
- package/src/lib/hooks/index.ts +7 -16
- package/src/lib/oas/graphql/circular.test.ts +37 -2
- package/src/lib/oas/graphql/circular.ts +25 -51
- package/src/lib/oas/parser/index.ts +17 -6
- package/src/lib/plugins/openapi/playground/fileUtils.ts +4 -0
- package/src/lib/plugins/openapi/playground/result-panel/AudioPlayer.tsx +50 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +33 -17
- package/src/lib/ui/InputGroup.tsx +168 -0
- package/src/lib/util/flattenAllOf.test.ts +2 -1
- package/src/lib/util/flattenAllOf.ts +0 -57
- package/src/lib/util/flattenAllOfProcessor.ts +58 -0
- package/src/lib/util/readFrontmatter.ts +2 -1
- package/src/zuplo/enrich-with-zuplo-mcp.ts +168 -0
- package/src/zuplo/enrich-with-zuplo.ts +254 -0
- package/src/zuplo/policy-types.ts +46 -0
- package/src/zuplo/with-zuplo-processors.ts +35 -0
- package/src/zuplo/with-zuplo.ts +14 -0
- package/lib/OperationList-Dq_AB4W9.js.map +0 -1
- package/lib/Separator-BXt1LYnm.js +0 -27
- package/lib/Separator-BXt1LYnm.js.map +0 -1
- package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js +0 -9
- package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js.map +0 -1
- package/lib/createServer-CLSZ7hWJ.js +0 -16693
- package/lib/createServer-CLSZ7hWJ.js.map +0 -1
- package/lib/firebase-BCXX7Qv5.js.map +0 -1
- package/lib/index-CL8eDnQW.js.map +0 -1
- package/lib/index-DBjOT2H1.js +0 -133
- package/lib/index-DBjOT2H1.js.map +0 -1
- package/lib/index-O9RHI87z.js.map +0 -1
- package/lib/index.esm-C5CBsVzN.js.map +0 -1
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import { ChevronsDownUpIcon as
|
|
2
|
+
import { ChevronsDownUpIcon as kn, ChevronsUpDownIcon as En, PlusCircleIcon as Je, XIcon as It, CheckIcon as Dt, PaperclipIcon as me, TrashIcon as Rn, FileInput as In, ScanTextIcon as yt, Grid2x2PlusIcon as vt, ChevronDownIcon as Dn, TableOfContentsIcon as Fn, LockIcon as zn, CircleAlertIcon as Vn, Circle as Bn, Unlink2Icon as _n, DownloadIcon as Ft, CornerDownRightIcon as qn, MinusCircleIcon as bt, CornerDownLeftIcon as Un, SquareCodeIcon as Mn, EyeOffIcon as Gn, EyeIcon as Hn, UnplugIcon as Qn, SendIcon as Jn, CopyIcon as Wn, IdCardLanyardIcon as Xn, ShapesIcon as Kn, PlayIcon as Zn, CirclePlayIcon as Yn } from "lucide-react";
|
|
3
3
|
import { r as es, d as ts, a as ns, N as ss, aL as rs, m as jt } from "./chunk-EPOLDU6W-C6C8jAwd.js";
|
|
4
|
-
import { Button as
|
|
5
|
-
import { f as Ze, p as Ye, g as zt, s as as, h as os, j as V } from "./ZudokuContext-
|
|
6
|
-
import { Z as is } from "./invariant-
|
|
4
|
+
import { Button as K } from "./ui/Button.js";
|
|
5
|
+
import { f as Ze, p as Ye, g as zt, s as as, h as os, j as V } from "./ZudokuContext-C6wlLMUH.js";
|
|
6
|
+
import { Z as is } from "./invariant-B_t_F2s_.js";
|
|
7
7
|
import * as xe from "react";
|
|
8
|
-
import { createContext as Vt, use as ls, useRef as E, useEffect as
|
|
8
|
+
import { createContext as Vt, use as ls, useRef as E, useEffect as U, useMemo as Bt, useCallback as D, startTransition as cs, useState as k, Fragment as le, useLayoutEffect as ds, useTransition as us, useContext as ms } from "react";
|
|
9
9
|
import { VisuallyHidden as ps } from "@radix-ui/react-visually-hidden";
|
|
10
|
-
import { z as hs
|
|
11
|
-
import {
|
|
10
|
+
import { z as hs } from "./index-DAWHN3cH.js";
|
|
11
|
+
import { u as fs } from "./hook-C35h0YhF.js";
|
|
12
|
+
import { B } from "./Button-GUVe7pmt.js";
|
|
12
13
|
import { D as et, a as tt, c as nt, d as _t, e as qt, g as gs } from "./Dialog-hlvmmQ_c.js";
|
|
13
|
-
import {
|
|
14
|
-
import { u as
|
|
15
|
-
import { u as
|
|
14
|
+
import { l as Ct, m as Nt, n as wt, d as xs, o as ys, i as vs } from "./Zudoku-DA1yA-te.js";
|
|
15
|
+
import { u as bs } from "./useMutation-CFMGlAMW.js";
|
|
16
|
+
import { u as oe, b as Ut, C as St, a as js, F as Cs } from "./index.esm-BYObtETB.js";
|
|
16
17
|
import * as st from "@radix-ui/react-collapsible";
|
|
17
|
-
import { S as
|
|
18
|
-
import { c as
|
|
18
|
+
import { S as Mt, a as Gt, b as Ht, c as Qt, e as Ae, g as Ns } from "./Secret-BDBqq4p3.js";
|
|
19
|
+
import { c as S } from "./cn-5-Gd1Dss.js";
|
|
19
20
|
import { u as ws } from "./useCopyToClipboard-B_085nfO.js";
|
|
20
|
-
import { u as
|
|
21
|
-
import { D as Jt, a as Wt, b as Xt, d as
|
|
22
|
-
import { I as
|
|
21
|
+
import { u as Ss } from "./useLatest-hmRS46UF.js";
|
|
22
|
+
import { D as Jt, a as Wt, b as Xt, d as Ts, e as As, f as Os, c as Oe } from "./DropdownMenu-DN0jNrjj.js";
|
|
23
|
+
import { I as Ps } from "./Input-Cx-GeKoF.js";
|
|
23
24
|
import { c as ye } from "./createVariantComponent-Dc0vtOvr.js";
|
|
24
25
|
import * as Tt from "@radix-ui/react-checkbox";
|
|
25
|
-
import * as
|
|
26
|
-
import { PopoverAnchor as
|
|
27
|
-
import { P as
|
|
28
|
-
import { f as ks, g as
|
|
29
|
-
import { C as
|
|
26
|
+
import * as Pe from "@radix-ui/react-popover";
|
|
27
|
+
import { PopoverAnchor as $s } from "@radix-ui/react-popover";
|
|
28
|
+
import { P as Ls } from "./index-CrcNWbel.js";
|
|
29
|
+
import { f as ks, g as Es, C as Rs, b as Is } from "./Command-N6VujV30.js";
|
|
30
|
+
import { C as Ds } from "./Card-DCdq37aA.js";
|
|
30
31
|
import * as Kt from "@radix-ui/react-label";
|
|
31
|
-
import { c as
|
|
32
|
+
import { c as Fs } from "./index-DI5SPFK9.js";
|
|
32
33
|
import * as he from "@radix-ui/react-radio-group";
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
34
|
+
import { S as zs } from "./Spinner-CI6bRyZw.js";
|
|
35
|
+
import { A as Vs, a as Bs, b as _s } from "./Mermaid-JEnWyK0s.js";
|
|
36
|
+
import { e as qs, u as Us } from "./useSuspenseQuery-CSB_rVek.js";
|
|
35
37
|
let _e;
|
|
36
|
-
const
|
|
38
|
+
const Ms = (e) => {
|
|
37
39
|
if (e.errors?.[0])
|
|
38
40
|
throw new is(e.errors[0].message, {
|
|
39
41
|
developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
|
|
@@ -43,7 +45,7 @@ class Gs {
|
|
|
43
45
|
constructor(n) {
|
|
44
46
|
this.config = n;
|
|
45
47
|
}
|
|
46
|
-
#e = async () => (_e || (_e = import("./createServer-
|
|
48
|
+
#e = async () => (_e || (_e = import("./createServer-DoRZ6tMa.js").then(
|
|
47
49
|
(n) => n.createServer(this.config)
|
|
48
50
|
)), _e);
|
|
49
51
|
#t = async (n) => this.config.server ? fetch(this.config.server, n) : (await this.#e()).fetch("http://localhost/graphql", n);
|
|
@@ -56,7 +58,7 @@ class Gs {
|
|
|
56
58
|
if (!r.ok)
|
|
57
59
|
throw new Error("Network response was not ok");
|
|
58
60
|
const o = await r.json();
|
|
59
|
-
return
|
|
61
|
+
return Ms(o), o.data;
|
|
60
62
|
};
|
|
61
63
|
}
|
|
62
64
|
function qe(e, n) {
|
|
@@ -95,13 +97,13 @@ function Zt(e, n) {
|
|
|
95
97
|
const s = e.locationOffset.column - 1, a = "".padStart(s) + e.body, r = n.line - 1, o = e.locationOffset.line - 1, i = n.line + o, c = n.line === 1 ? s : 0, l = n.column + c, m = `${e.name}:${i}:${l}
|
|
96
98
|
`, d = a.split(/\r\n|[\n\r]/g), f = d[r];
|
|
97
99
|
if (f.length > 120) {
|
|
98
|
-
const x = Math.floor(l / 80),
|
|
100
|
+
const x = Math.floor(l / 80), p = l % 80, v = [];
|
|
99
101
|
for (let u = 0; u < f.length; u += 80)
|
|
100
102
|
v.push(f.slice(u, u + 80));
|
|
101
103
|
return m + At([
|
|
102
104
|
[`${i} |`, v[0]],
|
|
103
105
|
...v.slice(1, x + 1).map((u) => ["|", u]),
|
|
104
|
-
["|", "^".padStart(
|
|
106
|
+
["|", "^".padStart(p)],
|
|
105
107
|
["|", v[x + 1]]
|
|
106
108
|
]);
|
|
107
109
|
}
|
|
@@ -171,17 +173,17 @@ class rt extends Error {
|
|
|
171
173
|
constructor(n, ...s) {
|
|
172
174
|
var a, r, o;
|
|
173
175
|
const { nodes: i, source: c, positions: l, path: m, originalError: d, extensions: f } = Xs(s);
|
|
174
|
-
super(n), this.name = "GraphQLError", this.path = m ?? void 0, this.originalError = d ?? void 0, this.nodes =
|
|
176
|
+
super(n), this.name = "GraphQLError", this.path = m ?? void 0, this.originalError = d ?? void 0, this.nodes = Ot(
|
|
175
177
|
Array.isArray(i) ? i : i ? [i] : void 0
|
|
176
178
|
);
|
|
177
|
-
const x =
|
|
179
|
+
const x = Ot(
|
|
178
180
|
(a = this.nodes) === null || a === void 0 ? void 0 : a.map((v) => v.loc).filter((v) => v != null)
|
|
179
181
|
);
|
|
180
182
|
this.source = c ?? (x == null || (r = x[0]) === null || r === void 0 ? void 0 : r.source), this.positions = l ?? x?.map((v) => v.start), this.locations = l && c ? l.map((v) => We(c, v)) : x?.map((v) => We(v.source, v.start));
|
|
181
|
-
const
|
|
183
|
+
const p = Hs(
|
|
182
184
|
d?.extensions
|
|
183
185
|
) ? d?.extensions : void 0;
|
|
184
|
-
this.extensions = (o = f ??
|
|
186
|
+
this.extensions = (o = f ?? p) !== null && o !== void 0 ? o : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
|
|
185
187
|
message: {
|
|
186
188
|
writable: !0,
|
|
187
189
|
enumerable: !0
|
|
@@ -235,7 +237,7 @@ class rt extends Error {
|
|
|
235
237
|
return this.locations != null && (n.locations = this.locations), this.path != null && (n.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (n.extensions = this.extensions), n;
|
|
236
238
|
}
|
|
237
239
|
}
|
|
238
|
-
function
|
|
240
|
+
function Ot(e) {
|
|
239
241
|
return e === void 0 || e.length === 0 ? void 0 : e;
|
|
240
242
|
}
|
|
241
243
|
function F(e, n, s) {
|
|
@@ -244,7 +246,7 @@ function F(e, n, s) {
|
|
|
244
246
|
positions: [n]
|
|
245
247
|
});
|
|
246
248
|
}
|
|
247
|
-
class
|
|
249
|
+
class to {
|
|
248
250
|
/**
|
|
249
251
|
* The character offset at which this Node begins.
|
|
250
252
|
*/
|
|
@@ -403,7 +405,7 @@ const Ks = {
|
|
|
403
405
|
DirectiveCoordinate: ["name"],
|
|
404
406
|
DirectiveArgumentCoordinate: ["name", "argumentName"]
|
|
405
407
|
}, Zs = new Set(Object.keys(Ks));
|
|
406
|
-
function
|
|
408
|
+
function no(e) {
|
|
407
409
|
const n = e?.kind;
|
|
408
410
|
return typeof n == "string" && Zs.has(n);
|
|
409
411
|
}
|
|
@@ -447,7 +449,7 @@ function tr(e) {
|
|
|
447
449
|
return n;
|
|
448
450
|
}
|
|
449
451
|
function nr(e, n) {
|
|
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((
|
|
452
|
+
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((p) => p.length === 0 || Xe(p.charCodeAt(0))), i = s.endsWith('\\"""'), c = e.endsWith('"') && !i, l = e.endsWith("\\"), m = c || l, d = !(n != null && n.minimize) && // add leading and trailing new lines only if it improves readability
|
|
451
453
|
(!r || e.length > 70 || m || o || i);
|
|
452
454
|
let f = "";
|
|
453
455
|
const x = r && Xe(e.charCodeAt(0));
|
|
@@ -506,10 +508,10 @@ class sr {
|
|
|
506
508
|
function rr(e) {
|
|
507
509
|
return e === b.BANG || e === b.DOLLAR || e === b.AMP || e === b.PAREN_L || e === b.PAREN_R || e === b.DOT || e === b.SPREAD || e === b.COLON || e === b.EQUALS || e === b.AT || e === b.BRACKET_L || e === b.BRACKET_R || e === b.BRACE_L || e === b.PIPE || e === b.BRACE_R;
|
|
508
510
|
}
|
|
509
|
-
function
|
|
511
|
+
function ie(e) {
|
|
510
512
|
return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
|
|
511
513
|
}
|
|
512
|
-
function
|
|
514
|
+
function Le(e, n) {
|
|
513
515
|
return nn(e.charCodeAt(n)) && sn(e.charCodeAt(n + 1));
|
|
514
516
|
}
|
|
515
517
|
function nn(e) {
|
|
@@ -518,7 +520,7 @@ function nn(e) {
|
|
|
518
520
|
function sn(e) {
|
|
519
521
|
return e >= 56320 && e <= 57343;
|
|
520
522
|
}
|
|
521
|
-
function
|
|
523
|
+
function Z(e, n) {
|
|
522
524
|
const s = e.source.body.codePointAt(n);
|
|
523
525
|
if (s === void 0)
|
|
524
526
|
return b.EOF;
|
|
@@ -623,7 +625,7 @@ function ar(e, n) {
|
|
|
623
625
|
throw F(
|
|
624
626
|
e.source,
|
|
625
627
|
r,
|
|
626
|
-
o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` :
|
|
628
|
+
o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : ie(o) || Le(s, r) ? `Unexpected character: ${Z(e, r)}.` : `Invalid character: ${Z(e, r)}.`
|
|
627
629
|
);
|
|
628
630
|
}
|
|
629
631
|
return P(e, b.EOF, a, a);
|
|
@@ -635,9 +637,9 @@ function or(e, n) {
|
|
|
635
637
|
const o = s.charCodeAt(r);
|
|
636
638
|
if (o === 10 || o === 13)
|
|
637
639
|
break;
|
|
638
|
-
if (
|
|
640
|
+
if (ie(o))
|
|
639
641
|
++r;
|
|
640
|
-
else if (
|
|
642
|
+
else if (Le(s, r))
|
|
641
643
|
r += 2;
|
|
642
644
|
else
|
|
643
645
|
break;
|
|
@@ -658,18 +660,18 @@ function ir(e, n, s) {
|
|
|
658
660
|
throw F(
|
|
659
661
|
e.source,
|
|
660
662
|
r,
|
|
661
|
-
`Invalid number, unexpected digit after 0: ${
|
|
663
|
+
`Invalid number, unexpected digit after 0: ${Z(
|
|
662
664
|
e,
|
|
663
665
|
r
|
|
664
666
|
)}.`
|
|
665
667
|
);
|
|
666
668
|
} else
|
|
667
|
-
r =
|
|
668
|
-
if (o === 46 && (i = !0, o = a.charCodeAt(++r), r =
|
|
669
|
+
r = Ue(e, r, o), o = a.charCodeAt(r);
|
|
670
|
+
if (o === 46 && (i = !0, o = a.charCodeAt(++r), r = Ue(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 = Ue(e, r, o), o = a.charCodeAt(r)), o === 46 || tn(o))
|
|
669
671
|
throw F(
|
|
670
672
|
e.source,
|
|
671
673
|
r,
|
|
672
|
-
`Invalid number, expected digit but got: ${
|
|
674
|
+
`Invalid number, expected digit but got: ${Z(
|
|
673
675
|
e,
|
|
674
676
|
r
|
|
675
677
|
)}.`
|
|
@@ -682,12 +684,12 @@ function ir(e, n, s) {
|
|
|
682
684
|
a.slice(n, r)
|
|
683
685
|
);
|
|
684
686
|
}
|
|
685
|
-
function
|
|
687
|
+
function Ue(e, n, s) {
|
|
686
688
|
if (!fe(s))
|
|
687
689
|
throw F(
|
|
688
690
|
e.source,
|
|
689
691
|
n,
|
|
690
|
-
`Invalid number, expected digit but got: ${
|
|
692
|
+
`Invalid number, expected digit but got: ${Z(
|
|
691
693
|
e,
|
|
692
694
|
n
|
|
693
695
|
)}.`
|
|
@@ -713,15 +715,15 @@ function lr(e, n) {
|
|
|
713
715
|
}
|
|
714
716
|
if (c === 10 || c === 13)
|
|
715
717
|
break;
|
|
716
|
-
if (
|
|
718
|
+
if (ie(c))
|
|
717
719
|
++r;
|
|
718
|
-
else if (
|
|
720
|
+
else if (Le(s, r))
|
|
719
721
|
r += 2;
|
|
720
722
|
else
|
|
721
723
|
throw F(
|
|
722
724
|
e.source,
|
|
723
725
|
r,
|
|
724
|
-
`Invalid character within String: ${
|
|
726
|
+
`Invalid character within String: ${Z(
|
|
725
727
|
e,
|
|
726
728
|
r
|
|
727
729
|
)}.`
|
|
@@ -735,14 +737,14 @@ function cr(e, n) {
|
|
|
735
737
|
for (; r < 12; ) {
|
|
736
738
|
const o = s.charCodeAt(n + r++);
|
|
737
739
|
if (o === 125) {
|
|
738
|
-
if (r < 5 || !
|
|
740
|
+
if (r < 5 || !ie(a))
|
|
739
741
|
break;
|
|
740
742
|
return {
|
|
741
743
|
value: String.fromCodePoint(a),
|
|
742
744
|
size: r
|
|
743
745
|
};
|
|
744
746
|
}
|
|
745
|
-
if (a = a << 4 |
|
|
747
|
+
if (a = a << 4 | ce(o), a < 0)
|
|
746
748
|
break;
|
|
747
749
|
}
|
|
748
750
|
throw F(
|
|
@@ -755,14 +757,14 @@ function cr(e, n) {
|
|
|
755
757
|
);
|
|
756
758
|
}
|
|
757
759
|
function dr(e, n) {
|
|
758
|
-
const s = e.source.body, a =
|
|
759
|
-
if (
|
|
760
|
+
const s = e.source.body, a = $t(s, n + 2);
|
|
761
|
+
if (ie(a))
|
|
760
762
|
return {
|
|
761
763
|
value: String.fromCodePoint(a),
|
|
762
764
|
size: 6
|
|
763
765
|
};
|
|
764
766
|
if (nn(a) && s.charCodeAt(n + 6) === 92 && s.charCodeAt(n + 7) === 117) {
|
|
765
|
-
const r =
|
|
767
|
+
const r = $t(s, n + 8);
|
|
766
768
|
if (sn(r))
|
|
767
769
|
return {
|
|
768
770
|
value: String.fromCodePoint(a, r),
|
|
@@ -775,10 +777,10 @@ function dr(e, n) {
|
|
|
775
777
|
`Invalid Unicode escape sequence: "${s.slice(n, n + 6)}".`
|
|
776
778
|
);
|
|
777
779
|
}
|
|
778
|
-
function
|
|
779
|
-
return
|
|
780
|
+
function $t(e, n) {
|
|
781
|
+
return ce(e.charCodeAt(n)) << 12 | ce(e.charCodeAt(n + 1)) << 8 | ce(e.charCodeAt(n + 2)) << 4 | ce(e.charCodeAt(n + 3));
|
|
780
782
|
}
|
|
781
|
-
function
|
|
783
|
+
function ce(e) {
|
|
782
784
|
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
|
|
783
785
|
}
|
|
784
786
|
function ur(e, n) {
|
|
@@ -862,15 +864,15 @@ function mr(e, n) {
|
|
|
862
864
|
c += s.slice(i, o), l.push(c), m === 13 && s.charCodeAt(o + 1) === 10 ? o += 2 : ++o, c = "", i = o, r = o;
|
|
863
865
|
continue;
|
|
864
866
|
}
|
|
865
|
-
if (
|
|
867
|
+
if (ie(m))
|
|
866
868
|
++o;
|
|
867
|
-
else if (
|
|
869
|
+
else if (Le(s, o))
|
|
868
870
|
o += 2;
|
|
869
871
|
else
|
|
870
872
|
throw F(
|
|
871
873
|
e.source,
|
|
872
874
|
o,
|
|
873
|
-
`Invalid character within String: ${
|
|
875
|
+
`Invalid character within String: ${Z(
|
|
874
876
|
e,
|
|
875
877
|
o
|
|
876
878
|
)}.`
|
|
@@ -898,9 +900,9 @@ function pr(e, n) {
|
|
|
898
900
|
}
|
|
899
901
|
const hr = 10, rn = 2;
|
|
900
902
|
function an(e) {
|
|
901
|
-
return
|
|
903
|
+
return ke(e, []);
|
|
902
904
|
}
|
|
903
|
-
function
|
|
905
|
+
function ke(e, n) {
|
|
904
906
|
switch (typeof e) {
|
|
905
907
|
case "string":
|
|
906
908
|
return JSON.stringify(e);
|
|
@@ -921,7 +923,7 @@ function fr(e, n) {
|
|
|
921
923
|
if (gr(e)) {
|
|
922
924
|
const a = e.toJSON();
|
|
923
925
|
if (a !== e)
|
|
924
|
-
return typeof a == "string" ? a :
|
|
926
|
+
return typeof a == "string" ? a : ke(a, s);
|
|
925
927
|
} else if (Array.isArray(e))
|
|
926
928
|
return yr(e, s);
|
|
927
929
|
return xr(e, s);
|
|
@@ -932,7 +934,7 @@ function gr(e) {
|
|
|
932
934
|
function xr(e, n) {
|
|
933
935
|
const s = Object.entries(e);
|
|
934
936
|
return s.length === 0 ? "{}" : n.length > rn ? "[" + vr(e) + "]" : "{ " + s.map(
|
|
935
|
-
([r, o]) => r + ": " +
|
|
937
|
+
([r, o]) => r + ": " + ke(o, n)
|
|
936
938
|
).join(", ") + " }";
|
|
937
939
|
}
|
|
938
940
|
function yr(e, n) {
|
|
@@ -942,7 +944,7 @@ function yr(e, n) {
|
|
|
942
944
|
return "[Array]";
|
|
943
945
|
const s = Math.min(hr, e.length), a = e.length - s, r = [];
|
|
944
946
|
for (let o = 0; o < s; ++o)
|
|
945
|
-
r.push(
|
|
947
|
+
r.push(ke(e[o], n));
|
|
946
948
|
return a === 1 ? r.push("... 1 more item") : a > 1 && r.push(`... ${a} more items`), "[" + r.join(", ") + "]";
|
|
947
949
|
}
|
|
948
950
|
function vr(e) {
|
|
@@ -1023,19 +1025,19 @@ function Nr(e) {
|
|
|
1023
1025
|
}
|
|
1024
1026
|
const ln = Vt(
|
|
1025
1027
|
void 0
|
|
1026
|
-
),
|
|
1028
|
+
), so = ({
|
|
1027
1029
|
children: e,
|
|
1028
1030
|
client: n
|
|
1029
1031
|
}) => /* @__PURE__ */ t.jsx(ln.Provider, { value: n, children: e }), cn = (e, n, ...[s]) => ({
|
|
1030
1032
|
queryFn: () => e.fetch(n, s),
|
|
1031
1033
|
queryKey: [Nr(n.toString()), s]
|
|
1032
|
-
}),
|
|
1034
|
+
}), wr = (e, ...[n]) => {
|
|
1033
1035
|
const s = ls(ln);
|
|
1034
1036
|
if (s === void 0)
|
|
1035
1037
|
throw new Error("useGraphQL must be used within a GraphQLProvider");
|
|
1036
1038
|
return cn(s, e, ...n === void 0 ? [] : [n]);
|
|
1037
1039
|
};
|
|
1038
|
-
class
|
|
1040
|
+
class ee extends String {
|
|
1039
1041
|
__apiType;
|
|
1040
1042
|
value;
|
|
1041
1043
|
__meta__;
|
|
@@ -1046,7 +1048,7 @@ class Y extends String {
|
|
|
1046
1048
|
return this.value;
|
|
1047
1049
|
}
|
|
1048
1050
|
}
|
|
1049
|
-
const
|
|
1051
|
+
const Sr = new ee(
|
|
1050
1052
|
`
|
|
1051
1053
|
fragment OperationsFragment on OperationItem {
|
|
1052
1054
|
slug
|
|
@@ -1118,7 +1120,7 @@ const wr = new Y(
|
|
|
1118
1120
|
}
|
|
1119
1121
|
`,
|
|
1120
1122
|
{ fragmentName: "OperationsFragment" }
|
|
1121
|
-
), Tr = new
|
|
1123
|
+
), Tr = new ee(`
|
|
1122
1124
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
1123
1125
|
schema(input: $input, type: $type) {
|
|
1124
1126
|
url
|
|
@@ -1127,13 +1129,13 @@ const wr = new Y(
|
|
|
1127
1129
|
}
|
|
1128
1130
|
}
|
|
1129
1131
|
}
|
|
1130
|
-
`), Ar = new
|
|
1132
|
+
`), Ar = new ee(`
|
|
1131
1133
|
query SchemaWarmup($input: JSON!, $type: SchemaType!) {
|
|
1132
1134
|
schema(input: $input, type: $type) {
|
|
1133
1135
|
openapi
|
|
1134
1136
|
}
|
|
1135
1137
|
}
|
|
1136
|
-
`),
|
|
1138
|
+
`), Or = new ee(`
|
|
1137
1139
|
query OperationsForTag($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
1138
1140
|
schema(input: $input, type: $type) {
|
|
1139
1141
|
servers {
|
|
@@ -1232,7 +1234,7 @@ const wr = new Y(
|
|
|
1232
1234
|
schema
|
|
1233
1235
|
}
|
|
1234
1236
|
}
|
|
1235
|
-
}`), Pr = new
|
|
1237
|
+
}`), Pr = new ee(`
|
|
1236
1238
|
query GetSchemas($input: JSON!, $type: SchemaType!) {
|
|
1237
1239
|
schema(input: $input, type: $type) {
|
|
1238
1240
|
title
|
|
@@ -1247,7 +1249,7 @@ const wr = new Y(
|
|
|
1247
1249
|
}
|
|
1248
1250
|
}
|
|
1249
1251
|
}
|
|
1250
|
-
`),
|
|
1252
|
+
`), $r = new ee(`
|
|
1251
1253
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
1252
1254
|
schema(input: $input, type: $type) {
|
|
1253
1255
|
url
|
|
@@ -1256,7 +1258,7 @@ const wr = new Y(
|
|
|
1256
1258
|
}
|
|
1257
1259
|
}
|
|
1258
1260
|
}
|
|
1259
|
-
`), Lr = new
|
|
1261
|
+
`), Lr = new ee(`
|
|
1260
1262
|
query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
|
|
1261
1263
|
schema(input: $input, type: $type) {
|
|
1262
1264
|
extensions
|
|
@@ -1279,24 +1281,24 @@ const wr = new Y(
|
|
|
1279
1281
|
}
|
|
1280
1282
|
}
|
|
1281
1283
|
}
|
|
1282
|
-
`),
|
|
1284
|
+
`), kr = {
|
|
1283
1285
|
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": Tr,
|
|
1284
|
-
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n servers {\n url\n description\n }\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":
|
|
1286
|
+
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n servers {\n url\n description\n }\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": Sr,
|
|
1285
1287
|
"\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n": Ar,
|
|
1286
|
-
"\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 extensions\n next {\n name\n slug\n extensions\n }\n prev {\n name\n slug\n extensions\n }\n }\n }\n }\n":
|
|
1288
|
+
"\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 extensions\n next {\n name\n slug\n extensions\n }\n prev {\n name\n slug\n extensions\n }\n }\n }\n }\n": Or,
|
|
1287
1289
|
"\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": Pr,
|
|
1288
|
-
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
1290
|
+
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": $r,
|
|
1289
1291
|
"\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n extensions\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": Lr
|
|
1290
1292
|
};
|
|
1291
|
-
function
|
|
1292
|
-
return
|
|
1293
|
+
function Er(e) {
|
|
1294
|
+
return kr[e] ?? {};
|
|
1293
1295
|
}
|
|
1294
|
-
function
|
|
1296
|
+
function _({
|
|
1295
1297
|
...e
|
|
1296
1298
|
}) {
|
|
1297
1299
|
return /* @__PURE__ */ t.jsx(st.Root, { "data-slot": "collapsible", ...e });
|
|
1298
1300
|
}
|
|
1299
|
-
function
|
|
1301
|
+
function de({
|
|
1300
1302
|
...e
|
|
1301
1303
|
}) {
|
|
1302
1304
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -1307,7 +1309,7 @@ function ce({
|
|
|
1307
1309
|
}
|
|
1308
1310
|
);
|
|
1309
1311
|
}
|
|
1310
|
-
function
|
|
1312
|
+
function q({
|
|
1311
1313
|
...e
|
|
1312
1314
|
}) {
|
|
1313
1315
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -1349,9 +1351,9 @@ const Dr = {
|
|
|
1349
1351
|
}
|
|
1350
1352
|
}, Fr = (e, n) => {
|
|
1351
1353
|
const s = e.toLowerCase().split("+"), a = s.includes("meta"), r = s.includes("shift"), o = s.includes("option") || s.includes("alt"), i = s.includes("ctrl"), c = e.split("+").pop(), l = E(n);
|
|
1352
|
-
return
|
|
1354
|
+
return U(() => {
|
|
1353
1355
|
l.current = n;
|
|
1354
|
-
}, [n]),
|
|
1356
|
+
}, [n]), U(() => {
|
|
1355
1357
|
const m = (d) => {
|
|
1356
1358
|
(d.code === `Key${c?.toUpperCase()}` || d.code.toLowerCase() === c?.toLowerCase()) && d.metaKey === a && d.shiftKey === r && d.altKey === o && d.ctrlKey === i && (d.preventDefault(), l.current());
|
|
1357
1359
|
};
|
|
@@ -1382,7 +1384,7 @@ const Dr = {
|
|
|
1382
1384
|
({ className: e, ...n }, s) => /* @__PURE__ */ t.jsx(
|
|
1383
1385
|
"textarea",
|
|
1384
1386
|
{
|
|
1385
|
-
className:
|
|
1387
|
+
className: S(
|
|
1386
1388
|
"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-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1387
1389
|
e
|
|
1388
1390
|
),
|
|
@@ -1392,33 +1394,33 @@ const Dr = {
|
|
|
1392
1394
|
)
|
|
1393
1395
|
);
|
|
1394
1396
|
dn.displayName = "Textarea";
|
|
1395
|
-
const
|
|
1397
|
+
const ve = (e = 0) => {
|
|
1396
1398
|
if (e === 0)
|
|
1397
1399
|
return "0 B";
|
|
1398
1400
|
const n = Math.floor(Math.log(e) / Math.log(1e3));
|
|
1399
1401
|
return `${(e / 1e3 ** n).toFixed(n ? 2 : 0)} ${n ? `${"kMGTPEZY"[n - 1]}B` : "B"}`;
|
|
1400
|
-
},
|
|
1402
|
+
}, Y = ({
|
|
1401
1403
|
children: e,
|
|
1402
1404
|
className: n
|
|
1403
1405
|
}) => /* @__PURE__ */ t.jsxs(
|
|
1404
1406
|
"div",
|
|
1405
1407
|
{
|
|
1406
|
-
className:
|
|
1408
|
+
className: S(
|
|
1407
1409
|
"grid grid-cols-[max-content_1fr_max-content] items-center gap-2 group bg-muted w-full h-10 ps-4 pe-2 border-b",
|
|
1408
1410
|
n
|
|
1409
1411
|
),
|
|
1410
1412
|
children: [
|
|
1411
1413
|
e,
|
|
1412
1414
|
/* @__PURE__ */ t.jsxs(
|
|
1413
|
-
|
|
1415
|
+
de,
|
|
1414
1416
|
{
|
|
1415
|
-
className:
|
|
1417
|
+
className: S(
|
|
1416
1418
|
"flex items-center gap-4 group bg-muted w-full p-2 hover:bg-accent hover:brightness-95 opacity-75 rounded-md",
|
|
1417
1419
|
n
|
|
1418
1420
|
),
|
|
1419
1421
|
children: [
|
|
1420
1422
|
/* @__PURE__ */ t.jsx(
|
|
1421
|
-
|
|
1423
|
+
kn,
|
|
1422
1424
|
{
|
|
1423
1425
|
className: "group-data-[state=closed]:hidden shrink-0",
|
|
1424
1426
|
size: 14
|
|
@@ -1439,12 +1441,12 @@ const Ee = (e = 0) => {
|
|
|
1439
1441
|
), H = ({
|
|
1440
1442
|
children: e,
|
|
1441
1443
|
className: n
|
|
1442
|
-
}) => /* @__PURE__ */ t.jsx("span", { className:
|
|
1444
|
+
}) => /* @__PURE__ */ t.jsx("span", { className: S("font-semibold w-full text-start", n), children: e }), Br = ({
|
|
1443
1445
|
examples: e,
|
|
1444
1446
|
onSelect: n
|
|
1445
1447
|
}) => /* @__PURE__ */ t.jsxs(Jt, { children: [
|
|
1446
1448
|
/* @__PURE__ */ t.jsx(Wt, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
|
|
1447
|
-
|
|
1449
|
+
B,
|
|
1448
1450
|
{
|
|
1449
1451
|
variant: "ghost",
|
|
1450
1452
|
size: "sm",
|
|
@@ -1456,10 +1458,10 @@ const Ee = (e = 0) => {
|
|
|
1456
1458
|
}
|
|
1457
1459
|
) }),
|
|
1458
1460
|
/* @__PURE__ */ t.jsx(Xt, { className: "max-w-72", children: e.map((s) => /* @__PURE__ */ t.jsxs("div", { children: [
|
|
1459
|
-
/* @__PURE__ */ t.jsx(
|
|
1460
|
-
/* @__PURE__ */ t.jsx(
|
|
1461
|
-
/* @__PURE__ */ t.jsx(
|
|
1462
|
-
|
|
1461
|
+
/* @__PURE__ */ t.jsx(Ts, { children: s.mediaType }),
|
|
1462
|
+
/* @__PURE__ */ t.jsx(As, {}),
|
|
1463
|
+
/* @__PURE__ */ t.jsx(Os, { children: s.examples?.map((a) => /* @__PURE__ */ t.jsx(
|
|
1464
|
+
Oe,
|
|
1463
1465
|
{
|
|
1464
1466
|
onSelect: () => n(a, s.mediaType),
|
|
1465
1467
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -1474,24 +1476,24 @@ const Ee = (e = 0) => {
|
|
|
1474
1476
|
a.name
|
|
1475
1477
|
)) })
|
|
1476
1478
|
] }, s.mediaType)) })
|
|
1477
|
-
] }),
|
|
1479
|
+
] }), Ee = ye(
|
|
1478
1480
|
"div",
|
|
1479
1481
|
"grid grid-cols-[min-content_2fr_3fr] items-center gap-x-5 [&>*:last-child_[data-slot=remove-button]]:invisible"
|
|
1480
1482
|
), ge = ye(
|
|
1481
1483
|
"div",
|
|
1482
1484
|
"group h-9 hover:bg-accent/75 ps-4 pe-2 grid col-span-full grid-cols-subgrid items-center border-b"
|
|
1483
1485
|
), I = ye(
|
|
1484
|
-
|
|
1486
|
+
Ps,
|
|
1485
1487
|
"w-full truncate border-0 p-0 m-0 shadow-none text-xs focus-visible:ring-0 font-mono"
|
|
1486
1488
|
), at = ({
|
|
1487
1489
|
onClick: e,
|
|
1488
1490
|
className: n
|
|
1489
1491
|
}) => /* @__PURE__ */ t.jsx(
|
|
1490
|
-
|
|
1492
|
+
K,
|
|
1491
1493
|
{
|
|
1492
1494
|
size: "icon-xs",
|
|
1493
1495
|
variant: "ghost",
|
|
1494
|
-
className:
|
|
1496
|
+
className: S(
|
|
1495
1497
|
"text-muted-foreground opacity-0 group-hover:brightness-95 focus-visible:opacity-100 group-hover:opacity-100",
|
|
1496
1498
|
n
|
|
1497
1499
|
),
|
|
@@ -1501,7 +1503,7 @@ const Ee = (e = 0) => {
|
|
|
1501
1503
|
children: /* @__PURE__ */ t.jsx(It, { size: 14 })
|
|
1502
1504
|
}
|
|
1503
1505
|
);
|
|
1504
|
-
function
|
|
1506
|
+
function be({
|
|
1505
1507
|
className: e,
|
|
1506
1508
|
...n
|
|
1507
1509
|
}) {
|
|
@@ -1509,7 +1511,7 @@ function ve({
|
|
|
1509
1511
|
Tt.Root,
|
|
1510
1512
|
{
|
|
1511
1513
|
"data-slot": "checkbox",
|
|
1512
|
-
className:
|
|
1514
|
+
className: S(
|
|
1513
1515
|
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
1514
1516
|
e
|
|
1515
1517
|
),
|
|
@@ -1529,7 +1531,7 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1529
1531
|
const s = E(null), a = n.getValue(e, "value");
|
|
1530
1532
|
return /* @__PURE__ */ t.jsxs(ge, { children: [
|
|
1531
1533
|
/* @__PURE__ */ t.jsx(
|
|
1532
|
-
|
|
1534
|
+
be,
|
|
1533
1535
|
{
|
|
1534
1536
|
...n.getCheckboxProps(e),
|
|
1535
1537
|
disabled: !n.getValue(e, "name")
|
|
@@ -1545,25 +1547,25 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1545
1547
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-1 flex-1", children: [
|
|
1546
1548
|
a instanceof File ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-1 flex-1 min-w-0", children: [
|
|
1547
1549
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-1 border-b cursor-default", children: [
|
|
1548
|
-
/* @__PURE__ */ t.jsx(
|
|
1550
|
+
/* @__PURE__ */ t.jsx(me, { size: 12, className: "text-muted-foreground" }),
|
|
1549
1551
|
/* @__PURE__ */ t.jsx(
|
|
1550
1552
|
"span",
|
|
1551
1553
|
{
|
|
1552
1554
|
className: "text-xs truncate",
|
|
1553
|
-
title: `${a.name} (${
|
|
1555
|
+
title: `${a.name} (${ve(a.size)})`,
|
|
1554
1556
|
children: a.name
|
|
1555
1557
|
}
|
|
1556
1558
|
)
|
|
1557
1559
|
] }),
|
|
1558
1560
|
/* @__PURE__ */ t.jsx(
|
|
1559
|
-
|
|
1561
|
+
K,
|
|
1560
1562
|
{
|
|
1561
1563
|
type: "button",
|
|
1562
1564
|
variant: "ghost",
|
|
1563
1565
|
size: "icon-xs",
|
|
1564
1566
|
className: "opacity-50 hover:opacity-100 hover:brightness-95 transition-opacity",
|
|
1565
1567
|
onClick: () => n.setValue(e, "value", ""),
|
|
1566
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1568
|
+
children: /* @__PURE__ */ t.jsx(Rn, { size: 13 })
|
|
1567
1569
|
}
|
|
1568
1570
|
)
|
|
1569
1571
|
] }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
@@ -1587,7 +1589,7 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1587
1589
|
}
|
|
1588
1590
|
),
|
|
1589
1591
|
/* @__PURE__ */ t.jsx(
|
|
1590
|
-
|
|
1592
|
+
K,
|
|
1591
1593
|
{
|
|
1592
1594
|
type: "button",
|
|
1593
1595
|
variant: "ghost",
|
|
@@ -1595,7 +1597,7 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1595
1597
|
onClick: () => s.current?.click(),
|
|
1596
1598
|
title: "Attach file",
|
|
1597
1599
|
className: "opacity-0 focus-visible:opacity-100 group-hover:opacity-100 group-hover:brightness-95 transition-opacity",
|
|
1598
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1600
|
+
children: /* @__PURE__ */ t.jsx(me, { size: 14 })
|
|
1599
1601
|
}
|
|
1600
1602
|
)
|
|
1601
1603
|
] }),
|
|
@@ -1614,7 +1616,7 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1614
1616
|
watch: c,
|
|
1615
1617
|
setFocus: l,
|
|
1616
1618
|
register: m
|
|
1617
|
-
} =
|
|
1619
|
+
} = oe(), { fields: d, append: f, remove: x } = Ut({ control: n, name: s }), p = c(s), v = E(-1), u = E(-1), y = D(
|
|
1618
1620
|
(g, C, T, A) => {
|
|
1619
1621
|
(C === "value" || C === "name") && (v.current = g), i(`${s}.${g}.${C}`, T), A?.focus === "next" ? l(
|
|
1620
1622
|
C === "name" ? `${s}.${g}.value` : `${s}.${g + 1}.name`
|
|
@@ -1623,32 +1625,32 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1623
1625
|
);
|
|
1624
1626
|
},
|
|
1625
1627
|
[s, i, l]
|
|
1626
|
-
),
|
|
1628
|
+
), w = D(
|
|
1627
1629
|
(g) => r ? r(g) : !g.name && !g.value,
|
|
1628
1630
|
[r]
|
|
1629
1631
|
), R = D(
|
|
1630
1632
|
(g) => o ? o(g) : !!(g.name || g.value),
|
|
1631
1633
|
[o]
|
|
1632
1634
|
);
|
|
1633
|
-
|
|
1634
|
-
if (!
|
|
1635
|
+
U(() => {
|
|
1636
|
+
if (!p) return;
|
|
1635
1637
|
if (u.current === -1) {
|
|
1636
|
-
u.current =
|
|
1638
|
+
u.current = p.length, p.length === 0 && f(a, {
|
|
1637
1639
|
shouldFocus: !1
|
|
1638
1640
|
});
|
|
1639
1641
|
return;
|
|
1640
1642
|
}
|
|
1641
|
-
if (u.current =
|
|
1643
|
+
if (u.current = p.length, p.length === 0) {
|
|
1642
1644
|
f(a, {
|
|
1643
1645
|
shouldFocus: !1
|
|
1644
1646
|
});
|
|
1645
1647
|
return;
|
|
1646
1648
|
}
|
|
1647
|
-
if (
|
|
1649
|
+
if (p.length > 1) {
|
|
1648
1650
|
const C = [];
|
|
1649
|
-
for (let T = 0; T <
|
|
1650
|
-
const A =
|
|
1651
|
-
A &&
|
|
1651
|
+
for (let T = 0; T < p.length - 1; T++) {
|
|
1652
|
+
const A = p[T];
|
|
1653
|
+
A && w(A) && !R(A) && C.push(T);
|
|
1652
1654
|
}
|
|
1653
1655
|
if (C.length > 0) {
|
|
1654
1656
|
const T = C[0];
|
|
@@ -1658,53 +1660,53 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1658
1660
|
M !== void 0 && x(M);
|
|
1659
1661
|
}
|
|
1660
1662
|
if (v.current === T) {
|
|
1661
|
-
const A =
|
|
1663
|
+
const A = p.length - C.length;
|
|
1662
1664
|
T < A ? l(`${s}.${T}.name`) : T > 0 ? l(`${s}.${T - 1}.name`) : l(`${s}.0.name`);
|
|
1663
1665
|
}
|
|
1664
1666
|
v.current = -1;
|
|
1665
1667
|
}
|
|
1666
1668
|
}
|
|
1667
|
-
const g =
|
|
1668
|
-
g && !
|
|
1669
|
+
const g = p[p.length - 1];
|
|
1670
|
+
g && !w(g) && f(a, {
|
|
1669
1671
|
shouldFocus: !1
|
|
1670
1672
|
});
|
|
1671
1673
|
}, [
|
|
1672
|
-
|
|
1674
|
+
p,
|
|
1673
1675
|
f,
|
|
1674
1676
|
x,
|
|
1675
1677
|
a,
|
|
1676
|
-
|
|
1678
|
+
w,
|
|
1677
1679
|
s,
|
|
1678
1680
|
l,
|
|
1679
1681
|
R
|
|
1680
|
-
]),
|
|
1681
|
-
if (!
|
|
1682
|
+
]), U(() => {
|
|
1683
|
+
if (!p) return;
|
|
1682
1684
|
const g = [];
|
|
1683
|
-
for (let C = 0; C <
|
|
1684
|
-
const T =
|
|
1685
|
+
for (let C = 0; C < p.length; C++) {
|
|
1686
|
+
const T = p[C];
|
|
1685
1687
|
if (!T) continue;
|
|
1686
1688
|
const A = R(T);
|
|
1687
1689
|
T.active !== A && g.push(() => y(C, "active", A));
|
|
1688
1690
|
}
|
|
1689
1691
|
g.length !== 0 && cs(() => g.forEach((C) => C()));
|
|
1690
|
-
}, [
|
|
1692
|
+
}, [p, R, y]);
|
|
1691
1693
|
const N = D(
|
|
1692
1694
|
(g) => {
|
|
1693
|
-
const C =
|
|
1694
|
-
return C ?
|
|
1695
|
+
const C = p?.[g];
|
|
1696
|
+
return C ? w(C) : !0;
|
|
1695
1697
|
},
|
|
1696
|
-
[
|
|
1698
|
+
[p, w]
|
|
1697
1699
|
), j = D(
|
|
1698
1700
|
(g, C) => {
|
|
1699
1701
|
const T = C === "name" ? `${s}.${g}.value` : `${s}.${g + 1}.name`, A = C === "name" ? `${s}.${g - 1}.value` : `${s}.${g}.name`, M = C === "value" || g > 0;
|
|
1700
1702
|
return (L) => {
|
|
1701
1703
|
if (!(L.target instanceof HTMLInputElement)) return;
|
|
1702
|
-
const De = L.target.selectionStart === 0,
|
|
1703
|
-
L.key === "Enter" ? l(T) : L.key === "Backspace" &&
|
|
1704
|
+
const De = L.target.selectionStart === 0, ne = L.target.selectionStart === L.target.value.length, Ce = !L.target.value;
|
|
1705
|
+
L.key === "Enter" ? l(T) : L.key === "Backspace" && Ce && M || L.key === "ArrowLeft" && De && M ? (L.preventDefault(), l(A)) : L.key === "ArrowRight" && ne && (L.preventDefault(), l(T));
|
|
1704
1706
|
};
|
|
1705
1707
|
},
|
|
1706
1708
|
[s, l]
|
|
1707
|
-
),
|
|
1709
|
+
), $ = D(
|
|
1708
1710
|
(g) => ({
|
|
1709
1711
|
...m(`${s}.${g}.name`),
|
|
1710
1712
|
onChange: (C) => y(g, "name", C.target.value),
|
|
@@ -1718,7 +1720,7 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1718
1720
|
onKeyDown: j(g, "value")
|
|
1719
1721
|
}),
|
|
1720
1722
|
[m, s, y, j]
|
|
1721
|
-
),
|
|
1723
|
+
), je = D(
|
|
1722
1724
|
(g) => ({
|
|
1723
1725
|
...m(`${s}.${g}.active`),
|
|
1724
1726
|
checked: c(`${s}.${g}.active`) ?? !1,
|
|
@@ -1729,9 +1731,9 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1729
1731
|
}),
|
|
1730
1732
|
[s, m, N, c, y]
|
|
1731
1733
|
), Ie = D(
|
|
1732
|
-
(g, C) =>
|
|
1733
|
-
[
|
|
1734
|
-
),
|
|
1734
|
+
(g, C) => p?.[g]?.[C],
|
|
1735
|
+
[p]
|
|
1736
|
+
), te = D(
|
|
1735
1737
|
(g) => ({
|
|
1736
1738
|
onClick: () => x(g),
|
|
1737
1739
|
disabled: g === d.length - 1
|
|
@@ -1740,53 +1742,53 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1740
1742
|
);
|
|
1741
1743
|
return {
|
|
1742
1744
|
fields: d,
|
|
1743
|
-
getNameInputProps:
|
|
1745
|
+
getNameInputProps: $,
|
|
1744
1746
|
getValueInputProps: Q,
|
|
1745
|
-
getCheckboxProps:
|
|
1746
|
-
getRemoveButtonProps:
|
|
1747
|
+
getCheckboxProps: je,
|
|
1748
|
+
getRemoveButtonProps: te,
|
|
1747
1749
|
setValue: y,
|
|
1748
1750
|
getValue: Ie
|
|
1749
1751
|
};
|
|
1750
1752
|
}, qr = ({ content: e }) => {
|
|
1751
|
-
const { register: n, setValue: s, watch: a, control: r } =
|
|
1753
|
+
const { register: n, setValue: s, watch: a, control: r } = oe(), o = (e ?? []).flatMap((j) => j.examples), [i, c, l, m, d] = a([
|
|
1752
1754
|
"headers",
|
|
1753
1755
|
"file",
|
|
1754
1756
|
"bodyMode",
|
|
1755
1757
|
"body",
|
|
1756
1758
|
"multipartFormFields"
|
|
1757
|
-
]), f = E(null), [x,
|
|
1759
|
+
]), f = E(null), [x, p] = k(!1), v = (j) => {
|
|
1758
1760
|
s("file", j), j && s(
|
|
1759
1761
|
"headers",
|
|
1760
1762
|
i.filter(
|
|
1761
|
-
(
|
|
1763
|
+
($) => $.name.toLowerCase() !== "content-type" || !$.active
|
|
1762
1764
|
)
|
|
1763
1765
|
);
|
|
1764
1766
|
}, u = (j) => {
|
|
1765
|
-
const
|
|
1766
|
-
v(
|
|
1767
|
+
const $ = j.target.files?.[0] ?? null;
|
|
1768
|
+
v($);
|
|
1767
1769
|
}, y = (j) => {
|
|
1768
|
-
j.preventDefault(), j.stopPropagation(),
|
|
1769
|
-
},
|
|
1770
|
-
j.preventDefault(), j.stopPropagation(),
|
|
1770
|
+
j.preventDefault(), j.stopPropagation(), p(!0);
|
|
1771
|
+
}, w = (j) => {
|
|
1772
|
+
j.preventDefault(), j.stopPropagation(), p(!1);
|
|
1771
1773
|
}, R = (j) => {
|
|
1772
|
-
j.preventDefault(), j.stopPropagation(),
|
|
1773
|
-
const
|
|
1774
|
-
v(
|
|
1774
|
+
j.preventDefault(), j.stopPropagation(), p(!1);
|
|
1775
|
+
const $ = j.dataTransfer.files?.[0] ?? null;
|
|
1776
|
+
v($);
|
|
1775
1777
|
}, N = ot({
|
|
1776
1778
|
control: r,
|
|
1777
1779
|
name: "multipartFormFields",
|
|
1778
1780
|
defaultValue: { name: "", value: "", active: !1 },
|
|
1779
1781
|
isEmpty: (j) => j.value instanceof File ? !1 : !j.name && !j.value
|
|
1780
1782
|
});
|
|
1781
|
-
return /* @__PURE__ */ t.jsxs(
|
|
1782
|
-
/* @__PURE__ */ t.jsxs(
|
|
1783
|
-
/* @__PURE__ */ t.jsx(
|
|
1783
|
+
return /* @__PURE__ */ t.jsxs(_, { defaultOpen: !0, children: [
|
|
1784
|
+
/* @__PURE__ */ t.jsxs(Y, { className: "items-center", children: [
|
|
1785
|
+
/* @__PURE__ */ t.jsx(In, { size: 16 }),
|
|
1784
1786
|
/* @__PURE__ */ t.jsxs(H, { className: "flex items-center justify-between", children: [
|
|
1785
1787
|
"Body",
|
|
1786
1788
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
1787
1789
|
/* @__PURE__ */ t.jsxs(Jt, { children: [
|
|
1788
1790
|
/* @__PURE__ */ t.jsx(Wt, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
|
|
1789
|
-
|
|
1791
|
+
K,
|
|
1790
1792
|
{
|
|
1791
1793
|
variant: "ghost",
|
|
1792
1794
|
size: "sm",
|
|
@@ -1796,19 +1798,19 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1796
1798
|
/* @__PURE__ */ t.jsx(yt, { size: 14 }),
|
|
1797
1799
|
"Text"
|
|
1798
1800
|
] }) : l === "file" ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1799
|
-
/* @__PURE__ */ t.jsx(
|
|
1801
|
+
/* @__PURE__ */ t.jsx(me, { size: 14 }),
|
|
1800
1802
|
"File"
|
|
1801
1803
|
] }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1802
1804
|
/* @__PURE__ */ t.jsx(vt, { size: 14 }),
|
|
1803
1805
|
"Multipart"
|
|
1804
1806
|
] }),
|
|
1805
|
-
/* @__PURE__ */ t.jsx(
|
|
1807
|
+
/* @__PURE__ */ t.jsx(Dn, { size: 14 })
|
|
1806
1808
|
]
|
|
1807
1809
|
}
|
|
1808
1810
|
) }),
|
|
1809
1811
|
/* @__PURE__ */ t.jsxs(Xt, { className: "min-w-40", children: [
|
|
1810
1812
|
/* @__PURE__ */ t.jsxs(
|
|
1811
|
-
|
|
1813
|
+
Oe,
|
|
1812
1814
|
{
|
|
1813
1815
|
onSelect: () => s("bodyMode", "text"),
|
|
1814
1816
|
className: "gap-2",
|
|
@@ -1820,19 +1822,19 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1820
1822
|
}
|
|
1821
1823
|
),
|
|
1822
1824
|
/* @__PURE__ */ t.jsxs(
|
|
1823
|
-
|
|
1825
|
+
Oe,
|
|
1824
1826
|
{
|
|
1825
1827
|
onSelect: () => s("bodyMode", "file"),
|
|
1826
1828
|
className: "gap-2",
|
|
1827
1829
|
children: [
|
|
1828
|
-
/* @__PURE__ */ t.jsx(
|
|
1830
|
+
/* @__PURE__ */ t.jsx(me, { size: 14 }),
|
|
1829
1831
|
/* @__PURE__ */ t.jsx("span", { className: "flex-1", children: "File" }),
|
|
1830
1832
|
/* @__PURE__ */ t.jsx("span", { children: c && /* @__PURE__ */ t.jsx("div", { className: "w-1.5 h-1.5 bg-primary rounded-full" }) })
|
|
1831
1833
|
]
|
|
1832
1834
|
}
|
|
1833
1835
|
),
|
|
1834
1836
|
/* @__PURE__ */ t.jsxs(
|
|
1835
|
-
|
|
1837
|
+
Oe,
|
|
1836
1838
|
{
|
|
1837
1839
|
onSelect: () => s("bodyMode", "multipart"),
|
|
1838
1840
|
className: "gap-2",
|
|
@@ -1859,12 +1861,12 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1859
1861
|
Br,
|
|
1860
1862
|
{
|
|
1861
1863
|
examples: e,
|
|
1862
|
-
onSelect: (j,
|
|
1864
|
+
onSelect: (j, $) => {
|
|
1863
1865
|
s("body", JSON.stringify(j.value, null, 2)), s("headers", [
|
|
1864
1866
|
...i.filter((Q) => Q.name !== "Content-Type"),
|
|
1865
1867
|
{
|
|
1866
1868
|
name: "Content-Type",
|
|
1867
|
-
value:
|
|
1869
|
+
value: $,
|
|
1868
1870
|
active: !0
|
|
1869
1871
|
}
|
|
1870
1872
|
]);
|
|
@@ -1874,12 +1876,12 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1874
1876
|
] })
|
|
1875
1877
|
] })
|
|
1876
1878
|
] }),
|
|
1877
|
-
/* @__PURE__ */ t.jsxs(
|
|
1879
|
+
/* @__PURE__ */ t.jsxs(q, { className: "CollapsibleContent flex flex-col gap-2", children: [
|
|
1878
1880
|
l === "text" && /* @__PURE__ */ t.jsx(
|
|
1879
1881
|
dn,
|
|
1880
1882
|
{
|
|
1881
1883
|
...n("body"),
|
|
1882
|
-
className:
|
|
1884
|
+
className: S(
|
|
1883
1885
|
"w-full px-4 py-2.5 h-64 font-mono md:text-xs border-none rounded-none focus-visible:ring-0 transition-colors"
|
|
1884
1886
|
),
|
|
1885
1887
|
placeholder: "Body content"
|
|
@@ -1890,11 +1892,11 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1890
1892
|
{
|
|
1891
1893
|
role: "region",
|
|
1892
1894
|
"aria-label": "File upload drop zone",
|
|
1893
|
-
className:
|
|
1895
|
+
className: S(
|
|
1894
1896
|
"flex flex-col items-center justify-center gap-4 min-h-[300px]"
|
|
1895
1897
|
),
|
|
1896
1898
|
onDragOver: y,
|
|
1897
|
-
onDragLeave:
|
|
1899
|
+
onDragLeave: w,
|
|
1898
1900
|
onDrop: R,
|
|
1899
1901
|
children: [
|
|
1900
1902
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1902,15 +1904,15 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1902
1904
|
{
|
|
1903
1905
|
type: "button",
|
|
1904
1906
|
onClick: () => f.current?.click(),
|
|
1905
|
-
className:
|
|
1907
|
+
className: S(
|
|
1906
1908
|
"flex items-center justify-center gap-2 rounded-full size-20 p-0 border border-dashed border-muted-foreground/50 hover:bg-accent/75 transition-colors",
|
|
1907
1909
|
(c || x) && "border-solid",
|
|
1908
1910
|
x && "bg-accent border-primary"
|
|
1909
1911
|
),
|
|
1910
1912
|
children: /* @__PURE__ */ t.jsx(
|
|
1911
|
-
|
|
1913
|
+
me,
|
|
1912
1914
|
{
|
|
1913
|
-
className:
|
|
1915
|
+
className: S(
|
|
1914
1916
|
"text-muted-foreground",
|
|
1915
1917
|
x && "text-primary"
|
|
1916
1918
|
),
|
|
@@ -1925,12 +1927,12 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1925
1927
|
" ",
|
|
1926
1928
|
/* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground", children: [
|
|
1927
1929
|
"(",
|
|
1928
|
-
|
|
1930
|
+
ve(c.size),
|
|
1929
1931
|
")"
|
|
1930
1932
|
] })
|
|
1931
1933
|
] }),
|
|
1932
1934
|
/* @__PURE__ */ t.jsx(
|
|
1933
|
-
|
|
1935
|
+
K,
|
|
1934
1936
|
{
|
|
1935
1937
|
type: "button",
|
|
1936
1938
|
variant: "ghost",
|
|
@@ -1943,7 +1945,7 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1943
1945
|
]
|
|
1944
1946
|
}
|
|
1945
1947
|
),
|
|
1946
|
-
l === "multipart" && /* @__PURE__ */ t.jsx(
|
|
1948
|
+
l === "multipart" && /* @__PURE__ */ t.jsx(Ee, { children: N.fields.map((j, $) => /* @__PURE__ */ t.jsx(_r, { index: $, manager: N }, j.id)) })
|
|
1947
1949
|
] })
|
|
1948
1950
|
] });
|
|
1949
1951
|
}, Lt = (e, n, s) => {
|
|
@@ -1958,12 +1960,15 @@ const _r = ({ index: e, manager: n }) => {
|
|
|
1958
1960
|
r.searchParams.set(o.name, o.value);
|
|
1959
1961
|
}), r;
|
|
1960
1962
|
};
|
|
1961
|
-
function
|
|
1963
|
+
function Ur(e) {
|
|
1962
1964
|
return /^(application\/octet-stream|image\/|audio\/|video\/|font\/|application\/pdf|application\/zip|application\/x-protobuf|application\/x-binary)/i.test(
|
|
1963
1965
|
e
|
|
1964
1966
|
);
|
|
1965
1967
|
}
|
|
1966
|
-
|
|
1968
|
+
function Mr(e) {
|
|
1969
|
+
return /^audio\//i.test(e);
|
|
1970
|
+
}
|
|
1971
|
+
const Gr = (e, n) => {
|
|
1967
1972
|
const s = e.find(
|
|
1968
1973
|
([a]) => a.toLowerCase() === "content-disposition"
|
|
1969
1974
|
)?.[1];
|
|
@@ -1980,21 +1985,21 @@ const Ur = (e, n) => {
|
|
|
1980
1985
|
} catch {
|
|
1981
1986
|
return "download";
|
|
1982
1987
|
}
|
|
1983
|
-
},
|
|
1984
|
-
|
|
1988
|
+
}, Hr = Pe.Root, un = xe.forwardRef(({ className: e, align: n = "center", sideOffset: s = 4, ...a }, r) => /* @__PURE__ */ t.jsx(Pe.Portal, { children: /* @__PURE__ */ t.jsx(
|
|
1989
|
+
Pe.Content,
|
|
1985
1990
|
{
|
|
1986
1991
|
ref: r,
|
|
1987
1992
|
align: n,
|
|
1988
1993
|
sideOffset: s,
|
|
1989
|
-
className:
|
|
1994
|
+
className: S(
|
|
1990
1995
|
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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",
|
|
1991
1996
|
e
|
|
1992
1997
|
),
|
|
1993
1998
|
...a
|
|
1994
1999
|
}
|
|
1995
2000
|
) }));
|
|
1996
|
-
un.displayName =
|
|
1997
|
-
const
|
|
2001
|
+
un.displayName = Pe.Content.displayName;
|
|
2002
|
+
const Qr = ({
|
|
1998
2003
|
value: e,
|
|
1999
2004
|
options: n,
|
|
2000
2005
|
onChange: s,
|
|
@@ -2005,10 +2010,10 @@ const Hr = ({
|
|
|
2005
2010
|
ref: c,
|
|
2006
2011
|
onSelect: l
|
|
2007
2012
|
}) => {
|
|
2008
|
-
const [m, d] = k(!1), [f, x] = k(!1),
|
|
2009
|
-
return /* @__PURE__ */ t.jsxs(
|
|
2010
|
-
/* @__PURE__ */ t.jsx(
|
|
2011
|
-
|
|
2013
|
+
const [m, d] = k(!1), [f, x] = k(!1), p = Ls((u) => u.filtered.count), v = E(null);
|
|
2014
|
+
return /* @__PURE__ */ t.jsxs(Hr, { open: m, children: [
|
|
2015
|
+
/* @__PURE__ */ t.jsx($s, { children: /* @__PURE__ */ t.jsx(
|
|
2016
|
+
Es,
|
|
2012
2017
|
{
|
|
2013
2018
|
autoComplete: "off",
|
|
2014
2019
|
ref: (u) => {
|
|
@@ -2016,7 +2021,7 @@ const Hr = ({
|
|
|
2016
2021
|
},
|
|
2017
2022
|
value: e ? String(e) : void 0,
|
|
2018
2023
|
placeholder: r,
|
|
2019
|
-
className:
|
|
2024
|
+
className: S("h-9 bg-transparent", a),
|
|
2020
2025
|
onFocus: () => d(!0),
|
|
2021
2026
|
onBlur: () => {
|
|
2022
2027
|
f || d(!1);
|
|
@@ -2033,8 +2038,8 @@ const Hr = ({
|
|
|
2033
2038
|
onMouseEnter: () => x(!0),
|
|
2034
2039
|
onMouseLeave: () => x(!1),
|
|
2035
2040
|
onOpenAutoFocus: (u) => u.preventDefault(),
|
|
2036
|
-
className:
|
|
2037
|
-
"border-0":
|
|
2041
|
+
className: S("p-0 w-(--radix-popover-trigger-width)", {
|
|
2042
|
+
"border-0": p === 0
|
|
2038
2043
|
}),
|
|
2039
2044
|
align: "start",
|
|
2040
2045
|
side: "bottom",
|
|
@@ -2044,8 +2049,8 @@ const Hr = ({
|
|
|
2044
2049
|
onTouchMove: (u) => {
|
|
2045
2050
|
u.stopPropagation();
|
|
2046
2051
|
},
|
|
2047
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2048
|
-
|
|
2052
|
+
children: /* @__PURE__ */ t.jsx(Rs, { className: "max-h-[140px]", children: n.map((u) => /* @__PURE__ */ t.jsx(
|
|
2053
|
+
Is,
|
|
2049
2054
|
{
|
|
2050
2055
|
value: u,
|
|
2051
2056
|
onSelect: (y) => {
|
|
@@ -2059,7 +2064,7 @@ const Hr = ({
|
|
|
2059
2064
|
}
|
|
2060
2065
|
)
|
|
2061
2066
|
] });
|
|
2062
|
-
},
|
|
2067
|
+
}, $e = ({ shouldFilter: e, ...n }) => /* @__PURE__ */ t.jsx(ks, { className: "bg-transparent", shouldFilter: e, children: /* @__PURE__ */ t.jsx(Qr, { ...n }) }), Jr = Object.freeze([
|
|
2063
2068
|
"Accept",
|
|
2064
2069
|
"Accept-Encoding",
|
|
2065
2070
|
"Accept-Language",
|
|
@@ -2086,67 +2091,67 @@ const Hr = ({
|
|
|
2086
2091
|
"Set-Cookie",
|
|
2087
2092
|
"User-Agent",
|
|
2088
2093
|
"X-Requested-With"
|
|
2089
|
-
]),
|
|
2094
|
+
]), Wr = ({
|
|
2090
2095
|
control: e,
|
|
2091
2096
|
schemaHeaders: n,
|
|
2092
2097
|
lockedHeaders: s
|
|
2093
2098
|
}) => {
|
|
2094
|
-
const { watch: a, formState: r } =
|
|
2099
|
+
const { watch: a, formState: r } = oe(), o = a("headers"), i = ot({
|
|
2095
2100
|
control: e,
|
|
2096
2101
|
name: "headers",
|
|
2097
2102
|
defaultValue: { name: "", value: "", active: !1 }
|
|
2098
|
-
}), c = n.filter((d) => !o.some((f) => f.name === d.name)).map(({ name: d }) => d), l = i.fields.flatMap((d, f) => !s?.map((
|
|
2103
|
+
}), c = n.filter((d) => !o.some((f) => f.name === d.name)).map(({ name: d }) => d), l = i.fields.flatMap((d, f) => !s?.map((p) => p.toLowerCase()).includes(d.name.toLowerCase()) ? [] : [f]), m = s?.map((d) => ({
|
|
2099
2104
|
name: d,
|
|
2100
2105
|
id: `locked-${d}`,
|
|
2101
2106
|
value: "••••••••••",
|
|
2102
2107
|
active: !0,
|
|
2103
2108
|
locked: !0
|
|
2104
2109
|
})) ?? [];
|
|
2105
|
-
return /* @__PURE__ */ t.jsxs(
|
|
2106
|
-
/* @__PURE__ */ t.jsxs(
|
|
2107
|
-
/* @__PURE__ */ t.jsx(
|
|
2110
|
+
return /* @__PURE__ */ t.jsxs(_, { defaultOpen: !0, children: [
|
|
2111
|
+
/* @__PURE__ */ t.jsxs(Y, { children: [
|
|
2112
|
+
/* @__PURE__ */ t.jsx(Fn, { size: 14 }),
|
|
2108
2113
|
/* @__PURE__ */ t.jsx(H, { children: "Headers" })
|
|
2109
2114
|
] }),
|
|
2110
|
-
/* @__PURE__ */ t.jsx(
|
|
2115
|
+
/* @__PURE__ */ t.jsx(q, { className: "CollapsibleContent", children: /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ t.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ t.jsxs(Ee, { children: [
|
|
2111
2116
|
m.map((d) => /* @__PURE__ */ t.jsxs(Ct, { children: [
|
|
2112
2117
|
/* @__PURE__ */ t.jsx(Nt, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
|
|
2113
2118
|
ge,
|
|
2114
2119
|
{
|
|
2115
2120
|
className: "opacity-50 cursor-not-allowed font-mono text-xs min-h-10",
|
|
2116
2121
|
children: [
|
|
2117
|
-
/* @__PURE__ */ t.jsx(
|
|
2122
|
+
/* @__PURE__ */ t.jsx(zn, { size: 16 }),
|
|
2118
2123
|
/* @__PURE__ */ t.jsx(I, { value: d.name, disabled: !0 }),
|
|
2119
2124
|
/* @__PURE__ */ t.jsx("div", { children: d.value })
|
|
2120
2125
|
]
|
|
2121
2126
|
},
|
|
2122
2127
|
d.id
|
|
2123
2128
|
) }),
|
|
2124
|
-
/* @__PURE__ */ t.jsx(
|
|
2129
|
+
/* @__PURE__ */ t.jsx(wt, { alignOffset: 10, side: "bottom", align: "start", children: /* @__PURE__ */ t.jsx("p", { children: "This header is set by the selected authentication." }) })
|
|
2125
2130
|
] }, d.id)),
|
|
2126
2131
|
i.fields.map((d, f) => {
|
|
2127
2132
|
const x = n.find(
|
|
2128
|
-
(
|
|
2129
|
-
),
|
|
2133
|
+
(w) => w.name === o.at(f)?.name
|
|
2134
|
+
), p = x?.enum && x.enum.length > 0, v = l.includes(f), u = i.getNameInputProps(f), y = i.getValueInputProps(f);
|
|
2130
2135
|
return /* @__PURE__ */ t.jsxs(
|
|
2131
2136
|
ge,
|
|
2132
2137
|
{
|
|
2133
|
-
className:
|
|
2138
|
+
className: S(
|
|
2134
2139
|
v && "text-amber-600",
|
|
2135
2140
|
v && !r.dirtyFields.headers?.[f]?.value && "hidden"
|
|
2136
2141
|
),
|
|
2137
2142
|
children: [
|
|
2138
2143
|
/* @__PURE__ */ t.jsx(
|
|
2139
|
-
|
|
2144
|
+
be,
|
|
2140
2145
|
{
|
|
2141
|
-
className:
|
|
2146
|
+
className: S(v && "hidden"),
|
|
2142
2147
|
...i.getCheckboxProps(f)
|
|
2143
2148
|
}
|
|
2144
2149
|
),
|
|
2145
2150
|
/* @__PURE__ */ t.jsxs(Ct, { children: [
|
|
2146
2151
|
/* @__PURE__ */ t.jsx(Nt, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
2147
|
-
|
|
2152
|
+
Vn,
|
|
2148
2153
|
{
|
|
2149
|
-
className:
|
|
2154
|
+
className: S(
|
|
2150
2155
|
"text-amber-600",
|
|
2151
2156
|
!v && "hidden"
|
|
2152
2157
|
),
|
|
@@ -2154,7 +2159,7 @@ const Hr = ({
|
|
|
2154
2159
|
}
|
|
2155
2160
|
) }),
|
|
2156
2161
|
/* @__PURE__ */ t.jsx(
|
|
2157
|
-
|
|
2162
|
+
wt,
|
|
2158
2163
|
{
|
|
2159
2164
|
alignOffset: 10,
|
|
2160
2165
|
side: "bottom",
|
|
@@ -2164,26 +2169,26 @@ const Hr = ({
|
|
|
2164
2169
|
)
|
|
2165
2170
|
] }),
|
|
2166
2171
|
/* @__PURE__ */ t.jsx(I, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
2167
|
-
|
|
2172
|
+
$e,
|
|
2168
2173
|
{
|
|
2169
2174
|
...u,
|
|
2170
2175
|
value: String(i.getValue(f, "name")),
|
|
2171
2176
|
placeholder: "Name",
|
|
2172
|
-
options: [...c, ...
|
|
2173
|
-
onChange: (
|
|
2174
|
-
onSelect: (
|
|
2177
|
+
options: [...c, ...Jr],
|
|
2178
|
+
onChange: (w) => i.setValue(f, "name", w),
|
|
2179
|
+
onSelect: (w) => i.setValue(f, "name", w, { focus: "next" })
|
|
2175
2180
|
}
|
|
2176
2181
|
) }),
|
|
2177
2182
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2178
|
-
|
|
2179
|
-
|
|
2183
|
+
p ? /* @__PURE__ */ t.jsx(I, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
2184
|
+
$e,
|
|
2180
2185
|
{
|
|
2181
2186
|
...y,
|
|
2182
2187
|
value: String(i.getValue(f, "value")),
|
|
2183
2188
|
shouldFilter: !1,
|
|
2184
2189
|
options: x.enum ?? [],
|
|
2185
|
-
onChange: (
|
|
2186
|
-
onSelect: (
|
|
2190
|
+
onChange: (w) => i.setValue(f, "value", w),
|
|
2191
|
+
onSelect: (w) => i.setValue(f, "value", w, { focus: "next" })
|
|
2187
2192
|
}
|
|
2188
2193
|
) }) : /* @__PURE__ */ t.jsx(
|
|
2189
2194
|
I,
|
|
@@ -2207,13 +2212,13 @@ const Hr = ({
|
|
|
2207
2212
|
})
|
|
2208
2213
|
] }) }) }) })
|
|
2209
2214
|
] });
|
|
2210
|
-
},
|
|
2215
|
+
}, Xr = Fs(
|
|
2211
2216
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
2212
2217
|
), Re = xe.forwardRef(({ className: e, ...n }, s) => /* @__PURE__ */ t.jsx(
|
|
2213
2218
|
Kt.Root,
|
|
2214
2219
|
{
|
|
2215
2220
|
ref: s,
|
|
2216
|
-
className:
|
|
2221
|
+
className: S(Xr(), e),
|
|
2217
2222
|
...n
|
|
2218
2223
|
}
|
|
2219
2224
|
));
|
|
@@ -2221,7 +2226,7 @@ Re.displayName = Kt.Root.displayName;
|
|
|
2221
2226
|
const mn = xe.forwardRef(({ className: e, ...n }, s) => /* @__PURE__ */ t.jsx(
|
|
2222
2227
|
he.Root,
|
|
2223
2228
|
{
|
|
2224
|
-
className:
|
|
2229
|
+
className: S("grid gap-2", e),
|
|
2225
2230
|
...n,
|
|
2226
2231
|
ref: s
|
|
2227
2232
|
}
|
|
@@ -2231,12 +2236,12 @@ const pn = xe.forwardRef(({ className: e, ...n }, s) => /* @__PURE__ */ t.jsx(
|
|
|
2231
2236
|
he.Item,
|
|
2232
2237
|
{
|
|
2233
2238
|
ref: s,
|
|
2234
|
-
className:
|
|
2239
|
+
className: S(
|
|
2235
2240
|
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
2236
2241
|
e
|
|
2237
2242
|
),
|
|
2238
2243
|
...n,
|
|
2239
|
-
children: /* @__PURE__ */ t.jsx(he.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ t.jsx(
|
|
2244
|
+
children: /* @__PURE__ */ t.jsx(he.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ t.jsx(Bn, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
2240
2245
|
}
|
|
2241
2246
|
));
|
|
2242
2247
|
pn.displayName = he.Item.displayName;
|
|
@@ -2249,10 +2254,10 @@ const hn = ({
|
|
|
2249
2254
|
{
|
|
2250
2255
|
onValueChange: (a) => n(a),
|
|
2251
2256
|
value: s,
|
|
2252
|
-
defaultValue:
|
|
2257
|
+
defaultValue: pe,
|
|
2253
2258
|
className: "gap-0",
|
|
2254
2259
|
disabled: e?.length === 0,
|
|
2255
|
-
children: [{ id:
|
|
2260
|
+
children: [{ id: pe, label: "None" }, ...e ?? []].map(
|
|
2256
2261
|
(a) => /* @__PURE__ */ t.jsxs(
|
|
2257
2262
|
Re,
|
|
2258
2263
|
{
|
|
@@ -2266,7 +2271,7 @@ const hn = ({
|
|
|
2266
2271
|
)
|
|
2267
2272
|
)
|
|
2268
2273
|
}
|
|
2269
|
-
) }),
|
|
2274
|
+
) }), Kr = ({
|
|
2270
2275
|
onSubmit: e,
|
|
2271
2276
|
identities: n,
|
|
2272
2277
|
open: s,
|
|
@@ -2276,7 +2281,7 @@ const hn = ({
|
|
|
2276
2281
|
return /* @__PURE__ */ t.jsx(et, { open: s, onOpenChange: a, children: /* @__PURE__ */ t.jsxs(tt, { children: [
|
|
2277
2282
|
/* @__PURE__ */ t.jsx(nt, { children: "Select an auth identity" }),
|
|
2278
2283
|
/* @__PURE__ */ t.jsx(_t, { children: "Please select an identity for this request." }),
|
|
2279
|
-
/* @__PURE__ */ t.jsx(
|
|
2284
|
+
/* @__PURE__ */ t.jsx(Ds, { className: "max-h-80 overflow-auto", children: /* @__PURE__ */ t.jsx(
|
|
2280
2285
|
hn,
|
|
2281
2286
|
{
|
|
2282
2287
|
identities: n,
|
|
@@ -2287,7 +2292,7 @@ const hn = ({
|
|
|
2287
2292
|
/* @__PURE__ */ t.jsxs(qt, { className: "flex flex-col gap-2", children: [
|
|
2288
2293
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2289
2294
|
/* @__PURE__ */ t.jsx(
|
|
2290
|
-
|
|
2295
|
+
be,
|
|
2291
2296
|
{
|
|
2292
2297
|
id: "remember",
|
|
2293
2298
|
checked: i,
|
|
@@ -2299,7 +2304,7 @@ const hn = ({
|
|
|
2299
2304
|
/* @__PURE__ */ t.jsx(Re, { htmlFor: "remember", children: "Remember my choice" })
|
|
2300
2305
|
] }),
|
|
2301
2306
|
/* @__PURE__ */ t.jsx(
|
|
2302
|
-
|
|
2307
|
+
B,
|
|
2303
2308
|
{
|
|
2304
2309
|
onClick: () => e({ identity: r, rememberedIdentity: i }),
|
|
2305
2310
|
children: "Send"
|
|
@@ -2307,19 +2312,19 @@ const hn = ({
|
|
|
2307
2312
|
)
|
|
2308
2313
|
] })
|
|
2309
2314
|
] }) });
|
|
2310
|
-
},
|
|
2315
|
+
}, Me = (e) => Math.abs(
|
|
2311
2316
|
Number.isNaN(Number(e)) ? e.toLowerCase().charCodeAt(0) - 96 : Number.isNaN(Number(e)) ? 0 : Number(e)
|
|
2312
|
-
), Ge = (e) => e.length > 1 ? Number(e.split("").reduce((n, s) => `${
|
|
2317
|
+
), Ge = (e) => e.length > 1 ? Number(e.split("").reduce((n, s) => `${Me(n) + Me(s)}`)) : Me(e), kt = (e, n = {}) => {
|
|
2313
2318
|
const s = (3 * Ge(e) + 2 * Ge(e) + Ge(e)) % 360, { saturation: a = 75, lightness: r = 60 } = n;
|
|
2314
2319
|
return `${s}deg ${a}% ${r}%`;
|
|
2315
|
-
}, He = "data-linked-param",
|
|
2320
|
+
}, He = "data-linked-param", Zr = (e) => {
|
|
2316
2321
|
const { resolvedTheme: n } = hs();
|
|
2317
2322
|
return {
|
|
2318
|
-
text:
|
|
2323
|
+
text: kt(
|
|
2319
2324
|
e,
|
|
2320
2325
|
n === "light" ? { saturation: 95, lightness: 38 } : {}
|
|
2321
2326
|
),
|
|
2322
|
-
background:
|
|
2327
|
+
background: kt(
|
|
2323
2328
|
e,
|
|
2324
2329
|
n === "light" ? { saturation: 85, lightness: 40 } : {}
|
|
2325
2330
|
)
|
|
@@ -2332,16 +2337,16 @@ const hn = ({
|
|
|
2332
2337
|
children: r,
|
|
2333
2338
|
onClick: o
|
|
2334
2339
|
}) => {
|
|
2335
|
-
const i = E(null), c = s?.replace(/[{}]/g, ""), l = e.replace(/[{}]/g, ""), { text: m, background: d } =
|
|
2336
|
-
return
|
|
2340
|
+
const i = E(null), c = s?.replace(/[{}]/g, ""), l = e.replace(/[{}]/g, ""), { text: m, background: d } = Zr(l), f = `hsl(${m} / 100%)`, x = `hsl(${d} / 10%)`, p = `hsl(${d} / 50%)`;
|
|
2341
|
+
return U(() => {
|
|
2337
2342
|
if (!c || !i.current) return;
|
|
2338
2343
|
const v = () => {
|
|
2339
|
-
document.querySelectorAll(`[${He}="${c}"]`).forEach((
|
|
2340
|
-
|
|
2344
|
+
document.querySelectorAll(`[${He}="${c}"]`).forEach((w) => {
|
|
2345
|
+
w instanceof HTMLElement && (w.dataset.active = "true");
|
|
2341
2346
|
});
|
|
2342
2347
|
}, u = () => {
|
|
2343
|
-
document.querySelectorAll(`[${He}="${c}"]`).forEach((
|
|
2344
|
-
|
|
2348
|
+
document.querySelectorAll(`[${He}="${c}"]`).forEach((w) => {
|
|
2349
|
+
w instanceof HTMLElement && (w.dataset.active = "false");
|
|
2345
2350
|
});
|
|
2346
2351
|
}, y = i.current;
|
|
2347
2352
|
return y.addEventListener("mouseenter", v), y.addEventListener("mouseleave", u), () => {
|
|
@@ -2353,7 +2358,7 @@ const hn = ({
|
|
|
2353
2358
|
"span",
|
|
2354
2359
|
{
|
|
2355
2360
|
[He]: c,
|
|
2356
|
-
className:
|
|
2361
|
+
className: S(
|
|
2357
2362
|
// This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
|
|
2358
2363
|
"relative transition-all duration-100 rounded-lg",
|
|
2359
2364
|
"border border-(--border-color) p-0.5 text-(--param-color) bg-(--background-color)",
|
|
@@ -2366,25 +2371,25 @@ const hn = ({
|
|
|
2366
2371
|
onClick: o,
|
|
2367
2372
|
style: {
|
|
2368
2373
|
"--param-color": f,
|
|
2369
|
-
"--border-color":
|
|
2374
|
+
"--border-color": p,
|
|
2370
2375
|
"--background-color": x
|
|
2371
2376
|
},
|
|
2372
2377
|
children: r ?? e
|
|
2373
2378
|
}
|
|
2374
2379
|
);
|
|
2375
|
-
},
|
|
2380
|
+
}, Yr = ({
|
|
2376
2381
|
control: e,
|
|
2377
2382
|
url: n
|
|
2378
2383
|
}) => {
|
|
2379
|
-
const { fields: s } =
|
|
2384
|
+
const { fields: s } = Ut({
|
|
2380
2385
|
control: e,
|
|
2381
2386
|
name: "pathParams"
|
|
2382
2387
|
}), a = [...s].sort(
|
|
2383
2388
|
(r, o) => n.indexOf(`{${r.name}}`) - n.indexOf(`{${o.name}}`)
|
|
2384
2389
|
);
|
|
2385
|
-
return /* @__PURE__ */ t.jsx(
|
|
2390
|
+
return /* @__PURE__ */ t.jsx(Ee, { children: a.map((r, o) => /* @__PURE__ */ t.jsxs(ge, { children: [
|
|
2386
2391
|
/* @__PURE__ */ t.jsx(
|
|
2387
|
-
|
|
2392
|
+
St,
|
|
2388
2393
|
{
|
|
2389
2394
|
control: e,
|
|
2390
2395
|
name: `pathParams.${o}.name`,
|
|
@@ -2399,7 +2404,7 @@ const hn = ({
|
|
|
2399
2404
|
}
|
|
2400
2405
|
),
|
|
2401
2406
|
/* @__PURE__ */ t.jsx("div", { className: "flex justify-between items-center col-span-2", children: /* @__PURE__ */ t.jsx(
|
|
2402
|
-
|
|
2407
|
+
St,
|
|
2403
2408
|
{
|
|
2404
2409
|
control: e,
|
|
2405
2410
|
name: `pathParams.${o}.value`,
|
|
@@ -2407,28 +2412,28 @@ const hn = ({
|
|
|
2407
2412
|
}
|
|
2408
2413
|
) })
|
|
2409
2414
|
] }, r.id)) });
|
|
2410
|
-
},
|
|
2415
|
+
}, ea = ({
|
|
2411
2416
|
control: e,
|
|
2412
2417
|
schemaQueryParams: n
|
|
2413
2418
|
}) => {
|
|
2414
|
-
const { watch: s } =
|
|
2419
|
+
const { watch: s } = oe(), a = s("queryParams"), r = ot({
|
|
2415
2420
|
control: e,
|
|
2416
2421
|
name: "queryParams",
|
|
2417
2422
|
defaultValue: { name: "", value: "", active: !1 }
|
|
2418
2423
|
}), o = n.map(
|
|
2419
2424
|
(c) => !!c.isRequired
|
|
2420
2425
|
), i = n.length > 0;
|
|
2421
|
-
return /* @__PURE__ */ t.jsxs(
|
|
2422
|
-
/* @__PURE__ */ t.jsxs(
|
|
2423
|
-
/* @__PURE__ */ t.jsx(
|
|
2426
|
+
return /* @__PURE__ */ t.jsxs(_, { defaultOpen: !0, children: [
|
|
2427
|
+
/* @__PURE__ */ t.jsxs(Y, { children: [
|
|
2428
|
+
/* @__PURE__ */ t.jsx(_n, { size: 16 }),
|
|
2424
2429
|
/* @__PURE__ */ t.jsx(H, { children: "Query Parameters" })
|
|
2425
2430
|
] }),
|
|
2426
|
-
/* @__PURE__ */ t.jsx(
|
|
2431
|
+
/* @__PURE__ */ t.jsx(q, { className: "CollapsibleContent", children: /* @__PURE__ */ t.jsx(Ee, { children: r.fields.map((c, l) => {
|
|
2427
2432
|
const m = n.find(
|
|
2428
|
-
(
|
|
2433
|
+
(p) => p.name === a.at(l)?.name
|
|
2429
2434
|
), d = m?.enum && m.enum.length > 0, f = r.getNameInputProps(l), x = r.getValueInputProps(l);
|
|
2430
2435
|
return /* @__PURE__ */ t.jsxs(ge, { children: [
|
|
2431
|
-
/* @__PURE__ */ t.jsx(
|
|
2436
|
+
/* @__PURE__ */ t.jsx(be, { ...r.getCheckboxProps(l) }),
|
|
2432
2437
|
o[l] ? /* @__PURE__ */ t.jsx(I, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
|
|
2433
2438
|
"label",
|
|
2434
2439
|
{
|
|
@@ -2441,26 +2446,26 @@ const hn = ({
|
|
|
2441
2446
|
]
|
|
2442
2447
|
}
|
|
2443
2448
|
) }) : i ? /* @__PURE__ */ t.jsx(I, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
2444
|
-
|
|
2449
|
+
$e,
|
|
2445
2450
|
{
|
|
2446
2451
|
...f,
|
|
2447
2452
|
value: String(r.getValue(l, "name")),
|
|
2448
2453
|
placeholder: "Name",
|
|
2449
|
-
options: n.map((
|
|
2450
|
-
onChange: (
|
|
2451
|
-
onSelect: (
|
|
2454
|
+
options: n.map((p) => p.name),
|
|
2455
|
+
onChange: (p) => r.setValue(l, "name", p),
|
|
2456
|
+
onSelect: (p) => r.setValue(l, "name", p, { focus: "next" })
|
|
2452
2457
|
}
|
|
2453
2458
|
) }) : /* @__PURE__ */ t.jsx(I, { ...f, placeholder: "Name" }),
|
|
2454
2459
|
/* @__PURE__ */ t.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
2455
2460
|
d ? /* @__PURE__ */ t.jsx(I, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
2456
|
-
|
|
2461
|
+
$e,
|
|
2457
2462
|
{
|
|
2458
2463
|
...x,
|
|
2459
2464
|
value: String(r.getValue(l, "value")),
|
|
2460
2465
|
shouldFilter: !1,
|
|
2461
2466
|
options: m.enum ?? [],
|
|
2462
|
-
onChange: (
|
|
2463
|
-
onSelect: (
|
|
2467
|
+
onChange: (p) => r.setValue(l, "value", p),
|
|
2468
|
+
onSelect: (p) => r.setValue(l, "value", p, { focus: "next" })
|
|
2464
2469
|
}
|
|
2465
2470
|
) }) : /* @__PURE__ */ t.jsx(
|
|
2466
2471
|
I,
|
|
@@ -2480,7 +2485,7 @@ const hn = ({
|
|
|
2480
2485
|
] }, c.id);
|
|
2481
2486
|
}) }) })
|
|
2482
2487
|
] });
|
|
2483
|
-
},
|
|
2488
|
+
}, ta = ({
|
|
2484
2489
|
open: e,
|
|
2485
2490
|
setOpen: n,
|
|
2486
2491
|
onSignUp: s,
|
|
@@ -2495,7 +2500,7 @@ const hn = ({
|
|
|
2495
2500
|
/* @__PURE__ */ t.jsx(_t, { children: "The Playground is a tool for developers to test and explore our APIs. To use the Playground, you need to login." }),
|
|
2496
2501
|
/* @__PURE__ */ t.jsxs(Re, { className: "flex items-center gap-2 font-normal", children: [
|
|
2497
2502
|
/* @__PURE__ */ t.jsx(
|
|
2498
|
-
|
|
2503
|
+
be,
|
|
2499
2504
|
{
|
|
2500
2505
|
checked: o,
|
|
2501
2506
|
onCheckedChange: (l) => i(l === !0)
|
|
@@ -2504,14 +2509,14 @@ const hn = ({
|
|
|
2504
2509
|
"Don't show this again"
|
|
2505
2510
|
] }),
|
|
2506
2511
|
/* @__PURE__ */ t.jsxs(qt, { className: "flex gap-2 sm:justify-between", children: [
|
|
2507
|
-
/* @__PURE__ */ t.jsx(
|
|
2512
|
+
/* @__PURE__ */ t.jsx(B, { type: "button", variant: "outline", onClick: c, children: "Skip" }),
|
|
2508
2513
|
/* @__PURE__ */ t.jsxs("div", { className: "flex gap-2", children: [
|
|
2509
|
-
s && /* @__PURE__ */ t.jsx(
|
|
2510
|
-
a && /* @__PURE__ */ t.jsx(
|
|
2514
|
+
s && /* @__PURE__ */ t.jsx(B, { type: "button", variant: "outline", onClick: s, children: "Sign Up" }),
|
|
2515
|
+
a && /* @__PURE__ */ t.jsx(B, { type: "button", variant: "default", onClick: a, children: "Login" })
|
|
2511
2516
|
] })
|
|
2512
2517
|
] })
|
|
2513
2518
|
] }) });
|
|
2514
|
-
},
|
|
2519
|
+
}, na = Ze()(
|
|
2515
2520
|
Ye(
|
|
2516
2521
|
(e, n) => ({
|
|
2517
2522
|
rememberedIdentity: null,
|
|
@@ -2525,7 +2530,7 @@ const hn = ({
|
|
|
2525
2530
|
storage: zt(() => sessionStorage)
|
|
2526
2531
|
}
|
|
2527
2532
|
)
|
|
2528
|
-
),
|
|
2533
|
+
), sa = ({
|
|
2529
2534
|
path: e,
|
|
2530
2535
|
renderParam: n
|
|
2531
2536
|
}) => {
|
|
@@ -2538,23 +2543,23 @@ const hn = ({
|
|
|
2538
2543
|
if (!f) return;
|
|
2539
2544
|
const x = m.index;
|
|
2540
2545
|
x > l && c.push(
|
|
2541
|
-
/* @__PURE__ */ t.jsx(
|
|
2546
|
+
/* @__PURE__ */ t.jsx(le, { children: a.slice(l, x) }, `text-${l}-${x}`)
|
|
2542
2547
|
), c.push(
|
|
2543
|
-
/* @__PURE__ */ t.jsx(
|
|
2548
|
+
/* @__PURE__ */ t.jsx(le, { children: n({ name: f, originalValue: d, index: s++ }) }, `param-${f}`)
|
|
2544
2549
|
), l = x + d.length;
|
|
2545
2550
|
}), l < a.length && c.push(
|
|
2546
|
-
/* @__PURE__ */ t.jsx(
|
|
2551
|
+
/* @__PURE__ */ t.jsx(le, { children: a.slice(l) }, `text-${l}-${a.length}`)
|
|
2547
2552
|
), // biome-ignore lint/suspicious/noArrayIndexKey: index should be stable
|
|
2548
|
-
/* @__PURE__ */ t.jsxs(
|
|
2553
|
+
/* @__PURE__ */ t.jsxs(le, { children: [
|
|
2549
2554
|
c,
|
|
2550
2555
|
r < o.length - 1 && "/",
|
|
2551
2556
|
/* @__PURE__ */ t.jsx("wbr", {})
|
|
2552
2557
|
] }, `${a}-${r}`);
|
|
2553
2558
|
});
|
|
2554
|
-
},
|
|
2555
|
-
const { watch: n, setFocus: s } =
|
|
2559
|
+
}, ra = ({ url: e }) => {
|
|
2560
|
+
const { watch: n, setFocus: s } = oe(), [a] = n(["pathParams"]);
|
|
2556
2561
|
return /* @__PURE__ */ t.jsx(
|
|
2557
|
-
|
|
2562
|
+
sa,
|
|
2558
2563
|
{
|
|
2559
2564
|
path: e,
|
|
2560
2565
|
renderParam: ({ name: r, originalValue: o, index: i }) => {
|
|
@@ -2574,8 +2579,8 @@ const hn = ({
|
|
|
2574
2579
|
}
|
|
2575
2580
|
}
|
|
2576
2581
|
);
|
|
2577
|
-
},
|
|
2578
|
-
const { watch: e } =
|
|
2582
|
+
}, aa = () => {
|
|
2583
|
+
const { watch: e } = oe(), s = e("queryParams").filter((a) => a.active && a.name).map((a, r, o) => /* @__PURE__ */ t.jsxs(le, { children: [
|
|
2579
2584
|
a.name,
|
|
2580
2585
|
"=",
|
|
2581
2586
|
encodeURIComponent(a.value).replaceAll("%20", "+"),
|
|
@@ -2586,7 +2591,7 @@ const hn = ({
|
|
|
2586
2591
|
s.length > 0 ? "?" : "",
|
|
2587
2592
|
s
|
|
2588
2593
|
] });
|
|
2589
|
-
},
|
|
2594
|
+
}, oa = ({ status: e }) => {
|
|
2590
2595
|
if (!e) return /* @__PURE__ */ t.jsx("div", { className: "w-2 h-2 rounded-full bg-gray-500" });
|
|
2591
2596
|
switch (Number(e.toString().slice(0, 1))) {
|
|
2592
2597
|
case 2:
|
|
@@ -2598,7 +2603,7 @@ const hn = ({
|
|
|
2598
2603
|
default:
|
|
2599
2604
|
return /* @__PURE__ */ t.jsx("div", { className: "w-2 h-2 rounded-full bg-gray-500" });
|
|
2600
2605
|
}
|
|
2601
|
-
},
|
|
2606
|
+
}, ia = () => {
|
|
2602
2607
|
const e = E(null), n = E(null), s = E(Date.now()), a = E(null), r = D(() => {
|
|
2603
2608
|
if (n.current) {
|
|
2604
2609
|
const o = Date.now() - s.current;
|
|
@@ -2614,7 +2619,7 @@ const hn = ({
|
|
|
2614
2619
|
a.current && cancelAnimationFrame(a.current), n.current && o.contains(i) && o.removeChild(i);
|
|
2615
2620
|
};
|
|
2616
2621
|
}, [r]), /* @__PURE__ */ t.jsx("span", { className: "inline-block text-end w-[3ch]", ref: e });
|
|
2617
|
-
},
|
|
2622
|
+
}, la = ({
|
|
2618
2623
|
status: e,
|
|
2619
2624
|
time: n,
|
|
2620
2625
|
size: s,
|
|
@@ -2635,7 +2640,7 @@ const hn = ({
|
|
|
2635
2640
|
};
|
|
2636
2641
|
return /* @__PURE__ */ t.jsxs("div", { className: "relative shrink-0 flex h-10 text-xs gap-4 px-4 items-center justify-between font-mono border-b", children: [
|
|
2637
2642
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2638
|
-
/* @__PURE__ */ t.jsx(
|
|
2643
|
+
/* @__PURE__ */ t.jsx(oa, { status: e }),
|
|
2639
2644
|
" ",
|
|
2640
2645
|
e ?? "Sending Request...",
|
|
2641
2646
|
e ? ` ${o[e]}` : ""
|
|
@@ -2644,12 +2649,12 @@ const hn = ({
|
|
|
2644
2649
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
2645
2650
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Size" }),
|
|
2646
2651
|
" ",
|
|
2647
|
-
/* @__PURE__ */ t.jsx("span", { className: "inline-block text-end min-w-[5ch]", children: s ?
|
|
2652
|
+
/* @__PURE__ */ t.jsx("span", { className: "inline-block text-end min-w-[5ch]", children: s ? ve(s) : "- B" })
|
|
2648
2653
|
] }),
|
|
2649
2654
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
2650
2655
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Time" }),
|
|
2651
2656
|
" ",
|
|
2652
|
-
n !== void 0 ? `${n.toFixed(0)}` : /* @__PURE__ */ t.jsx(
|
|
2657
|
+
n !== void 0 ? `${n.toFixed(0)}` : /* @__PURE__ */ t.jsx(ia, {}),
|
|
2653
2658
|
"ms"
|
|
2654
2659
|
] })
|
|
2655
2660
|
] }),
|
|
@@ -2664,6 +2669,29 @@ const hn = ({
|
|
|
2664
2669
|
}
|
|
2665
2670
|
)
|
|
2666
2671
|
] });
|
|
2672
|
+
}, ca = ({
|
|
2673
|
+
blob: e,
|
|
2674
|
+
fileName: n,
|
|
2675
|
+
size: s,
|
|
2676
|
+
onDownload: a
|
|
2677
|
+
}) => {
|
|
2678
|
+
const [r, o] = k(null);
|
|
2679
|
+
return U(() => {
|
|
2680
|
+
const i = URL.createObjectURL(e);
|
|
2681
|
+
return o(i), () => {
|
|
2682
|
+
URL.revokeObjectURL(i);
|
|
2683
|
+
};
|
|
2684
|
+
}, [e]), r ? /* @__PURE__ */ t.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
2685
|
+
/* @__PURE__ */ t.jsx("audio", { controls: !0, src: r, className: "w-full max-w-md", children: "Your browser does not support the audio element." }),
|
|
2686
|
+
/* @__PURE__ */ t.jsxs(B, { onClick: a, className: "flex items-center gap-2", children: [
|
|
2687
|
+
/* @__PURE__ */ t.jsx(Ft, { className: "h-4 w-4" }),
|
|
2688
|
+
"Download ",
|
|
2689
|
+
n,
|
|
2690
|
+
" (",
|
|
2691
|
+
ve(s),
|
|
2692
|
+
")"
|
|
2693
|
+
] })
|
|
2694
|
+
] }) }) : /* @__PURE__ */ t.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ t.jsx("div", { className: "text-sm text-muted-foreground", children: "Loading audio..." }) });
|
|
2667
2695
|
};
|
|
2668
2696
|
function it(e) {
|
|
2669
2697
|
if (e === null) return "null";
|
|
@@ -2672,9 +2700,9 @@ function it(e) {
|
|
|
2672
2700
|
const n = e[0];
|
|
2673
2701
|
return n === void 0 ? "any[]" : `${it(n)}[]`;
|
|
2674
2702
|
}
|
|
2675
|
-
return typeof e == "object" ?
|
|
2703
|
+
return typeof e == "object" ? da(e) : typeof e;
|
|
2676
2704
|
}
|
|
2677
|
-
function
|
|
2705
|
+
function da(e, n = "") {
|
|
2678
2706
|
const s = ["{"];
|
|
2679
2707
|
for (const [a, r] of Object.entries(e)) {
|
|
2680
2708
|
const o = it(r);
|
|
@@ -2683,10 +2711,10 @@ function la(e, n = "") {
|
|
|
2683
2711
|
return s.push("}"), s.join(`
|
|
2684
2712
|
`);
|
|
2685
2713
|
}
|
|
2686
|
-
function
|
|
2714
|
+
function ua(e) {
|
|
2687
2715
|
return { lines: [`type GeneratedType = ${it(e)};`] };
|
|
2688
2716
|
}
|
|
2689
|
-
const
|
|
2717
|
+
const ma = (e) => Object.entries({
|
|
2690
2718
|
"application/json": "json",
|
|
2691
2719
|
"text/json": "json",
|
|
2692
2720
|
"text/html": "html",
|
|
@@ -2696,16 +2724,16 @@ const da = (e) => Object.entries({
|
|
|
2696
2724
|
"application/xhtml+xml": "xhtml"
|
|
2697
2725
|
}).find(
|
|
2698
2726
|
([s]) => e.includes(s)
|
|
2699
|
-
)?.[1],
|
|
2700
|
-
const n = e
|
|
2701
|
-
return
|
|
2702
|
-
},
|
|
2727
|
+
)?.[1], gn = (e) => e.find(([n]) => n.toLowerCase() === "content-type")?.[1] || "", pa = (e) => {
|
|
2728
|
+
const n = gn(e);
|
|
2729
|
+
return ma(n);
|
|
2730
|
+
}, ha = (e) => {
|
|
2703
2731
|
try {
|
|
2704
2732
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
2705
2733
|
} catch {
|
|
2706
2734
|
return null;
|
|
2707
2735
|
}
|
|
2708
|
-
},
|
|
2736
|
+
}, fa = (e) => {
|
|
2709
2737
|
const n = [
|
|
2710
2738
|
"Content-Type",
|
|
2711
2739
|
"Content-Length",
|
|
@@ -2722,12 +2750,12 @@ const da = (e) => Object.entries({
|
|
|
2722
2750
|
}, z = 3, Se = ye(
|
|
2723
2751
|
"div",
|
|
2724
2752
|
"grid-cols-subgrid grid border-b col-span-full px-4 py-1.5 font-mono text-xs"
|
|
2725
|
-
),
|
|
2753
|
+
), ue = ye("div", "py-1 break-words"), Te = ({ value: e, header: n }) => {
|
|
2726
2754
|
const a = ["authorization", "key", "secret", "token"].includes(n.toLowerCase()), [r, o] = k(!a);
|
|
2727
2755
|
return /* @__PURE__ */ t.jsx(
|
|
2728
|
-
|
|
2756
|
+
ue,
|
|
2729
2757
|
{
|
|
2730
|
-
className:
|
|
2758
|
+
className: S(
|
|
2731
2759
|
"max-h-28 overflow-auto",
|
|
2732
2760
|
a && "cursor-pointer flex group"
|
|
2733
2761
|
),
|
|
@@ -2735,12 +2763,12 @@ const da = (e) => Object.entries({
|
|
|
2735
2763
|
a && o((i) => !i);
|
|
2736
2764
|
},
|
|
2737
2765
|
children: a ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2738
|
-
/* @__PURE__ */ t.jsx(
|
|
2739
|
-
r ? /* @__PURE__ */ t.jsx(Gn, { size: 14, className:
|
|
2766
|
+
/* @__PURE__ */ t.jsx(Ns, { secret: e, previewChars: 0, revealed: r }),
|
|
2767
|
+
r ? /* @__PURE__ */ t.jsx(Gn, { size: 14, className: S("hidden group-hover:block") }) : /* @__PURE__ */ t.jsx(Hn, { size: 14, className: S("hidden group-hover:block") })
|
|
2740
2768
|
] }) : e
|
|
2741
2769
|
}
|
|
2742
2770
|
);
|
|
2743
|
-
},
|
|
2771
|
+
}, ga = ({
|
|
2744
2772
|
body: e = "",
|
|
2745
2773
|
headers: n,
|
|
2746
2774
|
request: s,
|
|
@@ -2749,42 +2777,42 @@ const da = (e) => Object.entries({
|
|
|
2749
2777
|
fileName: o,
|
|
2750
2778
|
blob: i
|
|
2751
2779
|
}) => {
|
|
2752
|
-
const c =
|
|
2780
|
+
const c = pa(n), l = ha(e), m = l || e, [d, f] = k(
|
|
2753
2781
|
l ? "formatted" : "raw"
|
|
2754
2782
|
), x = qs({
|
|
2755
2783
|
queryKey: ["types", m],
|
|
2756
|
-
queryFn: async () =>
|
|
2784
|
+
queryFn: async () => ua(JSON.parse(m)),
|
|
2757
2785
|
enabled: d === "types" && !r
|
|
2758
|
-
}),
|
|
2786
|
+
}), p = () => {
|
|
2759
2787
|
if (i && o) {
|
|
2760
2788
|
const u = URL.createObjectURL(i), y = document.createElement("a");
|
|
2761
2789
|
y.href = u, y.download = o, document.body.appendChild(y), y.click(), document.body.removeChild(y), URL.revokeObjectURL(u);
|
|
2762
2790
|
}
|
|
2763
|
-
}, v =
|
|
2791
|
+
}, v = fa([...n]);
|
|
2764
2792
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2765
|
-
/* @__PURE__ */ t.jsxs(
|
|
2766
|
-
/* @__PURE__ */ t.jsxs(
|
|
2767
|
-
/* @__PURE__ */ t.jsx(
|
|
2793
|
+
/* @__PURE__ */ t.jsxs(_, { defaultOpen: !0, children: [
|
|
2794
|
+
/* @__PURE__ */ t.jsxs(Y, { children: [
|
|
2795
|
+
/* @__PURE__ */ t.jsx(qn, { size: 14 }),
|
|
2768
2796
|
/* @__PURE__ */ t.jsx(H, { children: "Request Headers" })
|
|
2769
2797
|
] }),
|
|
2770
|
-
/* @__PURE__ */ t.jsx(
|
|
2798
|
+
/* @__PURE__ */ t.jsx(q, { children: /* @__PURE__ */ t.jsxs("div", { className: "grid grid-cols-[2fr_3fr] gap-x-6 text-sm", children: [
|
|
2771
2799
|
s.headers.slice(0, z).map(([u, y]) => /* @__PURE__ */ t.jsxs(Se, { children: [
|
|
2772
|
-
/* @__PURE__ */ t.jsx(
|
|
2773
|
-
/* @__PURE__ */ t.jsx(
|
|
2800
|
+
/* @__PURE__ */ t.jsx(ue, { children: u }),
|
|
2801
|
+
/* @__PURE__ */ t.jsx(Te, { value: y, header: u })
|
|
2774
2802
|
] }, u)),
|
|
2775
|
-
s.headers.length > z && /* @__PURE__ */ t.jsxs(
|
|
2776
|
-
/* @__PURE__ */ t.jsxs(
|
|
2803
|
+
s.headers.length > z && /* @__PURE__ */ t.jsxs(_, { className: "col-span-full grid-cols-subgrid grid group", children: [
|
|
2804
|
+
/* @__PURE__ */ t.jsxs(de, { className: "data-[state=open]:hidden justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
|
|
2777
2805
|
"Show ",
|
|
2778
2806
|
s.headers.length - z,
|
|
2779
2807
|
" more headers",
|
|
2780
2808
|
/* @__PURE__ */ t.jsx(Je, { size: 12, className: "text-muted-foreground" })
|
|
2781
2809
|
] }),
|
|
2782
|
-
/* @__PURE__ */ t.jsxs(
|
|
2810
|
+
/* @__PURE__ */ t.jsxs(q, { className: "col-span-full grid grid-cols-subgrid", children: [
|
|
2783
2811
|
s.headers.slice(z).map(([u, y]) => /* @__PURE__ */ t.jsxs(Se, { children: [
|
|
2784
|
-
/* @__PURE__ */ t.jsx(
|
|
2785
|
-
/* @__PURE__ */ t.jsx(
|
|
2812
|
+
/* @__PURE__ */ t.jsx(ue, { children: u }),
|
|
2813
|
+
/* @__PURE__ */ t.jsx(Te, { value: y, header: u })
|
|
2786
2814
|
] }, u)),
|
|
2787
|
-
/* @__PURE__ */ t.jsxs(
|
|
2815
|
+
/* @__PURE__ */ t.jsxs(de, { className: "justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
|
|
2788
2816
|
"Hide ",
|
|
2789
2817
|
s.headers.length - z,
|
|
2790
2818
|
" headers",
|
|
@@ -2800,29 +2828,29 @@ const da = (e) => Object.entries({
|
|
|
2800
2828
|
] })
|
|
2801
2829
|
] }) })
|
|
2802
2830
|
] }),
|
|
2803
|
-
/* @__PURE__ */ t.jsxs(
|
|
2804
|
-
/* @__PURE__ */ t.jsxs(
|
|
2805
|
-
/* @__PURE__ */ t.jsx(
|
|
2831
|
+
/* @__PURE__ */ t.jsxs(_, { defaultOpen: !0, children: [
|
|
2832
|
+
/* @__PURE__ */ t.jsxs(Y, { children: [
|
|
2833
|
+
/* @__PURE__ */ t.jsx(Un, { size: 14 }),
|
|
2806
2834
|
/* @__PURE__ */ t.jsx(H, { children: "Response Headers" })
|
|
2807
2835
|
] }),
|
|
2808
|
-
/* @__PURE__ */ t.jsx(
|
|
2836
|
+
/* @__PURE__ */ t.jsx(q, { children: /* @__PURE__ */ t.jsxs("div", { className: "grid grid-cols-[2fr_3fr] gap-x-6 text-sm", children: [
|
|
2809
2837
|
v.slice(0, z).map(([u, y]) => /* @__PURE__ */ t.jsxs(Se, { children: [
|
|
2810
|
-
/* @__PURE__ */ t.jsx(
|
|
2811
|
-
/* @__PURE__ */ t.jsx(
|
|
2838
|
+
/* @__PURE__ */ t.jsx(ue, { children: u }),
|
|
2839
|
+
/* @__PURE__ */ t.jsx(Te, { value: y, header: u })
|
|
2812
2840
|
] }, u)),
|
|
2813
|
-
v.length > z && /* @__PURE__ */ t.jsxs(
|
|
2814
|
-
/* @__PURE__ */ t.jsxs(
|
|
2841
|
+
v.length > z && /* @__PURE__ */ t.jsxs(_, { className: "col-span-full grid-cols-subgrid grid group", children: [
|
|
2842
|
+
/* @__PURE__ */ t.jsxs(de, { className: "data-[state=open]:hidden justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
|
|
2815
2843
|
"Show ",
|
|
2816
2844
|
v.length - z,
|
|
2817
2845
|
" more headers",
|
|
2818
2846
|
/* @__PURE__ */ t.jsx(Je, { size: 12, className: "text-muted-foreground" })
|
|
2819
2847
|
] }),
|
|
2820
|
-
/* @__PURE__ */ t.jsxs(
|
|
2848
|
+
/* @__PURE__ */ t.jsxs(q, { className: "col-span-full grid grid-cols-subgrid", children: [
|
|
2821
2849
|
v.slice(z).map(([u, y]) => /* @__PURE__ */ t.jsxs(Se, { children: [
|
|
2822
|
-
/* @__PURE__ */ t.jsx(
|
|
2823
|
-
/* @__PURE__ */ t.jsx(
|
|
2850
|
+
/* @__PURE__ */ t.jsx(ue, { children: u }),
|
|
2851
|
+
/* @__PURE__ */ t.jsx(Te, { value: y, header: u })
|
|
2824
2852
|
] }, u)),
|
|
2825
|
-
/* @__PURE__ */ t.jsxs(
|
|
2853
|
+
/* @__PURE__ */ t.jsxs(de, { className: "justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
|
|
2826
2854
|
"Hide ",
|
|
2827
2855
|
v.length - z,
|
|
2828
2856
|
" headers",
|
|
@@ -2844,36 +2872,44 @@ const da = (e) => Object.entries({
|
|
|
2844
2872
|
"Response body"
|
|
2845
2873
|
] }),
|
|
2846
2874
|
l && !r && /* @__PURE__ */ t.jsxs(
|
|
2847
|
-
|
|
2875
|
+
Mt,
|
|
2848
2876
|
{
|
|
2849
2877
|
value: d,
|
|
2850
2878
|
onValueChange: (u) => f(u),
|
|
2851
2879
|
children: [
|
|
2852
2880
|
/* @__PURE__ */ t.jsx(Gt, { className: "max-w-32 border-0 bg-transparent", children: /* @__PURE__ */ t.jsx(Ht, { placeholder: "View" }) }),
|
|
2853
2881
|
/* @__PURE__ */ t.jsxs(Qt, { children: [
|
|
2854
|
-
/* @__PURE__ */ t.jsx(
|
|
2855
|
-
/* @__PURE__ */ t.jsx(
|
|
2856
|
-
/* @__PURE__ */ t.jsx(
|
|
2882
|
+
/* @__PURE__ */ t.jsx(Ae, { value: "formatted", children: "Formatted" }),
|
|
2883
|
+
/* @__PURE__ */ t.jsx(Ae, { value: "raw", children: "Raw" }),
|
|
2884
|
+
/* @__PURE__ */ t.jsx(Ae, { value: "types", children: "Types" })
|
|
2857
2885
|
] })
|
|
2858
2886
|
]
|
|
2859
2887
|
}
|
|
2860
2888
|
)
|
|
2861
2889
|
] }),
|
|
2862
|
-
/* @__PURE__ */ t.jsx("div", { className: "flex-1", children: r ?
|
|
2890
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex-1", children: r ? i && Mr(gn(n)) ? /* @__PURE__ */ t.jsx(
|
|
2891
|
+
ca,
|
|
2892
|
+
{
|
|
2893
|
+
blob: i,
|
|
2894
|
+
fileName: o ?? "audio",
|
|
2895
|
+
size: a,
|
|
2896
|
+
onDownload: p
|
|
2897
|
+
}
|
|
2898
|
+
) : /* @__PURE__ */ t.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
2863
2899
|
/* @__PURE__ */ t.jsx("div", { className: "text-lg font-semibold", children: "Binary Content" }),
|
|
2864
2900
|
/* @__PURE__ */ t.jsx("div", { className: "text-sm text-muted-foreground", children: "This response contains binary data that cannot be displayed as text." }),
|
|
2865
2901
|
/* @__PURE__ */ t.jsxs(
|
|
2866
|
-
|
|
2902
|
+
B,
|
|
2867
2903
|
{
|
|
2868
|
-
onClick:
|
|
2904
|
+
onClick: p,
|
|
2869
2905
|
className: "flex items-center gap-2",
|
|
2870
2906
|
disabled: !i,
|
|
2871
2907
|
children: [
|
|
2872
|
-
/* @__PURE__ */ t.jsx(
|
|
2908
|
+
/* @__PURE__ */ t.jsx(Ft, { className: "h-4 w-4" }),
|
|
2873
2909
|
"Download ",
|
|
2874
2910
|
o || "file",
|
|
2875
2911
|
" (",
|
|
2876
|
-
|
|
2912
|
+
ve(a),
|
|
2877
2913
|
")"
|
|
2878
2914
|
]
|
|
2879
2915
|
}
|
|
@@ -2890,7 +2926,7 @@ const da = (e) => Object.entries({
|
|
|
2890
2926
|
}
|
|
2891
2927
|
) })
|
|
2892
2928
|
] });
|
|
2893
|
-
},
|
|
2929
|
+
}, xa = ({
|
|
2894
2930
|
queryMutation: e,
|
|
2895
2931
|
showLongRunningWarning: n,
|
|
2896
2932
|
onCancel: s,
|
|
@@ -2899,7 +2935,7 @@ const da = (e) => Object.entries({
|
|
|
2899
2935
|
progress: o
|
|
2900
2936
|
}) => /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col overflow-y-auto h-[80vh] bg-muted/50", children: [
|
|
2901
2937
|
(e.isPending || e.data) && /* @__PURE__ */ t.jsx(
|
|
2902
|
-
|
|
2938
|
+
la,
|
|
2903
2939
|
{
|
|
2904
2940
|
status: e.data?.status,
|
|
2905
2941
|
time: e.data?.time,
|
|
@@ -2913,7 +2949,7 @@ const da = (e) => Object.entries({
|
|
|
2913
2949
|
/* @__PURE__ */ t.jsx(Bs, { children: "Request failed" }),
|
|
2914
2950
|
/* @__PURE__ */ t.jsx(_s, { children: e.error.message || String(e.error) || "Unexpected error" })
|
|
2915
2951
|
] }) }) : e.data ? /* @__PURE__ */ t.jsx(
|
|
2916
|
-
|
|
2952
|
+
ga,
|
|
2917
2953
|
{
|
|
2918
2954
|
request: e.data.request,
|
|
2919
2955
|
size: e.data.size,
|
|
@@ -2924,18 +2960,18 @@ const da = (e) => Object.entries({
|
|
|
2924
2960
|
blob: e.data.blob
|
|
2925
2961
|
}
|
|
2926
2962
|
) : e.isPending ? /* @__PURE__ */ t.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2 items-center mt-20", children: [
|
|
2927
|
-
/* @__PURE__ */ t.jsx(
|
|
2963
|
+
/* @__PURE__ */ t.jsx(zs, {}),
|
|
2928
2964
|
/* @__PURE__ */ t.jsxs(
|
|
2929
2965
|
"div",
|
|
2930
2966
|
{
|
|
2931
|
-
className:
|
|
2967
|
+
className: S(
|
|
2932
2968
|
"opacity-0 pointer-events-none transition-opacity h-20 text-sm text-muted-foreground duration-300 flex flex-col gap-2 items-center",
|
|
2933
2969
|
n && "opacity-100 pointer-events-auto"
|
|
2934
2970
|
),
|
|
2935
2971
|
children: [
|
|
2936
2972
|
"Looks like the request is taking longer than expected.",
|
|
2937
2973
|
/* @__PURE__ */ t.jsx(
|
|
2938
|
-
|
|
2974
|
+
K,
|
|
2939
2975
|
{
|
|
2940
2976
|
type: "button",
|
|
2941
2977
|
onClick: s,
|
|
@@ -2960,7 +2996,7 @@ const da = (e) => Object.entries({
|
|
|
2960
2996
|
/* @__PURE__ */ t.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: "Send your first request" }),
|
|
2961
2997
|
a
|
|
2962
2998
|
] }) })
|
|
2963
|
-
] }),
|
|
2999
|
+
] }), xn = Ze()(
|
|
2964
3000
|
Ye(
|
|
2965
3001
|
(e) => ({
|
|
2966
3002
|
skipLogin: !1,
|
|
@@ -2972,8 +3008,8 @@ const da = (e) => Object.entries({
|
|
|
2972
3008
|
}
|
|
2973
3009
|
)
|
|
2974
3010
|
);
|
|
2975
|
-
as(
|
|
2976
|
-
const
|
|
3011
|
+
as(xn);
|
|
3012
|
+
const pe = "__none", ya = ({
|
|
2977
3013
|
server: e,
|
|
2978
3014
|
servers: n = [],
|
|
2979
3015
|
url: s,
|
|
@@ -2987,115 +3023,115 @@ const me = "__none", ga = ({
|
|
|
2987
3023
|
onLogin: d,
|
|
2988
3024
|
onSignUp: f
|
|
2989
3025
|
}) => {
|
|
2990
|
-
const { selectedServer: x, setSelectedServer:
|
|
2991
|
-
n.map((
|
|
2992
|
-
), [v, u] = k(!1), y = os(), { setRememberedIdentity:
|
|
3026
|
+
const { selectedServer: x, setSelectedServer: p } = Vr(
|
|
3027
|
+
n.map((h) => ({ url: h }))
|
|
3028
|
+
), [v, u] = k(!1), y = os(), { setRememberedIdentity: w, getRememberedIdentity: R } = na(), [, N] = us(), { skipLogin: j, setSkipLogin: $ } = xn(), [Q, je] = k(!1), [Ie, te] = k(!1), g = E(void 0), C = Ss(w), T = E(null), { label: A } = Fr("meta+enter", () => {
|
|
2993
3029
|
T.current?.requestSubmit();
|
|
2994
|
-
}), M = s.match(/\{([^}]+)\}/g)?.map((
|
|
2995
|
-
(
|
|
2996
|
-
), { register: De, control:
|
|
3030
|
+
}), M = s.match(/\{([^}]+)\}/g)?.map((h) => h.slice(1, -1)) ?? [], L = [...i].sort(
|
|
3031
|
+
(h, re) => M.indexOf(h.name) - M.indexOf(re.name)
|
|
3032
|
+
), { register: De, control: ne, handleSubmit: Ce, watch: ct, setValue: Fe, ...ze } = js({
|
|
2997
3033
|
defaultValues: {
|
|
2998
3034
|
body: c,
|
|
2999
3035
|
bodyMode: "text",
|
|
3000
3036
|
file: null,
|
|
3001
3037
|
multipartFormFields: [],
|
|
3002
|
-
queryParams: o.length > 0 ? o.map((
|
|
3003
|
-
name:
|
|
3004
|
-
value:
|
|
3005
|
-
active:
|
|
3006
|
-
enum:
|
|
3038
|
+
queryParams: o.length > 0 ? o.map((h) => ({
|
|
3039
|
+
name: h.name,
|
|
3040
|
+
value: h.defaultValue ?? "",
|
|
3041
|
+
active: h.defaultActive ?? !1,
|
|
3042
|
+
enum: h.enum ?? []
|
|
3007
3043
|
})) : [{ name: "", value: "", active: !1, enum: [] }],
|
|
3008
|
-
pathParams: L.map((
|
|
3009
|
-
name:
|
|
3010
|
-
value:
|
|
3044
|
+
pathParams: L.map((h) => ({
|
|
3045
|
+
name: h.name,
|
|
3046
|
+
value: h.defaultValue ?? ""
|
|
3011
3047
|
})),
|
|
3012
|
-
headers: r.length > 0 ? r.map((
|
|
3013
|
-
name:
|
|
3014
|
-
value:
|
|
3015
|
-
active:
|
|
3048
|
+
headers: r.length > 0 ? r.map((h) => ({
|
|
3049
|
+
name: h.name,
|
|
3050
|
+
value: h.defaultValue ?? "",
|
|
3051
|
+
active: h.defaultActive ?? !1
|
|
3016
3052
|
})) : [{ name: "", value: "", active: !1 }],
|
|
3017
3053
|
identity: R([
|
|
3018
|
-
|
|
3019
|
-
...y.data?.map((
|
|
3054
|
+
pe,
|
|
3055
|
+
...y.data?.map((h) => h.id) ?? []
|
|
3020
3056
|
])
|
|
3021
3057
|
}
|
|
3022
|
-
}),
|
|
3023
|
-
() => y.data?.find((
|
|
3024
|
-
[y.data,
|
|
3058
|
+
}), se = ct("identity"), Cn = Bt(
|
|
3059
|
+
() => y.data?.find((h) => h.id === se)?.authorizationFields,
|
|
3060
|
+
[y.data, se]
|
|
3025
3061
|
);
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
}, [C,
|
|
3029
|
-
const J =
|
|
3062
|
+
U(() => {
|
|
3063
|
+
se && C.current(se);
|
|
3064
|
+
}, [C, se]);
|
|
3065
|
+
const J = bs({
|
|
3030
3066
|
gcTime: 0,
|
|
3031
|
-
mutationFn: async (
|
|
3032
|
-
const
|
|
3033
|
-
|
|
3067
|
+
mutationFn: async (h) => {
|
|
3068
|
+
const re = performance.now(), Ve = new window.Headers(
|
|
3069
|
+
h.headers.filter((O) => O.name && O.active).map((O) => [O.name, O.value])
|
|
3034
3070
|
);
|
|
3035
|
-
let
|
|
3036
|
-
switch (
|
|
3071
|
+
let Ne;
|
|
3072
|
+
switch (h.bodyMode) {
|
|
3037
3073
|
case "file":
|
|
3038
|
-
|
|
3074
|
+
Ne = h.file || void 0, Ve.delete("Content-Type");
|
|
3039
3075
|
break;
|
|
3040
3076
|
case "multipart": {
|
|
3041
|
-
const
|
|
3042
|
-
|
|
3077
|
+
const O = new FormData();
|
|
3078
|
+
h.multipartFormFields?.filter((X) => X.name && X.active).forEach((X) => O.append(X.name, X.value)), Ne = O, Ve.delete("Content-Type");
|
|
3043
3079
|
break;
|
|
3044
3080
|
}
|
|
3045
3081
|
default:
|
|
3046
|
-
|
|
3082
|
+
Ne = h.body || void 0;
|
|
3047
3083
|
break;
|
|
3048
3084
|
}
|
|
3049
3085
|
const W = new Request(
|
|
3050
|
-
Lt(e ?? x, s,
|
|
3086
|
+
Lt(e ?? x, s, h),
|
|
3051
3087
|
{
|
|
3052
3088
|
method: a,
|
|
3053
3089
|
headers: Ve,
|
|
3054
|
-
body: ["GET", "HEAD"].includes(a.toUpperCase()) ? null :
|
|
3090
|
+
body: ["GET", "HEAD"].includes(a.toUpperCase()) ? null : Ne
|
|
3055
3091
|
}
|
|
3056
3092
|
);
|
|
3057
|
-
|
|
3093
|
+
h.identity !== pe && await y.data?.find((O) => O.id === h.identity)?.authorizeRequest(W);
|
|
3058
3094
|
const Be = setTimeout(
|
|
3059
|
-
() =>
|
|
3095
|
+
() => te(!0),
|
|
3060
3096
|
3210
|
|
3061
3097
|
);
|
|
3062
3098
|
g.current = new AbortController(), g.current.signal.addEventListener("abort", () => {
|
|
3063
3099
|
clearTimeout(Be);
|
|
3064
3100
|
});
|
|
3065
3101
|
try {
|
|
3066
|
-
const
|
|
3102
|
+
const O = await fetch(W, {
|
|
3067
3103
|
cache: "no-store",
|
|
3068
3104
|
signal: g.current.signal
|
|
3069
3105
|
});
|
|
3070
|
-
clearTimeout(Be),
|
|
3071
|
-
const X = performance.now() -
|
|
3072
|
-
let
|
|
3073
|
-
ht ? (ft = await
|
|
3074
|
-
const xt =
|
|
3075
|
-
let
|
|
3076
|
-
switch (
|
|
3106
|
+
clearTimeout(Be), te(!1);
|
|
3107
|
+
const X = performance.now() - re, Ln = new URL(W.url), mt = Array.from(O.headers.entries()), pt = O.headers.get("content-type") || "", ht = Ur(pt);
|
|
3108
|
+
let we = "", ft, gt;
|
|
3109
|
+
ht ? (ft = await O.blob(), gt = Gr(mt, W.url), we = `Binary content (${pt})`) : we = await O.text();
|
|
3110
|
+
const xt = O.headers.get("content-length");
|
|
3111
|
+
let ae = "";
|
|
3112
|
+
switch (h.bodyMode) {
|
|
3077
3113
|
case "text":
|
|
3078
|
-
|
|
3114
|
+
ae = h.body;
|
|
3079
3115
|
break;
|
|
3080
3116
|
case "file":
|
|
3081
|
-
|
|
3117
|
+
ae = `[File: ${h.file?.name ?? "Unknown"}]`;
|
|
3082
3118
|
break;
|
|
3083
3119
|
case "multipart":
|
|
3084
|
-
|
|
3085
|
-
`,
|
|
3086
|
-
(
|
|
3120
|
+
ae = `[Multipart Form Data]
|
|
3121
|
+
`, ae += h.multipartFormFields?.filter((G) => G.name && G.active).map(
|
|
3122
|
+
(G) => G.value instanceof File ? `${G.name}: [File: ${G.value.name}]` : `${G.name}: ${G.value}`
|
|
3087
3123
|
).join(`
|
|
3088
3124
|
`);
|
|
3089
3125
|
break;
|
|
3090
3126
|
default:
|
|
3091
|
-
|
|
3127
|
+
ae = h.body;
|
|
3092
3128
|
break;
|
|
3093
3129
|
}
|
|
3094
3130
|
return {
|
|
3095
|
-
status:
|
|
3131
|
+
status: O.status,
|
|
3096
3132
|
headers: mt,
|
|
3097
|
-
size: xt ? Number(xt) :
|
|
3098
|
-
body:
|
|
3133
|
+
size: xt ? Number(xt) : we.length,
|
|
3134
|
+
body: we,
|
|
3099
3135
|
time: X,
|
|
3100
3136
|
isBinary: ht,
|
|
3101
3137
|
fileName: gt,
|
|
@@ -3104,85 +3140,85 @@ const me = "__none", ga = ({
|
|
|
3104
3140
|
method: W.method.toUpperCase(),
|
|
3105
3141
|
url: W.url,
|
|
3106
3142
|
headers: [
|
|
3107
|
-
["Host",
|
|
3143
|
+
["Host", Ln.host],
|
|
3108
3144
|
["User-Agent", "Zudoku Playground"],
|
|
3109
3145
|
...Array.from(W.headers.entries())
|
|
3110
3146
|
],
|
|
3111
|
-
body:
|
|
3147
|
+
body: ae
|
|
3112
3148
|
}
|
|
3113
3149
|
};
|
|
3114
|
-
} catch (
|
|
3115
|
-
throw clearTimeout(Be),
|
|
3150
|
+
} catch (O) {
|
|
3151
|
+
throw clearTimeout(Be), te(!1), O instanceof TypeError ? new Error(
|
|
3116
3152
|
"The request failed, possibly due to network issues or CORS policy."
|
|
3117
|
-
) :
|
|
3153
|
+
) : O;
|
|
3118
3154
|
}
|
|
3119
3155
|
}
|
|
3120
|
-
}), dt = J.isPending, [
|
|
3121
|
-
|
|
3122
|
-
const
|
|
3123
|
-
return () => clearTimeout(
|
|
3156
|
+
}), dt = J.isPending, [Nn, wn] = k(!1);
|
|
3157
|
+
U(() => {
|
|
3158
|
+
const h = setTimeout(() => wn(dt), 100);
|
|
3159
|
+
return () => clearTimeout(h);
|
|
3124
3160
|
}, [dt]);
|
|
3125
|
-
const { isFinished: Sn, progress:
|
|
3126
|
-
|
|
3161
|
+
const { isFinished: Sn, progress: Tn } = ys({ isAnimating: Nn });
|
|
3162
|
+
U(() => () => {
|
|
3127
3163
|
g.current?.abort();
|
|
3128
3164
|
}, []);
|
|
3129
|
-
const
|
|
3130
|
-
|
|
3165
|
+
const An = /* @__PURE__ */ t.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: e ? /* @__PURE__ */ t.jsx("span", { children: e.replace(/^https?:\/\//, "").replace(/\/$/, "") }) : n.length > 1 && /* @__PURE__ */ t.jsxs(
|
|
3166
|
+
Mt,
|
|
3131
3167
|
{
|
|
3132
|
-
onValueChange: (
|
|
3133
|
-
N(() => h
|
|
3168
|
+
onValueChange: (h) => {
|
|
3169
|
+
N(() => p(h));
|
|
3134
3170
|
},
|
|
3135
3171
|
value: x,
|
|
3136
3172
|
defaultValue: x,
|
|
3137
3173
|
children: [
|
|
3138
3174
|
/* @__PURE__ */ t.jsx(Gt, { className: "p-0 h-fit shadow-none border-none flex-row-reverse bg-transparent text-xs gap-0.5 translate-y-[4px]", children: /* @__PURE__ */ t.jsx(Ht, {}) }),
|
|
3139
|
-
/* @__PURE__ */ t.jsx(Qt, { children: n.map((
|
|
3175
|
+
/* @__PURE__ */ t.jsx(Qt, { children: n.map((h) => /* @__PURE__ */ t.jsx(Ae, { value: h, children: h.replace(/^https?:\/\//, "").replace(/\/$/, "") }, h)) })
|
|
3140
3176
|
]
|
|
3141
3177
|
}
|
|
3142
|
-
) }),
|
|
3178
|
+
) }), On = m && !j && !Q, Pn = ["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
3143
3179
|
a.toUpperCase()
|
|
3144
|
-
), [ut,
|
|
3180
|
+
), [ut, $n] = ws();
|
|
3145
3181
|
return /* @__PURE__ */ t.jsx(
|
|
3146
|
-
|
|
3182
|
+
Cs,
|
|
3147
3183
|
{
|
|
3148
3184
|
register: De,
|
|
3149
|
-
control:
|
|
3150
|
-
handleSubmit:
|
|
3185
|
+
control: ne,
|
|
3186
|
+
handleSubmit: Ce,
|
|
3151
3187
|
watch: ct,
|
|
3152
3188
|
setValue: Fe,
|
|
3153
3189
|
...ze,
|
|
3154
|
-
children: /* @__PURE__ */ t.jsx(
|
|
3190
|
+
children: /* @__PURE__ */ t.jsx(vs, { delayDuration: 150, children: /* @__PURE__ */ t.jsxs(
|
|
3155
3191
|
"form",
|
|
3156
3192
|
{
|
|
3157
3193
|
ref: T,
|
|
3158
|
-
onKeyDown: (
|
|
3159
|
-
|
|
3194
|
+
onKeyDown: (h) => {
|
|
3195
|
+
h.key === "Enter" && h.target instanceof HTMLInputElement && h.preventDefault();
|
|
3160
3196
|
},
|
|
3161
|
-
onSubmit:
|
|
3162
|
-
y.data?.length === 0 ||
|
|
3197
|
+
onSubmit: Ce((h) => {
|
|
3198
|
+
y.data?.length === 0 || h.identity ? J.mutate(h) : u(!0);
|
|
3163
3199
|
}),
|
|
3164
3200
|
className: "relative",
|
|
3165
3201
|
children: [
|
|
3166
3202
|
/* @__PURE__ */ t.jsx(
|
|
3167
|
-
|
|
3203
|
+
Kr,
|
|
3168
3204
|
{
|
|
3169
3205
|
identities: y.data ?? [],
|
|
3170
3206
|
open: v,
|
|
3171
3207
|
onOpenChange: u,
|
|
3172
|
-
onSubmit: ({ rememberedIdentity:
|
|
3173
|
-
|
|
3208
|
+
onSubmit: ({ rememberedIdentity: h, identity: re }) => {
|
|
3209
|
+
h && Fe("identity", re ?? pe), u(!1), J.mutate({ ...ze.getValues(), identity: re });
|
|
3174
3210
|
}
|
|
3175
3211
|
}
|
|
3176
3212
|
),
|
|
3177
3213
|
/* @__PURE__ */ t.jsx(
|
|
3178
|
-
|
|
3214
|
+
ta,
|
|
3179
3215
|
{
|
|
3180
|
-
open:
|
|
3181
|
-
setOpen: (
|
|
3182
|
-
|
|
3216
|
+
open: On,
|
|
3217
|
+
setOpen: (h) => {
|
|
3218
|
+
h || je(!0);
|
|
3183
3219
|
},
|
|
3184
|
-
onSkip: (
|
|
3185
|
-
|
|
3220
|
+
onSkip: (h) => {
|
|
3221
|
+
je(!0), h && $(!0);
|
|
3186
3222
|
},
|
|
3187
3223
|
onSignUp: f,
|
|
3188
3224
|
onLogin: d
|
|
@@ -3193,16 +3229,16 @@ const me = "__none", ga = ({
|
|
|
3193
3229
|
/* @__PURE__ */ t.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md relative overflow-hidden", children: [
|
|
3194
3230
|
/* @__PURE__ */ t.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: a.toUpperCase() }),
|
|
3195
3231
|
/* @__PURE__ */ t.jsx("div", { className: "items-center px-2 font-mono text-xs break-all leading-6 relative h-full w-full", children: /* @__PURE__ */ t.jsxs("div", { className: "h-full py-1.5", children: [
|
|
3196
|
-
|
|
3197
|
-
/* @__PURE__ */ t.jsx(
|
|
3198
|
-
/* @__PURE__ */ t.jsx(
|
|
3232
|
+
An,
|
|
3233
|
+
/* @__PURE__ */ t.jsx(ra, { url: s }),
|
|
3234
|
+
/* @__PURE__ */ t.jsx(aa, {})
|
|
3199
3235
|
] }) }),
|
|
3200
3236
|
/* @__PURE__ */ t.jsx("div", { className: "px-1", children: /* @__PURE__ */ t.jsx(
|
|
3201
|
-
|
|
3237
|
+
B,
|
|
3202
3238
|
{
|
|
3203
3239
|
type: "button",
|
|
3204
3240
|
onClick: () => {
|
|
3205
|
-
|
|
3241
|
+
$n(
|
|
3206
3242
|
Lt(
|
|
3207
3243
|
e ?? x,
|
|
3208
3244
|
s,
|
|
@@ -3212,7 +3248,7 @@ const me = "__none", ga = ({
|
|
|
3212
3248
|
},
|
|
3213
3249
|
variant: "ghost",
|
|
3214
3250
|
size: "icon-xs",
|
|
3215
|
-
className:
|
|
3251
|
+
className: S(
|
|
3216
3252
|
"hover:opacity-100 transition",
|
|
3217
3253
|
ut ? "text-emerald-600 opacity-100" : "opacity-50"
|
|
3218
3254
|
),
|
|
@@ -3221,14 +3257,14 @@ const me = "__none", ga = ({
|
|
|
3221
3257
|
) })
|
|
3222
3258
|
] }),
|
|
3223
3259
|
/* @__PURE__ */ t.jsx(
|
|
3224
|
-
|
|
3260
|
+
B,
|
|
3225
3261
|
{
|
|
3226
3262
|
type: "submit",
|
|
3227
3263
|
variant: J.isPending ? "destructive" : "default",
|
|
3228
|
-
onClick: (
|
|
3264
|
+
onClick: (h) => {
|
|
3229
3265
|
J.isPending && (g.current?.abort(
|
|
3230
3266
|
"Request cancelled by user"
|
|
3231
|
-
),
|
|
3267
|
+
), h.preventDefault());
|
|
3232
3268
|
},
|
|
3233
3269
|
className: "w-18",
|
|
3234
3270
|
children: J.isPending ? "Cancel" : "Send"
|
|
@@ -3236,46 +3272,46 @@ const me = "__none", ga = ({
|
|
|
3236
3272
|
)
|
|
3237
3273
|
] }),
|
|
3238
3274
|
/* @__PURE__ */ t.jsxs("div", { className: "relative overflow-y-auto h-[80vh]", children: [
|
|
3239
|
-
y.data?.length !== 0 && /* @__PURE__ */ t.jsxs(
|
|
3240
|
-
/* @__PURE__ */ t.jsxs(
|
|
3275
|
+
y.data?.length !== 0 && /* @__PURE__ */ t.jsxs(_, { defaultOpen: !0, children: [
|
|
3276
|
+
/* @__PURE__ */ t.jsxs(Y, { children: [
|
|
3241
3277
|
/* @__PURE__ */ t.jsx(Xn, { size: 16 }),
|
|
3242
3278
|
/* @__PURE__ */ t.jsx(H, { children: "Authentication" })
|
|
3243
3279
|
] }),
|
|
3244
|
-
/* @__PURE__ */ t.jsx(
|
|
3280
|
+
/* @__PURE__ */ t.jsx(q, { className: "CollapsibleContent", children: /* @__PURE__ */ t.jsx(
|
|
3245
3281
|
hn,
|
|
3246
3282
|
{
|
|
3247
|
-
value:
|
|
3283
|
+
value: se,
|
|
3248
3284
|
identities: y.data ?? [],
|
|
3249
|
-
setValue: (
|
|
3285
|
+
setValue: (h) => Fe("identity", h)
|
|
3250
3286
|
}
|
|
3251
3287
|
) })
|
|
3252
3288
|
] }),
|
|
3253
|
-
L.length > 0 && /* @__PURE__ */ t.jsxs(
|
|
3254
|
-
/* @__PURE__ */ t.jsxs(
|
|
3289
|
+
L.length > 0 && /* @__PURE__ */ t.jsxs(_, { defaultOpen: !0, children: [
|
|
3290
|
+
/* @__PURE__ */ t.jsxs(Y, { children: [
|
|
3255
3291
|
/* @__PURE__ */ t.jsx(Kn, { size: 16 }),
|
|
3256
3292
|
/* @__PURE__ */ t.jsx(H, { children: "Path Parameters" })
|
|
3257
3293
|
] }),
|
|
3258
|
-
/* @__PURE__ */ t.jsx(
|
|
3294
|
+
/* @__PURE__ */ t.jsx(q, { className: "CollapsibleContent", children: /* @__PURE__ */ t.jsx(Yr, { url: s, control: ne }) })
|
|
3259
3295
|
] }),
|
|
3260
|
-
/* @__PURE__ */ t.jsx(
|
|
3296
|
+
/* @__PURE__ */ t.jsx(ea, { control: ne, schemaQueryParams: o }),
|
|
3261
3297
|
/* @__PURE__ */ t.jsx(
|
|
3262
|
-
|
|
3298
|
+
Wr,
|
|
3263
3299
|
{
|
|
3264
|
-
control:
|
|
3300
|
+
control: ne,
|
|
3265
3301
|
schemaHeaders: r,
|
|
3266
|
-
lockedHeaders:
|
|
3302
|
+
lockedHeaders: Cn?.headers
|
|
3267
3303
|
}
|
|
3268
3304
|
),
|
|
3269
|
-
|
|
3305
|
+
Pn && /* @__PURE__ */ t.jsx(qr, { content: l })
|
|
3270
3306
|
] }),
|
|
3271
3307
|
/* @__PURE__ */ t.jsx("div", { className: "w-full bg-muted-foreground/20" }),
|
|
3272
3308
|
/* @__PURE__ */ t.jsx(
|
|
3273
|
-
|
|
3309
|
+
xa,
|
|
3274
3310
|
{
|
|
3275
3311
|
queryMutation: J,
|
|
3276
3312
|
showLongRunningWarning: Ie,
|
|
3277
3313
|
isFinished: Sn,
|
|
3278
|
-
progress:
|
|
3314
|
+
progress: Tn,
|
|
3279
3315
|
tip: /* @__PURE__ */ t.jsx("div", { className: "text-xs w-full", children: /* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground", children: [
|
|
3280
3316
|
"Press",
|
|
3281
3317
|
" ",
|
|
@@ -3286,7 +3322,7 @@ const me = "__none", ga = ({
|
|
|
3286
3322
|
onCancel: () => {
|
|
3287
3323
|
g.current?.abort(
|
|
3288
3324
|
"Request cancelled by the user"
|
|
3289
|
-
),
|
|
3325
|
+
), te(!1);
|
|
3290
3326
|
}
|
|
3291
3327
|
}
|
|
3292
3328
|
)
|
|
@@ -3296,10 +3332,10 @@ const me = "__none", ga = ({
|
|
|
3296
3332
|
) })
|
|
3297
3333
|
}
|
|
3298
3334
|
);
|
|
3299
|
-
},
|
|
3335
|
+
}, va = (e) => {
|
|
3300
3336
|
const [n, s] = k(!1), { isAuthEnabled: a, login: r, signup: o, isPending: i, isAuthenticated: c } = fs();
|
|
3301
3337
|
return /* @__PURE__ */ t.jsxs(et, { onOpenChange: (l) => s(l), children: [
|
|
3302
|
-
/* @__PURE__ */ t.jsx(gs, { asChild: !0, children: e.children ?? /* @__PURE__ */ t.jsx(
|
|
3338
|
+
/* @__PURE__ */ t.jsx(gs, { asChild: !0, children: e.children ?? /* @__PURE__ */ t.jsx(B, { variant: "ghost", size: "icon-xs", className: "group", children: /* @__PURE__ */ t.jsx(
|
|
3303
3339
|
Zn,
|
|
3304
3340
|
{
|
|
3305
3341
|
className: "fill-muted-foreground group-hover:fill-foreground transition",
|
|
@@ -3316,7 +3352,7 @@ const me = "__none", ga = ({
|
|
|
3316
3352
|
children: [
|
|
3317
3353
|
/* @__PURE__ */ t.jsx(ps, { children: /* @__PURE__ */ t.jsx(nt, { children: "Playground" }) }),
|
|
3318
3354
|
n && /* @__PURE__ */ t.jsx(
|
|
3319
|
-
|
|
3355
|
+
ya,
|
|
3320
3356
|
{
|
|
3321
3357
|
requiresLogin: a && !c && !i,
|
|
3322
3358
|
onLogin: () => r(),
|
|
@@ -3328,7 +3364,7 @@ const me = "__none", ga = ({
|
|
|
3328
3364
|
}
|
|
3329
3365
|
)
|
|
3330
3366
|
] });
|
|
3331
|
-
},
|
|
3367
|
+
}, ba = {
|
|
3332
3368
|
get: "green",
|
|
3333
3369
|
post: "blue",
|
|
3334
3370
|
put: "yellow",
|
|
@@ -3336,7 +3372,7 @@ const me = "__none", ga = ({
|
|
|
3336
3372
|
patch: "purple",
|
|
3337
3373
|
options: "gray",
|
|
3338
3374
|
head: "gray"
|
|
3339
|
-
},
|
|
3375
|
+
}, Et = ({
|
|
3340
3376
|
label: e,
|
|
3341
3377
|
path: n,
|
|
3342
3378
|
operations: s,
|
|
@@ -3360,21 +3396,21 @@ const me = "__none", ga = ({
|
|
|
3360
3396
|
badge: {
|
|
3361
3397
|
label: o.method,
|
|
3362
3398
|
// biome-ignore lint/style/noNonNullAssertion: is guaranteed to be defined
|
|
3363
|
-
color:
|
|
3399
|
+
color: ba[o.method.toLowerCase()],
|
|
3364
3400
|
invert: !0
|
|
3365
3401
|
}
|
|
3366
3402
|
}))
|
|
3367
|
-
}),
|
|
3403
|
+
}), yn = Vt(
|
|
3368
3404
|
void 0
|
|
3369
|
-
),
|
|
3370
|
-
const e = ms(
|
|
3405
|
+
), ro = yn.Provider, ja = () => {
|
|
3406
|
+
const e = ms(yn);
|
|
3371
3407
|
if (!e)
|
|
3372
3408
|
throw new Error("useOasConfig must be used within a OasConfigProvider");
|
|
3373
3409
|
return e.config;
|
|
3374
3410
|
}, Qe = (e) => ({
|
|
3375
3411
|
path: e.routePath,
|
|
3376
3412
|
async lazy() {
|
|
3377
|
-
const { OasProvider: n } = await import("./OasProvider-
|
|
3413
|
+
const { OasProvider: n } = await import("./OasProvider-DPPdikt_.js");
|
|
3378
3414
|
return {
|
|
3379
3415
|
element: /* @__PURE__ */ t.jsx(
|
|
3380
3416
|
n,
|
|
@@ -3388,23 +3424,23 @@ const me = "__none", ga = ({
|
|
|
3388
3424
|
};
|
|
3389
3425
|
},
|
|
3390
3426
|
children: e.routes
|
|
3391
|
-
}),
|
|
3427
|
+
}), vn = ({
|
|
3392
3428
|
path: e,
|
|
3393
3429
|
tag: n,
|
|
3394
3430
|
untagged: s
|
|
3395
3431
|
}) => ({
|
|
3396
3432
|
path: e,
|
|
3397
3433
|
async lazy() {
|
|
3398
|
-
const { OperationList: a } = await import("./OperationList-
|
|
3434
|
+
const { OperationList: a } = await import("./OperationList-cEveQ_l5.js");
|
|
3399
3435
|
return { element: /* @__PURE__ */ t.jsx(a, { tag: n, untagged: s }) };
|
|
3400
3436
|
}
|
|
3401
|
-
}),
|
|
3437
|
+
}), Ca = ({
|
|
3402
3438
|
render: e,
|
|
3403
3439
|
path: n
|
|
3404
3440
|
}) => {
|
|
3405
|
-
const { type: s, input: a } =
|
|
3441
|
+
const { type: s, input: a } = ja(), { tag: r } = ts(), o = ns(), i = wr(jn, { type: s, input: a }), {
|
|
3406
3442
|
data: { schema: c }
|
|
3407
|
-
} =
|
|
3443
|
+
} = Us(i), l = c.tags.at(0);
|
|
3408
3444
|
return !r && l?.slug ? /* @__PURE__ */ t.jsx(
|
|
3409
3445
|
ss,
|
|
3410
3446
|
{
|
|
@@ -3417,10 +3453,10 @@ const me = "__none", ga = ({
|
|
|
3417
3453
|
}, Rt = ({ path: e }) => ({
|
|
3418
3454
|
path: e,
|
|
3419
3455
|
async lazy() {
|
|
3420
|
-
const { OperationList: n } = await import("./OperationList-
|
|
3456
|
+
const { OperationList: n } = await import("./OperationList-cEveQ_l5.js");
|
|
3421
3457
|
return {
|
|
3422
3458
|
element: /* @__PURE__ */ t.jsx(
|
|
3423
|
-
|
|
3459
|
+
Ca,
|
|
3424
3460
|
{
|
|
3425
3461
|
path: e,
|
|
3426
3462
|
render: (s) => /* @__PURE__ */ t.jsx(n, { tag: s })
|
|
@@ -3430,7 +3466,7 @@ const me = "__none", ga = ({
|
|
|
3430
3466
|
}
|
|
3431
3467
|
}), Ke = (e) => [
|
|
3432
3468
|
// Category without tagged operations
|
|
3433
|
-
|
|
3469
|
+
vn({
|
|
3434
3470
|
path: V(e, lt),
|
|
3435
3471
|
untagged: !0
|
|
3436
3472
|
}),
|
|
@@ -3438,25 +3474,25 @@ const me = "__none", ga = ({
|
|
|
3438
3474
|
{
|
|
3439
3475
|
path: V(e, "~schemas"),
|
|
3440
3476
|
lazy: async () => {
|
|
3441
|
-
const { SchemaList: n } = await import("./SchemaList-
|
|
3477
|
+
const { SchemaList: n } = await import("./SchemaList-CRC8n5co.js");
|
|
3442
3478
|
return { element: /* @__PURE__ */ t.jsx(n, {}) };
|
|
3443
3479
|
}
|
|
3444
3480
|
}
|
|
3445
|
-
],
|
|
3481
|
+
], Na = (e, n) => {
|
|
3446
3482
|
const s = V(e, n.at(0) ?? lt);
|
|
3447
3483
|
return [
|
|
3448
3484
|
// Redirect to first tag on the index route
|
|
3449
3485
|
{ index: !0, loader: () => es(s) },
|
|
3450
3486
|
// Create routes for each tag
|
|
3451
3487
|
...n.map(
|
|
3452
|
-
(a) =>
|
|
3488
|
+
(a) => vn({
|
|
3453
3489
|
path: V(e, a),
|
|
3454
3490
|
tag: a
|
|
3455
3491
|
})
|
|
3456
3492
|
),
|
|
3457
3493
|
...Ke(e)
|
|
3458
3494
|
];
|
|
3459
|
-
},
|
|
3495
|
+
}, bn = (e) => e.type === "raw" || !Array.isArray(e.input) ? { versions: [], labels: {}, downloadUrls: {} } : {
|
|
3460
3496
|
versions: e.input.map((n) => n.path),
|
|
3461
3497
|
labels: Object.fromEntries(
|
|
3462
3498
|
e.input.map((n) => [n.path, n.label ?? n.path])
|
|
@@ -3464,19 +3500,19 @@ const me = "__none", ga = ({
|
|
|
3464
3500
|
downloadUrls: Object.fromEntries(
|
|
3465
3501
|
e.input.map((n) => [n.path, n.downloadUrl])
|
|
3466
3502
|
)
|
|
3467
|
-
},
|
|
3503
|
+
}, wa = ({
|
|
3468
3504
|
basePath: e,
|
|
3469
3505
|
config: n,
|
|
3470
3506
|
client: s
|
|
3471
3507
|
}) => {
|
|
3472
|
-
const a = n.tagPages, { versions: r } =
|
|
3508
|
+
const a = n.tagPages, { versions: r } = bn(n);
|
|
3473
3509
|
return a ? (r.length > 1 ? [void 0, ...r] : [void 0]).map((i) => {
|
|
3474
3510
|
const c = V(e, i);
|
|
3475
3511
|
return Qe({
|
|
3476
3512
|
basePath: e,
|
|
3477
3513
|
version: i,
|
|
3478
3514
|
routePath: c,
|
|
3479
|
-
routes:
|
|
3515
|
+
routes: Na(c, a),
|
|
3480
3516
|
client: s,
|
|
3481
3517
|
config: n
|
|
3482
3518
|
});
|
|
@@ -3505,7 +3541,7 @@ const me = "__none", ga = ({
|
|
|
3505
3541
|
config: n
|
|
3506
3542
|
})
|
|
3507
3543
|
];
|
|
3508
|
-
},
|
|
3544
|
+
}, jn = Er(`
|
|
3509
3545
|
query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
|
|
3510
3546
|
schema(input: $input, type: $type) {
|
|
3511
3547
|
extensions
|
|
@@ -3528,7 +3564,7 @@ const me = "__none", ga = ({
|
|
|
3528
3564
|
}
|
|
3529
3565
|
}
|
|
3530
3566
|
}
|
|
3531
|
-
`), lt = "~endpoints",
|
|
3567
|
+
`), lt = "~endpoints", ao = (e) => {
|
|
3532
3568
|
const n = V(e.path), s = new Gs(e);
|
|
3533
3569
|
return {
|
|
3534
3570
|
getHead: () => {
|
|
@@ -3557,13 +3593,13 @@ const me = "__none", ga = ({
|
|
|
3557
3593
|
if (!a)
|
|
3558
3594
|
throw new Error("Server is required");
|
|
3559
3595
|
return /* @__PURE__ */ t.jsx(
|
|
3560
|
-
|
|
3596
|
+
va,
|
|
3561
3597
|
{
|
|
3562
3598
|
url: o,
|
|
3563
3599
|
method: r,
|
|
3564
3600
|
server: a,
|
|
3565
3601
|
...c,
|
|
3566
|
-
children: /* @__PURE__ */ t.jsx(
|
|
3602
|
+
children: /* @__PURE__ */ t.jsx(K, { className: "gap-2 items-center", variant: "outline", children: i ?? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3567
3603
|
"Open in Playground",
|
|
3568
3604
|
/* @__PURE__ */ t.jsx(Yn, { size: 16 })
|
|
3569
3605
|
] }) })
|
|
@@ -3579,33 +3615,33 @@ const me = "__none", ga = ({
|
|
|
3579
3615
|
a
|
|
3580
3616
|
);
|
|
3581
3617
|
try {
|
|
3582
|
-
const i = o?.params.version, { versions: c } =
|
|
3618
|
+
const i = o?.params.version, { versions: c } = bn(e), l = i ?? c.at(0), { type: m } = e, d = Array.isArray(e.input) ? e.input.find((N) => N.path === l)?.input ?? e.input[0]?.input : e.input, f = cn(s, jn, {
|
|
3583
3619
|
type: m,
|
|
3584
3620
|
input: d
|
|
3585
|
-
}), x = await r.queryClient.ensureQueryData(f),
|
|
3621
|
+
}), x = await r.queryClient.ensureQueryData(f), p = new Map(
|
|
3586
3622
|
x.schema.tags.filter((N) => N.name && N.operations.length > 0).map((N) => {
|
|
3587
3623
|
if (!N.name)
|
|
3588
3624
|
throw new Error(`Tag ${N.slug} has no name`);
|
|
3589
|
-
const j = V(n, i, N.slug),
|
|
3625
|
+
const j = V(n, i, N.slug), $ = N.extensions?.["x-zudoku-collapsed"] ?? !e.options?.expandAllTags, Q = N.extensions?.["x-zudoku-collapsible"] ?? !0;
|
|
3590
3626
|
return [
|
|
3591
3627
|
N.name,
|
|
3592
|
-
|
|
3628
|
+
Et({
|
|
3593
3629
|
label: N.extensions?.["x-displayName"] ?? N.name,
|
|
3594
3630
|
path: j,
|
|
3595
3631
|
operations: N.operations,
|
|
3596
|
-
collapsed:
|
|
3632
|
+
collapsed: $,
|
|
3597
3633
|
collapsible: Q
|
|
3598
3634
|
})
|
|
3599
3635
|
];
|
|
3600
3636
|
})
|
|
3601
3637
|
), v = x.schema.extensions?.["x-tagGroups"] ?? [], u = new Set(
|
|
3602
3638
|
v.flatMap(
|
|
3603
|
-
(N) => N.tags.filter((j) =>
|
|
3639
|
+
(N) => N.tags.filter((j) => p.has(j))
|
|
3604
3640
|
)
|
|
3605
|
-
),
|
|
3641
|
+
), w = [
|
|
3606
3642
|
...v.flatMap(
|
|
3607
3643
|
(N) => {
|
|
3608
|
-
const j = N.tags.map((
|
|
3644
|
+
const j = N.tags.map(($) => p.get($)).filter(Boolean);
|
|
3609
3645
|
return j.length === 0 ? [] : [
|
|
3610
3646
|
{
|
|
3611
3647
|
type: "category",
|
|
@@ -3617,64 +3653,64 @@ const me = "__none", ga = ({
|
|
|
3617
3653
|
];
|
|
3618
3654
|
}
|
|
3619
3655
|
),
|
|
3620
|
-
...Array.from(
|
|
3656
|
+
...Array.from(p.entries()).filter(([N]) => !u.has(N)).map(([, N]) => N)
|
|
3621
3657
|
], R = x.schema.tags.find(
|
|
3622
3658
|
(N) => !N.name
|
|
3623
3659
|
)?.operations;
|
|
3624
|
-
return R && R.length > 0 &&
|
|
3625
|
-
|
|
3626
|
-
label:
|
|
3660
|
+
return R && R.length > 0 && w.push(
|
|
3661
|
+
Et({
|
|
3662
|
+
label: w.length === 0 ? "Endpoints" : "Other endpoints",
|
|
3627
3663
|
path: V(n, i, lt),
|
|
3628
3664
|
operations: R,
|
|
3629
3665
|
collapsed: !e.options?.expandAllTags
|
|
3630
3666
|
})
|
|
3631
|
-
), x.schema.components?.schemas?.length &&
|
|
3667
|
+
), x.schema.components?.schemas?.length && w.push({
|
|
3632
3668
|
type: "link",
|
|
3633
3669
|
label: "Schemas",
|
|
3634
3670
|
to: V(n, i, "~schemas")
|
|
3635
|
-
}),
|
|
3671
|
+
}), w;
|
|
3636
3672
|
} catch {
|
|
3637
3673
|
return [];
|
|
3638
3674
|
}
|
|
3639
3675
|
},
|
|
3640
|
-
getRoutes: () =>
|
|
3676
|
+
getRoutes: () => wa({ basePath: n, config: e, client: s })
|
|
3641
3677
|
};
|
|
3642
3678
|
};
|
|
3643
3679
|
export {
|
|
3644
|
-
|
|
3645
|
-
|
|
3680
|
+
_ as C,
|
|
3681
|
+
so as G,
|
|
3646
3682
|
sr as L,
|
|
3647
|
-
|
|
3648
|
-
|
|
3683
|
+
ro as O,
|
|
3684
|
+
va as P,
|
|
3649
3685
|
Ks as Q,
|
|
3650
3686
|
on as S,
|
|
3651
3687
|
b as T,
|
|
3652
3688
|
lt as U,
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3689
|
+
wr as a,
|
|
3690
|
+
de as b,
|
|
3691
|
+
q as c,
|
|
3692
|
+
Er as d,
|
|
3657
3693
|
Vr as e,
|
|
3658
3694
|
fn as f,
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3695
|
+
bn as g,
|
|
3696
|
+
sa as h,
|
|
3697
|
+
Cr as i,
|
|
3698
|
+
Pt as j,
|
|
3699
|
+
to as k,
|
|
3700
|
+
rr as l,
|
|
3701
|
+
rt as m,
|
|
3702
|
+
an as n,
|
|
3703
|
+
Hs as o,
|
|
3704
|
+
jr as p,
|
|
3705
|
+
qe as q,
|
|
3706
|
+
Qs as r,
|
|
3671
3707
|
F as s,
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3708
|
+
no as t,
|
|
3709
|
+
ja as u,
|
|
3710
|
+
nr as v,
|
|
3711
|
+
Ys as w,
|
|
3712
|
+
tn as x,
|
|
3713
|
+
jn as y,
|
|
3714
|
+
ao as z
|
|
3679
3715
|
};
|
|
3680
|
-
//# sourceMappingURL=index-
|
|
3716
|
+
//# sourceMappingURL=index-Ck4TmzTO.js.map
|