zudoku 0.26.0 → 0.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/dist/config/config.d.ts +1 -0
  2. package/dist/config/loader.js +1 -1
  3. package/dist/config/loader.js.map +1 -1
  4. package/dist/config/validators/common.d.ts +11 -0
  5. package/dist/config/validators/common.js +1 -0
  6. package/dist/config/validators/common.js.map +1 -1
  7. package/dist/config/validators/validate.d.ts +5 -0
  8. package/dist/lib/authentication/providers/auth0.js +1 -1
  9. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  10. package/dist/lib/authentication/providers/openid.d.ts +1 -1
  11. package/dist/lib/authentication/providers/openid.js +10 -6
  12. package/dist/lib/authentication/providers/openid.js.map +1 -1
  13. package/dist/lib/components/Autocomplete.d.ts +12 -0
  14. package/dist/lib/components/Autocomplete.js +47 -0
  15. package/dist/lib/components/Autocomplete.js.map +1 -0
  16. package/dist/lib/components/Header.js +3 -3
  17. package/dist/lib/components/Header.js.map +1 -1
  18. package/dist/lib/components/index.js +2 -2
  19. package/dist/lib/components/index.js.map +1 -1
  20. package/dist/lib/plugins/markdown/MdxPage.js +8 -2
  21. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  22. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -1
  23. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -2
  24. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  25. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  26. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  27. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
  28. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +12 -0
  29. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
  30. package/dist/lib/plugins/openapi/playground/Headers.js +66 -4
  31. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  32. package/dist/lib/plugins/openapi/playground/Playground.d.ts +5 -1
  33. package/dist/lib/plugins/openapi/playground/Playground.js +36 -11
  34. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  35. package/dist/lib/plugins/openapi/playground/QueryParams.js +20 -30
  36. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  37. package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +2 -1
  38. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +5 -3
  39. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -1
  40. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +49 -0
  41. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -1
  42. package/dist/lib/plugins/openapi/post-processors/removeParameters.d.ts +10 -0
  43. package/dist/lib/plugins/openapi/post-processors/removeParameters.js +66 -0
  44. package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +1 -0
  45. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.d.ts +1 -0
  46. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js +131 -0
  47. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +1 -0
  48. package/dist/lib/ui/Command.d.ts +9 -1
  49. package/dist/lib/ui/Command.js +5 -1
  50. package/dist/lib/ui/Command.js.map +1 -1
  51. package/dist/lib/util/joinUrl.d.ts +1 -0
  52. package/dist/lib/util/joinUrl.js +40 -0
  53. package/dist/lib/util/joinUrl.js.map +1 -0
  54. package/dist/vite/build.js +10 -10
  55. package/dist/vite/build.js.map +1 -1
  56. package/dist/vite/config.js +4 -1
  57. package/dist/vite/config.js.map +1 -1
  58. package/dist/vite/dev-server.js +4 -1
  59. package/dist/vite/dev-server.js.map +1 -1
  60. package/dist/vite/plugin-api.d.ts +1 -1
  61. package/dist/vite/plugin-api.js +23 -5
  62. package/dist/vite/plugin-api.js.map +1 -1
  63. package/dist/vite/plugin-auth.js +4 -1
  64. package/dist/vite/plugin-auth.js.map +1 -1
  65. package/dist/vite/plugin-mdx.js +9 -4
  66. package/dist/vite/plugin-mdx.js.map +1 -1
  67. package/dist/vite/prerender.d.ts +2 -2
  68. package/dist/vite/prerender.js +4 -4
  69. package/dist/vite/prerender.js.map +1 -1
  70. package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
  71. package/dist/zuplo/enrich-with-zuplo.js +184 -0
  72. package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
  73. package/dist/zuplo/env.d.ts +1 -0
  74. package/dist/zuplo/env.js +3 -0
  75. package/dist/zuplo/env.js.map +1 -1
  76. package/dist/zuplo/policy-types.d.ts +33 -0
  77. package/dist/zuplo/policy-types.js +8 -0
  78. package/dist/zuplo/policy-types.js.map +1 -0
  79. package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
  80. package/dist/zuplo/with-zuplo-processors.js +26 -0
  81. package/dist/zuplo/with-zuplo-processors.js.map +1 -0
  82. package/dist/zuplo/with-zuplo.d.ts +1 -2
  83. package/dist/zuplo/with-zuplo.js +6 -27
  84. package/dist/zuplo/with-zuplo.js.map +1 -1
  85. package/lib/{AnchorLink-_Vu02ceN.js → AnchorLink-bObQitZv.js} +2 -2
  86. package/lib/{AnchorLink-_Vu02ceN.js.map → AnchorLink-bObQitZv.js.map} +1 -1
  87. package/lib/{AuthenticationPlugin-DNXBcsVN.js → AuthenticationPlugin-C9SwOxkc.js} +3 -3
  88. package/lib/{AuthenticationPlugin-DNXBcsVN.js.map → AuthenticationPlugin-C9SwOxkc.js.map} +1 -1
  89. package/lib/{Markdown-BrfrjEk_.js → Markdown-DFN6p0J-.js} +2 -2
  90. package/lib/{Markdown-BrfrjEk_.js.map → Markdown-DFN6p0J-.js.map} +1 -1
  91. package/lib/{MdxPage-LNZLj_A5.js → MdxPage-D9c4z09Q.js} +63 -58
  92. package/lib/MdxPage-D9c4z09Q.js.map +1 -0
  93. package/lib/{OperationList-PCwzTp1r.js → OperationList-DGJWDx1G.js} +875 -871
  94. package/lib/{OperationList-PCwzTp1r.js.map → OperationList-DGJWDx1G.js.map} +1 -1
  95. package/lib/{Route-Pzk6qwIk.js → Route-VdmEyOD0.js} +3 -3
  96. package/lib/{Route-Pzk6qwIk.js.map → Route-VdmEyOD0.js.map} +1 -1
  97. package/lib/{Select-DkOpAG0c.js → Select-D3O7wISy.js} +3 -3
  98. package/lib/{Select-DkOpAG0c.js.map → Select-D3O7wISy.js.map} +1 -1
  99. package/lib/{SlotletProvider-DPbx9KdU.js → SlotletProvider-_3zzX_g_.js} +4 -4
  100. package/lib/{SlotletProvider-DPbx9KdU.js.map → SlotletProvider-_3zzX_g_.js.map} +1 -1
  101. package/lib/{Button-oroWHXAy.js → Spinner-BlzrEEk1.js} +15 -12
  102. package/lib/Spinner-BlzrEEk1.js.map +1 -0
  103. package/lib/{ZudokuContext-D3ayHjP-.js → ZudokuContext-DeQZEp-x.js} +2 -2
  104. package/lib/{ZudokuContext-D3ayHjP-.js.map → ZudokuContext-DeQZEp-x.js.map} +1 -1
  105. package/lib/{chunk-SYFQ2XB5-KWlHsT7t.js → chunk-SYFQ2XB5-BF5IDYrB.js} +6 -5
  106. package/lib/{chunk-SYFQ2XB5-KWlHsT7t.js.map → chunk-SYFQ2XB5-BF5IDYrB.js.map} +1 -1
  107. package/lib/{hook-DUyACbIK.js → hook-BRQEDRbn.js} +2 -2
  108. package/lib/{hook-DUyACbIK.js.map → hook-BRQEDRbn.js.map} +1 -1
  109. package/lib/index-B7mqiOei.js +509 -0
  110. package/lib/index-B7mqiOei.js.map +1 -0
  111. package/lib/index-CXRrqOIl.js +1750 -0
  112. package/lib/index-CXRrqOIl.js.map +1 -0
  113. package/lib/joinUrl-BTy9bvoK.js +20 -0
  114. package/lib/joinUrl-BTy9bvoK.js.map +1 -0
  115. package/lib/post-processors/removeExtensions.js +7 -7
  116. package/lib/post-processors/removeExtensions.js.map +1 -1
  117. package/lib/post-processors/removeParameters.js +48 -0
  118. package/lib/post-processors/removeParameters.js.map +1 -0
  119. package/lib/ui/ActionButton.js +10 -11
  120. package/lib/ui/ActionButton.js.map +1 -1
  121. package/lib/ui/Command.js +125 -13
  122. package/lib/ui/Command.js.map +1 -1
  123. package/lib/{useExposedProps-BBHR7aLM.js → useExposedProps-CetwhZpP.js} +2 -2
  124. package/lib/{useExposedProps-BBHR7aLM.js.map → useExposedProps-CetwhZpP.js.map} +1 -1
  125. package/lib/zudoku.auth-auth0.js +7 -9
  126. package/lib/zudoku.auth-auth0.js.map +1 -1
  127. package/lib/zudoku.auth-clerk.js +1 -1
  128. package/lib/zudoku.auth-openid.js +223 -219
  129. package/lib/zudoku.auth-openid.js.map +1 -1
  130. package/lib/zudoku.components.js +219 -219
  131. package/lib/zudoku.components.js.map +1 -1
  132. package/lib/zudoku.plugin-api-catalog.js +3 -3
  133. package/lib/zudoku.plugin-api-keys.js +5 -5
  134. package/lib/zudoku.plugin-custom-pages.js +2 -2
  135. package/lib/zudoku.plugin-markdown.js +1 -1
  136. package/lib/zudoku.plugin-openapi.js +4 -4
  137. package/lib/zudoku.plugin-redirect.js +1 -1
  138. package/package.json +1 -1
  139. package/src/app/main.css +50 -50
  140. package/src/lib/authentication/providers/auth0.tsx +1 -4
  141. package/src/lib/authentication/providers/openid.tsx +12 -5
  142. package/src/lib/components/Autocomplete.tsx +111 -0
  143. package/src/lib/components/Header.tsx +3 -3
  144. package/src/lib/components/index.ts +2 -2
  145. package/src/lib/plugins/markdown/MdxPage.tsx +9 -1
  146. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +5 -0
  147. package/src/lib/plugins/openapi/Sidecar.tsx +1 -0
  148. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +51 -0
  149. package/src/lib/plugins/openapi/playground/Headers.tsx +138 -41
  150. package/src/lib/plugins/openapi/playground/Playground.tsx +156 -62
  151. package/src/lib/plugins/openapi/playground/QueryParams.tsx +89 -122
  152. package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +58 -0
  153. package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +7 -4
  154. package/src/lib/plugins/openapi/post-processors/removeParameters.test.ts +148 -0
  155. package/src/lib/plugins/openapi/post-processors/removeParameters.ts +101 -0
  156. package/src/lib/ui/Command.tsx +20 -0
  157. package/src/lib/util/joinUrl.ts +57 -0
  158. package/dist/lib/plugins/openapi/playground/EnumSelector.d.ts +0 -8
  159. package/dist/lib/plugins/openapi/playground/EnumSelector.js +0 -21
  160. package/dist/lib/plugins/openapi/playground/EnumSelector.js.map +0 -1
  161. package/lib/Button-oroWHXAy.js.map +0 -1
  162. package/lib/Command-D5DE0DD7.js +0 -611
  163. package/lib/Command-D5DE0DD7.js.map +0 -1
  164. package/lib/MdxPage-LNZLj_A5.js.map +0 -1
  165. package/lib/Spinner-C5gHXrVz.js +0 -7
  166. package/lib/Spinner-C5gHXrVz.js.map +0 -1
  167. package/lib/index-CaILD1AV.js +0 -1292
  168. package/lib/index-CaILD1AV.js.map +0 -1
  169. package/src/lib/plugins/openapi/playground/EnumSelector.tsx +0 -86
@@ -1,17 +1,17 @@
1
1
  import { j as g } from "./jsx-runtime-Bdg6XQ1m.js";
2
- import { u as vr, i as Po } from "./ZudokuContext-D3ayHjP-.js";
2
+ import { u as vr, i as Po } from "./ZudokuContext-DeQZEp-x.js";
3
3
  import { H as Ro } from "./index.esm-9-TF9KQB.js";
4
- import { b as qo, a as No } from "./chunk-SYFQ2XB5-KWlHsT7t.js";
5
- import { S as ko, a as Eo, b as Ao, c as Io, e as Lo } from "./Select-DkOpAG0c.js";
4
+ import { b as qo, a as No } from "./chunk-SYFQ2XB5-BF5IDYrB.js";
5
+ import { S as ko, a as Eo, b as Ao, c as Io, e as Lo } from "./Select-D3O7wISy.js";
6
6
  import { a as br } from "./state-mM7uaXTW.js";
7
7
  import { C as _r } from "./CategoryHeading-MYL1u_6K.js";
8
- import { I as Uo, M as Se, H as Be, P as qe } from "./Markdown-BrfrjEk_.js";
8
+ import { I as Uo, M as Se, H as Be, P as qe } from "./Markdown-DFN6p0J-.js";
9
9
  import { c as pe } from "./cn-qaFjX9_3.js";
10
10
  import { CheckIcon as Fo, CopyIcon as _o, UnfoldVerticalIcon as Bo, FoldVerticalIcon as Ho, ChevronDownIcon as Mo, CircleFadingPlusIcon as zo, CircleDotIcon as Go, CircleIcon as Wo, SquareMinusIcon as Jo, SquarePlusIcon as Vo, ListPlusIcon as Do, RefreshCcwDotIcon as Qo } from "lucide-react";
11
11
  import { useContext as Ko, useTransition as eo, useState as ve, useRef as xr, useEffect as $r, useLayoutEffect as Yo, Fragment as Xo, useMemo as Zo, useCallback as ea } from "react";
12
12
  import { Button as to } from "./ui/Button.js";
13
13
  import { a as ta, u as jr } from "./context-rwLGh-6_.js";
14
- import { g as nt, S as Ze, C as ro, P as ra } from "./index-CaILD1AV.js";
14
+ import { g as nt, S as Ze, C as ro, P as ra } from "./index-CXRrqOIl.js";
15
15
  import { Tabs as na, TabsList as oa, TabsTrigger as aa, TabsContent as ia } from "./ui/Tabs.js";
16
16
  import { a as sa } from "./StaggeredRender-DgsamH_G.js";
17
17
  import { Card as $e, CardHeader as la, CardTitle as ca, CardContent as ua } from "./ui/Card.js";
@@ -19,7 +19,7 @@ import { c as fa } from "./index-Djenk2Hj.js";
19
19
  import { g as pa, c as et, a as da } from "./_commonjsHelpers-BkfeUUK-.js";
20
20
  import { _ as ha } from "./__vite-browser-external-BYRIRx8p.js";
21
21
  import { S as no } from "./SyntaxHighlight-CJCSPG1F.js";
22
- import { B as Br } from "./Button-oroWHXAy.js";
22
+ import { B as Br } from "./Spinner-BlzrEEk1.js";
23
23
  import * as ye from "@radix-ui/react-collapsible";
24
24
  import * as Ye from "@radix-ui/react-tabs";
25
25
  import { C as ya } from "./index-TaRXY2w1.js";
@@ -62,7 +62,7 @@ const wr = (e, ...n) => {
62
62
  }
63
63
  );
