zudoku 0.32.6 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +3 -0
- package/dist/app/main.js +1 -1
- package/dist/app/main.js.map +1 -1
- package/dist/cli/build/handler.d.ts +1 -3
- package/dist/cli/build/handler.js +7 -0
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/cli.js +5 -0
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.d.ts +11 -3
- package/dist/cli/cmds/build.js +20 -13
- package/dist/cli/cmds/build.js.map +1 -1
- package/dist/cli/cmds/preview.d.ts +16 -0
- package/dist/cli/cmds/preview.js +25 -0
- package/dist/cli/cmds/preview.js.map +1 -0
- package/dist/cli/preview/handler.d.ts +3 -0
- package/dist/cli/preview/handler.js +37 -0
- package/dist/cli/preview/handler.js.map +1 -0
- package/dist/config/common.d.ts +5 -2
- package/dist/config/config.d.ts +2 -7
- package/dist/config/loader.d.ts +4 -4
- package/dist/config/loader.js +7 -4
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/validate.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.d.ts +2 -2
- package/dist/lib/authentication/providers/auth0.js +1 -0
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +4 -3
- package/dist/lib/authentication/providers/openid.js +4 -2
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/ThemeSwitch.js +1 -1
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/Zudoku.d.ts +1 -1
- package/dist/lib/components/Zudoku.js +7 -6
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
- package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
- package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
- package/dist/lib/core/ZudokuContext.d.ts +10 -0
- package/dist/lib/core/ZudokuContext.js +17 -1
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +8 -2
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/hooks/index.d.ts +3 -0
- package/dist/lib/hooks/index.js +5 -0
- package/dist/lib/hooks/index.js.map +1 -0
- package/dist/lib/hooks/useEvent.d.ts +11 -0
- package/dist/lib/hooks/useEvent.js +19 -0
- package/dist/lib/hooks/useEvent.js.map +1 -0
- package/dist/lib/hooks/useEvent.test.d.ts +1 -0
- package/dist/lib/hooks/useEvent.test.js +100 -0
- package/dist/lib/hooks/useEvent.test.js.map +1 -0
- package/dist/lib/ui/Stepper.d.ts +4 -0
- package/dist/lib/ui/Stepper.js +7 -0
- package/dist/lib/ui/Stepper.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +3 -1
- package/dist/lib/util/MdxComponents.js +3 -0
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/vite/config.d.ts +2 -5
- package/dist/vite/config.js +21 -28
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +1 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/css/plugin.d.ts +2 -2
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +2 -2
- package/dist/vite/plugin-api-keys.js +3 -3
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +2 -2
- package/dist/vite/plugin-api.js +5 -5
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +2 -2
- package/dist/vite/plugin-auth.js +3 -3
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +2 -2
- package/dist/vite/plugin-component.js +3 -2
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +4 -3
- package/dist/vite/plugin-config-reload.js +11 -8
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +2 -2
- package/dist/vite/plugin-config.js +2 -2
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +2 -2
- package/dist/vite/plugin-custom-pages.js +3 -3
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +2 -2
- package/dist/vite/plugin-docs.js +5 -5
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +2 -2
- package/dist/vite/plugin-frontmatter.js +5 -4
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +2 -2
- package/dist/vite/plugin-mdx.js +1 -1
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-redirect.d.ts +2 -2
- package/dist/vite/plugin-redirect.js +3 -3
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +2 -2
- package/dist/vite/plugin-search.js +1 -1
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +2 -2
- package/dist/vite/plugin-sidebar.js +2 -2
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin-theme-css.d.ts +2 -2
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/dist/vite/plugin.d.ts +2 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender/FileWritingResponse.d.ts +2 -1
- package/dist/vite/prerender/FileWritingResponse.js +4 -1
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
- package/dist/vite/prerender/worker.d.ts +1 -1
- package/dist/vite/prerender/worker.js +3 -0
- package/dist/vite/prerender/worker.js.map +1 -1
- package/lib/{AuthenticationPlugin-BlxA4Mbn.js → AuthenticationPlugin-_gUMnGxb.js} +2 -2
- package/lib/{AuthenticationPlugin-BlxA4Mbn.js.map → AuthenticationPlugin-_gUMnGxb.js.map} +1 -1
- package/lib/{Markdown-Cr9sYpR_.js → Markdown-DePfm7oQ.js} +1384 -1381
- package/lib/{Markdown-Cr9sYpR_.js.map → Markdown-DePfm7oQ.js.map} +1 -1
- package/lib/{MdxPage-Dt-UEQl8.js → MdxPage-DM9mE-G-.js} +4 -4
- package/lib/{MdxPage-Dt-UEQl8.js.map → MdxPage-DM9mE-G-.js.map} +1 -1
- package/lib/{OasProvider-WVtvHP5H.js → OasProvider-Bvu4dDpX.js} +3 -3
- package/lib/{OasProvider-WVtvHP5H.js.map → OasProvider-Bvu4dDpX.js.map} +1 -1
- package/lib/{OperationList-DhOwupvv.js → OperationList-DWnNbwVg.js} +241 -240
- package/lib/OperationList-DWnNbwVg.js.map +1 -0
- package/lib/{Select-D9hI1G-y.js → Select-BmoX1iTH.js} +36 -36
- package/lib/{Select-D9hI1G-y.js.map → Select-BmoX1iTH.js.map} +1 -1
- package/lib/{SlotletProvider-CEfNOA8i.js → SlotletProvider-DdtIOUi6.js} +2 -2
- package/lib/{SlotletProvider-CEfNOA8i.js.map → SlotletProvider-DdtIOUi6.js.map} +1 -1
- package/lib/{createServer-DMf6O2Rz.js → createServer-DmusVVsi.js} +987 -967
- package/lib/createServer-DmusVVsi.js.map +1 -0
- package/lib/{hook-CWwSAAlH.js → hook-4_6pQSo4.js} +29 -29
- package/lib/{hook-CWwSAAlH.js.map → hook-4_6pQSo4.js.map} +1 -1
- package/lib/{index-Do_30Hpk.js → index-DVBlM15k.js} +83 -82
- package/lib/{index-Do_30Hpk.js.map → index-DVBlM15k.js.map} +1 -1
- package/lib/index-DwT-v3zK.js +86 -0
- package/lib/index-DwT-v3zK.js.map +1 -0
- package/lib/{mutation-B0wxqzSN.js → mutation-DTunCQKB.js} +2 -2
- package/lib/{mutation-B0wxqzSN.js.map → mutation-DTunCQKB.js.map} +1 -1
- package/lib/objectEntries-yMIkr2mI.js +5 -0
- package/lib/objectEntries-yMIkr2mI.js.map +1 -0
- package/lib/ui/Stepper.js +6 -0
- package/lib/ui/Stepper.js.map +1 -0
- package/lib/ui/SyntaxHighlight.js +2902 -7
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/{useScrollToAnchor-C-sRxs9o.js → useScrollToAnchor-BW8y_cwU.js} +3 -3
- package/lib/{useScrollToAnchor-C-sRxs9o.js.map → useScrollToAnchor-BW8y_cwU.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +15 -14
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +126 -124
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +489 -454
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.css +1 -0
- package/lib/zudoku.hooks.js +19 -0
- package/lib/zudoku.hooks.js.map +1 -0
- package/lib/zudoku.plugin-api-catalog.js +2 -2
- package/lib/zudoku.plugin-api-keys.js +5 -5
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/lib/zudoku.plugins.js +9 -8
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +12 -4
- package/src/app/main.tsx +1 -1
- package/src/lib/authentication/providers/auth0.tsx +3 -2
- package/src/lib/authentication/providers/openid.tsx +8 -5
- package/src/lib/components/ThemeSwitch.tsx +1 -1
- package/src/lib/components/Zudoku.tsx +9 -5
- package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
- package/src/lib/core/ZudokuContext.ts +31 -0
- package/src/lib/core/plugins.ts +16 -2
- package/src/lib/hooks/index.ts +5 -0
- package/src/lib/hooks/useEvent.test.tsx +149 -0
- package/src/lib/hooks/useEvent.ts +41 -0
- package/src/lib/ui/Stepper.css +43 -0
- package/src/lib/ui/Stepper.tsx +8 -0
- package/src/lib/util/MdxComponents.tsx +4 -1
- package/lib/OperationList-DhOwupvv.js.map +0 -1
- package/lib/SyntaxHighlight-CcnUjERD.js +0 -2986
- package/lib/SyntaxHighlight-CcnUjERD.js.map +0 -1
- package/lib/createServer-DMf6O2Rz.js.map +0 -1
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import { j as g } from "./jsx-runtime-CYK1ROHF.js";
|
|
2
|
-
import {
|
|
2
|
+
import { b as vr, o as br, p as Ro } from "./hook-4_6pQSo4.js";
|
|
3
3
|
import { H as qo } from "./index.esm-CQHE3GEU.js";
|
|
4
4
|
import { b as No, a as ko } from "./chunk-IR6S3I6Y-D_3UmFIn.js";
|
|
5
|
-
import { S as Eo, a as Ao, b as Io, c as Lo, e as Uo } from "./Select-
|
|
5
|
+
import { S as Eo, a as Ao, b as Io, c as Lo, e as Uo } from "./Select-BmoX1iTH.js";
|
|
6
6
|
import { C as Fo } from "./CategoryHeading-DpB47wvk.js";
|
|
7
|
-
import { I as _o, M as Re, H as Be, P as Le } from "./Markdown-
|
|
7
|
+
import { I as _o, M as Re, H as Be, P as Le } from "./Markdown-DePfm7oQ.js";
|
|
8
8
|
import { c as le } from "./cn-qaFjX9_3.js";
|
|
9
9
|
import { ChevronsUpDownIcon as Bo, CheckIcon as Ho, CopyIcon as Mo, UnfoldVerticalIcon as zo, FoldVerticalIcon as Go, ChevronDownIcon as Wo, CircleIcon as Jo, CircleDotIcon as Vo, CircleFadingPlusIcon as Do, SquareMinusIcon as Qo, SquarePlusIcon as Ko, ListPlusIcon as Yo, RefreshCcwDotIcon as Xo } from "lucide-react";
|
|
10
10
|
import { useContext as Zo, useTransition as eo, useState as ge, useRef as xr, useEffect as $r, useLayoutEffect as ea, useMemo as to, useCallback as ta } from "react";
|
|
11
11
|
import { Button as ro } from "./ui/Button.js";
|
|
12
12
|
import { a as ra, u as jr } from "./context-DLCwaMXN.js";
|
|
13
|
-
import { a as rt, C as no, b as na, c as oa, d as _r, P as aa, m as oo, e as ia } from "./index-
|
|
13
|
+
import { a as rt, C as no, b as na, c as oa, d as _r, P as aa, m as oo, e as ia } from "./index-DVBlM15k.js";
|
|
14
14
|
import { Tabs as sa, TabsList as la, TabsTrigger as ca, TabsContent as ua } from "./ui/Tabs.js";
|
|
15
15
|
import { Card as be, CardHeader as fa, CardTitle as pa, CardContent as da } from "./ui/Card.js";
|
|
16
16
|
import { c as ha } from "./index-CPNSgwSb.js";
|
|
17
17
|
import { g as ya, c as Ze, a as ma } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
18
|
-
import {
|
|
18
|
+
import { SyntaxHighlight as ao } from "./ui/SyntaxHighlight.js";
|
|
19
19
|
import { B as Br } from "./Spinner-1KrEmx1V.js";
|
|
20
20
|
import * as Ye from "@radix-ui/react-tabs";
|
|
21
21
|
import * as xe from "@radix-ui/react-collapsible";
|
|
22
|
-
import {
|
|
23
|
-
|
|
22
|
+
import { o as ga } from "./objectEntries-yMIkr2mI.js";
|
|
23
|
+
import { C as va } from "./circular-v7K6lDDh.js";
|
|
24
|
+
function ba(e, r) {
|
|
24
25
|
return r;
|
|
25
26
|
}
|
|
26
27
|
const wr = (e, ...r) => {
|
|
@@ -61,7 +62,7 @@ const wr = (e, ...r) => {
|
|
|
61
62
|
children: /* @__PURE__ */ g.jsx(Bo, { size: 14 })
|
|
62
63
|
}
|
|
63
64
|
)
|
|
64
|
-
] }),
|
|
65
|
+
] }), xa = rt(
|
|
65
66
|
/* GraphQL */
|
|
66
67
|
`
|
|
67
68
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -88,8 +89,8 @@ const wr = (e, ...r) => {
|
|
|
88
89
|
children: r ? /* @__PURE__ */ g.jsx(Ho, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ g.jsx(Mo, { size: 14, strokeWidth: 1.3 })
|
|
89
90
|
}
|
|
90
91
|
);
|
|
91
|
-
},
|
|
92
|
-
const { input: e, type: r } = jr(), t = wr(
|
|
92
|
+
}, $a = () => {
|
|
93
|
+
const { input: e, type: r } = jr(), t = wr(xa, { input: e, type: r }), o = vr(t), [, s] = eo(), { selectedServer: l, setSelectedServer: n } = br(
|
|
93
94
|
o.data.schema.servers
|
|
94
95
|
), { servers: a } = o.data.schema;
|
|
95
96
|
if (a.length === 0) return null;
|
|
@@ -121,7 +122,7 @@ const wr = (e, ...r) => {
|
|
|
121
122
|
return t[s] || (t[s] = []), t[s].push(o), t;
|
|
122
123
|
},
|
|
123
124
|
{}
|
|
124
|
-
),
|
|
125
|
+
), ja = (e, r) => e ? r(e) : void 0, wa = ha(
|
|
125
126
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
126
127
|
{
|
|
127
128
|
variants: {
|
|
@@ -139,16 +140,16 @@ const wr = (e, ...r) => {
|
|
|
139
140
|
}
|
|
140
141
|
);
|
|
141
142
|
function Ce({ className: e, variant: r, ...t }) {
|
|
142
|
-
return /* @__PURE__ */ g.jsx("div", { className: le(
|
|
143
|
+
return /* @__PURE__ */ g.jsx("div", { className: le(wa({ variant: r }), e), ...t });
|
|
143
144
|
}
|
|
144
|
-
const
|
|
145
|
+
const Sa = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
145
146
|
type: "string"
|
|
146
|
-
},
|
|
147
|
+
}, Oa = ({
|
|
147
148
|
parameter: e,
|
|
148
149
|
group: r,
|
|
149
150
|
id: t
|
|
150
151
|
}) => {
|
|
151
|
-
const o =
|
|
152
|
+
const o = Sa(e);
|
|
152
153
|
return /* @__PURE__ */ g.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1", children: [
|
|
153
154
|
/* @__PURE__ */ g.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
154
155
|
/* @__PURE__ */ g.jsx("code", { children: r === "path" ? /* @__PURE__ */ g.jsx(
|
|
@@ -172,14 +173,14 @@ const wa = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
|
172
173
|
}
|
|
173
174
|
)
|
|
174
175
|
] });
|
|
175
|
-
},
|
|
176
|
+
}, Ta = ({
|
|
176
177
|
group: e,
|
|
177
178
|
parameters: r,
|
|
178
179
|
id: t
|
|
179
180
|
}) => /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
180
181
|
/* @__PURE__ */ g.jsx(Be, { level: 3, id: `${t}/${e}-parameters`, className: "capitalize", children: e === "header" ? "Headers" : `${e} Parameters` }),
|
|
181
182
|
/* @__PURE__ */ g.jsx(be, { children: /* @__PURE__ */ g.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: r.sort((o, s) => o.required === s.required ? 0 : o.required ? -1 : 1).map((o) => /* @__PURE__ */ g.jsx(
|
|
182
|
-
|
|
183
|
+
Oa,
|
|
183
184
|
{
|
|
184
185
|
parameter: o,
|
|
185
186
|
id: t,
|
|
@@ -214,27 +215,27 @@ var Mr = (e, r) => {
|
|
|
214
215
|
}, this.indentationCharacter = e || zr, this.lineJoin = r ?? Gr;
|
|
215
216
|
}
|
|
216
217
|
}, yt, Wr;
|
|
217
|
-
function
|
|
218
|
+
function Pa() {
|
|
218
219
|
return Wr || (Wr = 1, yt = function(e) {
|
|
219
220
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
220
221
|
}), yt;
|
|
221
222
|
}
|
|
222
223
|
var mt, Jr;
|
|
223
|
-
function
|
|
224
|
+
function Ca() {
|
|
224
225
|
return Jr || (Jr = 1, mt = function(e) {
|
|
225
226
|
var r = typeof e;
|
|
226
227
|
return e !== null && (r === "object" || r === "function");
|
|
227
228
|
}), mt;
|
|
228
229
|
}
|
|
229
230
|
var Ke = {}, Vr;
|
|
230
|
-
function
|
|
231
|
+
function Ra() {
|
|
231
232
|
return Vr || (Vr = 1, Object.defineProperty(Ke, "__esModule", { value: !0 }), Ke.default = (e) => Object.getOwnPropertySymbols(e).filter((r) => Object.prototype.propertyIsEnumerable.call(e, r))), Ke;
|
|
232
233
|
}
|
|
233
234
|
var gt, Dr;
|
|
234
|
-
function
|
|
235
|
+
function qa() {
|
|
235
236
|
if (Dr) return gt;
|
|
236
237
|
Dr = 1;
|
|
237
|
-
const e =
|
|
238
|
+
const e = Pa(), r = Ca(), t = Ra().default;
|
|
238
239
|
return gt = (o, s, l) => {
|
|
239
240
|
const n = [];
|
|
240
241
|
return function a(i, c, u) {
|
|
@@ -294,14 +295,14 @@ function Ra() {
|
|
|
294
295
|
}(o, s, l);
|
|
295
296
|
}, gt;
|
|
296
297
|
}
|
|
297
|
-
var
|
|
298
|
-
const fe = /* @__PURE__ */ ya(
|
|
298
|
+
var Na = qa();
|
|
299
|
+
const fe = /* @__PURE__ */ ya(Na);
|
|
299
300
|
function Me(e, r = {}) {
|
|
300
301
|
const { delimiter: t = '"', escapeChar: o = "\\", escapeNewlines: s = !0 } = r;
|
|
301
302
|
return [...e.toString()].map((n) => n === "\b" ? `${o}b` : n === " " ? `${o}t` : n === `
|
|
302
303
|
` ? s ? `${o}n` : n : n === "\f" ? `${o}f` : n === "\r" ? s ? `${o}r` : n : n === o ? o + o : n === t ? o + t : n < " " || n > "~" ? JSON.stringify(n).slice(1, -1) : n).join("");
|
|
303
304
|
}
|
|
304
|
-
var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' }),
|
|
305
|
+
var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' }), ka = {
|
|
305
306
|
info: {
|
|
306
307
|
key: "libcurl",
|
|
307
308
|
title: "Libcurl",
|
|
@@ -317,7 +318,7 @@ var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' })
|
|
|
317
318
|
l(`headers = curl_slist_append(headers, "${c}: ${ce(t[c])}");`);
|
|
318
319
|
}), l("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), o.cookie && (n(), l(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${o.cookie}");`)), s.text && (n(), l(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(s.text)});`)), n(), l("CURLcode ret = curl_easy_perform(hnd);"), a();
|
|
319
320
|
}
|
|
320
|
-
},
|
|
321
|
+
}, Ea = {
|
|
321
322
|
info: {
|
|
322
323
|
key: "c",
|
|
323
324
|
title: "C",
|
|
@@ -325,19 +326,19 @@ var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' })
|
|
|
325
326
|
cli: "c"
|
|
326
327
|
},
|
|
327
328
|
clientsById: {
|
|
328
|
-
libcurl:
|
|
329
|
+
libcurl: ka
|
|
329
330
|
}
|
|
330
331
|
}, pe = (e, r) => Object.keys(e).find((t) => t.toLowerCase() === r.toLowerCase()), ve = (e, r) => {
|
|
331
332
|
const t = pe(e, r);
|
|
332
333
|
if (t)
|
|
333
334
|
return e[t];
|
|
334
|
-
}, nt = (e, r) => !!pe(e, r),
|
|
335
|
+
}, nt = (e, r) => !!pe(e, r), Aa = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
|
|
335
336
|
(r) => e.indexOf(r) > -1
|
|
336
337
|
), Qr = class {
|
|
337
338
|
constructor(e) {
|
|
338
339
|
this.name = "", this.toString = () => `:${this.name}`, this.name = e;
|
|
339
340
|
}
|
|
340
|
-
},
|
|
341
|
+
}, Ia = class {
|
|
341
342
|
constructor(e) {
|
|
342
343
|
this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
|
|
343
344
|
}
|
|
@@ -374,7 +375,7 @@ ${t}`);
|
|
|
374
375
|
default:
|
|
375
376
|
return e.toString();
|
|
376
377
|
}
|
|
377
|
-
},
|
|
378
|
+
}, La = {
|
|
378
379
|
info: {
|
|
379
380
|
key: "clj_http",
|
|
380
381
|
title: "clj-http",
|
|
@@ -416,7 +417,7 @@ ${t}`);
|
|
|
416
417
|
if (t.params) {
|
|
417
418
|
c.multipart = t.params.map((p) => p.fileName && !p.value ? {
|
|
418
419
|
name: p.name,
|
|
419
|
-
content: new
|
|
420
|
+
content: new Ia(p.fileName)
|
|
420
421
|
} : {
|
|
421
422
|
name: p.name,
|
|
422
423
|
content: p.value
|
|
@@ -445,16 +446,16 @@ ${t}`);
|
|
|
445
446
|
}
|
|
446
447
|
return a();
|
|
447
448
|
}
|
|
448
|
-
},
|
|
449
|
+
}, Ua = {
|
|
449
450
|
info: {
|
|
450
451
|
key: "clojure",
|
|
451
452
|
title: "Clojure",
|
|
452
453
|
default: "clj_http"
|
|
453
454
|
},
|
|
454
455
|
clientsById: {
|
|
455
|
-
clj_http:
|
|
456
|
+
clj_http: La
|
|
456
457
|
}
|
|
457
|
-
},
|
|
458
|
+
}, Fa = (e) => {
|
|
458
459
|
let r = ve(e, "accept-encoding");
|
|
459
460
|
if (!r)
|
|
460
461
|
return [];
|
|
@@ -471,7 +472,7 @@ ${t}`);
|
|
|
471
472
|
}
|
|
472
473
|
});
|
|
473
474
|
}), o;
|
|
474
|
-
},
|
|
475
|
+
}, _a = {
|
|
475
476
|
info: {
|
|
476
477
|
key: "httpclient",
|
|
477
478
|
title: "HttpClient",
|
|
@@ -487,7 +488,7 @@ ${t}`);
|
|
|
487
488
|
}, { push: n, join: a } = new V({ indent: l.indent });
|
|
488
489
|
n("using System.Net.Http.Headers;");
|
|
489
490
|
let i = "";
|
|
490
|
-
const c = !!e.cookie, u =
|
|
491
|
+
const c = !!e.cookie, u = Fa(e);
|
|
491
492
|
(c || u.length) && (i = "clientHandler", n("var clientHandler = new HttpClientHandler"), n("{"), c && n("UseCookies = false,", 1), u.length && n(`AutomaticDecompression = ${u.join(" | ")},`, 1), n("};")), n(`var client = new HttpClient(${i});`), n("var request = new HttpRequestMessage"), n("{");
|
|
492
493
|
const p = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
|
|
493
494
|
t = t.toUpperCase(), t && p.includes(t) ? t = `HttpMethod.${t[0]}${t.substring(1).toLowerCase()}` : t = `new HttpMethod("${t}")`, n(`Method = ${t},`, 1), n(`RequestUri = new Uri("${o}"),`, 1);
|
|
@@ -524,10 +525,10 @@ ${t}`);
|
|
|
524
525
|
return n("};"), n("using (var response = await client.SendAsync(request))"), n("{"), n("response.EnsureSuccessStatusCode();", 1), n("var body = await response.Content.ReadAsStringAsync();", 1), n("Console.WriteLine(body);", 1), n("}"), a();
|
|
525
526
|
}
|
|
526
527
|
};
|
|
527
|
-
function
|
|
528
|
+
function Ba(e) {
|
|
528
529
|
return e[0].toUpperCase() + e.slice(1).toLowerCase();
|
|
529
530
|
}
|
|
530
|
-
var
|
|
531
|
+
var Ha = {
|
|
531
532
|
info: {
|
|
532
533
|
key: "restsharp",
|
|
533
534
|
title: "RestSharp",
|
|
@@ -577,11 +578,11 @@ var Ba = {
|
|
|
577
578
|
if (!s.text) break;
|
|
578
579
|
n(`request.AddStringBody("${s.text}", "${s.mimeType}");`);
|
|
579
580
|
}
|
|
580
|
-
return n(`var response = await client.${
|
|
581
|
+
return n(`var response = await client.${Ba(e)}Async(request);
|
|
581
582
|
`), n(`Console.WriteLine("{0}", response.Content);
|
|
582
583
|
`), a();
|
|
583
584
|
}
|
|
584
|
-
},
|
|
585
|
+
}, Ma = {
|
|
585
586
|
info: {
|
|
586
587
|
key: "csharp",
|
|
587
588
|
title: "C#",
|
|
@@ -589,10 +590,10 @@ var Ba = {
|
|
|
589
590
|
cli: "dotnet"
|
|
590
591
|
},
|
|
591
592
|
clientsById: {
|
|
592
|
-
httpclient:
|
|
593
|
-
restsharp:
|
|
593
|
+
httpclient: _a,
|
|
594
|
+
restsharp: Ha
|
|
594
595
|
}
|
|
595
|
-
},
|
|
596
|
+
}, za = {
|
|
596
597
|
info: {
|
|
597
598
|
key: "native",
|
|
598
599
|
title: "NewRequest",
|
|
@@ -610,7 +611,7 @@ var Ba = {
|
|
|
610
611
|
n(`req.Header.Add("${v}", "${ce(t[v])}")`, y);
|
|
611
612
|
}), l()), n(`res, ${h} := ${m}.Do(req)`, y), x(), u && (l(), n("defer res.Body.Close()", y), n(`body, ${h} := io.ReadAll(res.Body)`, y), x()), l(), u && n("fmt.Println(string(body))", y), i && (l(), n("}")), a();
|
|
612
613
|
}
|
|
613
|
-
},
|
|
614
|
+
}, Ga = {
|
|
614
615
|
info: {
|
|
615
616
|
key: "go",
|
|
616
617
|
title: "Go",
|
|
@@ -618,10 +619,10 @@ var Ba = {
|
|
|
618
619
|
cli: "go"
|
|
619
620
|
},
|
|
620
621
|
clientsById: {
|
|
621
|
-
native:
|
|
622
|
+
native: za
|
|
622
623
|
}
|
|
623
624
|
}, Yr = `\r
|
|
624
|
-
`,
|
|
625
|
+
`, Wa = {
|
|
625
626
|
info: {
|
|
626
627
|
key: "http1.1",
|
|
627
628
|
title: "HTTP/1.1",
|
|
@@ -649,16 +650,16 @@ var Ba = {
|
|
|
649
650
|
const y = u(), x = l.text || "";
|
|
650
651
|
return `${y}${Yr}${x}`;
|
|
651
652
|
}
|
|
652
|
-
},
|
|
653
|
+
}, Ja = {
|
|
653
654
|
info: {
|
|
654
655
|
key: "http",
|
|
655
656
|
title: "HTTP",
|
|
656
657
|
default: "http1.1"
|
|
657
658
|
},
|
|
658
659
|
clientsById: {
|
|
659
|
-
"http1.1":
|
|
660
|
+
"http1.1": Wa
|
|
660
661
|
}
|
|
661
|
-
},
|
|
662
|
+
}, Va = {
|
|
662
663
|
info: {
|
|
663
664
|
key: "asynchttp",
|
|
664
665
|
title: "AsyncHttp",
|
|
@@ -675,7 +676,7 @@ var Ba = {
|
|
|
675
676
|
a(`.setHeader("${c}", "${ce(r[c])}")`, 1);
|
|
676
677
|
}), t.text && a(`.setBody(${JSON.stringify(t.text)})`, 1), a(".execute()", 1), a(".toCompletableFuture()", 1), a(".thenAccept(System.out::println)", 1), a(".join();", 1), n(), a("client.close();"), i();
|
|
677
678
|
}
|
|
678
|
-
},
|
|
679
|
+
}, Da = {
|
|
679
680
|
info: {
|
|
680
681
|
key: "nethttp",
|
|
681
682
|
title: "java.net.http",
|
|
@@ -697,7 +698,7 @@ var Ba = {
|
|
|
697
698
|
"HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
|
|
698
699
|
), n("System.out.println(response.body());"), a();
|
|
699
700
|
}
|
|
700
|
-
},
|
|
701
|
+
}, Qa = {
|
|
701
702
|
info: {
|
|
702
703
|
key: "okhttp",
|
|
703
704
|
title: "OkHttp",
|
|
@@ -714,7 +715,7 @@ var Ba = {
|
|
|
714
715
|
n(`.addHeader("${p}", "${ce(o[p])}")`, 1);
|
|
715
716
|
}), n(".build();", 1), a(), n("Response response = client.newCall(request).execute();"), i();
|
|
716
717
|
}
|
|
717
|
-
},
|
|
718
|
+
}, Ka = {
|
|
718
719
|
info: {
|
|
719
720
|
key: "unirest",
|
|
720
721
|
title: "Unirest",
|
|
@@ -731,19 +732,19 @@ var Ba = {
|
|
|
731
732
|
a(`.header("${c}", "${ce(r[c])}")`, 1);
|
|
732
733
|
}), t.text && a(`.body(${JSON.stringify(t.text)})`, 1), a(".asString();", 1), n();
|
|
733
734
|
}
|
|
734
|
-
},
|
|
735
|
+
}, Ya = {
|
|
735
736
|
info: {
|
|
736
737
|
key: "java",
|
|
737
738
|
title: "Java",
|
|
738
739
|
default: "unirest"
|
|
739
740
|
},
|
|
740
741
|
clientsById: {
|
|
741
|
-
asynchttp:
|
|
742
|
-
nethttp:
|
|
743
|
-
okhttp:
|
|
744
|
-
unirest:
|
|
742
|
+
asynchttp: Va,
|
|
743
|
+
nethttp: Da,
|
|
744
|
+
okhttp: Qa,
|
|
745
|
+
unirest: Ka
|
|
745
746
|
}
|
|
746
|
-
},
|
|
747
|
+
}, Xa = {
|
|
747
748
|
info: {
|
|
748
749
|
key: "axios",
|
|
749
750
|
title: "Axios",
|
|
@@ -787,7 +788,7 @@ var Ba = {
|
|
|
787
788
|
}).replace('"[form]"', "form");
|
|
788
789
|
return i(`const options = ${h};`), a(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), c();
|
|
789
790
|
}
|
|
790
|
-
},
|
|
791
|
+
}, Za = {
|
|
791
792
|
info: {
|
|
792
793
|
key: "fetch",
|
|
793
794
|
title: "fetch",
|
|
@@ -840,7 +841,7 @@ var Ba = {
|
|
|
840
841
|
})};`
|
|
841
842
|
), n(), t.params && t.mimeType === "multipart/form-data" && (i("options.body = form;"), n()), i(`fetch('${o}', options)`), i(".then(response => response.json())", 1), i(".then(response => console.log(response))", 1), i(".catch(err => console.error(err));", 1), a();
|
|
842
843
|
}
|
|
843
|
-
},
|
|
844
|
+
}, ei = {
|
|
844
845
|
info: {
|
|
845
846
|
key: "jquery",
|
|
846
847
|
title: "jQuery",
|
|
@@ -884,7 +885,7 @@ var Ba = {
|
|
|
884
885
|
const u = fe(c, { indent: l.indent }).replace("'[form]'", "form");
|
|
885
886
|
return a(`const settings = ${u};`), n(), a("$.ajax(settings).done(function (response) {"), a("console.log(response);", 1), a("});"), i();
|
|
886
887
|
}
|
|
887
|
-
},
|
|
888
|
+
}, ti = {
|
|
888
889
|
info: {
|
|
889
890
|
key: "xhr",
|
|
890
891
|
title: "XMLHttpRequest",
|
|
@@ -925,19 +926,19 @@ var Ba = {
|
|
|
925
926
|
a(`xhr.setRequestHeader('${u}', '${ze(r[u])}');`);
|
|
926
927
|
}), n(), a("xhr.send(data);"), i();
|
|
927
928
|
}
|
|
928
|
-
},
|
|
929
|
+
}, ri = {
|
|
929
930
|
info: {
|
|
930
931
|
key: "javascript",
|
|
931
932
|
title: "JavaScript",
|
|
932
933
|
default: "xhr"
|
|
933
934
|
},
|
|
934
935
|
clientsById: {
|
|
935
|
-
xhr:
|
|
936
|
-
axios:
|
|
937
|
-
fetch:
|
|
938
|
-
jquery:
|
|
936
|
+
xhr: ti,
|
|
937
|
+
axios: Xa,
|
|
938
|
+
fetch: Za,
|
|
939
|
+
jquery: ei
|
|
939
940
|
}
|
|
940
|
-
},
|
|
941
|
+
}, ni = {
|
|
941
942
|
info: {
|
|
942
943
|
key: "native",
|
|
943
944
|
title: "Native JSON",
|
|
@@ -971,16 +972,16 @@ var Ba = {
|
|
|
971
972
|
}
|
|
972
973
|
return typeof o > "u" || o === "" ? "No JSON body" : JSON.stringify(o, null, t.indent);
|
|
973
974
|
}
|
|
974
|
-
},
|
|
975
|
+
}, oi = {
|
|
975
976
|
info: {
|
|
976
977
|
key: "json",
|
|
977
978
|
title: "JSON",
|
|
978
979
|
default: "native"
|
|
979
980
|
},
|
|
980
981
|
clientsById: {
|
|
981
|
-
native:
|
|
982
|
+
native: ni
|
|
982
983
|
}
|
|
983
|
-
},
|
|
984
|
+
}, ai = {
|
|
984
985
|
info: {
|
|
985
986
|
key: "okhttp",
|
|
986
987
|
title: "OkHttp",
|
|
@@ -997,16 +998,16 @@ var Ba = {
|
|
|
997
998
|
i(`.addHeader("${p}", "${ce(o[p])}")`, 1);
|
|
998
999
|
}), i(".build()", 1), n(), i("val response = client.newCall(request).execute()"), a();
|
|
999
1000
|
}
|
|
1000
|
-
},
|
|
1001
|
+
}, ii = {
|
|
1001
1002
|
info: {
|
|
1002
1003
|
key: "kotlin",
|
|
1003
1004
|
title: "Kotlin",
|
|
1004
1005
|
default: "okhttp"
|
|
1005
1006
|
},
|
|
1006
1007
|
clientsById: {
|
|
1007
|
-
okhttp:
|
|
1008
|
+
okhttp: ai
|
|
1008
1009
|
}
|
|
1009
|
-
},
|
|
1010
|
+
}, si = {
|
|
1010
1011
|
info: {
|
|
1011
1012
|
key: "axios",
|
|
1012
1013
|
title: "Axios",
|
|
@@ -1040,7 +1041,7 @@ var Ba = {
|
|
|
1040
1041
|
const p = fe(u, { indent: " ", inlineCharacterLimit: 80 });
|
|
1041
1042
|
return i(`const options = ${p};`), n(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), a();
|
|
1042
1043
|
}
|
|
1043
|
-
},
|
|
1044
|
+
}, li = {
|
|
1044
1045
|
info: {
|
|
1045
1046
|
key: "fetch",
|
|
1046
1047
|
title: "Fetch",
|
|
@@ -1100,7 +1101,7 @@ var Ba = {
|
|
|
1100
1101
|
});
|
|
1101
1102
|
return c(`const options = ${x};`), i(), a && p("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (c("options.body = formData;"), i()), c("fetch(url, options)"), c(".then(res => res.json())", 1), c(".then(json => console.log(json))", 1), c(".catch(err => console.error('error:' + err));", 1), u().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
|
|
1102
1103
|
}
|
|
1103
|
-
},
|
|
1104
|
+
}, ci = {
|
|
1104
1105
|
info: {
|
|
1105
1106
|
key: "native",
|
|
1106
1107
|
title: "HTTP",
|
|
@@ -1139,7 +1140,7 @@ var Ba = {
|
|
|
1139
1140
|
}
|
|
1140
1141
|
return i("req.end();"), a();
|
|
1141
1142
|
}
|
|
1142
|
-
},
|
|
1143
|
+
}, ui = {
|
|
1143
1144
|
info: {
|
|
1144
1145
|
key: "request",
|
|
1145
1146
|
title: "Request",
|
|
@@ -1192,7 +1193,7 @@ var Ba = {
|
|
|
1192
1193
|
c(`jar.setCookie(request.cookie('${encodeURIComponent($)}=${encodeURIComponent(f)}'), '${r}');`);
|
|
1193
1194
|
}), u(), y(($) => $.replace(/'JAR'/, "jar"))), i && h("const fs = require('fs');"), c(`const options = ${fe(x, { indent: " ", inlineCharacterLimit: 80 })};`), u(), c("request(options, function (error, response, body) {"), c("if (error) throw new Error(error);", 1), u(), c("console.log(body);", 1), c("});"), p();
|
|
1194
1195
|
}
|
|
1195
|
-
},
|
|
1196
|
+
}, fi = {
|
|
1196
1197
|
info: {
|
|
1197
1198
|
key: "unirest",
|
|
1198
1199
|
title: "Unirest",
|
|
@@ -1233,7 +1234,7 @@ var Ba = {
|
|
|
1233
1234
|
}
|
|
1234
1235
|
return i && y("const fs = require('fs');"), h("req.end(function (res) {"), h("if (res.error) throw new Error(res.error);", 1), u(), h("console.log(res.body);", 1), h("});"), p();
|
|
1235
1236
|
}
|
|
1236
|
-
},
|
|
1237
|
+
}, pi = {
|
|
1237
1238
|
info: {
|
|
1238
1239
|
key: "node",
|
|
1239
1240
|
title: "Node.js",
|
|
@@ -1241,11 +1242,11 @@ var Ba = {
|
|
|
1241
1242
|
cli: "node %s"
|
|
1242
1243
|
},
|
|
1243
1244
|
clientsById: {
|
|
1244
|
-
native:
|
|
1245
|
-
request:
|
|
1246
|
-
unirest:
|
|
1247
|
-
axios:
|
|
1248
|
-
fetch:
|
|
1245
|
+
native: ci,
|
|
1246
|
+
request: ui,
|
|
1247
|
+
unirest: fi,
|
|
1248
|
+
axios: si,
|
|
1249
|
+
fetch: li
|
|
1249
1250
|
}
|
|
1250
1251
|
}, vt = (e, r, t, o) => {
|
|
1251
1252
|
const s = `${e} *${r} = `, l = mr(t, o ? s.length : void 0);
|
|
@@ -1269,7 +1270,7 @@ var Ba = {
|
|
|
1269
1270
|
default:
|
|
1270
1271
|
return e == null ? "" : `@"${e.toString().replace(/"/g, '\\"')}"`;
|
|
1271
1272
|
}
|
|
1272
|
-
},
|
|
1273
|
+
}, di = {
|
|
1273
1274
|
info: {
|
|
1274
1275
|
key: "nsurlsession",
|
|
1275
1276
|
title: "NSURLSession",
|
|
@@ -1326,16 +1327,16 @@ var Ba = {
|
|
|
1326
1327
|
2
|
|
1327
1328
|
), n(' NSLog(@"%@", httpResponse);', 2), n(" }", 1), n(" }];"), n("[dataTask resume];"), a();
|
|
1328
1329
|
}
|
|
1329
|
-
},
|
|
1330
|
+
}, hi = {
|
|
1330
1331
|
info: {
|
|
1331
1332
|
key: "objc",
|
|
1332
1333
|
title: "Objective-C",
|
|
1333
1334
|
default: "nsurlsession"
|
|
1334
1335
|
},
|
|
1335
1336
|
clientsById: {
|
|
1336
|
-
nsurlsession:
|
|
1337
|
+
nsurlsession: di
|
|
1337
1338
|
}
|
|
1338
|
-
},
|
|
1339
|
+
}, yi = {
|
|
1339
1340
|
info: {
|
|
1340
1341
|
key: "cohttp",
|
|
1341
1342
|
title: "CoHTTP",
|
|
@@ -1361,14 +1362,14 @@ var Ba = {
|
|
|
1361
1362
|
const p = u.length ? "~headers " : "", h = t.text ? "~body " : "", y = n.includes(o.toLowerCase()) ? `\`${o.toUpperCase()}` : `(Code.method_of_string "${o}")`;
|
|
1362
1363
|
return a(`Client.call ${p}${h}${y} uri`), a(">>= fun (res, body_stream) ->"), a("(* Do stuff with the result *)", 1), c();
|
|
1363
1364
|
}
|
|
1364
|
-
},
|
|
1365
|
+
}, mi = {
|
|
1365
1366
|
info: {
|
|
1366
1367
|
key: "ocaml",
|
|
1367
1368
|
title: "OCaml",
|
|
1368
1369
|
default: "cohttp"
|
|
1369
1370
|
},
|
|
1370
1371
|
clientsById: {
|
|
1371
|
-
cohttp:
|
|
1372
|
+
cohttp: yi
|
|
1372
1373
|
}
|
|
1373
1374
|
}, te = (e, r, t) => {
|
|
1374
1375
|
switch (t = t || "", r = r || "", Object.prototype.toString.call(e)) {
|
|
@@ -1429,7 +1430,7 @@ ${t}]`;
|
|
|
1429
1430
|
"UNLOCK",
|
|
1430
1431
|
"UPDATE",
|
|
1431
1432
|
"VERSION_CONTROL"
|
|
1432
|
-
],
|
|
1433
|
+
], gi = {
|
|
1433
1434
|
info: {
|
|
1434
1435
|
key: "curl",
|
|
1435
1436
|
title: "cURL",
|
|
@@ -1507,7 +1508,7 @@ ${c}` });
|
|
|
1507
1508
|
return d.length && (O.push("CURLOPT_HTTPHEADER => ["), O.push(d.join(`,
|
|
1508
1509
|
${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = curl_exec($curl);"), $("$err = curl_error($curl);"), f(), $("curl_close($curl);"), f(), $("if ($err) {"), $(p ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), $("} else {"), $("echo $response;", 1), $("}"), !h && i && (f(), $("?>")), m();
|
|
1509
1510
|
}
|
|
1510
|
-
},
|
|
1511
|
+
}, vi = {
|
|
1511
1512
|
info: {
|
|
1512
1513
|
key: "guzzle",
|
|
1513
1514
|
title: "Guzzle",
|
|
@@ -1558,7 +1559,7 @@ ${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = cur
|
|
|
1558
1559
|
return x.length && y.push(`${n.indent}${n.indent}'cookie' => '${ze(x)}',`), y.length && (p("'headers' => [", 1), p(y.join(`
|
|
1559
1560
|
`)), p("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), i(), u.length ? (a(`$response = $client->request('${t}', '${r}', [`), a(h()), a("]);")) : a(`$response = $client->request('${t}', '${r}');`), i(), a("echo $response->getBody();"), !n.noTags && n.closingTag && (i(), a("?>")), c();
|
|
1560
1561
|
}
|
|
1561
|
-
},
|
|
1562
|
+
}, bi = {
|
|
1562
1563
|
info: {
|
|
1563
1564
|
key: "http1",
|
|
1564
1565
|
title: "HTTP v1",
|
|
@@ -1580,7 +1581,7 @@ ${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = cur
|
|
|
1580
1581
|
}
|
|
1581
1582
|
return p("try {"), p("$response = $request->send();", 1), h(), p("echo $response->getBody();", 1), p("} catch (HttpException $ex) {"), p("echo $ex;", 1), p("}"), !c && a && (h(), p("?>")), y();
|
|
1582
1583
|
}
|
|
1583
|
-
},
|
|
1584
|
+
}, xi = {
|
|
1584
1585
|
info: {
|
|
1585
1586
|
key: "http2",
|
|
1586
1587
|
title: "HTTP v2",
|
|
@@ -1628,7 +1629,7 @@ ${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = cur
|
|
|
1628
1629
|
}
|
|
1629
1630
|
return p(`$request->setRequestUrl(${te(l)});`), p(`$request->setRequestMethod(${te(t)});`), x && (p("$request->setBody($body);"), h()), Object.keys(o).length && (p(`$request->setQuery(new http\\QueryString(${te(o, i)}));`), h()), Object.keys(r).length && (p(`$request->setHeaders(${te(r, i)});`), h()), Object.keys(s).length && (h(), p(`$client->setCookies(${te(s, i)});`), h()), p("$client->enqueue($request)->send();"), p("$response = $client->getResponse();"), h(), p("echo $response->getBody();"), !c && a && (h(), p("?>")), y();
|
|
1630
1631
|
}
|
|
1631
|
-
},
|
|
1632
|
+
}, $i = {
|
|
1632
1633
|
info: {
|
|
1633
1634
|
key: "php",
|
|
1634
1635
|
title: "PHP",
|
|
@@ -1636,10 +1637,10 @@ ${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = cur
|
|
|
1636
1637
|
cli: "php %s"
|
|
1637
1638
|
},
|
|
1638
1639
|
clientsById: {
|
|
1639
|
-
curl:
|
|
1640
|
-
guzzle:
|
|
1641
|
-
http1:
|
|
1642
|
-
http2:
|
|
1640
|
+
curl: gi,
|
|
1641
|
+
guzzle: vi,
|
|
1642
|
+
http1: bi,
|
|
1643
|
+
http2: xi
|
|
1643
1644
|
}
|
|
1644
1645
|
}, co = (e) => ({ method: t, headersObj: o, cookies: s, uriObj: l, fullUrl: n, postData: a, allHeaders: i }) => {
|
|
1645
1646
|
const { push: c, join: u } = new V();
|
|
@@ -1653,7 +1654,7 @@ ${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = cur
|
|
|
1653
1654
|
}), h.push("-WebSession $session")), a.text && (h.push(
|
|
1654
1655
|
`-ContentType '${Me(ve(i, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
|
|
1655
1656
|
), h.push(`-Body '${a.text}'`)), c(`$response = ${e} -Uri '${n}' -Method ${t} ${h.join(" ")}`.trim()), u();
|
|
1656
|
-
},
|
|
1657
|
+
}, ji = {
|
|
1657
1658
|
info: {
|
|
1658
1659
|
key: "restmethod",
|
|
1659
1660
|
title: "Invoke-RestMethod",
|
|
@@ -1662,7 +1663,7 @@ ${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = cur
|
|
|
1662
1663
|
extname: ".ps1"
|
|
1663
1664
|
},
|
|
1664
1665
|
convert: co("Invoke-RestMethod")
|
|
1665
|
-
},
|
|
1666
|
+
}, wi = {
|
|
1666
1667
|
info: {
|
|
1667
1668
|
key: "webrequest",
|
|
1668
1669
|
title: "Invoke-WebRequest",
|
|
@@ -1671,15 +1672,15 @@ ${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = cur
|
|
|
1671
1672
|
extname: ".ps1"
|
|
1672
1673
|
},
|
|
1673
1674
|
convert: co("Invoke-WebRequest")
|
|
1674
|
-
},
|
|
1675
|
+
}, Si = {
|
|
1675
1676
|
info: {
|
|
1676
1677
|
key: "powershell",
|
|
1677
1678
|
title: "Powershell",
|
|
1678
1679
|
default: "webrequest"
|
|
1679
1680
|
},
|
|
1680
1681
|
clientsById: {
|
|
1681
|
-
webrequest:
|
|
1682
|
-
restmethod:
|
|
1682
|
+
webrequest: wi,
|
|
1683
|
+
restmethod: ji
|
|
1683
1684
|
}
|
|
1684
1685
|
};
|
|
1685
1686
|
function Zr(e, r, t, o, s) {
|
|
@@ -1711,7 +1712,7 @@ var Ie = (e, r, t) => {
|
|
|
1711
1712
|
default:
|
|
1712
1713
|
return e == null ? "" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
1713
1714
|
}
|
|
1714
|
-
},
|
|
1715
|
+
}, Oi = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], Ti = {
|
|
1715
1716
|
info: {
|
|
1716
1717
|
key: "requests",
|
|
1717
1718
|
title: "Requests",
|
|
@@ -1774,10 +1775,10 @@ var Ie = (e, r, t) => {
|
|
|
1774
1775
|
n(v !== f ? `"${O}": "${ce(u[O])}",` : `"${O}": "${ce(u[O])}"`, 1), v += 1;
|
|
1775
1776
|
}), n("}"), a();
|
|
1776
1777
|
}
|
|
1777
|
-
let m =
|
|
1778
|
+
let m = Oi.includes(o) ? `response = requests.${o.toLowerCase()}(url` : `response = requests.request("${o}", url`;
|
|
1778
1779
|
return x && ($ ? m += ", json=payload" : m += ", data=payload"), y && (m += ", files=files"), f > 0 && (m += ", headers=headers"), m += ")", n(m), a(), n("print(response.text)"), i();
|
|
1779
1780
|
}
|
|
1780
|
-
},
|
|
1781
|
+
}, Pi = {
|
|
1781
1782
|
info: {
|
|
1782
1783
|
key: "python",
|
|
1783
1784
|
title: "Python",
|
|
@@ -1785,9 +1786,9 @@ var Ie = (e, r, t) => {
|
|
|
1785
1786
|
cli: "python3 %s"
|
|
1786
1787
|
},
|
|
1787
1788
|
clientsById: {
|
|
1788
|
-
requests:
|
|
1789
|
+
requests: Ti
|
|
1789
1790
|
}
|
|
1790
|
-
},
|
|
1791
|
+
}, Ci = {
|
|
1791
1792
|
info: {
|
|
1792
1793
|
key: "httr",
|
|
1793
1794
|
title: "httr",
|
|
@@ -1826,16 +1827,16 @@ var Ie = (e, r, t) => {
|
|
|
1826
1827
|
const T = [v, f, $, x].filter((d) => !!d).join(", ");
|
|
1827
1828
|
return T && (O += `, ${T}`), (o.text || o.jsonObj || o.params) && (O += ", encode = encode"), O += ")", n(O), a(), n('content(response, "text")'), i();
|
|
1828
1829
|
}
|
|
1829
|
-
},
|
|
1830
|
+
}, Ri = {
|
|
1830
1831
|
info: {
|
|
1831
1832
|
key: "r",
|
|
1832
1833
|
title: "R",
|
|
1833
1834
|
default: "httr"
|
|
1834
1835
|
},
|
|
1835
1836
|
clientsById: {
|
|
1836
|
-
httr:
|
|
1837
|
+
httr: Ci
|
|
1837
1838
|
}
|
|
1838
|
-
},
|
|
1839
|
+
}, qi = {
|
|
1839
1840
|
info: {
|
|
1840
1841
|
key: "native",
|
|
1841
1842
|
title: "net::http",
|
|
@@ -1866,16 +1867,16 @@ var Ie = (e, r, t) => {
|
|
|
1866
1867
|
l(`request["${h}"] = '${ze(s[h])}'`);
|
|
1867
1868
|
}), o.text && l(`request.body = ${JSON.stringify(o.text)}`), n(), l("response = http.request(request)"), l("puts response.read_body"), a();
|
|
1868
1869
|
}
|
|
1869
|
-
},
|
|
1870
|
+
}, Ni = {
|
|
1870
1871
|
info: {
|
|
1871
1872
|
key: "ruby",
|
|
1872
1873
|
title: "Ruby",
|
|
1873
1874
|
default: "native"
|
|
1874
1875
|
},
|
|
1875
1876
|
clientsById: {
|
|
1876
|
-
native:
|
|
1877
|
+
native: qi
|
|
1877
1878
|
}
|
|
1878
|
-
}, ue = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`,
|
|
1879
|
+
}, ue = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, ki = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), Ei = {
|
|
1879
1880
|
"http1.0": "0",
|
|
1880
1881
|
"url ": "",
|
|
1881
1882
|
cookie: "b",
|
|
@@ -1885,13 +1886,13 @@ var Ie = (e, r, t) => {
|
|
|
1885
1886
|
header: "H",
|
|
1886
1887
|
insecure: "k",
|
|
1887
1888
|
request: "X"
|
|
1888
|
-
},
|
|
1889
|
+
}, Ai = (e) => (r) => {
|
|
1889
1890
|
if (e) {
|
|
1890
|
-
const t =
|
|
1891
|
+
const t = Ei[r];
|
|
1891
1892
|
return t ? `-${t}` : "";
|
|
1892
1893
|
}
|
|
1893
1894
|
return `--${r}`;
|
|
1894
|
-
},
|
|
1895
|
+
}, Ii = {
|
|
1895
1896
|
info: {
|
|
1896
1897
|
key: "curl",
|
|
1897
1898
|
title: "cURL",
|
|
@@ -1905,7 +1906,7 @@ var Ie = (e, r, t) => {
|
|
|
1905
1906
|
...typeof a == "string" ? { indent: a } : {},
|
|
1906
1907
|
join: a !== !1 ? ` \\
|
|
1907
1908
|
${a}` : " "
|
|
1908
|
-
}), x =
|
|
1909
|
+
}), x = Ai(i);
|
|
1909
1910
|
let $ = ue(e);
|
|
1910
1911
|
if (h(`curl ${x("request")} ${r}`), u && ($ = unescape($), h(x("globoff"))), h(`${x("url ")}${$}`), t === "HTTP/1.0" && h(x("http1.0")), ve(s, "accept-encoding") && h("--compressed"), l.mimeType === "multipart/form-data") {
|
|
1911
1912
|
const m = pe(o, "content-type");
|
|
@@ -1937,7 +1938,7 @@ ${a}` : " "
|
|
|
1937
1938
|
if (!l.text)
|
|
1938
1939
|
break;
|
|
1939
1940
|
let m = !1;
|
|
1940
|
-
if (
|
|
1941
|
+
if (Aa(l.mimeType) && l.text.length > 20)
|
|
1941
1942
|
try {
|
|
1942
1943
|
const v = JSON.parse(l.text);
|
|
1943
1944
|
m = !0, l.text.indexOf("'") > 0 ? h(
|
|
@@ -1959,7 +1960,7 @@ ${JSON.stringify(v, null, p)}
|
|
|
1959
1960
|
}
|
|
1960
1961
|
return y();
|
|
1961
1962
|
}
|
|
1962
|
-
},
|
|
1963
|
+
}, Li = {
|
|
1963
1964
|
info: {
|
|
1964
1965
|
key: "httpie",
|
|
1965
1966
|
title: "HTTPie",
|
|
@@ -2008,7 +2009,7 @@ ${a.indent}` : " "
|
|
|
2008
2009
|
}
|
|
2009
2010
|
return c();
|
|
2010
2011
|
}
|
|
2011
|
-
},
|
|
2012
|
+
}, Ui = {
|
|
2012
2013
|
info: {
|
|
2013
2014
|
key: "wget",
|
|
2014
2015
|
title: "Wget",
|
|
@@ -2030,9 +2031,9 @@ ${l.indent}` : " "
|
|
|
2030
2031
|
return l.verbose ? n(`wget ${l.short ? "-v" : "--verbose"}`) : n(`wget ${l.short ? "-q" : "--quiet"}`), n(`--method ${ue(e)}`), Object.keys(t).forEach((i) => {
|
|
2031
2032
|
const c = `${i}: ${t[i]}`;
|
|
2032
2033
|
n(`--header ${ue(c)}`);
|
|
2033
|
-
}), r.text && n(`--body-data ${
|
|
2034
|
+
}), r.text && n(`--body-data ${ki(ue(r.text))}`), n(l.short ? "-O" : "--output-document"), n(`- ${ue(o)}`), a();
|
|
2034
2035
|
}
|
|
2035
|
-
},
|
|
2036
|
+
}, Fi = {
|
|
2036
2037
|
info: {
|
|
2037
2038
|
key: "shell",
|
|
2038
2039
|
title: "Shell",
|
|
@@ -2040,9 +2041,9 @@ ${l.indent}` : " "
|
|
|
2040
2041
|
cli: "%s"
|
|
2041
2042
|
},
|
|
2042
2043
|
clientsById: {
|
|
2043
|
-
curl:
|
|
2044
|
-
httpie:
|
|
2045
|
-
wget:
|
|
2044
|
+
curl: Ii,
|
|
2045
|
+
httpie: Li,
|
|
2046
|
+
wget: Ui
|
|
2046
2047
|
}
|
|
2047
2048
|
}, en = (e, r) => r.repeat(e), tn = (e, r, t, o) => {
|
|
2048
2049
|
const s = en(o, t), l = en(o - 1, t), n = r ? `,
|
|
@@ -2077,7 +2078,7 @@ ${l}]` : `[${e.join(n)}]`;
|
|
|
2077
2078
|
default:
|
|
2078
2079
|
return e == null ? "nil" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
2079
2080
|
}
|
|
2080
|
-
},
|
|
2081
|
+
}, _i = {
|
|
2081
2082
|
info: {
|
|
2082
2083
|
key: "urlsession",
|
|
2083
2084
|
title: "URLSession",
|
|
@@ -2128,39 +2129,39 @@ ${l}]` : `[${e.join(n)}]`;
|
|
|
2128
2129
|
}
|
|
2129
2130
|
}), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${s}"`), a(`request.timeoutInterval = ${n.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${tt(e, n)}`), u && a("request.httpBody = postData"), i(), a("let (data, _) = try await URLSession.shared.data(for: request)"), a("print(String(decoding: data, as: UTF8.self))"), c();
|
|
2130
2131
|
}
|
|
2131
|
-
},
|
|
2132
|
+
}, Bi = {
|
|
2132
2133
|
info: {
|
|
2133
2134
|
key: "swift",
|
|
2134
2135
|
title: "Swift",
|
|
2135
2136
|
default: "urlsession"
|
|
2136
2137
|
},
|
|
2137
2138
|
clientsById: {
|
|
2138
|
-
urlsession:
|
|
2139
|
+
urlsession: _i
|
|
2139
2140
|
}
|
|
2140
|
-
},
|
|
2141
|
-
c:
|
|
2142
|
-
clojure:
|
|
2143
|
-
csharp:
|
|
2144
|
-
go:
|
|
2145
|
-
http:
|
|
2146
|
-
java:
|
|
2147
|
-
javascript:
|
|
2148
|
-
json:
|
|
2149
|
-
kotlin:
|
|
2150
|
-
node:
|
|
2151
|
-
objc:
|
|
2152
|
-
ocaml:
|
|
2153
|
-
php:
|
|
2154
|
-
powershell:
|
|
2155
|
-
python:
|
|
2156
|
-
r:
|
|
2157
|
-
ruby:
|
|
2158
|
-
shell:
|
|
2159
|
-
swift:
|
|
2141
|
+
}, Hi = {
|
|
2142
|
+
c: Ea,
|
|
2143
|
+
clojure: Ua,
|
|
2144
|
+
csharp: Ma,
|
|
2145
|
+
go: Ga,
|
|
2146
|
+
http: Ja,
|
|
2147
|
+
java: Ya,
|
|
2148
|
+
javascript: ri,
|
|
2149
|
+
json: oi,
|
|
2150
|
+
kotlin: ii,
|
|
2151
|
+
node: pi,
|
|
2152
|
+
objc: hi,
|
|
2153
|
+
ocaml: mi,
|
|
2154
|
+
php: $i,
|
|
2155
|
+
powershell: Si,
|
|
2156
|
+
python: Pi,
|
|
2157
|
+
r: Ri,
|
|
2158
|
+
ruby: Ni,
|
|
2159
|
+
shell: Fi,
|
|
2160
|
+
swift: Bi
|
|
2160
2161
|
}, Pe = {}, _e = { exports: {} };
|
|
2161
2162
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
2162
|
-
var
|
|
2163
|
-
function
|
|
2163
|
+
var Mi = _e.exports, nn;
|
|
2164
|
+
function zi() {
|
|
2164
2165
|
return nn || (nn = 1, function(e, r) {
|
|
2165
2166
|
(function(t) {
|
|
2166
2167
|
var o = r && !r.nodeType && r, s = e && !e.nodeType && e, l = typeof Ze == "object" && Ze;
|
|
@@ -2277,7 +2278,7 @@ function Mi() {
|
|
|
2277
2278
|
n.hasOwnProperty(b) && (o[b] = n[b]);
|
|
2278
2279
|
else
|
|
2279
2280
|
t.punycode = n;
|
|
2280
|
-
})(
|
|
2281
|
+
})(Mi);
|
|
2281
2282
|
}(_e, _e.exports)), _e.exports;
|
|
2282
2283
|
}
|
|
2283
2284
|
var bt, on;
|
|
@@ -2285,19 +2286,19 @@ function uo() {
|
|
|
2285
2286
|
return on || (on = 1, bt = Object), bt;
|
|
2286
2287
|
}
|
|
2287
2288
|
var xt, an;
|
|
2288
|
-
function
|
|
2289
|
+
function Gi() {
|
|
2289
2290
|
return an || (an = 1, xt = Error), xt;
|
|
2290
2291
|
}
|
|
2291
2292
|
var $t, sn;
|
|
2292
|
-
function
|
|
2293
|
+
function Wi() {
|
|
2293
2294
|
return sn || (sn = 1, $t = EvalError), $t;
|
|
2294
2295
|
}
|
|
2295
2296
|
var jt, ln;
|
|
2296
|
-
function
|
|
2297
|
+
function Ji() {
|
|
2297
2298
|
return ln || (ln = 1, jt = RangeError), jt;
|
|
2298
2299
|
}
|
|
2299
2300
|
var wt, cn;
|
|
2300
|
-
function
|
|
2301
|
+
function Vi() {
|
|
2301
2302
|
return cn || (cn = 1, wt = ReferenceError), wt;
|
|
2302
2303
|
}
|
|
2303
2304
|
var St, un;
|
|
@@ -2309,57 +2310,57 @@ function We() {
|
|
|
2309
2310
|
return fn || (fn = 1, Ot = TypeError), Ot;
|
|
2310
2311
|
}
|
|
2311
2312
|
var Tt, pn;
|
|
2312
|
-
function
|
|
2313
|
+
function Di() {
|
|
2313
2314
|
return pn || (pn = 1, Tt = URIError), Tt;
|
|
2314
2315
|
}
|
|
2315
2316
|
var Pt, dn;
|
|
2316
|
-
function
|
|
2317
|
+
function Qi() {
|
|
2317
2318
|
return dn || (dn = 1, Pt = Math.abs), Pt;
|
|
2318
2319
|
}
|
|
2319
2320
|
var Ct, hn;
|
|
2320
|
-
function
|
|
2321
|
+
function Ki() {
|
|
2321
2322
|
return hn || (hn = 1, Ct = Math.floor), Ct;
|
|
2322
2323
|
}
|
|
2323
2324
|
var Rt, yn;
|
|
2324
|
-
function
|
|
2325
|
+
function Yi() {
|
|
2325
2326
|
return yn || (yn = 1, Rt = Math.max), Rt;
|
|
2326
2327
|
}
|
|
2327
2328
|
var qt, mn;
|
|
2328
|
-
function
|
|
2329
|
+
function Xi() {
|
|
2329
2330
|
return mn || (mn = 1, qt = Math.min), qt;
|
|
2330
2331
|
}
|
|
2331
2332
|
var Nt, gn;
|
|
2332
|
-
function
|
|
2333
|
+
function Zi() {
|
|
2333
2334
|
return gn || (gn = 1, Nt = Math.pow), Nt;
|
|
2334
2335
|
}
|
|
2335
2336
|
var kt, vn;
|
|
2336
|
-
function
|
|
2337
|
+
function es() {
|
|
2337
2338
|
return vn || (vn = 1, kt = Math.round), kt;
|
|
2338
2339
|
}
|
|
2339
2340
|
var Et, bn;
|
|
2340
|
-
function
|
|
2341
|
+
function ts() {
|
|
2341
2342
|
return bn || (bn = 1, Et = Number.isNaN || function(r) {
|
|
2342
2343
|
return r !== r;
|
|
2343
2344
|
}), Et;
|
|
2344
2345
|
}
|
|
2345
2346
|
var At, xn;
|
|
2346
|
-
function
|
|
2347
|
+
function rs() {
|
|
2347
2348
|
if (xn) return At;
|
|
2348
2349
|
xn = 1;
|
|
2349
|
-
var e = /* @__PURE__ */
|
|
2350
|
+
var e = /* @__PURE__ */ ts();
|
|
2350
2351
|
return At = function(t) {
|
|
2351
2352
|
return e(t) || t === 0 ? t : t < 0 ? -1 : 1;
|
|
2352
2353
|
}, At;
|
|
2353
2354
|
}
|
|
2354
2355
|
var It, $n;
|
|
2355
|
-
function
|
|
2356
|
+
function ns() {
|
|
2356
2357
|
return $n || ($n = 1, It = Object.getOwnPropertyDescriptor), It;
|
|
2357
2358
|
}
|
|
2358
2359
|
var Lt, jn;
|
|
2359
2360
|
function ot() {
|
|
2360
2361
|
if (jn) return Lt;
|
|
2361
2362
|
jn = 1;
|
|
2362
|
-
var e = /* @__PURE__ */
|
|
2363
|
+
var e = /* @__PURE__ */ ns();
|
|
2363
2364
|
if (e)
|
|
2364
2365
|
try {
|
|
2365
2366
|
e([], "length");
|
|
@@ -2382,7 +2383,7 @@ function at() {
|
|
|
2382
2383
|
return Ut = e, Ut;
|
|
2383
2384
|
}
|
|
2384
2385
|
var Ft, Sn;
|
|
2385
|
-
function
|
|
2386
|
+
function os() {
|
|
2386
2387
|
return Sn || (Sn = 1, Ft = function() {
|
|
2387
2388
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2388
2389
|
return !1;
|
|
@@ -2412,10 +2413,10 @@ function ns() {
|
|
|
2412
2413
|
}), Ft;
|
|
2413
2414
|
}
|
|
2414
2415
|
var _t, On;
|
|
2415
|
-
function
|
|
2416
|
+
function as() {
|
|
2416
2417
|
if (On) return _t;
|
|
2417
2418
|
On = 1;
|
|
2418
|
-
var e = typeof Symbol < "u" && Symbol, r =
|
|
2419
|
+
var e = typeof Symbol < "u" && Symbol, r = os();
|
|
2419
2420
|
return _t = function() {
|
|
2420
2421
|
return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r();
|
|
2421
2422
|
}, _t;
|
|
@@ -2432,7 +2433,7 @@ function ho() {
|
|
|
2432
2433
|
return Ht = e.getPrototypeOf || null, Ht;
|
|
2433
2434
|
}
|
|
2434
2435
|
var Mt, Cn;
|
|
2435
|
-
function
|
|
2436
|
+
function is() {
|
|
2436
2437
|
if (Cn) return Mt;
|
|
2437
2438
|
Cn = 1;
|
|
2438
2439
|
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, t = Math.max, o = "[object Function]", s = function(i, c) {
|
|
@@ -2480,7 +2481,7 @@ var zt, Rn;
|
|
|
2480
2481
|
function Je() {
|
|
2481
2482
|
if (Rn) return zt;
|
|
2482
2483
|
Rn = 1;
|
|
2483
|
-
var e =
|
|
2484
|
+
var e = is();
|
|
2484
2485
|
return zt = Function.prototype.bind || e, zt;
|
|
2485
2486
|
}
|
|
2486
2487
|
var Gt, qn;
|
|
@@ -2492,14 +2493,14 @@ function Or() {
|
|
|
2492
2493
|
return Nn || (Nn = 1, Wt = Function.prototype.apply), Wt;
|
|
2493
2494
|
}
|
|
2494
2495
|
var Jt, kn;
|
|
2495
|
-
function
|
|
2496
|
+
function ss() {
|
|
2496
2497
|
return kn || (kn = 1, Jt = typeof Reflect < "u" && Reflect && Reflect.apply), Jt;
|
|
2497
2498
|
}
|
|
2498
2499
|
var Vt, En;
|
|
2499
2500
|
function yo() {
|
|
2500
2501
|
if (En) return Vt;
|
|
2501
2502
|
En = 1;
|
|
2502
|
-
var e = Je(), r = Or(), t = Sr(), o =
|
|
2503
|
+
var e = Je(), r = Or(), t = Sr(), o = ss();
|
|
2503
2504
|
return Vt = o || e.call(t, r), Vt;
|
|
2504
2505
|
}
|
|
2505
2506
|
var Dt, An;
|
|
@@ -2514,7 +2515,7 @@ function mo() {
|
|
|
2514
2515
|
}, Dt;
|
|
2515
2516
|
}
|
|
2516
2517
|
var Qt, In;
|
|
2517
|
-
function
|
|
2518
|
+
function ls() {
|
|
2518
2519
|
if (In) return Qt;
|
|
2519
2520
|
In = 1;
|
|
2520
2521
|
var e = mo(), r = /* @__PURE__ */ ot(), t;
|
|
@@ -2538,10 +2539,10 @@ function ss() {
|
|
|
2538
2539
|
) : !1, Qt;
|
|
2539
2540
|
}
|
|
2540
2541
|
var Kt, Ln;
|
|
2541
|
-
function
|
|
2542
|
+
function cs() {
|
|
2542
2543
|
if (Ln) return Kt;
|
|
2543
2544
|
Ln = 1;
|
|
2544
|
-
var e = po(), r = ho(), t = /* @__PURE__ */
|
|
2545
|
+
var e = po(), r = ho(), t = /* @__PURE__ */ ls();
|
|
2545
2546
|
return Kt = e ? function(s) {
|
|
2546
2547
|
return e(s);
|
|
2547
2548
|
} : r ? function(s) {
|
|
@@ -2553,7 +2554,7 @@ function ls() {
|
|
|
2553
2554
|
} : null, Kt;
|
|
2554
2555
|
}
|
|
2555
2556
|
var Yt, Un;
|
|
2556
|
-
function
|
|
2557
|
+
function us() {
|
|
2557
2558
|
if (Un) return Yt;
|
|
2558
2559
|
Un = 1;
|
|
2559
2560
|
var e = Function.prototype.call, r = Object.prototype.hasOwnProperty, t = Je();
|
|
@@ -2563,7 +2564,7 @@ var Xt, Fn;
|
|
|
2563
2564
|
function Tr() {
|
|
2564
2565
|
if (Fn) return Xt;
|
|
2565
2566
|
Fn = 1;
|
|
2566
|
-
var e, r = /* @__PURE__ */ uo(), t = /* @__PURE__ */
|
|
2567
|
+
var e, r = /* @__PURE__ */ uo(), t = /* @__PURE__ */ Gi(), o = /* @__PURE__ */ Wi(), s = /* @__PURE__ */ Ji(), l = /* @__PURE__ */ Vi(), n = /* @__PURE__ */ fo(), a = /* @__PURE__ */ We(), i = /* @__PURE__ */ Di(), c = /* @__PURE__ */ Qi(), u = /* @__PURE__ */ Ki(), p = /* @__PURE__ */ Yi(), h = /* @__PURE__ */ Xi(), y = /* @__PURE__ */ Zi(), x = /* @__PURE__ */ es(), $ = /* @__PURE__ */ rs(), f = Function, m = function(J) {
|
|
2567
2568
|
try {
|
|
2568
2569
|
return f('"use strict"; return (' + J + ").constructor;")();
|
|
2569
2570
|
} catch {
|
|
@@ -2580,7 +2581,7 @@ function Tr() {
|
|
|
2580
2581
|
return T;
|
|
2581
2582
|
}
|
|
2582
2583
|
}
|
|
2583
|
-
}() : T, S =
|
|
2584
|
+
}() : T, S = as()(), b = cs(), q = ho(), L = po(), E = Or(), B = Sr(), P = {}, ae = typeof Uint8Array > "u" || !b ? e : b(Uint8Array), H = {
|
|
2584
2585
|
__proto__: null,
|
|
2585
2586
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
2586
2587
|
"%Array%": Array,
|
|
@@ -2739,7 +2740,7 @@ function Tr() {
|
|
|
2739
2740
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2740
2741
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2741
2742
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2742
|
-
}, k = Je(), re = /* @__PURE__ */
|
|
2743
|
+
}, k = Je(), re = /* @__PURE__ */ us(), R = k.call(B, Array.prototype.concat), N = k.call(E, Array.prototype.splice), U = k.call(B, String.prototype.replace), C = k.call(B, String.prototype.slice), I = k.call(B, RegExp.prototype.exec), W = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, z = /\\(\\)?/g, K = function(A) {
|
|
2743
2744
|
var F = C(A, 0, 1), _ = C(A, -1);
|
|
2744
2745
|
if (F === "%" && _ !== "%")
|
|
2745
2746
|
throw new n("invalid intrinsic syntax, expected closing `%`");
|
|
@@ -2796,7 +2797,7 @@ function Tr() {
|
|
|
2796
2797
|
}, Xt;
|
|
2797
2798
|
}
|
|
2798
2799
|
var Zt = { exports: {} }, er, _n;
|
|
2799
|
-
function
|
|
2800
|
+
function fs() {
|
|
2800
2801
|
if (_n) return er;
|
|
2801
2802
|
_n = 1;
|
|
2802
2803
|
var e = /* @__PURE__ */ at(), r = /* @__PURE__ */ fo(), t = /* @__PURE__ */ We(), o = /* @__PURE__ */ ot();
|
|
@@ -2828,7 +2829,7 @@ function us() {
|
|
|
2828
2829
|
}, er;
|
|
2829
2830
|
}
|
|
2830
2831
|
var tr, Bn;
|
|
2831
|
-
function
|
|
2832
|
+
function ps() {
|
|
2832
2833
|
if (Bn) return tr;
|
|
2833
2834
|
Bn = 1;
|
|
2834
2835
|
var e = /* @__PURE__ */ at(), r = function() {
|
|
@@ -2845,10 +2846,10 @@ function fs() {
|
|
|
2845
2846
|
}, tr = r, tr;
|
|
2846
2847
|
}
|
|
2847
2848
|
var rr, Hn;
|
|
2848
|
-
function
|
|
2849
|
+
function ds() {
|
|
2849
2850
|
if (Hn) return rr;
|
|
2850
2851
|
Hn = 1;
|
|
2851
|
-
var e = /* @__PURE__ */ Tr(), r = /* @__PURE__ */
|
|
2852
|
+
var e = /* @__PURE__ */ Tr(), r = /* @__PURE__ */ fs(), t = /* @__PURE__ */ ps()(), o = /* @__PURE__ */ ot(), s = /* @__PURE__ */ We(), l = e("%Math.floor%");
|
|
2852
2853
|
return rr = function(a, i) {
|
|
2853
2854
|
if (typeof a != "function")
|
|
2854
2855
|
throw new s("`fn` is not a function");
|
|
@@ -2875,7 +2876,7 @@ function ps() {
|
|
|
2875
2876
|
}, rr;
|
|
2876
2877
|
}
|
|
2877
2878
|
var nr, Mn;
|
|
2878
|
-
function
|
|
2879
|
+
function hs() {
|
|
2879
2880
|
if (Mn) return nr;
|
|
2880
2881
|
Mn = 1;
|
|
2881
2882
|
var e = Je(), r = Or(), t = yo();
|
|
@@ -2884,9 +2885,9 @@ function ds() {
|
|
|
2884
2885
|
}, nr;
|
|
2885
2886
|
}
|
|
2886
2887
|
var zn;
|
|
2887
|
-
function
|
|
2888
|
+
function ys() {
|
|
2888
2889
|
return zn || (zn = 1, function(e) {
|
|
2889
|
-
var r = /* @__PURE__ */
|
|
2890
|
+
var r = /* @__PURE__ */ ds(), t = /* @__PURE__ */ at(), o = mo(), s = hs();
|
|
2890
2891
|
e.exports = function(n) {
|
|
2891
2892
|
var a = o(arguments), i = n.length - (arguments.length - 1);
|
|
2892
2893
|
return r(
|
|
@@ -2898,21 +2899,21 @@ function hs() {
|
|
|
2898
2899
|
}(Zt)), Zt.exports;
|
|
2899
2900
|
}
|
|
2900
2901
|
var or, Gn;
|
|
2901
|
-
function
|
|
2902
|
+
function ms() {
|
|
2902
2903
|
if (Gn) return or;
|
|
2903
2904
|
Gn = 1;
|
|
2904
|
-
var e = /* @__PURE__ */ Tr(), r =
|
|
2905
|
+
var e = /* @__PURE__ */ Tr(), r = ys(), t = r(e("String.prototype.indexOf"));
|
|
2905
2906
|
return or = function(s, l) {
|
|
2906
2907
|
var n = e(s, !!l);
|
|
2907
2908
|
return typeof n == "function" && t(s, ".prototype.") > -1 ? r(n) : n;
|
|
2908
2909
|
}, or;
|
|
2909
2910
|
}
|
|
2910
|
-
const
|
|
2911
|
+
const gs = {}, vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2911
2912
|
__proto__: null,
|
|
2912
|
-
default:
|
|
2913
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2913
|
+
default: gs
|
|
2914
|
+
}, Symbol.toStringTag, { value: "Module" })), bs = /* @__PURE__ */ ma(vs);
|
|
2914
2915
|
var ar, Wn;
|
|
2915
|
-
function
|
|
2916
|
+
function xs() {
|
|
2916
2917
|
if (Wn) return ar;
|
|
2917
2918
|
Wn = 1;
|
|
2918
2919
|
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && r && typeof r.get == "function" ? r.get : null, o = e && Map.prototype.forEach, s = typeof Set == "function" && Set.prototype, l = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, n = s && l && typeof l.get == "function" ? l.get : null, a = s && Set.prototype.forEach, i = typeof WeakMap == "function" && WeakMap.prototype, c = i ? WeakMap.prototype.has : null, u = typeof WeakSet == "function" && WeakSet.prototype, p = u ? WeakSet.prototype.has : null, h = typeof WeakRef == "function" && WeakRef.prototype, y = h ? WeakRef.prototype.deref : null, x = Boolean.prototype.valueOf, $ = Object.prototype.toString, f = Function.prototype.toString, m = String.prototype.match, v = String.prototype.slice, O = String.prototype.replace, T = String.prototype.toUpperCase, d = String.prototype.toLowerCase, S = RegExp.prototype.test, b = Array.prototype.concat, q = Array.prototype.join, L = Array.prototype.slice, E = Math.floor, B = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, P = Object.getOwnPropertySymbols, ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, H = typeof Symbol == "function" && typeof Symbol.iterator == "object", D = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === H || !0) ? Symbol.toStringTag : null, se = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(j) {
|
|
@@ -2931,7 +2932,7 @@ function bs() {
|
|
|
2931
2932
|
}
|
|
2932
2933
|
return O.call(w, X, "$&_");
|
|
2933
2934
|
}
|
|
2934
|
-
var re =
|
|
2935
|
+
var re = bs, R = re.custom, N = F(R) ? R : null;
|
|
2935
2936
|
ar = function j(w, X, ee, ie) {
|
|
2936
2937
|
var M = X || {};
|
|
2937
2938
|
if (G(M, "quoteStyle") && M.quoteStyle !== "single" && M.quoteStyle !== "double")
|
|
@@ -3270,10 +3271,10 @@ function bs() {
|
|
|
3270
3271
|
return ar;
|
|
3271
3272
|
}
|
|
3272
3273
|
var ir, Jn;
|
|
3273
|
-
function
|
|
3274
|
+
function $s() {
|
|
3274
3275
|
if (Jn) return ir;
|
|
3275
3276
|
Jn = 1;
|
|
3276
|
-
var e = /* @__PURE__ */ Tr(), r =
|
|
3277
|
+
var e = /* @__PURE__ */ Tr(), r = ms(), t = /* @__PURE__ */ xs(), o = /* @__PURE__ */ We(), s = e("%WeakMap%", !0), l = e("%Map%", !0), n = r("WeakMap.prototype.get", !0), a = r("WeakMap.prototype.set", !0), i = r("WeakMap.prototype.has", !0), c = r("Map.prototype.get", !0), u = r("Map.prototype.set", !0), p = r("Map.prototype.has", !0), h = function(f, m) {
|
|
3277
3278
|
for (var v = f, O; (O = v.next) !== null; v = O)
|
|
3278
3279
|
if (O.key === m)
|
|
3279
3280
|
return v.next = O.next, O.next = /** @type {NonNullable<typeof list.next>} */
|
|
@@ -3475,10 +3476,10 @@ function go() {
|
|
|
3475
3476
|
}, lr;
|
|
3476
3477
|
}
|
|
3477
3478
|
var cr, Qn;
|
|
3478
|
-
function
|
|
3479
|
+
function js() {
|
|
3479
3480
|
if (Qn) return cr;
|
|
3480
3481
|
Qn = 1;
|
|
3481
|
-
var e =
|
|
3482
|
+
var e = $s(), r = /* @__PURE__ */ go(), t = /* @__PURE__ */ Pr(), o = Object.prototype.hasOwnProperty, s = {
|
|
3482
3483
|
brackets: function(f) {
|
|
3483
3484
|
return f + "[]";
|
|
3484
3485
|
},
|
|
@@ -3664,7 +3665,7 @@ function $s() {
|
|
|
3664
3665
|
}, cr;
|
|
3665
3666
|
}
|
|
3666
3667
|
var ur, Kn;
|
|
3667
|
-
function
|
|
3668
|
+
function ws() {
|
|
3668
3669
|
if (Kn) return ur;
|
|
3669
3670
|
Kn = 1;
|
|
3670
3671
|
var e = /* @__PURE__ */ go(), r = Object.prototype.hasOwnProperty, t = Array.isArray, o = {
|
|
@@ -3801,7 +3802,7 @@ var fr, Yn;
|
|
|
3801
3802
|
function vo() {
|
|
3802
3803
|
if (Yn) return fr;
|
|
3803
3804
|
Yn = 1;
|
|
3804
|
-
var e = /* @__PURE__ */
|
|
3805
|
+
var e = /* @__PURE__ */ js(), r = /* @__PURE__ */ ws(), t = /* @__PURE__ */ Pr();
|
|
3805
3806
|
return fr = {
|
|
3806
3807
|
formats: t,
|
|
3807
3808
|
parse: r,
|
|
@@ -3809,10 +3810,10 @@ function vo() {
|
|
|
3809
3810
|
}, fr;
|
|
3810
3811
|
}
|
|
3811
3812
|
var Xn;
|
|
3812
|
-
function
|
|
3813
|
+
function Ss() {
|
|
3813
3814
|
if (Xn) return Pe;
|
|
3814
3815
|
Xn = 1;
|
|
3815
|
-
var e =
|
|
3816
|
+
var e = zi();
|
|
3816
3817
|
function r() {
|
|
3817
3818
|
this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null;
|
|
3818
3819
|
}
|
|
@@ -4031,12 +4032,12 @@ function ws() {
|
|
|
4031
4032
|
S && (S = S[0], S !== ":" && (this.port = S.substr(1)), d = d.substr(0, d.length - S.length)), d && (this.hostname = d);
|
|
4032
4033
|
}, Pe.parse = m, Pe.resolve = O, Pe.resolveObject = T, Pe.format = v, Pe.Url = r, Pe;
|
|
4033
4034
|
}
|
|
4034
|
-
var pr =
|
|
4035
|
+
var pr = Ss(), dr = /* @__PURE__ */ vo(), Os = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), Ts = class {
|
|
4035
4036
|
constructor(e, r = {}) {
|
|
4036
4037
|
this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
|
|
4037
4038
|
harIsAlreadyEncoded: !1,
|
|
4038
4039
|
...r
|
|
4039
|
-
}, this.requests = [],
|
|
4040
|
+
}, this.requests = [], Os(e) ? this.entries = e.log.entries : this.entries = [
|
|
4040
4041
|
{
|
|
4041
4042
|
request: e
|
|
4042
4043
|
}
|
|
@@ -4161,14 +4162,14 @@ var pr = ws(), dr = /* @__PURE__ */ vo(), Ss = (e) => typeof e == "object" && "l
|
|
|
4161
4162
|
}
|
|
4162
4163
|
convert(e, r, t) {
|
|
4163
4164
|
this.initCalled || this.init(), !t && r && (t = r);
|
|
4164
|
-
const o =
|
|
4165
|
+
const o = Hi[e];
|
|
4165
4166
|
if (!o)
|
|
4166
4167
|
return !1;
|
|
4167
4168
|
const { convert: s } = o.clientsById[r || o.info.default];
|
|
4168
4169
|
return this.requests.map((n) => s(n, t));
|
|
4169
4170
|
}
|
|
4170
4171
|
};
|
|
4171
|
-
const
|
|
4172
|
+
const Ps = ({
|
|
4172
4173
|
rootMargin: e = "0px",
|
|
4173
4174
|
threshold: r
|
|
4174
4175
|
} = {}) => {
|
|
@@ -4183,12 +4184,12 @@ const Ts = ({
|
|
|
4183
4184
|
if (n)
|
|
4184
4185
|
return l.observe(n), () => l.unobserve(n);
|
|
4185
4186
|
}, [e, r]), [s, t];
|
|
4186
|
-
},
|
|
4187
|
+
}, Cs = typeof window < "u" ? ea : $r, bo = ({
|
|
4187
4188
|
children: e,
|
|
4188
4189
|
maxHeight: r = 250
|
|
4189
4190
|
}) => {
|
|
4190
4191
|
const t = xr(null), [o, s] = ge(!1), [l, n] = ge(!1);
|
|
4191
|
-
return
|
|
4192
|
+
return Cs(() => {
|
|
4192
4193
|
const a = t.current;
|
|
4193
4194
|
if (!a) return;
|
|
4194
4195
|
s(a.scrollHeight > r);
|
|
@@ -4242,7 +4243,7 @@ const Ts = ({
|
|
|
4242
4243
|
]
|
|
4243
4244
|
}
|
|
4244
4245
|
);
|
|
4245
|
-
},
|
|
4246
|
+
}, Rs = ({
|
|
4246
4247
|
server: e,
|
|
4247
4248
|
servers: r,
|
|
4248
4249
|
operation: t,
|
|
@@ -4333,7 +4334,7 @@ const Ts = ({
|
|
|
4333
4334
|
default:
|
|
4334
4335
|
return {};
|
|
4335
4336
|
}
|
|
4336
|
-
},
|
|
4337
|
+
}, qs = (e) => e == null ? "No example" : typeof e == "string" ? e.trim() : JSON.stringify(e, null, 2), Ns = (e) => e ? {
|
|
4337
4338
|
"application/json": "json",
|
|
4338
4339
|
"application/xml": "xml",
|
|
4339
4340
|
"application/x-yaml": "yaml",
|
|
@@ -4355,7 +4356,7 @@ const Ts = ({
|
|
|
4355
4356
|
$r(() => {
|
|
4356
4357
|
u && (t == null || t(u));
|
|
4357
4358
|
}, [u, t]);
|
|
4358
|
-
const p =
|
|
4359
|
+
const p = qs(u), h = Ns(a == null ? void 0 : a.mediaType);
|
|
4359
4360
|
return /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
4360
4361
|
/* @__PURE__ */ g.jsxs(xo, { className: "p-0", children: [
|
|
4361
4362
|
c != null && c.externalValue ? /* @__PURE__ */ g.jsx("div", { className: "p-2", children: /* @__PURE__ */ g.jsx(
|
|
@@ -4408,19 +4409,19 @@ const Ts = ({
|
|
|
4408
4409
|
] })
|
|
4409
4410
|
] })
|
|
4410
4411
|
] });
|
|
4411
|
-
},
|
|
4412
|
+
}, ks = ({
|
|
4412
4413
|
content: e,
|
|
4413
4414
|
onExampleChange: r
|
|
4414
4415
|
}) => e.length === 0 ? null : /* @__PURE__ */ g.jsxs(Cr, { children: [
|
|
4415
4416
|
/* @__PURE__ */ g.jsx(Rr, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ g.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
|
|
4416
4417
|
/* @__PURE__ */ g.jsx(jo, { content: e, onExampleChange: r })
|
|
4417
|
-
] }),
|
|
4418
|
+
] }), Es = ({ response: e }) => /* @__PURE__ */ g.jsx(Ye.Content, { value: e.statusCode, children: /* @__PURE__ */ g.jsx(
|
|
4418
4419
|
jo,
|
|
4419
4420
|
{
|
|
4420
4421
|
content: e.content ?? [],
|
|
4421
4422
|
description: e.description ?? void 0
|
|
4422
4423
|
}
|
|
4423
|
-
) }),
|
|
4424
|
+
) }), As = ({
|
|
4424
4425
|
responses: e,
|
|
4425
4426
|
selectedResponse: r,
|
|
4426
4427
|
onSelectResponse: t
|
|
@@ -4449,11 +4450,11 @@ const Ts = ({
|
|
|
4449
4450
|
s.statusCode
|
|
4450
4451
|
)) })
|
|
4451
4452
|
] }),
|
|
4452
|
-
e.map((s) => /* @__PURE__ */ g.jsx(
|
|
4453
|
+
e.map((s) => /* @__PURE__ */ g.jsx(Es, { response: s }, s.statusCode))
|
|
4453
4454
|
]
|
|
4454
4455
|
}
|
|
4455
4456
|
) });
|
|
4456
|
-
},
|
|
4457
|
+
}, Is = (e, r) => {
|
|
4457
4458
|
let t;
|
|
4458
4459
|
switch (r) {
|
|
4459
4460
|
case "shell":
|
|
@@ -4494,7 +4495,7 @@ const Ts = ({
|
|
|
4494
4495
|
break;
|
|
4495
4496
|
}
|
|
4496
4497
|
return t ? t[0] : "";
|
|
4497
|
-
},
|
|
4498
|
+
}, Ls = rt(
|
|
4498
4499
|
/* GraphQL */
|
|
4499
4500
|
`
|
|
4500
4501
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -4506,7 +4507,7 @@ const Ts = ({
|
|
|
4506
4507
|
}
|
|
4507
4508
|
}
|
|
4508
4509
|
`
|
|
4509
|
-
),
|
|
4510
|
+
), Us = [
|
|
4510
4511
|
{ value: "shell", label: "cURL" },
|
|
4511
4512
|
{ value: "js", label: "JavaScript" },
|
|
4512
4513
|
{ value: "python", label: "Python" },
|
|
@@ -4518,13 +4519,13 @@ const Ts = ({
|
|
|
4518
4519
|
{ value: "php", label: "PHP" },
|
|
4519
4520
|
{ value: "ruby", label: "Ruby" },
|
|
4520
4521
|
{ value: "swift", label: "Swift" }
|
|
4521
|
-
],
|
|
4522
|
+
], Fs = ({
|
|
4522
4523
|
operation: e,
|
|
4523
4524
|
selectedResponse: r,
|
|
4524
4525
|
onSelectResponse: t
|
|
4525
4526
|
}) => {
|
|
4526
4527
|
var d;
|
|
4527
|
-
const { input: o, type: s, options: l } = jr(), n = wr(
|
|
4528
|
+
const { input: o, type: s, options: l } = jr(), n = wr(Ls, { input: o, type: s }), a = vr(n), i = oo(e.method), [c, u] = No(), [, p] = eo(), [h, y] = ge(), x = c.get("lang") ?? (l == null ? void 0 : l.examplesDefaultLanguage) ?? "shell", $ = (d = e.requestBody) == null ? void 0 : d.content, f = /* @__PURE__ */ g.jsx(
|
|
4528
4529
|
ia,
|
|
4529
4530
|
{
|
|
4530
4531
|
path: e.path,
|
|
@@ -4540,7 +4541,7 @@ const Ts = ({
|
|
|
4540
4541
|
}
|
|
4541
4542
|
), { selectedServer: m } = br(a.data.schema.servers), v = to(() => {
|
|
4542
4543
|
var q;
|
|
4543
|
-
const S = h ?? ((q = $ == null ? void 0 : $[0]) != null && q.schema ? He($[0].schema) : void 0), b = new
|
|
4544
|
+
const S = h ?? ((q = $ == null ? void 0 : $[0]) != null && q.schema ? He($[0].schema) : void 0), b = new Ts({
|
|
4544
4545
|
method: e.method.toLocaleUpperCase(),
|
|
4545
4546
|
url: m + e.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
4546
4547
|
postData: S ? {
|
|
@@ -4554,7 +4555,7 @@ const Ts = ({
|
|
|
4554
4555
|
headersSize: 0,
|
|
4555
4556
|
bodySize: 0
|
|
4556
4557
|
});
|
|
4557
|
-
return
|
|
4558
|
+
return Is(b, x);
|
|
4558
4559
|
}, [
|
|
4559
4560
|
h,
|
|
4560
4561
|
$,
|
|
@@ -4563,7 +4564,7 @@ const Ts = ({
|
|
|
4563
4564
|
m,
|
|
4564
4565
|
a.data.schema.url,
|
|
4565
4566
|
x
|
|
4566
|
-
]), [O, T] =
|
|
4567
|
+
]), [O, T] = Ps({ rootMargin: "200px 0px 200px 0px" });
|
|
4567
4568
|
return /* @__PURE__ */ g.jsxs(
|
|
4568
4569
|
"aside",
|
|
4569
4570
|
{
|
|
@@ -4578,7 +4579,7 @@ const Ts = ({
|
|
|
4578
4579
|
f
|
|
4579
4580
|
] }),
|
|
4580
4581
|
T && /* @__PURE__ */ g.jsx(
|
|
4581
|
-
|
|
4582
|
+
Rs,
|
|
4582
4583
|
{
|
|
4583
4584
|
servers: a.data.schema.servers.map((S) => S.url),
|
|
4584
4585
|
operation: e,
|
|
@@ -4608,21 +4609,21 @@ const Ts = ({
|
|
|
4608
4609
|
u((b) => (b.set("lang", S.target.value), b));
|
|
4609
4610
|
});
|
|
4610
4611
|
},
|
|
4611
|
-
options:
|
|
4612
|
+
options: Us
|
|
4612
4613
|
}
|
|
4613
4614
|
)
|
|
4614
4615
|
] })
|
|
4615
4616
|
] })
|
|
4616
4617
|
] }),
|
|
4617
4618
|
T && $ && /* @__PURE__ */ g.jsx(
|
|
4618
|
-
|
|
4619
|
+
ks,
|
|
4619
4620
|
{
|
|
4620
4621
|
content: $,
|
|
4621
4622
|
onExampleChange: y
|
|
4622
4623
|
}
|
|
4623
4624
|
),
|
|
4624
4625
|
T && e.responses.length > 0 && /* @__PURE__ */ g.jsx(
|
|
4625
|
-
|
|
4626
|
+
As,
|
|
4626
4627
|
{
|
|
4627
4628
|
selectedResponse: r,
|
|
4628
4629
|
onSelectResponse: t,
|
|
@@ -4632,7 +4633,7 @@ const Ts = ({
|
|
|
4632
4633
|
]
|
|
4633
4634
|
}
|
|
4634
4635
|
);
|
|
4635
|
-
},
|
|
4636
|
+
}, _s = {
|
|
4636
4637
|
AND: /* @__PURE__ */ g.jsx(Do, { size: 16, className: "fill-card" }),
|
|
4637
4638
|
OR: /* @__PURE__ */ g.jsx(Vo, { size: 16, className: "fill-card" }),
|
|
4638
4639
|
ONE: /* @__PURE__ */ g.jsx(Jo, { size: 14, className: "fill-card" })
|
|
@@ -4713,12 +4714,12 @@ const Ts = ({
|
|
|
4713
4714
|
allOf: "AND",
|
|
4714
4715
|
anyOf: "OR",
|
|
4715
4716
|
oneOf: "ONE"
|
|
4716
|
-
}, hr = (e) => e ===
|
|
4717
|
+
}, hr = (e) => e === va, wo = ({
|
|
4717
4718
|
schema: e,
|
|
4718
4719
|
level: r
|
|
4719
4720
|
}) => {
|
|
4720
4721
|
const [t, o] = ge(!0), s = ta(() => o((l) => !l), []);
|
|
4721
|
-
for (const [l, n] of
|
|
4722
|
+
for (const [l, n] of ga(Js))
|
|
4722
4723
|
if (e[l])
|
|
4723
4724
|
return /* @__PURE__ */ g.jsx(
|
|
4724
4725
|
Gs,
|
|
@@ -4883,7 +4884,7 @@ const Ts = ({
|
|
|
4883
4884
|
serverUrl: r
|
|
4884
4885
|
}) => {
|
|
4885
4886
|
var i, c, u;
|
|
4886
|
-
const t =
|
|
4887
|
+
const t = ba(Ys, e), o = io(
|
|
4887
4888
|
t.parameters ?? [],
|
|
4888
4889
|
(p) => p.in
|
|
4889
4890
|
), s = xr(null), l = t.responses.at(0), [n, a] = ge(l == null ? void 0 : l.statusCode);
|
|
@@ -4936,7 +4937,7 @@ const Ts = ({
|
|
|
4936
4937
|
(p) => {
|
|
4937
4938
|
var h;
|
|
4938
4939
|
return (h = o[p]) != null && h.length ? /* @__PURE__ */ g.jsx(
|
|
4939
|
-
|
|
4940
|
+
Ta,
|
|
4940
4941
|
{
|
|
4941
4942
|
id: t.slug,
|
|
4942
4943
|
parameters: o[p],
|
|
@@ -4946,7 +4947,7 @@ const Ts = ({
|
|
|
4946
4947
|
) : [];
|
|
4947
4948
|
}
|
|
4948
4949
|
) }),
|
|
4949
|
-
|
|
4950
|
+
ja((u = (c = (i = t.requestBody) == null ? void 0 : i.content) == null ? void 0 : c.at(0)) == null ? void 0 : u.schema, (p) => /* @__PURE__ */ g.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
4950
4951
|
/* @__PURE__ */ g.jsx(
|
|
4951
4952
|
Be,
|
|
4952
4953
|
{
|
|
@@ -5005,7 +5006,7 @@ const Ts = ({
|
|
|
5005
5006
|
] })
|
|
5006
5007
|
] }),
|
|
5007
5008
|
/* @__PURE__ */ g.jsx(
|
|
5008
|
-
|
|
5009
|
+
Fs,
|
|
5009
5010
|
{
|
|
5010
5011
|
selectedResponse: n,
|
|
5011
5012
|
onSelectResponse: a,
|
|
@@ -5114,7 +5115,7 @@ const Ys = rt(
|
|
|
5114
5115
|
}
|
|
5115
5116
|
}
|
|
5116
5117
|
`
|
|
5117
|
-
),
|
|
5118
|
+
), xl = ({
|
|
5118
5119
|
tag: e,
|
|
5119
5120
|
untagged: r
|
|
5120
5121
|
}) => {
|
|
@@ -5160,7 +5161,7 @@ const Ys = rt(
|
|
|
5160
5161
|
}
|
|
5161
5162
|
),
|
|
5162
5163
|
/* @__PURE__ */ g.jsx("hr", {}),
|
|
5163
|
-
/* @__PURE__ */ g.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ g.jsx(
|
|
5164
|
+
/* @__PURE__ */ g.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ g.jsx($a, {}) }),
|
|
5164
5165
|
x.map((f) => /* @__PURE__ */ g.jsx(
|
|
5165
5166
|
Qs,
|
|
5166
5167
|
{
|
|
@@ -5172,7 +5173,7 @@ const Ys = rt(
|
|
|
5172
5173
|
] });
|
|
5173
5174
|
};
|
|
5174
5175
|
export {
|
|
5175
|
-
|
|
5176
|
+
xl as OperationList,
|
|
5176
5177
|
Ys as OperationsFragment
|
|
5177
5178
|
};
|
|
5178
|
-
//# sourceMappingURL=OperationList-
|
|
5179
|
+
//# sourceMappingURL=OperationList-DWnNbwVg.js.map
|