zudoku 0.46.1 → 0.46.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/dist/config/validators/validate.d.ts +12 -12
  2. package/dist/config/validators/validate.js +3 -1
  3. package/dist/config/validators/validate.js.map +1 -1
  4. package/dist/lib/authentication/AuthenticationPlugin.d.ts +0 -5
  5. package/dist/lib/authentication/AuthenticationPlugin.js +0 -12
  6. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
  7. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +110 -15
  8. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  9. package/dist/lib/plugins/api-keys/index.d.ts +3 -3
  10. package/dist/lib/plugins/api-keys/index.js +14 -14
  11. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  12. package/dist/lib/plugins/openapi/Sidecar.js +11 -91
  13. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  14. package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +5 -0
  15. package/dist/lib/plugins/openapi/playground/BodyPanel.js +22 -0
  16. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -0
  17. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -1
  18. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  19. package/dist/lib/plugins/openapi/playground/Headers.js +25 -25
  20. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  21. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -1
  22. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
  23. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
  24. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
  25. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
  26. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  27. package/dist/lib/plugins/openapi/playground/Playground.d.ts +3 -8
  28. package/dist/lib/plugins/openapi/playground/Playground.js +70 -65
  29. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  30. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  31. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  32. package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
  33. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  34. package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +2 -0
  35. package/dist/lib/plugins/openapi/playground/fileUtils.js +22 -0
  36. package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -0
  37. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +4 -1
  38. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +29 -20
  39. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  40. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +2 -2
  41. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  42. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.d.ts +16 -0
  43. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +10 -0
  44. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -0
  45. package/dist/lib/plugins/openapi/util/createHttpSnippet.d.ts +11 -0
  46. package/dist/lib/plugins/openapi/util/createHttpSnippet.js +89 -0
  47. package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -0
  48. package/dist/lib/shiki.d.ts +8 -12
  49. package/dist/lib/shiki.js +11 -13
  50. package/dist/lib/shiki.js.map +1 -1
  51. package/dist/lib/ui/CodeBlock.js +1 -1
  52. package/dist/lib/ui/CodeBlock.js.map +1 -1
  53. package/dist/lib/ui/Dialog.d.ts +3 -1
  54. package/dist/lib/ui/Dialog.js +2 -2
  55. package/dist/lib/ui/Dialog.js.map +1 -1
  56. package/dist/lib/util/humanFileSize.d.ts +6 -0
  57. package/dist/lib/util/humanFileSize.js +14 -0
  58. package/dist/lib/util/humanFileSize.js.map +1 -0
  59. package/dist/lib/util/humanFileSize.test.d.ts +1 -0
  60. package/dist/lib/util/humanFileSize.test.js +22 -0
  61. package/dist/lib/util/humanFileSize.test.js.map +1 -0
  62. package/lib/{Callout-BkgOUkoZ.js → Callout-CoVxYafP.js} +2 -2
  63. package/lib/{Callout-BkgOUkoZ.js.map → Callout-CoVxYafP.js.map} +1 -1
  64. package/lib/{Dialog-Du6WMcIA.js → Dialog-BxpuVLh9.js} +25 -25
  65. package/lib/Dialog-BxpuVLh9.js.map +1 -0
  66. package/lib/{Markdown-BRAyzyUJ.js → Markdown-Cm4kj26S.js} +6 -5
  67. package/lib/{Markdown-BRAyzyUJ.js.map → Markdown-Cm4kj26S.js.map} +1 -1
  68. package/lib/{MdxPage-B3v1BSKr.js → MdxPage-fDGQtB5w.js} +5 -5
  69. package/lib/{MdxPage-B3v1BSKr.js.map → MdxPage-fDGQtB5w.js.map} +1 -1
  70. package/lib/{OasProvider-5jrFuhVk.js → OasProvider-CFBvfR3r.js} +3 -3
  71. package/lib/{OasProvider-5jrFuhVk.js.map → OasProvider-CFBvfR3r.js.map} +1 -1
  72. package/lib/{OperationList-BmoMLQPO.js → OperationList-Xs4KWmsh.js} +1139 -1131
  73. package/lib/OperationList-Xs4KWmsh.js.map +1 -0
  74. package/lib/{Pagination-Cr0fWZS3.js → Pagination-CCxhL836.js} +2 -2
  75. package/lib/{Pagination-Cr0fWZS3.js.map → Pagination-CCxhL836.js.map} +1 -1
  76. package/lib/{RouteGuard-PrSVLbSr.js → RouteGuard-CZ_uLv3g.js} +6 -6
  77. package/lib/{RouteGuard-PrSVLbSr.js.map → RouteGuard-CZ_uLv3g.js.map} +1 -1
  78. package/lib/{SchemaList-B4riYLoP.js → SchemaList-BWaNlmUJ.js} +6 -6
  79. package/lib/{SchemaList-B4riYLoP.js.map → SchemaList-BWaNlmUJ.js.map} +1 -1
  80. package/lib/{SchemaView-CPZ6RgsF.js → SchemaView-DdKJt2ln.js} +3 -3
  81. package/lib/{SchemaView-CPZ6RgsF.js.map → SchemaView-DdKJt2ln.js.map} +1 -1
  82. package/lib/{SignUp-CWaiH0tY.js → SignUp-B-1Pvc-8.js} +3 -3
  83. package/lib/{SignUp-CWaiH0tY.js.map → SignUp-B-1Pvc-8.js.map} +1 -1
  84. package/lib/{Slot-Bo6K4tnb.js → Slot-B99cbD-q.js} +11 -11
  85. package/lib/{Slot-Bo6K4tnb.js.map → Slot-B99cbD-q.js.map} +1 -1
  86. package/lib/{SyntaxHighlight-DedRjJNr.js → SyntaxHighlight-Cz6Me7-F.js} +4474 -3323
  87. package/lib/SyntaxHighlight-Cz6Me7-F.js.map +1 -0
  88. package/lib/{Toc-lL3fzNkl.js → Toc-Qe7A4uj_.js} +2 -2
  89. package/lib/{Toc-lL3fzNkl.js.map → Toc-Qe7A4uj_.js.map} +1 -1
  90. package/lib/{chunk-BAXFHI7N-C9WnHsLV.js → chunk-DQRVZFIR-BblmKnHy.js} +697 -697
  91. package/lib/chunk-DQRVZFIR-BblmKnHy.js.map +1 -0
  92. package/lib/{circular-oB4auIIg.js → circular-w5eL5J8a.js} +1812 -1807
  93. package/lib/circular-w5eL5J8a.js.map +1 -0
  94. package/lib/{createServer-DCB82j2t.js → createServer-p3yUA8Bu.js} +3648 -3493
  95. package/lib/createServer-p3yUA8Bu.js.map +1 -0
  96. package/lib/{hook-DawSLaZr.js → hook-k7PfUIsj.js} +10 -10
  97. package/lib/{hook-DawSLaZr.js.map → hook-k7PfUIsj.js.map} +1 -1
  98. package/lib/{index-BXYvD5-7.js → index-yqBxBqxF.js} +1053 -1095
  99. package/lib/index-yqBxBqxF.js.map +1 -0
  100. package/lib/index.esm-Cp4wkyud.js +1236 -0
  101. package/lib/index.esm-Cp4wkyud.js.map +1 -0
  102. package/lib/{mutation-oxMvODNQ.js → mutation-BSeQ8pEK.js} +2 -2
  103. package/lib/{mutation-oxMvODNQ.js.map → mutation-BSeQ8pEK.js.map} +1 -1
  104. package/lib/react-nprogress.esm-C2MPXjiJ.js +389 -0
  105. package/lib/react-nprogress.esm-C2MPXjiJ.js.map +1 -0
  106. package/lib/ui/CodeBlock.js +17 -16
  107. package/lib/ui/CodeBlock.js.map +1 -1
  108. package/lib/ui/Command.js +1 -1
  109. package/lib/ui/Dialog.js +25 -25
  110. package/lib/ui/Dialog.js.map +1 -1
  111. package/lib/ui/Form.js +1 -1
  112. package/lib/ui/SyntaxHighlight.js +2 -2
  113. package/lib/{useExposedProps-DG8J6ewJ.js → useExposedProps-BZQkZneR.js} +2 -2
  114. package/lib/{useExposedProps-DG8J6ewJ.js.map → useExposedProps-BZQkZneR.js.map} +1 -1
  115. package/lib/{useMutation-C_j3dA_L.js → useMutation-CZSmsIGW.js} +3 -3
  116. package/lib/{useMutation-C_j3dA_L.js.map → useMutation-CZSmsIGW.js.map} +1 -1
  117. package/lib/zudoku.auth-auth0.js +1 -1
  118. package/lib/zudoku.auth-clerk.js +2 -2
  119. package/lib/zudoku.auth-openid.js +57 -66
  120. package/lib/zudoku.auth-openid.js.map +1 -1
  121. package/lib/zudoku.components.js +1698 -2082
  122. package/lib/zudoku.components.js.map +1 -1
  123. package/lib/zudoku.hooks.js +11 -11
  124. package/lib/zudoku.plugin-api-catalog.js +5 -5
  125. package/lib/zudoku.plugin-api-keys.js +473 -4970
  126. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  127. package/lib/zudoku.plugin-custom-pages.js +2 -2
  128. package/lib/zudoku.plugin-markdown.js +1 -1
  129. package/lib/zudoku.plugin-openapi.js +3 -3
  130. package/lib/zudoku.plugin-redirect.js +1 -1
  131. package/lib/zudoku.plugin-search-pagefind.js +5 -5
  132. package/package.json +33 -34
  133. package/src/lib/authentication/AuthenticationPlugin.tsx +0 -14
  134. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +193 -48
  135. package/src/lib/plugins/api-keys/index.tsx +25 -18
  136. package/src/lib/plugins/openapi/Sidecar.tsx +11 -97
  137. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +46 -0
  138. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +4 -1
  139. package/src/lib/plugins/openapi/playground/Headers.tsx +110 -106
  140. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +13 -11
  141. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
  142. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
  143. package/src/lib/plugins/openapi/playground/Playground.tsx +127 -211
  144. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +2 -1
  145. package/src/lib/plugins/openapi/playground/QueryParams.tsx +1 -1
  146. package/src/lib/plugins/openapi/playground/fileUtils.ts +32 -0
  147. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +74 -39
  148. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +4 -1
  149. package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +20 -0
  150. package/src/lib/plugins/openapi/util/createHttpSnippet.ts +107 -0
  151. package/src/lib/shiki.ts +21 -22
  152. package/src/lib/ui/CodeBlock.tsx +1 -0
  153. package/src/lib/ui/Dialog.tsx +11 -7
  154. package/src/lib/util/humanFileSize.test.ts +24 -0
  155. package/src/lib/util/humanFileSize.ts +16 -0
  156. package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +0 -7
  157. package/dist/lib/plugins/openapi/playground/SubmitButton.js +0 -19
  158. package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +0 -1
  159. package/lib/Dialog-Du6WMcIA.js.map +0 -1
  160. package/lib/OperationList-BmoMLQPO.js.map +0 -1
  161. package/lib/SyntaxHighlight-DedRjJNr.js.map +0 -1
  162. package/lib/chunk-BAXFHI7N-C9WnHsLV.js.map +0 -1
  163. package/lib/circular-oB4auIIg.js.map +0 -1
  164. package/lib/createServer-DCB82j2t.js.map +0 -1
  165. package/lib/index-BXYvD5-7.js.map +0 -1
  166. package/lib/index.esm-DSfX_eMP.js +0 -1216
  167. package/lib/index.esm-DSfX_eMP.js.map +0 -1
  168. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +0 -70
@@ -1,54 +1,54 @@
1
1
  import { j as n } from "./jsx-runtime-C5mzlN2N.js";
2
- import { ChevronDown as vt, ChevronUp as hn, Check as bt, ChevronRightIcon as X, CheckIcon as jt, DotIcon as fn, XIcon as xn, Circle as gn, ChevronDownIcon as yn, InfoIcon as nt, LogInIcon as vn, CirclePlayIcon as bn } from "lucide-react";
3
- import { r as jn, c as Nn, u as wn, N as Cn, h as Sn, m as st } from "./chunk-BAXFHI7N-C9WnHsLV.js";
4
- import { L as Nt, M as wt, O as Tn, m as An, P as On, l as R, d as Pn, f as En } from "./hook-DawSLaZr.js";
5
- import { Button as Z } from "./ui/Button.js";
6
- import { Z as $n } from "./invariant-DAFpPywt.js";
7
- import * as b from "react";
8
- import { createContext as Ct, use as Rn, Fragment as q, useRef as Q, useEffect as ae, useMemo as Ln, useState as L, useCallback as In, useTransition as kn, useContext as Dn } from "react";
9
- import { VisuallyHidden as qn } from "@radix-ui/react-visually-hidden";
10
- import { D as Le, a as Ie, c as ke, d as St, e as Tt, f as Vn } from "./Dialog-Du6WMcIA.js";
11
- import { u as Fn } from "./useMutation-C_j3dA_L.js";
12
- import { a as De, u as qe, C as V, b as Bn, F as zn } from "./index.esm-DSfX_eMP.js";
13
- import { c as At } from "./index-DI5SPFK9.js";
14
- import { c as g } from "./cn-wvCW-ho6.js";
15
- import * as w from "@radix-ui/react-select";
16
- import { Tabs as Ot, TabsList as Pt, TabsTrigger as M, TabsContent as U } from "./ui/Tabs.js";
17
- import { o as _n } from "./objectEntries-yMIkr2mI.js";
18
- import { u as Mn } from "./useLatest-hmRS46UF.js";
19
- import { z as Un } from "./index--oeBayMa.js";
2
+ import { ChevronDown as xt, ChevronUp as pn, Check as gt, ChevronRightIcon as Q, CheckIcon as hn, DotIcon as fn, ChevronDownIcon as xn, XIcon as gn, Circle as yn, DownloadIcon as vn, LogInIcon as bn, CirclePlayIcon as jn } from "lucide-react";
3
+ import { r as Nn, c as wn, u as Cn, N as Sn, h as Tn, m as Ke } from "./chunk-DQRVZFIR-BblmKnHy.js";
4
+ import { L as Ce, M as Se, O as yt, l as An, P as On, j as P, d as Rn, i as $n } from "./hook-k7PfUIsj.js";
5
+ import { Button as J } from "./ui/Button.js";
6
+ import { Z as Ln } from "./invariant-DAFpPywt.js";
7
+ import * as N from "react";
8
+ import { createContext as vt, use as Pn, Fragment as D, useRef as W, useEffect as M, useMemo as En, useState as E, useCallback as In, useTransition as kn, useContext as Dn } from "react";
9
+ import { VisuallyHidden as Bn } from "@radix-ui/react-visually-hidden";
10
+ import { D as Te, a as Ae, c as Oe, d as bt, f as jt, e as Fn } from "./Dialog-BxpuVLh9.js";
11
+ import { u as Vn } from "./react-nprogress.esm-C2MPXjiJ.js";
12
+ import { u as qn } from "./useMutation-CZSmsIGW.js";
13
+ import { u as Re, a as $e, C as B, b as zn, F as _n } from "./index.esm-Cp4wkyud.js";
20
14
  import { B as F } from "./Button-BE9IVkWV.js";
21
- import * as j from "@radix-ui/react-dropdown-menu";
22
- import { C as ue } from "./Card-DPhGbYUM.js";
23
- import * as Ce from "@radix-ui/react-checkbox";
24
- import * as oe from "@radix-ui/react-popover";
15
+ import * as C from "@radix-ui/react-select";
16
+ import { c as v } from "./cn-wvCW-ho6.js";
17
+ import { u as Un } from "./useLatest-hmRS46UF.js";
18
+ import { z as Mn } from "./index--oeBayMa.js";
19
+ import * as w from "@radix-ui/react-dropdown-menu";
20
+ import { C as ie } from "./Card-DPhGbYUM.js";
21
+ import * as be from "@radix-ui/react-checkbox";
22
+ import * as re from "@radix-ui/react-popover";
25
23
  import { PopoverAnchor as Gn } from "@radix-ui/react-popover";
26
24
  import { P as Hn } from "./index-CrcNWbel.js";
27
- import { g as Qn, h as Jn, C as Wn, b as Xn, f as Zn } from "./Callout-BkgOUkoZ.js";
28
- import { Input as Ve } from "./ui/Input.js";
25
+ import { g as Qn, h as Jn, C as Wn, b as Xn, f as Zn } from "./Callout-CoVxYafP.js";
26
+ import { Input as Le } from "./ui/Input.js";
29
27
  import { Slot as Yn } from "@radix-ui/react-slot";
30
- import * as Et from "@radix-ui/react-label";
31
- import * as Y from "@radix-ui/react-radio-group";
32
- import { S as Kn } from "./Spinner-mNLZ6awP.js";
33
- import { Callout as es } from "./ui/Callout.js";
34
- import { Card as $t, CardHeader as ts, CardTitle as ns, CardContent as ss } from "./ui/Card.js";
35
- import { Collapsible as rt, CollapsibleTrigger as at, CollapsibleContent as ot } from "./ui/Collapsible.js";
36
- import * as Fe from "@radix-ui/react-collapsible";
37
- import { S as rs } from "./SyntaxHighlight-DedRjJNr.js";
38
- let ge;
39
- const as = (e) => {
28
+ import * as Nt from "@radix-ui/react-label";
29
+ import { c as Kn } from "./index-DI5SPFK9.js";
30
+ import * as X from "@radix-ui/react-radio-group";
31
+ import { S as es } from "./Spinner-mNLZ6awP.js";
32
+ import { Callout as ts } from "./ui/Callout.js";
33
+ import { Card as wt, CardHeader as ns, CardTitle as ss, CardContent as rs } from "./ui/Card.js";
34
+ import { Tabs as as, TabsList as os, TabsTrigger as et, TabsContent as tt } from "./ui/Tabs.js";
35
+ import { Collapsible as nt, CollapsibleTrigger as st, CollapsibleContent as rt } from "./ui/Collapsible.js";
36
+ import * as Pe from "@radix-ui/react-collapsible";
37
+ import { S as is } from "./SyntaxHighlight-Cz6Me7-F.js";
38
+ let pe;
39
+ const ls = (e) => {
40
40
  if (e.errors?.[0])
41
- throw new $n(e.errors[0].message, {
41
+ throw new Ln(e.errors[0].message, {
42
42
  developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
43
43
  });
44
44
  };
45
- class os {
45
+ class cs {
46
46
  constructor(t) {
47
47
  this.config = t;
48
48
  }
49
- #e = async () => (ge || (ge = import("./createServer-DCB82j2t.js").then(
49
+ #e = async () => (pe || (pe = import("./createServer-p3yUA8Bu.js").then(
50
50
  (t) => t.createServer(this.config)
51
- )), ge);
51
+ )), pe);
52
52
  #t = async (t) => this.config.server ? fetch(this.config.server, t) : (await this.#e()).fetch("http://localhost/graphql", t);
53
53
  fetch = async (t, s) => {
54
54
  const a = t.match(/query (\w+)/)?.[1], r = await this.#t({
@@ -59,27 +59,27 @@ class os {
59
59
  if (!r.ok)
60
60
  throw new Error("Network response was not ok");
61
61
  const o = await r.json();
62
- return as(o), o.data;
62
+ return ls(o), o.data;
63
63
  };
64
64
  }
