apiuikit 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CodeSamples-bu8KSzOn.js → CodeSamples-BxUKzCvO.js} +771 -753
- package/dist/{CodeSamples-C5Tl3k83.cjs → CodeSamples-C9DFITYX.cjs} +31 -31
- package/dist/{LogoExtension-CZJpJnyk.js → LogoExtension-DZ4kFXRU.js} +1 -1
- package/dist/{LogoExtension-BVOE2HZc.cjs → LogoExtension-z_uLvzXh.cjs} +1 -1
- package/dist/apiuikit.cjs.js +1 -1
- package/dist/apiuikit.es.js +44 -39
- package/dist/components/ItemCard.d.ts +16 -0
- package/dist/containers/AsyncAPI/AsyncAPI.d.ts +15 -12
- package/dist/containers/AsyncAPI/AsyncAPIRenderer.d.ts +18 -12
- package/dist/containers/Messages/MessageCard.d.ts +15 -0
- package/dist/containers/OpenAPI/OpenAPI.d.ts +16 -12
- package/dist/containers/OpenAPI/OpenAPIRenderer.d.ts +18 -12
- package/dist/containers/Operation/OperationCard.d.ts +13 -0
- package/dist/containers/Operation/OperationHeader.d.ts +18 -0
- package/dist/containers/Path/Endpoint.d.ts +23 -0
- package/dist/containers/Path/EndpointHeader.d.ts +21 -0
- package/dist/containers/Schema/SchemaCard.d.ts +18 -0
- package/dist/helpers/findItem.d.ts +21 -0
- package/dist/helpers/openapiParameters.d.ts +5 -0
- package/dist/{index-CbVUi36m.js → index-B3fyC_vS.js} +1 -1
- package/dist/{index-DkjcpZQZ.js → index-BGwEEF4U.js} +4173 -3907
- package/dist/{index-Ccaf5SNM.js → index-CfMaEll2.js} +1 -1
- package/dist/{index-DKcgVKzx.cjs → index-DI1pJDDr.cjs} +1 -1
- package/dist/{index-29FyeXas.cjs → index-Db1Uh19l.cjs} +1 -1
- package/dist/{index-C2tdEw22.cjs → index-DhjNPCD8.cjs} +77 -77
- package/dist/index.d.ts +6 -6
- package/dist/{protoToJsonSchema-CQwj_Ytd.cjs → protoToJsonSchema-BCcfO1xm.cjs} +1 -1
- package/dist/{protoToJsonSchema-BvNrF6Ce.js → protoToJsonSchema-DSskBSDK.js} +1 -1
- package/dist/{protobufSchemaParser-DO1jnL81.cjs → protobufSchemaParser-Brl5Ve-k.cjs} +1 -1
- package/dist/{protobufSchemaParser-hOIbQrct.js → protobufSchemaParser-Cz0UkK1s.js} +2 -2
- package/dist/public/createSectionRoot.d.ts +2 -1
- package/dist/public/openapiSections.d.ts +95 -10
- package/dist/public/schemasSection.d.ts +42 -8
- package/dist/public/sections.d.ts +79 -11
- package/dist/public/useNotFoundWarning.d.ts +7 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { g as
|
|
4
|
-
function
|
|
1
|
+
import { jsxs as ar, jsx as Ne } from "react/jsx-runtime";
|
|
2
|
+
import { useId as _n, useMemo as Ve, useState as gt, useEffect as sr } from "react";
|
|
3
|
+
import { g as Ln, c as nt, a as In, u as Un, b as cr, e as Fn, o as Mn, C as Hn, h as Bn } from "./index-BGwEEF4U.js";
|
|
4
|
+
function Zr(t, e = /* @__PURE__ */ new Set()) {
|
|
5
5
|
if (e.has(t)) return t;
|
|
6
6
|
if (t.type === "object" && t.properties && typeof t.properties == "object") {
|
|
7
7
|
e.add(t);
|
|
@@ -9,7 +9,7 @@ function Kr(t, e = /* @__PURE__ */ new Set()) {
|
|
|
9
9
|
const r = {};
|
|
10
10
|
for (const [n, s] of Object.entries(t.properties)) {
|
|
11
11
|
const o = /id$/i.test(n) && s.type === "string" && !s.format && !s.examples, a = s.type === "string" && !s.format && !s.examples && !s.enum;
|
|
12
|
-
r[n] = o ? { ...s, format: "uuid" } : a ? { ...s, examples: ["string"] } :
|
|
12
|
+
r[n] = o ? { ...s, format: "uuid" } : a ? { ...s, examples: ["string"] } : Zr(s, e);
|
|
13
13
|
}
|
|
14
14
|
return { ...t, properties: r };
|
|
15
15
|
} finally {
|
|
@@ -18,10 +18,10 @@ function Kr(t, e = /* @__PURE__ */ new Set()) {
|
|
|
18
18
|
}
|
|
19
19
|
return t;
|
|
20
20
|
}
|
|
21
|
-
async function
|
|
21
|
+
async function Wn(t) {
|
|
22
22
|
try {
|
|
23
23
|
const { generate: e } = await import("./index-1SEMQuYi.js");
|
|
24
|
-
return await e(
|
|
24
|
+
return await e(Zr(t), {
|
|
25
25
|
seed: 42,
|
|
26
26
|
useExamplesValue: !0,
|
|
27
27
|
optionalsProbability: 1
|
|
@@ -30,7 +30,7 @@ async function Un(t) {
|
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
const
|
|
33
|
+
const lr = "", fr = `
|
|
34
34
|
`;
|
|
35
35
|
var j = class {
|
|
36
36
|
/**
|
|
@@ -38,7 +38,7 @@ var j = class {
|
|
|
38
38
|
* Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
|
|
39
39
|
*/
|
|
40
40
|
constructor({ indent: t, join: e } = {}) {
|
|
41
|
-
this.postProcessors = [], this.code = [], this.indentationCharacter =
|
|
41
|
+
this.postProcessors = [], this.code = [], this.indentationCharacter = lr, this.lineJoin = fr, this.indentLine = (r, n = 0) => `${this.indentationCharacter.repeat(n)}${r}`, this.unshift = (r, n) => {
|
|
42
42
|
const s = this.indentLine(r, n);
|
|
43
43
|
this.code.unshift(s);
|
|
44
44
|
}, this.push = (r, n) => {
|
|
@@ -55,18 +55,18 @@ var j = class {
|
|
|
55
55
|
return this.postProcessors.reduce((n, s) => s(n), r);
|
|
56
56
|
}, this.addPostProcessor = (r) => {
|
|
57
57
|
this.postProcessors = [...this.postProcessors, r];
|
|
58
|
-
}, this.indentationCharacter = t ||
|
|
58
|
+
}, this.indentationCharacter = t || lr, this.lineJoin = e ?? fr;
|
|
59
59
|
}
|
|
60
|
-
},
|
|
60
|
+
}, Jn = function(t) {
|
|
61
61
|
return Object.prototype.toString.call(t) === "[object RegExp]";
|
|
62
|
-
},
|
|
62
|
+
}, Gn = function(t) {
|
|
63
63
|
var e = typeof t;
|
|
64
64
|
return t !== null && (e === "object" || e === "function");
|
|
65
|
-
},
|
|
66
|
-
Object.defineProperty(
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
var
|
|
65
|
+
}, Xt = {};
|
|
66
|
+
Object.defineProperty(Xt, "__esModule", { value: !0 });
|
|
67
|
+
Xt.default = (t) => Object.getOwnPropertySymbols(t).filter((e) => Object.prototype.propertyIsEnumerable.call(t, e));
|
|
68
|
+
const zn = Jn, Vn = Gn, Kn = Xt.default;
|
|
69
|
+
var Dn = (t, e, r) => {
|
|
70
70
|
const n = [];
|
|
71
71
|
return (function s(o, a, i) {
|
|
72
72
|
a = a || {}, a.indent = a.indent || " ", i = i || "";
|
|
@@ -93,7 +93,7 @@ var Jn = (t, e, r) => {
|
|
|
93
93
|
};
|
|
94
94
|
if (n.indexOf(o) !== -1)
|
|
95
95
|
return '"[Circular]"';
|
|
96
|
-
if (o == null || typeof o == "number" || typeof o == "boolean" || typeof o == "function" || typeof o == "symbol" ||
|
|
96
|
+
if (o == null || typeof o == "number" || typeof o == "boolean" || typeof o == "function" || typeof o == "symbol" || zn(o))
|
|
97
97
|
return String(o);
|
|
98
98
|
if (o instanceof Date)
|
|
99
99
|
return `new Date('${o.toISOString()}')`;
|
|
@@ -101,22 +101,22 @@ var Jn = (t, e, r) => {
|
|
|
101
101
|
if (o.length === 0)
|
|
102
102
|
return "[]";
|
|
103
103
|
n.push(o);
|
|
104
|
-
const f = "[" + c.newLine + o.map((u,
|
|
105
|
-
const
|
|
104
|
+
const f = "[" + c.newLine + o.map((u, p) => {
|
|
105
|
+
const d = o.length - 1 === p ? c.newLine : "," + c.newLineOrSpace;
|
|
106
106
|
let h = s(u, a, i + a.indent);
|
|
107
|
-
return a.transform && (h = a.transform(o,
|
|
107
|
+
return a.transform && (h = a.transform(o, p, h)), c.indent + h + d;
|
|
108
108
|
}).join("") + c.pad + "]";
|
|
109
109
|
return n.pop(), l(f);
|
|
110
110
|
}
|
|
111
|
-
if (
|
|
112
|
-
let f = Object.keys(o).concat(
|
|
113
|
-
if (a.filter && (f = f.filter((
|
|
111
|
+
if (Vn(o)) {
|
|
112
|
+
let f = Object.keys(o).concat(Kn(o));
|
|
113
|
+
if (a.filter && (f = f.filter((p) => a.filter(o, p))), f.length === 0)
|
|
114
114
|
return "{}";
|
|
115
115
|
n.push(o);
|
|
116
|
-
const u = "{" + c.newLine + f.map((
|
|
117
|
-
const h = f.length - 1 ===
|
|
118
|
-
let m = s(o[
|
|
119
|
-
return a.transform && (m = a.transform(o,
|
|
116
|
+
const u = "{" + c.newLine + f.map((p, d) => {
|
|
117
|
+
const h = f.length - 1 === d ? c.newLine : "," + c.newLineOrSpace, y = typeof p == "symbol", g = !y && /^[a-z$_][a-z$_0-9]*$/i.test(p), b = y || g ? p : s(p, a);
|
|
118
|
+
let m = s(o[p], a, i + a.indent);
|
|
119
|
+
return a.transform && (m = a.transform(o, p, m)), c.indent + String(b) + ": " + m + h;
|
|
120
120
|
}).join("") + c.pad + "}";
|
|
121
121
|
return n.pop(), l(u);
|
|
122
122
|
}
|
|
@@ -124,17 +124,17 @@ var Jn = (t, e, r) => {
|
|
|
124
124
|
` ? "\\n" : "\\r"), a.singleQuotes === !1 ? (o = o.replace(/"/g, '\\"'), `"${o}"`) : (o = o.replace(/\\?'/g, "\\'"), `'${o}'`);
|
|
125
125
|
})(t, e, r);
|
|
126
126
|
};
|
|
127
|
-
const ie = /* @__PURE__ */
|
|
127
|
+
const ie = /* @__PURE__ */ Ln(Dn), B = (t, e) => Object.keys(t).find((r) => r.toLowerCase() === e.toLowerCase()), ce = (t, e) => {
|
|
128
128
|
const r = B(t, e);
|
|
129
129
|
if (r)
|
|
130
130
|
return t[r];
|
|
131
|
-
}, ot = (t, e) => !!B(t, e),
|
|
131
|
+
}, ot = (t, e) => !!B(t, e), Qn = (t) => [
|
|
132
132
|
"application/json",
|
|
133
133
|
"application/x-json",
|
|
134
134
|
"text/json",
|
|
135
135
|
"text/x-json",
|
|
136
136
|
"+json"
|
|
137
|
-
].some((e) => t.indexOf(e) > -1),
|
|
137
|
+
].some((e) => t.indexOf(e) > -1), Yn = {
|
|
138
138
|
info: {
|
|
139
139
|
key: "agent",
|
|
140
140
|
title: "Agent",
|
|
@@ -168,7 +168,7 @@ function He(t, e = {}) {
|
|
|
168
168
|
return [...t.toString()].map((o) => o === "\b" ? `${n}b` : o === " " ? `${n}t` : o === `
|
|
169
169
|
` ? s ? `${n}n` : o : o === "\f" ? `${n}f` : o === "\r" ? s ? `${n}r` : o : o === n ? n + n : o === r ? n + r : o < " " || o > "~" ? JSON.stringify(o).slice(1, -1) : o).join("");
|
|
170
170
|
}
|
|
171
|
-
const Ce = (t) => He(t, { delimiter: "'" }), L = (t) => He(t, { delimiter: '"' }),
|
|
171
|
+
const Ce = (t) => He(t, { delimiter: "'" }), L = (t) => He(t, { delimiter: '"' }), Xn = {
|
|
172
172
|
info: {
|
|
173
173
|
key: "c",
|
|
174
174
|
title: "C",
|
|
@@ -193,23 +193,23 @@ const Ce = (t) => He(t, { delimiter: "'" }), L = (t) => He(t, { delimiter: '"' }
|
|
|
193
193
|
}
|
|
194
194
|
} }
|
|
195
195
|
};
|
|
196
|
-
var
|
|
196
|
+
var ur = class {
|
|
197
197
|
constructor(t) {
|
|
198
198
|
this.name = "", this.toString = () => `:${this.name}`, this.name = t;
|
|
199
199
|
}
|
|
200
|
-
},
|
|
200
|
+
}, Zn = class {
|
|
201
201
|
constructor(t) {
|
|
202
202
|
this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = t;
|
|
203
203
|
}
|
|
204
204
|
};
|
|
205
|
-
const
|
|
205
|
+
const en = (t) => t === void 0 ? null : t === null ? "null" : t.constructor.name.toLowerCase(), tn = (t) => t === void 0 ? !0 : en(t) === "object" ? Object.keys(t).length === 0 : !1, pr = (t) => (Object.keys(t).filter((e) => tn(t[e])).forEach((e) => {
|
|
206
206
|
delete t[e];
|
|
207
207
|
}), t), Ye = (t, e) => {
|
|
208
208
|
const r = " ".repeat(t);
|
|
209
209
|
return e.replace(/\n/g, `
|
|
210
210
|
${r}`);
|
|
211
|
-
},
|
|
212
|
-
switch (
|
|
211
|
+
}, Mt = (t) => {
|
|
212
|
+
switch (en(t)) {
|
|
213
213
|
case "string":
|
|
214
214
|
return `"${t.replace(/"/g, '\\"')}"`;
|
|
215
215
|
case "file":
|
|
@@ -221,18 +221,18 @@ ${r}`);
|
|
|
221
221
|
case "regexp":
|
|
222
222
|
return `#"${t.source}"`;
|
|
223
223
|
case "object": {
|
|
224
|
-
const e = Object.keys(t).reduce((r, n) => `${r}:${n} ${Ye(n.length + 2,
|
|
224
|
+
const e = Object.keys(t).reduce((r, n) => `${r}:${n} ${Ye(n.length + 2, Mt(t[n]))}
|
|
225
225
|
`, "").trim();
|
|
226
226
|
return `{${Ye(1, e)}}`;
|
|
227
227
|
}
|
|
228
228
|
case "array": {
|
|
229
|
-
const e = t.reduce((r, n) => `${r} ${
|
|
229
|
+
const e = t.reduce((r, n) => `${r} ${Mt(n)}`, "").trim();
|
|
230
230
|
return `[${Ye(1, e)}]`;
|
|
231
231
|
}
|
|
232
232
|
default:
|
|
233
233
|
return t.toString();
|
|
234
234
|
}
|
|
235
|
-
},
|
|
235
|
+
}, eo = {
|
|
236
236
|
info: {
|
|
237
237
|
key: "clojure",
|
|
238
238
|
title: "Clojure",
|
|
@@ -265,7 +265,7 @@ ${r}`);
|
|
|
265
265
|
switch (r.mimeType) {
|
|
266
266
|
case "application/json":
|
|
267
267
|
{
|
|
268
|
-
l["content-type"] = new
|
|
268
|
+
l["content-type"] = new ur("json"), l["form-params"] = r.jsonObj;
|
|
269
269
|
const f = B(l.headers, "content-type");
|
|
270
270
|
f && delete l.headers[f];
|
|
271
271
|
}
|
|
@@ -288,7 +288,7 @@ ${r}`);
|
|
|
288
288
|
if (r.params) {
|
|
289
289
|
l.multipart = r.params.map((u) => u.fileName && !u.value ? {
|
|
290
290
|
name: u.name,
|
|
291
|
-
content: new
|
|
291
|
+
content: new Zn(u.fileName)
|
|
292
292
|
} : {
|
|
293
293
|
name: u.name,
|
|
294
294
|
content: u.value
|
|
@@ -301,22 +301,22 @@ ${r}`);
|
|
|
301
301
|
switch (ce(l.headers, "accept")) {
|
|
302
302
|
case "application/json":
|
|
303
303
|
{
|
|
304
|
-
l.accept = new
|
|
304
|
+
l.accept = new ur("json");
|
|
305
305
|
const f = B(l.headers, "accept");
|
|
306
306
|
f && delete l.headers[f];
|
|
307
307
|
}
|
|
308
308
|
break;
|
|
309
309
|
}
|
|
310
310
|
if (a(`(require '[clj-http.client :as client])
|
|
311
|
-
`),
|
|
311
|
+
`), tn(pr(l))) a(`(client/${e} "${n}")`);
|
|
312
312
|
else {
|
|
313
|
-
const f = 11 + e.length + n.length, u = Ye(f,
|
|
313
|
+
const f = 11 + e.length + n.length, u = Ye(f, Mt(pr(l)));
|
|
314
314
|
a(`(client/${e} "${n}" ${u})`);
|
|
315
315
|
}
|
|
316
316
|
return i();
|
|
317
317
|
}
|
|
318
318
|
} }
|
|
319
|
-
},
|
|
319
|
+
}, to = {
|
|
320
320
|
info: {
|
|
321
321
|
key: "crystal",
|
|
322
322
|
title: "Crystal",
|
|
@@ -345,11 +345,11 @@ ${r}`);
|
|
|
345
345
|
"PATCH",
|
|
346
346
|
"PUT",
|
|
347
347
|
"OPTIONS"
|
|
348
|
-
],
|
|
349
|
-
return u.includes(f) ? a(`response = HTTP::Client.${f.toLowerCase()} url${
|
|
348
|
+
], p = l.length ? ", headers: headers" : "", d = r.text ? ", body: reqBody" : "", h = o ? ", tls: OpenSSL::SSL::Context::Client.insecure" : "";
|
|
349
|
+
return u.includes(f) ? a(`response = HTTP::Client.${f.toLowerCase()} url${p}${d}${h}`) : a(`response = HTTP::Client.exec "${f}", url${p}${d}${h}`), a("puts response.body"), c();
|
|
350
350
|
}
|
|
351
351
|
} }
|
|
352
|
-
},
|
|
352
|
+
}, ro = (t) => {
|
|
353
353
|
let e = ce(t, "accept-encoding");
|
|
354
354
|
if (!e) return [];
|
|
355
355
|
const r = {
|
|
@@ -365,7 +365,7 @@ ${r}`);
|
|
|
365
365
|
}
|
|
366
366
|
});
|
|
367
367
|
}), n;
|
|
368
|
-
},
|
|
368
|
+
}, no = {
|
|
369
369
|
info: {
|
|
370
370
|
key: "httpclient",
|
|
371
371
|
title: "HttpClient",
|
|
@@ -374,14 +374,14 @@ ${r}`);
|
|
|
374
374
|
extname: ".cs"
|
|
375
375
|
},
|
|
376
376
|
convert: ({ allHeaders: t, postData: e, method: r, fullUrl: n }, s) => {
|
|
377
|
-
var
|
|
377
|
+
var p, d;
|
|
378
378
|
const { push: o, join: a } = new j({ indent: {
|
|
379
379
|
indent: " ",
|
|
380
380
|
...s
|
|
381
381
|
}.indent });
|
|
382
382
|
o("using System.Net.Http.Headers;");
|
|
383
383
|
let i = "";
|
|
384
|
-
const c = !!t.cookie, l =
|
|
384
|
+
const c = !!t.cookie, l = ro(t);
|
|
385
385
|
(c || l.length) && (i = "clientHandler", o("var clientHandler = new HttpClientHandler"), o("{"), c && o("UseCookies = false,", 1), l.length && o(`AutomaticDecompression = ${l.join(" | ")},`, 1), o("};")), o(`var client = new HttpClient(${i});`), o("var request = new HttpRequestMessage"), o("{");
|
|
386
386
|
const f = [
|
|
387
387
|
"GET",
|
|
@@ -410,12 +410,12 @@ ${r}`);
|
|
|
410
410
|
const h = e.mimeType;
|
|
411
411
|
switch (h) {
|
|
412
412
|
case "application/x-www-form-urlencoded":
|
|
413
|
-
o("Content = new FormUrlEncodedContent(new Dictionary<string, string>", 1), o("{", 1), (
|
|
413
|
+
o("Content = new FormUrlEncodedContent(new Dictionary<string, string>", 1), o("{", 1), (p = e.params) == null || p.forEach((y) => {
|
|
414
414
|
o(`{ "${y.name}", "${y.value}" },`, 2);
|
|
415
415
|
}), o("}),", 1);
|
|
416
416
|
break;
|
|
417
417
|
case "multipart/form-data":
|
|
418
|
-
o("Content = new MultipartFormDataContent", 1), o("{", 1), (
|
|
418
|
+
o("Content = new MultipartFormDataContent", 1), o("{", 1), (d = e.params) == null || d.forEach((y) => {
|
|
419
419
|
o(`new StringContent(${JSON.stringify(y.value || "")})`, 2), o("{", 2), o("Headers =", 3), o("{", 3), y.contentType && o(`ContentType = new MediaTypeHeaderValue("${y.contentType}"),`, 4), o('ContentDisposition = new ContentDispositionHeaderValue("form-data")', 4), o("{", 4), o(`Name = "${y.name}",`, 5), y.fileName && o(`FileName = "${y.fileName}",`, 5), o("}", 4), o("}", 3), o("},", 2);
|
|
420
420
|
}), o("},", 1);
|
|
421
421
|
break;
|
|
@@ -427,10 +427,10 @@ ${r}`);
|
|
|
427
427
|
return o("};"), o("using (var response = await client.SendAsync(request))"), o("{"), o("response.EnsureSuccessStatusCode();", 1), o("var body = await response.Content.ReadAsStringAsync();", 1), o("Console.WriteLine(body);", 1), o("}"), a();
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
|
-
function
|
|
430
|
+
function oo(t) {
|
|
431
431
|
return t[0].toUpperCase() + t.slice(1).toLowerCase();
|
|
432
432
|
}
|
|
433
|
-
const
|
|
433
|
+
const io = {
|
|
434
434
|
info: {
|
|
435
435
|
key: "csharp",
|
|
436
436
|
title: "C#",
|
|
@@ -438,7 +438,7 @@ const eo = {
|
|
|
438
438
|
cli: "dotnet"
|
|
439
439
|
},
|
|
440
440
|
clientsById: {
|
|
441
|
-
httpclient:
|
|
441
|
+
httpclient: no,
|
|
442
442
|
restsharp: {
|
|
443
443
|
info: {
|
|
444
444
|
key: "restsharp",
|
|
@@ -492,13 +492,13 @@ const eo = {
|
|
|
492
492
|
if (!s.text) break;
|
|
493
493
|
a(`request.AddStringBody("${s.text}", "${s.mimeType}");`);
|
|
494
494
|
}
|
|
495
|
-
return a(`var response = await client.${
|
|
495
|
+
return a(`var response = await client.${oo(t)}Async(request);
|
|
496
496
|
`), a(`Console.WriteLine("{0}", response.Content);
|
|
497
497
|
`), i();
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
},
|
|
501
|
+
}, ao = {
|
|
502
502
|
info: {
|
|
503
503
|
key: "go",
|
|
504
504
|
title: "Go",
|
|
@@ -514,18 +514,18 @@ const eo = {
|
|
|
514
514
|
extname: ".go"
|
|
515
515
|
},
|
|
516
516
|
convert: ({ postData: t, method: e, allHeaders: r, fullUrl: n }, s = {}) => {
|
|
517
|
-
const { blank: o, push: a, join: i } = new j({ indent: " " }), { showBoilerplate: c = !0, checkErrors: l = !1, printBody: f = !0, timeout: u = -1, insecureSkipVerify:
|
|
517
|
+
const { blank: o, push: a, join: i } = new j({ indent: " " }), { showBoilerplate: c = !0, checkErrors: l = !1, printBody: f = !0, timeout: u = -1, insecureSkipVerify: p = !1 } = s, d = l ? "err" : "_", h = c ? 1 : 0, y = () => {
|
|
518
518
|
l && (a("if err != nil {", h), a("panic(err)", h + 1), a("}", h));
|
|
519
519
|
};
|
|
520
|
-
c && (a("package main"), o(), a("import ("), a('"fmt"', h), u > 0 && a('"time"', h),
|
|
521
|
-
const g = u > 0, b = g ||
|
|
522
|
-
return b && (a("client := http.Client{", h), g && a(`Timeout: time.Duration(${u} * time.Second),`, h + 1),
|
|
520
|
+
c && (a("package main"), o(), a("import ("), a('"fmt"', h), u > 0 && a('"time"', h), p && a('"crypto/tls"', h), t.text && a('"strings"', h), a('"net/http"', h), f && a('"io"', h), a(")"), o(), a("func main() {"), o()), p && (a("insecureTransport := http.DefaultTransport.(*http.Transport).Clone()", h), a("insecureTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}", h));
|
|
521
|
+
const g = u > 0, b = g || p, m = b ? "client" : "http.DefaultClient";
|
|
522
|
+
return b && (a("client := http.Client{", h), g && a(`Timeout: time.Duration(${u} * time.Second),`, h + 1), p && a("Transport: insecureTransport,", h + 1), a("}", h), o()), a(`url := "${n}"`, h), o(), t.text ? (a(`payload := strings.NewReader(${JSON.stringify(t.text)})`, h), o(), a(`req, ${d} := http.NewRequest("${e}", url, payload)`, h), o()) : (a(`req, ${d} := http.NewRequest("${e}", url, nil)`, h), o()), y(), Object.keys(r).length && (Object.keys(r).forEach((v) => {
|
|
523
523
|
a(`req.Header.Add("${v}", "${L(r[v])}")`, h);
|
|
524
|
-
}), o()), a(`res, ${
|
|
524
|
+
}), o()), a(`res, ${d} := ${m}.Do(req)`, h), y(), f && (o(), a("defer res.Body.Close()", h), a(`body, ${d} := io.ReadAll(res.Body)`, h), y()), o(), f && a("fmt.Println(string(body))", h), c && (o(), a("}")), i();
|
|
525
525
|
}
|
|
526
526
|
} }
|
|
527
|
-
},
|
|
528
|
-
`,
|
|
527
|
+
}, dr = `\r
|
|
528
|
+
`, so = {
|
|
529
529
|
info: {
|
|
530
530
|
key: "http",
|
|
531
531
|
title: "HTTP",
|
|
@@ -547,7 +547,7 @@ const eo = {
|
|
|
547
547
|
...a
|
|
548
548
|
}, { blank: c, push: l, join: f } = new j({
|
|
549
549
|
indent: "",
|
|
550
|
-
join:
|
|
550
|
+
join: dr
|
|
551
551
|
});
|
|
552
552
|
l(`${t} ${i.absoluteURI ? e : r.path} ${n}`);
|
|
553
553
|
const u = Object.keys(s);
|
|
@@ -555,11 +555,11 @@ const eo = {
|
|
|
555
555
|
const y = h.toLowerCase().replace(/(^|-)(\w)/g, (g) => g.toUpperCase());
|
|
556
556
|
l(`${y}: ${s[h]}`);
|
|
557
557
|
}), i.autoHost && !u.includes("host") && l(`Host: ${r.host}`), i.autoContentLength && o.text && !u.includes("content-length") && l(`Content-Length: ${Buffer.byteLength(o.text, "ascii").toString()}`), c();
|
|
558
|
-
const
|
|
559
|
-
return `${
|
|
558
|
+
const p = f(), d = o.text || "";
|
|
559
|
+
return `${p}${dr}${d}`;
|
|
560
560
|
}
|
|
561
561
|
} }
|
|
562
|
-
},
|
|
562
|
+
}, co = {
|
|
563
563
|
info: {
|
|
564
564
|
key: "java",
|
|
565
565
|
title: "Java",
|
|
@@ -659,7 +659,7 @@ const eo = {
|
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
},
|
|
662
|
+
}, lo = {
|
|
663
663
|
info: {
|
|
664
664
|
key: "javascript",
|
|
665
665
|
title: "JavaScript",
|
|
@@ -781,12 +781,12 @@ const eo = {
|
|
|
781
781
|
return l.headers && !Object.keys(l.headers).length && delete l.headers, c(`const options = ${ie(l, {
|
|
782
782
|
indent: o.indent,
|
|
783
783
|
inlineCharacterLimit: 80,
|
|
784
|
-
transform: (f, u,
|
|
784
|
+
transform: (f, u, p) => {
|
|
785
785
|
if (u === "body") {
|
|
786
|
-
if (r.mimeType === "application/x-www-form-urlencoded") return `new URLSearchParams(${
|
|
787
|
-
if (r.mimeType === "application/json") return `JSON.stringify(${
|
|
786
|
+
if (r.mimeType === "application/x-www-form-urlencoded") return `new URLSearchParams(${p})`;
|
|
787
|
+
if (r.mimeType === "application/json") return `JSON.stringify(${p})`;
|
|
788
788
|
}
|
|
789
|
-
return
|
|
789
|
+
return p;
|
|
790
790
|
}
|
|
791
791
|
})};`), a(), r.params && r.mimeType === "multipart/form-data" && (c("options.body = form;"), a()), c(`fetch('${n}', options)`), c(".then(res => res.json())", 1), c(".then(res => console.log(res))", 1), c(".catch(err => console.error(err));", 1), i();
|
|
792
792
|
}
|
|
@@ -835,7 +835,7 @@ const eo = {
|
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
|
-
},
|
|
838
|
+
}, fo = {
|
|
839
839
|
info: {
|
|
840
840
|
key: "json",
|
|
841
841
|
title: "JSON",
|
|
@@ -876,7 +876,7 @@ const eo = {
|
|
|
876
876
|
return typeof n > "u" || n === "" ? "No JSON body" : JSON.stringify(n, null, r.indent);
|
|
877
877
|
}
|
|
878
878
|
} }
|
|
879
|
-
},
|
|
879
|
+
}, uo = {
|
|
880
880
|
info: {
|
|
881
881
|
key: "kotlin",
|
|
882
882
|
title: "Kotlin",
|
|
@@ -912,7 +912,7 @@ const eo = {
|
|
|
912
912
|
}), i(".build()", 1), o(), i("val response = client.newCall(request).execute()"), a();
|
|
913
913
|
}
|
|
914
914
|
} }
|
|
915
|
-
},
|
|
915
|
+
}, po = {
|
|
916
916
|
info: {
|
|
917
917
|
key: "node",
|
|
918
918
|
title: "Node.js",
|
|
@@ -1008,15 +1008,15 @@ const eo = {
|
|
|
1008
1008
|
...o
|
|
1009
1009
|
};
|
|
1010
1010
|
let i = !1;
|
|
1011
|
-
const { blank: c, push: l, join: f, unshift: u } = new j({ indent: a.indent }),
|
|
1012
|
-
switch (Object.keys(n).length && (
|
|
1011
|
+
const { blank: c, push: l, join: f, unshift: u } = new j({ indent: a.indent }), p = e, d = { method: t };
|
|
1012
|
+
switch (Object.keys(n).length && (d.headers = n), r.mimeType) {
|
|
1013
1013
|
case "application/x-www-form-urlencoded":
|
|
1014
1014
|
l("const encodedParams = new URLSearchParams();"), (h = r.params) == null || h.forEach((y) => {
|
|
1015
1015
|
l(`encodedParams.set('${y.name}', '${y.value}');`);
|
|
1016
|
-
}),
|
|
1016
|
+
}), d.body = "encodedParams", c();
|
|
1017
1017
|
break;
|
|
1018
1018
|
case "application/json":
|
|
1019
|
-
r.jsonObj && (
|
|
1019
|
+
r.jsonObj && (d.body = r.jsonObj);
|
|
1020
1020
|
break;
|
|
1021
1021
|
case "multipart/form-data": {
|
|
1022
1022
|
if (!r.params) break;
|
|
@@ -1027,17 +1027,17 @@ const eo = {
|
|
|
1027
1027
|
return;
|
|
1028
1028
|
}
|
|
1029
1029
|
g.fileName && (i = !0, l(`formData.append('${g.name}', await new Response(fs.createReadStream('${g.fileName}')).blob());`));
|
|
1030
|
-
}),
|
|
1030
|
+
}), d.body = "formData", c();
|
|
1031
1031
|
break;
|
|
1032
1032
|
}
|
|
1033
1033
|
default:
|
|
1034
|
-
r.text && (
|
|
1034
|
+
r.text && (d.body = r.text);
|
|
1035
1035
|
}
|
|
1036
1036
|
if (s.length) {
|
|
1037
1037
|
const y = s.map(({ name: g, value: b }) => `${encodeURIComponent(g)}=${encodeURIComponent(b)}`).join("; ");
|
|
1038
|
-
|
|
1038
|
+
d.headers || (d.headers = {}), d.headers.cookie = y;
|
|
1039
1039
|
}
|
|
1040
|
-
return l(`const url = '${
|
|
1040
|
+
return l(`const url = '${p}';`), d.headers && !Object.keys(d.headers).length && delete d.headers, l(`const options = ${ie(d, {
|
|
1041
1041
|
indent: " ",
|
|
1042
1042
|
inlineCharacterLimit: 80,
|
|
1043
1043
|
transform: (y, g, b) => g === "body" && r.mimeType === "application/json" ? `JSON.stringify(${b})` : b
|
|
@@ -1048,19 +1048,19 @@ const eo = {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
}, bt = (t, e, r, n) => {
|
|
1050
1050
|
const s = `${t} *${e} = `;
|
|
1051
|
-
return `${s}${
|
|
1052
|
-
},
|
|
1051
|
+
return `${s}${Ht(r, n ? s.length : void 0)};`;
|
|
1052
|
+
}, Ht = (t, e) => {
|
|
1053
1053
|
const r = e === void 0 ? ", " : `,
|
|
1054
1054
|
${" ".repeat(e)}`;
|
|
1055
1055
|
switch (Object.prototype.toString.call(t)) {
|
|
1056
1056
|
case "[object Number]":
|
|
1057
1057
|
return `@${t}`;
|
|
1058
1058
|
case "[object Array]":
|
|
1059
|
-
return `@[ ${t.map((n) =>
|
|
1059
|
+
return `@[ ${t.map((n) => Ht(n)).join(r)} ]`;
|
|
1060
1060
|
case "[object Object]": {
|
|
1061
1061
|
const n = [];
|
|
1062
1062
|
return Object.keys(t).forEach((s) => {
|
|
1063
|
-
n.push(`@"${s}": ${
|
|
1063
|
+
n.push(`@"${s}": ${Ht(t[s])}`);
|
|
1064
1064
|
}), `@{ ${n.join(r)} }`;
|
|
1065
1065
|
}
|
|
1066
1066
|
case "[object Boolean]":
|
|
@@ -1068,7 +1068,7 @@ const eo = {
|
|
|
1068
1068
|
default:
|
|
1069
1069
|
return t == null ? "" : `@"${t.toString().replace(/"/g, '\\"')}"`;
|
|
1070
1070
|
}
|
|
1071
|
-
},
|
|
1071
|
+
}, ho = {
|
|
1072
1072
|
info: {
|
|
1073
1073
|
key: "objc",
|
|
1074
1074
|
title: "Objective-C",
|
|
@@ -1098,9 +1098,9 @@ const eo = {
|
|
|
1098
1098
|
case "application/x-www-form-urlencoded":
|
|
1099
1099
|
if ((f = e.params) != null && f.length) {
|
|
1100
1100
|
c();
|
|
1101
|
-
const [u, ...
|
|
1102
|
-
a(`NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${u.name}=${u.value}" dataUsingEncoding:NSUTF8StringEncoding]];`),
|
|
1103
|
-
a(`[postData appendData:[@"&${
|
|
1101
|
+
const [u, ...p] = e.params;
|
|
1102
|
+
a(`NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${u.name}=${u.value}" dataUsingEncoding:NSUTF8StringEncoding]];`), p.forEach(({ name: d, value: h }) => {
|
|
1103
|
+
a(`[postData appendData:[@"&${d}=${h}" dataUsingEncoding:NSUTF8StringEncoding]];`);
|
|
1104
1104
|
});
|
|
1105
1105
|
} else l.hasBody = !1;
|
|
1106
1106
|
break;
|
|
@@ -1116,7 +1116,7 @@ const eo = {
|
|
|
1116
1116
|
return c(), a(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${n}"]`), a(" cachePolicy:NSURLRequestUseProtocolCachePolicy"), a(` timeoutInterval:${o.timeout.toFixed(1)}];`), a(`[request setHTTPMethod:@"${r}"];`), l.hasHeaders && a("[request setAllHTTPHeaderFields:headers];"), l.hasBody && a("[request setHTTPBody:postData];"), c(), a("NSURLSession *session = [NSURLSession sharedSession];"), a("NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request"), a(" completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {"), a(" if (error) {", 1), a(' NSLog(@"%@", error);', 2), a(" } else {", 1), a(" NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;", 2), a(' NSLog(@"%@", httpResponse);', 2), a(" }", 1), a(" }];"), a("[dataTask resume];"), i();
|
|
1117
1117
|
}
|
|
1118
1118
|
} }
|
|
1119
|
-
},
|
|
1119
|
+
}, yo = {
|
|
1120
1120
|
info: {
|
|
1121
1121
|
key: "ocaml",
|
|
1122
1122
|
title: "OCaml",
|
|
@@ -1184,7 +1184,7 @@ ${r}]`;
|
|
|
1184
1184
|
default:
|
|
1185
1185
|
return "null";
|
|
1186
1186
|
}
|
|
1187
|
-
},
|
|
1187
|
+
}, hr = [
|
|
1188
1188
|
"ACL",
|
|
1189
1189
|
"BASELINE_CONTROL",
|
|
1190
1190
|
"CHECKIN",
|
|
@@ -1212,7 +1212,7 @@ ${r}]`;
|
|
|
1212
1212
|
"UNLOCK",
|
|
1213
1213
|
"UPDATE",
|
|
1214
1214
|
"VERSION_CONTROL"
|
|
1215
|
-
],
|
|
1215
|
+
], mo = {
|
|
1216
1216
|
info: {
|
|
1217
1217
|
key: "php",
|
|
1218
1218
|
title: "PHP",
|
|
@@ -1229,8 +1229,8 @@ ${r}]`;
|
|
|
1229
1229
|
extname: ".php"
|
|
1230
1230
|
},
|
|
1231
1231
|
convert: ({ uriObj: t, postData: e, fullUrl: r, method: n, httpVersion: s, cookies: o, headersObj: a }, i = {}) => {
|
|
1232
|
-
const { closingTag: c = !1, indent: l = " ", maxRedirects: f = 10, namedErrors: u = !1, noTags:
|
|
1233
|
-
|
|
1232
|
+
const { closingTag: c = !1, indent: l = " ", maxRedirects: f = 10, namedErrors: u = !1, noTags: p = !1, shortTags: d = !1, timeout: h = 30 } = i, { push: y, blank: g, join: b } = new j({ indent: l });
|
|
1233
|
+
p || (y(d ? "<?" : "<?php"), g()), y("$curl = curl_init();"), g();
|
|
1234
1234
|
const m = [
|
|
1235
1235
|
{
|
|
1236
1236
|
escape: !0,
|
|
@@ -1291,7 +1291,7 @@ ${l}`
|
|
|
1291
1291
|
O.length && v.push(`CURLOPT_COOKIE => "${O.join("; ")}",`);
|
|
1292
1292
|
const $ = Object.keys(a).sort().map((w) => `"${w}: ${L(a[w])}"`);
|
|
1293
1293
|
return $.length && (v.push("CURLOPT_HTTPHEADER => ["), v.push($.join(`,
|
|
1294
|
-
${l}${l}`), 1), v.push("],")), y(v.join(), 1), y("]);"), g(), y("$response = curl_exec($curl);"), y("$err = curl_error($curl);"), g(), y("curl_close($curl);"), g(), y("if ($err) {"), y(u ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), y("} else {"), y("echo $response;", 1), y("}"), !
|
|
1294
|
+
${l}${l}`), 1), v.push("],")), y(v.join(), 1), y("]);"), g(), y("$response = curl_exec($curl);"), y("$err = curl_error($curl);"), g(), y("curl_close($curl);"), g(), y("if ($err) {"), y(u ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), y("} else {"), y("echo $response;", 1), y("}"), !p && c && (g(), y("?>")), b();
|
|
1295
1295
|
}
|
|
1296
1296
|
},
|
|
1297
1297
|
guzzle: {
|
|
@@ -1311,7 +1311,7 @@ ${l}${l}`), 1), v.push("],")), y(v.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
1311
1311
|
noTags: !1,
|
|
1312
1312
|
shortTags: !1,
|
|
1313
1313
|
...o
|
|
1314
|
-
}, { push: i, blank: c, join: l } = new j({ indent: a.indent }), { code: f, push: u, join:
|
|
1314
|
+
}, { push: i, blank: c, join: l } = new j({ indent: a.indent }), { code: f, push: u, join: p } = new j({ indent: a.indent });
|
|
1315
1315
|
switch (a.noTags || i(a.shortTags ? "<?" : "<?php"), i("require_once('vendor/autoload.php');"), c(), t.mimeType) {
|
|
1316
1316
|
case "application/x-www-form-urlencoded":
|
|
1317
1317
|
u(`'form_params' => ${A(t.paramsObj, a.indent + a.indent, a.indent)},`, 1);
|
|
@@ -1339,9 +1339,9 @@ ${l}${l}`), 1), v.push("],")), y(v.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
1339
1339
|
default:
|
|
1340
1340
|
t.text && u(`'body' => ${A(t.text)},`, 1);
|
|
1341
1341
|
}
|
|
1342
|
-
const
|
|
1343
|
-
return h.length &&
|
|
1344
|
-
`)), u("],", 1)), i("$client = new \\GuzzleHttp\\Client();"), c(), f.length ? (i(`$response = $client->request('${r}', '${e}', [`), i(
|
|
1342
|
+
const d = Object.keys(s).sort().map((g) => `${a.indent}${a.indent}'${g}' => '${Ce(s[g])}',`), h = n.map((g) => `${encodeURIComponent(g.name)}=${encodeURIComponent(g.value)}`).join("; ");
|
|
1343
|
+
return h.length && d.push(`${a.indent}${a.indent}'cookie' => '${Ce(h)}',`), d.length && (u("'headers' => [", 1), u(d.join(`
|
|
1344
|
+
`)), u("],", 1)), i("$client = new \\GuzzleHttp\\Client();"), c(), f.length ? (i(`$response = $client->request('${r}', '${e}', [`), i(p()), i("]);")) : i(`$response = $client->request('${r}', '${e}');`), c(), i("echo $response->getBody();"), !a.noTags && a.closingTag && (c(), i("?>")), l();
|
|
1345
1345
|
}
|
|
1346
1346
|
},
|
|
1347
1347
|
http1: {
|
|
@@ -1353,18 +1353,18 @@ ${l}${l}`), 1), v.push("],")), y(v.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
1353
1353
|
extname: ".php"
|
|
1354
1354
|
},
|
|
1355
1355
|
convert: ({ method: t, url: e, postData: r, queryObj: n, headersObj: s, cookiesObj: o }, a = {}) => {
|
|
1356
|
-
const { closingTag: i = !1, indent: c = " ", noTags: l = !1, shortTags: f = !1 } = a, { push: u, blank:
|
|
1357
|
-
switch (l || (u(f ? "<?" : "<?php"),
|
|
1356
|
+
const { closingTag: i = !1, indent: c = " ", noTags: l = !1, shortTags: f = !1 } = a, { push: u, blank: p, join: d } = new j({ indent: c });
|
|
1357
|
+
switch (l || (u(f ? "<?" : "<?php"), p()), hr.includes(t.toUpperCase()) || u(`HttpRequest::methodRegister('${t}');`), u("$request = new HttpRequest();"), u(`$request->setUrl(${A(e)});`), hr.includes(t.toUpperCase()) ? u(`$request->setMethod(HTTP_METH_${t.toUpperCase()});`) : u(`$request->setMethod(HttpRequest::HTTP_METH_${t.toUpperCase()});`), p(), Object.keys(n).length && (u(`$request->setQueryData(${A(n, c)});`), p()), Object.keys(s).length && (u(`$request->setHeaders(${A(s, c)});`), p()), Object.keys(o).length && (u(`$request->setCookies(${A(o, c)});`), p()), r.mimeType) {
|
|
1358
1358
|
case "application/x-www-form-urlencoded":
|
|
1359
|
-
u(`$request->setContentType(${A(r.mimeType)});`), u(`$request->setPostFields(${A(r.paramsObj, c)});`),
|
|
1359
|
+
u(`$request->setContentType(${A(r.mimeType)});`), u(`$request->setPostFields(${A(r.paramsObj, c)});`), p();
|
|
1360
1360
|
break;
|
|
1361
1361
|
case "application/json":
|
|
1362
|
-
u(`$request->setContentType(${A(r.mimeType)});`), u(`$request->setBody(json_encode(${A(r.jsonObj, c)}));`),
|
|
1362
|
+
u(`$request->setContentType(${A(r.mimeType)});`), u(`$request->setBody(json_encode(${A(r.jsonObj, c)}));`), p();
|
|
1363
1363
|
break;
|
|
1364
1364
|
default:
|
|
1365
|
-
r.text && (u(`$request->setBody(${A(r.text)});`),
|
|
1365
|
+
r.text && (u(`$request->setBody(${A(r.text)});`), p());
|
|
1366
1366
|
}
|
|
1367
|
-
return u("try {"), u("$response = $request->send();", 1),
|
|
1367
|
+
return u("try {"), u("$response = $request->send();", 1), p(), u("echo $response->getBody();", 1), u("} catch (HttpException $ex) {"), u("echo $ex;", 1), u("}"), !l && i && (p(), u("?>")), d();
|
|
1368
1368
|
}
|
|
1369
1369
|
},
|
|
1370
1370
|
http2: {
|
|
@@ -1377,11 +1377,11 @@ ${l}${l}`), 1), v.push("],")), y(v.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
1377
1377
|
},
|
|
1378
1378
|
convert: ({ postData: t, headersObj: e, method: r, queryObj: n, cookiesObj: s, url: o }, a = {}) => {
|
|
1379
1379
|
var y;
|
|
1380
|
-
const { closingTag: i = !1, indent: c = " ", noTags: l = !1, shortTags: f = !1 } = a, { push: u, blank:
|
|
1380
|
+
const { closingTag: i = !1, indent: c = " ", noTags: l = !1, shortTags: f = !1 } = a, { push: u, blank: p, join: d } = new j({ indent: c });
|
|
1381
1381
|
let h = !1;
|
|
1382
|
-
switch (l || (u(f ? "<?" : "<?php"),
|
|
1382
|
+
switch (l || (u(f ? "<?" : "<?php"), p()), u("$client = new http\\Client;"), u("$request = new http\\Client\\Request;"), p(), t.mimeType) {
|
|
1383
1383
|
case "application/x-www-form-urlencoded":
|
|
1384
|
-
u("$body = new http\\Message\\Body;"), u(`$body->append(new http\\QueryString(${A(t.paramsObj, c)}));`),
|
|
1384
|
+
u("$body = new http\\Message\\Body;"), u(`$body->append(new http\\QueryString(${A(t.paramsObj, c)}));`), p(), h = !0;
|
|
1385
1385
|
break;
|
|
1386
1386
|
case "multipart/form-data": {
|
|
1387
1387
|
if (!t.params) break;
|
|
@@ -1403,20 +1403,20 @@ ${l}${l}`), 1), v.push("],")), y(v.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
1403
1403
|
const O = B(e, "content-type");
|
|
1404
1404
|
O && delete e[O];
|
|
1405
1405
|
}
|
|
1406
|
-
|
|
1406
|
+
p(), h = !0;
|
|
1407
1407
|
break;
|
|
1408
1408
|
}
|
|
1409
1409
|
case "application/json":
|
|
1410
1410
|
u("$body = new http\\Message\\Body;"), u(`$body->append(json_encode(${A(t.jsonObj, c)}));`), h = !0;
|
|
1411
1411
|
break;
|
|
1412
1412
|
default:
|
|
1413
|
-
t.text && (u("$body = new http\\Message\\Body;"), u(`$body->append(${A(t.text)});`),
|
|
1413
|
+
t.text && (u("$body = new http\\Message\\Body;"), u(`$body->append(${A(t.text)});`), p(), h = !0);
|
|
1414
1414
|
}
|
|
1415
|
-
return u(`$request->setRequestUrl(${A(o)});`), u(`$request->setRequestMethod(${A(r)});`), h && (u("$request->setBody($body);"),
|
|
1415
|
+
return u(`$request->setRequestUrl(${A(o)});`), u(`$request->setRequestMethod(${A(r)});`), h && (u("$request->setBody($body);"), p()), Object.keys(n).length && (u(`$request->setQuery(new http\\QueryString(${A(n, c)}));`), p()), Object.keys(e).length && (u(`$request->setHeaders(${A(e, c)});`), p()), Object.keys(s).length && (p(), u(`$client->setCookies(${A(s, c)});`), p()), u("$client->enqueue($request)->send();"), u("$response = $client->getResponse();"), p(), u("echo $response->getBody();"), !l && i && (p(), u("?>")), d();
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
|
-
},
|
|
1419
|
+
}, rn = (t) => ({ method: r, headersObj: n, cookies: s, uriObj: o, fullUrl: a, postData: i, allHeaders: c }) => {
|
|
1420
1420
|
const { push: l, join: f } = new j();
|
|
1421
1421
|
if (![
|
|
1422
1422
|
"GET",
|
|
@@ -1427,16 +1427,16 @@ ${l}${l}`), 1), v.push("],")), y(v.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
1427
1427
|
"HEAD",
|
|
1428
1428
|
"OPTIONS"
|
|
1429
1429
|
].includes(r.toUpperCase())) return "Method not supported";
|
|
1430
|
-
const u = [],
|
|
1431
|
-
return
|
|
1432
|
-
|
|
1433
|
-
}), u.push("-Headers $headers")), s.length && (l("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), s.forEach((
|
|
1434
|
-
l("$cookie = New-Object System.Net.Cookie"), l(`$cookie.Name = '${
|
|
1430
|
+
const u = [], p = Object.keys(n);
|
|
1431
|
+
return p.length && (l("$headers=@{}"), p.forEach((d) => {
|
|
1432
|
+
d !== "connection" && l(`$headers.Add("${d}", "${He(n[d], { escapeChar: "`" })}")`);
|
|
1433
|
+
}), u.push("-Headers $headers")), s.length && (l("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), s.forEach((d) => {
|
|
1434
|
+
l("$cookie = New-Object System.Net.Cookie"), l(`$cookie.Name = '${d.name}'`), l(`$cookie.Value = '${d.value}'`), l(`$cookie.Domain = '${o.host}'`), l("$session.Cookies.Add($cookie)");
|
|
1435
1435
|
}), u.push("-WebSession $session")), i.text && (u.push(`-ContentType '${He(ce(c, "content-type"), {
|
|
1436
1436
|
delimiter: "'",
|
|
1437
1437
|
escapeChar: "`"
|
|
1438
1438
|
})}'`), u.push(`-Body '${i.text}'`)), l(`$response = ${t} -Uri '${a}' -Method ${r} ${u.join(" ")}`.trim()), f();
|
|
1439
|
-
},
|
|
1439
|
+
}, go = {
|
|
1440
1440
|
info: {
|
|
1441
1441
|
key: "restmethod",
|
|
1442
1442
|
title: "Invoke-RestMethod",
|
|
@@ -1444,8 +1444,8 @@ ${l}${l}`), 1), v.push("],")), y(v.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
1444
1444
|
description: "Powershell Invoke-RestMethod client",
|
|
1445
1445
|
extname: ".ps1"
|
|
1446
1446
|
},
|
|
1447
|
-
convert:
|
|
1448
|
-
},
|
|
1447
|
+
convert: rn("Invoke-RestMethod")
|
|
1448
|
+
}, bo = {
|
|
1449
1449
|
info: {
|
|
1450
1450
|
key: "powershell",
|
|
1451
1451
|
title: "Powershell",
|
|
@@ -1460,12 +1460,12 @@ ${l}${l}`), 1), v.push("],")), y(v.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
1460
1460
|
description: "Powershell Invoke-WebRequest client",
|
|
1461
1461
|
extname: ".ps1"
|
|
1462
1462
|
},
|
|
1463
|
-
convert:
|
|
1463
|
+
convert: rn("Invoke-WebRequest")
|
|
1464
1464
|
},
|
|
1465
|
-
restmethod:
|
|
1465
|
+
restmethod: go
|
|
1466
1466
|
}
|
|
1467
1467
|
};
|
|
1468
|
-
function
|
|
1468
|
+
function yr(t, e, r, n, s) {
|
|
1469
1469
|
const o = n.repeat(s), a = n.repeat(s - 1), i = r ? `,
|
|
1470
1470
|
${o}` : ", ", c = t === "object" ? "{" : "[", l = t === "object" ? "}" : "]";
|
|
1471
1471
|
return r ? `${c}
|
|
@@ -1478,12 +1478,12 @@ const Oe = (t, e, r) => {
|
|
|
1478
1478
|
return t;
|
|
1479
1479
|
case "[object Array]": {
|
|
1480
1480
|
let n = !1;
|
|
1481
|
-
return
|
|
1481
|
+
return yr("array", t.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (n = Object.keys(s).length > 1), Oe(s, e, r))), n, e.indent, r);
|
|
1482
1482
|
}
|
|
1483
1483
|
case "[object Object]": {
|
|
1484
1484
|
const n = [];
|
|
1485
1485
|
for (const s in t) n.push(`"${s}": ${Oe(t[s], e, r)}`);
|
|
1486
|
-
return
|
|
1486
|
+
return yr("object", n, e.pretty && n.length > 1, e.indent, r);
|
|
1487
1487
|
}
|
|
1488
1488
|
case "[object Null]":
|
|
1489
1489
|
return "None";
|
|
@@ -1492,7 +1492,7 @@ const Oe = (t, e, r) => {
|
|
|
1492
1492
|
default:
|
|
1493
1493
|
return t == null ? "" : `"${t.toString().replace(/"/g, '\\"')}"`;
|
|
1494
1494
|
}
|
|
1495
|
-
},
|
|
1495
|
+
}, $o = [
|
|
1496
1496
|
"HEAD",
|
|
1497
1497
|
"GET",
|
|
1498
1498
|
"POST",
|
|
@@ -1500,7 +1500,7 @@ const Oe = (t, e, r) => {
|
|
|
1500
1500
|
"PATCH",
|
|
1501
1501
|
"DELETE",
|
|
1502
1502
|
"OPTIONS"
|
|
1503
|
-
],
|
|
1503
|
+
], vo = {
|
|
1504
1504
|
info: {
|
|
1505
1505
|
key: "python",
|
|
1506
1506
|
title: "Python",
|
|
@@ -1525,8 +1525,8 @@ const Oe = (t, e, r) => {
|
|
|
1525
1525
|
a("import requests"), i(), a(`url = "${t}"`), i();
|
|
1526
1526
|
const f = r;
|
|
1527
1527
|
let u = {};
|
|
1528
|
-
const
|
|
1529
|
-
let
|
|
1528
|
+
const p = {};
|
|
1529
|
+
let d = !1, h = !1, y = !1;
|
|
1530
1530
|
switch (e.mimeType) {
|
|
1531
1531
|
case "application/json":
|
|
1532
1532
|
e.jsonObj && (a(`payload = ${Oe(e.jsonObj, o)}`), y = !0, h = !0);
|
|
@@ -1534,9 +1534,9 @@ const Oe = (t, e, r) => {
|
|
|
1534
1534
|
case "multipart/form-data":
|
|
1535
1535
|
if (!e.params) break;
|
|
1536
1536
|
if (u = {}, e.params.forEach((m) => {
|
|
1537
|
-
m.fileName ? (m.contentType ?
|
|
1538
|
-
}),
|
|
1539
|
-
a(`files = ${Oe(
|
|
1537
|
+
m.fileName ? (m.contentType ? p[m.name] = `('${m.fileName}', open('${m.fileName}', 'rb'), '${m.contentType}')` : p[m.name] = `('${m.fileName}', open('${m.fileName}', 'rb'))`, d = !0) : (u[m.name] = m.value, h = !0);
|
|
1538
|
+
}), d) {
|
|
1539
|
+
a(`files = ${Oe(p, o)}`), h && a(`payload = ${Oe(u, o)}`);
|
|
1540
1540
|
const m = B(f, "content-type");
|
|
1541
1541
|
m && delete f[m];
|
|
1542
1542
|
} else {
|
|
@@ -1555,7 +1555,7 @@ const Oe = (t, e, r) => {
|
|
|
1555
1555
|
}
|
|
1556
1556
|
}
|
|
1557
1557
|
const g = Object.keys(f).length;
|
|
1558
|
-
if (g === 0 && (h ||
|
|
1558
|
+
if (g === 0 && (h || d)) i();
|
|
1559
1559
|
else if (g === 1) Object.keys(f).forEach((m) => {
|
|
1560
1560
|
a(`headers = {"${m}": "${L(f[m])}"}`), i();
|
|
1561
1561
|
});
|
|
@@ -1565,11 +1565,11 @@ const Oe = (t, e, r) => {
|
|
|
1565
1565
|
a(m !== g ? `"${v}": "${L(f[v])}",` : `"${v}": "${L(f[v])}"`, 1), m += 1;
|
|
1566
1566
|
}), a("}"), i();
|
|
1567
1567
|
}
|
|
1568
|
-
let b =
|
|
1569
|
-
return h && (y ? b += ", json=payload" : b += ", data=payload"),
|
|
1568
|
+
let b = $o.includes(n) ? `response = requests.${n.toLowerCase()}(url` : `response = requests.request("${n}", url`;
|
|
1569
|
+
return h && (y ? b += ", json=payload" : b += ", data=payload"), d && (b += ", files=files"), g > 0 && (b += ", headers=headers"), b += ")", a(b), i(), a("print(response.text)"), c();
|
|
1570
1570
|
}
|
|
1571
1571
|
} }
|
|
1572
|
-
},
|
|
1572
|
+
}, wo = {
|
|
1573
1573
|
info: {
|
|
1574
1574
|
key: "r",
|
|
1575
1575
|
title: "R",
|
|
@@ -1607,7 +1607,7 @@ const Oe = (t, e, r) => {
|
|
|
1607
1607
|
a('encode <- "raw"'), i();
|
|
1608
1608
|
break;
|
|
1609
1609
|
}
|
|
1610
|
-
const
|
|
1610
|
+
const p = ce(s, "cookie"), d = ce(s, "accept"), h = p ? `set_cookies(\`${String(p).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, y = d ? `accept("${L(d)}")` : void 0, g = `content_type("${L(n.mimeType)}")`, b = Object.entries(s).filter(([$]) => ![
|
|
1611
1611
|
"cookie",
|
|
1612
1612
|
"accept",
|
|
1613
1613
|
"content-type"
|
|
@@ -1623,7 +1623,7 @@ const Oe = (t, e, r) => {
|
|
|
1623
1623
|
return O && (v += `, ${O}`), (n.text || n.jsonObj || n.params) && (v += ", encode = encode"), v += ")", a(v), i(), a('content(response, "text")'), c();
|
|
1624
1624
|
}
|
|
1625
1625
|
} }
|
|
1626
|
-
},
|
|
1626
|
+
}, So = {
|
|
1627
1627
|
info: {
|
|
1628
1628
|
key: "ruby",
|
|
1629
1629
|
title: "Ruby",
|
|
@@ -1657,8 +1657,8 @@ const Oe = (t, e, r) => {
|
|
|
1657
1657
|
], f = c.charAt(0) + c.substring(1).toLowerCase();
|
|
1658
1658
|
l.includes(c) || (o(`class Net::HTTP::${f} < Net::HTTPRequest`), o(` METHOD = '${c.toUpperCase()}'`), o(` REQUEST_HAS_BODY = '${n.text ? "true" : "false"}'`), o(" RESPONSE_HAS_BODY = true"), o("end"), a()), o(`url = URI("${r}")`), a(), o("http = Net::HTTP.new(url.host, url.port)"), t.protocol === "https:" && o("http.use_ssl = true"), a(), o(`request = Net::HTTP::${f}.new(url)`);
|
|
1659
1659
|
const u = Object.keys(s);
|
|
1660
|
-
return u.length && u.forEach((
|
|
1661
|
-
o(`request["${
|
|
1660
|
+
return u.length && u.forEach((p) => {
|
|
1661
|
+
o(`request["${p}"] = '${Ce(s[p])}'`);
|
|
1662
1662
|
}), n.text && o(`request.body = ${JSON.stringify(n.text)}`), a(), o("response = http.request(request)"), o("puts response.read_body"), i();
|
|
1663
1663
|
}
|
|
1664
1664
|
},
|
|
@@ -1711,7 +1711,7 @@ const Oe = (t, e, r) => {
|
|
|
1711
1711
|
}
|
|
1712
1712
|
}
|
|
1713
1713
|
};
|
|
1714
|
-
function
|
|
1714
|
+
function mr(t, e, r, n, s) {
|
|
1715
1715
|
const o = n.repeat(s), a = n.repeat(s - 1), i = r ? `,
|
|
1716
1716
|
${o}` : ", ", c = t === "object" ? "json!({" : "(", l = t === "object" ? "})" : ")";
|
|
1717
1717
|
return r ? `${c}
|
|
@@ -1725,12 +1725,12 @@ const Te = (t, e, r) => {
|
|
|
1725
1725
|
case "[object Array]": {
|
|
1726
1726
|
if (t.length === 0) return "json!([])";
|
|
1727
1727
|
let n = !1;
|
|
1728
|
-
return
|
|
1728
|
+
return mr("array", t.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (n = Object.keys(s).length > 1), Te(s, e, r))), n, e.indent, r);
|
|
1729
1729
|
}
|
|
1730
1730
|
case "[object Object]": {
|
|
1731
1731
|
const n = [];
|
|
1732
1732
|
for (const s in t) n.push(`"${s}": ${Te(t[s], e, r)}`);
|
|
1733
|
-
return
|
|
1733
|
+
return mr("object", n, e.pretty && n.length > 1, e.indent, r);
|
|
1734
1734
|
}
|
|
1735
1735
|
case "[object Null]":
|
|
1736
1736
|
return "json!(null)";
|
|
@@ -1739,7 +1739,7 @@ const Te = (t, e, r) => {
|
|
|
1739
1739
|
default:
|
|
1740
1740
|
return t == null ? "" : `"${t.toString().replace(/"/g, '\\"')}"`;
|
|
1741
1741
|
}
|
|
1742
|
-
},
|
|
1742
|
+
}, Oo = {
|
|
1743
1743
|
info: {
|
|
1744
1744
|
key: "reqwest",
|
|
1745
1745
|
title: "reqwest",
|
|
@@ -1754,11 +1754,11 @@ const Te = (t, e, r) => {
|
|
|
1754
1754
|
...o
|
|
1755
1755
|
};
|
|
1756
1756
|
let i = 0;
|
|
1757
|
-
const { push: c, blank: l, join: f, pushToLast: u, unshift:
|
|
1757
|
+
const { push: c, blank: l, join: f, pushToLast: u, unshift: p } = new j({ indent: a.indent });
|
|
1758
1758
|
c("use reqwest;", i), l(), c("#[tokio::main]", i), c("pub async fn main() {", i), i += 1, c(`let url = "${e}";`, i), l();
|
|
1759
|
-
let
|
|
1759
|
+
let d = !1;
|
|
1760
1760
|
if (Object.keys(t).length) {
|
|
1761
|
-
|
|
1761
|
+
d = !0, c("let querystring = [", i), i += 1;
|
|
1762
1762
|
for (const [w, C] of Object.entries(t)) if (Array.isArray(C)) for (const T of C) c(`("${w}", "${decodeURIComponent(T)}"),`, i);
|
|
1763
1763
|
else c(`("${w}", "${decodeURIComponent(String(C))}"),`, i);
|
|
1764
1764
|
i -= 1, c("];", i), l();
|
|
@@ -1778,7 +1778,7 @@ const Te = (t, e, r) => {
|
|
|
1778
1778
|
if (h = {}, r.params.forEach((w) => {
|
|
1779
1779
|
w.fileName ? (y[w.name] = w.fileName, g = !0) : h[w.name] = w.value;
|
|
1780
1780
|
}), g) {
|
|
1781
|
-
for (const w of
|
|
1781
|
+
for (const w of To) c(w, i);
|
|
1782
1782
|
l();
|
|
1783
1783
|
}
|
|
1784
1784
|
c("let form = reqwest::multipart::Form::new()", i);
|
|
@@ -1796,7 +1796,7 @@ const Te = (t, e, r) => {
|
|
|
1796
1796
|
break;
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
|
-
(b || v) &&
|
|
1799
|
+
(b || v) && p("use serde_json::json;"), (b || v || m || O) && l();
|
|
1800
1800
|
const $ = Object.entries(n).filter(([w]) => !(w.toLowerCase() === "content-type" && O));
|
|
1801
1801
|
switch (c("let client = reqwest::Client::new();", i), s) {
|
|
1802
1802
|
case "POST":
|
|
@@ -1806,30 +1806,30 @@ const Te = (t, e, r) => {
|
|
|
1806
1806
|
c("let response = client.get(url)", i);
|
|
1807
1807
|
break;
|
|
1808
1808
|
default:
|
|
1809
|
-
c(`let response = client.request(reqwest::Method::from_str("${s}").unwrap(), url)`, i),
|
|
1809
|
+
c(`let response = client.request(reqwest::Method::from_str("${s}").unwrap(), url)`, i), p("use std::str::FromStr;");
|
|
1810
1810
|
break;
|
|
1811
1811
|
}
|
|
1812
|
-
|
|
1812
|
+
d && c(".query(&querystring)", i + 1), O && c(".multipart(form)", i + 1);
|
|
1813
1813
|
for (const [w, C] of $) c(`.header("${w}", ${Te(C, a)})`, i + 1);
|
|
1814
1814
|
return v && c(".json(&payload)", i + 1), b && c(".form(&payload)", i + 1), m && c(".body(payload)", i + 1), c(".send()", i + 1), c(".await;", i + 1), l(), c("let results = response.unwrap()", i), c(".json::<serde_json::Value>()", i + 1), c(".await", i + 1), c(".unwrap();", i + 1), l(), c('println!("{}", results);', i), c(`}
|
|
1815
1815
|
`), f();
|
|
1816
1816
|
}
|
|
1817
|
-
},
|
|
1817
|
+
}, To = [
|
|
1818
1818
|
"async fn file_to_part(file_name: &'static str) -> reqwest::multipart::Part {",
|
|
1819
1819
|
" let bytes = tokio::fs::read(file_name).await.unwrap();",
|
|
1820
1820
|
" reqwest::multipart::Part::bytes(bytes)",
|
|
1821
1821
|
" .file_name(file_name)",
|
|
1822
1822
|
' .mime_str("text/plain").unwrap()',
|
|
1823
1823
|
"}"
|
|
1824
|
-
],
|
|
1824
|
+
], xo = {
|
|
1825
1825
|
info: {
|
|
1826
1826
|
key: "rust",
|
|
1827
1827
|
title: "Rust",
|
|
1828
1828
|
default: "reqwest",
|
|
1829
1829
|
cli: "rust"
|
|
1830
1830
|
},
|
|
1831
|
-
clientsById: { reqwest:
|
|
1832
|
-
}, M = (t = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(t) ? t : `'${t.replace(/'/g, "'\\''")}'`,
|
|
1831
|
+
clientsById: { reqwest: Oo }
|
|
1832
|
+
}, M = (t = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(t) ? t : `'${t.replace(/'/g, "'\\''")}'`, Eo = (t) => t.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), jo = {
|
|
1833
1833
|
"http1.0": "0",
|
|
1834
1834
|
"url ": "",
|
|
1835
1835
|
cookie: "b",
|
|
@@ -1839,13 +1839,13 @@ const Te = (t, e, r) => {
|
|
|
1839
1839
|
header: "H",
|
|
1840
1840
|
insecure: "k",
|
|
1841
1841
|
request: "X"
|
|
1842
|
-
},
|
|
1842
|
+
}, Po = (t) => (e) => {
|
|
1843
1843
|
if (t) {
|
|
1844
|
-
const r =
|
|
1844
|
+
const r = jo[e];
|
|
1845
1845
|
return r ? `-${r}` : "";
|
|
1846
1846
|
}
|
|
1847
1847
|
return `--${e}`;
|
|
1848
|
-
},
|
|
1848
|
+
}, Co = {
|
|
1849
1849
|
info: {
|
|
1850
1850
|
key: "shell",
|
|
1851
1851
|
title: "Shell",
|
|
@@ -1863,13 +1863,13 @@ const Te = (t, e, r) => {
|
|
|
1863
1863
|
},
|
|
1864
1864
|
convert: ({ fullUrl: t, method: e, httpVersion: r, headersObj: n, allHeaders: s, postData: o }, a = {}) => {
|
|
1865
1865
|
var b;
|
|
1866
|
-
const { binary: i = !1, globOff: c = !1, indent: l = " ", insecureSkipVerify: f = !1, short: u = !1 } = a,
|
|
1866
|
+
const { binary: i = !1, globOff: c = !1, indent: l = " ", insecureSkipVerify: f = !1, short: u = !1 } = a, p = " ", { push: d, join: h } = new j({
|
|
1867
1867
|
...typeof l == "string" ? { indent: l } : {},
|
|
1868
1868
|
join: l !== !1 ? ` \\
|
|
1869
1869
|
${l}` : " "
|
|
1870
|
-
}), y =
|
|
1870
|
+
}), y = Po(u);
|
|
1871
1871
|
let g = M(t);
|
|
1872
|
-
if (
|
|
1872
|
+
if (d(`curl ${y("request")} ${e}`), c && (g = unescape(g), d(y("globoff"))), d(`${y("url ")}${g}`), f && d(y("insecure")), r === "HTTP/1.0" && d(y("http1.0")), ce(s, "accept-encoding") && d("--compressed"), o.mimeType === "multipart/form-data") {
|
|
1873
1873
|
const m = B(n, "content-type");
|
|
1874
1874
|
if (m) {
|
|
1875
1875
|
const v = n[m];
|
|
@@ -1881,34 +1881,34 @@ ${l}` : " "
|
|
|
1881
1881
|
}
|
|
1882
1882
|
switch (Object.keys(n).sort().forEach((m) => {
|
|
1883
1883
|
const v = `${m}: ${n[m]}`;
|
|
1884
|
-
|
|
1885
|
-
}), s.cookie &&
|
|
1884
|
+
d(`${y("header")} ${M(v)}`);
|
|
1885
|
+
}), s.cookie && d(`${y("cookie")} ${M(s.cookie)}`), o.mimeType) {
|
|
1886
1886
|
case "multipart/form-data":
|
|
1887
1887
|
(b = o.params) == null || b.forEach((m) => {
|
|
1888
1888
|
let v = "";
|
|
1889
|
-
m.fileName ? v = `${m.name}='@${m.fileName}'` : v = M(`${m.name}=${m.value}`),
|
|
1889
|
+
m.fileName ? v = `${m.name}='@${m.fileName}'` : v = M(`${m.name}=${m.value}`), d(`${y("form")} ${v}`);
|
|
1890
1890
|
});
|
|
1891
1891
|
break;
|
|
1892
1892
|
case "application/x-www-form-urlencoded":
|
|
1893
1893
|
o.params ? o.params.forEach((m) => {
|
|
1894
1894
|
const v = encodeURIComponent(m.name), O = v !== m.name ? v : m.name;
|
|
1895
|
-
|
|
1896
|
-
}) :
|
|
1895
|
+
d(`${i ? "--data-binary" : "--data-urlencode"} ${M(`${O}=${m.value}`)}`);
|
|
1896
|
+
}) : d(`${i ? "--data-binary" : y("data")} ${M(o.text)}`);
|
|
1897
1897
|
break;
|
|
1898
1898
|
default: {
|
|
1899
1899
|
if (!o.text) break;
|
|
1900
1900
|
let m = !1;
|
|
1901
|
-
if (
|
|
1901
|
+
if (Qn(o.mimeType) && o.text.length > 20)
|
|
1902
1902
|
try {
|
|
1903
1903
|
const v = JSON.parse(o.text);
|
|
1904
|
-
m = !0, o.text.indexOf("'") > 0 ?
|
|
1905
|
-
${JSON.stringify(v, null,
|
|
1906
|
-
EOF`) :
|
|
1907
|
-
${JSON.stringify(v, null,
|
|
1904
|
+
m = !0, o.text.indexOf("'") > 0 ? d(`${i ? "--data-binary" : y("data")} @- <<EOF
|
|
1905
|
+
${JSON.stringify(v, null, p)}
|
|
1906
|
+
EOF`) : d(`${i ? "--data-binary" : y("data")} '
|
|
1907
|
+
${JSON.stringify(v, null, p)}
|
|
1908
1908
|
'`);
|
|
1909
1909
|
} catch {
|
|
1910
1910
|
}
|
|
1911
|
-
m ||
|
|
1911
|
+
m || d(`${i ? "--data-binary" : y("data")} ${M(o.text)}`);
|
|
1912
1912
|
}
|
|
1913
1913
|
}
|
|
1914
1914
|
return h();
|
|
@@ -1945,19 +1945,19 @@ ${JSON.stringify(v, null, d)}
|
|
|
1945
1945
|
${i.indent}` : " "
|
|
1946
1946
|
});
|
|
1947
1947
|
let u = !1;
|
|
1948
|
-
const
|
|
1949
|
-
i.headers &&
|
|
1948
|
+
const p = [];
|
|
1949
|
+
i.headers && p.push(i.short ? "-h" : "--headers"), i.body && p.push(i.short ? "-b" : "--body"), i.verbose && p.push(i.short ? "-v" : "--verbose"), i.print && p.push(`${i.short ? "-p" : "--print"}=${i.print}`), i.verify && p.push(`--verify=${i.verify}`), i.cert && p.push(`--cert=${i.cert}`), i.pretty && p.push(`--pretty=${i.pretty}`), i.style && p.push(`--style=${i.style}`), i.timeout && p.push(`--timeout=${i.timeout}`), i.queryParams && Object.keys(r).forEach((y) => {
|
|
1950
1950
|
const g = r[y];
|
|
1951
1951
|
Array.isArray(g) ? g.forEach((b) => {
|
|
1952
1952
|
c(`${y}==${M(b)}`);
|
|
1953
1953
|
}) : c(`${y}==${M(g)}`);
|
|
1954
1954
|
}), Object.keys(t).sort().forEach((y) => {
|
|
1955
1955
|
c(`${y}:${M(t[y])}`);
|
|
1956
|
-
}), e.mimeType === "application/x-www-form-urlencoded" ? (h = e.params) != null && h.length && (
|
|
1956
|
+
}), e.mimeType === "application/x-www-form-urlencoded" ? (h = e.params) != null && h.length && (p.push(i.short ? "-f" : "--form"), e.params.forEach((y) => {
|
|
1957
1957
|
c(`${y.name}=${M(y.value)}`);
|
|
1958
1958
|
})) : u = !0;
|
|
1959
|
-
const
|
|
1960
|
-
return o = M(i.queryParams ? o : n), f(`http ${
|
|
1959
|
+
const d = p.length ? `${p.join(" ")} ` : "";
|
|
1960
|
+
return o = M(i.queryParams ? o : n), f(`http ${d}${s} ${o}`), u && e.text && f(`echo ${M(e.text)} | `), l();
|
|
1961
1961
|
}
|
|
1962
1962
|
},
|
|
1963
1963
|
wget: {
|
|
@@ -1982,29 +1982,29 @@ ${o.indent}` : " "
|
|
|
1982
1982
|
return o.verbose ? a(`wget ${o.short ? "-v" : "--verbose"}`) : a(`wget ${o.short ? "-q" : "--quiet"}`), a(`--method ${M(t)}`), Object.keys(r).forEach((c) => {
|
|
1983
1983
|
const l = `${c}: ${r[c]}`;
|
|
1984
1984
|
a(`--header ${M(l)}`);
|
|
1985
|
-
}), e.text && a(`--body-data ${
|
|
1985
|
+
}), e.text && a(`--body-data ${Eo(M(e.text))}`), a(o.short ? "-O" : "--output-document"), a(`- ${M(n)}`), i();
|
|
1986
1986
|
}
|
|
1987
1987
|
}
|
|
1988
1988
|
}
|
|
1989
|
-
},
|
|
1990
|
-
const s =
|
|
1989
|
+
}, gr = (t, e) => e.repeat(t), br = (t, e, r, n) => {
|
|
1990
|
+
const s = gr(n, r), o = gr(n - 1, r), a = e ? `,
|
|
1991
1991
|
${s}` : ", ";
|
|
1992
1992
|
return e ? `[
|
|
1993
1993
|
${s}${t.join(a)}
|
|
1994
1994
|
${o}]` : `[${t.join(a)}]`;
|
|
1995
|
-
},
|
|
1995
|
+
}, $r = (t, e, r) => `let ${t} = ${it(e, r)}`, it = (t, e, r) => {
|
|
1996
1996
|
switch (r = r === void 0 ? 1 : r + 1, Object.prototype.toString.call(t)) {
|
|
1997
1997
|
case "[object Number]":
|
|
1998
1998
|
return t;
|
|
1999
1999
|
case "[object Array]": {
|
|
2000
2000
|
let n = !1;
|
|
2001
2001
|
const s = t.map((o) => (Object.prototype.toString.call(o) === "[object Object]" && (n = Object.keys(o).length > 1), it(o, e, r)));
|
|
2002
|
-
return
|
|
2002
|
+
return br(s, n, e.indent, r);
|
|
2003
2003
|
}
|
|
2004
2004
|
case "[object Object]": {
|
|
2005
2005
|
const n = [];
|
|
2006
2006
|
for (const s in t) n.push(`"${s}": ${it(t[s], e, r)}`);
|
|
2007
|
-
return
|
|
2007
|
+
return br(n, e.pretty && n.length > 1, e.indent, r);
|
|
2008
2008
|
}
|
|
2009
2009
|
case "[object Boolean]":
|
|
2010
2010
|
return t.toString();
|
|
@@ -2012,27 +2012,27 @@ ${o}]` : `[${t.join(a)}]`;
|
|
|
2012
2012
|
return t == null ? "nil" : `"${t.toString().replace(/"/g, '\\"')}"`;
|
|
2013
2013
|
}
|
|
2014
2014
|
}, xe = {
|
|
2015
|
-
agent:
|
|
2016
|
-
c:
|
|
2017
|
-
clojure:
|
|
2018
|
-
crystal:
|
|
2019
|
-
csharp:
|
|
2020
|
-
go:
|
|
2021
|
-
http:
|
|
2022
|
-
java:
|
|
2023
|
-
javascript:
|
|
2024
|
-
json:
|
|
2025
|
-
kotlin:
|
|
2026
|
-
node:
|
|
2027
|
-
objc:
|
|
2028
|
-
ocaml:
|
|
2029
|
-
php:
|
|
2030
|
-
powershell:
|
|
2031
|
-
python:
|
|
2032
|
-
r:
|
|
2033
|
-
ruby:
|
|
2034
|
-
rust:
|
|
2035
|
-
shell:
|
|
2015
|
+
agent: Yn,
|
|
2016
|
+
c: Xn,
|
|
2017
|
+
clojure: eo,
|
|
2018
|
+
crystal: to,
|
|
2019
|
+
csharp: io,
|
|
2020
|
+
go: ao,
|
|
2021
|
+
http: so,
|
|
2022
|
+
java: co,
|
|
2023
|
+
javascript: lo,
|
|
2024
|
+
json: fo,
|
|
2025
|
+
kotlin: uo,
|
|
2026
|
+
node: po,
|
|
2027
|
+
objc: ho,
|
|
2028
|
+
ocaml: yo,
|
|
2029
|
+
php: mo,
|
|
2030
|
+
powershell: bo,
|
|
2031
|
+
python: vo,
|
|
2032
|
+
r: wo,
|
|
2033
|
+
ruby: So,
|
|
2034
|
+
rust: xo,
|
|
2035
|
+
shell: Co,
|
|
2036
2036
|
swift: {
|
|
2037
2037
|
info: {
|
|
2038
2038
|
key: "swift",
|
|
@@ -2048,7 +2048,7 @@ ${o}]` : `[${t.join(a)}]`;
|
|
|
2048
2048
|
extname: ".swift"
|
|
2049
2049
|
},
|
|
2050
2050
|
convert: ({ allHeaders: t, postData: e, uriObj: r, queryObj: n, method: s }, o) => {
|
|
2051
|
-
var
|
|
2051
|
+
var p;
|
|
2052
2052
|
const a = {
|
|
2053
2053
|
indent: " ",
|
|
2054
2054
|
pretty: !0,
|
|
@@ -2059,26 +2059,26 @@ ${o}]` : `[${t.join(a)}]`;
|
|
|
2059
2059
|
const f = e.text || e.jsonObj || e.params;
|
|
2060
2060
|
if (f) switch (e.mimeType) {
|
|
2061
2061
|
case "application/x-www-form-urlencoded":
|
|
2062
|
-
if ((
|
|
2063
|
-
const
|
|
2064
|
-
a.pretty ? (i("let parameters = ["),
|
|
2062
|
+
if ((p = e.params) != null && p.length) {
|
|
2063
|
+
const d = e.params.map((h) => `"${h.name}": "${h.value}"`);
|
|
2064
|
+
a.pretty ? (i("let parameters = ["), d.forEach((h) => {
|
|
2065
2065
|
i(`${h},`, 1);
|
|
2066
|
-
}), i("]")) : i(`let parameters = [${
|
|
2066
|
+
}), i("]")) : i(`let parameters = [${d.join(", ")}]`), i('let joinedParameters = parameters.map { "\\($0.key)=\\($0.value)" }.joined(separator: "&")'), i("let postData = Data(joinedParameters.utf8)"), c();
|
|
2067
2067
|
}
|
|
2068
2068
|
break;
|
|
2069
2069
|
case "application/json":
|
|
2070
|
-
e.jsonObj && (i(`${
|
|
2070
|
+
e.jsonObj && (i(`${$r("parameters", e.jsonObj, a)} as [String : Any?]`), c(), i("let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])"), c());
|
|
2071
2071
|
break;
|
|
2072
2072
|
case "multipart/form-data":
|
|
2073
|
-
i(
|
|
2073
|
+
i($r("parameters", e.params, a)), c(), i(`let boundary = "${e.boundary}"`), c(), i('var body = ""'), i("for param in parameters {"), i('let paramName = param["name"]!', 1), i('body += "--\\(boundary)\\r\\n"', 1), i('body += "Content-Disposition:form-data; name=\\"\\(paramName)\\""', 1), i('if let filename = param["fileName"] {', 1), i('let contentType = param["contentType"]!', 2), i("let fileContent = try String(contentsOfFile: filename, encoding: .utf8)", 2), i('body += "; filename=\\"\\(filename)\\"\\r\\n"', 2), i('body += "Content-Type: \\(contentType)\\r\\n\\r\\n"', 2), i("body += fileContent", 2), i('} else if let paramValue = param["value"] {', 1), i('body += "\\r\\n\\r\\n\\(paramValue)"', 2), i("}", 1), i("}"), c(), i("let postData = Data(body.utf8)"), c();
|
|
2074
2074
|
break;
|
|
2075
2075
|
default:
|
|
2076
2076
|
i(`let postData = Data("${e.text}".utf8)`), c();
|
|
2077
2077
|
}
|
|
2078
2078
|
i(`let url = URL(string: "${r.href}")!`);
|
|
2079
2079
|
const u = n ? Object.entries(n) : [];
|
|
2080
|
-
return u.length < 1 ? i("var request = URLRequest(url: url)") : (i("var components = URLComponents(url: url, resolvingAgainstBaseURL: true)!"), i("let queryItems: [URLQueryItem] = ["), u.forEach((
|
|
2081
|
-
const h =
|
|
2080
|
+
return u.length < 1 ? i("var request = URLRequest(url: url)") : (i("var components = URLComponents(url: url, resolvingAgainstBaseURL: true)!"), i("let queryItems: [URLQueryItem] = ["), u.forEach((d) => {
|
|
2081
|
+
const h = d[0], y = d[1];
|
|
2082
2082
|
switch (Object.prototype.toString.call(y)) {
|
|
2083
2083
|
case "[object String]":
|
|
2084
2084
|
i(`URLQueryItem(name: "${h}", value: "${y}"),`, 1);
|
|
@@ -2093,18 +2093,18 @@ ${o}]` : `[${t.join(a)}]`;
|
|
|
2093
2093
|
}
|
|
2094
2094
|
} }
|
|
2095
2095
|
}
|
|
2096
|
-
},
|
|
2096
|
+
}, vr = (t, e) => {
|
|
2097
2097
|
const r = t[e.name];
|
|
2098
2098
|
return r === void 0 ? (t[e.name] = e.value, t) : Array.isArray(r) ? (r.push(e.value), t) : (t[e.name] = [r, e.value], t);
|
|
2099
2099
|
};
|
|
2100
2100
|
var at = { exports: {} };
|
|
2101
2101
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
2102
|
-
var
|
|
2102
|
+
var ko = at.exports;
|
|
2103
2103
|
(function(t, e) {
|
|
2104
2104
|
(function(r) {
|
|
2105
2105
|
var n = e && !e.nodeType && e, s = t && !t.nodeType && t, o = typeof nt == "object" && nt;
|
|
2106
2106
|
(o.global === o || o.window === o || o.self === o) && (r = o);
|
|
2107
|
-
var a, i = 2147483647, c = 36, l = 1, f = 26, u = 38,
|
|
2107
|
+
var a, i = 2147483647, c = 36, l = 1, f = 26, u = 38, p = 700, d = 72, h = 128, y = "-", g = /^xn--/, b = /[^\x20-\x7E]/, m = /[\x2E\u3002\uFF0E\uFF61]/g, v = {
|
|
2108
2108
|
overflow: "Overflow: input needs wider integers to process",
|
|
2109
2109
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
2110
2110
|
"invalid-input": "Invalid input"
|
|
@@ -2120,12 +2120,12 @@ var xo = at.exports;
|
|
|
2120
2120
|
function J(S, x) {
|
|
2121
2121
|
var E = S.split("@"), R = "";
|
|
2122
2122
|
E.length > 1 && (R = E[0] + "@", S = E[1]), S = S.replace(m, ".");
|
|
2123
|
-
var
|
|
2123
|
+
var N = S.split("."), W = k(N, x).join(".");
|
|
2124
2124
|
return R + W;
|
|
2125
2125
|
}
|
|
2126
2126
|
function Q(S) {
|
|
2127
|
-
for (var x = [], E = 0, R = S.length,
|
|
2128
|
-
|
|
2127
|
+
for (var x = [], E = 0, R = S.length, N, W; E < R; )
|
|
2128
|
+
N = S.charCodeAt(E++), N >= 55296 && N <= 56319 && E < R ? (W = S.charCodeAt(E++), (W & 64512) == 56320 ? x.push(((N & 1023) << 10) + (W & 1023) + 65536) : (x.push(N), E--)) : x.push(N);
|
|
2129
2129
|
return x;
|
|
2130
2130
|
}
|
|
2131
2131
|
function G(S) {
|
|
@@ -2142,26 +2142,26 @@ var xo = at.exports;
|
|
|
2142
2142
|
}
|
|
2143
2143
|
function K(S, x, E) {
|
|
2144
2144
|
var R = 0;
|
|
2145
|
-
for (S = E ? $(S /
|
|
2145
|
+
for (S = E ? $(S / p) : S >> 1, S += $(S / x); S > O * f >> 1; R += c)
|
|
2146
2146
|
S = $(S / O);
|
|
2147
2147
|
return $(R + (O + 1) * S / (S + u));
|
|
2148
2148
|
}
|
|
2149
2149
|
function V(S) {
|
|
2150
|
-
var x = [], E = S.length, R,
|
|
2150
|
+
var x = [], E = S.length, R, N = 0, W = h, F = d, D, Z, re, le, H, X, ee, ue, ye;
|
|
2151
2151
|
for (D = S.lastIndexOf(y), D < 0 && (D = 0), Z = 0; Z < D; ++Z)
|
|
2152
2152
|
S.charCodeAt(Z) >= 128 && T("not-basic"), x.push(S.charCodeAt(Z));
|
|
2153
2153
|
for (re = D > 0 ? D + 1 : 0; re < E; ) {
|
|
2154
|
-
for (le =
|
|
2154
|
+
for (le = N, H = 1, X = c; re >= E && T("invalid-input"), ee = U(S.charCodeAt(re++)), (ee >= c || ee > $((i - N) / H)) && T("overflow"), N += ee * H, ue = X <= F ? l : X >= F + f ? f : X - F, !(ee < ue); X += c)
|
|
2155
2155
|
ye = c - ue, H > $(i / ye) && T("overflow"), H *= ye;
|
|
2156
|
-
R = x.length + 1, F = K(
|
|
2156
|
+
R = x.length + 1, F = K(N - le, R, le == 0), $(N / R) > i - W && T("overflow"), W += $(N / R), N %= R, x.splice(N++, 0, W);
|
|
2157
2157
|
}
|
|
2158
2158
|
return G(x);
|
|
2159
2159
|
}
|
|
2160
2160
|
function Y(S) {
|
|
2161
|
-
var x, E, R,
|
|
2162
|
-
for (S = Q(S), ee = S.length, x = h, E = 0, W =
|
|
2161
|
+
var x, E, R, N, W, F, D, Z, re, le, H, X = [], ee, ue, ye, mt;
|
|
2162
|
+
for (S = Q(S), ee = S.length, x = h, E = 0, W = d, F = 0; F < ee; ++F)
|
|
2163
2163
|
H = S[F], H < 128 && X.push(w(H));
|
|
2164
|
-
for (R =
|
|
2164
|
+
for (R = N = X.length, N && X.push(y); R < ee; ) {
|
|
2165
2165
|
for (D = i, F = 0; F < ee; ++F)
|
|
2166
2166
|
H = S[F], H >= x && H < D && (D = H);
|
|
2167
2167
|
for (ue = R + 1, D - x > $((i - E) / ue) && T("overflow"), E += (D - x) * ue, x = D, F = 0; F < ee; ++F)
|
|
@@ -2170,7 +2170,7 @@ var xo = at.exports;
|
|
|
2170
2170
|
mt = Z - le, ye = c - le, X.push(
|
|
2171
2171
|
w(z(le + mt % ye, 0))
|
|
2172
2172
|
), Z = $(mt / ye);
|
|
2173
|
-
X.push(w(z(Z, 0))), W = K(E, ue, R ==
|
|
2173
|
+
X.push(w(z(Z, 0))), W = K(E, ue, R == N), E = 0, ++R;
|
|
2174
2174
|
}
|
|
2175
2175
|
++E, ++x;
|
|
2176
2176
|
}
|
|
@@ -2181,7 +2181,7 @@ var xo = at.exports;
|
|
|
2181
2181
|
return g.test(x) ? V(x.slice(4).toLowerCase()) : x;
|
|
2182
2182
|
});
|
|
2183
2183
|
}
|
|
2184
|
-
function
|
|
2184
|
+
function qe(S) {
|
|
2185
2185
|
return J(S, function(x) {
|
|
2186
2186
|
return b.test(x) ? "xn--" + Y(x) : x;
|
|
2187
2187
|
});
|
|
@@ -2206,7 +2206,7 @@ var xo = at.exports;
|
|
|
2206
2206
|
},
|
|
2207
2207
|
decode: V,
|
|
2208
2208
|
encode: Y,
|
|
2209
|
-
toASCII:
|
|
2209
|
+
toASCII: qe,
|
|
2210
2210
|
toUnicode: ze
|
|
2211
2211
|
}, n && s)
|
|
2212
2212
|
if (t.exports == n)
|
|
@@ -2216,42 +2216,42 @@ var xo = at.exports;
|
|
|
2216
2216
|
a.hasOwnProperty(C) && (n[C] = a[C]);
|
|
2217
2217
|
else
|
|
2218
2218
|
r.punycode = a;
|
|
2219
|
-
})(
|
|
2219
|
+
})(ko);
|
|
2220
2220
|
})(at, at.exports);
|
|
2221
|
-
var
|
|
2222
|
-
const
|
|
2223
|
-
Object.assign(
|
|
2224
|
-
const
|
|
2221
|
+
var Ao = at.exports, Re = TypeError;
|
|
2222
|
+
const nn = (t) => String(t);
|
|
2223
|
+
Object.assign(nn, { custom: Symbol.for("nodejs.util.inspect.custom") });
|
|
2224
|
+
const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2225
2225
|
__proto__: null,
|
|
2226
|
-
default:
|
|
2227
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2228
|
-
var
|
|
2226
|
+
default: nn
|
|
2227
|
+
}, Symbol.toStringTag, { value: "Module" })), qo = /* @__PURE__ */ In(Ro);
|
|
2228
|
+
var Zt = typeof Map == "function" && Map.prototype, $t = Object.getOwnPropertyDescriptor && Zt ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, st = Zt && $t && typeof $t.get == "function" ? $t.get : null, wr = Zt && Map.prototype.forEach, er = typeof Set == "function" && Set.prototype, vt = Object.getOwnPropertyDescriptor && er ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, ct = er && vt && typeof vt.get == "function" ? vt.get : null, Sr = er && Set.prototype.forEach, No = typeof WeakMap == "function" && WeakMap.prototype, Ie = No ? WeakMap.prototype.has : null, _o = typeof WeakSet == "function" && WeakSet.prototype, Ue = _o ? WeakSet.prototype.has : null, Lo = typeof WeakRef == "function" && WeakRef.prototype, Or = Lo ? WeakRef.prototype.deref : null, Io = Boolean.prototype.valueOf, Uo = Object.prototype.toString, Fo = Function.prototype.toString, Mo = String.prototype.match, tr = String.prototype.slice, de = String.prototype.replace, Ho = String.prototype.toUpperCase, Tr = String.prototype.toLowerCase, on = RegExp.prototype.test, xr = Array.prototype.concat, ae = Array.prototype.join, Bo = Array.prototype.slice, Er = Math.floor, Bt = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, wt = Object.getOwnPropertySymbols, Wt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, ke = typeof Symbol == "function" && typeof Symbol.iterator == "object", Fe = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === ke || !0) ? Symbol.toStringTag : null, an = Object.prototype.propertyIsEnumerable, jr = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
|
|
2229
2229
|
return t.__proto__;
|
|
2230
2230
|
} : null);
|
|
2231
|
-
function
|
|
2232
|
-
if (t === 1 / 0 || t === -1 / 0 || t !== t || t && t > -1e3 && t < 1e3 ||
|
|
2231
|
+
function Pr(t, e) {
|
|
2232
|
+
if (t === 1 / 0 || t === -1 / 0 || t !== t || t && t > -1e3 && t < 1e3 || on.call(/e/, e))
|
|
2233
2233
|
return e;
|
|
2234
2234
|
var r = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
2235
2235
|
if (typeof t == "number") {
|
|
2236
|
-
var n = t < 0 ? -
|
|
2236
|
+
var n = t < 0 ? -Er(-t) : Er(t);
|
|
2237
2237
|
if (n !== t) {
|
|
2238
|
-
var s = String(n), o =
|
|
2238
|
+
var s = String(n), o = tr.call(e, s.length + 1);
|
|
2239
2239
|
return de.call(s, r, "$&_") + "." + de.call(de.call(o, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
2240
2240
|
}
|
|
2241
2241
|
}
|
|
2242
2242
|
return de.call(e, r, "$&_");
|
|
2243
2243
|
}
|
|
2244
|
-
var
|
|
2244
|
+
var Jt = qo, Cr = Jt.custom, kr = ln(Cr) ? Cr : null, sn = {
|
|
2245
2245
|
__proto__: null,
|
|
2246
2246
|
double: '"',
|
|
2247
2247
|
single: "'"
|
|
2248
|
-
},
|
|
2248
|
+
}, Wo = {
|
|
2249
2249
|
__proto__: null,
|
|
2250
2250
|
double: /(["\\])/g,
|
|
2251
2251
|
single: /(['\\])/g
|
|
2252
2252
|
}, ut = function t(e, r, n, s) {
|
|
2253
2253
|
var o = r || {};
|
|
2254
|
-
if (fe(o, "quoteStyle") && !fe(
|
|
2254
|
+
if (fe(o, "quoteStyle") && !fe(sn, o.quoteStyle))
|
|
2255
2255
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
2256
2256
|
if (fe(o, "maxStringLength") && (typeof o.maxStringLength == "number" ? o.maxStringLength < 0 && o.maxStringLength !== 1 / 0 : o.maxStringLength !== null))
|
|
2257
2257
|
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
@@ -2270,27 +2270,27 @@ var Ht = Po, Er = Ht.custom, jr = nn(Er) ? Er : null, tn = {
|
|
|
2270
2270
|
if (typeof e == "boolean")
|
|
2271
2271
|
return e ? "true" : "false";
|
|
2272
2272
|
if (typeof e == "string")
|
|
2273
|
-
return
|
|
2273
|
+
return un(e, o);
|
|
2274
2274
|
if (typeof e == "number") {
|
|
2275
2275
|
if (e === 0)
|
|
2276
2276
|
return 1 / 0 / e > 0 ? "0" : "-0";
|
|
2277
2277
|
var c = String(e);
|
|
2278
|
-
return i ?
|
|
2278
|
+
return i ? Pr(e, c) : c;
|
|
2279
2279
|
}
|
|
2280
2280
|
if (typeof e == "bigint") {
|
|
2281
2281
|
var l = String(e) + "n";
|
|
2282
|
-
return i ?
|
|
2282
|
+
return i ? Pr(e, l) : l;
|
|
2283
2283
|
}
|
|
2284
2284
|
var f = typeof o.depth > "u" ? 5 : o.depth;
|
|
2285
2285
|
if (typeof n > "u" && (n = 0), n >= f && f > 0 && typeof e == "object")
|
|
2286
|
-
return
|
|
2287
|
-
var u =
|
|
2286
|
+
return Gt(e) ? "[Array]" : "[Object]";
|
|
2287
|
+
var u = si(o, n);
|
|
2288
2288
|
if (typeof s > "u")
|
|
2289
2289
|
s = [];
|
|
2290
|
-
else if (
|
|
2290
|
+
else if (fn(s, e) >= 0)
|
|
2291
2291
|
return "[Circular]";
|
|
2292
|
-
function
|
|
2293
|
-
if (z && (s =
|
|
2292
|
+
function p(U, z, K) {
|
|
2293
|
+
if (z && (s = Bo.call(s), s.push(z)), K) {
|
|
2294
2294
|
var V = {
|
|
2295
2295
|
depth: o.depth
|
|
2296
2296
|
};
|
|
@@ -2298,140 +2298,140 @@ var Ht = Po, Er = Ht.custom, jr = nn(Er) ? Er : null, tn = {
|
|
|
2298
2298
|
}
|
|
2299
2299
|
return t(U, o, n + 1, s);
|
|
2300
2300
|
}
|
|
2301
|
-
if (typeof e == "function" && !
|
|
2302
|
-
var
|
|
2303
|
-
return "[Function" + (
|
|
2301
|
+
if (typeof e == "function" && !Ar(e)) {
|
|
2302
|
+
var d = Xo(e), h = Ke(e, p);
|
|
2303
|
+
return "[Function" + (d ? ": " + d : " (anonymous)") + "]" + (h.length > 0 ? " { " + ae.call(h, ", ") + " }" : "");
|
|
2304
2304
|
}
|
|
2305
|
-
if (
|
|
2306
|
-
var y = ke ? de.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") :
|
|
2305
|
+
if (ln(e)) {
|
|
2306
|
+
var y = ke ? de.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : Wt.call(e);
|
|
2307
2307
|
return typeof e == "object" && !ke ? _e(y) : y;
|
|
2308
2308
|
}
|
|
2309
|
-
if (
|
|
2310
|
-
for (var g = "<" +
|
|
2311
|
-
g += " " + b[m].name + "=" +
|
|
2312
|
-
return g += ">", e.childNodes && e.childNodes.length && (g += "..."), g += "</" +
|
|
2309
|
+
if (oi(e)) {
|
|
2310
|
+
for (var g = "<" + Tr.call(String(e.nodeName)), b = e.attributes || [], m = 0; m < b.length; m++)
|
|
2311
|
+
g += " " + b[m].name + "=" + cn(Jo(b[m].value), "double", o);
|
|
2312
|
+
return g += ">", e.childNodes && e.childNodes.length && (g += "..."), g += "</" + Tr.call(String(e.nodeName)) + ">", g;
|
|
2313
2313
|
}
|
|
2314
|
-
if (
|
|
2314
|
+
if (Gt(e)) {
|
|
2315
2315
|
if (e.length === 0)
|
|
2316
2316
|
return "[]";
|
|
2317
|
-
var v = Ke(e,
|
|
2318
|
-
return u && !
|
|
2317
|
+
var v = Ke(e, p);
|
|
2318
|
+
return u && !ai(v) ? "[" + zt(v, u) + "]" : "[ " + ae.call(v, ", ") + " ]";
|
|
2319
2319
|
}
|
|
2320
|
-
if (
|
|
2321
|
-
var O = Ke(e,
|
|
2322
|
-
return !("cause" in Error.prototype) && "cause" in e && !
|
|
2320
|
+
if (zo(e)) {
|
|
2321
|
+
var O = Ke(e, p);
|
|
2322
|
+
return !("cause" in Error.prototype) && "cause" in e && !an.call(e, "cause") ? "{ [" + String(e) + "] " + ae.call(xr.call("[cause]: " + p(e.cause), O), ", ") + " }" : O.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + ae.call(O, ", ") + " }";
|
|
2323
2323
|
}
|
|
2324
2324
|
if (typeof e == "object" && a) {
|
|
2325
|
-
if (
|
|
2326
|
-
return
|
|
2325
|
+
if (kr && typeof e[kr] == "function" && Jt)
|
|
2326
|
+
return Jt(e, { depth: f - n });
|
|
2327
2327
|
if (a !== "symbol" && typeof e.inspect == "function")
|
|
2328
2328
|
return e.inspect();
|
|
2329
2329
|
}
|
|
2330
|
-
if (
|
|
2330
|
+
if (Zo(e)) {
|
|
2331
2331
|
var $ = [];
|
|
2332
|
-
return
|
|
2333
|
-
$.push(
|
|
2334
|
-
}),
|
|
2332
|
+
return wr && wr.call(e, function(U, z) {
|
|
2333
|
+
$.push(p(z, e, !0) + " => " + p(U, e));
|
|
2334
|
+
}), Rr("Map", st.call(e), $, u);
|
|
2335
2335
|
}
|
|
2336
|
-
if (
|
|
2336
|
+
if (ri(e)) {
|
|
2337
2337
|
var w = [];
|
|
2338
|
-
return
|
|
2339
|
-
w.push(
|
|
2340
|
-
}),
|
|
2338
|
+
return Sr && Sr.call(e, function(U) {
|
|
2339
|
+
w.push(p(U, e));
|
|
2340
|
+
}), Rr("Set", ct.call(e), w, u);
|
|
2341
2341
|
}
|
|
2342
|
-
if (
|
|
2342
|
+
if (ei(e))
|
|
2343
2343
|
return St("WeakMap");
|
|
2344
|
-
if (
|
|
2344
|
+
if (ni(e))
|
|
2345
2345
|
return St("WeakSet");
|
|
2346
|
-
if (
|
|
2346
|
+
if (ti(e))
|
|
2347
2347
|
return St("WeakRef");
|
|
2348
|
-
if (
|
|
2349
|
-
return _e(
|
|
2350
|
-
if (
|
|
2351
|
-
return _e(
|
|
2352
|
-
if (
|
|
2353
|
-
return _e(
|
|
2354
|
-
if (
|
|
2355
|
-
return _e(
|
|
2348
|
+
if (Ko(e))
|
|
2349
|
+
return _e(p(Number(e)));
|
|
2350
|
+
if (Qo(e))
|
|
2351
|
+
return _e(p(Bt.call(e)));
|
|
2352
|
+
if (Do(e))
|
|
2353
|
+
return _e(Io.call(e));
|
|
2354
|
+
if (Vo(e))
|
|
2355
|
+
return _e(p(String(e)));
|
|
2356
2356
|
if (typeof window < "u" && e === window)
|
|
2357
2357
|
return "{ [object Window] }";
|
|
2358
2358
|
if (typeof globalThis < "u" && e === globalThis || typeof nt < "u" && e === nt)
|
|
2359
2359
|
return "{ [object globalThis] }";
|
|
2360
|
-
if (!
|
|
2361
|
-
var C = Ke(e,
|
|
2362
|
-
return C.length === 0 ? G + "{}" : u ? G + "{" +
|
|
2360
|
+
if (!Go(e) && !Ar(e)) {
|
|
2361
|
+
var C = Ke(e, p), T = jr ? jr(e) === Object.prototype : e instanceof Object || e.constructor === Object, k = e instanceof Object ? "" : "null prototype", J = !T && Fe && Object(e) === e && Fe in e ? tr.call(he(e), 8, -1) : k ? "Object" : "", Q = T || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", G = Q + (J || k ? "[" + ae.call(xr.call([], J || [], k || []), ": ") + "] " : "");
|
|
2362
|
+
return C.length === 0 ? G + "{}" : u ? G + "{" + zt(C, u) + "}" : G + "{ " + ae.call(C, ", ") + " }";
|
|
2363
2363
|
}
|
|
2364
2364
|
return String(e);
|
|
2365
2365
|
};
|
|
2366
|
-
function
|
|
2367
|
-
var n = r.quoteStyle || e, s =
|
|
2366
|
+
function cn(t, e, r) {
|
|
2367
|
+
var n = r.quoteStyle || e, s = sn[n];
|
|
2368
2368
|
return s + t + s;
|
|
2369
2369
|
}
|
|
2370
|
-
function
|
|
2370
|
+
function Jo(t) {
|
|
2371
2371
|
return de.call(String(t), /"/g, """);
|
|
2372
2372
|
}
|
|
2373
2373
|
function $e(t) {
|
|
2374
2374
|
return !Fe || !(typeof t == "object" && (Fe in t || typeof t[Fe] < "u"));
|
|
2375
2375
|
}
|
|
2376
|
-
function
|
|
2376
|
+
function Gt(t) {
|
|
2377
2377
|
return he(t) === "[object Array]" && $e(t);
|
|
2378
2378
|
}
|
|
2379
|
-
function
|
|
2379
|
+
function Go(t) {
|
|
2380
2380
|
return he(t) === "[object Date]" && $e(t);
|
|
2381
2381
|
}
|
|
2382
|
-
function
|
|
2382
|
+
function Ar(t) {
|
|
2383
2383
|
return he(t) === "[object RegExp]" && $e(t);
|
|
2384
2384
|
}
|
|
2385
|
-
function
|
|
2385
|
+
function zo(t) {
|
|
2386
2386
|
return he(t) === "[object Error]" && $e(t);
|
|
2387
2387
|
}
|
|
2388
|
-
function
|
|
2388
|
+
function Vo(t) {
|
|
2389
2389
|
return he(t) === "[object String]" && $e(t);
|
|
2390
2390
|
}
|
|
2391
|
-
function
|
|
2391
|
+
function Ko(t) {
|
|
2392
2392
|
return he(t) === "[object Number]" && $e(t);
|
|
2393
2393
|
}
|
|
2394
|
-
function
|
|
2394
|
+
function Do(t) {
|
|
2395
2395
|
return he(t) === "[object Boolean]" && $e(t);
|
|
2396
2396
|
}
|
|
2397
|
-
function
|
|
2397
|
+
function ln(t) {
|
|
2398
2398
|
if (ke)
|
|
2399
2399
|
return t && typeof t == "object" && t instanceof Symbol;
|
|
2400
2400
|
if (typeof t == "symbol")
|
|
2401
2401
|
return !0;
|
|
2402
|
-
if (!t || typeof t != "object" || !
|
|
2402
|
+
if (!t || typeof t != "object" || !Wt)
|
|
2403
2403
|
return !1;
|
|
2404
2404
|
try {
|
|
2405
|
-
return
|
|
2405
|
+
return Wt.call(t), !0;
|
|
2406
2406
|
} catch {
|
|
2407
2407
|
}
|
|
2408
2408
|
return !1;
|
|
2409
2409
|
}
|
|
2410
|
-
function
|
|
2411
|
-
if (!t || typeof t != "object" || !
|
|
2410
|
+
function Qo(t) {
|
|
2411
|
+
if (!t || typeof t != "object" || !Bt)
|
|
2412
2412
|
return !1;
|
|
2413
2413
|
try {
|
|
2414
|
-
return
|
|
2414
|
+
return Bt.call(t), !0;
|
|
2415
2415
|
} catch {
|
|
2416
2416
|
}
|
|
2417
2417
|
return !1;
|
|
2418
2418
|
}
|
|
2419
|
-
var
|
|
2419
|
+
var Yo = Object.prototype.hasOwnProperty || function(t) {
|
|
2420
2420
|
return t in this;
|
|
2421
2421
|
};
|
|
2422
2422
|
function fe(t, e) {
|
|
2423
|
-
return
|
|
2423
|
+
return Yo.call(t, e);
|
|
2424
2424
|
}
|
|
2425
2425
|
function he(t) {
|
|
2426
|
-
return
|
|
2426
|
+
return Uo.call(t);
|
|
2427
2427
|
}
|
|
2428
|
-
function
|
|
2428
|
+
function Xo(t) {
|
|
2429
2429
|
if (t.name)
|
|
2430
2430
|
return t.name;
|
|
2431
|
-
var e =
|
|
2431
|
+
var e = Mo.call(Fo.call(t), /^function\s*([\w$]+)/);
|
|
2432
2432
|
return e ? e[1] : null;
|
|
2433
2433
|
}
|
|
2434
|
-
function
|
|
2434
|
+
function fn(t, e) {
|
|
2435
2435
|
if (t.indexOf)
|
|
2436
2436
|
return t.indexOf(e);
|
|
2437
2437
|
for (var r = 0, n = t.length; r < n; r++)
|
|
@@ -2439,7 +2439,7 @@ function on(t, e) {
|
|
|
2439
2439
|
return r;
|
|
2440
2440
|
return -1;
|
|
2441
2441
|
}
|
|
2442
|
-
function
|
|
2442
|
+
function Zo(t) {
|
|
2443
2443
|
if (!st || !t || typeof t != "object")
|
|
2444
2444
|
return !1;
|
|
2445
2445
|
try {
|
|
@@ -2454,7 +2454,7 @@ function Ko(t) {
|
|
|
2454
2454
|
}
|
|
2455
2455
|
return !1;
|
|
2456
2456
|
}
|
|
2457
|
-
function
|
|
2457
|
+
function ei(t) {
|
|
2458
2458
|
if (!Ie || !t || typeof t != "object")
|
|
2459
2459
|
return !1;
|
|
2460
2460
|
try {
|
|
@@ -2469,16 +2469,16 @@ function Do(t) {
|
|
|
2469
2469
|
}
|
|
2470
2470
|
return !1;
|
|
2471
2471
|
}
|
|
2472
|
-
function
|
|
2473
|
-
if (!
|
|
2472
|
+
function ti(t) {
|
|
2473
|
+
if (!Or || !t || typeof t != "object")
|
|
2474
2474
|
return !1;
|
|
2475
2475
|
try {
|
|
2476
|
-
return
|
|
2476
|
+
return Or.call(t), !0;
|
|
2477
2477
|
} catch {
|
|
2478
2478
|
}
|
|
2479
2479
|
return !1;
|
|
2480
2480
|
}
|
|
2481
|
-
function
|
|
2481
|
+
function ri(t) {
|
|
2482
2482
|
if (!ct || !t || typeof t != "object")
|
|
2483
2483
|
return !1;
|
|
2484
2484
|
try {
|
|
@@ -2493,7 +2493,7 @@ function Yo(t) {
|
|
|
2493
2493
|
}
|
|
2494
2494
|
return !1;
|
|
2495
2495
|
}
|
|
2496
|
-
function
|
|
2496
|
+
function ni(t) {
|
|
2497
2497
|
if (!Ue || !t || typeof t != "object")
|
|
2498
2498
|
return !1;
|
|
2499
2499
|
try {
|
|
@@ -2508,20 +2508,20 @@ function Xo(t) {
|
|
|
2508
2508
|
}
|
|
2509
2509
|
return !1;
|
|
2510
2510
|
}
|
|
2511
|
-
function
|
|
2511
|
+
function oi(t) {
|
|
2512
2512
|
return !t || typeof t != "object" ? !1 : typeof HTMLElement < "u" && t instanceof HTMLElement ? !0 : typeof t.nodeName == "string" && typeof t.getAttribute == "function";
|
|
2513
2513
|
}
|
|
2514
|
-
function
|
|
2514
|
+
function un(t, e) {
|
|
2515
2515
|
if (t.length > e.maxStringLength) {
|
|
2516
2516
|
var r = t.length - e.maxStringLength, n = "... " + r + " more character" + (r > 1 ? "s" : "");
|
|
2517
|
-
return
|
|
2517
|
+
return un(tr.call(t, 0, e.maxStringLength), e) + n;
|
|
2518
2518
|
}
|
|
2519
|
-
var s =
|
|
2519
|
+
var s = Wo[e.quoteStyle || "single"];
|
|
2520
2520
|
s.lastIndex = 0;
|
|
2521
|
-
var o = de.call(de.call(t, s, "\\$1"), /[\x00-\x1f]/g,
|
|
2522
|
-
return
|
|
2521
|
+
var o = de.call(de.call(t, s, "\\$1"), /[\x00-\x1f]/g, ii);
|
|
2522
|
+
return cn(o, "single", e);
|
|
2523
2523
|
}
|
|
2524
|
-
function
|
|
2524
|
+
function ii(t) {
|
|
2525
2525
|
var e = t.charCodeAt(0), r = {
|
|
2526
2526
|
8: "b",
|
|
2527
2527
|
9: "t",
|
|
@@ -2529,7 +2529,7 @@ function ei(t) {
|
|
|
2529
2529
|
12: "f",
|
|
2530
2530
|
13: "r"
|
|
2531
2531
|
}[e];
|
|
2532
|
-
return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") +
|
|
2532
|
+
return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + Ho.call(e.toString(16));
|
|
2533
2533
|
}
|
|
2534
2534
|
function _e(t) {
|
|
2535
2535
|
return "Object(" + t + ")";
|
|
@@ -2537,18 +2537,18 @@ function _e(t) {
|
|
|
2537
2537
|
function St(t) {
|
|
2538
2538
|
return t + " { ? }";
|
|
2539
2539
|
}
|
|
2540
|
-
function
|
|
2541
|
-
var s = n ?
|
|
2540
|
+
function Rr(t, e, r, n) {
|
|
2541
|
+
var s = n ? zt(r, n) : ae.call(r, ", ");
|
|
2542
2542
|
return t + " (" + e + ") {" + s + "}";
|
|
2543
2543
|
}
|
|
2544
|
-
function
|
|
2544
|
+
function ai(t) {
|
|
2545
2545
|
for (var e = 0; e < t.length; e++)
|
|
2546
|
-
if (
|
|
2546
|
+
if (fn(t[e], `
|
|
2547
2547
|
`) >= 0)
|
|
2548
2548
|
return !1;
|
|
2549
2549
|
return !0;
|
|
2550
2550
|
}
|
|
2551
|
-
function
|
|
2551
|
+
function si(t, e) {
|
|
2552
2552
|
var r;
|
|
2553
2553
|
if (t.indent === " ")
|
|
2554
2554
|
r = " ";
|
|
@@ -2561,7 +2561,7 @@ function ri(t, e) {
|
|
|
2561
2561
|
prev: ae.call(Array(e + 1), r)
|
|
2562
2562
|
};
|
|
2563
2563
|
}
|
|
2564
|
-
function
|
|
2564
|
+
function zt(t, e) {
|
|
2565
2565
|
if (t.length === 0)
|
|
2566
2566
|
return "";
|
|
2567
2567
|
var r = `
|
|
@@ -2570,7 +2570,7 @@ function Wt(t, e) {
|
|
|
2570
2570
|
` + e.prev;
|
|
2571
2571
|
}
|
|
2572
2572
|
function Ke(t, e) {
|
|
2573
|
-
var r =
|
|
2573
|
+
var r = Gt(t), n = [];
|
|
2574
2574
|
if (r) {
|
|
2575
2575
|
n.length = t.length;
|
|
2576
2576
|
for (var s = 0; s < t.length; s++)
|
|
@@ -2583,23 +2583,23 @@ function Ke(t, e) {
|
|
|
2583
2583
|
a["$" + o[i]] = o[i];
|
|
2584
2584
|
}
|
|
2585
2585
|
for (var c in t)
|
|
2586
|
-
fe(t, c) && (r && String(Number(c)) === c && c < t.length || ke && a["$" + c] instanceof Symbol || (
|
|
2586
|
+
fe(t, c) && (r && String(Number(c)) === c && c < t.length || ke && a["$" + c] instanceof Symbol || (on.call(/[^\w$]/, c) ? n.push(e(c, t) + ": " + e(t[c], t)) : n.push(c + ": " + e(t[c], t))));
|
|
2587
2587
|
if (typeof wt == "function")
|
|
2588
2588
|
for (var l = 0; l < o.length; l++)
|
|
2589
|
-
|
|
2589
|
+
an.call(t, o[l]) && n.push("[" + e(o[l]) + "]: " + e(t[o[l]], t));
|
|
2590
2590
|
return n;
|
|
2591
2591
|
}
|
|
2592
|
-
var
|
|
2592
|
+
var ci = ut, li = Re, pt = function(t, e, r) {
|
|
2593
2593
|
for (var n = t, s; (s = n.next) != null; n = s)
|
|
2594
2594
|
if (s.key === e)
|
|
2595
2595
|
return n.next = s.next, r || (s.next = /** @type {NonNullable<typeof list.next>} */
|
|
2596
2596
|
t.next, t.next = s), s;
|
|
2597
|
-
},
|
|
2597
|
+
}, fi = function(t, e) {
|
|
2598
2598
|
if (t) {
|
|
2599
2599
|
var r = pt(t, e);
|
|
2600
2600
|
return r && r.value;
|
|
2601
2601
|
}
|
|
2602
|
-
},
|
|
2602
|
+
}, ui = function(t, e, r) {
|
|
2603
2603
|
var n = pt(t, e);
|
|
2604
2604
|
n ? n.value = r : t.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
|
|
2605
2605
|
{
|
|
@@ -2608,31 +2608,31 @@ var ni = ut, oi = Re, pt = function(t, e, r) {
|
|
|
2608
2608
|
next: t.next,
|
|
2609
2609
|
value: r
|
|
2610
2610
|
};
|
|
2611
|
-
},
|
|
2611
|
+
}, pi = function(t, e) {
|
|
2612
2612
|
return t ? !!pt(t, e) : !1;
|
|
2613
|
-
},
|
|
2613
|
+
}, di = function(t, e) {
|
|
2614
2614
|
if (t)
|
|
2615
2615
|
return pt(t, e, !0);
|
|
2616
|
-
},
|
|
2616
|
+
}, hi = function() {
|
|
2617
2617
|
var e, r = {
|
|
2618
2618
|
assert: function(n) {
|
|
2619
2619
|
if (!r.has(n))
|
|
2620
|
-
throw new
|
|
2620
|
+
throw new li("Side channel does not contain " + ci(n));
|
|
2621
2621
|
},
|
|
2622
2622
|
delete: function(n) {
|
|
2623
|
-
var s =
|
|
2623
|
+
var s = di(e, n);
|
|
2624
2624
|
return s && e && !e.next && (e = void 0), !!s;
|
|
2625
2625
|
},
|
|
2626
2626
|
get: function(n) {
|
|
2627
|
-
return
|
|
2627
|
+
return fi(e, n);
|
|
2628
2628
|
},
|
|
2629
2629
|
has: function(n) {
|
|
2630
|
-
return
|
|
2630
|
+
return pi(e, n);
|
|
2631
2631
|
},
|
|
2632
2632
|
set: function(n, s) {
|
|
2633
2633
|
e || (e = {
|
|
2634
2634
|
next: void 0
|
|
2635
|
-
}),
|
|
2635
|
+
}), ui(
|
|
2636
2636
|
/** @type {NonNullable<typeof $o>} */
|
|
2637
2637
|
e,
|
|
2638
2638
|
n,
|
|
@@ -2641,27 +2641,27 @@ var ni = ut, oi = Re, pt = function(t, e, r) {
|
|
|
2641
2641
|
}
|
|
2642
2642
|
};
|
|
2643
2643
|
return r;
|
|
2644
|
-
},
|
|
2644
|
+
}, pn = Object, yi = Error, mi = EvalError, gi = RangeError, bi = ReferenceError, $i = SyntaxError, vi = URIError, wi = Math.abs, Si = Math.floor, Oi = Math.max, Ti = Math.min, xi = Math.pow, Ei = Math.round, ji = Number.isNaN || function(e) {
|
|
2645
2645
|
return e !== e;
|
|
2646
|
-
},
|
|
2647
|
-
return
|
|
2648
|
-
},
|
|
2646
|
+
}, Pi = ji, Ci = function(e) {
|
|
2647
|
+
return Pi(e) || e === 0 ? e : e < 0 ? -1 : 1;
|
|
2648
|
+
}, ki = Object.getOwnPropertyDescriptor, Xe = ki;
|
|
2649
2649
|
if (Xe)
|
|
2650
2650
|
try {
|
|
2651
2651
|
Xe([], "length");
|
|
2652
2652
|
} catch {
|
|
2653
2653
|
Xe = null;
|
|
2654
2654
|
}
|
|
2655
|
-
var
|
|
2655
|
+
var dn = Xe, Ze = Object.defineProperty || !1;
|
|
2656
2656
|
if (Ze)
|
|
2657
2657
|
try {
|
|
2658
2658
|
Ze({}, "a", { value: 1 });
|
|
2659
2659
|
} catch {
|
|
2660
2660
|
Ze = !1;
|
|
2661
2661
|
}
|
|
2662
|
-
var
|
|
2663
|
-
function
|
|
2664
|
-
return
|
|
2662
|
+
var hn = Ze, Ot, qr;
|
|
2663
|
+
function Ai() {
|
|
2664
|
+
return qr || (qr = 1, Ot = function() {
|
|
2665
2665
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2666
2666
|
return !1;
|
|
2667
2667
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2689,77 +2689,95 @@ function Ei() {
|
|
|
2689
2689
|
return !0;
|
|
2690
2690
|
}), Ot;
|
|
2691
2691
|
}
|
|
2692
|
-
var Tt,
|
|
2693
|
-
function
|
|
2694
|
-
if (
|
|
2695
|
-
|
|
2696
|
-
var t = typeof Symbol < "u" && Symbol, e =
|
|
2692
|
+
var Tt, Nr;
|
|
2693
|
+
function Ri() {
|
|
2694
|
+
if (Nr) return Tt;
|
|
2695
|
+
Nr = 1;
|
|
2696
|
+
var t = typeof Symbol < "u" && Symbol, e = Ai();
|
|
2697
2697
|
return Tt = function() {
|
|
2698
2698
|
return typeof t != "function" || typeof Symbol != "function" || typeof t("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : e();
|
|
2699
2699
|
}, Tt;
|
|
2700
2700
|
}
|
|
2701
|
-
var xt,
|
|
2702
|
-
function
|
|
2703
|
-
return
|
|
2701
|
+
var xt, _r;
|
|
2702
|
+
function yn() {
|
|
2703
|
+
return _r || (_r = 1, xt = typeof Reflect < "u" && Reflect.getPrototypeOf || null), xt;
|
|
2704
2704
|
}
|
|
2705
|
-
var Et,
|
|
2706
|
-
function
|
|
2707
|
-
if (
|
|
2708
|
-
|
|
2709
|
-
var t =
|
|
2705
|
+
var Et, Lr;
|
|
2706
|
+
function mn() {
|
|
2707
|
+
if (Lr) return Et;
|
|
2708
|
+
Lr = 1;
|
|
2709
|
+
var t = pn;
|
|
2710
2710
|
return Et = t.getPrototypeOf || null, Et;
|
|
2711
2711
|
}
|
|
2712
|
-
var
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
},
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
},
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2712
|
+
var jt, Ir;
|
|
2713
|
+
function qi() {
|
|
2714
|
+
if (Ir) return jt;
|
|
2715
|
+
Ir = 1;
|
|
2716
|
+
var t = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, r = Math.max, n = "[object Function]", s = function(c, l) {
|
|
2717
|
+
for (var f = [], u = 0; u < c.length; u += 1)
|
|
2718
|
+
f[u] = c[u];
|
|
2719
|
+
for (var p = 0; p < l.length; p += 1)
|
|
2720
|
+
f[p + c.length] = l[p];
|
|
2721
|
+
return f;
|
|
2722
|
+
}, o = function(c, l) {
|
|
2723
|
+
for (var f = [], u = l, p = 0; u < c.length; u += 1, p += 1)
|
|
2724
|
+
f[p] = c[u];
|
|
2725
|
+
return f;
|
|
2726
|
+
}, a = function(i, c) {
|
|
2727
|
+
for (var l = "", f = 0; f < i.length; f += 1)
|
|
2728
|
+
l += i[f], f + 1 < i.length && (l += c);
|
|
2729
|
+
return l;
|
|
2730
|
+
};
|
|
2731
|
+
return jt = function(c) {
|
|
2732
|
+
var l = this;
|
|
2733
|
+
if (typeof l != "function" || e.apply(l) !== n)
|
|
2734
|
+
throw new TypeError(t + l);
|
|
2735
|
+
for (var f = o(arguments, 1), u, p = function() {
|
|
2736
|
+
if (this instanceof u) {
|
|
2737
|
+
var b = l.apply(
|
|
2738
|
+
this,
|
|
2739
|
+
s(f, arguments)
|
|
2740
|
+
);
|
|
2741
|
+
return Object(b) === b ? b : this;
|
|
2742
|
+
}
|
|
2743
|
+
return l.apply(
|
|
2744
|
+
c,
|
|
2745
|
+
s(f, arguments)
|
|
2735
2746
|
);
|
|
2736
|
-
|
|
2747
|
+
}, d = r(0, l.length - f.length), h = [], y = 0; y < d; y++)
|
|
2748
|
+
h[y] = "$" + y;
|
|
2749
|
+
if (u = Function("binder", "return function (" + a(h, ",") + "){ return binder.apply(this,arguments); }")(p), l.prototype) {
|
|
2750
|
+
var g = function() {
|
|
2751
|
+
};
|
|
2752
|
+
g.prototype = l.prototype, u.prototype = new g(), g.prototype = null;
|
|
2737
2753
|
}
|
|
2738
|
-
return
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
l.prototype = r.prototype, s.prototype = new l(), l.prototype = null;
|
|
2748
|
-
}
|
|
2749
|
-
return s;
|
|
2750
|
-
}, _i = qi, dt = Function.prototype.bind || _i, Zt = Function.prototype.call, jt, _r;
|
|
2751
|
-
function pn() {
|
|
2752
|
-
return _r || (_r = 1, jt = Function.prototype.apply), jt;
|
|
2754
|
+
return u;
|
|
2755
|
+
}, jt;
|
|
2756
|
+
}
|
|
2757
|
+
var Pt, Ur;
|
|
2758
|
+
function dt() {
|
|
2759
|
+
if (Ur) return Pt;
|
|
2760
|
+
Ur = 1;
|
|
2761
|
+
var t = qi();
|
|
2762
|
+
return Pt = Function.prototype.bind || t, Pt;
|
|
2753
2763
|
}
|
|
2754
|
-
var
|
|
2764
|
+
var Ct, Fr;
|
|
2765
|
+
function rr() {
|
|
2766
|
+
return Fr || (Fr = 1, Ct = Function.prototype.call), Ct;
|
|
2767
|
+
}
|
|
2768
|
+
var kt, Mr;
|
|
2769
|
+
function gn() {
|
|
2770
|
+
return Mr || (Mr = 1, kt = Function.prototype.apply), kt;
|
|
2771
|
+
}
|
|
2772
|
+
var Ni = typeof Reflect < "u" && Reflect && Reflect.apply, _i = dt(), Li = gn(), Ii = rr(), Ui = Ni, Fi = Ui || _i.call(Ii, Li), Mi = dt(), Hi = Re, Bi = rr(), Wi = Fi, bn = function(e) {
|
|
2755
2773
|
if (e.length < 1 || typeof e[0] != "function")
|
|
2756
|
-
throw new
|
|
2757
|
-
return
|
|
2758
|
-
},
|
|
2759
|
-
function
|
|
2760
|
-
if (
|
|
2761
|
-
|
|
2762
|
-
var t =
|
|
2774
|
+
throw new Hi("a function is required");
|
|
2775
|
+
return Wi(Mi, Bi, e);
|
|
2776
|
+
}, At, Hr;
|
|
2777
|
+
function Ji() {
|
|
2778
|
+
if (Hr) return At;
|
|
2779
|
+
Hr = 1;
|
|
2780
|
+
var t = bn, e = dn, r;
|
|
2763
2781
|
try {
|
|
2764
2782
|
r = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
2765
2783
|
[].__proto__ === Array.prototype;
|
|
@@ -2772,19 +2790,19 @@ function zi() {
|
|
|
2772
2790
|
/** @type {keyof typeof Object.prototype} */
|
|
2773
2791
|
"__proto__"
|
|
2774
2792
|
), s = Object, o = s.getPrototypeOf;
|
|
2775
|
-
return
|
|
2793
|
+
return At = n && typeof n.get == "function" ? t([n.get]) : typeof o == "function" ? (
|
|
2776
2794
|
/** @type {import('./get')} */
|
|
2777
2795
|
function(i) {
|
|
2778
2796
|
return o(i == null ? i : s(i));
|
|
2779
2797
|
}
|
|
2780
|
-
) : !1,
|
|
2798
|
+
) : !1, At;
|
|
2781
2799
|
}
|
|
2782
|
-
var
|
|
2783
|
-
function
|
|
2784
|
-
if (
|
|
2785
|
-
|
|
2786
|
-
var t =
|
|
2787
|
-
return
|
|
2800
|
+
var Rt, Br;
|
|
2801
|
+
function Gi() {
|
|
2802
|
+
if (Br) return Rt;
|
|
2803
|
+
Br = 1;
|
|
2804
|
+
var t = yn(), e = mn(), r = /* @__PURE__ */ Ji();
|
|
2805
|
+
return Rt = t ? function(s) {
|
|
2788
2806
|
return t(s);
|
|
2789
2807
|
} : e ? function(s) {
|
|
2790
2808
|
if (!s || typeof s != "object" && typeof s != "function")
|
|
@@ -2792,33 +2810,33 @@ function Vi() {
|
|
|
2792
2810
|
return e(s);
|
|
2793
2811
|
} : r ? function(s) {
|
|
2794
2812
|
return r(s);
|
|
2795
|
-
} : null,
|
|
2813
|
+
} : null, Rt;
|
|
2796
2814
|
}
|
|
2797
|
-
var
|
|
2798
|
-
function
|
|
2799
|
-
if (
|
|
2800
|
-
|
|
2801
|
-
var t = Function.prototype.call, e = Object.prototype.hasOwnProperty, r = dt;
|
|
2802
|
-
return
|
|
2815
|
+
var qt, Wr;
|
|
2816
|
+
function zi() {
|
|
2817
|
+
if (Wr) return qt;
|
|
2818
|
+
Wr = 1;
|
|
2819
|
+
var t = Function.prototype.call, e = Object.prototype.hasOwnProperty, r = dt();
|
|
2820
|
+
return qt = r.call(t, e), qt;
|
|
2803
2821
|
}
|
|
2804
|
-
var P,
|
|
2822
|
+
var P, Vi = pn, Ki = yi, Di = mi, Qi = gi, Yi = bi, Ae = $i, je = Re, Xi = vi, Zi = wi, ea = Si, ta = Oi, ra = Ti, na = xi, oa = Ei, ia = Ci, $n = Function, Nt = function(t) {
|
|
2805
2823
|
try {
|
|
2806
|
-
return
|
|
2824
|
+
return $n('"use strict"; return (' + t + ").constructor;")();
|
|
2807
2825
|
} catch {
|
|
2808
2826
|
}
|
|
2809
|
-
}, Be =
|
|
2827
|
+
}, Be = dn, aa = hn, _t = function() {
|
|
2810
2828
|
throw new je();
|
|
2811
|
-
},
|
|
2829
|
+
}, sa = Be ? (function() {
|
|
2812
2830
|
try {
|
|
2813
|
-
return arguments.callee,
|
|
2831
|
+
return arguments.callee, _t;
|
|
2814
2832
|
} catch {
|
|
2815
2833
|
try {
|
|
2816
2834
|
return Be(arguments, "callee").get;
|
|
2817
2835
|
} catch {
|
|
2818
|
-
return
|
|
2836
|
+
return _t;
|
|
2819
2837
|
}
|
|
2820
2838
|
}
|
|
2821
|
-
})() :
|
|
2839
|
+
})() : _t, ve = Ri()(), I = Gi(), ca = mn(), la = yn(), vn = gn(), We = rr(), Se = {}, fa = typeof Uint8Array > "u" || !I ? P : I(Uint8Array), be = {
|
|
2822
2840
|
__proto__: null,
|
|
2823
2841
|
"%AggregateError%": typeof AggregateError > "u" ? P : AggregateError,
|
|
2824
2842
|
"%Array%": Array,
|
|
@@ -2840,15 +2858,15 @@ var P, Di = sn, Qi = fi, Yi = ui, Xi = pi, Zi = di, Ae = hi, je = Re, ea = yi, t
|
|
|
2840
2858
|
"%decodeURIComponent%": decodeURIComponent,
|
|
2841
2859
|
"%encodeURI%": encodeURI,
|
|
2842
2860
|
"%encodeURIComponent%": encodeURIComponent,
|
|
2843
|
-
"%Error%":
|
|
2861
|
+
"%Error%": Ki,
|
|
2844
2862
|
"%eval%": eval,
|
|
2845
2863
|
// eslint-disable-line no-eval
|
|
2846
|
-
"%EvalError%":
|
|
2864
|
+
"%EvalError%": Di,
|
|
2847
2865
|
"%Float16Array%": typeof Float16Array > "u" ? P : Float16Array,
|
|
2848
2866
|
"%Float32Array%": typeof Float32Array > "u" ? P : Float32Array,
|
|
2849
2867
|
"%Float64Array%": typeof Float64Array > "u" ? P : Float64Array,
|
|
2850
2868
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? P : FinalizationRegistry,
|
|
2851
|
-
"%Function%":
|
|
2869
|
+
"%Function%": $n,
|
|
2852
2870
|
"%GeneratorFunction%": Se,
|
|
2853
2871
|
"%Int8Array%": typeof Int8Array > "u" ? P : Int8Array,
|
|
2854
2872
|
"%Int16Array%": typeof Int16Array > "u" ? P : Int16Array,
|
|
@@ -2861,14 +2879,14 @@ var P, Di = sn, Qi = fi, Yi = ui, Xi = pi, Zi = di, Ae = hi, je = Re, ea = yi, t
|
|
|
2861
2879
|
"%MapIteratorPrototype%": typeof Map > "u" || !ve || !I ? P : I((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
2862
2880
|
"%Math%": Math,
|
|
2863
2881
|
"%Number%": Number,
|
|
2864
|
-
"%Object%":
|
|
2882
|
+
"%Object%": Vi,
|
|
2865
2883
|
"%Object.getOwnPropertyDescriptor%": Be,
|
|
2866
2884
|
"%parseFloat%": parseFloat,
|
|
2867
2885
|
"%parseInt%": parseInt,
|
|
2868
2886
|
"%Promise%": typeof Promise > "u" ? P : Promise,
|
|
2869
2887
|
"%Proxy%": typeof Proxy > "u" ? P : Proxy,
|
|
2870
|
-
"%RangeError%":
|
|
2871
|
-
"%ReferenceError%":
|
|
2888
|
+
"%RangeError%": Qi,
|
|
2889
|
+
"%ReferenceError%": Yi,
|
|
2872
2890
|
"%Reflect%": typeof Reflect > "u" ? P : Reflect,
|
|
2873
2891
|
"%RegExp%": RegExp,
|
|
2874
2892
|
"%Set%": typeof Set > "u" ? P : Set,
|
|
@@ -2878,45 +2896,45 @@ var P, Di = sn, Qi = fi, Yi = ui, Xi = pi, Zi = di, Ae = hi, je = Re, ea = yi, t
|
|
|
2878
2896
|
"%StringIteratorPrototype%": ve && I ? I(""[Symbol.iterator]()) : P,
|
|
2879
2897
|
"%Symbol%": ve ? Symbol : P,
|
|
2880
2898
|
"%SyntaxError%": Ae,
|
|
2881
|
-
"%ThrowTypeError%":
|
|
2882
|
-
"%TypedArray%":
|
|
2899
|
+
"%ThrowTypeError%": sa,
|
|
2900
|
+
"%TypedArray%": fa,
|
|
2883
2901
|
"%TypeError%": je,
|
|
2884
2902
|
"%Uint8Array%": typeof Uint8Array > "u" ? P : Uint8Array,
|
|
2885
2903
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? P : Uint8ClampedArray,
|
|
2886
2904
|
"%Uint16Array%": typeof Uint16Array > "u" ? P : Uint16Array,
|
|
2887
2905
|
"%Uint32Array%": typeof Uint32Array > "u" ? P : Uint32Array,
|
|
2888
|
-
"%URIError%":
|
|
2906
|
+
"%URIError%": Xi,
|
|
2889
2907
|
"%WeakMap%": typeof WeakMap > "u" ? P : WeakMap,
|
|
2890
2908
|
"%WeakRef%": typeof WeakRef > "u" ? P : WeakRef,
|
|
2891
2909
|
"%WeakSet%": typeof WeakSet > "u" ? P : WeakSet,
|
|
2892
2910
|
"%Function.prototype.call%": We,
|
|
2893
|
-
"%Function.prototype.apply%":
|
|
2894
|
-
"%Object.defineProperty%":
|
|
2895
|
-
"%Object.getPrototypeOf%":
|
|
2896
|
-
"%Math.abs%":
|
|
2897
|
-
"%Math.floor%":
|
|
2898
|
-
"%Math.max%":
|
|
2899
|
-
"%Math.min%":
|
|
2900
|
-
"%Math.pow%":
|
|
2901
|
-
"%Math.round%":
|
|
2902
|
-
"%Math.sign%":
|
|
2903
|
-
"%Reflect.getPrototypeOf%":
|
|
2911
|
+
"%Function.prototype.apply%": vn,
|
|
2912
|
+
"%Object.defineProperty%": aa,
|
|
2913
|
+
"%Object.getPrototypeOf%": ca,
|
|
2914
|
+
"%Math.abs%": Zi,
|
|
2915
|
+
"%Math.floor%": ea,
|
|
2916
|
+
"%Math.max%": ta,
|
|
2917
|
+
"%Math.min%": ra,
|
|
2918
|
+
"%Math.pow%": na,
|
|
2919
|
+
"%Math.round%": oa,
|
|
2920
|
+
"%Math.sign%": ia,
|
|
2921
|
+
"%Reflect.getPrototypeOf%": la
|
|
2904
2922
|
};
|
|
2905
2923
|
if (I)
|
|
2906
2924
|
try {
|
|
2907
2925
|
null.error;
|
|
2908
2926
|
} catch (t) {
|
|
2909
|
-
var
|
|
2910
|
-
be["%Error.prototype%"] =
|
|
2927
|
+
var ua = I(I(t));
|
|
2928
|
+
be["%Error.prototype%"] = ua;
|
|
2911
2929
|
}
|
|
2912
|
-
var
|
|
2930
|
+
var pa = function t(e) {
|
|
2913
2931
|
var r;
|
|
2914
2932
|
if (e === "%AsyncFunction%")
|
|
2915
|
-
r =
|
|
2933
|
+
r = Nt("async function () {}");
|
|
2916
2934
|
else if (e === "%GeneratorFunction%")
|
|
2917
|
-
r =
|
|
2935
|
+
r = Nt("function* () {}");
|
|
2918
2936
|
else if (e === "%AsyncGeneratorFunction%")
|
|
2919
|
-
r =
|
|
2937
|
+
r = Nt("async function* () {}");
|
|
2920
2938
|
else if (e === "%AsyncGenerator%") {
|
|
2921
2939
|
var n = t("%AsyncGeneratorFunction%");
|
|
2922
2940
|
n && (r = n.prototype);
|
|
@@ -2925,7 +2943,7 @@ var ha = function t(e) {
|
|
|
2925
2943
|
s && I && (r = I(s.prototype));
|
|
2926
2944
|
}
|
|
2927
2945
|
return be[e] = r, r;
|
|
2928
|
-
},
|
|
2946
|
+
}, Jr = {
|
|
2929
2947
|
__proto__: null,
|
|
2930
2948
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
2931
2949
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
@@ -2978,21 +2996,21 @@ var ha = function t(e) {
|
|
|
2978
2996
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2979
2997
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2980
2998
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2981
|
-
}, Je = dt, lt = /* @__PURE__ */
|
|
2999
|
+
}, Je = dt(), lt = /* @__PURE__ */ zi(), da = Je.call(We, Array.prototype.concat), ha = Je.call(vn, Array.prototype.splice), Gr = Je.call(We, String.prototype.replace), ft = Je.call(We, String.prototype.slice), ya = Je.call(We, RegExp.prototype.exec), ma = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, ga = /\\(\\)?/g, ba = function(e) {
|
|
2982
3000
|
var r = ft(e, 0, 1), n = ft(e, -1);
|
|
2983
3001
|
if (r === "%" && n !== "%")
|
|
2984
3002
|
throw new Ae("invalid intrinsic syntax, expected closing `%`");
|
|
2985
3003
|
if (n === "%" && r !== "%")
|
|
2986
3004
|
throw new Ae("invalid intrinsic syntax, expected opening `%`");
|
|
2987
3005
|
var s = [];
|
|
2988
|
-
return
|
|
2989
|
-
s[s.length] = i ?
|
|
3006
|
+
return Gr(e, ma, function(o, a, i, c) {
|
|
3007
|
+
s[s.length] = i ? Gr(c, ga, "$1") : a || o;
|
|
2990
3008
|
}), s;
|
|
2991
|
-
},
|
|
3009
|
+
}, $a = function(e, r) {
|
|
2992
3010
|
var n = e, s;
|
|
2993
|
-
if (lt(
|
|
3011
|
+
if (lt(Jr, n) && (s = Jr[n], n = "%" + s[0] + "%"), lt(be, n)) {
|
|
2994
3012
|
var o = be[n];
|
|
2995
|
-
if (o === Se && (o =
|
|
3013
|
+
if (o === Se && (o = pa(n)), typeof o > "u" && !r)
|
|
2996
3014
|
throw new je("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
2997
3015
|
return {
|
|
2998
3016
|
alias: s,
|
|
@@ -3001,105 +3019,105 @@ var ha = function t(e) {
|
|
|
3001
3019
|
};
|
|
3002
3020
|
}
|
|
3003
3021
|
throw new Ae("intrinsic " + e + " does not exist!");
|
|
3004
|
-
},
|
|
3022
|
+
}, nr = function(e, r) {
|
|
3005
3023
|
if (typeof e != "string" || e.length === 0)
|
|
3006
3024
|
throw new je("intrinsic name must be a non-empty string");
|
|
3007
3025
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3008
3026
|
throw new je('"allowMissing" argument must be a boolean');
|
|
3009
|
-
if (
|
|
3027
|
+
if (ya(/^%?[^%]*%?$/, e) === null)
|
|
3010
3028
|
throw new Ae("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3011
|
-
var n =
|
|
3012
|
-
l && (s = l[0],
|
|
3029
|
+
var n = ba(e), s = n.length > 0 ? n[0] : "", o = $a("%" + s + "%", r), a = o.name, i = o.value, c = !1, l = o.alias;
|
|
3030
|
+
l && (s = l[0], ha(n, da([0, 1], l)));
|
|
3013
3031
|
for (var f = 1, u = !0; f < n.length; f += 1) {
|
|
3014
|
-
var
|
|
3015
|
-
if ((
|
|
3032
|
+
var p = n[f], d = ft(p, 0, 1), h = ft(p, -1);
|
|
3033
|
+
if ((d === '"' || d === "'" || d === "`" || h === '"' || h === "'" || h === "`") && d !== h)
|
|
3016
3034
|
throw new Ae("property names with quotes must have matching quotes");
|
|
3017
|
-
if ((
|
|
3035
|
+
if ((p === "constructor" || !u) && (c = !0), s += "." + p, a = "%" + s + "%", lt(be, a))
|
|
3018
3036
|
i = be[a];
|
|
3019
3037
|
else if (i != null) {
|
|
3020
|
-
if (!(
|
|
3038
|
+
if (!(p in i)) {
|
|
3021
3039
|
if (!r)
|
|
3022
3040
|
throw new je("base intrinsic for " + e + " exists, but the property is not available.");
|
|
3023
3041
|
return;
|
|
3024
3042
|
}
|
|
3025
3043
|
if (Be && f + 1 >= n.length) {
|
|
3026
|
-
var y = Be(i,
|
|
3027
|
-
u = !!y, u && "get" in y && !("originalValue" in y.get) ? i = y.get : i = i[
|
|
3044
|
+
var y = Be(i, p);
|
|
3045
|
+
u = !!y, u && "get" in y && !("originalValue" in y.get) ? i = y.get : i = i[p];
|
|
3028
3046
|
} else
|
|
3029
|
-
u = lt(i,
|
|
3047
|
+
u = lt(i, p), i = i[p];
|
|
3030
3048
|
u && !c && (be[a] = i);
|
|
3031
3049
|
}
|
|
3032
3050
|
}
|
|
3033
3051
|
return i;
|
|
3034
|
-
},
|
|
3052
|
+
}, wn = nr, Sn = bn, va = Sn([wn("%String.prototype.indexOf%")]), On = function(e, r) {
|
|
3035
3053
|
var n = (
|
|
3036
3054
|
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
|
|
3037
|
-
|
|
3055
|
+
wn(e, !!r)
|
|
3038
3056
|
);
|
|
3039
|
-
return typeof n == "function" &&
|
|
3057
|
+
return typeof n == "function" && va(e, ".prototype.") > -1 ? Sn(
|
|
3040
3058
|
/** @type {const} */
|
|
3041
3059
|
[n]
|
|
3042
3060
|
) : n;
|
|
3043
|
-
},
|
|
3061
|
+
}, wa = nr, Ge = On, Sa = ut, Oa = Re, zr = wa("%Map%", !0), Ta = Ge("Map.prototype.get", !0), xa = Ge("Map.prototype.set", !0), Ea = Ge("Map.prototype.has", !0), ja = Ge("Map.prototype.delete", !0), Pa = Ge("Map.prototype.size", !0), Tn = !!zr && /** @type {Exclude<import('.'), false>} */
|
|
3044
3062
|
function() {
|
|
3045
3063
|
var e, r = {
|
|
3046
3064
|
assert: function(n) {
|
|
3047
3065
|
if (!r.has(n))
|
|
3048
|
-
throw new
|
|
3066
|
+
throw new Oa("Side channel does not contain " + Sa(n));
|
|
3049
3067
|
},
|
|
3050
3068
|
delete: function(n) {
|
|
3051
3069
|
if (e) {
|
|
3052
|
-
var s =
|
|
3053
|
-
return
|
|
3070
|
+
var s = ja(e, n);
|
|
3071
|
+
return Pa(e) === 0 && (e = void 0), s;
|
|
3054
3072
|
}
|
|
3055
3073
|
return !1;
|
|
3056
3074
|
},
|
|
3057
3075
|
get: function(n) {
|
|
3058
3076
|
if (e)
|
|
3059
|
-
return
|
|
3077
|
+
return Ta(e, n);
|
|
3060
3078
|
},
|
|
3061
3079
|
has: function(n) {
|
|
3062
|
-
return e ?
|
|
3080
|
+
return e ? Ea(e, n) : !1;
|
|
3063
3081
|
},
|
|
3064
3082
|
set: function(n, s) {
|
|
3065
|
-
e || (e = new
|
|
3083
|
+
e || (e = new zr()), xa(e, n, s);
|
|
3066
3084
|
}
|
|
3067
3085
|
};
|
|
3068
3086
|
return r;
|
|
3069
|
-
},
|
|
3087
|
+
}, Ca = nr, ht = On, ka = ut, De = Tn, Aa = Re, we = Ca("%WeakMap%", !0), Ra = ht("WeakMap.prototype.get", !0), qa = ht("WeakMap.prototype.set", !0), Na = ht("WeakMap.prototype.has", !0), _a = ht("WeakMap.prototype.delete", !0), La = we ? (
|
|
3070
3088
|
/** @type {Exclude<import('.'), false>} */
|
|
3071
3089
|
function() {
|
|
3072
3090
|
var e, r, n = {
|
|
3073
3091
|
assert: function(s) {
|
|
3074
3092
|
if (!n.has(s))
|
|
3075
|
-
throw new
|
|
3093
|
+
throw new Aa("Side channel does not contain " + ka(s));
|
|
3076
3094
|
},
|
|
3077
3095
|
delete: function(s) {
|
|
3078
3096
|
if (we && s && (typeof s == "object" || typeof s == "function")) {
|
|
3079
3097
|
if (e)
|
|
3080
|
-
return
|
|
3098
|
+
return _a(e, s);
|
|
3081
3099
|
} else if (De && r)
|
|
3082
3100
|
return r.delete(s);
|
|
3083
3101
|
return !1;
|
|
3084
3102
|
},
|
|
3085
3103
|
get: function(s) {
|
|
3086
|
-
return we && s && (typeof s == "object" || typeof s == "function") && e ?
|
|
3104
|
+
return we && s && (typeof s == "object" || typeof s == "function") && e ? Ra(e, s) : r && r.get(s);
|
|
3087
3105
|
},
|
|
3088
3106
|
has: function(s) {
|
|
3089
|
-
return we && s && (typeof s == "object" || typeof s == "function") && e ?
|
|
3107
|
+
return we && s && (typeof s == "object" || typeof s == "function") && e ? Na(e, s) : !!r && r.has(s);
|
|
3090
3108
|
},
|
|
3091
3109
|
set: function(s, o) {
|
|
3092
|
-
we && s && (typeof s == "object" || typeof s == "function") ? (e || (e = new we()),
|
|
3110
|
+
we && s && (typeof s == "object" || typeof s == "function") ? (e || (e = new we()), qa(e, s, o)) : De && (r || (r = De()), r.set(s, o));
|
|
3093
3111
|
}
|
|
3094
3112
|
};
|
|
3095
3113
|
return n;
|
|
3096
3114
|
}
|
|
3097
|
-
) : De,
|
|
3115
|
+
) : De, Ia = Re, Ua = ut, Fa = hi, Ma = Tn, Ha = La, Ba = Ha || Ma || Fa, xn = function() {
|
|
3098
3116
|
var e, r = {
|
|
3099
3117
|
assert: function(n) {
|
|
3100
3118
|
if (!r.has(n)) {
|
|
3101
|
-
var s = n && Object(n) === n ? "the given object key" :
|
|
3102
|
-
throw new
|
|
3119
|
+
var s = n && Object(n) === n ? "the given object key" : Ua(n);
|
|
3120
|
+
throw new Ia("Side channel does not contain " + s);
|
|
3103
3121
|
}
|
|
3104
3122
|
},
|
|
3105
3123
|
delete: function(n) {
|
|
@@ -3112,38 +3130,38 @@ function() {
|
|
|
3112
3130
|
return !!e && e.has(n);
|
|
3113
3131
|
},
|
|
3114
3132
|
set: function(n, s) {
|
|
3115
|
-
e || (e =
|
|
3133
|
+
e || (e = Ba()), e.set(n, s);
|
|
3116
3134
|
}
|
|
3117
3135
|
};
|
|
3118
3136
|
return r;
|
|
3119
|
-
},
|
|
3137
|
+
}, Wa = String.prototype.replace, Ja = /%20/g, Lt = {
|
|
3120
3138
|
RFC1738: "RFC1738",
|
|
3121
3139
|
RFC3986: "RFC3986"
|
|
3122
|
-
},
|
|
3123
|
-
default:
|
|
3140
|
+
}, or = {
|
|
3141
|
+
default: Lt.RFC3986,
|
|
3124
3142
|
formatters: {
|
|
3125
3143
|
RFC1738: function(t) {
|
|
3126
|
-
return
|
|
3144
|
+
return Wa.call(t, Ja, "+");
|
|
3127
3145
|
},
|
|
3128
3146
|
RFC3986: function(t) {
|
|
3129
3147
|
return String(t);
|
|
3130
3148
|
}
|
|
3131
3149
|
},
|
|
3132
|
-
RFC1738:
|
|
3133
|
-
RFC3986:
|
|
3134
|
-
},
|
|
3150
|
+
RFC1738: Lt.RFC1738,
|
|
3151
|
+
RFC3986: Lt.RFC3986
|
|
3152
|
+
}, Ga = or, En = xn, Vr = hn, It = Object.prototype.hasOwnProperty, pe = Array.isArray, yt = En(), me = function(e, r) {
|
|
3135
3153
|
return yt.set(e, r), e;
|
|
3136
3154
|
}, ge = function(e) {
|
|
3137
3155
|
return yt.has(e);
|
|
3138
3156
|
}, Le = function(e) {
|
|
3139
3157
|
return yt.get(e);
|
|
3140
|
-
},
|
|
3158
|
+
}, Vt = function(e, r) {
|
|
3141
3159
|
yt.set(e, r);
|
|
3142
3160
|
}, ne = (function() {
|
|
3143
3161
|
for (var t = [], e = 0; e < 256; ++e)
|
|
3144
3162
|
t[t.length] = "%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase();
|
|
3145
3163
|
return t;
|
|
3146
|
-
})(),
|
|
3164
|
+
})(), za = function(e) {
|
|
3147
3165
|
for (; e.length > 1; ) {
|
|
3148
3166
|
var r = e.pop(), n = r.obj[r.prop];
|
|
3149
3167
|
if (pe(n)) {
|
|
@@ -3156,14 +3174,14 @@ function() {
|
|
|
3156
3174
|
for (var n = r && r.plainObjects ? { __proto__: null } : {}, s = 0; s < e.length; ++s)
|
|
3157
3175
|
typeof e[s] < "u" && (n[s] = e[s]);
|
|
3158
3176
|
return n;
|
|
3159
|
-
},
|
|
3160
|
-
r === "__proto__" &&
|
|
3177
|
+
}, Kt = function(e, r, n) {
|
|
3178
|
+
r === "__proto__" && Vr ? Vr(e, r, {
|
|
3161
3179
|
configurable: !0,
|
|
3162
3180
|
enumerable: !0,
|
|
3163
3181
|
value: n,
|
|
3164
3182
|
writable: !0
|
|
3165
3183
|
}) : e[r] = n;
|
|
3166
|
-
},
|
|
3184
|
+
}, Va = function t(e, r, n) {
|
|
3167
3185
|
if (!r)
|
|
3168
3186
|
return e;
|
|
3169
3187
|
if (typeof r != "object" && typeof r != "function") {
|
|
@@ -3178,11 +3196,11 @@ function() {
|
|
|
3178
3196
|
} else if (e && typeof e == "object")
|
|
3179
3197
|
if (ge(e)) {
|
|
3180
3198
|
var o = Le(e) + 1;
|
|
3181
|
-
e[o] = r,
|
|
3199
|
+
e[o] = r, Vt(e, o);
|
|
3182
3200
|
} else {
|
|
3183
3201
|
if (n && n.strictMerge)
|
|
3184
3202
|
return [e, r];
|
|
3185
|
-
(n && (n.plainObjects || n.allowPrototypes) || !
|
|
3203
|
+
(n && (n.plainObjects || n.allowPrototypes) || !It.call(Object.prototype, r)) && (e[r] = !0);
|
|
3186
3204
|
}
|
|
3187
3205
|
else
|
|
3188
3206
|
return [e, r];
|
|
@@ -3206,12 +3224,12 @@ function() {
|
|
|
3206
3224
|
}
|
|
3207
3225
|
var u = e;
|
|
3208
3226
|
if (pe(e) && !pe(r) && (u = Ee(e, n)), pe(e) && pe(r)) {
|
|
3209
|
-
if (r.forEach(function(
|
|
3210
|
-
if (
|
|
3211
|
-
var h = e[
|
|
3212
|
-
h && typeof h == "object" &&
|
|
3227
|
+
if (r.forEach(function(p, d) {
|
|
3228
|
+
if (It.call(e, d)) {
|
|
3229
|
+
var h = e[d];
|
|
3230
|
+
h && typeof h == "object" && p && typeof p == "object" ? e[d] = t(h, p, n) : e[e.length] = p;
|
|
3213
3231
|
} else
|
|
3214
|
-
e[
|
|
3232
|
+
e[d] = p;
|
|
3215
3233
|
}), n && typeof n.arrayLimit == "number" && e.length > n.arrayLimit) {
|
|
3216
3234
|
if (n.throwOnLimitExceeded)
|
|
3217
3235
|
throw new RangeError("Array limit exceeded. Only " + n.arrayLimit + " element" + (n.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
|
|
@@ -3219,19 +3237,19 @@ function() {
|
|
|
3219
3237
|
}
|
|
3220
3238
|
return e;
|
|
3221
3239
|
}
|
|
3222
|
-
return Object.keys(r).reduce(function(
|
|
3223
|
-
var h = r[
|
|
3224
|
-
if (
|
|
3225
|
-
var y = parseInt(
|
|
3226
|
-
String(y) ===
|
|
3240
|
+
return Object.keys(r).reduce(function(p, d) {
|
|
3241
|
+
var h = r[d];
|
|
3242
|
+
if (It.call(p, d) ? Kt(p, d, t(p[d], h, n)) : Kt(p, d, h), ge(r) && !ge(p) && me(p, Le(r)), ge(p)) {
|
|
3243
|
+
var y = parseInt(d, 10);
|
|
3244
|
+
String(y) === d && y >= 0 && y > Le(p) && Vt(p, y);
|
|
3227
3245
|
}
|
|
3228
|
-
return
|
|
3246
|
+
return p;
|
|
3229
3247
|
}, u);
|
|
3230
|
-
},
|
|
3248
|
+
}, Ka = function(e, r) {
|
|
3231
3249
|
return Object.keys(r).reduce(function(n, s) {
|
|
3232
|
-
return
|
|
3250
|
+
return Kt(n, s, r[s]), n;
|
|
3233
3251
|
}, e);
|
|
3234
|
-
},
|
|
3252
|
+
}, Da = function(t, e, r) {
|
|
3235
3253
|
var n = t.replace(/\+/g, " ");
|
|
3236
3254
|
if (r === "iso-8859-1")
|
|
3237
3255
|
return n.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
@@ -3240,7 +3258,7 @@ function() {
|
|
|
3240
3258
|
} catch {
|
|
3241
3259
|
return n;
|
|
3242
3260
|
}
|
|
3243
|
-
}, Qe = 1024,
|
|
3261
|
+
}, Qe = 1024, Qa = function(e, r, n, s, o) {
|
|
3244
3262
|
if (e.length === 0)
|
|
3245
3263
|
return e;
|
|
3246
3264
|
var a = e;
|
|
@@ -3254,47 +3272,47 @@ function() {
|
|
|
3254
3272
|
var f = l.charCodeAt(l.length - 1);
|
|
3255
3273
|
f >= 55296 && f <= 56319 && (l = l.slice(0, -1), c -= 1);
|
|
3256
3274
|
}
|
|
3257
|
-
for (var u = [],
|
|
3258
|
-
var
|
|
3259
|
-
if (
|
|
3260
|
-
u[u.length] = l.charAt(
|
|
3275
|
+
for (var u = [], p = 0; p < l.length; ++p) {
|
|
3276
|
+
var d = l.charCodeAt(p);
|
|
3277
|
+
if (d === 45 || d === 46 || d === 95 || d === 126 || d >= 48 && d <= 57 || d >= 65 && d <= 90 || d >= 97 && d <= 122 || o === Ga.RFC1738 && (d === 40 || d === 41)) {
|
|
3278
|
+
u[u.length] = l.charAt(p);
|
|
3261
3279
|
continue;
|
|
3262
3280
|
}
|
|
3263
|
-
if (
|
|
3264
|
-
u[u.length] = ne[
|
|
3281
|
+
if (d < 128) {
|
|
3282
|
+
u[u.length] = ne[d];
|
|
3265
3283
|
continue;
|
|
3266
3284
|
}
|
|
3267
|
-
if (
|
|
3268
|
-
u[u.length] = ne[192 |
|
|
3285
|
+
if (d < 2048) {
|
|
3286
|
+
u[u.length] = ne[192 | d >> 6] + ne[128 | d & 63];
|
|
3269
3287
|
continue;
|
|
3270
3288
|
}
|
|
3271
|
-
if (
|
|
3272
|
-
u[u.length] = ne[224 |
|
|
3289
|
+
if (d < 55296 || d >= 57344) {
|
|
3290
|
+
u[u.length] = ne[224 | d >> 12] + ne[128 | d >> 6 & 63] + ne[128 | d & 63];
|
|
3273
3291
|
continue;
|
|
3274
3292
|
}
|
|
3275
|
-
|
|
3293
|
+
p += 1, d = 65536 + ((d & 1023) << 10 | l.charCodeAt(p) & 1023), u[u.length] = ne[240 | d >> 18] + ne[128 | d >> 12 & 63] + ne[128 | d >> 6 & 63] + ne[128 | d & 63];
|
|
3276
3294
|
}
|
|
3277
3295
|
i += u.join("");
|
|
3278
3296
|
}
|
|
3279
3297
|
return i;
|
|
3280
|
-
},
|
|
3281
|
-
for (var r = [{ obj: { o: e }, prop: "o" }], n =
|
|
3298
|
+
}, Ya = function(e) {
|
|
3299
|
+
for (var r = [{ obj: { o: e }, prop: "o" }], n = En(), s = 0; s < r.length; ++s)
|
|
3282
3300
|
for (var o = r[s], a = o.obj[o.prop], i = Object.keys(a), c = 0; c < i.length; ++c) {
|
|
3283
3301
|
var l = i[c], f = a[l];
|
|
3284
3302
|
typeof f == "object" && f !== null && !n.has(f) && (r[r.length] = { obj: a, prop: l }, n.set(f, !0));
|
|
3285
3303
|
}
|
|
3286
|
-
return
|
|
3287
|
-
},
|
|
3304
|
+
return za(r), e;
|
|
3305
|
+
}, Xa = function(e) {
|
|
3288
3306
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
3289
|
-
},
|
|
3307
|
+
}, Za = function(e) {
|
|
3290
3308
|
return !e || typeof e != "object" ? !1 : !!(e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e));
|
|
3291
|
-
},
|
|
3309
|
+
}, es = function(e, r, n, s, o) {
|
|
3292
3310
|
if (ge(e)) {
|
|
3293
3311
|
if (o)
|
|
3294
3312
|
throw new RangeError("Array limit exceeded. Only " + n + " element" + (n === 1 ? "" : "s") + " allowed in an array.");
|
|
3295
3313
|
for (var a = pe(r) ? r : [r], i = Le(e), c = 0; c < a.length; ++c)
|
|
3296
3314
|
i += 1, e[i] = a[c];
|
|
3297
|
-
return
|
|
3315
|
+
return Vt(e, i), e;
|
|
3298
3316
|
}
|
|
3299
3317
|
var l = [].concat(e, r);
|
|
3300
3318
|
if (l.length > n) {
|
|
@@ -3303,27 +3321,27 @@ function() {
|
|
|
3303
3321
|
return me(Ee(l, { plainObjects: s }), l.length - 1);
|
|
3304
3322
|
}
|
|
3305
3323
|
return l;
|
|
3306
|
-
},
|
|
3324
|
+
}, ts = function(e, r) {
|
|
3307
3325
|
if (pe(e)) {
|
|
3308
3326
|
for (var n = [], s = 0; s < e.length; s += 1)
|
|
3309
3327
|
n[n.length] = r(e[s]);
|
|
3310
3328
|
return n;
|
|
3311
3329
|
}
|
|
3312
3330
|
return r(e);
|
|
3313
|
-
},
|
|
3331
|
+
}, jn = {
|
|
3314
3332
|
arrayToObject: Ee,
|
|
3315
|
-
assign:
|
|
3316
|
-
combine:
|
|
3317
|
-
compact:
|
|
3318
|
-
decode:
|
|
3319
|
-
encode:
|
|
3320
|
-
isBuffer:
|
|
3333
|
+
assign: Ka,
|
|
3334
|
+
combine: es,
|
|
3335
|
+
compact: Ya,
|
|
3336
|
+
decode: Da,
|
|
3337
|
+
encode: Qa,
|
|
3338
|
+
isBuffer: Za,
|
|
3321
3339
|
isOverflow: ge,
|
|
3322
|
-
isRegExp:
|
|
3340
|
+
isRegExp: Xa,
|
|
3323
3341
|
markOverflow: me,
|
|
3324
|
-
maybeMap:
|
|
3325
|
-
merge:
|
|
3326
|
-
},
|
|
3342
|
+
maybeMap: ts,
|
|
3343
|
+
merge: Va
|
|
3344
|
+
}, Pn = xn, et = jn, Me = or, rs = Object.prototype.hasOwnProperty, Cn = {
|
|
3327
3345
|
brackets: function(e) {
|
|
3328
3346
|
return e + "[]";
|
|
3329
3347
|
},
|
|
@@ -3334,9 +3352,9 @@ function() {
|
|
|
3334
3352
|
repeat: function(e) {
|
|
3335
3353
|
return e;
|
|
3336
3354
|
}
|
|
3337
|
-
}, oe = Array.isArray,
|
|
3338
|
-
|
|
3339
|
-
},
|
|
3355
|
+
}, oe = Array.isArray, ns = Array.prototype.push, kn = function(t, e) {
|
|
3356
|
+
ns.apply(t, oe(e) ? e : [e]);
|
|
3357
|
+
}, os = Date.prototype.toISOString, Kr = Me.default, _ = {
|
|
3340
3358
|
addQueryPrefix: !1,
|
|
3341
3359
|
allowDots: !1,
|
|
3342
3360
|
allowEmptyArrays: !1,
|
|
@@ -3351,38 +3369,38 @@ function() {
|
|
|
3351
3369
|
encoder: et.encode,
|
|
3352
3370
|
encodeValuesOnly: !1,
|
|
3353
3371
|
filter: void 0,
|
|
3354
|
-
format:
|
|
3355
|
-
formatter: Me.formatters[
|
|
3372
|
+
format: Kr,
|
|
3373
|
+
formatter: Me.formatters[Kr],
|
|
3356
3374
|
// deprecated
|
|
3357
3375
|
indices: !1,
|
|
3358
3376
|
serializeDate: function(e) {
|
|
3359
|
-
return
|
|
3377
|
+
return os.call(e);
|
|
3360
3378
|
},
|
|
3361
3379
|
skipNulls: !1,
|
|
3362
3380
|
strictNullHandling: !1
|
|
3363
|
-
},
|
|
3381
|
+
}, is = function(e) {
|
|
3364
3382
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
|
|
3365
|
-
},
|
|
3383
|
+
}, Ut = {}, as = function t(e, r, n, s, o, a, i, c, l, f, u, p, d, h, y, g, b, m, v, O) {
|
|
3366
3384
|
var $ = e;
|
|
3367
3385
|
if (O > v)
|
|
3368
3386
|
throw new RangeError("Input depth exceeded depth option of " + v);
|
|
3369
|
-
for (var w = m, C = 0, T = !1; (w = w.get(
|
|
3387
|
+
for (var w = m, C = 0, T = !1; (w = w.get(Ut)) !== void 0 && !T; ) {
|
|
3370
3388
|
var k = w.get(e);
|
|
3371
3389
|
if (C += 1, typeof k < "u") {
|
|
3372
3390
|
if (k === C)
|
|
3373
3391
|
throw new RangeError("Cyclic object value");
|
|
3374
3392
|
T = !0;
|
|
3375
3393
|
}
|
|
3376
|
-
typeof w.get(
|
|
3394
|
+
typeof w.get(Ut) > "u" && (C = 0);
|
|
3377
3395
|
}
|
|
3378
|
-
if ($ = typeof f == "function" ? f(r, $) : $, $ instanceof Date ? $ =
|
|
3379
|
-
return E instanceof Date ?
|
|
3396
|
+
if ($ = typeof f == "function" ? f(r, $) : $, $ instanceof Date ? $ = d($) : n === "comma" && oe($) && ($ = et.maybeMap($, function(E) {
|
|
3397
|
+
return E instanceof Date ? d(E) : E;
|
|
3380
3398
|
})), $ === null) {
|
|
3381
3399
|
if (a)
|
|
3382
3400
|
return y(l && !g ? l(r, _.encoder, b, "key", h) : r);
|
|
3383
3401
|
$ = "";
|
|
3384
3402
|
}
|
|
3385
|
-
if (
|
|
3403
|
+
if (is($) || et.isBuffer($)) {
|
|
3386
3404
|
if (l) {
|
|
3387
3405
|
var J = g ? r : l(r, _.encoder, b, "key", h);
|
|
3388
3406
|
return [y(J) + "=" + y(l($, _.encoder, b, "value", h))];
|
|
@@ -3409,10 +3427,10 @@ function() {
|
|
|
3409
3427
|
for (var V = 0; V < G.length; ++V) {
|
|
3410
3428
|
var Y = G[V], ze = typeof Y == "object" && Y && typeof Y.value < "u" ? Y.value : $[Y];
|
|
3411
3429
|
if (!(i && ze === null)) {
|
|
3412
|
-
var
|
|
3430
|
+
var qe = p && c ? String(Y).replace(/\./g, "%2E") : String(Y), S = oe($) ? typeof n == "function" ? n(K, qe) : K : K + (p ? "." + qe : "[" + qe + "]");
|
|
3413
3431
|
m.set(e, C);
|
|
3414
|
-
var x =
|
|
3415
|
-
x.set(
|
|
3432
|
+
var x = Pn();
|
|
3433
|
+
x.set(Ut, m), kn(Q, t(
|
|
3416
3434
|
ze,
|
|
3417
3435
|
S,
|
|
3418
3436
|
n,
|
|
@@ -3424,8 +3442,8 @@ function() {
|
|
|
3424
3442
|
n === "comma" && g && oe($) ? null : l,
|
|
3425
3443
|
f,
|
|
3426
3444
|
u,
|
|
3427
|
-
d,
|
|
3428
3445
|
p,
|
|
3446
|
+
d,
|
|
3429
3447
|
h,
|
|
3430
3448
|
y,
|
|
3431
3449
|
g,
|
|
@@ -3437,7 +3455,7 @@ function() {
|
|
|
3437
3455
|
}
|
|
3438
3456
|
}
|
|
3439
3457
|
return Q;
|
|
3440
|
-
},
|
|
3458
|
+
}, ss = function(e) {
|
|
3441
3459
|
if (!e)
|
|
3442
3460
|
return _;
|
|
3443
3461
|
if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
|
|
@@ -3451,14 +3469,14 @@ function() {
|
|
|
3451
3469
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
3452
3470
|
var n = Me.default;
|
|
3453
3471
|
if (typeof e.format < "u") {
|
|
3454
|
-
if (!
|
|
3472
|
+
if (!rs.call(Me.formatters, e.format))
|
|
3455
3473
|
throw new TypeError("Unknown format option provided.");
|
|
3456
3474
|
n = e.format;
|
|
3457
3475
|
}
|
|
3458
3476
|
var s = Me.formatters[n], o = _.filter;
|
|
3459
3477
|
(typeof e.filter == "function" || oe(e.filter)) && (o = e.filter);
|
|
3460
3478
|
var a;
|
|
3461
|
-
if (e.arrayFormat in
|
|
3479
|
+
if (e.arrayFormat in Cn ? a = e.arrayFormat : "indices" in e ? a = e.indices ? "indices" : "repeat" : a = _.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean")
|
|
3462
3480
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
3463
3481
|
var i = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 : _.allowDots : !!e.allowDots;
|
|
3464
3482
|
return {
|
|
@@ -3483,23 +3501,23 @@ function() {
|
|
|
3483
3501
|
sort: typeof e.sort == "function" ? e.sort : null,
|
|
3484
3502
|
strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : _.strictNullHandling
|
|
3485
3503
|
};
|
|
3486
|
-
},
|
|
3487
|
-
var r = t, n =
|
|
3504
|
+
}, cs = function(t, e) {
|
|
3505
|
+
var r = t, n = ss(e), s, o;
|
|
3488
3506
|
typeof n.filter == "function" ? (o = n.filter, r = o("", r)) : oe(n.filter) && (o = n.filter, s = o);
|
|
3489
3507
|
var a = [];
|
|
3490
3508
|
if (typeof r != "object" || r === null)
|
|
3491
3509
|
return "";
|
|
3492
|
-
var i =
|
|
3510
|
+
var i = Cn[n.arrayFormat], c = i === "comma" && n.commaRoundTrip;
|
|
3493
3511
|
s || (s = Object.keys(r)), n.sort && s.sort(n.sort);
|
|
3494
|
-
for (var l =
|
|
3512
|
+
for (var l = Pn(), f = 0; f < s.length; ++f) {
|
|
3495
3513
|
var u = s[f];
|
|
3496
3514
|
if (!(typeof u > "u" || u === null)) {
|
|
3497
|
-
var
|
|
3498
|
-
if (!(n.skipNulls &&
|
|
3499
|
-
var
|
|
3500
|
-
|
|
3501
|
-
d,
|
|
3515
|
+
var p = r[u];
|
|
3516
|
+
if (!(n.skipNulls && p === null)) {
|
|
3517
|
+
var d = n.encodeDotInKeys ? String(u).replace(/\./g, "%2E") : String(u);
|
|
3518
|
+
kn(a, as(
|
|
3502
3519
|
p,
|
|
3520
|
+
d,
|
|
3503
3521
|
i,
|
|
3504
3522
|
c,
|
|
3505
3523
|
n.allowEmptyArrays,
|
|
@@ -3524,7 +3542,7 @@ function() {
|
|
|
3524
3542
|
}
|
|
3525
3543
|
var h = a.join(n.delimiter), y = n.addQueryPrefix === !0 ? "?" : "";
|
|
3526
3544
|
return n.charsetSentinel && (n.charset === "iso-8859-1" ? y += "utf8=%26%2310003%3B" + n.delimiter : y += "utf8=%E2%9C%93" + n.delimiter), h.length > 0 ? y + h : "";
|
|
3527
|
-
}, se =
|
|
3545
|
+
}, se = jn, tt = Object.prototype.hasOwnProperty, Ft = Array.isArray, q = {
|
|
3528
3546
|
allowDots: !1,
|
|
3529
3547
|
allowEmptyArrays: !1,
|
|
3530
3548
|
allowPrototypes: !1,
|
|
@@ -3547,11 +3565,11 @@ function() {
|
|
|
3547
3565
|
strictMerge: !0,
|
|
3548
3566
|
strictNullHandling: !1,
|
|
3549
3567
|
throwOnLimitExceeded: !1
|
|
3550
|
-
},
|
|
3568
|
+
}, ls = function(t) {
|
|
3551
3569
|
return t.replace(/&#(\d+);/g, function(e, r) {
|
|
3552
3570
|
return String.fromCharCode(parseInt(r, 10));
|
|
3553
3571
|
});
|
|
3554
|
-
},
|
|
3572
|
+
}, An = function(t, e, r) {
|
|
3555
3573
|
if (t && typeof t == "string" && e.comma && t.indexOf(",") > -1) {
|
|
3556
3574
|
if (e.throwOnLimitExceeded)
|
|
3557
3575
|
for (var n = 0, s = t.indexOf(","); s > -1; ) {
|
|
@@ -3564,7 +3582,7 @@ function() {
|
|
|
3564
3582
|
if (e.throwOnLimitExceeded && r >= e.arrayLimit)
|
|
3565
3583
|
throw new RangeError("Array limit exceeded. Only " + e.arrayLimit + " element" + (e.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
|
|
3566
3584
|
return t;
|
|
3567
|
-
},
|
|
3585
|
+
}, fs = "utf8=%26%2310003%3B", us = "utf8=%E2%9C%93", ps = function(e, r) {
|
|
3568
3586
|
var n = { __proto__: null }, s = r.ignoreQueryPrefix ? e.replace(/^\?/, "") : e;
|
|
3569
3587
|
s = s.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
3570
3588
|
var o = r.parameterLimit === 1 / 0 ? void 0 : r.parameterLimit, a = s.split(
|
|
@@ -3576,38 +3594,38 @@ function() {
|
|
|
3576
3594
|
var i = -1, c, l = r.charset;
|
|
3577
3595
|
if (r.charsetSentinel)
|
|
3578
3596
|
for (c = 0; c < a.length; ++c)
|
|
3579
|
-
a[c].indexOf("utf8=") === 0 && (a[c] ===
|
|
3597
|
+
a[c].indexOf("utf8=") === 0 && (a[c] === us ? l = "utf-8" : a[c] === fs && (l = "iso-8859-1"), i = c, c = a.length);
|
|
3580
3598
|
for (c = 0; c < a.length; ++c)
|
|
3581
3599
|
if (c !== i) {
|
|
3582
|
-
var f = a[c], u = f.indexOf("]="),
|
|
3583
|
-
if (
|
|
3584
|
-
|
|
3585
|
-
f.slice(
|
|
3600
|
+
var f = a[c], u = f.indexOf("]="), p = u === -1 ? f.indexOf("=") : u + 1, d, h;
|
|
3601
|
+
if (p === -1 ? (d = r.decoder(f, q.decoder, l, "key"), h = r.strictNullHandling ? null : "") : (d = r.decoder(f.slice(0, p), q.decoder, l, "key"), d !== null && (h = se.maybeMap(
|
|
3602
|
+
An(
|
|
3603
|
+
f.slice(p + 1),
|
|
3586
3604
|
r,
|
|
3587
|
-
|
|
3605
|
+
Ft(n[d]) ? n[d].length : 0
|
|
3588
3606
|
),
|
|
3589
3607
|
function(g) {
|
|
3590
|
-
return r.decoder(g,
|
|
3608
|
+
return r.decoder(g, q.decoder, l, "value");
|
|
3591
3609
|
}
|
|
3592
|
-
))), h && r.interpretNumericEntities && l === "iso-8859-1" && (h =
|
|
3593
|
-
var y = tt.call(n,
|
|
3594
|
-
y && (r.duplicates === "combine" || f.indexOf("[]=") > -1) ? n[
|
|
3595
|
-
n[
|
|
3610
|
+
))), h && r.interpretNumericEntities && l === "iso-8859-1" && (h = ls(String(h))), f.indexOf("[]=") > -1 && (h = Ft(h) ? [h] : h), r.comma && Ft(h) && h.length > r.arrayLimit && (h = se.combine([], h, r.arrayLimit, r.plainObjects, r.throwOnLimitExceeded)), d !== null) {
|
|
3611
|
+
var y = tt.call(n, d);
|
|
3612
|
+
y && (r.duplicates === "combine" || f.indexOf("[]=") > -1) ? n[d] = se.combine(
|
|
3613
|
+
n[d],
|
|
3596
3614
|
h,
|
|
3597
3615
|
r.arrayLimit,
|
|
3598
3616
|
r.plainObjects,
|
|
3599
3617
|
r.throwOnLimitExceeded
|
|
3600
|
-
) : (!y || r.duplicates === "last") && (n[
|
|
3618
|
+
) : (!y || r.duplicates === "last") && (n[d] = h);
|
|
3601
3619
|
}
|
|
3602
3620
|
}
|
|
3603
3621
|
return n;
|
|
3604
|
-
},
|
|
3622
|
+
}, ds = function(t, e, r, n) {
|
|
3605
3623
|
var s = 0;
|
|
3606
3624
|
if (t.length > 0 && t[t.length - 1] === "[]") {
|
|
3607
3625
|
var o = t.slice(0, -1).join("");
|
|
3608
3626
|
s = Array.isArray(e) && e[o] ? e[o].length : 0;
|
|
3609
3627
|
}
|
|
3610
|
-
for (var a = n ? e :
|
|
3628
|
+
for (var a = n ? e : An(e, r, s), i = t.length - 1; i >= 0; --i) {
|
|
3611
3629
|
var c, l = t[i];
|
|
3612
3630
|
if (l === "[]" && r.parseArrays)
|
|
3613
3631
|
se.isOverflow(a) ? c = a : c = r.allowEmptyArrays && (a === "" || r.strictNullHandling && a === null) ? [] : se.combine(
|
|
@@ -3619,21 +3637,21 @@ function() {
|
|
|
3619
3637
|
);
|
|
3620
3638
|
else {
|
|
3621
3639
|
c = r.plainObjects ? { __proto__: null } : {};
|
|
3622
|
-
var f = l.charAt(0) === "[" && l.charAt(l.length - 1) === "]" ? l.slice(1, -1) : l, u = r.decodeDotInKeys ? f.replace(/%2E/g, ".") : f,
|
|
3640
|
+
var f = l.charAt(0) === "[" && l.charAt(l.length - 1) === "]" ? l.slice(1, -1) : l, u = r.decodeDotInKeys ? f.replace(/%2E/g, ".") : f, p = parseInt(u, 10), d = !isNaN(p) && l !== u && String(p) === u && p >= 0 && r.parseArrays;
|
|
3623
3641
|
if (!r.parseArrays && u === "")
|
|
3624
3642
|
c = { 0: a };
|
|
3625
|
-
else if (
|
|
3626
|
-
c = [], c[
|
|
3643
|
+
else if (d && p < r.arrayLimit)
|
|
3644
|
+
c = [], c[p] = a;
|
|
3627
3645
|
else {
|
|
3628
|
-
if (
|
|
3646
|
+
if (d && r.throwOnLimitExceeded)
|
|
3629
3647
|
throw new RangeError("Array limit exceeded. Only " + r.arrayLimit + " element" + (r.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
|
|
3630
|
-
|
|
3648
|
+
d ? (c[p] = a, se.markOverflow(c, p)) : u !== "__proto__" && (c[u] = a);
|
|
3631
3649
|
}
|
|
3632
3650
|
}
|
|
3633
3651
|
a = c;
|
|
3634
3652
|
}
|
|
3635
3653
|
return a;
|
|
3636
|
-
},
|
|
3654
|
+
}, hs = function(e, r) {
|
|
3637
3655
|
var n = r.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e;
|
|
3638
3656
|
if (r.depth <= 0)
|
|
3639
3657
|
return !r.plainObjects && tt.call(Object.prototype, n) && !r.allowPrototypes ? void 0 : [n];
|
|
@@ -3644,16 +3662,16 @@ function() {
|
|
|
3644
3662
|
s[s.length] = a;
|
|
3645
3663
|
}
|
|
3646
3664
|
for (var i = n.length, c = o, l = 0; c >= 0 && l < r.depth; ) {
|
|
3647
|
-
for (var f = 1, u = c + 1,
|
|
3648
|
-
var
|
|
3649
|
-
|
|
3665
|
+
for (var f = 1, u = c + 1, p = -1; u < i && p < 0; ) {
|
|
3666
|
+
var d = n.charCodeAt(u);
|
|
3667
|
+
d === 91 ? f += 1 : d === 93 && (f -= 1, f === 0 && (p = u)), u += 1;
|
|
3650
3668
|
}
|
|
3651
|
-
if (
|
|
3669
|
+
if (p < 0)
|
|
3652
3670
|
return s[s.length] = "[" + n.slice(c) + "]", s;
|
|
3653
|
-
var h = n.slice(c,
|
|
3671
|
+
var h = n.slice(c, p + 1), y = h.slice(1, -1);
|
|
3654
3672
|
if (!r.plainObjects && tt.call(Object.prototype, y) && !r.allowPrototypes)
|
|
3655
3673
|
return;
|
|
3656
|
-
s[s.length] = h, l += 1, c = n.indexOf("[",
|
|
3674
|
+
s[s.length] = h, l += 1, c = n.indexOf("[", p + 1);
|
|
3657
3675
|
}
|
|
3658
3676
|
if (c >= 0) {
|
|
3659
3677
|
if (r.strictDepth === !0)
|
|
@@ -3661,15 +3679,15 @@ function() {
|
|
|
3661
3679
|
s[s.length] = "[" + n.slice(c) + "]";
|
|
3662
3680
|
}
|
|
3663
3681
|
return s;
|
|
3664
|
-
},
|
|
3682
|
+
}, ys = function(e, r, n, s) {
|
|
3665
3683
|
if (e) {
|
|
3666
|
-
var o =
|
|
3684
|
+
var o = hs(e, n);
|
|
3667
3685
|
if (o)
|
|
3668
|
-
return
|
|
3686
|
+
return ds(o, r, n, s);
|
|
3669
3687
|
}
|
|
3670
|
-
},
|
|
3688
|
+
}, ms = function(e) {
|
|
3671
3689
|
if (!e)
|
|
3672
|
-
return
|
|
3690
|
+
return q;
|
|
3673
3691
|
if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
|
|
3674
3692
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
3675
3693
|
if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
|
|
@@ -3680,53 +3698,53 @@ function() {
|
|
|
3680
3698
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
3681
3699
|
if (typeof e.throwOnLimitExceeded < "u" && typeof e.throwOnLimitExceeded != "boolean")
|
|
3682
3700
|
throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
|
|
3683
|
-
var r = typeof e.charset > "u" ?
|
|
3701
|
+
var r = typeof e.charset > "u" ? q.charset : e.charset, n = typeof e.duplicates > "u" ? q.duplicates : e.duplicates;
|
|
3684
3702
|
if (n !== "combine" && n !== "first" && n !== "last")
|
|
3685
3703
|
throw new TypeError("The duplicates option must be either combine, first, or last");
|
|
3686
|
-
var s = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 :
|
|
3704
|
+
var s = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : q.allowDots : !!e.allowDots;
|
|
3687
3705
|
return {
|
|
3688
3706
|
allowDots: s,
|
|
3689
|
-
allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays :
|
|
3690
|
-
allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes :
|
|
3691
|
-
allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse :
|
|
3692
|
-
arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit :
|
|
3707
|
+
allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : q.allowEmptyArrays,
|
|
3708
|
+
allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : q.allowPrototypes,
|
|
3709
|
+
allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : q.allowSparse,
|
|
3710
|
+
arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : q.arrayLimit,
|
|
3693
3711
|
charset: r,
|
|
3694
|
-
charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel :
|
|
3695
|
-
comma: typeof e.comma == "boolean" ? e.comma :
|
|
3696
|
-
decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys :
|
|
3697
|
-
decoder: typeof e.decoder == "function" ? e.decoder :
|
|
3698
|
-
delimiter: typeof e.delimiter == "string" || se.isRegExp(e.delimiter) ? e.delimiter :
|
|
3712
|
+
charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : q.charsetSentinel,
|
|
3713
|
+
comma: typeof e.comma == "boolean" ? e.comma : q.comma,
|
|
3714
|
+
decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : q.decodeDotInKeys,
|
|
3715
|
+
decoder: typeof e.decoder == "function" ? e.decoder : q.decoder,
|
|
3716
|
+
delimiter: typeof e.delimiter == "string" || se.isRegExp(e.delimiter) ? e.delimiter : q.delimiter,
|
|
3699
3717
|
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
3700
|
-
depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth :
|
|
3718
|
+
depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : q.depth,
|
|
3701
3719
|
duplicates: n,
|
|
3702
3720
|
ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
|
|
3703
|
-
interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities :
|
|
3704
|
-
parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit :
|
|
3721
|
+
interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : q.interpretNumericEntities,
|
|
3722
|
+
parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : q.parameterLimit,
|
|
3705
3723
|
parseArrays: e.parseArrays !== !1,
|
|
3706
|
-
plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects :
|
|
3707
|
-
strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth :
|
|
3708
|
-
strictMerge: typeof e.strictMerge == "boolean" ? !!e.strictMerge :
|
|
3709
|
-
strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling :
|
|
3724
|
+
plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : q.plainObjects,
|
|
3725
|
+
strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth : q.strictDepth,
|
|
3726
|
+
strictMerge: typeof e.strictMerge == "boolean" ? !!e.strictMerge : q.strictMerge,
|
|
3727
|
+
strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : q.strictNullHandling,
|
|
3710
3728
|
throwOnLimitExceeded: typeof e.throwOnLimitExceeded == "boolean" ? e.throwOnLimitExceeded : !1
|
|
3711
3729
|
};
|
|
3712
|
-
},
|
|
3713
|
-
var r =
|
|
3730
|
+
}, gs = function(t, e) {
|
|
3731
|
+
var r = ms(e);
|
|
3714
3732
|
if (t === "" || t === null || typeof t > "u")
|
|
3715
3733
|
return r.plainObjects ? { __proto__: null } : {};
|
|
3716
|
-
for (var n = typeof t == "string" ?
|
|
3717
|
-
var i = o[a], c =
|
|
3734
|
+
for (var n = typeof t == "string" ? ps(t, r) : t, s = r.plainObjects ? { __proto__: null } : {}, o = Object.keys(n), a = 0; a < o.length; ++a) {
|
|
3735
|
+
var i = o[a], c = ys(i, n[i], r, typeof t == "string");
|
|
3718
3736
|
s = se.merge(s, c, r);
|
|
3719
3737
|
}
|
|
3720
3738
|
return r.allowSparse === !0 ? s : se.compact(s);
|
|
3721
|
-
},
|
|
3722
|
-
formats:
|
|
3723
|
-
parse:
|
|
3724
|
-
stringify:
|
|
3725
|
-
},
|
|
3739
|
+
}, bs = cs, $s = gs, vs = or, rt = {
|
|
3740
|
+
formats: vs,
|
|
3741
|
+
parse: $s,
|
|
3742
|
+
stringify: bs
|
|
3743
|
+
}, ws = Ao;
|
|
3726
3744
|
function te() {
|
|
3727
3745
|
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;
|
|
3728
3746
|
}
|
|
3729
|
-
var
|
|
3747
|
+
var Ss = /^([a-z0-9.+-]+:)/i, Os = /:[0-9]*$/, Ts = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, xs = [
|
|
3730
3748
|
"<",
|
|
3731
3749
|
">",
|
|
3732
3750
|
'"',
|
|
@@ -3736,27 +3754,27 @@ var Ts = /^([a-z0-9.+-]+:)/i, xs = /:[0-9]*$/, Es = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
|
|
|
3736
3754
|
`
|
|
3737
3755
|
`,
|
|
3738
3756
|
" "
|
|
3739
|
-
],
|
|
3757
|
+
], Es = [
|
|
3740
3758
|
"{",
|
|
3741
3759
|
"}",
|
|
3742
3760
|
"|",
|
|
3743
3761
|
"\\",
|
|
3744
3762
|
"^",
|
|
3745
3763
|
"`"
|
|
3746
|
-
].concat(
|
|
3764
|
+
].concat(xs), Dt = ["'"].concat(Es), Dr = [
|
|
3747
3765
|
"%",
|
|
3748
3766
|
"/",
|
|
3749
3767
|
"?",
|
|
3750
3768
|
";",
|
|
3751
3769
|
"#"
|
|
3752
|
-
].concat(
|
|
3770
|
+
].concat(Dt), Qr = [
|
|
3753
3771
|
"/",
|
|
3754
3772
|
"?",
|
|
3755
3773
|
"#"
|
|
3756
|
-
],
|
|
3774
|
+
], js = 255, Yr = /^[+a-z0-9A-Z_-]{0,63}$/, Ps = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, Cs = {
|
|
3757
3775
|
javascript: !0,
|
|
3758
3776
|
"javascript:": !0
|
|
3759
|
-
},
|
|
3777
|
+
}, Qt = {
|
|
3760
3778
|
javascript: !0,
|
|
3761
3779
|
"javascript:": !0
|
|
3762
3780
|
}, Pe = {
|
|
@@ -3770,8 +3788,8 @@ var Ts = /^([a-z0-9.+-]+:)/i, xs = /:[0-9]*$/, Es = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
|
|
|
3770
3788
|
"ftp:": !0,
|
|
3771
3789
|
"gopher:": !0,
|
|
3772
3790
|
"file:": !0
|
|
3773
|
-
},
|
|
3774
|
-
function
|
|
3791
|
+
}, Yt = rt;
|
|
3792
|
+
function ir(t, e, r) {
|
|
3775
3793
|
if (t && typeof t == "object" && t instanceof te)
|
|
3776
3794
|
return t;
|
|
3777
3795
|
var n = new te();
|
|
@@ -3784,11 +3802,11 @@ te.prototype.parse = function(t, e, r) {
|
|
|
3784
3802
|
o[0] = o[0].replace(a, "/"), t = o.join(s);
|
|
3785
3803
|
var i = t;
|
|
3786
3804
|
if (i = i.trim(), !r && t.split("#").length === 1) {
|
|
3787
|
-
var c =
|
|
3805
|
+
var c = Ts.exec(i);
|
|
3788
3806
|
if (c)
|
|
3789
|
-
return this.path = i, this.href = i, this.pathname = c[1], c[2] ? (this.search = c[2], e ? this.query =
|
|
3807
|
+
return this.path = i, this.href = i, this.pathname = c[1], c[2] ? (this.search = c[2], e ? this.query = Yt.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : e && (this.search = "", this.query = {}), this;
|
|
3790
3808
|
}
|
|
3791
|
-
var l =
|
|
3809
|
+
var l = Ss.exec(i);
|
|
3792
3810
|
if (l) {
|
|
3793
3811
|
l = l[0];
|
|
3794
3812
|
var f = l.toLowerCase();
|
|
@@ -3796,41 +3814,41 @@ te.prototype.parse = function(t, e, r) {
|
|
|
3796
3814
|
}
|
|
3797
3815
|
if (r || l || i.match(/^\/\/[^@/]+@[^@/]+/)) {
|
|
3798
3816
|
var u = i.substr(0, 2) === "//";
|
|
3799
|
-
u && !(l &&
|
|
3817
|
+
u && !(l && Qt[l]) && (i = i.substr(2), this.slashes = !0);
|
|
3800
3818
|
}
|
|
3801
|
-
if (!
|
|
3802
|
-
for (var
|
|
3803
|
-
var h = i.indexOf(
|
|
3804
|
-
h !== -1 && (
|
|
3819
|
+
if (!Qt[l] && (u || l && !Pe[l])) {
|
|
3820
|
+
for (var p = -1, d = 0; d < Qr.length; d++) {
|
|
3821
|
+
var h = i.indexOf(Qr[d]);
|
|
3822
|
+
h !== -1 && (p === -1 || h < p) && (p = h);
|
|
3805
3823
|
}
|
|
3806
3824
|
var y, g;
|
|
3807
|
-
|
|
3808
|
-
for (var
|
|
3809
|
-
var h = i.indexOf(
|
|
3810
|
-
h !== -1 && (
|
|
3825
|
+
p === -1 ? g = i.lastIndexOf("@") : g = i.lastIndexOf("@", p), g !== -1 && (y = i.slice(0, g), i = i.slice(g + 1), this.auth = decodeURIComponent(y)), p = -1;
|
|
3826
|
+
for (var d = 0; d < Dr.length; d++) {
|
|
3827
|
+
var h = i.indexOf(Dr[d]);
|
|
3828
|
+
h !== -1 && (p === -1 || h < p) && (p = h);
|
|
3811
3829
|
}
|
|
3812
|
-
|
|
3830
|
+
p === -1 && (p = i.length), this.host = i.slice(0, p), i = i.slice(p), this.parseHost(), this.hostname = this.hostname || "";
|
|
3813
3831
|
var b = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
3814
3832
|
if (!b)
|
|
3815
|
-
for (var m = this.hostname.split(/\./),
|
|
3816
|
-
var O = m[
|
|
3817
|
-
if (O && !O.match(
|
|
3833
|
+
for (var m = this.hostname.split(/\./), d = 0, v = m.length; d < v; d++) {
|
|
3834
|
+
var O = m[d];
|
|
3835
|
+
if (O && !O.match(Yr)) {
|
|
3818
3836
|
for (var $ = "", w = 0, C = O.length; w < C; w++)
|
|
3819
3837
|
O.charCodeAt(w) > 127 ? $ += "x" : $ += O[w];
|
|
3820
|
-
if (!$.match(
|
|
3821
|
-
var T = m.slice(0,
|
|
3838
|
+
if (!$.match(Yr)) {
|
|
3839
|
+
var T = m.slice(0, d), k = m.slice(d + 1), J = O.match(Ps);
|
|
3822
3840
|
J && (T.push(J[1]), k.unshift(J[2])), k.length && (i = "/" + k.join(".") + i), this.hostname = T.join(".");
|
|
3823
3841
|
break;
|
|
3824
3842
|
}
|
|
3825
3843
|
}
|
|
3826
3844
|
}
|
|
3827
|
-
this.hostname.length >
|
|
3845
|
+
this.hostname.length > js ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), b || (this.hostname = ws.toASCII(this.hostname));
|
|
3828
3846
|
var Q = this.port ? ":" + this.port : "", G = this.hostname || "";
|
|
3829
3847
|
this.host = G + Q, this.href += this.host, b && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), i[0] !== "/" && (i = "/" + i));
|
|
3830
3848
|
}
|
|
3831
|
-
if (!
|
|
3832
|
-
for (var
|
|
3833
|
-
var U =
|
|
3849
|
+
if (!Cs[f])
|
|
3850
|
+
for (var d = 0, v = Dt.length; d < v; d++) {
|
|
3851
|
+
var U = Dt[d];
|
|
3834
3852
|
if (i.indexOf(U) !== -1) {
|
|
3835
3853
|
var z = encodeURIComponent(U);
|
|
3836
3854
|
z === U && (z = escape(U)), i = i.split(U).join(z);
|
|
@@ -3839,20 +3857,20 @@ te.prototype.parse = function(t, e, r) {
|
|
|
3839
3857
|
var K = i.indexOf("#");
|
|
3840
3858
|
K !== -1 && (this.hash = i.substr(K), i = i.slice(0, K));
|
|
3841
3859
|
var V = i.indexOf("?");
|
|
3842
|
-
if (V !== -1 ? (this.search = i.substr(V), this.query = i.substr(V + 1), e && (this.query =
|
|
3860
|
+
if (V !== -1 ? (this.search = i.substr(V), this.query = i.substr(V + 1), e && (this.query = Yt.parse(this.query)), i = i.slice(0, V)) : e && (this.search = "", this.query = {}), i && (this.pathname = i), Pe[f] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
3843
3861
|
var Q = this.pathname || "", Y = this.search || "";
|
|
3844
3862
|
this.path = Q + Y;
|
|
3845
3863
|
}
|
|
3846
3864
|
return this.href = this.format(), this;
|
|
3847
3865
|
};
|
|
3848
|
-
function
|
|
3849
|
-
return typeof t == "string" && (t =
|
|
3866
|
+
function ks(t) {
|
|
3867
|
+
return typeof t == "string" && (t = ir(t)), t instanceof te ? t.format() : te.prototype.format.call(t);
|
|
3850
3868
|
}
|
|
3851
3869
|
te.prototype.format = function() {
|
|
3852
3870
|
var t = this.auth || "";
|
|
3853
3871
|
t && (t = encodeURIComponent(t), t = t.replace(/%3A/i, ":"), t += "@");
|
|
3854
3872
|
var e = this.protocol || "", r = this.pathname || "", n = this.hash || "", s = !1, o = "";
|
|
3855
|
-
this.host ? s = t + this.host : this.hostname && (s = t + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (s += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (o =
|
|
3873
|
+
this.host ? s = t + this.host : this.hostname && (s = t + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (s += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (o = Yt.stringify(this.query, {
|
|
3856
3874
|
arrayFormat: "repeat",
|
|
3857
3875
|
addQueryPrefix: !1
|
|
3858
3876
|
}));
|
|
@@ -3862,7 +3880,7 @@ te.prototype.format = function() {
|
|
|
3862
3880
|
}), a = a.replace("#", "%23"), e + s + r + a + n;
|
|
3863
3881
|
};
|
|
3864
3882
|
te.prototype.resolve = function(t) {
|
|
3865
|
-
return this.resolveObject(
|
|
3883
|
+
return this.resolveObject(ir(t, !1, !0)).format();
|
|
3866
3884
|
};
|
|
3867
3885
|
te.prototype.resolveObject = function(t) {
|
|
3868
3886
|
if (typeof t == "string") {
|
|
@@ -3890,15 +3908,15 @@ te.prototype.resolveObject = function(t) {
|
|
|
3890
3908
|
}
|
|
3891
3909
|
return r.href = r.format(), r;
|
|
3892
3910
|
}
|
|
3893
|
-
if (r.protocol = t.protocol, !t.host && !
|
|
3911
|
+
if (r.protocol = t.protocol, !t.host && !Qt[t.protocol]) {
|
|
3894
3912
|
for (var v = (t.pathname || "").split("/"); v.length && !(t.host = v.shift()); )
|
|
3895
3913
|
;
|
|
3896
3914
|
t.host || (t.host = ""), t.hostname || (t.hostname = ""), v[0] !== "" && v.unshift(""), v.length < 2 && v.unshift(""), r.pathname = v.join("/");
|
|
3897
3915
|
} else
|
|
3898
3916
|
r.pathname = t.pathname;
|
|
3899
3917
|
if (r.search = t.search, r.query = t.query, r.host = t.host || "", r.auth = t.auth, r.hostname = t.hostname || t.host, r.port = t.port, r.pathname || r.search) {
|
|
3900
|
-
var
|
|
3901
|
-
r.path =
|
|
3918
|
+
var p = r.pathname || "", d = r.search || "";
|
|
3919
|
+
r.path = p + d;
|
|
3902
3920
|
}
|
|
3903
3921
|
return r.slashes = r.slashes || t.slashes, r.href = r.format(), r;
|
|
3904
3922
|
}
|
|
@@ -3932,20 +3950,20 @@ te.prototype.resolveObject = function(t) {
|
|
|
3932
3950
|
return g = g || r.host && m.length, g && !J && m.unshift(""), m.length > 0 ? r.pathname = m.join("/") : (r.pathname = null, r.path = null), (r.pathname !== null || r.search !== null) && (r.path = (r.pathname ? r.pathname : "") + (r.search ? r.search : "")), r.auth = t.auth || r.auth, r.slashes = r.slashes || t.slashes, r.href = r.format(), r;
|
|
3933
3951
|
};
|
|
3934
3952
|
te.prototype.parseHost = function() {
|
|
3935
|
-
var t = this.host, e =
|
|
3953
|
+
var t = this.host, e = Os.exec(t);
|
|
3936
3954
|
e && (e = e[0], e !== ":" && (this.port = e.substr(1)), t = t.substr(0, t.length - e.length)), t && (this.hostname = t);
|
|
3937
3955
|
};
|
|
3938
|
-
var
|
|
3939
|
-
const
|
|
3956
|
+
var As = ir, Xr = ks;
|
|
3957
|
+
const Rs = () => Object.keys(xe).map((t) => ({
|
|
3940
3958
|
...xe[t].info,
|
|
3941
3959
|
clients: Object.keys(xe[t].clientsById).map((e) => xe[t].clientsById[e].info)
|
|
3942
|
-
})),
|
|
3943
|
-
var
|
|
3960
|
+
})), qs = (t) => typeof t == "object" && "log" in t && typeof t.log == "object" && "entries" in t.log && Array.isArray(t.log.entries);
|
|
3961
|
+
var Ns = class {
|
|
3944
3962
|
constructor(t, e = {}) {
|
|
3945
3963
|
this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
|
|
3946
3964
|
harIsAlreadyEncoded: !1,
|
|
3947
3965
|
...e
|
|
3948
|
-
}, this.requests = [],
|
|
3966
|
+
}, this.requests = [], qs(t) ? this.entries = t.log.entries : this.entries = [{ request: t }];
|
|
3949
3967
|
}
|
|
3950
3968
|
init() {
|
|
3951
3969
|
return this.initCalled = !0, this.requests = this.entries.map(({ request: t }) => {
|
|
@@ -3964,7 +3982,7 @@ var Ls = class {
|
|
|
3964
3982
|
}), this;
|
|
3965
3983
|
}
|
|
3966
3984
|
prepare(t, e) {
|
|
3967
|
-
var f, u,
|
|
3985
|
+
var f, u, p;
|
|
3968
3986
|
const r = {
|
|
3969
3987
|
...t,
|
|
3970
3988
|
fullUrl: "",
|
|
@@ -3974,42 +3992,42 @@ var Ls = class {
|
|
|
3974
3992
|
cookiesObj: {},
|
|
3975
3993
|
allHeaders: {}
|
|
3976
3994
|
};
|
|
3977
|
-
if (r != null && r.queryString.length && (r.queryObj = r.queryString.reduce(
|
|
3978
|
-
const
|
|
3995
|
+
if (r != null && r.queryString.length && (r.queryObj = r.queryString.reduce(vr, {})), r != null && r.headers.length) {
|
|
3996
|
+
const d = /^HTTP\/2/;
|
|
3979
3997
|
r.headersObj = r.headers.reduce((h, { name: y, value: g }) => {
|
|
3980
|
-
const b =
|
|
3998
|
+
const b = d.exec(r.httpVersion) ? y.toLocaleLowerCase() : y;
|
|
3981
3999
|
return {
|
|
3982
4000
|
...h,
|
|
3983
4001
|
[b]: g
|
|
3984
4002
|
};
|
|
3985
4003
|
}, {});
|
|
3986
4004
|
}
|
|
3987
|
-
r != null && r.cookies.length && (r.cookiesObj = r.cookies.reduceRight((
|
|
3988
|
-
...
|
|
4005
|
+
r != null && r.cookies.length && (r.cookiesObj = r.cookies.reduceRight((d, { name: h, value: y }) => ({
|
|
4006
|
+
...d,
|
|
3989
4007
|
[h]: y
|
|
3990
4008
|
}), {}));
|
|
3991
|
-
const n = (f = r.cookies) == null ? void 0 : f.map(({ name:
|
|
4009
|
+
const n = (f = r.cookies) == null ? void 0 : f.map(({ name: d, value: h }) => e.harIsAlreadyEncoded ? `${d}=${h}` : `${encodeURIComponent(d)}=${encodeURIComponent(h)}`);
|
|
3992
4010
|
switch (n != null && n.length && (r.allHeaders.cookie = n.join("; ")), r.postData.mimeType) {
|
|
3993
4011
|
case "multipart/mixed":
|
|
3994
4012
|
case "multipart/related":
|
|
3995
4013
|
case "multipart/form-data":
|
|
3996
4014
|
case "multipart/alternative":
|
|
3997
4015
|
if (r.postData.text = "", r.postData.mimeType = "multipart/form-data", (u = r.postData) != null && u.params) {
|
|
3998
|
-
const
|
|
4016
|
+
const d = "---011000010111000001101001", h = `${d}--`, y = `\r
|
|
3999
4017
|
`;
|
|
4000
4018
|
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
|
4001
4019
|
const g = (O) => O.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), b = (O) => O.replace(/\r?\n|\r/g, `\r
|
|
4002
|
-
`), m = [`--${
|
|
4003
|
-
(
|
|
4020
|
+
`), m = [`--${d}`];
|
|
4021
|
+
(p = r.postData) == null || p.params.forEach((O, $) => {
|
|
4004
4022
|
const w = O.name, C = O.value || "", T = O.fileName || null, k = O.contentType || "application/octet-stream";
|
|
4005
|
-
T ? (m.push(`Content-Disposition: form-data; name="${g(b(w))}"; filename="${T}"`), m.push(`Content-Type: ${k}`)) : m.push(`Content-Disposition: form-data; name="${escape(b(w))}"`), m.push(""), m.push(b(C)), $ !== r.postData.params.length - 1 && m.push(`--${
|
|
4006
|
-
}), m.push(`--${h}`), r.postData.boundary =
|
|
4023
|
+
T ? (m.push(`Content-Disposition: form-data; name="${g(b(w))}"; filename="${T}"`), m.push(`Content-Type: ${k}`)) : m.push(`Content-Disposition: form-data; name="${escape(b(w))}"`), m.push(""), m.push(b(C)), $ !== r.postData.params.length - 1 && m.push(`--${d}`);
|
|
4024
|
+
}), m.push(`--${h}`), r.postData.boundary = d, r.postData.text = m.join(y);
|
|
4007
4025
|
const v = B(r.headersObj, "content-type") || "content-type";
|
|
4008
|
-
r.headersObj[v] = `multipart/form-data; boundary=${
|
|
4026
|
+
r.headersObj[v] = `multipart/form-data; boundary=${d}`;
|
|
4009
4027
|
}
|
|
4010
4028
|
break;
|
|
4011
4029
|
case "application/x-www-form-urlencoded":
|
|
4012
|
-
r.postData.params ? (r.postData.paramsObj = r.postData.params.reduce(
|
|
4030
|
+
r.postData.params ? (r.postData.paramsObj = r.postData.params.reduce(vr, {}), r.postData.text = rt.stringify(r.postData.paramsObj)) : r.postData.text = "";
|
|
4013
4031
|
break;
|
|
4014
4032
|
case "text/json":
|
|
4015
4033
|
case "text/x-json":
|
|
@@ -4025,7 +4043,7 @@ var Ls = class {
|
|
|
4025
4043
|
const s = {
|
|
4026
4044
|
...r.allHeaders,
|
|
4027
4045
|
...r.headersObj
|
|
4028
|
-
}, o =
|
|
4046
|
+
}, o = As(r.url, !0, !0);
|
|
4029
4047
|
r.queryObj = {
|
|
4030
4048
|
...r.queryObj,
|
|
4031
4049
|
...o.query
|
|
@@ -4040,11 +4058,11 @@ var Ls = class {
|
|
|
4040
4058
|
query: r.queryObj,
|
|
4041
4059
|
search: a,
|
|
4042
4060
|
path: a ? `${o.pathname}?${a}` : o.pathname
|
|
4043
|
-
}, c =
|
|
4061
|
+
}, c = Xr({
|
|
4044
4062
|
...o,
|
|
4045
4063
|
query: null,
|
|
4046
4064
|
search: null
|
|
4047
|
-
}), l =
|
|
4065
|
+
}), l = Xr({
|
|
4048
4066
|
...o,
|
|
4049
4067
|
...i
|
|
4050
4068
|
});
|
|
@@ -4071,11 +4089,11 @@ var Ls = class {
|
|
|
4071
4089
|
return this.requests.map((o) => s != null && s.installation ? s.installation(o, r) : !1);
|
|
4072
4090
|
}
|
|
4073
4091
|
};
|
|
4074
|
-
const
|
|
4075
|
-
function
|
|
4076
|
-
return
|
|
4092
|
+
const Rn = "agent", qn = "prompt";
|
|
4093
|
+
function _s() {
|
|
4094
|
+
return Rs();
|
|
4077
4095
|
}
|
|
4078
|
-
function
|
|
4096
|
+
function Ls(t) {
|
|
4079
4097
|
var n;
|
|
4080
4098
|
const e = t == null ? void 0 : t[0];
|
|
4081
4099
|
if (!e) return "http://localhost";
|
|
@@ -4086,12 +4104,12 @@ function Us(t) {
|
|
|
4086
4104
|
}
|
|
4087
4105
|
return r;
|
|
4088
4106
|
}
|
|
4089
|
-
function
|
|
4107
|
+
function Is(t) {
|
|
4090
4108
|
if (t.example !== void 0 || t.examples && Object.keys(t.examples).length > 0) return !0;
|
|
4091
4109
|
const e = t.schema;
|
|
4092
4110
|
return !!((e == null ? void 0 : e.example) !== void 0 || e != null && e.enum && e.enum.length > 0);
|
|
4093
4111
|
}
|
|
4094
|
-
function
|
|
4112
|
+
function Nn(t) {
|
|
4095
4113
|
if (t.example !== void 0) return String(t.example);
|
|
4096
4114
|
if (t.examples) {
|
|
4097
4115
|
for (const r of Object.values(t.examples))
|
|
@@ -4101,16 +4119,16 @@ function Cn(t) {
|
|
|
4101
4119
|
const e = t.schema;
|
|
4102
4120
|
return (e == null ? void 0 : e.example) !== void 0 ? String(e.example) : e != null && e.enum && e.enum.length > 0 ? String(e.enum[0]) : `{${t.name}}`;
|
|
4103
4121
|
}
|
|
4104
|
-
function
|
|
4122
|
+
function Us(t, e, r) {
|
|
4105
4123
|
const n = e.replace(/\{([^}]+)\}/g, (s, o) => {
|
|
4106
4124
|
const a = r.find((c) => c.in === "path" && c.name === o);
|
|
4107
4125
|
if (!a) return s;
|
|
4108
|
-
const i =
|
|
4126
|
+
const i = Nn(a);
|
|
4109
4127
|
return i === `{${o}}` ? i : encodeURIComponent(i);
|
|
4110
4128
|
});
|
|
4111
4129
|
return `${t.replace(/\/$/, "")}${n}`;
|
|
4112
4130
|
}
|
|
4113
|
-
function
|
|
4131
|
+
function Fs(t, e) {
|
|
4114
4132
|
var s;
|
|
4115
4133
|
const r = t[0];
|
|
4116
4134
|
if (!r || !e) return [];
|
|
@@ -4132,7 +4150,7 @@ function Hs(t, e) {
|
|
|
4132
4150
|
}
|
|
4133
4151
|
return n;
|
|
4134
4152
|
}
|
|
4135
|
-
function
|
|
4153
|
+
function Ms(t) {
|
|
4136
4154
|
const e = t == null ? void 0 : t.content;
|
|
4137
4155
|
if (!e) return null;
|
|
4138
4156
|
const r = "application/json" in e ? "application/json" : Object.keys(e)[0];
|
|
@@ -4148,12 +4166,12 @@ function Bs(t) {
|
|
|
4148
4166
|
}
|
|
4149
4167
|
return { contentType: r, schema: n.schema, authorExample: s };
|
|
4150
4168
|
}
|
|
4151
|
-
function
|
|
4152
|
-
const e =
|
|
4169
|
+
function Hs(t) {
|
|
4170
|
+
const e = Ls(t.servers), r = Us(e, t.path, t.parameters), n = Fs(t.security, t.securitySchemes), s = [], o = [], a = [];
|
|
4153
4171
|
for (const c of n)
|
|
4154
4172
|
(c.location === "header" ? s : c.location === "query" ? o : a).push({ name: c.name, value: c.value });
|
|
4155
4173
|
for (const c of t.parameters)
|
|
4156
|
-
c.in === "query" && (c.required ||
|
|
4174
|
+
c.in === "query" && (c.required || Is(c)) && o.push({ name: c.name, value: Nn(c) });
|
|
4157
4175
|
const i = {
|
|
4158
4176
|
method: t.method.toUpperCase(),
|
|
4159
4177
|
url: r,
|
|
@@ -4164,32 +4182,32 @@ function Ws(t) {
|
|
|
4164
4182
|
};
|
|
4165
4183
|
return t.media && t.resolvedBodyValue !== void 0 && (s.push({ name: "Content-Type", value: t.media.contentType }), i.postData = { mimeType: t.media.contentType, text: JSON.stringify(t.resolvedBodyValue, null, 2) }), i;
|
|
4166
4184
|
}
|
|
4167
|
-
function
|
|
4185
|
+
function Bs(t, e, r) {
|
|
4168
4186
|
try {
|
|
4169
|
-
const n = new
|
|
4187
|
+
const n = new Ns(t), [s] = n.convert(e, r);
|
|
4170
4188
|
return typeof s == "string" ? s : "";
|
|
4171
4189
|
} catch {
|
|
4172
4190
|
return "";
|
|
4173
4191
|
}
|
|
4174
4192
|
}
|
|
4175
|
-
const
|
|
4176
|
-
function
|
|
4193
|
+
const Ws = `${Rn}:${qn}`;
|
|
4194
|
+
function Vs({ method: t, path: e, parameters: r, requestBody: n, security: s, id: o }) {
|
|
4177
4195
|
var C;
|
|
4178
|
-
const { document: a, deref: i, showCodeSamples: c } =
|
|
4179
|
-
|
|
4196
|
+
const { document: a, deref: i, showCodeSamples: c } = Un(), l = a, f = _n(), u = Ve(() => _s(), []), [p, d] = gt(Ws), [h, y] = p.split(":"), g = Bn(h), b = Ve(() => Ms(n), [n]), [m, v] = gt(void 0);
|
|
4197
|
+
sr(() => {
|
|
4180
4198
|
if (v(void 0), !b || b.authorExample !== void 0 || !b.schema) return;
|
|
4181
4199
|
let T = !1;
|
|
4182
|
-
return
|
|
4200
|
+
return Wn(b.schema).then((k) => {
|
|
4183
4201
|
T || v(k);
|
|
4184
4202
|
}), () => {
|
|
4185
4203
|
T = !0;
|
|
4186
4204
|
};
|
|
4187
4205
|
}, [b]);
|
|
4188
|
-
const [, O] = gt(() =>
|
|
4189
|
-
|
|
4190
|
-
O(
|
|
4206
|
+
const [, O] = gt(() => cr(g));
|
|
4207
|
+
sr(() => {
|
|
4208
|
+
O(cr(g));
|
|
4191
4209
|
let T = !1;
|
|
4192
|
-
return
|
|
4210
|
+
return Fn(g).then(() => {
|
|
4193
4211
|
T || O(!0);
|
|
4194
4212
|
}), () => {
|
|
4195
4213
|
T = !0;
|
|
@@ -4198,7 +4216,7 @@ function Ds({ method: t, path: e, parameters: r, requestBody: n, security: s, id
|
|
|
4198
4216
|
const $ = Ve(
|
|
4199
4217
|
() => {
|
|
4200
4218
|
var T;
|
|
4201
|
-
return
|
|
4219
|
+
return Hs({
|
|
4202
4220
|
method: t,
|
|
4203
4221
|
path: e,
|
|
4204
4222
|
servers: l.servers,
|
|
@@ -4210,25 +4228,25 @@ function Ds({ method: t, path: e, parameters: r, requestBody: n, security: s, id
|
|
|
4210
4228
|
});
|
|
4211
4229
|
},
|
|
4212
4230
|
[t, e, l.servers, r, s, (C = l.components) == null ? void 0 : C.securitySchemes, b, m]
|
|
4213
|
-
), w = Ve(() => h ===
|
|
4214
|
-
return c ? /* @__PURE__ */
|
|
4215
|
-
/* @__PURE__ */
|
|
4216
|
-
/* @__PURE__ */
|
|
4217
|
-
/* @__PURE__ */
|
|
4231
|
+
), w = Ve(() => h === Rn && y === qn ? Mn(l, t, e, i) : Bs($, h, y), [$, h, y, l, t, e, i]);
|
|
4232
|
+
return c ? /* @__PURE__ */ ar("div", { id: `endpoint-${o}-code-samples`, children: [
|
|
4233
|
+
/* @__PURE__ */ ar("div", { className: "flex items-center justify-between mb-2", children: [
|
|
4234
|
+
/* @__PURE__ */ Ne("label", { htmlFor: f, className: "text-xs font-medium text-foreground-muted uppercase tracking-wider", children: "Example Request" }),
|
|
4235
|
+
/* @__PURE__ */ Ne(
|
|
4218
4236
|
"select",
|
|
4219
4237
|
{
|
|
4220
4238
|
id: f,
|
|
4221
|
-
value:
|
|
4222
|
-
onChange: (T) =>
|
|
4239
|
+
value: p,
|
|
4240
|
+
onChange: (T) => d(T.target.value),
|
|
4223
4241
|
"aria-label": "Code sample language",
|
|
4224
4242
|
className: "text-xs font-medium rounded-md border border-border bg-surface px-2 py-1 text-foreground-secondary focus:border-secondary-500 focus:ring-secondary-500",
|
|
4225
|
-
children: u.map((T) => /* @__PURE__ */
|
|
4243
|
+
children: u.map((T) => /* @__PURE__ */ Ne("optgroup", { label: T.title, children: T.clients.map((k) => /* @__PURE__ */ Ne("option", { value: `${T.key}:${k.key}`, children: k.title }, k.key)) }, T.key))
|
|
4226
4244
|
}
|
|
4227
4245
|
)
|
|
4228
4246
|
] }),
|
|
4229
|
-
/* @__PURE__ */
|
|
4247
|
+
/* @__PURE__ */ Ne(Hn, { code: w, language: g })
|
|
4230
4248
|
] }) : null;
|
|
4231
4249
|
}
|
|
4232
4250
|
export {
|
|
4233
|
-
|
|
4251
|
+
Vs as CodeSamples
|
|
4234
4252
|
};
|