zudoku 0.3.0-dev.77 → 0.3.0-dev.78

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 (90) hide show
  1. package/dist/config/validators/validate.d.ts +130 -130
  2. package/dist/lib/components/DevPortal.js +11 -2
  3. package/dist/lib/components/DevPortal.js.map +1 -1
  4. package/dist/lib/components/Heading.d.ts +1 -1
  5. package/dist/lib/core/plugins.d.ts +3 -0
  6. package/dist/lib/core/plugins.js +1 -0
  7. package/dist/lib/core/plugins.js.map +1 -1
  8. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +2 -1
  9. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +8 -16
  10. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  11. package/dist/lib/plugins/openapi/Sidecar.js +18 -1
  12. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  13. package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -6
  14. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  15. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  16. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +15 -15
  17. package/dist/lib/plugins/openapi/graphql/graphql.js +67 -67
  18. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  19. package/dist/lib/plugins/openapi/index.js +8 -0
  20. package/dist/lib/plugins/openapi/index.js.map +1 -1
  21. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +2 -3
  22. package/dist/lib/plugins/openapi/playground/PathParams.js +3 -4
  23. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  24. package/dist/lib/plugins/openapi/playground/Playground.d.ts +22 -10
  25. package/dist/lib/plugins/openapi/playground/Playground.js +37 -25
  26. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  27. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +2 -1
  28. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  29. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  30. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +3 -2
  31. package/dist/lib/plugins/openapi/playground/QueryParams.js +10 -5
  32. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  33. package/dist/lib/util/fetchTimeout.d.ts +1 -0
  34. package/dist/lib/util/fetchTimeout.js +14 -0
  35. package/dist/lib/util/fetchTimeout.js.map +1 -0
  36. package/lib/{CategoryHeading-D0V23fMT.js → CategoryHeading-DCmchnA1.js} +2 -2
  37. package/lib/{CategoryHeading-D0V23fMT.js.map → CategoryHeading-DCmchnA1.js.map} +1 -1
  38. package/lib/{Combination-CgxP9BB4.js → Combination-BIdpLnWg.js} +27 -33
  39. package/lib/Combination-BIdpLnWg.js.map +1 -0
  40. package/lib/DeveloperHint-DQVwIery.js +10 -0
  41. package/lib/DeveloperHint-DQVwIery.js.map +1 -0
  42. package/lib/{Input-BcZoDid4.js → Input-qyZciIJp.js} +3 -3
  43. package/lib/{Input-BcZoDid4.js.map → Input-qyZciIJp.js.map} +1 -1
  44. package/lib/{Markdown-IsabnbGN.js → Markdown-QsZ-PHET.js} +3 -3
  45. package/lib/{Markdown-IsabnbGN.js.map → Markdown-QsZ-PHET.js.map} +1 -1
  46. package/lib/{MdxPage-B1B2Inj5.js → MdxPage-V4FCB0C_.js} +3 -3
  47. package/lib/{MdxPage-B1B2Inj5.js.map → MdxPage-V4FCB0C_.js.map} +1 -1
  48. package/lib/OperationList-qfNEBPAx.js +4397 -0
  49. package/lib/OperationList-qfNEBPAx.js.map +1 -0
  50. package/lib/{Route-D0Ub80Oa.js → Route-CogU1ofM.js} +2 -2
  51. package/lib/{Route-D0Ub80Oa.js.map → Route-CogU1ofM.js.map} +1 -1
  52. package/lib/{SlotletProvider-CJXWb2gw.js → SlotletProvider-D_Vz-7c_.js} +4 -4
  53. package/lib/{SlotletProvider-CJXWb2gw.js.map → SlotletProvider-D_Vz-7c_.js.map} +1 -1
  54. package/lib/Spinner-yPSFgoZ8.js +244 -0
  55. package/lib/Spinner-yPSFgoZ8.js.map +1 -0
  56. package/lib/index-BpO_SgPQ.js +124 -0
  57. package/lib/index-BpO_SgPQ.js.map +1 -0
  58. package/lib/index-DccqEFTy.js +1878 -0
  59. package/lib/index-DccqEFTy.js.map +1 -0
  60. package/lib/{urql-DMlBWUKL.js → urql-DrBfkb92.js} +2 -3
  61. package/lib/{urql-DMlBWUKL.js.map → urql-DrBfkb92.js.map} +1 -1
  62. package/lib/zudoku.components.js +352 -348
  63. package/lib/zudoku.components.js.map +1 -1
  64. package/lib/zudoku.openapi-worker.js +1 -1
  65. package/lib/zudoku.plugin-api-keys.js +7 -6
  66. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  67. package/lib/zudoku.plugin-custom-page.js +1 -1
  68. package/lib/zudoku.plugin-markdown.js +1 -1
  69. package/lib/zudoku.plugin-openapi.js +5 -4
  70. package/lib/zudoku.plugin-openapi.js.map +1 -1
  71. package/package.json +1 -1
  72. package/src/lib/components/DevPortal.tsx +14 -5
  73. package/src/lib/core/plugins.ts +7 -0
  74. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +9 -17
  75. package/src/lib/plugins/openapi/Sidecar.tsx +23 -1
  76. package/src/lib/plugins/openapi/graphql/gql.ts +8 -8
  77. package/src/lib/plugins/openapi/graphql/graphql.ts +80 -80
  78. package/src/lib/plugins/openapi/index.tsx +15 -0
  79. package/src/lib/plugins/openapi/playground/PathParams.tsx +14 -20
  80. package/src/lib/plugins/openapi/playground/Playground.tsx +69 -45
  81. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +8 -6
  82. package/src/lib/plugins/openapi/playground/QueryParams.tsx +86 -72
  83. package/src/lib/util/fetchTimeout.tsx +21 -0
  84. package/lib/Combination-CgxP9BB4.js.map +0 -1
  85. package/lib/OperationList-B2nsuf1v.js +0 -5471
  86. package/lib/OperationList-B2nsuf1v.js.map +0 -1
  87. package/lib/Spinner-BhtSoFka.js +0 -359
  88. package/lib/Spinner-BhtSoFka.js.map +0 -1
  89. package/lib/index-BC2Ob2BR.js +0 -727
  90. package/lib/index-BC2Ob2BR.js.map +0 -1
