zudoku 0.35.5 → 0.36.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/dist/app/entry.server.js +5 -1
- package/dist/app/entry.server.js.map +1 -1
- package/dist/config/validators/common.d.ts +176 -176
- package/dist/config/validators/common.js +8 -6
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +63 -63
- package/dist/lib/authentication/providers/openid.js +11 -7
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/AnchorLink.js +3 -2
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Layout.js +3 -14
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Zudoku.js +3 -1
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/cache.d.ts +7 -0
- package/dist/lib/components/cache.js +7 -0
- package/dist/lib/components/cache.js.map +1 -1
- package/dist/lib/components/context/ViewportAnchorContext.js +3 -6
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/context/ZudokuContext.js +4 -3
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +3 -2
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +8 -6
- package/dist/lib/core/ZudokuContext.js +4 -2
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +3 -3
- package/dist/lib/hooks/useEvent.test.js +1 -1
- package/dist/lib/hooks/useEvent.test.js.map +1 -1
- package/dist/lib/oas/graphql/index.d.ts +16 -4
- package/dist/lib/oas/graphql/index.js +59 -43
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +19 -5
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +2 -2
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +2 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +4 -4
- package/dist/lib/plugins/openapi/graphql/gql.js +3 -3
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +34 -45
- package/dist/lib/plugins/openapi/graphql/graphql.js +20 -30
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +5 -10
- package/dist/lib/plugins/openapi/index.js +29 -60
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +3 -1
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js +5 -7
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +1 -1
- package/dist/lib/util/traverse.js +2 -2
- package/dist/lib/util/traverse.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js +2 -0
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/api/schema-codegen.js +19 -4
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +61 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/plugin-api.js +3 -11
- package/dist/vite/plugin-api.js.map +1 -1
- package/lib/{AuthenticationPlugin-4ip08maU.js → AuthenticationPlugin-Cr6xjOJD.js} +2 -2
- package/lib/{AuthenticationPlugin-4ip08maU.js.map → AuthenticationPlugin-Cr6xjOJD.js.map} +1 -1
- package/lib/{Markdown-hBN9vkm5.js → Markdown-BlioIqkZ.js} +313 -311
- package/lib/Markdown-BlioIqkZ.js.map +1 -0
- package/lib/{MdxPage-UCWwxhzC.js → MdxPage-7XnN9J9R.js} +3 -3
- package/lib/{MdxPage-UCWwxhzC.js.map → MdxPage-7XnN9J9R.js.map} +1 -1
- package/lib/{OasProvider-CJ8KOnsH.js → OasProvider-BaRRMSsD.js} +3 -3
- package/lib/{OasProvider-CJ8KOnsH.js.map → OasProvider-BaRRMSsD.js.map} +1 -1
- package/lib/{OperationList-C4rpJdcE.js → OperationList-BjL1hzSx.js} +988 -961
- package/lib/OperationList-BjL1hzSx.js.map +1 -0
- package/lib/{SlotletProvider-D-XPr1Wg.js → SlotletProvider-CXb3wQiR.js} +2 -2
- package/lib/{SlotletProvider-D-XPr1Wg.js.map → SlotletProvider-CXb3wQiR.js.map} +1 -1
- package/lib/{circular-v7K6lDDh.js → circular-ByJI6Mci.js} +4887 -4419
- package/lib/circular-ByJI6Mci.js.map +1 -0
- package/lib/{createServer-BEFAOb-x.js → createServer-DjgKDpGV.js} +3887 -4291
- package/lib/createServer-DjgKDpGV.js.map +1 -0
- package/lib/{hook-CfCFKZ-2.js → hook-Bo80UX00.js} +75 -74
- package/lib/hook-Bo80UX00.js.map +1 -0
- package/lib/{index-Dowg8c_k.js → index-D5m8_oyY.js} +612 -650
- package/lib/index-D5m8_oyY.js.map +1 -0
- package/lib/post-processors/traverse.js +2 -2
- package/lib/post-processors/traverse.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +283 -282
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +395 -397
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +2 -2
- package/lib/zudoku.plugin-api-keys.js +2 -2
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +4 -5
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +5 -5
- package/src/app/entry.server.tsx +7 -1
- package/src/lib/authentication/providers/openid.tsx +12 -9
- package/src/lib/components/AnchorLink.tsx +4 -2
- package/src/lib/components/Layout.tsx +3 -16
- package/src/lib/components/Zudoku.tsx +5 -1
- package/src/lib/components/cache.ts +8 -0
- package/src/lib/components/context/ViewportAnchorContext.tsx +3 -6
- package/src/lib/components/context/ZudokuContext.ts +5 -4
- package/src/lib/components/navigation/SidebarItem.tsx +3 -2
- package/src/lib/core/ZudokuContext.ts +11 -8
- package/src/lib/core/plugins.ts +4 -4
- package/src/lib/hooks/useEvent.test.tsx +1 -1
- package/src/lib/oas/graphql/index.ts +116 -76
- package/src/lib/plugins/openapi/OperationList.tsx +31 -37
- package/src/lib/plugins/openapi/OperationListItem.tsx +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +2 -2
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +2 -1
- package/src/lib/plugins/openapi/graphql/gql.ts +17 -17
- package/src/lib/plugins/openapi/graphql/graphql.ts +62 -79
- package/src/lib/plugins/openapi/index.tsx +40 -84
- package/src/lib/plugins/openapi/interfaces.ts +4 -1
- package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +5 -7
- package/src/lib/util/traverse.ts +2 -2
- package/src/lib/util/useScrollToAnchor.ts +2 -0
- package/lib/Markdown-hBN9vkm5.js.map +0 -1
- package/lib/OperationList-C4rpJdcE.js.map +0 -1
- package/lib/circular-v7K6lDDh.js.map +0 -1
- package/lib/createServer-BEFAOb-x.js.map +0 -1
- package/lib/hook-CfCFKZ-2.js.map +0 -1
- package/lib/index-Dowg8c_k.js.map +0 -1
|
@@ -1,40 +1,54 @@
|
|
|
1
1
|
import { j as u } from "./jsx-runtime-CYK1ROHF.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { d as _o } from "./useQuery-CQUwWR9i.js";
|
|
3
|
+
import { b as Sr, k as Or, l as Bo } from "./hook-Bo80UX00.js";
|
|
4
|
+
import { H as Ho } from "./index.esm-CltAN0Tf.js";
|
|
5
|
+
import { ChevronsUpDownIcon as no, CheckIcon as Mo, CopyIcon as zo, ChevronUpIcon as Go, ChevronDownIcon as oo, UnfoldVerticalIcon as Wo, FoldVerticalIcon as Jo, CircleIcon as Vo, CircleDotIcon as Do, CircleFadingPlusIcon as Ko, SquareMinusIcon as Qo, SquarePlusIcon as Yo, MinusIcon as Xo, PlusIcon as Zo, RefreshCcwDotIcon as ea, ChevronsDownUpIcon as ta } from "lucide-react";
|
|
6
|
+
import { b as ra, a as na } from "./chunk-HA7DTUK3-ZGg2W6yV.js";
|
|
7
|
+
import { a as Ge, C as ao, b as io, c as so, d as gr, P as oa, m as lo, e as aa } from "./index-D5m8_oyY.js";
|
|
8
|
+
import { S as ia, a as sa, b as la, c as ca, e as ua } from "./Select-FAYHOYTy.js";
|
|
9
|
+
import { C as fa } from "./CategoryHeading-DpB47wvk.js";
|
|
10
|
+
import { I as co, c as nt, M as we, H as _e, P as Ne } from "./Markdown-BlioIqkZ.js";
|
|
10
11
|
import { c as se } from "./cn-qaFjX9_3.js";
|
|
11
|
-
import { useContext as
|
|
12
|
-
import { Button as
|
|
13
|
-
import { a as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
12
|
+
import { useContext as pa, useTransition as uo, useState as ye, isValidElement as da, useRef as fo, useEffect as Tr, useLayoutEffect as ha, useMemo as po, useCallback as ya } from "react";
|
|
13
|
+
import { Button as ho } from "./ui/Button.js";
|
|
14
|
+
import { a as ma, u as Pr } from "./context-DLCwaMXN.js";
|
|
15
|
+
import { i as ga, S as va, L as ba, T as mt, a as xa, p as ja, C as $a } from "./circular-ByJI6Mci.js";
|
|
16
|
+
import { VisuallyHidden as vr } from "@radix-ui/react-visually-hidden";
|
|
17
|
+
import { c as wa } from "./index-CPNSgwSb.js";
|
|
18
|
+
import { Tabs as Sa, TabsList as Oa, TabsTrigger as Ta, TabsContent as Pa } from "./ui/Tabs.js";
|
|
19
|
+
import { Card as be, CardHeader as Ca, CardTitle as Na, CardContent as qa } from "./ui/Card.js";
|
|
20
|
+
import { B as br } from "./Spinner-C6n4eOvh.js";
|
|
21
|
+
import { g as ka, c as Ze, a as Ra } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
22
|
+
import { S as yo } from "./SyntaxHighlight-BEoSoPEo.js";
|
|
23
|
+
import { useAuth as Ea } from "./zudoku.components.js";
|
|
24
|
+
import * as Ye from "@radix-ui/react-tabs";
|
|
23
25
|
import * as xe from "@radix-ui/react-collapsible";
|
|
24
|
-
import { o as
|
|
25
|
-
|
|
26
|
-
function Ca(e, r) {
|
|
26
|
+
import { o as Aa } from "./objectEntries-BS7aAgOm.js";
|
|
27
|
+
function Ia(e, r) {
|
|
27
28
|
return r;
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
const t =
|
|
30
|
+
function La(e) {
|
|
31
|
+
const r = ga(e) ? e : new va(e), t = r.body, o = new ba(r);
|
|
32
|
+
let i = "", s = !1;
|
|
33
|
+
for (; o.advance().kind !== mt.EOF; ) {
|
|
34
|
+
const n = o.token, a = n.kind, l = !xa(n.kind);
|
|
35
|
+
s && (l || n.kind === mt.SPREAD) && (i += " ");
|
|
36
|
+
const c = t.slice(n.start, n.end);
|
|
37
|
+
a === mt.BLOCK_STRING ? i += ja(n.value, {
|
|
38
|
+
minimize: !0
|
|
39
|
+
}) : i += c, s = l;
|
|
40
|
+
}
|
|
41
|
+
return i;
|
|
42
|
+
}
|
|
43
|
+
const et = (e, ...r) => {
|
|
44
|
+
const t = pa(ma);
|
|
31
45
|
if (t === void 0)
|
|
32
46
|
throw new Error("useGraphQL must be used within a GraphQLProvider");
|
|
33
47
|
return {
|
|
34
48
|
queryFn: () => t.fetch(e, ...r),
|
|
35
|
-
queryKey: [e, r[0]]
|
|
49
|
+
queryKey: [La(e.toString()), r[0]]
|
|
36
50
|
};
|
|
37
|
-
},
|
|
51
|
+
}, tt = ({
|
|
38
52
|
value: e,
|
|
39
53
|
onChange: r,
|
|
40
54
|
className: t,
|
|
@@ -61,10 +75,10 @@ const Tr = (e, ...r) => {
|
|
|
61
75
|
!i && "hidden",
|
|
62
76
|
"row-start-1 col-start-1 self-center justify-self-end relative end-2 pointer-events-none"
|
|
63
77
|
),
|
|
64
|
-
children: /* @__PURE__ */ u.jsx(
|
|
78
|
+
children: /* @__PURE__ */ u.jsx(no, { size: 14 })
|
|
65
79
|
}
|
|
66
80
|
)
|
|
67
|
-
] }),
|
|
81
|
+
] }), Ua = Ge(
|
|
68
82
|
/* GraphQL */
|
|
69
83
|
`
|
|
70
84
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -76,10 +90,10 @@ const Tr = (e, ...r) => {
|
|
|
76
90
|
}
|
|
77
91
|
}
|
|
78
92
|
`
|
|
79
|
-
),
|
|
93
|
+
), zr = ({ url: e }) => {
|
|
80
94
|
const [r, t] = ye(!1);
|
|
81
95
|
return /* @__PURE__ */ u.jsx(
|
|
82
|
-
|
|
96
|
+
ho,
|
|
83
97
|
{
|
|
84
98
|
onClick: () => {
|
|
85
99
|
navigator.clipboard.writeText(e).then(() => {
|
|
@@ -88,23 +102,23 @@ const Tr = (e, ...r) => {
|
|
|
88
102
|
},
|
|
89
103
|
variant: "ghost",
|
|
90
104
|
size: "icon",
|
|
91
|
-
children: r ? /* @__PURE__ */ u.jsx(
|
|
105
|
+
children: r ? /* @__PURE__ */ u.jsx(Mo, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ u.jsx(zo, { size: 14, strokeWidth: 1.3 })
|
|
92
106
|
}
|
|
93
107
|
);
|
|
94
|
-
},
|
|
95
|
-
const { input: e, type: r } =
|
|
108
|
+
}, Fa = () => {
|
|
109
|
+
const { input: e, type: r } = Pr(), t = et(Ua, { input: e, type: r }), o = Sr(t), [, i] = uo(), { selectedServer: s, setSelectedServer: n } = Or(
|
|
96
110
|
o.data.schema.servers
|
|
97
111
|
), { servers: a } = o.data.schema;
|
|
98
112
|
if (a.length === 0) return null;
|
|
99
113
|
const l = a.at(0);
|
|
100
114
|
return a.length === 1 ? /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
101
115
|
/* @__PURE__ */ u.jsx("span", { className: "font-medium text-sm", children: "Endpoint:" }),
|
|
102
|
-
/* @__PURE__ */ u.jsx(
|
|
103
|
-
/* @__PURE__ */ u.jsx(
|
|
116
|
+
/* @__PURE__ */ u.jsx(co, { className: "text-xs px-2 py-1.5", selectOnClick: !0, children: l.url }),
|
|
117
|
+
/* @__PURE__ */ u.jsx(zr, { url: l.url })
|
|
104
118
|
] }) : /* @__PURE__ */ u.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
105
119
|
/* @__PURE__ */ u.jsx("span", { className: "font-medium text-sm", children: "Endpoint" }),
|
|
106
120
|
/* @__PURE__ */ u.jsx(
|
|
107
|
-
|
|
121
|
+
tt,
|
|
108
122
|
{
|
|
109
123
|
className: "font-mono text-xs bg-border/50 dark:bg-border/70 py-1.5 max-w-[450px] truncate",
|
|
110
124
|
onChange: (c) => i(() => n(c.target.value)),
|
|
@@ -116,9 +130,9 @@ const Tr = (e, ...r) => {
|
|
|
116
130
|
}))
|
|
117
131
|
}
|
|
118
132
|
),
|
|
119
|
-
/* @__PURE__ */ u.jsx(
|
|
133
|
+
/* @__PURE__ */ u.jsx(zr, { url: s })
|
|
120
134
|
] });
|
|
121
|
-
},
|
|
135
|
+
}, _a = wa(
|
|
122
136
|
"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",
|
|
123
137
|
{
|
|
124
138
|
variants: {
|
|
@@ -135,16 +149,16 @@ const Tr = (e, ...r) => {
|
|
|
135
149
|
}
|
|
136
150
|
}
|
|
137
151
|
);
|
|
138
|
-
function
|
|
139
|
-
return /* @__PURE__ */ u.jsx("div", { className: se(
|
|
152
|
+
function Ba({ className: e, variant: r, ...t }) {
|
|
153
|
+
return /* @__PURE__ */ u.jsx("div", { className: se(_a({ variant: r }), e), ...t });
|
|
140
154
|
}
|
|
141
|
-
const
|
|
155
|
+
const mo = (e, r) => e.reduce(
|
|
142
156
|
(t, o) => {
|
|
143
157
|
const i = r(o);
|
|
144
158
|
return t[i] || (t[i] = []), t[i].push(o), t;
|
|
145
159
|
},
|
|
146
160
|
{}
|
|
147
|
-
),
|
|
161
|
+
), Ha = (e, r) => e ? r(e) : void 0, Ma = (e) => e ? [
|
|
148
162
|
e.type === "array" && e.items.type ? `${e.items.type}[]` : Array.isArray(e.type) ? e.type.join(" | ") : e.type,
|
|
149
163
|
e.enum && "enum",
|
|
150
164
|
e.format,
|
|
@@ -162,21 +176,21 @@ const yo = (e, r) => e.reduce(
|
|
|
162
176
|
e.deprecated && "deprecated",
|
|
163
177
|
e.pattern && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
164
178
|
"pattern: ",
|
|
165
|
-
/* @__PURE__ */ u.jsx(
|
|
179
|
+
/* @__PURE__ */ u.jsx(co, { className: "text-xs", children: e.pattern })
|
|
166
180
|
] })
|
|
167
|
-
] : [],
|
|
181
|
+
] : [], xr = ({
|
|
168
182
|
schema: e,
|
|
169
183
|
extraItems: r = [],
|
|
170
184
|
className: t
|
|
171
185
|
}) => {
|
|
172
|
-
const o = [...
|
|
173
|
-
(i) => typeof i == "string" ||
|
|
186
|
+
const o = [...Ma(e), ...r].flatMap(
|
|
187
|
+
(i) => typeof i == "string" || da(i) ? i : []
|
|
174
188
|
);
|
|
175
189
|
return /* @__PURE__ */ u.jsx("div", { className: t, children: o.map((i, s) => /* @__PURE__ */ u.jsxs("span", { className: "text-muted-foreground", children: [
|
|
176
190
|
i,
|
|
177
191
|
s < o.length - 1 && /* @__PURE__ */ u.jsx("span", { className: "text-muted-foreground/50", children: " · " })
|
|
178
192
|
] }, s)) });
|
|
179
|
-
},
|
|
193
|
+
}, go = ({
|
|
180
194
|
values: e,
|
|
181
195
|
className: r,
|
|
182
196
|
maxVisibleValues: t = 8
|
|
@@ -186,19 +200,19 @@ const yo = (e, r) => e.reduce(
|
|
|
186
200
|
const s = e.length > t, n = s && !o ? e.slice(0, t) : e;
|
|
187
201
|
return /* @__PURE__ */ u.jsxs("div", { className: se("flex flex-wrap gap-1.5 text-xs", r), children: [
|
|
188
202
|
/* @__PURE__ */ u.jsx("span", { className: "text-muted-foreground", children: "Enum values: " }),
|
|
189
|
-
n.map((a) => /* @__PURE__ */ u.jsx("div", { children: /* @__PURE__ */ u.jsx(
|
|
203
|
+
n.map((a) => /* @__PURE__ */ u.jsx("div", { children: /* @__PURE__ */ u.jsx(nt, { className: "border rounded px-1 font-mono cursor-pointer", children: a }) }, a)),
|
|
190
204
|
s && /* @__PURE__ */ u.jsx(
|
|
191
|
-
|
|
205
|
+
br,
|
|
192
206
|
{
|
|
193
207
|
variant: "ghost",
|
|
194
208
|
size: "sm",
|
|
195
209
|
className: "h-fit px-0",
|
|
196
210
|
onClick: () => i(!o),
|
|
197
211
|
children: o ? /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
198
|
-
/* @__PURE__ */ u.jsx(
|
|
212
|
+
/* @__PURE__ */ u.jsx(Go, { size: 12 }),
|
|
199
213
|
/* @__PURE__ */ u.jsx("span", { className: "text-muted-foreground", children: "show less" })
|
|
200
214
|
] }) : /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
201
|
-
/* @__PURE__ */ u.jsx(
|
|
215
|
+
/* @__PURE__ */ u.jsx(oo, { size: 12 }),
|
|
202
216
|
/* @__PURE__ */ u.jsxs("span", { className: "text-muted-foreground", children: [
|
|
203
217
|
"show ",
|
|
204
218
|
e.length - t,
|
|
@@ -208,18 +222,18 @@ const yo = (e, r) => e.reduce(
|
|
|
208
222
|
}
|
|
209
223
|
)
|
|
210
224
|
] });
|
|
211
|
-
},
|
|
225
|
+
}, za = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
212
226
|
type: "string"
|
|
213
|
-
},
|
|
227
|
+
}, Ga = ({
|
|
214
228
|
parameter: e,
|
|
215
229
|
group: r,
|
|
216
230
|
id: t
|
|
217
231
|
}) => {
|
|
218
|
-
const o =
|
|
232
|
+
const o = za(e);
|
|
219
233
|
return /* @__PURE__ */ u.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1.5", children: [
|
|
220
234
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
221
|
-
/* @__PURE__ */ u.jsx(
|
|
222
|
-
|
|
235
|
+
/* @__PURE__ */ u.jsx(nt, { asChild: !0, children: /* @__PURE__ */ u.jsx("code", { children: r === "path" ? /* @__PURE__ */ u.jsx(
|
|
236
|
+
ao,
|
|
223
237
|
{
|
|
224
238
|
name: e.name,
|
|
225
239
|
backgroundOpacity: "15%",
|
|
@@ -228,7 +242,7 @@ const yo = (e, r) => e.reduce(
|
|
|
228
242
|
}
|
|
229
243
|
) : e.name }) }),
|
|
230
244
|
/* @__PURE__ */ u.jsx(
|
|
231
|
-
|
|
245
|
+
xr,
|
|
232
246
|
{
|
|
233
247
|
schema: o,
|
|
234
248
|
extraItems: [
|
|
@@ -246,23 +260,23 @@ const yo = (e, r) => e.reduce(
|
|
|
246
260
|
className: "text-sm prose-p:my-1 prose-code:whitespace-pre-line"
|
|
247
261
|
}
|
|
248
262
|
),
|
|
249
|
-
o.enum && /* @__PURE__ */ u.jsx(
|
|
263
|
+
o.enum && /* @__PURE__ */ u.jsx(go, { values: o.enum })
|
|
250
264
|
] });
|
|
251
|
-
},
|
|
265
|
+
}, Wa = ({
|
|
252
266
|
summary: e,
|
|
253
267
|
group: r,
|
|
254
268
|
parameters: t,
|
|
255
269
|
id: o
|
|
256
270
|
}) => /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
257
271
|
/* @__PURE__ */ u.jsxs(_e, { level: 3, id: `${o}/${r}-parameters`, className: "capitalize", children: [
|
|
258
|
-
e && /* @__PURE__ */ u.jsxs(
|
|
272
|
+
e && /* @__PURE__ */ u.jsxs(vr, { children: [
|
|
259
273
|
e,
|
|
260
274
|
" › "
|
|
261
275
|
] }),
|
|
262
276
|
r === "header" ? "Headers" : `${r} Parameters`
|
|
263
277
|
] }),
|
|
264
278
|
/* @__PURE__ */ u.jsx(be, { children: /* @__PURE__ */ u.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: t.sort((i, s) => i.required === s.required ? 0 : i.required ? -1 : 1).map((i) => /* @__PURE__ */ u.jsx(
|
|
265
|
-
|
|
279
|
+
Ga,
|
|
266
280
|
{
|
|
267
281
|
parameter: i,
|
|
268
282
|
id: o,
|
|
@@ -271,17 +285,17 @@ const yo = (e, r) => e.reduce(
|
|
|
271
285
|
`${i.name}-${i.in}`
|
|
272
286
|
)) }) })
|
|
273
287
|
] });
|
|
274
|
-
var
|
|
288
|
+
var Gr = (e, r) => {
|
|
275
289
|
const t = e[r.name];
|
|
276
290
|
return t === void 0 ? (e[r.name] = r.value, e) : Array.isArray(t) ? (t.push(r.value), e) : (e[r.name] = [t, r.value], e);
|
|
277
|
-
},
|
|
291
|
+
}, Wr = "", Jr = `
|
|
278
292
|
`, V = class {
|
|
279
293
|
/**
|
|
280
294
|
* Helper object to format and aggragate lines of code.
|
|
281
295
|
* Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
|
|
282
296
|
*/
|
|
283
297
|
constructor({ indent: e, join: r } = {}) {
|
|
284
|
-
this.postProcessors = [], this.code = [], this.indentationCharacter =
|
|
298
|
+
this.postProcessors = [], this.code = [], this.indentationCharacter = Wr, this.lineJoin = Jr, this.indentLine = (t, o = 0) => `${this.indentationCharacter.repeat(o)}${t}`, this.unshift = (t, o) => {
|
|
285
299
|
const i = this.indentLine(t, o);
|
|
286
300
|
this.code.unshift(i);
|
|
287
301
|
}, this.push = (t, o) => {
|
|
@@ -294,31 +308,31 @@ var zr = (e, r) => {
|
|
|
294
308
|
return this.postProcessors.reduce((i, s) => s(i), t);
|
|
295
309
|
}, this.addPostProcessor = (t) => {
|
|
296
310
|
this.postProcessors = [...this.postProcessors, t];
|
|
297
|
-
}, this.indentationCharacter = e ||
|
|
311
|
+
}, this.indentationCharacter = e || Wr, this.lineJoin = r ?? Jr;
|
|
298
312
|
}
|
|
299
|
-
},
|
|
300
|
-
function
|
|
301
|
-
return
|
|
313
|
+
}, gt, Vr;
|
|
314
|
+
function Ja() {
|
|
315
|
+
return Vr || (Vr = 1, gt = function(e) {
|
|
302
316
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
303
|
-
}),
|
|
317
|
+
}), gt;
|
|
304
318
|
}
|
|
305
|
-
var
|
|
306
|
-
function
|
|
307
|
-
return
|
|
319
|
+
var vt, Dr;
|
|
320
|
+
function Va() {
|
|
321
|
+
return Dr || (Dr = 1, vt = function(e) {
|
|
308
322
|
var r = typeof e;
|
|
309
323
|
return e !== null && (r === "object" || r === "function");
|
|
310
|
-
}),
|
|
324
|
+
}), vt;
|
|
311
325
|
}
|
|
312
|
-
var Qe = {},
|
|
313
|
-
function
|
|
314
|
-
return
|
|
326
|
+
var Qe = {}, Kr;
|
|
327
|
+
function Da() {
|
|
328
|
+
return Kr || (Kr = 1, Object.defineProperty(Qe, "__esModule", { value: !0 }), Qe.default = (e) => Object.getOwnPropertySymbols(e).filter((r) => Object.prototype.propertyIsEnumerable.call(e, r))), Qe;
|
|
315
329
|
}
|
|
316
|
-
var
|
|
317
|
-
function
|
|
318
|
-
if (Qr) return
|
|
330
|
+
var bt, Qr;
|
|
331
|
+
function Ka() {
|
|
332
|
+
if (Qr) return bt;
|
|
319
333
|
Qr = 1;
|
|
320
|
-
const e =
|
|
321
|
-
return
|
|
334
|
+
const e = Ja(), r = Va(), t = Da().default;
|
|
335
|
+
return bt = (o, i, s) => {
|
|
322
336
|
const n = [];
|
|
323
337
|
return function a(l, c, f) {
|
|
324
338
|
c = c || {}, c.indent = c.indent || " ", f = f || "";
|
|
@@ -366,7 +380,7 @@ function Ha() {
|
|
|
366
380
|
return "{}";
|
|
367
381
|
n.push(l);
|
|
368
382
|
const j = "{" + g.newLine + m.map((v, p) => {
|
|
369
|
-
const h = m.length - 1 === p ? g.newLine : "," + g.newLineOrSpace, y = typeof v == "symbol",
|
|
383
|
+
const h = m.length - 1 === p ? g.newLine : "," + g.newLineOrSpace, y = typeof v == "symbol", O = !y && /^[a-z$_][a-z$_0-9]*$/i.test(v), T = y || O ? v : a(v, c);
|
|
370
384
|
let d = a(l[v], c, f + c.indent);
|
|
371
385
|
return c.transform && (d = c.transform(l, v, d)), g.indent + String(T) + ": " + d + h;
|
|
372
386
|
}).join("") + g.pad + "}";
|
|
@@ -375,16 +389,16 @@ function Ha() {
|
|
|
375
389
|
return l = String(l).replace(/[\r\n]/g, (m) => m === `
|
|
376
390
|
` ? "\\n" : "\\r"), c.singleQuotes === !1 ? (l = l.replace(/"/g, '\\"'), `"${l}"`) : (l = l.replace(/\\?'/g, "\\'"), `'${l}'`);
|
|
377
391
|
}(o, i, s);
|
|
378
|
-
},
|
|
392
|
+
}, bt;
|
|
379
393
|
}
|
|
380
|
-
var
|
|
381
|
-
const fe = /* @__PURE__ */
|
|
394
|
+
var Qa = Ka();
|
|
395
|
+
const fe = /* @__PURE__ */ ka(Qa);
|
|
382
396
|
function He(e, r = {}) {
|
|
383
397
|
const { delimiter: t = '"', escapeChar: o = "\\", escapeNewlines: i = !0 } = r;
|
|
384
398
|
return [...e.toString()].map((n) => n === "\b" ? `${o}b` : n === " " ? `${o}t` : n === `
|
|
385
399
|
` ? i ? `${o}n` : n : n === "\f" ? `${o}f` : n === "\r" ? i ? `${o}r` : n : n === o ? o + o : n === t ? o + t : n < " " || n > "~" ? JSON.stringify(n).slice(1, -1) : n).join("");
|
|
386
400
|
}
|
|
387
|
-
var Me = (e) => He(e, { delimiter: "'" }), ce = (e) => He(e, { delimiter: '"' }),
|
|
401
|
+
var Me = (e) => He(e, { delimiter: "'" }), ce = (e) => He(e, { delimiter: '"' }), Ya = {
|
|
388
402
|
info: {
|
|
389
403
|
key: "libcurl",
|
|
390
404
|
title: "Libcurl",
|
|
@@ -400,7 +414,7 @@ var Me = (e) => He(e, { delimiter: "'" }), ce = (e) => He(e, { delimiter: '"' })
|
|
|
400
414
|
s(`headers = curl_slist_append(headers, "${c}: ${ce(t[c])}");`);
|
|
401
415
|
}), s("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), o.cookie && (n(), s(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${o.cookie}");`)), i.text && (n(), s(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(i.text)});`)), n(), s("CURLcode ret = curl_easy_perform(hnd);"), a();
|
|
402
416
|
}
|
|
403
|
-
},
|
|
417
|
+
}, Xa = {
|
|
404
418
|
info: {
|
|
405
419
|
key: "c",
|
|
406
420
|
title: "C",
|
|
@@ -408,30 +422,30 @@ var Me = (e) => He(e, { delimiter: "'" }), ce = (e) => He(e, { delimiter: '"' })
|
|
|
408
422
|
cli: "c"
|
|
409
423
|
},
|
|
410
424
|
clientsById: {
|
|
411
|
-
libcurl:
|
|
425
|
+
libcurl: Ya
|
|
412
426
|
}
|
|
413
427
|
}, pe = (e, r) => Object.keys(e).find((t) => t.toLowerCase() === r.toLowerCase()), ve = (e, r) => {
|
|
414
428
|
const t = pe(e, r);
|
|
415
429
|
if (t)
|
|
416
430
|
return e[t];
|
|
417
|
-
},
|
|
431
|
+
}, ot = (e, r) => !!pe(e, r), Za = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
|
|
418
432
|
(r) => e.indexOf(r) > -1
|
|
419
|
-
),
|
|
433
|
+
), Yr = class {
|
|
420
434
|
constructor(e) {
|
|
421
435
|
this.name = "", this.toString = () => `:${this.name}`, this.name = e;
|
|
422
436
|
}
|
|
423
|
-
},
|
|
437
|
+
}, ei = class {
|
|
424
438
|
constructor(e) {
|
|
425
439
|
this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
|
|
426
440
|
}
|
|
427
|
-
},
|
|
441
|
+
}, vo = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), bo = (e) => e === void 0 ? !0 : vo(e) === "object" ? Object.keys(e).length === 0 : !1, Xr = (e) => (Object.keys(e).filter((r) => bo(e[r])).forEach((r) => {
|
|
428
442
|
delete e[r];
|
|
429
|
-
}), e),
|
|
443
|
+
}), e), Xe = (e, r) => {
|
|
430
444
|
const t = " ".repeat(e);
|
|
431
445
|
return r.replace(/\n/g, `
|
|
432
446
|
${t}`);
|
|
433
|
-
},
|
|
434
|
-
switch (
|
|
447
|
+
}, jr = (e) => {
|
|
448
|
+
switch (vo(e)) {
|
|
435
449
|
case "string":
|
|
436
450
|
return `"${e.replace(/"/g, '\\"')}"`;
|
|
437
451
|
case "file":
|
|
@@ -444,20 +458,20 @@ ${t}`);
|
|
|
444
458
|
return `#"${e.source}"`;
|
|
445
459
|
case "object": {
|
|
446
460
|
const r = Object.keys(e).reduce((t, o) => {
|
|
447
|
-
const i =
|
|
461
|
+
const i = Xe(o.length + 2, jr(e[o]));
|
|
448
462
|
return `${t}:${o} ${i}
|
|
449
463
|
`;
|
|
450
464
|
}, "").trim();
|
|
451
|
-
return `{${
|
|
465
|
+
return `{${Xe(1, r)}}`;
|
|
452
466
|
}
|
|
453
467
|
case "array": {
|
|
454
|
-
const r = e.reduce((t, o) => `${t} ${
|
|
455
|
-
return `[${
|
|
468
|
+
const r = e.reduce((t, o) => `${t} ${jr(o)}`, "").trim();
|
|
469
|
+
return `[${Xe(1, r)}]`;
|
|
456
470
|
}
|
|
457
471
|
default:
|
|
458
472
|
return e.toString();
|
|
459
473
|
}
|
|
460
|
-
},
|
|
474
|
+
}, ti = {
|
|
461
475
|
info: {
|
|
462
476
|
key: "clj_http",
|
|
463
477
|
title: "clj-http",
|
|
@@ -476,7 +490,7 @@ ${t}`);
|
|
|
476
490
|
switch (t.mimeType) {
|
|
477
491
|
case "application/json":
|
|
478
492
|
{
|
|
479
|
-
c["content-type"] = new
|
|
493
|
+
c["content-type"] = new Yr("json"), c["form-params"] = t.jsonObj;
|
|
480
494
|
const f = pe(c.headers, "content-type");
|
|
481
495
|
f && delete c.headers[f];
|
|
482
496
|
}
|
|
@@ -499,7 +513,7 @@ ${t}`);
|
|
|
499
513
|
if (t.params) {
|
|
500
514
|
c.multipart = t.params.map((g) => g.fileName && !g.value ? {
|
|
501
515
|
name: g.name,
|
|
502
|
-
content: new
|
|
516
|
+
content: new ei(g.fileName)
|
|
503
517
|
} : {
|
|
504
518
|
name: g.name,
|
|
505
519
|
content: g.value
|
|
@@ -513,31 +527,31 @@ ${t}`);
|
|
|
513
527
|
switch (ve(c.headers, "accept")) {
|
|
514
528
|
case "application/json":
|
|
515
529
|
{
|
|
516
|
-
c.accept = new
|
|
530
|
+
c.accept = new Yr("json");
|
|
517
531
|
const f = pe(c.headers, "accept");
|
|
518
532
|
f && delete c.headers[f];
|
|
519
533
|
}
|
|
520
534
|
break;
|
|
521
535
|
}
|
|
522
536
|
if (n(`(require '[clj-http.client :as client])
|
|
523
|
-
`),
|
|
537
|
+
`), bo(Xr(c)))
|
|
524
538
|
n(`(client/${r} "${o}")`);
|
|
525
539
|
else {
|
|
526
|
-
const f = 11 + r.length + o.length, g =
|
|
540
|
+
const f = 11 + r.length + o.length, g = Xe(f, jr(Xr(c)));
|
|
527
541
|
n(`(client/${r} "${o}" ${g})`);
|
|
528
542
|
}
|
|
529
543
|
return a();
|
|
530
544
|
}
|
|
531
|
-
},
|
|
545
|
+
}, ri = {
|
|
532
546
|
info: {
|
|
533
547
|
key: "clojure",
|
|
534
548
|
title: "Clojure",
|
|
535
549
|
default: "clj_http"
|
|
536
550
|
},
|
|
537
551
|
clientsById: {
|
|
538
|
-
clj_http:
|
|
552
|
+
clj_http: ti
|
|
539
553
|
}
|
|
540
|
-
},
|
|
554
|
+
}, ni = (e) => {
|
|
541
555
|
let r = ve(e, "accept-encoding");
|
|
542
556
|
if (!r)
|
|
543
557
|
return [];
|
|
@@ -554,7 +568,7 @@ ${t}`);
|
|
|
554
568
|
}
|
|
555
569
|
});
|
|
556
570
|
}), o;
|
|
557
|
-
},
|
|
571
|
+
}, oi = {
|
|
558
572
|
info: {
|
|
559
573
|
key: "httpclient",
|
|
560
574
|
title: "HttpClient",
|
|
@@ -570,7 +584,7 @@ ${t}`);
|
|
|
570
584
|
}, { push: n, join: a } = new V({ indent: s.indent });
|
|
571
585
|
n("using System.Net.Http.Headers;");
|
|
572
586
|
let l = "";
|
|
573
|
-
const c = !!e.cookie, f =
|
|
587
|
+
const c = !!e.cookie, f = ni(e);
|
|
574
588
|
(c || f.length) && (l = "clientHandler", n("var clientHandler = new HttpClientHandler"), n("{"), c && n("UseCookies = false,", 1), f.length && n(`AutomaticDecompression = ${f.join(" | ")},`, 1), n("};")), n(`var client = new HttpClient(${l});`), n("var request = new HttpRequestMessage"), n("{");
|
|
575
589
|
const g = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
|
|
576
590
|
t = t.toUpperCase(), t && g.includes(t) ? t = `HttpMethod.${t[0]}${t.substring(1).toLowerCase()}` : t = `new HttpMethod("${t}")`, n(`Method = ${t},`, 1), n(`RequestUri = new Uri("${o}"),`, 1);
|
|
@@ -607,10 +621,10 @@ ${t}`);
|
|
|
607
621
|
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();
|
|
608
622
|
}
|
|
609
623
|
};
|
|
610
|
-
function
|
|
624
|
+
function ai(e) {
|
|
611
625
|
return e[0].toUpperCase() + e.slice(1).toLowerCase();
|
|
612
626
|
}
|
|
613
|
-
var
|
|
627
|
+
var ii = {
|
|
614
628
|
info: {
|
|
615
629
|
key: "restsharp",
|
|
616
630
|
title: "RestSharp",
|
|
@@ -660,11 +674,11 @@ var Xa = {
|
|
|
660
674
|
if (!i.text) break;
|
|
661
675
|
n(`request.AddStringBody("${i.text}", "${i.mimeType}");`);
|
|
662
676
|
}
|
|
663
|
-
return n(`var response = await client.${
|
|
677
|
+
return n(`var response = await client.${ai(e)}Async(request);
|
|
664
678
|
`), n(`Console.WriteLine("{0}", response.Content);
|
|
665
679
|
`), a();
|
|
666
680
|
}
|
|
667
|
-
},
|
|
681
|
+
}, si = {
|
|
668
682
|
info: {
|
|
669
683
|
key: "csharp",
|
|
670
684
|
title: "C#",
|
|
@@ -672,10 +686,10 @@ var Xa = {
|
|
|
672
686
|
cli: "dotnet"
|
|
673
687
|
},
|
|
674
688
|
clientsById: {
|
|
675
|
-
httpclient:
|
|
676
|
-
restsharp:
|
|
689
|
+
httpclient: oi,
|
|
690
|
+
restsharp: ii
|
|
677
691
|
}
|
|
678
|
-
},
|
|
692
|
+
}, li = {
|
|
679
693
|
info: {
|
|
680
694
|
key: "native",
|
|
681
695
|
title: "NewRequest",
|
|
@@ -693,7 +707,7 @@ var Xa = {
|
|
|
693
707
|
n(`req.Header.Add("${y}", "${ce(t[y])}")`, m);
|
|
694
708
|
}), s()), n(`res, ${b} := ${h}.Do(req)`, m), j(), f && (s(), n("defer res.Body.Close()", m), n(`body, ${b} := io.ReadAll(res.Body)`, m), j()), s(), f && n("fmt.Println(string(body))", m), l && (s(), n("}")), a();
|
|
695
709
|
}
|
|
696
|
-
},
|
|
710
|
+
}, ci = {
|
|
697
711
|
info: {
|
|
698
712
|
key: "go",
|
|
699
713
|
title: "Go",
|
|
@@ -701,10 +715,10 @@ var Xa = {
|
|
|
701
715
|
cli: "go"
|
|
702
716
|
},
|
|
703
717
|
clientsById: {
|
|
704
|
-
native:
|
|
718
|
+
native: li
|
|
705
719
|
}
|
|
706
|
-
},
|
|
707
|
-
`,
|
|
720
|
+
}, Zr = `\r
|
|
721
|
+
`, ui = {
|
|
708
722
|
info: {
|
|
709
723
|
key: "http1.1",
|
|
710
724
|
title: "HTTP/1.1",
|
|
@@ -718,7 +732,7 @@ var Xa = {
|
|
|
718
732
|
autoContentLength: !0,
|
|
719
733
|
autoHost: !0,
|
|
720
734
|
...n
|
|
721
|
-
}, { blank: l, push: c, join: f } = new V({ indent: "", join:
|
|
735
|
+
}, { blank: l, push: c, join: f } = new V({ indent: "", join: Zr }), g = a.absoluteURI ? r : t.path;
|
|
722
736
|
c(`${e} ${g} ${o}`);
|
|
723
737
|
const b = Object.keys(i);
|
|
724
738
|
if (b.forEach((v) => {
|
|
@@ -730,18 +744,18 @@ var Xa = {
|
|
|
730
744
|
}
|
|
731
745
|
l();
|
|
732
746
|
const m = f(), j = s.text || "";
|
|
733
|
-
return `${m}${
|
|
747
|
+
return `${m}${Zr}${j}`;
|
|
734
748
|
}
|
|
735
|
-
},
|
|
749
|
+
}, fi = {
|
|
736
750
|
info: {
|
|
737
751
|
key: "http",
|
|
738
752
|
title: "HTTP",
|
|
739
753
|
default: "http1.1"
|
|
740
754
|
},
|
|
741
755
|
clientsById: {
|
|
742
|
-
"http1.1":
|
|
756
|
+
"http1.1": ui
|
|
743
757
|
}
|
|
744
|
-
},
|
|
758
|
+
}, pi = {
|
|
745
759
|
info: {
|
|
746
760
|
key: "asynchttp",
|
|
747
761
|
title: "AsyncHttp",
|
|
@@ -758,7 +772,7 @@ var Xa = {
|
|
|
758
772
|
a(`.setHeader("${c}", "${ce(r[c])}")`, 1);
|
|
759
773
|
}), 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();"), l();
|
|
760
774
|
}
|
|
761
|
-
},
|
|
775
|
+
}, di = {
|
|
762
776
|
info: {
|
|
763
777
|
key: "nethttp",
|
|
764
778
|
title: "java.net.http",
|
|
@@ -780,7 +794,7 @@ var Xa = {
|
|
|
780
794
|
"HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
|
|
781
795
|
), n("System.out.println(response.body());"), a();
|
|
782
796
|
}
|
|
783
|
-
},
|
|
797
|
+
}, hi = {
|
|
784
798
|
info: {
|
|
785
799
|
key: "okhttp",
|
|
786
800
|
title: "OkHttp",
|
|
@@ -797,7 +811,7 @@ var Xa = {
|
|
|
797
811
|
n(`.addHeader("${g}", "${ce(o[g])}")`, 1);
|
|
798
812
|
}), n(".build();", 1), a(), n("Response response = client.newCall(request).execute();"), l();
|
|
799
813
|
}
|
|
800
|
-
},
|
|
814
|
+
}, yi = {
|
|
801
815
|
info: {
|
|
802
816
|
key: "unirest",
|
|
803
817
|
title: "Unirest",
|
|
@@ -814,19 +828,19 @@ var Xa = {
|
|
|
814
828
|
a(`.header("${c}", "${ce(r[c])}")`, 1);
|
|
815
829
|
}), t.text && a(`.body(${JSON.stringify(t.text)})`, 1), a(".asString();", 1), n();
|
|
816
830
|
}
|
|
817
|
-
},
|
|
831
|
+
}, mi = {
|
|
818
832
|
info: {
|
|
819
833
|
key: "java",
|
|
820
834
|
title: "Java",
|
|
821
835
|
default: "unirest"
|
|
822
836
|
},
|
|
823
837
|
clientsById: {
|
|
824
|
-
asynchttp:
|
|
825
|
-
nethttp:
|
|
826
|
-
okhttp:
|
|
827
|
-
unirest:
|
|
838
|
+
asynchttp: pi,
|
|
839
|
+
nethttp: di,
|
|
840
|
+
okhttp: hi,
|
|
841
|
+
unirest: yi
|
|
828
842
|
}
|
|
829
|
-
},
|
|
843
|
+
}, gi = {
|
|
830
844
|
info: {
|
|
831
845
|
key: "axios",
|
|
832
846
|
title: "Axios",
|
|
@@ -870,7 +884,7 @@ var Xa = {
|
|
|
870
884
|
}).replace('"[form]"', "form");
|
|
871
885
|
return l(`const options = ${b};`), a(), l("axios"), l(".request(options)", 1), l(".then(function (response) {", 1), l("console.log(response.data);", 2), l("})", 1), l(".catch(function (error) {", 1), l("console.error(error);", 2), l("});", 1), c();
|
|
872
886
|
}
|
|
873
|
-
},
|
|
887
|
+
}, vi = {
|
|
874
888
|
info: {
|
|
875
889
|
key: "fetch",
|
|
876
890
|
title: "fetch",
|
|
@@ -923,7 +937,7 @@ var Xa = {
|
|
|
923
937
|
})};`
|
|
924
938
|
), n(), t.params && t.mimeType === "multipart/form-data" && (l("options.body = form;"), n()), l(`fetch('${o}', options)`), l(".then(response => response.json())", 1), l(".then(response => console.log(response))", 1), l(".catch(err => console.error(err));", 1), a();
|
|
925
939
|
}
|
|
926
|
-
},
|
|
940
|
+
}, bi = {
|
|
927
941
|
info: {
|
|
928
942
|
key: "jquery",
|
|
929
943
|
title: "jQuery",
|
|
@@ -955,7 +969,7 @@ var Xa = {
|
|
|
955
969
|
break;
|
|
956
970
|
if (a("const form = new FormData();"), o.params.forEach((b) => {
|
|
957
971
|
a(`form.append('${b.name}', '${b.value || b.fileName || ""}');`);
|
|
958
|
-
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]",
|
|
972
|
+
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]", ot(t, "content-type") && (g = ve(t, "content-type")) != null && g.includes("boundary")) {
|
|
959
973
|
const b = pe(t, "content-type");
|
|
960
974
|
b && delete c.headers[b];
|
|
961
975
|
}
|
|
@@ -967,7 +981,7 @@ var Xa = {
|
|
|
967
981
|
const f = fe(c, { indent: s.indent }).replace("'[form]'", "form");
|
|
968
982
|
return a(`const settings = ${f};`), n(), a("$.ajax(settings).done(function (response) {"), a("console.log(response);", 1), a("});"), l();
|
|
969
983
|
}
|
|
970
|
-
},
|
|
984
|
+
}, xi = {
|
|
971
985
|
info: {
|
|
972
986
|
key: "xhr",
|
|
973
987
|
title: "XMLHttpRequest",
|
|
@@ -995,7 +1009,7 @@ var Xa = {
|
|
|
995
1009
|
break;
|
|
996
1010
|
if (a("const data = new FormData();"), e.params.forEach((f) => {
|
|
997
1011
|
a(`data.append('${f.name}', '${f.value || f.fileName || ""}');`);
|
|
998
|
-
}),
|
|
1012
|
+
}), ot(r, "content-type") && (c = ve(r, "content-type")) != null && c.includes("boundary")) {
|
|
999
1013
|
const f = pe(r, "content-type");
|
|
1000
1014
|
f && delete r[f];
|
|
1001
1015
|
}
|
|
@@ -1008,19 +1022,19 @@ var Xa = {
|
|
|
1008
1022
|
a(`xhr.setRequestHeader('${f}', '${Me(r[f])}');`);
|
|
1009
1023
|
}), n(), a("xhr.send(data);"), l();
|
|
1010
1024
|
}
|
|
1011
|
-
},
|
|
1025
|
+
}, ji = {
|
|
1012
1026
|
info: {
|
|
1013
1027
|
key: "javascript",
|
|
1014
1028
|
title: "JavaScript",
|
|
1015
1029
|
default: "xhr"
|
|
1016
1030
|
},
|
|
1017
1031
|
clientsById: {
|
|
1018
|
-
xhr:
|
|
1019
|
-
axios:
|
|
1020
|
-
fetch:
|
|
1021
|
-
jquery:
|
|
1032
|
+
xhr: xi,
|
|
1033
|
+
axios: gi,
|
|
1034
|
+
fetch: vi,
|
|
1035
|
+
jquery: bi
|
|
1022
1036
|
}
|
|
1023
|
-
},
|
|
1037
|
+
}, $i = {
|
|
1024
1038
|
info: {
|
|
1025
1039
|
key: "native",
|
|
1026
1040
|
title: "Native JSON",
|
|
@@ -1054,16 +1068,16 @@ var Xa = {
|
|
|
1054
1068
|
}
|
|
1055
1069
|
return typeof o > "u" || o === "" ? "No JSON body" : JSON.stringify(o, null, t.indent);
|
|
1056
1070
|
}
|
|
1057
|
-
},
|
|
1071
|
+
}, wi = {
|
|
1058
1072
|
info: {
|
|
1059
1073
|
key: "json",
|
|
1060
1074
|
title: "JSON",
|
|
1061
1075
|
default: "native"
|
|
1062
1076
|
},
|
|
1063
1077
|
clientsById: {
|
|
1064
|
-
native:
|
|
1078
|
+
native: $i
|
|
1065
1079
|
}
|
|
1066
|
-
},
|
|
1080
|
+
}, Si = {
|
|
1067
1081
|
info: {
|
|
1068
1082
|
key: "okhttp",
|
|
1069
1083
|
title: "OkHttp",
|
|
@@ -1080,16 +1094,16 @@ var Xa = {
|
|
|
1080
1094
|
l(`.addHeader("${g}", "${ce(o[g])}")`, 1);
|
|
1081
1095
|
}), l(".build()", 1), n(), l("val response = client.newCall(request).execute()"), a();
|
|
1082
1096
|
}
|
|
1083
|
-
},
|
|
1097
|
+
}, Oi = {
|
|
1084
1098
|
info: {
|
|
1085
1099
|
key: "kotlin",
|
|
1086
1100
|
title: "Kotlin",
|
|
1087
1101
|
default: "okhttp"
|
|
1088
1102
|
},
|
|
1089
1103
|
clientsById: {
|
|
1090
|
-
okhttp:
|
|
1104
|
+
okhttp: Si
|
|
1091
1105
|
}
|
|
1092
|
-
},
|
|
1106
|
+
}, Ti = {
|
|
1093
1107
|
info: {
|
|
1094
1108
|
key: "axios",
|
|
1095
1109
|
title: "Axios",
|
|
@@ -1123,7 +1137,7 @@ var Xa = {
|
|
|
1123
1137
|
const g = fe(f, { indent: " ", inlineCharacterLimit: 80 });
|
|
1124
1138
|
return l(`const options = ${g};`), n(), l("axios"), l(".request(options)", 1), l(".then(function (response) {", 1), l("console.log(response.data);", 2), l("})", 1), l(".catch(function (error) {", 1), l("console.error(error);", 2), l("});", 1), a();
|
|
1125
1139
|
}
|
|
1126
|
-
},
|
|
1140
|
+
}, Pi = {
|
|
1127
1141
|
info: {
|
|
1128
1142
|
key: "fetch",
|
|
1129
1143
|
title: "Fetch",
|
|
@@ -1183,7 +1197,7 @@ var Xa = {
|
|
|
1183
1197
|
});
|
|
1184
1198
|
return c(`const options = ${j};`), l(), a && g("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (c("options.body = formData;"), l()), 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), f().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
|
|
1185
1199
|
}
|
|
1186
|
-
},
|
|
1200
|
+
}, Ci = {
|
|
1187
1201
|
info: {
|
|
1188
1202
|
key: "native",
|
|
1189
1203
|
title: "HTTP",
|
|
@@ -1222,7 +1236,7 @@ var Xa = {
|
|
|
1222
1236
|
}
|
|
1223
1237
|
return l("req.end();"), a();
|
|
1224
1238
|
}
|
|
1225
|
-
},
|
|
1239
|
+
}, Ni = {
|
|
1226
1240
|
info: {
|
|
1227
1241
|
key: "request",
|
|
1228
1242
|
title: "Request",
|
|
@@ -1275,7 +1289,7 @@ var Xa = {
|
|
|
1275
1289
|
c(`jar.setCookie(request.cookie('${encodeURIComponent(v)}=${encodeURIComponent(p)}'), '${r}');`);
|
|
1276
1290
|
}), f(), m((v) => v.replace(/'JAR'/, "jar"))), l && b("const fs = require('fs');"), c(`const options = ${fe(j, { indent: " ", inlineCharacterLimit: 80 })};`), f(), c("request(options, function (error, response, body) {"), c("if (error) throw new Error(error);", 1), f(), c("console.log(body);", 1), c("});"), g();
|
|
1277
1291
|
}
|
|
1278
|
-
},
|
|
1292
|
+
}, qi = {
|
|
1279
1293
|
info: {
|
|
1280
1294
|
key: "unirest",
|
|
1281
1295
|
title: "Unirest",
|
|
@@ -1316,7 +1330,7 @@ var Xa = {
|
|
|
1316
1330
|
}
|
|
1317
1331
|
return l && m("const fs = require('fs');"), b("req.end(function (res) {"), b("if (res.error) throw new Error(res.error);", 1), f(), b("console.log(res.body);", 1), b("});"), g();
|
|
1318
1332
|
}
|
|
1319
|
-
},
|
|
1333
|
+
}, ki = {
|
|
1320
1334
|
info: {
|
|
1321
1335
|
key: "node",
|
|
1322
1336
|
title: "Node.js",
|
|
@@ -1324,27 +1338,27 @@ var Xa = {
|
|
|
1324
1338
|
cli: "node %s"
|
|
1325
1339
|
},
|
|
1326
1340
|
clientsById: {
|
|
1327
|
-
native:
|
|
1328
|
-
request:
|
|
1329
|
-
unirest:
|
|
1330
|
-
axios:
|
|
1331
|
-
fetch:
|
|
1341
|
+
native: Ci,
|
|
1342
|
+
request: Ni,
|
|
1343
|
+
unirest: qi,
|
|
1344
|
+
axios: Ti,
|
|
1345
|
+
fetch: Pi
|
|
1332
1346
|
}
|
|
1333
|
-
},
|
|
1334
|
-
const i = `${e} *${r} = `, s =
|
|
1347
|
+
}, xt = (e, r, t, o) => {
|
|
1348
|
+
const i = `${e} *${r} = `, s = $r(t, o ? i.length : void 0);
|
|
1335
1349
|
return `${i}${s};`;
|
|
1336
|
-
},
|
|
1350
|
+
}, $r = (e, r) => {
|
|
1337
1351
|
const t = r === void 0 ? ", " : `,
|
|
1338
1352
|
${" ".repeat(r)}`;
|
|
1339
1353
|
switch (Object.prototype.toString.call(e)) {
|
|
1340
1354
|
case "[object Number]":
|
|
1341
1355
|
return `@${e}`;
|
|
1342
1356
|
case "[object Array]":
|
|
1343
|
-
return `@[ ${e.map((i) =>
|
|
1357
|
+
return `@[ ${e.map((i) => $r(i)).join(t)} ]`;
|
|
1344
1358
|
case "[object Object]": {
|
|
1345
1359
|
const o = [];
|
|
1346
1360
|
return Object.keys(e).forEach((i) => {
|
|
1347
|
-
o.push(`@"${i}": ${
|
|
1361
|
+
o.push(`@"${i}": ${$r(e[i])}`);
|
|
1348
1362
|
}), `@{ ${o.join(t)} }`;
|
|
1349
1363
|
}
|
|
1350
1364
|
case "[object Boolean]":
|
|
@@ -1352,7 +1366,7 @@ var Xa = {
|
|
|
1352
1366
|
default:
|
|
1353
1367
|
return e == null ? "" : `@"${e.toString().replace(/"/g, '\\"')}"`;
|
|
1354
1368
|
}
|
|
1355
|
-
},
|
|
1369
|
+
}, Ri = {
|
|
1356
1370
|
info: {
|
|
1357
1371
|
key: "nsurlsession",
|
|
1358
1372
|
title: "NSURLSession",
|
|
@@ -1371,7 +1385,7 @@ var Xa = {
|
|
|
1371
1385
|
hasHeaders: !1,
|
|
1372
1386
|
hasBody: !1
|
|
1373
1387
|
};
|
|
1374
|
-
if (n("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, l(), n(
|
|
1388
|
+
if (n("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, l(), n(xt("NSDictionary", "headers", e, s.pretty))), r.text || r.jsonObj || r.params)
|
|
1375
1389
|
switch (c.hasBody = !0, r.mimeType) {
|
|
1376
1390
|
case "application/x-www-form-urlencoded":
|
|
1377
1391
|
if ((f = r.params) != null && f.length) {
|
|
@@ -1386,10 +1400,10 @@ var Xa = {
|
|
|
1386
1400
|
c.hasBody = !1;
|
|
1387
1401
|
break;
|
|
1388
1402
|
case "application/json":
|
|
1389
|
-
r.jsonObj && (n(
|
|
1403
|
+
r.jsonObj && (n(xt("NSDictionary", "parameters", r.jsonObj, s.pretty)), l(), n("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
|
|
1390
1404
|
break;
|
|
1391
1405
|
case "multipart/form-data":
|
|
1392
|
-
n(
|
|
1406
|
+
n(xt("NSArray", "parameters", r.params || [], s.pretty)), n(`NSString *boundary = @"${r.boundary}";`), l(), n("NSError *error;"), n("NSMutableString *body = [NSMutableString string];"), n("for (NSDictionary *param in parameters) {"), n('[body appendFormat:@"--%@\\r\\n", boundary];', 1), n('if (param[@"fileName"]) {', 1), n(
|
|
1393
1407
|
'[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"; filename=\\"%@\\"\\r\\n", param[@"name"], param[@"fileName"]];',
|
|
1394
1408
|
2
|
|
1395
1409
|
), n('[body appendFormat:@"Content-Type: %@\\r\\n\\r\\n", param[@"contentType"]];', 2), n(
|
|
@@ -1409,16 +1423,16 @@ var Xa = {
|
|
|
1409
1423
|
2
|
|
1410
1424
|
), n(' NSLog(@"%@", httpResponse);', 2), n(" }", 1), n(" }];"), n("[dataTask resume];"), a();
|
|
1411
1425
|
}
|
|
1412
|
-
},
|
|
1426
|
+
}, Ei = {
|
|
1413
1427
|
info: {
|
|
1414
1428
|
key: "objc",
|
|
1415
1429
|
title: "Objective-C",
|
|
1416
1430
|
default: "nsurlsession"
|
|
1417
1431
|
},
|
|
1418
1432
|
clientsById: {
|
|
1419
|
-
nsurlsession:
|
|
1433
|
+
nsurlsession: Ri
|
|
1420
1434
|
}
|
|
1421
|
-
},
|
|
1435
|
+
}, Ai = {
|
|
1422
1436
|
info: {
|
|
1423
1437
|
key: "cohttp",
|
|
1424
1438
|
title: "CoHTTP",
|
|
@@ -1444,14 +1458,14 @@ var Xa = {
|
|
|
1444
1458
|
const g = f.length ? "~headers " : "", b = t.text ? "~body " : "", m = n.includes(o.toLowerCase()) ? `\`${o.toUpperCase()}` : `(Code.method_of_string "${o}")`;
|
|
1445
1459
|
return a(`Client.call ${g}${b}${m} uri`), a(">>= fun (res, body_stream) ->"), a("(* Do stuff with the result *)", 1), c();
|
|
1446
1460
|
}
|
|
1447
|
-
},
|
|
1461
|
+
}, Ii = {
|
|
1448
1462
|
info: {
|
|
1449
1463
|
key: "ocaml",
|
|
1450
1464
|
title: "OCaml",
|
|
1451
1465
|
default: "cohttp"
|
|
1452
1466
|
},
|
|
1453
1467
|
clientsById: {
|
|
1454
|
-
cohttp:
|
|
1468
|
+
cohttp: Ai
|
|
1455
1469
|
}
|
|
1456
1470
|
}, te = (e, r, t) => {
|
|
1457
1471
|
switch (t = t || "", r = r || "", Object.prototype.toString.call(e)) {
|
|
@@ -1484,7 +1498,7 @@ ${t}]`;
|
|
|
1484
1498
|
default:
|
|
1485
1499
|
return "null";
|
|
1486
1500
|
}
|
|
1487
|
-
},
|
|
1501
|
+
}, en = [
|
|
1488
1502
|
"ACL",
|
|
1489
1503
|
"BASELINE_CONTROL",
|
|
1490
1504
|
"CHECKIN",
|
|
@@ -1512,7 +1526,7 @@ ${t}]`;
|
|
|
1512
1526
|
"UNLOCK",
|
|
1513
1527
|
"UPDATE",
|
|
1514
1528
|
"VERSION_CONTROL"
|
|
1515
|
-
],
|
|
1529
|
+
], Li = {
|
|
1516
1530
|
info: {
|
|
1517
1531
|
key: "curl",
|
|
1518
1532
|
title: "cURL",
|
|
@@ -1579,18 +1593,18 @@ ${t}]`;
|
|
|
1579
1593
|
}
|
|
1580
1594
|
];
|
|
1581
1595
|
v("curl_setopt_array($curl, [");
|
|
1582
|
-
const
|
|
1596
|
+
const O = new V({ indent: c, join: `
|
|
1583
1597
|
${c}` });
|
|
1584
|
-
y.forEach(({ value:
|
|
1585
|
-
|
|
1598
|
+
y.forEach(({ value: S, name: x, escape: N }) => {
|
|
1599
|
+
S != null && O.push(`${x} => ${N ? JSON.stringify(S) : S},`);
|
|
1586
1600
|
});
|
|
1587
|
-
const T = s.map((
|
|
1588
|
-
T.length &&
|
|
1589
|
-
const d = Object.keys(n).sort().map((
|
|
1590
|
-
return d.length && (
|
|
1591
|
-
${c}${c}`), 1),
|
|
1601
|
+
const T = s.map((S) => `${encodeURIComponent(S.name)}=${encodeURIComponent(S.value)}`);
|
|
1602
|
+
T.length && O.push(`CURLOPT_COOKIE => "${T.join("; ")}",`);
|
|
1603
|
+
const d = Object.keys(n).sort().map((S) => `"${S}: ${ce(n[S])}"`);
|
|
1604
|
+
return d.length && (O.push("CURLOPT_HTTPHEADER => ["), O.push(d.join(`,
|
|
1605
|
+
${c}${c}`), 1), O.push("],")), v(O.join(), 1), v("]);"), p(), v("$response = curl_exec($curl);"), v("$err = curl_error($curl);"), p(), v("curl_close($curl);"), p(), v("if ($err) {"), v(g ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), v("} else {"), v("echo $response;", 1), v("}"), !b && l && (p(), v("?>")), h();
|
|
1592
1606
|
}
|
|
1593
|
-
},
|
|
1607
|
+
}, Ui = {
|
|
1594
1608
|
info: {
|
|
1595
1609
|
key: "guzzle",
|
|
1596
1610
|
title: "Guzzle",
|
|
@@ -1626,7 +1640,7 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1626
1640
|
name: h.name,
|
|
1627
1641
|
contents: h.value
|
|
1628
1642
|
});
|
|
1629
|
-
}), p.length && (g(`'multipart' => ${te(p, n.indent + n.indent, n.indent)}`, 1),
|
|
1643
|
+
}), p.length && (g(`'multipart' => ${te(p, n.indent + n.indent, n.indent)}`, 1), ot(i, "content-type") && (v = ve(i, "content-type")) != null && v.indexOf("boundary"))) {
|
|
1630
1644
|
const h = pe(i, "content-type");
|
|
1631
1645
|
h && delete i[h];
|
|
1632
1646
|
}
|
|
@@ -1641,7 +1655,7 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1641
1655
|
return j.length && m.push(`${n.indent}${n.indent}'cookie' => '${Me(j)}',`), m.length && (g("'headers' => [", 1), g(m.join(`
|
|
1642
1656
|
`)), g("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), l(), f.length ? (a(`$response = $client->request('${t}', '${r}', [`), a(b()), a("]);")) : a(`$response = $client->request('${t}', '${r}');`), l(), a("echo $response->getBody();"), !n.noTags && n.closingTag && (l(), a("?>")), c();
|
|
1643
1657
|
}
|
|
1644
|
-
},
|
|
1658
|
+
}, Fi = {
|
|
1645
1659
|
info: {
|
|
1646
1660
|
key: "http1",
|
|
1647
1661
|
title: "HTTP v1",
|
|
@@ -1651,7 +1665,7 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1651
1665
|
},
|
|
1652
1666
|
convert: ({ method: e, url: r, postData: t, queryObj: o, headersObj: i, cookiesObj: s }, n = {}) => {
|
|
1653
1667
|
const { closingTag: a = !1, indent: l = " ", noTags: c = !1, shortTags: f = !1 } = n, { push: g, blank: b, join: m } = new V({ indent: l });
|
|
1654
|
-
switch (c || (g(f ? "<?" : "<?php"), b()),
|
|
1668
|
+
switch (c || (g(f ? "<?" : "<?php"), b()), en.includes(e.toUpperCase()) || g(`HttpRequest::methodRegister('${e}');`), g("$request = new HttpRequest();"), g(`$request->setUrl(${te(r)});`), en.includes(e.toUpperCase()) ? g(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : g(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), b(), Object.keys(o).length && (g(`$request->setQueryData(${te(o, l)});`), b()), Object.keys(i).length && (g(`$request->setHeaders(${te(i, l)});`), b()), Object.keys(s).length && (g(`$request->setCookies(${te(s, l)});`), b()), t.mimeType) {
|
|
1655
1669
|
case "application/x-www-form-urlencoded":
|
|
1656
1670
|
g(`$request->setContentType(${te(t.mimeType)});`), g(`$request->setPostFields(${te(t.paramsObj, l)});`), b();
|
|
1657
1671
|
break;
|
|
@@ -1663,7 +1677,7 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1663
1677
|
}
|
|
1664
1678
|
return g("try {"), g("$response = $request->send();", 1), b(), g("echo $response->getBody();", 1), g("} catch (HttpException $ex) {"), g("echo $ex;", 1), g("}"), !c && a && (b(), g("?>")), m();
|
|
1665
1679
|
}
|
|
1666
|
-
},
|
|
1680
|
+
}, _i = {
|
|
1667
1681
|
info: {
|
|
1668
1682
|
key: "http2",
|
|
1669
1683
|
title: "HTTP v2",
|
|
@@ -1683,20 +1697,20 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1683
1697
|
if (!e.params)
|
|
1684
1698
|
break;
|
|
1685
1699
|
const p = [], h = {};
|
|
1686
|
-
e.params.forEach(({ name: T, fileName: d, value:
|
|
1700
|
+
e.params.forEach(({ name: T, fileName: d, value: S, contentType: x }) => {
|
|
1687
1701
|
if (d) {
|
|
1688
1702
|
p.push({
|
|
1689
1703
|
name: T,
|
|
1690
1704
|
type: x,
|
|
1691
1705
|
file: d,
|
|
1692
|
-
data:
|
|
1706
|
+
data: S
|
|
1693
1707
|
});
|
|
1694
1708
|
return;
|
|
1695
1709
|
}
|
|
1696
|
-
|
|
1710
|
+
S && (h[T] = S);
|
|
1697
1711
|
});
|
|
1698
|
-
const y = Object.keys(h).length ? te(h, l) : "null",
|
|
1699
|
-
if (g("$body = new http\\Message\\Body;"), g(`$body->addForm(${y}, ${
|
|
1712
|
+
const y = Object.keys(h).length ? te(h, l) : "null", O = p.length ? te(p, l) : "null";
|
|
1713
|
+
if (g("$body = new http\\Message\\Body;"), g(`$body->addForm(${y}, ${O});`), ot(r, "content-type") && (v = ve(r, "content-type")) != null && v.indexOf("boundary")) {
|
|
1700
1714
|
const T = pe(r, "content-type");
|
|
1701
1715
|
T && delete r[T];
|
|
1702
1716
|
}
|
|
@@ -1711,7 +1725,7 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1711
1725
|
}
|
|
1712
1726
|
return g(`$request->setRequestUrl(${te(s)});`), g(`$request->setRequestMethod(${te(t)});`), j && (g("$request->setBody($body);"), b()), Object.keys(o).length && (g(`$request->setQuery(new http\\QueryString(${te(o, l)}));`), b()), Object.keys(r).length && (g(`$request->setHeaders(${te(r, l)});`), b()), Object.keys(i).length && (b(), g(`$client->setCookies(${te(i, l)});`), b()), g("$client->enqueue($request)->send();"), g("$response = $client->getResponse();"), b(), g("echo $response->getBody();"), !c && a && (b(), g("?>")), m();
|
|
1713
1727
|
}
|
|
1714
|
-
},
|
|
1728
|
+
}, Bi = {
|
|
1715
1729
|
info: {
|
|
1716
1730
|
key: "php",
|
|
1717
1731
|
title: "PHP",
|
|
@@ -1719,12 +1733,12 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1719
1733
|
cli: "php %s"
|
|
1720
1734
|
},
|
|
1721
1735
|
clientsById: {
|
|
1722
|
-
curl:
|
|
1723
|
-
guzzle:
|
|
1724
|
-
http1:
|
|
1725
|
-
http2:
|
|
1736
|
+
curl: Li,
|
|
1737
|
+
guzzle: Ui,
|
|
1738
|
+
http1: Fi,
|
|
1739
|
+
http2: _i
|
|
1726
1740
|
}
|
|
1727
|
-
},
|
|
1741
|
+
}, xo = (e) => ({ method: t, headersObj: o, cookies: i, uriObj: s, fullUrl: n, postData: a, allHeaders: l }) => {
|
|
1728
1742
|
const { push: c, join: f } = new V();
|
|
1729
1743
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(t.toUpperCase()))
|
|
1730
1744
|
return "Method not supported";
|
|
@@ -1736,7 +1750,7 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1736
1750
|
}), b.push("-WebSession $session")), a.text && (b.push(
|
|
1737
1751
|
`-ContentType '${He(ve(l, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
|
|
1738
1752
|
), b.push(`-Body '${a.text}'`)), c(`$response = ${e} -Uri '${n}' -Method ${t} ${b.join(" ")}`.trim()), f();
|
|
1739
|
-
},
|
|
1753
|
+
}, Hi = {
|
|
1740
1754
|
info: {
|
|
1741
1755
|
key: "restmethod",
|
|
1742
1756
|
title: "Invoke-RestMethod",
|
|
@@ -1744,8 +1758,8 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1744
1758
|
description: "Powershell Invoke-RestMethod client",
|
|
1745
1759
|
extname: ".ps1"
|
|
1746
1760
|
},
|
|
1747
|
-
convert:
|
|
1748
|
-
},
|
|
1761
|
+
convert: xo("Invoke-RestMethod")
|
|
1762
|
+
}, Mi = {
|
|
1749
1763
|
info: {
|
|
1750
1764
|
key: "webrequest",
|
|
1751
1765
|
title: "Invoke-WebRequest",
|
|
@@ -1753,19 +1767,19 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1753
1767
|
description: "Powershell Invoke-WebRequest client",
|
|
1754
1768
|
extname: ".ps1"
|
|
1755
1769
|
},
|
|
1756
|
-
convert:
|
|
1757
|
-
},
|
|
1770
|
+
convert: xo("Invoke-WebRequest")
|
|
1771
|
+
}, zi = {
|
|
1758
1772
|
info: {
|
|
1759
1773
|
key: "powershell",
|
|
1760
1774
|
title: "Powershell",
|
|
1761
1775
|
default: "webrequest"
|
|
1762
1776
|
},
|
|
1763
1777
|
clientsById: {
|
|
1764
|
-
webrequest:
|
|
1765
|
-
restmethod:
|
|
1778
|
+
webrequest: Mi,
|
|
1779
|
+
restmethod: Hi
|
|
1766
1780
|
}
|
|
1767
1781
|
};
|
|
1768
|
-
function
|
|
1782
|
+
function tn(e, r, t, o, i) {
|
|
1769
1783
|
const s = o.repeat(i), n = o.repeat(i - 1), a = t ? `,
|
|
1770
1784
|
${s}` : ", ", l = e === "object" ? "{" : "[", c = e === "object" ? "}" : "]";
|
|
1771
1785
|
return t ? `${l}
|
|
@@ -1779,13 +1793,13 @@ var Ie = (e, r, t) => {
|
|
|
1779
1793
|
case "[object Array]": {
|
|
1780
1794
|
let o = !1;
|
|
1781
1795
|
const i = e.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (o = Object.keys(s).length > 1), Ie(s, r, t)));
|
|
1782
|
-
return
|
|
1796
|
+
return tn("array", i, o, r.indent, t);
|
|
1783
1797
|
}
|
|
1784
1798
|
case "[object Object]": {
|
|
1785
1799
|
const o = [];
|
|
1786
1800
|
for (const i in e)
|
|
1787
1801
|
o.push(`"${i}": ${Ie(e[i], r, t)}`);
|
|
1788
|
-
return
|
|
1802
|
+
return tn("object", o, r.pretty && o.length > 1, r.indent, t);
|
|
1789
1803
|
}
|
|
1790
1804
|
case "[object Null]":
|
|
1791
1805
|
return "None";
|
|
@@ -1794,7 +1808,7 @@ var Ie = (e, r, t) => {
|
|
|
1794
1808
|
default:
|
|
1795
1809
|
return e == null ? "" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
1796
1810
|
}
|
|
1797
|
-
},
|
|
1811
|
+
}, Gi = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], Wi = {
|
|
1798
1812
|
info: {
|
|
1799
1813
|
key: "requests",
|
|
1800
1814
|
title: "Requests",
|
|
@@ -1853,14 +1867,14 @@ var Ie = (e, r, t) => {
|
|
|
1853
1867
|
});
|
|
1854
1868
|
else if (p > 1) {
|
|
1855
1869
|
let y = 1;
|
|
1856
|
-
n("headers = {"), Object.keys(f).forEach((
|
|
1857
|
-
n(y !== p ? `"${
|
|
1870
|
+
n("headers = {"), Object.keys(f).forEach((O) => {
|
|
1871
|
+
n(y !== p ? `"${O}": "${ce(f[O])}",` : `"${O}": "${ce(f[O])}"`, 1), y += 1;
|
|
1858
1872
|
}), n("}"), a();
|
|
1859
1873
|
}
|
|
1860
|
-
let h =
|
|
1874
|
+
let h = Gi.includes(o) ? `response = requests.${o.toLowerCase()}(url` : `response = requests.request("${o}", url`;
|
|
1861
1875
|
return j && (v ? h += ", json=payload" : h += ", data=payload"), m && (h += ", files=files"), p > 0 && (h += ", headers=headers"), h += ")", n(h), a(), n("print(response.text)"), l();
|
|
1862
1876
|
}
|
|
1863
|
-
},
|
|
1877
|
+
}, Ji = {
|
|
1864
1878
|
info: {
|
|
1865
1879
|
key: "python",
|
|
1866
1880
|
title: "Python",
|
|
@@ -1868,9 +1882,9 @@ var Ie = (e, r, t) => {
|
|
|
1868
1882
|
cli: "python3 %s"
|
|
1869
1883
|
},
|
|
1870
1884
|
clientsById: {
|
|
1871
|
-
requests:
|
|
1885
|
+
requests: Wi
|
|
1872
1886
|
}
|
|
1873
|
-
},
|
|
1887
|
+
}, Vi = {
|
|
1874
1888
|
info: {
|
|
1875
1889
|
key: "httr",
|
|
1876
1890
|
title: "httr",
|
|
@@ -1884,8 +1898,8 @@ var Ie = (e, r, t) => {
|
|
|
1884
1898
|
const c = r;
|
|
1885
1899
|
delete r.key;
|
|
1886
1900
|
const f = Object.keys(c).length;
|
|
1887
|
-
t.length === 1 ? (n(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), a()) : t.length > 1 && (n("queryString <- list("), Object.keys(c).forEach((d,
|
|
1888
|
-
|
|
1901
|
+
t.length === 1 ? (n(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), a()) : t.length > 1 && (n("queryString <- list("), Object.keys(c).forEach((d, S) => {
|
|
1902
|
+
S !== f - 1 ? n(` ${d} = "${c[d].toString()}",`) : n(` ${d} = "${c[d].toString()}"`);
|
|
1889
1903
|
}), n(")"), a());
|
|
1890
1904
|
const g = JSON.stringify(o.text);
|
|
1891
1905
|
if (g && (n(`payload <- ${g}`), a()), o.text || o.jsonObj || o.params)
|
|
@@ -1903,22 +1917,22 @@ var Ie = (e, r, t) => {
|
|
|
1903
1917
|
n('encode <- "raw"'), a();
|
|
1904
1918
|
break;
|
|
1905
1919
|
}
|
|
1906
|
-
const b = ve(i, "cookie"), m = ve(i, "accept"), j = b ? `set_cookies(\`${String(b).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, v = m ? `accept("${ce(m)}")` : void 0, p = `content_type("${ce(o.mimeType)}")`, h = Object.entries(i).filter(([d]) => !["cookie", "accept", "content-type"].includes(d.toLowerCase())).map(([d,
|
|
1907
|
-
let
|
|
1908
|
-
g && (
|
|
1920
|
+
const b = ve(i, "cookie"), m = ve(i, "accept"), j = b ? `set_cookies(\`${String(b).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, v = m ? `accept("${ce(m)}")` : void 0, p = `content_type("${ce(o.mimeType)}")`, h = Object.entries(i).filter(([d]) => !["cookie", "accept", "content-type"].includes(d.toLowerCase())).map(([d, S]) => `'${d}' = '${Me(S)}'`).join(", "), y = h ? `add_headers(${h})` : void 0;
|
|
1921
|
+
let O = `response <- VERB("${s}", url`;
|
|
1922
|
+
g && (O += ", body = payload"), t.length && (O += ", query = queryString");
|
|
1909
1923
|
const T = [y, p, v, j].filter((d) => !!d).join(", ");
|
|
1910
|
-
return T && (
|
|
1924
|
+
return T && (O += `, ${T}`), (o.text || o.jsonObj || o.params) && (O += ", encode = encode"), O += ")", n(O), a(), n('content(response, "text")'), l();
|
|
1911
1925
|
}
|
|
1912
|
-
},
|
|
1926
|
+
}, Di = {
|
|
1913
1927
|
info: {
|
|
1914
1928
|
key: "r",
|
|
1915
1929
|
title: "R",
|
|
1916
1930
|
default: "httr"
|
|
1917
1931
|
},
|
|
1918
1932
|
clientsById: {
|
|
1919
|
-
httr:
|
|
1933
|
+
httr: Vi
|
|
1920
1934
|
}
|
|
1921
|
-
},
|
|
1935
|
+
}, Ki = {
|
|
1922
1936
|
info: {
|
|
1923
1937
|
key: "native",
|
|
1924
1938
|
title: "net::http",
|
|
@@ -1949,16 +1963,16 @@ var Ie = (e, r, t) => {
|
|
|
1949
1963
|
s(`request["${b}"] = '${Me(i[b])}'`);
|
|
1950
1964
|
}), o.text && s(`request.body = ${JSON.stringify(o.text)}`), n(), s("response = http.request(request)"), s("puts response.read_body"), a();
|
|
1951
1965
|
}
|
|
1952
|
-
},
|
|
1966
|
+
}, Qi = {
|
|
1953
1967
|
info: {
|
|
1954
1968
|
key: "ruby",
|
|
1955
1969
|
title: "Ruby",
|
|
1956
1970
|
default: "native"
|
|
1957
1971
|
},
|
|
1958
1972
|
clientsById: {
|
|
1959
|
-
native:
|
|
1973
|
+
native: Ki
|
|
1960
1974
|
}
|
|
1961
|
-
}, ue = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`,
|
|
1975
|
+
}, ue = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, Yi = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), Xi = {
|
|
1962
1976
|
"http1.0": "0",
|
|
1963
1977
|
"url ": "",
|
|
1964
1978
|
cookie: "b",
|
|
@@ -1968,13 +1982,13 @@ var Ie = (e, r, t) => {
|
|
|
1968
1982
|
header: "H",
|
|
1969
1983
|
insecure: "k",
|
|
1970
1984
|
request: "X"
|
|
1971
|
-
},
|
|
1985
|
+
}, Zi = (e) => (r) => {
|
|
1972
1986
|
if (e) {
|
|
1973
|
-
const t =
|
|
1987
|
+
const t = Xi[r];
|
|
1974
1988
|
return t ? `-${t}` : "";
|
|
1975
1989
|
}
|
|
1976
1990
|
return `--${r}`;
|
|
1977
|
-
},
|
|
1991
|
+
}, es = {
|
|
1978
1992
|
info: {
|
|
1979
1993
|
key: "curl",
|
|
1980
1994
|
title: "cURL",
|
|
@@ -1988,15 +2002,15 @@ var Ie = (e, r, t) => {
|
|
|
1988
2002
|
...typeof a == "string" ? { indent: a } : {},
|
|
1989
2003
|
join: a !== !1 ? ` \\
|
|
1990
2004
|
${a}` : " "
|
|
1991
|
-
}), j =
|
|
2005
|
+
}), j = Zi(l);
|
|
1992
2006
|
let v = ue(e);
|
|
1993
2007
|
if (b(`curl ${j("request")} ${r}`), f && (v = unescape(v), b(j("globoff"))), b(`${j("url ")}${v}`), t === "HTTP/1.0" && b(j("http1.0")), ve(i, "accept-encoding") && b("--compressed"), s.mimeType === "multipart/form-data") {
|
|
1994
2008
|
const h = pe(o, "content-type");
|
|
1995
2009
|
if (h) {
|
|
1996
2010
|
const y = o[h];
|
|
1997
2011
|
if (h && y) {
|
|
1998
|
-
const
|
|
1999
|
-
o[h] =
|
|
2012
|
+
const O = String(y).replace(/; boundary.+?(?=(;|$))/, "");
|
|
2013
|
+
o[h] = O, i[h] = O;
|
|
2000
2014
|
}
|
|
2001
2015
|
}
|
|
2002
2016
|
}
|
|
@@ -2006,21 +2020,21 @@ ${a}` : " "
|
|
|
2006
2020
|
}), i.cookie && b(`${j("cookie")} ${ue(i.cookie)}`), s.mimeType) {
|
|
2007
2021
|
case "multipart/form-data":
|
|
2008
2022
|
(p = s.params) == null || p.forEach((y) => {
|
|
2009
|
-
let
|
|
2010
|
-
y.fileName ?
|
|
2023
|
+
let O = "";
|
|
2024
|
+
y.fileName ? O = `${y.name}='@${y.fileName}'` : O = ue(`${y.name}=${y.value}`), b(`${j("form")} ${O}`);
|
|
2011
2025
|
});
|
|
2012
2026
|
break;
|
|
2013
2027
|
case "application/x-www-form-urlencoded":
|
|
2014
2028
|
s.params ? s.params.forEach((y) => {
|
|
2015
|
-
const
|
|
2016
|
-
b(`${x} ${ue(`${
|
|
2029
|
+
const O = y.name, T = encodeURIComponent(y.name), d = T !== O, S = d ? T : O, x = c ? "--data-binary" : d ? "--data-urlencode" : j("data");
|
|
2030
|
+
b(`${x} ${ue(`${S}=${y.value}`)}`);
|
|
2017
2031
|
}) : b(`${c ? "--data-binary" : j("data")} ${ue(s.text)}`);
|
|
2018
2032
|
break;
|
|
2019
2033
|
default:
|
|
2020
2034
|
if (!s.text)
|
|
2021
2035
|
break;
|
|
2022
2036
|
let h = !1;
|
|
2023
|
-
if (
|
|
2037
|
+
if (Za(s.mimeType) && s.text.length > 20)
|
|
2024
2038
|
try {
|
|
2025
2039
|
const y = JSON.parse(s.text);
|
|
2026
2040
|
h = !0, s.text.indexOf("'") > 0 ? b(
|
|
@@ -2042,7 +2056,7 @@ ${JSON.stringify(y, null, g)}
|
|
|
2042
2056
|
}
|
|
2043
2057
|
return m();
|
|
2044
2058
|
}
|
|
2045
|
-
},
|
|
2059
|
+
}, ts = {
|
|
2046
2060
|
info: {
|
|
2047
2061
|
key: "httpie",
|
|
2048
2062
|
title: "HTTPie",
|
|
@@ -2091,7 +2105,7 @@ ${a.indent}` : " "
|
|
|
2091
2105
|
}
|
|
2092
2106
|
return c();
|
|
2093
2107
|
}
|
|
2094
|
-
},
|
|
2108
|
+
}, rs = {
|
|
2095
2109
|
info: {
|
|
2096
2110
|
key: "wget",
|
|
2097
2111
|
title: "Wget",
|
|
@@ -2113,9 +2127,9 @@ ${s.indent}` : " "
|
|
|
2113
2127
|
return s.verbose ? n(`wget ${s.short ? "-v" : "--verbose"}`) : n(`wget ${s.short ? "-q" : "--quiet"}`), n(`--method ${ue(e)}`), Object.keys(t).forEach((l) => {
|
|
2114
2128
|
const c = `${l}: ${t[l]}`;
|
|
2115
2129
|
n(`--header ${ue(c)}`);
|
|
2116
|
-
}), r.text && n(`--body-data ${
|
|
2130
|
+
}), r.text && n(`--body-data ${Yi(ue(r.text))}`), n(s.short ? "-O" : "--output-document"), n(`- ${ue(o)}`), a();
|
|
2117
2131
|
}
|
|
2118
|
-
},
|
|
2132
|
+
}, ns = {
|
|
2119
2133
|
info: {
|
|
2120
2134
|
key: "shell",
|
|
2121
2135
|
title: "Shell",
|
|
@@ -2123,30 +2137,30 @@ ${s.indent}` : " "
|
|
|
2123
2137
|
cli: "%s"
|
|
2124
2138
|
},
|
|
2125
2139
|
clientsById: {
|
|
2126
|
-
curl:
|
|
2127
|
-
httpie:
|
|
2128
|
-
wget:
|
|
2140
|
+
curl: es,
|
|
2141
|
+
httpie: ts,
|
|
2142
|
+
wget: rs
|
|
2129
2143
|
}
|
|
2130
|
-
},
|
|
2131
|
-
const i =
|
|
2144
|
+
}, rn = (e, r) => r.repeat(e), nn = (e, r, t, o) => {
|
|
2145
|
+
const i = rn(o, t), s = rn(o - 1, t), n = r ? `,
|
|
2132
2146
|
${i}` : ", ";
|
|
2133
2147
|
return r ? `[
|
|
2134
2148
|
${i}${e.join(n)}
|
|
2135
2149
|
${s}]` : `[${e.join(n)}]`;
|
|
2136
|
-
},
|
|
2150
|
+
}, on = (e, r, t) => `let ${e} = ${rt(r, t)}`, rt = (e, r, t) => {
|
|
2137
2151
|
switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
|
|
2138
2152
|
case "[object Number]":
|
|
2139
2153
|
return e;
|
|
2140
2154
|
case "[object Array]": {
|
|
2141
2155
|
let o = !1;
|
|
2142
|
-
const i = e.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (o = Object.keys(s).length > 1),
|
|
2143
|
-
return
|
|
2156
|
+
const i = e.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (o = Object.keys(s).length > 1), rt(s, r, t)));
|
|
2157
|
+
return nn(i, o, r.indent, t);
|
|
2144
2158
|
}
|
|
2145
2159
|
case "[object Object]": {
|
|
2146
2160
|
const o = [];
|
|
2147
2161
|
for (const i in e)
|
|
2148
|
-
o.push(`"${i}": ${
|
|
2149
|
-
return
|
|
2162
|
+
o.push(`"${i}": ${rt(e[i], r, t)}`);
|
|
2163
|
+
return nn(
|
|
2150
2164
|
o,
|
|
2151
2165
|
// @ts-expect-error needs better types
|
|
2152
2166
|
r.pretty && o.length > 1,
|
|
@@ -2160,7 +2174,7 @@ ${s}]` : `[${e.join(n)}]`;
|
|
|
2160
2174
|
default:
|
|
2161
2175
|
return e == null ? "nil" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
2162
2176
|
}
|
|
2163
|
-
},
|
|
2177
|
+
}, os = {
|
|
2164
2178
|
info: {
|
|
2165
2179
|
key: "urlsession",
|
|
2166
2180
|
title: "URLSession",
|
|
@@ -2187,10 +2201,10 @@ ${s}]` : `[${e.join(n)}]`;
|
|
|
2187
2201
|
}
|
|
2188
2202
|
break;
|
|
2189
2203
|
case "application/json":
|
|
2190
|
-
r.jsonObj && (a(`${
|
|
2204
|
+
r.jsonObj && (a(`${on("parameters", r.jsonObj, n)} as [String : Any?]`), l(), a("let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])"), l());
|
|
2191
2205
|
break;
|
|
2192
2206
|
case "multipart/form-data":
|
|
2193
|
-
a(
|
|
2207
|
+
a(on("parameters", r.params, n)), l(), a(`let boundary = "${r.boundary}"`), l(), a('var body = ""'), a("for param in parameters {"), a('let paramName = param["name"]!', 1), a('body += "--\\(boundary)\\r\\n"', 1), a('body += "Content-Disposition:form-data; name=\\"\\(paramName)\\""', 1), a('if let filename = param["fileName"] {', 1), a('let contentType = param["contentType"]!', 2), a("let fileContent = try String(contentsOfFile: filename, encoding: .utf8)", 2), a('body += "; filename=\\"\\(filename)\\"\\r\\n"', 2), a('body += "Content-Type: \\(contentType)\\r\\n\\r\\n"', 2), a("body += fileContent", 2), a('} else if let paramValue = param["value"] {', 1), a('body += "\\r\\n\\r\\n\\(paramValue)"', 2), a("}", 1), a("}"), l(), a("let postData = Data(body.utf8)"), l();
|
|
2194
2208
|
break;
|
|
2195
2209
|
default:
|
|
2196
2210
|
a(`let postData = Data("${r.text}".utf8)`), l();
|
|
@@ -2209,125 +2223,125 @@ ${s}]` : `[${e.join(n)}]`;
|
|
|
2209
2223
|
});
|
|
2210
2224
|
break;
|
|
2211
2225
|
}
|
|
2212
|
-
}), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), l(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${i}"`), a(`request.timeoutInterval = ${n.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${
|
|
2226
|
+
}), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), l(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${i}"`), a(`request.timeoutInterval = ${n.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${rt(e, n)}`), f && a("request.httpBody = postData"), l(), a("let (data, _) = try await URLSession.shared.data(for: request)"), a("print(String(decoding: data, as: UTF8.self))"), c();
|
|
2213
2227
|
}
|
|
2214
|
-
},
|
|
2228
|
+
}, as = {
|
|
2215
2229
|
info: {
|
|
2216
2230
|
key: "swift",
|
|
2217
2231
|
title: "Swift",
|
|
2218
2232
|
default: "urlsession"
|
|
2219
2233
|
},
|
|
2220
2234
|
clientsById: {
|
|
2221
|
-
urlsession:
|
|
2235
|
+
urlsession: os
|
|
2222
2236
|
}
|
|
2223
|
-
},
|
|
2224
|
-
c:
|
|
2225
|
-
clojure:
|
|
2226
|
-
csharp:
|
|
2227
|
-
go:
|
|
2228
|
-
http:
|
|
2229
|
-
java:
|
|
2230
|
-
javascript:
|
|
2231
|
-
json:
|
|
2232
|
-
kotlin:
|
|
2233
|
-
node:
|
|
2234
|
-
objc:
|
|
2235
|
-
ocaml:
|
|
2236
|
-
php:
|
|
2237
|
-
powershell:
|
|
2238
|
-
python:
|
|
2239
|
-
r:
|
|
2240
|
-
ruby:
|
|
2241
|
-
shell:
|
|
2242
|
-
swift:
|
|
2237
|
+
}, is = {
|
|
2238
|
+
c: Xa,
|
|
2239
|
+
clojure: ri,
|
|
2240
|
+
csharp: si,
|
|
2241
|
+
go: ci,
|
|
2242
|
+
http: fi,
|
|
2243
|
+
java: mi,
|
|
2244
|
+
javascript: ji,
|
|
2245
|
+
json: wi,
|
|
2246
|
+
kotlin: Oi,
|
|
2247
|
+
node: ki,
|
|
2248
|
+
objc: Ei,
|
|
2249
|
+
ocaml: Ii,
|
|
2250
|
+
php: Bi,
|
|
2251
|
+
powershell: zi,
|
|
2252
|
+
python: Ji,
|
|
2253
|
+
r: Di,
|
|
2254
|
+
ruby: Qi,
|
|
2255
|
+
shell: ns,
|
|
2256
|
+
swift: as
|
|
2243
2257
|
}, Ce = {}, Fe = { exports: {} };
|
|
2244
2258
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
2245
|
-
var
|
|
2246
|
-
function
|
|
2247
|
-
return
|
|
2259
|
+
var ss = Fe.exports, an;
|
|
2260
|
+
function ls() {
|
|
2261
|
+
return an || (an = 1, function(e, r) {
|
|
2248
2262
|
(function(t) {
|
|
2249
|
-
var o = r && !r.nodeType && r, i = e && !e.nodeType && e, s = typeof
|
|
2263
|
+
var o = r && !r.nodeType && r, i = e && !e.nodeType && e, s = typeof Ze == "object" && Ze;
|
|
2250
2264
|
(s.global === s || s.window === s || s.self === s) && (t = s);
|
|
2251
|
-
var n, a = 2147483647, l = 36, c = 1, f = 26, g = 38, b = 700, m = 72, j = 128, v = "-", p = /^xn--/, h = /[^\x20-\x7E]/, y = /[\x2E\u3002\uFF0E\uFF61]/g,
|
|
2265
|
+
var n, a = 2147483647, l = 36, c = 1, f = 26, g = 38, b = 700, m = 72, j = 128, v = "-", p = /^xn--/, h = /[^\x20-\x7E]/, y = /[\x2E\u3002\uFF0E\uFF61]/g, O = {
|
|
2252
2266
|
overflow: "Overflow: input needs wider integers to process",
|
|
2253
2267
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
2254
2268
|
"invalid-input": "Invalid input"
|
|
2255
|
-
}, T = l - c, d = Math.floor,
|
|
2269
|
+
}, T = l - c, d = Math.floor, S = String.fromCharCode, x;
|
|
2256
2270
|
function N(q) {
|
|
2257
|
-
throw new RangeError(
|
|
2271
|
+
throw new RangeError(O[q]);
|
|
2258
2272
|
}
|
|
2259
|
-
function A(q,
|
|
2273
|
+
function A(q, k) {
|
|
2260
2274
|
for (var U = q.length, C = []; U--; )
|
|
2261
|
-
C[U] =
|
|
2275
|
+
C[U] = k(q[U]);
|
|
2262
2276
|
return C;
|
|
2263
2277
|
}
|
|
2264
|
-
function E(q,
|
|
2278
|
+
function E(q, k) {
|
|
2265
2279
|
var U = q.split("@"), C = "";
|
|
2266
2280
|
U.length > 1 && (C = U[0] + "@", q = U[1]), q = q.replace(y, ".");
|
|
2267
|
-
var L = q.split("."), W = A(L,
|
|
2281
|
+
var L = q.split("."), W = A(L, k).join(".");
|
|
2268
2282
|
return C + W;
|
|
2269
2283
|
}
|
|
2270
2284
|
function B(q) {
|
|
2271
|
-
for (var
|
|
2272
|
-
L = q.charCodeAt(U++), L >= 55296 && L <= 56319 && U < C ? (W = q.charCodeAt(U++), (W & 64512) == 56320 ?
|
|
2273
|
-
return
|
|
2285
|
+
for (var k = [], U = 0, C = q.length, L, W; U < C; )
|
|
2286
|
+
L = q.charCodeAt(U++), L >= 55296 && L <= 56319 && U < C ? (W = q.charCodeAt(U++), (W & 64512) == 56320 ? k.push(((L & 1023) << 10) + (W & 1023) + 65536) : (k.push(L), U--)) : k.push(L);
|
|
2287
|
+
return k;
|
|
2274
2288
|
}
|
|
2275
2289
|
function P(q) {
|
|
2276
|
-
return A(q, function(
|
|
2290
|
+
return A(q, function(k) {
|
|
2277
2291
|
var U = "";
|
|
2278
|
-
return
|
|
2292
|
+
return k > 65535 && (k -= 65536, U += S(k >>> 10 & 1023 | 55296), k = 56320 | k & 1023), U += S(k), U;
|
|
2279
2293
|
}).join("");
|
|
2280
2294
|
}
|
|
2281
2295
|
function ae(q) {
|
|
2282
2296
|
return q - 48 < 10 ? q - 22 : q - 65 < 26 ? q - 65 : q - 97 < 26 ? q - 97 : l;
|
|
2283
2297
|
}
|
|
2284
|
-
function H(q,
|
|
2285
|
-
return q + 22 + 75 * (q < 26) - ((
|
|
2298
|
+
function H(q, k) {
|
|
2299
|
+
return q + 22 + 75 * (q < 26) - ((k != 0) << 5);
|
|
2286
2300
|
}
|
|
2287
|
-
function D(q,
|
|
2301
|
+
function D(q, k, U) {
|
|
2288
2302
|
var C = 0;
|
|
2289
|
-
for (q = U ? d(q / b) : q >> 1, q += d(q /
|
|
2303
|
+
for (q = U ? d(q / b) : q >> 1, q += d(q / k); q > T * f >> 1; C += l)
|
|
2290
2304
|
q = d(q / T);
|
|
2291
2305
|
return d(C + (T + 1) * q / (q + g));
|
|
2292
2306
|
}
|
|
2293
2307
|
function le(q) {
|
|
2294
|
-
var
|
|
2295
|
-
for (
|
|
2296
|
-
q.charCodeAt(ne) >= 128 && N("not-basic"),
|
|
2297
|
-
for (J =
|
|
2298
|
-
for (I = L, F = 1, _ = l; J >= U && N("invalid-input"),
|
|
2308
|
+
var k = [], U = q.length, C, L = 0, W = j, z = m, Q, ne, J, I, F, _, K, G, Y;
|
|
2309
|
+
for (Q = q.lastIndexOf(v), Q < 0 && (Q = 0), ne = 0; ne < Q; ++ne)
|
|
2310
|
+
q.charCodeAt(ne) >= 128 && N("not-basic"), k.push(q.charCodeAt(ne));
|
|
2311
|
+
for (J = Q > 0 ? Q + 1 : 0; J < U; ) {
|
|
2312
|
+
for (I = L, F = 1, _ = l; J >= U && N("invalid-input"), K = ae(q.charCodeAt(J++)), (K >= l || K > d((a - L) / F)) && N("overflow"), L += K * F, G = _ <= z ? c : _ >= z + f ? f : _ - z, !(K < G); _ += l)
|
|
2299
2313
|
Y = l - G, F > d(a / Y) && N("overflow"), F *= Y;
|
|
2300
|
-
C =
|
|
2314
|
+
C = k.length + 1, z = D(L - I, C, I == 0), d(L / C) > a - W && N("overflow"), W += d(L / C), L %= C, k.splice(L++, 0, W);
|
|
2301
2315
|
}
|
|
2302
|
-
return P(
|
|
2316
|
+
return P(k);
|
|
2303
2317
|
}
|
|
2304
2318
|
function Z(q) {
|
|
2305
|
-
var
|
|
2306
|
-
for (q = B(q),
|
|
2307
|
-
F = q[z], F < 128 && _.push(
|
|
2308
|
-
for (C = L = _.length, L && _.push(v); C <
|
|
2309
|
-
for (
|
|
2310
|
-
F = q[z], F >=
|
|
2311
|
-
for (G = C + 1,
|
|
2312
|
-
if (F = q[z], F <
|
|
2319
|
+
var k, U, C, L, W, z, Q, ne, J, I, F, _ = [], K, G, Y, oe;
|
|
2320
|
+
for (q = B(q), K = q.length, k = j, U = 0, W = m, z = 0; z < K; ++z)
|
|
2321
|
+
F = q[z], F < 128 && _.push(S(F));
|
|
2322
|
+
for (C = L = _.length, L && _.push(v); C < K; ) {
|
|
2323
|
+
for (Q = a, z = 0; z < K; ++z)
|
|
2324
|
+
F = q[z], F >= k && F < Q && (Q = F);
|
|
2325
|
+
for (G = C + 1, Q - k > d((a - U) / G) && N("overflow"), U += (Q - k) * G, k = Q, z = 0; z < K; ++z)
|
|
2326
|
+
if (F = q[z], F < k && ++U > a && N("overflow"), F == k) {
|
|
2313
2327
|
for (ne = U, J = l; I = J <= W ? c : J >= W + f ? f : J - W, !(ne < I); J += l)
|
|
2314
2328
|
oe = ne - I, Y = l - I, _.push(
|
|
2315
|
-
|
|
2329
|
+
S(H(I + oe % Y, 0))
|
|
2316
2330
|
), ne = d(oe / Y);
|
|
2317
|
-
_.push(
|
|
2331
|
+
_.push(S(H(ne, 0))), W = D(U, G, C == L), U = 0, ++C;
|
|
2318
2332
|
}
|
|
2319
|
-
++U, ++
|
|
2333
|
+
++U, ++k;
|
|
2320
2334
|
}
|
|
2321
2335
|
return _.join("");
|
|
2322
2336
|
}
|
|
2323
|
-
function
|
|
2324
|
-
return E(q, function(
|
|
2325
|
-
return p.test(
|
|
2337
|
+
function R(q) {
|
|
2338
|
+
return E(q, function(k) {
|
|
2339
|
+
return p.test(k) ? le(k.slice(4).toLowerCase()) : k;
|
|
2326
2340
|
});
|
|
2327
2341
|
}
|
|
2328
2342
|
function re(q) {
|
|
2329
|
-
return E(q, function(
|
|
2330
|
-
return h.test(
|
|
2343
|
+
return E(q, function(k) {
|
|
2344
|
+
return h.test(k) ? "xn--" + Z(k) : k;
|
|
2331
2345
|
});
|
|
2332
2346
|
}
|
|
2333
2347
|
if (n = {
|
|
@@ -2351,7 +2365,7 @@ function es() {
|
|
|
2351
2365
|
decode: le,
|
|
2352
2366
|
encode: Z,
|
|
2353
2367
|
toASCII: re,
|
|
2354
|
-
toUnicode:
|
|
2368
|
+
toUnicode: R
|
|
2355
2369
|
}, o && i)
|
|
2356
2370
|
if (e.exports == o)
|
|
2357
2371
|
i.exports = n;
|
|
@@ -2360,101 +2374,101 @@ function es() {
|
|
|
2360
2374
|
n.hasOwnProperty(x) && (o[x] = n[x]);
|
|
2361
2375
|
else
|
|
2362
2376
|
t.punycode = n;
|
|
2363
|
-
})(
|
|
2377
|
+
})(ss);
|
|
2364
2378
|
}(Fe, Fe.exports)), Fe.exports;
|
|
2365
2379
|
}
|
|
2366
|
-
var
|
|
2367
|
-
function
|
|
2368
|
-
return
|
|
2369
|
-
}
|
|
2370
|
-
var xt, sn;
|
|
2371
|
-
function ts() {
|
|
2372
|
-
return sn || (sn = 1, xt = Error), xt;
|
|
2380
|
+
var jt, sn;
|
|
2381
|
+
function jo() {
|
|
2382
|
+
return sn || (sn = 1, jt = Object), jt;
|
|
2373
2383
|
}
|
|
2374
|
-
var
|
|
2375
|
-
function
|
|
2376
|
-
return ln || (ln = 1,
|
|
2384
|
+
var $t, ln;
|
|
2385
|
+
function cs() {
|
|
2386
|
+
return ln || (ln = 1, $t = Error), $t;
|
|
2377
2387
|
}
|
|
2378
|
-
var
|
|
2379
|
-
function
|
|
2380
|
-
return cn || (cn = 1,
|
|
2388
|
+
var wt, cn;
|
|
2389
|
+
function us() {
|
|
2390
|
+
return cn || (cn = 1, wt = EvalError), wt;
|
|
2381
2391
|
}
|
|
2382
|
-
var
|
|
2383
|
-
function
|
|
2384
|
-
return un || (un = 1,
|
|
2392
|
+
var St, un;
|
|
2393
|
+
function fs() {
|
|
2394
|
+
return un || (un = 1, St = RangeError), St;
|
|
2385
2395
|
}
|
|
2386
|
-
var
|
|
2387
|
-
function
|
|
2388
|
-
return fn || (fn = 1,
|
|
2396
|
+
var Ot, fn;
|
|
2397
|
+
function ps() {
|
|
2398
|
+
return fn || (fn = 1, Ot = ReferenceError), Ot;
|
|
2389
2399
|
}
|
|
2390
|
-
var
|
|
2391
|
-
function
|
|
2392
|
-
return pn || (pn = 1,
|
|
2400
|
+
var Tt, pn;
|
|
2401
|
+
function $o() {
|
|
2402
|
+
return pn || (pn = 1, Tt = SyntaxError), Tt;
|
|
2393
2403
|
}
|
|
2394
|
-
var
|
|
2395
|
-
function
|
|
2396
|
-
return dn || (dn = 1,
|
|
2404
|
+
var Pt, dn;
|
|
2405
|
+
function We() {
|
|
2406
|
+
return dn || (dn = 1, Pt = TypeError), Pt;
|
|
2397
2407
|
}
|
|
2398
|
-
var
|
|
2399
|
-
function
|
|
2400
|
-
return hn || (hn = 1,
|
|
2408
|
+
var Ct, hn;
|
|
2409
|
+
function ds() {
|
|
2410
|
+
return hn || (hn = 1, Ct = URIError), Ct;
|
|
2401
2411
|
}
|
|
2402
|
-
var
|
|
2403
|
-
function
|
|
2404
|
-
return yn || (yn = 1,
|
|
2412
|
+
var Nt, yn;
|
|
2413
|
+
function hs() {
|
|
2414
|
+
return yn || (yn = 1, Nt = Math.abs), Nt;
|
|
2405
2415
|
}
|
|
2406
|
-
var
|
|
2407
|
-
function
|
|
2408
|
-
return mn || (mn = 1,
|
|
2416
|
+
var qt, mn;
|
|
2417
|
+
function ys() {
|
|
2418
|
+
return mn || (mn = 1, qt = Math.floor), qt;
|
|
2409
2419
|
}
|
|
2410
|
-
var
|
|
2411
|
-
function
|
|
2412
|
-
return gn || (gn = 1,
|
|
2420
|
+
var kt, gn;
|
|
2421
|
+
function ms() {
|
|
2422
|
+
return gn || (gn = 1, kt = Math.max), kt;
|
|
2413
2423
|
}
|
|
2414
2424
|
var Rt, vn;
|
|
2415
|
-
function
|
|
2416
|
-
return vn || (vn = 1, Rt = Math.
|
|
2425
|
+
function gs() {
|
|
2426
|
+
return vn || (vn = 1, Rt = Math.min), Rt;
|
|
2417
2427
|
}
|
|
2418
|
-
var
|
|
2419
|
-
function
|
|
2420
|
-
return bn || (bn = 1,
|
|
2428
|
+
var Et, bn;
|
|
2429
|
+
function vs() {
|
|
2430
|
+
return bn || (bn = 1, Et = Math.pow), Et;
|
|
2421
2431
|
}
|
|
2422
|
-
var
|
|
2423
|
-
function
|
|
2424
|
-
return xn || (xn = 1,
|
|
2432
|
+
var At, xn;
|
|
2433
|
+
function bs() {
|
|
2434
|
+
return xn || (xn = 1, At = Math.round), At;
|
|
2435
|
+
}
|
|
2436
|
+
var It, jn;
|
|
2437
|
+
function xs() {
|
|
2438
|
+
return jn || (jn = 1, It = Number.isNaN || function(r) {
|
|
2425
2439
|
return r !== r;
|
|
2426
|
-
}),
|
|
2440
|
+
}), It;
|
|
2427
2441
|
}
|
|
2428
|
-
var
|
|
2429
|
-
function
|
|
2430
|
-
if (
|
|
2431
|
-
|
|
2432
|
-
var e = /* @__PURE__ */
|
|
2433
|
-
return
|
|
2442
|
+
var Lt, $n;
|
|
2443
|
+
function js() {
|
|
2444
|
+
if ($n) return Lt;
|
|
2445
|
+
$n = 1;
|
|
2446
|
+
var e = /* @__PURE__ */ xs();
|
|
2447
|
+
return Lt = function(t) {
|
|
2434
2448
|
return e(t) || t === 0 ? t : t < 0 ? -1 : 1;
|
|
2435
|
-
},
|
|
2449
|
+
}, Lt;
|
|
2436
2450
|
}
|
|
2437
|
-
var
|
|
2438
|
-
function
|
|
2439
|
-
return
|
|
2451
|
+
var Ut, wn;
|
|
2452
|
+
function $s() {
|
|
2453
|
+
return wn || (wn = 1, Ut = Object.getOwnPropertyDescriptor), Ut;
|
|
2440
2454
|
}
|
|
2441
|
-
var
|
|
2442
|
-
function
|
|
2443
|
-
if (
|
|
2444
|
-
|
|
2445
|
-
var e = /* @__PURE__ */
|
|
2455
|
+
var Ft, Sn;
|
|
2456
|
+
function at() {
|
|
2457
|
+
if (Sn) return Ft;
|
|
2458
|
+
Sn = 1;
|
|
2459
|
+
var e = /* @__PURE__ */ $s();
|
|
2446
2460
|
if (e)
|
|
2447
2461
|
try {
|
|
2448
2462
|
e([], "length");
|
|
2449
2463
|
} catch {
|
|
2450
2464
|
e = null;
|
|
2451
2465
|
}
|
|
2452
|
-
return
|
|
2466
|
+
return Ft = e, Ft;
|
|
2453
2467
|
}
|
|
2454
|
-
var
|
|
2455
|
-
function
|
|
2456
|
-
if (
|
|
2457
|
-
|
|
2468
|
+
var _t, On;
|
|
2469
|
+
function it() {
|
|
2470
|
+
if (On) return _t;
|
|
2471
|
+
On = 1;
|
|
2458
2472
|
var e = Object.defineProperty || !1;
|
|
2459
2473
|
if (e)
|
|
2460
2474
|
try {
|
|
@@ -2462,11 +2476,11 @@ function at() {
|
|
|
2462
2476
|
} catch {
|
|
2463
2477
|
e = !1;
|
|
2464
2478
|
}
|
|
2465
|
-
return
|
|
2479
|
+
return _t = e, _t;
|
|
2466
2480
|
}
|
|
2467
|
-
var
|
|
2468
|
-
function
|
|
2469
|
-
return
|
|
2481
|
+
var Bt, Tn;
|
|
2482
|
+
function ws() {
|
|
2483
|
+
return Tn || (Tn = 1, Bt = function() {
|
|
2470
2484
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2471
2485
|
return !1;
|
|
2472
2486
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2492,32 +2506,32 @@ function ys() {
|
|
|
2492
2506
|
return !1;
|
|
2493
2507
|
}
|
|
2494
2508
|
return !0;
|
|
2495
|
-
}),
|
|
2509
|
+
}), Bt;
|
|
2496
2510
|
}
|
|
2497
|
-
var
|
|
2498
|
-
function
|
|
2499
|
-
if (
|
|
2500
|
-
|
|
2501
|
-
var e = typeof Symbol < "u" && Symbol, r =
|
|
2502
|
-
return
|
|
2511
|
+
var Ht, Pn;
|
|
2512
|
+
function Ss() {
|
|
2513
|
+
if (Pn) return Ht;
|
|
2514
|
+
Pn = 1;
|
|
2515
|
+
var e = typeof Symbol < "u" && Symbol, r = ws();
|
|
2516
|
+
return Ht = function() {
|
|
2503
2517
|
return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r();
|
|
2504
|
-
},
|
|
2505
|
-
}
|
|
2506
|
-
var Bt, Pn;
|
|
2507
|
-
function $o() {
|
|
2508
|
-
return Pn || (Pn = 1, Bt = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Bt;
|
|
2518
|
+
}, Ht;
|
|
2509
2519
|
}
|
|
2510
|
-
var
|
|
2520
|
+
var Mt, Cn;
|
|
2511
2521
|
function wo() {
|
|
2512
|
-
|
|
2513
|
-
Cn = 1;
|
|
2514
|
-
var e = /* @__PURE__ */ xo();
|
|
2515
|
-
return Ht = e.getPrototypeOf || null, Ht;
|
|
2522
|
+
return Cn || (Cn = 1, Mt = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Mt;
|
|
2516
2523
|
}
|
|
2517
|
-
var
|
|
2518
|
-
function
|
|
2519
|
-
if (Nn) return
|
|
2524
|
+
var zt, Nn;
|
|
2525
|
+
function So() {
|
|
2526
|
+
if (Nn) return zt;
|
|
2520
2527
|
Nn = 1;
|
|
2528
|
+
var e = /* @__PURE__ */ jo();
|
|
2529
|
+
return zt = e.getPrototypeOf || null, zt;
|
|
2530
|
+
}
|
|
2531
|
+
var Gt, qn;
|
|
2532
|
+
function Os() {
|
|
2533
|
+
if (qn) return Gt;
|
|
2534
|
+
qn = 1;
|
|
2521
2535
|
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, t = Math.max, o = "[object Function]", i = function(l, c) {
|
|
2522
2536
|
for (var f = [], g = 0; g < l.length; g += 1)
|
|
2523
2537
|
f[g] = l[g];
|
|
@@ -2533,7 +2547,7 @@ function gs() {
|
|
|
2533
2547
|
c += a[f], f + 1 < a.length && (c += l);
|
|
2534
2548
|
return c;
|
|
2535
2549
|
};
|
|
2536
|
-
return
|
|
2550
|
+
return Gt = function(l) {
|
|
2537
2551
|
var c = this;
|
|
2538
2552
|
if (typeof c != "function" || r.apply(c) !== o)
|
|
2539
2553
|
throw new TypeError(e + c);
|
|
@@ -2557,50 +2571,50 @@ function gs() {
|
|
|
2557
2571
|
p.prototype = c.prototype, g.prototype = new p(), p.prototype = null;
|
|
2558
2572
|
}
|
|
2559
2573
|
return g;
|
|
2560
|
-
},
|
|
2561
|
-
}
|
|
2562
|
-
var zt, qn;
|
|
2563
|
-
function We() {
|
|
2564
|
-
if (qn) return zt;
|
|
2565
|
-
qn = 1;
|
|
2566
|
-
var e = gs();
|
|
2567
|
-
return zt = Function.prototype.bind || e, zt;
|
|
2568
|
-
}
|
|
2569
|
-
var Gt, Rn;
|
|
2570
|
-
function Pr() {
|
|
2571
|
-
return Rn || (Rn = 1, Gt = Function.prototype.call), Gt;
|
|
2574
|
+
}, Gt;
|
|
2572
2575
|
}
|
|
2573
2576
|
var Wt, kn;
|
|
2577
|
+
function Je() {
|
|
2578
|
+
if (kn) return Wt;
|
|
2579
|
+
kn = 1;
|
|
2580
|
+
var e = Os();
|
|
2581
|
+
return Wt = Function.prototype.bind || e, Wt;
|
|
2582
|
+
}
|
|
2583
|
+
var Jt, Rn;
|
|
2574
2584
|
function Cr() {
|
|
2575
|
-
return
|
|
2585
|
+
return Rn || (Rn = 1, Jt = Function.prototype.call), Jt;
|
|
2576
2586
|
}
|
|
2577
|
-
var
|
|
2578
|
-
function
|
|
2579
|
-
return En || (En = 1,
|
|
2587
|
+
var Vt, En;
|
|
2588
|
+
function Nr() {
|
|
2589
|
+
return En || (En = 1, Vt = Function.prototype.apply), Vt;
|
|
2580
2590
|
}
|
|
2581
|
-
var
|
|
2582
|
-
function
|
|
2583
|
-
|
|
2584
|
-
An = 1;
|
|
2585
|
-
var e = We(), r = Cr(), t = Pr(), o = vs();
|
|
2586
|
-
return Vt = o || e.call(t, r), Vt;
|
|
2591
|
+
var Dt, An;
|
|
2592
|
+
function Ts() {
|
|
2593
|
+
return An || (An = 1, Dt = typeof Reflect < "u" && Reflect && Reflect.apply), Dt;
|
|
2587
2594
|
}
|
|
2588
|
-
var
|
|
2595
|
+
var Kt, In;
|
|
2589
2596
|
function Oo() {
|
|
2590
|
-
if (In) return
|
|
2597
|
+
if (In) return Kt;
|
|
2591
2598
|
In = 1;
|
|
2592
|
-
var e =
|
|
2593
|
-
return
|
|
2594
|
-
if (s.length < 1 || typeof s[0] != "function")
|
|
2595
|
-
throw new r("a function is required");
|
|
2596
|
-
return o(e, t, s);
|
|
2597
|
-
}, Dt;
|
|
2599
|
+
var e = Je(), r = Nr(), t = Cr(), o = Ts();
|
|
2600
|
+
return Kt = o || e.call(t, r), Kt;
|
|
2598
2601
|
}
|
|
2599
2602
|
var Qt, Ln;
|
|
2600
|
-
function
|
|
2603
|
+
function To() {
|
|
2601
2604
|
if (Ln) return Qt;
|
|
2602
2605
|
Ln = 1;
|
|
2603
|
-
var e =
|
|
2606
|
+
var e = Je(), r = /* @__PURE__ */ We(), t = Cr(), o = Oo();
|
|
2607
|
+
return Qt = function(s) {
|
|
2608
|
+
if (s.length < 1 || typeof s[0] != "function")
|
|
2609
|
+
throw new r("a function is required");
|
|
2610
|
+
return o(e, t, s);
|
|
2611
|
+
}, Qt;
|
|
2612
|
+
}
|
|
2613
|
+
var Yt, Un;
|
|
2614
|
+
function Ps() {
|
|
2615
|
+
if (Un) return Yt;
|
|
2616
|
+
Un = 1;
|
|
2617
|
+
var e = To(), r = /* @__PURE__ */ at(), t;
|
|
2604
2618
|
try {
|
|
2605
2619
|
t = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
2606
2620
|
[].__proto__ === Array.prototype;
|
|
@@ -2613,19 +2627,19 @@ function bs() {
|
|
|
2613
2627
|
/** @type {keyof typeof Object.prototype} */
|
|
2614
2628
|
"__proto__"
|
|
2615
2629
|
), i = Object, s = i.getPrototypeOf;
|
|
2616
|
-
return
|
|
2630
|
+
return Yt = o && typeof o.get == "function" ? e([o.get]) : typeof s == "function" ? (
|
|
2617
2631
|
/** @type {import('./get')} */
|
|
2618
2632
|
function(a) {
|
|
2619
2633
|
return s(a == null ? a : i(a));
|
|
2620
2634
|
}
|
|
2621
|
-
) : !1,
|
|
2635
|
+
) : !1, Yt;
|
|
2622
2636
|
}
|
|
2623
|
-
var
|
|
2624
|
-
function
|
|
2625
|
-
if (
|
|
2626
|
-
|
|
2627
|
-
var e =
|
|
2628
|
-
return
|
|
2637
|
+
var Xt, Fn;
|
|
2638
|
+
function Cs() {
|
|
2639
|
+
if (Fn) return Xt;
|
|
2640
|
+
Fn = 1;
|
|
2641
|
+
var e = wo(), r = So(), t = /* @__PURE__ */ Ps();
|
|
2642
|
+
return Xt = e ? function(i) {
|
|
2629
2643
|
return e(i);
|
|
2630
2644
|
} : r ? function(i) {
|
|
2631
2645
|
if (!i || typeof i != "object" && typeof i != "function")
|
|
@@ -2633,25 +2647,25 @@ function xs() {
|
|
|
2633
2647
|
return r(i);
|
|
2634
2648
|
} : t ? function(i) {
|
|
2635
2649
|
return t(i);
|
|
2636
|
-
} : null,
|
|
2650
|
+
} : null, Xt;
|
|
2637
2651
|
}
|
|
2638
|
-
var
|
|
2639
|
-
function
|
|
2640
|
-
if (
|
|
2641
|
-
Fn = 1;
|
|
2642
|
-
var e = Function.prototype.call, r = Object.prototype.hasOwnProperty, t = We();
|
|
2643
|
-
return Yt = t.call(e, r), Yt;
|
|
2644
|
-
}
|
|
2645
|
-
var Xt, _n;
|
|
2646
|
-
function Nr() {
|
|
2647
|
-
if (_n) return Xt;
|
|
2652
|
+
var Zt, _n;
|
|
2653
|
+
function Ns() {
|
|
2654
|
+
if (_n) return Zt;
|
|
2648
2655
|
_n = 1;
|
|
2649
|
-
var e
|
|
2656
|
+
var e = Function.prototype.call, r = Object.prototype.hasOwnProperty, t = Je();
|
|
2657
|
+
return Zt = t.call(e, r), Zt;
|
|
2658
|
+
}
|
|
2659
|
+
var er, Bn;
|
|
2660
|
+
function qr() {
|
|
2661
|
+
if (Bn) return er;
|
|
2662
|
+
Bn = 1;
|
|
2663
|
+
var e, r = /* @__PURE__ */ jo(), t = /* @__PURE__ */ cs(), o = /* @__PURE__ */ us(), i = /* @__PURE__ */ fs(), s = /* @__PURE__ */ ps(), n = /* @__PURE__ */ $o(), a = /* @__PURE__ */ We(), l = /* @__PURE__ */ ds(), c = /* @__PURE__ */ hs(), f = /* @__PURE__ */ ys(), g = /* @__PURE__ */ ms(), b = /* @__PURE__ */ gs(), m = /* @__PURE__ */ vs(), j = /* @__PURE__ */ bs(), v = /* @__PURE__ */ js(), p = Function, h = function(J) {
|
|
2650
2664
|
try {
|
|
2651
2665
|
return p('"use strict"; return (' + J + ").constructor;")();
|
|
2652
2666
|
} catch {
|
|
2653
2667
|
}
|
|
2654
|
-
}, y = /* @__PURE__ */
|
|
2668
|
+
}, y = /* @__PURE__ */ at(), O = /* @__PURE__ */ it(), T = function() {
|
|
2655
2669
|
throw new a();
|
|
2656
2670
|
}, d = y ? function() {
|
|
2657
2671
|
try {
|
|
@@ -2663,12 +2677,12 @@ function Nr() {
|
|
|
2663
2677
|
return T;
|
|
2664
2678
|
}
|
|
2665
2679
|
}
|
|
2666
|
-
}() : T,
|
|
2680
|
+
}() : T, S = Ss()(), x = Cs(), N = So(), A = wo(), E = Nr(), B = Cr(), P = {}, ae = typeof Uint8Array > "u" || !x ? e : x(Uint8Array), H = {
|
|
2667
2681
|
__proto__: null,
|
|
2668
2682
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
2669
2683
|
"%Array%": Array,
|
|
2670
2684
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? e : ArrayBuffer,
|
|
2671
|
-
"%ArrayIteratorPrototype%":
|
|
2685
|
+
"%ArrayIteratorPrototype%": S && x ? x([][Symbol.iterator]()) : e,
|
|
2672
2686
|
"%AsyncFromSyncIteratorPrototype%": e,
|
|
2673
2687
|
"%AsyncFunction%": P,
|
|
2674
2688
|
"%AsyncGenerator%": P,
|
|
@@ -2699,10 +2713,10 @@ function Nr() {
|
|
|
2699
2713
|
"%Int32Array%": typeof Int32Array > "u" ? e : Int32Array,
|
|
2700
2714
|
"%isFinite%": isFinite,
|
|
2701
2715
|
"%isNaN%": isNaN,
|
|
2702
|
-
"%IteratorPrototype%":
|
|
2716
|
+
"%IteratorPrototype%": S && x ? x(x([][Symbol.iterator]())) : e,
|
|
2703
2717
|
"%JSON%": typeof JSON == "object" ? JSON : e,
|
|
2704
2718
|
"%Map%": typeof Map > "u" ? e : Map,
|
|
2705
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !
|
|
2719
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !S || !x ? e : x((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
2706
2720
|
"%Math%": Math,
|
|
2707
2721
|
"%Number%": Number,
|
|
2708
2722
|
"%Object%": r,
|
|
@@ -2716,11 +2730,11 @@ function Nr() {
|
|
|
2716
2730
|
"%Reflect%": typeof Reflect > "u" ? e : Reflect,
|
|
2717
2731
|
"%RegExp%": RegExp,
|
|
2718
2732
|
"%Set%": typeof Set > "u" ? e : Set,
|
|
2719
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !
|
|
2733
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !S || !x ? e : x((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
2720
2734
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? e : SharedArrayBuffer,
|
|
2721
2735
|
"%String%": String,
|
|
2722
|
-
"%StringIteratorPrototype%":
|
|
2723
|
-
"%Symbol%":
|
|
2736
|
+
"%StringIteratorPrototype%": S && x ? x(""[Symbol.iterator]()) : e,
|
|
2737
|
+
"%Symbol%": S ? Symbol : e,
|
|
2724
2738
|
"%SyntaxError%": n,
|
|
2725
2739
|
"%ThrowTypeError%": d,
|
|
2726
2740
|
"%TypedArray%": ae,
|
|
@@ -2735,7 +2749,7 @@ function Nr() {
|
|
|
2735
2749
|
"%WeakSet%": typeof WeakSet > "u" ? e : WeakSet,
|
|
2736
2750
|
"%Function.prototype.call%": B,
|
|
2737
2751
|
"%Function.prototype.apply%": E,
|
|
2738
|
-
"%Object.defineProperty%":
|
|
2752
|
+
"%Object.defineProperty%": O,
|
|
2739
2753
|
"%Object.getPrototypeOf%": N,
|
|
2740
2754
|
"%Math.abs%": c,
|
|
2741
2755
|
"%Math.floor%": f,
|
|
@@ -2765,8 +2779,8 @@ function Nr() {
|
|
|
2765
2779
|
var _ = J("%AsyncGeneratorFunction%");
|
|
2766
2780
|
_ && (F = _.prototype);
|
|
2767
2781
|
} else if (I === "%AsyncIteratorPrototype%") {
|
|
2768
|
-
var
|
|
2769
|
-
|
|
2782
|
+
var K = J("%AsyncGenerator%");
|
|
2783
|
+
K && x && (F = x(K.prototype));
|
|
2770
2784
|
}
|
|
2771
2785
|
return H[I] = F, F;
|
|
2772
2786
|
}, Z = {
|
|
@@ -2822,44 +2836,44 @@ function Nr() {
|
|
|
2822
2836
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2823
2837
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2824
2838
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2825
|
-
},
|
|
2839
|
+
}, R = Je(), re = /* @__PURE__ */ Ns(), q = R.call(B, Array.prototype.concat), k = R.call(E, Array.prototype.splice), U = R.call(B, String.prototype.replace), C = R.call(B, String.prototype.slice), L = R.call(B, RegExp.prototype.exec), W = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, z = /\\(\\)?/g, Q = function(I) {
|
|
2826
2840
|
var F = C(I, 0, 1), _ = C(I, -1);
|
|
2827
2841
|
if (F === "%" && _ !== "%")
|
|
2828
2842
|
throw new n("invalid intrinsic syntax, expected closing `%`");
|
|
2829
2843
|
if (_ === "%" && F !== "%")
|
|
2830
2844
|
throw new n("invalid intrinsic syntax, expected opening `%`");
|
|
2831
|
-
var
|
|
2845
|
+
var K = [];
|
|
2832
2846
|
return U(I, W, function(G, Y, oe, he) {
|
|
2833
|
-
|
|
2834
|
-
}),
|
|
2847
|
+
K[K.length] = oe ? U(he, z, "$1") : Y || G;
|
|
2848
|
+
}), K;
|
|
2835
2849
|
}, ne = function(I, F) {
|
|
2836
|
-
var _ = I,
|
|
2837
|
-
if (re(Z, _) && (
|
|
2850
|
+
var _ = I, K;
|
|
2851
|
+
if (re(Z, _) && (K = Z[_], _ = "%" + K[0] + "%"), re(H, _)) {
|
|
2838
2852
|
var G = H[_];
|
|
2839
2853
|
if (G === P && (G = le(_)), typeof G > "u" && !F)
|
|
2840
2854
|
throw new a("intrinsic " + I + " exists, but is not available. Please file an issue!");
|
|
2841
2855
|
return {
|
|
2842
|
-
alias:
|
|
2856
|
+
alias: K,
|
|
2843
2857
|
name: _,
|
|
2844
2858
|
value: G
|
|
2845
2859
|
};
|
|
2846
2860
|
}
|
|
2847
2861
|
throw new n("intrinsic " + I + " does not exist!");
|
|
2848
2862
|
};
|
|
2849
|
-
return
|
|
2863
|
+
return er = function(I, F) {
|
|
2850
2864
|
if (typeof I != "string" || I.length === 0)
|
|
2851
2865
|
throw new a("intrinsic name must be a non-empty string");
|
|
2852
2866
|
if (arguments.length > 1 && typeof F != "boolean")
|
|
2853
2867
|
throw new a('"allowMissing" argument must be a boolean');
|
|
2854
2868
|
if (L(/^%?[^%]*%?$/, I) === null)
|
|
2855
2869
|
throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
2856
|
-
var _ =
|
|
2857
|
-
Se && (
|
|
2870
|
+
var _ = Q(I), K = _.length > 0 ? _[0] : "", G = ne("%" + K + "%", F), Y = G.name, oe = G.value, he = !1, Se = G.alias;
|
|
2871
|
+
Se && (K = Se[0], k(_, q([0, 1], Se)));
|
|
2858
2872
|
for (var qe = 1, Oe = !0; qe < _.length; qe += 1) {
|
|
2859
|
-
var me = _[qe],
|
|
2860
|
-
if ((
|
|
2873
|
+
var me = _[qe], ke = C(me, 0, 1), Re = C(me, -1);
|
|
2874
|
+
if ((ke === '"' || ke === "'" || ke === "`" || Re === '"' || Re === "'" || Re === "`") && ke !== Re)
|
|
2861
2875
|
throw new n("property names with quotes must have matching quotes");
|
|
2862
|
-
if ((me === "constructor" || !Oe) && (he = !0),
|
|
2876
|
+
if ((me === "constructor" || !Oe) && (he = !0), K += "." + me, Y = "%" + K + "%", re(H, Y))
|
|
2863
2877
|
oe = H[Y];
|
|
2864
2878
|
else if (oe != null) {
|
|
2865
2879
|
if (!(me in oe)) {
|
|
@@ -2876,14 +2890,14 @@ function Nr() {
|
|
|
2876
2890
|
}
|
|
2877
2891
|
}
|
|
2878
2892
|
return oe;
|
|
2879
|
-
},
|
|
2893
|
+
}, er;
|
|
2880
2894
|
}
|
|
2881
|
-
var
|
|
2882
|
-
function
|
|
2883
|
-
if (
|
|
2884
|
-
|
|
2885
|
-
var e = /* @__PURE__ */
|
|
2886
|
-
return
|
|
2895
|
+
var tr = { exports: {} }, rr, Hn;
|
|
2896
|
+
function qs() {
|
|
2897
|
+
if (Hn) return rr;
|
|
2898
|
+
Hn = 1;
|
|
2899
|
+
var e = /* @__PURE__ */ it(), r = /* @__PURE__ */ $o(), t = /* @__PURE__ */ We(), o = /* @__PURE__ */ at();
|
|
2900
|
+
return rr = function(s, n, a) {
|
|
2887
2901
|
if (!s || typeof s != "object" && typeof s != "function")
|
|
2888
2902
|
throw new t("`obj` must be an object or a function`");
|
|
2889
2903
|
if (typeof n != "string" && typeof n != "symbol")
|
|
@@ -2908,13 +2922,13 @@ function $s() {
|
|
|
2908
2922
|
s[n] = a;
|
|
2909
2923
|
else
|
|
2910
2924
|
throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
2911
|
-
},
|
|
2925
|
+
}, rr;
|
|
2912
2926
|
}
|
|
2913
|
-
var
|
|
2914
|
-
function
|
|
2915
|
-
if (
|
|
2916
|
-
|
|
2917
|
-
var e = /* @__PURE__ */
|
|
2927
|
+
var nr, Mn;
|
|
2928
|
+
function ks() {
|
|
2929
|
+
if (Mn) return nr;
|
|
2930
|
+
Mn = 1;
|
|
2931
|
+
var e = /* @__PURE__ */ it(), r = function() {
|
|
2918
2932
|
return !!e;
|
|
2919
2933
|
};
|
|
2920
2934
|
return r.hasArrayLengthDefineBug = function() {
|
|
@@ -2925,14 +2939,14 @@ function ws() {
|
|
|
2925
2939
|
} catch {
|
|
2926
2940
|
return !0;
|
|
2927
2941
|
}
|
|
2928
|
-
},
|
|
2942
|
+
}, nr = r, nr;
|
|
2929
2943
|
}
|
|
2930
|
-
var
|
|
2931
|
-
function
|
|
2932
|
-
if (
|
|
2933
|
-
|
|
2934
|
-
var e = /* @__PURE__ */
|
|
2935
|
-
return
|
|
2944
|
+
var or, zn;
|
|
2945
|
+
function Rs() {
|
|
2946
|
+
if (zn) return or;
|
|
2947
|
+
zn = 1;
|
|
2948
|
+
var e = /* @__PURE__ */ qr(), r = /* @__PURE__ */ qs(), t = /* @__PURE__ */ ks()(), o = /* @__PURE__ */ at(), i = /* @__PURE__ */ We(), s = e("%Math.floor%");
|
|
2949
|
+
return or = function(a, l) {
|
|
2936
2950
|
if (typeof a != "function")
|
|
2937
2951
|
throw new i("`fn` is not a function");
|
|
2938
2952
|
if (typeof l != "number" || l < 0 || l > 4294967295 || s(l) !== l)
|
|
@@ -2955,21 +2969,21 @@ function Ss() {
|
|
|
2955
2969
|
"length",
|
|
2956
2970
|
l
|
|
2957
2971
|
)), a;
|
|
2958
|
-
},
|
|
2972
|
+
}, or;
|
|
2959
2973
|
}
|
|
2960
|
-
var
|
|
2961
|
-
function
|
|
2962
|
-
if (
|
|
2963
|
-
|
|
2964
|
-
var e =
|
|
2965
|
-
return
|
|
2974
|
+
var ar, Gn;
|
|
2975
|
+
function Es() {
|
|
2976
|
+
if (Gn) return ar;
|
|
2977
|
+
Gn = 1;
|
|
2978
|
+
var e = Je(), r = Nr(), t = Oo();
|
|
2979
|
+
return ar = function() {
|
|
2966
2980
|
return t(e, r, arguments);
|
|
2967
|
-
},
|
|
2981
|
+
}, ar;
|
|
2968
2982
|
}
|
|
2969
|
-
var
|
|
2970
|
-
function
|
|
2971
|
-
return
|
|
2972
|
-
var r = /* @__PURE__ */
|
|
2983
|
+
var Wn;
|
|
2984
|
+
function As() {
|
|
2985
|
+
return Wn || (Wn = 1, function(e) {
|
|
2986
|
+
var r = /* @__PURE__ */ Rs(), t = /* @__PURE__ */ it(), o = To(), i = Es();
|
|
2973
2987
|
e.exports = function(n) {
|
|
2974
2988
|
var a = o(arguments), l = n.length - (arguments.length - 1);
|
|
2975
2989
|
return r(
|
|
@@ -2978,44 +2992,44 @@ function Ts() {
|
|
|
2978
2992
|
!0
|
|
2979
2993
|
);
|
|
2980
2994
|
}, t ? t(e.exports, "apply", { value: i }) : e.exports.apply = i;
|
|
2981
|
-
}(
|
|
2995
|
+
}(tr)), tr.exports;
|
|
2982
2996
|
}
|
|
2983
|
-
var
|
|
2984
|
-
function
|
|
2985
|
-
if (
|
|
2986
|
-
|
|
2987
|
-
var e = /* @__PURE__ */
|
|
2988
|
-
return
|
|
2997
|
+
var ir, Jn;
|
|
2998
|
+
function Is() {
|
|
2999
|
+
if (Jn) return ir;
|
|
3000
|
+
Jn = 1;
|
|
3001
|
+
var e = /* @__PURE__ */ qr(), r = As(), t = r(e("String.prototype.indexOf"));
|
|
3002
|
+
return ir = function(i, s) {
|
|
2989
3003
|
var n = e(i, !!s);
|
|
2990
3004
|
return typeof n == "function" && t(i, ".prototype.") > -1 ? r(n) : n;
|
|
2991
|
-
},
|
|
3005
|
+
}, ir;
|
|
2992
3006
|
}
|
|
2993
|
-
const
|
|
3007
|
+
const Ls = {}, Us = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2994
3008
|
__proto__: null,
|
|
2995
|
-
default:
|
|
2996
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2997
|
-
var
|
|
2998
|
-
function
|
|
2999
|
-
if (
|
|
3000
|
-
|
|
3001
|
-
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, i = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && i ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, n = i && s && typeof s.get == "function" ? s.get : null, a = i && Set.prototype.forEach, l = typeof WeakMap == "function" && WeakMap.prototype, c = l ? WeakMap.prototype.has : null, f = typeof WeakSet == "function" && WeakSet.prototype, g = f ? WeakSet.prototype.has : null, b = typeof WeakRef == "function" && WeakRef.prototype, m = b ? WeakRef.prototype.deref : null, j = Boolean.prototype.valueOf, v = Object.prototype.toString, p = Function.prototype.toString, h = String.prototype.match, y = String.prototype.slice,
|
|
3009
|
+
default: Ls
|
|
3010
|
+
}, Symbol.toStringTag, { value: "Module" })), Fs = /* @__PURE__ */ Ra(Us);
|
|
3011
|
+
var sr, Vn;
|
|
3012
|
+
function _s() {
|
|
3013
|
+
if (Vn) return sr;
|
|
3014
|
+
Vn = 1;
|
|
3015
|
+
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, i = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && i ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, n = i && s && typeof s.get == "function" ? s.get : null, a = i && Set.prototype.forEach, l = typeof WeakMap == "function" && WeakMap.prototype, c = l ? WeakMap.prototype.has : null, f = typeof WeakSet == "function" && WeakSet.prototype, g = f ? WeakSet.prototype.has : null, b = typeof WeakRef == "function" && WeakRef.prototype, m = b ? WeakRef.prototype.deref : null, j = Boolean.prototype.valueOf, v = Object.prototype.toString, p = Function.prototype.toString, h = String.prototype.match, y = String.prototype.slice, O = String.prototype.replace, T = String.prototype.toUpperCase, d = String.prototype.toLowerCase, S = RegExp.prototype.test, x = Array.prototype.concat, N = Array.prototype.join, A = 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, le = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function($) {
|
|
3002
3016
|
return $.__proto__;
|
|
3003
3017
|
} : null);
|
|
3004
|
-
function
|
|
3005
|
-
if ($ === 1 / 0 || $ === -1 / 0 || $ !== $ || $ && $ > -1e3 && $ < 1e3 ||
|
|
3018
|
+
function R($, w) {
|
|
3019
|
+
if ($ === 1 / 0 || $ === -1 / 0 || $ !== $ || $ && $ > -1e3 && $ < 1e3 || S.call(/e/, w))
|
|
3006
3020
|
return w;
|
|
3007
3021
|
var X = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
3008
3022
|
if (typeof $ == "number") {
|
|
3009
3023
|
var ee = $ < 0 ? -E(-$) : E($);
|
|
3010
3024
|
if (ee !== $) {
|
|
3011
3025
|
var ie = String(ee), M = y.call(w, ie.length + 1);
|
|
3012
|
-
return
|
|
3026
|
+
return O.call(ie, X, "$&_") + "." + O.call(O.call(M, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
3013
3027
|
}
|
|
3014
3028
|
}
|
|
3015
|
-
return
|
|
3029
|
+
return O.call(w, X, "$&_");
|
|
3016
3030
|
}
|
|
3017
|
-
var re =
|
|
3018
|
-
|
|
3031
|
+
var re = Fs, q = re.custom, k = F(q) ? q : null;
|
|
3032
|
+
sr = function $(w, X, ee, ie) {
|
|
3019
3033
|
var M = X || {};
|
|
3020
3034
|
if (G(M, "quoteStyle") && M.quoteStyle !== "single" && M.quoteStyle !== "double")
|
|
3021
3035
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
@@ -3041,76 +3055,76 @@ function Rs() {
|
|
|
3041
3055
|
if (w === 0)
|
|
3042
3056
|
return 1 / 0 / w > 0 ? "0" : "-0";
|
|
3043
3057
|
var de = String(w);
|
|
3044
|
-
return Pe ?
|
|
3058
|
+
return Pe ? R(w, de) : de;
|
|
3045
3059
|
}
|
|
3046
3060
|
if (typeof w == "bigint") {
|
|
3047
3061
|
var $e = String(w) + "n";
|
|
3048
|
-
return Pe ?
|
|
3062
|
+
return Pe ? R(w, $e) : $e;
|
|
3049
3063
|
}
|
|
3050
|
-
var
|
|
3051
|
-
if (typeof ee > "u" && (ee = 0), ee >=
|
|
3064
|
+
var ct = typeof M.depth > "u" ? 5 : M.depth;
|
|
3065
|
+
if (typeof ee > "u" && (ee = 0), ee >= ct && ct > 0 && typeof w == "object")
|
|
3052
3066
|
return L(w) ? "[Array]" : "[Object]";
|
|
3053
|
-
var Ee =
|
|
3067
|
+
var Ee = Lo(M, ee);
|
|
3054
3068
|
if (typeof ie > "u")
|
|
3055
3069
|
ie = [];
|
|
3056
3070
|
else if (he(ie, w) >= 0)
|
|
3057
3071
|
return "[Circular]";
|
|
3058
|
-
function ge(Ae,
|
|
3059
|
-
if (
|
|
3060
|
-
var
|
|
3072
|
+
function ge(Ae, Ke, Fo) {
|
|
3073
|
+
if (Ke && (ie = A.call(ie), ie.push(Ke)), Fo) {
|
|
3074
|
+
var Mr = {
|
|
3061
3075
|
depth: M.depth
|
|
3062
3076
|
};
|
|
3063
|
-
return G(M, "quoteStyle") && (
|
|
3077
|
+
return G(M, "quoteStyle") && (Mr.quoteStyle = M.quoteStyle), $(Ae, Mr, ee + 1, ie);
|
|
3064
3078
|
}
|
|
3065
3079
|
return $(Ae, M, ee + 1, ie);
|
|
3066
3080
|
}
|
|
3067
3081
|
if (typeof w == "function" && !z(w)) {
|
|
3068
|
-
var
|
|
3069
|
-
return "[Function" + (
|
|
3082
|
+
var Ir = oe(w), Lr = Ve(w, ge);
|
|
3083
|
+
return "[Function" + (Ir ? ": " + Ir : " (anonymous)") + "]" + (Lr.length > 0 ? " { " + N.call(Lr, ", ") + " }" : "");
|
|
3070
3084
|
}
|
|
3071
3085
|
if (F(w)) {
|
|
3072
|
-
var
|
|
3073
|
-
return typeof w == "object" && !H ? Le(
|
|
3086
|
+
var Ur = H ? O.call(String(w), /^(Symbol\(.*\))_[^)]*$/, "$1") : ae.call(w);
|
|
3087
|
+
return typeof w == "object" && !H ? Le(Ur) : Ur;
|
|
3074
3088
|
}
|
|
3075
|
-
if (
|
|
3076
|
-
for (var Ue = "<" + d.call(String(w.nodeName)),
|
|
3077
|
-
Ue += " " +
|
|
3089
|
+
if (Re(w)) {
|
|
3090
|
+
for (var Ue = "<" + d.call(String(w.nodeName)), ut = w.attributes || [], De = 0; De < ut.length; De++)
|
|
3091
|
+
Ue += " " + ut[De].name + "=" + U(C(ut[De].value), "double", M);
|
|
3078
3092
|
return Ue += ">", w.childNodes && w.childNodes.length && (Ue += "..."), Ue += "</" + d.call(String(w.nodeName)) + ">", Ue;
|
|
3079
3093
|
}
|
|
3080
3094
|
if (L(w)) {
|
|
3081
3095
|
if (w.length === 0)
|
|
3082
3096
|
return "[]";
|
|
3083
|
-
var
|
|
3084
|
-
return Ee && !
|
|
3097
|
+
var ft = Ve(w, ge);
|
|
3098
|
+
return Ee && !Io(ft) ? "[" + lt(ft, Ee) + "]" : "[ " + N.call(ft, ", ") + " ]";
|
|
3085
3099
|
}
|
|
3086
|
-
if (
|
|
3087
|
-
var
|
|
3088
|
-
return !("cause" in Error.prototype) && "cause" in w && !le.call(w, "cause") ? "{ [" + String(w) + "] " + N.call(x.call("[cause]: " + ge(w.cause),
|
|
3100
|
+
if (Q(w)) {
|
|
3101
|
+
var pt = Ve(w, ge);
|
|
3102
|
+
return !("cause" in Error.prototype) && "cause" in w && !le.call(w, "cause") ? "{ [" + String(w) + "] " + N.call(x.call("[cause]: " + ge(w.cause), pt), ", ") + " }" : pt.length === 0 ? "[" + String(w) + "]" : "{ [" + String(w) + "] " + N.call(pt, ", ") + " }";
|
|
3089
3103
|
}
|
|
3090
3104
|
if (typeof w == "object" && je) {
|
|
3091
|
-
if (
|
|
3092
|
-
return re(w, { depth:
|
|
3105
|
+
if (k && typeof w[k] == "function" && re)
|
|
3106
|
+
return re(w, { depth: ct - ee });
|
|
3093
3107
|
if (je !== "symbol" && typeof w.inspect == "function")
|
|
3094
3108
|
return w.inspect();
|
|
3095
3109
|
}
|
|
3096
3110
|
if (Se(w)) {
|
|
3097
|
-
var
|
|
3098
|
-
return o && o.call(w, function(Ae,
|
|
3099
|
-
|
|
3100
|
-
}),
|
|
3111
|
+
var Fr = [];
|
|
3112
|
+
return o && o.call(w, function(Ae, Ke) {
|
|
3113
|
+
Fr.push(ge(Ke, w, !0) + " => " + ge(Ae, w));
|
|
3114
|
+
}), Ar("Map", t.call(w), Fr, Ee);
|
|
3101
3115
|
}
|
|
3102
3116
|
if (me(w)) {
|
|
3103
|
-
var
|
|
3117
|
+
var _r = [];
|
|
3104
3118
|
return a && a.call(w, function(Ae) {
|
|
3105
|
-
|
|
3106
|
-
}),
|
|
3119
|
+
_r.push(ge(Ae, w));
|
|
3120
|
+
}), Ar("Set", n.call(w), _r, Ee);
|
|
3107
3121
|
}
|
|
3108
3122
|
if (qe(w))
|
|
3109
|
-
return
|
|
3110
|
-
if (
|
|
3111
|
-
return
|
|
3123
|
+
return st("WeakMap");
|
|
3124
|
+
if (ke(w))
|
|
3125
|
+
return st("WeakSet");
|
|
3112
3126
|
if (Oe(w))
|
|
3113
|
-
return
|
|
3127
|
+
return st("WeakRef");
|
|
3114
3128
|
if (J(w))
|
|
3115
3129
|
return Le(ge(Number(w)));
|
|
3116
3130
|
if (_(w))
|
|
@@ -3121,11 +3135,11 @@ function Rs() {
|
|
|
3121
3135
|
return Le(ge(String(w)));
|
|
3122
3136
|
if (typeof window < "u" && w === window)
|
|
3123
3137
|
return "{ [object Window] }";
|
|
3124
|
-
if (typeof globalThis < "u" && w === globalThis || typeof
|
|
3138
|
+
if (typeof globalThis < "u" && w === globalThis || typeof Ze < "u" && w === Ze)
|
|
3125
3139
|
return "{ [object globalThis] }";
|
|
3126
3140
|
if (!W(w) && !z(w)) {
|
|
3127
|
-
var
|
|
3128
|
-
return
|
|
3141
|
+
var dt = Ve(w, ge), Br = Z ? Z(w) === Object.prototype : w instanceof Object || w.constructor === Object, ht = w instanceof Object ? "" : "null prototype", Hr = !Br && D && Object(w) === w && D in w ? y.call(Y(w), 8, -1) : ht ? "Object" : "", Uo = Br || typeof w.constructor != "function" ? "" : w.constructor.name ? w.constructor.name + " " : "", yt = Uo + (Hr || ht ? "[" + N.call(x.call([], Hr || [], ht || []), ": ") + "] " : "");
|
|
3142
|
+
return dt.length === 0 ? yt + "{}" : Ee ? yt + "{" + lt(dt, Ee) + "}" : yt + "{ " + N.call(dt, ", ") + " }";
|
|
3129
3143
|
}
|
|
3130
3144
|
return String(w);
|
|
3131
3145
|
};
|
|
@@ -3134,7 +3148,7 @@ function Rs() {
|
|
|
3134
3148
|
return ee + $ + ee;
|
|
3135
3149
|
}
|
|
3136
3150
|
function C($) {
|
|
3137
|
-
return
|
|
3151
|
+
return O.call(String($), /"/g, """);
|
|
3138
3152
|
}
|
|
3139
3153
|
function L($) {
|
|
3140
3154
|
return Y($) === "[object Array]" && (!D || !(typeof $ == "object" && D in $));
|
|
@@ -3145,7 +3159,7 @@ function Rs() {
|
|
|
3145
3159
|
function z($) {
|
|
3146
3160
|
return Y($) === "[object RegExp]" && (!D || !(typeof $ == "object" && D in $));
|
|
3147
3161
|
}
|
|
3148
|
-
function
|
|
3162
|
+
function Q($) {
|
|
3149
3163
|
return Y($) === "[object Error]" && (!D || !(typeof $ == "object" && D in $));
|
|
3150
3164
|
}
|
|
3151
3165
|
function ne($) {
|
|
@@ -3179,11 +3193,11 @@ function Rs() {
|
|
|
3179
3193
|
}
|
|
3180
3194
|
return !1;
|
|
3181
3195
|
}
|
|
3182
|
-
var
|
|
3196
|
+
var K = Object.prototype.hasOwnProperty || function($) {
|
|
3183
3197
|
return $ in this;
|
|
3184
3198
|
};
|
|
3185
3199
|
function G($, w) {
|
|
3186
|
-
return
|
|
3200
|
+
return K.call($, w);
|
|
3187
3201
|
}
|
|
3188
3202
|
function Y($) {
|
|
3189
3203
|
return v.call($);
|
|
@@ -3256,7 +3270,7 @@ function Rs() {
|
|
|
3256
3270
|
}
|
|
3257
3271
|
return !1;
|
|
3258
3272
|
}
|
|
3259
|
-
function
|
|
3273
|
+
function ke($) {
|
|
3260
3274
|
if (!g || !$ || typeof $ != "object")
|
|
3261
3275
|
return !1;
|
|
3262
3276
|
try {
|
|
@@ -3271,7 +3285,7 @@ function Rs() {
|
|
|
3271
3285
|
}
|
|
3272
3286
|
return !1;
|
|
3273
3287
|
}
|
|
3274
|
-
function
|
|
3288
|
+
function Re($) {
|
|
3275
3289
|
return !$ || typeof $ != "object" ? !1 : typeof HTMLElement < "u" && $ instanceof HTMLElement ? !0 : typeof $.nodeName == "string" && typeof $.getAttribute == "function";
|
|
3276
3290
|
}
|
|
3277
3291
|
function Te($, w) {
|
|
@@ -3279,10 +3293,10 @@ function Rs() {
|
|
|
3279
3293
|
var X = $.length - w.maxStringLength, ee = "... " + X + " more character" + (X > 1 ? "s" : "");
|
|
3280
3294
|
return Te(y.call($, 0, w.maxStringLength), w) + ee;
|
|
3281
3295
|
}
|
|
3282
|
-
var ie =
|
|
3296
|
+
var ie = O.call(O.call($, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Ao);
|
|
3283
3297
|
return U(ie, "single", w);
|
|
3284
3298
|
}
|
|
3285
|
-
function
|
|
3299
|
+
function Ao($) {
|
|
3286
3300
|
var w = $.charCodeAt(0), X = {
|
|
3287
3301
|
8: "b",
|
|
3288
3302
|
9: "t",
|
|
@@ -3295,21 +3309,21 @@ function Rs() {
|
|
|
3295
3309
|
function Le($) {
|
|
3296
3310
|
return "Object(" + $ + ")";
|
|
3297
3311
|
}
|
|
3298
|
-
function
|
|
3312
|
+
function st($) {
|
|
3299
3313
|
return $ + " { ? }";
|
|
3300
3314
|
}
|
|
3301
|
-
function
|
|
3302
|
-
var ie = ee ?
|
|
3315
|
+
function Ar($, w, X, ee) {
|
|
3316
|
+
var ie = ee ? lt(X, ee) : N.call(X, ", ");
|
|
3303
3317
|
return $ + " (" + w + ") {" + ie + "}";
|
|
3304
3318
|
}
|
|
3305
|
-
function
|
|
3319
|
+
function Io($) {
|
|
3306
3320
|
for (var w = 0; w < $.length; w++)
|
|
3307
3321
|
if (he($[w], `
|
|
3308
3322
|
`) >= 0)
|
|
3309
3323
|
return !1;
|
|
3310
3324
|
return !0;
|
|
3311
3325
|
}
|
|
3312
|
-
function
|
|
3326
|
+
function Lo($, w) {
|
|
3313
3327
|
var X;
|
|
3314
3328
|
if ($.indent === " ")
|
|
3315
3329
|
X = " ";
|
|
@@ -3322,7 +3336,7 @@ function Rs() {
|
|
|
3322
3336
|
prev: N.call(Array(w + 1), X)
|
|
3323
3337
|
};
|
|
3324
3338
|
}
|
|
3325
|
-
function
|
|
3339
|
+
function lt($, w) {
|
|
3326
3340
|
if ($.length === 0)
|
|
3327
3341
|
return "";
|
|
3328
3342
|
var X = `
|
|
@@ -3330,7 +3344,7 @@ function Rs() {
|
|
|
3330
3344
|
return X + N.call($, "," + X) + `
|
|
3331
3345
|
` + w.prev;
|
|
3332
3346
|
}
|
|
3333
|
-
function
|
|
3347
|
+
function Ve($, w) {
|
|
3334
3348
|
var X = L($), ee = [];
|
|
3335
3349
|
if (X) {
|
|
3336
3350
|
ee.length = $.length;
|
|
@@ -3344,29 +3358,29 @@ function Rs() {
|
|
|
3344
3358
|
je["$" + M[Pe]] = M[Pe];
|
|
3345
3359
|
}
|
|
3346
3360
|
for (var de in $)
|
|
3347
|
-
G($, de) && (X && String(Number(de)) === de && de < $.length || H && je["$" + de] instanceof Symbol || (
|
|
3361
|
+
G($, de) && (X && String(Number(de)) === de && de < $.length || H && je["$" + de] instanceof Symbol || (S.call(/[^\w$]/, de) ? ee.push(w(de, $) + ": " + w($[de], $)) : ee.push(de + ": " + w($[de], $))));
|
|
3348
3362
|
if (typeof P == "function")
|
|
3349
3363
|
for (var $e = 0; $e < M.length; $e++)
|
|
3350
3364
|
le.call($, M[$e]) && ee.push("[" + w(M[$e]) + "]: " + w($[M[$e]], $));
|
|
3351
3365
|
return ee;
|
|
3352
3366
|
}
|
|
3353
|
-
return
|
|
3367
|
+
return sr;
|
|
3354
3368
|
}
|
|
3355
|
-
var
|
|
3356
|
-
function
|
|
3357
|
-
if (
|
|
3358
|
-
|
|
3359
|
-
var e = /* @__PURE__ */
|
|
3360
|
-
for (var y = p,
|
|
3361
|
-
if (
|
|
3362
|
-
return y.next =
|
|
3363
|
-
p.next, p.next =
|
|
3369
|
+
var lr, Dn;
|
|
3370
|
+
function Bs() {
|
|
3371
|
+
if (Dn) return lr;
|
|
3372
|
+
Dn = 1;
|
|
3373
|
+
var e = /* @__PURE__ */ qr(), r = Is(), t = /* @__PURE__ */ _s(), o = /* @__PURE__ */ We(), i = e("%WeakMap%", !0), s = e("%Map%", !0), n = r("WeakMap.prototype.get", !0), a = r("WeakMap.prototype.set", !0), l = r("WeakMap.prototype.has", !0), c = r("Map.prototype.get", !0), f = r("Map.prototype.set", !0), g = r("Map.prototype.has", !0), b = function(p, h) {
|
|
3374
|
+
for (var y = p, O; (O = y.next) !== null; y = O)
|
|
3375
|
+
if (O.key === h)
|
|
3376
|
+
return y.next = O.next, O.next = /** @type {NonNullable<typeof list.next>} */
|
|
3377
|
+
p.next, p.next = O, O;
|
|
3364
3378
|
}, m = function(p, h) {
|
|
3365
3379
|
var y = b(p, h);
|
|
3366
3380
|
return y && y.value;
|
|
3367
3381
|
}, j = function(p, h, y) {
|
|
3368
|
-
var
|
|
3369
|
-
|
|
3382
|
+
var O = b(p, h);
|
|
3383
|
+
O ? O.value = y : p.next = /** @type {import('.').ListNode<typeof value>} */
|
|
3370
3384
|
{
|
|
3371
3385
|
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
3372
3386
|
key: h,
|
|
@@ -3376,8 +3390,8 @@ function ks() {
|
|
|
3376
3390
|
}, v = function(p, h) {
|
|
3377
3391
|
return !!b(p, h);
|
|
3378
3392
|
};
|
|
3379
|
-
return
|
|
3380
|
-
var h, y,
|
|
3393
|
+
return lr = function() {
|
|
3394
|
+
var h, y, O, T = {
|
|
3381
3395
|
assert: function(d) {
|
|
3382
3396
|
if (!T.has(d))
|
|
3383
3397
|
throw new o("Side channel does not contain " + t(d));
|
|
@@ -3389,8 +3403,8 @@ function ks() {
|
|
|
3389
3403
|
} else if (s) {
|
|
3390
3404
|
if (y)
|
|
3391
3405
|
return c(y, d);
|
|
3392
|
-
} else if (
|
|
3393
|
-
return m(
|
|
3406
|
+
} else if (O)
|
|
3407
|
+
return m(O, d);
|
|
3394
3408
|
},
|
|
3395
3409
|
has: function(d) {
|
|
3396
3410
|
if (i && d && (typeof d == "object" || typeof d == "function")) {
|
|
@@ -3399,26 +3413,26 @@ function ks() {
|
|
|
3399
3413
|
} else if (s) {
|
|
3400
3414
|
if (y)
|
|
3401
3415
|
return g(y, d);
|
|
3402
|
-
} else if (
|
|
3403
|
-
return v(
|
|
3416
|
+
} else if (O)
|
|
3417
|
+
return v(O, d);
|
|
3404
3418
|
return !1;
|
|
3405
3419
|
},
|
|
3406
|
-
set: function(d,
|
|
3407
|
-
i && d && (typeof d == "object" || typeof d == "function") ? (h || (h = new i()), a(h, d,
|
|
3420
|
+
set: function(d, S) {
|
|
3421
|
+
i && d && (typeof d == "object" || typeof d == "function") ? (h || (h = new i()), a(h, d, S)) : s ? (y || (y = new s()), f(y, d, S)) : (O || (O = { key: {}, next: null }), j(O, d, S));
|
|
3408
3422
|
}
|
|
3409
3423
|
};
|
|
3410
3424
|
return T;
|
|
3411
|
-
},
|
|
3425
|
+
}, lr;
|
|
3412
3426
|
}
|
|
3413
|
-
var
|
|
3414
|
-
function
|
|
3415
|
-
if (
|
|
3416
|
-
|
|
3427
|
+
var cr, Kn;
|
|
3428
|
+
function kr() {
|
|
3429
|
+
if (Kn) return cr;
|
|
3430
|
+
Kn = 1;
|
|
3417
3431
|
var e = String.prototype.replace, r = /%20/g, t = {
|
|
3418
3432
|
RFC1738: "RFC1738",
|
|
3419
3433
|
RFC3986: "RFC3986"
|
|
3420
3434
|
};
|
|
3421
|
-
return
|
|
3435
|
+
return cr = {
|
|
3422
3436
|
default: t.RFC3986,
|
|
3423
3437
|
formatters: {
|
|
3424
3438
|
RFC1738: function(o) {
|
|
@@ -3430,37 +3444,37 @@ function qr() {
|
|
|
3430
3444
|
},
|
|
3431
3445
|
RFC1738: t.RFC1738,
|
|
3432
3446
|
RFC3986: t.RFC3986
|
|
3433
|
-
},
|
|
3447
|
+
}, cr;
|
|
3434
3448
|
}
|
|
3435
|
-
var
|
|
3436
|
-
function
|
|
3437
|
-
if (Qn) return
|
|
3449
|
+
var ur, Qn;
|
|
3450
|
+
function Po() {
|
|
3451
|
+
if (Qn) return ur;
|
|
3438
3452
|
Qn = 1;
|
|
3439
|
-
var e = /* @__PURE__ */
|
|
3453
|
+
var e = /* @__PURE__ */ kr(), r = Object.prototype.hasOwnProperty, t = Array.isArray, o = function() {
|
|
3440
3454
|
for (var p = [], h = 0; h < 256; ++h)
|
|
3441
3455
|
p.push("%" + ((h < 16 ? "0" : "") + h.toString(16)).toUpperCase());
|
|
3442
3456
|
return p;
|
|
3443
3457
|
}(), i = function(h) {
|
|
3444
3458
|
for (; h.length > 1; ) {
|
|
3445
|
-
var y = h.pop(),
|
|
3446
|
-
if (t(
|
|
3447
|
-
for (var T = [], d = 0; d <
|
|
3448
|
-
typeof
|
|
3459
|
+
var y = h.pop(), O = y.obj[y.prop];
|
|
3460
|
+
if (t(O)) {
|
|
3461
|
+
for (var T = [], d = 0; d < O.length; ++d)
|
|
3462
|
+
typeof O[d] < "u" && T.push(O[d]);
|
|
3449
3463
|
y.obj[y.prop] = T;
|
|
3450
3464
|
}
|
|
3451
3465
|
}
|
|
3452
3466
|
}, s = function(h, y) {
|
|
3453
|
-
for (var
|
|
3454
|
-
typeof h[T] < "u" && (
|
|
3455
|
-
return
|
|
3456
|
-
}, n = function p(h, y,
|
|
3467
|
+
for (var O = y && y.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, T = 0; T < h.length; ++T)
|
|
3468
|
+
typeof h[T] < "u" && (O[T] = h[T]);
|
|
3469
|
+
return O;
|
|
3470
|
+
}, n = function p(h, y, O) {
|
|
3457
3471
|
if (!y)
|
|
3458
3472
|
return h;
|
|
3459
3473
|
if (typeof y != "object") {
|
|
3460
3474
|
if (t(h))
|
|
3461
3475
|
h.push(y);
|
|
3462
3476
|
else if (h && typeof h == "object")
|
|
3463
|
-
(
|
|
3477
|
+
(O && (O.plainObjects || O.allowPrototypes) || !r.call(Object.prototype, y)) && (h[y] = !0);
|
|
3464
3478
|
else
|
|
3465
3479
|
return [h, y];
|
|
3466
3480
|
return h;
|
|
@@ -3468,39 +3482,39 @@ function To() {
|
|
|
3468
3482
|
if (!h || typeof h != "object")
|
|
3469
3483
|
return [h].concat(y);
|
|
3470
3484
|
var T = h;
|
|
3471
|
-
return t(h) && !t(y) && (T = s(h,
|
|
3472
|
-
if (r.call(h,
|
|
3473
|
-
var x = h[
|
|
3474
|
-
x && typeof x == "object" && d && typeof d == "object" ? h[
|
|
3485
|
+
return t(h) && !t(y) && (T = s(h, O)), t(h) && t(y) ? (y.forEach(function(d, S) {
|
|
3486
|
+
if (r.call(h, S)) {
|
|
3487
|
+
var x = h[S];
|
|
3488
|
+
x && typeof x == "object" && d && typeof d == "object" ? h[S] = p(x, d, O) : h.push(d);
|
|
3475
3489
|
} else
|
|
3476
|
-
h[
|
|
3477
|
-
}), h) : Object.keys(y).reduce(function(d,
|
|
3478
|
-
var x = y[
|
|
3479
|
-
return r.call(d,
|
|
3490
|
+
h[S] = d;
|
|
3491
|
+
}), h) : Object.keys(y).reduce(function(d, S) {
|
|
3492
|
+
var x = y[S];
|
|
3493
|
+
return r.call(d, S) ? d[S] = p(d[S], x, O) : d[S] = x, d;
|
|
3480
3494
|
}, T);
|
|
3481
3495
|
}, a = function(h, y) {
|
|
3482
|
-
return Object.keys(y).reduce(function(
|
|
3483
|
-
return
|
|
3496
|
+
return Object.keys(y).reduce(function(O, T) {
|
|
3497
|
+
return O[T] = y[T], O;
|
|
3484
3498
|
}, h);
|
|
3485
3499
|
}, l = function(p, h, y) {
|
|
3486
|
-
var
|
|
3500
|
+
var O = p.replace(/\+/g, " ");
|
|
3487
3501
|
if (y === "iso-8859-1")
|
|
3488
|
-
return
|
|
3502
|
+
return O.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
3489
3503
|
try {
|
|
3490
|
-
return decodeURIComponent(
|
|
3504
|
+
return decodeURIComponent(O);
|
|
3491
3505
|
} catch {
|
|
3492
|
-
return
|
|
3506
|
+
return O;
|
|
3493
3507
|
}
|
|
3494
|
-
}, c = 1024, f = function(h, y,
|
|
3508
|
+
}, c = 1024, f = function(h, y, O, T, d) {
|
|
3495
3509
|
if (h.length === 0)
|
|
3496
3510
|
return h;
|
|
3497
|
-
var
|
|
3498
|
-
if (typeof h == "symbol" ?
|
|
3499
|
-
return escape(
|
|
3511
|
+
var S = h;
|
|
3512
|
+
if (typeof h == "symbol" ? S = Symbol.prototype.toString.call(h) : typeof h != "string" && (S = String(h)), O === "iso-8859-1")
|
|
3513
|
+
return escape(S).replace(/%u[0-9a-f]{4}/gi, function(ae) {
|
|
3500
3514
|
return "%26%23" + parseInt(ae.slice(2), 16) + "%3B";
|
|
3501
3515
|
});
|
|
3502
|
-
for (var x = "", N = 0; N <
|
|
3503
|
-
for (var A =
|
|
3516
|
+
for (var x = "", N = 0; N < S.length; N += c) {
|
|
3517
|
+
for (var A = S.length >= c ? S.slice(N, N + c) : S, E = [], B = 0; B < A.length; ++B) {
|
|
3504
3518
|
var P = A.charCodeAt(B);
|
|
3505
3519
|
if (P === 45 || P === 46 || P === 95 || P === 126 || P >= 48 && P <= 57 || P >= 65 && P <= 90 || P >= 97 && P <= 122 || d === e.RFC1738 && (P === 40 || P === 41)) {
|
|
3506
3520
|
E[E.length] = A.charAt(B);
|
|
@@ -3524,10 +3538,10 @@ function To() {
|
|
|
3524
3538
|
}
|
|
3525
3539
|
return x;
|
|
3526
3540
|
}, g = function(h) {
|
|
3527
|
-
for (var y = [{ obj: { o: h }, prop: "o" }],
|
|
3528
|
-
for (var d = y[T],
|
|
3529
|
-
var A = x[N], E =
|
|
3530
|
-
typeof E == "object" && E !== null &&
|
|
3541
|
+
for (var y = [{ obj: { o: h }, prop: "o" }], O = [], T = 0; T < y.length; ++T)
|
|
3542
|
+
for (var d = y[T], S = d.obj[d.prop], x = Object.keys(S), N = 0; N < x.length; ++N) {
|
|
3543
|
+
var A = x[N], E = S[A];
|
|
3544
|
+
typeof E == "object" && E !== null && O.indexOf(E) === -1 && (y.push({ obj: S, prop: A }), O.push(E));
|
|
3531
3545
|
}
|
|
3532
3546
|
return i(y), h;
|
|
3533
3547
|
}, b = function(h) {
|
|
@@ -3538,13 +3552,13 @@ function To() {
|
|
|
3538
3552
|
return [].concat(h, y);
|
|
3539
3553
|
}, v = function(h, y) {
|
|
3540
3554
|
if (t(h)) {
|
|
3541
|
-
for (var
|
|
3542
|
-
|
|
3543
|
-
return
|
|
3555
|
+
for (var O = [], T = 0; T < h.length; T += 1)
|
|
3556
|
+
O.push(y(h[T]));
|
|
3557
|
+
return O;
|
|
3544
3558
|
}
|
|
3545
3559
|
return y(h);
|
|
3546
3560
|
};
|
|
3547
|
-
return
|
|
3561
|
+
return ur = {
|
|
3548
3562
|
arrayToObject: s,
|
|
3549
3563
|
assign: a,
|
|
3550
3564
|
combine: j,
|
|
@@ -3555,13 +3569,13 @@ function To() {
|
|
|
3555
3569
|
isRegExp: b,
|
|
3556
3570
|
maybeMap: v,
|
|
3557
3571
|
merge: n
|
|
3558
|
-
},
|
|
3572
|
+
}, ur;
|
|
3559
3573
|
}
|
|
3560
|
-
var
|
|
3561
|
-
function
|
|
3562
|
-
if (
|
|
3563
|
-
|
|
3564
|
-
var e =
|
|
3574
|
+
var fr, Yn;
|
|
3575
|
+
function Hs() {
|
|
3576
|
+
if (Yn) return fr;
|
|
3577
|
+
Yn = 1;
|
|
3578
|
+
var e = Bs(), r = /* @__PURE__ */ Po(), t = /* @__PURE__ */ kr(), o = Object.prototype.hasOwnProperty, i = {
|
|
3565
3579
|
brackets: function(p) {
|
|
3566
3580
|
return p + "[]";
|
|
3567
3581
|
},
|
|
@@ -3597,61 +3611,61 @@ function Es() {
|
|
|
3597
3611
|
strictNullHandling: !1
|
|
3598
3612
|
}, g = function(p) {
|
|
3599
3613
|
return typeof p == "string" || typeof p == "number" || typeof p == "boolean" || typeof p == "symbol" || typeof p == "bigint";
|
|
3600
|
-
}, b = {}, m = function v(p, h, y,
|
|
3601
|
-
for (var
|
|
3614
|
+
}, b = {}, m = function v(p, h, y, O, T, d, S, x, N, A, E, B, P, ae, H, D, le, Z) {
|
|
3615
|
+
for (var R = p, re = Z, q = 0, k = !1; (re = re.get(b)) !== void 0 && !k; ) {
|
|
3602
3616
|
var U = re.get(p);
|
|
3603
3617
|
if (q += 1, typeof U < "u") {
|
|
3604
3618
|
if (U === q)
|
|
3605
3619
|
throw new RangeError("Cyclic object value");
|
|
3606
|
-
|
|
3620
|
+
k = !0;
|
|
3607
3621
|
}
|
|
3608
3622
|
typeof re.get(b) > "u" && (q = 0);
|
|
3609
3623
|
}
|
|
3610
|
-
if (typeof A == "function" ?
|
|
3624
|
+
if (typeof A == "function" ? R = A(h, R) : R instanceof Date ? R = P(R) : y === "comma" && s(R) && (R = r.maybeMap(R, function(Y) {
|
|
3611
3625
|
return Y instanceof Date ? P(Y) : Y;
|
|
3612
|
-
})),
|
|
3626
|
+
})), R === null) {
|
|
3613
3627
|
if (d)
|
|
3614
3628
|
return N && !D ? N(h, f.encoder, le, "key", ae) : h;
|
|
3615
|
-
|
|
3629
|
+
R = "";
|
|
3616
3630
|
}
|
|
3617
|
-
if (g(
|
|
3631
|
+
if (g(R) || r.isBuffer(R)) {
|
|
3618
3632
|
if (N) {
|
|
3619
3633
|
var C = D ? h : N(h, f.encoder, le, "key", ae);
|
|
3620
|
-
return [H(C) + "=" + H(N(
|
|
3634
|
+
return [H(C) + "=" + H(N(R, f.encoder, le, "value", ae))];
|
|
3621
3635
|
}
|
|
3622
|
-
return [H(h) + "=" + H(String(
|
|
3636
|
+
return [H(h) + "=" + H(String(R))];
|
|
3623
3637
|
}
|
|
3624
3638
|
var L = [];
|
|
3625
|
-
if (typeof
|
|
3639
|
+
if (typeof R > "u")
|
|
3626
3640
|
return L;
|
|
3627
3641
|
var W;
|
|
3628
|
-
if (y === "comma" && s(
|
|
3629
|
-
D && N && (
|
|
3642
|
+
if (y === "comma" && s(R))
|
|
3643
|
+
D && N && (R = r.maybeMap(R, N)), W = [{ value: R.length > 0 ? R.join(",") || null : void 0 }];
|
|
3630
3644
|
else if (s(A))
|
|
3631
3645
|
W = A;
|
|
3632
3646
|
else {
|
|
3633
|
-
var z = Object.keys(
|
|
3647
|
+
var z = Object.keys(R);
|
|
3634
3648
|
W = E ? z.sort(E) : z;
|
|
3635
3649
|
}
|
|
3636
|
-
var
|
|
3637
|
-
if (T && s(
|
|
3650
|
+
var Q = x ? h.replace(/\./g, "%2E") : h, ne = O && s(R) && R.length === 1 ? Q + "[]" : Q;
|
|
3651
|
+
if (T && s(R) && R.length === 0)
|
|
3638
3652
|
return ne + "[]";
|
|
3639
3653
|
for (var J = 0; J < W.length; ++J) {
|
|
3640
|
-
var I = W[J], F = typeof I == "object" && typeof I.value < "u" ? I.value :
|
|
3641
|
-
if (!(
|
|
3642
|
-
var _ = B && x ? I.replace(/\./g, "%2E") : I,
|
|
3654
|
+
var I = W[J], F = typeof I == "object" && typeof I.value < "u" ? I.value : R[I];
|
|
3655
|
+
if (!(S && F === null)) {
|
|
3656
|
+
var _ = B && x ? I.replace(/\./g, "%2E") : I, K = s(R) ? typeof y == "function" ? y(ne, _) : ne : ne + (B ? "." + _ : "[" + _ + "]");
|
|
3643
3657
|
Z.set(p, q);
|
|
3644
3658
|
var G = e();
|
|
3645
3659
|
G.set(b, Z), a(L, v(
|
|
3646
3660
|
F,
|
|
3647
|
-
|
|
3661
|
+
K,
|
|
3648
3662
|
y,
|
|
3649
|
-
|
|
3663
|
+
O,
|
|
3650
3664
|
T,
|
|
3651
3665
|
d,
|
|
3652
|
-
|
|
3666
|
+
S,
|
|
3653
3667
|
x,
|
|
3654
|
-
y === "comma" && D && s(
|
|
3668
|
+
y === "comma" && D && s(R) ? null : N,
|
|
3655
3669
|
A,
|
|
3656
3670
|
E,
|
|
3657
3671
|
B,
|
|
@@ -3683,15 +3697,15 @@ function Es() {
|
|
|
3683
3697
|
throw new TypeError("Unknown format option provided.");
|
|
3684
3698
|
y = p.format;
|
|
3685
3699
|
}
|
|
3686
|
-
var
|
|
3700
|
+
var O = t.formatters[y], T = f.filter;
|
|
3687
3701
|
(typeof p.filter == "function" || s(p.filter)) && (T = p.filter);
|
|
3688
3702
|
var d;
|
|
3689
3703
|
if (p.arrayFormat in i ? d = p.arrayFormat : "indices" in p ? d = p.indices ? "indices" : "repeat" : d = f.arrayFormat, "commaRoundTrip" in p && typeof p.commaRoundTrip != "boolean")
|
|
3690
3704
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
3691
|
-
var
|
|
3705
|
+
var S = typeof p.allowDots > "u" ? p.encodeDotInKeys === !0 ? !0 : f.allowDots : !!p.allowDots;
|
|
3692
3706
|
return {
|
|
3693
3707
|
addQueryPrefix: typeof p.addQueryPrefix == "boolean" ? p.addQueryPrefix : f.addQueryPrefix,
|
|
3694
|
-
allowDots:
|
|
3708
|
+
allowDots: S,
|
|
3695
3709
|
allowEmptyArrays: typeof p.allowEmptyArrays == "boolean" ? !!p.allowEmptyArrays : f.allowEmptyArrays,
|
|
3696
3710
|
arrayFormat: d,
|
|
3697
3711
|
charset: h,
|
|
@@ -3704,27 +3718,27 @@ function Es() {
|
|
|
3704
3718
|
encodeValuesOnly: typeof p.encodeValuesOnly == "boolean" ? p.encodeValuesOnly : f.encodeValuesOnly,
|
|
3705
3719
|
filter: T,
|
|
3706
3720
|
format: y,
|
|
3707
|
-
formatter:
|
|
3721
|
+
formatter: O,
|
|
3708
3722
|
serializeDate: typeof p.serializeDate == "function" ? p.serializeDate : f.serializeDate,
|
|
3709
3723
|
skipNulls: typeof p.skipNulls == "boolean" ? p.skipNulls : f.skipNulls,
|
|
3710
3724
|
sort: typeof p.sort == "function" ? p.sort : null,
|
|
3711
3725
|
strictNullHandling: typeof p.strictNullHandling == "boolean" ? p.strictNullHandling : f.strictNullHandling
|
|
3712
3726
|
};
|
|
3713
3727
|
};
|
|
3714
|
-
return
|
|
3715
|
-
var h = v, y = j(p),
|
|
3716
|
-
typeof y.filter == "function" ? (T = y.filter, h = T("", h)) : s(y.filter) && (T = y.filter,
|
|
3728
|
+
return fr = function(v, p) {
|
|
3729
|
+
var h = v, y = j(p), O, T;
|
|
3730
|
+
typeof y.filter == "function" ? (T = y.filter, h = T("", h)) : s(y.filter) && (T = y.filter, O = T);
|
|
3717
3731
|
var d = [];
|
|
3718
3732
|
if (typeof h != "object" || h === null)
|
|
3719
3733
|
return "";
|
|
3720
|
-
var
|
|
3721
|
-
|
|
3722
|
-
for (var N = e(), A = 0; A <
|
|
3723
|
-
var E =
|
|
3734
|
+
var S = i[y.arrayFormat], x = S === "comma" && y.commaRoundTrip;
|
|
3735
|
+
O || (O = Object.keys(h)), y.sort && O.sort(y.sort);
|
|
3736
|
+
for (var N = e(), A = 0; A < O.length; ++A) {
|
|
3737
|
+
var E = O[A];
|
|
3724
3738
|
y.skipNulls && h[E] === null || a(d, m(
|
|
3725
3739
|
h[E],
|
|
3726
3740
|
E,
|
|
3727
|
-
|
|
3741
|
+
S,
|
|
3728
3742
|
x,
|
|
3729
3743
|
y.allowEmptyArrays,
|
|
3730
3744
|
y.strictNullHandling,
|
|
@@ -3744,13 +3758,13 @@ function Es() {
|
|
|
3744
3758
|
}
|
|
3745
3759
|
var B = d.join(y.delimiter), P = y.addQueryPrefix === !0 ? "?" : "";
|
|
3746
3760
|
return y.charsetSentinel && (y.charset === "iso-8859-1" ? P += "utf8=%26%2310003%3B&" : P += "utf8=%E2%9C%93&"), B.length > 0 ? P + B : "";
|
|
3747
|
-
},
|
|
3761
|
+
}, fr;
|
|
3748
3762
|
}
|
|
3749
|
-
var
|
|
3750
|
-
function
|
|
3751
|
-
if (
|
|
3752
|
-
|
|
3753
|
-
var e = /* @__PURE__ */
|
|
3763
|
+
var pr, Xn;
|
|
3764
|
+
function Ms() {
|
|
3765
|
+
if (Xn) return pr;
|
|
3766
|
+
Xn = 1;
|
|
3767
|
+
var e = /* @__PURE__ */ Po(), r = Object.prototype.hasOwnProperty, t = Array.isArray, o = {
|
|
3754
3768
|
allowDots: !1,
|
|
3755
3769
|
allowEmptyArrays: !1,
|
|
3756
3770
|
allowPrototypes: !1,
|
|
@@ -3780,55 +3794,55 @@ function As() {
|
|
|
3780
3794
|
}, n = "utf8=%26%2310003%3B", a = "utf8=%E2%9C%93", l = function(m, j) {
|
|
3781
3795
|
var v = { __proto__: null }, p = j.ignoreQueryPrefix ? m.replace(/^\?/, "") : m;
|
|
3782
3796
|
p = p.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
3783
|
-
var h = j.parameterLimit === 1 / 0 ? void 0 : j.parameterLimit, y = p.split(j.delimiter, h),
|
|
3797
|
+
var h = j.parameterLimit === 1 / 0 ? void 0 : j.parameterLimit, y = p.split(j.delimiter, h), O = -1, T, d = j.charset;
|
|
3784
3798
|
if (j.charsetSentinel)
|
|
3785
3799
|
for (T = 0; T < y.length; ++T)
|
|
3786
|
-
y[T].indexOf("utf8=") === 0 && (y[T] === a ? d = "utf-8" : y[T] === n && (d = "iso-8859-1"),
|
|
3800
|
+
y[T].indexOf("utf8=") === 0 && (y[T] === a ? d = "utf-8" : y[T] === n && (d = "iso-8859-1"), O = T, T = y.length);
|
|
3787
3801
|
for (T = 0; T < y.length; ++T)
|
|
3788
|
-
if (T !==
|
|
3789
|
-
var
|
|
3790
|
-
N === -1 ? (A = j.decoder(
|
|
3791
|
-
s(
|
|
3802
|
+
if (T !== O) {
|
|
3803
|
+
var S = y[T], x = S.indexOf("]="), N = x === -1 ? S.indexOf("=") : x + 1, A, E;
|
|
3804
|
+
N === -1 ? (A = j.decoder(S, o.decoder, d, "key"), E = j.strictNullHandling ? null : "") : (A = j.decoder(S.slice(0, N), o.decoder, d, "key"), E = e.maybeMap(
|
|
3805
|
+
s(S.slice(N + 1), j),
|
|
3792
3806
|
function(P) {
|
|
3793
3807
|
return j.decoder(P, o.decoder, d, "value");
|
|
3794
3808
|
}
|
|
3795
|
-
)), E && j.interpretNumericEntities && d === "iso-8859-1" && (E = i(E)),
|
|
3809
|
+
)), E && j.interpretNumericEntities && d === "iso-8859-1" && (E = i(E)), S.indexOf("[]=") > -1 && (E = t(E) ? [E] : E);
|
|
3796
3810
|
var B = r.call(v, A);
|
|
3797
3811
|
B && j.duplicates === "combine" ? v[A] = e.combine(v[A], E) : (!B || j.duplicates === "last") && (v[A] = E);
|
|
3798
3812
|
}
|
|
3799
3813
|
return v;
|
|
3800
3814
|
}, c = function(b, m, j, v) {
|
|
3801
3815
|
for (var p = v ? m : s(m, j), h = b.length - 1; h >= 0; --h) {
|
|
3802
|
-
var y,
|
|
3803
|
-
if (
|
|
3816
|
+
var y, O = b[h];
|
|
3817
|
+
if (O === "[]" && j.parseArrays)
|
|
3804
3818
|
y = j.allowEmptyArrays && (p === "" || j.strictNullHandling && p === null) ? [] : [].concat(p);
|
|
3805
3819
|
else {
|
|
3806
3820
|
y = j.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
3807
|
-
var T =
|
|
3808
|
-
!j.parseArrays && d === "" ? y = { 0: p } : !isNaN(
|
|
3821
|
+
var T = O.charAt(0) === "[" && O.charAt(O.length - 1) === "]" ? O.slice(1, -1) : O, d = j.decodeDotInKeys ? T.replace(/%2E/g, ".") : T, S = parseInt(d, 10);
|
|
3822
|
+
!j.parseArrays && d === "" ? y = { 0: p } : !isNaN(S) && O !== d && String(S) === d && S >= 0 && j.parseArrays && S <= j.arrayLimit ? (y = [], y[S] = p) : d !== "__proto__" && (y[d] = p);
|
|
3809
3823
|
}
|
|
3810
3824
|
p = y;
|
|
3811
3825
|
}
|
|
3812
3826
|
return p;
|
|
3813
3827
|
}, f = function(m, j, v, p) {
|
|
3814
3828
|
if (m) {
|
|
3815
|
-
var h = v.allowDots ? m.replace(/\.([^.[]+)/g, "[$1]") : m, y = /(\[[^[\]]*])/,
|
|
3829
|
+
var h = v.allowDots ? m.replace(/\.([^.[]+)/g, "[$1]") : m, y = /(\[[^[\]]*])/, O = /(\[[^[\]]*])/g, T = v.depth > 0 && y.exec(h), d = T ? h.slice(0, T.index) : h, S = [];
|
|
3816
3830
|
if (d) {
|
|
3817
3831
|
if (!v.plainObjects && r.call(Object.prototype, d) && !v.allowPrototypes)
|
|
3818
3832
|
return;
|
|
3819
|
-
|
|
3833
|
+
S.push(d);
|
|
3820
3834
|
}
|
|
3821
|
-
for (var x = 0; v.depth > 0 && (T =
|
|
3835
|
+
for (var x = 0; v.depth > 0 && (T = O.exec(h)) !== null && x < v.depth; ) {
|
|
3822
3836
|
if (x += 1, !v.plainObjects && r.call(Object.prototype, T[1].slice(1, -1)) && !v.allowPrototypes)
|
|
3823
3837
|
return;
|
|
3824
|
-
|
|
3838
|
+
S.push(T[1]);
|
|
3825
3839
|
}
|
|
3826
3840
|
if (T) {
|
|
3827
3841
|
if (v.strictDepth === !0)
|
|
3828
3842
|
throw new RangeError("Input depth exceeded depth option of " + v.depth + " and strictDepth is true");
|
|
3829
|
-
|
|
3843
|
+
S.push("[" + h.slice(T.index) + "]");
|
|
3830
3844
|
}
|
|
3831
|
-
return c(
|
|
3845
|
+
return c(S, j, v, p);
|
|
3832
3846
|
}
|
|
3833
3847
|
}, g = function(m) {
|
|
3834
3848
|
if (!m)
|
|
@@ -3869,33 +3883,33 @@ function As() {
|
|
|
3869
3883
|
strictNullHandling: typeof m.strictNullHandling == "boolean" ? m.strictNullHandling : o.strictNullHandling
|
|
3870
3884
|
};
|
|
3871
3885
|
};
|
|
3872
|
-
return
|
|
3886
|
+
return pr = function(b, m) {
|
|
3873
3887
|
var j = g(m);
|
|
3874
3888
|
if (b === "" || b === null || typeof b > "u")
|
|
3875
3889
|
return j.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
3876
3890
|
for (var v = typeof b == "string" ? l(b, j) : b, p = j.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, h = Object.keys(v), y = 0; y < h.length; ++y) {
|
|
3877
|
-
var
|
|
3891
|
+
var O = h[y], T = f(O, v[O], j, typeof b == "string");
|
|
3878
3892
|
p = e.merge(p, T, j);
|
|
3879
3893
|
}
|
|
3880
3894
|
return j.allowSparse === !0 ? p : e.compact(p);
|
|
3881
|
-
},
|
|
3895
|
+
}, pr;
|
|
3882
3896
|
}
|
|
3883
|
-
var
|
|
3884
|
-
function
|
|
3885
|
-
if (
|
|
3886
|
-
|
|
3887
|
-
var e = /* @__PURE__ */
|
|
3888
|
-
return
|
|
3897
|
+
var dr, Zn;
|
|
3898
|
+
function Co() {
|
|
3899
|
+
if (Zn) return dr;
|
|
3900
|
+
Zn = 1;
|
|
3901
|
+
var e = /* @__PURE__ */ Hs(), r = /* @__PURE__ */ Ms(), t = /* @__PURE__ */ kr();
|
|
3902
|
+
return dr = {
|
|
3889
3903
|
formats: t,
|
|
3890
3904
|
parse: r,
|
|
3891
3905
|
stringify: e
|
|
3892
|
-
},
|
|
3906
|
+
}, dr;
|
|
3893
3907
|
}
|
|
3894
|
-
var
|
|
3895
|
-
function
|
|
3896
|
-
if (
|
|
3897
|
-
|
|
3898
|
-
var e =
|
|
3908
|
+
var eo;
|
|
3909
|
+
function zs() {
|
|
3910
|
+
if (eo) return Ce;
|
|
3911
|
+
eo = 1;
|
|
3912
|
+
var e = ls();
|
|
3899
3913
|
function r() {
|
|
3900
3914
|
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;
|
|
3901
3915
|
}
|
|
@@ -3943,14 +3957,14 @@ function Is() {
|
|
|
3943
3957
|
"ftp:": !0,
|
|
3944
3958
|
"gopher:": !0,
|
|
3945
3959
|
"file:": !0
|
|
3946
|
-
}, p = /* @__PURE__ */
|
|
3947
|
-
function h(d,
|
|
3960
|
+
}, p = /* @__PURE__ */ Co();
|
|
3961
|
+
function h(d, S, x) {
|
|
3948
3962
|
if (d && typeof d == "object" && d instanceof r)
|
|
3949
3963
|
return d;
|
|
3950
3964
|
var N = new r();
|
|
3951
|
-
return N.parse(d,
|
|
3965
|
+
return N.parse(d, S, x), N;
|
|
3952
3966
|
}
|
|
3953
|
-
r.prototype.parse = function(d,
|
|
3967
|
+
r.prototype.parse = function(d, S, x) {
|
|
3954
3968
|
if (typeof d != "string")
|
|
3955
3969
|
throw new TypeError("Parameter 'url' must be a string, not " + typeof d);
|
|
3956
3970
|
var N = d.indexOf("?"), A = N !== -1 && N < d.indexOf("#") ? "?" : "#", E = d.split(A), B = /\\/g;
|
|
@@ -3959,7 +3973,7 @@ function Is() {
|
|
|
3959
3973
|
if (P = P.trim(), !x && d.split("#").length === 1) {
|
|
3960
3974
|
var ae = i.exec(P);
|
|
3961
3975
|
if (ae)
|
|
3962
|
-
return this.path = P, this.href = P, this.pathname = ae[1], ae[2] ? (this.search = ae[2],
|
|
3976
|
+
return this.path = P, this.href = P, this.pathname = ae[1], ae[2] ? (this.search = ae[2], S ? this.query = p.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : S && (this.search = "", this.query = {}), this;
|
|
3963
3977
|
}
|
|
3964
3978
|
var H = t.exec(P);
|
|
3965
3979
|
if (H) {
|
|
@@ -3972,38 +3986,38 @@ function Is() {
|
|
|
3972
3986
|
le && !(H && j[H]) && (P = P.substr(2), this.slashes = !0);
|
|
3973
3987
|
}
|
|
3974
3988
|
if (!j[H] && (le || H && !v[H])) {
|
|
3975
|
-
for (var Z = -1,
|
|
3976
|
-
var re = P.indexOf(c[
|
|
3989
|
+
for (var Z = -1, R = 0; R < c.length; R++) {
|
|
3990
|
+
var re = P.indexOf(c[R]);
|
|
3977
3991
|
re !== -1 && (Z === -1 || re < Z) && (Z = re);
|
|
3978
3992
|
}
|
|
3979
|
-
var q,
|
|
3980
|
-
Z === -1 ?
|
|
3981
|
-
for (var
|
|
3982
|
-
var re = P.indexOf(l[
|
|
3993
|
+
var q, k;
|
|
3994
|
+
Z === -1 ? k = P.lastIndexOf("@") : k = P.lastIndexOf("@", Z), k !== -1 && (q = P.slice(0, k), P = P.slice(k + 1), this.auth = decodeURIComponent(q)), Z = -1;
|
|
3995
|
+
for (var R = 0; R < l.length; R++) {
|
|
3996
|
+
var re = P.indexOf(l[R]);
|
|
3983
3997
|
re !== -1 && (Z === -1 || re < Z) && (Z = re);
|
|
3984
3998
|
}
|
|
3985
3999
|
Z === -1 && (Z = P.length), this.host = P.slice(0, Z), P = P.slice(Z), this.parseHost(), this.hostname = this.hostname || "";
|
|
3986
4000
|
var U = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
3987
4001
|
if (!U)
|
|
3988
|
-
for (var C = this.hostname.split(/\./),
|
|
3989
|
-
var W = C[
|
|
4002
|
+
for (var C = this.hostname.split(/\./), R = 0, L = C.length; R < L; R++) {
|
|
4003
|
+
var W = C[R];
|
|
3990
4004
|
if (W && !W.match(g)) {
|
|
3991
|
-
for (var z = "",
|
|
3992
|
-
W.charCodeAt(
|
|
4005
|
+
for (var z = "", Q = 0, ne = W.length; Q < ne; Q++)
|
|
4006
|
+
W.charCodeAt(Q) > 127 ? z += "x" : z += W[Q];
|
|
3993
4007
|
if (!z.match(g)) {
|
|
3994
|
-
var J = C.slice(0,
|
|
4008
|
+
var J = C.slice(0, R), I = C.slice(R + 1), F = W.match(b);
|
|
3995
4009
|
F && (J.push(F[1]), I.unshift(F[2])), I.length && (P = "/" + I.join(".") + P), this.hostname = J.join(".");
|
|
3996
4010
|
break;
|
|
3997
4011
|
}
|
|
3998
4012
|
}
|
|
3999
4013
|
}
|
|
4000
4014
|
this.hostname.length > f ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), U || (this.hostname = e.toASCII(this.hostname));
|
|
4001
|
-
var _ = this.port ? ":" + this.port : "",
|
|
4002
|
-
this.host =
|
|
4015
|
+
var _ = this.port ? ":" + this.port : "", K = this.hostname || "";
|
|
4016
|
+
this.host = K + _, this.href += this.host, U && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), P[0] !== "/" && (P = "/" + P));
|
|
4003
4017
|
}
|
|
4004
4018
|
if (!m[D])
|
|
4005
|
-
for (var
|
|
4006
|
-
var G = a[
|
|
4019
|
+
for (var R = 0, L = a.length; R < L; R++) {
|
|
4020
|
+
var G = a[R];
|
|
4007
4021
|
if (P.indexOf(G) !== -1) {
|
|
4008
4022
|
var Y = encodeURIComponent(G);
|
|
4009
4023
|
Y === G && (Y = escape(G)), P = P.split(G).join(Y);
|
|
@@ -4012,7 +4026,7 @@ function Is() {
|
|
|
4012
4026
|
var oe = P.indexOf("#");
|
|
4013
4027
|
oe !== -1 && (this.hash = P.substr(oe), P = P.slice(0, oe));
|
|
4014
4028
|
var he = P.indexOf("?");
|
|
4015
|
-
if (he !== -1 ? (this.search = P.substr(he), this.query = P.substr(he + 1),
|
|
4029
|
+
if (he !== -1 ? (this.search = P.substr(he), this.query = P.substr(he + 1), S && (this.query = p.parse(this.query)), P = P.slice(0, he)) : S && (this.search = "", this.query = {}), P && (this.pathname = P), v[D] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
4016
4030
|
var _ = this.pathname || "", Se = this.search || "";
|
|
4017
4031
|
this.path = _ + Se;
|
|
4018
4032
|
}
|
|
@@ -4024,29 +4038,29 @@ function Is() {
|
|
|
4024
4038
|
r.prototype.format = function() {
|
|
4025
4039
|
var d = this.auth || "";
|
|
4026
4040
|
d && (d = encodeURIComponent(d), d = d.replace(/%3A/i, ":"), d += "@");
|
|
4027
|
-
var
|
|
4041
|
+
var S = this.protocol || "", x = this.pathname || "", N = this.hash || "", A = !1, E = "";
|
|
4028
4042
|
this.host ? A = d + this.host : this.hostname && (A = d + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (A += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (E = p.stringify(this.query, {
|
|
4029
4043
|
arrayFormat: "repeat",
|
|
4030
4044
|
addQueryPrefix: !1
|
|
4031
4045
|
}));
|
|
4032
4046
|
var B = this.search || E && "?" + E || "";
|
|
4033
|
-
return
|
|
4047
|
+
return S && S.substr(-1) !== ":" && (S += ":"), this.slashes || (!S || v[S]) && A !== !1 ? (A = "//" + (A || ""), x && x.charAt(0) !== "/" && (x = "/" + x)) : A || (A = ""), N && N.charAt(0) !== "#" && (N = "#" + N), B && B.charAt(0) !== "?" && (B = "?" + B), x = x.replace(/[?#]/g, function(P) {
|
|
4034
4048
|
return encodeURIComponent(P);
|
|
4035
|
-
}), B = B.replace("#", "%23"),
|
|
4049
|
+
}), B = B.replace("#", "%23"), S + A + x + B + N;
|
|
4036
4050
|
};
|
|
4037
|
-
function
|
|
4038
|
-
return h(d, !1, !0).resolve(
|
|
4051
|
+
function O(d, S) {
|
|
4052
|
+
return h(d, !1, !0).resolve(S);
|
|
4039
4053
|
}
|
|
4040
4054
|
r.prototype.resolve = function(d) {
|
|
4041
4055
|
return this.resolveObject(h(d, !1, !0)).format();
|
|
4042
4056
|
};
|
|
4043
|
-
function T(d,
|
|
4044
|
-
return d ? h(d, !1, !0).resolveObject(
|
|
4057
|
+
function T(d, S) {
|
|
4058
|
+
return d ? h(d, !1, !0).resolveObject(S) : S;
|
|
4045
4059
|
}
|
|
4046
4060
|
return r.prototype.resolveObject = function(d) {
|
|
4047
4061
|
if (typeof d == "string") {
|
|
4048
|
-
var
|
|
4049
|
-
|
|
4062
|
+
var S = new r();
|
|
4063
|
+
S.parse(d, !1, !0), d = S;
|
|
4050
4064
|
}
|
|
4051
4065
|
for (var x = new r(), N = Object.keys(this), A = 0; A < N.length; A++) {
|
|
4052
4066
|
var E = N[A];
|
|
@@ -4076,13 +4090,13 @@ function Is() {
|
|
|
4076
4090
|
} else
|
|
4077
4091
|
x.pathname = d.pathname;
|
|
4078
4092
|
if (x.search = d.search, x.query = d.query, x.host = d.host || "", x.auth = d.auth, x.hostname = d.hostname || d.host, x.port = d.port, x.pathname || x.search) {
|
|
4079
|
-
var Z = x.pathname || "",
|
|
4080
|
-
x.path = Z +
|
|
4093
|
+
var Z = x.pathname || "", R = x.search || "";
|
|
4094
|
+
x.path = Z + R;
|
|
4081
4095
|
}
|
|
4082
4096
|
return x.slashes = x.slashes || d.slashes, x.href = x.format(), x;
|
|
4083
4097
|
}
|
|
4084
|
-
var re = x.pathname && x.pathname.charAt(0) === "/", q = d.host || d.pathname && d.pathname.charAt(0) === "/",
|
|
4085
|
-
if (W && (x.hostname = "", x.port = null, x.host && (C[0] === "" ? C[0] = x.host : C.unshift(x.host)), x.host = "", d.protocol && (d.hostname = null, d.port = null, d.host && (L[0] === "" ? L[0] = d.host : L.unshift(d.host)), d.host = null),
|
|
4098
|
+
var re = x.pathname && x.pathname.charAt(0) === "/", q = d.host || d.pathname && d.pathname.charAt(0) === "/", k = q || re || x.host && d.pathname, U = k, C = x.pathname && x.pathname.split("/") || [], L = d.pathname && d.pathname.split("/") || [], W = x.protocol && !v[x.protocol];
|
|
4099
|
+
if (W && (x.hostname = "", x.port = null, x.host && (C[0] === "" ? C[0] = x.host : C.unshift(x.host)), x.host = "", d.protocol && (d.hostname = null, d.port = null, d.host && (L[0] === "" ? L[0] = d.host : L.unshift(d.host)), d.host = null), k = k && (L[0] === "" || C[0] === "")), q)
|
|
4086
4100
|
x.host = d.host || d.host === "" ? d.host : x.host, x.hostname = d.hostname || d.hostname === "" ? d.hostname : x.hostname, x.search = d.search, x.query = d.query, C = L;
|
|
4087
4101
|
else if (L.length)
|
|
4088
4102
|
C || (C = []), C.pop(), C = C.concat(L), x.search = d.search, x.query = d.query;
|
|
@@ -4096,30 +4110,30 @@ function Is() {
|
|
|
4096
4110
|
}
|
|
4097
4111
|
if (!C.length)
|
|
4098
4112
|
return x.pathname = null, x.search ? x.path = "/" + x.search : x.path = null, x.href = x.format(), x;
|
|
4099
|
-
for (var
|
|
4100
|
-
|
|
4101
|
-
if (!
|
|
4113
|
+
for (var Q = C.slice(-1)[0], ne = (x.host || d.host || C.length > 1) && (Q === "." || Q === "..") || Q === "", J = 0, I = C.length; I >= 0; I--)
|
|
4114
|
+
Q = C[I], Q === "." ? C.splice(I, 1) : Q === ".." ? (C.splice(I, 1), J++) : J && (C.splice(I, 1), J--);
|
|
4115
|
+
if (!k && !U)
|
|
4102
4116
|
for (; J--; J)
|
|
4103
4117
|
C.unshift("..");
|
|
4104
|
-
|
|
4118
|
+
k && C[0] !== "" && (!C[0] || C[0].charAt(0) !== "/") && C.unshift(""), ne && C.join("/").substr(-1) !== "/" && C.push("");
|
|
4105
4119
|
var F = C[0] === "" || C[0] && C[0].charAt(0) === "/";
|
|
4106
4120
|
if (W) {
|
|
4107
4121
|
x.hostname = F ? "" : C.length ? C.shift() : "", x.host = x.hostname;
|
|
4108
4122
|
var z = x.host && x.host.indexOf("@") > 0 ? x.host.split("@") : !1;
|
|
4109
4123
|
z && (x.auth = z.shift(), x.hostname = z.shift(), x.host = x.hostname);
|
|
4110
4124
|
}
|
|
4111
|
-
return
|
|
4125
|
+
return k = k || x.host && C.length, k && !F && C.unshift(""), C.length > 0 ? x.pathname = C.join("/") : (x.pathname = null, x.path = null), (x.pathname !== null || x.search !== null) && (x.path = (x.pathname ? x.pathname : "") + (x.search ? x.search : "")), x.auth = d.auth || x.auth, x.slashes = x.slashes || d.slashes, x.href = x.format(), x;
|
|
4112
4126
|
}, r.prototype.parseHost = function() {
|
|
4113
|
-
var d = this.host,
|
|
4114
|
-
|
|
4115
|
-
}, Ce.parse = h, Ce.resolve =
|
|
4127
|
+
var d = this.host, S = o.exec(d);
|
|
4128
|
+
S && (S = S[0], S !== ":" && (this.port = S.substr(1)), d = d.substr(0, d.length - S.length)), d && (this.hostname = d);
|
|
4129
|
+
}, Ce.parse = h, Ce.resolve = O, Ce.resolveObject = T, Ce.format = y, Ce.Url = r, Ce;
|
|
4116
4130
|
}
|
|
4117
|
-
var
|
|
4131
|
+
var hr = zs(), yr = /* @__PURE__ */ Co(), Gs = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), Ws = class {
|
|
4118
4132
|
constructor(e, r = {}) {
|
|
4119
4133
|
this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
|
|
4120
4134
|
harIsAlreadyEncoded: !1,
|
|
4121
4135
|
...r
|
|
4122
|
-
}, this.requests = [],
|
|
4136
|
+
}, this.requests = [], Gs(e) ? this.entries = e.log.entries : this.entries = [
|
|
4123
4137
|
{
|
|
4124
4138
|
request: e
|
|
4125
4139
|
}
|
|
@@ -4154,7 +4168,7 @@ var pr = Is(), dr = /* @__PURE__ */ Po(), Ls = (e) => typeof e == "object" && "l
|
|
|
4154
4168
|
cookiesObj: {},
|
|
4155
4169
|
allHeaders: {}
|
|
4156
4170
|
};
|
|
4157
|
-
if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(
|
|
4171
|
+
if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(Gr, {})), t.headers && t.headers.length) {
|
|
4158
4172
|
const m = /^HTTP\/2/;
|
|
4159
4173
|
t.headersObj = t.headers.reduce((j, { name: v, value: p }) => {
|
|
4160
4174
|
const h = m.exec(t.httpVersion) ? v.toLocaleLowerCase() : v;
|
|
@@ -4182,17 +4196,17 @@ var pr = Is(), dr = /* @__PURE__ */ Po(), Ls = (e) => typeof e == "object" && "l
|
|
|
4182
4196
|
`, p = (T) => T.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), h = (T) => T.replace(/\r?\n|\r/g, `\r
|
|
4183
4197
|
`), y = [`--${m}`];
|
|
4184
4198
|
(b = t.postData) == null || b.params.forEach((T, d) => {
|
|
4185
|
-
const
|
|
4199
|
+
const S = T.name, x = T.value || "", N = T.fileName || null, A = T.contentType || "application/octet-stream";
|
|
4186
4200
|
N ? (y.push(
|
|
4187
|
-
`Content-Disposition: form-data; name="${p(h(
|
|
4188
|
-
), y.push(`Content-Type: ${A}`)) : y.push(`Content-Disposition: form-data; name="${p(h(
|
|
4201
|
+
`Content-Disposition: form-data; name="${p(h(S))}"; filename="${N}"`
|
|
4202
|
+
), y.push(`Content-Type: ${A}`)) : y.push(`Content-Disposition: form-data; name="${p(h(S))}"`), y.push(""), y.push(h(x)), d !== t.postData.params.length - 1 && y.push(`--${m}`);
|
|
4189
4203
|
}), y.push(`--${j}`), t.postData.boundary = m, t.postData.text = y.join(v);
|
|
4190
|
-
const
|
|
4191
|
-
t.headersObj[
|
|
4204
|
+
const O = pe(t.headersObj, "content-type") || "content-type";
|
|
4205
|
+
t.headersObj[O] = `multipart/form-data; boundary=${m}`;
|
|
4192
4206
|
}
|
|
4193
4207
|
break;
|
|
4194
4208
|
case "application/x-www-form-urlencoded":
|
|
4195
|
-
t.postData.params ? (t.postData.paramsObj = t.postData.params.reduce(
|
|
4209
|
+
t.postData.params ? (t.postData.paramsObj = t.postData.params.reduce(Gr, {}), t.postData.text = yr.stringify(t.postData.paramsObj)) : t.postData.text = "";
|
|
4196
4210
|
break;
|
|
4197
4211
|
case "text/json":
|
|
4198
4212
|
case "text/x-json":
|
|
@@ -4209,16 +4223,16 @@ var pr = Is(), dr = /* @__PURE__ */ Po(), Ls = (e) => typeof e == "object" && "l
|
|
|
4209
4223
|
const i = {
|
|
4210
4224
|
...t.allHeaders,
|
|
4211
4225
|
...t.headersObj
|
|
4212
|
-
}, s =
|
|
4226
|
+
}, s = hr.parse(t.url, !0, !0);
|
|
4213
4227
|
t.queryObj = {
|
|
4214
4228
|
...t.queryObj,
|
|
4215
4229
|
...s.query
|
|
4216
4230
|
};
|
|
4217
4231
|
let n;
|
|
4218
|
-
r.harIsAlreadyEncoded ? n =
|
|
4232
|
+
r.harIsAlreadyEncoded ? n = yr.stringify(t.queryObj, {
|
|
4219
4233
|
encode: !1,
|
|
4220
4234
|
indices: !1
|
|
4221
|
-
}) : n =
|
|
4235
|
+
}) : n = yr.stringify(t.queryObj, {
|
|
4222
4236
|
indices: !1
|
|
4223
4237
|
});
|
|
4224
4238
|
const a = {
|
|
@@ -4226,11 +4240,11 @@ var pr = Is(), dr = /* @__PURE__ */ Po(), Ls = (e) => typeof e == "object" && "l
|
|
|
4226
4240
|
query: t.queryObj,
|
|
4227
4241
|
search: n,
|
|
4228
4242
|
path: n ? `${s.pathname}?${n}` : s.pathname
|
|
4229
|
-
}, l =
|
|
4243
|
+
}, l = hr.format({
|
|
4230
4244
|
...s,
|
|
4231
4245
|
query: null,
|
|
4232
4246
|
search: null
|
|
4233
|
-
}), c =
|
|
4247
|
+
}), c = hr.format({
|
|
4234
4248
|
...s,
|
|
4235
4249
|
...a
|
|
4236
4250
|
});
|
|
@@ -4244,19 +4258,19 @@ var pr = Is(), dr = /* @__PURE__ */ Po(), Ls = (e) => typeof e == "object" && "l
|
|
|
4244
4258
|
}
|
|
4245
4259
|
convert(e, r, t) {
|
|
4246
4260
|
this.initCalled || this.init(), !t && r && (t = r);
|
|
4247
|
-
const o =
|
|
4261
|
+
const o = is[e];
|
|
4248
4262
|
if (!o)
|
|
4249
4263
|
return !1;
|
|
4250
4264
|
const { convert: i } = o.clientsById[r || o.info.default];
|
|
4251
4265
|
return this.requests.map((n) => i(n, t));
|
|
4252
4266
|
}
|
|
4253
4267
|
};
|
|
4254
|
-
const
|
|
4268
|
+
const Js = ({
|
|
4255
4269
|
rootMargin: e = "0px",
|
|
4256
4270
|
threshold: r
|
|
4257
4271
|
} = {}) => {
|
|
4258
|
-
const [t, o] = ye(!1), i =
|
|
4259
|
-
return
|
|
4272
|
+
const [t, o] = ye(!1), i = fo(null);
|
|
4273
|
+
return Tr(() => {
|
|
4260
4274
|
const s = new IntersectionObserver(
|
|
4261
4275
|
([a]) => {
|
|
4262
4276
|
a && o(a.isIntersecting);
|
|
@@ -4266,12 +4280,12 @@ const Fs = ({
|
|
|
4266
4280
|
if (n)
|
|
4267
4281
|
return s.observe(n), () => s.unobserve(n);
|
|
4268
4282
|
}, [e, r]), [i, t];
|
|
4269
|
-
},
|
|
4283
|
+
}, Vs = typeof window < "u" ? ha : Tr, No = ({
|
|
4270
4284
|
children: e,
|
|
4271
4285
|
maxHeight: r = 250
|
|
4272
4286
|
}) => {
|
|
4273
|
-
const t =
|
|
4274
|
-
return
|
|
4287
|
+
const t = fo(null), [o, i] = ye(!1), [s, n] = ye(!1);
|
|
4288
|
+
return Vs(() => {
|
|
4275
4289
|
const a = t.current;
|
|
4276
4290
|
if (!a) return;
|
|
4277
4291
|
i(a.scrollHeight > r);
|
|
@@ -4280,7 +4294,7 @@ const Fs = ({
|
|
|
4280
4294
|
});
|
|
4281
4295
|
return l.observe(a), () => l.disconnect();
|
|
4282
4296
|
}, [r]), /* @__PURE__ */ u.jsxs(
|
|
4283
|
-
|
|
4297
|
+
io,
|
|
4284
4298
|
{
|
|
4285
4299
|
className: "group",
|
|
4286
4300
|
open: s,
|
|
@@ -4288,7 +4302,7 @@ const Fs = ({
|
|
|
4288
4302
|
style: { "--max-height": `${r}px` },
|
|
4289
4303
|
children: [
|
|
4290
4304
|
/* @__PURE__ */ u.jsxs(
|
|
4291
|
-
|
|
4305
|
+
so,
|
|
4292
4306
|
{
|
|
4293
4307
|
forceMount: !0,
|
|
4294
4308
|
className: se(
|
|
@@ -4299,12 +4313,12 @@ const Fs = ({
|
|
|
4299
4313
|
!s && o && /* @__PURE__ */ u.jsx("div", { className: " absolute inset-0 bg-gradient-to-b from-transparent to-zinc-50/60 dark:to-zinc-950/90 z-10 group-hover:to-transparent" }),
|
|
4300
4314
|
/* @__PURE__ */ u.jsx("div", { ref: t, children: e }),
|
|
4301
4315
|
!s && o && /* @__PURE__ */ u.jsx(
|
|
4302
|
-
|
|
4316
|
+
gr,
|
|
4303
4317
|
{
|
|
4304
4318
|
className: "absolute inset-0 grid place-items-center z-10 cursor-pointer peer",
|
|
4305
4319
|
asChild: !0,
|
|
4306
|
-
children: /* @__PURE__ */ u.jsx("div", { children: /* @__PURE__ */ u.jsxs(
|
|
4307
|
-
/* @__PURE__ */ u.jsx(
|
|
4320
|
+
children: /* @__PURE__ */ u.jsx("div", { children: /* @__PURE__ */ u.jsxs(br, { variant: "outline", className: "hidden group-hover:flex", children: [
|
|
4321
|
+
/* @__PURE__ */ u.jsx(Wo, { size: 14, className: "mr-1.5" }),
|
|
4308
4322
|
"Click to expand"
|
|
4309
4323
|
] }) })
|
|
4310
4324
|
}
|
|
@@ -4316,44 +4330,44 @@ const Fs = ({
|
|
|
4316
4330
|
"div",
|
|
4317
4331
|
{
|
|
4318
4332
|
className: se("flex justify-center w-full mb-2", !s && "hidden"),
|
|
4319
|
-
children: /* @__PURE__ */ u.jsx(
|
|
4333
|
+
children: /* @__PURE__ */ u.jsx(gr, { asChild: !0, children: /* @__PURE__ */ u.jsxs(br, { variant: "outline", size: "sm", children: [
|
|
4320
4334
|
"Collapse",
|
|
4321
|
-
/* @__PURE__ */ u.jsx(
|
|
4335
|
+
/* @__PURE__ */ u.jsx(Jo, { size: 14, className: "ml-1.5" })
|
|
4322
4336
|
] }) })
|
|
4323
4337
|
}
|
|
4324
4338
|
)
|
|
4325
4339
|
]
|
|
4326
4340
|
}
|
|
4327
4341
|
);
|
|
4328
|
-
},
|
|
4342
|
+
}, Ds = ({
|
|
4329
4343
|
server: e,
|
|
4330
4344
|
servers: r,
|
|
4331
4345
|
operation: t,
|
|
4332
4346
|
examples: o
|
|
4333
4347
|
}) => {
|
|
4334
4348
|
var b, m, j;
|
|
4335
|
-
const { isAuthEnabled: i, login: s, signup: n, isPending: a, isAuthenticated: l } =
|
|
4336
|
-
var p, h, y,
|
|
4349
|
+
const { isAuthEnabled: i, login: s, signup: n, isPending: a, isAuthenticated: l } = Ea(), c = (b = t.parameters) == null ? void 0 : b.filter((v) => v.in === "header").sort((v, p) => v.required && !p.required ? -1 : 1).map((v) => {
|
|
4350
|
+
var p, h, y, O, T, d, S, x;
|
|
4337
4351
|
return {
|
|
4338
4352
|
name: v.name,
|
|
4339
4353
|
defaultValue: ((p = v.schema) == null ? void 0 : p.default) ?? ((y = (h = v.examples) == null ? void 0 : h.find((N) => N.value)) == null ? void 0 : y.value) ?? "",
|
|
4340
4354
|
defaultActive: v.required ?? !1,
|
|
4341
4355
|
isRequired: v.required ?? !1,
|
|
4342
|
-
enum: ((
|
|
4356
|
+
enum: ((O = v.schema) == null ? void 0 : O.type) == "array" ? (d = (T = v.schema) == null ? void 0 : T.items) == null ? void 0 : d.enum : (S = v.schema) == null ? void 0 : S.enum,
|
|
4343
4357
|
type: ((x = v.schema) == null ? void 0 : x.type) ?? "string"
|
|
4344
4358
|
};
|
|
4345
4359
|
}), f = (m = t.parameters) == null ? void 0 : m.filter((v) => v.in === "query").sort((v, p) => v.required && !p.required ? -1 : 1).map((v) => {
|
|
4346
|
-
var p, h, y,
|
|
4360
|
+
var p, h, y, O, T;
|
|
4347
4361
|
return {
|
|
4348
4362
|
name: v.name,
|
|
4349
4363
|
defaultActive: v.required ?? !1,
|
|
4350
4364
|
isRequired: v.required ?? !1,
|
|
4351
|
-
enum: ((p = v.schema) == null ? void 0 : p.type) == "array" ? (y = (h = v.schema) == null ? void 0 : h.items) == null ? void 0 : y.enum : (
|
|
4365
|
+
enum: ((p = v.schema) == null ? void 0 : p.type) == "array" ? (y = (h = v.schema) == null ? void 0 : h.items) == null ? void 0 : y.enum : (O = v.schema) == null ? void 0 : O.enum,
|
|
4352
4366
|
type: ((T = v.schema) == null ? void 0 : T.type) ?? "string"
|
|
4353
4367
|
};
|
|
4354
4368
|
}), g = (j = t.parameters) == null ? void 0 : j.filter((v) => v.in === "path").map((v) => ({ name: v.name }));
|
|
4355
4369
|
return /* @__PURE__ */ u.jsx(
|
|
4356
|
-
|
|
4370
|
+
oa,
|
|
4357
4371
|
{
|
|
4358
4372
|
server: e,
|
|
4359
4373
|
servers: r,
|
|
@@ -4374,7 +4388,7 @@ const Fs = ({
|
|
|
4374
4388
|
className: se("rounded-xl overflow-hidden border border-border", r),
|
|
4375
4389
|
children: e
|
|
4376
4390
|
}
|
|
4377
|
-
),
|
|
4391
|
+
), Er = ({ children: e, className: r }) => /* @__PURE__ */ u.jsx(
|
|
4378
4392
|
"div",
|
|
4379
4393
|
{
|
|
4380
4394
|
className: se(
|
|
@@ -4383,7 +4397,7 @@ const Fs = ({
|
|
|
4383
4397
|
),
|
|
4384
4398
|
children: e
|
|
4385
4399
|
}
|
|
4386
|
-
),
|
|
4400
|
+
), qo = ({ children: e, className: r }) => /* @__PURE__ */ u.jsx("div", { className: se("bg-card overflow-auto p-2", r), children: e }), ko = ({ children: e, className: r }) => /* @__PURE__ */ u.jsx("div", { className: se("border-t bg-muted dark:bg-transparent p-3", r), children: e }), Be = (e, r) => {
|
|
4387
4401
|
if (e.example !== void 0)
|
|
4388
4402
|
return e.example;
|
|
4389
4403
|
if (e.examples && typeof e.examples == "object" && "default" in e.examples) {
|
|
@@ -4419,7 +4433,7 @@ const Fs = ({
|
|
|
4419
4433
|
default:
|
|
4420
4434
|
return {};
|
|
4421
4435
|
}
|
|
4422
|
-
},
|
|
4436
|
+
}, Ks = (e) => e == null ? "No example" : typeof e == "string" ? e.trim() : JSON.stringify(e, null, 2), Qs = (e) => e ? {
|
|
4423
4437
|
"application/json": "json",
|
|
4424
4438
|
"application/xml": "xml",
|
|
4425
4439
|
"application/x-yaml": "yaml",
|
|
@@ -4432,18 +4446,18 @@ const Fs = ({
|
|
|
4432
4446
|
onExampleChange: t
|
|
4433
4447
|
}) => {
|
|
4434
4448
|
var m;
|
|
4435
|
-
const [o, i] = ye(0), [s, n] = ye(0), a = Array.isArray(e) && e.length === 1 ? e[0] : e[o], l = (a == null ? void 0 : a.examples) ?? [], c = l[s], f =
|
|
4449
|
+
const [o, i] = ye(0), [s, n] = ye(0), a = Array.isArray(e) && e.length === 1 ? e[0] : e[o], l = (a == null ? void 0 : a.examples) ?? [], c = l[s], f = po(() => {
|
|
4436
4450
|
if (c)
|
|
4437
4451
|
return "value" in c ? c.value : c;
|
|
4438
4452
|
if (a != null && a.schema)
|
|
4439
4453
|
return Be(a.schema);
|
|
4440
4454
|
}, [c, a == null ? void 0 : a.schema]);
|
|
4441
|
-
|
|
4455
|
+
Tr(() => {
|
|
4442
4456
|
f && (t == null || t(f));
|
|
4443
4457
|
}, [f, t]);
|
|
4444
|
-
const g =
|
|
4458
|
+
const g = Ks(f), b = Qs(a == null ? void 0 : a.mediaType);
|
|
4445
4459
|
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
4446
|
-
/* @__PURE__ */ u.jsxs(
|
|
4460
|
+
/* @__PURE__ */ u.jsxs(qo, { className: "p-0", children: [
|
|
4447
4461
|
c != null && c.externalValue ? /* @__PURE__ */ u.jsx("div", { className: "p-2", children: /* @__PURE__ */ u.jsx(
|
|
4448
4462
|
"a",
|
|
4449
4463
|
{
|
|
@@ -4453,8 +4467,8 @@ const Fs = ({
|
|
|
4453
4467
|
className: "text-xs text-primary hover:underline",
|
|
4454
4468
|
children: "View External Example →"
|
|
4455
4469
|
}
|
|
4456
|
-
) }) : /* @__PURE__ */ u.jsx(
|
|
4457
|
-
|
|
4470
|
+
) }) : /* @__PURE__ */ u.jsx(No, { children: /* @__PURE__ */ u.jsx(
|
|
4471
|
+
yo,
|
|
4458
4472
|
{
|
|
4459
4473
|
language: b,
|
|
4460
4474
|
noBackground: !0,
|
|
@@ -4464,11 +4478,11 @@ const Fs = ({
|
|
|
4464
4478
|
) }),
|
|
4465
4479
|
(c == null ? void 0 : c.description) && /* @__PURE__ */ u.jsx("div", { className: "border-t text-xs px-3 py-1.5 text-muted-foreground", children: c.description })
|
|
4466
4480
|
] }),
|
|
4467
|
-
/* @__PURE__ */ u.jsxs(
|
|
4481
|
+
/* @__PURE__ */ u.jsxs(ko, { className: "text-xs p-0 divide-y divide-border", children: [
|
|
4468
4482
|
r && /* @__PURE__ */ u.jsx("div", { className: "text-muted-foreground text-xs px-3 py-2", children: r }),
|
|
4469
4483
|
(l.length !== 0 || e.length !== 0) && /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 justify-between min-w-0 px-3 py-2", children: [
|
|
4470
4484
|
/* @__PURE__ */ u.jsx("div", { className: "flex items-center gap-2 min-w-0", children: e.length > 1 ? /* @__PURE__ */ u.jsx(
|
|
4471
|
-
|
|
4485
|
+
tt,
|
|
4472
4486
|
{
|
|
4473
4487
|
className: "max-w-[200px]",
|
|
4474
4488
|
value: o.toString(),
|
|
@@ -4480,7 +4494,7 @@ const Fs = ({
|
|
|
4480
4494
|
}
|
|
4481
4495
|
) : /* @__PURE__ */ u.jsx("span", { className: "font-mono text-[11px]", children: (m = e[0]) == null ? void 0 : m.mediaType }) }),
|
|
4482
4496
|
l.length > 1 && /* @__PURE__ */ u.jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ u.jsx(
|
|
4483
|
-
|
|
4497
|
+
tt,
|
|
4484
4498
|
{
|
|
4485
4499
|
className: "max-w-[180px]",
|
|
4486
4500
|
value: s.toString(),
|
|
@@ -4494,35 +4508,35 @@ const Fs = ({
|
|
|
4494
4508
|
] })
|
|
4495
4509
|
] })
|
|
4496
4510
|
] });
|
|
4497
|
-
},
|
|
4511
|
+
}, Ys = ({
|
|
4498
4512
|
content: e,
|
|
4499
4513
|
onExampleChange: r
|
|
4500
4514
|
}) => e.length === 0 ? null : /* @__PURE__ */ u.jsxs(Rr, { children: [
|
|
4501
|
-
/* @__PURE__ */ u.jsx(
|
|
4515
|
+
/* @__PURE__ */ u.jsx(Er, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ u.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
|
|
4502
4516
|
/* @__PURE__ */ u.jsx(Ro, { content: e, onExampleChange: r })
|
|
4503
|
-
] }),
|
|
4517
|
+
] }), Xs = ({ response: e }) => /* @__PURE__ */ u.jsx(Ye.Content, { value: e.statusCode, children: /* @__PURE__ */ u.jsx(
|
|
4504
4518
|
Ro,
|
|
4505
4519
|
{
|
|
4506
4520
|
content: e.content ?? [],
|
|
4507
4521
|
description: e.description ?? void 0
|
|
4508
4522
|
}
|
|
4509
|
-
) }),
|
|
4523
|
+
) }), Zs = ({
|
|
4510
4524
|
responses: e,
|
|
4511
4525
|
selectedResponse: r,
|
|
4512
4526
|
onSelectResponse: t
|
|
4513
4527
|
}) => {
|
|
4514
4528
|
var o;
|
|
4515
4529
|
return /* @__PURE__ */ u.jsx(Rr, { children: /* @__PURE__ */ u.jsxs(
|
|
4516
|
-
|
|
4530
|
+
Ye.Root,
|
|
4517
4531
|
{
|
|
4518
4532
|
defaultValue: (o = e[0]) == null ? void 0 : o.statusCode,
|
|
4519
4533
|
value: r,
|
|
4520
4534
|
onValueChange: (i) => t(i),
|
|
4521
4535
|
children: [
|
|
4522
|
-
/* @__PURE__ */ u.jsxs(
|
|
4536
|
+
/* @__PURE__ */ u.jsxs(Er, { className: "text-xs flex flex-col gap-2 pb-0", children: [
|
|
4523
4537
|
/* @__PURE__ */ u.jsx("span", { className: "font-mono", children: "Example Responses" }),
|
|
4524
|
-
/* @__PURE__ */ u.jsx(
|
|
4525
|
-
|
|
4538
|
+
/* @__PURE__ */ u.jsx(Ye.List, { className: "flex gap-2", children: e.map((i) => /* @__PURE__ */ u.jsx(
|
|
4539
|
+
Ye.Trigger,
|
|
4526
4540
|
{
|
|
4527
4541
|
value: i.statusCode,
|
|
4528
4542
|
className: se(
|
|
@@ -4535,11 +4549,11 @@ const Fs = ({
|
|
|
4535
4549
|
i.statusCode
|
|
4536
4550
|
)) })
|
|
4537
4551
|
] }),
|
|
4538
|
-
e.map((i) => /* @__PURE__ */ u.jsx(
|
|
4552
|
+
e.map((i) => /* @__PURE__ */ u.jsx(Xs, { response: i }, i.statusCode))
|
|
4539
4553
|
]
|
|
4540
4554
|
}
|
|
4541
4555
|
) });
|
|
4542
|
-
},
|
|
4556
|
+
}, el = (e, r) => {
|
|
4543
4557
|
let t;
|
|
4544
4558
|
switch (r) {
|
|
4545
4559
|
case "shell":
|
|
@@ -4580,7 +4594,7 @@ const Fs = ({
|
|
|
4580
4594
|
break;
|
|
4581
4595
|
}
|
|
4582
4596
|
return t ? t[0] : "";
|
|
4583
|
-
},
|
|
4597
|
+
}, tl = Ge(
|
|
4584
4598
|
/* GraphQL */
|
|
4585
4599
|
`
|
|
4586
4600
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -4592,7 +4606,7 @@ const Fs = ({
|
|
|
4592
4606
|
}
|
|
4593
4607
|
}
|
|
4594
4608
|
`
|
|
4595
|
-
),
|
|
4609
|
+
), rl = [
|
|
4596
4610
|
{ value: "shell", label: "cURL" },
|
|
4597
4611
|
{ value: "js", label: "JavaScript" },
|
|
4598
4612
|
{ value: "python", label: "Python" },
|
|
@@ -4604,18 +4618,18 @@ const Fs = ({
|
|
|
4604
4618
|
{ value: "php", label: "PHP" },
|
|
4605
4619
|
{ value: "ruby", label: "Ruby" },
|
|
4606
4620
|
{ value: "swift", label: "Swift" }
|
|
4607
|
-
],
|
|
4621
|
+
], nl = ({
|
|
4608
4622
|
operation: e,
|
|
4609
4623
|
selectedResponse: r,
|
|
4610
4624
|
onSelectResponse: t
|
|
4611
4625
|
}) => {
|
|
4612
|
-
var
|
|
4613
|
-
const { input: o, type: i, options: s } =
|
|
4614
|
-
|
|
4626
|
+
var S;
|
|
4627
|
+
const { input: o, type: i, options: s } = Pr(), n = et(tl, { input: o, type: i }), a = Sr(n), l = lo(e.method), [c, f] = ra(), [, g] = uo(), [b, m] = ye(), j = c.get("lang") ?? (s == null ? void 0 : s.examplesLanguage) ?? "shell", v = (S = e.requestBody) == null ? void 0 : S.content, p = /* @__PURE__ */ u.jsx(
|
|
4628
|
+
aa,
|
|
4615
4629
|
{
|
|
4616
4630
|
path: e.path,
|
|
4617
4631
|
renderParam: ({ name: x }) => /* @__PURE__ */ u.jsx(
|
|
4618
|
-
|
|
4632
|
+
ao,
|
|
4619
4633
|
{
|
|
4620
4634
|
name: x,
|
|
4621
4635
|
backgroundOpacity: "0",
|
|
@@ -4624,9 +4638,9 @@ const Fs = ({
|
|
|
4624
4638
|
}
|
|
4625
4639
|
)
|
|
4626
4640
|
}
|
|
4627
|
-
), { selectedServer: h } =
|
|
4641
|
+
), { selectedServer: h } = Or(a.data.schema.servers), y = po(() => {
|
|
4628
4642
|
var A;
|
|
4629
|
-
const x = b ?? ((A = v == null ? void 0 : v[0]) != null && A.schema ? Be(v[0].schema) : void 0), N = new
|
|
4643
|
+
const x = b ?? ((A = v == null ? void 0 : v[0]) != null && A.schema ? Be(v[0].schema) : void 0), N = new Ws({
|
|
4630
4644
|
method: e.method.toLocaleUpperCase(),
|
|
4631
4645
|
url: h + e.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
4632
4646
|
postData: x ? {
|
|
@@ -4640,7 +4654,7 @@ const Fs = ({
|
|
|
4640
4654
|
headersSize: 0,
|
|
4641
4655
|
bodySize: 0
|
|
4642
4656
|
});
|
|
4643
|
-
return
|
|
4657
|
+
return el(N, j);
|
|
4644
4658
|
}, [
|
|
4645
4659
|
b,
|
|
4646
4660
|
v,
|
|
@@ -4648,23 +4662,23 @@ const Fs = ({
|
|
|
4648
4662
|
e.path,
|
|
4649
4663
|
h,
|
|
4650
4664
|
j
|
|
4651
|
-
]), [
|
|
4665
|
+
]), [O, T] = Js({ rootMargin: "200px 0px 200px 0px" }), d = T && (e.extensions["x-explorer-enabled"] === !0 || e.extensions["x-zudoku-playground-enabled"] === !0 || e.extensions["x-explorer-enabled"] === void 0 && e.extensions["x-zudoku-playground-enabled"] === void 0 && !(s != null && s.disablePlayground));
|
|
4652
4666
|
return /* @__PURE__ */ u.jsxs(
|
|
4653
4667
|
"aside",
|
|
4654
4668
|
{
|
|
4655
|
-
ref:
|
|
4669
|
+
ref: O,
|
|
4656
4670
|
className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4",
|
|
4657
4671
|
"data-pagefind-ignore": "all",
|
|
4658
4672
|
children: [
|
|
4659
4673
|
/* @__PURE__ */ u.jsxs(Rr, { children: [
|
|
4660
|
-
/* @__PURE__ */ u.jsxs(
|
|
4674
|
+
/* @__PURE__ */ u.jsxs(Er, { className: "flex justify-between items-center flex-nowrap py-2.5 gap-2 text-xs", children: [
|
|
4661
4675
|
/* @__PURE__ */ u.jsxs("span", { className: "font-mono break-words leading-6", children: [
|
|
4662
4676
|
/* @__PURE__ */ u.jsx("span", { className: se("font-semibold", l), children: e.method.toLocaleUpperCase() }),
|
|
4663
4677
|
" ",
|
|
4664
4678
|
p
|
|
4665
4679
|
] }),
|
|
4666
4680
|
d && /* @__PURE__ */ u.jsx(
|
|
4667
|
-
|
|
4681
|
+
Ds,
|
|
4668
4682
|
{
|
|
4669
4683
|
servers: a.data.schema.servers.map((x) => x.url),
|
|
4670
4684
|
operation: e,
|
|
@@ -4673,8 +4687,8 @@ const Fs = ({
|
|
|
4673
4687
|
)
|
|
4674
4688
|
] }),
|
|
4675
4689
|
T && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
4676
|
-
/* @__PURE__ */ u.jsx(
|
|
4677
|
-
|
|
4690
|
+
/* @__PURE__ */ u.jsx(qo, { className: "p-0", children: /* @__PURE__ */ u.jsx(No, { children: /* @__PURE__ */ u.jsx(
|
|
4691
|
+
yo,
|
|
4678
4692
|
{
|
|
4679
4693
|
language: j,
|
|
4680
4694
|
noBackground: !0,
|
|
@@ -4682,10 +4696,10 @@ const Fs = ({
|
|
|
4682
4696
|
code: y
|
|
4683
4697
|
}
|
|
4684
4698
|
) }) }),
|
|
4685
|
-
/* @__PURE__ */ u.jsxs(
|
|
4699
|
+
/* @__PURE__ */ u.jsxs(ko, { className: "flex items-center text-xs gap-2 justify-end py-2.5", children: [
|
|
4686
4700
|
/* @__PURE__ */ u.jsx("span", { children: "Show example in" }),
|
|
4687
4701
|
/* @__PURE__ */ u.jsx(
|
|
4688
|
-
|
|
4702
|
+
tt,
|
|
4689
4703
|
{
|
|
4690
4704
|
className: "self-start max-w-[150px]",
|
|
4691
4705
|
value: j,
|
|
@@ -4694,21 +4708,21 @@ const Fs = ({
|
|
|
4694
4708
|
f((N) => (N.set("lang", x.target.value), N));
|
|
4695
4709
|
});
|
|
4696
4710
|
},
|
|
4697
|
-
options:
|
|
4711
|
+
options: rl
|
|
4698
4712
|
}
|
|
4699
4713
|
)
|
|
4700
4714
|
] })
|
|
4701
4715
|
] })
|
|
4702
4716
|
] }),
|
|
4703
4717
|
T && v && /* @__PURE__ */ u.jsx(
|
|
4704
|
-
|
|
4718
|
+
Ys,
|
|
4705
4719
|
{
|
|
4706
4720
|
content: v,
|
|
4707
4721
|
onExampleChange: m
|
|
4708
4722
|
}
|
|
4709
4723
|
),
|
|
4710
4724
|
T && e.responses.length > 0 && /* @__PURE__ */ u.jsx(
|
|
4711
|
-
|
|
4725
|
+
Zs,
|
|
4712
4726
|
{
|
|
4713
4727
|
selectedResponse: r,
|
|
4714
4728
|
onSelectResponse: t,
|
|
@@ -4718,15 +4732,15 @@ const Fs = ({
|
|
|
4718
4732
|
]
|
|
4719
4733
|
}
|
|
4720
4734
|
);
|
|
4721
|
-
},
|
|
4722
|
-
AND: /* @__PURE__ */ u.jsx(
|
|
4723
|
-
OR: /* @__PURE__ */ u.jsx(
|
|
4724
|
-
ONE: /* @__PURE__ */ u.jsx(
|
|
4725
|
-
},
|
|
4735
|
+
}, ol = {
|
|
4736
|
+
AND: /* @__PURE__ */ u.jsx(Ko, { size: 16, className: "fill-card" }),
|
|
4737
|
+
OR: /* @__PURE__ */ u.jsx(Do, { size: 16, className: "fill-card" }),
|
|
4738
|
+
ONE: /* @__PURE__ */ u.jsx(Vo, { size: 14, className: "fill-card" })
|
|
4739
|
+
}, al = {
|
|
4726
4740
|
AND: "text-green-500 dark:text-green-300/60",
|
|
4727
4741
|
OR: "text-blue-400 dark:text-blue-500",
|
|
4728
4742
|
ONE: "text-purple-500 dark:text-purple-300/60"
|
|
4729
|
-
},
|
|
4743
|
+
}, il = ({
|
|
4730
4744
|
type: e,
|
|
4731
4745
|
isOpen: r,
|
|
4732
4746
|
className: t
|
|
@@ -4734,13 +4748,13 @@ const Fs = ({
|
|
|
4734
4748
|
"div",
|
|
4735
4749
|
{
|
|
4736
4750
|
className: se(
|
|
4737
|
-
|
|
4751
|
+
al[e],
|
|
4738
4752
|
"relative text-sm flex py-2",
|
|
4739
4753
|
"before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']",
|
|
4740
4754
|
t
|
|
4741
4755
|
),
|
|
4742
4756
|
children: /* @__PURE__ */ u.jsxs("div", { className: "-translate-x-[7px] flex gap-1 items-center", children: [
|
|
4743
|
-
|
|
4757
|
+
ol[e],
|
|
4744
4758
|
/* @__PURE__ */ u.jsx(
|
|
4745
4759
|
"div",
|
|
4746
4760
|
{
|
|
@@ -4748,12 +4762,12 @@ const Fs = ({
|
|
|
4748
4762
|
"translate-y-px mx-px opacity-0 group-hover:opacity-100 transition",
|
|
4749
4763
|
!r && "-rotate-90"
|
|
4750
4764
|
),
|
|
4751
|
-
children: /* @__PURE__ */ u.jsx(
|
|
4765
|
+
children: /* @__PURE__ */ u.jsx(oo, { size: 16 })
|
|
4752
4766
|
}
|
|
4753
4767
|
)
|
|
4754
4768
|
] })
|
|
4755
4769
|
}
|
|
4756
|
-
),
|
|
4770
|
+
), sl = (e) => {
|
|
4757
4771
|
const [r, t] = ye(!0);
|
|
4758
4772
|
return /* @__PURE__ */ u.jsxs(
|
|
4759
4773
|
xe.Root,
|
|
@@ -4762,17 +4776,17 @@ const Fs = ({
|
|
|
4762
4776
|
onOpenChange: () => t((o) => !o),
|
|
4763
4777
|
className: "group",
|
|
4764
4778
|
children: [
|
|
4765
|
-
/* @__PURE__ */ u.jsx(xe.Trigger, { children: /* @__PURE__ */ u.jsx(
|
|
4779
|
+
/* @__PURE__ */ u.jsx(xe.Trigger, { children: /* @__PURE__ */ u.jsx(il, { type: e.type, isOpen: r }) }),
|
|
4766
4780
|
!r && /* @__PURE__ */ u.jsx("div", { className: "wavy-line bg-border translate-y-1" }),
|
|
4767
4781
|
/* @__PURE__ */ u.jsx(xe.Content, { children: /* @__PURE__ */ u.jsx(ze, { schema: e.schema, level: e.level + 1 }) })
|
|
4768
4782
|
]
|
|
4769
4783
|
}
|
|
4770
4784
|
);
|
|
4771
|
-
},
|
|
4785
|
+
}, ll = {
|
|
4772
4786
|
AND: "All of",
|
|
4773
4787
|
OR: "Any of",
|
|
4774
4788
|
ONE: "One of"
|
|
4775
|
-
},
|
|
4789
|
+
}, cl = ({
|
|
4776
4790
|
schemas: e,
|
|
4777
4791
|
type: r,
|
|
4778
4792
|
isOpen: t,
|
|
@@ -4780,13 +4794,13 @@ const Fs = ({
|
|
|
4780
4794
|
toggleOpen: i
|
|
4781
4795
|
}) => /* @__PURE__ */ u.jsx(xe.Root, { open: t, onOpenChange: i, asChild: !0, children: /* @__PURE__ */ u.jsxs(be, { className: "px-6", children: [
|
|
4782
4796
|
/* @__PURE__ */ u.jsxs(xe.Trigger, { className: "flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5", children: [
|
|
4783
|
-
t ? /* @__PURE__ */ u.jsx(
|
|
4784
|
-
/* @__PURE__ */ u.jsx("span", { children:
|
|
4797
|
+
t ? /* @__PURE__ */ u.jsx(Qo, { size: 14 }) : /* @__PURE__ */ u.jsx(Yo, { size: 14 }),
|
|
4798
|
+
/* @__PURE__ */ u.jsx("span", { children: ll[r] })
|
|
4785
4799
|
] }),
|
|
4786
4800
|
/* @__PURE__ */ u.jsx(xe.Content, { className: "pb-4", children: e.map((s, n) => (
|
|
4787
4801
|
// eslint-disable-next-line react/no-array-index-key
|
|
4788
4802
|
/* @__PURE__ */ u.jsx(
|
|
4789
|
-
|
|
4803
|
+
sl,
|
|
4790
4804
|
{
|
|
4791
4805
|
type: r,
|
|
4792
4806
|
schema: s,
|
|
@@ -4795,19 +4809,19 @@ const Fs = ({
|
|
|
4795
4809
|
n
|
|
4796
4810
|
)
|
|
4797
4811
|
)) })
|
|
4798
|
-
] }) }),
|
|
4812
|
+
] }) }), ul = (e) => e.type === "object" || e.type === "array" && typeof e.items == "object" && (!e.items.type || e.items.type === "object"), wr = (e) => !!(e.oneOf ?? e.allOf ?? e.anyOf), fl = {
|
|
4799
4813
|
allOf: "AND",
|
|
4800
4814
|
anyOf: "OR",
|
|
4801
4815
|
oneOf: "ONE"
|
|
4802
|
-
},
|
|
4816
|
+
}, mr = (e) => e === $a, Eo = ({
|
|
4803
4817
|
schema: e,
|
|
4804
4818
|
level: r
|
|
4805
4819
|
}) => {
|
|
4806
|
-
const [t, o] = ye(!0), i =
|
|
4807
|
-
for (const [s, n] of
|
|
4820
|
+
const [t, o] = ye(!0), i = ya(() => o((s) => !s), []);
|
|
4821
|
+
for (const [s, n] of Aa(fl))
|
|
4808
4822
|
if (e[s])
|
|
4809
4823
|
return /* @__PURE__ */ u.jsx(
|
|
4810
|
-
|
|
4824
|
+
cl,
|
|
4811
4825
|
{
|
|
4812
4826
|
schemas: e[s],
|
|
4813
4827
|
type: n,
|
|
@@ -4816,10 +4830,10 @@ const Fs = ({
|
|
|
4816
4830
|
level: r
|
|
4817
4831
|
}
|
|
4818
4832
|
);
|
|
4819
|
-
},
|
|
4820
|
-
/* @__PURE__ */ u.jsx(
|
|
4833
|
+
}, to = () => /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-1.5 italic text-xs text-muted-foreground font-mono bg-muted px-2 py-0.5 rounded-md", children: [
|
|
4834
|
+
/* @__PURE__ */ u.jsx(ea, { size: 13 }),
|
|
4821
4835
|
/* @__PURE__ */ u.jsx("span", { children: "circular" })
|
|
4822
|
-
] }),
|
|
4836
|
+
] }), pl = ({
|
|
4823
4837
|
name: e,
|
|
4824
4838
|
schema: r,
|
|
4825
4839
|
group: t,
|
|
@@ -4828,15 +4842,15 @@ const Fs = ({
|
|
|
4828
4842
|
showCollapseButton: s = !0
|
|
4829
4843
|
}) => {
|
|
4830
4844
|
const [n, a] = ye(i);
|
|
4831
|
-
return
|
|
4845
|
+
return mr(r) ? /* @__PURE__ */ u.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ u.jsx("div", { className: "flex flex-col gap-2.5 justify-between text-sm", children: /* @__PURE__ */ u.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
4832
4846
|
/* @__PURE__ */ u.jsx("code", { children: e }),
|
|
4833
|
-
/* @__PURE__ */ u.jsx(
|
|
4834
|
-
/* @__PURE__ */ u.jsx(
|
|
4847
|
+
/* @__PURE__ */ u.jsx(xr, { schema: r }),
|
|
4848
|
+
/* @__PURE__ */ u.jsx(to, {})
|
|
4835
4849
|
] }) }) }) : /* @__PURE__ */ u.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-2.5 justify-between text-sm", children: [
|
|
4836
4850
|
/* @__PURE__ */ u.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
4837
|
-
/* @__PURE__ */ u.jsx(
|
|
4851
|
+
/* @__PURE__ */ u.jsx(nt, { asChild: !0, children: /* @__PURE__ */ u.jsx("code", { children: e }) }),
|
|
4838
4852
|
/* @__PURE__ */ u.jsx(
|
|
4839
|
-
|
|
4853
|
+
xr,
|
|
4840
4854
|
{
|
|
4841
4855
|
schema: r,
|
|
4842
4856
|
extraItems: [
|
|
@@ -4844,7 +4858,7 @@ const Fs = ({
|
|
|
4844
4858
|
]
|
|
4845
4859
|
}
|
|
4846
4860
|
),
|
|
4847
|
-
r.type === "array" && "items" in r &&
|
|
4861
|
+
r.type === "array" && "items" in r && mr(r.items) && /* @__PURE__ */ u.jsx(to, {})
|
|
4848
4862
|
] }),
|
|
4849
4863
|
r.description && /* @__PURE__ */ u.jsx(
|
|
4850
4864
|
we,
|
|
@@ -4853,19 +4867,19 @@ const Fs = ({
|
|
|
4853
4867
|
content: r.description
|
|
4854
4868
|
}
|
|
4855
4869
|
),
|
|
4856
|
-
r.enum && /* @__PURE__ */ u.jsx(
|
|
4857
|
-
(
|
|
4870
|
+
r.enum && /* @__PURE__ */ u.jsx(go, { values: r.enum }),
|
|
4871
|
+
(wr(r) || ul(r)) && /* @__PURE__ */ u.jsxs(
|
|
4858
4872
|
xe.Root,
|
|
4859
4873
|
{
|
|
4860
4874
|
defaultOpen: i,
|
|
4861
4875
|
open: n,
|
|
4862
4876
|
onOpenChange: () => a(!n),
|
|
4863
4877
|
children: [
|
|
4864
|
-
s && /* @__PURE__ */ u.jsx(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ u.jsxs(
|
|
4865
|
-
n ? /* @__PURE__ */ u.jsx(
|
|
4878
|
+
s && /* @__PURE__ */ u.jsx(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ u.jsxs(ho, { variant: "expand", size: "sm", className: "h-7", children: [
|
|
4879
|
+
n ? /* @__PURE__ */ u.jsx(Xo, { size: 12 }) : /* @__PURE__ */ u.jsx(Zo, { size: 12 }),
|
|
4866
4880
|
n ? "Hide properties" : "Show properties"
|
|
4867
4881
|
] }) }),
|
|
4868
|
-
/* @__PURE__ */ u.jsx(xe.Content, { children: /* @__PURE__ */ u.jsx("div", { className: "mt-2", children:
|
|
4882
|
+
/* @__PURE__ */ u.jsx(xe.Content, { children: /* @__PURE__ */ u.jsx("div", { className: "mt-2", children: wr(r) ? /* @__PURE__ */ u.jsx(Eo, { schema: r, level: o + 1 }) : r.type === "object" ? /* @__PURE__ */ u.jsx(ze, { schema: r, level: o + 1 }) : r.type === "array" && "items" in r && typeof r.items == "object" && !mr(r.items) && /* @__PURE__ */ u.jsx(ze, { schema: r.items, level: o + 1 }) }) })
|
|
4869
4883
|
]
|
|
4870
4884
|
}
|
|
4871
4885
|
)
|
|
@@ -4878,8 +4892,8 @@ const Fs = ({
|
|
|
4878
4892
|
if (!e || Object.keys(e).length === 0)
|
|
4879
4893
|
return /* @__PURE__ */ u.jsx(be, { className: "p-4", children: /* @__PURE__ */ u.jsx("span", { className: "text-sm text-muted-foreground italic", children: "No response specified" }) });
|
|
4880
4894
|
const o = (i, s) => {
|
|
4881
|
-
if (
|
|
4882
|
-
return /* @__PURE__ */ u.jsx(
|
|
4895
|
+
if (wr(i))
|
|
4896
|
+
return /* @__PURE__ */ u.jsx(Eo, { schema: i, level: s });
|
|
4883
4897
|
if (i.type === "array" && i.items) {
|
|
4884
4898
|
const n = i.items;
|
|
4885
4899
|
return typeof n.type == "string" && ["string", "number", "boolean", "integer"].includes(n.type) ? /* @__PURE__ */ u.jsxs(be, { className: "p-4", children: [
|
|
@@ -4918,7 +4932,7 @@ const Fs = ({
|
|
|
4918
4932
|
)
|
|
4919
4933
|
] });
|
|
4920
4934
|
if (i.properties) {
|
|
4921
|
-
const n =
|
|
4935
|
+
const n = mo(
|
|
4922
4936
|
Object.entries(i.properties),
|
|
4923
4937
|
([l, c]) => {
|
|
4924
4938
|
var f;
|
|
@@ -4927,7 +4941,7 @@ const Fs = ({
|
|
|
4927
4941
|
), a = ["required", "optional", "deprecated"];
|
|
4928
4942
|
return /* @__PURE__ */ u.jsx(be, { className: "divide-y overflow-hidden", children: a.map(
|
|
4929
4943
|
(l) => n[l] && /* @__PURE__ */ u.jsx("ul", { className: "divide-y", children: n[l].map(([c, f]) => /* @__PURE__ */ u.jsx(
|
|
4930
|
-
|
|
4944
|
+
pl,
|
|
4931
4945
|
{
|
|
4932
4946
|
name: c,
|
|
4933
4947
|
schema: f,
|
|
@@ -4952,25 +4966,25 @@ const Fs = ({
|
|
|
4952
4966
|
}
|
|
4953
4967
|
)
|
|
4954
4968
|
] }) : i.additionalProperties ? /* @__PURE__ */ u.jsxs(be, { className: "my-2", children: [
|
|
4955
|
-
/* @__PURE__ */ u.jsx(
|
|
4956
|
-
/* @__PURE__ */ u.jsx(
|
|
4969
|
+
/* @__PURE__ */ u.jsx(Ca, { children: /* @__PURE__ */ u.jsx(Na, { children: "Additional Properties:" }) }),
|
|
4970
|
+
/* @__PURE__ */ u.jsx(qa, { children: o(
|
|
4957
4971
|
i.additionalProperties,
|
|
4958
4972
|
s + 1
|
|
4959
4973
|
) })
|
|
4960
4974
|
] }) : null;
|
|
4961
4975
|
};
|
|
4962
4976
|
return o(e, r);
|
|
4963
|
-
},
|
|
4977
|
+
}, dl = ["path", "query", "header", "cookie"], hl = ({
|
|
4964
4978
|
operationFragment: e,
|
|
4965
4979
|
serverUrl: r
|
|
4966
4980
|
}) => {
|
|
4967
4981
|
var a, l, c;
|
|
4968
|
-
const t =
|
|
4982
|
+
const t = Ia(yl, e), o = mo(
|
|
4969
4983
|
t.parameters ?? [],
|
|
4970
4984
|
(f) => f.in
|
|
4971
4985
|
), i = t.responses.at(0), [s, n] = ye(i == null ? void 0 : i.statusCode);
|
|
4972
4986
|
return /* @__PURE__ */ u.jsxs("div", { className: "border-b-2 mb-16 pb-16", children: [
|
|
4973
|
-
t.deprecated && /* @__PURE__ */ u.jsx(
|
|
4987
|
+
t.deprecated && /* @__PURE__ */ u.jsx(Ba, { variant: "muted", className: "text-xs mb-4", children: "deprecated" }),
|
|
4974
4988
|
/* @__PURE__ */ u.jsxs(
|
|
4975
4989
|
"div",
|
|
4976
4990
|
{
|
|
@@ -4990,9 +5004,9 @@ const Fs = ({
|
|
|
4990
5004
|
}
|
|
4991
5005
|
),
|
|
4992
5006
|
/* @__PURE__ */ u.jsxs("div", { className: "text-sm flex gap-2 font-mono col-span-full", children: [
|
|
4993
|
-
/* @__PURE__ */ u.jsx("span", { className:
|
|
4994
|
-
/* @__PURE__ */ u.jsxs(
|
|
4995
|
-
r && /* @__PURE__ */ u.jsx("div", { className: "text-neutral-400 dark:text-neutral-500 truncate", children: r }),
|
|
5007
|
+
/* @__PURE__ */ u.jsx("span", { className: lo(t.method), children: t.method.toUpperCase() }),
|
|
5008
|
+
/* @__PURE__ */ u.jsxs(nt, { className: "max-w-full truncate flex cursor-pointer", children: [
|
|
5009
|
+
r && /* @__PURE__ */ u.jsx("div", { className: "text-neutral-400 dark:text-neutral-500 truncate", children: r.replace(/\/$/, "") }),
|
|
4996
5010
|
/* @__PURE__ */ u.jsx("div", { className: "text-neutral-900 dark:text-neutral-200", children: t.path })
|
|
4997
5011
|
] })
|
|
4998
5012
|
] }),
|
|
@@ -5004,11 +5018,11 @@ const Fs = ({
|
|
|
5004
5018
|
content: t.description
|
|
5005
5019
|
}
|
|
5006
5020
|
),
|
|
5007
|
-
t.parameters && t.parameters.length > 0 && /* @__PURE__ */ u.jsx(u.Fragment, { children:
|
|
5021
|
+
t.parameters && t.parameters.length > 0 && /* @__PURE__ */ u.jsx(u.Fragment, { children: dl.flatMap(
|
|
5008
5022
|
(f) => {
|
|
5009
5023
|
var g;
|
|
5010
5024
|
return (g = o[f]) != null && g.length ? /* @__PURE__ */ u.jsx(
|
|
5011
|
-
|
|
5025
|
+
Wa,
|
|
5012
5026
|
{
|
|
5013
5027
|
summary: t.summary ?? void 0,
|
|
5014
5028
|
id: t.slug,
|
|
@@ -5019,7 +5033,7 @@ const Fs = ({
|
|
|
5019
5033
|
) : [];
|
|
5020
5034
|
}
|
|
5021
5035
|
) }),
|
|
5022
|
-
|
|
5036
|
+
Ha((c = (l = (a = t.requestBody) == null ? void 0 : a.content) == null ? void 0 : l.at(0)) == null ? void 0 : c.schema, (f) => /* @__PURE__ */ u.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
5023
5037
|
/* @__PURE__ */ u.jsxs(
|
|
5024
5038
|
_e,
|
|
5025
5039
|
{
|
|
@@ -5027,7 +5041,7 @@ const Fs = ({
|
|
|
5027
5041
|
className: "capitalize",
|
|
5028
5042
|
id: `${t.slug}/request-body`,
|
|
5029
5043
|
children: [
|
|
5030
|
-
t.summary && /* @__PURE__ */ u.jsxs(
|
|
5044
|
+
t.summary && /* @__PURE__ */ u.jsxs(vr, { children: [
|
|
5031
5045
|
t.summary,
|
|
5032
5046
|
" › "
|
|
5033
5047
|
] }),
|
|
@@ -5045,7 +5059,7 @@ const Fs = ({
|
|
|
5045
5059
|
className: "capitalize mt-8 pt-8 border-t",
|
|
5046
5060
|
id: `${t.slug}/responses`,
|
|
5047
5061
|
children: [
|
|
5048
|
-
t.summary && /* @__PURE__ */ u.jsxs(
|
|
5062
|
+
t.summary && /* @__PURE__ */ u.jsxs(vr, { children: [
|
|
5049
5063
|
t.summary,
|
|
5050
5064
|
" › "
|
|
5051
5065
|
] }),
|
|
@@ -5054,13 +5068,13 @@ const Fs = ({
|
|
|
5054
5068
|
}
|
|
5055
5069
|
),
|
|
5056
5070
|
/* @__PURE__ */ u.jsxs(
|
|
5057
|
-
|
|
5071
|
+
Sa,
|
|
5058
5072
|
{
|
|
5059
5073
|
onValueChange: (f) => n(f),
|
|
5060
5074
|
value: s,
|
|
5061
5075
|
children: [
|
|
5062
|
-
t.responses.length > 1 && /* @__PURE__ */ u.jsx(
|
|
5063
|
-
|
|
5076
|
+
t.responses.length > 1 && /* @__PURE__ */ u.jsx(Oa, { children: t.responses.map((f) => /* @__PURE__ */ u.jsx(
|
|
5077
|
+
Ta,
|
|
5064
5078
|
{
|
|
5065
5079
|
value: f.statusCode,
|
|
5066
5080
|
title: f.description ?? void 0,
|
|
@@ -5071,7 +5085,7 @@ const Fs = ({
|
|
|
5071
5085
|
/* @__PURE__ */ u.jsx("ul", { className: "list-none m-0 px-0", children: t.responses.map((f) => {
|
|
5072
5086
|
var g, b;
|
|
5073
5087
|
return /* @__PURE__ */ u.jsx(
|
|
5074
|
-
|
|
5088
|
+
Pa,
|
|
5075
5089
|
{
|
|
5076
5090
|
value: f.statusCode,
|
|
5077
5091
|
children: /* @__PURE__ */ u.jsx(
|
|
@@ -5090,7 +5104,7 @@ const Fs = ({
|
|
|
5090
5104
|
] })
|
|
5091
5105
|
] }),
|
|
5092
5106
|
/* @__PURE__ */ u.jsx(
|
|
5093
|
-
|
|
5107
|
+
nl,
|
|
5094
5108
|
{
|
|
5095
5109
|
selectedResponse: s,
|
|
5096
5110
|
onSelectResponse: n,
|
|
@@ -5103,10 +5117,10 @@ const Fs = ({
|
|
|
5103
5117
|
)
|
|
5104
5118
|
] });
|
|
5105
5119
|
};
|
|
5106
|
-
function
|
|
5120
|
+
function ro(e, r = 160) {
|
|
5107
5121
|
return e ? e.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/!\[.*?\]\(.*?\)/g, "").replace(/[_*`~]/g, "").replace(/^(?:>|\s*#+|-{3,}|\*{3,})/gm, "").replace(/[|>{}[\]]/g, "").replace(/\s+/g, " ").trim().substring(0, r).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : "";
|
|
5108
5122
|
}
|
|
5109
|
-
const
|
|
5123
|
+
const yl = Ge(
|
|
5110
5124
|
/* GraphQL */
|
|
5111
5125
|
`
|
|
5112
5126
|
fragment OperationsFragment on OperationItem {
|
|
@@ -5174,10 +5188,19 @@ const sl = tt(
|
|
|
5174
5188
|
}
|
|
5175
5189
|
}
|
|
5176
5190
|
`
|
|
5177
|
-
),
|
|
5191
|
+
), ml = Ge(
|
|
5192
|
+
/* GraphQL */
|
|
5193
|
+
`
|
|
5194
|
+
query SchemaWarmup($input: JSON!, $type: SchemaType!) {
|
|
5195
|
+
schema(input: $input, type: $type) {
|
|
5196
|
+
openapi
|
|
5197
|
+
}
|
|
5198
|
+
}
|
|
5199
|
+
`
|
|
5200
|
+
), gl = Ge(
|
|
5178
5201
|
/* GraphQL */
|
|
5179
5202
|
`
|
|
5180
|
-
query
|
|
5203
|
+
query OperationsForTag(
|
|
5181
5204
|
$input: JSON!
|
|
5182
5205
|
$type: SchemaType!
|
|
5183
5206
|
$tag: String
|
|
@@ -5203,21 +5226,25 @@ const sl = tt(
|
|
|
5203
5226
|
}
|
|
5204
5227
|
}
|
|
5205
5228
|
`
|
|
5206
|
-
),
|
|
5229
|
+
), Ml = ({
|
|
5207
5230
|
tag: e,
|
|
5208
5231
|
untagged: r
|
|
5209
5232
|
}) => {
|
|
5210
|
-
var
|
|
5211
|
-
const { input: t, type: o, versions: i, version: s, options: n } =
|
|
5233
|
+
var d;
|
|
5234
|
+
const { input: t, type: o, versions: i, version: s, options: n } = Pr(), a = et(gl, {
|
|
5212
5235
|
input: t,
|
|
5213
5236
|
type: o,
|
|
5214
5237
|
tag: e,
|
|
5215
5238
|
untagged: r
|
|
5216
|
-
}), l =
|
|
5239
|
+
}), l = Sr(a), {
|
|
5217
5240
|
data: { schema: c }
|
|
5218
|
-
} = l, { selectedServer: f } =
|
|
5219
|
-
|
|
5220
|
-
|
|
5241
|
+
} = l, { selectedServer: f } = Or(c.servers), g = c.title, b = c.summary, m = c.description, j = na(), v = c.operations, p = (d = c.tags.find((S) => S.name === e)) == null ? void 0 : d.description, h = et(ml, { input: t, type: o });
|
|
5242
|
+
_o({
|
|
5243
|
+
...h,
|
|
5244
|
+
enabled: typeof window < "u",
|
|
5245
|
+
notifyOnChangeProps: []
|
|
5246
|
+
}), Bo();
|
|
5247
|
+
const y = p ? ro(p) : b || (m ? ro(m) : void 0), O = Object.entries(i).length > 1, T = (n == null ? void 0 : n.showVersionSelect) === "always" || O && (n == null ? void 0 : n.showVersionSelect) !== "hide";
|
|
5221
5248
|
return /* @__PURE__ */ u.jsxs(
|
|
5222
5249
|
"div",
|
|
5223
5250
|
{
|
|
@@ -5225,15 +5252,15 @@ const sl = tt(
|
|
|
5225
5252
|
"data-pagefind-filter": "section:openapi",
|
|
5226
5253
|
"data-pagefind-meta": "section:openapi",
|
|
5227
5254
|
children: [
|
|
5228
|
-
/* @__PURE__ */ u.jsxs(
|
|
5255
|
+
/* @__PURE__ */ u.jsxs(Ho, { children: [
|
|
5229
5256
|
/* @__PURE__ */ u.jsx("title", { children: [e, g].filter(Boolean).join(" - ") }),
|
|
5230
|
-
|
|
5257
|
+
y && /* @__PURE__ */ u.jsx("meta", { name: "description", content: y })
|
|
5231
5258
|
] }),
|
|
5232
5259
|
/* @__PURE__ */ u.jsxs("div", { className: "mb-8", children: [
|
|
5233
|
-
/* @__PURE__ */ u.jsxs(
|
|
5260
|
+
/* @__PURE__ */ u.jsxs(io, { className: "w-full", children: [
|
|
5234
5261
|
/* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-y-4 sm:flex-row justify-around items-start sm:items-end", children: [
|
|
5235
5262
|
/* @__PURE__ */ u.jsxs("div", { className: "flex-1", children: [
|
|
5236
|
-
/* @__PURE__ */ u.jsx(
|
|
5263
|
+
/* @__PURE__ */ u.jsx(fa, { children: g }),
|
|
5237
5264
|
/* @__PURE__ */ u.jsxs(
|
|
5238
5265
|
_e,
|
|
5239
5266
|
{
|
|
@@ -5242,8 +5269,8 @@ const sl = tt(
|
|
|
5242
5269
|
registerSidebarAnchor: !0,
|
|
5243
5270
|
className: "mb-0",
|
|
5244
5271
|
children: [
|
|
5245
|
-
e,
|
|
5246
|
-
|
|
5272
|
+
e ?? "Other endpoints",
|
|
5273
|
+
T && /* @__PURE__ */ u.jsxs("span", { className: "text-xl text-muted-foreground ml-1.5", children: [
|
|
5247
5274
|
" ",
|
|
5248
5275
|
"(",
|
|
5249
5276
|
s,
|
|
@@ -5254,29 +5281,29 @@ const sl = tt(
|
|
|
5254
5281
|
)
|
|
5255
5282
|
] }),
|
|
5256
5283
|
/* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-4 sm:items-end", children: [
|
|
5257
|
-
|
|
5258
|
-
|
|
5284
|
+
T && /* @__PURE__ */ u.jsxs(
|
|
5285
|
+
ia,
|
|
5259
5286
|
{
|
|
5260
|
-
onValueChange: (
|
|
5287
|
+
onValueChange: (S) => j(i[S]),
|
|
5261
5288
|
defaultValue: s,
|
|
5262
|
-
disabled: !
|
|
5289
|
+
disabled: !O,
|
|
5263
5290
|
children: [
|
|
5264
|
-
/* @__PURE__ */ u.jsx(
|
|
5265
|
-
/* @__PURE__ */ u.jsx(
|
|
5291
|
+
/* @__PURE__ */ u.jsx(sa, { className: "w-[180px]", children: /* @__PURE__ */ u.jsx(la, { placeholder: "Select version" }) }),
|
|
5292
|
+
/* @__PURE__ */ u.jsx(ca, { children: Object.entries(i).map(([S]) => /* @__PURE__ */ u.jsx(ua, { value: S, children: S }, S)) })
|
|
5266
5293
|
]
|
|
5267
5294
|
}
|
|
5268
5295
|
),
|
|
5269
|
-
c.description && /* @__PURE__ */ u.jsxs(
|
|
5296
|
+
c.description && /* @__PURE__ */ u.jsxs(gr, { className: "flex items-center gap-1 text-sm font-medium text-muted-foreground group", children: [
|
|
5270
5297
|
/* @__PURE__ */ u.jsx("span", { children: "Schema description" }),
|
|
5271
5298
|
/* @__PURE__ */ u.jsx(
|
|
5272
|
-
|
|
5299
|
+
no,
|
|
5273
5300
|
{
|
|
5274
5301
|
className: "group-data-[state=open]:hidden translate-y-px",
|
|
5275
5302
|
size: 14
|
|
5276
5303
|
}
|
|
5277
5304
|
),
|
|
5278
5305
|
/* @__PURE__ */ u.jsx(
|
|
5279
|
-
|
|
5306
|
+
ta,
|
|
5280
5307
|
{
|
|
5281
5308
|
className: "group-data-[state=closed]:hidden translate-y-px",
|
|
5282
5309
|
size: 13
|
|
@@ -5285,7 +5312,7 @@ const sl = tt(
|
|
|
5285
5312
|
] })
|
|
5286
5313
|
] })
|
|
5287
5314
|
] }),
|
|
5288
|
-
c.description && /* @__PURE__ */ u.jsx(
|
|
5315
|
+
c.description && /* @__PURE__ */ u.jsx(so, { className: "CollapsibleContent", children: /* @__PURE__ */ u.jsx(
|
|
5289
5316
|
"div",
|
|
5290
5317
|
{
|
|
5291
5318
|
className: se(
|
|
@@ -5314,21 +5341,21 @@ const sl = tt(
|
|
|
5314
5341
|
)
|
|
5315
5342
|
] }),
|
|
5316
5343
|
/* @__PURE__ */ u.jsx("hr", {}),
|
|
5317
|
-
/* @__PURE__ */ u.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ u.jsx(
|
|
5318
|
-
v.map((
|
|
5319
|
-
|
|
5344
|
+
/* @__PURE__ */ u.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ u.jsx(Fa, {}) }),
|
|
5345
|
+
/* @__PURE__ */ u.jsx("div", { className: "px-6 -mx-6 [content-visibility:auto]", children: v.map((S) => /* @__PURE__ */ u.jsx(
|
|
5346
|
+
hl,
|
|
5320
5347
|
{
|
|
5321
5348
|
serverUrl: f,
|
|
5322
|
-
operationFragment:
|
|
5349
|
+
operationFragment: S
|
|
5323
5350
|
},
|
|
5324
|
-
|
|
5325
|
-
))
|
|
5351
|
+
S.slug
|
|
5352
|
+
)) })
|
|
5326
5353
|
]
|
|
5327
5354
|
}
|
|
5328
5355
|
);
|
|
5329
5356
|
};
|
|
5330
5357
|
export {
|
|
5331
|
-
|
|
5332
|
-
|
|
5358
|
+
Ml as OperationList,
|
|
5359
|
+
yl as OperationsFragment
|
|
5333
5360
|
};
|
|
5334
|
-
//# sourceMappingURL=OperationList-
|
|
5361
|
+
//# sourceMappingURL=OperationList-BjL1hzSx.js.map
|