zudoku 0.28.3 → 0.29.1

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