@@ -0,0 +1,1878 @@
1
+ import { j as e, e as cn } from "./jsx-runtime-CJBdjYYx.js";
2
+ import { c as K, a as g, P as mn, H as un, u as pn, g as vn, S as pe } from "./Markdown-QsZ-PHET.js";
3
+ import { C as gn, c as fn, f as hn } from "./urql-DrBfkb92.js";
4
+ import { createClient as kn } from "zudoku/openapi-worker";
5
+ import { L as xn } from "./index-Dt-pU7Vu.js";
6
+ import { C as Nn } from "./CategoryHeading-DCmchnA1.js";
7
+ import { a as ve, u as X, P as b, d as S, R as yn, S as ge, h as bn, e as jn, F as Sn, D as Fn, p as Cn, m as Tn, o as fe, n as V, k as Dn, B as I } from "./Combination-BIdpLnWg.js";
8
+ import { g as Y, h as de, C as F, I as he, i as wn, u as Pn, a as Rn, F as _n, S as En, b as In, c as An, d as On, f as ce, V as $n } from "./Input-qyZciIJp.js";
9
+ import * as c from "react";
10
+ import { useRef as ke, useEffect as xe, Fragment as G, useState as Mn } from "react";
11
+ import { P as L, c as Ne, R as Vn, I as qn, S as me } from "./Spinner-yPSFgoZ8.js";
12
+ import { A as Ln } from "./DevPortalProvider-BTFqdAEL.js";
13
+ import { m as zn } from "./router-BiRCp01d.js";
14
+ /**
15
+ * @license lucide-react v0.378.0 - ISC
16
+ *
17
+ * This source code is licensed under the ISC license.
18
+ * See the LICENSE file in the root directory of this source tree.
19
+ */
20
+ const ye = K("CirclePlay", [
21
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
22
+ ["polygon", { points: "10 8 16 12 10 16 10 8", key: "1cimsy" }]
23
+ ]);
24
+ /**
25
+ * @license lucide-react v0.378.0 - ISC
26
+ *
27
+ * This source code is licensed under the ISC license.
28
+ * See the LICENSE file in the root directory of this source tree.
29
+ */
30
+ const be = K("Eraser", [
31
+ [
32
+ "path",
33
+ {
34
+ d: "m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",
35
+ key: "182aya"
36
+ }
37
+ ],
38
+ ["path", { d: "M22 21H7", key: "t4ddhn" }],
39
+ ["path", { d: "m5 11 9 9", key: "1mo9qw" }]
40
+ ]);
41
+ /**
42
+ * @license lucide-react v0.378.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */
47
+ const je = K("X", [
48
+ ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
49
+ ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
50
+ ]), Ja = {
51
+ get: "text-green-600",
52
+ post: "text-sky-600",
53
+ put: "text-yellow-600",
54
+ delete: "text-red-600",
55
+ patch: "text-purple-600",
56
+ options: "text-indigo-600",
57
+ head: "text-gray-600",
58
+ trace: "text-gray-600"
59
+ }, Gn = {
60
+ get: "bg-green-400 dark:bg-green-800",
61
+ post: "bg-sky-400 dark:bg-sky-800",
62
+ put: "bg-yellow-400 dark:bg-yellow-800",
63
+ delete: "bg-red-400 dark:bg-red-800",
64
+ patch: "bg-purple-400 dark:bg-purple-600",
65
+ options: "bg-indigo-400 dark:bg-indigo-600",
66
+ head: "bg-gray-400 dark:bg-gray-600",
67
+ trace: "bg-gray-400 dark:bg-gray-600"
68
+ }, Bn = ({ method: n }) => /* @__PURE__ */ e.jsx(
69
+ "span",
70
+ {
71
+ className: g(
72
+ "mt-0.5 flex items-center duration-200 transition-opacity text-center uppercase font-mono text-[0.65rem] font-bold rounded text-background dark:text-zinc-50 h-4 px-1",
73
+ Gn[n]
74
+ ),
75
+ children: n
76
+ }
77
+ ), Hn = {
78
+ kind: "Document",
79
+ definitions: [
80
+ {
81
+ kind: "FragmentDefinition",
82
+ name: { kind: "Name", value: "OperationsFragment" },
83
+ typeCondition: {
84
+ kind: "NamedType",
85
+ name: { kind: "Name", value: "OperationItem" }
86
+ },
87
+ selectionSet: {
88
+ kind: "SelectionSet",
89
+ selections: [
90
+ { kind: "Field", name: { kind: "Name", value: "slug" } },
91
+ { kind: "Field", name: { kind: "Name", value: "summary" } },
92
+ { kind: "Field", name: { kind: "Name", value: "method" } },
93
+ { kind: "Field", name: { kind: "Name", value: "description" } },
94
+ { kind: "Field", name: { kind: "Name", value: "operationId" } },
95
+ { kind: "Field", name: { kind: "Name", value: "contentTypes" } },
96
+ { kind: "Field", name: { kind: "Name", value: "path" } },
97
+ {
98
+ kind: "Field",
99
+ name: { kind: "Name", value: "parameters" },
100
+ selectionSet: {
101
+ kind: "SelectionSet",
102
+ selections: [
103
+ { kind: "Field", name: { kind: "Name", value: "name" } },
104
+ { kind: "Field", name: { kind: "Name", value: "in" } },
105
+ { kind: "Field", name: { kind: "Name", value: "description" } },
106
+ { kind: "Field", name: { kind: "Name", value: "required" } },
107
+ { kind: "Field", name: { kind: "Name", value: "schema" } },
108
+ { kind: "Field", name: { kind: "Name", value: "style" } },
109
+ {
110
+ kind: "Field",
111
+ name: { kind: "Name", value: "examples" },
112
+ selectionSet: {
113
+ kind: "SelectionSet",
114
+ selections: [
115
+ { kind: "Field", name: { kind: "Name", value: "name" } },
116
+ {
117
+ kind: "Field",
118
+ name: { kind: "Name", value: "description" }
119
+ },
120
+ {
121
+ kind: "Field",
122
+ name: { kind: "Name", value: "externalValue" }
123
+ },
124
+ { kind: "Field", name: { kind: "Name", value: "value" } },
125
+ {
126
+ kind: "Field",
127
+ name: { kind: "Name", value: "summary" }
128
+ }
129
+ ]
130
+ }
131
+ }
132
+ ]
133
+ }
134
+ },
135
+ {
136
+ kind: "Field",
137
+ name: { kind: "Name", value: "requestBody" },
138
+ selectionSet: {
139
+ kind: "SelectionSet",
140
+ selections: [
141
+ {
142
+ kind: "Field",
143
+ name: { kind: "Name", value: "content" },
144
+ selectionSet: {
145
+ kind: "SelectionSet",
146
+ selections: [
147
+ {
148
+ kind: "Field",
149
+ name: { kind: "Name", value: "mediaType" }
150
+ },
151
+ {
152
+ kind: "Field",
153
+ name: { kind: "Name", value: "encoding" },
154
+ selectionSet: {
155
+ kind: "SelectionSet",
156
+ selections: [
157
+ {
158
+ kind: "Field",
159
+ name: { kind: "Name", value: "name" }
160
+ }
161
+ ]
162
+ }
163
+ },
164
+ {
165
+ kind: "Field",
166
+ name: { kind: "Name", value: "schema" }
167
+ }
168
+ ]
169
+ }
170
+ },
171
+ { kind: "Field", name: { kind: "Name", value: "description" } },
172
+ { kind: "Field", name: { kind: "Name", value: "required" } }
173
+ ]
174
+ }
175
+ },
176
+ {
177
+ kind: "Field",
178
+ name: { kind: "Name", value: "responses" },
179
+ selectionSet: {
180
+ kind: "SelectionSet",
181
+ selections: [
182
+ { kind: "Field", name: { kind: "Name", value: "statusCode" } },
183
+ { kind: "Field", name: { kind: "Name", value: "links" } },
184
+ { kind: "Field", name: { kind: "Name", value: "description" } },
185
+ {
186
+ kind: "Field",
187
+ name: { kind: "Name", value: "content" },
188
+ selectionSet: {
189
+ kind: "SelectionSet",
190
+ selections: [
191
+ {
192
+ kind: "Field",
193
+ name: { kind: "Name", value: "mediaType" }
194
+ },
195
+ {
196
+ kind: "Field",
197
+ name: { kind: "Name", value: "encoding" },
198
+ selectionSet: {
199
+ kind: "SelectionSet",
200
+ selections: [
201
+ {
202
+ kind: "Field",
203
+ name: { kind: "Name", value: "name" }
204
+ }
205
+ ]
206
+ }
207
+ },
208
+ {
209
+ kind: "Field",
210
+ name: { kind: "Name", value: "schema" }
211
+ }
212
+ ]
213
+ }
214
+ }
215
+ ]
216
+ }
217
+ }
218
+ ]
219
+ }
220
+ }
221
+ ]
222
+ }, Wn = {
223
+ kind: "Document",
224
+ definitions: [
225
+ {
226
+ kind: "OperationDefinition",
227
+ operation: "query",
228
+ name: { kind: "Name", value: "AllOperations" },
229
+ variableDefinitions: [
230
+ {
231
+ kind: "VariableDefinition",
232
+ variable: {
233
+ kind: "Variable",
234
+ name: { kind: "Name", value: "input" }
235
+ },
236
+ type: {
237
+ kind: "NonNullType",
238
+ type: { kind: "NamedType", name: { kind: "Name", value: "JSON" } }
239
+ }
240
+ },
241
+ {
242
+ kind: "VariableDefinition",
243
+ variable: { kind: "Variable", name: { kind: "Name", value: "type" } },
244
+ type: {
245
+ kind: "NonNullType",
246
+ type: {
247
+ kind: "NamedType",
248
+ name: { kind: "Name", value: "SchemaType" }
249
+ }
250
+ }
251
+ }
252
+ ],
253
+ selectionSet: {
254
+ kind: "SelectionSet",
255
+ selections: [
256
+ {
257
+ kind: "Field",
258
+ name: { kind: "Name", value: "schema" },
259
+ arguments: [
260
+ {
261
+ kind: "Argument",
262
+ name: { kind: "Name", value: "input" },
263
+ value: {
264
+ kind: "Variable",
265
+ name: { kind: "Name", value: "input" }
266
+ }
267
+ },
268
+ {
269
+ kind: "Argument",
270
+ name: { kind: "Name", value: "type" },
271
+ value: {
272
+ kind: "Variable",
273
+ name: { kind: "Name", value: "type" }
274
+ }
275
+ }
276
+ ],
277
+ selectionSet: {
278
+ kind: "SelectionSet",
279
+ selections: [
280
+ { kind: "Field", name: { kind: "Name", value: "description" } },
281
+ { kind: "Field", name: { kind: "Name", value: "title" } },
282
+ { kind: "Field", name: { kind: "Name", value: "url" } },
283
+ { kind: "Field", name: { kind: "Name", value: "version" } },
284
+ {
285
+ kind: "Field",
286
+ name: { kind: "Name", value: "tags" },
287
+ selectionSet: {
288
+ kind: "SelectionSet",
289
+ selections: [
290
+ { kind: "Field", name: { kind: "Name", value: "name" } },
291
+ {
292
+ kind: "Field",
293
+ name: { kind: "Name", value: "description" }
294
+ },
295
+ {
296
+ kind: "Field",
297
+ name: { kind: "Name", value: "operations" },
298
+ selectionSet: {
299
+ kind: "SelectionSet",
300
+ selections: [
301
+ {
302
+ kind: "Field",
303
+ name: { kind: "Name", value: "slug" }
304
+ },
305
+ {
306
+ kind: "FragmentSpread",
307
+ name: {
308
+ kind: "Name",
309
+ value: "OperationsFragment"
310
+ }
311
+ }
312
+ ]
313
+ }
314
+ }
315
+ ]
316
+ }
317
+ }
318
+ ]
319
+ }
320
+ }
321
+ ]
322
+ }
323
+ },
324
+ {
325
+ kind: "FragmentDefinition",
326
+ name: { kind: "Name", value: "OperationsFragment" },
327
+ typeCondition: {
328
+ kind: "NamedType",
329
+ name: { kind: "Name", value: "OperationItem" }
330
+ },
331
+ selectionSet: {
332
+ kind: "SelectionSet",
333
+ selections: [
334
+ { kind: "Field", name: { kind: "Name", value: "slug" } },
335
+ { kind: "Field", name: { kind: "Name", value: "summary" } },
336
+ { kind: "Field", name: { kind: "Name", value: "method" } },
337
+ { kind: "Field", name: { kind: "Name", value: "description" } },
338
+ { kind: "Field", name: { kind: "Name", value: "operationId" } },
339
+ { kind: "Field", name: { kind: "Name", value: "contentTypes" } },
340
+ { kind: "Field", name: { kind: "Name", value: "path" } },
341
+ {
342
+ kind: "Field",
343
+ name: { kind: "Name", value: "parameters" },
344
+ selectionSet: {
345
+ kind: "SelectionSet",
346
+ selections: [
347
+ { kind: "Field", name: { kind: "Name", value: "name" } },
348
+ { kind: "Field", name: { kind: "Name", value: "in" } },
349
+ { kind: "Field", name: { kind: "Name", value: "description" } },
350
+ { kind: "Field", name: { kind: "Name", value: "required" } },
351
+ { kind: "Field", name: { kind: "Name", value: "schema" } },
352
+ { kind: "Field", name: { kind: "Name", value: "style" } },
353
+ {
354
+ kind: "Field",
355
+ name: { kind: "Name", value: "examples" },
356
+ selectionSet: {
357
+ kind: "SelectionSet",
358
+ selections: [
359
+ { kind: "Field", name: { kind: "Name", value: "name" } },
360
+ {
361
+ kind: "Field",
362
+ name: { kind: "Name", value: "description" }
363
+ },
364
+ {
365
+ kind: "Field",
366
+ name: { kind: "Name", value: "externalValue" }
367
+ },
368
+ { kind: "Field", name: { kind: "Name", value: "value" } },
369
+ {
370
+ kind: "Field",
371
+ name: { kind: "Name", value: "summary" }
372
+ }
373
+ ]
374
+ }
375
+ }
376
+ ]
377
+ }
378
+ },
379
+ {
380
+ kind: "Field",
381
+ name: { kind: "Name", value: "requestBody" },
382
+ selectionSet: {
383
+ kind: "SelectionSet",
384
+ selections: [
385
+ {
386
+ kind: "Field",
387
+ name: { kind: "Name", value: "content" },
388
+ selectionSet: {
389
+ kind: "SelectionSet",
390
+ selections: [
391
+ {
392
+ kind: "Field",
393
+ name: { kind: "Name", value: "mediaType" }
394
+ },
395
+ {
396
+ kind: "Field",
397
+ name: { kind: "Name", value: "encoding" },
398
+ selectionSet: {
399
+ kind: "SelectionSet",
400
+ selections: [
401
+ {
402
+ kind: "Field",
403
+ name: { kind: "Name", value: "name" }
404
+ }
405
+ ]
406
+ }
407
+ },
408
+ {
409
+ kind: "Field",
410
+ name: { kind: "Name", value: "schema" }
411
+ }
412
+ ]
413
+ }
414
+ },
415
+ { kind: "Field", name: { kind: "Name", value: "description" } },
416
+ { kind: "Field", name: { kind: "Name", value: "required" } }
417
+ ]
418
+ }
419
+ },
420
+ {
421
+ kind: "Field",
422
+ name: { kind: "Name", value: "responses" },
423
+ selectionSet: {
424
+ kind: "SelectionSet",
425
+ selections: [
426
+ { kind: "Field", name: { kind: "Name", value: "statusCode" } },
427
+ { kind: "Field", name: { kind: "Name", value: "links" } },
428
+ { kind: "Field", name: { kind: "Name", value: "description" } },
429
+ {
430
+ kind: "Field",
431
+ name: { kind: "Name", value: "content" },
432
+ selectionSet: {
433
+ kind: "SelectionSet",
434
+ selections: [
435
+ {
436
+ kind: "Field",
437
+ name: { kind: "Name", value: "mediaType" }
438
+ },
439
+ {
440
+ kind: "Field",
441
+ name: { kind: "Name", value: "encoding" },
442
+ selectionSet: {
443
+ kind: "SelectionSet",
444
+ selections: [
445
+ {
446
+ kind: "Field",
447
+ name: { kind: "Name", value: "name" }
448
+ }
449
+ ]
450
+ }
451
+ },
452
+ {
453
+ kind: "Field",
454
+ name: { kind: "Name", value: "schema" }
455
+ }
456
+ ]
457
+ }
458
+ }
459
+ ]
460
+ }
461
+ }
462
+ ]
463
+ }
464
+ }
465
+ ]
466
+ }, Un = {
467
+ kind: "Document",
468
+ definitions: [
469
+ {
470
+ kind: "OperationDefinition",
471
+ operation: "query",
472
+ name: { kind: "Name", value: "getServerQuery" },
473
+ variableDefinitions: [
474
+ {
475
+ kind: "VariableDefinition",
476
+ variable: {
477
+ kind: "Variable",
478
+ name: { kind: "Name", value: "input" }
479
+ },
480
+ type: {
481
+ kind: "NonNullType",
482
+ type: { kind: "NamedType", name: { kind: "Name", value: "JSON" } }
483
+ }
484
+ },
485
+ {
486
+ kind: "VariableDefinition",
487
+ variable: { kind: "Variable", name: { kind: "Name", value: "type" } },
488
+ type: {
489
+ kind: "NonNullType",
490
+ type: {
491
+ kind: "NamedType",
492
+ name: { kind: "Name", value: "SchemaType" }
493
+ }
494
+ }
495
+ }
496
+ ],
497
+ selectionSet: {
498
+ kind: "SelectionSet",
499
+ selections: [
500
+ {
501
+ kind: "Field",
502
+ name: { kind: "Name", value: "schema" },
503
+ arguments: [
504
+ {
505
+ kind: "Argument",
506
+ name: { kind: "Name", value: "input" },
507
+ value: {
508
+ kind: "Variable",
509
+ name: { kind: "Name", value: "input" }
510
+ }
511
+ },
512
+ {
513
+ kind: "Argument",
514
+ name: { kind: "Name", value: "type" },
515
+ value: {
516
+ kind: "Variable",
517
+ name: { kind: "Name", value: "type" }
518
+ }
519
+ }
520
+ ],
521
+ selectionSet: {
522
+ kind: "SelectionSet",
523
+ selections: [
524
+ { kind: "Field", name: { kind: "Name", value: "url" } }
525
+ ]
526
+ }
527
+ }
528
+ ]
529
+ }
530
+ }
531
+ ]
532
+ }, Jn = {
533
+ kind: "Document",
534
+ definitions: [
535
+ {
536
+ kind: "OperationDefinition",
537
+ operation: "query",
538
+ name: { kind: "Name", value: "GetCategories" },
539
+ variableDefinitions: [
540
+ {
541
+ kind: "VariableDefinition",
542
+ variable: {
543
+ kind: "Variable",
544
+ name: { kind: "Name", value: "input" }
545
+ },
546
+ type: {
547
+ kind: "NonNullType",
548
+ type: { kind: "NamedType", name: { kind: "Name", value: "JSON" } }
549
+ }
550
+ },
551
+ {
552
+ kind: "VariableDefinition",
553
+ variable: { kind: "Variable", name: { kind: "Name", value: "type" } },
554
+ type: {
555
+ kind: "NonNullType",
556
+ type: {
557
+ kind: "NamedType",
558
+ name: { kind: "Name", value: "SchemaType" }
559
+ }
560
+ }
561
+ }
562
+ ],
563
+ selectionSet: {
564
+ kind: "SelectionSet",
565
+ selections: [
566
+ {
567
+ kind: "Field",
568
+ name: { kind: "Name", value: "schema" },
569
+ arguments: [
570
+ {
571
+ kind: "Argument",
572
+ name: { kind: "Name", value: "input" },
573
+ value: {
574
+ kind: "Variable",
575
+ name: { kind: "Name", value: "input" }
576
+ }
577
+ },
578
+ {
579
+ kind: "Argument",
580
+ name: { kind: "Name", value: "type" },
581
+ value: {
582
+ kind: "Variable",
583
+ name: { kind: "Name", value: "type" }
584
+ }
585
+ }
586
+ ],
587
+ selectionSet: {
588
+ kind: "SelectionSet",
589
+ selections: [
590
+ {
591
+ kind: "Field",
592
+ name: { kind: "Name", value: "tags" },
593
+ selectionSet: {
594
+ kind: "SelectionSet",
595
+ selections: [
596
+ {
597
+ kind: "Field",
598
+ name: { kind: "Name", value: "__typename" }
599
+ },
600
+ { kind: "Field", name: { kind: "Name", value: "name" } },
601
+ {
602
+ kind: "Field",
603
+ name: { kind: "Name", value: "operations" },
604
+ selectionSet: {
605
+ kind: "SelectionSet",
606
+ selections: [
607
+ {
608
+ kind: "Field",
609
+ name: { kind: "Name", value: "__typename" }
610
+ },
611
+ {
612
+ kind: "Field",
613
+ name: { kind: "Name", value: "slug" }
614
+ },
615
+ {
616
+ kind: "Field",
617
+ name: { kind: "Name", value: "deprecated" }
618
+ },
619
+ {
620
+ kind: "Field",
621
+ name: { kind: "Name", value: "method" }
622
+ },
623
+ {
624
+ kind: "Field",
625
+ name: { kind: "Name", value: "summary" }
626
+ },
627
+ {
628
+ kind: "Field",
629
+ name: { kind: "Name", value: "operationId" }
630
+ },
631
+ {
632
+ kind: "Field",
633
+ name: { kind: "Name", value: "path" }
634
+ }
635
+ ]
636
+ }
637
+ }
638
+ ]
639
+ }
640
+ }
641
+ ]
642
+ }
643
+ }
644
+ ]
645
+ }
646
+ }
647
+ ]
648
+ }, Qn = {
649
+ "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": Hn,
650
+ "\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n": Wn,
651
+ "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n": Un,
652
+ "\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n __typename\n name\n operations {\n __typename\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n }\n": Jn
653
+ };
654
+ function Kn(n) {
655
+ return Qn[n] ?? {};
656
+ }
657
+ const Xn = ({
658
+ title: n = "An error occurred",
659
+ message: a,
660
+ category: t
661
+ }) => /* @__PURE__ */ e.jsxs("div", { className: mn + " h-full pt-[--padding-content-top]", children: [
662
+ t && /* @__PURE__ */ e.jsx(Nn, { children: t }),
663
+ n && /* @__PURE__ */ e.jsx(un, { level: 1, className: "flex gap-3.5 items-center", children: n }),
664
+ /* @__PURE__ */ e.jsx("p", { children: a }),
665
+ /* @__PURE__ */ e.jsx(xn, { to: "/", children: "Go back home" })
666
+ ] });
667
+ var Z = "Dialog", [Se, Qa] = ve(Z), [Yn, x] = Se(Z), Fe = (n) => {
668
+ const {
669
+ __scopeDialog: a,
670
+ children: t,
671
+ open: i,
672
+ defaultOpen: s,
673
+ onOpenChange: r,
674
+ modal: l = !0
675
+ } = n, o = c.useRef(null), u = c.useRef(null), [m = !1, p] = fe({
676
+ prop: i,
677
+ defaultProp: s,
678
+ onChange: r
679
+ });
680
+ return /* @__PURE__ */ e.jsx(
681
+ Yn,
682
+ {
683
+ scope: a,
684
+ triggerRef: o,
685
+ contentRef: u,
686
+ contentId: V(),
687
+ titleId: V(),
688
+ descriptionId: V(),
689
+ open: m,
690
+ onOpenChange: p,
691
+ onOpenToggle: c.useCallback(() => p((v) => !v), [p]),
692
+ modal: l,
693
+ children: t
694
+ }
695
+ );
696
+ };
697
+ Fe.displayName = Z;
698
+ var Ce = "DialogTrigger", Te = c.forwardRef(
699
+ (n, a) => {
700
+ const { __scopeDialog: t, ...i } = n, s = x(Ce, t), r = X(a, s.triggerRef);
701
+ return /* @__PURE__ */ e.jsx(
702
+ b.button,
703
+ {
704
+ type: "button",
705
+ "aria-haspopup": "dialog",
706
+ "aria-expanded": s.open,
707
+ "aria-controls": s.contentId,
708
+ "data-state": ae(s.open),
709
+ ...i,
710
+ ref: r,
711
+ onClick: S(n.onClick, s.onOpenToggle)
712
+ }
713
+ );
714
+ }
715
+ );
716
+ Te.displayName = Ce;
717
+ var ee = "DialogPortal", [Zn, De] = Se(ee, {
718
+ forceMount: void 0
719
+ }), we = (n) => {
720
+ const { __scopeDialog: a, forceMount: t, children: i, container: s } = n, r = x(ee, a);
721
+ return /* @__PURE__ */ e.jsx(Zn, { scope: a, forceMount: t, children: c.Children.map(i, (l) => /* @__PURE__ */ e.jsx(L, { present: t || r.open, children: /* @__PURE__ */ e.jsx(Tn, { asChild: !0, container: s, children: l }) })) });
722
+ };
723
+ we.displayName = ee;
724
+ var q = "DialogOverlay", Pe = c.forwardRef(
725
+ (n, a) => {
726
+ const t = De(q, n.__scopeDialog), { forceMount: i = t.forceMount, ...s } = n, r = x(q, n.__scopeDialog);
727
+ return r.modal ? /* @__PURE__ */ e.jsx(L, { present: i || r.open, children: /* @__PURE__ */ e.jsx(ea, { ...s, ref: a }) }) : null;
728
+ }
729
+ );
730
+ Pe.displayName = q;
731
+ var ea = c.forwardRef(
732
+ (n, a) => {
733
+ const { __scopeDialog: t, ...i } = n, s = x(q, t);
734
+ return (
735
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
736
+ // ie. when `Overlay` and `Content` are siblings
737
+ /* @__PURE__ */ e.jsx(yn, { as: ge, allowPinchZoom: !0, shards: [s.contentRef], children: /* @__PURE__ */ e.jsx(
738
+ b.div,
739
+ {
740
+ "data-state": ae(s.open),
741
+ ...i,
742
+ ref: a,
743
+ style: { pointerEvents: "auto", ...i.style }
744
+ }
745
+ ) })
746
+ );
747
+ }
748
+ ), C = "DialogContent", Re = c.forwardRef(
749
+ (n, a) => {
750
+ const t = De(C, n.__scopeDialog), { forceMount: i = t.forceMount, ...s } = n, r = x(C, n.__scopeDialog);
751
+ return /* @__PURE__ */ e.jsx(L, { present: i || r.open, children: r.modal ? /* @__PURE__ */ e.jsx(na, { ...s, ref: a }) : /* @__PURE__ */ e.jsx(aa, { ...s, ref: a }) });
752
+ }
753
+ );
754
+ Re.displayName = C;
755
+ var na = c.forwardRef(
756
+ (n, a) => {
757
+ const t = x(C, n.__scopeDialog), i = c.useRef(null), s = X(a, t.contentRef, i);
758
+ return c.useEffect(() => {
759
+ const r = i.current;
760
+ if (r) return bn(r);
761
+ }, []), /* @__PURE__ */ e.jsx(
762
+ _e,
763
+ {
764
+ ...n,
765
+ ref: s,
766
+ trapFocus: t.open,
767
+ disableOutsidePointerEvents: !0,
768
+ onCloseAutoFocus: S(n.onCloseAutoFocus, (r) => {
769
+ var l;
770
+ r.preventDefault(), (l = t.triggerRef.current) == null || l.focus();
771
+ }),
772
+ onPointerDownOutside: S(n.onPointerDownOutside, (r) => {
773
+ const l = r.detail.originalEvent, o = l.button === 0 && l.ctrlKey === !0;
774
+ (l.button === 2 || o) && r.preventDefault();
775
+ }),
776
+ onFocusOutside: S(
777
+ n.onFocusOutside,
778
+ (r) => r.preventDefault()
779
+ )
780
+ }
781
+ );
782
+ }
783
+ ), aa = c.forwardRef(
784
+ (n, a) => {
785
+ const t = x(C, n.__scopeDialog), i = c.useRef(!1), s = c.useRef(!1);
786
+ return /* @__PURE__ */ e.jsx(
787
+ _e,
788
+ {
789
+ ...n,
790
+ ref: a,
791
+ trapFocus: !1,
792
+ disableOutsidePointerEvents: !1,
793
+ onCloseAutoFocus: (r) => {
794
+ var l, o;
795
+ (l = n.onCloseAutoFocus) == null || l.call(n, r), r.defaultPrevented || (i.current || (o = t.triggerRef.current) == null || o.focus(), r.preventDefault()), i.current = !1, s.current = !1;
796
+ },
797
+ onInteractOutside: (r) => {
798
+ var u, m;
799
+ (u = n.onInteractOutside) == null || u.call(n, r), r.defaultPrevented || (i.current = !0, r.detail.originalEvent.type === "pointerdown" && (s.current = !0));
800
+ const l = r.target;
801
+ ((m = t.triggerRef.current) == null ? void 0 : m.contains(l)) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && s.current && r.preventDefault();
802
+ }
803
+ }
804
+ );
805
+ }
806
+ ), _e = c.forwardRef(
807
+ (n, a) => {
808
+ const { __scopeDialog: t, trapFocus: i, onOpenAutoFocus: s, onCloseAutoFocus: r, ...l } = n, o = x(C, t), u = c.useRef(null), m = X(a, u);
809
+ return jn(), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
810
+ /* @__PURE__ */ e.jsx(
811
+ Sn,
812
+ {
813
+ asChild: !0,
814
+ loop: !0,
815
+ trapped: i,
816
+ onMountAutoFocus: s,
817
+ onUnmountAutoFocus: r,
818
+ children: /* @__PURE__ */ e.jsx(
819
+ Fn,
820
+ {
821
+ role: "dialog",
822
+ id: o.contentId,
823
+ "aria-describedby": o.descriptionId,
824
+ "aria-labelledby": o.titleId,
825
+ "data-state": ae(o.open),
826
+ ...l,
827
+ ref: m,
828
+ onDismiss: () => o.onOpenChange(!1)
829
+ }
830
+ )
831
+ }
832
+ ),
833
+ /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
834
+ /* @__PURE__ */ e.jsx(ta, { titleId: o.titleId }),
835
+ /* @__PURE__ */ e.jsx(sa, { contentRef: u, descriptionId: o.descriptionId })
836
+ ] })
837
+ ] });
838
+ }
839
+ ), ne = "DialogTitle", Ee = c.forwardRef(
840
+ (n, a) => {
841
+ const { __scopeDialog: t, ...i } = n, s = x(ne, t);
842
+ return /* @__PURE__ */ e.jsx(b.h2, { id: s.titleId, ...i, ref: a });
843
+ }
844
+ );
845
+ Ee.displayName = ne;
846
+ var Ie = "DialogDescription", Ae = c.forwardRef(
847
+ (n, a) => {
848
+ const { __scopeDialog: t, ...i } = n, s = x(Ie, t);
849
+ return /* @__PURE__ */ e.jsx(b.p, { id: s.descriptionId, ...i, ref: a });
850
+ }
851
+ );
852
+ Ae.displayName = Ie;
853
+ var Oe = "DialogClose", $e = c.forwardRef(
854
+ (n, a) => {
855
+ const { __scopeDialog: t, ...i } = n, s = x(Oe, t);
856
+ return /* @__PURE__ */ e.jsx(
857
+ b.button,
858
+ {
859
+ type: "button",
860
+ ...i,
861
+ ref: a,
862
+ onClick: S(n.onClick, () => s.onOpenChange(!1))
863
+ }
864
+ );
865
+ }
866
+ );
867
+ $e.displayName = Oe;
868
+ function ae(n) {
869
+ return n ? "open" : "closed";
870
+ }
871
+ var Me = "DialogTitleWarning", [Ka, Ve] = Cn(Me, {
872
+ contentName: C,
873
+ titleName: ne,
874
+ docsSlug: "dialog"
875
+ }), ta = ({ titleId: n }) => {
876
+ const a = Ve(Me), t = `\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
877
+
878
+ If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.
879
+
880
+ For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;
881
+ return c.useEffect(() => {
882
+ n && (document.getElementById(n) || console.error(t));
883
+ }, [t, n]), null;
884
+ }, ia = "DialogDescriptionWarning", sa = ({ contentRef: n, descriptionId: a }) => {
885
+ const i = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ve(ia).contentName}}.`;
886
+ return c.useEffect(() => {
887
+ var r;
888
+ const s = (r = n.current) == null ? void 0 : r.getAttribute("aria-describedby");
889
+ a && s && (document.getElementById(a) || console.warn(i));
890
+ }, [i, n, a]), null;
891
+ }, ra = Fe, oa = Te, la = we, qe = Pe, Le = Re, ze = Ee, Ge = Ae, da = $e;
892
+ const ca = ra, ma = oa, ua = la, Be = c.forwardRef(({ className: n, ...a }, t) => /* @__PURE__ */ e.jsx(
893
+ qe,
894
+ {
895
+ ref: t,
896
+ className: g(
897
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
898
+ n
899
+ ),
900
+ ...a
901
+ }
902
+ ));
903
+ Be.displayName = qe.displayName;
904
+ const He = c.forwardRef(({ className: n, children: a, ...t }, i) => /* @__PURE__ */ e.jsxs(ua, { children: [
905
+ /* @__PURE__ */ e.jsx(Be, {}),
906
+ /* @__PURE__ */ e.jsxs(
907
+ Le,
908
+ {
909
+ ref: i,
910
+ className: g(
911
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg border-border",
912
+ n
913
+ ),
914
+ ...t,
915
+ children: [
916
+ a,
917
+ /* @__PURE__ */ e.jsxs(da, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
918
+ /* @__PURE__ */ e.jsx(je, { className: "h-4 w-4" }),
919
+ /* @__PURE__ */ e.jsx("span", { className: "sr-only", children: "Close" })
920
+ ] })
921
+ ]
922
+ }
923
+ )
924
+ ] }));
925
+ He.displayName = Le.displayName;
926
+ const We = c.forwardRef(({ className: n, ...a }, t) => /* @__PURE__ */ e.jsx(
927
+ ze,
928
+ {
929
+ ref: t,
930
+ className: g(
931
+ "text-lg font-semibold leading-none tracking-tight",
932
+ n
933
+ ),
934
+ ...a
935
+ }
936
+ ));
937
+ We.displayName = ze.displayName;
938
+ const pa = c.forwardRef(({ className: n, ...a }, t) => /* @__PURE__ */ e.jsx(
939
+ Ge,
940
+ {
941
+ ref: t,
942
+ className: g("text-sm text-muted-foreground", n),
943
+ ...a
944
+ }
945
+ ));
946
+ pa.displayName = Ge.displayName;
947
+ const U = c.forwardRef(({ className: n, ...a }, t) => /* @__PURE__ */ e.jsx(
948
+ "div",
949
+ {
950
+ ref: t,
951
+ className: g(
952
+ "rounded-xl border bg-card text-card-foreground shadow",
953
+ n
954
+ ),
955
+ ...a
956
+ }
957
+ ));
958
+ U.displayName = "Card";
959
+ const va = c.forwardRef(({ className: n, ...a }, t) => /* @__PURE__ */ e.jsx(
960
+ "div",
961
+ {
962
+ ref: t,
963
+ className: g("flex flex-col space-y-1.5 p-6", n),
964
+ ...a
965
+ }
966
+ ));
967
+ va.displayName = "CardHeader";
968
+ const ga = c.forwardRef(({ className: n, ...a }, t) => /* @__PURE__ */ e.jsx(
969
+ "h3",
970
+ {
971
+ ref: t,
972
+ className: g("font-semibold leading-none tracking-tight", n),
973
+ ...a
974
+ }
975
+ ));
976
+ ga.displayName = "CardTitle";
977
+ const fa = c.forwardRef(({ className: n, ...a }, t) => /* @__PURE__ */ e.jsx(
978
+ "p",
979
+ {
980
+ ref: t,
981
+ className: g("text-sm text-muted-foreground", n),
982
+ ...a
983
+ }
984
+ ));
985
+ fa.displayName = "CardDescription";
986
+ const ha = c.forwardRef(({ className: n, ...a }, t) => /* @__PURE__ */ e.jsx("div", { ref: t, className: g("p-6 pt-0", n), ...a }));
987
+ ha.displayName = "CardContent";
988
+ const ka = c.forwardRef(({ className: n, ...a }, t) => /* @__PURE__ */ e.jsx(
989
+ "div",
990
+ {
991
+ ref: t,
992
+ className: g("flex items-center p-6 pt-0", n),
993
+ ...a
994
+ }
995
+ ));
996
+ ka.displayName = "CardFooter";
997
+ var te = "Tabs", [xa, Xa] = ve(te, [
998
+ Ne
999
+ ]), Ue = Ne(), [Na, ie] = xa(te), Je = c.forwardRef(
1000
+ (n, a) => {
1001
+ const {
1002
+ __scopeTabs: t,
1003
+ value: i,
1004
+ onValueChange: s,
1005
+ defaultValue: r,
1006
+ orientation: l = "horizontal",
1007
+ dir: o,
1008
+ activationMode: u = "automatic",
1009
+ ...m
1010
+ } = n, p = Dn(o), [v, N] = fe({
1011
+ prop: i,
1012
+ onChange: s,
1013
+ defaultProp: r
1014
+ });
1015
+ return /* @__PURE__ */ e.jsx(
1016
+ Na,
1017
+ {
1018
+ scope: t,
1019
+ baseId: V(),
1020
+ value: v,
1021
+ onValueChange: N,
1022
+ orientation: l,
1023
+ dir: p,
1024
+ activationMode: u,
1025
+ children: /* @__PURE__ */ e.jsx(
1026
+ b.div,
1027
+ {
1028
+ dir: p,
1029
+ "data-orientation": l,
1030
+ ...m,
1031
+ ref: a
1032
+ }
1033
+ )
1034
+ }
1035
+ );
1036
+ }
1037
+ );
1038
+ Je.displayName = te;
1039
+ var Qe = "TabsList", Ke = c.forwardRef(
1040
+ (n, a) => {
1041
+ const { __scopeTabs: t, loop: i = !0, ...s } = n, r = ie(Qe, t), l = Ue(t);
1042
+ return /* @__PURE__ */ e.jsx(
1043
+ Vn,
1044
+ {
1045
+ asChild: !0,
1046
+ ...l,
1047
+ orientation: r.orientation,
1048
+ dir: r.dir,
1049
+ loop: i,
1050
+ children: /* @__PURE__ */ e.jsx(
1051
+ b.div,
1052
+ {
1053
+ role: "tablist",
1054
+ "aria-orientation": r.orientation,
1055
+ ...s,
1056
+ ref: a
1057
+ }
1058
+ )
1059
+ }
1060
+ );
1061
+ }
1062
+ );
1063
+ Ke.displayName = Qe;
1064
+ var Xe = "TabsTrigger", Ye = c.forwardRef(
1065
+ (n, a) => {
1066
+ const { __scopeTabs: t, value: i, disabled: s = !1, ...r } = n, l = ie(Xe, t), o = Ue(t), u = nn(l.baseId, i), m = an(l.baseId, i), p = i === l.value;
1067
+ return /* @__PURE__ */ e.jsx(
1068
+ qn,
1069
+ {
1070
+ asChild: !0,
1071
+ ...o,
1072
+ focusable: !s,
1073
+ active: p,
1074
+ children: /* @__PURE__ */ e.jsx(
1075
+ b.button,
1076
+ {
1077
+ type: "button",
1078
+ role: "tab",
1079
+ "aria-selected": p,
1080
+ "aria-controls": m,
1081
+ "data-state": p ? "active" : "inactive",
1082
+ "data-disabled": s ? "" : void 0,
1083
+ disabled: s,
1084
+ id: u,
1085
+ ...r,
1086
+ ref: a,
1087
+ onMouseDown: S(n.onMouseDown, (v) => {
1088
+ !s && v.button === 0 && v.ctrlKey === !1 ? l.onValueChange(i) : v.preventDefault();
1089
+ }),
1090
+ onKeyDown: S(n.onKeyDown, (v) => {
1091
+ [" ", "Enter"].includes(v.key) && l.onValueChange(i);
1092
+ }),
1093
+ onFocus: S(n.onFocus, () => {
1094
+ const v = l.activationMode !== "manual";
1095
+ !p && !s && v && l.onValueChange(i);
1096
+ })
1097
+ }
1098
+ )
1099
+ }
1100
+ );
1101
+ }
1102
+ );
1103
+ Ye.displayName = Xe;
1104
+ var Ze = "TabsContent", en = c.forwardRef(
1105
+ (n, a) => {
1106
+ const { __scopeTabs: t, value: i, forceMount: s, children: r, ...l } = n, o = ie(Ze, t), u = nn(o.baseId, i), m = an(o.baseId, i), p = i === o.value, v = c.useRef(p);
1107
+ return c.useEffect(() => {
1108
+ const N = requestAnimationFrame(() => v.current = !1);
1109
+ return () => cancelAnimationFrame(N);
1110
+ }, []), /* @__PURE__ */ e.jsx(L, { present: s || p, children: ({ present: N }) => /* @__PURE__ */ e.jsx(
1111
+ b.div,
1112
+ {
1113
+ "data-state": p ? "active" : "inactive",
1114
+ "data-orientation": o.orientation,
1115
+ role: "tabpanel",
1116
+ "aria-labelledby": u,
1117
+ hidden: !N,
1118
+ id: m,
1119
+ tabIndex: 0,
1120
+ ...l,
1121
+ ref: a,
1122
+ style: {
1123
+ ...n.style,
1124
+ animationDuration: v.current ? "0s" : void 0
1125
+ },
1126
+ children: N && r
1127
+ }
1128
+ ) });
1129
+ }
1130
+ );
1131
+ en.displayName = Ze;
1132
+ function nn(n, a) {
1133
+ return `${n}-trigger-${a}`;
1134
+ }
1135
+ function an(n, a) {
1136
+ return `${n}-content-${a}`;
1137
+ }
1138
+ var ya = Je, tn = Ke, sn = Ye, rn = en;
1139
+ const ue = ya, J = c.forwardRef(({ className: n, ...a }, t) => /* @__PURE__ */ e.jsx(
1140
+ tn,
1141
+ {
1142
+ ref: t,
1143
+ className: g(
1144
+ "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
1145
+ n
1146
+ ),
1147
+ ...a
1148
+ }
1149
+ ));
1150
+ J.displayName = tn.displayName;
1151
+ const w = c.forwardRef(({ className: n, ...a }, t) => /* @__PURE__ */ e.jsx(
1152
+ sn,
1153
+ {
1154
+ ref: t,
1155
+ className: g(
1156
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
1157
+ n
1158
+ ),
1159
+ ...a
1160
+ }
1161
+ ));
1162
+ w.displayName = sn.displayName;
1163
+ const P = c.forwardRef(({ className: n, ...a }, t) => /* @__PURE__ */ e.jsx(
1164
+ rn,
1165
+ {
1166
+ ref: t,
1167
+ className: g(
1168
+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1169
+ n
1170
+ ),
1171
+ ...a
1172
+ }
1173
+ ));
1174
+ P.displayName = rn.displayName;
1175
+ const ba = async (n, a, t = 5e3) => {
1176
+ const i = new AbortController(), s = i.signal, r = fetch(n, { ...a, signal: s }), l = new Promise((o, u) => {
1177
+ const m = setTimeout(() => {
1178
+ i.abort("Request timed out"), u(new Error("Request timed out"));
1179
+ }, t);
1180
+ r.finally(() => clearTimeout(m));
1181
+ });
1182
+ return Promise.race([r, l]);
1183
+ }, B = (n) => Math.abs(
1184
+ isNaN(parseInt(n)) ? n.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(n)) ? 0 : parseInt(n)
1185
+ ), H = (n) => n.length > 1 ? parseInt(n.split("").reduce((a, t) => `${B(a) + B(t)}`)) : B(n), ja = (n, a = {}) => {
1186
+ const t = (3 * H(n) + 2 * H(n) + H(n)) % 360, { saturation: i = 75, lightness: s = 60 } = a;
1187
+ return `${t}deg ${i}% ${s}%`;
1188
+ }, W = "data-linked-param", Sa = (n) => {
1189
+ const [a] = pn();
1190
+ return ja(
1191
+ n,
1192
+ a ? void 0 : { saturation: 85, lightness: 50 }
1193
+ );
1194
+ }, on = ({
1195
+ name: n,
1196
+ className: a,
1197
+ backgroundOpacity: t = "100%",
1198
+ borderOpacity: i = "100%",
1199
+ slug: s,
1200
+ children: r,
1201
+ onClick: l
1202
+ }) => {
1203
+ const o = ke(null), u = n.replace(/[{}]/g, ""), m = s == null ? void 0 : s.replace(/[{}]/g, ""), p = Sa(u), v = `hsl(${p} / ${i})`, N = `hsl(${p} / ${t})`;
1204
+ return xe(() => {
1205
+ if (!m || !o.current) return;
1206
+ const y = () => {
1207
+ document.querySelectorAll(`[${W}="${m}"]`).forEach((h) => {
1208
+ h instanceof HTMLElement && (h.dataset.active = "true");
1209
+ });
1210
+ }, j = () => {
1211
+ document.querySelectorAll(`[${W}="${m}"]`).forEach((h) => {
1212
+ h instanceof HTMLElement && (h.dataset.active = "false");
1213
+ });
1214
+ };
1215
+ return o.current.addEventListener("mouseenter", y), o.current.addEventListener("mouseleave", j), () => {
1216
+ var h, f;
1217
+ (h = o.current) == null || h.removeEventListener("mouseenter", y), (f = o.current) == null || f.removeEventListener("mouseleave", j);
1218
+ };
1219
+ }, [m]), /* @__PURE__ */ e.jsxs(
1220
+ "span",
1221
+ {
1222
+ className: g("inline-flex relative rounded group", a),
1223
+ [W]: m,
1224
+ ref: o,
1225
+ onClick: l,
1226
+ children: [
1227
+ /* @__PURE__ */ e.jsx(
1228
+ "span",
1229
+ {
1230
+ className: "absolute inset-0 border-b-2 transition-opacity duration-200 opacity-30 group-data-[active=true]:opacity-100",
1231
+ style: { borderColor: v, backgroundColor: N }
1232
+ }
1233
+ ),
1234
+ /* @__PURE__ */ e.jsx("span", { className: "relative", children: r ?? n })
1235
+ ]
1236
+ }
1237
+ );
1238
+ }, Fa = (n, a, t) => {
1239
+ const i = a.replace(
1240
+ /\{(\w+)}/g,
1241
+ (r, l) => {
1242
+ var o;
1243
+ return ((o = t.pathParams.find((u) => u.name === l)) == null ? void 0 : o.value) || `{${l}}`;
1244
+ }
1245
+ ), s = new URL(i, n);
1246
+ return t.queryParams.filter((r) => r.active).forEach((r) => {
1247
+ s.searchParams.set(r.name, r.value);
1248
+ }), s;
1249
+ }, Ca = (n, a) => {
1250
+ const t = c.forwardRef(({ className: i, asChild: s, ...r }, l) => {
1251
+ const o = s ? ge : n;
1252
+ return c.createElement(o, {
1253
+ ...r,
1254
+ ref: l,
1255
+ className: g(a, i)
1256
+ });
1257
+ });
1258
+ return t.displayName = `VariantComponent(${n})`, t;
1259
+ }, Q = Ca(
1260
+ "input",
1261
+ "px-2 bg-transparent h-6 font-mono text-xs m-2"
1262
+ ), Ta = ({
1263
+ control: n,
1264
+ register: a
1265
+ }) => {
1266
+ const { fields: t, append: i, remove: s } = Y({
1267
+ control: n,
1268
+ name: "headers"
1269
+ }), r = de({ name: "identity", control: n }), l = de({ name: "headers", control: n }), o = r !== E;
1270
+ return /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-[1fr_1fr_auto]", children: [
1271
+ t.map((u, m) => {
1272
+ var v;
1273
+ const p = o && ((v = l.at(m)) == null ? void 0 : v.name) === "Authorization";
1274
+ return /* @__PURE__ */ e.jsxs(
1275
+ "div",
1276
+ {
1277
+ className: g(
1278
+ "grid-cols-subgrid col-span-full grid items-center gap-x-2 has-[:focus]:bg-muted hover:bg-muted rounded overflow-hidden group",
1279
+ p && "line-through"
1280
+ ),
1281
+ title: p ? "This header is disabled because authentication was selected" : void 0,
1282
+ children: [
1283
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center", children: [
1284
+ /* @__PURE__ */ e.jsx(
1285
+ Q,
1286
+ {
1287
+ ...a(`headers.${m}.name`),
1288
+ placeholder: "Name",
1289
+ className: "peer",
1290
+ autoComplete: "off"
1291
+ }
1292
+ ),
1293
+ p && /* @__PURE__ */ e.jsx(vn, { size: 16, className: "text-amber-500" })
1294
+ ] }),
1295
+ /* @__PURE__ */ e.jsx(
1296
+ Q,
1297
+ {
1298
+ placeholder: "Value",
1299
+ className: "peer",
1300
+ ...a(`headers.${m}.value`),
1301
+ autoComplete: "off"
1302
+ }
1303
+ ),
1304
+ /* @__PURE__ */ e.jsx(
1305
+ "button",
1306
+ {
1307
+ className: "hover:bg-black/5 p-1 rounded mr-2 text-muted-foreground invisible group-hover:visible peer-focus:visible",
1308
+ onClick: () => {
1309
+ s(m);
1310
+ },
1311
+ type: "button",
1312
+ children: /* @__PURE__ */ e.jsx(je, { size: 16 })
1313
+ }
1314
+ ),
1315
+ /* @__PURE__ */ e.jsx("div", { className: "col-span-full border-b border-border" })
1316
+ ]
1317
+ },
1318
+ u.id
1319
+ );
1320
+ }),
1321
+ /* @__PURE__ */ e.jsx(
1322
+ I,
1323
+ {
1324
+ className: "col-span-full mt-4",
1325
+ onClick: () => i({ name: "", value: "" }),
1326
+ type: "button",
1327
+ children: "Add header"
1328
+ }
1329
+ )
1330
+ ] });
1331
+ }, Da = ({
1332
+ control: n
1333
+ }) => {
1334
+ const { fields: a } = Y({
1335
+ control: n,
1336
+ name: "pathParams"
1337
+ });
1338
+ return /* @__PURE__ */ e.jsx("table", { className: "w-full table-auto [&_td]:border [&_td]:py-1 [&_td]:px-2", children: /* @__PURE__ */ e.jsx("tbody", { children: a.map((t, i) => /* @__PURE__ */ e.jsxs("tr", { className: "hover:bg-accent/40", children: [
1339
+ /* @__PURE__ */ e.jsx("td", { children: /* @__PURE__ */ e.jsx(
1340
+ F,
1341
+ {
1342
+ control: n,
1343
+ name: `pathParams.${i}.value`,
1344
+ render: ({ field: s }) => /* @__PURE__ */ e.jsxs("div", { children: [
1345
+ /* @__PURE__ */ e.jsx(
1346
+ on,
1347
+ {
1348
+ slug: t.name,
1349
+ name: t.name,
1350
+ backgroundOpacity: "25%",
1351
+ borderOpacity: s.value ? "100%" : "0",
1352
+ className: g(
1353
+ "font-mono text-xs m-2",
1354
+ !s.value && "opacity-60"
1355
+ )
1356
+ }
1357
+ ),
1358
+ "*"
1359
+ ] })
1360
+ }
1361
+ ) }),
1362
+ /* @__PURE__ */ e.jsx("td", { children: /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
1363
+ /* @__PURE__ */ e.jsx(
1364
+ F,
1365
+ {
1366
+ control: n,
1367
+ name: `pathParams.${i}.value`,
1368
+ render: ({ field: s }) => /* @__PURE__ */ e.jsx(
1369
+ he,
1370
+ {
1371
+ ...s,
1372
+ placeholder: "Enter value",
1373
+ className: g(
1374
+ "border-0 shadow-none ring-0 font-mono text-xs"
1375
+ )
1376
+ }
1377
+ )
1378
+ }
1379
+ ),
1380
+ /* @__PURE__ */ e.jsx(
1381
+ F,
1382
+ {
1383
+ control: n,
1384
+ name: `pathParams.${i}.value`,
1385
+ render: ({ field: s }) => /* @__PURE__ */ e.jsx(
1386
+ I,
1387
+ {
1388
+ size: "icon",
1389
+ type: "button",
1390
+ variant: "ghost",
1391
+ "aria-label": "Clear value",
1392
+ className: g(
1393
+ "ms-2",
1394
+ s.value.length === 0 ? "opacity-0 pointer-events-none" : "opacity-100"
1395
+ ),
1396
+ title: "Clear value",
1397
+ onClick: () => s.onChange(""),
1398
+ children: /* @__PURE__ */ e.jsx(be, { size: 16 })
1399
+ }
1400
+ )
1401
+ }
1402
+ )
1403
+ ] }) })
1404
+ ] }, t.id)) }) });
1405
+ }, wa = ({
1406
+ control: n,
1407
+ queryParams: a
1408
+ }) => {
1409
+ const { fields: t } = Y({
1410
+ control: n,
1411
+ name: "queryParams"
1412
+ }), i = wn(), s = a.map((o) => !!o.isRequired), l = i.watch("identity") !== E;
1413
+ return /* @__PURE__ */ e.jsx("div", { className: "", children: /* @__PURE__ */ e.jsx("table", { className: "w-full [&_td]:border [&_td]:p-1.5 [&_td]:px-2", children: /* @__PURE__ */ e.jsx("tbody", { children: t.filter(
1414
+ // TODO remove this hack for Accu or make it more generic
1415
+ (o) => !(l && o.name === "apikey")
1416
+ ).map((o, u) => /* @__PURE__ */ e.jsxs("tr", { className: "hover:bg-accent/40", children: [
1417
+ /* @__PURE__ */ e.jsx("td", { className: "text-center", children: /* @__PURE__ */ e.jsx(
1418
+ F,
1419
+ {
1420
+ control: n,
1421
+ name: `queryParams.${u}.active`,
1422
+ render: ({ field: m }) => /* @__PURE__ */ e.jsx(
1423
+ "input",
1424
+ {
1425
+ type: "checkbox",
1426
+ id: `queryParams.${u}.active`,
1427
+ checked: m.value,
1428
+ onChange: m.onChange
1429
+ }
1430
+ )
1431
+ }
1432
+ ) }),
1433
+ /* @__PURE__ */ e.jsx("td", { children: /* @__PURE__ */ e.jsx(
1434
+ F,
1435
+ {
1436
+ control: n,
1437
+ render: ({ field: m }) => /* @__PURE__ */ e.jsx(Q, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1438
+ "label",
1439
+ {
1440
+ className: "flex items-center cursor-pointer",
1441
+ htmlFor: `queryParams.${u}.active`,
1442
+ title: s[u] ? "Required field" : void 0,
1443
+ children: [
1444
+ m.value,
1445
+ s[u] && /* @__PURE__ */ e.jsx("sup", { children: " *" })
1446
+ ]
1447
+ }
1448
+ ) }),
1449
+ name: `queryParams.${u}.name`
1450
+ }
1451
+ ) }),
1452
+ /* @__PURE__ */ e.jsx("td", { children: /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
1453
+ /* @__PURE__ */ e.jsx(
1454
+ F,
1455
+ {
1456
+ control: n,
1457
+ render: ({ field: m }) => /* @__PURE__ */ e.jsx(
1458
+ he,
1459
+ {
1460
+ ...m,
1461
+ onChange: (p) => {
1462
+ m.onChange(p.target.value), p.target.value.length > 0 && i.setValue(`queryParams.${u}.active`, !0);
1463
+ },
1464
+ placeholder: "Enter value",
1465
+ className: "w-full border-0 shadow-none text-xs font-mono"
1466
+ }
1467
+ ),
1468
+ name: `queryParams.${u}.value`
1469
+ }
1470
+ ),
1471
+ /* @__PURE__ */ e.jsx(
1472
+ F,
1473
+ {
1474
+ control: n,
1475
+ render: ({ field: m }) => /* @__PURE__ */ e.jsx(
1476
+ I,
1477
+ {
1478
+ size: "icon",
1479
+ type: "button",
1480
+ variant: "ghost",
1481
+ "aria-label": "Clear value",
1482
+ className: g(
1483
+ "ms-2",
1484
+ m.value.length === 0 ? "opacity-0 pointer-events-none" : "opacity-100"
1485
+ ),
1486
+ title: "Clear value",
1487
+ onClick: () => m.onChange(""),
1488
+ children: /* @__PURE__ */ e.jsx(be, { size: 16 })
1489
+ }
1490
+ ),
1491
+ name: `queryParams.${u}.value`
1492
+ }
1493
+ )
1494
+ ] }) })
1495
+ ] }, o.id)) }) }) });
1496
+ }, E = "__none";
1497
+ function Pa(n) {
1498
+ var t;
1499
+ return (t = Object.entries({
1500
+ "application/json": "json",
1501
+ "text/json": "json",
1502
+ "text/html": "html",
1503
+ "text/css": "css",
1504
+ "text/javascript": "javascript",
1505
+ "application/xml": "xml",
1506
+ "application/xhtml+xml": "xhtml",
1507
+ "text/plain": "plain"
1508
+ }).find(
1509
+ ([i]) => n.includes(i)
1510
+ )) == null ? void 0 : t[0][1];
1511
+ }
1512
+ const Ra = {
1513
+ 200: "OK",
1514
+ 201: "Created",
1515
+ 202: "Accepted",
1516
+ 204: "No Content",
1517
+ 400: "Bad Request",
1518
+ 401: "Unauthorized",
1519
+ 403: "Forbidden",
1520
+ 404: "Not Found",
1521
+ 405: "Method Not Allowed",
1522
+ 500: "Internal Server Error"
1523
+ }, _a = ({
1524
+ server: n,
1525
+ url: a,
1526
+ method: t,
1527
+ headers: i = [],
1528
+ queryParams: s = [],
1529
+ pathParams: r = [],
1530
+ defaultBody: l = ""
1531
+ }) => {
1532
+ var re, oe, le;
1533
+ const { register: o, control: u, handleSubmit: m, watch: p, setValue: v, ...N } = Pn({
1534
+ defaultValues: {
1535
+ body: l,
1536
+ queryParams: s.map((d) => ({
1537
+ name: d.name,
1538
+ value: d.defaultValue ?? "",
1539
+ active: d.defaultActive ?? !1
1540
+ })),
1541
+ pathParams: r.map((d) => ({
1542
+ name: d.name,
1543
+ value: d.defaultValue ?? ""
1544
+ })),
1545
+ headers: i.map((d) => ({
1546
+ name: d.name,
1547
+ value: d.defaultValue ?? ""
1548
+ })),
1549
+ identity: E
1550
+ }
1551
+ }), y = p(), j = Ln(), h = ke(!1);
1552
+ xe(() => {
1553
+ var k;
1554
+ if (h.current) return;
1555
+ const d = (k = j.data) == null ? void 0 : k.at(0);
1556
+ d && (v("identity", d.id), h.current = !0);
1557
+ }, [v, j.data]);
1558
+ const f = Rn({
1559
+ mutationFn: async (d) => {
1560
+ var _, M;
1561
+ const k = Fa(n, a, d), R = performance.now(), A = new Request(k, {
1562
+ method: t.toUpperCase(),
1563
+ headers: Object.fromEntries(
1564
+ d.headers.filter((D) => D.name).map((D) => [D.name, D.value])
1565
+ )
1566
+ });
1567
+ d.identity !== E && ((M = (_ = j.data) == null ? void 0 : _.find((D) => D.id === d.identity)) == null || M.authorizeRequest(A));
1568
+ const T = await ba(A), O = performance.now() - R, $ = await T.text();
1569
+ return {
1570
+ status: T.status,
1571
+ headers: T.headers,
1572
+ size: $.length,
1573
+ body: $,
1574
+ time: O
1575
+ };
1576
+ }
1577
+ }), ln = a.split("/").map((d, k, R) => {
1578
+ var _;
1579
+ const A = d.startsWith("{") && d.endsWith("}"), T = d.replace(/[{}]/g, ""), O = (_ = y.pathParams.find((M) => M.name === T)) == null ? void 0 : _.value, $ = O ? /* @__PURE__ */ e.jsx(on, { backgroundOpacity: "25%", name: d, slug: d, children: encodeURIComponent(O) }) : /* @__PURE__ */ e.jsx(
1580
+ "span",
1581
+ {
1582
+ className: "underline decoration-wavy decoration-red-500",
1583
+ title: `Missing value for path parameter \`${T}\``,
1584
+ children: d
1585
+ }
1586
+ );
1587
+ return (
1588
+ // eslint-disable-next-line react/no-array-index-key
1589
+ /* @__PURE__ */ e.jsxs(G, { children: [
1590
+ A ? $ : d,
1591
+ k < R.length - 1 && "/",
1592
+ /* @__PURE__ */ e.jsx("wbr", {})
1593
+ ] }, d + k)
1594
+ );
1595
+ }), dn = Pa(
1596
+ ((re = f.data) == null ? void 0 : re.headers.get("Content-Type")) ?? ""
1597
+ ), z = Array.from(((oe = f.data) == null ? void 0 : oe.headers.entries()) ?? []), se = y.queryParams.filter((d) => d.active).map((d, k, R) => /* @__PURE__ */ e.jsxs(G, { children: [
1598
+ d.name,
1599
+ "=",
1600
+ encodeURIComponent(d.value).replaceAll("%20", "+"),
1601
+ k < R.length - 1 && "&",
1602
+ /* @__PURE__ */ e.jsx("wbr", {})
1603
+ ] }, d.name));
1604
+ return /* @__PURE__ */ e.jsx(
1605
+ _n,
1606
+ {
1607
+ register: o,
1608
+ control: u,
1609
+ handleSubmit: m,
1610
+ watch: p,
1611
+ setValue: v,
1612
+ ...N,
1613
+ children: /* @__PURE__ */ e.jsx("form", { onSubmit: m((d) => f.mutateAsync(d)), children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 text-sm h-full", children: [
1614
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 p-8 bg-muted/50 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:left-auto", children: [
1615
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-stretch", children: [
1616
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md border-border", children: [
1617
+ /* @__PURE__ */ e.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono", children: t.toUpperCase() }),
1618
+ /* @__PURE__ */ e.jsxs("div", { className: "p-2 font-mono text-xs", children: [
1619
+ ln,
1620
+ se.length > 0 ? "?" : "",
1621
+ se
1622
+ ] })
1623
+ ] }),
1624
+ /* @__PURE__ */ e.jsx(I, { type: "submit", className: "h-auto flex gap-1", children: "Send" })
1625
+ ] }),
1626
+ /* @__PURE__ */ e.jsxs(
1627
+ ue,
1628
+ {
1629
+ defaultValue: r.length > 0 ? "parameters" : "headers",
1630
+ children: [
1631
+ /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between", children: [
1632
+ /* @__PURE__ */ e.jsxs(J, { children: [
1633
+ r.length > 0 && /* @__PURE__ */ e.jsx(w, { value: "parameters", children: "Parameters" }),
1634
+ /* @__PURE__ */ e.jsxs(w, { value: "headers", children: [
1635
+ "Headers",
1636
+ " ",
1637
+ y.headers.length > 0 && `(${y.headers.length})`
1638
+ ] }),
1639
+ /* @__PURE__ */ e.jsx(
1640
+ w,
1641
+ {
1642
+ value: "body",
1643
+ disabled: !["POST", "PUT", "PATCH", "DELETE"].includes(
1644
+ t.toUpperCase()
1645
+ ),
1646
+ children: "Body"
1647
+ }
1648
+ )
1649
+ ] }),
1650
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center", children: [
1651
+ "Auth:",
1652
+ /* @__PURE__ */ e.jsxs(
1653
+ En,
1654
+ {
1655
+ onValueChange: (d) => v("identity", d),
1656
+ value: y.identity,
1657
+ defaultValue: y.identity,
1658
+ children: [
1659
+ /* @__PURE__ */ e.jsx(In, { className: "w-[180px] flex", children: j.isPending ? /* @__PURE__ */ e.jsx(me, {}) : /* @__PURE__ */ e.jsx(An, {}) }),
1660
+ /* @__PURE__ */ e.jsxs(On, { align: "center", children: [
1661
+ /* @__PURE__ */ e.jsx(ce, { value: E, children: "None" }),
1662
+ (le = j.data) == null ? void 0 : le.map((d) => /* @__PURE__ */ e.jsx(ce, { value: d.id, children: d.label }, d.id))
1663
+ ] })
1664
+ ]
1665
+ }
1666
+ )
1667
+ ] })
1668
+ ] }),
1669
+ /* @__PURE__ */ e.jsx(P, { value: "headers", children: /* @__PURE__ */ e.jsx(Ta, { control: u, register: o }) }),
1670
+ /* @__PURE__ */ e.jsxs(P, { value: "parameters", children: [
1671
+ r.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1672
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
1673
+ /* @__PURE__ */ e.jsx(Da, { control: u })
1674
+ ] }),
1675
+ s.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1676
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
1677
+ /* @__PURE__ */ e.jsx(wa, { control: u, queryParams: s })
1678
+ ] })
1679
+ ] }),
1680
+ /* @__PURE__ */ e.jsx(P, { value: "body", children: /* @__PURE__ */ e.jsx(
1681
+ "textarea",
1682
+ {
1683
+ ...o("body"),
1684
+ className: "border w-full rounded p-2 bg-muted h-40"
1685
+ }
1686
+ ) })
1687
+ ]
1688
+ }
1689
+ )
1690
+ ] }),
1691
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-4 p-8 bg-muted/70", children: f.error ? /* @__PURE__ */ e.jsxs("div", { children: [
1692
+ "Error:",
1693
+ " ",
1694
+ f.error.message || String(f.error) || "Unexpected error"
1695
+ ] }) : f.data ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
1696
+ /* @__PURE__ */ e.jsx("div", { className: "flex gap-2", children: /* @__PURE__ */ e.jsxs("div", { className: "flex text-xs gap-6", children: [
1697
+ /* @__PURE__ */ e.jsxs("div", { children: [
1698
+ "Status: ",
1699
+ f.data.status,
1700
+ " ",
1701
+ Ra[f.data.status] ?? ""
1702
+ ] }),
1703
+ /* @__PURE__ */ e.jsxs("div", { children: [
1704
+ "Time: ",
1705
+ f.data.time.toFixed(0),
1706
+ "ms"
1707
+ ] }),
1708
+ /* @__PURE__ */ e.jsxs("div", { children: [
1709
+ "Size: ",
1710
+ f.data.size,
1711
+ " B"
1712
+ ] })
1713
+ ] }) }),
1714
+ /* @__PURE__ */ e.jsxs(ue, { defaultValue: "response", children: [
1715
+ /* @__PURE__ */ e.jsxs(J, { children: [
1716
+ /* @__PURE__ */ e.jsx(w, { value: "response", children: "Response" }),
1717
+ /* @__PURE__ */ e.jsx(w, { value: "headers", children: z.length ? `Headers (${z.length})` : "No headers" })
1718
+ ] }),
1719
+ /* @__PURE__ */ e.jsx(P, { value: "response", children: /* @__PURE__ */ e.jsx(U, { className: "shadow-none p-4", children: /* @__PURE__ */ e.jsx(
1720
+ pe,
1721
+ {
1722
+ language: dn ?? "json",
1723
+ noBackground: !0,
1724
+ className: "overflow-x-auto ",
1725
+ code: f.data.body ?? JSON.stringify("")
1726
+ }
1727
+ ) }) }),
1728
+ /* @__PURE__ */ e.jsx(P, { value: "headers", children: /* @__PURE__ */ e.jsxs(U, { className: "grid grid-cols-2 w-full gap-2.5 font-mono text-xs shadow-none p-4", children: [
1729
+ /* @__PURE__ */ e.jsx("div", { className: "font-semibold", children: "Key" }),
1730
+ /* @__PURE__ */ e.jsx("div", { className: "font-semibold", children: "Value" }),
1731
+ z.map(([d, k]) => /* @__PURE__ */ e.jsxs(G, { children: [
1732
+ /* @__PURE__ */ e.jsx("div", { children: d }),
1733
+ /* @__PURE__ */ e.jsx("div", { children: k })
1734
+ ] }, d))
1735
+ ] }) })
1736
+ ] })
1737
+ ] }) : /* @__PURE__ */ e.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ e.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: f.isPending ? /* @__PURE__ */ e.jsx(me, {}) : "Send a request first to see the response here" }) }) })
1738
+ ] }) })
1739
+ }
1740
+ );
1741
+ }, Ea = (n) => {
1742
+ const [a, t] = Mn(!1);
1743
+ return /* @__PURE__ */ e.jsxs(ca, { onOpenChange: (i) => t(i), children: [
1744
+ /* @__PURE__ */ e.jsx(ma, { asChild: !0, children: n.children ?? /* @__PURE__ */ e.jsx(
1745
+ ye,
1746
+ {
1747
+ className: "cursor-pointer text-primary hover:text-primary/80",
1748
+ size: 16
1749
+ }
1750
+ ) }),
1751
+ /* @__PURE__ */ e.jsxs(
1752
+ He,
1753
+ {
1754
+ className: "max-w-screen-xl w-full h-5/6 overflow-auto p-0",
1755
+ "aria-describedby": void 0,
1756
+ children: [
1757
+ /* @__PURE__ */ e.jsx($n, { children: /* @__PURE__ */ e.jsx(We, { children: "Playground" }) }),
1758
+ a && /* @__PURE__ */ e.jsx(_a, { ...n })
1759
+ ]
1760
+ }
1761
+ )
1762
+ ] });
1763
+ }, Ia = Kn(`
1764
+ query GetCategories($input: JSON!, $type: SchemaType!) {
1765
+ schema(input: $input, type: $type) {
1766
+ tags {
1767
+ __typename
1768
+ name
1769
+ operations {
1770
+ __typename
1771
+ slug
1772
+ deprecated
1773
+ method
1774
+ summary
1775
+ operationId
1776
+ path
1777
+ }
1778
+ }
1779
+ }
1780
+ }
1781
+ `), Aa = () => {
1782
+ const n = cn(), a = n instanceof Error ? /* @__PURE__ */ e.jsx(pe, { code: n.message }) : "An unknown error occurred";
1783
+ return /* @__PURE__ */ e.jsx(Xn, { category: "Error", title: "An error occurred", message: a });
1784
+ }, Ya = (n) => {
1785
+ const a = n.path ?? "/reference", t = n.server ? new gn({
1786
+ url: n.server,
1787
+ exchanges: [fn, hn]
1788
+ }) : kn({ useMemoryClient: n.inMemory ?? !1 });
1789
+ return {
1790
+ getHead: () => {
1791
+ if (n.type === "url")
1792
+ return /* @__PURE__ */ e.jsx(
1793
+ "link",
1794
+ {
1795
+ rel: "preload",
1796
+ href: n.input,
1797
+ as: "fetch",
1798
+ crossOrigin: "anonymous"
1799
+ }
1800
+ );
1801
+ if (n.server)
1802
+ return /* @__PURE__ */ e.jsx("link", { rel: "preconnect", href: n.server });
1803
+ },
1804
+ getMdxComponents: () => ({
1805
+ OpenPlaygroundButton: (i) => /* @__PURE__ */ e.jsx(Ea, { ...i, children: /* @__PURE__ */ e.jsxs(I, { className: "gap-2 items-center", variant: "outline", children: [
1806
+ "Open in Playground ",
1807
+ /* @__PURE__ */ e.jsx(ye, { size: 16 })
1808
+ ] }) })
1809
+ }),
1810
+ getNavigation: async (i) => {
1811
+ if (!zn({ path: a, end: !1 }, i))
1812
+ return [];
1813
+ const { data: s } = await t.query(Ia, {
1814
+ input: n.input,
1815
+ type: n.type
1816
+ });
1817
+ if (!s) return [];
1818
+ const r = s.schema.tags.filter((l) => l.operations.length > 0).map((l) => ({
1819
+ path: i,
1820
+ label: l.name ?? "",
1821
+ collapsible: !1,
1822
+ children: l.operations.map((o) => ({
1823
+ path: `#${o.slug}`,
1824
+ muted: !!o.deprecated,
1825
+ title: o.summary ?? o.path,
1826
+ label: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 min-w-0 justify-between gap-2", children: [
1827
+ /* @__PURE__ */ e.jsx("span", { className: "truncate", children: o.summary ?? o.path }),
1828
+ /* @__PURE__ */ e.jsx(Bn, { method: o.method })
1829
+ ] })
1830
+ }))
1831
+ }));
1832
+ return r.unshift({
1833
+ path: i,
1834
+ label: "Overview",
1835
+ collapsible: !1,
1836
+ children: [{ path: "#description", label: "Description" }]
1837
+ }), r;
1838
+ },
1839
+ getRoutes: () => [
1840
+ {
1841
+ async lazy() {
1842
+ const { OpenApiRoute: i } = await import("./Route-CogU1ofM.js");
1843
+ return {
1844
+ element: /* @__PURE__ */ e.jsx(i, { client: t, config: n })
1845
+ };
1846
+ },
1847
+ errorElement: /* @__PURE__ */ e.jsx(Aa, {}),
1848
+ children: [
1849
+ {
1850
+ path: a,
1851
+ children: [
1852
+ {
1853
+ index: !0,
1854
+ async lazy() {
1855
+ const { OperationList: i } = await import("./OperationList-qfNEBPAx.js");
1856
+ return { element: /* @__PURE__ */ e.jsx(i, {}) };
1857
+ }
1858
+ }
1859
+ ]
1860
+ }
1861
+ ]
1862
+ }
1863
+ ]
1864
+ };
1865
+ };
1866
+ export {
1867
+ on as C,
1868
+ Xn as E,
1869
+ Ja as M,
1870
+ Ea as P,
1871
+ ue as T,
1872
+ J as a,
1873
+ w as b,
1874
+ P as c,
1875
+ Kn as g,
1876
+ Ya as o
1877
+ };
1878
+ //# sourceMappingURL=index-DccqEFTy.js.map