64
64
  }, va = () => {
65
- const { input: e, type: n } = jr(), t = wr(ga, { input: e, type: n }), o = vr(t), [, s] = eo(), { selectedServer: c, setSelectedServer: r } = br(), { servers: a } = o.data.schema;
65
+ const { input: e, type: n } = jr(), t = wr(ga, { input: e, type: n }), o = vr(t), [, s] = eo(), { selectedServer: l, setSelectedServer: r } = br(), { servers: a } = o.data.schema;
66
66
  return a.length === 0 ? null : a.length === 1 ? /* @__PURE__ */ g.jsxs("div", { className: "flex items-center gap-2", children: [
67
67
  /* @__PURE__ */ g.jsx("span", { className: "font-medium text-sm", children: "Endpoint:" }),
68
68
  /* @__PURE__ */ g.jsx(Uo, { className: "text-xs px-2 py-1.5", selectOnClick: !0, children: a[0].url }),
@@ -76,7 +76,7 @@ const wr = (e, ...n) => {
76
76
  onChange: (i) => s(() => {
77
77
  r(i.target.value);
78
78
  }),
79
- value: c ?? o.data.schema.url,
79
+ value: l ?? o.data.schema.url,
80
80
  showChevrons: a.length > 1,
81
81
  options: a.map((i) => ({
82
82
  value: i.url,
@@ -84,7 +84,7 @@ const wr = (e, ...n) => {
84
84
  }))
85
85
  }
86
86
  ),
87
- /* @__PURE__ */ g.jsx(Hr, { url: c ?? o.data.schema.url })
87
+ /* @__PURE__ */ g.jsx(Hr, { url: l ?? o.data.schema.url })
88
88
  ] });
89
89
  }, oo = (e, n) => e.reduce(
90
90
  (t, o) => {
@@ -178,7 +178,7 @@ var Mr = (e, n) => {
178
178
  this.code.push("");
179
179
  }, this.join = () => {
180
180
  const t = this.code.join(this.lineJoin);
181
- return this.postProcessors.reduce((s, c) => c(s), t);
181
+ return this.postProcessors.reduce((s, l) => l(s), t);
182
182
  }, this.addPostProcessor = (t) => {
183
183
  this.postProcessors = [...this.postProcessors, t];
184
184
  }, this.indentationCharacter = e || zr, this.lineJoin = n ?? Gr;
@@ -205,30 +205,30 @@ function Ca() {
205
205
  if (Dr) return vt;
206
206
  Dr = 1;
207
207
  const e = Sa(), n = Oa(), t = Ta().default;
208
- return vt = (o, s, c) => {
208
+ return vt = (o, s, l) => {
209
209
  const r = [];
210
- return function a(i, l, h) {
211
- l = l || {}, l.indent = l.indent || " ", h = h || "";
212
- let f;
213
- l.inlineCharacterLimit === void 0 ? f = {
210
+ return function a(i, c, u) {
211
+ c = c || {}, c.indent = c.indent || " ", u = u || "";
212
+ let p;
213
+ c.inlineCharacterLimit === void 0 ? p = {
214
214
  newLine: `
215
215
  `,
216
216
  newLineOrSpace: `
217
217
  `,
218
- pad: h,
219
- indent: h + l.indent
220
- } : f = {
218
+ pad: u,
219
+ indent: u + c.indent
220
+ } : p = {
221
221
  newLine: "@@__STRINGIFY_OBJECT_NEW_LINE__@@",
222
222
  newLineOrSpace: "@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",
223
223
  pad: "@@__STRINGIFY_OBJECT_PAD__@@",
224
224
  indent: "@@__STRINGIFY_OBJECT_INDENT__@@"
225
225
  };
226
- const p = (y) => {
227
- if (l.inlineCharacterLimit === void 0)
226
+ const d = (y) => {
227
+ if (c.inlineCharacterLimit === void 0)
228
228
  return y;
229
- const x = y.replace(new RegExp(f.newLine, "g"), "").replace(new RegExp(f.newLineOrSpace, "g"), " ").replace(new RegExp(f.pad + "|" + f.indent, "g"), "");
230
- return x.length <= l.inlineCharacterLimit ? x : y.replace(new RegExp(f.newLine + "|" + f.newLineOrSpace, "g"), `
231
- `).replace(new RegExp(f.pad, "g"), h).replace(new RegExp(f.indent, "g"), h + l.indent);
229
+ const x = y.replace(new RegExp(p.newLine, "g"), "").replace(new RegExp(p.newLineOrSpace, "g"), " ").replace(new RegExp(p.pad + "|" + p.indent, "g"), "");
230
+ return x.length <= c.inlineCharacterLimit ? x : y.replace(new RegExp(p.newLine + "|" + p.newLineOrSpace, "g"), `
231
+ `).replace(new RegExp(p.pad, "g"), u).replace(new RegExp(p.indent, "g"), u + c.indent);
232
232
  };
233
233
  if (r.indexOf(i) !== -1)
234
234
  return '"[Circular]"';
@@ -240,28 +240,28 @@ function Ca() {
240
240
  if (i.length === 0)
241
241
  return "[]";
242
242
  r.push(i);
243
- const y = "[" + f.newLine + i.map((x, $) => {
244
- const d = i.length - 1 === $ ? f.newLine : "," + f.newLineOrSpace;
245
- let m = a(x, l, h + l.indent);
246
- return l.transform && (m = l.transform(i, $, m)), f.indent + m + d;
247
- }).join("") + f.pad + "]";
248
- return r.pop(), p(y);
243
+ const y = "[" + p.newLine + i.map((x, $) => {
244
+ const h = i.length - 1 === $ ? p.newLine : "," + p.newLineOrSpace;
245
+ let m = a(x, c, u + c.indent);
246
+ return c.transform && (m = c.transform(i, $, m)), p.indent + m + h;
247
+ }).join("") + p.pad + "]";
248
+ return r.pop(), d(y);
249
249
  }
250
250
  if (n(i)) {
251
251
  let y = Object.keys(i).concat(t(i));
252
- if (l.filter && (y = y.filter(($) => l.filter(i, $))), y.length === 0)
252
+ if (c.filter && (y = y.filter(($) => c.filter(i, $))), y.length === 0)
253
253
  return "{}";
254
254
  r.push(i);
255
- const x = "{" + f.newLine + y.map(($, d) => {
256
- const m = y.length - 1 === d ? f.newLine : "," + f.newLineOrSpace, v = typeof $ == "symbol", S = !v && /^[a-z$_][a-z$_0-9]*$/i.test($), T = v || S ? $ : a($, l);
257
- let u = a(i[$], l, h + l.indent);
258
- return l.transform && (u = l.transform(i, $, u)), f.indent + String(T) + ": " + u + m;
259
- }).join("") + f.pad + "}";
260
- return r.pop(), p(x);
255
+ const x = "{" + p.newLine + y.map(($, h) => {
256
+ const m = y.length - 1 === h ? p.newLine : "," + p.newLineOrSpace, v = typeof $ == "symbol", S = !v && /^[a-z$_][a-z$_0-9]*$/i.test($), T = v || S ? $ : a($, c);
257
+ let f = a(i[$], c, u + c.indent);
258
+ return c.transform && (f = c.transform(i, $, f)), p.indent + String(T) + ": " + f + m;
259
+ }).join("") + p.pad + "}";
260
+ return r.pop(), d(x);
261
261
  }
262
262
  return i = String(i).replace(/[\r\n]/g, (y) => y === `
263
- ` ? "\\n" : "\\r"), l.singleQuotes === !1 ? (i = i.replace(/"/g, '\\"'), `"${i}"`) : (i = i.replace(/\\?'/g, "\\'"), `'${i}'`);
264
- }(o, s, c);
263
+ ` ? "\\n" : "\\r"), c.singleQuotes === !1 ? (i = i.replace(/"/g, '\\"'), `"${i}"`) : (i = i.replace(/\\?'/g, "\\'"), `'${i}'`);
264
+ }(o, s, l);
265
265
  }, vt;
266
266
  }
267
267
  var Pa = Ca();
@@ -280,12 +280,12 @@ var ze = (e) => Me(e, { delimiter: "'" }), le = (e) => Me(e, { delimiter: '"' })
280
280
  extname: ".c"
281
281
  },
282
282
  convert: ({ method: e, fullUrl: n, headersObj: t, allHeaders: o, postData: s }) => {
283
- const { push: c, blank: r, join: a } = new V();
284
- c("CURL *hnd = curl_easy_init();"), r(), c(`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${e.toUpperCase()}");`), c("curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);"), c(`curl_easy_setopt(hnd, CURLOPT_URL, "${n}");`);
283
+ const { push: l, blank: r, join: a } = new V();
284
+ l("CURL *hnd = curl_easy_init();"), r(), l(`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${e.toUpperCase()}");`), l("curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);"), l(`curl_easy_setopt(hnd, CURLOPT_URL, "${n}");`);
285
285
  const i = Object.keys(t);
286
- return i.length && (r(), c("struct curl_slist *headers = NULL;"), i.forEach((l) => {
287
- c(`headers = curl_slist_append(headers, "${l}: ${le(t[l])}");`);
288
- }), c("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), o.cookie && (r(), c(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${o.cookie}");`)), s.text && (r(), c(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(s.text)});`)), r(), c("CURLcode ret = curl_easy_perform(hnd);"), a();
286
+ return i.length && (r(), l("struct curl_slist *headers = NULL;"), i.forEach((c) => {
287
+ l(`headers = curl_slist_append(headers, "${c}: ${le(t[c])}");`);
288
+ }), l("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), o.cookie && (r(), l(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${o.cookie}");`)), s.text && (r(), l(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(s.text)});`)), r(), l("CURLcode ret = curl_easy_perform(hnd);"), a();
289
289
  }
290
290
  }, qa = {
291
291
  info: {
@@ -352,66 +352,66 @@ ${t}`);
352
352
  description: "An idiomatic clojure http client wrapping the apache client.",
353
353
  extname: ".clj"
354
354
  },
355
- convert: ({ queryObj: e, method: n, postData: t, url: o, allHeaders: s }, c) => {
356
- const { push: r, join: a } = new V({ indent: c == null ? void 0 : c.indent }), i = ["get", "post", "put", "delete", "patch", "head", "options"];
355
+ convert: ({ queryObj: e, method: n, postData: t, url: o, allHeaders: s }, l) => {
356
+ const { push: r, join: a } = new V({ indent: l == null ? void 0 : l.indent }), i = ["get", "post", "put", "delete", "patch", "head", "options"];
357
357
  if (n = n.toLowerCase(), !i.includes(n))
358
358
  return r("Method not supported"), a();
359
- const l = {
359
+ const c = {
360
360
  headers: s,
361
361
  "query-params": e
362
362
  };
363
363
  switch (t.mimeType) {
364
364
  case "application/json":
365
365
  {
366
- l["content-type"] = new Qr("json"), l["form-params"] = t.jsonObj;
367
- const h = fe(l.headers, "content-type");
368
- h && delete l.headers[h];
366
+ c["content-type"] = new Qr("json"), c["form-params"] = t.jsonObj;
367
+ const u = fe(c.headers, "content-type");
368
+ u && delete c.headers[u];
369
369
  }
370
370
  break;
371
371
  case "application/x-www-form-urlencoded":
372
372
  {
373
- l["form-params"] = t.paramsObj;
374
- const h = fe(l.headers, "content-type");
375
- h && delete l.headers[h];
373
+ c["form-params"] = t.paramsObj;
374
+ const u = fe(c.headers, "content-type");
375
+ u && delete c.headers[u];
376
376
  }
377
377
  break;
378
378
  case "text/plain":
379
379
  {
380
- l.body = t.text;
381
- const h = fe(l.headers, "content-type");
382
- h && delete l.headers[h];
380
+ c.body = t.text;
381
+ const u = fe(c.headers, "content-type");
382
+ u && delete c.headers[u];
383
383
  }
384
384
  break;
385
385
  case "multipart/form-data": {
386
386
  if (t.params) {
387
- l.multipart = t.params.map((f) => f.fileName && !f.value ? {
388
- name: f.name,
389
- content: new ka(f.fileName)
387
+ c.multipart = t.params.map((p) => p.fileName && !p.value ? {
388
+ name: p.name,
389
+ content: new ka(p.fileName)
390
390
  } : {
391
- name: f.name,
392
- content: f.value
391
+ name: p.name,
392
+ content: p.value
393
393
  });
394
- const h = fe(l.headers, "content-type");
395
- h && delete l.headers[h];
394
+ const u = fe(c.headers, "content-type");
395
+ u && delete c.headers[u];
396
396
  }
397
397
  break;
398
398
  }
399
399
  }
400
- switch (be(l.headers, "accept")) {
400
+ switch (be(c.headers, "accept")) {
401
401
  case "application/json":
402
402
  {
403
- l.accept = new Qr("json");
404
- const h = fe(l.headers, "accept");
405
- h && delete l.headers[h];
403
+ c.accept = new Qr("json");
404
+ const u = fe(c.headers, "accept");
405
+ u && delete c.headers[u];
406
406
  }
407
407
  break;
408
408
  }
409
409
  if (r(`(require '[clj-http.client :as client])
410
- `), io(Kr(l)))
410
+ `), io(Kr(c)))
411
411
  r(`(client/${n} "${o}")`);
412
412
  else {
413
- const h = 11 + n.length + o.length, f = Xe(h, yr(Kr(l)));
414
- r(`(client/${n} "${o}" ${f})`);
413
+ const u = 11 + n.length + o.length, p = Xe(u, yr(Kr(c)));
414
+ r(`(client/${n} "${o}" ${p})`);
415
415
  }
416
416
  return a();
417
417
  }
@@ -433,8 +433,8 @@ ${t}`);
433
433
  deflate: "DecompressionMethods.Deflate"
434
434
  }, o = [];
435
435
  return typeof n == "string" && (n = [n]), n.forEach((s) => {
436
- s.split(",").forEach((c) => {
437
- const r = /\s*([^;\s]+)/.exec(c);
436
+ s.split(",").forEach((l) => {
437
+ const r = /\s*([^;\s]+)/.exec(l);
438
438
  if (r) {
439
439
  const a = t[r[1]];
440
440
  a && o.push(a);
@@ -451,17 +451,17 @@ ${t}`);
451
451
  },
452
452
  convert: ({ allHeaders: e, postData: n, method: t, fullUrl: o }, s) => {
453
453
  var y, x;
454
- const c = {
454
+ const l = {
455
455
  indent: " ",
456
456
  ...s
457
- }, { push: r, join: a } = new V({ indent: c.indent });
457
+ }, { push: r, join: a } = new V({ indent: l.indent });
458
458
  r("using System.Net.Http.Headers;");
459
459
  let i = "";
460
- const l = !!e.cookie, h = Ia(e);
461
- (l || h.length) && (i = "clientHandler", r("var clientHandler = new HttpClientHandler"), r("{"), l && r("UseCookies = false,", 1), h.length && r(`AutomaticDecompression = ${h.join(" | ")},`, 1), r("};")), r(`var client = new HttpClient(${i});`), r("var request = new HttpRequestMessage"), r("{");
462
- const f = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
463
- t = t.toUpperCase(), t && f.includes(t) ? t = `HttpMethod.${t[0]}${t.substring(1).toLowerCase()}` : t = `new HttpMethod("${t}")`, r(`Method = ${t},`, 1), r(`RequestUri = new Uri("${o}"),`, 1);
464
- const p = Object.keys(e).filter(($) => {
460
+ const c = !!e.cookie, u = Ia(e);
461
+ (c || u.length) && (i = "clientHandler", r("var clientHandler = new HttpClientHandler"), r("{"), c && r("UseCookies = false,", 1), u.length && r(`AutomaticDecompression = ${u.join(" | ")},`, 1), r("};")), r(`var client = new HttpClient(${i});`), r("var request = new HttpRequestMessage"), r("{");
462
+ const p = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
463
+ t = t.toUpperCase(), t && p.includes(t) ? t = `HttpMethod.${t[0]}${t.substring(1).toLowerCase()}` : t = `new HttpMethod("${t}")`, r(`Method = ${t},`, 1), r(`RequestUri = new Uri("${o}"),`, 1);
464
+ const d = Object.keys(e).filter(($) => {
465
465
  switch ($.toLowerCase()) {
466
466
  case "content-type":
467
467
  case "content-length":
@@ -471,19 +471,19 @@ ${t}`);
471
471
  return !0;
472
472
  }
473
473
  });
474
- if (p.length && (r("Headers =", 1), r("{", 1), p.forEach(($) => {
474
+ if (d.length && (r("Headers =", 1), r("{", 1), d.forEach(($) => {
475
475
  r(`{ "${$}", "${le(e[$])}" },`, 2);
476
476
  }), r("},", 1)), n.text) {
477
477
  const $ = n.mimeType;
478
478
  switch ($) {
479
479
  case "application/x-www-form-urlencoded":
480
- r("Content = new FormUrlEncodedContent(new Dictionary<string, string>", 1), r("{", 1), (y = n.params) == null || y.forEach((d) => {
481
- r(`{ "${d.name}", "${d.value}" },`, 2);
480
+ r("Content = new FormUrlEncodedContent(new Dictionary<string, string>", 1), r("{", 1), (y = n.params) == null || y.forEach((h) => {
481
+ r(`{ "${h.name}", "${h.value}" },`, 2);
482
482
  }), r("}),", 1);
483
483
  break;
484
484
  case "multipart/form-data":
485
- r("Content = new MultipartFormDataContent", 1), r("{", 1), (x = n.params) == null || x.forEach((d) => {
486
- r(`new StringContent(${JSON.stringify(d.value || "")})`, 2), r("{", 2), r("Headers =", 3), r("{", 3), d.contentType && r(`ContentType = new MediaTypeHeaderValue("${d.contentType}"),`, 4), r('ContentDisposition = new ContentDispositionHeaderValue("form-data")', 4), r("{", 4), r(`Name = "${d.name}",`, 5), d.fileName && r(`FileName = "${d.fileName}",`, 5), r("}", 4), r("}", 3), r("},", 2);
485
+ r("Content = new MultipartFormDataContent", 1), r("{", 1), (x = n.params) == null || x.forEach((h) => {
486
+ r(`new StringContent(${JSON.stringify(h.value || "")})`, 2), r("{", 2), r("Headers =", 3), r("{", 3), h.contentType && r(`ContentType = new MediaTypeHeaderValue("${h.contentType}"),`, 4), r('ContentDisposition = new ContentDispositionHeaderValue("form-data")', 4), r("{", 4), r(`Name = "${h.name}",`, 5), h.fileName && r(`FileName = "${h.fileName}",`, 5), r("}", 4), r("}", 3), r("},", 2);
487
487
  }), r("},", 1);
488
488
  break;
489
489
  default:
@@ -506,7 +506,7 @@ var Fa = {
506
506
  extname: ".cs",
507
507
  installation: "dotnet add package RestSharp"
508
508
  },
509
- convert: ({ method: e, fullUrl: n, headersObj: t, cookies: o, postData: s, uriObj: c }) => {
509
+ convert: ({ method: e, fullUrl: n, headersObj: t, cookies: o, postData: s, uriObj: l }) => {
510
510
  const { push: r, join: a } = new V();
511
511
  if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(
512
512
  e.toUpperCase()
@@ -515,32 +515,32 @@ var Fa = {
515
515
  r(`using RestSharp;
516
516
 
517
517
  `), r(`var options = new RestClientOptions("${n}");`), r("var client = new RestClient(options);"), r('var request = new RestRequest("");');
518
- const l = s.mimeType && s.mimeType === "multipart/form-data";
519
- switch (l && r("request.AlwaysMultipartFormData = true;"), Object.keys(t).forEach((h) => {
520
- if (s.mimeType && h.toLowerCase() === "content-type" && s.text) {
521
- l && s.boundary && r(`request.FormBoundary = "${s.boundary}";`);
518
+ const c = s.mimeType && s.mimeType === "multipart/form-data";
519
+ switch (c && r("request.AlwaysMultipartFormData = true;"), Object.keys(t).forEach((u) => {
520
+ if (s.mimeType && u.toLowerCase() === "content-type" && s.text) {
521
+ c && s.boundary && r(`request.FormBoundary = "${s.boundary}";`);
522
522
  return;
523
523
  }
524
- r(`request.AddHeader("${h}", "${le(t[h])}");`);
525
- }), o.forEach(({ name: h, value: f }) => {
526
- r(`request.AddCookie("${h}", "${le(f)}", "${c.pathname}", "${c.host}");`);
524
+ r(`request.AddHeader("${u}", "${le(t[u])}");`);
525
+ }), o.forEach(({ name: u, value: p }) => {
526
+ r(`request.AddCookie("${u}", "${le(p)}", "${l.pathname}", "${l.host}");`);
527
527
  }), s.mimeType) {
528
528
  case "multipart/form-data":
529
529
  if (!s.params) break;
530
- s.params.forEach((h) => {
531
- h.fileName ? r(`request.AddFile("${h.name}", "${h.fileName}");`) : r(`request.AddParameter("${h.name}", "${h.value}");`);
530
+ s.params.forEach((u) => {
531
+ u.fileName ? r(`request.AddFile("${u.name}", "${u.fileName}");`) : r(`request.AddParameter("${u.name}", "${u.value}");`);
532
532
  });
533
533
  break;
534
534
  case "application/x-www-form-urlencoded":
535
535
  if (!s.params) break;
536
- s.params.forEach((h) => {
537
- r(`request.AddParameter("${h.name}", "${h.value}");`);
536
+ s.params.forEach((u) => {
537
+ r(`request.AddParameter("${u.name}", "${u.value}");`);
538
538
  });
539
539
  break;
540
540
  case "application/json": {
541
541
  if (!s.text) break;
542
- const h = JSON.stringify(s.text);
543
- r(`request.AddJsonBody(${h}, false);`);
542
+ const u = JSON.stringify(s.text);
543
+ r(`request.AddJsonBody(${u}, false);`);
544
544
  break;
545
545
  }
546
546
  default:
@@ -571,14 +571,14 @@ var Fa = {
571
571
  extname: ".go"
572
572
  },
573
573
  convert: ({ postData: e, method: n, allHeaders: t, fullUrl: o }, s = {}) => {
574
- const { blank: c, push: r, join: a } = new V({ indent: " " }), { showBoilerplate: i = !0, checkErrors: l = !1, printBody: h = !0, timeout: f = -1 } = s, p = l ? "err" : "_", y = i ? 1 : 0, x = () => {
575
- l && (r("if err != nil {", y), r("panic(err)", y + 1), r("}", y));
574
+ const { blank: l, push: r, join: a } = new V({ indent: " " }), { showBoilerplate: i = !0, checkErrors: c = !1, printBody: u = !0, timeout: p = -1 } = s, d = c ? "err" : "_", y = i ? 1 : 0, x = () => {
575
+ c && (r("if err != nil {", y), r("panic(err)", y + 1), r("}", y));
576
576
  };
577
- i && (r("package main"), c(), r("import ("), r('"fmt"', y), f > 0 && r('"time"', y), e.text && r('"strings"', y), r('"net/http"', y), h && r('"io"', y), r(")"), c(), r("func main() {"), c());
578
- const $ = f > 0, d = $, m = d ? "client" : "http.DefaultClient";
579
- return d && (r("client := http.Client{", y), $ && r(`Timeout: time.Duration(${f} * time.Second),`, y + 1), r("}", y), c()), r(`url := "${o}"`, y), c(), e.text ? (r(`payload := strings.NewReader(${JSON.stringify(e.text)})`, y), c(), r(`req, ${p} := http.NewRequest("${n}", url, payload)`, y), c()) : (r(`req, ${p} := http.NewRequest("${n}", url, nil)`, y), c()), x(), Object.keys(t).length && (Object.keys(t).forEach((v) => {
577
+ i && (r("package main"), l(), r("import ("), r('"fmt"', y), p > 0 && r('"time"', y), e.text && r('"strings"', y), r('"net/http"', y), u && r('"io"', y), r(")"), l(), r("func main() {"), l());
578
+ const $ = p > 0, h = $, m = h ? "client" : "http.DefaultClient";
579
+ return h && (r("client := http.Client{", y), $ && r(`Timeout: time.Duration(${p} * time.Second),`, y + 1), r("}", y), l()), r(`url := "${o}"`, y), l(), e.text ? (r(`payload := strings.NewReader(${JSON.stringify(e.text)})`, y), l(), r(`req, ${d} := http.NewRequest("${n}", url, payload)`, y), l()) : (r(`req, ${d} := http.NewRequest("${n}", url, nil)`, y), l()), x(), Object.keys(t).length && (Object.keys(t).forEach((v) => {
580
580
  r(`req.Header.Add("${v}", "${le(t[v])}")`, y);
581
- }), c()), r(`res, ${p} := ${m}.Do(req)`, y), x(), h && (c(), r("defer res.Body.Close()", y), r(`body, ${p} := io.ReadAll(res.Body)`, y), x()), c(), h && r("fmt.Println(string(body))", y), i && (c(), r("}")), a();
581
+ }), l()), r(`res, ${d} := ${m}.Do(req)`, y), x(), u && (l(), r("defer res.Body.Close()", y), r(`body, ${d} := io.ReadAll(res.Body)`, y), x()), l(), u && r("fmt.Println(string(body))", y), i && (l(), r("}")), a();
582
582
  }
583
583
  }, Ha = {
584
584
  info: {
@@ -599,24 +599,24 @@ var Fa = {
599
599
  description: "HTTP/1.1 request string in accordance with RFC 7230",
600
600
  extname: null
601
601
  },
602
- convert: ({ method: e, fullUrl: n, uriObj: t, httpVersion: o, allHeaders: s, postData: c }, r) => {
602
+ convert: ({ method: e, fullUrl: n, uriObj: t, httpVersion: o, allHeaders: s, postData: l }, r) => {
603
603
  const a = {
604
604
  absoluteURI: !1,
605
605
  autoContentLength: !0,
606
606
  autoHost: !0,
607
607
  ...r
608
- }, { blank: i, push: l, join: h } = new V({ indent: "", join: Yr }), f = a.absoluteURI ? n : t.path;
609
- l(`${e} ${f} ${o}`);
610
- const p = Object.keys(s);
611
- if (p.forEach(($) => {
612
- const d = $.toLowerCase().replace(/(^|-)(\w)/g, (m) => m.toUpperCase());
613
- l(`${d}: ${s[$]}`);
614
- }), a.autoHost && !p.includes("host") && l(`Host: ${t.host}`), a.autoContentLength && c.text && !p.includes("content-length")) {
615
- const d = new TextEncoder().encode(c.text).length.toString();
616
- l(`Content-Length: ${d}`);
608
+ }, { blank: i, push: c, join: u } = new V({ indent: "", join: Yr }), p = a.absoluteURI ? n : t.path;
609
+ c(`${e} ${p} ${o}`);
610
+ const d = Object.keys(s);
611
+ if (d.forEach(($) => {
612
+ const h = $.toLowerCase().replace(/(^|-)(\w)/g, (m) => m.toUpperCase());
613
+ c(`${h}: ${s[$]}`);
614
+ }), a.autoHost && !d.includes("host") && c(`Host: ${t.host}`), a.autoContentLength && l.text && !d.includes("content-length")) {
615
+ const h = new TextEncoder().encode(l.text).length.toString();
616
+ c(`Content-Length: ${h}`);
617
617
  }
618
618
  i();
619
- const y = h(), x = c.text || "";
619
+ const y = u(), x = l.text || "";
620
620
  return `${y}${Yr}${x}`;
621
621
  }
622
622
  }, za = {
@@ -637,12 +637,12 @@ var Fa = {
637
637
  extname: ".java"
638
638
  },
639
639
  convert: ({ method: e, allHeaders: n, postData: t, fullUrl: o }, s) => {
640
- const c = {
640
+ const l = {
641
641
  indent: " ",
642
642
  ...s
643
- }, { blank: r, push: a, join: i } = new V({ indent: c.indent });
644
- return a("AsyncHttpClient client = new DefaultAsyncHttpClient();"), a(`client.prepare("${e.toUpperCase()}", "${o}")`), Object.keys(n).forEach((l) => {
645
- a(`.setHeader("${l}", "${le(n[l])}")`, 1);
643
+ }, { blank: r, push: a, join: i } = new V({ indent: l.indent });
644
+ return a("AsyncHttpClient client = new DefaultAsyncHttpClient();"), a(`client.prepare("${e.toUpperCase()}", "${o}")`), Object.keys(n).forEach((c) => {
645
+ a(`.setHeader("${c}", "${le(n[c])}")`, 1);
646
646
  }), t.text && a(`.setBody(${JSON.stringify(t.text)})`, 1), a(".execute()", 1), a(".toCompletableFuture()", 1), a(".thenAccept(System.out::println)", 1), a(".join();", 1), r(), a("client.close();"), i();
647
647
  }
648
648
  }, Wa = {
@@ -654,10 +654,10 @@ var Fa = {
654
654
  extname: ".java"
655
655
  },
656
656
  convert: ({ allHeaders: e, fullUrl: n, method: t, postData: o }, s) => {
657
- const c = {
657
+ const l = {
658
658
  indent: " ",
659
659
  ...s
660
- }, { push: r, join: a } = new V({ indent: c.indent });
660
+ }, { push: r, join: a } = new V({ indent: l.indent });
661
661
  return r("HttpRequest request = HttpRequest.newBuilder()"), r(`.uri(URI.create("${n}"))`, 2), Object.keys(e).forEach((i) => {
662
662
  r(`.header("${i}", "${le(e[i])}")`, 2);
663
663
  }), o.text ? r(
@@ -676,12 +676,12 @@ var Fa = {
676
676
  extname: ".java"
677
677
  },
678
678
  convert: ({ postData: e, method: n, fullUrl: t, allHeaders: o }, s) => {
679
- const c = {
679
+ const l = {
680
680
  indent: " ",
681
681
  ...s
682
- }, { push: r, blank: a, join: i } = new V({ indent: c.indent }), l = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], h = ["POST", "PUT", "DELETE", "PATCH"];
683
- return r("OkHttpClient client = new OkHttpClient();"), a(), e.text && (e.boundary ? r(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : r(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), r(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), r("Request request = new Request.Builder()"), r(`.url("${t}")`, 1), l.includes(n.toUpperCase()) ? h.includes(n.toUpperCase()) ? e.text ? r(`.${n.toLowerCase()}(body)`, 1) : r(`.${n.toLowerCase()}(null)`, 1) : r(`.${n.toLowerCase()}()`, 1) : e.text ? r(`.method("${n.toUpperCase()}", body)`, 1) : r(`.method("${n.toUpperCase()}", null)`, 1), Object.keys(o).forEach((f) => {
684
- r(`.addHeader("${f}", "${le(o[f])}")`, 1);
682
+ }, { push: r, blank: a, join: i } = new V({ indent: l.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], u = ["POST", "PUT", "DELETE", "PATCH"];
683
+ return r("OkHttpClient client = new OkHttpClient();"), a(), e.text && (e.boundary ? r(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : r(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), r(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), r("Request request = new Request.Builder()"), r(`.url("${t}")`, 1), c.includes(n.toUpperCase()) ? u.includes(n.toUpperCase()) ? e.text ? r(`.${n.toLowerCase()}(body)`, 1) : r(`.${n.toLowerCase()}(null)`, 1) : r(`.${n.toLowerCase()}()`, 1) : e.text ? r(`.method("${n.toUpperCase()}", body)`, 1) : r(`.method("${n.toUpperCase()}", null)`, 1), Object.keys(o).forEach((p) => {
684
+ r(`.addHeader("${p}", "${le(o[p])}")`, 1);
685
685
  }), r(".build();", 1), a(), r("Response response = client.newCall(request).execute();"), i();
686
686
  }
687
687
  }, Va = {
@@ -693,12 +693,12 @@ var Fa = {
693
693
  extname: ".java"
694
694
  },
695
695
  convert: ({ method: e, allHeaders: n, postData: t, fullUrl: o }, s) => {
696
- const c = {
696
+ const l = {
697
697
  indent: " ",
698
698
  ...s
699
- }, { join: r, push: a } = new V({ indent: c.indent });
700
- return ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(e.toUpperCase()) ? a(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${o}")`) : a(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${o}")`), Object.keys(n).forEach((l) => {
701
- a(`.header("${l}", "${le(n[l])}")`, 1);
699
+ }, { join: r, push: a } = new V({ indent: l.indent });
700
+ return ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(e.toUpperCase()) ? a(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${o}")`) : a(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${o}")`), Object.keys(n).forEach((c) => {
701
+ a(`.header("${c}", "${le(n[c])}")`, 1);
702
702
  }), t.text && a(`.body(${JSON.stringify(t.text)})`, 1), a(".asString();", 1), r();
703
703
  }
704
704
  }, Da = {
@@ -722,40 +722,40 @@ var Fa = {
722
722
  extname: ".js",
723
723
  installation: "npm install axios --save"
724
724
  },
725
- convert: ({ allHeaders: e, method: n, url: t, queryObj: o, postData: s }, c) => {
725
+ convert: ({ allHeaders: e, method: n, url: t, queryObj: o, postData: s }, l) => {
726
726
  const r = {
727
727
  indent: " ",
728
- ...c
729
- }, { blank: a, push: i, join: l, addPostProcessor: h } = new V({ indent: r.indent });
728
+ ...l
729
+ }, { blank: a, push: i, join: c, addPostProcessor: u } = new V({ indent: r.indent });
730
730
  i("import axios from 'axios';"), a();
731
- const f = {
731
+ const p = {
732
732
  method: n,
733
733
  url: t
734
734
  };
735
- switch (Object.keys(o).length && (f.params = o), Object.keys(e).length && (f.headers = e), s.mimeType) {
735
+ switch (Object.keys(o).length && (p.params = o), Object.keys(e).length && (p.headers = e), s.mimeType) {
736
736
  case "application/x-www-form-urlencoded":
737
737
  s.params && (i("const encodedParams = new URLSearchParams();"), s.params.forEach((y) => {
738
738
  i(`encodedParams.set('${y.name}', '${y.value}');`);
739
- }), a(), f.data = "encodedParams,", h((y) => y.replace(/'encodedParams,'/, "encodedParams,")));
739
+ }), a(), p.data = "encodedParams,", u((y) => y.replace(/'encodedParams,'/, "encodedParams,")));
740
740
  break;
741
741
  case "application/json":
742
- s.jsonObj && (f.data = s.jsonObj);
742
+ s.jsonObj && (p.data = s.jsonObj);
743
743
  break;
744
744
  case "multipart/form-data":
745
745
  if (!s.params)
746
746
  break;
747
747
  i("const form = new FormData();"), s.params.forEach((y) => {
748
748
  i(`form.append('${y.name}', '${y.value || y.fileName || ""}');`);
749
- }), a(), f.data = "[form]";
749
+ }), a(), p.data = "[form]";
750
750
  break;
751
751
  default:
752
- s.text && (f.data = s.text);
752
+ s.text && (p.data = s.text);
753
753
  }
754
- const p = ue(f, {
754
+ const d = ue(p, {
755
755
  indent: " ",
756
756
  inlineCharacterLimit: 80
757
757
  }).replace('"[form]"', "form");
758
- return i(`const options = ${p};`), a(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), l();
758
+ return i(`const options = ${d};`), a(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), c();
759
759
  }
760
760
  }, Ka = {
761
761
  info: {
@@ -766,46 +766,46 @@ var Fa = {
766
766
  extname: ".js"
767
767
  },
768
768
  convert: ({ method: e, allHeaders: n, postData: t, fullUrl: o }, s) => {
769
- const c = {
769
+ const l = {
770
770
  indent: " ",
771
771
  credentials: null,
772
772
  ...s
773
- }, { blank: r, join: a, push: i } = new V({ indent: c.indent }), l = {
773
+ }, { blank: r, join: a, push: i } = new V({ indent: l.indent }), c = {
774
774
  method: e
775
775
  };
776
- switch (Object.keys(n).length && (l.headers = n), c.credentials !== null && (l.credentials = c.credentials), t.mimeType) {
776
+ switch (Object.keys(n).length && (c.headers = n), l.credentials !== null && (c.credentials = l.credentials), t.mimeType) {
777
777
  case "application/x-www-form-urlencoded":
778
- l.body = t.paramsObj ? t.paramsObj : t.text;
778
+ c.body = t.paramsObj ? t.paramsObj : t.text;
779
779
  break;
780
780
  case "application/json":
781
- t.jsonObj && (l.body = t.jsonObj);
781
+ t.jsonObj && (c.body = t.jsonObj);
782
782
  break;
783
783
  case "multipart/form-data":
784
784
  if (!t.params)
785
785
  break;
786
- const h = fe(n, "content-type");
787
- h && delete n[h], i("const form = new FormData();"), t.params.forEach((f) => {
788
- i(`form.append('${f.name}', '${f.value || f.fileName || ""}');`);
786
+ const u = fe(n, "content-type");
787
+ u && delete n[u], i("const form = new FormData();"), t.params.forEach((p) => {
788
+ i(`form.append('${p.name}', '${p.value || p.fileName || ""}');`);
789
789
  }), r();
790
790
  break;
791
791
  default:
792
- t.text && (l.body = t.text);
792
+ t.text && (c.body = t.text);
793
793
  }
794
- return l.headers && !Object.keys(l.headers).length && delete l.headers, i(
795
- `const options = ${ue(l, {
796
- indent: c.indent,
794
+ return c.headers && !Object.keys(c.headers).length && delete c.headers, i(
795
+ `const options = ${ue(c, {
796
+ indent: l.indent,
797
797
  inlineCharacterLimit: 80,
798
798
  // The Fetch API body only accepts string parameters, but stringified JSON can be difficult
799
799
  // to read, so we keep the object as a literal and use this transform function to wrap the
800
800
  // literal in a `JSON.stringify` call.
801
- transform: (h, f, p) => {
802
- if (f === "body") {
801
+ transform: (u, p, d) => {
802
+ if (p === "body") {
803
803
  if (t.mimeType === "application/x-www-form-urlencoded")
804
- return `new URLSearchParams(${p})`;
804
+ return `new URLSearchParams(${d})`;
805
805
  if (t.mimeType === "application/json")
806
- return `JSON.stringify(${p})`;
806
+ return `JSON.stringify(${d})`;
807
807
  }
808
- return p;
808
+ return d;
809
809
  }
810
810
  })};`
811
811
  ), r(), t.params && t.mimeType === "multipart/form-data" && (i("options.body = form;"), r()), i(`fetch('${o}', options)`), i(".then(response => response.json())", 1), i(".then(response => console.log(response))", 1), i(".catch(err => console.error(err));", 1), a();
@@ -819,11 +819,11 @@ var Fa = {
819
819
  extname: ".js"
820
820
  },
821
821
  convert: ({ fullUrl: e, method: n, allHeaders: t, postData: o }, s) => {
822
- var f;
823
- const c = {
822
+ var p;
823
+ const l = {
824
824
  indent: " ",
825
825
  ...s
826
- }, { blank: r, push: a, join: i } = new V({ indent: c.indent }), l = {
826
+ }, { blank: r, push: a, join: i } = new V({ indent: l.indent }), c = {
827
827
  async: !0,
828
828
  crossDomain: !0,
829
829
  url: e,
@@ -832,27 +832,27 @@ var Fa = {
832
832
  };
833
833
  switch (o.mimeType) {
834
834
  case "application/x-www-form-urlencoded":
835
- l.data = o.paramsObj ? o.paramsObj : o.text;
835
+ c.data = o.paramsObj ? o.paramsObj : o.text;
836
836
  break;
837
837
  case "application/json":
838
- l.processData = !1, l.data = o.text;
838
+ c.processData = !1, c.data = o.text;
839
839
  break;
840
840
  case "multipart/form-data":
841
841
  if (!o.params)
842
842
  break;
843
- if (a("const form = new FormData();"), o.params.forEach((p) => {
844
- a(`form.append('${p.name}', '${p.value || p.fileName || ""}');`);
845
- }), l.processData = !1, l.contentType = !1, l.mimeType = "multipart/form-data", l.data = "[form]", ot(t, "content-type") && (f = be(t, "content-type")) != null && f.includes("boundary")) {
846
- const p = fe(t, "content-type");
847
- p && delete l.headers[p];
843
+ if (a("const form = new FormData();"), o.params.forEach((d) => {
844
+ a(`form.append('${d.name}', '${d.value || d.fileName || ""}');`);
845
+ }), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]", ot(t, "content-type") && (p = be(t, "content-type")) != null && p.includes("boundary")) {
846
+ const d = fe(t, "content-type");
847
+ d && delete c.headers[d];
848
848
  }
849
849
  r();
850
850
  break;
851
851
  default:
852
- o.text && (l.data = o.text);
852
+ o.text && (c.data = o.text);
853
853
  }
854
- const h = ue(l, { indent: c.indent }).replace("'[form]'", "form");
855
- return a(`const settings = ${h};`), r(), a("$.ajax(settings).done(function (response) {"), a("console.log(response);", 1), a("});"), i();
854
+ const u = ue(c, { indent: l.indent }).replace("'[form]'", "form");
855
+ return a(`const settings = ${u};`), r(), a("$.ajax(settings).done(function (response) {"), a("console.log(response);", 1), a("});"), i();
856
856
  }
857
857
  }, Xa = {
858
858
  info: {
@@ -863,36 +863,36 @@ var Fa = {
863
863
  extname: ".js"
864
864
  },
865
865
  convert: ({ postData: e, allHeaders: n, method: t, fullUrl: o }, s) => {
866
- var l;
867
- const c = {
866
+ var c;
867
+ const l = {
868
868
  indent: " ",
869
869
  cors: !0,
870
870
  ...s
871
- }, { blank: r, push: a, join: i } = new V({ indent: c.indent });
871
+ }, { blank: r, push: a, join: i } = new V({ indent: l.indent });
872
872
  switch (e.mimeType) {
873
873
  case "application/json":
874
874
  a(
875
875
  `const data = JSON.stringify(${ue(e.jsonObj, {
876
- indent: c.indent
876
+ indent: l.indent
877
877
  })});`
878
878
  ), r();
879
879
  break;
880
880
  case "multipart/form-data":
881
881
  if (!e.params)
882
882
  break;
883
- if (a("const data = new FormData();"), e.params.forEach((h) => {
884
- a(`data.append('${h.name}', '${h.value || h.fileName || ""}');`);
885
- }), ot(n, "content-type") && (l = be(n, "content-type")) != null && l.includes("boundary")) {
886
- const h = fe(n, "content-type");
887
- h && delete n[h];
883
+ if (a("const data = new FormData();"), e.params.forEach((u) => {
884
+ a(`data.append('${u.name}', '${u.value || u.fileName || ""}');`);
885
+ }), ot(n, "content-type") && (c = be(n, "content-type")) != null && c.includes("boundary")) {
886
+ const u = fe(n, "content-type");
887
+ u && delete n[u];
888
888
  }
889
889
  r();
890
890
  break;
891
891
  default:
892
892
  a(`const data = ${e.text ? `'${e.text}'` : "null"};`), r();
893
893
  }
894
- return a("const xhr = new XMLHttpRequest();"), c.cors && a("xhr.withCredentials = true;"), r(), a("xhr.addEventListener('readystatechange', function () {"), a("if (this.readyState === this.DONE) {", 1), a("console.log(this.responseText);", 2), a("}", 1), a("});"), r(), a(`xhr.open('${t}', '${o}');`), Object.keys(n).forEach((h) => {
895
- a(`xhr.setRequestHeader('${h}', '${ze(n[h])}');`);
894
+ return a("const xhr = new XMLHttpRequest();"), l.cors && a("xhr.withCredentials = true;"), r(), a("xhr.addEventListener('readystatechange', function () {"), a("if (this.readyState === this.DONE) {", 1), a("console.log(this.responseText);", 2), a("}", 1), a("});"), r(), a(`xhr.open('${t}', '${o}');`), Object.keys(n).forEach((u) => {
895
+ a(`xhr.setRequestHeader('${u}', '${ze(n[u])}');`);
896
896
  }), r(), a("xhr.send(data);"), i();
897
897
  }
898
898
  }, Za = {
@@ -932,8 +932,8 @@ var Fa = {
932
932
  if (!e.params)
933
933
  break;
934
934
  const s = {};
935
- e.params.forEach((c) => {
936
- s[c.name] = c.value;
935
+ e.params.forEach((l) => {
936
+ s[l.name] = l.value;
937
937
  }), o = s;
938
938
  break;
939
939
  default:
@@ -959,12 +959,12 @@ var Fa = {
959
959
  extname: ".kt"
960
960
  },
961
961
  convert: ({ postData: e, fullUrl: n, method: t, allHeaders: o }, s) => {
962
- const c = {
962
+ const l = {
963
963
  indent: " ",
964
964
  ...s
965
- }, { blank: r, join: a, push: i } = new V({ indent: c.indent }), l = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], h = ["POST", "PUT", "DELETE", "PATCH"];
966
- return i("val client = OkHttpClient()"), r(), e.text && (e.boundary ? i(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : i(`val mediaType = MediaType.parse("${e.mimeType}")`), i(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), i("val request = Request.Builder()"), i(`.url("${n}")`, 1), l.includes(t.toUpperCase()) ? h.includes(t.toUpperCase()) ? e.text ? i(`.${t.toLowerCase()}(body)`, 1) : i(`.${t.toLowerCase()}(null)`, 1) : i(`.${t.toLowerCase()}()`, 1) : e.text ? i(`.method("${t.toUpperCase()}", body)`, 1) : i(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(o).forEach((f) => {
967
- i(`.addHeader("${f}", "${le(o[f])}")`, 1);
965
+ }, { blank: r, join: a, push: i } = new V({ indent: l.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], u = ["POST", "PUT", "DELETE", "PATCH"];
966
+ return i("val client = OkHttpClient()"), r(), e.text && (e.boundary ? i(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : i(`val mediaType = MediaType.parse("${e.mimeType}")`), i(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), i("val request = Request.Builder()"), i(`.url("${n}")`, 1), c.includes(t.toUpperCase()) ? u.includes(t.toUpperCase()) ? e.text ? i(`.${t.toLowerCase()}(body)`, 1) : i(`.${t.toLowerCase()}(null)`, 1) : i(`.${t.toLowerCase()}()`, 1) : e.text ? i(`.method("${t.toUpperCase()}", body)`, 1) : i(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(o).forEach((p) => {
967
+ i(`.addHeader("${p}", "${le(o[p])}")`, 1);
968
968
  }), i(".build()", 1), r(), i("val response = client.newCall(request).execute()"), a();
969
969
  }
970
970
  }, ni = {
@@ -986,29 +986,29 @@ var Fa = {
986
986
  installation: "npm install axios --save"
987
987
  },
988
988
  convert: ({ method: e, fullUrl: n, allHeaders: t, postData: o }, s) => {
989
- const c = {
989
+ const l = {
990
990
  indent: " ",
991
991
  ...s
992
- }, { blank: r, join: a, push: i, addPostProcessor: l } = new V({ indent: c.indent });
992
+ }, { blank: r, join: a, push: i, addPostProcessor: c } = new V({ indent: l.indent });
993
993
  i("const axios = require('axios');");
994
- const h = {
994
+ const u = {
995
995
  method: e,
996
996
  url: n
997
997
  };
998
- switch (Object.keys(t).length && (h.headers = t), o.mimeType) {
998
+ switch (Object.keys(t).length && (u.headers = t), o.mimeType) {
999
999
  case "application/x-www-form-urlencoded":
1000
- o.params && (i("const { URLSearchParams } = require('url');"), r(), i("const encodedParams = new URLSearchParams();"), o.params.forEach((p) => {
1001
- i(`encodedParams.set('${p.name}', '${p.value}');`);
1002
- }), r(), h.data = "encodedParams,", l((p) => p.replace(/'encodedParams,'/, "encodedParams,")));
1000
+ o.params && (i("const { URLSearchParams } = require('url');"), r(), i("const encodedParams = new URLSearchParams();"), o.params.forEach((d) => {
1001
+ i(`encodedParams.set('${d.name}', '${d.value}');`);
1002
+ }), r(), u.data = "encodedParams,", c((d) => d.replace(/'encodedParams,'/, "encodedParams,")));
1003
1003
  break;
1004
1004
  case "application/json":
1005
- r(), o.jsonObj && (h.data = o.jsonObj);
1005
+ r(), o.jsonObj && (u.data = o.jsonObj);
1006
1006
  break;
1007
1007
  default:
1008
- r(), o.text && (h.data = o.text);
1008
+ r(), o.text && (u.data = o.text);
1009
1009
  }
1010
- const f = ue(h, { indent: " ", inlineCharacterLimit: 80 });
1011
- return i(`const options = ${f};`), r(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), a();
1010
+ const p = ue(u, { indent: " ", inlineCharacterLimit: 80 });
1011
+ return i(`const options = ${p};`), r(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), a();
1012
1012
  }
1013
1013
  }, ai = {
1014
1014
  info: {
@@ -1019,22 +1019,22 @@ var Fa = {
1019
1019
  extname: ".cjs",
1020
1020
  installation: "npm install node-fetch@2 --save"
1021
1021
  },
1022
- convert: ({ method: e, fullUrl: n, postData: t, headersObj: o, cookies: s }, c) => {
1022
+ convert: ({ method: e, fullUrl: n, postData: t, headersObj: o, cookies: s }, l) => {
1023
1023
  var $;
1024
1024
  const r = {
1025
1025
  indent: " ",
1026
- ...c
1026
+ ...l
1027
1027
  };
1028
1028
  let a = !1;
1029
- const { blank: i, push: l, join: h, unshift: f } = new V({ indent: r.indent });
1030
- l("const fetch = require('node-fetch');");
1031
- const p = n, y = {
1029
+ const { blank: i, push: c, join: u, unshift: p } = new V({ indent: r.indent });
1030
+ c("const fetch = require('node-fetch');");
1031
+ const d = n, y = {
1032
1032
  method: e
1033
1033
  };
1034
1034
  switch (Object.keys(o).length && (y.headers = o), t.mimeType) {
1035
1035
  case "application/x-www-form-urlencoded":
1036
- f("const { URLSearchParams } = require('url');"), l("const encodedParams = new URLSearchParams();"), i(), ($ = t.params) == null || $.forEach((m) => {
1037
- l(`encodedParams.set('${m.name}', '${m.value}');`);
1036
+ p("const { URLSearchParams } = require('url');"), c("const encodedParams = new URLSearchParams();"), i(), ($ = t.params) == null || $.forEach((m) => {
1037
+ c(`encodedParams.set('${m.name}', '${m.value}');`);
1038
1038
  }), y.body = "encodedParams";
1039
1039
  break;
1040
1040
  case "application/json":
@@ -1043,32 +1043,32 @@ var Fa = {
1043
1043
  case "multipart/form-data":
1044
1044
  if (!t.params)
1045
1045
  break;
1046
- const d = fe(o, "content-type");
1047
- d && delete o[d], f("const FormData = require('form-data');"), l("const formData = new FormData();"), i(), t.params.forEach((m) => {
1046
+ const h = fe(o, "content-type");
1047
+ h && delete o[h], p("const FormData = require('form-data');"), c("const formData = new FormData();"), i(), t.params.forEach((m) => {
1048
1048
  if (!m.fileName && !m.fileName && !m.contentType) {
1049
- l(`formData.append('${m.name}', '${m.value}');`);
1049
+ c(`formData.append('${m.name}', '${m.value}');`);
1050
1050
  return;
1051
1051
  }
1052
- m.fileName && (a = !0, l(`formData.append('${m.name}', fs.createReadStream('${m.fileName}'));`));
1052
+ m.fileName && (a = !0, c(`formData.append('${m.name}', fs.createReadStream('${m.fileName}'));`));
1053
1053
  });
1054
1054
  break;
1055
1055
  default:
1056
1056
  t.text && (y.body = t.text);
1057
1057
  }
1058
1058
  if (s.length) {
1059
- const d = s.map(({ name: m, value: v }) => `${encodeURIComponent(m)}=${encodeURIComponent(v)}`).join("; ");
1060
- y.headers || (y.headers = {}), y.headers.cookie = d;
1059
+ const h = s.map(({ name: m, value: v }) => `${encodeURIComponent(m)}=${encodeURIComponent(v)}`).join("; ");
1060
+ y.headers || (y.headers = {}), y.headers.cookie = h;
1061
1061
  }
1062
- i(), l(`const url = '${p}';`), y.headers && !Object.keys(y.headers).length && delete y.headers;
1062
+ i(), c(`const url = '${d}';`), y.headers && !Object.keys(y.headers).length && delete y.headers;
1063
1063
  const x = ue(y, {
1064
1064
  indent: " ",
1065
1065
  inlineCharacterLimit: 80,
1066
1066
  // The Fetch API body only accepts string parameters, but stringified JSON can be difficult to
1067
1067
  // read, so we keep the object as a literal and use this transform function to wrap the literal
1068
1068
  // in a `JSON.stringify` call.
1069
- transform: (d, m, v) => m === "body" && t.mimeType === "application/json" ? `JSON.stringify(${v})` : v
1069
+ transform: (h, m, v) => m === "body" && t.mimeType === "application/json" ? `JSON.stringify(${v})` : v
1070
1070
  });
1071
- return l(`const options = ${x};`), i(), a && f("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (l("options.body = formData;"), i()), l("fetch(url, options)"), l(".then(res => res.json())", 1), l(".then(json => console.log(json))", 1), l(".catch(err => console.error('error:' + err));", 1), h().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
1071
+ return c(`const options = ${x};`), i(), a && p("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (c("options.body = formData;"), i()), c("fetch(url, options)"), c(".then(res => res.json())", 1), c(".then(json => console.log(json))", 1), c(".catch(err => console.error('error:' + err));", 1), u().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
1072
1072
  }
1073
1073
  }, ii = {
1074
1074
  info: {
@@ -1079,17 +1079,17 @@ var Fa = {
1079
1079
  extname: ".cjs"
1080
1080
  },
1081
1081
  convert: ({ uriObj: e, method: n, allHeaders: t, postData: o }, s = {}) => {
1082
- var f;
1083
- const { indent: c = " " } = s, { blank: r, join: a, push: i, unshift: l } = new V({ indent: c }), h = {
1082
+ var p;
1083
+ const { indent: l = " " } = s, { blank: r, join: a, push: i, unshift: c } = new V({ indent: l }), u = {
1084
1084
  method: n,
1085
1085
  hostname: e.hostname,
1086
1086
  port: e.port,
1087
1087
  path: e.path,
1088
1088
  headers: t
1089
1089
  };
1090
- switch (i(`const http = require('${(f = e.protocol) == null ? void 0 : f.replace(":", "")}');`), r(), i(`const options = ${ue(h, { indent: c })};`), r(), i("const req = http.request(options, function (res) {"), i("const chunks = [];", 1), r(), i("res.on('data', function (chunk) {", 1), i("chunks.push(chunk);", 2), i("});", 1), r(), i("res.on('end', function () {", 1), i("const body = Buffer.concat(chunks);", 2), i("console.log(body.toString());", 2), i("});", 1), i("});"), r(), o.mimeType) {
1090
+ switch (i(`const http = require('${(p = e.protocol) == null ? void 0 : p.replace(":", "")}');`), r(), i(`const options = ${ue(u, { indent: l })};`), r(), i("const req = http.request(options, function (res) {"), i("const chunks = [];", 1), r(), i("res.on('data', function (chunk) {", 1), i("chunks.push(chunk);", 2), i("});", 1), r(), i("res.on('end', function () {", 1), i("const body = Buffer.concat(chunks);", 2), i("console.log(body.toString());", 2), i("});", 1), i("});"), r(), o.mimeType) {
1091
1091
  case "application/x-www-form-urlencoded":
1092
- o.paramsObj && (l("const qs = require('querystring');"), i(
1092
+ o.paramsObj && (c("const qs = require('querystring');"), i(
1093
1093
  `req.write(qs.stringify(${ue(o.paramsObj, {
1094
1094
  indent: " ",
1095
1095
  inlineCharacterLimit: 80
@@ -1105,7 +1105,7 @@ var Fa = {
1105
1105
  );
1106
1106
  break;
1107
1107
  default:
1108
- o.text && i(`req.write(${ue(o.text, { indent: c })});`);
1108
+ o.text && i(`req.write(${ue(o.text, { indent: l })});`);
1109
1109
  }
1110
1110
  return i("req.end();"), a();
1111
1111
  }
@@ -1118,14 +1118,14 @@ var Fa = {
1118
1118
  extname: ".cjs",
1119
1119
  installation: "npm install request --save"
1120
1120
  },
1121
- convert: ({ method: e, url: n, fullUrl: t, postData: o, headersObj: s, cookies: c }, r) => {
1121
+ convert: ({ method: e, url: n, fullUrl: t, postData: o, headersObj: s, cookies: l }, r) => {
1122
1122
  const a = {
1123
1123
  indent: " ",
1124
1124
  ...r
1125
1125
  };
1126
1126
  let i = !1;
1127
- const { push: l, blank: h, join: f, unshift: p, addPostProcessor: y } = new V({ indent: a.indent });
1128
- l("const request = require('request');"), h();
1127
+ const { push: c, blank: u, join: p, unshift: d, addPostProcessor: y } = new V({ indent: a.indent });
1128
+ c("const request = require('request');"), u();
1129
1129
  const x = {
1130
1130
  method: e,
1131
1131
  url: t
@@ -1145,22 +1145,22 @@ var Fa = {
1145
1145
  x.formData[$.name] = $.value;
1146
1146
  return;
1147
1147
  }
1148
- let d = {};
1149
- $.fileName ? (i = !0, d = {
1148
+ let h = {};
1149
+ $.fileName ? (i = !0, h = {
1150
1150
  value: `fs.createReadStream(${$.fileName})`,
1151
1151
  options: {
1152
1152
  filename: $.fileName,
1153
1153
  contentType: $.contentType ? $.contentType : null
1154
1154
  }
1155
- }) : $.value && (d.value = $.value), x.formData[$.name] = d;
1155
+ }) : $.value && (h.value = $.value), x.formData[$.name] = h;
1156
1156
  }), y(($) => $.replace(/'fs\.createReadStream\((.*)\)'/, "fs.createReadStream('$1')"));
1157
1157
  break;
1158
1158
  default:
1159
1159
  o.text && (x.body = o.text);
1160
1160
  }
1161
- return c.length && (x.jar = "JAR", l("const jar = request.jar();"), c.forEach(({ name: $, value: d }) => {
1162
- l(`jar.setCookie(request.cookie('${encodeURIComponent($)}=${encodeURIComponent(d)}'), '${n}');`);
1163
- }), h(), y(($) => $.replace(/'JAR'/, "jar"))), i && p("const fs = require('fs');"), l(`const options = ${ue(x, { indent: " ", inlineCharacterLimit: 80 })};`), h(), l("request(options, function (error, response, body) {"), l("if (error) throw new Error(error);", 1), h(), l("console.log(body);", 1), l("});"), f();
1161
+ return l.length && (x.jar = "JAR", c("const jar = request.jar();"), l.forEach(({ name: $, value: h }) => {
1162
+ c(`jar.setCookie(request.cookie('${encodeURIComponent($)}=${encodeURIComponent(h)}'), '${n}');`);
1163
+ }), u(), y(($) => $.replace(/'JAR'/, "jar"))), i && d("const fs = require('fs');"), c(`const options = ${ue(x, { indent: " ", inlineCharacterLimit: 80 })};`), u(), c("request(options, function (error, response, body) {"), c("if (error) throw new Error(error);", 1), u(), c("console.log(body);", 1), c("});"), p();
1164
1164
  }
1165
1165
  }, li = {
1166
1166
  info: {
@@ -1170,38 +1170,38 @@ var Fa = {
1170
1170
  description: "Lightweight HTTP Request Client Library",
1171
1171
  extname: ".cjs"
1172
1172
  },
1173
- convert: ({ method: e, url: n, cookies: t, queryObj: o, postData: s, headersObj: c }, r) => {
1173
+ convert: ({ method: e, url: n, cookies: t, queryObj: o, postData: s, headersObj: l }, r) => {
1174
1174
  const a = {
1175
1175
  indent: " ",
1176
1176
  ...r
1177
1177
  };
1178
1178
  let i = !1;
1179
- const { addPostProcessor: l, blank: h, join: f, push: p, unshift: y } = new V({
1179
+ const { addPostProcessor: c, blank: u, join: p, push: d, unshift: y } = new V({
1180
1180
  indent: a.indent
1181
1181
  });
1182
- switch (p("const unirest = require('unirest');"), h(), p(`const req = unirest('${e}', '${n}');`), h(), t.length && (p("const CookieJar = unirest.jar();"), t.forEach((x) => {
1183
- p(`CookieJar.add('${encodeURIComponent(x.name)}=${encodeURIComponent(x.value)}', '${n}');`);
1184
- }), p("req.jar(CookieJar);"), h()), Object.keys(o).length && (p(`req.query(${ue(o, { indent: a.indent })});`), h()), Object.keys(c).length && (p(`req.headers(${ue(c, { indent: a.indent })});`), h()), s.mimeType) {
1182
+ switch (d("const unirest = require('unirest');"), u(), d(`const req = unirest('${e}', '${n}');`), u(), t.length && (d("const CookieJar = unirest.jar();"), t.forEach((x) => {
1183
+ d(`CookieJar.add('${encodeURIComponent(x.name)}=${encodeURIComponent(x.value)}', '${n}');`);
1184
+ }), d("req.jar(CookieJar);"), u()), Object.keys(o).length && (d(`req.query(${ue(o, { indent: a.indent })});`), u()), Object.keys(l).length && (d(`req.headers(${ue(l, { indent: a.indent })});`), u()), s.mimeType) {
1185
1185
  case "application/x-www-form-urlencoded":
1186
- s.paramsObj && (p(`req.form(${ue(s.paramsObj, { indent: a.indent })});`), h());
1186
+ s.paramsObj && (d(`req.form(${ue(s.paramsObj, { indent: a.indent })});`), u());
1187
1187
  break;
1188
1188
  case "application/json":
1189
- s.jsonObj && (p("req.type('json');"), p(`req.send(${ue(s.jsonObj, { indent: a.indent })});`), h());
1189
+ s.jsonObj && (d("req.type('json');"), d(`req.send(${ue(s.jsonObj, { indent: a.indent })});`), u());
1190
1190
  break;
1191
1191
  case "multipart/form-data": {
1192
1192
  if (!s.params)
1193
1193
  break;
1194
1194
  const x = [];
1195
1195
  s.params.forEach(($) => {
1196
- const d = {};
1197
- $.fileName && !$.value ? (i = !0, d.body = `fs.createReadStream('${$.fileName}')`, l((m) => m.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : $.value && (d.body = $.value), d.body && ($.contentType && (d["content-type"] = $.contentType), x.push(d));
1198
- }), p(`req.multipart(${ue(x, { indent: a.indent })});`), h();
1196
+ const h = {};
1197
+ $.fileName && !$.value ? (i = !0, h.body = `fs.createReadStream('${$.fileName}')`, c((m) => m.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : $.value && (h.body = $.value), h.body && ($.contentType && (h["content-type"] = $.contentType), x.push(h));
1198
+ }), d(`req.multipart(${ue(x, { indent: a.indent })});`), u();
1199
1199
  break;
1200
1200
  }
1201
1201
  default:
1202
- s.text && (p(`req.send(${ue(s.text, { indent: a.indent })});`), h());
1202
+ s.text && (d(`req.send(${ue(s.text, { indent: a.indent })});`), u());
1203
1203
  }
1204
- return i && y("const fs = require('fs');"), p("req.end(function (res) {"), p("if (res.error) throw new Error(res.error);", 1), h(), p("console.log(res.body);", 1), p("});"), f();
1204
+ return i && y("const fs = require('fs');"), d("req.end(function (res) {"), d("if (res.error) throw new Error(res.error);", 1), u(), d("console.log(res.body);", 1), d("});"), p();
1205
1205
  }
1206
1206
  }, ci = {
1207
1207
  info: {
@@ -1218,8 +1218,8 @@ var Fa = {
1218
1218
  fetch: ai
1219
1219
  }
1220
1220
  }, bt = (e, n, t, o) => {
1221
- const s = `${e} *${n} = `, c = mr(t, o ? s.length : void 0);
1222
- return `${s}${c};`;
1221
+ const s = `${e} *${n} = `, l = mr(t, o ? s.length : void 0);
1222
+ return `${s}${l};`;
1223
1223
  }, mr = (e, n) => {
1224
1224
  const t = n === void 0 ? ", " : `,
1225
1225
  ${" ".repeat(n)}`;
@@ -1248,35 +1248,35 @@ var Fa = {
1248
1248
  extname: ".m"
1249
1249
  },
1250
1250
  convert: ({ allHeaders: e, postData: n, method: t, fullUrl: o }, s) => {
1251
- var h;
1252
- const c = {
1251
+ var u;
1252
+ const l = {
1253
1253
  indent: " ",
1254
1254
  pretty: !0,
1255
1255
  timeout: 10,
1256
1256
  ...s
1257
- }, { push: r, join: a, blank: i } = new V({ indent: c.indent }), l = {
1257
+ }, { push: r, join: a, blank: i } = new V({ indent: l.indent }), c = {
1258
1258
  hasHeaders: !1,
1259
1259
  hasBody: !1
1260
1260
  };
1261
- if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (l.hasHeaders = !0, i(), r(bt("NSDictionary", "headers", e, c.pretty))), n.text || n.jsonObj || n.params)
1262
- switch (l.hasBody = !0, n.mimeType) {
1261
+ if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, i(), r(bt("NSDictionary", "headers", e, l.pretty))), n.text || n.jsonObj || n.params)
1262
+ switch (c.hasBody = !0, n.mimeType) {
1263
1263
  case "application/x-www-form-urlencoded":
1264
- if ((h = n.params) != null && h.length) {
1264
+ if ((u = n.params) != null && u.length) {
1265
1265
  i();
1266
- const [f, ...p] = n.params;
1266
+ const [p, ...d] = n.params;
1267
1267
  r(
1268
- `NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${f.name}=${f.value}" dataUsingEncoding:NSUTF8StringEncoding]];`
1269
- ), p.forEach(({ name: y, value: x }) => {
1268
+ `NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${p.name}=${p.value}" dataUsingEncoding:NSUTF8StringEncoding]];`
1269
+ ), d.forEach(({ name: y, value: x }) => {
1270
1270
  r(`[postData appendData:[@"&${y}=${x}" dataUsingEncoding:NSUTF8StringEncoding]];`);
1271
1271
  });
1272
1272
  } else
1273
- l.hasBody = !1;
1273
+ c.hasBody = !1;
1274
1274
  break;
1275
1275
  case "application/json":
1276
- n.jsonObj && (r(bt("NSDictionary", "parameters", n.jsonObj, c.pretty)), i(), r("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
1276
+ n.jsonObj && (r(bt("NSDictionary", "parameters", n.jsonObj, l.pretty)), i(), r("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
1277
1277
  break;
1278
1278
  case "multipart/form-data":
1279
- r(bt("NSArray", "parameters", n.params || [], c.pretty)), r(`NSString *boundary = @"${n.boundary}";`), i(), r("NSError *error;"), r("NSMutableString *body = [NSMutableString string];"), r("for (NSDictionary *param in parameters) {"), r('[body appendFormat:@"--%@\\r\\n", boundary];', 1), r('if (param[@"fileName"]) {', 1), r(
1279
+ r(bt("NSArray", "parameters", n.params || [], l.pretty)), r(`NSString *boundary = @"${n.boundary}";`), i(), r("NSError *error;"), r("NSMutableString *body = [NSMutableString string];"), r("for (NSDictionary *param in parameters) {"), r('[body appendFormat:@"--%@\\r\\n", boundary];', 1), r('if (param[@"fileName"]) {', 1), r(
1280
1280
  '[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"; filename=\\"%@\\"\\r\\n", param[@"name"], param[@"fileName"]];',
1281
1281
  2
1282
1282
  ), r('[body appendFormat:@"Content-Type: %@\\r\\n\\r\\n", param[@"contentType"]];', 2), r(
@@ -1289,7 +1289,7 @@ var Fa = {
1289
1289
  `NSData *postData = [[NSData alloc] initWithData:[@"${n.text}" dataUsingEncoding:NSUTF8StringEncoding]];`
1290
1290
  );
1291
1291
  }
1292
- return i(), r(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${o}"]`), r(" cachePolicy:NSURLRequestUseProtocolCachePolicy"), r(` timeoutInterval:${c.timeout.toFixed(1)}];`), r(`[request setHTTPMethod:@"${t}"];`), l.hasHeaders && r("[request setAllHTTPHeaderFields:headers];"), l.hasBody && r("[request setHTTPBody:postData];"), i(), r("NSURLSession *session = [NSURLSession sharedSession];"), r("NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request"), r(
1292
+ return i(), r(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${o}"]`), r(" cachePolicy:NSURLRequestUseProtocolCachePolicy"), r(` timeoutInterval:${l.timeout.toFixed(1)}];`), r(`[request setHTTPMethod:@"${t}"];`), c.hasHeaders && r("[request setAllHTTPHeaderFields:headers];"), c.hasBody && r("[request setHTTPBody:postData];"), i(), r("NSURLSession *session = [NSURLSession sharedSession];"), r("NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request"), r(
1293
1293
  " completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {"
1294
1294
  ), r(" if (error) {", 1), r(' NSLog(@"%@", error);', 2), r(" } else {", 1), r(
1295
1295
  " NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;",
@@ -1315,21 +1315,21 @@ var Fa = {
1315
1315
  installation: "opam install cohttp-lwt-unix cohttp-async"
1316
1316
  },
1317
1317
  convert: ({ fullUrl: e, allHeaders: n, postData: t, method: o }, s) => {
1318
- const c = {
1318
+ const l = {
1319
1319
  indent: " ",
1320
1320
  ...s
1321
- }, r = ["get", "post", "head", "delete", "patch", "put", "options"], { push: a, blank: i, join: l } = new V({ indent: c.indent });
1321
+ }, r = ["get", "post", "head", "delete", "patch", "put", "options"], { push: a, blank: i, join: c } = new V({ indent: l.indent });
1322
1322
  a("open Cohttp_lwt_unix"), a("open Cohttp"), a("open Lwt"), i(), a(`let uri = Uri.of_string "${e}" in`);
1323
- const h = Object.keys(n);
1324
- h.length === 1 ? a(
1325
- `let headers = Header.add (Header.init ()) "${h[0]}" "${le(
1326
- n[h[0]]
1323
+ const u = Object.keys(n);
1324
+ u.length === 1 ? a(
1325
+ `let headers = Header.add (Header.init ()) "${u[0]}" "${le(
1326
+ n[u[0]]
1327
1327
  )}" in`
1328
- ) : h.length > 1 && (a("let headers = Header.add_list (Header.init ()) ["), h.forEach((x) => {
1328
+ ) : u.length > 1 && (a("let headers = Header.add_list (Header.init ()) ["), u.forEach((x) => {
1329
1329
  a(`("${x}", "${le(n[x])}");`, 1);
1330
1330
  }), a("] in")), t.text && a(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(t.text)} in`), i();
1331
- const f = h.length ? "~headers " : "", p = t.text ? "~body " : "", y = r.includes(o.toLowerCase()) ? `\`${o.toUpperCase()}` : `(Code.method_of_string "${o}")`;
1332
- return a(`Client.call ${f}${p}${y} uri`), a(">>= fun (res, body_stream) ->"), a("(* Do stuff with the result *)", 1), l();
1331
+ const p = u.length ? "~headers " : "", d = t.text ? "~body " : "", y = r.includes(o.toLowerCase()) ? `\`${o.toUpperCase()}` : `(Code.method_of_string "${o}")`;
1332
+ return a(`Client.call ${p}${d}${y} uri`), a(">>= fun (res, body_stream) ->"), a("(* Do stuff with the result *)", 1), c();
1333
1333
  }
1334
1334
  }, di = {
1335
1335
  info: {
@@ -1407,17 +1407,17 @@ ${t}]`;
1407
1407
  description: "PHP with ext-curl",
1408
1408
  extname: ".php"
1409
1409
  },
1410
- convert: ({ uriObj: e, postData: n, fullUrl: t, method: o, httpVersion: s, cookies: c, headersObj: r }, a = {}) => {
1410
+ convert: ({ uriObj: e, postData: n, fullUrl: t, method: o, httpVersion: s, cookies: l, headersObj: r }, a = {}) => {
1411
1411
  const {
1412
1412
  closingTag: i = !1,
1413
- indent: l = " ",
1414
- maxRedirects: h = 10,
1415
- namedErrors: f = !1,
1416
- noTags: p = !1,
1413
+ indent: c = " ",
1414
+ maxRedirects: u = 10,
1415
+ namedErrors: p = !1,
1416
+ noTags: d = !1,
1417
1417
  shortTags: y = !1,
1418
1418
  timeout: x = 30
1419
- } = a, { push: $, blank: d, join: m } = new V({ indent: l });
1420
- p || ($(y ? "<?" : "<?php"), d()), $("$curl = curl_init();"), d();
1419
+ } = a, { push: $, blank: h, join: m } = new V({ indent: c });
1420
+ d || ($(y ? "<?" : "<?php"), h()), $("$curl = curl_init();"), h();
1421
1421
  const v = [
1422
1422
  {
1423
1423
  escape: !0,
@@ -1442,7 +1442,7 @@ ${t}]`;
1442
1442
  {
1443
1443
  escape: !1,
1444
1444
  name: "CURLOPT_MAXREDIRS",
1445
- value: h
1445
+ value: u
1446
1446
  },
1447
1447
  {
1448
1448
  escape: !1,
@@ -1462,20 +1462,20 @@ ${t}]`;
1462
1462
  {
1463
1463
  escape: !n.jsonObj,
1464
1464
  name: "CURLOPT_POSTFIELDS",
1465
- value: n ? n.jsonObj ? `json_encode(${te(n.jsonObj, l.repeat(2), l)})` : n.text : void 0
1465
+ value: n ? n.jsonObj ? `json_encode(${te(n.jsonObj, c.repeat(2), c)})` : n.text : void 0
1466
1466
  }
1467
1467
  ];
1468
1468
  $("curl_setopt_array($curl, [");
1469
- const S = new V({ indent: l, join: `
1470
- ${l}` });
1469
+ const S = new V({ indent: c, join: `
1470
+ ${c}` });
1471
1471
  v.forEach(({ value: O, name: b, escape: q }) => {
1472
1472
  O != null && S.push(`${b} => ${q ? JSON.stringify(O) : O},`);
1473
1473
  });
1474
- const T = c.map((O) => `${encodeURIComponent(O.name)}=${encodeURIComponent(O.value)}`);
1474
+ const T = l.map((O) => `${encodeURIComponent(O.name)}=${encodeURIComponent(O.value)}`);
1475
1475
  T.length && S.push(`CURLOPT_COOKIE => "${T.join("; ")}",`);
1476
- const u = Object.keys(r).sort().map((O) => `"${O}: ${le(r[O])}"`);
1477
- return u.length && (S.push("CURLOPT_HTTPHEADER => ["), S.push(u.join(`,
1478
- ${l}${l}`), 1), S.push("],")), $(S.join(), 1), $("]);"), d(), $("$response = curl_exec($curl);"), $("$err = curl_error($curl);"), d(), $("curl_close($curl);"), d(), $("if ($err) {"), $(f ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), $("} else {"), $("echo $response;", 1), $("}"), !p && i && (d(), $("?>")), m();
1476
+ const f = Object.keys(r).sort().map((O) => `"${O}: ${le(r[O])}"`);
1477
+ return f.length && (S.push("CURLOPT_HTTPHEADER => ["), S.push(f.join(`,
1478
+ ${c}${c}`), 1), S.push("],")), $(S.join(), 1), $("]);"), h(), $("$response = curl_exec($curl);"), $("$err = curl_error($curl);"), h(), $("curl_close($curl);"), h(), $("if ($err) {"), $(p ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), $("} else {"), $("echo $response;", 1), $("}"), !d && i && (h(), $("?>")), m();
1479
1479
  }
1480
1480
  }, yi = {
1481
1481
  info: {
@@ -1486,21 +1486,21 @@ ${l}${l}`), 1), S.push("],")), $(S.join(), 1), $("]);"), d(), $("$response = cur
1486
1486
  extname: ".php",
1487
1487
  installation: "composer require guzzlehttp/guzzle"
1488
1488
  },
1489
- convert: ({ postData: e, fullUrl: n, method: t, cookies: o, headersObj: s }, c) => {
1489
+ convert: ({ postData: e, fullUrl: n, method: t, cookies: o, headersObj: s }, l) => {
1490
1490
  var $;
1491
1491
  const r = {
1492
1492
  closingTag: !1,
1493
1493
  indent: " ",
1494
1494
  noTags: !1,
1495
1495
  shortTags: !1,
1496
- ...c
1497
- }, { push: a, blank: i, join: l } = new V({ indent: r.indent }), { code: h, push: f, join: p } = new V({ indent: r.indent });
1496
+ ...l
1497
+ }, { push: a, blank: i, join: c } = new V({ indent: r.indent }), { code: u, push: p, join: d } = new V({ indent: r.indent });
1498
1498
  switch (r.noTags || a(r.shortTags ? "<?" : "<?php"), a("require_once('vendor/autoload.php');"), i(), e.mimeType) {
1499
1499
  case "application/x-www-form-urlencoded":
1500
- f(`'form_params' => ${te(e.paramsObj, r.indent + r.indent, r.indent)},`, 1);
1500
+ p(`'form_params' => ${te(e.paramsObj, r.indent + r.indent, r.indent)},`, 1);
1501
1501
  break;
1502
1502
  case "multipart/form-data": {
1503
- const d = [];
1503
+ const h = [];
1504
1504
  if (e.params && e.params.forEach((m) => {
1505
1505
  if (m.fileName) {
1506
1506
  const v = {
@@ -1508,25 +1508,25 @@ ${l}${l}`), 1), S.push("],")), $(S.join(), 1), $("]);"), d(), $("$response = cur
1508
1508
  filename: m.fileName,
1509
1509
  contents: m.value
1510
1510
  };
1511
- m.contentType && (v.headers = { "Content-Type": m.contentType }), d.push(v);
1512
- } else m.value && d.push({
1511
+ m.contentType && (v.headers = { "Content-Type": m.contentType }), h.push(v);
1512
+ } else m.value && h.push({
1513
1513
  name: m.name,
1514
1514
  contents: m.value
1515
1515
  });
1516
- }), d.length && (f(`'multipart' => ${te(d, r.indent + r.indent, r.indent)}`, 1), ot(s, "content-type") && ($ = be(s, "content-type")) != null && $.indexOf("boundary"))) {
1516
+ }), h.length && (p(`'multipart' => ${te(h, r.indent + r.indent, r.indent)}`, 1), ot(s, "content-type") && ($ = be(s, "content-type")) != null && $.indexOf("boundary"))) {
1517
1517
  const m = fe(s, "content-type");
1518
1518
  m && delete s[m];
1519
1519
  }
1520
1520
  break;
1521
1521
  }
1522
1522
  default:
1523
- e.text && f(`'body' => ${te(e.text)},`, 1);
1523
+ e.text && p(`'body' => ${te(e.text)},`, 1);
1524
1524
  }
1525
- const y = Object.keys(s).sort().map(function(d) {
1526
- return `${r.indent}${r.indent}'${d}' => '${ze(s[d])}',`;
1527
- }), x = o.map((d) => `${encodeURIComponent(d.name)}=${encodeURIComponent(d.value)}`).join("; ");
1528
- return x.length && y.push(`${r.indent}${r.indent}'cookie' => '${ze(x)}',`), y.length && (f("'headers' => [", 1), f(y.join(`
1529
- `)), f("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), i(), h.length ? (a(`$response = $client->request('${t}', '${n}', [`), a(p()), a("]);")) : a(`$response = $client->request('${t}', '${n}');`), i(), a("echo $response->getBody();"), !r.noTags && r.closingTag && (i(), a("?>")), l();
1525
+ const y = Object.keys(s).sort().map(function(h) {
1526
+ return `${r.indent}${r.indent}'${h}' => '${ze(s[h])}',`;
1527
+ }), x = o.map((h) => `${encodeURIComponent(h.name)}=${encodeURIComponent(h.value)}`).join("; ");
1528
+ return x.length && y.push(`${r.indent}${r.indent}'cookie' => '${ze(x)}',`), y.length && (p("'headers' => [", 1), p(y.join(`
1529
+ `)), p("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), i(), u.length ? (a(`$response = $client->request('${t}', '${n}', [`), a(d()), a("]);")) : a(`$response = $client->request('${t}', '${n}');`), i(), a("echo $response->getBody();"), !r.noTags && r.closingTag && (i(), a("?>")), c();
1530
1530
  }
1531
1531
  }, mi = {
1532
1532
  info: {
@@ -1536,19 +1536,19 @@ ${l}${l}`), 1), S.push("],")), $(S.join(), 1), $("]);"), d(), $("$response = cur
1536
1536
  description: "PHP with pecl/http v1",
1537
1537
  extname: ".php"
1538
1538
  },
1539
- convert: ({ method: e, url: n, postData: t, queryObj: o, headersObj: s, cookiesObj: c }, r = {}) => {
1540
- const { closingTag: a = !1, indent: i = " ", noTags: l = !1, shortTags: h = !1 } = r, { push: f, blank: p, join: y } = new V({ indent: i });
1541
- switch (l || (f(h ? "<?" : "<?php"), p()), Xr.includes(e.toUpperCase()) || f(`HttpRequest::methodRegister('${e}');`), f("$request = new HttpRequest();"), f(`$request->setUrl(${te(n)});`), Xr.includes(e.toUpperCase()) ? f(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : f(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), p(), Object.keys(o).length && (f(`$request->setQueryData(${te(o, i)});`), p()), Object.keys(s).length && (f(`$request->setHeaders(${te(s, i)});`), p()), Object.keys(c).length && (f(`$request->setCookies(${te(c, i)});`), p()), t.mimeType) {
1539
+ convert: ({ method: e, url: n, postData: t, queryObj: o, headersObj: s, cookiesObj: l }, r = {}) => {
1540
+ const { closingTag: a = !1, indent: i = " ", noTags: c = !1, shortTags: u = !1 } = r, { push: p, blank: d, join: y } = new V({ indent: i });
1541
+ switch (c || (p(u ? "<?" : "<?php"), d()), Xr.includes(e.toUpperCase()) || p(`HttpRequest::methodRegister('${e}');`), p("$request = new HttpRequest();"), p(`$request->setUrl(${te(n)});`), Xr.includes(e.toUpperCase()) ? p(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : p(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), d(), Object.keys(o).length && (p(`$request->setQueryData(${te(o, i)});`), d()), Object.keys(s).length && (p(`$request->setHeaders(${te(s, i)});`), d()), Object.keys(l).length && (p(`$request->setCookies(${te(l, i)});`), d()), t.mimeType) {
1542
1542
  case "application/x-www-form-urlencoded":
1543
- f(`$request->setContentType(${te(t.mimeType)});`), f(`$request->setPostFields(${te(t.paramsObj, i)});`), p();
1543
+ p(`$request->setContentType(${te(t.mimeType)});`), p(`$request->setPostFields(${te(t.paramsObj, i)});`), d();
1544
1544
  break;
1545
1545
  case "application/json":
1546
- f(`$request->setContentType(${te(t.mimeType)});`), f(`$request->setBody(json_encode(${te(t.jsonObj, i)}));`), p();
1546
+ p(`$request->setContentType(${te(t.mimeType)});`), p(`$request->setBody(json_encode(${te(t.jsonObj, i)}));`), d();
1547
1547
  break;
1548
1548
  default:
1549
- t.text && (f(`$request->setBody(${te(t.text)});`), p());
1549
+ t.text && (p(`$request->setBody(${te(t.text)});`), d());
1550
1550
  }
1551
- return f("try {"), f("$response = $request->send();", 1), p(), f("echo $response->getBody();", 1), f("} catch (HttpException $ex) {"), f("echo $ex;", 1), f("}"), !l && a && (p(), f("?>")), y();
1551
+ return p("try {"), p("$response = $request->send();", 1), d(), p("echo $response->getBody();", 1), p("} catch (HttpException $ex) {"), p("echo $ex;", 1), p("}"), !c && a && (d(), p("?>")), y();
1552
1552
  }
1553
1553
  }, gi = {
1554
1554
  info: {
@@ -1558,45 +1558,45 @@ ${l}${l}`), 1), S.push("],")), $(S.join(), 1), $("]);"), d(), $("$response = cur
1558
1558
  description: "PHP with pecl/http v2",
1559
1559
  extname: ".php"
1560
1560
  },
1561
- convert: ({ postData: e, headersObj: n, method: t, queryObj: o, cookiesObj: s, url: c }, r = {}) => {
1561
+ convert: ({ postData: e, headersObj: n, method: t, queryObj: o, cookiesObj: s, url: l }, r = {}) => {
1562
1562
  var $;
1563
- const { closingTag: a = !1, indent: i = " ", noTags: l = !1, shortTags: h = !1 } = r, { push: f, blank: p, join: y } = new V({ indent: i });
1563
+ const { closingTag: a = !1, indent: i = " ", noTags: c = !1, shortTags: u = !1 } = r, { push: p, blank: d, join: y } = new V({ indent: i });
1564
1564
  let x = !1;
1565
- switch (l || (f(h ? "<?" : "<?php"), p()), f("$client = new http\\Client;"), f("$request = new http\\Client\\Request;"), p(), e.mimeType) {
1565
+ switch (c || (p(u ? "<?" : "<?php"), d()), p("$client = new http\\Client;"), p("$request = new http\\Client\\Request;"), d(), e.mimeType) {
1566
1566
  case "application/x-www-form-urlencoded":
1567
- f("$body = new http\\Message\\Body;"), f(`$body->append(new http\\QueryString(${te(e.paramsObj, i)}));`), p(), x = !0;
1567
+ p("$body = new http\\Message\\Body;"), p(`$body->append(new http\\QueryString(${te(e.paramsObj, i)}));`), d(), x = !0;
1568
1568
  break;
1569
1569
  case "multipart/form-data": {
1570
1570
  if (!e.params)
1571
1571
  break;
1572
- const d = [], m = {};
1573
- e.params.forEach(({ name: T, fileName: u, value: O, contentType: b }) => {
1574
- if (u) {
1575
- d.push({
1572
+ const h = [], m = {};
1573
+ e.params.forEach(({ name: T, fileName: f, value: O, contentType: b }) => {
1574
+ if (f) {
1575
+ h.push({
1576
1576
  name: T,
1577
1577
  type: b,
1578
- file: u,
1578
+ file: f,
1579
1579
  data: O
1580
1580
  });
1581
1581
  return;
1582
1582
  }
1583
1583
  O && (m[T] = O);
1584
1584
  });
1585
- const v = Object.keys(m).length ? te(m, i) : "null", S = d.length ? te(d, i) : "null";
1586
- if (f("$body = new http\\Message\\Body;"), f(`$body->addForm(${v}, ${S});`), ot(n, "content-type") && ($ = be(n, "content-type")) != null && $.indexOf("boundary")) {
1585
+ const v = Object.keys(m).length ? te(m, i) : "null", S = h.length ? te(h, i) : "null";
1586
+ if (p("$body = new http\\Message\\Body;"), p(`$body->addForm(${v}, ${S});`), ot(n, "content-type") && ($ = be(n, "content-type")) != null && $.indexOf("boundary")) {
1587
1587
  const T = fe(n, "content-type");
1588
1588
  T && delete n[T];
1589
1589
  }
1590
- p(), x = !0;
1590
+ d(), x = !0;
1591
1591
  break;
1592
1592
  }
1593
1593
  case "application/json":
1594
- f("$body = new http\\Message\\Body;"), f(`$body->append(json_encode(${te(e.jsonObj, i)}));`), x = !0;
1594
+ p("$body = new http\\Message\\Body;"), p(`$body->append(json_encode(${te(e.jsonObj, i)}));`), x = !0;
1595
1595
  break;
1596
1596
  default:
1597
- e.text && (f("$body = new http\\Message\\Body;"), f(`$body->append(${te(e.text)});`), p(), x = !0);
1597
+ e.text && (p("$body = new http\\Message\\Body;"), p(`$body->append(${te(e.text)});`), d(), x = !0);
1598
1598
  }
1599
- return f(`$request->setRequestUrl(${te(c)});`), f(`$request->setRequestMethod(${te(t)});`), x && (f("$request->setBody($body);"), p()), Object.keys(o).length && (f(`$request->setQuery(new http\\QueryString(${te(o, i)}));`), p()), Object.keys(n).length && (f(`$request->setHeaders(${te(n, i)});`), p()), Object.keys(s).length && (p(), f(`$client->setCookies(${te(s, i)});`), p()), f("$client->enqueue($request)->send();"), f("$response = $client->getResponse();"), p(), f("echo $response->getBody();"), !l && a && (p(), f("?>")), y();
1599
+ return p(`$request->setRequestUrl(${te(l)});`), p(`$request->setRequestMethod(${te(t)});`), x && (p("$request->setBody($body);"), d()), Object.keys(o).length && (p(`$request->setQuery(new http\\QueryString(${te(o, i)}));`), d()), Object.keys(n).length && (p(`$request->setHeaders(${te(n, i)});`), d()), Object.keys(s).length && (d(), p(`$client->setCookies(${te(s, i)});`), d()), p("$client->enqueue($request)->send();"), p("$response = $client->getResponse();"), d(), p("echo $response->getBody();"), !c && a && (d(), p("?>")), y();
1600
1600
  }
1601
1601
  }, vi = {
1602
1602
  info: {
@@ -1611,18 +1611,18 @@ ${l}${l}`), 1), S.push("],")), $(S.join(), 1), $("]);"), d(), $("$response = cur
1611
1611
  http1: mi,
1612
1612
  http2: gi
1613
1613
  }
1614
- }, so = (e) => ({ method: t, headersObj: o, cookies: s, uriObj: c, fullUrl: r, postData: a, allHeaders: i }) => {
1615
- const { push: l, join: h } = new V();
1614
+ }, so = (e) => ({ method: t, headersObj: o, cookies: s, uriObj: l, fullUrl: r, postData: a, allHeaders: i }) => {
1615
+ const { push: c, join: u } = new V();
1616
1616
  if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(t.toUpperCase()))
1617
1617
  return "Method not supported";
1618
- const p = [], y = Object.keys(o);
1619
- return y.length && (l("$headers=@{}"), y.forEach((x) => {
1620
- x !== "connection" && l(`$headers.Add("${x}", "${Me(o[x], { escapeChar: "`" })}")`);
1621
- }), p.push("-Headers $headers")), s.length && (l("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), s.forEach((x) => {
1622
- l("$cookie = New-Object System.Net.Cookie"), l(`$cookie.Name = '${x.name}'`), l(`$cookie.Value = '${x.value}'`), l(`$cookie.Domain = '${c.host}'`), l("$session.Cookies.Add($cookie)");
1623
- }), p.push("-WebSession $session")), a.text && (p.push(
1618
+ const d = [], y = Object.keys(o);
1619
+ return y.length && (c("$headers=@{}"), y.forEach((x) => {
1620
+ x !== "connection" && c(`$headers.Add("${x}", "${Me(o[x], { escapeChar: "`" })}")`);
1621
+ }), d.push("-Headers $headers")), s.length && (c("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), s.forEach((x) => {
1622
+ c("$cookie = New-Object System.Net.Cookie"), c(`$cookie.Name = '${x.name}'`), c(`$cookie.Value = '${x.value}'`), c(`$cookie.Domain = '${l.host}'`), c("$session.Cookies.Add($cookie)");
1623
+ }), d.push("-WebSession $session")), a.text && (d.push(
1624
1624
  `-ContentType '${Me(be(i, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
1625
- ), p.push(`-Body '${a.text}'`)), l(`$response = ${e} -Uri '${r}' -Method ${t} ${p.join(" ")}`.trim()), h();
1625
+ ), d.push(`-Body '${a.text}'`)), c(`$response = ${e} -Uri '${r}' -Method ${t} ${d.join(" ")}`.trim()), u();
1626
1626
  }, bi = {
1627
1627
  info: {
1628
1628
  key: "restmethod",
@@ -1653,11 +1653,11 @@ ${l}${l}`), 1), S.push("],")), $(S.join(), 1), $("]);"), d(), $("$response = cur
1653
1653
  }
1654
1654
  };
1655
1655
  function Zr(e, n, t, o, s) {
1656
- const c = o.repeat(s), r = o.repeat(s - 1), a = t ? `,
1657
- ${c}` : ", ", i = e === "object" ? "{" : "[", l = e === "object" ? "}" : "]";
1656
+ const l = o.repeat(s), r = o.repeat(s - 1), a = t ? `,
1657
+ ${l}` : ", ", i = e === "object" ? "{" : "[", c = e === "object" ? "}" : "]";
1658
1658
  return t ? `${i}
1659
- ${c}${n.join(a)}
1660
- ${r}${l}` : e === "object" && n.length > 0 ? `${i} ${n.join(a)} ${l}` : `${i}${n.join(a)}${l}`;
1659
+ ${l}${n.join(a)}
1660
+ ${r}${c}` : e === "object" && n.length > 0 ? `${i} ${n.join(a)} ${c}` : `${i}${n.join(a)}${c}`;
1661
1661
  }
1662
1662
  var Le = (e, n, t) => {
1663
1663
  switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
@@ -1665,7 +1665,7 @@ var Le = (e, n, t) => {
1665
1665
  return e;
1666
1666
  case "[object Array]": {
1667
1667
  let o = !1;
1668
- const s = e.map((c) => (Object.prototype.toString.call(c) === "[object Object]" && (o = Object.keys(c).length > 1), Le(c, n, t)));
1668
+ const s = e.map((l) => (Object.prototype.toString.call(l) === "[object Object]" && (o = Object.keys(l).length > 1), Le(l, n, t)));
1669
1669
  return Zr("array", s, o, n.indent, t);
1670
1670
  }
1671
1671
  case "[object Object]": {
@@ -1691,61 +1691,61 @@ var Le = (e, n, t) => {
1691
1691
  installation: "python -m pip install requests"
1692
1692
  },
1693
1693
  convert: ({ fullUrl: e, postData: n, allHeaders: t, method: o }, s) => {
1694
- const c = {
1694
+ const l = {
1695
1695
  indent: " ",
1696
1696
  pretty: !0,
1697
1697
  ...s
1698
- }, { push: r, blank: a, join: i, addPostProcessor: l } = new V({ indent: c.indent });
1698
+ }, { push: r, blank: a, join: i, addPostProcessor: c } = new V({ indent: l.indent });
1699
1699
  r("import requests"), a(), r(`url = "${e}"`), a();
1700
- const h = t;
1701
- let f = {};
1702
- const p = {};
1700
+ const u = t;
1701
+ let p = {};
1702
+ const d = {};
1703
1703
  let y = !1, x = !1, $ = !1;
1704
1704
  switch (n.mimeType) {
1705
1705
  case "application/json":
1706
- n.jsonObj && (r(`payload = ${Le(n.jsonObj, c)}`), $ = !0, x = !0);
1706
+ n.jsonObj && (r(`payload = ${Le(n.jsonObj, l)}`), $ = !0, x = !0);
1707
1707
  break;
1708
1708
  case "multipart/form-data":
1709
1709
  if (!n.params)
1710
1710
  break;
1711
- if (f = {}, n.params.forEach((v) => {
1712
- v.fileName ? (v.contentType ? p[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'), '${v.contentType}')` : p[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'))`, y = !0) : (f[v.name] = v.value, x = !0);
1711
+ if (p = {}, n.params.forEach((v) => {
1712
+ v.fileName ? (v.contentType ? d[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'), '${v.contentType}')` : d[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'))`, y = !0) : (p[v.name] = v.value, x = !0);
1713
1713
  }), y) {
1714
- r(`files = ${Le(p, c)}`), x && r(`payload = ${Le(f, c)}`);
1715
- const v = fe(h, "content-type");
1716
- v && delete h[v];
1714
+ r(`files = ${Le(d, l)}`), x && r(`payload = ${Le(p, l)}`);
1715
+ const v = fe(u, "content-type");
1716
+ v && delete u[v];
1717
1717
  } else {
1718
1718
  const v = JSON.stringify(n.text);
1719
1719
  v && (r(`payload = ${v}`), x = !0);
1720
1720
  }
1721
- l(
1721
+ c(
1722
1722
  (v) => v.replace(/"\('(.+)', open\('(.+)', 'rb'\)\)"/g, '("$1", open("$2", "rb"))').replace(/"\('(.+)', open\('(.+)', 'rb'\), '(.+)'\)"/g, '("$1", open("$2", "rb"), "$3")')
1723
1723
  );
1724
1724
  break;
1725
1725
  default: {
1726
1726
  if (n.mimeType === "application/x-www-form-urlencoded" && n.paramsObj) {
1727
- r(`payload = ${Le(n.paramsObj, c)}`), x = !0;
1727
+ r(`payload = ${Le(n.paramsObj, l)}`), x = !0;
1728
1728
  break;
1729
1729
  }
1730
1730
  const v = JSON.stringify(n.text);
1731
1731
  v && (r(`payload = ${v}`), x = !0);
1732
1732
  }
1733
1733
  }
1734
- const d = Object.keys(h).length;
1735
- if (d === 0 && (x || y))
1734
+ const h = Object.keys(u).length;
1735
+ if (h === 0 && (x || y))
1736
1736
  a();
1737
- else if (d === 1)
1738
- Object.keys(h).forEach((v) => {
1739
- r(`headers = {"${v}": "${le(h[v])}"}`), a();
1737
+ else if (h === 1)
1738
+ Object.keys(u).forEach((v) => {
1739
+ r(`headers = {"${v}": "${le(u[v])}"}`), a();
1740
1740
  });
1741
- else if (d > 1) {
1741
+ else if (h > 1) {
1742
1742
  let v = 1;
1743
- r("headers = {"), Object.keys(h).forEach((S) => {
1744
- r(v !== d ? `"${S}": "${le(h[S])}",` : `"${S}": "${le(h[S])}"`, 1), v += 1;
1743
+ r("headers = {"), Object.keys(u).forEach((S) => {
1744
+ r(v !== h ? `"${S}": "${le(u[S])}",` : `"${S}": "${le(u[S])}"`, 1), v += 1;
1745
1745
  }), r("}"), a();
1746
1746
  }
1747
1747
  let m = ji.includes(o) ? `response = requests.${o.toLowerCase()}(url` : `response = requests.request("${o}", url`;
1748
- return x && ($ ? m += ", json=payload" : m += ", data=payload"), y && (m += ", files=files"), d > 0 && (m += ", headers=headers"), m += ")", r(m), a(), r("print(response.text)"), i();
1748
+ return x && ($ ? m += ", json=payload" : m += ", data=payload"), y && (m += ", files=files"), h > 0 && (m += ", headers=headers"), m += ")", r(m), a(), r("print(response.text)"), i();
1749
1749
  }
1750
1750
  }, Si = {
1751
1751
  info: {
@@ -1765,17 +1765,17 @@ var Le = (e, n, t) => {
1765
1765
  description: "httr: Tools for Working with URLs and HTTP",
1766
1766
  extname: ".r"
1767
1767
  },
1768
- convert: ({ url: e, queryObj: n, queryString: t, postData: o, allHeaders: s, method: c }) => {
1768
+ convert: ({ url: e, queryObj: n, queryString: t, postData: o, allHeaders: s, method: l }) => {
1769
1769
  const { push: r, blank: a, join: i } = new V();
1770
1770
  r("library(httr)"), a(), r(`url <- "${e}"`), a();
1771
- const l = n;
1771
+ const c = n;
1772
1772
  delete n.key;
1773
- const h = Object.keys(l).length;
1774
- t.length === 1 ? (r(`queryString <- list(${Object.keys(l)} = "${Object.values(l).toString()}")`), a()) : t.length > 1 && (r("queryString <- list("), Object.keys(l).forEach((u, O) => {
1775
- O !== h - 1 ? r(` ${u} = "${l[u].toString()}",`) : r(` ${u} = "${l[u].toString()}"`);
1773
+ const u = Object.keys(c).length;
1774
+ t.length === 1 ? (r(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), a()) : t.length > 1 && (r("queryString <- list("), Object.keys(c).forEach((f, O) => {
1775
+ O !== u - 1 ? r(` ${f} = "${c[f].toString()}",`) : r(` ${f} = "${c[f].toString()}"`);
1776
1776
  }), r(")"), a());
1777
- const f = JSON.stringify(o.text);
1778
- if (f && (r(`payload <- ${f}`), a()), o.text || o.jsonObj || o.params)
1777
+ const p = JSON.stringify(o.text);
1778
+ if (p && (r(`payload <- ${p}`), a()), o.text || o.jsonObj || o.params)
1779
1779
  switch (o.mimeType) {
1780
1780
  case "application/x-www-form-urlencoded":
1781
1781
  r('encode <- "form"'), a();
@@ -1790,10 +1790,10 @@ var Le = (e, n, t) => {
1790
1790
  r('encode <- "raw"'), a();
1791
1791
  break;
1792
1792
  }
1793
- const p = be(s, "cookie"), y = be(s, "accept"), x = p ? `set_cookies(\`${String(p).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, $ = y ? `accept("${le(y)}")` : void 0, d = `content_type("${le(o.mimeType)}")`, m = Object.entries(s).filter(([u]) => !["cookie", "accept", "content-type"].includes(u.toLowerCase())).map(([u, O]) => `'${u}' = '${ze(O)}'`).join(", "), v = m ? `add_headers(${m})` : void 0;
1794
- let S = `response <- VERB("${c}", url`;
1795
- f && (S += ", body = payload"), t.length && (S += ", query = queryString");
1796
- const T = [v, d, $, x].filter((u) => !!u).join(", ");
1793
+ const d = be(s, "cookie"), y = be(s, "accept"), x = d ? `set_cookies(\`${String(d).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, $ = y ? `accept("${le(y)}")` : void 0, h = `content_type("${le(o.mimeType)}")`, m = Object.entries(s).filter(([f]) => !["cookie", "accept", "content-type"].includes(f.toLowerCase())).map(([f, O]) => `'${f}' = '${ze(O)}'`).join(", "), v = m ? `add_headers(${m})` : void 0;
1794
+ let S = `response <- VERB("${l}", url`;
1795
+ p && (S += ", body = payload"), t.length && (S += ", query = queryString");
1796
+ const T = [v, h, $, x].filter((f) => !!f).join(", ");
1797
1797
  return T && (S += `, ${T}`), (o.text || o.jsonObj || o.params) && (S += ", encode = encode"), S += ")", r(S), a(), r('content(response, "text")'), i();
1798
1798
  }
1799
1799
  }, Ti = {
@@ -1814,9 +1814,9 @@ var Le = (e, n, t) => {
1814
1814
  extname: ".rb"
1815
1815
  },
1816
1816
  convert: ({ uriObj: e, method: n, fullUrl: t, postData: o, allHeaders: s }) => {
1817
- const { push: c, blank: r, join: a } = new V();
1818
- c("require 'uri'"), c("require 'net/http'"), r();
1819
- const i = n.toUpperCase(), l = [
1817
+ const { push: l, blank: r, join: a } = new V();
1818
+ l("require 'uri'"), l("require 'net/http'"), r();
1819
+ const i = n.toUpperCase(), c = [
1820
1820
  "GET",
1821
1821
  "POST",
1822
1822
  "HEAD",
@@ -1829,12 +1829,12 @@ var Le = (e, n, t) => {
1829
1829
  "UNLOCK",
1830
1830
  "MOVE",
1831
1831
  "TRACE"
1832
- ], h = i.charAt(0) + i.substring(1).toLowerCase();
1833
- l.includes(i) || (c(`class Net::HTTP::${h} < Net::HTTPRequest`), c(` METHOD = '${i.toUpperCase()}'`), c(` REQUEST_HAS_BODY = '${o.text ? "true" : "false"}'`), c(" RESPONSE_HAS_BODY = true"), c("end"), r()), c(`url = URI("${t}")`), r(), c("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && c("http.use_ssl = true"), r(), c(`request = Net::HTTP::${h}.new(url)`);
1834
- const f = Object.keys(s);
1835
- return f.length && f.forEach((p) => {
1836
- c(`request["${p}"] = '${ze(s[p])}'`);
1837
- }), o.text && c(`request.body = ${JSON.stringify(o.text)}`), r(), c("response = http.request(request)"), c("puts response.read_body"), a();
1832
+ ], u = i.charAt(0) + i.substring(1).toLowerCase();
1833
+ c.includes(i) || (l(`class Net::HTTP::${u} < Net::HTTPRequest`), l(` METHOD = '${i.toUpperCase()}'`), l(` REQUEST_HAS_BODY = '${o.text ? "true" : "false"}'`), l(" RESPONSE_HAS_BODY = true"), l("end"), r()), l(`url = URI("${t}")`), r(), l("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && l("http.use_ssl = true"), r(), l(`request = Net::HTTP::${u}.new(url)`);
1834
+ const p = Object.keys(s);
1835
+ return p.length && p.forEach((d) => {
1836
+ l(`request["${d}"] = '${ze(s[d])}'`);
1837
+ }), o.text && l(`request.body = ${JSON.stringify(o.text)}`), r(), l("response = http.request(request)"), l("puts response.read_body"), a();
1838
1838
  }
1839
1839
  }, Pi = {
1840
1840
  info: {
@@ -1869,15 +1869,15 @@ var Le = (e, n, t) => {
1869
1869
  description: "cURL is a command line tool and library for transferring data with URL syntax",
1870
1870
  extname: ".sh"
1871
1871
  },
1872
- convert: ({ fullUrl: e, method: n, httpVersion: t, headersObj: o, allHeaders: s, postData: c }, r = {}) => {
1873
- var d;
1874
- const { indent: a = " ", short: i = !1, binary: l = !1, globOff: h = !1 } = r, f = " ", { push: p, join: y } = new V({
1872
+ convert: ({ fullUrl: e, method: n, httpVersion: t, headersObj: o, allHeaders: s, postData: l }, r = {}) => {
1873
+ var h;
1874
+ const { indent: a = " ", short: i = !1, binary: c = !1, globOff: u = !1 } = r, p = " ", { push: d, join: y } = new V({
1875
1875
  ...typeof a == "string" ? { indent: a } : {},
1876
1876
  join: a !== !1 ? ` \\
1877
1877
  ${a}` : " "
1878
1878
  }), x = Ni(i);
1879
1879
  let $ = ce(e);
1880
- if (p(`curl ${x("request")} ${n}`), h && ($ = unescape($), p(x("globoff"))), p(`${x("url ")}${$}`), t === "HTTP/1.0" && p(x("http1.0")), be(s, "accept-encoding") && p("--compressed"), c.mimeType === "multipart/form-data") {
1880
+ if (d(`curl ${x("request")} ${n}`), u && ($ = unescape($), d(x("globoff"))), d(`${x("url ")}${$}`), t === "HTTP/1.0" && d(x("http1.0")), be(s, "accept-encoding") && d("--compressed"), l.mimeType === "multipart/form-data") {
1881
1881
  const m = fe(o, "content-type");
1882
1882
  if (m) {
1883
1883
  const v = o[m];
@@ -1889,43 +1889,43 @@ ${a}` : " "
1889
1889
  }
1890
1890
  switch (Object.keys(o).sort().forEach((m) => {
1891
1891
  const v = `${m}: ${o[m]}`;
1892
- p(`${x("header")} ${ce(v)}`);
1893
- }), s.cookie && p(`${x("cookie")} ${ce(s.cookie)}`), c.mimeType) {
1892
+ d(`${x("header")} ${ce(v)}`);
1893
+ }), s.cookie && d(`${x("cookie")} ${ce(s.cookie)}`), l.mimeType) {
1894
1894
  case "multipart/form-data":
1895
- (d = c.params) == null || d.forEach((v) => {
1895
+ (h = l.params) == null || h.forEach((v) => {
1896
1896
  let S = "";
1897
- v.fileName ? S = `${v.name}='@${v.fileName}'` : S = ce(`${v.name}=${v.value}`), p(`${x("form")} ${S}`);
1897
+ v.fileName ? S = `${v.name}='@${v.fileName}'` : S = ce(`${v.name}=${v.value}`), d(`${x("form")} ${S}`);
1898
1898
  });
1899
1899
  break;
1900
1900
  case "application/x-www-form-urlencoded":
1901
- c.params ? c.params.forEach((v) => {
1902
- const S = v.name, T = encodeURIComponent(v.name), u = T !== S, O = u ? T : S, b = l ? "--data-binary" : u ? "--data-urlencode" : x("data");
1903
- p(`${b} ${ce(`${O}=${v.value}`)}`);
1904
- }) : p(`${l ? "--data-binary" : x("data")} ${ce(c.text)}`);
1901
+ l.params ? l.params.forEach((v) => {
1902
+ const S = v.name, T = encodeURIComponent(v.name), f = T !== S, O = f ? T : S, b = c ? "--data-binary" : f ? "--data-urlencode" : x("data");
1903
+ d(`${b} ${ce(`${O}=${v.value}`)}`);
1904
+ }) : d(`${c ? "--data-binary" : x("data")} ${ce(l.text)}`);
1905
1905
  break;
1906
1906
  default:
1907
- if (!c.text)
1907
+ if (!l.text)
1908
1908
  break;
1909
1909
  let m = !1;
1910
- if (Na(c.mimeType) && c.text.length > 20)
1910
+ if (Na(l.mimeType) && l.text.length > 20)
1911
1911
  try {
1912
- const v = JSON.parse(c.text);
1913
- m = !0, c.text.indexOf("'") > 0 ? p(
1914
- `${l ? "--data-binary" : x("data")} @- <<EOF
1912
+ const v = JSON.parse(l.text);
1913
+ m = !0, l.text.indexOf("'") > 0 ? d(
1914
+ `${c ? "--data-binary" : x("data")} @- <<EOF
1915
1915
  ${JSON.stringify(
1916
1916
  v,
1917
1917
  null,
1918
- f
1918
+ p
1919
1919
  )}
1920
1920
  EOF`
1921
- ) : p(
1922
- `${l ? "--data-binary" : x("data")} '
1923
- ${JSON.stringify(v, null, f)}
1921
+ ) : d(
1922
+ `${c ? "--data-binary" : x("data")} '
1923
+ ${JSON.stringify(v, null, p)}
1924
1924
  '`
1925
1925
  );
1926
1926
  } catch {
1927
1927
  }
1928
- m || p(`${l ? "--data-binary" : x("data")} ${ce(c.text)}`);
1928
+ m || d(`${c ? "--data-binary" : x("data")} ${ce(l.text)}`);
1929
1929
  }
1930
1930
  return y();
1931
1931
  }
@@ -1938,7 +1938,7 @@ ${JSON.stringify(v, null, f)}
1938
1938
  extname: ".sh",
1939
1939
  installation: "brew install httpie"
1940
1940
  },
1941
- convert: ({ allHeaders: e, postData: n, queryObj: t, fullUrl: o, method: s, url: c }, r) => {
1941
+ convert: ({ allHeaders: e, postData: n, queryObj: t, fullUrl: o, method: s, url: l }, r) => {
1942
1942
  const a = {
1943
1943
  body: !1,
1944
1944
  cert: !1,
@@ -1953,30 +1953,30 @@ ${JSON.stringify(v, null, f)}
1953
1953
  verbose: !1,
1954
1954
  verify: !1,
1955
1955
  ...r
1956
- }, { push: i, join: l, unshift: h } = new V({
1956
+ }, { push: i, join: c, unshift: u } = new V({
1957
1957
  indent: a.indent,
1958
1958
  // @ts-expect-error SEEMS LEGIT
1959
1959
  join: a.indent !== !1 ? ` \\
1960
1960
  ${a.indent}` : " "
1961
1961
  });
1962
- let f = !1;
1963
- const p = [];
1964
- a.headers && p.push(a.short ? "-h" : "--headers"), a.body && p.push(a.short ? "-b" : "--body"), a.verbose && p.push(a.short ? "-v" : "--verbose"), a.print && p.push(`${a.short ? "-p" : "--print"}=${a.print}`), a.verify && p.push(`--verify=${a.verify}`), a.cert && p.push(`--cert=${a.cert}`), a.pretty && p.push(`--pretty=${a.pretty}`), a.style && p.push(`--style=${a.style}`), a.timeout && p.push(`--timeout=${a.timeout}`), a.queryParams && Object.keys(t).forEach((x) => {
1962
+ let p = !1;
1963
+ const d = [];
1964
+ a.headers && d.push(a.short ? "-h" : "--headers"), a.body && d.push(a.short ? "-b" : "--body"), a.verbose && d.push(a.short ? "-v" : "--verbose"), a.print && d.push(`${a.short ? "-p" : "--print"}=${a.print}`), a.verify && d.push(`--verify=${a.verify}`), a.cert && d.push(`--cert=${a.cert}`), a.pretty && d.push(`--pretty=${a.pretty}`), a.style && d.push(`--style=${a.style}`), a.timeout && d.push(`--timeout=${a.timeout}`), a.queryParams && Object.keys(t).forEach((x) => {
1965
1965
  const $ = t[x];
1966
- Array.isArray($) ? $.forEach((d) => {
1967
- i(`${x}==${ce(d)}`);
1966
+ Array.isArray($) ? $.forEach((h) => {
1967
+ i(`${x}==${ce(h)}`);
1968
1968
  }) : i(`${x}==${ce($)}`);
1969
1969
  }), Object.keys(e).sort().forEach((x) => {
1970
1970
  i(`${x}:${ce(e[x])}`);
1971
- }), n.mimeType === "application/x-www-form-urlencoded" ? n.params && n.params.length && (p.push(a.short ? "-f" : "--form"), n.params.forEach((x) => {
1971
+ }), n.mimeType === "application/x-www-form-urlencoded" ? n.params && n.params.length && (d.push(a.short ? "-f" : "--form"), n.params.forEach((x) => {
1972
1972
  i(`${x.name}=${ce(x.value)}`);
1973
- })) : f = !0;
1974
- const y = p.length ? `${p.join(" ")} ` : "";
1975
- if (c = ce(a.queryParams ? c : o), h(`http ${y}${s} ${c}`), f && n.text) {
1973
+ })) : p = !0;
1974
+ const y = d.length ? `${d.join(" ")} ` : "";
1975
+ if (l = ce(a.queryParams ? l : o), u(`http ${y}${s} ${l}`), p && n.text) {
1976
1976
  const x = ce(n.text);
1977
- h(`echo ${x} | `);
1977
+ u(`echo ${x} | `);
1978
1978
  }
1979
- return l();
1979
+ return c();
1980
1980
  }
1981
1981
  }, Ai = {
1982
1982
  info: {
@@ -1987,20 +1987,20 @@ ${a.indent}` : " "
1987
1987
  extname: ".sh"
1988
1988
  },
1989
1989
  convert: ({ method: e, postData: n, allHeaders: t, fullUrl: o }, s) => {
1990
- const c = {
1990
+ const l = {
1991
1991
  indent: " ",
1992
1992
  short: !1,
1993
1993
  verbose: !1,
1994
1994
  ...s
1995
1995
  }, { push: r, join: a } = new V({
1996
- ...typeof c.indent == "string" ? { indent: c.indent } : {},
1997
- join: c.indent !== !1 ? ` \\
1998
- ${c.indent}` : " "
1996
+ ...typeof l.indent == "string" ? { indent: l.indent } : {},
1997
+ join: l.indent !== !1 ? ` \\
1998
+ ${l.indent}` : " "
1999
1999
  });
2000
- return c.verbose ? r(`wget ${c.short ? "-v" : "--verbose"}`) : r(`wget ${c.short ? "-q" : "--quiet"}`), r(`--method ${ce(e)}`), Object.keys(t).forEach((i) => {
2001
- const l = `${i}: ${t[i]}`;
2002
- r(`--header ${ce(l)}`);
2003
- }), n.text && r(`--body-data ${Ri(ce(n.text))}`), r(c.short ? "-O" : "--output-document"), r(`- ${ce(o)}`), a();
2000
+ return l.verbose ? r(`wget ${l.short ? "-v" : "--verbose"}`) : r(`wget ${l.short ? "-q" : "--quiet"}`), r(`--method ${ce(e)}`), Object.keys(t).forEach((i) => {
2001
+ const c = `${i}: ${t[i]}`;
2002
+ r(`--header ${ce(c)}`);
2003
+ }), n.text && r(`--body-data ${Ri(ce(n.text))}`), r(l.short ? "-O" : "--output-document"), r(`- ${ce(o)}`), a();
2004
2004
  }
2005
2005
  }, Ii = {
2006
2006
  info: {
@@ -2015,18 +2015,18 @@ ${c.indent}` : " "
2015
2015
  wget: Ai
2016
2016
  }
2017
2017
  }, en = (e, n) => n.repeat(e), tn = (e, n, t, o) => {
2018
- const s = en(o, t), c = en(o - 1, t), r = n ? `,
2018
+ const s = en(o, t), l = en(o - 1, t), r = n ? `,
2019
2019
  ${s}` : ", ";
2020
2020
  return n ? `[
2021
2021
  ${s}${e.join(r)}
2022
- ${c}]` : `[${e.join(r)}]`;
2022
+ ${l}]` : `[${e.join(r)}]`;
2023
2023
  }, rn = (e, n, t) => `let ${e} = ${rt(n, t)}`, rt = (e, n, t) => {
2024
2024
  switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
2025
2025
  case "[object Number]":
2026
2026
  return e;
2027
2027
  case "[object Array]": {
2028
2028
  let o = !1;
2029
- const s = e.map((c) => (Object.prototype.toString.call(c) === "[object Object]" && (o = Object.keys(c).length > 1), rt(c, n, t)));
2029
+ const s = e.map((l) => (Object.prototype.toString.call(l) === "[object Object]" && (o = Object.keys(l).length > 1), rt(l, n, t)));
2030
2030
  return tn(s, o, n.indent, t);
2031
2031
  }
2032
2032
  case "[object Object]": {
@@ -2055,20 +2055,20 @@ ${c}]` : `[${e.join(r)}]`;
2055
2055
  description: "Foundation's URLSession request",
2056
2056
  extname: ".swift"
2057
2057
  },
2058
- convert: ({ allHeaders: e, postData: n, uriObj: t, queryObj: o, method: s }, c) => {
2059
- var p;
2058
+ convert: ({ allHeaders: e, postData: n, uriObj: t, queryObj: o, method: s }, l) => {
2059
+ var d;
2060
2060
  const r = {
2061
2061
  indent: " ",
2062
2062
  pretty: !0,
2063
2063
  timeout: 10,
2064
- ...c
2065
- }, { push: a, blank: i, join: l } = new V({ indent: r.indent });
2064
+ ...l
2065
+ }, { push: a, blank: i, join: c } = new V({ indent: r.indent });
2066
2066
  a("import Foundation"), i();
2067
- const h = n.text || n.jsonObj || n.params;
2068
- if (h)
2067
+ const u = n.text || n.jsonObj || n.params;
2068
+ if (u)
2069
2069
  switch (n.mimeType) {
2070
2070
  case "application/x-www-form-urlencoded":
2071
- if ((p = n.params) != null && p.length) {
2071
+ if ((d = n.params) != null && d.length) {
2072
2072
  const y = n.params.map((x) => `"${x.name}": "${x.value}"`);
2073
2073
  r.pretty ? (a("let parameters = ["), y.forEach((x) => a(`${x},`, 1)), a("]")) : a(`let parameters = [${y.join(", ")}]`), a('let joinedParameters = parameters.map { "\\($0.key)=\\($0.value)" }.joined(separator: "&")'), a("let postData = Data(joinedParameters.utf8)"), i();
2074
2074
  }
@@ -2083,20 +2083,20 @@ ${c}]` : `[${e.join(r)}]`;
2083
2083
  a(`let postData = Data("${n.text}".utf8)`), i();
2084
2084
  }
2085
2085
  a(`let url = URL(string: "${t.href}")!`);
2086
- const f = o ? Object.entries(o) : [];
2087
- return f.length < 1 ? a("var request = URLRequest(url: url)") : (a("var components = URLComponents(url: url, resolvingAgainstBaseURL: true)!"), a("let queryItems: [URLQueryItem] = ["), f.forEach((y) => {
2086
+ const p = o ? Object.entries(o) : [];
2087
+ return p.length < 1 ? a("var request = URLRequest(url: url)") : (a("var components = URLComponents(url: url, resolvingAgainstBaseURL: true)!"), a("let queryItems: [URLQueryItem] = ["), p.forEach((y) => {
2088
2088
  const x = y[0], $ = y[1];
2089
2089
  switch (Object.prototype.toString.call($)) {
2090
2090
  case "[object String]":
2091
2091
  a(`URLQueryItem(name: "${x}", value: "${$}"),`, 1);
2092
2092
  break;
2093
2093
  case "[object Array]":
2094
- $.forEach((d) => {
2095
- a(`URLQueryItem(name: "${x}", value: "${d}"),`, 1);
2094
+ $.forEach((h) => {
2095
+ a(`URLQueryItem(name: "${x}", value: "${h}"),`, 1);
2096
2096
  });
2097
2097
  break;
2098
2098
  }
2099
- }), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${s}"`), a(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${rt(e, r)}`), h && a("request.httpBody = postData"), i(), a("let (data, _) = try await URLSession.shared.data(for: request)"), a("print(String(decoding: data, as: UTF8.self))"), l();
2099
+ }), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${s}"`), a(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${rt(e, r)}`), u && a("request.httpBody = postData"), i(), a("let (data, _) = try await URLSession.shared.data(for: request)"), a("print(String(decoding: data, as: UTF8.self))"), c();
2100
2100
  }
2101
2101
  }, Ui = {
2102
2102
  info: {
@@ -2133,13 +2133,13 @@ var _i = _e.exports, nn;
2133
2133
  function Bi() {
2134
2134
  return nn || (nn = 1, function(e, n) {
2135
2135
  (function(t) {
2136
- var o = n && !n.nodeType && n, s = !e.nodeType && e, c = typeof et == "object" && et;
2137
- (c.global === c || c.window === c || c.self === c) && (t = c);
2138
- var r, a = 2147483647, i = 36, l = 1, h = 26, f = 38, p = 700, y = 72, x = 128, $ = "-", d = /^xn--/, m = /[^\x20-\x7E]/, v = /[\x2E\u3002\uFF0E\uFF61]/g, S = {
2136
+ var o = n && !n.nodeType && n, s = !e.nodeType && e, l = typeof et == "object" && et;
2137
+ (l.global === l || l.window === l || l.self === l) && (t = l);
2138
+ var r, a = 2147483647, i = 36, c = 1, u = 26, p = 38, d = 700, y = 72, x = 128, $ = "-", h = /^xn--/, m = /[^\x20-\x7E]/, v = /[\x2E\u3002\uFF0E\uFF61]/g, S = {
2139
2139
  overflow: "Overflow: input needs wider integers to process",
2140
2140
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
2141
2141
  "invalid-input": "Invalid input"
2142
- }, T = i - l, u = Math.floor, O = String.fromCharCode, b;
2142
+ }, T = i - c, f = Math.floor, O = String.fromCharCode, b;
2143
2143
  function q(R) {
2144
2144
  throw new RangeError(S[R]);
2145
2145
  }
@@ -2173,18 +2173,18 @@ function Bi() {
2173
2173
  }
2174
2174
  function D(R, N, U) {
2175
2175
  var P = 0;
2176
- for (R = U ? u(R / p) : R >> 1, R += u(R / N); R > T * h >> 1; P += i)
2177
- R = u(R / T);
2178
- return u(P + (T + 1) * R / (R + f));
2176
+ for (R = U ? f(R / d) : R >> 1, R += f(R / N); R > T * u >> 1; P += i)
2177
+ R = f(R / T);
2178
+ return f(P + (T + 1) * R / (R + p));
2179
2179
  }
2180
2180
  function se(R) {
2181
2181
  var N = [], U = R.length, P, L = 0, W = x, z = y, K, ne, J, I, F, _, Q, G, Y;
2182
2182
  for (K = R.lastIndexOf($), K < 0 && (K = 0), ne = 0; ne < K; ++ne)
2183
2183
  R.charCodeAt(ne) >= 128 && q("not-basic"), N.push(R.charCodeAt(ne));
2184
2184
  for (J = K > 0 ? K + 1 : 0; J < U; ) {
2185
- for (I = L, F = 1, _ = i; J >= U && q("invalid-input"), Q = ae(R.charCodeAt(J++)), (Q >= i || Q > u((a - L) / F)) && q("overflow"), L += Q * F, G = _ <= z ? l : _ >= z + h ? h : _ - z, !(Q < G); _ += i)
2186
- Y = i - G, F > u(a / Y) && q("overflow"), F *= Y;
2187
- P = N.length + 1, z = D(L - I, P, I == 0), u(L / P) > a - W && q("overflow"), W += u(L / P), L %= P, N.splice(L++, 0, W);
2185
+ for (I = L, F = 1, _ = i; J >= U && q("invalid-input"), Q = ae(R.charCodeAt(J++)), (Q >= i || Q > f((a - L) / F)) && q("overflow"), L += Q * F, G = _ <= z ? c : _ >= z + u ? u : _ - z, !(Q < G); _ += i)
2186
+ Y = i - G, F > f(a / Y) && q("overflow"), F *= Y;
2187
+ P = N.length + 1, z = D(L - I, P, I == 0), f(L / P) > a - W && q("overflow"), W += f(L / P), L %= P, N.splice(L++, 0, W);
2188
2188
  }
2189
2189
  return C(N);
2190
2190
  }
@@ -2195,12 +2195,12 @@ function Bi() {
2195
2195
  for (P = L = _.length, L && _.push($); P < Q; ) {
2196
2196
  for (K = a, z = 0; z < Q; ++z)
2197
2197
  F = R[z], F >= N && F < K && (K = F);
2198
- for (G = P + 1, K - N > u((a - U) / G) && q("overflow"), U += (K - N) * G, N = K, z = 0; z < Q; ++z)
2198
+ for (G = P + 1, K - N > f((a - U) / G) && q("overflow"), U += (K - N) * G, N = K, z = 0; z < Q; ++z)
2199
2199
  if (F = R[z], F < N && ++U > a && q("overflow"), F == N) {
2200
- for (ne = U, J = i; I = J <= W ? l : J >= W + h ? h : J - W, !(ne < I); J += i)
2200
+ for (ne = U, J = i; I = J <= W ? c : J >= W + u ? u : J - W, !(ne < I); J += i)
2201
2201
  oe = ne - I, Y = i - I, _.push(
2202
2202
  O(H(I + oe % Y, 0))
2203
- ), ne = u(oe / Y);
2203
+ ), ne = f(oe / Y);
2204
2204
  _.push(O(H(ne, 0))), W = D(U, G, P == L), U = 0, ++P;
2205
2205
  }
2206
2206
  ++U, ++N;
@@ -2209,7 +2209,7 @@ function Bi() {
2209
2209
  }
2210
2210
  function k(R) {
2211
2211
  return E(R, function(N) {
2212
- return d.test(N) ? se(N.slice(4).toLowerCase()) : N;
2212
+ return h.test(N) ? se(N.slice(4).toLowerCase()) : N;
2213
2213
  });
2214
2214
  }
2215
2215
  function re(R) {
@@ -2363,7 +2363,7 @@ function ts() {
2363
2363
  return !1;
2364
2364
  var s = 42;
2365
2365
  n[t] = s;
2366
- for (var c in n)
2366
+ for (var l in n)
2367
2367
  return !1;
2368
2368
  if (typeof Object.keys == "function" && Object.keys(n).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(n).length !== 0)
2369
2369
  return !1;
@@ -2405,45 +2405,45 @@ var zt, Pn;
2405
2405
  function ns() {
2406
2406
  if (Pn) return zt;
2407
2407
  Pn = 1;
2408
- var e = "Function.prototype.bind called on incompatible ", n = Object.prototype.toString, t = Math.max, o = "[object Function]", s = function(i, l) {
2409
- for (var h = [], f = 0; f < i.length; f += 1)
2410
- h[f] = i[f];
2411
- for (var p = 0; p < l.length; p += 1)
2412
- h[p + i.length] = l[p];
2413
- return h;
2414
- }, c = function(i, l) {
2415
- for (var h = [], f = l, p = 0; f < i.length; f += 1, p += 1)
2416
- h[p] = i[f];
2417
- return h;
2408
+ var e = "Function.prototype.bind called on incompatible ", n = Object.prototype.toString, t = Math.max, o = "[object Function]", s = function(i, c) {
2409
+ for (var u = [], p = 0; p < i.length; p += 1)
2410
+ u[p] = i[p];
2411
+ for (var d = 0; d < c.length; d += 1)
2412
+ u[d + i.length] = c[d];
2413
+ return u;
2414
+ }, l = function(i, c) {
2415
+ for (var u = [], p = c, d = 0; p < i.length; p += 1, d += 1)
2416
+ u[d] = i[p];
2417
+ return u;
2418
2418
  }, r = function(a, i) {
2419
- for (var l = "", h = 0; h < a.length; h += 1)
2420
- l += a[h], h + 1 < a.length && (l += i);
2421
- return l;
2419
+ for (var c = "", u = 0; u < a.length; u += 1)
2420
+ c += a[u], u + 1 < a.length && (c += i);
2421
+ return c;
2422
2422
  };
2423
2423
  return zt = function(i) {
2424
- var l = this;
2425
- if (typeof l != "function" || n.apply(l) !== o)
2426
- throw new TypeError(e + l);
2427
- for (var h = c(arguments, 1), f, p = function() {
2428
- if (this instanceof f) {
2429
- var m = l.apply(
2424
+ var c = this;
2425
+ if (typeof c != "function" || n.apply(c) !== o)
2426
+ throw new TypeError(e + c);
2427
+ for (var u = l(arguments, 1), p, d = function() {
2428
+ if (this instanceof p) {
2429
+ var m = c.apply(
2430
2430
  this,
2431
- s(h, arguments)
2431
+ s(u, arguments)
2432
2432
  );
2433
2433
  return Object(m) === m ? m : this;
2434
2434
  }
2435
- return l.apply(
2435
+ return c.apply(
2436
2436
  i,
2437
- s(h, arguments)
2437
+ s(u, arguments)
2438
2438
  );
2439
- }, y = t(0, l.length - h.length), x = [], $ = 0; $ < y; $++)
2439
+ }, y = t(0, c.length - u.length), x = [], $ = 0; $ < y; $++)
2440
2440
  x[$] = "$" + $;
2441
- if (f = Function("binder", "return function (" + r(x, ",") + "){ return binder.apply(this,arguments); }")(p), l.prototype) {
2442
- var d = function() {
2441
+ if (p = Function("binder", "return function (" + r(x, ",") + "){ return binder.apply(this,arguments); }")(d), c.prototype) {
2442
+ var h = function() {
2443
2443
  };
2444
- d.prototype = l.prototype, f.prototype = new d(), d.prototype = null;
2444
+ h.prototype = c.prototype, p.prototype = new h(), h.prototype = null;
2445
2445
  }
2446
- return f;
2446
+ return p;
2447
2447
  }, zt;
2448
2448
  }
2449
2449
  var Gt, Rn;
@@ -2477,10 +2477,10 @@ function ho() {
2477
2477
  if (An) return Qt;
2478
2478
  An = 1;
2479
2479
  var e = Je(), n = /* @__PURE__ */ We(), t = Sr(), o = po();
2480
- return Qt = function(c) {
2481
- if (c.length < 1 || typeof c[0] != "function")
2480
+ return Qt = function(l) {
2481
+ if (l.length < 1 || typeof l[0] != "function")
2482
2482
  throw new n("a function is required");
2483
- return o(e, t, c);
2483
+ return o(e, t, l);
2484
2484
  }, Qt;
2485
2485
  }
2486
2486
  var Kt, In;
@@ -2499,11 +2499,11 @@ function as() {
2499
2499
  Object.prototype,
2500
2500
  /** @type {keyof typeof Object.prototype} */
2501
2501
  "__proto__"
2502
- ), s = Object, c = s.getPrototypeOf;
2503
- return Kt = o && typeof o.get == "function" ? e([o.get]) : typeof c == "function" ? (
2502
+ ), s = Object, l = s.getPrototypeOf;
2503
+ return Kt = o && typeof o.get == "function" ? e([o.get]) : typeof l == "function" ? (
2504
2504
  /** @type {import('./get')} */
2505
2505
  function(a) {
2506
- return c(a == null ? a : s(a));
2506
+ return l(a == null ? a : s(a));
2507
2507
  }
2508
2508
  ) : !1, Kt;
2509
2509
  }
@@ -2533,14 +2533,14 @@ var Zt, Fn;
2533
2533
  function Tr() {
2534
2534
  if (Fn) return Zt;
2535
2535
  Fn = 1;
2536
- var e, n = /* @__PURE__ */ lo(), t = /* @__PURE__ */ Hi(), o = /* @__PURE__ */ Mi(), s = /* @__PURE__ */ zi(), c = /* @__PURE__ */ Gi(), r = /* @__PURE__ */ co(), a = /* @__PURE__ */ We(), i = /* @__PURE__ */ Wi(), l = /* @__PURE__ */ Ji(), h = /* @__PURE__ */ Vi(), f = /* @__PURE__ */ Di(), p = /* @__PURE__ */ Qi(), y = /* @__PURE__ */ Ki(), x = /* @__PURE__ */ Yi(), $ = /* @__PURE__ */ Zi(), d = Function, m = function(J) {
2536
+ var e, n = /* @__PURE__ */ lo(), t = /* @__PURE__ */ Hi(), o = /* @__PURE__ */ Mi(), s = /* @__PURE__ */ zi(), l = /* @__PURE__ */ Gi(), r = /* @__PURE__ */ co(), a = /* @__PURE__ */ We(), i = /* @__PURE__ */ Wi(), c = /* @__PURE__ */ Ji(), u = /* @__PURE__ */ Vi(), p = /* @__PURE__ */ Di(), d = /* @__PURE__ */ Qi(), y = /* @__PURE__ */ Ki(), x = /* @__PURE__ */ Yi(), $ = /* @__PURE__ */ Zi(), h = Function, m = function(J) {
2537
2537
  try {
2538
- return d('"use strict"; return (' + J + ").constructor;")();
2538
+ return h('"use strict"; return (' + J + ").constructor;")();
2539
2539
  } catch {
2540
2540
  }
2541
2541
  }, v = /* @__PURE__ */ at(), S = /* @__PURE__ */ it(), T = function() {
2542
2542
  throw new a();
2543
- }, u = v ? function() {
2543
+ }, f = v ? function() {
2544
2544
  try {
2545
2545
  return arguments.callee, T;
2546
2546
  } catch {
@@ -2579,7 +2579,7 @@ function Tr() {
2579
2579
  "%Float32Array%": typeof Float32Array > "u" ? e : Float32Array,
2580
2580
  "%Float64Array%": typeof Float64Array > "u" ? e : Float64Array,
2581
2581
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? e : FinalizationRegistry,
2582
- "%Function%": d,
2582
+ "%Function%": h,
2583
2583
  "%GeneratorFunction%": C,
2584
2584
  "%Int8Array%": typeof Int8Array > "u" ? e : Int8Array,
2585
2585
  "%Int16Array%": typeof Int16Array > "u" ? e : Int16Array,
@@ -2599,7 +2599,7 @@ function Tr() {
2599
2599
  "%Promise%": typeof Promise > "u" ? e : Promise,
2600
2600
  "%Proxy%": typeof Proxy > "u" ? e : Proxy,
2601
2601
  "%RangeError%": s,
2602
- "%ReferenceError%": c,
2602
+ "%ReferenceError%": l,
2603
2603
  "%Reflect%": typeof Reflect > "u" ? e : Reflect,
2604
2604
  "%RegExp%": RegExp,
2605
2605
  "%Set%": typeof Set > "u" ? e : Set,
@@ -2609,7 +2609,7 @@ function Tr() {
2609
2609
  "%StringIteratorPrototype%": O && b ? b(""[Symbol.iterator]()) : e,
2610
2610
  "%Symbol%": O ? Symbol : e,
2611
2611
  "%SyntaxError%": r,
2612
- "%ThrowTypeError%": u,
2612
+ "%ThrowTypeError%": f,
2613
2613
  "%TypedArray%": ae,
2614
2614
  "%TypeError%": a,
2615
2615
  "%Uint8Array%": typeof Uint8Array > "u" ? e : Uint8Array,
@@ -2624,10 +2624,10 @@ function Tr() {
2624
2624
  "%Function.prototype.apply%": E,
2625
2625
  "%Object.defineProperty%": S,
2626
2626
  "%Object.getPrototypeOf%": q,
2627
- "%Math.abs%": l,
2628
- "%Math.floor%": h,
2629
- "%Math.max%": f,
2630
- "%Math.min%": p,
2627
+ "%Math.abs%": c,
2628
+ "%Math.floor%": u,
2629
+ "%Math.max%": p,
2630
+ "%Math.min%": d,
2631
2631
  "%Math.pow%": y,
2632
2632
  "%Math.round%": x,
2633
2633
  "%Math.sign%": $,
@@ -2770,8 +2770,8 @@ function ls() {
2770
2770
  if (_n) return tr;
2771
2771
  _n = 1;
2772
2772
  var e = /* @__PURE__ */ it(), n = /* @__PURE__ */ co(), t = /* @__PURE__ */ We(), o = /* @__PURE__ */ at();
2773
- return tr = function(c, r, a) {
2774
- if (!c || typeof c != "object" && typeof c != "function")
2773
+ return tr = function(l, r, a) {
2774
+ if (!l || typeof l != "object" && typeof l != "function")
2775
2775
  throw new t("`obj` must be an object or a function`");
2776
2776
  if (typeof r != "string" && typeof r != "symbol")
2777
2777
  throw new t("`property` must be a string or a symbol`");
@@ -2783,16 +2783,16 @@ function ls() {
2783
2783
  throw new t("`nonConfigurable`, if provided, must be a boolean or null");
2784
2784
  if (arguments.length > 6 && typeof arguments[6] != "boolean")
2785
2785
  throw new t("`loose`, if provided, must be a boolean");
2786
- var i = arguments.length > 3 ? arguments[3] : null, l = arguments.length > 4 ? arguments[4] : null, h = arguments.length > 5 ? arguments[5] : null, f = arguments.length > 6 ? arguments[6] : !1, p = !!o && o(c, r);
2786
+ var i = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null, u = arguments.length > 5 ? arguments[5] : null, p = arguments.length > 6 ? arguments[6] : !1, d = !!o && o(l, r);
2787
2787
  if (e)
2788
- e(c, r, {
2789
- configurable: h === null && p ? p.configurable : !h,
2790
- enumerable: i === null && p ? p.enumerable : !i,
2788
+ e(l, r, {
2789
+ configurable: u === null && d ? d.configurable : !u,
2790
+ enumerable: i === null && d ? d.enumerable : !i,
2791
2791
  value: a,
2792
- writable: l === null && p ? p.writable : !l
2792
+ writable: c === null && d ? d.writable : !c
2793
2793
  });
2794
- else if (f || !i && !l && !h)
2795
- c[r] = a;
2794
+ else if (p || !i && !c && !u)
2795
+ l[r] = a;
2796
2796
  else
2797
2797
  throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
2798
2798
  }, tr;
@@ -2818,18 +2818,18 @@ var nr, Hn;
2818
2818
  function us() {
2819
2819
  if (Hn) return nr;
2820
2820
  Hn = 1;
2821
- var e = /* @__PURE__ */ Tr(), n = /* @__PURE__ */ ls(), t = /* @__PURE__ */ cs()(), o = /* @__PURE__ */ at(), s = /* @__PURE__ */ We(), c = e("%Math.floor%");
2821
+ var e = /* @__PURE__ */ Tr(), n = /* @__PURE__ */ ls(), t = /* @__PURE__ */ cs()(), o = /* @__PURE__ */ at(), s = /* @__PURE__ */ We(), l = e("%Math.floor%");
2822
2822
  return nr = function(a, i) {
2823
2823
  if (typeof a != "function")
2824
2824
  throw new s("`fn` is not a function");
2825
- if (typeof i != "number" || i < 0 || i > 4294967295 || c(i) !== i)
2825
+ if (typeof i != "number" || i < 0 || i > 4294967295 || l(i) !== i)
2826
2826
  throw new s("`length` must be a positive 32-bit integer");
2827
- var l = arguments.length > 2 && !!arguments[2], h = !0, f = !0;
2827
+ var c = arguments.length > 2 && !!arguments[2], u = !0, p = !0;
2828
2828
  if ("length" in a && o) {
2829
- var p = o(a, "length");
2830
- p && !p.configurable && (h = !1), p && !p.writable && (f = !1);
2829
+ var d = o(a, "length");
2830
+ d && !d.configurable && (u = !1), d && !d.writable && (p = !1);
2831
2831
  }
2832
- return (h || f || !l) && (t ? n(
2832
+ return (u || p || !c) && (t ? n(
2833
2833
  /** @type {Parameters<define>[0]} */
2834
2834
  a,
2835
2835
  "length",
@@ -2872,8 +2872,8 @@ function ds() {
2872
2872
  if (Gn) return ar;
2873
2873
  Gn = 1;
2874
2874
  var e = /* @__PURE__ */ Tr(), n = ps(), t = n(e("String.prototype.indexOf"));
2875
- return ar = function(s, c) {
2876
- var r = e(s, !!c);
2875
+ return ar = function(s, l) {
2876
+ var r = e(s, !!l);
2877
2877
  return typeof r == "function" && t(s, ".prototype.") > -1 ? n(r) : r;
2878
2878
  }, ar;
2879
2879
  }
@@ -2882,7 +2882,7 @@ var ir, Wn;
2882
2882
  function ys() {
2883
2883
  if (Wn) return ir;
2884
2884
  Wn = 1;
2885
- var e = typeof Map == "function" && Map.prototype, n = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && n && typeof n.get == "function" ? n.get : null, o = e && Map.prototype.forEach, s = typeof Set == "function" && Set.prototype, c = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, r = s && c && typeof c.get == "function" ? c.get : null, a = s && Set.prototype.forEach, i = typeof WeakMap == "function" && WeakMap.prototype, l = i ? WeakMap.prototype.has : null, h = typeof WeakSet == "function" && WeakSet.prototype, f = h ? WeakSet.prototype.has : null, p = typeof WeakRef == "function" && WeakRef.prototype, y = p ? WeakRef.prototype.deref : null, x = Boolean.prototype.valueOf, $ = Object.prototype.toString, d = Function.prototype.toString, m = String.prototype.match, v = String.prototype.slice, S = String.prototype.replace, T = String.prototype.toUpperCase, u = String.prototype.toLowerCase, O = RegExp.prototype.test, b = Array.prototype.concat, q = Array.prototype.join, A = Array.prototype.slice, E = Math.floor, B = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, C = Object.getOwnPropertySymbols, ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, H = typeof Symbol == "function" && typeof Symbol.iterator == "object", D = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === H || !0) ? Symbol.toStringTag : null, se = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(j) {
2885
+ var e = typeof Map == "function" && Map.prototype, n = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && n && typeof n.get == "function" ? n.get : null, o = e && Map.prototype.forEach, s = typeof Set == "function" && Set.prototype, l = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, r = s && l && typeof l.get == "function" ? l.get : null, a = s && Set.prototype.forEach, i = typeof WeakMap == "function" && WeakMap.prototype, c = i ? WeakMap.prototype.has : null, u = typeof WeakSet == "function" && WeakSet.prototype, p = u ? WeakSet.prototype.has : null, d = typeof WeakRef == "function" && WeakRef.prototype, y = d ? WeakRef.prototype.deref : null, x = Boolean.prototype.valueOf, $ = Object.prototype.toString, h = Function.prototype.toString, m = String.prototype.match, v = String.prototype.slice, S = String.prototype.replace, T = String.prototype.toUpperCase, f = String.prototype.toLowerCase, O = RegExp.prototype.test, b = Array.prototype.concat, q = Array.prototype.join, A = Array.prototype.slice, E = Math.floor, B = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, C = Object.getOwnPropertySymbols, ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, H = typeof Symbol == "function" && typeof Symbol.iterator == "object", D = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === H || !0) ? Symbol.toStringTag : null, se = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(j) {
2886
2886
  return j.__proto__;
2887
2887
  } : null);
2888
2888
  function k(j, w) {
@@ -2957,9 +2957,9 @@ function ys() {
2957
2957
  return typeof w == "object" && !H ? Ue(Er) : Er;
2958
2958
  }
2959
2959
  if (Ee(w)) {
2960
- for (var Fe = "<" + u.call(String(w.nodeName)), ut = w.attributes || [], De = 0; De < ut.length; De++)
2960
+ for (var Fe = "<" + f.call(String(w.nodeName)), ut = w.attributes || [], De = 0; De < ut.length; De++)
2961
2961
  Fe += " " + ut[De].name + "=" + U(P(ut[De].value), "double", M);
2962
- return Fe += ">", w.childNodes && w.childNodes.length && (Fe += "..."), Fe += "</" + u.call(String(w.nodeName)) + ">", Fe;
2962
+ return Fe += ">", w.childNodes && w.childNodes.length && (Fe += "..."), Fe += "</" + f.call(String(w.nodeName)) + ">", Fe;
2963
2963
  }
2964
2964
  if (L(w)) {
2965
2965
  if (w.length === 0)
@@ -3075,7 +3075,7 @@ function ys() {
3075
3075
  function oe(j) {
3076
3076
  if (j.name)
3077
3077
  return j.name;
3078
- var w = m.call(d.call(j), /^function\s*([\w$]+)/);
3078
+ var w = m.call(h.call(j), /^function\s*([\w$]+)/);
3079
3079
  return w ? w[1] : null;
3080
3080
  }
3081
3081
  function he(j, w) {
@@ -3102,12 +3102,12 @@ function ys() {
3102
3102
  return !1;
3103
3103
  }
3104
3104
  function Ne(j) {
3105
- if (!l || !j || typeof j != "object")
3105
+ if (!c || !j || typeof j != "object")
3106
3106
  return !1;
3107
3107
  try {
3108
- l.call(j, l);
3108
+ c.call(j, c);
3109
3109
  try {
3110
- f.call(j, f);
3110
+ p.call(j, p);
3111
3111
  } catch {
3112
3112
  return !0;
3113
3113
  }
@@ -3141,12 +3141,12 @@ function ys() {
3141
3141
  return !1;
3142
3142
  }
3143
3143
  function ke(j) {
3144
- if (!f || !j || typeof j != "object")
3144
+ if (!p || !j || typeof j != "object")
3145
3145
  return !1;
3146
3146
  try {
3147
- f.call(j, f);
3147
+ p.call(j, p);
3148
3148
  try {
3149
- l.call(j, l);
3149
+ c.call(j, c);
3150
3150
  } catch {
3151
3151
  return !0;
3152
3152
  }
@@ -3240,55 +3240,55 @@ var sr, Jn;
3240
3240
  function ms() {
3241
3241
  if (Jn) return sr;
3242
3242
  Jn = 1;
3243
- var e = /* @__PURE__ */ Tr(), n = ds(), t = /* @__PURE__ */ ys(), o = /* @__PURE__ */ We(), s = e("%WeakMap%", !0), c = e("%Map%", !0), r = n("WeakMap.prototype.get", !0), a = n("WeakMap.prototype.set", !0), i = n("WeakMap.prototype.has", !0), l = n("Map.prototype.get", !0), h = n("Map.prototype.set", !0), f = n("Map.prototype.has", !0), p = function(d, m) {
3244
- for (var v = d, S; (S = v.next) !== null; v = S)
3243
+ var e = /* @__PURE__ */ Tr(), n = ds(), t = /* @__PURE__ */ ys(), o = /* @__PURE__ */ We(), s = e("%WeakMap%", !0), l = e("%Map%", !0), r = n("WeakMap.prototype.get", !0), a = n("WeakMap.prototype.set", !0), i = n("WeakMap.prototype.has", !0), c = n("Map.prototype.get", !0), u = n("Map.prototype.set", !0), p = n("Map.prototype.has", !0), d = function(h, m) {
3244
+ for (var v = h, S; (S = v.next) !== null; v = S)
3245
3245
  if (S.key === m)
3246
3246
  return v.next = S.next, S.next = /** @type {NonNullable<typeof list.next>} */
3247
- d.next, d.next = S, S;
3248
- }, y = function(d, m) {
3249
- var v = p(d, m);
3247
+ h.next, h.next = S, S;
3248
+ }, y = function(h, m) {
3249
+ var v = d(h, m);
3250
3250
  return v && v.value;
3251
- }, x = function(d, m, v) {
3252
- var S = p(d, m);
3253
- S ? S.value = v : d.next = /** @type {import('.').ListNode<typeof value>} */
3251
+ }, x = function(h, m, v) {
3252
+ var S = d(h, m);
3253
+ S ? S.value = v : h.next = /** @type {import('.').ListNode<typeof value>} */
3254
3254
  {
3255
3255
  // eslint-disable-line no-param-reassign, no-extra-parens
3256
3256
  key: m,
3257
- next: d.next,
3257
+ next: h.next,
3258
3258
  value: v
3259
3259
  };
3260
- }, $ = function(d, m) {
3261
- return !!p(d, m);
3260
+ }, $ = function(h, m) {
3261
+ return !!d(h, m);
3262
3262
  };
3263
3263
  return sr = function() {
3264
3264
  var m, v, S, T = {
3265
- assert: function(u) {
3266
- if (!T.has(u))
3267
- throw new o("Side channel does not contain " + t(u));
3265
+ assert: function(f) {
3266
+ if (!T.has(f))
3267
+ throw new o("Side channel does not contain " + t(f));
3268
3268
  },
3269
- get: function(u) {
3270
- if (s && u && (typeof u == "object" || typeof u == "function")) {
3269
+ get: function(f) {
3270
+ if (s && f && (typeof f == "object" || typeof f == "function")) {
3271
3271
  if (m)
3272
- return r(m, u);
3273
- } else if (c) {
3272
+ return r(m, f);
3273
+ } else if (l) {
3274
3274
  if (v)
3275
- return l(v, u);
3275
+ return c(v, f);
3276
3276
  } else if (S)
3277
- return y(S, u);
3277
+ return y(S, f);
3278
3278
  },
3279
- has: function(u) {
3280
- if (s && u && (typeof u == "object" || typeof u == "function")) {
3279
+ has: function(f) {
3280
+ if (s && f && (typeof f == "object" || typeof f == "function")) {
3281
3281
  if (m)
3282
- return i(m, u);
3283
- } else if (c) {
3282
+ return i(m, f);
3283
+ } else if (l) {
3284
3284
  if (v)
3285
- return f(v, u);
3285
+ return p(v, f);
3286
3286
  } else if (S)
3287
- return $(S, u);
3287
+ return $(S, f);
3288
3288
  return !1;
3289
3289
  },
3290
- set: function(u, O) {
3291
- s && u && (typeof u == "object" || typeof u == "function") ? (m || (m = new s()), a(m, u, O)) : c ? (v || (v = new c()), h(v, u, O)) : (S || (S = { key: {}, next: null }), x(S, u, O));
3290
+ set: function(f, O) {
3291
+ s && f && (typeof f == "object" || typeof f == "function") ? (m || (m = new s()), a(m, f, O)) : l ? (v || (v = new l()), u(v, f, O)) : (S || (S = { key: {}, next: null }), x(S, f, O));
3292
3292
  }
3293
3293
  };
3294
3294
  return T;
@@ -3321,23 +3321,23 @@ function yo() {
3321
3321
  if (Dn) return cr;
3322
3322
  Dn = 1;
3323
3323
  var e = /* @__PURE__ */ Cr(), n = Object.prototype.hasOwnProperty, t = Array.isArray, o = function() {
3324
- for (var d = [], m = 0; m < 256; ++m)
3325
- d.push("%" + ((m < 16 ? "0" : "") + m.toString(16)).toUpperCase());
3326
- return d;
3324
+ for (var h = [], m = 0; m < 256; ++m)
3325
+ h.push("%" + ((m < 16 ? "0" : "") + m.toString(16)).toUpperCase());
3326
+ return h;
3327
3327
  }(), s = function(m) {
3328
3328
  for (; m.length > 1; ) {
3329
3329
  var v = m.pop(), S = v.obj[v.prop];
3330
3330
  if (t(S)) {
3331
- for (var T = [], u = 0; u < S.length; ++u)
3332
- typeof S[u] < "u" && T.push(S[u]);
3331
+ for (var T = [], f = 0; f < S.length; ++f)
3332
+ typeof S[f] < "u" && T.push(S[f]);
3333
3333
  v.obj[v.prop] = T;
3334
3334
  }
3335
3335
  }
3336
- }, c = function(m, v) {
3336
+ }, l = function(m, v) {
3337
3337
  for (var S = v && v.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, T = 0; T < m.length; ++T)
3338
3338
  typeof m[T] < "u" && (S[T] = m[T]);
3339
3339
  return S;
3340
- }, r = function d(m, v, S) {
3340
+ }, r = function h(m, v, S) {
3341
3341
  if (!v)
3342
3342
  return m;
3343
3343
  if (typeof v != "object") {
@@ -3352,22 +3352,22 @@ function yo() {
3352
3352
  if (!m || typeof m != "object")
3353
3353
  return [m].concat(v);
3354
3354
  var T = m;
3355
- return t(m) && !t(v) && (T = c(m, S)), t(m) && t(v) ? (v.forEach(function(u, O) {
3355
+ return t(m) && !t(v) && (T = l(m, S)), t(m) && t(v) ? (v.forEach(function(f, O) {
3356
3356
  if (n.call(m, O)) {
3357
3357
  var b = m[O];
3358
- b && typeof b == "object" && u && typeof u == "object" ? m[O] = d(b, u, S) : m.push(u);
3358
+ b && typeof b == "object" && f && typeof f == "object" ? m[O] = h(b, f, S) : m.push(f);
3359
3359
  } else
3360
- m[O] = u;
3361
- }), m) : Object.keys(v).reduce(function(u, O) {
3360
+ m[O] = f;
3361
+ }), m) : Object.keys(v).reduce(function(f, O) {
3362
3362
  var b = v[O];
3363
- return n.call(u, O) ? u[O] = d(u[O], b, S) : u[O] = b, u;
3363
+ return n.call(f, O) ? f[O] = h(f[O], b, S) : f[O] = b, f;
3364
3364
  }, T);
3365
3365
  }, a = function(m, v) {
3366
3366
  return Object.keys(v).reduce(function(S, T) {
3367
3367
  return S[T] = v[T], S;
3368
3368
  }, m);
3369
- }, i = function(d, m, v) {
3370
- var S = d.replace(/\+/g, " ");
3369
+ }, i = function(h, m, v) {
3370
+ var S = h.replace(/\+/g, " ");
3371
3371
  if (v === "iso-8859-1")
3372
3372
  return S.replace(/%[0-9a-f]{2}/gi, unescape);
3373
3373
  try {
@@ -3375,7 +3375,7 @@ function yo() {
3375
3375
  } catch {
3376
3376
  return S;
3377
3377
  }
3378
- }, l = 1024, h = function(m, v, S, T, u) {
3378
+ }, c = 1024, u = function(m, v, S, T, f) {
3379
3379
  if (m.length === 0)
3380
3380
  return m;
3381
3381
  var O = m;
@@ -3383,10 +3383,10 @@ function yo() {
3383
3383
  return escape(O).replace(/%u[0-9a-f]{4}/gi, function(ae) {
3384
3384
  return "%26%23" + parseInt(ae.slice(2), 16) + "%3B";
3385
3385
  });
3386
- for (var b = "", q = 0; q < O.length; q += l) {
3387
- for (var A = O.length >= l ? O.slice(q, q + l) : O, E = [], B = 0; B < A.length; ++B) {
3386
+ for (var b = "", q = 0; q < O.length; q += c) {
3387
+ for (var A = O.length >= c ? O.slice(q, q + c) : O, E = [], B = 0; B < A.length; ++B) {
3388
3388
  var C = A.charCodeAt(B);
3389
- if (C === 45 || C === 46 || C === 95 || C === 126 || C >= 48 && C <= 57 || C >= 65 && C <= 90 || C >= 97 && C <= 122 || u === e.RFC1738 && (C === 40 || C === 41)) {
3389
+ if (C === 45 || C === 46 || C === 95 || C === 126 || C >= 48 && C <= 57 || C >= 65 && C <= 90 || C >= 97 && C <= 122 || f === e.RFC1738 && (C === 40 || C === 41)) {
3390
3390
  E[E.length] = A.charAt(B);
3391
3391
  continue;
3392
3392
  }
@@ -3407,14 +3407,14 @@ function yo() {
3407
3407
  b += E.join("");
3408
3408
  }
3409
3409
  return b;
3410
- }, f = function(m) {
3410
+ }, p = function(m) {
3411
3411
  for (var v = [{ obj: { o: m }, prop: "o" }], S = [], T = 0; T < v.length; ++T)
3412
- for (var u = v[T], O = u.obj[u.prop], b = Object.keys(O), q = 0; q < b.length; ++q) {
3412
+ for (var f = v[T], O = f.obj[f.prop], b = Object.keys(O), q = 0; q < b.length; ++q) {
3413
3413
  var A = b[q], E = O[A];
3414
3414
  typeof E == "object" && E !== null && S.indexOf(E) === -1 && (v.push({ obj: O, prop: A }), S.push(E));
3415
3415
  }
3416
3416
  return s(v), m;
3417
- }, p = function(m) {
3417
+ }, d = function(m) {
3418
3418
  return Object.prototype.toString.call(m) === "[object RegExp]";
3419
3419
  }, y = function(m) {
3420
3420
  return !m || typeof m != "object" ? !1 : !!(m.constructor && m.constructor.isBuffer && m.constructor.isBuffer(m));
@@ -3429,14 +3429,14 @@ function yo() {
3429
3429
  return v(m);
3430
3430
  };
3431
3431
  return cr = {
3432
- arrayToObject: c,
3432
+ arrayToObject: l,
3433
3433
  assign: a,
3434
3434
  combine: x,
3435
- compact: f,
3435
+ compact: p,
3436
3436
  decode: i,
3437
- encode: h,
3437
+ encode: u,
3438
3438
  isBuffer: y,
3439
- isRegExp: p,
3439
+ isRegExp: d,
3440
3440
  maybeMap: $,
3441
3441
  merge: r
3442
3442
  }, cr;
@@ -3446,19 +3446,19 @@ function gs() {
3446
3446
  if (Qn) return ur;
3447
3447
  Qn = 1;
3448
3448
  var e = ms(), n = /* @__PURE__ */ yo(), t = /* @__PURE__ */ Cr(), o = Object.prototype.hasOwnProperty, s = {
3449
- brackets: function(d) {
3450
- return d + "[]";
3449
+ brackets: function(h) {
3450
+ return h + "[]";
3451
3451
  },
3452
3452
  comma: "comma",
3453
- indices: function(d, m) {
3454
- return d + "[" + m + "]";
3453
+ indices: function(h, m) {
3454
+ return h + "[" + m + "]";
3455
3455
  },
3456
- repeat: function(d) {
3457
- return d;
3456
+ repeat: function(h) {
3457
+ return h;
3458
3458
  }
3459
- }, c = Array.isArray, r = Array.prototype.push, a = function($, d) {
3460
- r.apply($, c(d) ? d : [d]);
3461
- }, i = Date.prototype.toISOString, l = t.default, h = {
3459
+ }, l = Array.isArray, r = Array.prototype.push, a = function($, h) {
3460
+ r.apply($, l(h) ? h : [h]);
3461
+ }, i = Date.prototype.toISOString, c = t.default, u = {
3462
3462
  addQueryPrefix: !1,
3463
3463
  allowDots: !1,
3464
3464
  allowEmptyArrays: !1,
@@ -3470,38 +3470,38 @@ function gs() {
3470
3470
  encodeDotInKeys: !1,
3471
3471
  encoder: n.encode,
3472
3472
  encodeValuesOnly: !1,
3473
- format: l,
3474
- formatter: t.formatters[l],
3473
+ format: c,
3474
+ formatter: t.formatters[c],
3475
3475
  // deprecated
3476
3476
  indices: !1,
3477
- serializeDate: function(d) {
3478
- return i.call(d);
3477
+ serializeDate: function(h) {
3478
+ return i.call(h);
3479
3479
  },
3480
3480
  skipNulls: !1,
3481
3481
  strictNullHandling: !1
3482
- }, f = function(d) {
3483
- return typeof d == "string" || typeof d == "number" || typeof d == "boolean" || typeof d == "symbol" || typeof d == "bigint";
3484
- }, p = {}, y = function $(d, m, v, S, T, u, O, b, q, A, E, B, C, ae, H, D, se, Z) {
3485
- for (var k = d, re = Z, R = 0, N = !1; (re = re.get(p)) !== void 0 && !N; ) {
3486
- var U = re.get(d);
3482
+ }, p = function(h) {
3483
+ return typeof h == "string" || typeof h == "number" || typeof h == "boolean" || typeof h == "symbol" || typeof h == "bigint";
3484
+ }, d = {}, y = function $(h, m, v, S, T, f, O, b, q, A, E, B, C, ae, H, D, se, Z) {
3485
+ for (var k = h, re = Z, R = 0, N = !1; (re = re.get(d)) !== void 0 && !N; ) {
3486
+ var U = re.get(h);
3487
3487
  if (R += 1, typeof U < "u") {
3488
3488
  if (U === R)
3489
3489
  throw new RangeError("Cyclic object value");
3490
3490
  N = !0;
3491
3491
  }
3492
- typeof re.get(p) > "u" && (R = 0);
3492
+ typeof re.get(d) > "u" && (R = 0);
3493
3493
  }
3494
- if (typeof A == "function" ? k = A(m, k) : k instanceof Date ? k = C(k) : v === "comma" && c(k) && (k = n.maybeMap(k, function(Y) {
3494
+ if (typeof A == "function" ? k = A(m, k) : k instanceof Date ? k = C(k) : v === "comma" && l(k) && (k = n.maybeMap(k, function(Y) {
3495
3495
  return Y instanceof Date ? C(Y) : Y;
3496
3496
  })), k === null) {
3497
- if (u)
3498
- return q && !D ? q(m, h.encoder, se, "key", ae) : m;
3497
+ if (f)
3498
+ return q && !D ? q(m, u.encoder, se, "key", ae) : m;
3499
3499
  k = "";
3500
3500
  }
3501
- if (f(k) || n.isBuffer(k)) {
3501
+ if (p(k) || n.isBuffer(k)) {
3502
3502
  if (q) {
3503
- var P = D ? m : q(m, h.encoder, se, "key", ae);
3504
- return [H(P) + "=" + H(q(k, h.encoder, se, "value", ae))];
3503
+ var P = D ? m : q(m, u.encoder, se, "key", ae);
3504
+ return [H(P) + "=" + H(q(k, u.encoder, se, "value", ae))];
3505
3505
  }
3506
3506
  return [H(m) + "=" + H(String(k))];
3507
3507
  }
@@ -3509,33 +3509,33 @@ function gs() {
3509
3509
  if (typeof k > "u")
3510
3510
  return L;
3511
3511
  var W;
3512
- if (v === "comma" && c(k))
3512
+ if (v === "comma" && l(k))
3513
3513
  D && q && (k = n.maybeMap(k, q)), W = [{ value: k.length > 0 ? k.join(",") || null : void 0 }];
3514
- else if (c(A))
3514
+ else if (l(A))
3515
3515
  W = A;
3516
3516
  else {
3517
3517
  var z = Object.keys(k);
3518
3518
  W = E ? z.sort(E) : z;
3519
3519
  }
3520
- var K = b ? m.replace(/\./g, "%2E") : m, ne = S && c(k) && k.length === 1 ? K + "[]" : K;
3521
- if (T && c(k) && k.length === 0)
3520
+ var K = b ? m.replace(/\./g, "%2E") : m, ne = S && l(k) && k.length === 1 ? K + "[]" : K;
3521
+ if (T && l(k) && k.length === 0)
3522
3522
  return ne + "[]";
3523
3523
  for (var J = 0; J < W.length; ++J) {
3524
3524
  var I = W[J], F = typeof I == "object" && typeof I.value < "u" ? I.value : k[I];
3525
3525
  if (!(O && F === null)) {
3526
- var _ = B && b ? I.replace(/\./g, "%2E") : I, Q = c(k) ? typeof v == "function" ? v(ne, _) : ne : ne + (B ? "." + _ : "[" + _ + "]");
3527
- Z.set(d, R);
3526
+ var _ = B && b ? I.replace(/\./g, "%2E") : I, Q = l(k) ? typeof v == "function" ? v(ne, _) : ne : ne + (B ? "." + _ : "[" + _ + "]");
3527
+ Z.set(h, R);
3528
3528
  var G = e();
3529
- G.set(p, Z), a(L, $(
3529
+ G.set(d, Z), a(L, $(
3530
3530
  F,
3531
3531
  Q,
3532
3532
  v,
3533
3533
  S,
3534
3534
  T,
3535
- u,
3535
+ f,
3536
3536
  O,
3537
3537
  b,
3538
- v === "comma" && D && c(k) ? null : q,
3538
+ v === "comma" && D && l(k) ? null : q,
3539
3539
  A,
3540
3540
  E,
3541
3541
  B,
@@ -3549,63 +3549,63 @@ function gs() {
3549
3549
  }
3550
3550
  }
3551
3551
  return L;
3552
- }, x = function(d) {
3553
- if (!d)
3554
- return h;
3555
- if (typeof d.allowEmptyArrays < "u" && typeof d.allowEmptyArrays != "boolean")
3552
+ }, x = function(h) {
3553
+ if (!h)
3554
+ return u;
3555
+ if (typeof h.allowEmptyArrays < "u" && typeof h.allowEmptyArrays != "boolean")
3556
3556
  throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
3557
- if (typeof d.encodeDotInKeys < "u" && typeof d.encodeDotInKeys != "boolean")
3557
+ if (typeof h.encodeDotInKeys < "u" && typeof h.encodeDotInKeys != "boolean")
3558
3558
  throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
3559
- if (d.encoder !== null && typeof d.encoder < "u" && typeof d.encoder != "function")
3559
+ if (h.encoder !== null && typeof h.encoder < "u" && typeof h.encoder != "function")
3560
3560
  throw new TypeError("Encoder has to be a function.");
3561
- var m = d.charset || h.charset;
3562
- if (typeof d.charset < "u" && d.charset !== "utf-8" && d.charset !== "iso-8859-1")
3561
+ var m = h.charset || u.charset;
3562
+ if (typeof h.charset < "u" && h.charset !== "utf-8" && h.charset !== "iso-8859-1")
3563
3563
  throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
3564
3564
  var v = t.default;
3565
- if (typeof d.format < "u") {
3566
- if (!o.call(t.formatters, d.format))
3565
+ if (typeof h.format < "u") {
3566
+ if (!o.call(t.formatters, h.format))
3567
3567
  throw new TypeError("Unknown format option provided.");
3568
- v = d.format;
3568
+ v = h.format;
3569
3569
  }
3570
- var S = t.formatters[v], T = h.filter;
3571
- (typeof d.filter == "function" || c(d.filter)) && (T = d.filter);
3572
- var u;
3573
- if (d.arrayFormat in s ? u = d.arrayFormat : "indices" in d ? u = d.indices ? "indices" : "repeat" : u = h.arrayFormat, "commaRoundTrip" in d && typeof d.commaRoundTrip != "boolean")
3570
+ var S = t.formatters[v], T = u.filter;
3571
+ (typeof h.filter == "function" || l(h.filter)) && (T = h.filter);
3572
+ var f;
3573
+ if (h.arrayFormat in s ? f = h.arrayFormat : "indices" in h ? f = h.indices ? "indices" : "repeat" : f = u.arrayFormat, "commaRoundTrip" in h && typeof h.commaRoundTrip != "boolean")
3574
3574
  throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
3575
- var O = typeof d.allowDots > "u" ? d.encodeDotInKeys === !0 ? !0 : h.allowDots : !!d.allowDots;
3575
+ var O = typeof h.allowDots > "u" ? h.encodeDotInKeys === !0 ? !0 : u.allowDots : !!h.allowDots;
3576
3576
  return {
3577
- addQueryPrefix: typeof d.addQueryPrefix == "boolean" ? d.addQueryPrefix : h.addQueryPrefix,
3577
+ addQueryPrefix: typeof h.addQueryPrefix == "boolean" ? h.addQueryPrefix : u.addQueryPrefix,
3578
3578
  allowDots: O,
3579
- allowEmptyArrays: typeof d.allowEmptyArrays == "boolean" ? !!d.allowEmptyArrays : h.allowEmptyArrays,
3580
- arrayFormat: u,
3579
+ allowEmptyArrays: typeof h.allowEmptyArrays == "boolean" ? !!h.allowEmptyArrays : u.allowEmptyArrays,
3580
+ arrayFormat: f,
3581
3581
  charset: m,
3582
- charsetSentinel: typeof d.charsetSentinel == "boolean" ? d.charsetSentinel : h.charsetSentinel,
3583
- commaRoundTrip: d.commaRoundTrip,
3584
- delimiter: typeof d.delimiter > "u" ? h.delimiter : d.delimiter,
3585
- encode: typeof d.encode == "boolean" ? d.encode : h.encode,
3586
- encodeDotInKeys: typeof d.encodeDotInKeys == "boolean" ? d.encodeDotInKeys : h.encodeDotInKeys,
3587
- encoder: typeof d.encoder == "function" ? d.encoder : h.encoder,
3588
- encodeValuesOnly: typeof d.encodeValuesOnly == "boolean" ? d.encodeValuesOnly : h.encodeValuesOnly,
3582
+ charsetSentinel: typeof h.charsetSentinel == "boolean" ? h.charsetSentinel : u.charsetSentinel,
3583
+ commaRoundTrip: h.commaRoundTrip,
3584
+ delimiter: typeof h.delimiter > "u" ? u.delimiter : h.delimiter,
3585
+ encode: typeof h.encode == "boolean" ? h.encode : u.encode,
3586
+ encodeDotInKeys: typeof h.encodeDotInKeys == "boolean" ? h.encodeDotInKeys : u.encodeDotInKeys,
3587
+ encoder: typeof h.encoder == "function" ? h.encoder : u.encoder,
3588
+ encodeValuesOnly: typeof h.encodeValuesOnly == "boolean" ? h.encodeValuesOnly : u.encodeValuesOnly,
3589
3589
  filter: T,
3590
3590
  format: v,
3591
3591
  formatter: S,
3592
- serializeDate: typeof d.serializeDate == "function" ? d.serializeDate : h.serializeDate,
3593
- skipNulls: typeof d.skipNulls == "boolean" ? d.skipNulls : h.skipNulls,
3594
- sort: typeof d.sort == "function" ? d.sort : null,
3595
- strictNullHandling: typeof d.strictNullHandling == "boolean" ? d.strictNullHandling : h.strictNullHandling
3592
+ serializeDate: typeof h.serializeDate == "function" ? h.serializeDate : u.serializeDate,
3593
+ skipNulls: typeof h.skipNulls == "boolean" ? h.skipNulls : u.skipNulls,
3594
+ sort: typeof h.sort == "function" ? h.sort : null,
3595
+ strictNullHandling: typeof h.strictNullHandling == "boolean" ? h.strictNullHandling : u.strictNullHandling
3596
3596
  };
3597
3597
  };
3598
- return ur = function($, d) {
3599
- var m = $, v = x(d), S, T;
3600
- typeof v.filter == "function" ? (T = v.filter, m = T("", m)) : c(v.filter) && (T = v.filter, S = T);
3601
- var u = [];
3598
+ return ur = function($, h) {
3599
+ var m = $, v = x(h), S, T;
3600
+ typeof v.filter == "function" ? (T = v.filter, m = T("", m)) : l(v.filter) && (T = v.filter, S = T);
3601
+ var f = [];
3602
3602
  if (typeof m != "object" || m === null)
3603
3603
  return "";
3604
3604
  var O = s[v.arrayFormat], b = O === "comma" && v.commaRoundTrip;
3605
3605
  S || (S = Object.keys(m)), v.sort && S.sort(v.sort);
3606
3606
  for (var q = e(), A = 0; A < S.length; ++A) {
3607
3607
  var E = S[A];
3608
- v.skipNulls && m[E] === null || a(u, y(
3608
+ v.skipNulls && m[E] === null || a(f, y(
3609
3609
  m[E],
3610
3610
  E,
3611
3611
  O,
@@ -3626,7 +3626,7 @@ function gs() {
3626
3626
  q
3627
3627
  ));
3628
3628
  }
3629
- var B = u.join(v.delimiter), C = v.addQueryPrefix === !0 ? "?" : "";
3629
+ var B = f.join(v.delimiter), C = v.addQueryPrefix === !0 ? "?" : "";
3630
3630
  return v.charsetSentinel && (v.charset === "iso-8859-1" ? C += "utf8=%26%2310003%3B&" : C += "utf8=%E2%9C%93&"), B.length > 0 ? C + B : "";
3631
3631
  }, ur;
3632
3632
  }
@@ -3655,52 +3655,52 @@ function vs() {
3655
3655
  plainObjects: !1,
3656
3656
  strictDepth: !1,
3657
3657
  strictNullHandling: !1
3658
- }, s = function(p) {
3659
- return p.replace(/&#(\d+);/g, function(y, x) {
3658
+ }, s = function(d) {
3659
+ return d.replace(/&#(\d+);/g, function(y, x) {
3660
3660
  return String.fromCharCode(parseInt(x, 10));
3661
3661
  });
3662
- }, c = function(p, y) {
3663
- return p && typeof p == "string" && y.comma && p.indexOf(",") > -1 ? p.split(",") : p;
3662
+ }, l = function(d, y) {
3663
+ return d && typeof d == "string" && y.comma && d.indexOf(",") > -1 ? d.split(",") : d;
3664
3664
  }, r = "utf8=%26%2310003%3B", a = "utf8=%E2%9C%93", i = function(y, x) {
3665
- var $ = { __proto__: null }, d = x.ignoreQueryPrefix ? y.replace(/^\?/, "") : y;
3666
- d = d.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
3667
- var m = x.parameterLimit === 1 / 0 ? void 0 : x.parameterLimit, v = d.split(x.delimiter, m), S = -1, T, u = x.charset;
3665
+ var $ = { __proto__: null }, h = x.ignoreQueryPrefix ? y.replace(/^\?/, "") : y;
3666
+ h = h.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
3667
+ var m = x.parameterLimit === 1 / 0 ? void 0 : x.parameterLimit, v = h.split(x.delimiter, m), S = -1, T, f = x.charset;
3668
3668
  if (x.charsetSentinel)
3669
3669
  for (T = 0; T < v.length; ++T)
3670
- v[T].indexOf("utf8=") === 0 && (v[T] === a ? u = "utf-8" : v[T] === r && (u = "iso-8859-1"), S = T, T = v.length);
3670
+ v[T].indexOf("utf8=") === 0 && (v[T] === a ? f = "utf-8" : v[T] === r && (f = "iso-8859-1"), S = T, T = v.length);
3671
3671
  for (T = 0; T < v.length; ++T)
3672
3672
  if (T !== S) {
3673
3673
  var O = v[T], b = O.indexOf("]="), q = b === -1 ? O.indexOf("=") : b + 1, A, E;
3674
- q === -1 ? (A = x.decoder(O, o.decoder, u, "key"), E = x.strictNullHandling ? null : "") : (A = x.decoder(O.slice(0, q), o.decoder, u, "key"), E = e.maybeMap(
3675
- c(O.slice(q + 1), x),
3674
+ q === -1 ? (A = x.decoder(O, o.decoder, f, "key"), E = x.strictNullHandling ? null : "") : (A = x.decoder(O.slice(0, q), o.decoder, f, "key"), E = e.maybeMap(
3675
+ l(O.slice(q + 1), x),
3676
3676
  function(C) {
3677
- return x.decoder(C, o.decoder, u, "value");
3677
+ return x.decoder(C, o.decoder, f, "value");
3678
3678
  }
3679
- )), E && x.interpretNumericEntities && u === "iso-8859-1" && (E = s(E)), O.indexOf("[]=") > -1 && (E = t(E) ? [E] : E);
3679
+ )), E && x.interpretNumericEntities && f === "iso-8859-1" && (E = s(E)), O.indexOf("[]=") > -1 && (E = t(E) ? [E] : E);
3680
3680
  var B = n.call($, A);
3681
3681
  B && x.duplicates === "combine" ? $[A] = e.combine($[A], E) : (!B || x.duplicates === "last") && ($[A] = E);
3682
3682
  }
3683
3683
  return $;
3684
- }, l = function(p, y, x, $) {
3685
- for (var d = $ ? y : c(y, x), m = p.length - 1; m >= 0; --m) {
3686
- var v, S = p[m];
3684
+ }, c = function(d, y, x, $) {
3685
+ for (var h = $ ? y : l(y, x), m = d.length - 1; m >= 0; --m) {
3686
+ var v, S = d[m];
3687
3687
  if (S === "[]" && x.parseArrays)
3688
- v = x.allowEmptyArrays && (d === "" || x.strictNullHandling && d === null) ? [] : [].concat(d);
3688
+ v = x.allowEmptyArrays && (h === "" || x.strictNullHandling && h === null) ? [] : [].concat(h);
3689
3689
  else {
3690
3690
  v = x.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
3691
- var T = S.charAt(0) === "[" && S.charAt(S.length - 1) === "]" ? S.slice(1, -1) : S, u = x.decodeDotInKeys ? T.replace(/%2E/g, ".") : T, O = parseInt(u, 10);
3692
- !x.parseArrays && u === "" ? v = { 0: d } : !isNaN(O) && S !== u && String(O) === u && O >= 0 && x.parseArrays && O <= x.arrayLimit ? (v = [], v[O] = d) : u !== "__proto__" && (v[u] = d);
3691
+ var T = S.charAt(0) === "[" && S.charAt(S.length - 1) === "]" ? S.slice(1, -1) : S, f = x.decodeDotInKeys ? T.replace(/%2E/g, ".") : T, O = parseInt(f, 10);
3692
+ !x.parseArrays && f === "" ? v = { 0: h } : !isNaN(O) && S !== f && String(O) === f && O >= 0 && x.parseArrays && O <= x.arrayLimit ? (v = [], v[O] = h) : f !== "__proto__" && (v[f] = h);
3693
3693
  }
3694
- d = v;
3694
+ h = v;
3695
3695
  }
3696
- return d;
3697
- }, h = function(y, x, $, d) {
3696
+ return h;
3697
+ }, u = function(y, x, $, h) {
3698
3698
  if (y) {
3699
- var m = $.allowDots ? y.replace(/\.([^.[]+)/g, "[$1]") : y, v = /(\[[^[\]]*])/, S = /(\[[^[\]]*])/g, T = $.depth > 0 && v.exec(m), u = T ? m.slice(0, T.index) : m, O = [];
3700
- if (u) {
3701
- if (!$.plainObjects && n.call(Object.prototype, u) && !$.allowPrototypes)
3699
+ var m = $.allowDots ? y.replace(/\.([^.[]+)/g, "[$1]") : y, v = /(\[[^[\]]*])/, S = /(\[[^[\]]*])/g, T = $.depth > 0 && v.exec(m), f = T ? m.slice(0, T.index) : m, O = [];
3700
+ if (f) {
3701
+ if (!$.plainObjects && n.call(Object.prototype, f) && !$.allowPrototypes)
3702
3702
  return;
3703
- O.push(u);
3703
+ O.push(f);
3704
3704
  }
3705
3705
  for (var b = 0; $.depth > 0 && (T = S.exec(m)) !== null && b < $.depth; ) {
3706
3706
  if (b += 1, !$.plainObjects && n.call(Object.prototype, T[1].slice(1, -1)) && !$.allowPrototypes)
@@ -3712,9 +3712,9 @@ function vs() {
3712
3712
  throw new RangeError("Input depth exceeded depth option of " + $.depth + " and strictDepth is true");
3713
3713
  O.push("[" + m.slice(T.index) + "]");
3714
3714
  }
3715
- return l(O, x, $, d);
3715
+ return c(O, x, $, h);
3716
3716
  }
3717
- }, f = function(y) {
3717
+ }, p = function(y) {
3718
3718
  if (!y)
3719
3719
  return o;
3720
3720
  if (typeof y.allowEmptyArrays < "u" && typeof y.allowEmptyArrays != "boolean")
@@ -3728,9 +3728,9 @@ function vs() {
3728
3728
  var x = typeof y.charset > "u" ? o.charset : y.charset, $ = typeof y.duplicates > "u" ? o.duplicates : y.duplicates;
3729
3729
  if ($ !== "combine" && $ !== "first" && $ !== "last")
3730
3730
  throw new TypeError("The duplicates option must be either combine, first, or last");
3731
- var d = typeof y.allowDots > "u" ? y.decodeDotInKeys === !0 ? !0 : o.allowDots : !!y.allowDots;
3731
+ var h = typeof y.allowDots > "u" ? y.decodeDotInKeys === !0 ? !0 : o.allowDots : !!y.allowDots;
3732
3732
  return {
3733
- allowDots: d,
3733
+ allowDots: h,
3734
3734
  allowEmptyArrays: typeof y.allowEmptyArrays == "boolean" ? !!y.allowEmptyArrays : o.allowEmptyArrays,
3735
3735
  allowPrototypes: typeof y.allowPrototypes == "boolean" ? y.allowPrototypes : o.allowPrototypes,
3736
3736
  allowSparse: typeof y.allowSparse == "boolean" ? y.allowSparse : o.allowSparse,
@@ -3753,15 +3753,15 @@ function vs() {
3753
3753
  strictNullHandling: typeof y.strictNullHandling == "boolean" ? y.strictNullHandling : o.strictNullHandling
3754
3754
  };
3755
3755
  };
3756
- return fr = function(p, y) {
3757
- var x = f(y);
3758
- if (p === "" || p === null || typeof p > "u")
3756
+ return fr = function(d, y) {
3757
+ var x = p(y);
3758
+ if (d === "" || d === null || typeof d > "u")
3759
3759
  return x.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
3760
- for (var $ = typeof p == "string" ? i(p, x) : p, d = x.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, m = Object.keys($), v = 0; v < m.length; ++v) {
3761
- var S = m[v], T = h(S, $[S], x, typeof p == "string");
3762
- d = e.merge(d, T, x);
3760
+ for (var $ = typeof d == "string" ? i(d, x) : d, h = x.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, m = Object.keys($), v = 0; v < m.length; ++v) {
3761
+ var S = m[v], T = u(S, $[S], x, typeof d == "string");
3762
+ h = e.merge(h, T, x);
3763
3763
  }
3764
- return x.allowSparse === !0 ? d : e.compact(d);
3764
+ return x.allowSparse === !0 ? h : e.compact(h);
3765
3765
  }, fr;
3766
3766
  }
3767
3767
  var pr, Yn;
@@ -3783,7 +3783,7 @@ function bs() {
3783
3783
  function n() {
3784
3784
  this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null;
3785
3785
  }
3786
- var t = /^([a-z0-9.+-]+:)/i, o = /:[0-9]*$/, s = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, c = [
3786
+ var t = /^([a-z0-9.+-]+:)/i, o = /:[0-9]*$/, s = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, l = [
3787
3787
  "<",
3788
3788
  ">",
3789
3789
  '"',
@@ -3800,17 +3800,17 @@ function bs() {
3800
3800
  "\\",
3801
3801
  "^",
3802
3802
  "`"
3803
- ].concat(c), a = ["'"].concat(r), i = [
3803
+ ].concat(l), a = ["'"].concat(r), i = [
3804
3804
  "%",
3805
3805
  "/",
3806
3806
  "?",
3807
3807
  ";",
3808
3808
  "#"
3809
- ].concat(a), l = [
3809
+ ].concat(a), c = [
3810
3810
  "/",
3811
3811
  "?",
3812
3812
  "#"
3813
- ], h = 255, f = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, y = {
3813
+ ], u = 255, p = /^[+a-z0-9A-Z_-]{0,63}$/, d = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, y = {
3814
3814
  javascript: !0,
3815
3815
  "javascript:": !0
3816
3816
  }, x = {
@@ -3827,23 +3827,23 @@ function bs() {
3827
3827
  "ftp:": !0,
3828
3828
  "gopher:": !0,
3829
3829
  "file:": !0
3830
- }, d = /* @__PURE__ */ mo();
3831
- function m(u, O, b) {
3832
- if (u && typeof u == "object" && u instanceof n)
3833
- return u;
3830
+ }, h = /* @__PURE__ */ mo();
3831
+ function m(f, O, b) {
3832
+ if (f && typeof f == "object" && f instanceof n)
3833
+ return f;
3834
3834
  var q = new n();
3835
- return q.parse(u, O, b), q;
3835
+ return q.parse(f, O, b), q;
3836
3836
  }
3837
- n.prototype.parse = function(u, O, b) {
3838
- if (typeof u != "string")
3839
- throw new TypeError("Parameter 'url' must be a string, not " + typeof u);
3840
- var q = u.indexOf("?"), A = q !== -1 && q < u.indexOf("#") ? "?" : "#", E = u.split(A), B = /\\/g;
3841
- E[0] = E[0].replace(B, "/"), u = E.join(A);
3842
- var C = u;
3843
- if (C = C.trim(), !b && u.split("#").length === 1) {
3837
+ n.prototype.parse = function(f, O, b) {
3838
+ if (typeof f != "string")
3839
+ throw new TypeError("Parameter 'url' must be a string, not " + typeof f);
3840
+ var q = f.indexOf("?"), A = q !== -1 && q < f.indexOf("#") ? "?" : "#", E = f.split(A), B = /\\/g;
3841
+ E[0] = E[0].replace(B, "/"), f = E.join(A);
3842
+ var C = f;
3843
+ if (C = C.trim(), !b && f.split("#").length === 1) {
3844
3844
  var ae = s.exec(C);
3845
3845
  if (ae)
3846
- return this.path = C, this.href = C, this.pathname = ae[1], ae[2] ? (this.search = ae[2], O ? this.query = d.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : O && (this.search = "", this.query = {}), this;
3846
+ return this.path = C, this.href = C, this.pathname = ae[1], ae[2] ? (this.search = ae[2], O ? this.query = h.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : O && (this.search = "", this.query = {}), this;
3847
3847
  }
3848
3848
  var H = t.exec(C);
3849
3849
  if (H) {
@@ -3856,8 +3856,8 @@ function bs() {
3856
3856
  se && !(H && x[H]) && (C = C.substr(2), this.slashes = !0);
3857
3857
  }
3858
3858
  if (!x[H] && (se || H && !$[H])) {
3859
- for (var Z = -1, k = 0; k < l.length; k++) {
3860
- var re = C.indexOf(l[k]);
3859
+ for (var Z = -1, k = 0; k < c.length; k++) {
3860
+ var re = C.indexOf(c[k]);
3861
3861
  re !== -1 && (Z === -1 || re < Z) && (Z = re);
3862
3862
  }
3863
3863
  var R, N;
@@ -3871,17 +3871,17 @@ function bs() {
3871
3871
  if (!U)
3872
3872
  for (var P = this.hostname.split(/\./), k = 0, L = P.length; k < L; k++) {
3873
3873
  var W = P[k];
3874
- if (W && !W.match(f)) {
3874
+ if (W && !W.match(p)) {
3875
3875
  for (var z = "", K = 0, ne = W.length; K < ne; K++)
3876
3876
  W.charCodeAt(K) > 127 ? z += "x" : z += W[K];
3877
- if (!z.match(f)) {
3878
- var J = P.slice(0, k), I = P.slice(k + 1), F = W.match(p);
3877
+ if (!z.match(p)) {
3878
+ var J = P.slice(0, k), I = P.slice(k + 1), F = W.match(d);
3879
3879
  F && (J.push(F[1]), I.unshift(F[2])), I.length && (C = "/" + I.join(".") + C), this.hostname = J.join(".");
3880
3880
  break;
3881
3881
  }
3882
3882
  }
3883
3883
  }
3884
- this.hostname.length > h ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), U || (this.hostname = e.toASCII(this.hostname));
3884
+ this.hostname.length > u ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), U || (this.hostname = e.toASCII(this.hostname));
3885
3885
  var _ = this.port ? ":" + this.port : "", Q = this.hostname || "";
3886
3886
  this.host = Q + _, this.href += this.host, U && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), C[0] !== "/" && (C = "/" + C));
3887
3887
  }
@@ -3896,20 +3896,20 @@ function bs() {
3896
3896
  var oe = C.indexOf("#");
3897
3897
  oe !== -1 && (this.hash = C.substr(oe), C = C.slice(0, oe));
3898
3898
  var he = C.indexOf("?");
3899
- if (he !== -1 ? (this.search = C.substr(he), this.query = C.substr(he + 1), O && (this.query = d.parse(this.query)), C = C.slice(0, he)) : O && (this.search = "", this.query = {}), C && (this.pathname = C), $[D] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
3899
+ if (he !== -1 ? (this.search = C.substr(he), this.query = C.substr(he + 1), O && (this.query = h.parse(this.query)), C = C.slice(0, he)) : O && (this.search = "", this.query = {}), C && (this.pathname = C), $[D] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
3900
3900
  var _ = this.pathname || "", Oe = this.search || "";
3901
3901
  this.path = _ + Oe;
3902
3902
  }
3903
3903
  return this.href = this.format(), this;
3904
3904
  };
3905
- function v(u) {
3906
- return typeof u == "string" && (u = m(u)), u instanceof n ? u.format() : n.prototype.format.call(u);
3905
+ function v(f) {
3906
+ return typeof f == "string" && (f = m(f)), f instanceof n ? f.format() : n.prototype.format.call(f);
3907
3907
  }
3908
3908
  n.prototype.format = function() {
3909
- var u = this.auth || "";
3910
- u && (u = encodeURIComponent(u), u = u.replace(/%3A/i, ":"), u += "@");
3909
+ var f = this.auth || "";
3910
+ f && (f = encodeURIComponent(f), f = f.replace(/%3A/i, ":"), f += "@");
3911
3911
  var O = this.protocol || "", b = this.pathname || "", q = this.hash || "", A = !1, E = "";
3912
- this.host ? A = u + this.host : this.hostname && (A = u + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (A += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (E = d.stringify(this.query, {
3912
+ this.host ? A = f + this.host : this.hostname && (A = f + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (A += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (E = h.stringify(this.query, {
3913
3913
  arrayFormat: "repeat",
3914
3914
  addQueryPrefix: !1
3915
3915
  }));
@@ -3918,69 +3918,69 @@ function bs() {
3918
3918
  return encodeURIComponent(C);
3919
3919
  }), B = B.replace("#", "%23"), O + A + b + B + q;
3920
3920
  };
3921
- function S(u, O) {
3922
- return m(u, !1, !0).resolve(O);
3921
+ function S(f, O) {
3922
+ return m(f, !1, !0).resolve(O);
3923
3923
  }
3924
- n.prototype.resolve = function(u) {
3925
- return this.resolveObject(m(u, !1, !0)).format();
3924
+ n.prototype.resolve = function(f) {
3925
+ return this.resolveObject(m(f, !1, !0)).format();
3926
3926
  };
3927
- function T(u, O) {
3928
- return u ? m(u, !1, !0).resolveObject(O) : O;
3927
+ function T(f, O) {
3928
+ return f ? m(f, !1, !0).resolveObject(O) : O;
3929
3929
  }
3930
- return n.prototype.resolveObject = function(u) {
3931
- if (typeof u == "string") {
3930
+ return n.prototype.resolveObject = function(f) {
3931
+ if (typeof f == "string") {
3932
3932
  var O = new n();
3933
- O.parse(u, !1, !0), u = O;
3933
+ O.parse(f, !1, !0), f = O;
3934
3934
  }
3935
3935
  for (var b = new n(), q = Object.keys(this), A = 0; A < q.length; A++) {
3936
3936
  var E = q[A];
3937
3937
  b[E] = this[E];
3938
3938
  }
3939
- if (b.hash = u.hash, u.href === "")
3939
+ if (b.hash = f.hash, f.href === "")
3940
3940
  return b.href = b.format(), b;
3941
- if (u.slashes && !u.protocol) {
3942
- for (var B = Object.keys(u), C = 0; C < B.length; C++) {
3941
+ if (f.slashes && !f.protocol) {
3942
+ for (var B = Object.keys(f), C = 0; C < B.length; C++) {
3943
3943
  var ae = B[C];
3944
- ae !== "protocol" && (b[ae] = u[ae]);
3944
+ ae !== "protocol" && (b[ae] = f[ae]);
3945
3945
  }
3946
3946
  return $[b.protocol] && b.hostname && !b.pathname && (b.pathname = "/", b.path = b.pathname), b.href = b.format(), b;
3947
3947
  }
3948
- if (u.protocol && u.protocol !== b.protocol) {
3949
- if (!$[u.protocol]) {
3950
- for (var H = Object.keys(u), D = 0; D < H.length; D++) {
3948
+ if (f.protocol && f.protocol !== b.protocol) {
3949
+ if (!$[f.protocol]) {
3950
+ for (var H = Object.keys(f), D = 0; D < H.length; D++) {
3951
3951
  var se = H[D];
3952
- b[se] = u[se];
3952
+ b[se] = f[se];
3953
3953
  }
3954
3954
  return b.href = b.format(), b;
3955
3955
  }
3956
- if (b.protocol = u.protocol, !u.host && !x[u.protocol]) {
3957
- for (var L = (u.pathname || "").split("/"); L.length && !(u.host = L.shift()); )
3956
+ if (b.protocol = f.protocol, !f.host && !x[f.protocol]) {
3957
+ for (var L = (f.pathname || "").split("/"); L.length && !(f.host = L.shift()); )
3958
3958
  ;
3959
- u.host || (u.host = ""), u.hostname || (u.hostname = ""), L[0] !== "" && L.unshift(""), L.length < 2 && L.unshift(""), b.pathname = L.join("/");
3959
+ f.host || (f.host = ""), f.hostname || (f.hostname = ""), L[0] !== "" && L.unshift(""), L.length < 2 && L.unshift(""), b.pathname = L.join("/");
3960
3960
  } else
3961
- b.pathname = u.pathname;
3962
- if (b.search = u.search, b.query = u.query, b.host = u.host || "", b.auth = u.auth, b.hostname = u.hostname || u.host, b.port = u.port, b.pathname || b.search) {
3961
+ b.pathname = f.pathname;
3962
+ if (b.search = f.search, b.query = f.query, b.host = f.host || "", b.auth = f.auth, b.hostname = f.hostname || f.host, b.port = f.port, b.pathname || b.search) {
3963
3963
  var Z = b.pathname || "", k = b.search || "";
3964
3964
  b.path = Z + k;
3965
3965
  }
3966
- return b.slashes = b.slashes || u.slashes, b.href = b.format(), b;
3966
+ return b.slashes = b.slashes || f.slashes, b.href = b.format(), b;
3967
3967
  }
3968
- var re = b.pathname && b.pathname.charAt(0) === "/", R = u.host || u.pathname && u.pathname.charAt(0) === "/", N = R || re || b.host && u.pathname, U = N, P = b.pathname && b.pathname.split("/") || [], L = u.pathname && u.pathname.split("/") || [], W = b.protocol && !$[b.protocol];
3969
- if (W && (b.hostname = "", b.port = null, b.host && (P[0] === "" ? P[0] = b.host : P.unshift(b.host)), b.host = "", u.protocol && (u.hostname = null, u.port = null, u.host && (L[0] === "" ? L[0] = u.host : L.unshift(u.host)), u.host = null), N = N && (L[0] === "" || P[0] === "")), R)
3970
- b.host = u.host || u.host === "" ? u.host : b.host, b.hostname = u.hostname || u.hostname === "" ? u.hostname : b.hostname, b.search = u.search, b.query = u.query, P = L;
3968
+ var re = b.pathname && b.pathname.charAt(0) === "/", R = f.host || f.pathname && f.pathname.charAt(0) === "/", N = R || re || b.host && f.pathname, U = N, P = b.pathname && b.pathname.split("/") || [], L = f.pathname && f.pathname.split("/") || [], W = b.protocol && !$[b.protocol];
3969
+ if (W && (b.hostname = "", b.port = null, b.host && (P[0] === "" ? P[0] = b.host : P.unshift(b.host)), b.host = "", f.protocol && (f.hostname = null, f.port = null, f.host && (L[0] === "" ? L[0] = f.host : L.unshift(f.host)), f.host = null), N = N && (L[0] === "" || P[0] === "")), R)
3970
+ b.host = f.host || f.host === "" ? f.host : b.host, b.hostname = f.hostname || f.hostname === "" ? f.hostname : b.hostname, b.search = f.search, b.query = f.query, P = L;
3971
3971
  else if (L.length)
3972
- P || (P = []), P.pop(), P = P.concat(L), b.search = u.search, b.query = u.query;
3973
- else if (u.search != null) {
3972
+ P || (P = []), P.pop(), P = P.concat(L), b.search = f.search, b.query = f.query;
3973
+ else if (f.search != null) {
3974
3974
  if (W) {
3975
3975
  b.host = P.shift(), b.hostname = b.host;
3976
3976
  var z = b.host && b.host.indexOf("@") > 0 ? b.host.split("@") : !1;
3977
3977
  z && (b.auth = z.shift(), b.hostname = z.shift(), b.host = b.hostname);
3978
3978
  }
3979
- return b.search = u.search, b.query = u.query, (b.pathname !== null || b.search !== null) && (b.path = (b.pathname ? b.pathname : "") + (b.search ? b.search : "")), b.href = b.format(), b;
3979
+ return b.search = f.search, b.query = f.query, (b.pathname !== null || b.search !== null) && (b.path = (b.pathname ? b.pathname : "") + (b.search ? b.search : "")), b.href = b.format(), b;
3980
3980
  }
3981
3981
  if (!P.length)
3982
3982
  return b.pathname = null, b.search ? b.path = "/" + b.search : b.path = null, b.href = b.format(), b;
3983
- for (var K = P.slice(-1)[0], ne = (b.host || u.host || P.length > 1) && (K === "." || K === "..") || K === "", J = 0, I = P.length; I >= 0; I--)
3983
+ for (var K = P.slice(-1)[0], ne = (b.host || f.host || P.length > 1) && (K === "." || K === "..") || K === "", J = 0, I = P.length; I >= 0; I--)
3984
3984
  K = P[I], K === "." ? P.splice(I, 1) : K === ".." ? (P.splice(I, 1), J++) : J && (P.splice(I, 1), J--);
3985
3985
  if (!N && !U)
3986
3986
  for (; J--; J)
@@ -3992,10 +3992,10 @@ function bs() {
3992
3992
  var z = b.host && b.host.indexOf("@") > 0 ? b.host.split("@") : !1;
3993
3993
  z && (b.auth = z.shift(), b.hostname = z.shift(), b.host = b.hostname);
3994
3994
  }
3995
- return N = N || b.host && P.length, N && !F && P.unshift(""), P.length > 0 ? b.pathname = P.join("/") : (b.pathname = null, b.path = null), (b.pathname !== null || b.search !== null) && (b.path = (b.pathname ? b.pathname : "") + (b.search ? b.search : "")), b.auth = u.auth || b.auth, b.slashes = b.slashes || u.slashes, b.href = b.format(), b;
3995
+ return N = N || b.host && P.length, N && !F && P.unshift(""), P.length > 0 ? b.pathname = P.join("/") : (b.pathname = null, b.path = null), (b.pathname !== null || b.search !== null) && (b.path = (b.pathname ? b.pathname : "") + (b.search ? b.search : "")), b.auth = f.auth || b.auth, b.slashes = b.slashes || f.slashes, b.href = b.format(), b;
3996
3996
  }, n.prototype.parseHost = function() {
3997
- var u = this.host, O = o.exec(u);
3998
- O && (O = O[0], O !== ":" && (this.port = O.substr(1)), u = u.substr(0, u.length - O.length)), u && (this.hostname = u);
3997
+ var f = this.host, O = o.exec(f);
3998
+ O && (O = O[0], O !== ":" && (this.port = O.substr(1)), f = f.substr(0, f.length - O.length)), f && (this.hostname = f);
3999
3999
  }, Re.parse = m, Re.resolve = S, Re.resolveObject = T, Re.format = v, Re.Url = n, Re;
4000
4000
  }
4001
4001
  var dr = bs(), hr = /* @__PURE__ */ mo(), xs = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), $s = class {
@@ -4028,7 +4028,7 @@ var dr = bs(), hr = /* @__PURE__ */ mo(), xs = (e) => typeof e == "object" && "l
4028
4028
  }), this;
4029
4029
  }
4030
4030
  prepare(e, n) {
4031
- var h, f, p;
4031
+ var u, p, d;
4032
4032
  const t = {
4033
4033
  ...e,
4034
4034
  fullUrl: "",
@@ -4040,11 +4040,11 @@ var dr = bs(), hr = /* @__PURE__ */ mo(), xs = (e) => typeof e == "object" && "l
4040
4040
  };
4041
4041
  if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(Mr, {})), t.headers && t.headers.length) {
4042
4042
  const y = /^HTTP\/2/;
4043
- t.headersObj = t.headers.reduce((x, { name: $, value: d }) => {
4043
+ t.headersObj = t.headers.reduce((x, { name: $, value: h }) => {
4044
4044
  const m = y.exec(t.httpVersion) ? $.toLocaleLowerCase() : $;
4045
4045
  return {
4046
4046
  ...x,
4047
- [m]: d
4047
+ [m]: h
4048
4048
  };
4049
4049
  }, {});
4050
4050
  }
@@ -4055,21 +4055,21 @@ var dr = bs(), hr = /* @__PURE__ */ mo(), xs = (e) => typeof e == "object" && "l
4055
4055
  }),
4056
4056
  {}
4057
4057
  ));
4058
- const o = (h = t.cookies) == null ? void 0 : h.map(({ name: y, value: x }) => n.harIsAlreadyEncoded ? `${y}=${x}` : `${encodeURIComponent(y)}=${encodeURIComponent(x)}`);
4058
+ const o = (u = t.cookies) == null ? void 0 : u.map(({ name: y, value: x }) => n.harIsAlreadyEncoded ? `${y}=${x}` : `${encodeURIComponent(y)}=${encodeURIComponent(x)}`);
4059
4059
  switch (o != null && o.length && (t.allHeaders.cookie = o.join("; ")), t.postData.mimeType) {
4060
4060
  case "multipart/mixed":
4061
4061
  case "multipart/related":
4062
4062
  case "multipart/form-data":
4063
4063
  case "multipart/alternative":
4064
- if (t.postData.text = "", t.postData.mimeType = "multipart/form-data", (f = t.postData) != null && f.params) {
4064
+ if (t.postData.text = "", t.postData.mimeType = "multipart/form-data", (p = t.postData) != null && p.params) {
4065
4065
  const y = "---011000010111000001101001", x = `${y}--`, $ = `\r
4066
- `, d = (T) => T.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), m = (T) => T.replace(/\r?\n|\r/g, `\r
4066
+ `, h = (T) => T.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), m = (T) => T.replace(/\r?\n|\r/g, `\r
4067
4067
  `), v = [`--${y}`];
4068
- (p = t.postData) == null || p.params.forEach((T, u) => {
4068
+ (d = t.postData) == null || d.params.forEach((T, f) => {
4069
4069
  const O = T.name, b = T.value || "", q = T.fileName || null, A = T.contentType || "application/octet-stream";
4070
4070
  q ? (v.push(
4071
- `Content-Disposition: form-data; name="${d(m(O))}"; filename="${q}"`
4072
- ), v.push(`Content-Type: ${A}`)) : v.push(`Content-Disposition: form-data; name="${d(m(O))}"`), v.push(""), v.push(m(b)), u !== t.postData.params.length - 1 && v.push(`--${y}`);
4071
+ `Content-Disposition: form-data; name="${h(m(O))}"; filename="${q}"`
4072
+ ), v.push(`Content-Type: ${A}`)) : v.push(`Content-Disposition: form-data; name="${h(m(O))}"`), v.push(""), v.push(m(b)), f !== t.postData.params.length - 1 && v.push(`--${y}`);
4073
4073
  }), v.push(`--${x}`), t.postData.boundary = y, t.postData.text = v.join($);
4074
4074
  const S = fe(t.headersObj, "content-type") || "content-type";
4075
4075
  t.headersObj[S] = `multipart/form-data; boundary=${y}`;
@@ -4093,10 +4093,10 @@ var dr = bs(), hr = /* @__PURE__ */ mo(), xs = (e) => typeof e == "object" && "l
4093
4093
  const s = {
4094
4094
  ...t.allHeaders,
4095
4095
  ...t.headersObj
4096
- }, c = dr.parse(t.url, !0, !0);
4096
+ }, l = dr.parse(t.url, !0, !0);
4097
4097
  t.queryObj = {
4098
4098
  ...t.queryObj,
4099
- ...c.query
4099
+ ...l.query
4100
4100
  };
4101
4101
  let r;
4102
4102
  n.harIsAlreadyEncoded ? r = hr.stringify(t.queryObj, {
@@ -4106,22 +4106,22 @@ var dr = bs(), hr = /* @__PURE__ */ mo(), xs = (e) => typeof e == "object" && "l
4106
4106
  indices: !1
4107
4107
  });
4108
4108
  const a = {
4109
- ...c,
4109
+ ...l,
4110
4110
  query: t.queryObj,
4111
4111
  search: r,
4112
- path: r ? `${c.pathname}?${r}` : c.pathname
4112
+ path: r ? `${l.pathname}?${r}` : l.pathname
4113
4113
  }, i = dr.format({
4114
- ...c,
4114
+ ...l,
4115
4115
  query: null,
4116
4116
  search: null
4117
- }), l = dr.format({
4118
- ...c,
4117
+ }), c = dr.format({
4118
+ ...l,
4119
4119
  ...a
4120
4120
  });
4121
4121
  return {
4122
4122
  ...t,
4123
4123
  allHeaders: s,
4124
- fullUrl: l,
4124
+ fullUrl: c,
4125
4125
  url: i,
4126
4126
  uriObj: a
4127
4127
  };
@@ -4141,20 +4141,20 @@ const js = ({
4141
4141
  } = {}) => {
4142
4142
  const [t, o] = ve(!1), s = xr(null);
4143
4143
  return $r(() => {
4144
- const c = new IntersectionObserver(
4144
+ const l = new IntersectionObserver(
4145
4145
  ([a]) => {
4146
4146
  a && o(a.isIntersecting);
4147
4147
  },
4148
4148
  { rootMargin: e, threshold: n }
4149
4149
  ), r = s.current;
4150
4150
  if (r)
4151
- return c.observe(r), () => c.unobserve(r);
4151
+ return l.observe(r), () => l.unobserve(r);
4152
4152
  }, [e, n]), [s, t];
4153
4153
  }, ws = ye.Root, Zn = ye.CollapsibleTrigger, Ss = ye.CollapsibleContent, Os = typeof window < "u" ? Yo : $r, go = ({
4154
4154
  children: e,
4155
4155
  maxHeight: n = 250
4156
4156
  }) => {
4157
- const t = xr(null), [o, s] = ve(!1), [c, r] = ve(!1);
4157
+ const t = xr(null), [o, s] = ve(!1), [l, r] = ve(!1);
4158
4158
  return Os(() => {
4159
4159
  const a = t.current;
4160
4160
  if (!a) return;
@@ -4167,7 +4167,7 @@ const js = ({
4167
4167
  ws,
4168
4168
  {
4169
4169
  className: "group",
4170
- open: c,
4170
+ open: l,
4171
4171
  onOpenChange: r,
4172
4172
  style: { "--max-height": `${n}px` },
4173
4173
  children: [
@@ -4177,12 +4177,12 @@ const js = ({
4177
4177
  forceMount: !0,
4178
4178
  className: pe(
4179
4179
  "relative overflow-hidden group",
4180
- !c && o && "max-h-[--max-height]"
4180
+ !l && o && "max-h-[--max-height]"
4181
4181
  ),
4182
4182
  children: [
4183
- !c && o && /* @__PURE__ */ g.jsx("div", { className: " absolute inset-0 bg-gradient-to-b from-transparent to-zinc-50/60 dark:to-zinc-950/90 z-10 group-hover:to-transparent" }),
4183
+ !l && o && /* @__PURE__ */ g.jsx("div", { className: " absolute inset-0 bg-gradient-to-b from-transparent to-zinc-50/60 dark:to-zinc-950/90 z-10 group-hover:to-transparent" }),
4184
4184
  /* @__PURE__ */ g.jsx("div", { ref: t, children: e }),
4185
- !c && o && /* @__PURE__ */ g.jsx(
4185
+ !l && o && /* @__PURE__ */ g.jsx(
4186
4186
  Zn,
4187
4187
  {
4188
4188
  className: "absolute inset-0 grid place-items-center z-10 cursor-pointer peer",
@@ -4199,7 +4199,7 @@ const js = ({
4199
4199
  o && /* @__PURE__ */ g.jsx(
4200
4200
  "div",
4201
4201
  {
4202
- className: pe("flex justify-center w-full mb-2", !c && "hidden"),
4202
+ className: pe("flex justify-center w-full mb-2", !l && "hidden"),
4203
4203
  children: /* @__PURE__ */ g.jsx(Zn, { asChild: !0, children: /* @__PURE__ */ g.jsxs(Br, { variant: "outline", size: "sm", children: [
4204
4204
  "Collapse",
4205
4205
  /* @__PURE__ */ g.jsx(Ho, { size: 14, className: "ml-1.5" })
@@ -4212,25 +4212,27 @@ const js = ({
4212
4212
  }, Ts = ({
4213
4213
  server: e,
4214
4214
  servers: n,
4215
- operation: t
4215
+ operation: t,
4216
+ examples: o
4216
4217
  }) => {
4217
- var r, a, i;
4218
- const o = (r = t.parameters) == null ? void 0 : r.filter((l) => l.in === "header").map((l) => {
4219
- var h, f;
4218
+ var a, i, c;
4219
+ const s = (a = t.parameters) == null ? void 0 : a.filter((u) => u.in === "header").map((u) => {
4220
+ var p, d;
4220
4221
  return {
4221
- name: l.name,
4222
- defaultValue: ((f = (h = l.examples) == null ? void 0 : h.find((p) => p.value)) == null ? void 0 : f.value) ?? ""
4222
+ name: u.name,
4223
+ defaultValue: ((d = (p = u.examples) == null ? void 0 : p.find((y) => y.value)) == null ? void 0 : d.value) ?? "",
4224
+ defaultActive: !1
4223
4225
  };
4224
- }), s = (a = t.parameters) == null ? void 0 : a.filter((l) => l.in === "query").sort((l, h) => l.required && !h.required ? -1 : 1).map((l) => {
4225
- var h, f, p, y, x;
4226
+ }), l = (i = t.parameters) == null ? void 0 : i.filter((u) => u.in === "query").sort((u, p) => u.required && !p.required ? -1 : 1).map((u) => {
4227
+ var p, d, y, x, $;
4226
4228
  return {
4227
- name: l.name,
4228
- defaultActive: l.required ?? !1,
4229
- isRequired: l.required ?? !1,
4230
- enum: ((h = l.schema) == null ? void 0 : h.type) == "array" ? (p = (f = l.schema) == null ? void 0 : f.items) == null ? void 0 : p.enum : (y = l.schema) == null ? void 0 : y.enum,
4231
- type: ((x = l.schema) == null ? void 0 : x.type) ?? "string"
4229
+ name: u.name,
4230
+ defaultActive: u.required ?? !1,
4231
+ isRequired: u.required ?? !1,
4232
+ enum: ((p = u.schema) == null ? void 0 : p.type) == "array" ? (y = (d = u.schema) == null ? void 0 : d.items) == null ? void 0 : y.enum : (x = u.schema) == null ? void 0 : x.enum,
4233
+ type: (($ = u.schema) == null ? void 0 : $.type) ?? "string"
4232
4234
  };
4233
- }), c = (i = t.parameters) == null ? void 0 : i.filter((l) => l.in === "path").map((l) => ({ name: l.name }));
4235
+ }), r = (c = t.parameters) == null ? void 0 : c.filter((u) => u.in === "path").map((u) => ({ name: u.name }));
4234
4236
  return /* @__PURE__ */ g.jsx(
4235
4237
  ra,
4236
4238
  {
@@ -4238,9 +4240,10 @@ const js = ({
4238
4240
  servers: n,
4239
4241
  method: t.method,
4240
4242
  url: t.path,
4241
- headers: o,
4242
- queryParams: s,
4243
- pathParams: c
4243
+ headers: s,
4244
+ queryParams: l,
4245
+ pathParams: r,
4246
+ examples: o
4244
4247
  }
4245
4248
  );
4246
4249
  }, Pr = ({ children: e, className: n }) => /* @__PURE__ */ g.jsx(
@@ -4307,20 +4310,20 @@ const js = ({
4307
4310
  onExampleChange: t
4308
4311
  }) => {
4309
4312
  var x;
4310
- const [o, s] = ve(0), [c, r] = ve(0), a = Array.isArray(e) && e.length === 1 ? e[0] : e[o], i = (a == null ? void 0 : a.examples) ?? [], l = i[c];
4311
- let h;
4312
- l ? h = "value" in l ? l.value : l : a != null && a.schema && (h = He(
4313
+ const [o, s] = ve(0), [l, r] = ve(0), a = Array.isArray(e) && e.length === 1 ? e[0] : e[o], i = (a == null ? void 0 : a.examples) ?? [], c = i[l];
4314
+ let u;
4315
+ c ? u = "value" in c ? c.value : c : a != null && a.schema && (u = He(
4313
4316
  a.schema
4314
4317
  )), $r(() => {
4315
- t == null || t(h);
4316
- }, [h, t]);
4317
- const f = Cs(h), p = Ps(a == null ? void 0 : a.mediaType), y = i.length > 0 || e.length > 0;
4318
+ t == null || t(u);
4319
+ }, [u, t]);
4320
+ const p = Cs(u), d = Ps(a == null ? void 0 : a.mediaType), y = i.length > 0 || e.length > 0;
4318
4321
  return /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
4319
4322
  /* @__PURE__ */ g.jsxs(vo, { className: "p-0", children: [
4320
- l != null && l.externalValue ? /* @__PURE__ */ g.jsx("div", { className: "p-2", children: /* @__PURE__ */ g.jsx(
4323
+ c != null && c.externalValue ? /* @__PURE__ */ g.jsx("div", { className: "p-2", children: /* @__PURE__ */ g.jsx(
4321
4324
  "a",
4322
4325
  {
4323
- href: l.externalValue,
4326
+ href: c.externalValue,
4324
4327
  target: "_blank",
4325
4328
  rel: "noopener noreferrer",
4326
4329
  className: "text-xs text-primary hover:underline",
@@ -4329,14 +4332,14 @@ const js = ({
4329
4332
  ) }) : /* @__PURE__ */ g.jsx(go, { children: /* @__PURE__ */ g.jsx(
4330
4333
  no,
4331
4334
  {
4332
- language: p,
4335
+ language: d,
4333
4336
  noBackground: !0,
4334
4337
  copyable: !0,
4335
4338
  className: "[--scrollbar-color:gray] text-xs max-h-[500px] p-2",
4336
- code: f
4339
+ code: p
4337
4340
  }
4338
4341
  ) }),
4339
- (l == null ? void 0 : l.description) && /* @__PURE__ */ g.jsx("div", { className: "border-t text-xs px-3 py-1.5 text-muted-foreground", children: l.description })
4342
+ (c == null ? void 0 : c.description) && /* @__PURE__ */ g.jsx("div", { className: "border-t text-xs px-3 py-1.5 text-muted-foreground", children: c.description })
4340
4343
  ] }),
4341
4344
  y && /* @__PURE__ */ g.jsxs(bo, { className: "text-xs p-0", children: [
4342
4345
  n && /* @__PURE__ */ g.jsx("div", { className: "text-muted-foreground text-xs border-b px-3 py-2", children: n }),
@@ -4347,8 +4350,8 @@ const js = ({
4347
4350
  className: "max-w-[200px]",
4348
4351
  value: o.toString(),
4349
4352
  onChange: ($) => s(Number($.target.value)),
4350
- options: e.map(($, d) => ({
4351
- value: d.toString(),
4353
+ options: e.map(($, h) => ({
4354
+ value: h.toString(),
4352
4355
  label: $.mediaType
4353
4356
  }))
4354
4357
  }
@@ -4357,11 +4360,11 @@ const js = ({
4357
4360
  Ze,
4358
4361
  {
4359
4362
  className: "max-w-[180px]",
4360
- value: c.toString(),
4363
+ value: l.toString(),
4361
4364
  onChange: ($) => r(Number($.target.value)),
4362
- options: i.map(($, d) => ({
4363
- value: d.toString(),
4364
- label: $.summary || $.name || $.description || `Example ${d + 1}`
4365
+ options: i.map(($, h) => ({
4366
+ value: h.toString(),
4367
+ label: $.summary || $.name || $.description || `Example ${h + 1}`
4365
4368
  }))
4366
4369
  }
4367
4370
  ) })
@@ -4501,8 +4504,8 @@ const js = ({
4501
4504
  onSelectResponse: t
4502
4505
  }) => {
4503
4506
  var T;
4504
- const { input: o, type: s } = jr(), c = wr(As, { input: o, type: s }), r = vr(c), a = $o(e.method), [i, l] = qo(), [, h] = eo(), [f, p] = ve(), y = i.get("lang") ?? "shell", x = (T = e.requestBody) == null ? void 0 : T.content, $ = e.path.split("/").map((u, O, b) => {
4505
- const A = u.startsWith("{") && u.endsWith("}") || u.startsWith(":") ? u.replace(/[:{}]/g, "") : void 0;
4507
+ const { input: o, type: s } = jr(), l = wr(As, { input: o, type: s }), r = vr(l), a = $o(e.method), [i, c] = qo(), [, u] = eo(), [p, d] = ve(), y = i.get("lang") ?? "shell", x = (T = e.requestBody) == null ? void 0 : T.content, $ = e.path.split("/").map((f, O, b) => {
4508
+ const A = f.startsWith("{") && f.endsWith("}") || f.startsWith(":") ? f.replace(/[:{}]/g, "") : void 0;
4506
4509
  return (
4507
4510
  // eslint-disable-next-line react/no-array-index-key
4508
4511
  /* @__PURE__ */ g.jsxs(Xo, { children: [
@@ -4512,20 +4515,20 @@ const js = ({
4512
4515
  name: A,
4513
4516
  backgroundOpacity: "0",
4514
4517
  slug: `${e.slug}-${A.toLocaleLowerCase()}`,
4515
- children: u
4518
+ children: f
4516
4519
  }
4517
- ) : u,
4520
+ ) : f,
4518
4521
  O < b.length - 1 ? "/" : null,
4519
4522
  /* @__PURE__ */ g.jsx("wbr", {})
4520
- ] }, u + O)
4523
+ ] }, f + O)
4521
4524
  );
4522
- }), { selectedServer: d } = br(), m = Zo(() => {
4525
+ }), { selectedServer: h } = br(), m = Zo(() => {
4523
4526
  var b;
4524
- const u = f ?? ((b = x == null ? void 0 : x[0]) != null && b.schema ? He(x[0].schema) : void 0), O = new $s({
4527
+ const f = p ?? ((b = x == null ? void 0 : x[0]) != null && b.schema ? He(x[0].schema) : void 0), O = new $s({
4525
4528
  method: e.method.toLocaleUpperCase(),
4526
- url: (d ?? r.data.schema.url ?? "") + e.path.replaceAll("{", ":").replaceAll("}", ""),
4527
- postData: u ? {
4528
- text: JSON.stringify(u, null, 2),
4529
+ url: (h ?? r.data.schema.url ?? "") + e.path.replaceAll("{", ":").replaceAll("}", ""),
4530
+ postData: f ? {
4531
+ text: JSON.stringify(f, null, 2),
4529
4532
  mimeType: "application/json"
4530
4533
  } : {},
4531
4534
  headers: [],
@@ -4537,11 +4540,11 @@ const js = ({
4537
4540
  });
4538
4541
  return Es(O, y);
4539
4542
  }, [
4540
- f,
4543
+ p,
4541
4544
  x,
4542
4545
  e.method,
4543
4546
  e.path,
4544
- d,
4547
+ h,
4545
4548
  r.data.schema.url,
4546
4549
  y
4547
4550
  ]), [v, S] = js({ rootMargin: "200px 0px 200px 0px" });
@@ -4562,8 +4565,9 @@ const js = ({
4562
4565
  Ts,
4563
4566
  {
4564
4567
  server: r.data.schema.url,
4565
- servers: r.data.schema.servers.map((u) => u.url),
4566
- operation: e
4568
+ servers: r.data.schema.servers.map((f) => f.url),
4569
+ operation: e,
4570
+ examples: x ?? void 0
4567
4571
  }
4568
4572
  )
4569
4573
  ] }),
@@ -4584,9 +4588,9 @@ const js = ({
4584
4588
  {
4585
4589
  className: "self-start max-w-[150px]",
4586
4590
  value: y,
4587
- onChange: (u) => {
4588
- h(() => {
4589
- l((O) => (O.set("lang", u.target.value), O));
4591
+ onChange: (f) => {
4592
+ u(() => {
4593
+ c((O) => (O.set("lang", f.target.value), O));
4590
4594
  });
4591
4595
  },
4592
4596
  options: Is
@@ -4599,7 +4603,7 @@ const js = ({
4599
4603
  Rs,
4600
4604
  {
4601
4605
  content: x,
4602
- onExampleChange: p
4606
+ onExampleChange: d
4603
4607
  }
4604
4608
  ),
4605
4609
  S && e.responses.length > 0 && /* @__PURE__ */ g.jsx(
@@ -4678,13 +4682,13 @@ const js = ({
4678
4682
  t ? /* @__PURE__ */ g.jsx(Jo, { size: 14 }) : /* @__PURE__ */ g.jsx(Vo, { size: 14 }),
4679
4683
  /* @__PURE__ */ g.jsx("span", { children: Ms[n] })
4680
4684
  ] }),
4681
- /* @__PURE__ */ g.jsx(ye.Content, { className: "pb-4", children: e.map((c, r) => (
4685
+ /* @__PURE__ */ g.jsx(ye.Content, { className: "pb-4", children: e.map((l, r) => (
4682
4686
  // eslint-disable-next-line react/no-array-index-key
4683
4687
  /* @__PURE__ */ g.jsx(
4684
4688
  Hs,
4685
4689
  {
4686
4690
  type: n,
4687
- schema: c,
4691
+ schema: l,
4688
4692
  level: o
4689
4693
  },
4690
4694
  r
@@ -4698,13 +4702,13 @@ const js = ({
4698
4702
  schema: e,
4699
4703
  level: n
4700
4704
  }) => {
4701
- const [t, o] = ve(!0), s = ea(() => o((c) => !c), []);
4702
- for (const [c, r] of Us(Ws))
4703
- if (e[c])
4705
+ const [t, o] = ve(!0), s = ea(() => o((l) => !l), []);
4706
+ for (const [l, r] of Us(Ws))
4707
+ if (e[l])
4704
4708
  return /* @__PURE__ */ g.jsx(
4705
4709
  zs,
4706
4710
  {
4707
- schemas: e[c],
4711
+ schemas: e[l],
4708
4712
  type: r,
4709
4713
  isOpen: t,
4710
4714
  toggleOpen: s,
@@ -4720,7 +4724,7 @@ const js = ({
4720
4724
  group: t,
4721
4725
  level: o,
4722
4726
  defaultOpen: s = !1,
4723
- showCollapseButton: c = !0
4727
+ showCollapseButton: l = !0
4724
4728
  }) => {
4725
4729
  const [r, a] = ve(s);
4726
4730
  return Js(n) ? /* @__PURE__ */ g.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ g.jsx("div", { className: "flex flex-col gap-1 justify-between text-sm", children: /* @__PURE__ */ g.jsxs("div", { className: "flex gap-2 items-center", children: [
@@ -4749,7 +4753,7 @@ const js = ({
4749
4753
  open: r,
4750
4754
  onOpenChange: () => a(!r),
4751
4755
  children: [
4752
- c && /* @__PURE__ */ g.jsx(ye.Trigger, { asChild: !0, children: /* @__PURE__ */ g.jsxs(
4756
+ l && /* @__PURE__ */ g.jsx(ye.Trigger, { asChild: !0, children: /* @__PURE__ */ g.jsxs(
4753
4757
  to,
4754
4758
  {
4755
4759
  variant: "outline",
@@ -4773,9 +4777,9 @@ const js = ({
4773
4777
  }) => {
4774
4778
  if (!e || Object.keys(e).length === 0)
4775
4779
  return /* @__PURE__ */ g.jsx($e, { className: "p-4", children: /* @__PURE__ */ g.jsx("span", { className: "text-sm text-muted-foreground italic", children: "No response specified" }) });
4776
- const o = (s, c) => {
4780
+ const o = (s, l) => {
4777
4781
  if (gr(s))
4778
- return /* @__PURE__ */ g.jsx(jo, { schema: s, level: c });
4782
+ return /* @__PURE__ */ g.jsx(jo, { schema: s, level: l });
4779
4783
  if (s.type === "array" && s.items) {
4780
4784
  const r = s.items;
4781
4785
  return typeof r.type == "string" && ["string", "number", "boolean", "integer"].includes(r.type) ? /* @__PURE__ */ g.jsxs($e, { className: "p-4", children: [
@@ -4795,8 +4799,8 @@ const js = ({
4795
4799
  )
4796
4800
  ] }) : r.type === "object" ? /* @__PURE__ */ g.jsxs($e, { className: "flex flex-col gap-2 bg-border/30 p-4", children: [
4797
4801
  /* @__PURE__ */ g.jsx("span", { className: "text-sm text-muted-foreground", children: "object[]" }),
4798
- o(r, c + 1)
4799
- ] }) : o(r, c + 1);
4802
+ o(r, l + 1)
4803
+ ] }) : o(r, l + 1);
4800
4804
  }
4801
4805
  if (s.type === "object" && (!s.properties || Object.keys(s.properties).length === 0))
4802
4806
  return /* @__PURE__ */ g.jsxs($e, { className: "p-4 flex gap-2 items-center", children: [
@@ -4816,22 +4820,22 @@ const js = ({
4816
4820
  if (s.properties) {
4817
4821
  const r = oo(
4818
4822
  Object.entries(s.properties),
4819
- ([i, l]) => {
4820
- var h;
4821
- return l.deprecated ? "deprecated" : (h = s.required) != null && h.includes(i) ? "required" : "optional";
4823
+ ([i, c]) => {
4824
+ var u;
4825
+ return c.deprecated ? "deprecated" : (u = s.required) != null && u.includes(i) ? "required" : "optional";
4822
4826
  }
4823
4827
  ), a = ["required", "optional", "deprecated"];
4824
4828
  return /* @__PURE__ */ g.jsx($e, { className: "divide-y overflow-hidden", children: a.map(
4825
- (i) => r[i] && /* @__PURE__ */ g.jsx("ul", { className: "divide-y", children: r[i].map(([l, h]) => /* @__PURE__ */ g.jsx(
4829
+ (i) => r[i] && /* @__PURE__ */ g.jsx("ul", { className: "divide-y", children: r[i].map(([c, u]) => /* @__PURE__ */ g.jsx(
4826
4830
  Ds,
4827
4831
  {
4828
- name: l,
4829
- schema: h,
4832
+ name: c,
4833
+ schema: u,
4830
4834
  group: i,
4831
- level: c,
4835
+ level: l,
4832
4836
  defaultOpen: t
4833
4837
  },
4834
- l
4838
+ c
4835
4839
  )) }, i)
4836
4840
  ) });
4837
4841
  }
@@ -4851,7 +4855,7 @@ const js = ({
4851
4855
  /* @__PURE__ */ g.jsx(la, { children: /* @__PURE__ */ g.jsx(ca, { children: "Additional Properties:" }) }),
4852
4856
  /* @__PURE__ */ g.jsx(ua, { children: o(
4853
4857
  s.additionalProperties,
4854
- c + 1
4858
+ l + 1
4855
4859
  ) })
4856
4860
  ] }) : null;
4857
4861
  };
@@ -4860,11 +4864,11 @@ const js = ({
4860
4864
  operationFragment: e,
4861
4865
  serverUrl: n
4862
4866
  }) => {
4863
- var i, l, h;
4867
+ var i, c, u;
4864
4868
  const t = ma(Xs, e), o = oo(
4865
4869
  t.parameters ?? [],
4866
- (f) => f.in
4867
- ), s = xr(null), c = t.responses.at(0), [r, a] = ve(c == null ? void 0 : c.statusCode);
4870
+ (p) => p.in
4871
+ ), s = xr(null), l = t.responses.at(0), [r, a] = ve(l == null ? void 0 : l.statusCode);
4868
4872
  return /* @__PURE__ */ g.jsxs(
4869
4873
  "div",
4870
4874
  {
@@ -4881,10 +4885,10 @@ const js = ({
4881
4885
  className: "max-w-full truncate flex cursor-pointer",
4882
4886
  onClick: () => {
4883
4887
  if (s.current) {
4884
- const f = document.createRange();
4885
- f.selectNodeContents(s.current);
4886
- const p = window.getSelection();
4887
- p == null || p.removeAllRanges(), p == null || p.addRange(f);
4888
+ const p = document.createRange();
4889
+ p.selectNodeContents(s.current);
4890
+ const d = window.getSelection();
4891
+ d == null || d.removeAllRanges(), d == null || d.addRange(p);
4888
4892
  }
4889
4893
  },
4890
4894
  children: [
@@ -4902,20 +4906,20 @@ const js = ({
4902
4906
  }
4903
4907
  ),
4904
4908
  t.parameters && t.parameters.length > 0 && /* @__PURE__ */ g.jsx(g.Fragment, { children: Qs.flatMap(
4905
- (f) => {
4906
- var p;
4907
- return (p = o[f]) != null && p.length ? /* @__PURE__ */ g.jsx(
4909
+ (p) => {
4910
+ var d;
4911
+ return (d = o[p]) != null && d.length ? /* @__PURE__ */ g.jsx(
4908
4912
  wa,
4909
4913
  {
4910
4914
  id: t.slug,
4911
- parameters: o[f],
4912
- group: f
4915
+ parameters: o[p],
4916
+ group: p
4913
4917
  },
4914
- f
4918
+ p
4915
4919
  ) : [];
4916
4920
  }
4917
4921
  ) }),
4918
- ba((h = (l = (i = t.requestBody) == null ? void 0 : i.content) == null ? void 0 : l.at(0)) == null ? void 0 : h.schema, (f) => /* @__PURE__ */ g.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
4922
+ ba((u = (c = (i = t.requestBody) == null ? void 0 : i.content) == null ? void 0 : c.at(0)) == null ? void 0 : u.schema, (p) => /* @__PURE__ */ g.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
4919
4923
  /* @__PURE__ */ g.jsx(
4920
4924
  Be,
4921
4925
  {
@@ -4926,7 +4930,7 @@ const js = ({
4926
4930
  children: "Request Body"
4927
4931
  }
4928
4932
  ),
4929
- /* @__PURE__ */ g.jsx(Ge, { schema: f })
4933
+ /* @__PURE__ */ g.jsx(Ge, { schema: p })
4930
4934
  ] })),
4931
4935
  t.responses.length > 0 && /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
4932
4936
  /* @__PURE__ */ g.jsx(
@@ -4942,32 +4946,32 @@ const js = ({
4942
4946
  /* @__PURE__ */ g.jsxs(
4943
4947
  na,
4944
4948
  {
4945
- onValueChange: (f) => a(f),
4949
+ onValueChange: (p) => a(p),
4946
4950
  value: r,
4947
4951
  children: [
4948
- t.responses.length > 1 && /* @__PURE__ */ g.jsx(oa, { children: t.responses.map((f) => /* @__PURE__ */ g.jsx(
4952
+ t.responses.length > 1 && /* @__PURE__ */ g.jsx(oa, { children: t.responses.map((p) => /* @__PURE__ */ g.jsx(
4949
4953
  aa,
4950
4954
  {
4951
- value: f.statusCode,
4952
- title: f.description ?? void 0,
4953
- children: f.statusCode
4955
+ value: p.statusCode,
4956
+ title: p.description ?? void 0,
4957
+ children: p.statusCode
4954
4958
  },
4955
- f.statusCode
4959
+ p.statusCode
4956
4960
  )) }),
4957
- /* @__PURE__ */ g.jsx("ul", { className: "list-none m-0 px-0", children: t.responses.map((f) => {
4958
- var p, y;
4961
+ /* @__PURE__ */ g.jsx("ul", { className: "list-none m-0 px-0", children: t.responses.map((p) => {
4962
+ var d, y;
4959
4963
  return /* @__PURE__ */ g.jsx(
4960
4964
  ia,
4961
4965
  {
4962
- value: f.statusCode,
4966
+ value: p.statusCode,
4963
4967
  children: /* @__PURE__ */ g.jsx(
4964
4968
  Ge,
4965
4969
  {
4966
- schema: (y = (p = f.content) == null ? void 0 : p.find((x) => x.schema)) == null ? void 0 : y.schema
4970
+ schema: (y = (d = p.content) == null ? void 0 : d.find((x) => x.schema)) == null ? void 0 : y.schema
4967
4971
  }
4968
4972
  )
4969
4973
  },
4970
- f.statusCode
4974
+ p.statusCode
4971
4975
  );
4972
4976
  }) })
4973
4977
  ]
@@ -5078,13 +5082,13 @@ const Xs = nt(
5078
5082
  }
5079
5083
  `
5080
5084
  ), wl = () => {
5081
- const { input: e, type: n, versions: t, version: o } = jr(), s = wr(Zs, { input: e, type: n }), { selectedServer: c } = br(), r = vr(s), a = r.data.schema.title, i = r.data.schema.summary, l = r.data.schema.description, h = No();
5085
+ const { input: e, type: n, versions: t, version: o } = jr(), s = wr(Zs, { input: e, type: n }), { selectedServer: l } = br(), r = vr(s), a = r.data.schema.title, i = r.data.schema.summary, c = r.data.schema.description, u = No();
5082
5086
  Po();
5083
- const f = i || (l ? Ys(l) : void 0);
5087
+ const p = i || (c ? Ys(c) : void 0);
5084
5088
  return /* @__PURE__ */ g.jsxs("div", { className: "pt-[--padding-content-top]", children: [
5085
5089
  /* @__PURE__ */ g.jsxs(Ro, { children: [
5086
5090
  /* @__PURE__ */ g.jsx("title", { children: a }),
5087
- f && /* @__PURE__ */ g.jsx("meta", { name: "description", content: f })
5091
+ p && /* @__PURE__ */ g.jsx("meta", { name: "description", content: p })
5088
5092
  ] }),
5089
5093
  /* @__PURE__ */ g.jsxs(
5090
5094
  "div",
@@ -5099,11 +5103,11 @@ const Xs = nt(
5099
5103
  /* @__PURE__ */ g.jsx("div", { children: Object.entries(t).length > 1 && /* @__PURE__ */ g.jsxs(
5100
5104
  ko,
5101
5105
  {
5102
- onValueChange: (p) => h(t[p]),
5106
+ onValueChange: (d) => u(t[d]),
5103
5107
  defaultValue: o,
5104
5108
  children: [
5105
5109
  /* @__PURE__ */ g.jsx(Eo, { className: "w-[180px]", children: /* @__PURE__ */ g.jsx(Ao, { placeholder: "Select version" }) }),
5106
- /* @__PURE__ */ g.jsx(Io, { children: Object.entries(t).map(([p]) => /* @__PURE__ */ g.jsx(Lo, { value: p, children: p }, p)) })
5110
+ /* @__PURE__ */ g.jsx(Io, { children: Object.entries(t).map(([d]) => /* @__PURE__ */ g.jsx(Lo, { value: d, children: d }, d)) })
5107
5111
  ]
5108
5112
  }
5109
5113
  ) })
@@ -5114,26 +5118,26 @@ const Xs = nt(
5114
5118
  ),
5115
5119
  /* @__PURE__ */ g.jsx("hr", {}),
5116
5120
  /* @__PURE__ */ g.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ g.jsx(va, {}) }),
5117
- r.data.schema.tags.filter((p) => p.operations.length > 0).map((p) => (
5121
+ r.data.schema.tags.filter((d) => d.operations.length > 0).map((d) => (
5118
5122
  // px, -mx is so that `content-visibility` doesn't cut off overflown heading anchor links '#'
5119
5123
  /* @__PURE__ */ g.jsxs("div", { className: "px-6 -mx-6 [content-visibility:auto]", children: [
5120
- p.name && /* @__PURE__ */ g.jsx(_r, { children: p.name }),
5121
- p.description && /* @__PURE__ */ g.jsx(
5124
+ d.name && /* @__PURE__ */ g.jsx(_r, { children: d.name }),
5125
+ d.description && /* @__PURE__ */ g.jsx(
5122
5126
  Se,
5123
5127
  {
5124
5128
  className: `${qe} max-w-full prose-img:max-w-prose w-full mt-2 mb-12`,
5125
- content: p.description
5129
+ content: d.description
5126
5130
  }
5127
5131
  ),
5128
- /* @__PURE__ */ g.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ g.jsx(sa, { children: p.operations.map((y) => /* @__PURE__ */ g.jsx(
5132
+ /* @__PURE__ */ g.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ g.jsx(sa, { children: d.operations.map((y) => /* @__PURE__ */ g.jsx(
5129
5133
  Ks,
5130
5134
  {
5131
- serverUrl: c ?? r.data.schema.url,
5135
+ serverUrl: l ?? r.data.schema.url,
5132
5136
  operationFragment: y
5133
5137
  },
5134
5138
  y.slug
5135
5139
  )) }) })
5136
- ] }, p.name)
5140
+ ] }, d.name)
5137
5141
  ))
5138
5142
  ] });
5139
5143
  };
@@ -5141,4 +5145,4 @@ export {
5141
5145
  wl as OperationList,
5142
5146
  Xs as OperationsFragment
5143
5147
  };
5144
- //# sourceMappingURL=OperationList-PCwzTp1r.js.map
5148
+ //# sourceMappingURL=OperationList-DGJWDx1G.js.map