65
- function ye(e, t) {
65
+ function he(e, t) {
66
66
  if (!!!e)
67
67
  throw new Error(t);
68
68
  }
69
- function is(e) {
69
+ function ds(e) {
70
70
  return typeof e == "object" && e !== null;
71
71
  }
72
- function ls(e, t) {
72
+ function us(e, t) {
73
73
  if (!!!e)
74
74
  throw new Error(
75
75
  t ?? "Unexpected invariant triggered."
76
76
  );
77
77
  }
78
- const cs = /\r\n|[\n\r]/g;
79
- function Se(e, t) {
78
+ const ms = /\r\n|[\n\r]/g;
79
+ function je(e, t) {
80
80
  let s = 0, a = 1;
81
- for (const r of e.body.matchAll(cs)) {
82
- if (typeof r.index == "number" || ls(!1), r.index >= t)
81
+ for (const r of e.body.matchAll(ms)) {
82
+ if (typeof r.index == "number" || us(!1), r.index >= t)
83
83
  break;
84
84
  s = r.index + r[0].length, a += 1;
85
85
  }
@@ -88,40 +88,40 @@ function Se(e, t) {
88
88
  column: t + 1 - s
89
89
  };
90
90
  }
91
- function ds(e) {
92
- return Rt(
91
+ function ps(e) {
92
+ return Ct(
93
93
  e.source,
94
- Se(e.source, e.start)
94
+ je(e.source, e.start)
95
95
  );
96
96
  }
97
- function Rt(e, t) {
98
- const s = e.locationOffset.column - 1, a = "".padStart(s) + e.body, r = t.line - 1, o = e.locationOffset.line - 1, i = t.line + o, c = t.line === 1 ? s : 0, l = t.column + c, u = `${e.name}:${i}:${l}
99
- `, p = a.split(/\r\n|[\n\r]/g), v = p[r];
100
- if (v.length > 120) {
101
- const f = Math.floor(l / 80), x = l % 80, m = [];
102
- for (let y = 0; y < v.length; y += 80)
103
- m.push(v.slice(y, y + 80));
104
- return u + it([
105
- [`${i} |`, m[0]],
106
- ...m.slice(1, f + 1).map((y) => ["|", y]),
97
+ function Ct(e, t) {
98
+ const s = e.locationOffset.column - 1, a = "".padStart(s) + e.body, r = t.line - 1, o = e.locationOffset.line - 1, i = t.line + o, c = t.line === 1 ? s : 0, l = t.column + c, m = `${e.name}:${i}:${l}
99
+ `, u = a.split(/\r\n|[\n\r]/g), g = u[r];
100
+ if (g.length > 120) {
101
+ const f = Math.floor(l / 80), x = l % 80, p = [];
102
+ for (let y = 0; y < g.length; y += 80)
103
+ p.push(g.slice(y, y + 80));
104
+ return m + at([
105
+ [`${i} |`, p[0]],
106
+ ...p.slice(1, f + 1).map((y) => ["|", y]),
107
107
  ["|", "^".padStart(x)],
108
- ["|", m[f + 1]]
108
+ ["|", p[f + 1]]
109
109
  ]);
110
110
  }
111
- return u + it([
111
+ return m + at([
112
112
  // Lines specified like this: ["prefix", "string"],
113
- [`${i - 1} |`, p[r - 1]],
114
- [`${i} |`, v],
113
+ [`${i - 1} |`, u[r - 1]],
114
+ [`${i} |`, g],
115
115
  ["|", "^".padStart(l)],
116
- [`${i + 1} |`, p[r + 1]]
116
+ [`${i + 1} |`, u[r + 1]]
117
117
  ]);
118
118
  }
119
- function it(e) {
119
+ function at(e) {
120
120
  const t = e.filter(([a, r]) => r !== void 0), s = Math.max(...t.map(([a]) => a.length));
121
121
  return t.map(([a, r]) => a.padStart(s) + (r ? " " + r : "")).join(`
122
122
  `);
123
123
  }
124
- function us(e) {
124
+ function hs(e) {
125
125
  const t = e[0];
126
126
  return t == null || "kind" in t || "length" in t ? {
127
127
  nodes: t,
@@ -132,7 +132,7 @@ function us(e) {
132
132
  extensions: e[5]
133
133
  } : t;
134
134
  }
135
- class Be extends Error {
135
+ class Ee extends Error {
136
136
  /**
137
137
  * An array of `{ line, column }` locations within the source GraphQL document
138
138
  * which correspond to this error.
@@ -173,18 +173,18 @@ class Be extends Error {
173
173
  */
174
174
  constructor(t, ...s) {
175
175
  var a, r, o;
176
- const { nodes: i, source: c, positions: l, path: u, originalError: p, extensions: v } = us(s);
177
- super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = p ?? void 0, this.nodes = lt(
176
+ const { nodes: i, source: c, positions: l, path: m, originalError: u, extensions: g } = hs(s);
177
+ super(t), this.name = "GraphQLError", this.path = m ?? void 0, this.originalError = u ?? void 0, this.nodes = ot(
178
178
  Array.isArray(i) ? i : i ? [i] : void 0
179
179
  );
180
- const f = lt(
181
- (a = this.nodes) === null || a === void 0 ? void 0 : a.map((m) => m.loc).filter((m) => m != null)
180
+ const f = ot(
181
+ (a = this.nodes) === null || a === void 0 ? void 0 : a.map((p) => p.loc).filter((p) => p != null)
182
182
  );
183
- this.source = c ?? (f == null || (r = f[0]) === null || r === void 0 ? void 0 : r.source), this.positions = l ?? f?.map((m) => m.start), this.locations = l && c ? l.map((m) => Se(c, m)) : f?.map((m) => Se(m.source, m.start));
184
- const x = is(
185
- p?.extensions
186
- ) ? p?.extensions : void 0;
187
- this.extensions = (o = v ?? x) !== null && o !== void 0 ? o : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
183
+ this.source = c ?? (f == null || (r = f[0]) === null || r === void 0 ? void 0 : r.source), this.positions = l ?? f?.map((p) => p.start), this.locations = l && c ? l.map((p) => je(c, p)) : f?.map((p) => je(p.source, p.start));
184
+ const x = ds(
185
+ u?.extensions
186
+ ) ? u?.extensions : void 0;
187
+ this.extensions = (o = g ?? x) !== null && o !== void 0 ? o : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
188
188
  message: {
189
189
  writable: !0,
190
190
  enumerable: !0
@@ -204,11 +204,11 @@ class Be extends Error {
204
204
  originalError: {
205
205
  enumerable: !1
206
206
  }
207
- }), p != null && p.stack ? Object.defineProperty(this, "stack", {
208
- value: p.stack,
207
+ }), u != null && u.stack ? Object.defineProperty(this, "stack", {
208
+ value: u.stack,
209
209
  writable: !0,
210
210
  configurable: !0
211
- }) : Error.captureStackTrace ? Error.captureStackTrace(this, Be) : Object.defineProperty(this, "stack", {
211
+ }) : Error.captureStackTrace ? Error.captureStackTrace(this, Ee) : Object.defineProperty(this, "stack", {
212
212
  value: Error().stack,
213
213
  writable: !0,
214
214
  configurable: !0
@@ -223,12 +223,12 @@ class Be extends Error {
223
223
  for (const s of this.nodes)
224
224
  s.loc && (t += `
225
225
 
226
- ` + ds(s.loc));
226
+ ` + ps(s.loc));
227
227
  else if (this.source && this.locations)
228
228
  for (const s of this.locations)
229
229
  t += `
230
230
 
231
- ` + Rt(this.source, s);
231
+ ` + Ct(this.source, s);
232
232
  return t;
233
233
  }
234
234
  toJSON() {
@@ -238,16 +238,16 @@ class Be extends Error {
238
238
  return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
239
239
  }
240
240
  }
241
- function lt(e) {
241
+ function ot(e) {
242
242
  return e === void 0 || e.length === 0 ? void 0 : e;
243
243
  }
244
- function O(e, t, s) {
245
- return new Be(`Syntax Error: ${s}`, {
244
+ function R(e, t, s) {
245
+ return new Ee(`Syntax Error: ${s}`, {
246
246
  source: e,
247
247
  positions: [t]
248
248
  });
249
249
  }
250
- class ga {
250
+ class Ca {
251
251
  /**
252
252
  * The character offset at which this Node begins.
253
253
  */
@@ -276,7 +276,7 @@ class ga {
276
276
  };
277
277
  }
278
278
  }
279
- class Lt {
279
+ class St {
280
280
  /**
281
281
  * The kind of Token.
282
282
  */
@@ -318,7 +318,7 @@ class Lt {
318
318
  };
319
319
  }
320
320
  }
321
- const ms = {
321
+ const fs = {
322
322
  Name: [],
323
323
  Document: ["definitions"],
324
324
  OperationDefinition: [
@@ -392,37 +392,37 @@ const ms = {
392
392
  UnionTypeExtension: ["name", "directives", "types"],
393
393
  EnumTypeExtension: ["name", "directives", "values"],
394
394
  InputObjectTypeExtension: ["name", "directives", "fields"]
395
- }, ps = new Set(Object.keys(ms));
396
- function ya(e) {
395
+ }, xs = new Set(Object.keys(fs));
396
+ function Sa(e) {
397
397
  const t = e?.kind;
398
- return typeof t == "string" && ps.has(t);
398
+ return typeof t == "string" && xs.has(t);
399
399
  }
400
- var ct;
400
+ var it;
401
401
  (function(e) {
402
402
  e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
403
- })(ct || (ct = {}));
404
- function Te(e) {
403
+ })(it || (it = {}));
404
+ function Ne(e) {
405
405
  return e === 9 || e === 32;
406
406
  }
407
- function K(e) {
407
+ function Z(e) {
408
408
  return e >= 48 && e <= 57;
409
409
  }
410
- function It(e) {
410
+ function Tt(e) {
411
411
  return e >= 97 && e <= 122 || // A-Z
412
412
  e >= 65 && e <= 90;
413
413
  }
414
- function kt(e) {
415
- return It(e) || e === 95;
414
+ function At(e) {
415
+ return Tt(e) || e === 95;
416
416
  }
417
- function hs(e) {
418
- return It(e) || K(e) || e === 95;
417
+ function gs(e) {
418
+ return Tt(e) || Z(e) || e === 95;
419
419
  }
420
- function fs(e) {
420
+ function ys(e) {
421
421
  var t;
422
422
  let s = Number.MAX_SAFE_INTEGER, a = null, r = -1;
423
423
  for (let i = 0; i < e.length; ++i) {
424
424
  var o;
425
- const c = e[i], l = xs(c);
425
+ const c = e[i], l = vs(c);
426
426
  l !== c.length && (a = (o = a) !== null && o !== void 0 ? o : i, r = i, i !== 0 && l < s && (s = l));
427
427
  }
428
428
  return e.map((i, c) => c === 0 ? i : i.slice(s)).slice(
@@ -430,26 +430,26 @@ function fs(e) {
430
430
  r + 1
431
431
  );
432
432
  }
433
- function xs(e) {
433
+ function vs(e) {
434
434
  let t = 0;
435
- for (; t < e.length && Te(e.charCodeAt(t)); )
435
+ for (; t < e.length && Ne(e.charCodeAt(t)); )
436
436
  ++t;
437
437
  return t;
438
438
  }
439
- function gs(e, t) {
440
- const s = e.replace(/"""/g, '\\"""'), a = s.split(/\r\n|[\n\r]/g), r = a.length === 1, o = a.length > 1 && a.slice(1).every((x) => x.length === 0 || Te(x.charCodeAt(0))), i = s.endsWith('\\"""'), c = e.endsWith('"') && !i, l = e.endsWith("\\"), u = c || l, p = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
441
- (!r || e.length > 70 || u || o || i);
442
- let v = "";
443
- const f = r && Te(e.charCodeAt(0));
444
- return (p && !f || o) && (v += `
445
- `), v += s, (p || u) && (v += `
446
- `), '"""' + v + '"""';
439
+ function bs(e, t) {
440
+ const s = e.replace(/"""/g, '\\"""'), a = s.split(/\r\n|[\n\r]/g), r = a.length === 1, o = a.length > 1 && a.slice(1).every((x) => x.length === 0 || Ne(x.charCodeAt(0))), i = s.endsWith('\\"""'), c = e.endsWith('"') && !i, l = e.endsWith("\\"), m = c || l, u = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
441
+ (!r || e.length > 70 || m || o || i);
442
+ let g = "";
443
+ const f = r && Ne(e.charCodeAt(0));
444
+ return (u && !f || o) && (g += `
445
+ `), g += s, (u || m) && (g += `
446
+ `), '"""' + g + '"""';
447
447
  }
448
448
  var h;
449
449
  (function(e) {
450
450
  e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
451
451
  })(h || (h = {}));
452
- class ys {
452
+ class js {
453
453
  /**
454
454
  * The previously focused non-ignored token.
455
455
  */
@@ -463,7 +463,7 @@ class ys {
463
463
  * The character offset at which the current line begins.
464
464
  */
465
465
  constructor(t) {
466
- const s = new Lt(h.SOF, 0, 0, 0, 0);
466
+ const s = new St(h.SOF, 0, 0, 0, 0);
467
467
  this.source = t, this.lastToken = s, this.token = s, this.line = 1, this.lineStart = 0;
468
468
  }
469
469
  get [Symbol.toStringTag]() {
@@ -486,29 +486,29 @@ class ys {
486
486
  if (t.next)
487
487
  t = t.next;
488
488
  else {
489
- const s = bs(this, t.end);
489
+ const s = ws(this, t.end);
490
490
  t.next = s, s.prev = t, t = s;
491
491
  }
492
492
  while (t.kind === h.COMMENT);
493
493
  return t;
494
494
  }
495
495
  }
496
- function vs(e) {
496
+ function Ns(e) {
497
497
  return e === h.BANG || e === h.DOLLAR || e === h.AMP || e === h.PAREN_L || e === h.PAREN_R || e === h.SPREAD || e === h.COLON || e === h.EQUALS || e === h.AT || e === h.BRACKET_L || e === h.BRACKET_R || e === h.BRACE_L || e === h.PIPE || e === h.BRACE_R;
498
498
  }
499
- function J(e) {
499
+ function z(e) {
500
500
  return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
501
501
  }
502
- function me(e, t) {
503
- return Dt(e.charCodeAt(t)) && qt(e.charCodeAt(t + 1));
502
+ function le(e, t) {
503
+ return Ot(e.charCodeAt(t)) && Rt(e.charCodeAt(t + 1));
504
504
  }
505
- function Dt(e) {
505
+ function Ot(e) {
506
506
  return e >= 55296 && e <= 56319;
507
507
  }
508
- function qt(e) {
508
+ function Rt(e) {
509
509
  return e >= 56320 && e <= 57343;
510
510
  }
511
- function B(e, t) {
511
+ function V(e, t) {
512
512
  const s = e.source.body.codePointAt(t);
513
513
  if (s === void 0)
514
514
  return h.EOF;
@@ -518,11 +518,11 @@ function B(e, t) {
518
518
  }
519
519
  return "U+" + s.toString(16).toUpperCase().padStart(4, "0");
520
520
  }
521
- function C(e, t, s, a, r) {
521
+ function S(e, t, s, a, r) {
522
522
  const o = e.line, i = 1 + s - e.lineStart;
523
- return new Lt(t, s, a, o, i, r);
523
+ return new St(t, s, a, o, i, r);
524
524
  }
525
- function bs(e, t) {
525
+ function ws(e, t) {
526
526
  const s = e.source.body, a = s.length;
527
527
  let r = t;
528
528
  for (; r < a; ) {
@@ -563,7 +563,7 @@ function bs(e, t) {
563
563
  continue;
564
564
  // Comment
565
565
  case 35:
566
- return js(e, r);
566
+ return Cs(e, r);
567
567
  // Token ::
568
568
  // - Punctuator
569
569
  // - Name
@@ -573,66 +573,66 @@ function bs(e, t) {
573
573
  //
574
574
  // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
575
575
  case 33:
576
- return C(e, h.BANG, r, r + 1);
576
+ return S(e, h.BANG, r, r + 1);
577
577
  case 36:
578
- return C(e, h.DOLLAR, r, r + 1);
578
+ return S(e, h.DOLLAR, r, r + 1);
579
579
  case 38:
580
- return C(e, h.AMP, r, r + 1);
580
+ return S(e, h.AMP, r, r + 1);
581
581
  case 40:
582
- return C(e, h.PAREN_L, r, r + 1);
582
+ return S(e, h.PAREN_L, r, r + 1);
583
583
  case 41:
584
- return C(e, h.PAREN_R, r, r + 1);
584
+ return S(e, h.PAREN_R, r, r + 1);
585
585
  case 46:
586
586
  if (s.charCodeAt(r + 1) === 46 && s.charCodeAt(r + 2) === 46)
587
- return C(e, h.SPREAD, r, r + 3);
587
+ return S(e, h.SPREAD, r, r + 3);
588
588
  break;
589
589
  case 58:
590
- return C(e, h.COLON, r, r + 1);
590
+ return S(e, h.COLON, r, r + 1);
591
591
  case 61:
592
- return C(e, h.EQUALS, r, r + 1);
592
+ return S(e, h.EQUALS, r, r + 1);
593
593
  case 64:
594
- return C(e, h.AT, r, r + 1);
594
+ return S(e, h.AT, r, r + 1);
595
595
  case 91:
596
- return C(e, h.BRACKET_L, r, r + 1);
596
+ return S(e, h.BRACKET_L, r, r + 1);
597
597
  case 93:
598
- return C(e, h.BRACKET_R, r, r + 1);
598
+ return S(e, h.BRACKET_R, r, r + 1);
599
599
  case 123:
600
- return C(e, h.BRACE_L, r, r + 1);
600
+ return S(e, h.BRACE_L, r, r + 1);
601
601
  case 124:
602
- return C(e, h.PIPE, r, r + 1);
602
+ return S(e, h.PIPE, r, r + 1);
603
603
  case 125:
604
- return C(e, h.BRACE_R, r, r + 1);
604
+ return S(e, h.BRACE_R, r, r + 1);
605
605
  // StringValue
606
606
  case 34:
607
- return s.charCodeAt(r + 1) === 34 && s.charCodeAt(r + 2) === 34 ? As(e, r) : ws(e, r);
607
+ return s.charCodeAt(r + 1) === 34 && s.charCodeAt(r + 2) === 34 ? $s(e, r) : Ts(e, r);
608
608
  }
609
- if (K(o) || o === 45)
610
- return Ns(e, r, o);
611
- if (kt(o))
612
- return Os(e, r);
613
- throw O(
609
+ if (Z(o) || o === 45)
610
+ return Ss(e, r, o);
611
+ if (At(o))
612
+ return Ls(e, r);
613
+ throw R(
614
614
  e.source,
615
615
  r,
616
- o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : J(o) || me(s, r) ? `Unexpected character: ${B(e, r)}.` : `Invalid character: ${B(e, r)}.`
616
+ o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : z(o) || le(s, r) ? `Unexpected character: ${V(e, r)}.` : `Invalid character: ${V(e, r)}.`
617
617
  );
618
618
  }
619
- return C(e, h.EOF, a, a);
619
+ return S(e, h.EOF, a, a);
620
620
  }
621
- function js(e, t) {
621
+ function Cs(e, t) {
622
622
  const s = e.source.body, a = s.length;
623
623
  let r = t + 1;
624
624
  for (; r < a; ) {
625
625
  const o = s.charCodeAt(r);
626
626
  if (o === 10 || o === 13)
627
627
  break;
628
- if (J(o))
628
+ if (z(o))
629
629
  ++r;
630
- else if (me(s, r))
630
+ else if (le(s, r))
631
631
  r += 2;
632
632
  else
633
633
  break;
634
634
  }
635
- return C(
635
+ return S(
636
636
  e,
637
637
  h.COMMENT,
638
638
  t,
@@ -640,31 +640,31 @@ function js(e, t) {
640
640
  s.slice(t + 1, r)
641
641
  );
642
642
  }
643
- function Ns(e, t, s) {
643
+ function Ss(e, t, s) {
644
644
  const a = e.source.body;
645
645
  let r = t, o = s, i = !1;
646
646
  if (o === 45 && (o = a.charCodeAt(++r)), o === 48) {
647
- if (o = a.charCodeAt(++r), K(o))
648
- throw O(
647
+ if (o = a.charCodeAt(++r), Z(o))
648
+ throw R(
649
649
  e.source,
650
650
  r,
651
- `Invalid number, unexpected digit after 0: ${B(
651
+ `Invalid number, unexpected digit after 0: ${V(
652
652
  e,
653
653
  r
654
654
  )}.`
655
655
  );
656
656
  } else
657
- r = ve(e, r, o), o = a.charCodeAt(r);
658
- if (o === 46 && (i = !0, o = a.charCodeAt(++r), r = ve(e, r, o), o = a.charCodeAt(r)), (o === 69 || o === 101) && (i = !0, o = a.charCodeAt(++r), (o === 43 || o === 45) && (o = a.charCodeAt(++r)), r = ve(e, r, o), o = a.charCodeAt(r)), o === 46 || kt(o))
659
- throw O(
657
+ r = fe(e, r, o), o = a.charCodeAt(r);
658
+ if (o === 46 && (i = !0, o = a.charCodeAt(++r), r = fe(e, r, o), o = a.charCodeAt(r)), (o === 69 || o === 101) && (i = !0, o = a.charCodeAt(++r), (o === 43 || o === 45) && (o = a.charCodeAt(++r)), r = fe(e, r, o), o = a.charCodeAt(r)), o === 46 || At(o))
659
+ throw R(
660
660
  e.source,
661
661
  r,
662
- `Invalid number, expected digit but got: ${B(
662
+ `Invalid number, expected digit but got: ${V(
663
663
  e,
664
664
  r
665
665
  )}.`
666
666
  );
667
- return C(
667
+ return S(
668
668
  e,
669
669
  i ? h.FLOAT : h.INT,
670
670
  t,
@@ -672,70 +672,70 @@ function Ns(e, t, s) {
672
672
  a.slice(t, r)
673
673
  );
674
674
  }
675
- function ve(e, t, s) {
676
- if (!K(s))
677
- throw O(
675
+ function fe(e, t, s) {
676
+ if (!Z(s))
677
+ throw R(
678
678
  e.source,
679
679
  t,
680
- `Invalid number, expected digit but got: ${B(
680
+ `Invalid number, expected digit but got: ${V(
681
681
  e,
682
682
  t
683
683
  )}.`
684
684
  );
685
685
  const a = e.source.body;
686
686
  let r = t + 1;
687
- for (; K(a.charCodeAt(r)); )
687
+ for (; Z(a.charCodeAt(r)); )
688
688
  ++r;
689
689
  return r;
690
690
  }
691
- function ws(e, t) {
691
+ function Ts(e, t) {
692
692
  const s = e.source.body, a = s.length;
693
693
  let r = t + 1, o = r, i = "";
694
694
  for (; r < a; ) {
695
695
  const c = s.charCodeAt(r);
696
696
  if (c === 34)
697
- return i += s.slice(o, r), C(e, h.STRING, t, r + 1, i);
697
+ return i += s.slice(o, r), S(e, h.STRING, t, r + 1, i);
698
698
  if (c === 92) {
699
699
  i += s.slice(o, r);
700
- const l = s.charCodeAt(r + 1) === 117 ? s.charCodeAt(r + 2) === 123 ? Cs(e, r) : Ss(e, r) : Ts(e, r);
700
+ const l = s.charCodeAt(r + 1) === 117 ? s.charCodeAt(r + 2) === 123 ? As(e, r) : Os(e, r) : Rs(e, r);
701
701
  i += l.value, r += l.size, o = r;
702
702
  continue;
703
703
  }
704
704
  if (c === 10 || c === 13)
705
705
  break;
706
- if (J(c))
706
+ if (z(c))
707
707
  ++r;
708
- else if (me(s, r))
708
+ else if (le(s, r))
709
709
  r += 2;
710
710
  else
711
- throw O(
711
+ throw R(
712
712
  e.source,
713
713
  r,
714
- `Invalid character within String: ${B(
714
+ `Invalid character within String: ${V(
715
715
  e,
716
716
  r
717
717
  )}.`
718
718
  );
719
719
  }
720
- throw O(e.source, r, "Unterminated string.");
720
+ throw R(e.source, r, "Unterminated string.");
721
721
  }
722
- function Cs(e, t) {
722
+ function As(e, t) {
723
723
  const s = e.source.body;
724
724
  let a = 0, r = 3;
725
725
  for (; r < 12; ) {
726
726
  const o = s.charCodeAt(t + r++);
727
727
  if (o === 125) {
728
- if (r < 5 || !J(a))
728
+ if (r < 5 || !z(a))
729
729
  break;
730
730
  return {
731
731
  value: String.fromCodePoint(a),
732
732
  size: r
733
733
  };
734
734
  }
735
- if (a = a << 4 | W(o), a < 0)
735
+ if (a = a << 4 | U(o), a < 0)
736
736
  break;
737
737
  }
738
- throw O(
738
+ throw R(
739
739
  e.source,
740
740
  t,
741
741
  `Invalid Unicode escape sequence: "${s.slice(
@@ -744,34 +744,34 @@ function Cs(e, t) {
744
744
  )}".`
745
745
  );
746
746
  }
747
- function Ss(e, t) {
748
- const s = e.source.body, a = dt(s, t + 2);
749
- if (J(a))
747
+ function Os(e, t) {
748
+ const s = e.source.body, a = lt(s, t + 2);
749
+ if (z(a))
750
750
  return {
751
751
  value: String.fromCodePoint(a),
752
752
  size: 6
753
753
  };
754
- if (Dt(a) && s.charCodeAt(t + 6) === 92 && s.charCodeAt(t + 7) === 117) {
755
- const r = dt(s, t + 8);
756
- if (qt(r))
754
+ if (Ot(a) && s.charCodeAt(t + 6) === 92 && s.charCodeAt(t + 7) === 117) {
755
+ const r = lt(s, t + 8);
756
+ if (Rt(r))
757
757
  return {
758
758
  value: String.fromCodePoint(a, r),
759
759
  size: 12
760
760
  };
761
761
  }
762
- throw O(
762
+ throw R(
763
763
  e.source,
764
764
  t,
765
765
  `Invalid Unicode escape sequence: "${s.slice(t, t + 6)}".`
766
766
  );
767
767
  }
768
- function dt(e, t) {
769
- return W(e.charCodeAt(t)) << 12 | W(e.charCodeAt(t + 1)) << 8 | W(e.charCodeAt(t + 2)) << 4 | W(e.charCodeAt(t + 3));
768
+ function lt(e, t) {
769
+ return U(e.charCodeAt(t)) << 12 | U(e.charCodeAt(t + 1)) << 8 | U(e.charCodeAt(t + 2)) << 4 | U(e.charCodeAt(t + 3));
770
770
  }
771
- function W(e) {
771
+ function U(e) {
772
772
  return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
773
773
  }
774
- function Ts(e, t) {
774
+ function Rs(e, t) {
775
775
  const s = e.source.body;
776
776
  switch (s.charCodeAt(t + 1)) {
777
777
  case 34:
@@ -816,7 +816,7 @@ function Ts(e, t) {
816
816
  size: 2
817
817
  };
818
818
  }
819
- throw O(
819
+ throw R(
820
820
  e.source,
821
821
  t,
822
822
  `Invalid character escape sequence: "${s.slice(
@@ -825,60 +825,60 @@ function Ts(e, t) {
825
825
  )}".`
826
826
  );
827
827
  }
828
- function As(e, t) {
828
+ function $s(e, t) {
829
829
  const s = e.source.body, a = s.length;
830
830
  let r = e.lineStart, o = t + 3, i = o, c = "";
831
831
  const l = [];
832
832
  for (; o < a; ) {
833
- const u = s.charCodeAt(o);
834
- if (u === 34 && s.charCodeAt(o + 1) === 34 && s.charCodeAt(o + 2) === 34) {
833
+ const m = s.charCodeAt(o);
834
+ if (m === 34 && s.charCodeAt(o + 1) === 34 && s.charCodeAt(o + 2) === 34) {
835
835
  c += s.slice(i, o), l.push(c);
836
- const p = C(
836
+ const u = S(
837
837
  e,
838
838
  h.BLOCK_STRING,
839
839
  t,
840
840
  o + 3,
841
841
  // Return a string of the lines joined with U+000A.
842
- fs(l).join(`
842
+ ys(l).join(`
843
843
  `)
844
844
  );
845
- return e.line += l.length - 1, e.lineStart = r, p;
845
+ return e.line += l.length - 1, e.lineStart = r, u;
846
846
  }
847
- if (u === 92 && s.charCodeAt(o + 1) === 34 && s.charCodeAt(o + 2) === 34 && s.charCodeAt(o + 3) === 34) {
847
+ if (m === 92 && s.charCodeAt(o + 1) === 34 && s.charCodeAt(o + 2) === 34 && s.charCodeAt(o + 3) === 34) {
848
848
  c += s.slice(i, o), i = o + 1, o += 4;
849
849
  continue;
850
850
  }
851
- if (u === 10 || u === 13) {
852
- c += s.slice(i, o), l.push(c), u === 13 && s.charCodeAt(o + 1) === 10 ? o += 2 : ++o, c = "", i = o, r = o;
851
+ if (m === 10 || m === 13) {
852
+ c += s.slice(i, o), l.push(c), m === 13 && s.charCodeAt(o + 1) === 10 ? o += 2 : ++o, c = "", i = o, r = o;
853
853
  continue;
854
854
  }
855
- if (J(u))
855
+ if (z(m))
856
856
  ++o;
857
- else if (me(s, o))
857
+ else if (le(s, o))
858
858
  o += 2;
859
859
  else
860
- throw O(
860
+ throw R(
861
861
  e.source,
862
862
  o,
863
- `Invalid character within String: ${B(
863
+ `Invalid character within String: ${V(
864
864
  e,
865
865
  o
866
866
  )}.`
867
867
  );
868
868
  }
869
- throw O(e.source, o, "Unterminated string.");
869
+ throw R(e.source, o, "Unterminated string.");
870
870
  }
871
- function Os(e, t) {
871
+ function Ls(e, t) {
872
872
  const s = e.source.body, a = s.length;
873
873
  let r = t + 1;
874
874
  for (; r < a; ) {
875
875
  const o = s.charCodeAt(r);
876
- if (hs(o))
876
+ if (gs(o))
877
877
  ++r;
878
878
  else
879
879
  break;
880
880
  }
881
- return C(
881
+ return S(
882
882
  e,
883
883
  h.NAME,
884
884
  t,
@@ -886,11 +886,11 @@ function Os(e, t) {
886
886
  s.slice(t, r)
887
887
  );
888
888
  }
889
- const Ps = 10, Vt = 2;
890
- function Ft(e) {
891
- return pe(e, []);
889
+ const Ps = 10, $t = 2;
890
+ function Lt(e) {
891
+ return ce(e, []);
892
892
  }
893
- function pe(e, t) {
893
+ function ce(e, t) {
894
894
  switch (typeof e) {
895
895
  case "string":
896
896
  return JSON.stringify(e);
@@ -908,34 +908,34 @@ function Es(e, t) {
908
908
  if (t.includes(e))
909
909
  return "[Circular]";
910
910
  const s = [...t, e];
911
- if ($s(e)) {
911
+ if (Is(e)) {
912
912
  const a = e.toJSON();
913
913
  if (a !== e)
914
- return typeof a == "string" ? a : pe(a, s);
914
+ return typeof a == "string" ? a : ce(a, s);
915
915
  } else if (Array.isArray(e))
916
- return Ls(e, s);
917
- return Rs(e, s);
916
+ return Ds(e, s);
917
+ return ks(e, s);
918
918
  }
919
- function $s(e) {
919
+ function Is(e) {
920
920
  return typeof e.toJSON == "function";
921
921
  }
922
- function Rs(e, t) {
922
+ function ks(e, t) {
923
923
  const s = Object.entries(e);
924
- return s.length === 0 ? "{}" : t.length > Vt ? "[" + Is(e) + "]" : "{ " + s.map(
925
- ([r, o]) => r + ": " + pe(o, t)
924
+ return s.length === 0 ? "{}" : t.length > $t ? "[" + Bs(e) + "]" : "{ " + s.map(
925
+ ([r, o]) => r + ": " + ce(o, t)
926
926
  ).join(", ") + " }";
927
927
  }
928
- function Ls(e, t) {
928
+ function Ds(e, t) {
929
929
  if (e.length === 0)
930
930
  return "[]";
931
- if (t.length > Vt)
931
+ if (t.length > $t)
932
932
  return "[Array]";
933
933
  const s = Math.min(Ps, e.length), a = e.length - s, r = [];
934
934
  for (let o = 0; o < s; ++o)
935
- r.push(pe(e[o], t));
935
+ r.push(ce(e[o], t));
936
936
  return a === 1 ? r.push("... 1 more item") : a > 1 && r.push(`... ${a} more items`), "[" + r.join(", ") + "]";
937
937
  }
938
- function Is(e) {
938
+ function Bs(e) {
939
939
  const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
940
940
  if (t === "Object" && typeof e.constructor == "function") {
941
941
  const s = e.constructor.name;
@@ -944,11 +944,11 @@ function Is(e) {
944
944
  }
945
945
  return t;
946
946
  }
947
- const ks = globalThis.process && // eslint-disable-next-line no-undef
948
- process.env.NODE_ENV === "production", Ds = (
947
+ const Fs = globalThis.process && // eslint-disable-next-line no-undef
948
+ process.env.NODE_ENV === "production", Vs = (
949
949
  /* c8 ignore next 6 */
950
950
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
951
- ks ? function(t, s) {
951
+ Fs ? function(t, s) {
952
952
  return t instanceof s;
953
953
  } : function(t, s) {
954
954
  if (t instanceof s)
@@ -960,7 +960,7 @@ process.env.NODE_ENV === "production", Ds = (
960
960
  Symbol.toStringTag in t ? t[Symbol.toStringTag] : (a = t.constructor) === null || a === void 0 ? void 0 : a.name
961
961
  );
962
962
  if (r === o) {
963
- const i = Ft(t);
963
+ const i = Lt(t);
964
964
  throw new Error(`Cannot use ${r} "${i}" from another module or realm.
965
965
 
966
966
  Ensure that there is only one instance of "graphql" in the node_modules
@@ -978,15 +978,15 @@ spurious results.`);
978
978
  return !1;
979
979
  }
980
980
  );
981
- class Bt {
981
+ class Pt {
982
982
  constructor(t, s = "GraphQL request", a = {
983
983
  line: 1,
984
984
  column: 1
985
985
  }) {
986
- typeof t == "string" || ye(!1, `Body must be a string. Received: ${Ft(t)}.`), this.body = t, this.name = s, this.locationOffset = a, this.locationOffset.line > 0 || ye(
986
+ typeof t == "string" || he(!1, `Body must be a string. Received: ${Lt(t)}.`), this.body = t, this.name = s, this.locationOffset = a, this.locationOffset.line > 0 || he(
987
987
  !1,
988
988
  "line in locationOffset is 1-indexed and must be positive."
989
- ), this.locationOffset.column > 0 || ye(
989
+ ), this.locationOffset.column > 0 || he(
990
990
  !1,
991
991
  "column in locationOffset is 1-indexed and must be positive."
992
992
  );
@@ -996,36 +996,36 @@ class Bt {
996
996
  }
997
997
  }
998
998
  function qs(e) {
999
- return Ds(e, Bt);
999
+ return Vs(e, Pt);
1000
1000
  }
1001
- function Vs(e) {
1002
- const t = qs(e) ? e : new Bt(e), s = t.body, a = new ys(t);
1001
+ function zs(e) {
1002
+ const t = qs(e) ? e : new Pt(e), s = t.body, a = new js(t);
1003
1003
  let r = "", o = !1;
1004
1004
  for (; a.advance().kind !== h.EOF; ) {
1005
- const i = a.token, c = i.kind, l = !vs(i.kind);
1005
+ const i = a.token, c = i.kind, l = !Ns(i.kind);
1006
1006
  o && (l || i.kind === h.SPREAD) && (r += " ");
1007
- const u = s.slice(i.start, i.end);
1008
- c === h.BLOCK_STRING ? r += gs(i.value, {
1007
+ const m = s.slice(i.start, i.end);
1008
+ c === h.BLOCK_STRING ? r += bs(i.value, {
1009
1009
  minimize: !0
1010
- }) : r += u, o = l;
1010
+ }) : r += m, o = l;
1011
1011
  }
1012
1012
  return r;
1013
1013
  }
1014
- const zt = Ct(
1014
+ const Et = vt(
1015
1015
  void 0
1016
- ), va = ({
1016
+ ), Ta = ({
1017
1017
  children: e,
1018
1018
  client: t
1019
- }) => /* @__PURE__ */ n.jsx(zt.Provider, { value: t, children: e }), _t = (e, t, ...[s]) => ({
1019
+ }) => /* @__PURE__ */ n.jsx(Et.Provider, { value: t, children: e }), It = (e, t, ...[s]) => ({
1020
1020
  queryFn: () => e.fetch(t, s),
1021
- queryKey: [Vs(t.toString()), s]
1022
- }), Fs = (e, ...[t]) => {
1023
- const s = Rn(zt);
1021
+ queryKey: [zs(t.toString()), s]
1022
+ }), _s = (e, ...[t]) => {
1023
+ const s = Pn(Et);
1024
1024
  if (s === void 0)
1025
1025
  throw new Error("useGraphQL must be used within a GraphQLProvider");
1026
- return _t(s, e, ...t === void 0 ? [] : [t]);
1026
+ return It(s, e, ...t === void 0 ? [] : [t]);
1027
1027
  };
1028
- class z extends String {
1028
+ class q extends String {
1029
1029
  __apiType;
1030
1030
  value;
1031
1031
  __meta__;
@@ -1036,7 +1036,7 @@ class z extends String {
1036
1036
  return this.value;
1037
1037
  }
1038
1038
  }
1039
- const Bs = new z(
1039
+ const Us = new q(
1040
1040
  `
1041
1041
  fragment OperationsFragment on OperationItem {
1042
1042
  slug
@@ -1104,7 +1104,7 @@ const Bs = new z(
1104
1104
  }
1105
1105
  `,
1106
1106
  { fragmentName: "OperationsFragment" }
1107
- ), zs = new z(`
1107
+ ), Ms = new q(`
1108
1108
  query ServersQuery($input: JSON!, $type: SchemaType!) {
1109
1109
  schema(input: $input, type: $type) {
1110
1110
  url
@@ -1113,13 +1113,13 @@ const Bs = new z(
1113
1113
  }
1114
1114
  }
1115
1115
  }
1116
- `), _s = new z(`
1116
+ `), Gs = new q(`
1117
1117
  query SchemaWarmup($input: JSON!, $type: SchemaType!) {
1118
1118
  schema(input: $input, type: $type) {
1119
1119
  openapi
1120
1120
  }
1121
1121
  }
1122
- `), Ms = new z(`
1122
+ `), Hs = new q(`
1123
1123
  query OperationsForTag($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
1124
1124
  schema(input: $input, type: $type) {
1125
1125
  servers {
@@ -1211,7 +1211,7 @@ const Bs = new z(
1211
1211
  schema
1212
1212
  }
1213
1213
  }
1214
- }`), Us = new z(`
1214
+ }`), Qs = new q(`
1215
1215
  query GetSchemas($input: JSON!, $type: SchemaType!) {
1216
1216
  schema(input: $input, type: $type) {
1217
1217
  title
@@ -1226,7 +1226,7 @@ const Bs = new z(
1226
1226
  }
1227
1227
  }
1228
1228
  }
1229
- `), Gs = new z(`
1229
+ `), Js = new q(`
1230
1230
  query getServerQuery($input: JSON!, $type: SchemaType!) {
1231
1231
  schema(input: $input, type: $type) {
1232
1232
  url
@@ -1235,7 +1235,7 @@ const Bs = new z(
1235
1235
  }
1236
1236
  }
1237
1237
  }
1238
- `), Hs = new z(`
1238
+ `), Ws = new q(`
1239
1239
  query GetSidebarOperations($input: JSON!, $type: SchemaType!) {
1240
1240
  schema(input: $input, type: $type) {
1241
1241
  tags {
@@ -1257,132 +1257,65 @@ const Bs = new z(
1257
1257
  }
1258
1258
  }
1259
1259
  }
1260
- `), Qs = {
1261
- "\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": zs,
1262
- "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": Bs,
1263
- "\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n": _s,
1264
- "\n query OperationsForTag(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n next {\n name\n slug\n }\n prev {\n name\n slug\n }\n }\n }\n }\n": Ms,
1265
- "\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n": Us,
1266
- "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": Gs,
1267
- "\n query GetSidebarOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n": Hs
1260
+ `), Xs = {
1261
+ "\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": Ms,
1262
+ "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": Us,
1263
+ "\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n": Gs,
1264
+ "\n query OperationsForTag(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n next {\n name\n slug\n }\n prev {\n name\n slug\n }\n }\n }\n }\n": Hs,
1265
+ "\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n": Qs,
1266
+ "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": Js,
1267
+ "\n query GetSidebarOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n": Ws
1268
1268
  };
1269
- function Js(e) {
1270
- return Qs[e] ?? {};
1269
+ function Zs(e) {
1270
+ return Xs[e] ?? {};
1271
1271
  }
1272
- const Ws = At(
1273
- "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",
1274
- {
1275
- variants: {
1276
- variant: {
1277
- default: "bg-background text-foreground",
1278
- destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
1279
- }
1280
- },
1281
- defaultVariants: {
1282
- variant: "default"
1283
- }
1284
- }
1285
- ), Ae = b.forwardRef(({ className: e, variant: t, ...s }, a) => /* @__PURE__ */ n.jsx(
1286
- "div",
1287
- {
1288
- ref: a,
1289
- role: "alert",
1290
- className: g(Ws({ variant: t }), e),
1291
- ...s
1292
- }
1293
- ));
1294
- Ae.displayName = "Alert";
1295
- const Oe = b.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1296
- "h5",
1297
- {
1298
- ref: s,
1299
- className: g("mb-1 font-medium leading-none tracking-tight", e),
1300
- ...t
1301
- }
1302
- ));
1303
- Oe.displayName = "AlertTitle";
1304
- const Pe = b.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1305
- "div",
1306
- {
1307
- ref: s,
1308
- className: g("text-sm [&_p]:leading-relaxed", e),
1309
- ...t
1310
- }
1311
- ));
1312
- Pe.displayName = "AlertDescription";
1313
- const Xs = ({
1314
- path: e,
1315
- renderParam: t
1316
- }) => {
1317
- let s = 0;
1318
- return e.split("/").map((a, r, o) => {
1319
- const i = Array.from(a.matchAll(/{([^}]+)}/g)), c = [];
1320
- let l = 0;
1321
- return i.forEach((u) => {
1322
- const [p, v] = u;
1323
- if (!v) return;
1324
- const f = u.index;
1325
- f > l && c.push(
1326
- /* @__PURE__ */ n.jsx(q, { children: a.slice(l, f) }, `text-${l}-${f}`)
1327
- ), c.push(
1328
- /* @__PURE__ */ n.jsx(q, { children: t({ name: v, originalValue: p, index: s++ }) }, `param-${v}`)
1329
- ), l = f + p.length;
1330
- }), l < a.length && c.push(
1331
- /* @__PURE__ */ n.jsx(q, { children: a.slice(l) }, `text-${l}-${a.length}`)
1332
- ), // eslint-disable-next-line react/no-array-index-key
1333
- /* @__PURE__ */ n.jsxs(q, { children: [
1334
- c,
1335
- r < o.length - 1 && "/",
1336
- /* @__PURE__ */ n.jsx("wbr", {})
1337
- ] }, `${a}-${r}`);
1338
- });
1339
- }, Ee = w.Root, $e = w.Value, ie = b.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
1340
- w.Trigger,
1272
+ const kt = C.Root, Dt = C.Value, Ie = N.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
1273
+ C.Trigger,
1341
1274
  {
1342
1275
  ref: a,
1343
- className: g(
1276
+ className: v(
1344
1277
  "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
1345
1278
  e
1346
1279
  ),
1347
1280
  ...s,
1348
1281
  children: [
1349
1282
  /* @__PURE__ */ n.jsx("span", { className: "truncate", children: t }),
1350
- /* @__PURE__ */ n.jsx(w.Icon, { asChild: !0, children: /* @__PURE__ */ n.jsx(vt, { className: "shrink-0 h-4 w-4 opacity-50" }) })
1283
+ /* @__PURE__ */ n.jsx(C.Icon, { asChild: !0, children: /* @__PURE__ */ n.jsx(xt, { className: "shrink-0 h-4 w-4 opacity-50" }) })
1351
1284
  ]
1352
1285
  }
1353
1286
  ));
1354
- ie.displayName = w.Trigger.displayName;
1355
- const Mt = b.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1356
- w.ScrollUpButton,
1287
+ Ie.displayName = C.Trigger.displayName;
1288
+ const Bt = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1289
+ C.ScrollUpButton,
1357
1290
  {
1358
1291
  ref: s,
1359
- className: g(
1292
+ className: v(
1360
1293
  "flex cursor-default items-center justify-center py-1",
1361
1294
  e
1362
1295
  ),
1363
1296
  ...t,
1364
- children: /* @__PURE__ */ n.jsx(hn, { className: "h-4 w-4" })
1297
+ children: /* @__PURE__ */ n.jsx(pn, { className: "h-4 w-4" })
1365
1298
  }
1366
1299
  ));
1367
- Mt.displayName = w.ScrollUpButton.displayName;
1368
- const Ut = b.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1369
- w.ScrollDownButton,
1300
+ Bt.displayName = C.ScrollUpButton.displayName;
1301
+ const Ft = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1302
+ C.ScrollDownButton,
1370
1303
  {
1371
1304
  ref: s,
1372
- className: g(
1305
+ className: v(
1373
1306
  "flex cursor-default items-center justify-center py-1",
1374
1307
  e
1375
1308
  ),
1376
1309
  ...t,
1377
- children: /* @__PURE__ */ n.jsx(vt, { className: "h-4 w-4" })
1310
+ children: /* @__PURE__ */ n.jsx(xt, { className: "h-4 w-4" })
1378
1311
  }
1379
1312
  ));
1380
- Ut.displayName = w.ScrollDownButton.displayName;
1381
- const le = b.forwardRef(({ className: e, children: t, position: s = "popper", ...a }, r) => /* @__PURE__ */ n.jsx(w.Portal, { children: /* @__PURE__ */ n.jsxs(
1382
- w.Content,
1313
+ Ft.displayName = C.ScrollDownButton.displayName;
1314
+ const ke = N.forwardRef(({ className: e, children: t, position: s = "popper", ...a }, r) => /* @__PURE__ */ n.jsx(C.Portal, { children: /* @__PURE__ */ n.jsxs(
1315
+ C.Content,
1383
1316
  {
1384
1317
  ref: r,
1385
- className: g(
1318
+ className: v(
1386
1319
  "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1387
1320
  s === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
1388
1321
  e
@@ -1390,88 +1323,100 @@ const le = b.forwardRef(({ className: e, children: t, position: s = "popper", ..
1390
1323
  position: s,
1391
1324
  ...a,
1392
1325
  children: [
1393
- /* @__PURE__ */ n.jsx(Mt, {}),
1326
+ /* @__PURE__ */ n.jsx(Bt, {}),
1394
1327
  /* @__PURE__ */ n.jsx(
1395
- w.Viewport,
1328
+ C.Viewport,
1396
1329
  {
1397
- className: g(
1330
+ className: v(
1398
1331
  s === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
1399
1332
  "divide-y"
1400
1333
  ),
1401
1334
  children: t
1402
1335
  }
1403
1336
  ),
1404
- /* @__PURE__ */ n.jsx(Ut, {})
1337
+ /* @__PURE__ */ n.jsx(Ft, {})
1405
1338
  ]
1406
1339
  }
1407
1340
  ) }));
1408
- le.displayName = w.Content.displayName;
1409
- const Zs = b.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1410
- w.Label,
1341
+ ke.displayName = C.Content.displayName;
1342
+ const Ys = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1343
+ C.Label,
1411
1344
  {
1412
1345
  ref: s,
1413
- className: g("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
1346
+ className: v("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
1414
1347
  ...t
1415
1348
  }
1416
1349
  ));
1417
- Zs.displayName = w.Label.displayName;
1418
- const G = b.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
1419
- w.Item,
1350
+ Ys.displayName = C.Label.displayName;
1351
+ const G = N.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
1352
+ C.Item,
1420
1353
  {
1421
1354
  ref: a,
1422
- className: g(
1355
+ className: v(
1423
1356
  "relative flex w-full cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1424
1357
  e
1425
1358
  ),
1426
1359
  ...s,
1427
1360
  children: [
1428
- /* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(w.ItemIndicator, { children: /* @__PURE__ */ n.jsx(bt, { className: "h-4 w-4" }) }) }),
1429
- /* @__PURE__ */ n.jsx(w.ItemText, { children: t })
1361
+ /* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(C.ItemIndicator, { children: /* @__PURE__ */ n.jsx(gt, { className: "h-4 w-4" }) }) }),
1362
+ /* @__PURE__ */ n.jsx(C.ItemText, { children: t })
1430
1363
  ]
1431
1364
  }
1432
1365
  ));
1433
- G.displayName = w.Item.displayName;
1434
- const Ys = b.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1435
- w.Separator,
1366
+ G.displayName = C.Item.displayName;
1367
+ const Ks = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1368
+ C.Separator,
1436
1369
  {
1437
1370
  ref: s,
1438
- className: g("-mx-1 my-1 h-px bg-muted", e),
1371
+ className: v("-mx-1 my-1 h-px bg-muted", e),
1439
1372
  ...t
1440
1373
  }
1441
1374
  ));
1442
- Ys.displayName = w.Separator.displayName;
1443
- const Gt = b.forwardRef(
1444
- ({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1445
- "textarea",
1446
- {
1447
- className: g(
1448
- "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1449
- e
1450
- ),
1451
- ref: s,
1452
- ...t
1453
- }
1454
- )
1455
- );
1456
- Gt.displayName = "Textarea";
1457
- const be = (e) => Math.abs(
1375
+ Ks.displayName = C.Separator.displayName;
1376
+ const er = ({
1377
+ path: e,
1378
+ renderParam: t
1379
+ }) => {
1380
+ let s = 0;
1381
+ return e.split("/").map((a, r, o) => {
1382
+ const i = Array.from(a.matchAll(/{([^}]+)}/g)), c = [];
1383
+ let l = 0;
1384
+ return i.forEach((m) => {
1385
+ const [u, g] = m;
1386
+ if (!g) return;
1387
+ const f = m.index;
1388
+ f > l && c.push(
1389
+ /* @__PURE__ */ n.jsx(D, { children: a.slice(l, f) }, `text-${l}-${f}`)
1390
+ ), c.push(
1391
+ /* @__PURE__ */ n.jsx(D, { children: t({ name: g, originalValue: u, index: s++ }) }, `param-${g}`)
1392
+ ), l = f + u.length;
1393
+ }), l < a.length && c.push(
1394
+ /* @__PURE__ */ n.jsx(D, { children: a.slice(l) }, `text-${l}-${a.length}`)
1395
+ ), // eslint-disable-next-line react/no-array-index-key
1396
+ /* @__PURE__ */ n.jsxs(D, { children: [
1397
+ c,
1398
+ r < o.length - 1 && "/",
1399
+ /* @__PURE__ */ n.jsx("wbr", {})
1400
+ ] }, `${a}-${r}`);
1401
+ });
1402
+ }, xe = (e) => Math.abs(
1458
1403
  isNaN(parseInt(e)) ? e.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(e)) ? 0 : parseInt(e)
1459
- ), je = (e) => e.length > 1 ? parseInt(e.split("").reduce((t, s) => `${be(t) + be(s)}`)) : be(e), ut = (e, t = {}) => {
1460
- const s = (3 * je(e) + 2 * je(e) + je(e)) % 360, { saturation: a = 75, lightness: r = 60 } = t;
1404
+ ), ge = (e) => e.length > 1 ? parseInt(e.split("").reduce((t, s) => `${xe(t) + xe(s)}`)) : xe(e), ct = (e, t = {}) => {
1405
+ const s = (3 * ge(e) + 2 * ge(e) + ge(e)) % 360, { saturation: a = 75, lightness: r = 60 } = t;
1461
1406
  return `${s}deg ${a}% ${r}%`;
1462
- }, Ne = "data-linked-param", Ks = (e) => {
1463
- const { resolvedTheme: t } = Un();
1407
+ }, ye = "data-linked-param", tr = (e) => {
1408
+ const { resolvedTheme: t } = Mn();
1464
1409
  return {
1465
- text: ut(
1410
+ text: ct(
1466
1411
  e,
1467
1412
  t === "light" ? { saturation: 95, lightness: 38 } : {}
1468
1413
  ),
1469
- background: ut(
1414
+ background: ct(
1470
1415
  e,
1471
1416
  t === "light" ? { saturation: 85, lightness: 40 } : {}
1472
1417
  )
1473
1418
  };
1474
- }, Ht = ({
1419
+ }, Vt = ({
1475
1420
  name: e,
1476
1421
  className: t,
1477
1422
  slug: s,
@@ -1479,26 +1424,26 @@ const be = (e) => Math.abs(
1479
1424
  children: r,
1480
1425
  onClick: o
1481
1426
  }) => {
1482
- const i = Q(null), c = s?.replace(/[{}]/g, ""), l = e.replace(/[{}]/g, ""), { text: u, background: p } = Ks(l), v = `hsl(${u} / 100%)`, f = `hsl(${p} / 10%)`, x = `hsl(${p} / 50%)`;
1483
- return ae(() => {
1427
+ const i = W(null), c = s?.replace(/[{}]/g, ""), l = e.replace(/[{}]/g, ""), { text: m, background: u } = tr(l), g = `hsl(${m} / 100%)`, f = `hsl(${u} / 10%)`, x = `hsl(${u} / 50%)`;
1428
+ return M(() => {
1484
1429
  if (!c || !i.current) return;
1485
- const m = () => {
1486
- document.querySelectorAll(`[${Ne}="${c}"]`).forEach((N) => {
1487
- N instanceof HTMLElement && (N.dataset.active = "true");
1430
+ const p = () => {
1431
+ document.querySelectorAll(`[${ye}="${c}"]`).forEach((b) => {
1432
+ b instanceof HTMLElement && (b.dataset.active = "true");
1488
1433
  });
1489
1434
  }, y = () => {
1490
- document.querySelectorAll(`[${Ne}="${c}"]`).forEach((N) => {
1491
- N instanceof HTMLElement && (N.dataset.active = "false");
1435
+ document.querySelectorAll(`[${ye}="${c}"]`).forEach((b) => {
1436
+ b instanceof HTMLElement && (b.dataset.active = "false");
1492
1437
  });
1493
- }, S = i.current;
1494
- return S.addEventListener("mouseenter", m), S.addEventListener("mouseleave", y), () => {
1495
- S.removeEventListener("mouseenter", m), S.removeEventListener("mouseleave", y);
1438
+ }, j = i.current;
1439
+ return j.addEventListener("mouseenter", p), j.addEventListener("mouseleave", y), () => {
1440
+ j.removeEventListener("mouseenter", p), j.removeEventListener("mouseleave", y);
1496
1441
  };
1497
1442
  }, [c]), /* @__PURE__ */ n.jsx(
1498
1443
  "span",
1499
1444
  {
1500
- [Ne]: c,
1501
- className: g(
1445
+ [ye]: c,
1446
+ className: v(
1502
1447
  // This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
1503
1448
  "relative transition-all duration-100 rounded-lg",
1504
1449
  "border border-(--border-color) p-0.5 text-(--param-color) bg-(--background-color)",
@@ -1510,43 +1455,46 @@ const be = (e) => Math.abs(
1510
1455
  ref: i,
1511
1456
  onClick: o,
1512
1457
  style: {
1513
- "--param-color": v,
1458
+ "--param-color": g,
1514
1459
  "--border-color": x,
1515
1460
  "--background-color": f
1516
1461
  },
1517
1462
  children: r ?? e
1518
1463
  }
1519
1464
  );
1520
- }, er = Nt()(
1521
- wt(
1465
+ }, nr = Ce()(
1466
+ Se(
1522
1467
  (e) => ({
1523
1468
  selectedServer: void 0,
1524
1469
  setSelectedServer: (t) => e({ selectedServer: t })
1525
1470
  }),
1526
1471
  { name: "zudoku-selected-server" }
1527
1472
  )
1528
- ), tr = (e) => {
1529
- const { selectedServer: t, setSelectedServer: s } = er();
1530
- return { selectedServer: Ln(
1473
+ ), sr = (e) => {
1474
+ const { selectedServer: t, setSelectedServer: s } = nr();
1475
+ return { selectedServer: En(
1531
1476
  () => t && e.some((r) => r.url === t) ? t : e.at(0)?.url ?? "",
1532
1477
  [t, e]
1533
1478
  ), setSelectedServer: s };
1534
- }, nr = (e, t, s) => {
1535
- const a = t.replace(/(:\w+|\{\w+})/g, (o) => {
1536
- const i = o.replace(/[:{}]/g, "");
1537
- return s.pathParams.find((l) => l.name === i)?.value ?? o;
1538
- }), r = new URL(
1539
- a.replace(/^\//, ""),
1540
- e.endsWith("/") ? e : `${e}/`
1541
- );
1542
- return s.queryParams.filter((o) => o.active).forEach((o) => {
1543
- r.searchParams.set(o.name, o.value);
1544
- }), r;
1545
- }, Qt = j.Root, Jt = j.Trigger, sr = j.Group, rr = b.forwardRef(({ className: e, inset: t, children: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
1546
- j.SubTrigger,
1479
+ }, qt = N.forwardRef(
1480
+ ({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1481
+ "textarea",
1482
+ {
1483
+ className: v(
1484
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1485
+ e
1486
+ ),
1487
+ ref: s,
1488
+ ...t
1489
+ }
1490
+ )
1491
+ );
1492
+ qt.displayName = "Textarea";
1493
+ const rr = w.Root, ar = w.Trigger, or = w.Group, ir = N.forwardRef(({ className: e, inset: t, children: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
1494
+ w.SubTrigger,
1547
1495
  {
1548
1496
  ref: r,
1549
- className: g(
1497
+ className: v(
1550
1498
  "flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent",
1551
1499
  t && "pl-8",
1552
1500
  e
@@ -1554,29 +1502,29 @@ const be = (e) => Math.abs(
1554
1502
  ...a,
1555
1503
  children: [
1556
1504
  s,
1557
- /* @__PURE__ */ n.jsx(X, { className: "ml-auto h-4 w-4" })
1505
+ /* @__PURE__ */ n.jsx(Q, { className: "ml-auto h-4 w-4" })
1558
1506
  ]
1559
1507
  }
1560
1508
  ));
1561
- rr.displayName = j.SubTrigger.displayName;
1562
- const ar = b.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1563
- j.SubContent,
1509
+ ir.displayName = w.SubTrigger.displayName;
1510
+ const lr = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1511
+ w.SubContent,
1564
1512
  {
1565
1513
  ref: s,
1566
- className: g(
1514
+ className: v(
1567
1515
  "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1568
1516
  e
1569
1517
  ),
1570
1518
  ...t
1571
1519
  }
1572
1520
  ));
1573
- ar.displayName = j.SubContent.displayName;
1574
- const ze = b.forwardRef(({ className: e, sideOffset: t = 4, ...s }, a) => /* @__PURE__ */ n.jsx(j.Portal, { children: /* @__PURE__ */ n.jsx(
1575
- j.Content,
1521
+ lr.displayName = w.SubContent.displayName;
1522
+ const zt = N.forwardRef(({ className: e, sideOffset: t = 4, ...s }, a) => /* @__PURE__ */ n.jsx(w.Portal, { children: /* @__PURE__ */ n.jsx(
1523
+ w.Content,
1576
1524
  {
1577
1525
  ref: a,
1578
1526
  sideOffset: t,
1579
- className: g(
1527
+ className: v(
1580
1528
  "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
1581
1529
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1582
1530
  e
@@ -1584,12 +1532,12 @@ const ze = b.forwardRef(({ className: e, sideOffset: t = 4, ...s }, a) => /* @__
1584
1532
  ...s
1585
1533
  }
1586
1534
  ) }));
1587
- ze.displayName = j.Content.displayName;
1588
- const _e = b.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
1589
- j.Item,
1535
+ zt.displayName = w.Content.displayName;
1536
+ const _t = N.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
1537
+ w.Item,
1590
1538
  {
1591
1539
  ref: a,
1592
- className: g(
1540
+ className: v(
1593
1541
  "relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1594
1542
  t && "pl-8",
1595
1543
  e
@@ -1597,45 +1545,45 @@ const _e = b.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */
1597
1545
  ...s
1598
1546
  }
1599
1547
  ));
1600
- _e.displayName = j.Item.displayName;
1601
- const or = b.forwardRef(({ className: e, children: t, checked: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
1602
- j.CheckboxItem,
1548
+ _t.displayName = w.Item.displayName;
1549
+ const cr = N.forwardRef(({ className: e, children: t, checked: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
1550
+ w.CheckboxItem,
1603
1551
  {
1604
1552
  ref: r,
1605
- className: g(
1553
+ className: v(
1606
1554
  "relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1607
1555
  e
1608
1556
  ),
1609
1557
  checked: s,
1610
1558
  ...a,
1611
1559
  children: [
1612
- /* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(j.ItemIndicator, { children: /* @__PURE__ */ n.jsx(jt, { className: "h-4 w-4" }) }) }),
1560
+ /* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(w.ItemIndicator, { children: /* @__PURE__ */ n.jsx(hn, { className: "h-4 w-4" }) }) }),
1613
1561
  t
1614
1562
  ]
1615
1563
  }
1616
1564
  ));
1617
- or.displayName = j.CheckboxItem.displayName;
1618
- const ir = b.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
1619
- j.RadioItem,
1565
+ cr.displayName = w.CheckboxItem.displayName;
1566
+ const dr = N.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
1567
+ w.RadioItem,
1620
1568
  {
1621
1569
  ref: a,
1622
- className: g(
1570
+ className: v(
1623
1571
  "relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1624
1572
  e
1625
1573
  ),
1626
1574
  ...s,
1627
1575
  children: [
1628
- /* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(j.ItemIndicator, { children: /* @__PURE__ */ n.jsx(fn, { className: "h-4 w-4 fill-current" }) }) }),
1576
+ /* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(w.ItemIndicator, { children: /* @__PURE__ */ n.jsx(fn, { className: "h-4 w-4 fill-current" }) }) }),
1629
1577
  t
1630
1578
  ]
1631
1579
  }
1632
1580
  ));
1633
- ir.displayName = j.RadioItem.displayName;
1634
- const Wt = b.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
1635
- j.Label,
1581
+ dr.displayName = w.RadioItem.displayName;
1582
+ const Ut = N.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
1583
+ w.Label,
1636
1584
  {
1637
1585
  ref: a,
1638
- className: g(
1586
+ className: v(
1639
1587
  "px-2 py-1.5 text-sm font-semibold",
1640
1588
  t && "pl-8",
1641
1589
  e
@@ -1643,26 +1591,29 @@ const Wt = b.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */
1643
1591
  ...s
1644
1592
  }
1645
1593
  ));
1646
- Wt.displayName = j.Label.displayName;
1647
- const Xt = b.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1648
- j.Separator,
1594
+ Ut.displayName = w.Label.displayName;
1595
+ const Mt = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1596
+ w.Separator,
1649
1597
  {
1650
1598
  ref: s,
1651
- className: g("-mx-1 my-1 h-px bg-muted", e),
1599
+ className: v("-mx-1 my-1 h-px bg-muted", e),
1652
1600
  ...t
1653
1601
  }
1654
1602
  ));
1655
- Xt.displayName = j.Separator.displayName;
1656
- const lr = ({
1603
+ Mt.displayName = w.Separator.displayName;
1604
+ const ur = ({
1657
1605
  examples: e,
1658
1606
  onSelect: t
1659
- }) => /* @__PURE__ */ n.jsxs(Qt, { children: [
1660
- /* @__PURE__ */ n.jsx(Jt, { asChild: !0, children: /* @__PURE__ */ n.jsx(F, { variant: "outline", children: "Use Example" }) }),
1661
- /* @__PURE__ */ n.jsx(ze, { className: "max-w-72", children: e.map((s) => /* @__PURE__ */ n.jsxs("div", { children: [
1662
- /* @__PURE__ */ n.jsx(Wt, { children: s.mediaType }),
1663
- /* @__PURE__ */ n.jsx(Xt, {}),
1664
- /* @__PURE__ */ n.jsx(sr, { children: s.examples?.map((a) => /* @__PURE__ */ n.jsx(
1665
- _e,
1607
+ }) => /* @__PURE__ */ n.jsxs(rr, { children: [
1608
+ /* @__PURE__ */ n.jsx(ar, { asChild: !0, children: /* @__PURE__ */ n.jsxs(F, { variant: "ghost", size: "sm", children: [
1609
+ "Use Example ",
1610
+ /* @__PURE__ */ n.jsx(xn, { className: "w-4 h-4" })
1611
+ ] }) }),
1612
+ /* @__PURE__ */ n.jsx(zt, { className: "max-w-72", children: e.map((s) => /* @__PURE__ */ n.jsxs("div", { children: [
1613
+ /* @__PURE__ */ n.jsx(Ut, { children: s.mediaType }),
1614
+ /* @__PURE__ */ n.jsx(Mt, {}),
1615
+ /* @__PURE__ */ n.jsx(or, { children: s.examples?.map((a) => /* @__PURE__ */ n.jsx(
1616
+ _t,
1666
1617
  {
1667
1618
  onSelect: () => t(a, s.mediaType),
1668
1619
  children: /* @__PURE__ */ n.jsx(
@@ -1677,41 +1628,107 @@ const lr = ({
1677
1628
  a.name
1678
1629
  )) })
1679
1630
  ] }, s.mediaType)) })
1680
- ] }), he = b.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1681
- Ce.Root,
1631
+ ] }), mr = ({ examples: e }) => {
1632
+ const { register: t, setValue: s, watch: a } = Re(), r = a("headers");
1633
+ return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 ", children: [
1634
+ /* @__PURE__ */ n.jsxs("div", { className: "flex justify-between gap-2", children: [
1635
+ /* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Body" }),
1636
+ /* @__PURE__ */ n.jsx("div", { className: "flex flex-col gap-2", children: e && e.length > 0 && /* @__PURE__ */ n.jsx(
1637
+ ur,
1638
+ {
1639
+ examples: e,
1640
+ onSelect: (o, i) => {
1641
+ s("body", JSON.stringify(o.value, null, 2)), s("headers", [
1642
+ ...r.filter((c) => c.name !== "Content-Type"),
1643
+ {
1644
+ name: "Content-Type",
1645
+ value: i,
1646
+ active: !0
1647
+ }
1648
+ ]);
1649
+ }
1650
+ }
1651
+ ) })
1652
+ ] }),
1653
+ /* @__PURE__ */ n.jsx(
1654
+ qt,
1655
+ {
1656
+ ...t("body"),
1657
+ className: v(
1658
+ "border w-full rounded-lg bg-muted/40 p-2 h-64 font-mono text-[13px]"
1659
+ )
1660
+ }
1661
+ )
1662
+ ] });
1663
+ }, pr = (e, t, s) => {
1664
+ const a = t.replace(/(:\w+|\{\w+})/g, (o) => {
1665
+ const i = o.replace(/[:{}]/g, "");
1666
+ return s.pathParams.find((l) => l.name === i)?.value ?? o;
1667
+ }), r = new URL(
1668
+ a.replace(/^\//, ""),
1669
+ e.endsWith("/") ? e : `${e}/`
1670
+ );
1671
+ return s.queryParams.filter((o) => o.active).forEach((o) => {
1672
+ r.searchParams.set(o.name, o.value);
1673
+ }), r;
1674
+ };
1675
+ function hr(e) {
1676
+ return /^(application\/octet-stream|image\/|audio\/|video\/|font\/|application\/pdf|application\/zip|application\/x-protobuf|application\/x-binary)/i.test(
1677
+ e
1678
+ );
1679
+ }
1680
+ const fr = (e, t) => {
1681
+ const s = e.find(
1682
+ ([a]) => a.toLowerCase() === "content-disposition"
1683
+ )?.[1];
1684
+ if (s) {
1685
+ const a = s.match(
1686
+ /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/
1687
+ );
1688
+ if (a && a[1])
1689
+ return a[1].replace(/['"]/g, "");
1690
+ }
1691
+ try {
1692
+ const r = new URL(t).pathname.split("/").pop() || "download";
1693
+ return r.includes(".") ? r : "download";
1694
+ } catch {
1695
+ return "download";
1696
+ }
1697
+ }, de = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1698
+ be.Root,
1682
1699
  {
1683
1700
  ref: s,
1684
- className: g(
1701
+ className: v(
1685
1702
  "peer h-4 w-4 shrink-0 rounded-[min(6px,var(--radius)-4px)] ring-offset-background focus-visible:outline-hidden 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",
1686
1703
  "border border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary",
1687
1704
  e
1688
1705
  ),
1689
1706
  ...t,
1690
1707
  children: /* @__PURE__ */ n.jsx(
1691
- Ce.Indicator,
1708
+ be.Indicator,
1692
1709
  {
1693
- className: g("flex items-center justify-center text-current"),
1694
- children: /* @__PURE__ */ n.jsx(bt, { className: "h-4 w-4" })
1710
+ className: v("flex items-center justify-center text-current"),
1711
+ children: /* @__PURE__ */ n.jsx(gt, { className: "h-4 w-4" })
1695
1712
  }
1696
1713
  )
1697
1714
  }
1698
1715
  ));
1699
- he.displayName = Ce.Root.displayName;
1700
- const cr = oe.Root, Zt = b.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...a }, r) => /* @__PURE__ */ n.jsx(oe.Portal, { children: /* @__PURE__ */ n.jsx(
1701
- oe.Content,
1716
+ de.displayName = be.Root.displayName;
1717
+ const xr = re.Root, Gt = N.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...a }, r) => /* @__PURE__ */ n.jsx(re.Portal, { children: /* @__PURE__ */ n.jsx(
1718
+ re.Content,
1702
1719
  {
1703
1720
  ref: r,
1704
1721
  align: t,
1705
1722
  sideOffset: s,
1706
- className: g(
1723
+ className: v(
1707
1724
  "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1708
1725
  e
1709
1726
  ),
1710
1727
  ...a
1711
1728
  }
1712
1729
  ) }));
1713
- Zt.displayName = oe.Content.displayName;
1714
- const dr = ({
1730
+ Gt.displayName = re.Content.displayName;
1731
+ const gr = ({
1715
1732
  value: e,
1716
1733
  options: t,
1717
1734
  onChange: s,
@@ -1720,8 +1737,8 @@ const dr = ({
1720
1737
  onEnterPress: o,
1721
1738
  ref: i
1722
1739
  }) => {
1723
- const [c, l] = L(!1), [u, p] = L(!1), v = Hn((x) => x.filtered.count), f = Q(null);
1724
- return /* @__PURE__ */ n.jsxs(cr, { open: c, children: [
1740
+ const [c, l] = E(!1), [m, u] = E(!1), g = Hn((x) => x.filtered.count), f = W(null);
1741
+ return /* @__PURE__ */ n.jsxs(xr, { open: c, children: [
1725
1742
  /* @__PURE__ */ n.jsx(Gn, { children: /* @__PURE__ */ n.jsx(
1726
1743
  Jn,
1727
1744
  {
@@ -1730,10 +1747,10 @@ const dr = ({
1730
1747
  },
1731
1748
  value: e,
1732
1749
  placeholder: r,
1733
- className: g("h-9 bg-transparent", a),
1750
+ className: v("h-9 bg-transparent", a),
1734
1751
  onFocus: () => l(!0),
1735
1752
  onBlur: () => {
1736
- u || l(!1);
1753
+ m || l(!1);
1737
1754
  },
1738
1755
  onKeyDown: (x) => {
1739
1756
  x.key === "Enter" && (l(!1), f.current?.blur(), o?.(x));
@@ -1742,13 +1759,13 @@ const dr = ({
1742
1759
  }
1743
1760
  ) }),
1744
1761
  /* @__PURE__ */ n.jsx(
1745
- Zt,
1762
+ Gt,
1746
1763
  {
1747
- onMouseEnter: () => p(!0),
1748
- onMouseLeave: () => p(!1),
1764
+ onMouseEnter: () => u(!0),
1765
+ onMouseLeave: () => u(!1),
1749
1766
  onOpenAutoFocus: (x) => x.preventDefault(),
1750
- className: g("p-0 w-(--radix-popover-trigger-width)", {
1751
- "border-0": v === 0
1767
+ className: v("p-0 w-(--radix-popover-trigger-width)", {
1768
+ "border-0": g === 0
1752
1769
  }),
1753
1770
  align: "start",
1754
1771
  side: "bottom",
@@ -1762,8 +1779,8 @@ const dr = ({
1762
1779
  Xn,
1763
1780
  {
1764
1781
  value: x,
1765
- onSelect: (m) => {
1766
- s(m), l(!1);
1782
+ onSelect: (p) => {
1783
+ s(p), l(!1);
1767
1784
  },
1768
1785
  className: "cursor-pointer",
1769
1786
  children: x
@@ -1773,23 +1790,23 @@ const dr = ({
1773
1790
  }
1774
1791
  )
1775
1792
  ] });
1776
- }, ce = ({ shouldFilter: e, ...t }) => /* @__PURE__ */ n.jsx(Qn, { className: "bg-transparent", shouldFilter: e, children: /* @__PURE__ */ n.jsx(dr, { ...t }) }), Me = (e, t) => {
1777
- const s = b.forwardRef(({ className: a, asChild: r, ...o }, i) => {
1793
+ }, ae = ({ shouldFilter: e, ...t }) => /* @__PURE__ */ n.jsx(Qn, { className: "bg-transparent", shouldFilter: e, children: /* @__PURE__ */ n.jsx(gr, { ...t }) }), De = (e, t) => {
1794
+ const s = N.forwardRef(({ className: a, asChild: r, ...o }, i) => {
1778
1795
  const c = r ? Yn : e;
1779
- return b.createElement(c, {
1796
+ return N.createElement(c, {
1780
1797
  ...o,
1781
1798
  ref: i,
1782
- className: typeof t == "function" ? t({ className: a }) : g(t, a)
1799
+ className: typeof t == "function" ? t({ className: a }) : v(t, a)
1783
1800
  });
1784
1801
  });
1785
1802
  return s.displayName = `VariantComponent(${e})`, s;
1786
- }, Ue = Me(
1803
+ }, Be = De(
1787
1804
  "div",
1788
- "grid grid-cols-[2fr_3fr] gap-2 items-center"
1789
- ), Ge = Me(
1805
+ "grid grid-cols-[2fr_3fr] items-center"
1806
+ ), Fe = De(
1790
1807
  "div",
1791
- "group hover:bg-accent px-3 grid col-span-full grid-cols-subgrid"
1792
- ), ur = Object.freeze([
1808
+ "group hover:bg-accent px-4 py-1 grid col-span-full grid-cols-subgrid"
1809
+ ), yr = Object.freeze([
1793
1810
  "Accept",
1794
1811
  "Accept-Encoding",
1795
1812
  "Accept-Language",
@@ -1816,66 +1833,80 @@ const dr = ({
1816
1833
  "Set-Cookie",
1817
1834
  "User-Agent",
1818
1835
  "X-Requested-With"
1819
- ]), mr = ({
1836
+ ]), vr = ({
1820
1837
  control: e,
1821
1838
  headers: t
1822
1839
  }) => {
1823
- const { fields: s, append: a, remove: r } = De({
1840
+ const { fields: s, append: a, remove: r } = $e({
1824
1841
  control: e,
1825
1842
  name: "headers"
1826
- }), { setValue: o, watch: i } = qe(), c = Q([]), l = Q([]), u = i("headers"), p = In(() => {
1843
+ }), { setValue: o, watch: i } = Re(), c = W([]), l = W([]), m = i("headers"), u = In(() => {
1827
1844
  a({ name: "", value: "", active: !1 });
1828
1845
  }, [a]);
1829
- ae(() => {
1830
- u.length === 0 && p();
1831
- }, [u, p]);
1832
- const v = (m) => {
1833
- c.current[m]?.focus();
1834
- }, f = (m) => {
1835
- p(), requestAnimationFrame(() => l.current[m + 1]?.focus());
1836
- }, x = t.filter((m) => !u.some((y) => y.name === m.name)).map(({ name: m }) => m);
1837
- return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2", children: [
1838
- /* @__PURE__ */ n.jsx(ue, { className: "overflow-hidden", children: /* @__PURE__ */ n.jsx(Ue, { children: s.map((m, y) => {
1839
- const S = t.find(
1840
- (N) => N.name === i(`headers.${y}.name`)
1846
+ M(() => {
1847
+ m.length === 0 && u();
1848
+ }, [m, u]);
1849
+ const g = (p) => {
1850
+ c.current[p]?.focus();
1851
+ }, f = (p) => {
1852
+ u(), requestAnimationFrame(() => l.current[p + 1]?.focus());
1853
+ }, x = t.filter((p) => !m.some((y) => y.name === p.name)).map(({ name: p }) => p);
1854
+ return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 ", children: [
1855
+ /* @__PURE__ */ n.jsxs("div", { className: "flex items-center justify-between", children: [
1856
+ /* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Headers" }),
1857
+ /* @__PURE__ */ n.jsx(
1858
+ J,
1859
+ {
1860
+ className: "",
1861
+ onClick: u,
1862
+ type: "button",
1863
+ size: "sm",
1864
+ variant: "ghost",
1865
+ children: "+ Add header"
1866
+ }
1867
+ )
1868
+ ] }),
1869
+ /* @__PURE__ */ n.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ n.jsx(ie, { className: "overflow-hidden rounded-lg", children: /* @__PURE__ */ n.jsx(Be, { children: s.map((p, y) => {
1870
+ const j = t.find(
1871
+ (b) => b.name === i(`headers.${y}.name`)
1841
1872
  );
1842
- return /* @__PURE__ */ n.jsxs(Ge, { children: [
1873
+ return /* @__PURE__ */ n.jsxs(Fe, { children: [
1843
1874
  /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 ", children: [
1844
1875
  /* @__PURE__ */ n.jsx(
1845
- V,
1876
+ B,
1846
1877
  {
1847
1878
  control: e,
1848
1879
  name: `headers.${y}.active`,
1849
- render: ({ field: N }) => /* @__PURE__ */ n.jsx(
1850
- he,
1880
+ render: ({ field: b }) => /* @__PURE__ */ n.jsx(
1881
+ de,
1851
1882
  {
1852
1883
  id: `headers.${y}.active`,
1853
- checked: N.value,
1854
- onCheckedChange: (I) => {
1855
- N.onChange(I);
1884
+ checked: b.value,
1885
+ onCheckedChange: (T) => {
1886
+ b.onChange(T);
1856
1887
  }
1857
1888
  }
1858
1889
  )
1859
1890
  }
1860
1891
  ),
1861
1892
  /* @__PURE__ */ n.jsx(
1862
- V,
1893
+ B,
1863
1894
  {
1864
1895
  control: e,
1865
1896
  name: `headers.${y}.name`,
1866
- render: ({ field: N }) => /* @__PURE__ */ n.jsx(
1867
- ce,
1897
+ render: ({ field: b }) => /* @__PURE__ */ n.jsx(
1898
+ ae,
1868
1899
  {
1869
- ...N,
1900
+ ...b,
1870
1901
  placeholder: "Name",
1871
1902
  className: "border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono",
1872
- options: [...x, ...ur],
1873
- onEnterPress: () => v(y),
1874
- onChange: (I) => {
1875
- N.onChange(I), o(`headers.${y}.active`, !0);
1903
+ options: [...x, ...yr],
1904
+ onEnterPress: () => g(y),
1905
+ onChange: (T) => {
1906
+ b.onChange(T), o(`headers.${y}.active`, !0);
1876
1907
  },
1877
- ref: (I) => {
1878
- l.current[y] = I;
1908
+ ref: (T) => {
1909
+ l.current[y] = T;
1879
1910
  }
1880
1911
  }
1881
1912
  )
@@ -1884,32 +1915,32 @@ const dr = ({
1884
1915
  ] }),
1885
1916
  /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
1886
1917
  /* @__PURE__ */ n.jsx(
1887
- V,
1918
+ B,
1888
1919
  {
1889
1920
  control: e,
1890
1921
  name: `headers.${y}.value`,
1891
- render: ({ field: N }) => S?.enum && S.enum.length > 0 ? /* @__PURE__ */ n.jsx(
1892
- ce,
1922
+ render: ({ field: b }) => j?.enum && j.enum.length > 0 ? /* @__PURE__ */ n.jsx(
1923
+ ae,
1893
1924
  {
1894
1925
  shouldFilter: !1,
1895
- value: N.value,
1896
- options: S.enum ?? [],
1897
- onChange: (k) => {
1898
- N.onChange(k), o(`headers.${y}.active`, !0);
1926
+ value: b.value,
1927
+ options: j.enum ?? [],
1928
+ onChange: (A) => {
1929
+ b.onChange(A), o(`headers.${y}.active`, !0);
1899
1930
  },
1900
1931
  className: "border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
1901
1932
  }
1902
1933
  ) : /* @__PURE__ */ n.jsx(
1903
- Ve,
1934
+ Le,
1904
1935
  {
1905
1936
  placeholder: "Value",
1906
1937
  className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0",
1907
- ...N,
1908
- ref: (k) => {
1909
- c.current[y] = k;
1938
+ ...b,
1939
+ ref: (A) => {
1940
+ c.current[y] = A;
1910
1941
  },
1911
- onKeyDown: (k) => {
1912
- k.key === "Enter" && k.currentTarget.value.trim() && f(y);
1942
+ onKeyDown: (A) => {
1943
+ A.key === "Enter" && A.currentTarget.value.trim() && f(y);
1913
1944
  },
1914
1945
  autoComplete: "off"
1915
1946
  }
@@ -1917,69 +1948,59 @@ const dr = ({
1917
1948
  }
1918
1949
  ),
1919
1950
  /* @__PURE__ */ n.jsx(
1920
- Z,
1951
+ J,
1921
1952
  {
1922
1953
  size: "icon",
1923
1954
  variant: "ghost",
1924
1955
  className: "text-muted-foreground opacity-0 group-hover:opacity-100 rounded-full w-8 h-7",
1925
1956
  onClick: () => r(y),
1926
1957
  type: "button",
1927
- children: /* @__PURE__ */ n.jsx(xn, { size: 16 })
1958
+ children: /* @__PURE__ */ n.jsx(gn, { size: 16 })
1928
1959
  }
1929
1960
  )
1930
1961
  ] })
1931
- ] }, m.id);
1932
- }) }) }),
1933
- /* @__PURE__ */ n.jsx("div", { className: "text-end", children: /* @__PURE__ */ n.jsx(
1934
- Z,
1935
- {
1936
- className: "",
1937
- onClick: p,
1938
- type: "button",
1939
- variant: "secondary",
1940
- children: "Add header"
1941
- }
1942
- ) })
1962
+ ] }, p.id);
1963
+ }) }) }) })
1943
1964
  ] });
1944
- }, pr = At(
1965
+ }, br = Kn(
1945
1966
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1946
- ), de = b.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1947
- Et.Root,
1967
+ ), oe = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1968
+ Nt.Root,
1948
1969
  {
1949
1970
  ref: s,
1950
- className: g(pr(), e),
1971
+ className: v(br(), e),
1951
1972
  ...t
1952
1973
  }
1953
1974
  ));
1954
- de.displayName = Et.Root.displayName;
1955
- const Yt = b.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1956
- Y.Root,
1975
+ oe.displayName = Nt.Root.displayName;
1976
+ const Ht = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1977
+ X.Root,
1957
1978
  {
1958
- className: g("grid gap-2", e),
1979
+ className: v("grid gap-2", e),
1959
1980
  ...t,
1960
1981
  ref: s
1961
1982
  }
1962
1983
  ));
1963
- Yt.displayName = Y.Root.displayName;
1964
- const Re = b.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1965
- Y.Item,
1984
+ Ht.displayName = X.Root.displayName;
1985
+ const we = N.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1986
+ X.Item,
1966
1987
  {
1967
1988
  ref: s,
1968
- className: g(
1989
+ className: v(
1969
1990
  "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
1970
1991
  e
1971
1992
  ),
1972
1993
  ...t,
1973
- children: /* @__PURE__ */ n.jsx(Y.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ n.jsx(gn, { className: "h-2.5 w-2.5 fill-current text-current" }) })
1994
+ children: /* @__PURE__ */ n.jsx(X.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ n.jsx(yn, { className: "h-2.5 w-2.5 fill-current text-current" }) })
1974
1995
  }
1975
1996
  ));
1976
- Re.displayName = Y.Item.displayName;
1977
- const Kt = ({
1997
+ we.displayName = X.Item.displayName;
1998
+ const Qt = ({
1978
1999
  identities: e,
1979
2000
  setValue: t,
1980
2001
  value: s
1981
- }) => /* @__PURE__ */ n.jsx(ue, { className: "w-full overflow-hidden", children: /* @__PURE__ */ n.jsxs(
1982
- Yt,
2002
+ }) => /* @__PURE__ */ n.jsx(ie, { className: "w-full overflow-hidden rounded-lg", children: /* @__PURE__ */ n.jsxs(
2003
+ Ht,
1983
2004
  {
1984
2005
  onValueChange: (a) => t(a),
1985
2006
  value: s,
@@ -1987,45 +2008,45 @@ const Kt = ({
1987
2008
  className: "gap-0",
1988
2009
  disabled: e?.length === 0,
1989
2010
  children: [
1990
- /* @__PURE__ */ n.jsxs(de, { className: "h-12 border-b items-center flex gap-2 p-4 cursor-pointer hover:bg-accent", children: [
1991
- /* @__PURE__ */ n.jsx(Re, { value: H, id: "none" }),
2011
+ /* @__PURE__ */ n.jsxs(oe, { className: "h-10 border-b items-center flex gap-2 p-4 cursor-pointer hover:bg-accent", children: [
2012
+ /* @__PURE__ */ n.jsx(we, { value: H, id: "none" }),
1992
2013
  /* @__PURE__ */ n.jsx("span", { children: "None" })
1993
2014
  ] }),
1994
- e?.map((a) => /* @__PURE__ */ n.jsxs(
1995
- de,
2015
+ /* @__PURE__ */ n.jsx("div", { className: "divide-y", children: e?.map((a) => /* @__PURE__ */ n.jsxs(
2016
+ oe,
1996
2017
  {
1997
- className: "h-12 border-b items-center flex gap-2 p-4 cursor-pointer hover:bg-accent",
2018
+ className: "h-10 items-center flex gap-2 p-4 cursor-pointer hover:bg-accent",
1998
2019
  children: [
1999
- /* @__PURE__ */ n.jsx(Re, { value: a.id, id: a.id }),
2020
+ /* @__PURE__ */ n.jsx(we, { value: a.id, id: a.id }),
2000
2021
  /* @__PURE__ */ n.jsx("span", { children: a.label })
2001
2022
  ]
2002
2023
  },
2003
2024
  a.id
2004
- ))
2025
+ )) })
2005
2026
  ]
2006
2027
  }
2007
- ) }), hr = ({
2028
+ ) }), jr = ({
2008
2029
  onSubmit: e,
2009
2030
  identities: t,
2010
2031
  open: s,
2011
2032
  onOpenChange: a
2012
2033
  }) => {
2013
- const [r, o] = L(void 0), [i, c] = L(!1);
2014
- return /* @__PURE__ */ n.jsx(Le, { open: s, onOpenChange: a, children: /* @__PURE__ */ n.jsxs(Ie, { children: [
2015
- /* @__PURE__ */ n.jsx(ke, { children: "Select an auth identity" }),
2016
- /* @__PURE__ */ n.jsx(St, { children: "Please select an identity for this request." }),
2034
+ const [r, o] = E(void 0), [i, c] = E(!1);
2035
+ return /* @__PURE__ */ n.jsx(Te, { open: s, onOpenChange: a, children: /* @__PURE__ */ n.jsxs(Ae, { children: [
2036
+ /* @__PURE__ */ n.jsx(Oe, { children: "Select an auth identity" }),
2037
+ /* @__PURE__ */ n.jsx(bt, { children: "Please select an identity for this request." }),
2017
2038
  /* @__PURE__ */ n.jsx("div", { className: "max-h-80 overflow-auto", children: /* @__PURE__ */ n.jsx(
2018
- Kt,
2039
+ Qt,
2019
2040
  {
2020
2041
  identities: t,
2021
2042
  setValue: o,
2022
2043
  value: r
2023
2044
  }
2024
2045
  ) }),
2025
- /* @__PURE__ */ n.jsxs(Tt, { className: "flex flex-col gap-2", children: [
2046
+ /* @__PURE__ */ n.jsxs(jt, { className: "flex flex-col gap-2", children: [
2026
2047
  /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
2027
2048
  /* @__PURE__ */ n.jsx(
2028
- he,
2049
+ de,
2029
2050
  {
2030
2051
  id: "remember",
2031
2052
  checked: i,
@@ -2034,7 +2055,7 @@ const Kt = ({
2034
2055
  )
2035
2056
  }
2036
2057
  ),
2037
- /* @__PURE__ */ n.jsx(de, { htmlFor: "remember", children: "Remember my choice" })
2058
+ /* @__PURE__ */ n.jsx(oe, { htmlFor: "remember", children: "Remember my choice" })
2038
2059
  ] }),
2039
2060
  /* @__PURE__ */ n.jsx(
2040
2061
  F,
@@ -2045,24 +2066,24 @@ const Kt = ({
2045
2066
  )
2046
2067
  ] })
2047
2068
  ] }) });
2048
- }, fr = ({
2069
+ }, Nr = ({
2049
2070
  control: e,
2050
2071
  url: t
2051
2072
  }) => {
2052
- const { fields: s } = De({
2073
+ const { fields: s } = $e({
2053
2074
  control: e,
2054
2075
  name: "pathParams"
2055
2076
  }), a = [...s].sort(
2056
2077
  (r, o) => t.indexOf(`{${r.name}}`) - t.indexOf(`{${o.name}}`)
2057
2078
  );
2058
- return /* @__PURE__ */ n.jsx(ue, { className: "rounded-lg", children: /* @__PURE__ */ n.jsx(Ue, { children: a.map((r, o) => /* @__PURE__ */ n.jsxs(Ge, { children: [
2079
+ return /* @__PURE__ */ n.jsx(ie, { className: "rounded-lg overflow-hidden", children: /* @__PURE__ */ n.jsx(Be, { children: a.map((r, o) => /* @__PURE__ */ n.jsxs(Fe, { children: [
2059
2080
  /* @__PURE__ */ n.jsx(
2060
- V,
2081
+ B,
2061
2082
  {
2062
2083
  control: e,
2063
2084
  name: `pathParams.${o}.name`,
2064
2085
  render: () => /* @__PURE__ */ n.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ n.jsx(
2065
- Ht,
2086
+ Vt,
2066
2087
  {
2067
2088
  slug: r.name,
2068
2089
  name: r.name,
@@ -2072,12 +2093,12 @@ const Kt = ({
2072
2093
  }
2073
2094
  ),
2074
2095
  /* @__PURE__ */ n.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ n.jsx(
2075
- V,
2096
+ B,
2076
2097
  {
2077
2098
  control: e,
2078
2099
  name: `pathParams.${o}.value`,
2079
2100
  render: ({ field: i }) => /* @__PURE__ */ n.jsx(
2080
- Ve,
2101
+ Le,
2081
2102
  {
2082
2103
  ...i,
2083
2104
  required: !0,
@@ -2088,30 +2109,30 @@ const Kt = ({
2088
2109
  }
2089
2110
  ) })
2090
2111
  ] }, r.id)) }) });
2091
- }, xr = Me(
2112
+ }, wr = De(
2092
2113
  "input",
2093
2114
  "px-2 bg-transparent h-6 font-mono text-xs m-2"
2094
- ), gr = ({
2115
+ ), Cr = ({
2095
2116
  control: e,
2096
2117
  queryParams: t
2097
2118
  }) => {
2098
- const { fields: s } = De({
2119
+ const { fields: s } = $e({
2099
2120
  control: e,
2100
2121
  name: "queryParams"
2101
- }), a = qe(), r = t.map((o) => !!o.isRequired);
2102
- return /* @__PURE__ */ n.jsx(ue, { className: "rounded-lg", children: /* @__PURE__ */ n.jsx("div", { className: "w-full ", children: /* @__PURE__ */ n.jsx(Ue, { children: s.map((o, i) => {
2122
+ }), a = Re(), r = t.map((o) => !!o.isRequired);
2123
+ return /* @__PURE__ */ n.jsx(ie, { className: "rounded-lg overflow-hidden", children: /* @__PURE__ */ n.jsx("div", { className: "w-full ", children: /* @__PURE__ */ n.jsx(Be, { children: s.map((o, i) => {
2103
2124
  const c = t.find(
2104
2125
  (l) => l.name === a.watch(`queryParams.${i}.name`)
2105
2126
  );
2106
- return /* @__PURE__ */ n.jsxs(Ge, { children: [
2127
+ return /* @__PURE__ */ n.jsxs(Fe, { children: [
2107
2128
  /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
2108
2129
  /* @__PURE__ */ n.jsx(
2109
- V,
2130
+ B,
2110
2131
  {
2111
2132
  control: e,
2112
2133
  name: `queryParams.${i}.active`,
2113
2134
  render: ({ field: l }) => /* @__PURE__ */ n.jsx(
2114
- he,
2135
+ de,
2115
2136
  {
2116
2137
  id: `queryParams.${i}.active`,
2117
2138
  className: "me-2",
@@ -2122,10 +2143,10 @@ const Kt = ({
2122
2143
  }
2123
2144
  ),
2124
2145
  /* @__PURE__ */ n.jsx(
2125
- V,
2146
+ B,
2126
2147
  {
2127
2148
  control: e,
2128
- render: ({ field: l }) => r[i] ? /* @__PURE__ */ n.jsx(xr, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
2149
+ render: ({ field: l }) => r[i] ? /* @__PURE__ */ n.jsx(wr, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
2129
2150
  "label",
2130
2151
  {
2131
2152
  className: "flex items-center cursor-pointer gap-1",
@@ -2137,12 +2158,12 @@ const Kt = ({
2137
2158
  ]
2138
2159
  }
2139
2160
  ) }) : /* @__PURE__ */ n.jsx(
2140
- ce,
2161
+ ae,
2141
2162
  {
2142
2163
  value: l.value,
2143
- options: t.map((u) => u.name),
2144
- onChange: (u) => {
2145
- l.onChange(u);
2164
+ options: t.map((m) => m.name),
2165
+ onChange: (m) => {
2166
+ l.onChange(m);
2146
2167
  },
2147
2168
  className: "border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
2148
2169
  }
@@ -2152,25 +2173,25 @@ const Kt = ({
2152
2173
  )
2153
2174
  ] }, o.id),
2154
2175
  /* @__PURE__ */ n.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ n.jsx(
2155
- V,
2176
+ B,
2156
2177
  {
2157
2178
  control: e,
2158
2179
  render: ({ field: l }) => c?.enum && c.enum.length > 0 ? /* @__PURE__ */ n.jsx(
2159
- ce,
2180
+ ae,
2160
2181
  {
2161
2182
  value: l.value,
2162
2183
  options: c.enum ?? [],
2163
- onChange: (p) => {
2164
- l.onChange(p), a.setValue(`queryParams.${i}.active`, !0);
2184
+ onChange: (u) => {
2185
+ l.onChange(u), a.setValue(`queryParams.${i}.active`, !0);
2165
2186
  },
2166
2187
  className: "border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
2167
2188
  }
2168
2189
  ) : /* @__PURE__ */ n.jsx(
2169
- Ve,
2190
+ Le,
2170
2191
  {
2171
2192
  ...l,
2172
- onChange: (p) => {
2173
- l.onChange(p.target.value), p.target.value.length > 0 && a.setValue(`queryParams.${i}.active`, !0);
2193
+ onChange: (u) => {
2194
+ l.onChange(u.target.value), u.target.value.length > 0 && a.setValue(`queryParams.${i}.active`, !0);
2174
2195
  },
2175
2196
  placeholder: "Enter value",
2176
2197
  className: "w-full border-0 shadow-none focus-visible:ring-0 text-xs font-mono"
@@ -2181,8 +2202,8 @@ const Kt = ({
2181
2202
  ) })
2182
2203
  ] }, o.id);
2183
2204
  }) }) }) });
2184
- }, yr = Nt()(
2185
- wt(
2205
+ }, Sr = Ce()(
2206
+ Se(
2186
2207
  (e, t) => ({
2187
2208
  rememberedIdentity: null,
2188
2209
  setRememberedIdentity: (s) => e({ rememberedIdentity: s }),
@@ -2192,25 +2213,25 @@ const Kt = ({
2192
2213
  }),
2193
2214
  {
2194
2215
  name: "identity-storage",
2195
- storage: Tn(() => sessionStorage)
2216
+ storage: yt(() => sessionStorage)
2196
2217
  }
2197
2218
  )
2198
- ), vr = ({
2219
+ ), Tr = ({
2199
2220
  open: e,
2200
2221
  setOpen: t,
2201
2222
  onSignUp: s,
2202
2223
  onLogin: a
2203
- }) => /* @__PURE__ */ n.jsx(Le, { open: e, onOpenChange: t, children: /* @__PURE__ */ n.jsxs(Ie, { children: [
2204
- /* @__PURE__ */ n.jsx(ke, { children: "Welcome to the Playground!" }),
2205
- /* @__PURE__ */ n.jsx(St, { children: "The Playground is a tool for developers to test and explore our APIs. To use the Playground, you need to login." }),
2206
- /* @__PURE__ */ n.jsxs(Tt, { className: "flex gap-2 sm:justify-between", children: [
2224
+ }) => /* @__PURE__ */ n.jsx(Te, { open: e, onOpenChange: t, children: /* @__PURE__ */ n.jsxs(Ae, { children: [
2225
+ /* @__PURE__ */ n.jsx(Oe, { children: "Welcome to the Playground!" }),
2226
+ /* @__PURE__ */ n.jsx(bt, { children: "The Playground is a tool for developers to test and explore our APIs. To use the Playground, you need to login." }),
2227
+ /* @__PURE__ */ n.jsxs(jt, { className: "flex gap-2 sm:justify-between", children: [
2207
2228
  /* @__PURE__ */ n.jsx(F, { type: "button", variant: "ghost", onClick: () => t(!1), children: "Skip" }),
2208
2229
  /* @__PURE__ */ n.jsxs("div", { className: "flex gap-2", children: [
2209
2230
  s && /* @__PURE__ */ n.jsx(F, { type: "button", variant: "outline", onClick: s, children: "Sign Up" }),
2210
2231
  a && /* @__PURE__ */ n.jsx(F, { type: "button", variant: "default", onClick: a, children: "Login" })
2211
2232
  ] })
2212
2233
  ] })
2213
- ] }) }), $ = {
2234
+ ] }) }), L = {
2214
2235
  green: "text-green-600",
2215
2236
  blue: "text-sky-600",
2216
2237
  yellow: "text-yellow-600",
@@ -2218,48 +2239,48 @@ const Kt = ({
2218
2239
  purple: "text-purple-600",
2219
2240
  indigo: "text-indigo-600",
2220
2241
  gray: "text-gray-600"
2221
- }, br = {
2222
- get: $.green,
2223
- post: $.blue,
2224
- put: $.yellow,
2225
- delete: $.red,
2226
- patch: $.purple,
2227
- options: $.indigo,
2228
- head: $.gray,
2229
- trace: $.gray
2230
- }, jr = (e) => br[e.toLocaleLowerCase()] ?? $.gray, Nr = ({
2242
+ }, Ar = {
2243
+ get: L.green,
2244
+ post: L.blue,
2245
+ put: L.yellow,
2246
+ delete: L.red,
2247
+ patch: L.purple,
2248
+ options: L.indigo,
2249
+ head: L.gray,
2250
+ trace: L.gray
2251
+ }, Or = (e) => Ar[e.toLocaleLowerCase()] ?? L.gray, Rr = ({
2231
2252
  method: e,
2232
2253
  url: t,
2233
2254
  headers: s,
2234
2255
  body: a
2235
2256
  }) => /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 font-mono text-xs", children: [
2236
2257
  /* @__PURE__ */ n.jsxs("div", { className: "gap-2 p-2 bg-muted rounded-md", children: [
2237
- /* @__PURE__ */ n.jsx("span", { className: g(jr(e), "font-semibold"), children: e }),
2258
+ /* @__PURE__ */ n.jsx("span", { className: v(Or(e), "font-semibold"), children: e }),
2238
2259
  " ",
2239
2260
  /* @__PURE__ */ n.jsx("span", { className: "break-all", children: t }),
2240
2261
  " ",
2241
2262
  /* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "HTTP/1.1" })
2242
2263
  ] }),
2243
2264
  /* @__PURE__ */ n.jsxs("div", { className: "mx-1.5 flex flex-col gap-3", children: [
2244
- /* @__PURE__ */ n.jsxs(rt, { defaultOpen: !0, children: [
2245
- /* @__PURE__ */ n.jsxs(at, { className: "flex items-center gap-2 hover:text-primary group", children: [
2246
- /* @__PURE__ */ n.jsx(X, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
2265
+ /* @__PURE__ */ n.jsxs(nt, { defaultOpen: !0, children: [
2266
+ /* @__PURE__ */ n.jsxs(st, { className: "flex items-center gap-2 hover:text-primary group", children: [
2267
+ /* @__PURE__ */ n.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
2247
2268
  /* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Headers" })
2248
2269
  ] }),
2249
- /* @__PURE__ */ n.jsx(ot, { children: /* @__PURE__ */ n.jsx("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 ps-1.5 pt-2", children: s.map(([r, o]) => /* @__PURE__ */ n.jsxs(q, { children: [
2270
+ /* @__PURE__ */ n.jsx(rt, { children: /* @__PURE__ */ n.jsx("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 ps-1.5 pt-2", children: s.map(([r, o]) => /* @__PURE__ */ n.jsxs(D, { children: [
2250
2271
  /* @__PURE__ */ n.jsx("div", { className: "text-primary", children: r }),
2251
2272
  /* @__PURE__ */ n.jsx("div", { className: "break-all", children: o })
2252
2273
  ] }, r)) }) })
2253
2274
  ] }),
2254
- /* @__PURE__ */ n.jsxs(rt, { defaultOpen: !0, children: [
2255
- /* @__PURE__ */ n.jsxs(at, { className: "flex items-center gap-2 hover:text-primary group", children: [
2256
- /* @__PURE__ */ n.jsx(X, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
2275
+ /* @__PURE__ */ n.jsxs(nt, { defaultOpen: !0, children: [
2276
+ /* @__PURE__ */ n.jsxs(st, { className: "flex items-center gap-2 hover:text-primary group", children: [
2277
+ /* @__PURE__ */ n.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
2257
2278
  /* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Body" })
2258
2279
  ] }),
2259
- /* @__PURE__ */ n.jsx(ot, { children: /* @__PURE__ */ n.jsx("div", { className: "ps-0 pt-2", children: /* @__PURE__ */ n.jsx(
2280
+ /* @__PURE__ */ n.jsx(rt, { children: /* @__PURE__ */ n.jsx("div", { className: "ps-0 pt-2", children: /* @__PURE__ */ n.jsx(
2260
2281
  "div",
2261
2282
  {
2262
- className: g(
2283
+ className: v(
2263
2284
  "whitespace-pre-wrap break-all bg-muted p-2 rounded-md",
2264
2285
  !a && "text-muted-foreground"
2265
2286
  ),
@@ -2268,29 +2289,36 @@ const Kt = ({
2268
2289
  ) }) })
2269
2290
  ] })
2270
2291
  ] })
2271
- ] }), mt = Fe.Root, pt = Fe.CollapsibleTrigger, ht = Fe.CollapsibleContent;
2272
- function He(e) {
2292
+ ] }), dt = Pe.Root, ut = Pe.CollapsibleTrigger, mt = Pe.CollapsibleContent, ve = (e = 0) => {
2293
+ if (e === 0)
2294
+ return "0 B";
2295
+ const t = Math.floor(Math.log(e) / Math.log(1e3));
2296
+ return `${(e / Math.pow(1e3, t)).toFixed(
2297
+ t ? 2 : 0
2298
+ )} ${t ? `${"kMGTPEZY"[t - 1]}B` : "B"}`;
2299
+ };
2300
+ function Ve(e) {
2273
2301
  if (e === null) return "null";
2274
2302
  if (Array.isArray(e)) {
2275
2303
  if (e.length === 0) return "any[]";
2276
2304
  const t = e[0];
2277
- return t === void 0 ? "any[]" : `${He(t)}[]`;
2305
+ return t === void 0 ? "any[]" : `${Ve(t)}[]`;
2278
2306
  }
2279
- return typeof e == "object" ? wr(e) : typeof e;
2307
+ return typeof e == "object" ? $r(e) : typeof e;
2280
2308
  }
2281
- function wr(e, t = "") {
2309
+ function $r(e, t = "") {
2282
2310
  const s = ["{"];
2283
2311
  for (const [a, r] of Object.entries(e)) {
2284
- const o = He(r);
2312
+ const o = Ve(r);
2285
2313
  s.push(` ${a}: ${o};`);
2286
2314
  }
2287
2315
  return s.push("}"), s.join(`
2288
2316
  `);
2289
2317
  }
2290
- function Cr(e) {
2291
- return { lines: [`type GeneratedType = ${He(e)};`] };
2318
+ function Lr(e) {
2319
+ return { lines: [`type GeneratedType = ${Ve(e)};`] };
2292
2320
  }
2293
- const Sr = {
2321
+ const Pr = {
2294
2322
  200: "OK",
2295
2323
  201: "Created",
2296
2324
  202: "Accepted",
@@ -2301,12 +2329,7 @@ const Sr = {
2301
2329
  404: "Not Found",
2302
2330
  405: "Method Not Allowed",
2303
2331
  500: "Internal Server Error"
2304
- }, ft = (e) => {
2305
- const t = Math.floor(Math.log(e) / Math.log(1e3));
2306
- return `${(e / Math.pow(1e3, t)).toFixed(
2307
- t ? 2 : 0
2308
- )} ${t ? `${"kMGTPEZY"[t - 1]}B` : "B"}`;
2309
- }, Tr = (e) => Object.entries({
2332
+ }, Er = (e) => Object.entries({
2310
2333
  "application/json": "json",
2311
2334
  "text/json": "json",
2312
2335
  "text/html": "html",
@@ -2316,16 +2339,16 @@ const Sr = {
2316
2339
  "application/xhtml+xml": "xhtml"
2317
2340
  }).find(
2318
2341
  ([s]) => e.includes(s)
2319
- )?.[1], Ar = (e) => {
2342
+ )?.[1], Ir = (e) => {
2320
2343
  const t = e.find(([s, a]) => s === "Content-Type")?.[1] || "";
2321
- return Tr(t);
2322
- }, Or = (e) => {
2344
+ return Er(t);
2345
+ }, kr = (e) => {
2323
2346
  try {
2324
2347
  return JSON.stringify(JSON.parse(e), null, 2);
2325
2348
  } catch {
2326
2349
  return null;
2327
2350
  }
2328
- }, Pr = (e) => {
2351
+ }, Dr = (e) => {
2329
2352
  const t = [
2330
2353
  "Content-Type",
2331
2354
  "Content-Length",
@@ -2339,73 +2362,100 @@ const Sr = {
2339
2362
  const r = t.indexOf(s.toLowerCase()), o = t.indexOf(a.toLowerCase());
2340
2363
  return r === o ? 0 : r === -1 ? 1 : o === -1 ? -1 : r - o;
2341
2364
  });
2342
- }, xt = 64e3, Er = ({
2365
+ }, pt = 64e3, Br = ({
2343
2366
  body: e = "",
2344
2367
  headers: t,
2345
2368
  status: s,
2346
2369
  time: a,
2347
2370
  size: r,
2348
- url: o
2371
+ url: o,
2372
+ isBinary: i = !1,
2373
+ fileName: c,
2374
+ blob: l
2349
2375
  }) => {
2350
- const i = Ar(t), c = Or(e), l = c || e, [u, p] = L(
2351
- c ? "formatted" : "raw"
2352
- ), v = An({
2353
- queryKey: ["types", l],
2354
- queryFn: async () => Cr(JSON.parse(l)),
2355
- enabled: u === "types"
2356
- }), f = Pr([...t]), x = r > xt;
2376
+ const m = Ir(t), u = kr(e), g = u || e, [f, x] = E(
2377
+ u ? "formatted" : "raw"
2378
+ ), p = An({
2379
+ queryKey: ["types", g],
2380
+ queryFn: async () => Lr(JSON.parse(g)),
2381
+ enabled: f === "types" && !i
2382
+ }), y = () => {
2383
+ if (l && c) {
2384
+ const T = URL.createObjectURL(l), A = document.createElement("a");
2385
+ A.href = T, A.download = c, document.body.appendChild(A), A.click(), document.body.removeChild(A), URL.revokeObjectURL(T);
2386
+ }
2387
+ }, j = Dr([...t]), b = r > pt;
2357
2388
  return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 h-full overflow-auto max-h-[calc(100vh-220px)] ", children: [
2358
- /* @__PURE__ */ n.jsxs(mt, { defaultOpen: !0, children: [
2359
- /* @__PURE__ */ n.jsxs(pt, { className: "flex items-center gap-2 hover:text-primary group", children: [
2360
- /* @__PURE__ */ n.jsx(X, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
2389
+ /* @__PURE__ */ n.jsxs(dt, { defaultOpen: !0, children: [
2390
+ /* @__PURE__ */ n.jsxs(ut, { className: "flex items-center gap-2 hover:text-primary group", children: [
2391
+ /* @__PURE__ */ n.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
2361
2392
  /* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Headers" })
2362
2393
  ] }),
2363
- /* @__PURE__ */ n.jsx(ht, { children: /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 ps-1.5 pt-2 font-mono text-xs", children: [
2364
- f.slice(0, 5).map(([m, y]) => /* @__PURE__ */ n.jsxs(q, { children: [
2365
- /* @__PURE__ */ n.jsx("div", { className: "text-primary whitespace-pre", children: m }),
2366
- /* @__PURE__ */ n.jsx("div", { className: "break-all", children: y })
2367
- ] }, m)),
2368
- f.length > 5 && /* @__PURE__ */ n.jsxs(mt, { className: "col-span-full grid-cols-subgrid grid", children: [
2369
- /* @__PURE__ */ n.jsxs(pt, { className: "col-span-2 text-xs text-muted-foreground hover:text-primary flex items-center gap-1 py-1", children: [
2370
- /* @__PURE__ */ n.jsx(X, { className: "h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
2394
+ /* @__PURE__ */ n.jsx(mt, { children: /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 ps-1.5 pt-2 font-mono text-xs", children: [
2395
+ j.slice(0, 5).map(([T, A]) => /* @__PURE__ */ n.jsxs(D, { children: [
2396
+ /* @__PURE__ */ n.jsx("div", { className: "text-primary whitespace-pre", children: T }),
2397
+ /* @__PURE__ */ n.jsx("div", { className: "break-all", children: A })
2398
+ ] }, T)),
2399
+ j.length > 5 && /* @__PURE__ */ n.jsxs(dt, { className: "col-span-full grid-cols-subgrid grid", children: [
2400
+ /* @__PURE__ */ n.jsxs(ut, { className: "col-span-2 text-xs text-muted-foreground hover:text-primary flex items-center gap-1 py-1", children: [
2401
+ /* @__PURE__ */ n.jsx(Q, { className: "h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
2371
2402
  "Show ",
2372
- f.length - 5,
2403
+ j.length - 5,
2373
2404
  " more headers"
2374
2405
  ] }),
2375
- /* @__PURE__ */ n.jsx(ht, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: f.slice(5).map(([m, y]) => /* @__PURE__ */ n.jsxs(q, { children: [
2376
- /* @__PURE__ */ n.jsx("div", { className: "text-primary whitespace-pre", children: m }),
2377
- /* @__PURE__ */ n.jsx("div", { className: "break-all", children: y })
2378
- ] }, m)) })
2406
+ /* @__PURE__ */ n.jsx(mt, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: j.slice(5).map(([T, A]) => /* @__PURE__ */ n.jsxs(D, { children: [
2407
+ /* @__PURE__ */ n.jsx("div", { className: "text-primary whitespace-pre", children: T }),
2408
+ /* @__PURE__ */ n.jsx("div", { className: "break-all", children: A })
2409
+ ] }, T)) })
2379
2410
  ] })
2380
2411
  ] }) })
2381
2412
  ] }),
2382
- /* @__PURE__ */ n.jsxs($t, { className: "shadow-none", children: [
2383
- x && /* @__PURE__ */ n.jsxs(Zn, { type: "info", className: "my-0 p-2", children: [
2413
+ /* @__PURE__ */ n.jsx(wt, { className: "shadow-none", children: i ? /* @__PURE__ */ n.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
2414
+ /* @__PURE__ */ n.jsx("div", { className: "text-lg font-semibold", children: "Binary Content" }),
2415
+ /* @__PURE__ */ n.jsx("div", { className: "text-sm text-muted-foreground", children: "This response contains binary data that cannot be displayed as text." }),
2416
+ /* @__PURE__ */ n.jsxs(
2417
+ F,
2418
+ {
2419
+ onClick: y,
2420
+ className: "flex items-center gap-2",
2421
+ disabled: !l,
2422
+ children: [
2423
+ /* @__PURE__ */ n.jsx(vn, { className: "h-4 w-4" }),
2424
+ "Download ",
2425
+ c || "file",
2426
+ " (",
2427
+ ve(r),
2428
+ ")"
2429
+ ]
2430
+ }
2431
+ )
2432
+ ] }) }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2433
+ b && /* @__PURE__ */ n.jsxs(Zn, { type: "info", className: "my-0 p-2", children: [
2384
2434
  "Code highlight is disabled for responses larger than",
2385
2435
  " ",
2386
- ft(xt)
2436
+ ve(pt)
2387
2437
  ] }),
2388
2438
  /* @__PURE__ */ n.jsx(
2389
- rs,
2439
+ is,
2390
2440
  {
2391
- language: u === "types" ? "typescript" : u === "raw" ? c ? "plain" : i : "json",
2441
+ language: f === "types" ? "typescript" : f === "raw" ? u ? "plain" : m : "json",
2392
2442
  showCopy: "always",
2393
- disabled: x,
2443
+ disabled: b,
2394
2444
  noBackground: !0,
2395
2445
  className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
2396
- code: (u === "raw" ? e : u === "types" ? v.data?.lines.join(`
2397
- `) : l) ?? ""
2446
+ code: (f === "raw" ? e : f === "types" ? p.data?.lines.join(`
2447
+ `) : g) ?? ""
2398
2448
  }
2399
2449
  )
2400
- ] }),
2450
+ ] }) }),
2401
2451
  /* @__PURE__ */ n.jsxs("div", { className: "flex gap-2 justify-between items-center", children: [
2402
- /* @__PURE__ */ n.jsxs("div", { className: "flex text-xs gap-2 border bg-muted rounded-md p-2 items-center h-8 font-mono divide-x", children: [
2452
+ /* @__PURE__ */ n.jsxs("div", { className: "flex text-xs gap-5 border bg-muted rounded-md p-2 items-center h-8 font-mono", children: [
2403
2453
  /* @__PURE__ */ n.jsxs("div", { children: [
2404
2454
  /* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Status" }),
2405
2455
  " ",
2406
2456
  s,
2407
2457
  " ",
2408
- Sr[s] ?? ""
2458
+ Pr[s] ?? ""
2409
2459
  ] }),
2410
2460
  /* @__PURE__ */ n.jsxs("div", { children: [
2411
2461
  /* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Time" }),
@@ -2416,17 +2466,17 @@ const Sr = {
2416
2466
  /* @__PURE__ */ n.jsxs("div", { children: [
2417
2467
  /* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Size" }),
2418
2468
  " ",
2419
- ft(r)
2469
+ ve(r)
2420
2470
  ] })
2421
2471
  ] }),
2422
- c && /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsxs(
2423
- Ee,
2472
+ u && !i && /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsxs(
2473
+ kt,
2424
2474
  {
2425
- value: u,
2426
- onValueChange: (m) => p(m),
2475
+ value: f,
2476
+ onValueChange: (T) => x(T),
2427
2477
  children: [
2428
- /* @__PURE__ */ n.jsx(ie, { className: "min-w-32", children: /* @__PURE__ */ n.jsx($e, { placeholder: "View" }) }),
2429
- /* @__PURE__ */ n.jsxs(le, { children: [
2478
+ /* @__PURE__ */ n.jsx(Ie, { className: "min-w-32", children: /* @__PURE__ */ n.jsx(Dt, { placeholder: "View" }) }),
2479
+ /* @__PURE__ */ n.jsxs(ke, { children: [
2430
2480
  /* @__PURE__ */ n.jsx(G, { value: "formatted", children: "Formatted" }),
2431
2481
  /* @__PURE__ */ n.jsx(G, { value: "raw", children: "Raw" }),
2432
2482
  /* @__PURE__ */ n.jsx(G, { value: "types", children: "Types" })
@@ -2436,32 +2486,32 @@ const Sr = {
2436
2486
  ) })
2437
2487
  ] })
2438
2488
  ] });
2439
- }, $r = ({
2489
+ }, Fr = ({
2440
2490
  queryMutation: e,
2441
2491
  showPathParamsWarning: t,
2442
2492
  showLongRunningWarning: s,
2443
2493
  onCancel: a
2444
2494
  }) => {
2445
2495
  const r = ((e.data?.status ?? 0) / 100).toFixed(0);
2446
- return /* @__PURE__ */ n.jsx("div", { className: "min-w-0 p-4 py-8 bg-muted/50", children: e.error ? /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2", children: [
2447
- t && /* @__PURE__ */ n.jsx(es, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
2448
- /* @__PURE__ */ n.jsxs($t, { children: [
2449
- /* @__PURE__ */ n.jsx(ts, { children: /* @__PURE__ */ n.jsx(ns, { children: "Request failed" }) }),
2450
- /* @__PURE__ */ n.jsxs(ss, { children: [
2496
+ return /* @__PURE__ */ n.jsx("div", { className: "min-w-0 p-4 py-4 bg-muted/50", children: e.error ? /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2", children: [
2497
+ t && /* @__PURE__ */ n.jsx(ts, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
2498
+ /* @__PURE__ */ n.jsxs(wt, { children: [
2499
+ /* @__PURE__ */ n.jsx(ns, { children: /* @__PURE__ */ n.jsx(ss, { children: "Request failed" }) }),
2500
+ /* @__PURE__ */ n.jsxs(rs, { children: [
2451
2501
  "Error:",
2452
2502
  " ",
2453
2503
  e.error.message || String(e.error) || "Unexpected error"
2454
2504
  ] })
2455
2505
  ] })
2456
- ] }) : e.data ? /* @__PURE__ */ n.jsxs(Ot, { defaultValue: "response", children: [
2457
- /* @__PURE__ */ n.jsxs(Pt, { children: [
2458
- /* @__PURE__ */ n.jsx(M, { value: "request", children: "Request" }),
2459
- /* @__PURE__ */ n.jsxs(M, { value: "response", children: [
2506
+ ] }) : e.data ? /* @__PURE__ */ n.jsxs(as, { defaultValue: "response", children: [
2507
+ /* @__PURE__ */ n.jsxs(os, { children: [
2508
+ /* @__PURE__ */ n.jsx(et, { value: "request", children: "Request" }),
2509
+ /* @__PURE__ */ n.jsxs(et, { value: "response", children: [
2460
2510
  "Response",
2461
2511
  /* @__PURE__ */ n.jsxs(
2462
2512
  "span",
2463
2513
  {
2464
- className: g(
2514
+ className: v(
2465
2515
  "text-xs font-mono ms-1",
2466
2516
  r === "2" && "text-green-500",
2467
2517
  r === "3" && "text-blue-500",
@@ -2477,31 +2527,34 @@ const Sr = {
2477
2527
  )
2478
2528
  ] })
2479
2529
  ] }),
2480
- /* @__PURE__ */ n.jsx(U, { value: "request", children: /* @__PURE__ */ n.jsx(Nr, { ...e.data.request }) }),
2481
- /* @__PURE__ */ n.jsx(U, { value: "response", children: /* @__PURE__ */ n.jsx(
2482
- Er,
2530
+ /* @__PURE__ */ n.jsx(tt, { value: "request", children: /* @__PURE__ */ n.jsx(Rr, { ...e.data.request }) }),
2531
+ /* @__PURE__ */ n.jsx(tt, { value: "response", children: /* @__PURE__ */ n.jsx(
2532
+ Br,
2483
2533
  {
2484
2534
  status: e.data.status,
2485
2535
  time: e.data.time,
2486
2536
  size: e.data.size,
2487
2537
  headers: e.data.headers,
2488
2538
  body: e.data.body,
2489
- url: e.data.request.url
2539
+ url: e.data.request.url,
2540
+ isBinary: e.data.isBinary,
2541
+ fileName: e.data.fileName,
2542
+ blob: e.data.blob
2490
2543
  }
2491
2544
  ) })
2492
2545
  ] }) : /* @__PURE__ */ n.jsx("div", { className: "grid place-items-center h-full", children: e.isPending ? /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 items-center mt-20", children: [
2493
- /* @__PURE__ */ n.jsx(Kn, { size: 20 }),
2546
+ /* @__PURE__ */ n.jsx(es, { size: 20 }),
2494
2547
  /* @__PURE__ */ n.jsxs(
2495
2548
  "div",
2496
2549
  {
2497
- className: g(
2550
+ className: v(
2498
2551
  "opacity-0 pointer-events-none transition-opacity h-20 text-sm text-muted-foreground duration-300 flex flex-col gap-2 items-center",
2499
2552
  s && "opacity-100 pointer-events-auto"
2500
2553
  ),
2501
2554
  children: [
2502
2555
  "Looks like the request is taking longer than expected.",
2503
2556
  /* @__PURE__ */ n.jsx(
2504
- Z,
2557
+ J,
2505
2558
  {
2506
2559
  type: "button",
2507
2560
  onClick: a,
@@ -2515,56 +2568,18 @@ const Sr = {
2515
2568
  }
2516
2569
  )
2517
2570
  ] }) : /* @__PURE__ */ n.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: "Send a request first to see the response here" }) }) });
2518
- }, Rr = ({
2519
- identities: e,
2520
- formRef: t,
2521
- disabled: s
2522
- }) => {
2523
- const { setValue: a, watch: r } = qe(), o = r("identity");
2524
- return e.length === 0 ? /* @__PURE__ */ n.jsx(F, { disabled: s, children: "Send" }) : /* @__PURE__ */ n.jsxs("div", { className: "flex", children: [
2525
- /* @__PURE__ */ n.jsx(
2526
- F,
2527
- {
2528
- className: "rounded-r-none inset-shadow-xs",
2529
- disabled: s,
2530
- onClick: () => t?.current?.requestSubmit(),
2531
- children: "Send"
2532
- }
2533
- ),
2534
- /* @__PURE__ */ n.jsxs(Qt, { children: [
2535
- /* @__PURE__ */ n.jsx(Jt, { asChild: !0, children: /* @__PURE__ */ n.jsx(
2536
- F,
2537
- {
2538
- disabled: s,
2539
- className: "rounded-l-none border-l border-border/40 inset-shadow-xs w-6",
2540
- size: "icon",
2541
- children: /* @__PURE__ */ n.jsx(yn, { className: "w-4 h-4" })
2542
- }
2543
- ) }),
2544
- /* @__PURE__ */ n.jsx(ze, { className: "w-56", align: "end", alignOffset: -150, children: [{ id: H, label: "None" }, ...e].map(
2545
- (i) => /* @__PURE__ */ n.jsxs(
2546
- _e,
2547
- {
2548
- onClick: () => {
2549
- a("identity", i.id), t?.current?.requestSubmit();
2550
- },
2551
- children: [
2552
- i.label,
2553
- o === i.id && /* @__PURE__ */ n.jsx(jt, { className: "ms-2", size: 16 })
2554
- ]
2555
- },
2556
- i.id
2557
- )
2558
- ) })
2559
- ] })
2560
- ] });
2561
- }, H = "__none", we = {
2562
- Plain: "text/plain",
2563
- JSON: "application/json",
2564
- XML: "application/xml",
2565
- YAML: "application/yaml",
2566
- CSV: "text/csv"
2567
- }, Lr = ({
2571
+ }, Vr = Ce()(
2572
+ Se(
2573
+ (e) => ({
2574
+ skipLogin: !1,
2575
+ setSkipLogin: (t) => e({ skipLogin: t })
2576
+ }),
2577
+ {
2578
+ name: "remember-skip-login",
2579
+ storage: yt(() => sessionStorage)
2580
+ }
2581
+ )
2582
+ ), H = "__none", qr = ({
2568
2583
  server: e,
2569
2584
  servers: t = [],
2570
2585
  url: s,
@@ -2574,321 +2589,263 @@ const Sr = {
2574
2589
  pathParams: i = [],
2575
2590
  defaultBody: c = "",
2576
2591
  examples: l,
2577
- requiresLogin: u = !1,
2578
- onLogin: p,
2579
- onSignUp: v
2592
+ requiresLogin: m = !1,
2593
+ onLogin: u,
2594
+ onSignUp: g
2580
2595
  }) => {
2581
- const { selectedServer: f, setSelectedServer: x } = tr(
2596
+ const { selectedServer: f, setSelectedServer: x } = sr(
2582
2597
  t.map((d) => ({ url: d }))
2583
- ), [m, y] = L(!1), S = On(), { setRememberedIdentity: N, getRememberedIdentity: I } = yr(), [, k] = kn(), [an, on] = L(!1), [ln, ee] = L(!1), te = Q(void 0), Je = Mn(N), { register: We, control: ne, handleSubmit: Xe, watch: Ze, setValue: _, ...fe } = Bn({
2598
+ ), [p, y] = E(!1), j = On(), { setRememberedIdentity: b, getRememberedIdentity: T } = Sr(), [, A] = kn(), { skipLogin: Kt, setSkipLogin: en } = Vr(), [tn, Y] = E(!1), K = W(void 0), ze = Un(b), { register: nn, control: ee, handleSubmit: _e, watch: Ue, setValue: ue, ...me } = zn({
2584
2599
  defaultValues: {
2585
2600
  body: c,
2586
- bodyContentType: "JSON",
2587
- queryParams: o.map((d) => ({
2601
+ queryParams: o.length > 0 ? o.map((d) => ({
2588
2602
  name: d.name,
2589
2603
  value: d.defaultValue ?? "",
2590
2604
  active: d.defaultActive ?? !1,
2591
2605
  enum: d.enum ?? []
2592
- })).concat([
2606
+ })) : [
2593
2607
  {
2594
2608
  name: "",
2595
2609
  value: "",
2596
2610
  active: !1,
2597
2611
  enum: []
2598
2612
  }
2599
- ]),
2613
+ ],
2600
2614
  pathParams: i.map((d) => ({
2601
2615
  name: d.name,
2602
2616
  value: d.defaultValue ?? ""
2603
2617
  })),
2604
- headers: r.map((d) => ({
2618
+ headers: r.length > 0 ? r.map((d) => ({
2605
2619
  name: d.name,
2606
2620
  value: d.defaultValue ?? "",
2607
2621
  active: d.defaultActive ?? !1
2608
- })).concat([
2622
+ })) : [
2609
2623
  {
2610
2624
  name: "",
2611
2625
  value: "",
2612
2626
  active: !1
2613
2627
  }
2614
- ]),
2615
- identity: I(
2616
- S.data?.map((d) => d.id) ?? []
2617
- )
2628
+ ],
2629
+ identity: T([
2630
+ H,
2631
+ ...j.data?.map((d) => d.id) ?? []
2632
+ ])
2618
2633
  }
2619
- }), A = Ze(), Ye = Q(null);
2620
- ae(() => {
2621
- A.identity && Je.current(A.identity);
2622
- }, [Je, A.identity]);
2623
- const xe = Fn({
2634
+ }), I = Ue();
2635
+ M(() => {
2636
+ I.identity && ze.current(I.identity);
2637
+ }, [ze, I.identity]);
2638
+ const te = qn({
2624
2639
  gcTime: 0,
2625
2640
  mutationFn: async (d) => {
2626
- const P = performance.now(), D = !d.headers.some(
2627
- (T) => T.active && T.name.toLowerCase() === "content-type"
2628
- ), re = Object.fromEntries([
2629
- ...d.headers.filter((T) => T.name && T.active).map((T) => [T.name, T.value]),
2630
- ...D ? [["content-type", we[d.bodyContentType]]] : []
2631
- ]), E = new Request(
2632
- nr(e ?? f, s, d),
2641
+ const k = performance.now(), _ = Object.fromEntries([
2642
+ ...d.headers.filter((O) => O.name && O.active).map((O) => [O.name, O.value])
2643
+ ]), $ = new Request(
2644
+ pr(e ?? f, s, d),
2633
2645
  {
2634
2646
  method: a.toUpperCase(),
2635
- headers: re,
2647
+ headers: _,
2636
2648
  body: d.body ? d.body : void 0
2637
2649
  }
2638
2650
  );
2639
- d.identity !== H && await S.data?.find((T) => T.id === d.identity)?.authorizeRequest(E);
2640
- const et = setTimeout(
2641
- () => ee(!0),
2651
+ d.identity !== H && await j.data?.find((O) => O.id === d.identity)?.authorizeRequest($);
2652
+ const ne = setTimeout(
2653
+ () => Y(!0),
2642
2654
  3210
2643
2655
  );
2644
- te.current = new AbortController();
2656
+ K.current = new AbortController();
2645
2657
  try {
2646
- const T = await fetch(E, {
2658
+ const O = await fetch($, {
2647
2659
  cache: "no-store",
2648
- signal: te.current.signal
2660
+ signal: K.current.signal
2649
2661
  });
2650
- clearTimeout(et), ee(!1);
2651
- const mn = performance.now() - P, tt = await T.text(), pn = new URL(E.url);
2662
+ clearTimeout(ne), Y(!1);
2663
+ const un = performance.now() - k, mn = new URL($.url), Qe = Array.from(O.headers.entries()), Je = O.headers.get("content-type") || "", We = hr(Je);
2664
+ let se = "", Xe, Ze;
2665
+ We ? (Xe = await O.blob(), Ze = fr(Qe, $.url), se = `Binary content (${Je})`) : se = await O.text();
2666
+ const Ye = O.headers.get("content-length");
2652
2667
  return {
2653
- status: T.status,
2654
- headers: Array.from(T.headers.entries()),
2655
- size: tt.length,
2656
- body: tt,
2657
- time: mn,
2668
+ status: O.status,
2669
+ headers: Qe,
2670
+ size: Ye ? parseInt(Ye) : se.length,
2671
+ body: se,
2672
+ time: un,
2673
+ isBinary: We,
2674
+ fileName: Ze,
2675
+ blob: Xe,
2658
2676
  request: {
2659
- method: E.method.toUpperCase(),
2660
- url: E.url,
2677
+ method: $.method.toUpperCase(),
2678
+ url: $.url,
2661
2679
  headers: [
2662
- ["Host", pn.host],
2680
+ ["Host", mn.host],
2663
2681
  ["User-Agent", "Zudoku Playground"],
2664
- ...Array.from(E.headers.entries())
2682
+ ...Array.from($.headers.entries())
2665
2683
  ],
2666
2684
  body: d.body ? d.body : void 0
2667
2685
  }
2668
2686
  };
2669
- } catch (T) {
2670
- throw clearTimeout(et), ee(!1), T instanceof TypeError ? new Error(
2687
+ } catch (O) {
2688
+ throw clearTimeout(ne), Y(!1), O instanceof TypeError ? new Error(
2671
2689
  "The request failed, possibly due to network issues or CORS policy."
2672
- ) : T;
2690
+ ) : O;
2673
2691
  }
2674
2692
  }
2675
- });
2676
- ae(() => () => {
2677
- te.current?.abort();
2693
+ }), Me = te.isPending, [sn, rn] = E(!1);
2694
+ M(() => {
2695
+ const d = setTimeout(() => rn(Me), 100);
2696
+ return () => clearTimeout(d);
2697
+ }, [Me]);
2698
+ const { isFinished: Ge, progress: an } = Vn({ isAnimating: sn });
2699
+ M(() => () => {
2700
+ K.current?.abort();
2678
2701
  }, []);
2679
- const cn = /* @__PURE__ */ n.jsx(
2680
- Xs,
2702
+ const on = /* @__PURE__ */ n.jsx(
2703
+ er,
2681
2704
  {
2682
2705
  path: s,
2683
- renderParam: ({ name: d, originalValue: P, index: D }) => {
2684
- const re = A.pathParams.find(
2685
- (E) => E.name === d
2706
+ renderParam: ({ name: d, originalValue: k, index: _ }) => {
2707
+ const $ = I.pathParams.find(
2708
+ (ne) => ne.name === d
2686
2709
  )?.value;
2687
2710
  return /* @__PURE__ */ n.jsx(
2688
- Ht,
2711
+ Vt,
2689
2712
  {
2690
2713
  name: d,
2691
2714
  backgroundOpacity: "0",
2692
2715
  slug: d,
2693
- onClick: () => fe.setFocus(`pathParams.${D}.value`),
2694
- children: re || P
2716
+ onClick: () => me.setFocus(`pathParams.${_}.value`),
2717
+ children: $ || k
2695
2718
  }
2696
2719
  );
2697
2720
  }
2698
2721
  }
2699
- ), Ke = A.queryParams.filter((d) => d.active).map((d, P, D) => /* @__PURE__ */ n.jsxs(q, { children: [
2722
+ ), He = I.queryParams.filter((d) => d.active).map((d, k, _) => /* @__PURE__ */ n.jsxs(D, { children: [
2700
2723
  d.name,
2701
2724
  "=",
2702
2725
  encodeURIComponent(d.value).replaceAll("%20", "+"),
2703
- P < D.length - 1 && "&",
2726
+ k < _.length - 1 && "&",
2704
2727
  /* @__PURE__ */ n.jsx("wbr", {})
2705
- ] }, d.name)), dn = /* @__PURE__ */ n.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: e ? /* @__PURE__ */ n.jsx("span", { children: e.replace(/^https?:\/\//, "").replace(/\/$/, "") }) : t.length > 1 && /* @__PURE__ */ n.jsxs(
2706
- Ee,
2728
+ ] }, d.name)), ln = /* @__PURE__ */ n.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: e ? /* @__PURE__ */ n.jsx("span", { children: e.replace(/^https?:\/\//, "").replace(/\/$/, "") }) : t.length > 1 && /* @__PURE__ */ n.jsxs(
2729
+ kt,
2707
2730
  {
2708
2731
  onValueChange: (d) => {
2709
- k(() => x(d));
2732
+ A(() => x(d));
2710
2733
  },
2711
2734
  value: f,
2712
2735
  defaultValue: f,
2713
2736
  children: [
2714
- /* @__PURE__ */ n.jsx(ie, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto translate-y-[4px]", children: /* @__PURE__ */ n.jsx($e, {}) }),
2715
- /* @__PURE__ */ n.jsx(le, { children: t.map((d) => /* @__PURE__ */ n.jsx(G, { value: d, children: d.replace(/^https?:\/\//, "").replace(/\/$/, "") }, d)) })
2737
+ /* @__PURE__ */ n.jsx(Ie, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto translate-y-[4px]", children: /* @__PURE__ */ n.jsx(Dt, {}) }),
2738
+ /* @__PURE__ */ n.jsx(ke, { children: t.map((d) => /* @__PURE__ */ n.jsx(G, { value: d, children: d.replace(/^https?:\/\//, "").replace(/\/$/, "") }, d)) })
2716
2739
  ]
2717
2740
  }
2718
- ) }), un = u && !an, se = ["POST", "PUT", "PATCH", "DELETE"].includes(
2741
+ ) }), cn = m && !Kt, dn = ["POST", "PUT", "PATCH", "DELETE"].includes(
2719
2742
  a.toUpperCase()
2720
2743
  );
2721
2744
  return /* @__PURE__ */ n.jsx(
2722
- zn,
2745
+ _n,
2723
2746
  {
2724
- register: We,
2725
- control: ne,
2726
- handleSubmit: Xe,
2727
- watch: Ze,
2728
- setValue: _,
2729
- ...fe,
2747
+ register: nn,
2748
+ control: ee,
2749
+ handleSubmit: _e,
2750
+ watch: Ue,
2751
+ setValue: ue,
2752
+ ...me,
2730
2753
  children: /* @__PURE__ */ n.jsxs(
2731
2754
  "form",
2732
2755
  {
2733
- onSubmit: Xe((d) => {
2734
- S.data?.length === 0 || d.identity ? xe.mutate(d) : y(!0);
2756
+ onSubmit: _e((d) => {
2757
+ j.data?.length === 0 || d.identity ? te.mutate(d) : y(!0);
2735
2758
  }),
2736
- ref: Ye,
2737
2759
  className: "relative",
2738
2760
  children: [
2739
2761
  /* @__PURE__ */ n.jsx(
2740
- hr,
2762
+ jr,
2741
2763
  {
2742
- identities: S.data ?? [],
2743
- open: m,
2764
+ identities: j.data ?? [],
2765
+ open: p,
2744
2766
  onOpenChange: y,
2745
- onSubmit: ({ rememberedIdentity: d, identity: P }) => {
2746
- d && _("identity", P ?? H), y(!1), xe.mutate({ ...A, identity: P });
2767
+ onSubmit: ({ rememberedIdentity: d, identity: k }) => {
2768
+ d && ue("identity", k ?? H), y(!1), te.mutate({ ...I, identity: k });
2747
2769
  }
2748
2770
  }
2749
2771
  ),
2750
2772
  /* @__PURE__ */ n.jsx(
2751
- vr,
2773
+ Tr,
2752
2774
  {
2753
- open: un,
2754
- setOpen: (d) => on(!d),
2755
- onSignUp: v,
2756
- onLogin: p
2775
+ open: cn,
2776
+ setOpen: (d) => en(!d),
2777
+ onSignUp: g,
2778
+ onLogin: u
2757
2779
  }
2758
2780
  ),
2759
- /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-2 text-sm h-full", children: [
2760
- /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-4 p-4 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:start-auto", children: [
2761
- /* @__PURE__ */ n.jsxs("div", { className: "flex gap-2 items-stretch", children: [
2762
- /* @__PURE__ */ n.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
2763
- /* @__PURE__ */ n.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: a.toUpperCase() }),
2764
- /* @__PURE__ */ n.jsxs("div", { className: "items-center px-2 py-0.5 font-mono text-xs break-all leading-6", children: [
2765
- dn,
2766
- cn,
2767
- Ke.length > 0 ? "?" : "",
2768
- Ke
2769
- ] })
2770
- ] }),
2771
- /* @__PURE__ */ n.jsx(
2772
- Rr,
2773
- {
2774
- identities: S.data ?? [],
2775
- formRef: Ye,
2776
- disabled: S.isLoading || fe.formState.isSubmitting
2777
- }
2778
- )
2779
- ] }),
2780
- /* @__PURE__ */ n.jsxs(Ot, { defaultValue: "parameters", children: [
2781
- /* @__PURE__ */ n.jsx("div", { className: "flex flex-wrap gap-1 justify-between", children: /* @__PURE__ */ n.jsxs(Pt, { children: [
2782
- /* @__PURE__ */ n.jsxs(M, { value: "parameters", children: [
2783
- "Parameters",
2784
- (A.pathParams.some((d) => d.value !== "") || A.queryParams.some((d) => d.active)) && /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ms-2" })
2785
- ] }),
2786
- /* @__PURE__ */ n.jsxs(M, { value: "headers", children: [
2787
- "Headers",
2788
- A.headers.filter((d) => d.active).length > 0 && /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ms-2" })
2789
- ] }),
2790
- /* @__PURE__ */ n.jsxs(M, { value: "auth", children: [
2791
- "Auth",
2792
- A.identity !== H && /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ms-2" })
2793
- ] }),
2794
- /* @__PURE__ */ n.jsxs(M, { value: "body", children: [
2795
- "Body",
2796
- A.body && /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ms-2" })
2797
- ] })
2798
- ] }) }),
2799
- /* @__PURE__ */ n.jsx(U, { value: "headers", children: /* @__PURE__ */ n.jsx(mr, { control: ne, headers: r }) }),
2800
- /* @__PURE__ */ n.jsxs(U, { value: "parameters", children: [
2801
- i.length > 0 && /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
2802
- /* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
2803
- /* @__PURE__ */ n.jsx(fr, { url: s, control: ne })
2804
- ] }),
2805
- /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
2806
- /* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
2807
- /* @__PURE__ */ n.jsx(gr, { control: ne, queryParams: o })
2808
- ] })
2809
- ] }),
2810
- /* @__PURE__ */ n.jsxs(U, { value: "body", children: [
2811
- !["POST", "PUT", "PATCH", "DELETE"].includes(
2812
- a.toUpperCase()
2813
- ) && /* @__PURE__ */ n.jsxs(Ae, { className: "mb-2", children: [
2814
- /* @__PURE__ */ n.jsx(nt, { className: "w-4 h-4" }),
2815
- /* @__PURE__ */ n.jsx(Oe, { children: "Body" }),
2816
- /* @__PURE__ */ n.jsx(Pe, { children: "Body is only supported for POST, PUT, PATCH, and DELETE requests" })
2781
+ /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[1fr_min-content_1fr] text-sm", children: [
2782
+ /* @__PURE__ */ n.jsx("div", { className: "col-span-3 p-4 border-b", children: /* @__PURE__ */ n.jsxs("div", { className: "flex gap-2 items-stretch", children: [
2783
+ /* @__PURE__ */ n.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md relative overflow-hidden", children: [
2784
+ /* @__PURE__ */ n.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: a.toUpperCase() }),
2785
+ /* @__PURE__ */ n.jsxs("div", { className: "items-center px-2 font-mono text-xs break-all leading-6 relative h-full w-full", children: [
2786
+ /* @__PURE__ */ n.jsxs("div", { className: "h-full py-1.5", children: [
2787
+ ln,
2788
+ on,
2789
+ He.length > 0 ? "?" : "",
2790
+ He
2817
2791
  ] }),
2818
2792
  /* @__PURE__ */ n.jsx(
2819
- Gt,
2793
+ "div",
2820
2794
  {
2821
- ...We("body"),
2822
- className: g(
2823
- "border w-full rounded-lg bg-muted/40 p-2 h-64 font-mono text-[13px]",
2824
- !se && "h-20 bg-muted"
2825
- ),
2826
- placeholder: se ? void 0 : "This request does not support a body",
2827
- disabled: !se
2828
- }
2829
- ),
2830
- se && /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 mt-2 justify-between", children: [
2831
- /* @__PURE__ */ n.jsxs(
2832
- Ee,
2833
- {
2834
- value: A.bodyContentType,
2835
- onValueChange: (d) => _(
2836
- "bodyContentType",
2837
- d
2838
- ),
2839
- children: [
2840
- /* @__PURE__ */ n.jsx(ie, { className: "w-[100px]", children: /* @__PURE__ */ n.jsx($e, {}) }),
2841
- /* @__PURE__ */ n.jsx(le, { children: Object.keys(we).map((d) => /* @__PURE__ */ n.jsx(G, { value: d, children: d }, d)) })
2842
- ]
2795
+ className: "h-[1px] bg-primary absolute left-0 -bottom-0 z-10 transition-all duration-300 ease-in-out",
2796
+ style: {
2797
+ opacity: Ge ? 0 : 1,
2798
+ width: Ge ? 0 : `${an * 100}%`
2843
2799
  }
2844
- ),
2845
- l && l.length > 0 && /* @__PURE__ */ n.jsx(
2846
- lr,
2847
- {
2848
- examples: l,
2849
- onSelect: (d, P) => {
2850
- _(
2851
- "body",
2852
- JSON.stringify(d.value, null, 2)
2853
- );
2854
- const D = _n(we).find(
2855
- ([re, E]) => E === P
2856
- )?.[0];
2857
- D && _("bodyContentType", D);
2858
- }
2859
- }
2860
- )
2861
- ] })
2862
- ] }),
2863
- /* @__PURE__ */ n.jsx(U, { value: "auth", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
2864
- S.data?.length === 0 && /* @__PURE__ */ n.jsxs(Ae, { children: [
2865
- /* @__PURE__ */ n.jsx(nt, { className: "w-4 h-4" }),
2866
- /* @__PURE__ */ n.jsx(Oe, { children: "Authentication" }),
2867
- /* @__PURE__ */ n.jsx(Pe, { children: "No identities found. Please create an identity first." })
2868
- ] }),
2869
- /* @__PURE__ */ n.jsx("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ n.jsx(
2870
- Kt,
2871
- {
2872
- value: A.identity,
2873
- identities: S.data ?? [],
2874
- setValue: (d) => _("identity", d)
2875
2800
  }
2876
- ) })
2877
- ] }) })
2878
- ] })
2801
+ )
2802
+ ] })
2803
+ ] }),
2804
+ /* @__PURE__ */ n.jsx(
2805
+ F,
2806
+ {
2807
+ type: "submit",
2808
+ disabled: j.isLoading || me.formState.isSubmitting,
2809
+ children: "Send"
2810
+ }
2811
+ )
2812
+ ] }) }),
2813
+ /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-5 p-4 after:bg-muted-foreground/20 relative overflow-y-auto h-[80vh]", children: [
2814
+ j.data?.length !== 0 && /* @__PURE__ */ n.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2", children: [
2815
+ /* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Authentication" }),
2816
+ /* @__PURE__ */ n.jsx(
2817
+ Qt,
2818
+ {
2819
+ value: I.identity,
2820
+ identities: j.data ?? [],
2821
+ setValue: (d) => ue("identity", d)
2822
+ }
2823
+ )
2824
+ ] }) }),
2825
+ i.length > 0 && /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2", children: [
2826
+ /* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
2827
+ /* @__PURE__ */ n.jsx(Nr, { url: s, control: ee })
2828
+ ] }),
2829
+ /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2", children: [
2830
+ /* @__PURE__ */ n.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
2831
+ /* @__PURE__ */ n.jsx(Cr, { control: ee, queryParams: o })
2832
+ ] }),
2833
+ /* @__PURE__ */ n.jsx(vr, { control: ee, headers: r }),
2834
+ dn && /* @__PURE__ */ n.jsx(mr, { examples: l })
2879
2835
  ] }),
2836
+ /* @__PURE__ */ n.jsx("div", { className: "w-px bg-muted-foreground/20" }),
2880
2837
  /* @__PURE__ */ n.jsx(
2881
- $r,
2838
+ Fr,
2882
2839
  {
2883
- queryMutation: xe,
2884
- showPathParamsWarning: A.pathParams.some(
2840
+ queryMutation: te,
2841
+ showPathParamsWarning: I.pathParams.some(
2885
2842
  (d) => d.value === ""
2886
2843
  ),
2887
- showLongRunningWarning: ln,
2844
+ showLongRunningWarning: tn,
2888
2845
  onCancel: () => {
2889
- te.current?.abort(
2846
+ K.current?.abort(
2890
2847
  "Request cancelled by the user"
2891
- ), ee(!1);
2848
+ ), Y(!1);
2892
2849
  }
2893
2850
  }
2894
2851
  )
@@ -2898,7 +2855,7 @@ const Sr = {
2898
2855
  )
2899
2856
  }
2900
2857
  );
2901
- }, Ir = ({
2858
+ }, zr = ({
2902
2859
  className: e,
2903
2860
  size: t = 16
2904
2861
  }) => /* @__PURE__ */ n.jsx(
@@ -2919,33 +2876,34 @@ const Sr = {
2919
2876
  }
2920
2877
  )
2921
2878
  }
2922
- ), kr = (e) => {
2923
- const [t, s] = L(!1);
2924
- return /* @__PURE__ */ n.jsxs(Le, { onOpenChange: (a) => s(a), children: [
2925
- /* @__PURE__ */ n.jsx(Vn, { asChild: !0, children: e.children ?? /* @__PURE__ */ n.jsxs(
2879
+ ), _r = (e) => {
2880
+ const [t, s] = E(!1);
2881
+ return /* @__PURE__ */ n.jsxs(Te, { onOpenChange: (a) => s(a), children: [
2882
+ /* @__PURE__ */ n.jsx(Fn, { asChild: !0, children: e.children ?? /* @__PURE__ */ n.jsxs(
2926
2883
  "button",
2927
2884
  {
2928
2885
  type: "button",
2929
2886
  className: "flex gap-1 items-center px-2 py-1 rounded-md transition text-xs bg-primary text-primary-foreground shadow-xs hover:bg-primary/80",
2930
2887
  children: [
2931
2888
  "Test",
2932
- /* @__PURE__ */ n.jsx(Ir, { size: 14 })
2889
+ /* @__PURE__ */ n.jsx(zr, { size: 14 })
2933
2890
  ]
2934
2891
  }
2935
2892
  ) }),
2936
2893
  /* @__PURE__ */ n.jsxs(
2937
- Ie,
2894
+ Ae,
2938
2895
  {
2939
- className: "max-w-screen-xl w-full h-5/6 overflow-hidden p-0",
2896
+ className: "max-w-screen-xl w-full overflow-hidden p-0",
2940
2897
  "aria-describedby": void 0,
2898
+ showCloseButton: !1,
2941
2899
  children: [
2942
- /* @__PURE__ */ n.jsx(qn, { children: /* @__PURE__ */ n.jsx(ke, { children: "Playground" }) }),
2943
- t && /* @__PURE__ */ n.jsx(Lr, { ...e })
2900
+ /* @__PURE__ */ n.jsx(Bn, { children: /* @__PURE__ */ n.jsx(Oe, { children: "Playground" }) }),
2901
+ t && /* @__PURE__ */ n.jsx(qr, { ...e })
2944
2902
  ]
2945
2903
  }
2946
2904
  )
2947
2905
  ] });
2948
- }, Dr = {
2906
+ }, Ur = {
2949
2907
  get: "green",
2950
2908
  post: "blue",
2951
2909
  put: "yellow",
@@ -2953,7 +2911,7 @@ const Sr = {
2953
2911
  patch: "purple",
2954
2912
  options: "gray",
2955
2913
  head: "gray"
2956
- }, gt = ({
2914
+ }, ht = ({
2957
2915
  label: e,
2958
2916
  path: t,
2959
2917
  operations: s,
@@ -2975,21 +2933,21 @@ const Sr = {
2975
2933
  href: `${t}#${o.slug}`,
2976
2934
  badge: {
2977
2935
  label: o.method,
2978
- color: Dr[o.method.toLowerCase()],
2936
+ color: Ur[o.method.toLowerCase()],
2979
2937
  invert: !0
2980
2938
  }
2981
2939
  }))
2982
- }), en = Ct(
2940
+ }), Jt = vt(
2983
2941
  void 0
2984
- ), ba = en.Provider, qr = () => {
2985
- const e = Dn(en);
2942
+ ), Aa = Jt.Provider, Mr = () => {
2943
+ const e = Dn(Jt);
2986
2944
  if (!e)
2987
2945
  throw new Error("useOasConfig must be used within a OasConfigProvider");
2988
2946
  return e.config;
2989
- }, yt = (e) => ({
2947
+ }, ft = (e) => ({
2990
2948
  path: e.routePath,
2991
2949
  async lazy() {
2992
- const { OasProvider: t } = await import("./OasProvider-5jrFuhVk.js");
2950
+ const { OasProvider: t } = await import("./OasProvider-CFBvfR3r.js");
2993
2951
  return {
2994
2952
  element: /* @__PURE__ */ n.jsx(
2995
2953
  t,
@@ -3003,39 +2961,39 @@ const Sr = {
3003
2961
  };
3004
2962
  },
3005
2963
  children: e.routes
3006
- }), tn = ({
2964
+ }), Wt = ({
3007
2965
  path: e,
3008
2966
  tag: t,
3009
2967
  untagged: s
3010
2968
  }) => ({
3011
2969
  path: e,
3012
2970
  async lazy() {
3013
- const { OperationList: a } = await import("./OperationList-BmoMLQPO.js");
2971
+ const { OperationList: a } = await import("./OperationList-Xs4KWmsh.js");
3014
2972
  return { element: /* @__PURE__ */ n.jsx(a, { tag: t, untagged: s }) };
3015
2973
  }
3016
- }), Vr = ({
2974
+ }), Gr = ({
3017
2975
  render: e,
3018
2976
  path: t
3019
2977
  }) => {
3020
- const { type: s, input: a } = qr(), { tag: r } = Nn(), o = wn(), i = Fs(rn, { type: s, input: a }), {
2978
+ const { type: s, input: a } = Mr(), { tag: r } = wn(), o = Cn(), i = _s(Yt, { type: s, input: a }), {
3021
2979
  data: { schema: c }
3022
- } = Pn(i), l = c.tags.at(0);
2980
+ } = Rn(i), l = c.tags.at(0);
3023
2981
  return !r && l?.slug ? /* @__PURE__ */ n.jsx(
3024
- Cn,
2982
+ Sn,
3025
2983
  {
3026
2984
  to: {
3027
- pathname: Sn(t, { tag: l.slug }),
2985
+ pathname: Tn(t, { tag: l.slug }),
3028
2986
  search: o.search
3029
2987
  }
3030
2988
  }
3031
- ) : r && c.tags.some((u) => u.slug === r) ? e(r) : null;
3032
- }, Fr = ({ path: e }) => ({
2989
+ ) : r && c.tags.some((m) => m.slug === r) ? e(r) : null;
2990
+ }, Hr = ({ path: e }) => ({
3033
2991
  path: e,
3034
2992
  async lazy() {
3035
- const { OperationList: t } = await import("./OperationList-BmoMLQPO.js");
2993
+ const { OperationList: t } = await import("./OperationList-Xs4KWmsh.js");
3036
2994
  return {
3037
2995
  element: /* @__PURE__ */ n.jsx(
3038
- Vr,
2996
+ Gr,
3039
2997
  {
3040
2998
  path: e,
3041
2999
  render: (s) => /* @__PURE__ */ n.jsx(t, { tag: s })
@@ -3043,35 +3001,35 @@ const Sr = {
3043
3001
  )
3044
3002
  };
3045
3003
  }
3046
- }), nn = (e) => [
3004
+ }), Xt = (e) => [
3047
3005
  // Category without tagged operations
3048
- tn({
3049
- path: R(e, Qe),
3006
+ Wt({
3007
+ path: P(e, qe),
3050
3008
  untagged: !0
3051
3009
  }),
3052
3010
  // Schema list route
3053
3011
  {
3054
- path: R(e, "~schemas"),
3012
+ path: P(e, "~schemas"),
3055
3013
  lazy: async () => {
3056
- const { SchemaList: t } = await import("./SchemaList-B4riYLoP.js");
3014
+ const { SchemaList: t } = await import("./SchemaList-BWaNlmUJ.js");
3057
3015
  return { element: /* @__PURE__ */ n.jsx(t, {}) };
3058
3016
  }
3059
3017
  }
3060
- ], Br = (e, t) => {
3061
- const s = R(e, t.at(0) ?? Qe);
3018
+ ], Qr = (e, t) => {
3019
+ const s = P(e, t.at(0) ?? qe);
3062
3020
  return [
3063
3021
  // Redirect to first tag on the index route
3064
- { index: !0, loader: () => jn(s) },
3022
+ { index: !0, loader: () => Nn(s) },
3065
3023
  // Create routes for each tag
3066
3024
  ...t.map(
3067
- (a) => tn({
3068
- path: R(e, a),
3025
+ (a) => Wt({
3026
+ path: P(e, a),
3069
3027
  tag: a
3070
3028
  })
3071
3029
  ),
3072
- ...nn(e)
3030
+ ...Xt(e)
3073
3031
  ];
3074
- }, sn = (e) => e.type === "file" ? Object.keys(e.input) : [], zr = ({
3032
+ }, Zt = (e) => e.type === "file" ? Object.keys(e.input) : [], Jr = ({
3075
3033
  basePath: e,
3076
3034
  config: t,
3077
3035
  client: s
@@ -3079,30 +3037,30 @@ const Sr = {
3079
3037
  const a = t.tagPages;
3080
3038
  if (!a)
3081
3039
  return [
3082
- yt({
3040
+ ft({
3083
3041
  basePath: e,
3084
3042
  routePath: e,
3085
3043
  routes: [
3086
- Fr({ path: e + "/:tag?" }),
3087
- ...nn(e)
3044
+ Hr({ path: e + "/:tag?" }),
3045
+ ...Xt(e)
3088
3046
  ],
3089
3047
  client: s,
3090
3048
  config: t
3091
3049
  })
3092
3050
  ];
3093
- const r = sn(t);
3051
+ const r = Zt(t);
3094
3052
  return (r.length > 1 ? [void 0, ...r] : [void 0]).map((i) => {
3095
- const c = R(e, i);
3096
- return yt({
3053
+ const c = P(e, i);
3054
+ return ft({
3097
3055
  basePath: e,
3098
3056
  version: i,
3099
3057
  routePath: c,
3100
- routes: Br(c, a),
3058
+ routes: Qr(c, a),
3101
3059
  client: s,
3102
3060
  config: t
3103
3061
  });
3104
3062
  });
3105
- }, rn = Js(`
3063
+ }, Yt = Zs(`
3106
3064
  query GetSidebarOperations($input: JSON!, $type: SchemaType!) {
3107
3065
  schema(input: $input, type: $type) {
3108
3066
  tags {
@@ -3124,8 +3082,8 @@ const Sr = {
3124
3082
  }
3125
3083
  }
3126
3084
  }
3127
- `), Qe = "~endpoints", ja = (e) => {
3128
- const t = R(e.navigationId ?? "/reference"), s = new os(e);
3085
+ `), qe = "~endpoints", Oa = (e) => {
3086
+ const t = P(e.navigationId ?? "/reference"), s = new cs(e);
3129
3087
  return {
3130
3088
  getHead: () => {
3131
3089
  if (e.type === "url" && !e.skipPreload)
@@ -3150,119 +3108,119 @@ const Sr = {
3150
3108
  children: c,
3151
3109
  ...l
3152
3110
  }) => {
3153
- const u = En();
3111
+ const m = $n();
3154
3112
  if (!r)
3155
3113
  throw new Error("Server is required");
3156
- return a && !u.isAuthenticated ? /* @__PURE__ */ n.jsxs(
3157
- Z,
3114
+ return a && !m.isAuthenticated ? /* @__PURE__ */ n.jsxs(
3115
+ J,
3158
3116
  {
3159
3117
  className: "gap-2 items-center",
3160
3118
  variant: "outline",
3161
- onClick: u.login,
3119
+ onClick: m.login,
3162
3120
  children: [
3163
3121
  "Login to open in Playground ",
3164
- /* @__PURE__ */ n.jsx(vn, { size: 16 })
3122
+ /* @__PURE__ */ n.jsx(bn, { size: 16 })
3165
3123
  ]
3166
3124
  }
3167
3125
  ) : /* @__PURE__ */ n.jsx(
3168
- kr,
3126
+ _r,
3169
3127
  {
3170
3128
  url: i ?? "/",
3171
3129
  method: o ?? "get",
3172
3130
  server: r,
3173
3131
  ...l,
3174
- children: /* @__PURE__ */ n.jsx(Z, { className: "gap-2 items-center", variant: "outline", children: c ?? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3132
+ children: /* @__PURE__ */ n.jsx(J, { className: "gap-2 items-center", variant: "outline", children: c ?? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3175
3133
  "Open in Playground ",
3176
- /* @__PURE__ */ n.jsx(bn, { size: 16 })
3134
+ /* @__PURE__ */ n.jsx(jn, { size: 16 })
3177
3135
  ] }) })
3178
3136
  }
3179
3137
  );
3180
3138
  }
3181
3139
  }),
3182
3140
  getSidebar: async (a, r) => {
3183
- if (!st({ path: t, end: !1 }, a))
3141
+ if (!Ke({ path: t, end: !1 }, a))
3184
3142
  return [];
3185
- const o = st(
3143
+ const o = Ke(
3186
3144
  { path: `${t}/:version?/:tag`, end: !0 },
3187
3145
  a
3188
3146
  );
3189
3147
  try {
3190
- const i = o?.params.version, c = i ?? sn(e).at(0), { type: l } = e, u = l === "file" ? e.input[c] : e.input, p = _t(s, rn, {
3148
+ const i = o?.params.version, c = i ?? Zt(e).at(0), { type: l } = e, m = l === "file" ? e.input[c] : e.input, u = It(s, Yt, {
3191
3149
  type: l,
3192
- input: u
3193
- }), v = await r.queryClient.ensureQueryData(p), f = v.schema.tags.flatMap((m) => {
3194
- if (!m.name || m.operations.length === 0) return [];
3195
- const y = R(t, i, m.slug), S = m.extensions?.["x-zudoku-collapsed"] ?? !e.options?.expandAllTags, N = m.extensions?.["x-zudoku-collapsible"] ?? !0;
3196
- return gt({
3197
- label: m.name,
3150
+ input: m
3151
+ }), g = await r.queryClient.ensureQueryData(u), f = g.schema.tags.flatMap((p) => {
3152
+ if (!p.name || p.operations.length === 0) return [];
3153
+ const y = P(t, i, p.slug), j = p.extensions?.["x-zudoku-collapsed"] ?? !e.options?.expandAllTags, b = p.extensions?.["x-zudoku-collapsible"] ?? !0;
3154
+ return ht({
3155
+ label: p.name,
3198
3156
  path: y,
3199
- operations: m.operations,
3200
- collapsed: S,
3201
- collapsible: N
3157
+ operations: p.operations,
3158
+ collapsed: j,
3159
+ collapsible: b
3202
3160
  });
3203
- }), x = v.schema.tags.find(
3204
- (m) => !m.name
3161
+ }), x = g.schema.tags.find(
3162
+ (p) => !p.name
3205
3163
  )?.operations;
3206
3164
  return x && f.push(
3207
- gt({
3165
+ ht({
3208
3166
  label: "Other endpoints",
3209
- path: R(t, i, Qe),
3167
+ path: P(t, i, qe),
3210
3168
  operations: x,
3211
3169
  collapsed: !e.options?.expandAllTags
3212
3170
  })
3213
- ), v.schema.components?.schemas?.length && f.push({
3171
+ ), g.schema.components?.schemas?.length && f.push({
3214
3172
  type: "link",
3215
3173
  label: "Schemas",
3216
- href: R(t, i, "~schemas")
3174
+ href: P(t, i, "~schemas")
3217
3175
  }), f;
3218
3176
  } catch {
3219
3177
  return [];
3220
3178
  }
3221
3179
  },
3222
- getRoutes: () => zr({ basePath: t, config: e, client: s })
3180
+ getRoutes: () => Jr({ basePath: t, config: e, client: s })
3223
3181
  };
3224
3182
  };
3225
3183
  export {
3226
- ya as A,
3227
- gs as B,
3228
- mt as C,
3229
- hs as D,
3230
- kt as E,
3231
- rn as F,
3232
- va as G,
3233
- ja as H,
3234
- ys as L,
3235
- ba as O,
3236
- kr as P,
3237
- ms as Q,
3238
- Ee as S,
3184
+ Sa as A,
3185
+ bs as B,
3186
+ dt as C,
3187
+ gs as D,
3188
+ At as E,
3189
+ Yt as F,
3190
+ Ta as G,
3191
+ Oa as H,
3192
+ js as L,
3193
+ Aa as O,
3194
+ _r as P,
3195
+ fs as Q,
3196
+ kt as S,
3239
3197
  h as T,
3240
- Qe as U,
3241
- Fs as a,
3242
- pt as b,
3243
- ht as c,
3244
- Js as d,
3245
- tr as e,
3246
- Ht as f,
3247
- sn as g,
3248
- Xs as h,
3249
- ie as i,
3250
- $e as j,
3251
- le as k,
3198
+ qe as U,
3199
+ _s as a,
3200
+ ut as b,
3201
+ mt as c,
3202
+ Zs as d,
3203
+ sr as e,
3204
+ Vt as f,
3205
+ Zt as g,
3206
+ er as h,
3207
+ Ie as i,
3208
+ Dt as j,
3209
+ ke as k,
3252
3210
  G as l,
3253
- jr as m,
3211
+ Or as m,
3254
3212
  qs as n,
3255
- Bt as o,
3256
- ct as p,
3257
- ga as q,
3258
- vs as r,
3259
- O as s,
3260
- Be as t,
3261
- qr as u,
3262
- Ft as v,
3263
- is as w,
3264
- Ds as x,
3265
- ye as y,
3266
- ls as z
3213
+ Pt as o,
3214
+ it as p,
3215
+ Ca as q,
3216
+ Ns as r,
3217
+ R as s,
3218
+ Ee as t,
3219
+ Mr as u,
3220
+ Lt as v,
3221
+ ds as w,
3222
+ Vs as x,
3223
+ he as y,
3224
+ us as z
3267
3225
  };
3268
- //# sourceMappingURL=index-BXYvD5-7.js.map
3226
+ //# sourceMappingURL=index-yqBxBqxF.js.map