zudoku 0.0.0-f631f92 → 0.0.0-f85b551
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/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +1 -2
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +2 -2
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +6 -9
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.d.ts +1 -2
- package/dist/lib/plugins/openapi/SidecarExamples.js +4 -7
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Badge.js +0 -1
- package/dist/lib/ui/Badge.js.map +1 -1
- package/lib/{OperationList-hmK4iSDx.js → OperationList-x4iASvL1.js} +1209 -1223
- package/lib/OperationList-x4iASvL1.js.map +1 -0
- package/lib/{index-Dj_3HYvP.js → index-jqTUVBbk.js} +2 -2
- package/lib/{index-Dj_3HYvP.js.map → index-jqTUVBbk.js.map} +1 -1
- package/lib/ui/Badge.js +0 -1
- package/lib/ui/Badge.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/lib/plugins/openapi/ParameterListItem.tsx +5 -1
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +2 -8
- package/src/lib/plugins/openapi/Sidecar.tsx +7 -14
- package/src/lib/plugins/openapi/SidecarBox.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +6 -14
- package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +1 -1
- package/src/lib/ui/Badge.tsx +0 -1
- package/lib/OperationList-hmK4iSDx.js.map +0 -1
|
@@ -4,14 +4,14 @@ import { H as Ro } from "./index.esm-BSV1C092.js";
|
|
|
4
4
|
import { b as qo, a as No } from "./chunk-D52XG6IA-Dl7HLe6j.js";
|
|
5
5
|
import { S as ko, a as Eo, b as Ao, c as Io, e as Lo } from "./Select-B_IxRUUC.js";
|
|
6
6
|
import { a as br } from "./state-CFQsUZUP.js";
|
|
7
|
-
import { C as
|
|
7
|
+
import { C as Fr } from "./CategoryHeading-CBconmtI.js";
|
|
8
8
|
import { I as Uo, M as Se, H as Be, P as qe } from "./Markdown-CZDLNOFc.js";
|
|
9
9
|
import { c as pe } from "./cn-qaFjX9_3.js";
|
|
10
10
|
import { CheckIcon as Fo, CopyIcon as _o, UnfoldVerticalIcon as Bo, FoldVerticalIcon as Ho, ChevronDownIcon as Mo, CircleFadingPlusIcon as zo, CircleDotIcon as Go, CircleIcon as Wo, SquareMinusIcon as Jo, SquarePlusIcon as Vo, ListPlusIcon as Do, RefreshCcwDotIcon as Qo } from "lucide-react";
|
|
11
|
-
import { useContext as Ko, useTransition as
|
|
11
|
+
import { useContext as Ko, useTransition as Zn, useState as ve, useRef as xr, useEffect as eo, useLayoutEffect as Yo, Fragment as Xo, useMemo as Zo, useCallback as ea } from "react";
|
|
12
12
|
import { Button as to } from "./ui/Button.js";
|
|
13
|
-
import { a as ta, u as
|
|
14
|
-
import { g as nt, S as Ze, C as ro, P as ra } from "./index-
|
|
13
|
+
import { a as ta, u as $r } from "./context-h_UkBLvr.js";
|
|
14
|
+
import { g as nt, S as Ze, C as ro, P as ra } from "./index-jqTUVBbk.js";
|
|
15
15
|
import { Tabs as na, TabsList as oa, TabsTrigger as aa, TabsContent as ia } from "./ui/Tabs.js";
|
|
16
16
|
import { a as sa } from "./StaggeredRender-DgsamH_G.js";
|
|
17
17
|
import { Card as $e, CardHeader as la, CardTitle as ca, CardContent as ua } from "./ui/Card.js";
|
|
@@ -19,14 +19,14 @@ import { c as fa } from "./index-CPNSgwSb.js";
|
|
|
19
19
|
import { g as pa, c as et, a as da } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
20
20
|
import { _ as ha } from "./__vite-browser-external-BYRIRx8p.js";
|
|
21
21
|
import { S as no } from "./SyntaxHighlight-Bz-lOJtH.js";
|
|
22
|
-
import { B as
|
|
22
|
+
import { B as _r } from "./Button-DeAoTouo.js";
|
|
23
23
|
import * as ye from "@radix-ui/react-collapsible";
|
|
24
24
|
import * as Ye from "@radix-ui/react-tabs";
|
|
25
25
|
import { C as ya } from "./index-TaRXY2w1.js";
|
|
26
26
|
function ma(e, n) {
|
|
27
27
|
return n;
|
|
28
28
|
}
|
|
29
|
-
const
|
|
29
|
+
const jr = (e, ...n) => {
|
|
30
30
|
const t = Ko(ta);
|
|
31
31
|
if (t === void 0)
|
|
32
32
|
throw new Error("useGraphQL must be used within a GraphQLProvider");
|
|
@@ -46,7 +46,7 @@ const wr = (e, ...n) => {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
`
|
|
49
|
-
),
|
|
49
|
+
), Br = ({ url: e }) => {
|
|
50
50
|
const [n, t] = ve(!1);
|
|
51
51
|
return /* @__PURE__ */ g.jsx(
|
|
52
52
|
to,
|
|
@@ -62,11 +62,11 @@ const wr = (e, ...n) => {
|
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
64
|
}, va = () => {
|
|
65
|
-
const { input: e, type: n } =
|
|
65
|
+
const { input: e, type: n } = $r(), t = jr(ga, { input: e, type: n }), o = vr(t), [, s] = Zn(), { selectedServer: l, setSelectedServer: r } = br(), { servers: a } = o.data.schema;
|
|
66
66
|
return a.length === 0 ? null : a.length === 1 ? /* @__PURE__ */ g.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
67
67
|
/* @__PURE__ */ g.jsx("span", { className: "font-medium text-sm", children: "Endpoint:" }),
|
|
68
68
|
/* @__PURE__ */ g.jsx(Uo, { className: "text-xs px-2 py-1.5", selectOnClick: !0, children: a[0].url }),
|
|
69
|
-
/* @__PURE__ */ g.jsx(
|
|
69
|
+
/* @__PURE__ */ g.jsx(Br, { url: a[0].url })
|
|
70
70
|
] }) : /* @__PURE__ */ g.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
71
71
|
/* @__PURE__ */ g.jsx("span", { className: "font-medium text-sm", children: "Endpoint" }),
|
|
72
72
|
/* @__PURE__ */ g.jsx(
|
|
@@ -76,7 +76,7 @@ const wr = (e, ...n) => {
|
|
|
76
76
|
onChange: (i) => s(() => {
|
|
77
77
|
r(i.target.value);
|
|
78
78
|
}),
|
|
79
|
-
value:
|
|
79
|
+
value: l ?? o.data.schema.url,
|
|
80
80
|
showChevrons: a.length > 1,
|
|
81
81
|
options: a.map((i) => ({
|
|
82
82
|
value: i.url,
|
|
@@ -84,7 +84,7 @@ const wr = (e, ...n) => {
|
|
|
84
84
|
}))
|
|
85
85
|
}
|
|
86
86
|
),
|
|
87
|
-
/* @__PURE__ */ g.jsx(
|
|
87
|
+
/* @__PURE__ */ g.jsx(Br, { url: l ?? o.data.schema.url })
|
|
88
88
|
] });
|
|
89
89
|
}, oo = (e, n) => e.reduce(
|
|
90
90
|
(t, o) => {
|
|
@@ -99,7 +99,6 @@ const wr = (e, ...n) => {
|
|
|
99
99
|
variant: {
|
|
100
100
|
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
101
101
|
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
102
|
-
muted: "bg-muted text-muted-foreground ",
|
|
103
102
|
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
104
103
|
outline: "text-foreground"
|
|
105
104
|
}
|
|
@@ -131,7 +130,7 @@ const $a = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
|
131
130
|
slug: t + "-" + e.name.toLocaleLowerCase()
|
|
132
131
|
}
|
|
133
132
|
) : e.name }),
|
|
134
|
-
o.type && /* @__PURE__ */ g.jsx(tt, { variant: "
|
|
133
|
+
o.type && /* @__PURE__ */ g.jsx(tt, { variant: "secondary", children: o.type === "array" ? `${o.items.type}[]` : o.type }),
|
|
135
134
|
e.required && /* @__PURE__ */ g.jsx(tt, { variant: "outline", children: "required" })
|
|
136
135
|
] }),
|
|
137
136
|
e.description && /* @__PURE__ */ g.jsx(
|
|
@@ -158,17 +157,17 @@ const $a = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
|
158
157
|
`${o.name}-${o.in}`
|
|
159
158
|
)) }) })
|
|
160
159
|
] });
|
|
161
|
-
var
|
|
160
|
+
var Hr = (e, n) => {
|
|
162
161
|
const t = e[n.name];
|
|
163
162
|
return t === void 0 ? (e[n.name] = n.value, e) : Array.isArray(t) ? (t.push(n.value), e) : (e[n.name] = [t, n.value], e);
|
|
164
|
-
},
|
|
163
|
+
}, Mr = "", zr = `
|
|
165
164
|
`, V = class {
|
|
166
165
|
/**
|
|
167
166
|
* Helper object to format and aggragate lines of code.
|
|
168
167
|
* Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
|
|
169
168
|
*/
|
|
170
169
|
constructor({ indent: e, join: n } = {}) {
|
|
171
|
-
this.postProcessors = [], this.code = [], this.indentationCharacter =
|
|
170
|
+
this.postProcessors = [], this.code = [], this.indentationCharacter = Mr, this.lineJoin = zr, this.indentLine = (t, o = 0) => `${this.indentationCharacter.repeat(o)}${t}`, this.unshift = (t, o) => {
|
|
172
171
|
const s = this.indentLine(t, o);
|
|
173
172
|
this.code.unshift(s);
|
|
174
173
|
}, this.push = (t, o) => {
|
|
@@ -178,57 +177,57 @@ var Mr = (e, n) => {
|
|
|
178
177
|
this.code.push("");
|
|
179
178
|
}, this.join = () => {
|
|
180
179
|
const t = this.code.join(this.lineJoin);
|
|
181
|
-
return this.postProcessors.reduce((s,
|
|
180
|
+
return this.postProcessors.reduce((s, l) => l(s), t);
|
|
182
181
|
}, this.addPostProcessor = (t) => {
|
|
183
182
|
this.postProcessors = [...this.postProcessors, t];
|
|
184
|
-
}, this.indentationCharacter = e ||
|
|
183
|
+
}, this.indentationCharacter = e || Mr, this.lineJoin = n ?? zr;
|
|
185
184
|
}
|
|
186
|
-
}, mt,
|
|
185
|
+
}, mt, Gr;
|
|
187
186
|
function Sa() {
|
|
188
|
-
return
|
|
187
|
+
return Gr || (Gr = 1, mt = function(e) {
|
|
189
188
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
190
189
|
}), mt;
|
|
191
190
|
}
|
|
192
|
-
var gt,
|
|
191
|
+
var gt, Wr;
|
|
193
192
|
function Oa() {
|
|
194
|
-
return
|
|
193
|
+
return Wr || (Wr = 1, gt = function(e) {
|
|
195
194
|
var n = typeof e;
|
|
196
195
|
return e !== null && (n === "object" || n === "function");
|
|
197
196
|
}), gt;
|
|
198
197
|
}
|
|
199
|
-
var Ke = {},
|
|
198
|
+
var Ke = {}, Jr;
|
|
200
199
|
function Ta() {
|
|
201
|
-
return
|
|
200
|
+
return Jr || (Jr = 1, Object.defineProperty(Ke, "__esModule", { value: !0 }), Ke.default = (e) => Object.getOwnPropertySymbols(e).filter((n) => Object.prototype.propertyIsEnumerable.call(e, n))), Ke;
|
|
202
201
|
}
|
|
203
|
-
var vt,
|
|
202
|
+
var vt, Vr;
|
|
204
203
|
function Ca() {
|
|
205
|
-
if (
|
|
206
|
-
|
|
204
|
+
if (Vr) return vt;
|
|
205
|
+
Vr = 1;
|
|
207
206
|
const e = Sa(), n = Oa(), t = Ta().default;
|
|
208
|
-
return vt = (o, s,
|
|
207
|
+
return vt = (o, s, l) => {
|
|
209
208
|
const r = [];
|
|
210
|
-
return function a(i,
|
|
211
|
-
|
|
209
|
+
return function a(i, c, p) {
|
|
210
|
+
c = c || {}, c.indent = c.indent || " ", p = p || "";
|
|
212
211
|
let f;
|
|
213
|
-
|
|
212
|
+
c.inlineCharacterLimit === void 0 ? f = {
|
|
214
213
|
newLine: `
|
|
215
214
|
`,
|
|
216
215
|
newLineOrSpace: `
|
|
217
216
|
`,
|
|
218
|
-
pad:
|
|
219
|
-
indent:
|
|
217
|
+
pad: p,
|
|
218
|
+
indent: p + c.indent
|
|
220
219
|
} : f = {
|
|
221
220
|
newLine: "@@__STRINGIFY_OBJECT_NEW_LINE__@@",
|
|
222
221
|
newLineOrSpace: "@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",
|
|
223
222
|
pad: "@@__STRINGIFY_OBJECT_PAD__@@",
|
|
224
223
|
indent: "@@__STRINGIFY_OBJECT_INDENT__@@"
|
|
225
224
|
};
|
|
226
|
-
const
|
|
227
|
-
if (
|
|
225
|
+
const u = (y) => {
|
|
226
|
+
if (c.inlineCharacterLimit === void 0)
|
|
228
227
|
return y;
|
|
229
228
|
const x = y.replace(new RegExp(f.newLine, "g"), "").replace(new RegExp(f.newLineOrSpace, "g"), " ").replace(new RegExp(f.pad + "|" + f.indent, "g"), "");
|
|
230
|
-
return x.length <=
|
|
231
|
-
`).replace(new RegExp(f.pad, "g"),
|
|
229
|
+
return x.length <= c.inlineCharacterLimit ? x : y.replace(new RegExp(f.newLine + "|" + f.newLineOrSpace, "g"), `
|
|
230
|
+
`).replace(new RegExp(f.pad, "g"), p).replace(new RegExp(f.indent, "g"), p + c.indent);
|
|
232
231
|
};
|
|
233
232
|
if (r.indexOf(i) !== -1)
|
|
234
233
|
return '"[Circular]"';
|
|
@@ -241,27 +240,27 @@ function Ca() {
|
|
|
241
240
|
return "[]";
|
|
242
241
|
r.push(i);
|
|
243
242
|
const y = "[" + f.newLine + i.map((x, $) => {
|
|
244
|
-
const
|
|
245
|
-
let m = a(x,
|
|
246
|
-
return
|
|
243
|
+
const h = i.length - 1 === $ ? f.newLine : "," + f.newLineOrSpace;
|
|
244
|
+
let m = a(x, c, p + c.indent);
|
|
245
|
+
return c.transform && (m = c.transform(i, $, m)), f.indent + m + h;
|
|
247
246
|
}).join("") + f.pad + "]";
|
|
248
|
-
return r.pop(),
|
|
247
|
+
return r.pop(), u(y);
|
|
249
248
|
}
|
|
250
249
|
if (n(i)) {
|
|
251
250
|
let y = Object.keys(i).concat(t(i));
|
|
252
|
-
if (
|
|
251
|
+
if (c.filter && (y = y.filter(($) => c.filter(i, $))), y.length === 0)
|
|
253
252
|
return "{}";
|
|
254
253
|
r.push(i);
|
|
255
|
-
const x = "{" + f.newLine + y.map(($,
|
|
256
|
-
const m = y.length - 1 ===
|
|
257
|
-
let
|
|
258
|
-
return
|
|
254
|
+
const x = "{" + f.newLine + y.map(($, h) => {
|
|
255
|
+
const m = y.length - 1 === h ? f.newLine : "," + f.newLineOrSpace, v = typeof $ == "symbol", w = !v && /^[a-z$_][a-z$_0-9]*$/i.test($), T = v || w ? $ : a($, c);
|
|
256
|
+
let d = a(i[$], c, p + c.indent);
|
|
257
|
+
return c.transform && (d = c.transform(i, $, d)), f.indent + String(T) + ": " + d + m;
|
|
259
258
|
}).join("") + f.pad + "}";
|
|
260
|
-
return r.pop(),
|
|
259
|
+
return r.pop(), u(x);
|
|
261
260
|
}
|
|
262
261
|
return i = String(i).replace(/[\r\n]/g, (y) => y === `
|
|
263
|
-
` ? "\\n" : "\\r"),
|
|
264
|
-
}(o, s,
|
|
262
|
+
` ? "\\n" : "\\r"), c.singleQuotes === !1 ? (i = i.replace(/"/g, '\\"'), `"${i}"`) : (i = i.replace(/\\?'/g, "\\'"), `'${i}'`);
|
|
263
|
+
}(o, s, l);
|
|
265
264
|
}, vt;
|
|
266
265
|
}
|
|
267
266
|
var Pa = Ca();
|
|
@@ -280,12 +279,12 @@ var ze = (e) => Me(e, { delimiter: "'" }), le = (e) => Me(e, { delimiter: '"' })
|
|
|
280
279
|
extname: ".c"
|
|
281
280
|
},
|
|
282
281
|
convert: ({ method: e, fullUrl: n, headersObj: t, allHeaders: o, postData: s }) => {
|
|
283
|
-
const { push:
|
|
284
|
-
|
|
282
|
+
const { push: l, blank: r, join: a } = new V();
|
|
283
|
+
l("CURL *hnd = curl_easy_init();"), r(), l(`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${e.toUpperCase()}");`), l("curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);"), l(`curl_easy_setopt(hnd, CURLOPT_URL, "${n}");`);
|
|
285
284
|
const i = Object.keys(t);
|
|
286
|
-
return i.length && (r(),
|
|
287
|
-
|
|
288
|
-
}),
|
|
285
|
+
return i.length && (r(), l("struct curl_slist *headers = NULL;"), i.forEach((c) => {
|
|
286
|
+
l(`headers = curl_slist_append(headers, "${c}: ${le(t[c])}");`);
|
|
287
|
+
}), l("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), o.cookie && (r(), l(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${o.cookie}");`)), s.text && (r(), l(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(s.text)});`)), r(), l("CURLcode ret = curl_easy_perform(hnd);"), a();
|
|
289
288
|
}
|
|
290
289
|
}, qa = {
|
|
291
290
|
info: {
|
|
@@ -303,7 +302,7 @@ var ze = (e) => Me(e, { delimiter: "'" }), le = (e) => Me(e, { delimiter: '"' })
|
|
|
303
302
|
return e[t];
|
|
304
303
|
}, ot = (e, n) => !!fe(e, n), Na = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
|
|
305
304
|
(n) => e.indexOf(n) > -1
|
|
306
|
-
),
|
|
305
|
+
), Dr = class {
|
|
307
306
|
constructor(e) {
|
|
308
307
|
this.name = "", this.toString = () => `:${this.name}`, this.name = e;
|
|
309
308
|
}
|
|
@@ -311,7 +310,7 @@ var ze = (e) => Me(e, { delimiter: "'" }), le = (e) => Me(e, { delimiter: '"' })
|
|
|
311
310
|
constructor(e) {
|
|
312
311
|
this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
|
|
313
312
|
}
|
|
314
|
-
}, ao = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), io = (e) => e === void 0 ? !0 : ao(e) === "object" ? Object.keys(e).length === 0 : !1,
|
|
313
|
+
}, ao = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), io = (e) => e === void 0 ? !0 : ao(e) === "object" ? Object.keys(e).length === 0 : !1, Qr = (e) => (Object.keys(e).filter((n) => io(e[n])).forEach((n) => {
|
|
315
314
|
delete e[n];
|
|
316
315
|
}), e), Xe = (e, n) => {
|
|
317
316
|
const t = " ".repeat(e);
|
|
@@ -352,65 +351,65 @@ ${t}`);
|
|
|
352
351
|
description: "An idiomatic clojure http client wrapping the apache client.",
|
|
353
352
|
extname: ".clj"
|
|
354
353
|
},
|
|
355
|
-
convert: ({ queryObj: e, method: n, postData: t, url: o, allHeaders: s },
|
|
356
|
-
const { push: r, join: a } = new V({ indent:
|
|
354
|
+
convert: ({ queryObj: e, method: n, postData: t, url: o, allHeaders: s }, l) => {
|
|
355
|
+
const { push: r, join: a } = new V({ indent: l == null ? void 0 : l.indent }), i = ["get", "post", "put", "delete", "patch", "head", "options"];
|
|
357
356
|
if (n = n.toLowerCase(), !i.includes(n))
|
|
358
357
|
return r("Method not supported"), a();
|
|
359
|
-
const
|
|
358
|
+
const c = {
|
|
360
359
|
headers: s,
|
|
361
360
|
"query-params": e
|
|
362
361
|
};
|
|
363
362
|
switch (t.mimeType) {
|
|
364
363
|
case "application/json":
|
|
365
364
|
{
|
|
366
|
-
|
|
367
|
-
const
|
|
368
|
-
|
|
365
|
+
c["content-type"] = new Dr("json"), c["form-params"] = t.jsonObj;
|
|
366
|
+
const p = fe(c.headers, "content-type");
|
|
367
|
+
p && delete c.headers[p];
|
|
369
368
|
}
|
|
370
369
|
break;
|
|
371
370
|
case "application/x-www-form-urlencoded":
|
|
372
371
|
{
|
|
373
|
-
|
|
374
|
-
const
|
|
375
|
-
|
|
372
|
+
c["form-params"] = t.paramsObj;
|
|
373
|
+
const p = fe(c.headers, "content-type");
|
|
374
|
+
p && delete c.headers[p];
|
|
376
375
|
}
|
|
377
376
|
break;
|
|
378
377
|
case "text/plain":
|
|
379
378
|
{
|
|
380
|
-
|
|
381
|
-
const
|
|
382
|
-
|
|
379
|
+
c.body = t.text;
|
|
380
|
+
const p = fe(c.headers, "content-type");
|
|
381
|
+
p && delete c.headers[p];
|
|
383
382
|
}
|
|
384
383
|
break;
|
|
385
384
|
case "multipart/form-data": {
|
|
386
385
|
if (t.params) {
|
|
387
|
-
|
|
386
|
+
c.multipart = t.params.map((f) => f.fileName && !f.value ? {
|
|
388
387
|
name: f.name,
|
|
389
388
|
content: new ka(f.fileName)
|
|
390
389
|
} : {
|
|
391
390
|
name: f.name,
|
|
392
391
|
content: f.value
|
|
393
392
|
});
|
|
394
|
-
const
|
|
395
|
-
|
|
393
|
+
const p = fe(c.headers, "content-type");
|
|
394
|
+
p && delete c.headers[p];
|
|
396
395
|
}
|
|
397
396
|
break;
|
|
398
397
|
}
|
|
399
398
|
}
|
|
400
|
-
switch (be(
|
|
399
|
+
switch (be(c.headers, "accept")) {
|
|
401
400
|
case "application/json":
|
|
402
401
|
{
|
|
403
|
-
|
|
404
|
-
const
|
|
405
|
-
|
|
402
|
+
c.accept = new Dr("json");
|
|
403
|
+
const p = fe(c.headers, "accept");
|
|
404
|
+
p && delete c.headers[p];
|
|
406
405
|
}
|
|
407
406
|
break;
|
|
408
407
|
}
|
|
409
408
|
if (r(`(require '[clj-http.client :as client])
|
|
410
|
-
`), io(
|
|
409
|
+
`), io(Qr(c)))
|
|
411
410
|
r(`(client/${n} "${o}")`);
|
|
412
411
|
else {
|
|
413
|
-
const
|
|
412
|
+
const p = 11 + n.length + o.length, f = Xe(p, yr(Qr(c)));
|
|
414
413
|
r(`(client/${n} "${o}" ${f})`);
|
|
415
414
|
}
|
|
416
415
|
return a();
|
|
@@ -433,8 +432,8 @@ ${t}`);
|
|
|
433
432
|
deflate: "DecompressionMethods.Deflate"
|
|
434
433
|
}, o = [];
|
|
435
434
|
return typeof n == "string" && (n = [n]), n.forEach((s) => {
|
|
436
|
-
s.split(",").forEach((
|
|
437
|
-
const r = /\s*([^;\s]+)/.exec(
|
|
435
|
+
s.split(",").forEach((l) => {
|
|
436
|
+
const r = /\s*([^;\s]+)/.exec(l);
|
|
438
437
|
if (r) {
|
|
439
438
|
const a = t[r[1]];
|
|
440
439
|
a && o.push(a);
|
|
@@ -451,17 +450,17 @@ ${t}`);
|
|
|
451
450
|
},
|
|
452
451
|
convert: ({ allHeaders: e, postData: n, method: t, fullUrl: o }, s) => {
|
|
453
452
|
var y, x;
|
|
454
|
-
const
|
|
453
|
+
const l = {
|
|
455
454
|
indent: " ",
|
|
456
455
|
...s
|
|
457
|
-
}, { push: r, join: a } = new V({ indent:
|
|
456
|
+
}, { push: r, join: a } = new V({ indent: l.indent });
|
|
458
457
|
r("using System.Net.Http.Headers;");
|
|
459
458
|
let i = "";
|
|
460
|
-
const
|
|
461
|
-
(
|
|
459
|
+
const c = !!e.cookie, p = Ia(e);
|
|
460
|
+
(c || p.length) && (i = "clientHandler", r("var clientHandler = new HttpClientHandler"), r("{"), c && r("UseCookies = false,", 1), p.length && r(`AutomaticDecompression = ${p.join(" | ")},`, 1), r("};")), r(`var client = new HttpClient(${i});`), r("var request = new HttpRequestMessage"), r("{");
|
|
462
461
|
const f = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
|
|
463
462
|
t = t.toUpperCase(), t && f.includes(t) ? t = `HttpMethod.${t[0]}${t.substring(1).toLowerCase()}` : t = `new HttpMethod("${t}")`, r(`Method = ${t},`, 1), r(`RequestUri = new Uri("${o}"),`, 1);
|
|
464
|
-
const
|
|
463
|
+
const u = Object.keys(e).filter(($) => {
|
|
465
464
|
switch ($.toLowerCase()) {
|
|
466
465
|
case "content-type":
|
|
467
466
|
case "content-length":
|
|
@@ -471,19 +470,19 @@ ${t}`);
|
|
|
471
470
|
return !0;
|
|
472
471
|
}
|
|
473
472
|
});
|
|
474
|
-
if (
|
|
473
|
+
if (u.length && (r("Headers =", 1), r("{", 1), u.forEach(($) => {
|
|
475
474
|
r(`{ "${$}", "${le(e[$])}" },`, 2);
|
|
476
475
|
}), r("},", 1)), n.text) {
|
|
477
476
|
const $ = n.mimeType;
|
|
478
477
|
switch ($) {
|
|
479
478
|
case "application/x-www-form-urlencoded":
|
|
480
|
-
r("Content = new FormUrlEncodedContent(new Dictionary<string, string>", 1), r("{", 1), (y = n.params) == null || y.forEach((
|
|
481
|
-
r(`{ "${
|
|
479
|
+
r("Content = new FormUrlEncodedContent(new Dictionary<string, string>", 1), r("{", 1), (y = n.params) == null || y.forEach((h) => {
|
|
480
|
+
r(`{ "${h.name}", "${h.value}" },`, 2);
|
|
482
481
|
}), r("}),", 1);
|
|
483
482
|
break;
|
|
484
483
|
case "multipart/form-data":
|
|
485
|
-
r("Content = new MultipartFormDataContent", 1), r("{", 1), (x = n.params) == null || x.forEach((
|
|
486
|
-
r(`new StringContent(${JSON.stringify(
|
|
484
|
+
r("Content = new MultipartFormDataContent", 1), r("{", 1), (x = n.params) == null || x.forEach((h) => {
|
|
485
|
+
r(`new StringContent(${JSON.stringify(h.value || "")})`, 2), r("{", 2), r("Headers =", 3), r("{", 3), h.contentType && r(`ContentType = new MediaTypeHeaderValue("${h.contentType}"),`, 4), r('ContentDisposition = new ContentDispositionHeaderValue("form-data")', 4), r("{", 4), r(`Name = "${h.name}",`, 5), h.fileName && r(`FileName = "${h.fileName}",`, 5), r("}", 4), r("}", 3), r("},", 2);
|
|
487
486
|
}), r("},", 1);
|
|
488
487
|
break;
|
|
489
488
|
default:
|
|
@@ -506,7 +505,7 @@ var Fa = {
|
|
|
506
505
|
extname: ".cs",
|
|
507
506
|
installation: "dotnet add package RestSharp"
|
|
508
507
|
},
|
|
509
|
-
convert: ({ method: e, fullUrl: n, headersObj: t, cookies: o, postData: s, uriObj:
|
|
508
|
+
convert: ({ method: e, fullUrl: n, headersObj: t, cookies: o, postData: s, uriObj: l }) => {
|
|
510
509
|
const { push: r, join: a } = new V();
|
|
511
510
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(
|
|
512
511
|
e.toUpperCase()
|
|
@@ -515,32 +514,32 @@ var Fa = {
|
|
|
515
514
|
r(`using RestSharp;
|
|
516
515
|
|
|
517
516
|
`), r(`var options = new RestClientOptions("${n}");`), r("var client = new RestClient(options);"), r('var request = new RestRequest("");');
|
|
518
|
-
const
|
|
519
|
-
switch (
|
|
520
|
-
if (s.mimeType &&
|
|
521
|
-
|
|
517
|
+
const c = s.mimeType && s.mimeType === "multipart/form-data";
|
|
518
|
+
switch (c && r("request.AlwaysMultipartFormData = true;"), Object.keys(t).forEach((p) => {
|
|
519
|
+
if (s.mimeType && p.toLowerCase() === "content-type" && s.text) {
|
|
520
|
+
c && s.boundary && r(`request.FormBoundary = "${s.boundary}";`);
|
|
522
521
|
return;
|
|
523
522
|
}
|
|
524
|
-
r(`request.AddHeader("${
|
|
525
|
-
}), o.forEach(({ name:
|
|
526
|
-
r(`request.AddCookie("${
|
|
523
|
+
r(`request.AddHeader("${p}", "${le(t[p])}");`);
|
|
524
|
+
}), o.forEach(({ name: p, value: f }) => {
|
|
525
|
+
r(`request.AddCookie("${p}", "${le(f)}", "${l.pathname}", "${l.host}");`);
|
|
527
526
|
}), s.mimeType) {
|
|
528
527
|
case "multipart/form-data":
|
|
529
528
|
if (!s.params) break;
|
|
530
|
-
s.params.forEach((
|
|
531
|
-
|
|
529
|
+
s.params.forEach((p) => {
|
|
530
|
+
p.fileName ? r(`request.AddFile("${p.name}", "${p.fileName}");`) : r(`request.AddParameter("${p.name}", "${p.value}");`);
|
|
532
531
|
});
|
|
533
532
|
break;
|
|
534
533
|
case "application/x-www-form-urlencoded":
|
|
535
534
|
if (!s.params) break;
|
|
536
|
-
s.params.forEach((
|
|
537
|
-
r(`request.AddParameter("${
|
|
535
|
+
s.params.forEach((p) => {
|
|
536
|
+
r(`request.AddParameter("${p.name}", "${p.value}");`);
|
|
538
537
|
});
|
|
539
538
|
break;
|
|
540
539
|
case "application/json": {
|
|
541
540
|
if (!s.text) break;
|
|
542
|
-
const
|
|
543
|
-
r(`request.AddJsonBody(${
|
|
541
|
+
const p = JSON.stringify(s.text);
|
|
542
|
+
r(`request.AddJsonBody(${p}, false);`);
|
|
544
543
|
break;
|
|
545
544
|
}
|
|
546
545
|
default:
|
|
@@ -571,14 +570,14 @@ var Fa = {
|
|
|
571
570
|
extname: ".go"
|
|
572
571
|
},
|
|
573
572
|
convert: ({ postData: e, method: n, allHeaders: t, fullUrl: o }, s = {}) => {
|
|
574
|
-
const { blank:
|
|
575
|
-
|
|
573
|
+
const { blank: l, push: r, join: a } = new V({ indent: " " }), { showBoilerplate: i = !0, checkErrors: c = !1, printBody: p = !0, timeout: f = -1 } = s, u = c ? "err" : "_", y = i ? 1 : 0, x = () => {
|
|
574
|
+
c && (r("if err != nil {", y), r("panic(err)", y + 1), r("}", y));
|
|
576
575
|
};
|
|
577
|
-
i && (r("package main"),
|
|
578
|
-
const $ = f > 0,
|
|
579
|
-
return
|
|
576
|
+
i && (r("package main"), l(), r("import ("), r('"fmt"', y), f > 0 && r('"time"', y), e.text && r('"strings"', y), r('"net/http"', y), p && r('"io"', y), r(")"), l(), r("func main() {"), l());
|
|
577
|
+
const $ = f > 0, h = $, m = h ? "client" : "http.DefaultClient";
|
|
578
|
+
return h && (r("client := http.Client{", y), $ && r(`Timeout: time.Duration(${f} * time.Second),`, y + 1), r("}", y), l()), r(`url := "${o}"`, y), l(), e.text ? (r(`payload := strings.NewReader(${JSON.stringify(e.text)})`, y), l(), r(`req, ${u} := http.NewRequest("${n}", url, payload)`, y), l()) : (r(`req, ${u} := http.NewRequest("${n}", url, nil)`, y), l()), x(), Object.keys(t).length && (Object.keys(t).forEach((v) => {
|
|
580
579
|
r(`req.Header.Add("${v}", "${le(t[v])}")`, y);
|
|
581
|
-
}),
|
|
580
|
+
}), l()), r(`res, ${u} := ${m}.Do(req)`, y), x(), p && (l(), r("defer res.Body.Close()", y), r(`body, ${u} := io.ReadAll(res.Body)`, y), x()), l(), p && r("fmt.Println(string(body))", y), i && (l(), r("}")), a();
|
|
582
581
|
}
|
|
583
582
|
}, Ha = {
|
|
584
583
|
info: {
|
|
@@ -590,7 +589,7 @@ var Fa = {
|
|
|
590
589
|
clientsById: {
|
|
591
590
|
native: Ba
|
|
592
591
|
}
|
|
593
|
-
},
|
|
592
|
+
}, Kr = `\r
|
|
594
593
|
`, Ma = {
|
|
595
594
|
info: {
|
|
596
595
|
key: "http1.1",
|
|
@@ -599,25 +598,25 @@ var Fa = {
|
|
|
599
598
|
description: "HTTP/1.1 request string in accordance with RFC 7230",
|
|
600
599
|
extname: null
|
|
601
600
|
},
|
|
602
|
-
convert: ({ method: e, fullUrl: n, uriObj: t, httpVersion: o, allHeaders: s, postData:
|
|
601
|
+
convert: ({ method: e, fullUrl: n, uriObj: t, httpVersion: o, allHeaders: s, postData: l }, r) => {
|
|
603
602
|
const a = {
|
|
604
603
|
absoluteURI: !1,
|
|
605
604
|
autoContentLength: !0,
|
|
606
605
|
autoHost: !0,
|
|
607
606
|
...r
|
|
608
|
-
}, { blank: i, push:
|
|
609
|
-
|
|
610
|
-
const
|
|
611
|
-
if (
|
|
612
|
-
const
|
|
613
|
-
|
|
614
|
-
}), a.autoHost && !
|
|
615
|
-
const
|
|
616
|
-
|
|
607
|
+
}, { blank: i, push: c, join: p } = new V({ indent: "", join: Kr }), f = a.absoluteURI ? n : t.path;
|
|
608
|
+
c(`${e} ${f} ${o}`);
|
|
609
|
+
const u = Object.keys(s);
|
|
610
|
+
if (u.forEach(($) => {
|
|
611
|
+
const h = $.toLowerCase().replace(/(^|-)(\w)/g, (m) => m.toUpperCase());
|
|
612
|
+
c(`${h}: ${s[$]}`);
|
|
613
|
+
}), a.autoHost && !u.includes("host") && c(`Host: ${t.host}`), a.autoContentLength && l.text && !u.includes("content-length")) {
|
|
614
|
+
const h = new TextEncoder().encode(l.text).length.toString();
|
|
615
|
+
c(`Content-Length: ${h}`);
|
|
617
616
|
}
|
|
618
617
|
i();
|
|
619
|
-
const y =
|
|
620
|
-
return `${y}${
|
|
618
|
+
const y = p(), x = l.text || "";
|
|
619
|
+
return `${y}${Kr}${x}`;
|
|
621
620
|
}
|
|
622
621
|
}, za = {
|
|
623
622
|
info: {
|
|
@@ -637,12 +636,12 @@ var Fa = {
|
|
|
637
636
|
extname: ".java"
|
|
638
637
|
},
|
|
639
638
|
convert: ({ method: e, allHeaders: n, postData: t, fullUrl: o }, s) => {
|
|
640
|
-
const
|
|
639
|
+
const l = {
|
|
641
640
|
indent: " ",
|
|
642
641
|
...s
|
|
643
|
-
}, { blank: r, push: a, join: i } = new V({ indent:
|
|
644
|
-
return a("AsyncHttpClient client = new DefaultAsyncHttpClient();"), a(`client.prepare("${e.toUpperCase()}", "${o}")`), Object.keys(n).forEach((
|
|
645
|
-
a(`.setHeader("${
|
|
642
|
+
}, { blank: r, push: a, join: i } = new V({ indent: l.indent });
|
|
643
|
+
return a("AsyncHttpClient client = new DefaultAsyncHttpClient();"), a(`client.prepare("${e.toUpperCase()}", "${o}")`), Object.keys(n).forEach((c) => {
|
|
644
|
+
a(`.setHeader("${c}", "${le(n[c])}")`, 1);
|
|
646
645
|
}), t.text && a(`.setBody(${JSON.stringify(t.text)})`, 1), a(".execute()", 1), a(".toCompletableFuture()", 1), a(".thenAccept(System.out::println)", 1), a(".join();", 1), r(), a("client.close();"), i();
|
|
647
646
|
}
|
|
648
647
|
}, Wa = {
|
|
@@ -654,10 +653,10 @@ var Fa = {
|
|
|
654
653
|
extname: ".java"
|
|
655
654
|
},
|
|
656
655
|
convert: ({ allHeaders: e, fullUrl: n, method: t, postData: o }, s) => {
|
|
657
|
-
const
|
|
656
|
+
const l = {
|
|
658
657
|
indent: " ",
|
|
659
658
|
...s
|
|
660
|
-
}, { push: r, join: a } = new V({ indent:
|
|
659
|
+
}, { push: r, join: a } = new V({ indent: l.indent });
|
|
661
660
|
return r("HttpRequest request = HttpRequest.newBuilder()"), r(`.uri(URI.create("${n}"))`, 2), Object.keys(e).forEach((i) => {
|
|
662
661
|
r(`.header("${i}", "${le(e[i])}")`, 2);
|
|
663
662
|
}), o.text ? r(
|
|
@@ -676,11 +675,11 @@ var Fa = {
|
|
|
676
675
|
extname: ".java"
|
|
677
676
|
},
|
|
678
677
|
convert: ({ postData: e, method: n, fullUrl: t, allHeaders: o }, s) => {
|
|
679
|
-
const
|
|
678
|
+
const l = {
|
|
680
679
|
indent: " ",
|
|
681
680
|
...s
|
|
682
|
-
}, { push: r, blank: a, join: i } = new V({ indent:
|
|
683
|
-
return r("OkHttpClient client = new OkHttpClient();"), a(), e.text && (e.boundary ? r(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : r(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), r(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), r("Request request = new Request.Builder()"), r(`.url("${t}")`, 1),
|
|
681
|
+
}, { push: r, blank: a, join: i } = new V({ indent: l.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], p = ["POST", "PUT", "DELETE", "PATCH"];
|
|
682
|
+
return r("OkHttpClient client = new OkHttpClient();"), a(), e.text && (e.boundary ? r(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : r(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), r(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), r("Request request = new Request.Builder()"), r(`.url("${t}")`, 1), c.includes(n.toUpperCase()) ? p.includes(n.toUpperCase()) ? e.text ? r(`.${n.toLowerCase()}(body)`, 1) : r(`.${n.toLowerCase()}(null)`, 1) : r(`.${n.toLowerCase()}()`, 1) : e.text ? r(`.method("${n.toUpperCase()}", body)`, 1) : r(`.method("${n.toUpperCase()}", null)`, 1), Object.keys(o).forEach((f) => {
|
|
684
683
|
r(`.addHeader("${f}", "${le(o[f])}")`, 1);
|
|
685
684
|
}), r(".build();", 1), a(), r("Response response = client.newCall(request).execute();"), i();
|
|
686
685
|
}
|
|
@@ -693,12 +692,12 @@ var Fa = {
|
|
|
693
692
|
extname: ".java"
|
|
694
693
|
},
|
|
695
694
|
convert: ({ method: e, allHeaders: n, postData: t, fullUrl: o }, s) => {
|
|
696
|
-
const
|
|
695
|
+
const l = {
|
|
697
696
|
indent: " ",
|
|
698
697
|
...s
|
|
699
|
-
}, { join: r, push: a } = new V({ indent:
|
|
700
|
-
return ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(e.toUpperCase()) ? a(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${o}")`) : a(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${o}")`), Object.keys(n).forEach((
|
|
701
|
-
a(`.header("${
|
|
698
|
+
}, { join: r, push: a } = new V({ indent: l.indent });
|
|
699
|
+
return ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(e.toUpperCase()) ? a(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${o}")`) : a(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${o}")`), Object.keys(n).forEach((c) => {
|
|
700
|
+
a(`.header("${c}", "${le(n[c])}")`, 1);
|
|
702
701
|
}), t.text && a(`.body(${JSON.stringify(t.text)})`, 1), a(".asString();", 1), r();
|
|
703
702
|
}
|
|
704
703
|
}, Da = {
|
|
@@ -722,11 +721,11 @@ var Fa = {
|
|
|
722
721
|
extname: ".js",
|
|
723
722
|
installation: "npm install axios --save"
|
|
724
723
|
},
|
|
725
|
-
convert: ({ allHeaders: e, method: n, url: t, queryObj: o, postData: s },
|
|
724
|
+
convert: ({ allHeaders: e, method: n, url: t, queryObj: o, postData: s }, l) => {
|
|
726
725
|
const r = {
|
|
727
726
|
indent: " ",
|
|
728
|
-
...
|
|
729
|
-
}, { blank: a, push: i, join:
|
|
727
|
+
...l
|
|
728
|
+
}, { blank: a, push: i, join: c, addPostProcessor: p } = new V({ indent: r.indent });
|
|
730
729
|
i("import axios from 'axios';"), a();
|
|
731
730
|
const f = {
|
|
732
731
|
method: n,
|
|
@@ -736,7 +735,7 @@ var Fa = {
|
|
|
736
735
|
case "application/x-www-form-urlencoded":
|
|
737
736
|
s.params && (i("const encodedParams = new URLSearchParams();"), s.params.forEach((y) => {
|
|
738
737
|
i(`encodedParams.set('${y.name}', '${y.value}');`);
|
|
739
|
-
}), a(), f.data = "encodedParams,",
|
|
738
|
+
}), a(), f.data = "encodedParams,", p((y) => y.replace(/'encodedParams,'/, "encodedParams,")));
|
|
740
739
|
break;
|
|
741
740
|
case "application/json":
|
|
742
741
|
s.jsonObj && (f.data = s.jsonObj);
|
|
@@ -751,11 +750,11 @@ var Fa = {
|
|
|
751
750
|
default:
|
|
752
751
|
s.text && (f.data = s.text);
|
|
753
752
|
}
|
|
754
|
-
const
|
|
753
|
+
const u = ue(f, {
|
|
755
754
|
indent: " ",
|
|
756
755
|
inlineCharacterLimit: 80
|
|
757
756
|
}).replace('"[form]"', "form");
|
|
758
|
-
return i(`const options = ${
|
|
757
|
+
return i(`const options = ${u};`), a(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), c();
|
|
759
758
|
}
|
|
760
759
|
}, Ka = {
|
|
761
760
|
info: {
|
|
@@ -766,46 +765,46 @@ var Fa = {
|
|
|
766
765
|
extname: ".js"
|
|
767
766
|
},
|
|
768
767
|
convert: ({ method: e, allHeaders: n, postData: t, fullUrl: o }, s) => {
|
|
769
|
-
const
|
|
768
|
+
const l = {
|
|
770
769
|
indent: " ",
|
|
771
770
|
credentials: null,
|
|
772
771
|
...s
|
|
773
|
-
}, { blank: r, join: a, push: i } = new V({ indent:
|
|
772
|
+
}, { blank: r, join: a, push: i } = new V({ indent: l.indent }), c = {
|
|
774
773
|
method: e
|
|
775
774
|
};
|
|
776
|
-
switch (Object.keys(n).length && (
|
|
775
|
+
switch (Object.keys(n).length && (c.headers = n), l.credentials !== null && (c.credentials = l.credentials), t.mimeType) {
|
|
777
776
|
case "application/x-www-form-urlencoded":
|
|
778
|
-
|
|
777
|
+
c.body = t.paramsObj ? t.paramsObj : t.text;
|
|
779
778
|
break;
|
|
780
779
|
case "application/json":
|
|
781
|
-
t.jsonObj && (
|
|
780
|
+
t.jsonObj && (c.body = t.jsonObj);
|
|
782
781
|
break;
|
|
783
782
|
case "multipart/form-data":
|
|
784
783
|
if (!t.params)
|
|
785
784
|
break;
|
|
786
|
-
const
|
|
787
|
-
|
|
785
|
+
const p = fe(n, "content-type");
|
|
786
|
+
p && delete n[p], i("const form = new FormData();"), t.params.forEach((f) => {
|
|
788
787
|
i(`form.append('${f.name}', '${f.value || f.fileName || ""}');`);
|
|
789
788
|
}), r();
|
|
790
789
|
break;
|
|
791
790
|
default:
|
|
792
|
-
t.text && (
|
|
791
|
+
t.text && (c.body = t.text);
|
|
793
792
|
}
|
|
794
|
-
return
|
|
795
|
-
`const options = ${ue(
|
|
796
|
-
indent:
|
|
793
|
+
return c.headers && !Object.keys(c.headers).length && delete c.headers, i(
|
|
794
|
+
`const options = ${ue(c, {
|
|
795
|
+
indent: l.indent,
|
|
797
796
|
inlineCharacterLimit: 80,
|
|
798
797
|
// The Fetch API body only accepts string parameters, but stringified JSON can be difficult
|
|
799
798
|
// to read, so we keep the object as a literal and use this transform function to wrap the
|
|
800
799
|
// literal in a `JSON.stringify` call.
|
|
801
|
-
transform: (
|
|
800
|
+
transform: (p, f, u) => {
|
|
802
801
|
if (f === "body") {
|
|
803
802
|
if (t.mimeType === "application/x-www-form-urlencoded")
|
|
804
|
-
return `new URLSearchParams(${
|
|
803
|
+
return `new URLSearchParams(${u})`;
|
|
805
804
|
if (t.mimeType === "application/json")
|
|
806
|
-
return `JSON.stringify(${
|
|
805
|
+
return `JSON.stringify(${u})`;
|
|
807
806
|
}
|
|
808
|
-
return
|
|
807
|
+
return u;
|
|
809
808
|
}
|
|
810
809
|
})};`
|
|
811
810
|
), r(), t.params && t.mimeType === "multipart/form-data" && (i("options.body = form;"), r()), i(`fetch('${o}', options)`), i(".then(response => response.json())", 1), i(".then(response => console.log(response))", 1), i(".catch(err => console.error(err));", 1), a();
|
|
@@ -820,10 +819,10 @@ var Fa = {
|
|
|
820
819
|
},
|
|
821
820
|
convert: ({ fullUrl: e, method: n, allHeaders: t, postData: o }, s) => {
|
|
822
821
|
var f;
|
|
823
|
-
const
|
|
822
|
+
const l = {
|
|
824
823
|
indent: " ",
|
|
825
824
|
...s
|
|
826
|
-
}, { blank: r, push: a, join: i } = new V({ indent:
|
|
825
|
+
}, { blank: r, push: a, join: i } = new V({ indent: l.indent }), c = {
|
|
827
826
|
async: !0,
|
|
828
827
|
crossDomain: !0,
|
|
829
828
|
url: e,
|
|
@@ -832,27 +831,27 @@ var Fa = {
|
|
|
832
831
|
};
|
|
833
832
|
switch (o.mimeType) {
|
|
834
833
|
case "application/x-www-form-urlencoded":
|
|
835
|
-
|
|
834
|
+
c.data = o.paramsObj ? o.paramsObj : o.text;
|
|
836
835
|
break;
|
|
837
836
|
case "application/json":
|
|
838
|
-
|
|
837
|
+
c.processData = !1, c.data = o.text;
|
|
839
838
|
break;
|
|
840
839
|
case "multipart/form-data":
|
|
841
840
|
if (!o.params)
|
|
842
841
|
break;
|
|
843
|
-
if (a("const form = new FormData();"), o.params.forEach((
|
|
844
|
-
a(`form.append('${
|
|
845
|
-
}),
|
|
846
|
-
const
|
|
847
|
-
|
|
842
|
+
if (a("const form = new FormData();"), o.params.forEach((u) => {
|
|
843
|
+
a(`form.append('${u.name}', '${u.value || u.fileName || ""}');`);
|
|
844
|
+
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]", ot(t, "content-type") && (f = be(t, "content-type")) != null && f.includes("boundary")) {
|
|
845
|
+
const u = fe(t, "content-type");
|
|
846
|
+
u && delete c.headers[u];
|
|
848
847
|
}
|
|
849
848
|
r();
|
|
850
849
|
break;
|
|
851
850
|
default:
|
|
852
|
-
o.text && (
|
|
851
|
+
o.text && (c.data = o.text);
|
|
853
852
|
}
|
|
854
|
-
const
|
|
855
|
-
return a(`const settings = ${
|
|
853
|
+
const p = ue(c, { indent: l.indent }).replace("'[form]'", "form");
|
|
854
|
+
return a(`const settings = ${p};`), r(), a("$.ajax(settings).done(function (response) {"), a("console.log(response);", 1), a("});"), i();
|
|
856
855
|
}
|
|
857
856
|
}, Xa = {
|
|
858
857
|
info: {
|
|
@@ -863,36 +862,36 @@ var Fa = {
|
|
|
863
862
|
extname: ".js"
|
|
864
863
|
},
|
|
865
864
|
convert: ({ postData: e, allHeaders: n, method: t, fullUrl: o }, s) => {
|
|
866
|
-
var
|
|
867
|
-
const
|
|
865
|
+
var c;
|
|
866
|
+
const l = {
|
|
868
867
|
indent: " ",
|
|
869
868
|
cors: !0,
|
|
870
869
|
...s
|
|
871
|
-
}, { blank: r, push: a, join: i } = new V({ indent:
|
|
870
|
+
}, { blank: r, push: a, join: i } = new V({ indent: l.indent });
|
|
872
871
|
switch (e.mimeType) {
|
|
873
872
|
case "application/json":
|
|
874
873
|
a(
|
|
875
874
|
`const data = JSON.stringify(${ue(e.jsonObj, {
|
|
876
|
-
indent:
|
|
875
|
+
indent: l.indent
|
|
877
876
|
})});`
|
|
878
877
|
), r();
|
|
879
878
|
break;
|
|
880
879
|
case "multipart/form-data":
|
|
881
880
|
if (!e.params)
|
|
882
881
|
break;
|
|
883
|
-
if (a("const data = new FormData();"), e.params.forEach((
|
|
884
|
-
a(`data.append('${
|
|
885
|
-
}), ot(n, "content-type") && (
|
|
886
|
-
const
|
|
887
|
-
|
|
882
|
+
if (a("const data = new FormData();"), e.params.forEach((p) => {
|
|
883
|
+
a(`data.append('${p.name}', '${p.value || p.fileName || ""}');`);
|
|
884
|
+
}), ot(n, "content-type") && (c = be(n, "content-type")) != null && c.includes("boundary")) {
|
|
885
|
+
const p = fe(n, "content-type");
|
|
886
|
+
p && delete n[p];
|
|
888
887
|
}
|
|
889
888
|
r();
|
|
890
889
|
break;
|
|
891
890
|
default:
|
|
892
891
|
a(`const data = ${e.text ? `'${e.text}'` : "null"};`), r();
|
|
893
892
|
}
|
|
894
|
-
return a("const xhr = new XMLHttpRequest();"),
|
|
895
|
-
a(`xhr.setRequestHeader('${
|
|
893
|
+
return a("const xhr = new XMLHttpRequest();"), l.cors && a("xhr.withCredentials = true;"), r(), a("xhr.addEventListener('readystatechange', function () {"), a("if (this.readyState === this.DONE) {", 1), a("console.log(this.responseText);", 2), a("}", 1), a("});"), r(), a(`xhr.open('${t}', '${o}');`), Object.keys(n).forEach((p) => {
|
|
894
|
+
a(`xhr.setRequestHeader('${p}', '${ze(n[p])}');`);
|
|
896
895
|
}), r(), a("xhr.send(data);"), i();
|
|
897
896
|
}
|
|
898
897
|
}, Za = {
|
|
@@ -932,8 +931,8 @@ var Fa = {
|
|
|
932
931
|
if (!e.params)
|
|
933
932
|
break;
|
|
934
933
|
const s = {};
|
|
935
|
-
e.params.forEach((
|
|
936
|
-
s[
|
|
934
|
+
e.params.forEach((l) => {
|
|
935
|
+
s[l.name] = l.value;
|
|
937
936
|
}), o = s;
|
|
938
937
|
break;
|
|
939
938
|
default:
|
|
@@ -959,11 +958,11 @@ var Fa = {
|
|
|
959
958
|
extname: ".kt"
|
|
960
959
|
},
|
|
961
960
|
convert: ({ postData: e, fullUrl: n, method: t, allHeaders: o }, s) => {
|
|
962
|
-
const
|
|
961
|
+
const l = {
|
|
963
962
|
indent: " ",
|
|
964
963
|
...s
|
|
965
|
-
}, { blank: r, join: a, push: i } = new V({ indent:
|
|
966
|
-
return i("val client = OkHttpClient()"), r(), e.text && (e.boundary ? i(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : i(`val mediaType = MediaType.parse("${e.mimeType}")`), i(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), i("val request = Request.Builder()"), i(`.url("${n}")`, 1),
|
|
964
|
+
}, { blank: r, join: a, push: i } = new V({ indent: l.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], p = ["POST", "PUT", "DELETE", "PATCH"];
|
|
965
|
+
return i("val client = OkHttpClient()"), r(), e.text && (e.boundary ? i(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : i(`val mediaType = MediaType.parse("${e.mimeType}")`), i(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), i("val request = Request.Builder()"), i(`.url("${n}")`, 1), c.includes(t.toUpperCase()) ? p.includes(t.toUpperCase()) ? e.text ? i(`.${t.toLowerCase()}(body)`, 1) : i(`.${t.toLowerCase()}(null)`, 1) : i(`.${t.toLowerCase()}()`, 1) : e.text ? i(`.method("${t.toUpperCase()}", body)`, 1) : i(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(o).forEach((f) => {
|
|
967
966
|
i(`.addHeader("${f}", "${le(o[f])}")`, 1);
|
|
968
967
|
}), i(".build()", 1), r(), i("val response = client.newCall(request).execute()"), a();
|
|
969
968
|
}
|
|
@@ -986,28 +985,28 @@ var Fa = {
|
|
|
986
985
|
installation: "npm install axios --save"
|
|
987
986
|
},
|
|
988
987
|
convert: ({ method: e, fullUrl: n, allHeaders: t, postData: o }, s) => {
|
|
989
|
-
const
|
|
988
|
+
const l = {
|
|
990
989
|
indent: " ",
|
|
991
990
|
...s
|
|
992
|
-
}, { blank: r, join: a, push: i, addPostProcessor:
|
|
991
|
+
}, { blank: r, join: a, push: i, addPostProcessor: c } = new V({ indent: l.indent });
|
|
993
992
|
i("const axios = require('axios');");
|
|
994
|
-
const
|
|
993
|
+
const p = {
|
|
995
994
|
method: e,
|
|
996
995
|
url: n
|
|
997
996
|
};
|
|
998
|
-
switch (Object.keys(t).length && (
|
|
997
|
+
switch (Object.keys(t).length && (p.headers = t), o.mimeType) {
|
|
999
998
|
case "application/x-www-form-urlencoded":
|
|
1000
|
-
o.params && (i("const { URLSearchParams } = require('url');"), r(), i("const encodedParams = new URLSearchParams();"), o.params.forEach((
|
|
1001
|
-
i(`encodedParams.set('${
|
|
1002
|
-
}), r(),
|
|
999
|
+
o.params && (i("const { URLSearchParams } = require('url');"), r(), i("const encodedParams = new URLSearchParams();"), o.params.forEach((u) => {
|
|
1000
|
+
i(`encodedParams.set('${u.name}', '${u.value}');`);
|
|
1001
|
+
}), r(), p.data = "encodedParams,", c((u) => u.replace(/'encodedParams,'/, "encodedParams,")));
|
|
1003
1002
|
break;
|
|
1004
1003
|
case "application/json":
|
|
1005
|
-
r(), o.jsonObj && (
|
|
1004
|
+
r(), o.jsonObj && (p.data = o.jsonObj);
|
|
1006
1005
|
break;
|
|
1007
1006
|
default:
|
|
1008
|
-
r(), o.text && (
|
|
1007
|
+
r(), o.text && (p.data = o.text);
|
|
1009
1008
|
}
|
|
1010
|
-
const f = ue(
|
|
1009
|
+
const f = ue(p, { indent: " ", inlineCharacterLimit: 80 });
|
|
1011
1010
|
return i(`const options = ${f};`), r(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), a();
|
|
1012
1011
|
}
|
|
1013
1012
|
}, ai = {
|
|
@@ -1019,22 +1018,22 @@ var Fa = {
|
|
|
1019
1018
|
extname: ".cjs",
|
|
1020
1019
|
installation: "npm install node-fetch@2 --save"
|
|
1021
1020
|
},
|
|
1022
|
-
convert: ({ method: e, fullUrl: n, postData: t, headersObj: o, cookies: s },
|
|
1021
|
+
convert: ({ method: e, fullUrl: n, postData: t, headersObj: o, cookies: s }, l) => {
|
|
1023
1022
|
var $;
|
|
1024
1023
|
const r = {
|
|
1025
1024
|
indent: " ",
|
|
1026
|
-
...
|
|
1025
|
+
...l
|
|
1027
1026
|
};
|
|
1028
1027
|
let a = !1;
|
|
1029
|
-
const { blank: i, push:
|
|
1030
|
-
|
|
1031
|
-
const
|
|
1028
|
+
const { blank: i, push: c, join: p, unshift: f } = new V({ indent: r.indent });
|
|
1029
|
+
c("const fetch = require('node-fetch');");
|
|
1030
|
+
const u = n, y = {
|
|
1032
1031
|
method: e
|
|
1033
1032
|
};
|
|
1034
1033
|
switch (Object.keys(o).length && (y.headers = o), t.mimeType) {
|
|
1035
1034
|
case "application/x-www-form-urlencoded":
|
|
1036
|
-
f("const { URLSearchParams } = require('url');"),
|
|
1037
|
-
|
|
1035
|
+
f("const { URLSearchParams } = require('url');"), c("const encodedParams = new URLSearchParams();"), i(), ($ = t.params) == null || $.forEach((m) => {
|
|
1036
|
+
c(`encodedParams.set('${m.name}', '${m.value}');`);
|
|
1038
1037
|
}), y.body = "encodedParams";
|
|
1039
1038
|
break;
|
|
1040
1039
|
case "application/json":
|
|
@@ -1043,32 +1042,32 @@ var Fa = {
|
|
|
1043
1042
|
case "multipart/form-data":
|
|
1044
1043
|
if (!t.params)
|
|
1045
1044
|
break;
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1045
|
+
const h = fe(o, "content-type");
|
|
1046
|
+
h && delete o[h], f("const FormData = require('form-data');"), c("const formData = new FormData();"), i(), t.params.forEach((m) => {
|
|
1048
1047
|
if (!m.fileName && !m.fileName && !m.contentType) {
|
|
1049
|
-
|
|
1048
|
+
c(`formData.append('${m.name}', '${m.value}');`);
|
|
1050
1049
|
return;
|
|
1051
1050
|
}
|
|
1052
|
-
m.fileName && (a = !0,
|
|
1051
|
+
m.fileName && (a = !0, c(`formData.append('${m.name}', fs.createReadStream('${m.fileName}'));`));
|
|
1053
1052
|
});
|
|
1054
1053
|
break;
|
|
1055
1054
|
default:
|
|
1056
1055
|
t.text && (y.body = t.text);
|
|
1057
1056
|
}
|
|
1058
1057
|
if (s.length) {
|
|
1059
|
-
const
|
|
1060
|
-
y.headers || (y.headers = {}), y.headers.cookie =
|
|
1058
|
+
const h = s.map(({ name: m, value: v }) => `${encodeURIComponent(m)}=${encodeURIComponent(v)}`).join("; ");
|
|
1059
|
+
y.headers || (y.headers = {}), y.headers.cookie = h;
|
|
1061
1060
|
}
|
|
1062
|
-
i(),
|
|
1061
|
+
i(), c(`const url = '${u}';`), y.headers && !Object.keys(y.headers).length && delete y.headers;
|
|
1063
1062
|
const x = ue(y, {
|
|
1064
1063
|
indent: " ",
|
|
1065
1064
|
inlineCharacterLimit: 80,
|
|
1066
1065
|
// The Fetch API body only accepts string parameters, but stringified JSON can be difficult to
|
|
1067
1066
|
// read, so we keep the object as a literal and use this transform function to wrap the literal
|
|
1068
1067
|
// in a `JSON.stringify` call.
|
|
1069
|
-
transform: (
|
|
1068
|
+
transform: (h, m, v) => m === "body" && t.mimeType === "application/json" ? `JSON.stringify(${v})` : v
|
|
1070
1069
|
});
|
|
1071
|
-
return
|
|
1070
|
+
return c(`const options = ${x};`), i(), a && f("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (c("options.body = formData;"), i()), c("fetch(url, options)"), c(".then(res => res.json())", 1), c(".then(json => console.log(json))", 1), c(".catch(err => console.error('error:' + err));", 1), p().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
|
|
1072
1071
|
}
|
|
1073
1072
|
}, ii = {
|
|
1074
1073
|
info: {
|
|
@@ -1080,16 +1079,16 @@ var Fa = {
|
|
|
1080
1079
|
},
|
|
1081
1080
|
convert: ({ uriObj: e, method: n, allHeaders: t, postData: o }, s = {}) => {
|
|
1082
1081
|
var f;
|
|
1083
|
-
const { indent:
|
|
1082
|
+
const { indent: l = " " } = s, { blank: r, join: a, push: i, unshift: c } = new V({ indent: l }), p = {
|
|
1084
1083
|
method: n,
|
|
1085
1084
|
hostname: e.hostname,
|
|
1086
1085
|
port: e.port,
|
|
1087
1086
|
path: e.path,
|
|
1088
1087
|
headers: t
|
|
1089
1088
|
};
|
|
1090
|
-
switch (i(`const http = require('${(f = e.protocol) == null ? void 0 : f.replace(":", "")}');`), r(), i(`const options = ${ue(
|
|
1089
|
+
switch (i(`const http = require('${(f = e.protocol) == null ? void 0 : f.replace(":", "")}');`), r(), i(`const options = ${ue(p, { indent: l })};`), r(), i("const req = http.request(options, function (res) {"), i("const chunks = [];", 1), r(), i("res.on('data', function (chunk) {", 1), i("chunks.push(chunk);", 2), i("});", 1), r(), i("res.on('end', function () {", 1), i("const body = Buffer.concat(chunks);", 2), i("console.log(body.toString());", 2), i("});", 1), i("});"), r(), o.mimeType) {
|
|
1091
1090
|
case "application/x-www-form-urlencoded":
|
|
1092
|
-
o.paramsObj && (
|
|
1091
|
+
o.paramsObj && (c("const qs = require('querystring');"), i(
|
|
1093
1092
|
`req.write(qs.stringify(${ue(o.paramsObj, {
|
|
1094
1093
|
indent: " ",
|
|
1095
1094
|
inlineCharacterLimit: 80
|
|
@@ -1105,7 +1104,7 @@ var Fa = {
|
|
|
1105
1104
|
);
|
|
1106
1105
|
break;
|
|
1107
1106
|
default:
|
|
1108
|
-
o.text && i(`req.write(${ue(o.text, { indent:
|
|
1107
|
+
o.text && i(`req.write(${ue(o.text, { indent: l })});`);
|
|
1109
1108
|
}
|
|
1110
1109
|
return i("req.end();"), a();
|
|
1111
1110
|
}
|
|
@@ -1118,14 +1117,14 @@ var Fa = {
|
|
|
1118
1117
|
extname: ".cjs",
|
|
1119
1118
|
installation: "npm install request --save"
|
|
1120
1119
|
},
|
|
1121
|
-
convert: ({ method: e, url: n, fullUrl: t, postData: o, headersObj: s, cookies:
|
|
1120
|
+
convert: ({ method: e, url: n, fullUrl: t, postData: o, headersObj: s, cookies: l }, r) => {
|
|
1122
1121
|
const a = {
|
|
1123
1122
|
indent: " ",
|
|
1124
1123
|
...r
|
|
1125
1124
|
};
|
|
1126
1125
|
let i = !1;
|
|
1127
|
-
const { push:
|
|
1128
|
-
|
|
1126
|
+
const { push: c, blank: p, join: f, unshift: u, addPostProcessor: y } = new V({ indent: a.indent });
|
|
1127
|
+
c("const request = require('request');"), p();
|
|
1129
1128
|
const x = {
|
|
1130
1129
|
method: e,
|
|
1131
1130
|
url: t
|
|
@@ -1145,22 +1144,22 @@ var Fa = {
|
|
|
1145
1144
|
x.formData[$.name] = $.value;
|
|
1146
1145
|
return;
|
|
1147
1146
|
}
|
|
1148
|
-
let
|
|
1149
|
-
$.fileName ? (i = !0,
|
|
1147
|
+
let h = {};
|
|
1148
|
+
$.fileName ? (i = !0, h = {
|
|
1150
1149
|
value: `fs.createReadStream(${$.fileName})`,
|
|
1151
1150
|
options: {
|
|
1152
1151
|
filename: $.fileName,
|
|
1153
1152
|
contentType: $.contentType ? $.contentType : null
|
|
1154
1153
|
}
|
|
1155
|
-
}) : $.value && (
|
|
1154
|
+
}) : $.value && (h.value = $.value), x.formData[$.name] = h;
|
|
1156
1155
|
}), y(($) => $.replace(/'fs\.createReadStream\((.*)\)'/, "fs.createReadStream('$1')"));
|
|
1157
1156
|
break;
|
|
1158
1157
|
default:
|
|
1159
1158
|
o.text && (x.body = o.text);
|
|
1160
1159
|
}
|
|
1161
|
-
return
|
|
1162
|
-
|
|
1163
|
-
}),
|
|
1160
|
+
return l.length && (x.jar = "JAR", c("const jar = request.jar();"), l.forEach(({ name: $, value: h }) => {
|
|
1161
|
+
c(`jar.setCookie(request.cookie('${encodeURIComponent($)}=${encodeURIComponent(h)}'), '${n}');`);
|
|
1162
|
+
}), p(), y(($) => $.replace(/'JAR'/, "jar"))), i && u("const fs = require('fs');"), c(`const options = ${ue(x, { indent: " ", inlineCharacterLimit: 80 })};`), p(), c("request(options, function (error, response, body) {"), c("if (error) throw new Error(error);", 1), p(), c("console.log(body);", 1), c("});"), f();
|
|
1164
1163
|
}
|
|
1165
1164
|
}, li = {
|
|
1166
1165
|
info: {
|
|
@@ -1170,38 +1169,38 @@ var Fa = {
|
|
|
1170
1169
|
description: "Lightweight HTTP Request Client Library",
|
|
1171
1170
|
extname: ".cjs"
|
|
1172
1171
|
},
|
|
1173
|
-
convert: ({ method: e, url: n, cookies: t, queryObj: o, postData: s, headersObj:
|
|
1172
|
+
convert: ({ method: e, url: n, cookies: t, queryObj: o, postData: s, headersObj: l }, r) => {
|
|
1174
1173
|
const a = {
|
|
1175
1174
|
indent: " ",
|
|
1176
1175
|
...r
|
|
1177
1176
|
};
|
|
1178
1177
|
let i = !1;
|
|
1179
|
-
const { addPostProcessor:
|
|
1178
|
+
const { addPostProcessor: c, blank: p, join: f, push: u, unshift: y } = new V({
|
|
1180
1179
|
indent: a.indent
|
|
1181
1180
|
});
|
|
1182
|
-
switch (
|
|
1183
|
-
|
|
1184
|
-
}),
|
|
1181
|
+
switch (u("const unirest = require('unirest');"), p(), u(`const req = unirest('${e}', '${n}');`), p(), t.length && (u("const CookieJar = unirest.jar();"), t.forEach((x) => {
|
|
1182
|
+
u(`CookieJar.add('${encodeURIComponent(x.name)}=${encodeURIComponent(x.value)}', '${n}');`);
|
|
1183
|
+
}), u("req.jar(CookieJar);"), p()), Object.keys(o).length && (u(`req.query(${ue(o, { indent: a.indent })});`), p()), Object.keys(l).length && (u(`req.headers(${ue(l, { indent: a.indent })});`), p()), s.mimeType) {
|
|
1185
1184
|
case "application/x-www-form-urlencoded":
|
|
1186
|
-
s.paramsObj && (
|
|
1185
|
+
s.paramsObj && (u(`req.form(${ue(s.paramsObj, { indent: a.indent })});`), p());
|
|
1187
1186
|
break;
|
|
1188
1187
|
case "application/json":
|
|
1189
|
-
s.jsonObj && (
|
|
1188
|
+
s.jsonObj && (u("req.type('json');"), u(`req.send(${ue(s.jsonObj, { indent: a.indent })});`), p());
|
|
1190
1189
|
break;
|
|
1191
1190
|
case "multipart/form-data": {
|
|
1192
1191
|
if (!s.params)
|
|
1193
1192
|
break;
|
|
1194
1193
|
const x = [];
|
|
1195
1194
|
s.params.forEach(($) => {
|
|
1196
|
-
const
|
|
1197
|
-
$.fileName && !$.value ? (i = !0,
|
|
1198
|
-
}),
|
|
1195
|
+
const h = {};
|
|
1196
|
+
$.fileName && !$.value ? (i = !0, h.body = `fs.createReadStream('${$.fileName}')`, c((m) => m.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : $.value && (h.body = $.value), h.body && ($.contentType && (h["content-type"] = $.contentType), x.push(h));
|
|
1197
|
+
}), u(`req.multipart(${ue(x, { indent: a.indent })});`), p();
|
|
1199
1198
|
break;
|
|
1200
1199
|
}
|
|
1201
1200
|
default:
|
|
1202
|
-
s.text && (
|
|
1201
|
+
s.text && (u(`req.send(${ue(s.text, { indent: a.indent })});`), p());
|
|
1203
1202
|
}
|
|
1204
|
-
return i && y("const fs = require('fs');"),
|
|
1203
|
+
return i && y("const fs = require('fs');"), u("req.end(function (res) {"), u("if (res.error) throw new Error(res.error);", 1), p(), u("console.log(res.body);", 1), u("});"), f();
|
|
1205
1204
|
}
|
|
1206
1205
|
}, ci = {
|
|
1207
1206
|
info: {
|
|
@@ -1218,8 +1217,8 @@ var Fa = {
|
|
|
1218
1217
|
fetch: ai
|
|
1219
1218
|
}
|
|
1220
1219
|
}, bt = (e, n, t, o) => {
|
|
1221
|
-
const s = `${e} *${n} = `,
|
|
1222
|
-
return `${s}${
|
|
1220
|
+
const s = `${e} *${n} = `, l = mr(t, o ? s.length : void 0);
|
|
1221
|
+
return `${s}${l};`;
|
|
1223
1222
|
}, mr = (e, n) => {
|
|
1224
1223
|
const t = n === void 0 ? ", " : `,
|
|
1225
1224
|
${" ".repeat(n)}`;
|
|
@@ -1248,35 +1247,35 @@ var Fa = {
|
|
|
1248
1247
|
extname: ".m"
|
|
1249
1248
|
},
|
|
1250
1249
|
convert: ({ allHeaders: e, postData: n, method: t, fullUrl: o }, s) => {
|
|
1251
|
-
var
|
|
1252
|
-
const
|
|
1250
|
+
var p;
|
|
1251
|
+
const l = {
|
|
1253
1252
|
indent: " ",
|
|
1254
1253
|
pretty: !0,
|
|
1255
1254
|
timeout: 10,
|
|
1256
1255
|
...s
|
|
1257
|
-
}, { push: r, join: a, blank: i } = new V({ indent:
|
|
1256
|
+
}, { push: r, join: a, blank: i } = new V({ indent: l.indent }), c = {
|
|
1258
1257
|
hasHeaders: !1,
|
|
1259
1258
|
hasBody: !1
|
|
1260
1259
|
};
|
|
1261
|
-
if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (
|
|
1262
|
-
switch (
|
|
1260
|
+
if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, i(), r(bt("NSDictionary", "headers", e, l.pretty))), n.text || n.jsonObj || n.params)
|
|
1261
|
+
switch (c.hasBody = !0, n.mimeType) {
|
|
1263
1262
|
case "application/x-www-form-urlencoded":
|
|
1264
|
-
if ((
|
|
1263
|
+
if ((p = n.params) != null && p.length) {
|
|
1265
1264
|
i();
|
|
1266
|
-
const [f, ...
|
|
1265
|
+
const [f, ...u] = n.params;
|
|
1267
1266
|
r(
|
|
1268
1267
|
`NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${f.name}=${f.value}" dataUsingEncoding:NSUTF8StringEncoding]];`
|
|
1269
|
-
),
|
|
1268
|
+
), u.forEach(({ name: y, value: x }) => {
|
|
1270
1269
|
r(`[postData appendData:[@"&${y}=${x}" dataUsingEncoding:NSUTF8StringEncoding]];`);
|
|
1271
1270
|
});
|
|
1272
1271
|
} else
|
|
1273
|
-
|
|
1272
|
+
c.hasBody = !1;
|
|
1274
1273
|
break;
|
|
1275
1274
|
case "application/json":
|
|
1276
|
-
n.jsonObj && (r(bt("NSDictionary", "parameters", n.jsonObj,
|
|
1275
|
+
n.jsonObj && (r(bt("NSDictionary", "parameters", n.jsonObj, l.pretty)), i(), r("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
|
|
1277
1276
|
break;
|
|
1278
1277
|
case "multipart/form-data":
|
|
1279
|
-
r(bt("NSArray", "parameters", n.params || [],
|
|
1278
|
+
r(bt("NSArray", "parameters", n.params || [], l.pretty)), r(`NSString *boundary = @"${n.boundary}";`), i(), r("NSError *error;"), r("NSMutableString *body = [NSMutableString string];"), r("for (NSDictionary *param in parameters) {"), r('[body appendFormat:@"--%@\\r\\n", boundary];', 1), r('if (param[@"fileName"]) {', 1), r(
|
|
1280
1279
|
'[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"; filename=\\"%@\\"\\r\\n", param[@"name"], param[@"fileName"]];',
|
|
1281
1280
|
2
|
|
1282
1281
|
), r('[body appendFormat:@"Content-Type: %@\\r\\n\\r\\n", param[@"contentType"]];', 2), r(
|
|
@@ -1289,7 +1288,7 @@ var Fa = {
|
|
|
1289
1288
|
`NSData *postData = [[NSData alloc] initWithData:[@"${n.text}" dataUsingEncoding:NSUTF8StringEncoding]];`
|
|
1290
1289
|
);
|
|
1291
1290
|
}
|
|
1292
|
-
return i(), r(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${o}"]`), r(" cachePolicy:NSURLRequestUseProtocolCachePolicy"), r(` timeoutInterval:${
|
|
1291
|
+
return i(), r(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${o}"]`), r(" cachePolicy:NSURLRequestUseProtocolCachePolicy"), r(` timeoutInterval:${l.timeout.toFixed(1)}];`), r(`[request setHTTPMethod:@"${t}"];`), c.hasHeaders && r("[request setAllHTTPHeaderFields:headers];"), c.hasBody && r("[request setHTTPBody:postData];"), i(), r("NSURLSession *session = [NSURLSession sharedSession];"), r("NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request"), r(
|
|
1293
1292
|
" completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {"
|
|
1294
1293
|
), r(" if (error) {", 1), r(' NSLog(@"%@", error);', 2), r(" } else {", 1), r(
|
|
1295
1294
|
" NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;",
|
|
@@ -1315,21 +1314,21 @@ var Fa = {
|
|
|
1315
1314
|
installation: "opam install cohttp-lwt-unix cohttp-async"
|
|
1316
1315
|
},
|
|
1317
1316
|
convert: ({ fullUrl: e, allHeaders: n, postData: t, method: o }, s) => {
|
|
1318
|
-
const
|
|
1317
|
+
const l = {
|
|
1319
1318
|
indent: " ",
|
|
1320
1319
|
...s
|
|
1321
|
-
}, r = ["get", "post", "head", "delete", "patch", "put", "options"], { push: a, blank: i, join:
|
|
1320
|
+
}, r = ["get", "post", "head", "delete", "patch", "put", "options"], { push: a, blank: i, join: c } = new V({ indent: l.indent });
|
|
1322
1321
|
a("open Cohttp_lwt_unix"), a("open Cohttp"), a("open Lwt"), i(), a(`let uri = Uri.of_string "${e}" in`);
|
|
1323
|
-
const
|
|
1324
|
-
|
|
1325
|
-
`let headers = Header.add (Header.init ()) "${
|
|
1326
|
-
n[
|
|
1322
|
+
const p = Object.keys(n);
|
|
1323
|
+
p.length === 1 ? a(
|
|
1324
|
+
`let headers = Header.add (Header.init ()) "${p[0]}" "${le(
|
|
1325
|
+
n[p[0]]
|
|
1327
1326
|
)}" in`
|
|
1328
|
-
) :
|
|
1327
|
+
) : p.length > 1 && (a("let headers = Header.add_list (Header.init ()) ["), p.forEach((x) => {
|
|
1329
1328
|
a(`("${x}", "${le(n[x])}");`, 1);
|
|
1330
1329
|
}), a("] in")), t.text && a(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(t.text)} in`), i();
|
|
1331
|
-
const f =
|
|
1332
|
-
return a(`Client.call ${f}${
|
|
1330
|
+
const f = p.length ? "~headers " : "", u = t.text ? "~body " : "", y = r.includes(o.toLowerCase()) ? `\`${o.toUpperCase()}` : `(Code.method_of_string "${o}")`;
|
|
1331
|
+
return a(`Client.call ${f}${u}${y} uri`), a(">>= fun (res, body_stream) ->"), a("(* Do stuff with the result *)", 1), c();
|
|
1333
1332
|
}
|
|
1334
1333
|
}, di = {
|
|
1335
1334
|
info: {
|
|
@@ -1371,7 +1370,7 @@ ${t}]`;
|
|
|
1371
1370
|
default:
|
|
1372
1371
|
return "null";
|
|
1373
1372
|
}
|
|
1374
|
-
},
|
|
1373
|
+
}, Yr = [
|
|
1375
1374
|
"ACL",
|
|
1376
1375
|
"BASELINE_CONTROL",
|
|
1377
1376
|
"CHECKIN",
|
|
@@ -1407,17 +1406,17 @@ ${t}]`;
|
|
|
1407
1406
|
description: "PHP with ext-curl",
|
|
1408
1407
|
extname: ".php"
|
|
1409
1408
|
},
|
|
1410
|
-
convert: ({ uriObj: e, postData: n, fullUrl: t, method: o, httpVersion: s, cookies:
|
|
1409
|
+
convert: ({ uriObj: e, postData: n, fullUrl: t, method: o, httpVersion: s, cookies: l, headersObj: r }, a = {}) => {
|
|
1411
1410
|
const {
|
|
1412
1411
|
closingTag: i = !1,
|
|
1413
|
-
indent:
|
|
1414
|
-
maxRedirects:
|
|
1412
|
+
indent: c = " ",
|
|
1413
|
+
maxRedirects: p = 10,
|
|
1415
1414
|
namedErrors: f = !1,
|
|
1416
|
-
noTags:
|
|
1415
|
+
noTags: u = !1,
|
|
1417
1416
|
shortTags: y = !1,
|
|
1418
1417
|
timeout: x = 30
|
|
1419
|
-
} = a, { push: $, blank:
|
|
1420
|
-
|
|
1418
|
+
} = a, { push: $, blank: h, join: m } = new V({ indent: c });
|
|
1419
|
+
u || ($(y ? "<?" : "<?php"), h()), $("$curl = curl_init();"), h();
|
|
1421
1420
|
const v = [
|
|
1422
1421
|
{
|
|
1423
1422
|
escape: !0,
|
|
@@ -1442,7 +1441,7 @@ ${t}]`;
|
|
|
1442
1441
|
{
|
|
1443
1442
|
escape: !1,
|
|
1444
1443
|
name: "CURLOPT_MAXREDIRS",
|
|
1445
|
-
value:
|
|
1444
|
+
value: p
|
|
1446
1445
|
},
|
|
1447
1446
|
{
|
|
1448
1447
|
escape: !1,
|
|
@@ -1462,20 +1461,20 @@ ${t}]`;
|
|
|
1462
1461
|
{
|
|
1463
1462
|
escape: !n.jsonObj,
|
|
1464
1463
|
name: "CURLOPT_POSTFIELDS",
|
|
1465
|
-
value: n ? n.jsonObj ? `json_encode(${te(n.jsonObj,
|
|
1464
|
+
value: n ? n.jsonObj ? `json_encode(${te(n.jsonObj, c.repeat(2), c)})` : n.text : void 0
|
|
1466
1465
|
}
|
|
1467
1466
|
];
|
|
1468
1467
|
$("curl_setopt_array($curl, [");
|
|
1469
|
-
const
|
|
1470
|
-
${
|
|
1468
|
+
const w = new V({ indent: c, join: `
|
|
1469
|
+
${c}` });
|
|
1471
1470
|
v.forEach(({ value: O, name: b, escape: q }) => {
|
|
1472
|
-
O != null &&
|
|
1471
|
+
O != null && w.push(`${b} => ${q ? JSON.stringify(O) : O},`);
|
|
1473
1472
|
});
|
|
1474
|
-
const T =
|
|
1475
|
-
T.length &&
|
|
1476
|
-
const
|
|
1477
|
-
return
|
|
1478
|
-
${
|
|
1473
|
+
const T = l.map((O) => `${encodeURIComponent(O.name)}=${encodeURIComponent(O.value)}`);
|
|
1474
|
+
T.length && w.push(`CURLOPT_COOKIE => "${T.join("; ")}",`);
|
|
1475
|
+
const d = Object.keys(r).sort().map((O) => `"${O}: ${le(r[O])}"`);
|
|
1476
|
+
return d.length && (w.push("CURLOPT_HTTPHEADER => ["), w.push(d.join(`,
|
|
1477
|
+
${c}${c}`), 1), w.push("],")), $(w.join(), 1), $("]);"), h(), $("$response = curl_exec($curl);"), $("$err = curl_error($curl);"), h(), $("curl_close($curl);"), h(), $("if ($err) {"), $(f ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), $("} else {"), $("echo $response;", 1), $("}"), !u && i && (h(), $("?>")), m();
|
|
1479
1478
|
}
|
|
1480
1479
|
}, yi = {
|
|
1481
1480
|
info: {
|
|
@@ -1486,21 +1485,21 @@ ${l}${l}`), 1), S.push("],")), $(S.join(), 1), $("]);"), d(), $("$response = cur
|
|
|
1486
1485
|
extname: ".php",
|
|
1487
1486
|
installation: "composer require guzzlehttp/guzzle"
|
|
1488
1487
|
},
|
|
1489
|
-
convert: ({ postData: e, fullUrl: n, method: t, cookies: o, headersObj: s },
|
|
1488
|
+
convert: ({ postData: e, fullUrl: n, method: t, cookies: o, headersObj: s }, l) => {
|
|
1490
1489
|
var $;
|
|
1491
1490
|
const r = {
|
|
1492
1491
|
closingTag: !1,
|
|
1493
1492
|
indent: " ",
|
|
1494
1493
|
noTags: !1,
|
|
1495
1494
|
shortTags: !1,
|
|
1496
|
-
...
|
|
1497
|
-
}, { push: a, blank: i, join:
|
|
1495
|
+
...l
|
|
1496
|
+
}, { push: a, blank: i, join: c } = new V({ indent: r.indent }), { code: p, push: f, join: u } = new V({ indent: r.indent });
|
|
1498
1497
|
switch (r.noTags || a(r.shortTags ? "<?" : "<?php"), a("require_once('vendor/autoload.php');"), i(), e.mimeType) {
|
|
1499
1498
|
case "application/x-www-form-urlencoded":
|
|
1500
1499
|
f(`'form_params' => ${te(e.paramsObj, r.indent + r.indent, r.indent)},`, 1);
|
|
1501
1500
|
break;
|
|
1502
1501
|
case "multipart/form-data": {
|
|
1503
|
-
const
|
|
1502
|
+
const h = [];
|
|
1504
1503
|
if (e.params && e.params.forEach((m) => {
|
|
1505
1504
|
if (m.fileName) {
|
|
1506
1505
|
const v = {
|
|
@@ -1508,12 +1507,12 @@ ${l}${l}`), 1), S.push("],")), $(S.join(), 1), $("]);"), d(), $("$response = cur
|
|
|
1508
1507
|
filename: m.fileName,
|
|
1509
1508
|
contents: m.value
|
|
1510
1509
|
};
|
|
1511
|
-
m.contentType && (v.headers = { "Content-Type": m.contentType }),
|
|
1512
|
-
} else m.value &&
|
|
1510
|
+
m.contentType && (v.headers = { "Content-Type": m.contentType }), h.push(v);
|
|
1511
|
+
} else m.value && h.push({
|
|
1513
1512
|
name: m.name,
|
|
1514
1513
|
contents: m.value
|
|
1515
1514
|
});
|
|
1516
|
-
}),
|
|
1515
|
+
}), h.length && (f(`'multipart' => ${te(h, r.indent + r.indent, r.indent)}`, 1), ot(s, "content-type") && ($ = be(s, "content-type")) != null && $.indexOf("boundary"))) {
|
|
1517
1516
|
const m = fe(s, "content-type");
|
|
1518
1517
|
m && delete s[m];
|
|
1519
1518
|
}
|
|
@@ -1522,11 +1521,11 @@ ${l}${l}`), 1), S.push("],")), $(S.join(), 1), $("]);"), d(), $("$response = cur
|
|
|
1522
1521
|
default:
|
|
1523
1522
|
e.text && f(`'body' => ${te(e.text)},`, 1);
|
|
1524
1523
|
}
|
|
1525
|
-
const y = Object.keys(s).sort().map(function(
|
|
1526
|
-
return `${r.indent}${r.indent}'${
|
|
1527
|
-
}), x = o.map((
|
|
1524
|
+
const y = Object.keys(s).sort().map(function(h) {
|
|
1525
|
+
return `${r.indent}${r.indent}'${h}' => '${ze(s[h])}',`;
|
|
1526
|
+
}), x = o.map((h) => `${encodeURIComponent(h.name)}=${encodeURIComponent(h.value)}`).join("; ");
|
|
1528
1527
|
return x.length && y.push(`${r.indent}${r.indent}'cookie' => '${ze(x)}',`), y.length && (f("'headers' => [", 1), f(y.join(`
|
|
1529
|
-
`)), f("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), i(),
|
|
1528
|
+
`)), f("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), i(), p.length ? (a(`$response = $client->request('${t}', '${n}', [`), a(u()), a("]);")) : a(`$response = $client->request('${t}', '${n}');`), i(), a("echo $response->getBody();"), !r.noTags && r.closingTag && (i(), a("?>")), c();
|
|
1530
1529
|
}
|
|
1531
1530
|
}, mi = {
|
|
1532
1531
|
info: {
|
|
@@ -1536,19 +1535,19 @@ ${l}${l}`), 1), S.push("],")), $(S.join(), 1), $("]);"), d(), $("$response = cur
|
|
|
1536
1535
|
description: "PHP with pecl/http v1",
|
|
1537
1536
|
extname: ".php"
|
|
1538
1537
|
},
|
|
1539
|
-
convert: ({ method: e, url: n, postData: t, queryObj: o, headersObj: s, cookiesObj:
|
|
1540
|
-
const { closingTag: a = !1, indent: i = " ", noTags:
|
|
1541
|
-
switch (
|
|
1538
|
+
convert: ({ method: e, url: n, postData: t, queryObj: o, headersObj: s, cookiesObj: l }, r = {}) => {
|
|
1539
|
+
const { closingTag: a = !1, indent: i = " ", noTags: c = !1, shortTags: p = !1 } = r, { push: f, blank: u, join: y } = new V({ indent: i });
|
|
1540
|
+
switch (c || (f(p ? "<?" : "<?php"), u()), Yr.includes(e.toUpperCase()) || f(`HttpRequest::methodRegister('${e}');`), f("$request = new HttpRequest();"), f(`$request->setUrl(${te(n)});`), Yr.includes(e.toUpperCase()) ? f(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : f(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), u(), Object.keys(o).length && (f(`$request->setQueryData(${te(o, i)});`), u()), Object.keys(s).length && (f(`$request->setHeaders(${te(s, i)});`), u()), Object.keys(l).length && (f(`$request->setCookies(${te(l, i)});`), u()), t.mimeType) {
|
|
1542
1541
|
case "application/x-www-form-urlencoded":
|
|
1543
|
-
f(`$request->setContentType(${te(t.mimeType)});`), f(`$request->setPostFields(${te(t.paramsObj, i)});`),
|
|
1542
|
+
f(`$request->setContentType(${te(t.mimeType)});`), f(`$request->setPostFields(${te(t.paramsObj, i)});`), u();
|
|
1544
1543
|
break;
|
|
1545
1544
|
case "application/json":
|
|
1546
|
-
f(`$request->setContentType(${te(t.mimeType)});`), f(`$request->setBody(json_encode(${te(t.jsonObj, i)}));`),
|
|
1545
|
+
f(`$request->setContentType(${te(t.mimeType)});`), f(`$request->setBody(json_encode(${te(t.jsonObj, i)}));`), u();
|
|
1547
1546
|
break;
|
|
1548
1547
|
default:
|
|
1549
|
-
t.text && (f(`$request->setBody(${te(t.text)});`),
|
|
1548
|
+
t.text && (f(`$request->setBody(${te(t.text)});`), u());
|
|
1550
1549
|
}
|
|
1551
|
-
return f("try {"), f("$response = $request->send();", 1),
|
|
1550
|
+
return f("try {"), f("$response = $request->send();", 1), u(), f("echo $response->getBody();", 1), f("} catch (HttpException $ex) {"), f("echo $ex;", 1), f("}"), !c && a && (u(), f("?>")), y();
|
|
1552
1551
|
}
|
|
1553
1552
|
}, gi = {
|
|
1554
1553
|
info: {
|
|
@@ -1558,45 +1557,45 @@ ${l}${l}`), 1), S.push("],")), $(S.join(), 1), $("]);"), d(), $("$response = cur
|
|
|
1558
1557
|
description: "PHP with pecl/http v2",
|
|
1559
1558
|
extname: ".php"
|
|
1560
1559
|
},
|
|
1561
|
-
convert: ({ postData: e, headersObj: n, method: t, queryObj: o, cookiesObj: s, url:
|
|
1560
|
+
convert: ({ postData: e, headersObj: n, method: t, queryObj: o, cookiesObj: s, url: l }, r = {}) => {
|
|
1562
1561
|
var $;
|
|
1563
|
-
const { closingTag: a = !1, indent: i = " ", noTags:
|
|
1562
|
+
const { closingTag: a = !1, indent: i = " ", noTags: c = !1, shortTags: p = !1 } = r, { push: f, blank: u, join: y } = new V({ indent: i });
|
|
1564
1563
|
let x = !1;
|
|
1565
|
-
switch (
|
|
1564
|
+
switch (c || (f(p ? "<?" : "<?php"), u()), f("$client = new http\\Client;"), f("$request = new http\\Client\\Request;"), u(), e.mimeType) {
|
|
1566
1565
|
case "application/x-www-form-urlencoded":
|
|
1567
|
-
f("$body = new http\\Message\\Body;"), f(`$body->append(new http\\QueryString(${te(e.paramsObj, i)}));`),
|
|
1566
|
+
f("$body = new http\\Message\\Body;"), f(`$body->append(new http\\QueryString(${te(e.paramsObj, i)}));`), u(), x = !0;
|
|
1568
1567
|
break;
|
|
1569
1568
|
case "multipart/form-data": {
|
|
1570
1569
|
if (!e.params)
|
|
1571
1570
|
break;
|
|
1572
|
-
const
|
|
1573
|
-
e.params.forEach(({ name: T, fileName:
|
|
1574
|
-
if (
|
|
1575
|
-
|
|
1571
|
+
const h = [], m = {};
|
|
1572
|
+
e.params.forEach(({ name: T, fileName: d, value: O, contentType: b }) => {
|
|
1573
|
+
if (d) {
|
|
1574
|
+
h.push({
|
|
1576
1575
|
name: T,
|
|
1577
1576
|
type: b,
|
|
1578
|
-
file:
|
|
1577
|
+
file: d,
|
|
1579
1578
|
data: O
|
|
1580
1579
|
});
|
|
1581
1580
|
return;
|
|
1582
1581
|
}
|
|
1583
1582
|
O && (m[T] = O);
|
|
1584
1583
|
});
|
|
1585
|
-
const v = Object.keys(m).length ? te(m, i) : "null",
|
|
1586
|
-
if (f("$body = new http\\Message\\Body;"), f(`$body->addForm(${v}, ${
|
|
1584
|
+
const v = Object.keys(m).length ? te(m, i) : "null", w = h.length ? te(h, i) : "null";
|
|
1585
|
+
if (f("$body = new http\\Message\\Body;"), f(`$body->addForm(${v}, ${w});`), ot(n, "content-type") && ($ = be(n, "content-type")) != null && $.indexOf("boundary")) {
|
|
1587
1586
|
const T = fe(n, "content-type");
|
|
1588
1587
|
T && delete n[T];
|
|
1589
1588
|
}
|
|
1590
|
-
|
|
1589
|
+
u(), x = !0;
|
|
1591
1590
|
break;
|
|
1592
1591
|
}
|
|
1593
1592
|
case "application/json":
|
|
1594
1593
|
f("$body = new http\\Message\\Body;"), f(`$body->append(json_encode(${te(e.jsonObj, i)}));`), x = !0;
|
|
1595
1594
|
break;
|
|
1596
1595
|
default:
|
|
1597
|
-
e.text && (f("$body = new http\\Message\\Body;"), f(`$body->append(${te(e.text)});`),
|
|
1596
|
+
e.text && (f("$body = new http\\Message\\Body;"), f(`$body->append(${te(e.text)});`), u(), x = !0);
|
|
1598
1597
|
}
|
|
1599
|
-
return f(`$request->setRequestUrl(${te(
|
|
1598
|
+
return f(`$request->setRequestUrl(${te(l)});`), f(`$request->setRequestMethod(${te(t)});`), x && (f("$request->setBody($body);"), u()), Object.keys(o).length && (f(`$request->setQuery(new http\\QueryString(${te(o, i)}));`), u()), Object.keys(n).length && (f(`$request->setHeaders(${te(n, i)});`), u()), Object.keys(s).length && (u(), f(`$client->setCookies(${te(s, i)});`), u()), f("$client->enqueue($request)->send();"), f("$response = $client->getResponse();"), u(), f("echo $response->getBody();"), !c && a && (u(), f("?>")), y();
|
|
1600
1599
|
}
|
|
1601
1600
|
}, vi = {
|
|
1602
1601
|
info: {
|
|
@@ -1611,18 +1610,18 @@ ${l}${l}`), 1), S.push("],")), $(S.join(), 1), $("]);"), d(), $("$response = cur
|
|
|
1611
1610
|
http1: mi,
|
|
1612
1611
|
http2: gi
|
|
1613
1612
|
}
|
|
1614
|
-
}, so = (e) => ({ method: t, headersObj: o, cookies: s, uriObj:
|
|
1615
|
-
const { push:
|
|
1613
|
+
}, so = (e) => ({ method: t, headersObj: o, cookies: s, uriObj: l, fullUrl: r, postData: a, allHeaders: i }) => {
|
|
1614
|
+
const { push: c, join: p } = new V();
|
|
1616
1615
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(t.toUpperCase()))
|
|
1617
1616
|
return "Method not supported";
|
|
1618
|
-
const
|
|
1619
|
-
return y.length && (
|
|
1620
|
-
x !== "connection" &&
|
|
1621
|
-
}),
|
|
1622
|
-
|
|
1623
|
-
}),
|
|
1617
|
+
const u = [], y = Object.keys(o);
|
|
1618
|
+
return y.length && (c("$headers=@{}"), y.forEach((x) => {
|
|
1619
|
+
x !== "connection" && c(`$headers.Add("${x}", "${Me(o[x], { escapeChar: "`" })}")`);
|
|
1620
|
+
}), u.push("-Headers $headers")), s.length && (c("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), s.forEach((x) => {
|
|
1621
|
+
c("$cookie = New-Object System.Net.Cookie"), c(`$cookie.Name = '${x.name}'`), c(`$cookie.Value = '${x.value}'`), c(`$cookie.Domain = '${l.host}'`), c("$session.Cookies.Add($cookie)");
|
|
1622
|
+
}), u.push("-WebSession $session")), a.text && (u.push(
|
|
1624
1623
|
`-ContentType '${Me(be(i, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
|
|
1625
|
-
),
|
|
1624
|
+
), u.push(`-Body '${a.text}'`)), c(`$response = ${e} -Uri '${r}' -Method ${t} ${u.join(" ")}`.trim()), p();
|
|
1626
1625
|
}, bi = {
|
|
1627
1626
|
info: {
|
|
1628
1627
|
key: "restmethod",
|
|
@@ -1652,12 +1651,12 @@ ${l}${l}`), 1), S.push("],")), $(S.join(), 1), $("]);"), d(), $("$response = cur
|
|
|
1652
1651
|
restmethod: bi
|
|
1653
1652
|
}
|
|
1654
1653
|
};
|
|
1655
|
-
function
|
|
1656
|
-
const
|
|
1657
|
-
${
|
|
1654
|
+
function Xr(e, n, t, o, s) {
|
|
1655
|
+
const l = o.repeat(s), r = o.repeat(s - 1), a = t ? `,
|
|
1656
|
+
${l}` : ", ", i = e === "object" ? "{" : "[", c = e === "object" ? "}" : "]";
|
|
1658
1657
|
return t ? `${i}
|
|
1659
|
-
${
|
|
1660
|
-
${r}${
|
|
1658
|
+
${l}${n.join(a)}
|
|
1659
|
+
${r}${c}` : e === "object" && n.length > 0 ? `${i} ${n.join(a)} ${c}` : `${i}${n.join(a)}${c}`;
|
|
1661
1660
|
}
|
|
1662
1661
|
var Le = (e, n, t) => {
|
|
1663
1662
|
switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
|
|
@@ -1665,14 +1664,14 @@ var Le = (e, n, t) => {
|
|
|
1665
1664
|
return e;
|
|
1666
1665
|
case "[object Array]": {
|
|
1667
1666
|
let o = !1;
|
|
1668
|
-
const s = e.map((
|
|
1669
|
-
return
|
|
1667
|
+
const s = e.map((l) => (Object.prototype.toString.call(l) === "[object Object]" && (o = Object.keys(l).length > 1), Le(l, n, t)));
|
|
1668
|
+
return Xr("array", s, o, n.indent, t);
|
|
1670
1669
|
}
|
|
1671
1670
|
case "[object Object]": {
|
|
1672
1671
|
const o = [];
|
|
1673
1672
|
for (const s in e)
|
|
1674
1673
|
o.push(`"${s}": ${Le(e[s], n, t)}`);
|
|
1675
|
-
return
|
|
1674
|
+
return Xr("object", o, n.pretty && o.length > 1, n.indent, t);
|
|
1676
1675
|
}
|
|
1677
1676
|
case "[object Null]":
|
|
1678
1677
|
return "None";
|
|
@@ -1691,61 +1690,61 @@ var Le = (e, n, t) => {
|
|
|
1691
1690
|
installation: "python -m pip install requests"
|
|
1692
1691
|
},
|
|
1693
1692
|
convert: ({ fullUrl: e, postData: n, allHeaders: t, method: o }, s) => {
|
|
1694
|
-
const
|
|
1693
|
+
const l = {
|
|
1695
1694
|
indent: " ",
|
|
1696
1695
|
pretty: !0,
|
|
1697
1696
|
...s
|
|
1698
|
-
}, { push: r, blank: a, join: i, addPostProcessor:
|
|
1697
|
+
}, { push: r, blank: a, join: i, addPostProcessor: c } = new V({ indent: l.indent });
|
|
1699
1698
|
r("import requests"), a(), r(`url = "${e}"`), a();
|
|
1700
|
-
const
|
|
1699
|
+
const p = t;
|
|
1701
1700
|
let f = {};
|
|
1702
|
-
const
|
|
1701
|
+
const u = {};
|
|
1703
1702
|
let y = !1, x = !1, $ = !1;
|
|
1704
1703
|
switch (n.mimeType) {
|
|
1705
1704
|
case "application/json":
|
|
1706
|
-
n.jsonObj && (r(`payload = ${Le(n.jsonObj,
|
|
1705
|
+
n.jsonObj && (r(`payload = ${Le(n.jsonObj, l)}`), $ = !0, x = !0);
|
|
1707
1706
|
break;
|
|
1708
1707
|
case "multipart/form-data":
|
|
1709
1708
|
if (!n.params)
|
|
1710
1709
|
break;
|
|
1711
1710
|
if (f = {}, n.params.forEach((v) => {
|
|
1712
|
-
v.fileName ? (v.contentType ?
|
|
1711
|
+
v.fileName ? (v.contentType ? u[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'), '${v.contentType}')` : u[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'))`, y = !0) : (f[v.name] = v.value, x = !0);
|
|
1713
1712
|
}), y) {
|
|
1714
|
-
r(`files = ${Le(
|
|
1715
|
-
const v = fe(
|
|
1716
|
-
v && delete
|
|
1713
|
+
r(`files = ${Le(u, l)}`), x && r(`payload = ${Le(f, l)}`);
|
|
1714
|
+
const v = fe(p, "content-type");
|
|
1715
|
+
v && delete p[v];
|
|
1717
1716
|
} else {
|
|
1718
1717
|
const v = JSON.stringify(n.text);
|
|
1719
1718
|
v && (r(`payload = ${v}`), x = !0);
|
|
1720
1719
|
}
|
|
1721
|
-
|
|
1720
|
+
c(
|
|
1722
1721
|
(v) => v.replace(/"\('(.+)', open\('(.+)', 'rb'\)\)"/g, '("$1", open("$2", "rb"))').replace(/"\('(.+)', open\('(.+)', 'rb'\), '(.+)'\)"/g, '("$1", open("$2", "rb"), "$3")')
|
|
1723
1722
|
);
|
|
1724
1723
|
break;
|
|
1725
1724
|
default: {
|
|
1726
1725
|
if (n.mimeType === "application/x-www-form-urlencoded" && n.paramsObj) {
|
|
1727
|
-
r(`payload = ${Le(n.paramsObj,
|
|
1726
|
+
r(`payload = ${Le(n.paramsObj, l)}`), x = !0;
|
|
1728
1727
|
break;
|
|
1729
1728
|
}
|
|
1730
1729
|
const v = JSON.stringify(n.text);
|
|
1731
1730
|
v && (r(`payload = ${v}`), x = !0);
|
|
1732
1731
|
}
|
|
1733
1732
|
}
|
|
1734
|
-
const
|
|
1735
|
-
if (
|
|
1733
|
+
const h = Object.keys(p).length;
|
|
1734
|
+
if (h === 0 && (x || y))
|
|
1736
1735
|
a();
|
|
1737
|
-
else if (
|
|
1738
|
-
Object.keys(
|
|
1739
|
-
r(`headers = {"${v}": "${le(
|
|
1736
|
+
else if (h === 1)
|
|
1737
|
+
Object.keys(p).forEach((v) => {
|
|
1738
|
+
r(`headers = {"${v}": "${le(p[v])}"}`), a();
|
|
1740
1739
|
});
|
|
1741
|
-
else if (
|
|
1740
|
+
else if (h > 1) {
|
|
1742
1741
|
let v = 1;
|
|
1743
|
-
r("headers = {"), Object.keys(
|
|
1744
|
-
r(v !==
|
|
1742
|
+
r("headers = {"), Object.keys(p).forEach((w) => {
|
|
1743
|
+
r(v !== h ? `"${w}": "${le(p[w])}",` : `"${w}": "${le(p[w])}"`, 1), v += 1;
|
|
1745
1744
|
}), r("}"), a();
|
|
1746
1745
|
}
|
|
1747
1746
|
let m = ji.includes(o) ? `response = requests.${o.toLowerCase()}(url` : `response = requests.request("${o}", url`;
|
|
1748
|
-
return x && ($ ? m += ", json=payload" : m += ", data=payload"), y && (m += ", files=files"),
|
|
1747
|
+
return x && ($ ? m += ", json=payload" : m += ", data=payload"), y && (m += ", files=files"), h > 0 && (m += ", headers=headers"), m += ")", r(m), a(), r("print(response.text)"), i();
|
|
1749
1748
|
}
|
|
1750
1749
|
}, Si = {
|
|
1751
1750
|
info: {
|
|
@@ -1765,14 +1764,14 @@ var Le = (e, n, t) => {
|
|
|
1765
1764
|
description: "httr: Tools for Working with URLs and HTTP",
|
|
1766
1765
|
extname: ".r"
|
|
1767
1766
|
},
|
|
1768
|
-
convert: ({ url: e, queryObj: n, queryString: t, postData: o, allHeaders: s, method:
|
|
1767
|
+
convert: ({ url: e, queryObj: n, queryString: t, postData: o, allHeaders: s, method: l }) => {
|
|
1769
1768
|
const { push: r, blank: a, join: i } = new V();
|
|
1770
1769
|
r("library(httr)"), a(), r(`url <- "${e}"`), a();
|
|
1771
|
-
const
|
|
1770
|
+
const c = n;
|
|
1772
1771
|
delete n.key;
|
|
1773
|
-
const
|
|
1774
|
-
t.length === 1 ? (r(`queryString <- list(${Object.keys(
|
|
1775
|
-
O !==
|
|
1772
|
+
const p = Object.keys(c).length;
|
|
1773
|
+
t.length === 1 ? (r(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), a()) : t.length > 1 && (r("queryString <- list("), Object.keys(c).forEach((d, O) => {
|
|
1774
|
+
O !== p - 1 ? r(` ${d} = "${c[d].toString()}",`) : r(` ${d} = "${c[d].toString()}"`);
|
|
1776
1775
|
}), r(")"), a());
|
|
1777
1776
|
const f = JSON.stringify(o.text);
|
|
1778
1777
|
if (f && (r(`payload <- ${f}`), a()), o.text || o.jsonObj || o.params)
|
|
@@ -1790,11 +1789,11 @@ var Le = (e, n, t) => {
|
|
|
1790
1789
|
r('encode <- "raw"'), a();
|
|
1791
1790
|
break;
|
|
1792
1791
|
}
|
|
1793
|
-
const
|
|
1794
|
-
let
|
|
1795
|
-
f && (
|
|
1796
|
-
const T = [v,
|
|
1797
|
-
return T && (
|
|
1792
|
+
const u = be(s, "cookie"), y = be(s, "accept"), x = u ? `set_cookies(\`${String(u).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, $ = y ? `accept("${le(y)}")` : void 0, h = `content_type("${le(o.mimeType)}")`, m = Object.entries(s).filter(([d]) => !["cookie", "accept", "content-type"].includes(d.toLowerCase())).map(([d, O]) => `'${d}' = '${ze(O)}'`).join(", "), v = m ? `add_headers(${m})` : void 0;
|
|
1793
|
+
let w = `response <- VERB("${l}", url`;
|
|
1794
|
+
f && (w += ", body = payload"), t.length && (w += ", query = queryString");
|
|
1795
|
+
const T = [v, h, $, x].filter((d) => !!d).join(", ");
|
|
1796
|
+
return T && (w += `, ${T}`), (o.text || o.jsonObj || o.params) && (w += ", encode = encode"), w += ")", r(w), a(), r('content(response, "text")'), i();
|
|
1798
1797
|
}
|
|
1799
1798
|
}, Ti = {
|
|
1800
1799
|
info: {
|
|
@@ -1814,9 +1813,9 @@ var Le = (e, n, t) => {
|
|
|
1814
1813
|
extname: ".rb"
|
|
1815
1814
|
},
|
|
1816
1815
|
convert: ({ uriObj: e, method: n, fullUrl: t, postData: o, allHeaders: s }) => {
|
|
1817
|
-
const { push:
|
|
1818
|
-
|
|
1819
|
-
const i = n.toUpperCase(),
|
|
1816
|
+
const { push: l, blank: r, join: a } = new V();
|
|
1817
|
+
l("require 'uri'"), l("require 'net/http'"), r();
|
|
1818
|
+
const i = n.toUpperCase(), c = [
|
|
1820
1819
|
"GET",
|
|
1821
1820
|
"POST",
|
|
1822
1821
|
"HEAD",
|
|
@@ -1829,12 +1828,12 @@ var Le = (e, n, t) => {
|
|
|
1829
1828
|
"UNLOCK",
|
|
1830
1829
|
"MOVE",
|
|
1831
1830
|
"TRACE"
|
|
1832
|
-
],
|
|
1833
|
-
|
|
1831
|
+
], p = i.charAt(0) + i.substring(1).toLowerCase();
|
|
1832
|
+
c.includes(i) || (l(`class Net::HTTP::${p} < Net::HTTPRequest`), l(` METHOD = '${i.toUpperCase()}'`), l(` REQUEST_HAS_BODY = '${o.text ? "true" : "false"}'`), l(" RESPONSE_HAS_BODY = true"), l("end"), r()), l(`url = URI("${t}")`), r(), l("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && l("http.use_ssl = true"), r(), l(`request = Net::HTTP::${p}.new(url)`);
|
|
1834
1833
|
const f = Object.keys(s);
|
|
1835
|
-
return f.length && f.forEach((
|
|
1836
|
-
|
|
1837
|
-
}), o.text &&
|
|
1834
|
+
return f.length && f.forEach((u) => {
|
|
1835
|
+
l(`request["${u}"] = '${ze(s[u])}'`);
|
|
1836
|
+
}), o.text && l(`request.body = ${JSON.stringify(o.text)}`), r(), l("response = http.request(request)"), l("puts response.read_body"), a();
|
|
1838
1837
|
}
|
|
1839
1838
|
}, Pi = {
|
|
1840
1839
|
info: {
|
|
@@ -1869,63 +1868,63 @@ var Le = (e, n, t) => {
|
|
|
1869
1868
|
description: "cURL is a command line tool and library for transferring data with URL syntax",
|
|
1870
1869
|
extname: ".sh"
|
|
1871
1870
|
},
|
|
1872
|
-
convert: ({ fullUrl: e, method: n, httpVersion: t, headersObj: o, allHeaders: s, postData:
|
|
1873
|
-
var
|
|
1874
|
-
const { indent: a = " ", short: i = !1, binary:
|
|
1871
|
+
convert: ({ fullUrl: e, method: n, httpVersion: t, headersObj: o, allHeaders: s, postData: l }, r = {}) => {
|
|
1872
|
+
var h;
|
|
1873
|
+
const { indent: a = " ", short: i = !1, binary: c = !1, globOff: p = !1 } = r, f = " ", { push: u, join: y } = new V({
|
|
1875
1874
|
...typeof a == "string" ? { indent: a } : {},
|
|
1876
1875
|
join: a !== !1 ? ` \\
|
|
1877
1876
|
${a}` : " "
|
|
1878
1877
|
}), x = Ni(i);
|
|
1879
1878
|
let $ = ce(e);
|
|
1880
|
-
if (
|
|
1879
|
+
if (u(`curl ${x("request")} ${n}`), p && ($ = unescape($), u(x("globoff"))), u(`${x("url ")}${$}`), t === "HTTP/1.0" && u(x("http1.0")), be(s, "accept-encoding") && u("--compressed"), l.mimeType === "multipart/form-data") {
|
|
1881
1880
|
const m = fe(o, "content-type");
|
|
1882
1881
|
if (m) {
|
|
1883
1882
|
const v = o[m];
|
|
1884
1883
|
if (m && v) {
|
|
1885
|
-
const
|
|
1886
|
-
o[m] =
|
|
1884
|
+
const w = String(v).replace(/; boundary.+?(?=(;|$))/, "");
|
|
1885
|
+
o[m] = w, s[m] = w;
|
|
1887
1886
|
}
|
|
1888
1887
|
}
|
|
1889
1888
|
}
|
|
1890
1889
|
switch (Object.keys(o).sort().forEach((m) => {
|
|
1891
1890
|
const v = `${m}: ${o[m]}`;
|
|
1892
|
-
|
|
1893
|
-
}), s.cookie &&
|
|
1891
|
+
u(`${x("header")} ${ce(v)}`);
|
|
1892
|
+
}), s.cookie && u(`${x("cookie")} ${ce(s.cookie)}`), l.mimeType) {
|
|
1894
1893
|
case "multipart/form-data":
|
|
1895
|
-
(
|
|
1896
|
-
let
|
|
1897
|
-
v.fileName ?
|
|
1894
|
+
(h = l.params) == null || h.forEach((v) => {
|
|
1895
|
+
let w = "";
|
|
1896
|
+
v.fileName ? w = `${v.name}='@${v.fileName}'` : w = ce(`${v.name}=${v.value}`), u(`${x("form")} ${w}`);
|
|
1898
1897
|
});
|
|
1899
1898
|
break;
|
|
1900
1899
|
case "application/x-www-form-urlencoded":
|
|
1901
|
-
|
|
1902
|
-
const
|
|
1903
|
-
|
|
1904
|
-
}) :
|
|
1900
|
+
l.params ? l.params.forEach((v) => {
|
|
1901
|
+
const w = v.name, T = encodeURIComponent(v.name), d = T !== w, O = d ? T : w, b = c ? "--data-binary" : d ? "--data-urlencode" : x("data");
|
|
1902
|
+
u(`${b} ${ce(`${O}=${v.value}`)}`);
|
|
1903
|
+
}) : u(`${c ? "--data-binary" : x("data")} ${ce(l.text)}`);
|
|
1905
1904
|
break;
|
|
1906
1905
|
default:
|
|
1907
|
-
if (!
|
|
1906
|
+
if (!l.text)
|
|
1908
1907
|
break;
|
|
1909
1908
|
let m = !1;
|
|
1910
|
-
if (Na(
|
|
1909
|
+
if (Na(l.mimeType) && l.text.length > 20)
|
|
1911
1910
|
try {
|
|
1912
|
-
const v = JSON.parse(
|
|
1913
|
-
m = !0,
|
|
1914
|
-
`${
|
|
1911
|
+
const v = JSON.parse(l.text);
|
|
1912
|
+
m = !0, l.text.indexOf("'") > 0 ? u(
|
|
1913
|
+
`${c ? "--data-binary" : x("data")} @- <<EOF
|
|
1915
1914
|
${JSON.stringify(
|
|
1916
1915
|
v,
|
|
1917
1916
|
null,
|
|
1918
1917
|
f
|
|
1919
1918
|
)}
|
|
1920
1919
|
EOF`
|
|
1921
|
-
) :
|
|
1922
|
-
`${
|
|
1920
|
+
) : u(
|
|
1921
|
+
`${c ? "--data-binary" : x("data")} '
|
|
1923
1922
|
${JSON.stringify(v, null, f)}
|
|
1924
1923
|
'`
|
|
1925
1924
|
);
|
|
1926
1925
|
} catch {
|
|
1927
1926
|
}
|
|
1928
|
-
m ||
|
|
1927
|
+
m || u(`${c ? "--data-binary" : x("data")} ${ce(l.text)}`);
|
|
1929
1928
|
}
|
|
1930
1929
|
return y();
|
|
1931
1930
|
}
|
|
@@ -1938,7 +1937,7 @@ ${JSON.stringify(v, null, f)}
|
|
|
1938
1937
|
extname: ".sh",
|
|
1939
1938
|
installation: "brew install httpie"
|
|
1940
1939
|
},
|
|
1941
|
-
convert: ({ allHeaders: e, postData: n, queryObj: t, fullUrl: o, method: s, url:
|
|
1940
|
+
convert: ({ allHeaders: e, postData: n, queryObj: t, fullUrl: o, method: s, url: l }, r) => {
|
|
1942
1941
|
const a = {
|
|
1943
1942
|
body: !1,
|
|
1944
1943
|
cert: !1,
|
|
@@ -1953,30 +1952,30 @@ ${JSON.stringify(v, null, f)}
|
|
|
1953
1952
|
verbose: !1,
|
|
1954
1953
|
verify: !1,
|
|
1955
1954
|
...r
|
|
1956
|
-
}, { push: i, join:
|
|
1955
|
+
}, { push: i, join: c, unshift: p } = new V({
|
|
1957
1956
|
indent: a.indent,
|
|
1958
1957
|
// @ts-expect-error SEEMS LEGIT
|
|
1959
1958
|
join: a.indent !== !1 ? ` \\
|
|
1960
1959
|
${a.indent}` : " "
|
|
1961
1960
|
});
|
|
1962
1961
|
let f = !1;
|
|
1963
|
-
const
|
|
1964
|
-
a.headers &&
|
|
1962
|
+
const u = [];
|
|
1963
|
+
a.headers && u.push(a.short ? "-h" : "--headers"), a.body && u.push(a.short ? "-b" : "--body"), a.verbose && u.push(a.short ? "-v" : "--verbose"), a.print && u.push(`${a.short ? "-p" : "--print"}=${a.print}`), a.verify && u.push(`--verify=${a.verify}`), a.cert && u.push(`--cert=${a.cert}`), a.pretty && u.push(`--pretty=${a.pretty}`), a.style && u.push(`--style=${a.style}`), a.timeout && u.push(`--timeout=${a.timeout}`), a.queryParams && Object.keys(t).forEach((x) => {
|
|
1965
1964
|
const $ = t[x];
|
|
1966
|
-
Array.isArray($) ? $.forEach((
|
|
1967
|
-
i(`${x}==${ce(
|
|
1965
|
+
Array.isArray($) ? $.forEach((h) => {
|
|
1966
|
+
i(`${x}==${ce(h)}`);
|
|
1968
1967
|
}) : i(`${x}==${ce($)}`);
|
|
1969
1968
|
}), Object.keys(e).sort().forEach((x) => {
|
|
1970
1969
|
i(`${x}:${ce(e[x])}`);
|
|
1971
|
-
}), n.mimeType === "application/x-www-form-urlencoded" ? n.params && n.params.length && (
|
|
1970
|
+
}), n.mimeType === "application/x-www-form-urlencoded" ? n.params && n.params.length && (u.push(a.short ? "-f" : "--form"), n.params.forEach((x) => {
|
|
1972
1971
|
i(`${x.name}=${ce(x.value)}`);
|
|
1973
1972
|
})) : f = !0;
|
|
1974
|
-
const y =
|
|
1975
|
-
if (
|
|
1973
|
+
const y = u.length ? `${u.join(" ")} ` : "";
|
|
1974
|
+
if (l = ce(a.queryParams ? l : o), p(`http ${y}${s} ${l}`), f && n.text) {
|
|
1976
1975
|
const x = ce(n.text);
|
|
1977
|
-
|
|
1976
|
+
p(`echo ${x} | `);
|
|
1978
1977
|
}
|
|
1979
|
-
return
|
|
1978
|
+
return c();
|
|
1980
1979
|
}
|
|
1981
1980
|
}, Ai = {
|
|
1982
1981
|
info: {
|
|
@@ -1987,20 +1986,20 @@ ${a.indent}` : " "
|
|
|
1987
1986
|
extname: ".sh"
|
|
1988
1987
|
},
|
|
1989
1988
|
convert: ({ method: e, postData: n, allHeaders: t, fullUrl: o }, s) => {
|
|
1990
|
-
const
|
|
1989
|
+
const l = {
|
|
1991
1990
|
indent: " ",
|
|
1992
1991
|
short: !1,
|
|
1993
1992
|
verbose: !1,
|
|
1994
1993
|
...s
|
|
1995
1994
|
}, { push: r, join: a } = new V({
|
|
1996
|
-
...typeof
|
|
1997
|
-
join:
|
|
1998
|
-
${
|
|
1995
|
+
...typeof l.indent == "string" ? { indent: l.indent } : {},
|
|
1996
|
+
join: l.indent !== !1 ? ` \\
|
|
1997
|
+
${l.indent}` : " "
|
|
1999
1998
|
});
|
|
2000
|
-
return
|
|
2001
|
-
const
|
|
2002
|
-
r(`--header ${ce(
|
|
2003
|
-
}), n.text && r(`--body-data ${Ri(ce(n.text))}`), r(
|
|
1999
|
+
return l.verbose ? r(`wget ${l.short ? "-v" : "--verbose"}`) : r(`wget ${l.short ? "-q" : "--quiet"}`), r(`--method ${ce(e)}`), Object.keys(t).forEach((i) => {
|
|
2000
|
+
const c = `${i}: ${t[i]}`;
|
|
2001
|
+
r(`--header ${ce(c)}`);
|
|
2002
|
+
}), n.text && r(`--body-data ${Ri(ce(n.text))}`), r(l.short ? "-O" : "--output-document"), r(`- ${ce(o)}`), a();
|
|
2004
2003
|
}
|
|
2005
2004
|
}, Ii = {
|
|
2006
2005
|
info: {
|
|
@@ -2014,26 +2013,26 @@ ${c.indent}` : " "
|
|
|
2014
2013
|
httpie: Ei,
|
|
2015
2014
|
wget: Ai
|
|
2016
2015
|
}
|
|
2017
|
-
},
|
|
2018
|
-
const s =
|
|
2016
|
+
}, Zr = (e, n) => n.repeat(e), en = (e, n, t, o) => {
|
|
2017
|
+
const s = Zr(o, t), l = Zr(o - 1, t), r = n ? `,
|
|
2019
2018
|
${s}` : ", ";
|
|
2020
2019
|
return n ? `[
|
|
2021
2020
|
${s}${e.join(r)}
|
|
2022
|
-
${
|
|
2023
|
-
},
|
|
2021
|
+
${l}]` : `[${e.join(r)}]`;
|
|
2022
|
+
}, tn = (e, n, t) => `let ${e} = ${rt(n, t)}`, rt = (e, n, t) => {
|
|
2024
2023
|
switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
|
|
2025
2024
|
case "[object Number]":
|
|
2026
2025
|
return e;
|
|
2027
2026
|
case "[object Array]": {
|
|
2028
2027
|
let o = !1;
|
|
2029
|
-
const s = e.map((
|
|
2030
|
-
return
|
|
2028
|
+
const s = e.map((l) => (Object.prototype.toString.call(l) === "[object Object]" && (o = Object.keys(l).length > 1), rt(l, n, t)));
|
|
2029
|
+
return en(s, o, n.indent, t);
|
|
2031
2030
|
}
|
|
2032
2031
|
case "[object Object]": {
|
|
2033
2032
|
const o = [];
|
|
2034
2033
|
for (const s in e)
|
|
2035
2034
|
o.push(`"${s}": ${rt(e[s], n, t)}`);
|
|
2036
|
-
return
|
|
2035
|
+
return en(
|
|
2037
2036
|
o,
|
|
2038
2037
|
// @ts-expect-error needs better types
|
|
2039
2038
|
n.pretty && o.length > 1,
|
|
@@ -2055,29 +2054,29 @@ ${c}]` : `[${e.join(r)}]`;
|
|
|
2055
2054
|
description: "Foundation's URLSession request",
|
|
2056
2055
|
extname: ".swift"
|
|
2057
2056
|
},
|
|
2058
|
-
convert: ({ allHeaders: e, postData: n, uriObj: t, queryObj: o, method: s },
|
|
2059
|
-
var
|
|
2057
|
+
convert: ({ allHeaders: e, postData: n, uriObj: t, queryObj: o, method: s }, l) => {
|
|
2058
|
+
var u;
|
|
2060
2059
|
const r = {
|
|
2061
2060
|
indent: " ",
|
|
2062
2061
|
pretty: !0,
|
|
2063
2062
|
timeout: 10,
|
|
2064
|
-
...
|
|
2065
|
-
}, { push: a, blank: i, join:
|
|
2063
|
+
...l
|
|
2064
|
+
}, { push: a, blank: i, join: c } = new V({ indent: r.indent });
|
|
2066
2065
|
a("import Foundation"), i();
|
|
2067
|
-
const
|
|
2068
|
-
if (
|
|
2066
|
+
const p = n.text || n.jsonObj || n.params;
|
|
2067
|
+
if (p)
|
|
2069
2068
|
switch (n.mimeType) {
|
|
2070
2069
|
case "application/x-www-form-urlencoded":
|
|
2071
|
-
if ((
|
|
2070
|
+
if ((u = n.params) != null && u.length) {
|
|
2072
2071
|
const y = n.params.map((x) => `"${x.name}": "${x.value}"`);
|
|
2073
2072
|
r.pretty ? (a("let parameters = ["), y.forEach((x) => a(`${x},`, 1)), a("]")) : a(`let parameters = [${y.join(", ")}]`), a('let joinedParameters = parameters.map { "\\($0.key)=\\($0.value)" }.joined(separator: "&")'), a("let postData = Data(joinedParameters.utf8)"), i();
|
|
2074
2073
|
}
|
|
2075
2074
|
break;
|
|
2076
2075
|
case "application/json":
|
|
2077
|
-
n.jsonObj && (a(`${
|
|
2076
|
+
n.jsonObj && (a(`${tn("parameters", n.jsonObj, r)} as [String : Any?]`), i(), a("let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])"), i());
|
|
2078
2077
|
break;
|
|
2079
2078
|
case "multipart/form-data":
|
|
2080
|
-
a(
|
|
2079
|
+
a(tn("parameters", n.params, r)), i(), a(`let boundary = "${n.boundary}"`), i(), 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("}"), i(), a("let postData = Data(body.utf8)"), i();
|
|
2081
2080
|
break;
|
|
2082
2081
|
default:
|
|
2083
2082
|
a(`let postData = Data("${n.text}".utf8)`), i();
|
|
@@ -2091,12 +2090,12 @@ ${c}]` : `[${e.join(r)}]`;
|
|
|
2091
2090
|
a(`URLQueryItem(name: "${x}", value: "${$}"),`, 1);
|
|
2092
2091
|
break;
|
|
2093
2092
|
case "[object Array]":
|
|
2094
|
-
$.forEach((
|
|
2095
|
-
a(`URLQueryItem(name: "${x}", value: "${
|
|
2093
|
+
$.forEach((h) => {
|
|
2094
|
+
a(`URLQueryItem(name: "${x}", value: "${h}"),`, 1);
|
|
2096
2095
|
});
|
|
2097
2096
|
break;
|
|
2098
2097
|
}
|
|
2099
|
-
}), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${s}"`), a(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${rt(e, r)}`),
|
|
2098
|
+
}), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${s}"`), a(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${rt(e, r)}`), p && a("request.httpBody = postData"), i(), a("let (data, _) = try await URLSession.shared.data(for: request)"), a("print(String(decoding: data, as: UTF8.self))"), c();
|
|
2100
2099
|
}
|
|
2101
2100
|
}, Ui = {
|
|
2102
2101
|
info: {
|
|
@@ -2129,21 +2128,21 @@ ${c}]` : `[${e.join(r)}]`;
|
|
|
2129
2128
|
swift: Ui
|
|
2130
2129
|
}, Re = {}, _e = { exports: {} };
|
|
2131
2130
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
2132
|
-
var _i = _e.exports,
|
|
2131
|
+
var _i = _e.exports, rn;
|
|
2133
2132
|
function Bi() {
|
|
2134
|
-
return
|
|
2133
|
+
return rn || (rn = 1, function(e, n) {
|
|
2135
2134
|
(function(t) {
|
|
2136
|
-
var o = n && !n.nodeType && n, s = e && !e.nodeType && e,
|
|
2137
|
-
(
|
|
2138
|
-
var r, a = 2147483647, i = 36,
|
|
2135
|
+
var o = n && !n.nodeType && n, s = e && !e.nodeType && e, l = typeof et == "object" && et;
|
|
2136
|
+
(l.global === l || l.window === l || l.self === l) && (t = l);
|
|
2137
|
+
var r, a = 2147483647, i = 36, c = 1, p = 26, f = 38, u = 700, y = 72, x = 128, $ = "-", h = /^xn--/, m = /[^\x20-\x7E]/, v = /[\x2E\u3002\uFF0E\uFF61]/g, w = {
|
|
2139
2138
|
overflow: "Overflow: input needs wider integers to process",
|
|
2140
2139
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
2141
2140
|
"invalid-input": "Invalid input"
|
|
2142
|
-
}, T = i -
|
|
2141
|
+
}, T = i - c, d = Math.floor, O = String.fromCharCode, b;
|
|
2143
2142
|
function q(R) {
|
|
2144
|
-
throw new RangeError(
|
|
2143
|
+
throw new RangeError(w[R]);
|
|
2145
2144
|
}
|
|
2146
|
-
function
|
|
2145
|
+
function L(R, N) {
|
|
2147
2146
|
for (var U = R.length, P = []; U--; )
|
|
2148
2147
|
P[U] = N(R[U]);
|
|
2149
2148
|
return P;
|
|
@@ -2151,16 +2150,16 @@ function Bi() {
|
|
|
2151
2150
|
function E(R, N) {
|
|
2152
2151
|
var U = R.split("@"), P = "";
|
|
2153
2152
|
U.length > 1 && (P = U[0] + "@", R = U[1]), R = R.replace(v, ".");
|
|
2154
|
-
var
|
|
2153
|
+
var I = R.split("."), W = L(I, N).join(".");
|
|
2155
2154
|
return P + W;
|
|
2156
2155
|
}
|
|
2157
2156
|
function B(R) {
|
|
2158
|
-
for (var N = [], U = 0, P = R.length,
|
|
2159
|
-
|
|
2157
|
+
for (var N = [], U = 0, P = R.length, I, W; U < P; )
|
|
2158
|
+
I = R.charCodeAt(U++), I >= 55296 && I <= 56319 && U < P ? (W = R.charCodeAt(U++), (W & 64512) == 56320 ? N.push(((I & 1023) << 10) + (W & 1023) + 65536) : (N.push(I), U--)) : N.push(I);
|
|
2160
2159
|
return N;
|
|
2161
2160
|
}
|
|
2162
2161
|
function C(R) {
|
|
2163
|
-
return
|
|
2162
|
+
return L(R, function(N) {
|
|
2164
2163
|
var U = "";
|
|
2165
2164
|
return N > 65535 && (N -= 65536, U += O(N >>> 10 & 1023 | 55296), N = 56320 | N & 1023), U += O(N), U;
|
|
2166
2165
|
}).join("");
|
|
@@ -2173,35 +2172,35 @@ function Bi() {
|
|
|
2173
2172
|
}
|
|
2174
2173
|
function D(R, N, U) {
|
|
2175
2174
|
var P = 0;
|
|
2176
|
-
for (R = U ?
|
|
2177
|
-
R =
|
|
2178
|
-
return
|
|
2175
|
+
for (R = U ? d(R / u) : R >> 1, R += d(R / N); R > T * p >> 1; P += i)
|
|
2176
|
+
R = d(R / T);
|
|
2177
|
+
return d(P + (T + 1) * R / (R + f));
|
|
2179
2178
|
}
|
|
2180
2179
|
function se(R) {
|
|
2181
|
-
var N = [], U = R.length, P,
|
|
2180
|
+
var N = [], U = R.length, P, I = 0, W = x, z = y, K, ne, J, A, F, _, Q, G, Y;
|
|
2182
2181
|
for (K = R.lastIndexOf($), K < 0 && (K = 0), ne = 0; ne < K; ++ne)
|
|
2183
2182
|
R.charCodeAt(ne) >= 128 && q("not-basic"), N.push(R.charCodeAt(ne));
|
|
2184
2183
|
for (J = K > 0 ? K + 1 : 0; J < U; ) {
|
|
2185
|
-
for (
|
|
2186
|
-
Y = i - G, F >
|
|
2187
|
-
P = N.length + 1, z = D(
|
|
2184
|
+
for (A = I, F = 1, _ = i; J >= U && q("invalid-input"), Q = ae(R.charCodeAt(J++)), (Q >= i || Q > d((a - I) / F)) && q("overflow"), I += Q * F, G = _ <= z ? c : _ >= z + p ? p : _ - z, !(Q < G); _ += i)
|
|
2185
|
+
Y = i - G, F > d(a / Y) && q("overflow"), F *= Y;
|
|
2186
|
+
P = N.length + 1, z = D(I - A, P, A == 0), d(I / P) > a - W && q("overflow"), W += d(I / P), I %= P, N.splice(I++, 0, W);
|
|
2188
2187
|
}
|
|
2189
2188
|
return C(N);
|
|
2190
2189
|
}
|
|
2191
2190
|
function Z(R) {
|
|
2192
|
-
var N, U, P,
|
|
2191
|
+
var N, U, P, I, W, z, K, ne, J, A, F, _ = [], Q, G, Y, oe;
|
|
2193
2192
|
for (R = B(R), Q = R.length, N = x, U = 0, W = y, z = 0; z < Q; ++z)
|
|
2194
2193
|
F = R[z], F < 128 && _.push(O(F));
|
|
2195
|
-
for (P =
|
|
2194
|
+
for (P = I = _.length, I && _.push($); P < Q; ) {
|
|
2196
2195
|
for (K = a, z = 0; z < Q; ++z)
|
|
2197
2196
|
F = R[z], F >= N && F < K && (K = F);
|
|
2198
|
-
for (G = P + 1, K - N >
|
|
2197
|
+
for (G = P + 1, K - N > d((a - U) / G) && q("overflow"), U += (K - N) * G, N = K, z = 0; z < Q; ++z)
|
|
2199
2198
|
if (F = R[z], F < N && ++U > a && q("overflow"), F == N) {
|
|
2200
|
-
for (ne = U, J = i;
|
|
2201
|
-
oe = ne -
|
|
2202
|
-
O(H(
|
|
2203
|
-
), ne =
|
|
2204
|
-
_.push(O(H(ne, 0))), W = D(U, G, P ==
|
|
2199
|
+
for (ne = U, J = i; A = J <= W ? c : J >= W + p ? p : J - W, !(ne < A); J += i)
|
|
2200
|
+
oe = ne - A, Y = i - A, _.push(
|
|
2201
|
+
O(H(A + oe % Y, 0))
|
|
2202
|
+
), ne = d(oe / Y);
|
|
2203
|
+
_.push(O(H(ne, 0))), W = D(U, G, P == I), U = 0, ++P;
|
|
2205
2204
|
}
|
|
2206
2205
|
++U, ++N;
|
|
2207
2206
|
}
|
|
@@ -2209,7 +2208,7 @@ function Bi() {
|
|
|
2209
2208
|
}
|
|
2210
2209
|
function k(R) {
|
|
2211
2210
|
return E(R, function(N) {
|
|
2212
|
-
return
|
|
2211
|
+
return h.test(N) ? se(N.slice(4).toLowerCase()) : N;
|
|
2213
2212
|
});
|
|
2214
2213
|
}
|
|
2215
2214
|
function re(R) {
|
|
@@ -2250,85 +2249,85 @@ function Bi() {
|
|
|
2250
2249
|
})(_i);
|
|
2251
2250
|
}(_e, _e.exports)), _e.exports;
|
|
2252
2251
|
}
|
|
2253
|
-
var xt,
|
|
2252
|
+
var xt, nn;
|
|
2254
2253
|
function lo() {
|
|
2255
|
-
return
|
|
2254
|
+
return nn || (nn = 1, xt = Object), xt;
|
|
2256
2255
|
}
|
|
2257
|
-
var $t,
|
|
2256
|
+
var $t, on;
|
|
2258
2257
|
function Hi() {
|
|
2259
|
-
return
|
|
2258
|
+
return on || (on = 1, $t = Error), $t;
|
|
2260
2259
|
}
|
|
2261
|
-
var jt,
|
|
2260
|
+
var jt, an;
|
|
2262
2261
|
function Mi() {
|
|
2263
|
-
return
|
|
2262
|
+
return an || (an = 1, jt = EvalError), jt;
|
|
2264
2263
|
}
|
|
2265
|
-
var wt,
|
|
2264
|
+
var wt, sn;
|
|
2266
2265
|
function zi() {
|
|
2267
|
-
return
|
|
2266
|
+
return sn || (sn = 1, wt = RangeError), wt;
|
|
2268
2267
|
}
|
|
2269
|
-
var St,
|
|
2268
|
+
var St, ln;
|
|
2270
2269
|
function Gi() {
|
|
2271
|
-
return
|
|
2270
|
+
return ln || (ln = 1, St = ReferenceError), St;
|
|
2272
2271
|
}
|
|
2273
|
-
var Ot,
|
|
2272
|
+
var Ot, cn;
|
|
2274
2273
|
function co() {
|
|
2275
|
-
return
|
|
2274
|
+
return cn || (cn = 1, Ot = SyntaxError), Ot;
|
|
2276
2275
|
}
|
|
2277
|
-
var Tt,
|
|
2276
|
+
var Tt, un;
|
|
2278
2277
|
function We() {
|
|
2279
|
-
return
|
|
2278
|
+
return un || (un = 1, Tt = TypeError), Tt;
|
|
2280
2279
|
}
|
|
2281
|
-
var Ct,
|
|
2280
|
+
var Ct, fn;
|
|
2282
2281
|
function Wi() {
|
|
2283
|
-
return
|
|
2282
|
+
return fn || (fn = 1, Ct = URIError), Ct;
|
|
2284
2283
|
}
|
|
2285
|
-
var Pt,
|
|
2284
|
+
var Pt, pn;
|
|
2286
2285
|
function Ji() {
|
|
2287
|
-
return
|
|
2286
|
+
return pn || (pn = 1, Pt = Math.abs), Pt;
|
|
2288
2287
|
}
|
|
2289
|
-
var Rt,
|
|
2288
|
+
var Rt, dn;
|
|
2290
2289
|
function Vi() {
|
|
2291
|
-
return
|
|
2290
|
+
return dn || (dn = 1, Rt = Math.floor), Rt;
|
|
2292
2291
|
}
|
|
2293
|
-
var qt,
|
|
2292
|
+
var qt, hn;
|
|
2294
2293
|
function Di() {
|
|
2295
|
-
return
|
|
2294
|
+
return hn || (hn = 1, qt = Math.max), qt;
|
|
2296
2295
|
}
|
|
2297
|
-
var Nt,
|
|
2296
|
+
var Nt, yn;
|
|
2298
2297
|
function Qi() {
|
|
2299
|
-
return
|
|
2298
|
+
return yn || (yn = 1, Nt = Math.min), Nt;
|
|
2300
2299
|
}
|
|
2301
|
-
var kt,
|
|
2300
|
+
var kt, mn;
|
|
2302
2301
|
function Ki() {
|
|
2303
|
-
return
|
|
2302
|
+
return mn || (mn = 1, kt = Math.pow), kt;
|
|
2304
2303
|
}
|
|
2305
|
-
var Et,
|
|
2304
|
+
var Et, gn;
|
|
2306
2305
|
function Yi() {
|
|
2307
|
-
return
|
|
2306
|
+
return gn || (gn = 1, Et = Math.round), Et;
|
|
2308
2307
|
}
|
|
2309
|
-
var At,
|
|
2308
|
+
var At, vn;
|
|
2310
2309
|
function Xi() {
|
|
2311
|
-
return
|
|
2310
|
+
return vn || (vn = 1, At = Number.isNaN || function(n) {
|
|
2312
2311
|
return n !== n;
|
|
2313
2312
|
}), At;
|
|
2314
2313
|
}
|
|
2315
|
-
var It,
|
|
2314
|
+
var It, bn;
|
|
2316
2315
|
function Zi() {
|
|
2317
|
-
if (
|
|
2318
|
-
|
|
2316
|
+
if (bn) return It;
|
|
2317
|
+
bn = 1;
|
|
2319
2318
|
var e = /* @__PURE__ */ Xi();
|
|
2320
2319
|
return It = function(t) {
|
|
2321
2320
|
return e(t) || t === 0 ? t : t < 0 ? -1 : 1;
|
|
2322
2321
|
}, It;
|
|
2323
2322
|
}
|
|
2324
|
-
var Lt,
|
|
2323
|
+
var Lt, xn;
|
|
2325
2324
|
function es() {
|
|
2326
|
-
return
|
|
2325
|
+
return xn || (xn = 1, Lt = Object.getOwnPropertyDescriptor), Lt;
|
|
2327
2326
|
}
|
|
2328
|
-
var Ut,
|
|
2327
|
+
var Ut, $n;
|
|
2329
2328
|
function at() {
|
|
2330
|
-
if (
|
|
2331
|
-
|
|
2329
|
+
if ($n) return Ut;
|
|
2330
|
+
$n = 1;
|
|
2332
2331
|
var e = /* @__PURE__ */ es();
|
|
2333
2332
|
if (e)
|
|
2334
2333
|
try {
|
|
@@ -2338,10 +2337,10 @@ function at() {
|
|
|
2338
2337
|
}
|
|
2339
2338
|
return Ut = e, Ut;
|
|
2340
2339
|
}
|
|
2341
|
-
var Ft,
|
|
2340
|
+
var Ft, jn;
|
|
2342
2341
|
function it() {
|
|
2343
|
-
if (
|
|
2344
|
-
|
|
2342
|
+
if (jn) return Ft;
|
|
2343
|
+
jn = 1;
|
|
2345
2344
|
var e = Object.defineProperty || !1;
|
|
2346
2345
|
if (e)
|
|
2347
2346
|
try {
|
|
@@ -2351,9 +2350,9 @@ function it() {
|
|
|
2351
2350
|
}
|
|
2352
2351
|
return Ft = e, Ft;
|
|
2353
2352
|
}
|
|
2354
|
-
var _t,
|
|
2353
|
+
var _t, wn;
|
|
2355
2354
|
function ts() {
|
|
2356
|
-
return
|
|
2355
|
+
return wn || (wn = 1, _t = function() {
|
|
2357
2356
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2358
2357
|
return !1;
|
|
2359
2358
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2363,7 +2362,7 @@ function ts() {
|
|
|
2363
2362
|
return !1;
|
|
2364
2363
|
var s = 42;
|
|
2365
2364
|
n[t] = s;
|
|
2366
|
-
for (var
|
|
2365
|
+
for (var l in n)
|
|
2367
2366
|
return !1;
|
|
2368
2367
|
if (typeof Object.keys == "function" && Object.keys(n).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(n).length !== 0)
|
|
2369
2368
|
return !1;
|
|
@@ -2381,112 +2380,112 @@ function ts() {
|
|
|
2381
2380
|
return !0;
|
|
2382
2381
|
}), _t;
|
|
2383
2382
|
}
|
|
2384
|
-
var Bt,
|
|
2383
|
+
var Bt, Sn;
|
|
2385
2384
|
function rs() {
|
|
2386
|
-
if (
|
|
2387
|
-
|
|
2385
|
+
if (Sn) return Bt;
|
|
2386
|
+
Sn = 1;
|
|
2388
2387
|
var e = typeof Symbol < "u" && Symbol, n = ts();
|
|
2389
2388
|
return Bt = function() {
|
|
2390
2389
|
return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : n();
|
|
2391
2390
|
}, Bt;
|
|
2392
2391
|
}
|
|
2393
|
-
var Ht,
|
|
2392
|
+
var Ht, On;
|
|
2394
2393
|
function uo() {
|
|
2395
|
-
return
|
|
2394
|
+
return On || (On = 1, Ht = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Ht;
|
|
2396
2395
|
}
|
|
2397
|
-
var Mt,
|
|
2396
|
+
var Mt, Tn;
|
|
2398
2397
|
function fo() {
|
|
2399
|
-
if (
|
|
2400
|
-
|
|
2398
|
+
if (Tn) return Mt;
|
|
2399
|
+
Tn = 1;
|
|
2401
2400
|
var e = /* @__PURE__ */ lo();
|
|
2402
2401
|
return Mt = e.getPrototypeOf || null, Mt;
|
|
2403
2402
|
}
|
|
2404
|
-
var zt,
|
|
2403
|
+
var zt, Cn;
|
|
2405
2404
|
function ns() {
|
|
2406
|
-
if (
|
|
2407
|
-
|
|
2408
|
-
var e = "Function.prototype.bind called on incompatible ", n = Object.prototype.toString, t = Math.max, o = "[object Function]", s = function(i,
|
|
2409
|
-
for (var
|
|
2410
|
-
|
|
2411
|
-
for (var
|
|
2412
|
-
|
|
2413
|
-
return
|
|
2414
|
-
},
|
|
2415
|
-
for (var
|
|
2416
|
-
|
|
2417
|
-
return
|
|
2405
|
+
if (Cn) return zt;
|
|
2406
|
+
Cn = 1;
|
|
2407
|
+
var e = "Function.prototype.bind called on incompatible ", n = Object.prototype.toString, t = Math.max, o = "[object Function]", s = function(i, c) {
|
|
2408
|
+
for (var p = [], f = 0; f < i.length; f += 1)
|
|
2409
|
+
p[f] = i[f];
|
|
2410
|
+
for (var u = 0; u < c.length; u += 1)
|
|
2411
|
+
p[u + i.length] = c[u];
|
|
2412
|
+
return p;
|
|
2413
|
+
}, l = function(i, c) {
|
|
2414
|
+
for (var p = [], f = c, u = 0; f < i.length; f += 1, u += 1)
|
|
2415
|
+
p[u] = i[f];
|
|
2416
|
+
return p;
|
|
2418
2417
|
}, r = function(a, i) {
|
|
2419
|
-
for (var
|
|
2420
|
-
|
|
2421
|
-
return
|
|
2418
|
+
for (var c = "", p = 0; p < a.length; p += 1)
|
|
2419
|
+
c += a[p], p + 1 < a.length && (c += i);
|
|
2420
|
+
return c;
|
|
2422
2421
|
};
|
|
2423
2422
|
return zt = function(i) {
|
|
2424
|
-
var
|
|
2425
|
-
if (typeof
|
|
2426
|
-
throw new TypeError(e +
|
|
2427
|
-
for (var
|
|
2423
|
+
var c = this;
|
|
2424
|
+
if (typeof c != "function" || n.apply(c) !== o)
|
|
2425
|
+
throw new TypeError(e + c);
|
|
2426
|
+
for (var p = l(arguments, 1), f, u = function() {
|
|
2428
2427
|
if (this instanceof f) {
|
|
2429
|
-
var m =
|
|
2428
|
+
var m = c.apply(
|
|
2430
2429
|
this,
|
|
2431
|
-
s(
|
|
2430
|
+
s(p, arguments)
|
|
2432
2431
|
);
|
|
2433
2432
|
return Object(m) === m ? m : this;
|
|
2434
2433
|
}
|
|
2435
|
-
return
|
|
2434
|
+
return c.apply(
|
|
2436
2435
|
i,
|
|
2437
|
-
s(
|
|
2436
|
+
s(p, arguments)
|
|
2438
2437
|
);
|
|
2439
|
-
}, y = t(0,
|
|
2438
|
+
}, y = t(0, c.length - p.length), x = [], $ = 0; $ < y; $++)
|
|
2440
2439
|
x[$] = "$" + $;
|
|
2441
|
-
if (f = Function("binder", "return function (" + r(x, ",") + "){ return binder.apply(this,arguments); }")(
|
|
2442
|
-
var
|
|
2440
|
+
if (f = Function("binder", "return function (" + r(x, ",") + "){ return binder.apply(this,arguments); }")(u), c.prototype) {
|
|
2441
|
+
var h = function() {
|
|
2443
2442
|
};
|
|
2444
|
-
|
|
2443
|
+
h.prototype = c.prototype, f.prototype = new h(), h.prototype = null;
|
|
2445
2444
|
}
|
|
2446
2445
|
return f;
|
|
2447
2446
|
}, zt;
|
|
2448
2447
|
}
|
|
2449
|
-
var Gt,
|
|
2448
|
+
var Gt, Pn;
|
|
2450
2449
|
function Je() {
|
|
2451
|
-
if (
|
|
2452
|
-
|
|
2450
|
+
if (Pn) return Gt;
|
|
2451
|
+
Pn = 1;
|
|
2453
2452
|
var e = ns();
|
|
2454
2453
|
return Gt = Function.prototype.bind || e, Gt;
|
|
2455
2454
|
}
|
|
2456
|
-
var Wt,
|
|
2457
|
-
function
|
|
2458
|
-
return
|
|
2455
|
+
var Wt, Rn;
|
|
2456
|
+
function wr() {
|
|
2457
|
+
return Rn || (Rn = 1, Wt = Function.prototype.call), Wt;
|
|
2459
2458
|
}
|
|
2460
|
-
var Jt,
|
|
2461
|
-
function
|
|
2462
|
-
return
|
|
2459
|
+
var Jt, qn;
|
|
2460
|
+
function Sr() {
|
|
2461
|
+
return qn || (qn = 1, Jt = Function.prototype.apply), Jt;
|
|
2463
2462
|
}
|
|
2464
|
-
var Vt,
|
|
2463
|
+
var Vt, Nn;
|
|
2465
2464
|
function os() {
|
|
2466
|
-
return
|
|
2465
|
+
return Nn || (Nn = 1, Vt = typeof Reflect < "u" && Reflect && Reflect.apply), Vt;
|
|
2467
2466
|
}
|
|
2468
|
-
var Dt,
|
|
2467
|
+
var Dt, kn;
|
|
2469
2468
|
function po() {
|
|
2470
|
-
if (
|
|
2471
|
-
|
|
2472
|
-
var e = Je(), n =
|
|
2469
|
+
if (kn) return Dt;
|
|
2470
|
+
kn = 1;
|
|
2471
|
+
var e = Je(), n = Sr(), t = wr(), o = os();
|
|
2473
2472
|
return Dt = o || e.call(t, n), Dt;
|
|
2474
2473
|
}
|
|
2475
|
-
var Qt,
|
|
2474
|
+
var Qt, En;
|
|
2476
2475
|
function ho() {
|
|
2477
|
-
if (
|
|
2478
|
-
|
|
2479
|
-
var e = Je(), n = /* @__PURE__ */ We(), t =
|
|
2480
|
-
return Qt = function(
|
|
2481
|
-
if (
|
|
2476
|
+
if (En) return Qt;
|
|
2477
|
+
En = 1;
|
|
2478
|
+
var e = Je(), n = /* @__PURE__ */ We(), t = wr(), o = po();
|
|
2479
|
+
return Qt = function(l) {
|
|
2480
|
+
if (l.length < 1 || typeof l[0] != "function")
|
|
2482
2481
|
throw new n("a function is required");
|
|
2483
|
-
return o(e, t,
|
|
2482
|
+
return o(e, t, l);
|
|
2484
2483
|
}, Qt;
|
|
2485
2484
|
}
|
|
2486
|
-
var Kt,
|
|
2485
|
+
var Kt, An;
|
|
2487
2486
|
function as() {
|
|
2488
|
-
if (
|
|
2489
|
-
|
|
2487
|
+
if (An) return Kt;
|
|
2488
|
+
An = 1;
|
|
2490
2489
|
var e = ho(), n = /* @__PURE__ */ at(), t;
|
|
2491
2490
|
try {
|
|
2492
2491
|
t = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
@@ -2499,18 +2498,18 @@ function as() {
|
|
|
2499
2498
|
Object.prototype,
|
|
2500
2499
|
/** @type {keyof typeof Object.prototype} */
|
|
2501
2500
|
"__proto__"
|
|
2502
|
-
), s = Object,
|
|
2503
|
-
return Kt = o && typeof o.get == "function" ? e([o.get]) : typeof
|
|
2501
|
+
), s = Object, l = s.getPrototypeOf;
|
|
2502
|
+
return Kt = o && typeof o.get == "function" ? e([o.get]) : typeof l == "function" ? (
|
|
2504
2503
|
/** @type {import('./get')} */
|
|
2505
2504
|
function(a) {
|
|
2506
|
-
return
|
|
2505
|
+
return l(a == null ? a : s(a));
|
|
2507
2506
|
}
|
|
2508
2507
|
) : !1, Kt;
|
|
2509
2508
|
}
|
|
2510
|
-
var Yt,
|
|
2509
|
+
var Yt, In;
|
|
2511
2510
|
function is() {
|
|
2512
|
-
if (
|
|
2513
|
-
|
|
2511
|
+
if (In) return Yt;
|
|
2512
|
+
In = 1;
|
|
2514
2513
|
var e = uo(), n = fo(), t = /* @__PURE__ */ as();
|
|
2515
2514
|
return Yt = e ? function(s) {
|
|
2516
2515
|
return e(s);
|
|
@@ -2522,25 +2521,25 @@ function is() {
|
|
|
2522
2521
|
return t(s);
|
|
2523
2522
|
} : null, Yt;
|
|
2524
2523
|
}
|
|
2525
|
-
var Xt,
|
|
2524
|
+
var Xt, Ln;
|
|
2526
2525
|
function ss() {
|
|
2527
|
-
if (
|
|
2528
|
-
|
|
2526
|
+
if (Ln) return Xt;
|
|
2527
|
+
Ln = 1;
|
|
2529
2528
|
var e = Function.prototype.call, n = Object.prototype.hasOwnProperty, t = Je();
|
|
2530
2529
|
return Xt = t.call(e, n), Xt;
|
|
2531
2530
|
}
|
|
2532
|
-
var Zt,
|
|
2533
|
-
function
|
|
2534
|
-
if (
|
|
2535
|
-
|
|
2536
|
-
var e, n = /* @__PURE__ */ lo(), t = /* @__PURE__ */ Hi(), o = /* @__PURE__ */ Mi(), s = /* @__PURE__ */ zi(),
|
|
2531
|
+
var Zt, Un;
|
|
2532
|
+
function Or() {
|
|
2533
|
+
if (Un) return Zt;
|
|
2534
|
+
Un = 1;
|
|
2535
|
+
var e, n = /* @__PURE__ */ lo(), t = /* @__PURE__ */ Hi(), o = /* @__PURE__ */ Mi(), s = /* @__PURE__ */ zi(), l = /* @__PURE__ */ Gi(), r = /* @__PURE__ */ co(), a = /* @__PURE__ */ We(), i = /* @__PURE__ */ Wi(), c = /* @__PURE__ */ Ji(), p = /* @__PURE__ */ Vi(), f = /* @__PURE__ */ Di(), u = /* @__PURE__ */ Qi(), y = /* @__PURE__ */ Ki(), x = /* @__PURE__ */ Yi(), $ = /* @__PURE__ */ Zi(), h = Function, m = function(J) {
|
|
2537
2536
|
try {
|
|
2538
|
-
return
|
|
2537
|
+
return h('"use strict"; return (' + J + ").constructor;")();
|
|
2539
2538
|
} catch {
|
|
2540
2539
|
}
|
|
2541
|
-
}, v = /* @__PURE__ */ at(),
|
|
2540
|
+
}, v = /* @__PURE__ */ at(), w = /* @__PURE__ */ it(), T = function() {
|
|
2542
2541
|
throw new a();
|
|
2543
|
-
},
|
|
2542
|
+
}, d = v ? function() {
|
|
2544
2543
|
try {
|
|
2545
2544
|
return arguments.callee, T;
|
|
2546
2545
|
} catch {
|
|
@@ -2550,7 +2549,7 @@ function Tr() {
|
|
|
2550
2549
|
return T;
|
|
2551
2550
|
}
|
|
2552
2551
|
}
|
|
2553
|
-
}() : T, O = rs()(), b = is(), q = fo(),
|
|
2552
|
+
}() : T, O = rs()(), b = is(), q = fo(), L = uo(), E = Sr(), B = wr(), C = {}, ae = typeof Uint8Array > "u" || !b ? e : b(Uint8Array), H = {
|
|
2554
2553
|
__proto__: null,
|
|
2555
2554
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
2556
2555
|
"%Array%": Array,
|
|
@@ -2579,7 +2578,7 @@ function Tr() {
|
|
|
2579
2578
|
"%Float32Array%": typeof Float32Array > "u" ? e : Float32Array,
|
|
2580
2579
|
"%Float64Array%": typeof Float64Array > "u" ? e : Float64Array,
|
|
2581
2580
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? e : FinalizationRegistry,
|
|
2582
|
-
"%Function%":
|
|
2581
|
+
"%Function%": h,
|
|
2583
2582
|
"%GeneratorFunction%": C,
|
|
2584
2583
|
"%Int8Array%": typeof Int8Array > "u" ? e : Int8Array,
|
|
2585
2584
|
"%Int16Array%": typeof Int16Array > "u" ? e : Int16Array,
|
|
@@ -2599,7 +2598,7 @@ function Tr() {
|
|
|
2599
2598
|
"%Promise%": typeof Promise > "u" ? e : Promise,
|
|
2600
2599
|
"%Proxy%": typeof Proxy > "u" ? e : Proxy,
|
|
2601
2600
|
"%RangeError%": s,
|
|
2602
|
-
"%ReferenceError%":
|
|
2601
|
+
"%ReferenceError%": l,
|
|
2603
2602
|
"%Reflect%": typeof Reflect > "u" ? e : Reflect,
|
|
2604
2603
|
"%RegExp%": RegExp,
|
|
2605
2604
|
"%Set%": typeof Set > "u" ? e : Set,
|
|
@@ -2609,7 +2608,7 @@ function Tr() {
|
|
|
2609
2608
|
"%StringIteratorPrototype%": O && b ? b(""[Symbol.iterator]()) : e,
|
|
2610
2609
|
"%Symbol%": O ? Symbol : e,
|
|
2611
2610
|
"%SyntaxError%": r,
|
|
2612
|
-
"%ThrowTypeError%":
|
|
2611
|
+
"%ThrowTypeError%": d,
|
|
2613
2612
|
"%TypedArray%": ae,
|
|
2614
2613
|
"%TypeError%": a,
|
|
2615
2614
|
"%Uint8Array%": typeof Uint8Array > "u" ? e : Uint8Array,
|
|
@@ -2622,16 +2621,16 @@ function Tr() {
|
|
|
2622
2621
|
"%WeakSet%": typeof WeakSet > "u" ? e : WeakSet,
|
|
2623
2622
|
"%Function.prototype.call%": B,
|
|
2624
2623
|
"%Function.prototype.apply%": E,
|
|
2625
|
-
"%Object.defineProperty%":
|
|
2624
|
+
"%Object.defineProperty%": w,
|
|
2626
2625
|
"%Object.getPrototypeOf%": q,
|
|
2627
|
-
"%Math.abs%":
|
|
2628
|
-
"%Math.floor%":
|
|
2626
|
+
"%Math.abs%": c,
|
|
2627
|
+
"%Math.floor%": p,
|
|
2629
2628
|
"%Math.max%": f,
|
|
2630
|
-
"%Math.min%":
|
|
2629
|
+
"%Math.min%": u,
|
|
2631
2630
|
"%Math.pow%": y,
|
|
2632
2631
|
"%Math.round%": x,
|
|
2633
2632
|
"%Math.sign%": $,
|
|
2634
|
-
"%Reflect.getPrototypeOf%":
|
|
2633
|
+
"%Reflect.getPrototypeOf%": L
|
|
2635
2634
|
};
|
|
2636
2635
|
if (b)
|
|
2637
2636
|
try {
|
|
@@ -2640,22 +2639,22 @@ function Tr() {
|
|
|
2640
2639
|
var D = b(b(J));
|
|
2641
2640
|
H["%Error.prototype%"] = D;
|
|
2642
2641
|
}
|
|
2643
|
-
var se = function J(
|
|
2642
|
+
var se = function J(A) {
|
|
2644
2643
|
var F;
|
|
2645
|
-
if (
|
|
2644
|
+
if (A === "%AsyncFunction%")
|
|
2646
2645
|
F = m("async function () {}");
|
|
2647
|
-
else if (
|
|
2646
|
+
else if (A === "%GeneratorFunction%")
|
|
2648
2647
|
F = m("function* () {}");
|
|
2649
|
-
else if (
|
|
2648
|
+
else if (A === "%AsyncGeneratorFunction%")
|
|
2650
2649
|
F = m("async function* () {}");
|
|
2651
|
-
else if (
|
|
2650
|
+
else if (A === "%AsyncGenerator%") {
|
|
2652
2651
|
var _ = J("%AsyncGeneratorFunction%");
|
|
2653
2652
|
_ && (F = _.prototype);
|
|
2654
|
-
} else if (
|
|
2653
|
+
} else if (A === "%AsyncIteratorPrototype%") {
|
|
2655
2654
|
var Q = J("%AsyncGenerator%");
|
|
2656
2655
|
Q && b && (F = b(Q.prototype));
|
|
2657
2656
|
}
|
|
2658
|
-
return H[
|
|
2657
|
+
return H[A] = F, F;
|
|
2659
2658
|
}, Z = {
|
|
2660
2659
|
__proto__: null,
|
|
2661
2660
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
@@ -2709,38 +2708,38 @@ function Tr() {
|
|
|
2709
2708
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2710
2709
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2711
2710
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2712
|
-
}, k = Je(), re = /* @__PURE__ */ ss(), R = k.call(B, Array.prototype.concat), N = k.call(E, Array.prototype.splice), U = k.call(B, String.prototype.replace), P = k.call(B, String.prototype.slice),
|
|
2713
|
-
var F = P(
|
|
2711
|
+
}, k = Je(), re = /* @__PURE__ */ ss(), R = k.call(B, Array.prototype.concat), N = k.call(E, Array.prototype.splice), U = k.call(B, String.prototype.replace), P = k.call(B, String.prototype.slice), I = k.call(B, RegExp.prototype.exec), W = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, z = /\\(\\)?/g, K = function(A) {
|
|
2712
|
+
var F = P(A, 0, 1), _ = P(A, -1);
|
|
2714
2713
|
if (F === "%" && _ !== "%")
|
|
2715
2714
|
throw new r("invalid intrinsic syntax, expected closing `%`");
|
|
2716
2715
|
if (_ === "%" && F !== "%")
|
|
2717
2716
|
throw new r("invalid intrinsic syntax, expected opening `%`");
|
|
2718
2717
|
var Q = [];
|
|
2719
|
-
return U(
|
|
2718
|
+
return U(A, W, function(G, Y, oe, he) {
|
|
2720
2719
|
Q[Q.length] = oe ? U(he, z, "$1") : Y || G;
|
|
2721
2720
|
}), Q;
|
|
2722
|
-
}, ne = function(
|
|
2723
|
-
var _ =
|
|
2721
|
+
}, ne = function(A, F) {
|
|
2722
|
+
var _ = A, Q;
|
|
2724
2723
|
if (re(Z, _) && (Q = Z[_], _ = "%" + Q[0] + "%"), re(H, _)) {
|
|
2725
2724
|
var G = H[_];
|
|
2726
2725
|
if (G === C && (G = se(_)), typeof G > "u" && !F)
|
|
2727
|
-
throw new a("intrinsic " +
|
|
2726
|
+
throw new a("intrinsic " + A + " exists, but is not available. Please file an issue!");
|
|
2728
2727
|
return {
|
|
2729
2728
|
alias: Q,
|
|
2730
2729
|
name: _,
|
|
2731
2730
|
value: G
|
|
2732
2731
|
};
|
|
2733
2732
|
}
|
|
2734
|
-
throw new r("intrinsic " +
|
|
2733
|
+
throw new r("intrinsic " + A + " does not exist!");
|
|
2735
2734
|
};
|
|
2736
|
-
return Zt = function(
|
|
2737
|
-
if (typeof
|
|
2735
|
+
return Zt = function(A, F) {
|
|
2736
|
+
if (typeof A != "string" || A.length === 0)
|
|
2738
2737
|
throw new a("intrinsic name must be a non-empty string");
|
|
2739
2738
|
if (arguments.length > 1 && typeof F != "boolean")
|
|
2740
2739
|
throw new a('"allowMissing" argument must be a boolean');
|
|
2741
|
-
if (
|
|
2740
|
+
if (I(/^%?[^%]*%?$/, A) === null)
|
|
2742
2741
|
throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
2743
|
-
var _ = K(
|
|
2742
|
+
var _ = K(A), Q = _.length > 0 ? _[0] : "", G = ne("%" + Q + "%", F), Y = G.name, oe = G.value, he = !1, Oe = G.alias;
|
|
2744
2743
|
Oe && (Q = Oe[0], N(_, R([0, 1], Oe)));
|
|
2745
2744
|
for (var Ne = 1, Te = !0; Ne < _.length; Ne += 1) {
|
|
2746
2745
|
var me = _[Ne], ke = P(me, 0, 1), Ee = P(me, -1);
|
|
@@ -2751,7 +2750,7 @@ function Tr() {
|
|
|
2751
2750
|
else if (oe != null) {
|
|
2752
2751
|
if (!(me in oe)) {
|
|
2753
2752
|
if (!F)
|
|
2754
|
-
throw new a("base intrinsic for " +
|
|
2753
|
+
throw new a("base intrinsic for " + A + " exists, but the property is not available.");
|
|
2755
2754
|
return;
|
|
2756
2755
|
}
|
|
2757
2756
|
if (v && Ne + 1 >= _.length) {
|
|
@@ -2765,13 +2764,13 @@ function Tr() {
|
|
|
2765
2764
|
return oe;
|
|
2766
2765
|
}, Zt;
|
|
2767
2766
|
}
|
|
2768
|
-
var er = { exports: {} }, tr,
|
|
2767
|
+
var er = { exports: {} }, tr, Fn;
|
|
2769
2768
|
function ls() {
|
|
2770
|
-
if (
|
|
2771
|
-
|
|
2769
|
+
if (Fn) return tr;
|
|
2770
|
+
Fn = 1;
|
|
2772
2771
|
var e = /* @__PURE__ */ it(), n = /* @__PURE__ */ co(), t = /* @__PURE__ */ We(), o = /* @__PURE__ */ at();
|
|
2773
|
-
return tr = function(
|
|
2774
|
-
if (!
|
|
2772
|
+
return tr = function(l, r, a) {
|
|
2773
|
+
if (!l || typeof l != "object" && typeof l != "function")
|
|
2775
2774
|
throw new t("`obj` must be an object or a function`");
|
|
2776
2775
|
if (typeof r != "string" && typeof r != "symbol")
|
|
2777
2776
|
throw new t("`property` must be a string or a symbol`");
|
|
@@ -2783,24 +2782,24 @@ function ls() {
|
|
|
2783
2782
|
throw new t("`nonConfigurable`, if provided, must be a boolean or null");
|
|
2784
2783
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
2785
2784
|
throw new t("`loose`, if provided, must be a boolean");
|
|
2786
|
-
var i = arguments.length > 3 ? arguments[3] : null,
|
|
2785
|
+
var i = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null, p = arguments.length > 5 ? arguments[5] : null, f = arguments.length > 6 ? arguments[6] : !1, u = !!o && o(l, r);
|
|
2787
2786
|
if (e)
|
|
2788
|
-
e(
|
|
2789
|
-
configurable:
|
|
2790
|
-
enumerable: i === null &&
|
|
2787
|
+
e(l, r, {
|
|
2788
|
+
configurable: p === null && u ? u.configurable : !p,
|
|
2789
|
+
enumerable: i === null && u ? u.enumerable : !i,
|
|
2791
2790
|
value: a,
|
|
2792
|
-
writable:
|
|
2791
|
+
writable: c === null && u ? u.writable : !c
|
|
2793
2792
|
});
|
|
2794
|
-
else if (f || !i && !
|
|
2795
|
-
|
|
2793
|
+
else if (f || !i && !c && !p)
|
|
2794
|
+
l[r] = a;
|
|
2796
2795
|
else
|
|
2797
2796
|
throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
2798
2797
|
}, tr;
|
|
2799
2798
|
}
|
|
2800
|
-
var rr,
|
|
2799
|
+
var rr, _n;
|
|
2801
2800
|
function cs() {
|
|
2802
|
-
if (
|
|
2803
|
-
|
|
2801
|
+
if (_n) return rr;
|
|
2802
|
+
_n = 1;
|
|
2804
2803
|
var e = /* @__PURE__ */ it(), n = function() {
|
|
2805
2804
|
return !!e;
|
|
2806
2805
|
};
|
|
@@ -2814,22 +2813,22 @@ function cs() {
|
|
|
2814
2813
|
}
|
|
2815
2814
|
}, rr = n, rr;
|
|
2816
2815
|
}
|
|
2817
|
-
var nr,
|
|
2816
|
+
var nr, Bn;
|
|
2818
2817
|
function us() {
|
|
2819
|
-
if (
|
|
2820
|
-
|
|
2821
|
-
var e = /* @__PURE__ */
|
|
2818
|
+
if (Bn) return nr;
|
|
2819
|
+
Bn = 1;
|
|
2820
|
+
var e = /* @__PURE__ */ Or(), n = /* @__PURE__ */ ls(), t = /* @__PURE__ */ cs()(), o = /* @__PURE__ */ at(), s = /* @__PURE__ */ We(), l = e("%Math.floor%");
|
|
2822
2821
|
return nr = function(a, i) {
|
|
2823
2822
|
if (typeof a != "function")
|
|
2824
2823
|
throw new s("`fn` is not a function");
|
|
2825
|
-
if (typeof i != "number" || i < 0 || i > 4294967295 ||
|
|
2824
|
+
if (typeof i != "number" || i < 0 || i > 4294967295 || l(i) !== i)
|
|
2826
2825
|
throw new s("`length` must be a positive 32-bit integer");
|
|
2827
|
-
var
|
|
2826
|
+
var c = arguments.length > 2 && !!arguments[2], p = !0, f = !0;
|
|
2828
2827
|
if ("length" in a && o) {
|
|
2829
|
-
var
|
|
2830
|
-
|
|
2828
|
+
var u = o(a, "length");
|
|
2829
|
+
u && !u.configurable && (p = !1), u && !u.writable && (f = !1);
|
|
2831
2830
|
}
|
|
2832
|
-
return (
|
|
2831
|
+
return (p || f || !c) && (t ? n(
|
|
2833
2832
|
/** @type {Parameters<define>[0]} */
|
|
2834
2833
|
a,
|
|
2835
2834
|
"length",
|
|
@@ -2844,18 +2843,18 @@ function us() {
|
|
|
2844
2843
|
)), a;
|
|
2845
2844
|
}, nr;
|
|
2846
2845
|
}
|
|
2847
|
-
var or,
|
|
2846
|
+
var or, Hn;
|
|
2848
2847
|
function fs() {
|
|
2849
|
-
if (
|
|
2850
|
-
|
|
2851
|
-
var e = Je(), n =
|
|
2848
|
+
if (Hn) return or;
|
|
2849
|
+
Hn = 1;
|
|
2850
|
+
var e = Je(), n = Sr(), t = po();
|
|
2852
2851
|
return or = function() {
|
|
2853
2852
|
return t(e, n, arguments);
|
|
2854
2853
|
}, or;
|
|
2855
2854
|
}
|
|
2856
|
-
var
|
|
2855
|
+
var Mn;
|
|
2857
2856
|
function ps() {
|
|
2858
|
-
return
|
|
2857
|
+
return Mn || (Mn = 1, function(e) {
|
|
2859
2858
|
var n = /* @__PURE__ */ us(), t = /* @__PURE__ */ it(), o = ho(), s = fs();
|
|
2860
2859
|
e.exports = function(r) {
|
|
2861
2860
|
var a = o(arguments), i = r.length - (arguments.length - 1);
|
|
@@ -2867,39 +2866,39 @@ function ps() {
|
|
|
2867
2866
|
}, t ? t(e.exports, "apply", { value: s }) : e.exports.apply = s;
|
|
2868
2867
|
}(er)), er.exports;
|
|
2869
2868
|
}
|
|
2870
|
-
var ar,
|
|
2869
|
+
var ar, zn;
|
|
2871
2870
|
function ds() {
|
|
2872
|
-
if (
|
|
2873
|
-
|
|
2874
|
-
var e = /* @__PURE__ */
|
|
2875
|
-
return ar = function(s,
|
|
2876
|
-
var r = e(s, !!
|
|
2871
|
+
if (zn) return ar;
|
|
2872
|
+
zn = 1;
|
|
2873
|
+
var e = /* @__PURE__ */ Or(), n = ps(), t = n(e("String.prototype.indexOf"));
|
|
2874
|
+
return ar = function(s, l) {
|
|
2875
|
+
var r = e(s, !!l);
|
|
2877
2876
|
return typeof r == "function" && t(s, ".prototype.") > -1 ? n(r) : r;
|
|
2878
2877
|
}, ar;
|
|
2879
2878
|
}
|
|
2880
2879
|
const hs = /* @__PURE__ */ da(ha);
|
|
2881
|
-
var ir,
|
|
2880
|
+
var ir, Gn;
|
|
2882
2881
|
function ys() {
|
|
2883
|
-
if (
|
|
2884
|
-
|
|
2885
|
-
var e = typeof Map == "function" && Map.prototype, n = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && n && typeof n.get == "function" ? n.get : null, o = e && Map.prototype.forEach, s = typeof Set == "function" && Set.prototype,
|
|
2882
|
+
if (Gn) return ir;
|
|
2883
|
+
Gn = 1;
|
|
2884
|
+
var e = typeof Map == "function" && Map.prototype, n = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && n && typeof n.get == "function" ? n.get : null, o = e && Map.prototype.forEach, s = typeof Set == "function" && Set.prototype, l = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, r = s && l && typeof l.get == "function" ? l.get : null, a = s && Set.prototype.forEach, i = typeof WeakMap == "function" && WeakMap.prototype, c = i ? WeakMap.prototype.has : null, p = typeof WeakSet == "function" && WeakSet.prototype, f = p ? WeakSet.prototype.has : null, u = typeof WeakRef == "function" && WeakRef.prototype, y = u ? WeakRef.prototype.deref : null, x = Boolean.prototype.valueOf, $ = Object.prototype.toString, h = Function.prototype.toString, m = String.prototype.match, v = String.prototype.slice, w = String.prototype.replace, T = String.prototype.toUpperCase, d = String.prototype.toLowerCase, O = RegExp.prototype.test, b = Array.prototype.concat, q = Array.prototype.join, L = Array.prototype.slice, E = Math.floor, B = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, C = Object.getOwnPropertySymbols, ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, H = typeof Symbol == "function" && typeof Symbol.iterator == "object", D = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === H || !0) ? Symbol.toStringTag : null, se = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(j) {
|
|
2886
2885
|
return j.__proto__;
|
|
2887
2886
|
} : null);
|
|
2888
|
-
function k(j,
|
|
2889
|
-
if (j === 1 / 0 || j === -1 / 0 || j !== j || j && j > -1e3 && j < 1e3 || O.call(/e/,
|
|
2890
|
-
return
|
|
2887
|
+
function k(j, S) {
|
|
2888
|
+
if (j === 1 / 0 || j === -1 / 0 || j !== j || j && j > -1e3 && j < 1e3 || O.call(/e/, S))
|
|
2889
|
+
return S;
|
|
2891
2890
|
var X = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
2892
2891
|
if (typeof j == "number") {
|
|
2893
2892
|
var ee = j < 0 ? -E(-j) : E(j);
|
|
2894
2893
|
if (ee !== j) {
|
|
2895
|
-
var ie = String(ee), M = v.call(
|
|
2896
|
-
return
|
|
2894
|
+
var ie = String(ee), M = v.call(S, ie.length + 1);
|
|
2895
|
+
return w.call(ie, X, "$&_") + "." + w.call(w.call(M, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
2897
2896
|
}
|
|
2898
2897
|
}
|
|
2899
|
-
return
|
|
2898
|
+
return w.call(S, X, "$&_");
|
|
2900
2899
|
}
|
|
2901
2900
|
var re = hs, R = re.custom, N = F(R) ? R : null;
|
|
2902
|
-
ir = function j(
|
|
2901
|
+
ir = function j(S, X, ee, ie) {
|
|
2903
2902
|
var M = X || {};
|
|
2904
2903
|
if (G(M, "quoteStyle") && M.quoteStyle !== "single" && M.quoteStyle !== "double")
|
|
2905
2904
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
@@ -2913,114 +2912,114 @@ function ys() {
|
|
|
2913
2912
|
if (G(M, "numericSeparator") && typeof M.numericSeparator != "boolean")
|
|
2914
2913
|
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
2915
2914
|
var Pe = M.numericSeparator;
|
|
2916
|
-
if (typeof
|
|
2915
|
+
if (typeof S > "u")
|
|
2917
2916
|
return "undefined";
|
|
2918
|
-
if (
|
|
2917
|
+
if (S === null)
|
|
2919
2918
|
return "null";
|
|
2920
|
-
if (typeof
|
|
2921
|
-
return
|
|
2922
|
-
if (typeof
|
|
2923
|
-
return Ce(
|
|
2924
|
-
if (typeof
|
|
2925
|
-
if (
|
|
2926
|
-
return 1 / 0 /
|
|
2927
|
-
var de = String(
|
|
2928
|
-
return Pe ? k(
|
|
2919
|
+
if (typeof S == "boolean")
|
|
2920
|
+
return S ? "true" : "false";
|
|
2921
|
+
if (typeof S == "string")
|
|
2922
|
+
return Ce(S, M);
|
|
2923
|
+
if (typeof S == "number") {
|
|
2924
|
+
if (S === 0)
|
|
2925
|
+
return 1 / 0 / S > 0 ? "0" : "-0";
|
|
2926
|
+
var de = String(S);
|
|
2927
|
+
return Pe ? k(S, de) : de;
|
|
2929
2928
|
}
|
|
2930
|
-
if (typeof
|
|
2931
|
-
var we = String(
|
|
2932
|
-
return Pe ? k(
|
|
2929
|
+
if (typeof S == "bigint") {
|
|
2930
|
+
var we = String(S) + "n";
|
|
2931
|
+
return Pe ? k(S, we) : we;
|
|
2933
2932
|
}
|
|
2934
2933
|
var ct = typeof M.depth > "u" ? 5 : M.depth;
|
|
2935
|
-
if (typeof ee > "u" && (ee = 0), ee >= ct && ct > 0 && typeof
|
|
2936
|
-
return
|
|
2934
|
+
if (typeof ee > "u" && (ee = 0), ee >= ct && ct > 0 && typeof S == "object")
|
|
2935
|
+
return I(S) ? "[Array]" : "[Object]";
|
|
2937
2936
|
var Ae = Oo(M, ee);
|
|
2938
2937
|
if (typeof ie > "u")
|
|
2939
2938
|
ie = [];
|
|
2940
|
-
else if (he(ie,
|
|
2939
|
+
else if (he(ie, S) >= 0)
|
|
2941
2940
|
return "[Circular]";
|
|
2942
2941
|
function ge(Ie, Qe, Co) {
|
|
2943
|
-
if (Qe && (ie =
|
|
2944
|
-
var
|
|
2942
|
+
if (Qe && (ie = L.call(ie), ie.push(Qe)), Co) {
|
|
2943
|
+
var Ur = {
|
|
2945
2944
|
depth: M.depth
|
|
2946
2945
|
};
|
|
2947
|
-
return G(M, "quoteStyle") && (
|
|
2946
|
+
return G(M, "quoteStyle") && (Ur.quoteStyle = M.quoteStyle), j(Ie, Ur, ee + 1, ie);
|
|
2948
2947
|
}
|
|
2949
2948
|
return j(Ie, M, ee + 1, ie);
|
|
2950
2949
|
}
|
|
2951
|
-
if (typeof
|
|
2952
|
-
var
|
|
2953
|
-
return "[Function" + (
|
|
2950
|
+
if (typeof S == "function" && !z(S)) {
|
|
2951
|
+
var qr = oe(S), Nr = Ve(S, ge);
|
|
2952
|
+
return "[Function" + (qr ? ": " + qr : " (anonymous)") + "]" + (Nr.length > 0 ? " { " + q.call(Nr, ", ") + " }" : "");
|
|
2954
2953
|
}
|
|
2955
|
-
if (F(
|
|
2956
|
-
var
|
|
2957
|
-
return typeof
|
|
2954
|
+
if (F(S)) {
|
|
2955
|
+
var kr = H ? w.call(String(S), /^(Symbol\(.*\))_[^)]*$/, "$1") : ae.call(S);
|
|
2956
|
+
return typeof S == "object" && !H ? Ue(kr) : kr;
|
|
2958
2957
|
}
|
|
2959
|
-
if (Ee(
|
|
2960
|
-
for (var Fe = "<" +
|
|
2958
|
+
if (Ee(S)) {
|
|
2959
|
+
for (var Fe = "<" + d.call(String(S.nodeName)), ut = S.attributes || [], De = 0; De < ut.length; De++)
|
|
2961
2960
|
Fe += " " + ut[De].name + "=" + U(P(ut[De].value), "double", M);
|
|
2962
|
-
return Fe += ">",
|
|
2961
|
+
return Fe += ">", S.childNodes && S.childNodes.length && (Fe += "..."), Fe += "</" + d.call(String(S.nodeName)) + ">", Fe;
|
|
2963
2962
|
}
|
|
2964
|
-
if (
|
|
2965
|
-
if (
|
|
2963
|
+
if (I(S)) {
|
|
2964
|
+
if (S.length === 0)
|
|
2966
2965
|
return "[]";
|
|
2967
|
-
var ft = Ve(
|
|
2966
|
+
var ft = Ve(S, ge);
|
|
2968
2967
|
return Ae && !So(ft) ? "[" + lt(ft, Ae) + "]" : "[ " + q.call(ft, ", ") + " ]";
|
|
2969
2968
|
}
|
|
2970
|
-
if (K(
|
|
2971
|
-
var pt = Ve(
|
|
2972
|
-
return !("cause" in Error.prototype) && "cause" in
|
|
2969
|
+
if (K(S)) {
|
|
2970
|
+
var pt = Ve(S, ge);
|
|
2971
|
+
return !("cause" in Error.prototype) && "cause" in S && !se.call(S, "cause") ? "{ [" + String(S) + "] " + q.call(b.call("[cause]: " + ge(S.cause), pt), ", ") + " }" : pt.length === 0 ? "[" + String(S) + "]" : "{ [" + String(S) + "] " + q.call(pt, ", ") + " }";
|
|
2973
2972
|
}
|
|
2974
|
-
if (typeof
|
|
2975
|
-
if (N && typeof
|
|
2976
|
-
return re(
|
|
2977
|
-
if (je !== "symbol" && typeof
|
|
2978
|
-
return
|
|
2973
|
+
if (typeof S == "object" && je) {
|
|
2974
|
+
if (N && typeof S[N] == "function" && re)
|
|
2975
|
+
return re(S, { depth: ct - ee });
|
|
2976
|
+
if (je !== "symbol" && typeof S.inspect == "function")
|
|
2977
|
+
return S.inspect();
|
|
2979
2978
|
}
|
|
2980
|
-
if (Oe(
|
|
2981
|
-
var
|
|
2982
|
-
return o && o.call(
|
|
2983
|
-
|
|
2984
|
-
}),
|
|
2979
|
+
if (Oe(S)) {
|
|
2980
|
+
var Er = [];
|
|
2981
|
+
return o && o.call(S, function(Ie, Qe) {
|
|
2982
|
+
Er.push(ge(Qe, S, !0) + " => " + ge(Ie, S));
|
|
2983
|
+
}), Rr("Map", t.call(S), Er, Ae);
|
|
2985
2984
|
}
|
|
2986
|
-
if (me(
|
|
2987
|
-
var
|
|
2988
|
-
return a && a.call(
|
|
2989
|
-
|
|
2990
|
-
}),
|
|
2985
|
+
if (me(S)) {
|
|
2986
|
+
var Ar = [];
|
|
2987
|
+
return a && a.call(S, function(Ie) {
|
|
2988
|
+
Ar.push(ge(Ie, S));
|
|
2989
|
+
}), Rr("Set", r.call(S), Ar, Ae);
|
|
2991
2990
|
}
|
|
2992
|
-
if (Ne(
|
|
2991
|
+
if (Ne(S))
|
|
2993
2992
|
return st("WeakMap");
|
|
2994
|
-
if (ke(
|
|
2993
|
+
if (ke(S))
|
|
2995
2994
|
return st("WeakSet");
|
|
2996
|
-
if (Te(
|
|
2995
|
+
if (Te(S))
|
|
2997
2996
|
return st("WeakRef");
|
|
2998
|
-
if (J(
|
|
2999
|
-
return Ue(ge(Number(
|
|
3000
|
-
if (_(
|
|
3001
|
-
return Ue(ge(B.call(
|
|
3002
|
-
if (
|
|
3003
|
-
return Ue(x.call(
|
|
3004
|
-
if (ne(
|
|
3005
|
-
return Ue(ge(String(
|
|
3006
|
-
if (typeof window < "u" &&
|
|
2997
|
+
if (J(S))
|
|
2998
|
+
return Ue(ge(Number(S)));
|
|
2999
|
+
if (_(S))
|
|
3000
|
+
return Ue(ge(B.call(S)));
|
|
3001
|
+
if (A(S))
|
|
3002
|
+
return Ue(x.call(S));
|
|
3003
|
+
if (ne(S))
|
|
3004
|
+
return Ue(ge(String(S)));
|
|
3005
|
+
if (typeof window < "u" && S === window)
|
|
3007
3006
|
return "{ [object Window] }";
|
|
3008
|
-
if (typeof globalThis < "u" &&
|
|
3007
|
+
if (typeof globalThis < "u" && S === globalThis || typeof et < "u" && S === et)
|
|
3009
3008
|
return "{ [object globalThis] }";
|
|
3010
|
-
if (!W(
|
|
3011
|
-
var dt = Ve(
|
|
3009
|
+
if (!W(S) && !z(S)) {
|
|
3010
|
+
var dt = Ve(S, ge), Ir = Z ? Z(S) === Object.prototype : S instanceof Object || S.constructor === Object, ht = S instanceof Object ? "" : "null prototype", Lr = !Ir && D && Object(S) === S && D in S ? v.call(Y(S), 8, -1) : ht ? "Object" : "", To = Ir || typeof S.constructor != "function" ? "" : S.constructor.name ? S.constructor.name + " " : "", yt = To + (Lr || ht ? "[" + q.call(b.call([], Lr || [], ht || []), ": ") + "] " : "");
|
|
3012
3011
|
return dt.length === 0 ? yt + "{}" : Ae ? yt + "{" + lt(dt, Ae) + "}" : yt + "{ " + q.call(dt, ", ") + " }";
|
|
3013
3012
|
}
|
|
3014
|
-
return String(
|
|
3013
|
+
return String(S);
|
|
3015
3014
|
};
|
|
3016
|
-
function U(j,
|
|
3017
|
-
var ee = (X.quoteStyle ||
|
|
3015
|
+
function U(j, S, X) {
|
|
3016
|
+
var ee = (X.quoteStyle || S) === "double" ? '"' : "'";
|
|
3018
3017
|
return ee + j + ee;
|
|
3019
3018
|
}
|
|
3020
3019
|
function P(j) {
|
|
3021
|
-
return
|
|
3020
|
+
return w.call(String(j), /"/g, """);
|
|
3022
3021
|
}
|
|
3023
|
-
function
|
|
3022
|
+
function I(j) {
|
|
3024
3023
|
return Y(j) === "[object Array]" && (!D || !(typeof j == "object" && D in j));
|
|
3025
3024
|
}
|
|
3026
3025
|
function W(j) {
|
|
@@ -3038,7 +3037,7 @@ function ys() {
|
|
|
3038
3037
|
function J(j) {
|
|
3039
3038
|
return Y(j) === "[object Number]" && (!D || !(typeof j == "object" && D in j));
|
|
3040
3039
|
}
|
|
3041
|
-
function
|
|
3040
|
+
function A(j) {
|
|
3042
3041
|
return Y(j) === "[object Boolean]" && (!D || !(typeof j == "object" && D in j));
|
|
3043
3042
|
}
|
|
3044
3043
|
function F(j) {
|
|
@@ -3066,8 +3065,8 @@ function ys() {
|
|
|
3066
3065
|
var Q = Object.prototype.hasOwnProperty || function(j) {
|
|
3067
3066
|
return j in this;
|
|
3068
3067
|
};
|
|
3069
|
-
function G(j,
|
|
3070
|
-
return Q.call(j,
|
|
3068
|
+
function G(j, S) {
|
|
3069
|
+
return Q.call(j, S);
|
|
3071
3070
|
}
|
|
3072
3071
|
function Y(j) {
|
|
3073
3072
|
return $.call(j);
|
|
@@ -3075,14 +3074,14 @@ function ys() {
|
|
|
3075
3074
|
function oe(j) {
|
|
3076
3075
|
if (j.name)
|
|
3077
3076
|
return j.name;
|
|
3078
|
-
var
|
|
3079
|
-
return
|
|
3077
|
+
var S = m.call(h.call(j), /^function\s*([\w$]+)/);
|
|
3078
|
+
return S ? S[1] : null;
|
|
3080
3079
|
}
|
|
3081
|
-
function he(j,
|
|
3080
|
+
function he(j, S) {
|
|
3082
3081
|
if (j.indexOf)
|
|
3083
|
-
return j.indexOf(
|
|
3082
|
+
return j.indexOf(S);
|
|
3084
3083
|
for (var X = 0, ee = j.length; X < ee; X++)
|
|
3085
|
-
if (j[X] ===
|
|
3084
|
+
if (j[X] === S)
|
|
3086
3085
|
return X;
|
|
3087
3086
|
return -1;
|
|
3088
3087
|
}
|
|
@@ -3102,10 +3101,10 @@ function ys() {
|
|
|
3102
3101
|
return !1;
|
|
3103
3102
|
}
|
|
3104
3103
|
function Ne(j) {
|
|
3105
|
-
if (!
|
|
3104
|
+
if (!c || !j || typeof j != "object")
|
|
3106
3105
|
return !1;
|
|
3107
3106
|
try {
|
|
3108
|
-
|
|
3107
|
+
c.call(j, c);
|
|
3109
3108
|
try {
|
|
3110
3109
|
f.call(j, f);
|
|
3111
3110
|
} catch {
|
|
@@ -3146,7 +3145,7 @@ function ys() {
|
|
|
3146
3145
|
try {
|
|
3147
3146
|
f.call(j, f);
|
|
3148
3147
|
try {
|
|
3149
|
-
|
|
3148
|
+
c.call(j, c);
|
|
3150
3149
|
} catch {
|
|
3151
3150
|
return !0;
|
|
3152
3151
|
}
|
|
@@ -3158,23 +3157,23 @@ function ys() {
|
|
|
3158
3157
|
function Ee(j) {
|
|
3159
3158
|
return !j || typeof j != "object" ? !1 : typeof HTMLElement < "u" && j instanceof HTMLElement ? !0 : typeof j.nodeName == "string" && typeof j.getAttribute == "function";
|
|
3160
3159
|
}
|
|
3161
|
-
function Ce(j,
|
|
3162
|
-
if (j.length >
|
|
3163
|
-
var X = j.length -
|
|
3164
|
-
return Ce(v.call(j, 0,
|
|
3160
|
+
function Ce(j, S) {
|
|
3161
|
+
if (j.length > S.maxStringLength) {
|
|
3162
|
+
var X = j.length - S.maxStringLength, ee = "... " + X + " more character" + (X > 1 ? "s" : "");
|
|
3163
|
+
return Ce(v.call(j, 0, S.maxStringLength), S) + ee;
|
|
3165
3164
|
}
|
|
3166
|
-
var ie =
|
|
3167
|
-
return U(ie, "single",
|
|
3165
|
+
var ie = w.call(w.call(j, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, wo);
|
|
3166
|
+
return U(ie, "single", S);
|
|
3168
3167
|
}
|
|
3169
3168
|
function wo(j) {
|
|
3170
|
-
var
|
|
3169
|
+
var S = j.charCodeAt(0), X = {
|
|
3171
3170
|
8: "b",
|
|
3172
3171
|
9: "t",
|
|
3173
3172
|
10: "n",
|
|
3174
3173
|
12: "f",
|
|
3175
3174
|
13: "r"
|
|
3176
|
-
}[
|
|
3177
|
-
return X ? "\\" + X : "\\x" + (
|
|
3175
|
+
}[S];
|
|
3176
|
+
return X ? "\\" + X : "\\x" + (S < 16 ? "0" : "") + T.call(S.toString(16));
|
|
3178
3177
|
}
|
|
3179
3178
|
function Ue(j) {
|
|
3180
3179
|
return "Object(" + j + ")";
|
|
@@ -3182,18 +3181,18 @@ function ys() {
|
|
|
3182
3181
|
function st(j) {
|
|
3183
3182
|
return j + " { ? }";
|
|
3184
3183
|
}
|
|
3185
|
-
function
|
|
3184
|
+
function Rr(j, S, X, ee) {
|
|
3186
3185
|
var ie = ee ? lt(X, ee) : q.call(X, ", ");
|
|
3187
|
-
return j + " (" +
|
|
3186
|
+
return j + " (" + S + ") {" + ie + "}";
|
|
3188
3187
|
}
|
|
3189
3188
|
function So(j) {
|
|
3190
|
-
for (var
|
|
3191
|
-
if (he(j[
|
|
3189
|
+
for (var S = 0; S < j.length; S++)
|
|
3190
|
+
if (he(j[S], `
|
|
3192
3191
|
`) >= 0)
|
|
3193
3192
|
return !1;
|
|
3194
3193
|
return !0;
|
|
3195
3194
|
}
|
|
3196
|
-
function Oo(j,
|
|
3195
|
+
function Oo(j, S) {
|
|
3197
3196
|
var X;
|
|
3198
3197
|
if (j.indent === " ")
|
|
3199
3198
|
X = " ";
|
|
@@ -3203,23 +3202,23 @@ function ys() {
|
|
|
3203
3202
|
return null;
|
|
3204
3203
|
return {
|
|
3205
3204
|
base: X,
|
|
3206
|
-
prev: q.call(Array(
|
|
3205
|
+
prev: q.call(Array(S + 1), X)
|
|
3207
3206
|
};
|
|
3208
3207
|
}
|
|
3209
|
-
function lt(j,
|
|
3208
|
+
function lt(j, S) {
|
|
3210
3209
|
if (j.length === 0)
|
|
3211
3210
|
return "";
|
|
3212
3211
|
var X = `
|
|
3213
|
-
` +
|
|
3212
|
+
` + S.prev + S.base;
|
|
3214
3213
|
return X + q.call(j, "," + X) + `
|
|
3215
|
-
` +
|
|
3214
|
+
` + S.prev;
|
|
3216
3215
|
}
|
|
3217
|
-
function Ve(j,
|
|
3218
|
-
var X =
|
|
3216
|
+
function Ve(j, S) {
|
|
3217
|
+
var X = I(j), ee = [];
|
|
3219
3218
|
if (X) {
|
|
3220
3219
|
ee.length = j.length;
|
|
3221
3220
|
for (var ie = 0; ie < j.length; ie++)
|
|
3222
|
-
ee[ie] = G(j, ie) ?
|
|
3221
|
+
ee[ie] = G(j, ie) ? S(j[ie], j) : "";
|
|
3223
3222
|
}
|
|
3224
3223
|
var M = typeof C == "function" ? C(j) : [], je;
|
|
3225
3224
|
if (H) {
|
|
@@ -3228,76 +3227,76 @@ function ys() {
|
|
|
3228
3227
|
je["$" + M[Pe]] = M[Pe];
|
|
3229
3228
|
}
|
|
3230
3229
|
for (var de in j)
|
|
3231
|
-
G(j, de) && (X && String(Number(de)) === de && de < j.length || H && je["$" + de] instanceof Symbol || (O.call(/[^\w$]/, de) ? ee.push(
|
|
3230
|
+
G(j, de) && (X && String(Number(de)) === de && de < j.length || H && je["$" + de] instanceof Symbol || (O.call(/[^\w$]/, de) ? ee.push(S(de, j) + ": " + S(j[de], j)) : ee.push(de + ": " + S(j[de], j))));
|
|
3232
3231
|
if (typeof C == "function")
|
|
3233
3232
|
for (var we = 0; we < M.length; we++)
|
|
3234
|
-
se.call(j, M[we]) && ee.push("[" +
|
|
3233
|
+
se.call(j, M[we]) && ee.push("[" + S(M[we]) + "]: " + S(j[M[we]], j));
|
|
3235
3234
|
return ee;
|
|
3236
3235
|
}
|
|
3237
3236
|
return ir;
|
|
3238
3237
|
}
|
|
3239
|
-
var sr,
|
|
3238
|
+
var sr, Wn;
|
|
3240
3239
|
function ms() {
|
|
3241
|
-
if (
|
|
3242
|
-
|
|
3243
|
-
var e = /* @__PURE__ */
|
|
3244
|
-
for (var v =
|
|
3245
|
-
if (
|
|
3246
|
-
return v.next =
|
|
3247
|
-
|
|
3248
|
-
}, y = function(
|
|
3249
|
-
var v =
|
|
3240
|
+
if (Wn) return sr;
|
|
3241
|
+
Wn = 1;
|
|
3242
|
+
var e = /* @__PURE__ */ Or(), n = ds(), t = /* @__PURE__ */ ys(), o = /* @__PURE__ */ We(), s = e("%WeakMap%", !0), l = e("%Map%", !0), r = n("WeakMap.prototype.get", !0), a = n("WeakMap.prototype.set", !0), i = n("WeakMap.prototype.has", !0), c = n("Map.prototype.get", !0), p = n("Map.prototype.set", !0), f = n("Map.prototype.has", !0), u = function(h, m) {
|
|
3243
|
+
for (var v = h, w; (w = v.next) !== null; v = w)
|
|
3244
|
+
if (w.key === m)
|
|
3245
|
+
return v.next = w.next, w.next = /** @type {NonNullable<typeof list.next>} */
|
|
3246
|
+
h.next, h.next = w, w;
|
|
3247
|
+
}, y = function(h, m) {
|
|
3248
|
+
var v = u(h, m);
|
|
3250
3249
|
return v && v.value;
|
|
3251
|
-
}, x = function(
|
|
3252
|
-
var
|
|
3253
|
-
|
|
3250
|
+
}, x = function(h, m, v) {
|
|
3251
|
+
var w = u(h, m);
|
|
3252
|
+
w ? w.value = v : h.next = /** @type {import('.').ListNode<typeof value>} */
|
|
3254
3253
|
{
|
|
3255
3254
|
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
3256
3255
|
key: m,
|
|
3257
|
-
next:
|
|
3256
|
+
next: h.next,
|
|
3258
3257
|
value: v
|
|
3259
3258
|
};
|
|
3260
|
-
}, $ = function(
|
|
3261
|
-
return !!
|
|
3259
|
+
}, $ = function(h, m) {
|
|
3260
|
+
return !!u(h, m);
|
|
3262
3261
|
};
|
|
3263
3262
|
return sr = function() {
|
|
3264
|
-
var m, v,
|
|
3265
|
-
assert: function(
|
|
3266
|
-
if (!T.has(
|
|
3267
|
-
throw new o("Side channel does not contain " + t(
|
|
3263
|
+
var m, v, w, T = {
|
|
3264
|
+
assert: function(d) {
|
|
3265
|
+
if (!T.has(d))
|
|
3266
|
+
throw new o("Side channel does not contain " + t(d));
|
|
3268
3267
|
},
|
|
3269
|
-
get: function(
|
|
3270
|
-
if (s &&
|
|
3268
|
+
get: function(d) {
|
|
3269
|
+
if (s && d && (typeof d == "object" || typeof d == "function")) {
|
|
3271
3270
|
if (m)
|
|
3272
|
-
return r(m,
|
|
3273
|
-
} else if (
|
|
3271
|
+
return r(m, d);
|
|
3272
|
+
} else if (l) {
|
|
3274
3273
|
if (v)
|
|
3275
|
-
return
|
|
3276
|
-
} else if (
|
|
3277
|
-
return y(
|
|
3274
|
+
return c(v, d);
|
|
3275
|
+
} else if (w)
|
|
3276
|
+
return y(w, d);
|
|
3278
3277
|
},
|
|
3279
|
-
has: function(
|
|
3280
|
-
if (s &&
|
|
3278
|
+
has: function(d) {
|
|
3279
|
+
if (s && d && (typeof d == "object" || typeof d == "function")) {
|
|
3281
3280
|
if (m)
|
|
3282
|
-
return i(m,
|
|
3283
|
-
} else if (
|
|
3281
|
+
return i(m, d);
|
|
3282
|
+
} else if (l) {
|
|
3284
3283
|
if (v)
|
|
3285
|
-
return f(v,
|
|
3286
|
-
} else if (
|
|
3287
|
-
return $(
|
|
3284
|
+
return f(v, d);
|
|
3285
|
+
} else if (w)
|
|
3286
|
+
return $(w, d);
|
|
3288
3287
|
return !1;
|
|
3289
3288
|
},
|
|
3290
|
-
set: function(
|
|
3291
|
-
s &&
|
|
3289
|
+
set: function(d, O) {
|
|
3290
|
+
s && d && (typeof d == "object" || typeof d == "function") ? (m || (m = new s()), a(m, d, O)) : l ? (v || (v = new l()), p(v, d, O)) : (w || (w = { key: {}, next: null }), x(w, d, O));
|
|
3292
3291
|
}
|
|
3293
3292
|
};
|
|
3294
3293
|
return T;
|
|
3295
3294
|
}, sr;
|
|
3296
3295
|
}
|
|
3297
|
-
var lr,
|
|
3298
|
-
function
|
|
3299
|
-
if (
|
|
3300
|
-
|
|
3296
|
+
var lr, Jn;
|
|
3297
|
+
function Tr() {
|
|
3298
|
+
if (Jn) return lr;
|
|
3299
|
+
Jn = 1;
|
|
3301
3300
|
var e = String.prototype.replace, n = /%20/g, t = {
|
|
3302
3301
|
RFC1738: "RFC1738",
|
|
3303
3302
|
RFC3986: "RFC3986"
|
|
@@ -3316,35 +3315,35 @@ function Cr() {
|
|
|
3316
3315
|
RFC3986: t.RFC3986
|
|
3317
3316
|
}, lr;
|
|
3318
3317
|
}
|
|
3319
|
-
var cr,
|
|
3318
|
+
var cr, Vn;
|
|
3320
3319
|
function yo() {
|
|
3321
|
-
if (
|
|
3322
|
-
|
|
3323
|
-
var e = /* @__PURE__ */
|
|
3324
|
-
for (var
|
|
3325
|
-
|
|
3326
|
-
return
|
|
3320
|
+
if (Vn) return cr;
|
|
3321
|
+
Vn = 1;
|
|
3322
|
+
var e = /* @__PURE__ */ Tr(), n = Object.prototype.hasOwnProperty, t = Array.isArray, o = function() {
|
|
3323
|
+
for (var h = [], m = 0; m < 256; ++m)
|
|
3324
|
+
h.push("%" + ((m < 16 ? "0" : "") + m.toString(16)).toUpperCase());
|
|
3325
|
+
return h;
|
|
3327
3326
|
}(), s = function(m) {
|
|
3328
3327
|
for (; m.length > 1; ) {
|
|
3329
|
-
var v = m.pop(),
|
|
3330
|
-
if (t(
|
|
3331
|
-
for (var T = [],
|
|
3332
|
-
typeof
|
|
3328
|
+
var v = m.pop(), w = v.obj[v.prop];
|
|
3329
|
+
if (t(w)) {
|
|
3330
|
+
for (var T = [], d = 0; d < w.length; ++d)
|
|
3331
|
+
typeof w[d] < "u" && T.push(w[d]);
|
|
3333
3332
|
v.obj[v.prop] = T;
|
|
3334
3333
|
}
|
|
3335
3334
|
}
|
|
3336
|
-
},
|
|
3337
|
-
for (var
|
|
3338
|
-
typeof m[T] < "u" && (
|
|
3339
|
-
return
|
|
3340
|
-
}, r = function
|
|
3335
|
+
}, l = function(m, v) {
|
|
3336
|
+
for (var w = v && v.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, T = 0; T < m.length; ++T)
|
|
3337
|
+
typeof m[T] < "u" && (w[T] = m[T]);
|
|
3338
|
+
return w;
|
|
3339
|
+
}, r = function h(m, v, w) {
|
|
3341
3340
|
if (!v)
|
|
3342
3341
|
return m;
|
|
3343
3342
|
if (typeof v != "object") {
|
|
3344
3343
|
if (t(m))
|
|
3345
3344
|
m.push(v);
|
|
3346
3345
|
else if (m && typeof m == "object")
|
|
3347
|
-
(
|
|
3346
|
+
(w && (w.plainObjects || w.allowPrototypes) || !n.call(Object.prototype, v)) && (m[v] = !0);
|
|
3348
3347
|
else
|
|
3349
3348
|
return [m, v];
|
|
3350
3349
|
return m;
|
|
@@ -3352,42 +3351,42 @@ function yo() {
|
|
|
3352
3351
|
if (!m || typeof m != "object")
|
|
3353
3352
|
return [m].concat(v);
|
|
3354
3353
|
var T = m;
|
|
3355
|
-
return t(m) && !t(v) && (T =
|
|
3354
|
+
return t(m) && !t(v) && (T = l(m, w)), t(m) && t(v) ? (v.forEach(function(d, O) {
|
|
3356
3355
|
if (n.call(m, O)) {
|
|
3357
3356
|
var b = m[O];
|
|
3358
|
-
b && typeof b == "object" &&
|
|
3357
|
+
b && typeof b == "object" && d && typeof d == "object" ? m[O] = h(b, d, w) : m.push(d);
|
|
3359
3358
|
} else
|
|
3360
|
-
m[O] =
|
|
3361
|
-
}), m) : Object.keys(v).reduce(function(
|
|
3359
|
+
m[O] = d;
|
|
3360
|
+
}), m) : Object.keys(v).reduce(function(d, O) {
|
|
3362
3361
|
var b = v[O];
|
|
3363
|
-
return n.call(
|
|
3362
|
+
return n.call(d, O) ? d[O] = h(d[O], b, w) : d[O] = b, d;
|
|
3364
3363
|
}, T);
|
|
3365
3364
|
}, a = function(m, v) {
|
|
3366
|
-
return Object.keys(v).reduce(function(
|
|
3367
|
-
return
|
|
3365
|
+
return Object.keys(v).reduce(function(w, T) {
|
|
3366
|
+
return w[T] = v[T], w;
|
|
3368
3367
|
}, m);
|
|
3369
|
-
}, i = function(
|
|
3370
|
-
var
|
|
3368
|
+
}, i = function(h, m, v) {
|
|
3369
|
+
var w = h.replace(/\+/g, " ");
|
|
3371
3370
|
if (v === "iso-8859-1")
|
|
3372
|
-
return
|
|
3371
|
+
return w.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
3373
3372
|
try {
|
|
3374
|
-
return decodeURIComponent(
|
|
3373
|
+
return decodeURIComponent(w);
|
|
3375
3374
|
} catch {
|
|
3376
|
-
return
|
|
3375
|
+
return w;
|
|
3377
3376
|
}
|
|
3378
|
-
},
|
|
3377
|
+
}, c = 1024, p = function(m, v, w, T, d) {
|
|
3379
3378
|
if (m.length === 0)
|
|
3380
3379
|
return m;
|
|
3381
3380
|
var O = m;
|
|
3382
|
-
if (typeof m == "symbol" ? O = Symbol.prototype.toString.call(m) : typeof m != "string" && (O = String(m)),
|
|
3381
|
+
if (typeof m == "symbol" ? O = Symbol.prototype.toString.call(m) : typeof m != "string" && (O = String(m)), w === "iso-8859-1")
|
|
3383
3382
|
return escape(O).replace(/%u[0-9a-f]{4}/gi, function(ae) {
|
|
3384
3383
|
return "%26%23" + parseInt(ae.slice(2), 16) + "%3B";
|
|
3385
3384
|
});
|
|
3386
|
-
for (var b = "", q = 0; q < O.length; q +=
|
|
3387
|
-
for (var
|
|
3388
|
-
var C =
|
|
3389
|
-
if (C === 45 || C === 46 || C === 95 || C === 126 || C >= 48 && C <= 57 || C >= 65 && C <= 90 || C >= 97 && C <= 122 ||
|
|
3390
|
-
E[E.length] =
|
|
3385
|
+
for (var b = "", q = 0; q < O.length; q += c) {
|
|
3386
|
+
for (var L = O.length >= c ? O.slice(q, q + c) : O, E = [], B = 0; B < L.length; ++B) {
|
|
3387
|
+
var C = L.charCodeAt(B);
|
|
3388
|
+
if (C === 45 || C === 46 || C === 95 || C === 126 || C >= 48 && C <= 57 || C >= 65 && C <= 90 || C >= 97 && C <= 122 || d === e.RFC1738 && (C === 40 || C === 41)) {
|
|
3389
|
+
E[E.length] = L.charAt(B);
|
|
3391
3390
|
continue;
|
|
3392
3391
|
}
|
|
3393
3392
|
if (C < 128) {
|
|
@@ -3402,19 +3401,19 @@ function yo() {
|
|
|
3402
3401
|
E[E.length] = o[224 | C >> 12] + o[128 | C >> 6 & 63] + o[128 | C & 63];
|
|
3403
3402
|
continue;
|
|
3404
3403
|
}
|
|
3405
|
-
B += 1, C = 65536 + ((C & 1023) << 10 |
|
|
3404
|
+
B += 1, C = 65536 + ((C & 1023) << 10 | L.charCodeAt(B) & 1023), E[E.length] = o[240 | C >> 18] + o[128 | C >> 12 & 63] + o[128 | C >> 6 & 63] + o[128 | C & 63];
|
|
3406
3405
|
}
|
|
3407
3406
|
b += E.join("");
|
|
3408
3407
|
}
|
|
3409
3408
|
return b;
|
|
3410
3409
|
}, f = function(m) {
|
|
3411
|
-
for (var v = [{ obj: { o: m }, prop: "o" }],
|
|
3412
|
-
for (var
|
|
3413
|
-
var
|
|
3414
|
-
typeof E == "object" && E !== null &&
|
|
3410
|
+
for (var v = [{ obj: { o: m }, prop: "o" }], w = [], T = 0; T < v.length; ++T)
|
|
3411
|
+
for (var d = v[T], O = d.obj[d.prop], b = Object.keys(O), q = 0; q < b.length; ++q) {
|
|
3412
|
+
var L = b[q], E = O[L];
|
|
3413
|
+
typeof E == "object" && E !== null && w.indexOf(E) === -1 && (v.push({ obj: O, prop: L }), w.push(E));
|
|
3415
3414
|
}
|
|
3416
3415
|
return s(v), m;
|
|
3417
|
-
},
|
|
3416
|
+
}, u = function(m) {
|
|
3418
3417
|
return Object.prototype.toString.call(m) === "[object RegExp]";
|
|
3419
3418
|
}, y = function(m) {
|
|
3420
3419
|
return !m || typeof m != "object" ? !1 : !!(m.constructor && m.constructor.isBuffer && m.constructor.isBuffer(m));
|
|
@@ -3422,43 +3421,43 @@ function yo() {
|
|
|
3422
3421
|
return [].concat(m, v);
|
|
3423
3422
|
}, $ = function(m, v) {
|
|
3424
3423
|
if (t(m)) {
|
|
3425
|
-
for (var
|
|
3426
|
-
|
|
3427
|
-
return
|
|
3424
|
+
for (var w = [], T = 0; T < m.length; T += 1)
|
|
3425
|
+
w.push(v(m[T]));
|
|
3426
|
+
return w;
|
|
3428
3427
|
}
|
|
3429
3428
|
return v(m);
|
|
3430
3429
|
};
|
|
3431
3430
|
return cr = {
|
|
3432
|
-
arrayToObject:
|
|
3431
|
+
arrayToObject: l,
|
|
3433
3432
|
assign: a,
|
|
3434
3433
|
combine: x,
|
|
3435
3434
|
compact: f,
|
|
3436
3435
|
decode: i,
|
|
3437
|
-
encode:
|
|
3436
|
+
encode: p,
|
|
3438
3437
|
isBuffer: y,
|
|
3439
|
-
isRegExp:
|
|
3438
|
+
isRegExp: u,
|
|
3440
3439
|
maybeMap: $,
|
|
3441
3440
|
merge: r
|
|
3442
3441
|
}, cr;
|
|
3443
3442
|
}
|
|
3444
|
-
var ur,
|
|
3443
|
+
var ur, Dn;
|
|
3445
3444
|
function gs() {
|
|
3446
|
-
if (
|
|
3447
|
-
|
|
3448
|
-
var e = ms(), n = /* @__PURE__ */ yo(), t = /* @__PURE__ */
|
|
3449
|
-
brackets: function(
|
|
3450
|
-
return
|
|
3445
|
+
if (Dn) return ur;
|
|
3446
|
+
Dn = 1;
|
|
3447
|
+
var e = ms(), n = /* @__PURE__ */ yo(), t = /* @__PURE__ */ Tr(), o = Object.prototype.hasOwnProperty, s = {
|
|
3448
|
+
brackets: function(h) {
|
|
3449
|
+
return h + "[]";
|
|
3451
3450
|
},
|
|
3452
3451
|
comma: "comma",
|
|
3453
|
-
indices: function(
|
|
3454
|
-
return
|
|
3452
|
+
indices: function(h, m) {
|
|
3453
|
+
return h + "[" + m + "]";
|
|
3455
3454
|
},
|
|
3456
|
-
repeat: function(
|
|
3457
|
-
return
|
|
3455
|
+
repeat: function(h) {
|
|
3456
|
+
return h;
|
|
3458
3457
|
}
|
|
3459
|
-
},
|
|
3460
|
-
r.apply($,
|
|
3461
|
-
}, i = Date.prototype.toISOString,
|
|
3458
|
+
}, l = Array.isArray, r = Array.prototype.push, a = function($, h) {
|
|
3459
|
+
r.apply($, l(h) ? h : [h]);
|
|
3460
|
+
}, i = Date.prototype.toISOString, c = t.default, p = {
|
|
3462
3461
|
addQueryPrefix: !1,
|
|
3463
3462
|
allowDots: !1,
|
|
3464
3463
|
allowEmptyArrays: !1,
|
|
@@ -3470,73 +3469,73 @@ function gs() {
|
|
|
3470
3469
|
encodeDotInKeys: !1,
|
|
3471
3470
|
encoder: n.encode,
|
|
3472
3471
|
encodeValuesOnly: !1,
|
|
3473
|
-
format:
|
|
3474
|
-
formatter: t.formatters[
|
|
3472
|
+
format: c,
|
|
3473
|
+
formatter: t.formatters[c],
|
|
3475
3474
|
// deprecated
|
|
3476
3475
|
indices: !1,
|
|
3477
|
-
serializeDate: function(
|
|
3478
|
-
return i.call(
|
|
3476
|
+
serializeDate: function(h) {
|
|
3477
|
+
return i.call(h);
|
|
3479
3478
|
},
|
|
3480
3479
|
skipNulls: !1,
|
|
3481
3480
|
strictNullHandling: !1
|
|
3482
|
-
}, f = function(
|
|
3483
|
-
return typeof
|
|
3484
|
-
},
|
|
3485
|
-
for (var k =
|
|
3486
|
-
var U = re.get(
|
|
3481
|
+
}, f = function(h) {
|
|
3482
|
+
return typeof h == "string" || typeof h == "number" || typeof h == "boolean" || typeof h == "symbol" || typeof h == "bigint";
|
|
3483
|
+
}, u = {}, y = function $(h, m, v, w, T, d, O, b, q, L, E, B, C, ae, H, D, se, Z) {
|
|
3484
|
+
for (var k = h, re = Z, R = 0, N = !1; (re = re.get(u)) !== void 0 && !N; ) {
|
|
3485
|
+
var U = re.get(h);
|
|
3487
3486
|
if (R += 1, typeof U < "u") {
|
|
3488
3487
|
if (U === R)
|
|
3489
3488
|
throw new RangeError("Cyclic object value");
|
|
3490
3489
|
N = !0;
|
|
3491
3490
|
}
|
|
3492
|
-
typeof re.get(
|
|
3491
|
+
typeof re.get(u) > "u" && (R = 0);
|
|
3493
3492
|
}
|
|
3494
|
-
if (typeof
|
|
3493
|
+
if (typeof L == "function" ? k = L(m, k) : k instanceof Date ? k = C(k) : v === "comma" && l(k) && (k = n.maybeMap(k, function(Y) {
|
|
3495
3494
|
return Y instanceof Date ? C(Y) : Y;
|
|
3496
3495
|
})), k === null) {
|
|
3497
|
-
if (
|
|
3498
|
-
return q && !D ? q(m,
|
|
3496
|
+
if (d)
|
|
3497
|
+
return q && !D ? q(m, p.encoder, se, "key", ae) : m;
|
|
3499
3498
|
k = "";
|
|
3500
3499
|
}
|
|
3501
3500
|
if (f(k) || n.isBuffer(k)) {
|
|
3502
3501
|
if (q) {
|
|
3503
|
-
var P = D ? m : q(m,
|
|
3504
|
-
return [H(P) + "=" + H(q(k,
|
|
3502
|
+
var P = D ? m : q(m, p.encoder, se, "key", ae);
|
|
3503
|
+
return [H(P) + "=" + H(q(k, p.encoder, se, "value", ae))];
|
|
3505
3504
|
}
|
|
3506
3505
|
return [H(m) + "=" + H(String(k))];
|
|
3507
3506
|
}
|
|
3508
|
-
var
|
|
3507
|
+
var I = [];
|
|
3509
3508
|
if (typeof k > "u")
|
|
3510
|
-
return
|
|
3509
|
+
return I;
|
|
3511
3510
|
var W;
|
|
3512
|
-
if (v === "comma" &&
|
|
3511
|
+
if (v === "comma" && l(k))
|
|
3513
3512
|
D && q && (k = n.maybeMap(k, q)), W = [{ value: k.length > 0 ? k.join(",") || null : void 0 }];
|
|
3514
|
-
else if (
|
|
3515
|
-
W =
|
|
3513
|
+
else if (l(L))
|
|
3514
|
+
W = L;
|
|
3516
3515
|
else {
|
|
3517
3516
|
var z = Object.keys(k);
|
|
3518
3517
|
W = E ? z.sort(E) : z;
|
|
3519
3518
|
}
|
|
3520
|
-
var K = b ? m.replace(/\./g, "%2E") : m, ne =
|
|
3521
|
-
if (T &&
|
|
3519
|
+
var K = b ? m.replace(/\./g, "%2E") : m, ne = w && l(k) && k.length === 1 ? K + "[]" : K;
|
|
3520
|
+
if (T && l(k) && k.length === 0)
|
|
3522
3521
|
return ne + "[]";
|
|
3523
3522
|
for (var J = 0; J < W.length; ++J) {
|
|
3524
|
-
var
|
|
3523
|
+
var A = W[J], F = typeof A == "object" && typeof A.value < "u" ? A.value : k[A];
|
|
3525
3524
|
if (!(O && F === null)) {
|
|
3526
|
-
var _ = B && b ?
|
|
3527
|
-
Z.set(
|
|
3525
|
+
var _ = B && b ? A.replace(/\./g, "%2E") : A, Q = l(k) ? typeof v == "function" ? v(ne, _) : ne : ne + (B ? "." + _ : "[" + _ + "]");
|
|
3526
|
+
Z.set(h, R);
|
|
3528
3527
|
var G = e();
|
|
3529
|
-
G.set(
|
|
3528
|
+
G.set(u, Z), a(I, $(
|
|
3530
3529
|
F,
|
|
3531
3530
|
Q,
|
|
3532
3531
|
v,
|
|
3533
|
-
|
|
3532
|
+
w,
|
|
3534
3533
|
T,
|
|
3535
|
-
|
|
3534
|
+
d,
|
|
3536
3535
|
O,
|
|
3537
3536
|
b,
|
|
3538
|
-
v === "comma" && D &&
|
|
3539
|
-
|
|
3537
|
+
v === "comma" && D && l(k) ? null : q,
|
|
3538
|
+
L,
|
|
3540
3539
|
E,
|
|
3541
3540
|
B,
|
|
3542
3541
|
C,
|
|
@@ -3548,64 +3547,64 @@ function gs() {
|
|
|
3548
3547
|
));
|
|
3549
3548
|
}
|
|
3550
3549
|
}
|
|
3551
|
-
return
|
|
3552
|
-
}, x = function(
|
|
3553
|
-
if (!
|
|
3554
|
-
return
|
|
3555
|
-
if (typeof
|
|
3550
|
+
return I;
|
|
3551
|
+
}, x = function(h) {
|
|
3552
|
+
if (!h)
|
|
3553
|
+
return p;
|
|
3554
|
+
if (typeof h.allowEmptyArrays < "u" && typeof h.allowEmptyArrays != "boolean")
|
|
3556
3555
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
3557
|
-
if (typeof
|
|
3556
|
+
if (typeof h.encodeDotInKeys < "u" && typeof h.encodeDotInKeys != "boolean")
|
|
3558
3557
|
throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
3559
|
-
if (
|
|
3558
|
+
if (h.encoder !== null && typeof h.encoder < "u" && typeof h.encoder != "function")
|
|
3560
3559
|
throw new TypeError("Encoder has to be a function.");
|
|
3561
|
-
var m =
|
|
3562
|
-
if (typeof
|
|
3560
|
+
var m = h.charset || p.charset;
|
|
3561
|
+
if (typeof h.charset < "u" && h.charset !== "utf-8" && h.charset !== "iso-8859-1")
|
|
3563
3562
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
3564
3563
|
var v = t.default;
|
|
3565
|
-
if (typeof
|
|
3566
|
-
if (!o.call(t.formatters,
|
|
3564
|
+
if (typeof h.format < "u") {
|
|
3565
|
+
if (!o.call(t.formatters, h.format))
|
|
3567
3566
|
throw new TypeError("Unknown format option provided.");
|
|
3568
|
-
v =
|
|
3567
|
+
v = h.format;
|
|
3569
3568
|
}
|
|
3570
|
-
var
|
|
3571
|
-
(typeof
|
|
3572
|
-
var
|
|
3573
|
-
if (
|
|
3569
|
+
var w = t.formatters[v], T = p.filter;
|
|
3570
|
+
(typeof h.filter == "function" || l(h.filter)) && (T = h.filter);
|
|
3571
|
+
var d;
|
|
3572
|
+
if (h.arrayFormat in s ? d = h.arrayFormat : "indices" in h ? d = h.indices ? "indices" : "repeat" : d = p.arrayFormat, "commaRoundTrip" in h && typeof h.commaRoundTrip != "boolean")
|
|
3574
3573
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
3575
|
-
var O = typeof
|
|
3574
|
+
var O = typeof h.allowDots > "u" ? h.encodeDotInKeys === !0 ? !0 : p.allowDots : !!h.allowDots;
|
|
3576
3575
|
return {
|
|
3577
|
-
addQueryPrefix: typeof
|
|
3576
|
+
addQueryPrefix: typeof h.addQueryPrefix == "boolean" ? h.addQueryPrefix : p.addQueryPrefix,
|
|
3578
3577
|
allowDots: O,
|
|
3579
|
-
allowEmptyArrays: typeof
|
|
3580
|
-
arrayFormat:
|
|
3578
|
+
allowEmptyArrays: typeof h.allowEmptyArrays == "boolean" ? !!h.allowEmptyArrays : p.allowEmptyArrays,
|
|
3579
|
+
arrayFormat: d,
|
|
3581
3580
|
charset: m,
|
|
3582
|
-
charsetSentinel: typeof
|
|
3583
|
-
commaRoundTrip:
|
|
3584
|
-
delimiter: typeof
|
|
3585
|
-
encode: typeof
|
|
3586
|
-
encodeDotInKeys: typeof
|
|
3587
|
-
encoder: typeof
|
|
3588
|
-
encodeValuesOnly: typeof
|
|
3581
|
+
charsetSentinel: typeof h.charsetSentinel == "boolean" ? h.charsetSentinel : p.charsetSentinel,
|
|
3582
|
+
commaRoundTrip: h.commaRoundTrip,
|
|
3583
|
+
delimiter: typeof h.delimiter > "u" ? p.delimiter : h.delimiter,
|
|
3584
|
+
encode: typeof h.encode == "boolean" ? h.encode : p.encode,
|
|
3585
|
+
encodeDotInKeys: typeof h.encodeDotInKeys == "boolean" ? h.encodeDotInKeys : p.encodeDotInKeys,
|
|
3586
|
+
encoder: typeof h.encoder == "function" ? h.encoder : p.encoder,
|
|
3587
|
+
encodeValuesOnly: typeof h.encodeValuesOnly == "boolean" ? h.encodeValuesOnly : p.encodeValuesOnly,
|
|
3589
3588
|
filter: T,
|
|
3590
3589
|
format: v,
|
|
3591
|
-
formatter:
|
|
3592
|
-
serializeDate: typeof
|
|
3593
|
-
skipNulls: typeof
|
|
3594
|
-
sort: typeof
|
|
3595
|
-
strictNullHandling: typeof
|
|
3590
|
+
formatter: w,
|
|
3591
|
+
serializeDate: typeof h.serializeDate == "function" ? h.serializeDate : p.serializeDate,
|
|
3592
|
+
skipNulls: typeof h.skipNulls == "boolean" ? h.skipNulls : p.skipNulls,
|
|
3593
|
+
sort: typeof h.sort == "function" ? h.sort : null,
|
|
3594
|
+
strictNullHandling: typeof h.strictNullHandling == "boolean" ? h.strictNullHandling : p.strictNullHandling
|
|
3596
3595
|
};
|
|
3597
3596
|
};
|
|
3598
|
-
return ur = function($,
|
|
3599
|
-
var m = $, v = x(
|
|
3600
|
-
typeof v.filter == "function" ? (T = v.filter, m = T("", m)) :
|
|
3601
|
-
var
|
|
3597
|
+
return ur = function($, h) {
|
|
3598
|
+
var m = $, v = x(h), w, T;
|
|
3599
|
+
typeof v.filter == "function" ? (T = v.filter, m = T("", m)) : l(v.filter) && (T = v.filter, w = T);
|
|
3600
|
+
var d = [];
|
|
3602
3601
|
if (typeof m != "object" || m === null)
|
|
3603
3602
|
return "";
|
|
3604
3603
|
var O = s[v.arrayFormat], b = O === "comma" && v.commaRoundTrip;
|
|
3605
|
-
|
|
3606
|
-
for (var q = e(),
|
|
3607
|
-
var E =
|
|
3608
|
-
v.skipNulls && m[E] === null || a(
|
|
3604
|
+
w || (w = Object.keys(m)), v.sort && w.sort(v.sort);
|
|
3605
|
+
for (var q = e(), L = 0; L < w.length; ++L) {
|
|
3606
|
+
var E = w[L];
|
|
3607
|
+
v.skipNulls && m[E] === null || a(d, y(
|
|
3609
3608
|
m[E],
|
|
3610
3609
|
E,
|
|
3611
3610
|
O,
|
|
@@ -3626,14 +3625,14 @@ function gs() {
|
|
|
3626
3625
|
q
|
|
3627
3626
|
));
|
|
3628
3627
|
}
|
|
3629
|
-
var B =
|
|
3628
|
+
var B = d.join(v.delimiter), C = v.addQueryPrefix === !0 ? "?" : "";
|
|
3630
3629
|
return v.charsetSentinel && (v.charset === "iso-8859-1" ? C += "utf8=%26%2310003%3B&" : C += "utf8=%E2%9C%93&"), B.length > 0 ? C + B : "";
|
|
3631
3630
|
}, ur;
|
|
3632
3631
|
}
|
|
3633
|
-
var fr,
|
|
3632
|
+
var fr, Qn;
|
|
3634
3633
|
function vs() {
|
|
3635
|
-
if (
|
|
3636
|
-
|
|
3634
|
+
if (Qn) return fr;
|
|
3635
|
+
Qn = 1;
|
|
3637
3636
|
var e = /* @__PURE__ */ yo(), n = Object.prototype.hasOwnProperty, t = Array.isArray, o = {
|
|
3638
3637
|
allowDots: !1,
|
|
3639
3638
|
allowEmptyArrays: !1,
|
|
@@ -3655,54 +3654,54 @@ function vs() {
|
|
|
3655
3654
|
plainObjects: !1,
|
|
3656
3655
|
strictDepth: !1,
|
|
3657
3656
|
strictNullHandling: !1
|
|
3658
|
-
}, s = function(
|
|
3659
|
-
return
|
|
3657
|
+
}, s = function(u) {
|
|
3658
|
+
return u.replace(/&#(\d+);/g, function(y, x) {
|
|
3660
3659
|
return String.fromCharCode(parseInt(x, 10));
|
|
3661
3660
|
});
|
|
3662
|
-
},
|
|
3663
|
-
return
|
|
3661
|
+
}, l = function(u, y) {
|
|
3662
|
+
return u && typeof u == "string" && y.comma && u.indexOf(",") > -1 ? u.split(",") : u;
|
|
3664
3663
|
}, r = "utf8=%26%2310003%3B", a = "utf8=%E2%9C%93", i = function(y, x) {
|
|
3665
|
-
var $ = { __proto__: null },
|
|
3666
|
-
|
|
3667
|
-
var m = x.parameterLimit === 1 / 0 ? void 0 : x.parameterLimit, v =
|
|
3664
|
+
var $ = { __proto__: null }, h = x.ignoreQueryPrefix ? y.replace(/^\?/, "") : y;
|
|
3665
|
+
h = h.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
3666
|
+
var m = x.parameterLimit === 1 / 0 ? void 0 : x.parameterLimit, v = h.split(x.delimiter, m), w = -1, T, d = x.charset;
|
|
3668
3667
|
if (x.charsetSentinel)
|
|
3669
3668
|
for (T = 0; T < v.length; ++T)
|
|
3670
|
-
v[T].indexOf("utf8=") === 0 && (v[T] === a ?
|
|
3669
|
+
v[T].indexOf("utf8=") === 0 && (v[T] === a ? d = "utf-8" : v[T] === r && (d = "iso-8859-1"), w = T, T = v.length);
|
|
3671
3670
|
for (T = 0; T < v.length; ++T)
|
|
3672
|
-
if (T !==
|
|
3673
|
-
var O = v[T], b = O.indexOf("]="), q = b === -1 ? O.indexOf("=") : b + 1,
|
|
3674
|
-
q === -1 ? (
|
|
3675
|
-
|
|
3671
|
+
if (T !== w) {
|
|
3672
|
+
var O = v[T], b = O.indexOf("]="), q = b === -1 ? O.indexOf("=") : b + 1, L, E;
|
|
3673
|
+
q === -1 ? (L = x.decoder(O, o.decoder, d, "key"), E = x.strictNullHandling ? null : "") : (L = x.decoder(O.slice(0, q), o.decoder, d, "key"), E = e.maybeMap(
|
|
3674
|
+
l(O.slice(q + 1), x),
|
|
3676
3675
|
function(C) {
|
|
3677
|
-
return x.decoder(C, o.decoder,
|
|
3676
|
+
return x.decoder(C, o.decoder, d, "value");
|
|
3678
3677
|
}
|
|
3679
|
-
)), E && x.interpretNumericEntities &&
|
|
3680
|
-
var B = n.call($,
|
|
3681
|
-
B && x.duplicates === "combine" ? $[
|
|
3678
|
+
)), E && x.interpretNumericEntities && d === "iso-8859-1" && (E = s(E)), O.indexOf("[]=") > -1 && (E = t(E) ? [E] : E);
|
|
3679
|
+
var B = n.call($, L);
|
|
3680
|
+
B && x.duplicates === "combine" ? $[L] = e.combine($[L], E) : (!B || x.duplicates === "last") && ($[L] = E);
|
|
3682
3681
|
}
|
|
3683
3682
|
return $;
|
|
3684
|
-
},
|
|
3685
|
-
for (var
|
|
3686
|
-
var v,
|
|
3687
|
-
if (
|
|
3688
|
-
v = x.allowEmptyArrays && (
|
|
3683
|
+
}, c = function(u, y, x, $) {
|
|
3684
|
+
for (var h = $ ? y : l(y, x), m = u.length - 1; m >= 0; --m) {
|
|
3685
|
+
var v, w = u[m];
|
|
3686
|
+
if (w === "[]" && x.parseArrays)
|
|
3687
|
+
v = x.allowEmptyArrays && (h === "" || x.strictNullHandling && h === null) ? [] : [].concat(h);
|
|
3689
3688
|
else {
|
|
3690
3689
|
v = x.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
3691
|
-
var T =
|
|
3692
|
-
!x.parseArrays &&
|
|
3690
|
+
var T = w.charAt(0) === "[" && w.charAt(w.length - 1) === "]" ? w.slice(1, -1) : w, d = x.decodeDotInKeys ? T.replace(/%2E/g, ".") : T, O = parseInt(d, 10);
|
|
3691
|
+
!x.parseArrays && d === "" ? v = { 0: h } : !isNaN(O) && w !== d && String(O) === d && O >= 0 && x.parseArrays && O <= x.arrayLimit ? (v = [], v[O] = h) : d !== "__proto__" && (v[d] = h);
|
|
3693
3692
|
}
|
|
3694
|
-
|
|
3693
|
+
h = v;
|
|
3695
3694
|
}
|
|
3696
|
-
return
|
|
3697
|
-
},
|
|
3695
|
+
return h;
|
|
3696
|
+
}, p = function(y, x, $, h) {
|
|
3698
3697
|
if (y) {
|
|
3699
|
-
var m = $.allowDots ? y.replace(/\.([^.[]+)/g, "[$1]") : y, v = /(\[[^[\]]*])/,
|
|
3700
|
-
if (
|
|
3701
|
-
if (!$.plainObjects && n.call(Object.prototype,
|
|
3698
|
+
var m = $.allowDots ? y.replace(/\.([^.[]+)/g, "[$1]") : y, v = /(\[[^[\]]*])/, w = /(\[[^[\]]*])/g, T = $.depth > 0 && v.exec(m), d = T ? m.slice(0, T.index) : m, O = [];
|
|
3699
|
+
if (d) {
|
|
3700
|
+
if (!$.plainObjects && n.call(Object.prototype, d) && !$.allowPrototypes)
|
|
3702
3701
|
return;
|
|
3703
|
-
O.push(
|
|
3702
|
+
O.push(d);
|
|
3704
3703
|
}
|
|
3705
|
-
for (var b = 0; $.depth > 0 && (T =
|
|
3704
|
+
for (var b = 0; $.depth > 0 && (T = w.exec(m)) !== null && b < $.depth; ) {
|
|
3706
3705
|
if (b += 1, !$.plainObjects && n.call(Object.prototype, T[1].slice(1, -1)) && !$.allowPrototypes)
|
|
3707
3706
|
return;
|
|
3708
3707
|
O.push(T[1]);
|
|
@@ -3712,7 +3711,7 @@ function vs() {
|
|
|
3712
3711
|
throw new RangeError("Input depth exceeded depth option of " + $.depth + " and strictDepth is true");
|
|
3713
3712
|
O.push("[" + m.slice(T.index) + "]");
|
|
3714
3713
|
}
|
|
3715
|
-
return
|
|
3714
|
+
return c(O, x, $, h);
|
|
3716
3715
|
}
|
|
3717
3716
|
}, f = function(y) {
|
|
3718
3717
|
if (!y)
|
|
@@ -3728,9 +3727,9 @@ function vs() {
|
|
|
3728
3727
|
var x = typeof y.charset > "u" ? o.charset : y.charset, $ = typeof y.duplicates > "u" ? o.duplicates : y.duplicates;
|
|
3729
3728
|
if ($ !== "combine" && $ !== "first" && $ !== "last")
|
|
3730
3729
|
throw new TypeError("The duplicates option must be either combine, first, or last");
|
|
3731
|
-
var
|
|
3730
|
+
var h = typeof y.allowDots > "u" ? y.decodeDotInKeys === !0 ? !0 : o.allowDots : !!y.allowDots;
|
|
3732
3731
|
return {
|
|
3733
|
-
allowDots:
|
|
3732
|
+
allowDots: h,
|
|
3734
3733
|
allowEmptyArrays: typeof y.allowEmptyArrays == "boolean" ? !!y.allowEmptyArrays : o.allowEmptyArrays,
|
|
3735
3734
|
allowPrototypes: typeof y.allowPrototypes == "boolean" ? y.allowPrototypes : o.allowPrototypes,
|
|
3736
3735
|
allowSparse: typeof y.allowSparse == "boolean" ? y.allowSparse : o.allowSparse,
|
|
@@ -3753,37 +3752,37 @@ function vs() {
|
|
|
3753
3752
|
strictNullHandling: typeof y.strictNullHandling == "boolean" ? y.strictNullHandling : o.strictNullHandling
|
|
3754
3753
|
};
|
|
3755
3754
|
};
|
|
3756
|
-
return fr = function(
|
|
3755
|
+
return fr = function(u, y) {
|
|
3757
3756
|
var x = f(y);
|
|
3758
|
-
if (
|
|
3757
|
+
if (u === "" || u === null || typeof u > "u")
|
|
3759
3758
|
return x.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
3760
|
-
for (var $ = typeof
|
|
3761
|
-
var
|
|
3762
|
-
|
|
3759
|
+
for (var $ = typeof u == "string" ? i(u, x) : u, h = x.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, m = Object.keys($), v = 0; v < m.length; ++v) {
|
|
3760
|
+
var w = m[v], T = p(w, $[w], x, typeof u == "string");
|
|
3761
|
+
h = e.merge(h, T, x);
|
|
3763
3762
|
}
|
|
3764
|
-
return x.allowSparse === !0 ?
|
|
3763
|
+
return x.allowSparse === !0 ? h : e.compact(h);
|
|
3765
3764
|
}, fr;
|
|
3766
3765
|
}
|
|
3767
|
-
var pr,
|
|
3766
|
+
var pr, Kn;
|
|
3768
3767
|
function mo() {
|
|
3769
|
-
if (
|
|
3770
|
-
|
|
3771
|
-
var e = /* @__PURE__ */ gs(), n = /* @__PURE__ */ vs(), t = /* @__PURE__ */
|
|
3768
|
+
if (Kn) return pr;
|
|
3769
|
+
Kn = 1;
|
|
3770
|
+
var e = /* @__PURE__ */ gs(), n = /* @__PURE__ */ vs(), t = /* @__PURE__ */ Tr();
|
|
3772
3771
|
return pr = {
|
|
3773
3772
|
formats: t,
|
|
3774
3773
|
parse: n,
|
|
3775
3774
|
stringify: e
|
|
3776
3775
|
}, pr;
|
|
3777
3776
|
}
|
|
3778
|
-
var
|
|
3777
|
+
var Yn;
|
|
3779
3778
|
function bs() {
|
|
3780
|
-
if (
|
|
3781
|
-
|
|
3779
|
+
if (Yn) return Re;
|
|
3780
|
+
Yn = 1;
|
|
3782
3781
|
var e = Bi();
|
|
3783
3782
|
function n() {
|
|
3784
3783
|
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;
|
|
3785
3784
|
}
|
|
3786
|
-
var t = /^([a-z0-9.+-]+:)/i, o = /:[0-9]*$/, s = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,
|
|
3785
|
+
var t = /^([a-z0-9.+-]+:)/i, o = /:[0-9]*$/, s = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, l = [
|
|
3787
3786
|
"<",
|
|
3788
3787
|
">",
|
|
3789
3788
|
'"',
|
|
@@ -3800,17 +3799,17 @@ function bs() {
|
|
|
3800
3799
|
"\\",
|
|
3801
3800
|
"^",
|
|
3802
3801
|
"`"
|
|
3803
|
-
].concat(
|
|
3802
|
+
].concat(l), a = ["'"].concat(r), i = [
|
|
3804
3803
|
"%",
|
|
3805
3804
|
"/",
|
|
3806
3805
|
"?",
|
|
3807
3806
|
";",
|
|
3808
3807
|
"#"
|
|
3809
|
-
].concat(a),
|
|
3808
|
+
].concat(a), c = [
|
|
3810
3809
|
"/",
|
|
3811
3810
|
"?",
|
|
3812
3811
|
"#"
|
|
3813
|
-
],
|
|
3812
|
+
], p = 255, f = /^[+a-z0-9A-Z_-]{0,63}$/, u = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, y = {
|
|
3814
3813
|
javascript: !0,
|
|
3815
3814
|
"javascript:": !0
|
|
3816
3815
|
}, x = {
|
|
@@ -3827,23 +3826,23 @@ function bs() {
|
|
|
3827
3826
|
"ftp:": !0,
|
|
3828
3827
|
"gopher:": !0,
|
|
3829
3828
|
"file:": !0
|
|
3830
|
-
},
|
|
3831
|
-
function m(
|
|
3832
|
-
if (
|
|
3833
|
-
return
|
|
3829
|
+
}, h = /* @__PURE__ */ mo();
|
|
3830
|
+
function m(d, O, b) {
|
|
3831
|
+
if (d && typeof d == "object" && d instanceof n)
|
|
3832
|
+
return d;
|
|
3834
3833
|
var q = new n();
|
|
3835
|
-
return q.parse(
|
|
3834
|
+
return q.parse(d, O, b), q;
|
|
3836
3835
|
}
|
|
3837
|
-
n.prototype.parse = function(
|
|
3838
|
-
if (typeof
|
|
3839
|
-
throw new TypeError("Parameter 'url' must be a string, not " + typeof
|
|
3840
|
-
var q =
|
|
3841
|
-
E[0] = E[0].replace(B, "/"),
|
|
3842
|
-
var C =
|
|
3843
|
-
if (C = C.trim(), !b &&
|
|
3836
|
+
n.prototype.parse = function(d, O, b) {
|
|
3837
|
+
if (typeof d != "string")
|
|
3838
|
+
throw new TypeError("Parameter 'url' must be a string, not " + typeof d);
|
|
3839
|
+
var q = d.indexOf("?"), L = q !== -1 && q < d.indexOf("#") ? "?" : "#", E = d.split(L), B = /\\/g;
|
|
3840
|
+
E[0] = E[0].replace(B, "/"), d = E.join(L);
|
|
3841
|
+
var C = d;
|
|
3842
|
+
if (C = C.trim(), !b && d.split("#").length === 1) {
|
|
3844
3843
|
var ae = s.exec(C);
|
|
3845
3844
|
if (ae)
|
|
3846
|
-
return this.path = C, this.href = C, this.pathname = ae[1], ae[2] ? (this.search = ae[2], O ? this.query =
|
|
3845
|
+
return this.path = C, this.href = C, this.pathname = ae[1], ae[2] ? (this.search = ae[2], O ? this.query = h.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : O && (this.search = "", this.query = {}), this;
|
|
3847
3846
|
}
|
|
3848
3847
|
var H = t.exec(C);
|
|
3849
3848
|
if (H) {
|
|
@@ -3856,8 +3855,8 @@ function bs() {
|
|
|
3856
3855
|
se && !(H && x[H]) && (C = C.substr(2), this.slashes = !0);
|
|
3857
3856
|
}
|
|
3858
3857
|
if (!x[H] && (se || H && !$[H])) {
|
|
3859
|
-
for (var Z = -1, k = 0; k <
|
|
3860
|
-
var re = C.indexOf(
|
|
3858
|
+
for (var Z = -1, k = 0; k < c.length; k++) {
|
|
3859
|
+
var re = C.indexOf(c[k]);
|
|
3861
3860
|
re !== -1 && (Z === -1 || re < Z) && (Z = re);
|
|
3862
3861
|
}
|
|
3863
3862
|
var R, N;
|
|
@@ -3869,24 +3868,24 @@ function bs() {
|
|
|
3869
3868
|
Z === -1 && (Z = C.length), this.host = C.slice(0, Z), C = C.slice(Z), this.parseHost(), this.hostname = this.hostname || "";
|
|
3870
3869
|
var U = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
3871
3870
|
if (!U)
|
|
3872
|
-
for (var P = this.hostname.split(/\./), k = 0,
|
|
3871
|
+
for (var P = this.hostname.split(/\./), k = 0, I = P.length; k < I; k++) {
|
|
3873
3872
|
var W = P[k];
|
|
3874
3873
|
if (W && !W.match(f)) {
|
|
3875
3874
|
for (var z = "", K = 0, ne = W.length; K < ne; K++)
|
|
3876
3875
|
W.charCodeAt(K) > 127 ? z += "x" : z += W[K];
|
|
3877
3876
|
if (!z.match(f)) {
|
|
3878
|
-
var J = P.slice(0, k),
|
|
3879
|
-
F && (J.push(F[1]),
|
|
3877
|
+
var J = P.slice(0, k), A = P.slice(k + 1), F = W.match(u);
|
|
3878
|
+
F && (J.push(F[1]), A.unshift(F[2])), A.length && (C = "/" + A.join(".") + C), this.hostname = J.join(".");
|
|
3880
3879
|
break;
|
|
3881
3880
|
}
|
|
3882
3881
|
}
|
|
3883
3882
|
}
|
|
3884
|
-
this.hostname.length >
|
|
3883
|
+
this.hostname.length > p ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), U || (this.hostname = e.toASCII(this.hostname));
|
|
3885
3884
|
var _ = this.port ? ":" + this.port : "", Q = this.hostname || "";
|
|
3886
3885
|
this.host = Q + _, this.href += this.host, U && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), C[0] !== "/" && (C = "/" + C));
|
|
3887
3886
|
}
|
|
3888
3887
|
if (!y[D])
|
|
3889
|
-
for (var k = 0,
|
|
3888
|
+
for (var k = 0, I = a.length; k < I; k++) {
|
|
3890
3889
|
var G = a[k];
|
|
3891
3890
|
if (C.indexOf(G) !== -1) {
|
|
3892
3891
|
var Y = encodeURIComponent(G);
|
|
@@ -3896,92 +3895,92 @@ function bs() {
|
|
|
3896
3895
|
var oe = C.indexOf("#");
|
|
3897
3896
|
oe !== -1 && (this.hash = C.substr(oe), C = C.slice(0, oe));
|
|
3898
3897
|
var he = C.indexOf("?");
|
|
3899
|
-
if (he !== -1 ? (this.search = C.substr(he), this.query = C.substr(he + 1), O && (this.query =
|
|
3898
|
+
if (he !== -1 ? (this.search = C.substr(he), this.query = C.substr(he + 1), O && (this.query = h.parse(this.query)), C = C.slice(0, he)) : O && (this.search = "", this.query = {}), C && (this.pathname = C), $[D] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
3900
3899
|
var _ = this.pathname || "", Oe = this.search || "";
|
|
3901
3900
|
this.path = _ + Oe;
|
|
3902
3901
|
}
|
|
3903
3902
|
return this.href = this.format(), this;
|
|
3904
3903
|
};
|
|
3905
|
-
function v(
|
|
3906
|
-
return typeof
|
|
3904
|
+
function v(d) {
|
|
3905
|
+
return typeof d == "string" && (d = m(d)), d instanceof n ? d.format() : n.prototype.format.call(d);
|
|
3907
3906
|
}
|
|
3908
3907
|
n.prototype.format = function() {
|
|
3909
|
-
var
|
|
3910
|
-
|
|
3911
|
-
var O = this.protocol || "", b = this.pathname || "", q = this.hash || "",
|
|
3912
|
-
this.host ?
|
|
3908
|
+
var d = this.auth || "";
|
|
3909
|
+
d && (d = encodeURIComponent(d), d = d.replace(/%3A/i, ":"), d += "@");
|
|
3910
|
+
var O = this.protocol || "", b = this.pathname || "", q = this.hash || "", L = !1, E = "";
|
|
3911
|
+
this.host ? L = d + this.host : this.hostname && (L = d + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (L += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (E = h.stringify(this.query, {
|
|
3913
3912
|
arrayFormat: "repeat",
|
|
3914
3913
|
addQueryPrefix: !1
|
|
3915
3914
|
}));
|
|
3916
3915
|
var B = this.search || E && "?" + E || "";
|
|
3917
|
-
return O && O.substr(-1) !== ":" && (O += ":"), this.slashes || (!O || $[O]) &&
|
|
3916
|
+
return O && O.substr(-1) !== ":" && (O += ":"), this.slashes || (!O || $[O]) && L !== !1 ? (L = "//" + (L || ""), b && b.charAt(0) !== "/" && (b = "/" + b)) : L || (L = ""), q && q.charAt(0) !== "#" && (q = "#" + q), B && B.charAt(0) !== "?" && (B = "?" + B), b = b.replace(/[?#]/g, function(C) {
|
|
3918
3917
|
return encodeURIComponent(C);
|
|
3919
|
-
}), B = B.replace("#", "%23"), O +
|
|
3918
|
+
}), B = B.replace("#", "%23"), O + L + b + B + q;
|
|
3920
3919
|
};
|
|
3921
|
-
function
|
|
3922
|
-
return m(
|
|
3920
|
+
function w(d, O) {
|
|
3921
|
+
return m(d, !1, !0).resolve(O);
|
|
3923
3922
|
}
|
|
3924
|
-
n.prototype.resolve = function(
|
|
3925
|
-
return this.resolveObject(m(
|
|
3923
|
+
n.prototype.resolve = function(d) {
|
|
3924
|
+
return this.resolveObject(m(d, !1, !0)).format();
|
|
3926
3925
|
};
|
|
3927
|
-
function T(
|
|
3928
|
-
return
|
|
3926
|
+
function T(d, O) {
|
|
3927
|
+
return d ? m(d, !1, !0).resolveObject(O) : O;
|
|
3929
3928
|
}
|
|
3930
|
-
return n.prototype.resolveObject = function(
|
|
3931
|
-
if (typeof
|
|
3929
|
+
return n.prototype.resolveObject = function(d) {
|
|
3930
|
+
if (typeof d == "string") {
|
|
3932
3931
|
var O = new n();
|
|
3933
|
-
O.parse(
|
|
3932
|
+
O.parse(d, !1, !0), d = O;
|
|
3934
3933
|
}
|
|
3935
|
-
for (var b = new n(), q = Object.keys(this),
|
|
3936
|
-
var E = q[
|
|
3934
|
+
for (var b = new n(), q = Object.keys(this), L = 0; L < q.length; L++) {
|
|
3935
|
+
var E = q[L];
|
|
3937
3936
|
b[E] = this[E];
|
|
3938
3937
|
}
|
|
3939
|
-
if (b.hash =
|
|
3938
|
+
if (b.hash = d.hash, d.href === "")
|
|
3940
3939
|
return b.href = b.format(), b;
|
|
3941
|
-
if (
|
|
3942
|
-
for (var B = Object.keys(
|
|
3940
|
+
if (d.slashes && !d.protocol) {
|
|
3941
|
+
for (var B = Object.keys(d), C = 0; C < B.length; C++) {
|
|
3943
3942
|
var ae = B[C];
|
|
3944
|
-
ae !== "protocol" && (b[ae] =
|
|
3943
|
+
ae !== "protocol" && (b[ae] = d[ae]);
|
|
3945
3944
|
}
|
|
3946
3945
|
return $[b.protocol] && b.hostname && !b.pathname && (b.pathname = "/", b.path = b.pathname), b.href = b.format(), b;
|
|
3947
3946
|
}
|
|
3948
|
-
if (
|
|
3949
|
-
if (!$[
|
|
3950
|
-
for (var H = Object.keys(
|
|
3947
|
+
if (d.protocol && d.protocol !== b.protocol) {
|
|
3948
|
+
if (!$[d.protocol]) {
|
|
3949
|
+
for (var H = Object.keys(d), D = 0; D < H.length; D++) {
|
|
3951
3950
|
var se = H[D];
|
|
3952
|
-
b[se] =
|
|
3951
|
+
b[se] = d[se];
|
|
3953
3952
|
}
|
|
3954
3953
|
return b.href = b.format(), b;
|
|
3955
3954
|
}
|
|
3956
|
-
if (b.protocol =
|
|
3957
|
-
for (var
|
|
3955
|
+
if (b.protocol = d.protocol, !d.host && !x[d.protocol]) {
|
|
3956
|
+
for (var I = (d.pathname || "").split("/"); I.length && !(d.host = I.shift()); )
|
|
3958
3957
|
;
|
|
3959
|
-
|
|
3958
|
+
d.host || (d.host = ""), d.hostname || (d.hostname = ""), I[0] !== "" && I.unshift(""), I.length < 2 && I.unshift(""), b.pathname = I.join("/");
|
|
3960
3959
|
} else
|
|
3961
|
-
b.pathname =
|
|
3962
|
-
if (b.search =
|
|
3960
|
+
b.pathname = d.pathname;
|
|
3961
|
+
if (b.search = d.search, b.query = d.query, b.host = d.host || "", b.auth = d.auth, b.hostname = d.hostname || d.host, b.port = d.port, b.pathname || b.search) {
|
|
3963
3962
|
var Z = b.pathname || "", k = b.search || "";
|
|
3964
3963
|
b.path = Z + k;
|
|
3965
3964
|
}
|
|
3966
|
-
return b.slashes = b.slashes ||
|
|
3965
|
+
return b.slashes = b.slashes || d.slashes, b.href = b.format(), b;
|
|
3967
3966
|
}
|
|
3968
|
-
var re = b.pathname && b.pathname.charAt(0) === "/", R =
|
|
3969
|
-
if (W && (b.hostname = "", b.port = null, b.host && (P[0] === "" ? P[0] = b.host : P.unshift(b.host)), b.host = "",
|
|
3970
|
-
b.host =
|
|
3971
|
-
else if (
|
|
3972
|
-
P || (P = []), P.pop(), P = P.concat(
|
|
3973
|
-
else if (
|
|
3967
|
+
var re = b.pathname && b.pathname.charAt(0) === "/", R = d.host || d.pathname && d.pathname.charAt(0) === "/", N = R || re || b.host && d.pathname, U = N, P = b.pathname && b.pathname.split("/") || [], I = d.pathname && d.pathname.split("/") || [], W = b.protocol && !$[b.protocol];
|
|
3968
|
+
if (W && (b.hostname = "", b.port = null, b.host && (P[0] === "" ? P[0] = b.host : P.unshift(b.host)), b.host = "", d.protocol && (d.hostname = null, d.port = null, d.host && (I[0] === "" ? I[0] = d.host : I.unshift(d.host)), d.host = null), N = N && (I[0] === "" || P[0] === "")), R)
|
|
3969
|
+
b.host = d.host || d.host === "" ? d.host : b.host, b.hostname = d.hostname || d.hostname === "" ? d.hostname : b.hostname, b.search = d.search, b.query = d.query, P = I;
|
|
3970
|
+
else if (I.length)
|
|
3971
|
+
P || (P = []), P.pop(), P = P.concat(I), b.search = d.search, b.query = d.query;
|
|
3972
|
+
else if (d.search != null) {
|
|
3974
3973
|
if (W) {
|
|
3975
3974
|
b.host = P.shift(), b.hostname = b.host;
|
|
3976
3975
|
var z = b.host && b.host.indexOf("@") > 0 ? b.host.split("@") : !1;
|
|
3977
3976
|
z && (b.auth = z.shift(), b.hostname = z.shift(), b.host = b.hostname);
|
|
3978
3977
|
}
|
|
3979
|
-
return b.search =
|
|
3978
|
+
return b.search = d.search, b.query = d.query, (b.pathname !== null || b.search !== null) && (b.path = (b.pathname ? b.pathname : "") + (b.search ? b.search : "")), b.href = b.format(), b;
|
|
3980
3979
|
}
|
|
3981
3980
|
if (!P.length)
|
|
3982
3981
|
return b.pathname = null, b.search ? b.path = "/" + b.search : b.path = null, b.href = b.format(), b;
|
|
3983
|
-
for (var K = P.slice(-1)[0], ne = (b.host ||
|
|
3984
|
-
K = P[
|
|
3982
|
+
for (var K = P.slice(-1)[0], ne = (b.host || d.host || P.length > 1) && (K === "." || K === "..") || K === "", J = 0, A = P.length; A >= 0; A--)
|
|
3983
|
+
K = P[A], K === "." ? P.splice(A, 1) : K === ".." ? (P.splice(A, 1), J++) : J && (P.splice(A, 1), J--);
|
|
3985
3984
|
if (!N && !U)
|
|
3986
3985
|
for (; J--; J)
|
|
3987
3986
|
P.unshift("..");
|
|
@@ -3992,11 +3991,11 @@ function bs() {
|
|
|
3992
3991
|
var z = b.host && b.host.indexOf("@") > 0 ? b.host.split("@") : !1;
|
|
3993
3992
|
z && (b.auth = z.shift(), b.hostname = z.shift(), b.host = b.hostname);
|
|
3994
3993
|
}
|
|
3995
|
-
return N = N || b.host && P.length, N && !F && P.unshift(""), P.length > 0 ? b.pathname = P.join("/") : (b.pathname = null, b.path = null), (b.pathname !== null || b.search !== null) && (b.path = (b.pathname ? b.pathname : "") + (b.search ? b.search : "")), b.auth =
|
|
3994
|
+
return N = N || b.host && P.length, N && !F && P.unshift(""), P.length > 0 ? b.pathname = P.join("/") : (b.pathname = null, b.path = null), (b.pathname !== null || b.search !== null) && (b.path = (b.pathname ? b.pathname : "") + (b.search ? b.search : "")), b.auth = d.auth || b.auth, b.slashes = b.slashes || d.slashes, b.href = b.format(), b;
|
|
3996
3995
|
}, n.prototype.parseHost = function() {
|
|
3997
|
-
var
|
|
3998
|
-
O && (O = O[0], O !== ":" && (this.port = O.substr(1)),
|
|
3999
|
-
}, Re.parse = m, Re.resolve =
|
|
3996
|
+
var d = this.host, O = o.exec(d);
|
|
3997
|
+
O && (O = O[0], O !== ":" && (this.port = O.substr(1)), d = d.substr(0, d.length - O.length)), d && (this.hostname = d);
|
|
3998
|
+
}, Re.parse = m, Re.resolve = w, Re.resolveObject = T, Re.format = v, Re.Url = n, Re;
|
|
4000
3999
|
}
|
|
4001
4000
|
var dr = bs(), hr = /* @__PURE__ */ mo(), xs = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), $s = class {
|
|
4002
4001
|
constructor(e, n = {}) {
|
|
@@ -4028,7 +4027,7 @@ var dr = bs(), hr = /* @__PURE__ */ mo(), xs = (e) => typeof e == "object" && "l
|
|
|
4028
4027
|
}), this;
|
|
4029
4028
|
}
|
|
4030
4029
|
prepare(e, n) {
|
|
4031
|
-
var
|
|
4030
|
+
var p, f, u;
|
|
4032
4031
|
const t = {
|
|
4033
4032
|
...e,
|
|
4034
4033
|
fullUrl: "",
|
|
@@ -4038,13 +4037,13 @@ var dr = bs(), hr = /* @__PURE__ */ mo(), xs = (e) => typeof e == "object" && "l
|
|
|
4038
4037
|
cookiesObj: {},
|
|
4039
4038
|
allHeaders: {}
|
|
4040
4039
|
};
|
|
4041
|
-
if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(
|
|
4040
|
+
if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(Hr, {})), t.headers && t.headers.length) {
|
|
4042
4041
|
const y = /^HTTP\/2/;
|
|
4043
|
-
t.headersObj = t.headers.reduce((x, { name: $, value:
|
|
4042
|
+
t.headersObj = t.headers.reduce((x, { name: $, value: h }) => {
|
|
4044
4043
|
const m = y.exec(t.httpVersion) ? $.toLocaleLowerCase() : $;
|
|
4045
4044
|
return {
|
|
4046
4045
|
...x,
|
|
4047
|
-
[m]:
|
|
4046
|
+
[m]: h
|
|
4048
4047
|
};
|
|
4049
4048
|
}, {});
|
|
4050
4049
|
}
|
|
@@ -4055,7 +4054,7 @@ var dr = bs(), hr = /* @__PURE__ */ mo(), xs = (e) => typeof e == "object" && "l
|
|
|
4055
4054
|
}),
|
|
4056
4055
|
{}
|
|
4057
4056
|
));
|
|
4058
|
-
const o = (
|
|
4057
|
+
const o = (p = t.cookies) == null ? void 0 : p.map(({ name: y, value: x }) => n.harIsAlreadyEncoded ? `${y}=${x}` : `${encodeURIComponent(y)}=${encodeURIComponent(x)}`);
|
|
4059
4058
|
switch (o != null && o.length && (t.allHeaders.cookie = o.join("; ")), t.postData.mimeType) {
|
|
4060
4059
|
case "multipart/mixed":
|
|
4061
4060
|
case "multipart/related":
|
|
@@ -4063,20 +4062,20 @@ var dr = bs(), hr = /* @__PURE__ */ mo(), xs = (e) => typeof e == "object" && "l
|
|
|
4063
4062
|
case "multipart/alternative":
|
|
4064
4063
|
if (t.postData.text = "", t.postData.mimeType = "multipart/form-data", (f = t.postData) != null && f.params) {
|
|
4065
4064
|
const y = "---011000010111000001101001", x = `${y}--`, $ = `\r
|
|
4066
|
-
`,
|
|
4065
|
+
`, h = (T) => T.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), m = (T) => T.replace(/\r?\n|\r/g, `\r
|
|
4067
4066
|
`), v = [`--${y}`];
|
|
4068
|
-
(
|
|
4069
|
-
const O = T.name, b = T.value || "", q = T.fileName || null,
|
|
4067
|
+
(u = t.postData) == null || u.params.forEach((T, d) => {
|
|
4068
|
+
const O = T.name, b = T.value || "", q = T.fileName || null, L = T.contentType || "application/octet-stream";
|
|
4070
4069
|
q ? (v.push(
|
|
4071
|
-
`Content-Disposition: form-data; name="${
|
|
4072
|
-
), v.push(`Content-Type: ${
|
|
4070
|
+
`Content-Disposition: form-data; name="${h(m(O))}"; filename="${q}"`
|
|
4071
|
+
), v.push(`Content-Type: ${L}`)) : v.push(`Content-Disposition: form-data; name="${h(m(O))}"`), v.push(""), v.push(m(b)), d !== t.postData.params.length - 1 && v.push(`--${y}`);
|
|
4073
4072
|
}), v.push(`--${x}`), t.postData.boundary = y, t.postData.text = v.join($);
|
|
4074
|
-
const
|
|
4075
|
-
t.headersObj[
|
|
4073
|
+
const w = fe(t.headersObj, "content-type") || "content-type";
|
|
4074
|
+
t.headersObj[w] = `multipart/form-data; boundary=${y}`;
|
|
4076
4075
|
}
|
|
4077
4076
|
break;
|
|
4078
4077
|
case "application/x-www-form-urlencoded":
|
|
4079
|
-
t.postData.params ? (t.postData.paramsObj = t.postData.params.reduce(
|
|
4078
|
+
t.postData.params ? (t.postData.paramsObj = t.postData.params.reduce(Hr, {}), t.postData.text = hr.stringify(t.postData.paramsObj)) : t.postData.text = "";
|
|
4080
4079
|
break;
|
|
4081
4080
|
case "text/json":
|
|
4082
4081
|
case "text/x-json":
|
|
@@ -4093,10 +4092,10 @@ var dr = bs(), hr = /* @__PURE__ */ mo(), xs = (e) => typeof e == "object" && "l
|
|
|
4093
4092
|
const s = {
|
|
4094
4093
|
...t.allHeaders,
|
|
4095
4094
|
...t.headersObj
|
|
4096
|
-
},
|
|
4095
|
+
}, l = dr.parse(t.url, !0, !0);
|
|
4097
4096
|
t.queryObj = {
|
|
4098
4097
|
...t.queryObj,
|
|
4099
|
-
...
|
|
4098
|
+
...l.query
|
|
4100
4099
|
};
|
|
4101
4100
|
let r;
|
|
4102
4101
|
n.harIsAlreadyEncoded ? r = hr.stringify(t.queryObj, {
|
|
@@ -4106,22 +4105,22 @@ var dr = bs(), hr = /* @__PURE__ */ mo(), xs = (e) => typeof e == "object" && "l
|
|
|
4106
4105
|
indices: !1
|
|
4107
4106
|
});
|
|
4108
4107
|
const a = {
|
|
4109
|
-
...
|
|
4108
|
+
...l,
|
|
4110
4109
|
query: t.queryObj,
|
|
4111
4110
|
search: r,
|
|
4112
|
-
path: r ? `${
|
|
4111
|
+
path: r ? `${l.pathname}?${r}` : l.pathname
|
|
4113
4112
|
}, i = dr.format({
|
|
4114
|
-
...
|
|
4113
|
+
...l,
|
|
4115
4114
|
query: null,
|
|
4116
4115
|
search: null
|
|
4117
|
-
}),
|
|
4118
|
-
...
|
|
4116
|
+
}), c = dr.format({
|
|
4117
|
+
...l,
|
|
4119
4118
|
...a
|
|
4120
4119
|
});
|
|
4121
4120
|
return {
|
|
4122
4121
|
...t,
|
|
4123
4122
|
allHeaders: s,
|
|
4124
|
-
fullUrl:
|
|
4123
|
+
fullUrl: c,
|
|
4125
4124
|
url: i,
|
|
4126
4125
|
uriObj: a
|
|
4127
4126
|
};
|
|
@@ -4140,21 +4139,21 @@ const js = ({
|
|
|
4140
4139
|
threshold: n
|
|
4141
4140
|
} = {}) => {
|
|
4142
4141
|
const [t, o] = ve(!1), s = xr(null);
|
|
4143
|
-
return
|
|
4144
|
-
const
|
|
4142
|
+
return eo(() => {
|
|
4143
|
+
const l = new IntersectionObserver(
|
|
4145
4144
|
([a]) => {
|
|
4146
4145
|
a && o(a.isIntersecting);
|
|
4147
4146
|
},
|
|
4148
4147
|
{ rootMargin: e, threshold: n }
|
|
4149
4148
|
), r = s.current;
|
|
4150
4149
|
if (r)
|
|
4151
|
-
return
|
|
4150
|
+
return l.observe(r), () => l.unobserve(r);
|
|
4152
4151
|
}, [e, n]), [s, t];
|
|
4153
|
-
}, ws = ye.Root,
|
|
4152
|
+
}, ws = ye.Root, Xn = ye.CollapsibleTrigger, Ss = ye.CollapsibleContent, Os = typeof window < "u" ? Yo : eo, go = ({
|
|
4154
4153
|
children: e,
|
|
4155
4154
|
maxHeight: n = 250
|
|
4156
4155
|
}) => {
|
|
4157
|
-
const t = xr(null), [o, s] = ve(!1), [
|
|
4156
|
+
const t = xr(null), [o, s] = ve(!1), [l, r] = ve(!1);
|
|
4158
4157
|
return Os(() => {
|
|
4159
4158
|
const a = t.current;
|
|
4160
4159
|
if (!a) return;
|
|
@@ -4167,7 +4166,7 @@ const js = ({
|
|
|
4167
4166
|
ws,
|
|
4168
4167
|
{
|
|
4169
4168
|
className: "group",
|
|
4170
|
-
open:
|
|
4169
|
+
open: l,
|
|
4171
4170
|
onOpenChange: r,
|
|
4172
4171
|
style: { "--max-height": `${n}px` },
|
|
4173
4172
|
children: [
|
|
@@ -4177,17 +4176,17 @@ const js = ({
|
|
|
4177
4176
|
forceMount: !0,
|
|
4178
4177
|
className: pe(
|
|
4179
4178
|
"relative overflow-hidden group",
|
|
4180
|
-
!
|
|
4179
|
+
!l && o && "max-h-[--max-height]"
|
|
4181
4180
|
),
|
|
4182
4181
|
children: [
|
|
4183
|
-
!
|
|
4182
|
+
!l && o && /* @__PURE__ */ g.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" }),
|
|
4184
4183
|
/* @__PURE__ */ g.jsx("div", { ref: t, children: e }),
|
|
4185
|
-
!
|
|
4186
|
-
|
|
4184
|
+
!l && o && /* @__PURE__ */ g.jsx(
|
|
4185
|
+
Xn,
|
|
4187
4186
|
{
|
|
4188
4187
|
className: "absolute inset-0 grid place-items-center z-10 cursor-pointer peer",
|
|
4189
4188
|
asChild: !0,
|
|
4190
|
-
children: /* @__PURE__ */ g.jsx("div", { children: /* @__PURE__ */ g.jsxs(
|
|
4189
|
+
children: /* @__PURE__ */ g.jsx("div", { children: /* @__PURE__ */ g.jsxs(_r, { variant: "outline", className: "hidden group-hover:flex", children: [
|
|
4191
4190
|
/* @__PURE__ */ g.jsx(Bo, { size: 14, className: "mr-1.5" }),
|
|
4192
4191
|
"Click to expand"
|
|
4193
4192
|
] }) })
|
|
@@ -4199,8 +4198,8 @@ const js = ({
|
|
|
4199
4198
|
o && /* @__PURE__ */ g.jsx(
|
|
4200
4199
|
"div",
|
|
4201
4200
|
{
|
|
4202
|
-
className: pe("flex justify-center w-full mb-2", !
|
|
4203
|
-
children: /* @__PURE__ */ g.jsx(
|
|
4201
|
+
className: pe("flex justify-center w-full mb-2", !l && "hidden"),
|
|
4202
|
+
children: /* @__PURE__ */ g.jsx(Xn, { asChild: !0, children: /* @__PURE__ */ g.jsxs(_r, { variant: "outline", size: "sm", children: [
|
|
4204
4203
|
"Collapse",
|
|
4205
4204
|
/* @__PURE__ */ g.jsx(Ho, { size: 14, className: "ml-1.5" })
|
|
4206
4205
|
] }) })
|
|
@@ -4215,22 +4214,22 @@ const js = ({
|
|
|
4215
4214
|
operation: t
|
|
4216
4215
|
}) => {
|
|
4217
4216
|
var r, a, i;
|
|
4218
|
-
const o = (r = t.parameters) == null ? void 0 : r.filter((
|
|
4219
|
-
var
|
|
4217
|
+
const o = (r = t.parameters) == null ? void 0 : r.filter((c) => c.in === "header").map((c) => {
|
|
4218
|
+
var p, f;
|
|
4220
4219
|
return {
|
|
4221
|
-
name:
|
|
4222
|
-
defaultValue: ((f = (
|
|
4220
|
+
name: c.name,
|
|
4221
|
+
defaultValue: ((f = (p = c.examples) == null ? void 0 : p.find((u) => u.value)) == null ? void 0 : f.value) ?? ""
|
|
4223
4222
|
};
|
|
4224
|
-
}), s = (a = t.parameters) == null ? void 0 : a.filter((
|
|
4225
|
-
var
|
|
4223
|
+
}), s = (a = t.parameters) == null ? void 0 : a.filter((c) => c.in === "query").sort((c, p) => c.required && !p.required ? -1 : 1).map((c) => {
|
|
4224
|
+
var p, f, u, y, x;
|
|
4226
4225
|
return {
|
|
4227
|
-
name:
|
|
4228
|
-
defaultActive:
|
|
4229
|
-
isRequired:
|
|
4230
|
-
enum: ((
|
|
4231
|
-
type: ((x =
|
|
4226
|
+
name: c.name,
|
|
4227
|
+
defaultActive: c.required ?? !1,
|
|
4228
|
+
isRequired: c.required ?? !1,
|
|
4229
|
+
enum: ((p = c.schema) == null ? void 0 : p.type) == "array" ? (u = (f = c.schema) == null ? void 0 : f.items) == null ? void 0 : u.enum : (y = c.schema) == null ? void 0 : y.enum,
|
|
4230
|
+
type: ((x = c.schema) == null ? void 0 : x.type) ?? "string"
|
|
4232
4231
|
};
|
|
4233
|
-
}),
|
|
4232
|
+
}), l = (i = t.parameters) == null ? void 0 : i.filter((c) => c.in === "path").map((c) => ({ name: c.name }));
|
|
4234
4233
|
return /* @__PURE__ */ g.jsx(
|
|
4235
4234
|
ra,
|
|
4236
4235
|
{
|
|
@@ -4240,20 +4239,20 @@ const js = ({
|
|
|
4240
4239
|
url: t.path,
|
|
4241
4240
|
headers: o,
|
|
4242
4241
|
queryParams: s,
|
|
4243
|
-
pathParams:
|
|
4242
|
+
pathParams: l
|
|
4244
4243
|
}
|
|
4245
4244
|
);
|
|
4246
|
-
},
|
|
4245
|
+
}, Cr = ({ children: e, className: n }) => /* @__PURE__ */ g.jsx(
|
|
4247
4246
|
"div",
|
|
4248
4247
|
{
|
|
4249
4248
|
className: pe("rounded-xl overflow-hidden border border-border", n),
|
|
4250
4249
|
children: e
|
|
4251
4250
|
}
|
|
4252
|
-
),
|
|
4251
|
+
), Pr = ({ children: e, className: n }) => /* @__PURE__ */ g.jsx(
|
|
4253
4252
|
"div",
|
|
4254
4253
|
{
|
|
4255
4254
|
className: pe(
|
|
4256
|
-
"border-b bg-muted dark:bg-transparent text-card-foreground p-3
|
|
4255
|
+
"border-b bg-muted dark:bg-transparent text-card-foreground p-3",
|
|
4257
4256
|
n
|
|
4258
4257
|
),
|
|
4259
4258
|
children: e
|
|
@@ -4303,24 +4302,21 @@ const js = ({
|
|
|
4303
4302
|
"application/graphql": "graphql"
|
|
4304
4303
|
}[e] ?? "plain" : "plain", xo = ({
|
|
4305
4304
|
content: e,
|
|
4306
|
-
description: n
|
|
4307
|
-
onExampleChange: t
|
|
4305
|
+
description: n
|
|
4308
4306
|
}) => {
|
|
4309
|
-
var
|
|
4310
|
-
const [
|
|
4311
|
-
let
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
))
|
|
4315
|
-
|
|
4316
|
-
}, [h, t]);
|
|
4317
|
-
const f = Cs(h), p = Ps(a == null ? void 0 : a.mediaType), y = i.length > 0 || e.length > 0;
|
|
4307
|
+
var y;
|
|
4308
|
+
const [t, o] = ve(0), [s, l] = ve(0), r = Array.isArray(e) && e.length === 1 ? e[0] : e[t], a = (r == null ? void 0 : r.examples) ?? [], i = a[s];
|
|
4309
|
+
let c;
|
|
4310
|
+
i ? c = "value" in i ? i.value : i : r != null && r.schema && (c = He(
|
|
4311
|
+
r.schema
|
|
4312
|
+
));
|
|
4313
|
+
const p = Cs(c), f = Ps(r == null ? void 0 : r.mediaType), u = a.length > 0 || e.length > 0;
|
|
4318
4314
|
return /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
4319
4315
|
/* @__PURE__ */ g.jsxs(vo, { className: "p-0", children: [
|
|
4320
|
-
|
|
4316
|
+
i != null && i.externalValue ? /* @__PURE__ */ g.jsx("div", { className: "p-2", children: /* @__PURE__ */ g.jsx(
|
|
4321
4317
|
"a",
|
|
4322
4318
|
{
|
|
4323
|
-
href:
|
|
4319
|
+
href: i.externalValue,
|
|
4324
4320
|
target: "_blank",
|
|
4325
4321
|
rel: "noopener noreferrer",
|
|
4326
4322
|
className: "text-xs text-primary hover:underline",
|
|
@@ -4329,51 +4325,48 @@ const js = ({
|
|
|
4329
4325
|
) }) : /* @__PURE__ */ g.jsx(go, { children: /* @__PURE__ */ g.jsx(
|
|
4330
4326
|
no,
|
|
4331
4327
|
{
|
|
4332
|
-
language:
|
|
4328
|
+
language: f,
|
|
4333
4329
|
noBackground: !0,
|
|
4334
4330
|
copyable: !0,
|
|
4335
4331
|
className: "[--scrollbar-color:gray] text-xs max-h-[500px] p-2",
|
|
4336
|
-
code:
|
|
4332
|
+
code: p
|
|
4337
4333
|
}
|
|
4338
4334
|
) }),
|
|
4339
|
-
(
|
|
4335
|
+
(i == null ? void 0 : i.description) && /* @__PURE__ */ g.jsx("div", { className: "border-t text-xs px-3 py-1.5 text-muted-foreground", children: i.description })
|
|
4340
4336
|
] }),
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
/* @__PURE__ */ g.jsxs("div", { className: "flex items-center gap-2 justify-between min-w-0 px-3 py-2", children: [
|
|
4337
|
+
u && /* @__PURE__ */ g.jsxs(bo, { className: "flex flex-col gap-2 text-xs py-1", children: [
|
|
4338
|
+
/* @__PURE__ */ g.jsxs("div", { className: "flex items-center gap-2 justify-between min-w-0", children: [
|
|
4344
4339
|
/* @__PURE__ */ g.jsx("div", { className: "flex items-center gap-2 min-w-0", children: e.length > 1 ? /* @__PURE__ */ g.jsx(
|
|
4345
4340
|
Ze,
|
|
4346
4341
|
{
|
|
4347
4342
|
className: "max-w-[200px]",
|
|
4348
|
-
value:
|
|
4349
|
-
onChange: (
|
|
4350
|
-
options: e.map((
|
|
4351
|
-
value:
|
|
4352
|
-
label:
|
|
4343
|
+
value: t.toString(),
|
|
4344
|
+
onChange: (x) => o(Number(x.target.value)),
|
|
4345
|
+
options: e.map((x, $) => ({
|
|
4346
|
+
value: $.toString(),
|
|
4347
|
+
label: x.mediaType
|
|
4353
4348
|
}))
|
|
4354
4349
|
}
|
|
4355
|
-
) : /* @__PURE__ */ g.jsx("span", { className: "font-mono text-[11px]", children: (
|
|
4356
|
-
|
|
4350
|
+
) : /* @__PURE__ */ g.jsx("span", { className: "font-mono text-[11px]", children: (y = e[0]) == null ? void 0 : y.mediaType }) }),
|
|
4351
|
+
a.length > 1 && /* @__PURE__ */ g.jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ g.jsx(
|
|
4357
4352
|
Ze,
|
|
4358
4353
|
{
|
|
4359
4354
|
className: "max-w-[180px]",
|
|
4360
|
-
value:
|
|
4361
|
-
onChange: (
|
|
4362
|
-
options:
|
|
4363
|
-
value:
|
|
4364
|
-
label:
|
|
4355
|
+
value: s.toString(),
|
|
4356
|
+
onChange: (x) => l(Number(x.target.value)),
|
|
4357
|
+
options: a.map((x, $) => ({
|
|
4358
|
+
value: $.toString(),
|
|
4359
|
+
label: x.summary || x.name || x.description || `Example ${$ + 1}`
|
|
4365
4360
|
}))
|
|
4366
4361
|
}
|
|
4367
4362
|
) })
|
|
4368
|
-
] })
|
|
4363
|
+
] }),
|
|
4364
|
+
n && /* @__PURE__ */ g.jsx("div", { className: "text-muted-foreground text-xs", children: n })
|
|
4369
4365
|
] })
|
|
4370
4366
|
] });
|
|
4371
|
-
}, Rs = ({
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
}) => /* @__PURE__ */ g.jsxs(Pr, { children: [
|
|
4375
|
-
/* @__PURE__ */ g.jsx(Rr, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ g.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
|
|
4376
|
-
/* @__PURE__ */ g.jsx(xo, { content: e, onExampleChange: n })
|
|
4367
|
+
}, Rs = ({ content: e }) => /* @__PURE__ */ g.jsxs(Cr, { children: [
|
|
4368
|
+
/* @__PURE__ */ g.jsx(Pr, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ g.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
|
|
4369
|
+
/* @__PURE__ */ g.jsx(xo, { content: e })
|
|
4377
4370
|
] }), qs = ({ response: e }) => /* @__PURE__ */ g.jsx(Ye.Content, { value: e.statusCode, children: /* @__PURE__ */ g.jsx(
|
|
4378
4371
|
xo,
|
|
4379
4372
|
{
|
|
@@ -4386,14 +4379,14 @@ const js = ({
|
|
|
4386
4379
|
onSelectResponse: t
|
|
4387
4380
|
}) => {
|
|
4388
4381
|
var o;
|
|
4389
|
-
return /* @__PURE__ */ g.jsx(
|
|
4382
|
+
return /* @__PURE__ */ g.jsx(Cr, { children: /* @__PURE__ */ g.jsxs(
|
|
4390
4383
|
Ye.Root,
|
|
4391
4384
|
{
|
|
4392
4385
|
defaultValue: (o = e[0]) == null ? void 0 : o.statusCode,
|
|
4393
4386
|
value: n,
|
|
4394
4387
|
onValueChange: (s) => t(s),
|
|
4395
4388
|
children: [
|
|
4396
|
-
/* @__PURE__ */ g.jsxs(
|
|
4389
|
+
/* @__PURE__ */ g.jsxs(Pr, { className: "text-xs flex flex-col gap-2 pb-0", children: [
|
|
4397
4390
|
/* @__PURE__ */ g.jsx("span", { className: "font-mono", children: "Example Responses" }),
|
|
4398
4391
|
/* @__PURE__ */ g.jsx(Ye.List, { className: "flex gap-2", children: e.map((s) => /* @__PURE__ */ g.jsx(
|
|
4399
4392
|
Ye.Trigger,
|
|
@@ -4500,32 +4493,32 @@ const js = ({
|
|
|
4500
4493
|
selectedResponse: n,
|
|
4501
4494
|
onSelectResponse: t
|
|
4502
4495
|
}) => {
|
|
4503
|
-
var
|
|
4504
|
-
const { input: o, type: s } =
|
|
4505
|
-
const
|
|
4496
|
+
var v;
|
|
4497
|
+
const { input: o, type: s } = $r(), l = jr(As, { input: o, type: s }), r = vr(l), a = $o(e.method), [i, c] = qo(), [, p] = Zn(), f = i.get("lang") ?? "shell", u = (v = e.requestBody) == null ? void 0 : v.content, y = e.path.split("/").map((w, T, d) => {
|
|
4498
|
+
const b = w.startsWith("{") && w.endsWith("}") || w.startsWith(":") ? w.replace(/[:{}]/g, "") : void 0;
|
|
4506
4499
|
return (
|
|
4507
4500
|
// eslint-disable-next-line react/no-array-index-key
|
|
4508
4501
|
/* @__PURE__ */ g.jsxs(Xo, { children: [
|
|
4509
|
-
|
|
4502
|
+
b ? /* @__PURE__ */ g.jsx(
|
|
4510
4503
|
ro,
|
|
4511
4504
|
{
|
|
4512
|
-
name:
|
|
4505
|
+
name: b,
|
|
4513
4506
|
backgroundOpacity: "0",
|
|
4514
|
-
slug: `${e.slug}-${
|
|
4515
|
-
children:
|
|
4507
|
+
slug: `${e.slug}-${b.toLocaleLowerCase()}`,
|
|
4508
|
+
children: w
|
|
4516
4509
|
}
|
|
4517
|
-
) :
|
|
4518
|
-
|
|
4510
|
+
) : w,
|
|
4511
|
+
T < d.length - 1 ? "/" : null,
|
|
4519
4512
|
/* @__PURE__ */ g.jsx("wbr", {})
|
|
4520
|
-
] },
|
|
4513
|
+
] }, w + T)
|
|
4521
4514
|
);
|
|
4522
|
-
}), { selectedServer:
|
|
4523
|
-
var
|
|
4524
|
-
const
|
|
4515
|
+
}), { selectedServer: x } = br(), $ = Zo(() => {
|
|
4516
|
+
var d;
|
|
4517
|
+
const w = (d = u == null ? void 0 : u[0]) != null && d.schema ? He(u[0].schema) : void 0, T = new $s({
|
|
4525
4518
|
method: e.method.toLocaleUpperCase(),
|
|
4526
|
-
url: (
|
|
4527
|
-
postData:
|
|
4528
|
-
text: JSON.stringify(
|
|
4519
|
+
url: (x ?? r.data.schema.url ?? "") + e.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
4520
|
+
postData: w ? {
|
|
4521
|
+
text: JSON.stringify(w, null, 2),
|
|
4529
4522
|
mimeType: "application/json"
|
|
4530
4523
|
} : {},
|
|
4531
4524
|
headers: [],
|
|
@@ -4535,58 +4528,57 @@ const js = ({
|
|
|
4535
4528
|
headersSize: 0,
|
|
4536
4529
|
bodySize: 0
|
|
4537
4530
|
});
|
|
4538
|
-
return Es(
|
|
4531
|
+
return Es(T, f);
|
|
4539
4532
|
}, [
|
|
4540
|
-
|
|
4541
|
-
x,
|
|
4533
|
+
u,
|
|
4542
4534
|
e.method,
|
|
4543
4535
|
e.path,
|
|
4544
|
-
|
|
4536
|
+
x,
|
|
4545
4537
|
r.data.schema.url,
|
|
4546
|
-
|
|
4547
|
-
]), [
|
|
4538
|
+
f
|
|
4539
|
+
]), [h, m] = js({ rootMargin: "200px 0px 200px 0px" });
|
|
4548
4540
|
return /* @__PURE__ */ g.jsxs(
|
|
4549
4541
|
"aside",
|
|
4550
4542
|
{
|
|
4551
|
-
ref:
|
|
4543
|
+
ref: h,
|
|
4552
4544
|
className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4",
|
|
4553
4545
|
children: [
|
|
4554
|
-
/* @__PURE__ */ g.jsxs(
|
|
4555
|
-
/* @__PURE__ */ g.jsxs(
|
|
4546
|
+
/* @__PURE__ */ g.jsxs(Cr, { children: [
|
|
4547
|
+
/* @__PURE__ */ g.jsxs(Pr, { className: "flex justify-between items-center flex-nowrap py-4 gap-2 text-xs", children: [
|
|
4556
4548
|
/* @__PURE__ */ g.jsxs("span", { className: "font-mono break-words", children: [
|
|
4557
4549
|
/* @__PURE__ */ g.jsx("span", { className: pe("font-semibold", a), children: e.method.toLocaleUpperCase() }),
|
|
4558
4550
|
" ",
|
|
4559
|
-
|
|
4551
|
+
y
|
|
4560
4552
|
] }),
|
|
4561
|
-
|
|
4553
|
+
m && /* @__PURE__ */ g.jsx(
|
|
4562
4554
|
Ts,
|
|
4563
4555
|
{
|
|
4564
4556
|
server: r.data.schema.url,
|
|
4565
|
-
servers: r.data.schema.servers.map((
|
|
4557
|
+
servers: r.data.schema.servers.map((w) => w.url),
|
|
4566
4558
|
operation: e
|
|
4567
4559
|
}
|
|
4568
4560
|
)
|
|
4569
4561
|
] }),
|
|
4570
|
-
|
|
4562
|
+
m && /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
4571
4563
|
/* @__PURE__ */ g.jsx(vo, { className: "p-0", children: /* @__PURE__ */ g.jsx(go, { children: /* @__PURE__ */ g.jsx(
|
|
4572
4564
|
no,
|
|
4573
4565
|
{
|
|
4574
|
-
language:
|
|
4566
|
+
language: f,
|
|
4575
4567
|
noBackground: !0,
|
|
4576
4568
|
className: "[--scrollbar-color:gray] text-xs max-h-[500px] p-2",
|
|
4577
|
-
code:
|
|
4569
|
+
code: $
|
|
4578
4570
|
}
|
|
4579
4571
|
) }) }),
|
|
4580
|
-
/* @__PURE__ */ g.jsxs(bo, { className: "flex items-center text-xs gap-2 justify-end py-
|
|
4572
|
+
/* @__PURE__ */ g.jsxs(bo, { className: "flex items-center text-xs gap-2 justify-end py-3", children: [
|
|
4581
4573
|
/* @__PURE__ */ g.jsx("span", { children: "Show example in" }),
|
|
4582
4574
|
/* @__PURE__ */ g.jsx(
|
|
4583
4575
|
Ze,
|
|
4584
4576
|
{
|
|
4585
4577
|
className: "self-start max-w-[150px]",
|
|
4586
|
-
value:
|
|
4587
|
-
onChange: (
|
|
4588
|
-
|
|
4589
|
-
|
|
4578
|
+
value: f,
|
|
4579
|
+
onChange: (w) => {
|
|
4580
|
+
p(() => {
|
|
4581
|
+
c((T) => (T.set("lang", w.target.value), T));
|
|
4590
4582
|
});
|
|
4591
4583
|
},
|
|
4592
4584
|
options: Is
|
|
@@ -4595,14 +4587,8 @@ const js = ({
|
|
|
4595
4587
|
] })
|
|
4596
4588
|
] })
|
|
4597
4589
|
] }),
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
{
|
|
4601
|
-
content: x,
|
|
4602
|
-
onExampleChange: p
|
|
4603
|
-
}
|
|
4604
|
-
),
|
|
4605
|
-
S && e.responses.length > 0 && /* @__PURE__ */ g.jsx(
|
|
4590
|
+
m && u && /* @__PURE__ */ g.jsx(Rs, { content: u }),
|
|
4591
|
+
m && e.responses.length > 0 && /* @__PURE__ */ g.jsx(
|
|
4606
4592
|
Ns,
|
|
4607
4593
|
{
|
|
4608
4594
|
selectedResponse: n,
|
|
@@ -4678,13 +4664,13 @@ const js = ({
|
|
|
4678
4664
|
t ? /* @__PURE__ */ g.jsx(Jo, { size: 14 }) : /* @__PURE__ */ g.jsx(Vo, { size: 14 }),
|
|
4679
4665
|
/* @__PURE__ */ g.jsx("span", { children: Ms[n] })
|
|
4680
4666
|
] }),
|
|
4681
|
-
/* @__PURE__ */ g.jsx(ye.Content, { className: "pb-4", children: e.map((
|
|
4667
|
+
/* @__PURE__ */ g.jsx(ye.Content, { className: "pb-4", children: e.map((l, r) => (
|
|
4682
4668
|
// eslint-disable-next-line react/no-array-index-key
|
|
4683
4669
|
/* @__PURE__ */ g.jsx(
|
|
4684
4670
|
Hs,
|
|
4685
4671
|
{
|
|
4686
4672
|
type: n,
|
|
4687
|
-
schema:
|
|
4673
|
+
schema: l,
|
|
4688
4674
|
level: o
|
|
4689
4675
|
},
|
|
4690
4676
|
r
|
|
@@ -4698,13 +4684,13 @@ const js = ({
|
|
|
4698
4684
|
schema: e,
|
|
4699
4685
|
level: n
|
|
4700
4686
|
}) => {
|
|
4701
|
-
const [t, o] = ve(!0), s = ea(() => o((
|
|
4702
|
-
for (const [
|
|
4703
|
-
if (e[
|
|
4687
|
+
const [t, o] = ve(!0), s = ea(() => o((l) => !l), []);
|
|
4688
|
+
for (const [l, r] of Us(Ws))
|
|
4689
|
+
if (e[l])
|
|
4704
4690
|
return /* @__PURE__ */ g.jsx(
|
|
4705
4691
|
zs,
|
|
4706
4692
|
{
|
|
4707
|
-
schemas: e[
|
|
4693
|
+
schemas: e[l],
|
|
4708
4694
|
type: r,
|
|
4709
4695
|
isOpen: t,
|
|
4710
4696
|
toggleOpen: s,
|
|
@@ -4720,7 +4706,7 @@ const js = ({
|
|
|
4720
4706
|
group: t,
|
|
4721
4707
|
level: o,
|
|
4722
4708
|
defaultOpen: s = !1,
|
|
4723
|
-
showCollapseButton:
|
|
4709
|
+
showCollapseButton: l = !0
|
|
4724
4710
|
}) => {
|
|
4725
4711
|
const [r, a] = ve(s);
|
|
4726
4712
|
return Js(n) ? /* @__PURE__ */ g.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ g.jsx("div", { className: "flex flex-col gap-1 justify-between text-sm", children: /* @__PURE__ */ g.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
@@ -4729,7 +4715,7 @@ const js = ({
|
|
|
4729
4715
|
] }) }) }) : /* @__PURE__ */ g.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ g.jsxs("div", { className: "flex flex-col gap-1 justify-between text-sm", children: [
|
|
4730
4716
|
/* @__PURE__ */ g.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
4731
4717
|
/* @__PURE__ */ g.jsx("code", { children: e }),
|
|
4732
|
-
/* @__PURE__ */ g.jsx(tt, { variant: "
|
|
4718
|
+
/* @__PURE__ */ g.jsx(tt, { variant: "secondary", children: n.type === "array" && n.items.type ? /* @__PURE__ */ g.jsxs("span", { children: [
|
|
4733
4719
|
n.items.type,
|
|
4734
4720
|
"[]"
|
|
4735
4721
|
] }) : Array.isArray(n.type) ? /* @__PURE__ */ g.jsx("span", { children: n.type.join(" | ") }) : /* @__PURE__ */ g.jsx("span", { children: n.type }) }),
|
|
@@ -4749,7 +4735,7 @@ const js = ({
|
|
|
4749
4735
|
open: r,
|
|
4750
4736
|
onOpenChange: () => a(!r),
|
|
4751
4737
|
children: [
|
|
4752
|
-
|
|
4738
|
+
l && /* @__PURE__ */ g.jsx(ye.Trigger, { asChild: !0, children: /* @__PURE__ */ g.jsxs(
|
|
4753
4739
|
to,
|
|
4754
4740
|
{
|
|
4755
4741
|
variant: "outline",
|
|
@@ -4773,9 +4759,9 @@ const js = ({
|
|
|
4773
4759
|
}) => {
|
|
4774
4760
|
if (!e || Object.keys(e).length === 0)
|
|
4775
4761
|
return /* @__PURE__ */ g.jsx($e, { className: "p-4", children: /* @__PURE__ */ g.jsx("span", { className: "text-sm text-muted-foreground italic", children: "No response specified" }) });
|
|
4776
|
-
const o = (s,
|
|
4762
|
+
const o = (s, l) => {
|
|
4777
4763
|
if (gr(s))
|
|
4778
|
-
return /* @__PURE__ */ g.jsx(jo, { schema: s, level:
|
|
4764
|
+
return /* @__PURE__ */ g.jsx(jo, { schema: s, level: l });
|
|
4779
4765
|
if (s.type === "array" && s.items) {
|
|
4780
4766
|
const r = s.items;
|
|
4781
4767
|
return typeof r.type == "string" && ["string", "number", "boolean", "integer"].includes(r.type) ? /* @__PURE__ */ g.jsxs($e, { className: "p-4", children: [
|
|
@@ -4795,8 +4781,8 @@ const js = ({
|
|
|
4795
4781
|
)
|
|
4796
4782
|
] }) : r.type === "object" ? /* @__PURE__ */ g.jsxs($e, { className: "flex flex-col gap-2 bg-border/30 p-4", children: [
|
|
4797
4783
|
/* @__PURE__ */ g.jsx("span", { className: "text-sm text-muted-foreground", children: "object[]" }),
|
|
4798
|
-
o(r,
|
|
4799
|
-
] }) : o(r,
|
|
4784
|
+
o(r, l + 1)
|
|
4785
|
+
] }) : o(r, l + 1);
|
|
4800
4786
|
}
|
|
4801
4787
|
if (s.type === "object" && (!s.properties || Object.keys(s.properties).length === 0))
|
|
4802
4788
|
return /* @__PURE__ */ g.jsxs($e, { className: "p-4 flex gap-2 items-center", children: [
|
|
@@ -4816,22 +4802,22 @@ const js = ({
|
|
|
4816
4802
|
if (s.properties) {
|
|
4817
4803
|
const r = oo(
|
|
4818
4804
|
Object.entries(s.properties),
|
|
4819
|
-
([i,
|
|
4820
|
-
var
|
|
4821
|
-
return
|
|
4805
|
+
([i, c]) => {
|
|
4806
|
+
var p;
|
|
4807
|
+
return c.deprecated ? "deprecated" : (p = s.required) != null && p.includes(i) ? "required" : "optional";
|
|
4822
4808
|
}
|
|
4823
4809
|
), a = ["required", "optional", "deprecated"];
|
|
4824
4810
|
return /* @__PURE__ */ g.jsx($e, { className: "divide-y overflow-hidden", children: a.map(
|
|
4825
|
-
(i) => r[i] && /* @__PURE__ */ g.jsx("ul", { className: "divide-y", children: r[i].map(([
|
|
4811
|
+
(i) => r[i] && /* @__PURE__ */ g.jsx("ul", { className: "divide-y", children: r[i].map(([c, p]) => /* @__PURE__ */ g.jsx(
|
|
4826
4812
|
Ds,
|
|
4827
4813
|
{
|
|
4828
|
-
name:
|
|
4829
|
-
schema:
|
|
4814
|
+
name: c,
|
|
4815
|
+
schema: p,
|
|
4830
4816
|
group: i,
|
|
4831
|
-
level:
|
|
4817
|
+
level: l,
|
|
4832
4818
|
defaultOpen: t
|
|
4833
4819
|
},
|
|
4834
|
-
|
|
4820
|
+
c
|
|
4835
4821
|
)) }, i)
|
|
4836
4822
|
) });
|
|
4837
4823
|
}
|
|
@@ -4851,7 +4837,7 @@ const js = ({
|
|
|
4851
4837
|
/* @__PURE__ */ g.jsx(la, { children: /* @__PURE__ */ g.jsx(ca, { children: "Additional Properties:" }) }),
|
|
4852
4838
|
/* @__PURE__ */ g.jsx(ua, { children: o(
|
|
4853
4839
|
s.additionalProperties,
|
|
4854
|
-
|
|
4840
|
+
l + 1
|
|
4855
4841
|
) })
|
|
4856
4842
|
] }) : null;
|
|
4857
4843
|
};
|
|
@@ -4860,11 +4846,11 @@ const js = ({
|
|
|
4860
4846
|
operationFragment: e,
|
|
4861
4847
|
serverUrl: n
|
|
4862
4848
|
}) => {
|
|
4863
|
-
var i,
|
|
4849
|
+
var i, c, p;
|
|
4864
4850
|
const t = ma(Xs, e), o = oo(
|
|
4865
4851
|
t.parameters ?? [],
|
|
4866
4852
|
(f) => f.in
|
|
4867
|
-
), s = xr(null),
|
|
4853
|
+
), s = xr(null), l = t.responses.at(0), [r, a] = ve(l == null ? void 0 : l.statusCode);
|
|
4868
4854
|
return /* @__PURE__ */ g.jsxs(
|
|
4869
4855
|
"div",
|
|
4870
4856
|
{
|
|
@@ -4883,8 +4869,8 @@ const js = ({
|
|
|
4883
4869
|
if (s.current) {
|
|
4884
4870
|
const f = document.createRange();
|
|
4885
4871
|
f.selectNodeContents(s.current);
|
|
4886
|
-
const
|
|
4887
|
-
|
|
4872
|
+
const u = window.getSelection();
|
|
4873
|
+
u == null || u.removeAllRanges(), u == null || u.addRange(f);
|
|
4888
4874
|
}
|
|
4889
4875
|
},
|
|
4890
4876
|
children: [
|
|
@@ -4903,8 +4889,8 @@ const js = ({
|
|
|
4903
4889
|
),
|
|
4904
4890
|
t.parameters && t.parameters.length > 0 && /* @__PURE__ */ g.jsx(g.Fragment, { children: Qs.flatMap(
|
|
4905
4891
|
(f) => {
|
|
4906
|
-
var
|
|
4907
|
-
return (
|
|
4892
|
+
var u;
|
|
4893
|
+
return (u = o[f]) != null && u.length ? /* @__PURE__ */ g.jsx(
|
|
4908
4894
|
wa,
|
|
4909
4895
|
{
|
|
4910
4896
|
id: t.slug,
|
|
@@ -4915,7 +4901,7 @@ const js = ({
|
|
|
4915
4901
|
) : [];
|
|
4916
4902
|
}
|
|
4917
4903
|
) }),
|
|
4918
|
-
ba((
|
|
4904
|
+
ba((p = (c = (i = t.requestBody) == null ? void 0 : i.content) == null ? void 0 : c.at(0)) == null ? void 0 : p.schema, (f) => /* @__PURE__ */ g.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
4919
4905
|
/* @__PURE__ */ g.jsx(
|
|
4920
4906
|
Be,
|
|
4921
4907
|
{
|
|
@@ -4955,7 +4941,7 @@ const js = ({
|
|
|
4955
4941
|
f.statusCode
|
|
4956
4942
|
)) }),
|
|
4957
4943
|
/* @__PURE__ */ g.jsx("ul", { className: "list-none m-0 px-0", children: t.responses.map((f) => {
|
|
4958
|
-
var
|
|
4944
|
+
var u, y;
|
|
4959
4945
|
return /* @__PURE__ */ g.jsx(
|
|
4960
4946
|
ia,
|
|
4961
4947
|
{
|
|
@@ -4963,7 +4949,7 @@ const js = ({
|
|
|
4963
4949
|
children: /* @__PURE__ */ g.jsx(
|
|
4964
4950
|
Ge,
|
|
4965
4951
|
{
|
|
4966
|
-
schema: (y = (
|
|
4952
|
+
schema: (y = (u = f.content) == null ? void 0 : u.find((x) => x.schema)) == null ? void 0 : y.schema
|
|
4967
4953
|
}
|
|
4968
4954
|
)
|
|
4969
4955
|
},
|
|
@@ -5078,9 +5064,9 @@ const Xs = nt(
|
|
|
5078
5064
|
}
|
|
5079
5065
|
`
|
|
5080
5066
|
), wl = () => {
|
|
5081
|
-
const { input: e, type: n, versions: t, version: o } =
|
|
5067
|
+
const { input: e, type: n, versions: t, version: o } = $r(), s = jr(Zs, { input: e, type: n }), { selectedServer: l } = br(), r = vr(s), a = r.data.schema.title, i = r.data.schema.summary, c = r.data.schema.description, p = No();
|
|
5082
5068
|
Po();
|
|
5083
|
-
const f = i || (
|
|
5069
|
+
const f = i || (c ? Ys(c) : void 0);
|
|
5084
5070
|
return /* @__PURE__ */ g.jsxs("div", { className: "pt-[--padding-content-top]", children: [
|
|
5085
5071
|
/* @__PURE__ */ g.jsxs(Ro, { children: [
|
|
5086
5072
|
/* @__PURE__ */ g.jsx("title", { children: a }),
|
|
@@ -5093,17 +5079,17 @@ const Xs = nt(
|
|
|
5093
5079
|
children: [
|
|
5094
5080
|
/* @__PURE__ */ g.jsxs("div", { className: "flex", children: [
|
|
5095
5081
|
/* @__PURE__ */ g.jsxs("div", { className: "flex-1", children: [
|
|
5096
|
-
/* @__PURE__ */ g.jsx(
|
|
5082
|
+
/* @__PURE__ */ g.jsx(Fr, { children: "Overview" }),
|
|
5097
5083
|
/* @__PURE__ */ g.jsx(Be, { level: 1, id: "description", registerSidebarAnchor: !0, children: a })
|
|
5098
5084
|
] }),
|
|
5099
5085
|
/* @__PURE__ */ g.jsx("div", { children: Object.entries(t).length > 1 && /* @__PURE__ */ g.jsxs(
|
|
5100
5086
|
ko,
|
|
5101
5087
|
{
|
|
5102
|
-
onValueChange: (
|
|
5088
|
+
onValueChange: (u) => p(t[u]),
|
|
5103
5089
|
defaultValue: o,
|
|
5104
5090
|
children: [
|
|
5105
5091
|
/* @__PURE__ */ g.jsx(Eo, { className: "w-[180px]", children: /* @__PURE__ */ g.jsx(Ao, { placeholder: "Select version" }) }),
|
|
5106
|
-
/* @__PURE__ */ g.jsx(Io, { children: Object.entries(t).map(([
|
|
5092
|
+
/* @__PURE__ */ g.jsx(Io, { children: Object.entries(t).map(([u]) => /* @__PURE__ */ g.jsx(Lo, { value: u, children: u }, u)) })
|
|
5107
5093
|
]
|
|
5108
5094
|
}
|
|
5109
5095
|
) })
|
|
@@ -5114,26 +5100,26 @@ const Xs = nt(
|
|
|
5114
5100
|
),
|
|
5115
5101
|
/* @__PURE__ */ g.jsx("hr", {}),
|
|
5116
5102
|
/* @__PURE__ */ g.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ g.jsx(va, {}) }),
|
|
5117
|
-
r.data.schema.tags.filter((
|
|
5103
|
+
r.data.schema.tags.filter((u) => u.operations.length > 0).map((u) => (
|
|
5118
5104
|
// px, -mx is so that `content-visibility` doesn't cut off overflown heading anchor links '#'
|
|
5119
5105
|
/* @__PURE__ */ g.jsxs("div", { className: "px-6 -mx-6 [content-visibility:auto]", children: [
|
|
5120
|
-
|
|
5121
|
-
|
|
5106
|
+
u.name && /* @__PURE__ */ g.jsx(Fr, { children: u.name }),
|
|
5107
|
+
u.description && /* @__PURE__ */ g.jsx(
|
|
5122
5108
|
Se,
|
|
5123
5109
|
{
|
|
5124
5110
|
className: `${qe} max-w-full prose-img:max-w-prose w-full mt-2 mb-12`,
|
|
5125
|
-
content:
|
|
5111
|
+
content: u.description
|
|
5126
5112
|
}
|
|
5127
5113
|
),
|
|
5128
|
-
/* @__PURE__ */ g.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ g.jsx(sa, { children:
|
|
5114
|
+
/* @__PURE__ */ g.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ g.jsx(sa, { children: u.operations.map((y) => /* @__PURE__ */ g.jsx(
|
|
5129
5115
|
Ks,
|
|
5130
5116
|
{
|
|
5131
|
-
serverUrl:
|
|
5117
|
+
serverUrl: l ?? r.data.schema.url,
|
|
5132
5118
|
operationFragment: y
|
|
5133
5119
|
},
|
|
5134
5120
|
y.slug
|
|
5135
5121
|
)) }) })
|
|
5136
|
-
] },
|
|
5122
|
+
] }, u.name)
|
|
5137
5123
|
))
|
|
5138
5124
|
] });
|
|
5139
5125
|
};
|
|
@@ -5141,4 +5127,4 @@ export {
|
|
|
5141
5127
|
wl as OperationList,
|
|
5142
5128
|
Xs as OperationsFragment
|
|
5143
5129
|
};
|
|
5144
|
-
//# sourceMappingURL=OperationList-
|
|
5130
|
+
//# sourceMappingURL=OperationList-x4iASvL1.js.map
|