zudoku 0.43.0 → 0.43.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/validators/common.d.ts +193 -0
- package/dist/config/validators/common.js +2 -0
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +70 -0
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +2 -2
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Main.js +3 -2
- package/dist/lib/components/Main.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +1 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/Pagination.js +2 -2
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/Search.js +1 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +1 -1
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/navigation/PoweredByZudoku.js +1 -1
- package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.js +1 -1
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +9 -5
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +2 -3
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/Toc.js +2 -2
- package/dist/lib/components/navigation/Toc.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +2 -1
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/oas/parser/upgrade/index.d.ts +1 -0
- package/dist/lib/oas/parser/upgrade/index.js +76 -24
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +4 -2
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +10 -4
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +3 -4
- package/dist/lib/plugins/openapi/index.js +6 -4
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +4 -3
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +2 -2
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/SubmitButton.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +2 -2
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js +33 -3
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/ui/SyntaxHighlight.js +1 -1
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/traverse.d.ts +1 -1
- package/dist/lib/util/traverse.js +6 -5
- package/dist/lib/util/traverse.js.map +1 -1
- package/dist/vite/build.js +1 -0
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/dev-server.js +5 -2
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/html.d.ts +6 -2
- package/dist/vite/html.js +11 -8
- package/dist/vite/html.js.map +1 -1
- package/dist/vite/plugin-api.js +2 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/lib/{AuthenticationPlugin-ByDF051g.js → AuthenticationPlugin-BxoEZCSJ.js} +4 -4
- package/lib/{AuthenticationPlugin-ByDF051g.js.map → AuthenticationPlugin-BxoEZCSJ.js.map} +1 -1
- package/lib/{Markdown-mFpg_n9p.js → Markdown-DvdVn1O7.js} +1839 -1836
- package/lib/Markdown-DvdVn1O7.js.map +1 -0
- package/lib/{MdxPage-Cm7atiW3.js → MdxPage-DUcuusMU.js} +7 -7
- package/lib/{MdxPage-Cm7atiW3.js.map → MdxPage-DUcuusMU.js.map} +1 -1
- package/lib/{OasProvider-DOs0v9u7.js → OasProvider-CjMm8pB7.js} +8 -9
- package/lib/{OasProvider-DOs0v9u7.js.map → OasProvider-CjMm8pB7.js.map} +1 -1
- package/lib/{OperationList-CKac6iap.js → OperationList-BhJcPgGi.js} +1269 -1261
- package/lib/{OperationList-CKac6iap.js.map → OperationList-BhJcPgGi.js.map} +1 -1
- package/lib/Pagination-BgQxwq5j.js +48 -0
- package/lib/Pagination-BgQxwq5j.js.map +1 -0
- package/lib/{RouteGuard-DRtEu9nh.js → RouteGuard-D2gX29iI.js} +3 -3
- package/lib/{RouteGuard-DRtEu9nh.js.map → RouteGuard-D2gX29iI.js.map} +1 -1
- package/lib/{SchemaList-BTX2mRMW.js → SchemaList-BexhT_Z0.js} +22 -23
- package/lib/{SchemaList-BTX2mRMW.js.map → SchemaList-BexhT_Z0.js.map} +1 -1
- package/lib/{SchemaView-BYRn_-2l.js → SchemaView-Dt_-u8rW.js} +123 -146
- package/lib/SchemaView-Dt_-u8rW.js.map +1 -0
- package/lib/{Select-CT64Ou40.js → Select-CYaEBIYK.js} +3 -3
- package/lib/{Select-CT64Ou40.js.map → Select-CYaEBIYK.js.map} +1 -1
- package/lib/{SlotletProvider-CS_nO-XT.js → SlotletProvider-wWbHYqWf.js} +7 -7
- package/lib/SlotletProvider-wWbHYqWf.js.map +1 -0
- package/lib/{SyntaxHighlight-CxhyyMkF.js → SyntaxHighlight-o7q0acut.js} +81 -81
- package/lib/{SyntaxHighlight-CxhyyMkF.js.map → SyntaxHighlight-o7q0acut.js.map} +1 -1
- package/lib/{Toc-D_tV8_Ri.js → Toc-BnN4zBb3.js} +17 -17
- package/lib/Toc-BnN4zBb3.js.map +1 -0
- package/lib/{chunk-BAXFHI7N-BVBOl9s0.js → chunk-BAXFHI7N-BLTsN6tl.js} +679 -659
- package/lib/{chunk-BAXFHI7N-BVBOl9s0.js.map → chunk-BAXFHI7N-BLTsN6tl.js.map} +1 -1
- package/lib/{circular-ByJI6Mci.js → circular-BWEIet3w.js} +4616 -5567
- package/lib/circular-BWEIet3w.js.map +1 -0
- package/lib/{createServer-IW7v5hWm.js → createServer-BQD3Eeqb.js} +1998 -1970
- package/lib/createServer-BQD3Eeqb.js.map +1 -0
- package/lib/{hook-CldJlP5c.js → hook-8GM2HXNM.js} +24 -24
- package/lib/{hook-CldJlP5c.js.map → hook-8GM2HXNM.js.map} +1 -1
- package/lib/index-CFf9AN-y.js +3208 -0
- package/lib/index-CFf9AN-y.js.map +1 -0
- package/lib/{index-DnQftvP4.js → index-DGNSSXgR.js} +77 -69
- package/lib/{index-DnQftvP4.js.map → index-DGNSSXgR.js.map} +1 -1
- package/lib/{mutation-DBQh7AOZ.js → mutation-Bq5bn7Hf.js} +2 -2
- package/lib/{mutation-DBQh7AOZ.js.map → mutation-Bq5bn7Hf.js.map} +1 -1
- package/lib/processors/traverse.js +9 -7
- package/lib/processors/traverse.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +1 -1
- package/lib/{useExposedProps-DbIZXspi.js → useExposedProps-DmTJxEXG.js} +2 -2
- package/lib/{useExposedProps-DbIZXspi.js.map → useExposedProps-DmTJxEXG.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +3 -3
- package/lib/zudoku.components.js +6 -6
- package/lib/zudoku.hooks.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +5 -5
- package/lib/zudoku.plugin-api-keys.js +4 -4
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +6 -5
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +3 -3
- package/package.json +3 -3
- package/src/app/demo.html +1 -1
- package/src/app/main.css +2 -2
- package/src/lib/components/Banner.tsx +1 -1
- package/src/lib/components/Heading.tsx +3 -3
- package/src/lib/components/Layout.tsx +1 -4
- package/src/lib/components/Main.tsx +4 -3
- package/src/lib/components/MobileTopNavigation.tsx +2 -2
- package/src/lib/components/Pagination.tsx +3 -3
- package/src/lib/components/Search.tsx +1 -1
- package/src/lib/components/TopNavigation.tsx +1 -1
- package/src/lib/components/navigation/PoweredByZudoku.tsx +6 -1
- package/src/lib/components/navigation/Sidebar.tsx +1 -1
- package/src/lib/components/navigation/SidebarCategory.tsx +9 -5
- package/src/lib/components/navigation/SidebarItem.tsx +2 -3
- package/src/lib/components/navigation/Toc.tsx +4 -4
- package/src/lib/core/ZudokuContext.ts +2 -1
- package/src/lib/oas/parser/upgrade/index.ts +97 -27
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +1 -1
- package/src/lib/plugins/openapi/OperationListItem.tsx +15 -6
- package/src/lib/plugins/openapi/SchemaList.tsx +1 -1
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +23 -4
- package/src/lib/plugins/openapi/index.tsx +8 -7
- package/src/lib/plugins/openapi/interfaces.ts +4 -3
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +2 -2
- package/src/lib/plugins/openapi/playground/Playground.tsx +5 -5
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +2 -2
- package/src/lib/plugins/openapi/playground/SubmitButton.tsx +2 -2
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +2 -2
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +1 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +1 -1
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +2 -2
- package/src/lib/plugins/openapi/util/getRoutes.tsx +67 -3
- package/src/lib/ui/SyntaxHighlight.tsx +2 -2
- package/src/lib/util/traverse.ts +8 -5
- package/lib/Markdown-mFpg_n9p.js.map +0 -1
- package/lib/Pagination-DLPL5z77.js +0 -48
- package/lib/Pagination-DLPL5z77.js.map +0 -1
- package/lib/SchemaView-BYRn_-2l.js.map +0 -1
- package/lib/SlotletProvider-CS_nO-XT.js.map +0 -1
- package/lib/Toc-D_tV8_Ri.js.map +0 -1
- package/lib/circular-ByJI6Mci.js.map +0 -1
- package/lib/context-Lrf2Y9bR.js +0 -22
- package/lib/context-Lrf2Y9bR.js.map +0 -1
- package/lib/createServer-IW7v5hWm.js.map +0 -1
- package/lib/index-DuB48L78.js +0 -2184
- package/lib/index-DuB48L78.js.map +0 -1
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import { j as $ } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { d as
|
|
3
|
-
import { H as
|
|
4
|
-
import { ChevronsUpDownIcon as
|
|
5
|
-
import { b as
|
|
6
|
-
import {
|
|
7
|
-
import { S as
|
|
8
|
-
import { C as
|
|
9
|
-
import { I as
|
|
10
|
-
import { P as
|
|
2
|
+
import { d as vr, u as Ra, m as Ea, M as ka } from "./hook-8GM2HXNM.js";
|
|
3
|
+
import { H as Na } from "./RouteGuard-D2gX29iI.js";
|
|
4
|
+
import { ChevronsUpDownIcon as Zn, CheckIcon as Aa, CopyIcon as Ia, MinusIcon as Ua, PlusIcon as La, UnfoldVerticalIcon as Fa, FoldVerticalIcon as _a, ChevronsDownUpIcon as Ba } from "lucide-react";
|
|
5
|
+
import { b as Ha, c as Ma, a as za } from "./chunk-BAXFHI7N-BLTsN6tl.js";
|
|
6
|
+
import { u as Ze, a as De, d as _e, e as br, f as ea, C as ta, c as ra, b as pr, P as Wa, m as na, h as Ja, U as Ga } from "./index-CFf9AN-y.js";
|
|
7
|
+
import { S as Va, a as Da, b as Qa, c as Ka, e as Ya } from "./Select-CYaEBIYK.js";
|
|
8
|
+
import { C as Xa } from "./CategoryHeading-D06WK_Wo.js";
|
|
9
|
+
import { I as Za, S as aa, M as Qe, H as Ue, P as dr } from "./Markdown-DvdVn1O7.js";
|
|
10
|
+
import { P as eo } from "./Pagination-BgQxwq5j.js";
|
|
11
11
|
import { c as pe } from "./cn-qaFjX9_3.js";
|
|
12
|
-
import { useTransition as
|
|
13
|
-
import { Button as
|
|
14
|
-
import { u as Qe, i as to, P as ro, E as Ur, a as no, S as dr, g as ao } from "./SchemaView-BYRn_-2l.js";
|
|
15
|
-
import { u as xr } from "./context-Lrf2Y9bR.js";
|
|
12
|
+
import { useTransition as oa, useState as ve, useRef as ia, useEffect as xr, useLayoutEffect as to, useMemo as sa } from "react";
|
|
13
|
+
import { Button as la } from "./ui/Button.js";
|
|
16
14
|
import { VisuallyHidden as hr } from "@radix-ui/react-visually-hidden";
|
|
17
|
-
import { c as
|
|
18
|
-
import { Tabs as
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
15
|
+
import { c as ro } from "./index-CPNSgwSb.js";
|
|
16
|
+
import { Tabs as no, TabsList as ao, TabsTrigger as oo, TabsContent as io } from "./ui/Tabs.js";
|
|
17
|
+
import { i as so, P as lo, E as Ur, a as co, S as yr, g as uo } from "./SchemaView-Dt_-u8rW.js";
|
|
18
|
+
import { Card as fo } from "./ui/Card.js";
|
|
19
|
+
import * as pt from "@radix-ui/react-collapsible";
|
|
20
|
+
import { g as po, c as Ke, a as ho } from "./_commonjsHelpers-B4e78b8K.js";
|
|
21
|
+
import { a as yo, b as mo } from "./index-DGNSSXgR.js";
|
|
22
|
+
import { S as ca } from "./SyntaxHighlight-o7q0acut.js";
|
|
24
23
|
import { B as Lr } from "./Button-BBNrKpQd.js";
|
|
25
24
|
import * as Ge from "@radix-ui/react-tabs";
|
|
26
|
-
function
|
|
25
|
+
function go(e, n) {
|
|
27
26
|
return n;
|
|
28
27
|
}
|
|
29
28
|
const Ye = ({
|
|
@@ -53,10 +52,10 @@ const Ye = ({
|
|
|
53
52
|
!l && "hidden",
|
|
54
53
|
"row-start-1 col-start-1 self-center justify-self-end relative end-2 pointer-events-none"
|
|
55
54
|
),
|
|
56
|
-
children: /* @__PURE__ */ $.jsx(
|
|
55
|
+
children: /* @__PURE__ */ $.jsx(Zn, { size: 14 })
|
|
57
56
|
}
|
|
58
57
|
)
|
|
59
|
-
] }),
|
|
58
|
+
] }), vo = _e(
|
|
60
59
|
/* GraphQL */
|
|
61
60
|
`
|
|
62
61
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -71,7 +70,7 @@ const Ye = ({
|
|
|
71
70
|
), Fr = ({ url: e }) => {
|
|
72
71
|
const [n, t] = ve(!1);
|
|
73
72
|
return /* @__PURE__ */ $.jsx(
|
|
74
|
-
|
|
73
|
+
la,
|
|
75
74
|
{
|
|
76
75
|
onClick: () => {
|
|
77
76
|
navigator.clipboard.writeText(e).then(() => {
|
|
@@ -80,18 +79,18 @@ const Ye = ({
|
|
|
80
79
|
},
|
|
81
80
|
variant: "ghost",
|
|
82
81
|
size: "icon",
|
|
83
|
-
children: n ? /* @__PURE__ */ $.jsx(
|
|
82
|
+
children: n ? /* @__PURE__ */ $.jsx(Aa, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ $.jsx(Ia, { size: 14, strokeWidth: 1.3 })
|
|
84
83
|
}
|
|
85
84
|
);
|
|
86
|
-
},
|
|
87
|
-
const { input: e, type: n } =
|
|
85
|
+
}, bo = () => {
|
|
86
|
+
const { input: e, type: n } = Ze(), t = De(vo, { input: e, type: n }), a = vr(t), [, l] = oa(), { selectedServer: s, setSelectedServer: r } = br(
|
|
88
87
|
a.data.schema.servers
|
|
89
88
|
), { servers: o } = a.data.schema;
|
|
90
89
|
if (o.length === 0) return null;
|
|
91
90
|
const i = o.at(0);
|
|
92
91
|
return o.length === 1 ? /* @__PURE__ */ $.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
93
92
|
/* @__PURE__ */ $.jsx("span", { className: "font-medium text-sm", children: "Endpoint:" }),
|
|
94
|
-
/* @__PURE__ */ $.jsx(
|
|
93
|
+
/* @__PURE__ */ $.jsx(Za, { className: "text-xs px-2 py-1.5", selectOnClick: !0, children: i.url }),
|
|
95
94
|
/* @__PURE__ */ $.jsx(Fr, { url: i.url })
|
|
96
95
|
] }) : /* @__PURE__ */ $.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
97
96
|
/* @__PURE__ */ $.jsx("span", { className: "font-medium text-sm", children: "Endpoint" }),
|
|
@@ -110,7 +109,7 @@ const Ye = ({
|
|
|
110
109
|
),
|
|
111
110
|
/* @__PURE__ */ $.jsx(Fr, { url: s })
|
|
112
111
|
] });
|
|
113
|
-
},
|
|
112
|
+
}, xo = ro(
|
|
114
113
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
115
114
|
{
|
|
116
115
|
variants: {
|
|
@@ -128,9 +127,9 @@ const Ye = ({
|
|
|
128
127
|
}
|
|
129
128
|
);
|
|
130
129
|
function _r({ className: e, variant: n, ...t }) {
|
|
131
|
-
return /* @__PURE__ */ $.jsx("div", { className: pe(
|
|
130
|
+
return /* @__PURE__ */ $.jsx("div", { className: pe(xo({ variant: n }), e), ...t });
|
|
132
131
|
}
|
|
133
|
-
const
|
|
132
|
+
const Br = (e, n) => e ? n(e) : void 0, $o = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
134
133
|
type: "string"
|
|
135
134
|
}, wo = ({
|
|
136
135
|
parameter: e,
|
|
@@ -140,8 +139,8 @@ const xo = (e, n) => e ? n(e) : void 0, $o = (e) => e.schema != null && typeof e
|
|
|
140
139
|
const a = $o(e), [l, s] = ve(!1);
|
|
141
140
|
return /* @__PURE__ */ $.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1.5", children: [
|
|
142
141
|
/* @__PURE__ */ $.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
143
|
-
/* @__PURE__ */ $.jsx(
|
|
144
|
-
|
|
142
|
+
/* @__PURE__ */ $.jsx(aa, { asChild: !0, children: /* @__PURE__ */ $.jsx("code", { children: n === "path" ? /* @__PURE__ */ $.jsx(
|
|
143
|
+
ea,
|
|
145
144
|
{
|
|
146
145
|
name: e.name,
|
|
147
146
|
backgroundOpacity: "15%",
|
|
@@ -150,7 +149,7 @@ const xo = (e, n) => e ? n(e) : void 0, $o = (e) => e.schema != null && typeof e
|
|
|
150
149
|
}
|
|
151
150
|
) : e.name }) }),
|
|
152
151
|
/* @__PURE__ */ $.jsx(
|
|
153
|
-
|
|
152
|
+
lo,
|
|
154
153
|
{
|
|
155
154
|
schema: a,
|
|
156
155
|
extraItems: [
|
|
@@ -162,27 +161,27 @@ const xo = (e, n) => e ? n(e) : void 0, $o = (e) => e.schema != null && typeof e
|
|
|
162
161
|
)
|
|
163
162
|
] }),
|
|
164
163
|
e.description && /* @__PURE__ */ $.jsx(
|
|
165
|
-
|
|
164
|
+
Qe,
|
|
166
165
|
{
|
|
167
166
|
content: e.description,
|
|
168
167
|
className: "text-sm prose-p:my-1 prose-code:whitespace-pre-line"
|
|
169
168
|
}
|
|
170
169
|
),
|
|
171
170
|
a.type === "array" && a.items.enum ? /* @__PURE__ */ $.jsx(Ur, { values: a.items.enum }) : a.enum && /* @__PURE__ */ $.jsx(Ur, { values: a.enum }),
|
|
172
|
-
/* @__PURE__ */ $.jsx(
|
|
173
|
-
(a.type === "object" ||
|
|
174
|
-
|
|
171
|
+
/* @__PURE__ */ $.jsx(co, { schema: a }),
|
|
172
|
+
(a.type === "object" || so(a)) && /* @__PURE__ */ $.jsxs(
|
|
173
|
+
pt.Root,
|
|
175
174
|
{
|
|
176
175
|
defaultOpen: !1,
|
|
177
176
|
onOpenChange: s,
|
|
178
177
|
open: l,
|
|
179
178
|
children: [
|
|
180
|
-
/* @__PURE__ */ $.jsx(
|
|
181
|
-
l ? /* @__PURE__ */ $.jsx(
|
|
179
|
+
/* @__PURE__ */ $.jsx(pt.Trigger, { asChild: !0, children: /* @__PURE__ */ $.jsxs(la, { variant: "expand", size: "sm", children: [
|
|
180
|
+
l ? /* @__PURE__ */ $.jsx(Ua, { size: 12 }) : /* @__PURE__ */ $.jsx(La, { size: 12 }),
|
|
182
181
|
l ? "Hide properties" : "Show properties"
|
|
183
182
|
] }) }),
|
|
184
|
-
/* @__PURE__ */ $.jsx(
|
|
185
|
-
|
|
183
|
+
/* @__PURE__ */ $.jsx(pt.Content, { children: /* @__PURE__ */ $.jsx("div", { className: "mt-2", children: /* @__PURE__ */ $.jsx(
|
|
184
|
+
yr,
|
|
186
185
|
{
|
|
187
186
|
schema: "items" in a ? a.items : a
|
|
188
187
|
}
|
|
@@ -204,7 +203,7 @@ const xo = (e, n) => e ? n(e) : void 0, $o = (e) => e.schema != null && typeof e
|
|
|
204
203
|
] }),
|
|
205
204
|
n === "header" ? "Headers" : `${n} Parameters`
|
|
206
205
|
] }),
|
|
207
|
-
/* @__PURE__ */ $.jsx(
|
|
206
|
+
/* @__PURE__ */ $.jsx(fo, { children: /* @__PURE__ */ $.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: t.sort((l, s) => l.required === s.required ? 0 : l.required ? -1 : 1).map((l) => /* @__PURE__ */ $.jsx(
|
|
208
207
|
wo,
|
|
209
208
|
{
|
|
210
209
|
parameter: l,
|
|
@@ -214,17 +213,17 @@ const xo = (e, n) => e ? n(e) : void 0, $o = (e) => e.schema != null && typeof e
|
|
|
214
213
|
`${l.name}-${l.in}`
|
|
215
214
|
)) }) })
|
|
216
215
|
] });
|
|
217
|
-
var
|
|
216
|
+
var Hr = (e, n) => {
|
|
218
217
|
const t = e[n.name];
|
|
219
218
|
return t === void 0 ? (e[n.name] = n.value, e) : Array.isArray(t) ? (t.push(n.value), e) : (e[n.name] = [t, n.value], e);
|
|
220
|
-
},
|
|
219
|
+
}, Mr = "", zr = `
|
|
221
220
|
`, V = class {
|
|
222
221
|
/**
|
|
223
222
|
* Helper object to format and aggragate lines of code.
|
|
224
223
|
* Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
|
|
225
224
|
*/
|
|
226
225
|
constructor({ indent: e, join: n } = {}) {
|
|
227
|
-
this.postProcessors = [], this.code = [], this.indentationCharacter =
|
|
226
|
+
this.postProcessors = [], this.code = [], this.indentationCharacter = Mr, this.lineJoin = zr, this.indentLine = (t, a = 0) => `${this.indentationCharacter.repeat(a)}${t}`, this.unshift = (t, a) => {
|
|
228
227
|
const l = this.indentLine(t, a);
|
|
229
228
|
this.code.unshift(l);
|
|
230
229
|
}, this.push = (t, a) => {
|
|
@@ -237,54 +236,54 @@ var Br = (e, n) => {
|
|
|
237
236
|
return this.postProcessors.reduce((l, s) => s(l), t);
|
|
238
237
|
}, this.addPostProcessor = (t) => {
|
|
239
238
|
this.postProcessors = [...this.postProcessors, t];
|
|
240
|
-
}, this.indentationCharacter = e ||
|
|
239
|
+
}, this.indentationCharacter = e || Mr, this.lineJoin = n ?? zr;
|
|
241
240
|
}
|
|
242
|
-
},
|
|
241
|
+
}, dt, Wr;
|
|
243
242
|
function So() {
|
|
244
|
-
return
|
|
243
|
+
return Wr || (Wr = 1, dt = function(e) {
|
|
245
244
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
246
|
-
}),
|
|
245
|
+
}), dt;
|
|
247
246
|
}
|
|
248
|
-
var
|
|
247
|
+
var ht, Jr;
|
|
249
248
|
function Oo() {
|
|
250
|
-
return
|
|
249
|
+
return Jr || (Jr = 1, ht = function(e) {
|
|
251
250
|
var n = typeof e;
|
|
252
251
|
return e !== null && (n === "object" || n === "function");
|
|
253
|
-
}),
|
|
252
|
+
}), ht;
|
|
254
253
|
}
|
|
255
|
-
var Je = {},
|
|
254
|
+
var Je = {}, Gr;
|
|
256
255
|
function To() {
|
|
257
|
-
return
|
|
256
|
+
return Gr || (Gr = 1, Object.defineProperty(Je, "__esModule", { value: !0 }), Je.default = (e) => Object.getOwnPropertySymbols(e).filter((n) => Object.prototype.propertyIsEnumerable.call(e, n))), Je;
|
|
258
257
|
}
|
|
259
|
-
var
|
|
258
|
+
var yt, Vr;
|
|
260
259
|
function Po() {
|
|
261
|
-
if (
|
|
262
|
-
|
|
260
|
+
if (Vr) return yt;
|
|
261
|
+
Vr = 1;
|
|
263
262
|
const e = So(), n = Oo(), t = To().default;
|
|
264
|
-
return
|
|
263
|
+
return yt = (a, l, s) => {
|
|
265
264
|
const r = [];
|
|
266
|
-
return function o(i, c,
|
|
267
|
-
c = c || {}, c.indent = c.indent || " ",
|
|
268
|
-
let
|
|
269
|
-
c.inlineCharacterLimit === void 0 ?
|
|
265
|
+
return function o(i, c, p) {
|
|
266
|
+
c = c || {}, c.indent = c.indent || " ", p = p || "";
|
|
267
|
+
let d;
|
|
268
|
+
c.inlineCharacterLimit === void 0 ? d = {
|
|
270
269
|
newLine: `
|
|
271
270
|
`,
|
|
272
271
|
newLineOrSpace: `
|
|
273
272
|
`,
|
|
274
|
-
pad:
|
|
275
|
-
indent:
|
|
276
|
-
} :
|
|
273
|
+
pad: p,
|
|
274
|
+
indent: p + c.indent
|
|
275
|
+
} : d = {
|
|
277
276
|
newLine: "@@__STRINGIFY_OBJECT_NEW_LINE__@@",
|
|
278
277
|
newLineOrSpace: "@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",
|
|
279
278
|
pad: "@@__STRINGIFY_OBJECT_PAD__@@",
|
|
280
279
|
indent: "@@__STRINGIFY_OBJECT_INDENT__@@"
|
|
281
280
|
};
|
|
282
|
-
const
|
|
281
|
+
const m = (g) => {
|
|
283
282
|
if (c.inlineCharacterLimit === void 0)
|
|
284
|
-
return
|
|
285
|
-
const x =
|
|
286
|
-
return x.length <= c.inlineCharacterLimit ? x :
|
|
287
|
-
`).replace(new RegExp(
|
|
283
|
+
return g;
|
|
284
|
+
const x = g.replace(new RegExp(d.newLine, "g"), "").replace(new RegExp(d.newLineOrSpace, "g"), " ").replace(new RegExp(d.pad + "|" + d.indent, "g"), "");
|
|
285
|
+
return x.length <= c.inlineCharacterLimit ? x : g.replace(new RegExp(d.newLine + "|" + d.newLineOrSpace, "g"), `
|
|
286
|
+
`).replace(new RegExp(d.pad, "g"), p).replace(new RegExp(d.indent, "g"), p + c.indent);
|
|
288
287
|
};
|
|
289
288
|
if (r.indexOf(i) !== -1)
|
|
290
289
|
return '"[Circular]"';
|
|
@@ -296,32 +295,32 @@ function Po() {
|
|
|
296
295
|
if (i.length === 0)
|
|
297
296
|
return "[]";
|
|
298
297
|
r.push(i);
|
|
299
|
-
const
|
|
300
|
-
const
|
|
301
|
-
let
|
|
302
|
-
return c.transform && (
|
|
303
|
-
}).join("") +
|
|
304
|
-
return r.pop(), g
|
|
298
|
+
const g = "[" + d.newLine + i.map((x, v) => {
|
|
299
|
+
const u = i.length - 1 === v ? d.newLine : "," + d.newLineOrSpace;
|
|
300
|
+
let y = o(x, c, p + c.indent);
|
|
301
|
+
return c.transform && (y = c.transform(i, v, y)), d.indent + y + u;
|
|
302
|
+
}).join("") + d.pad + "]";
|
|
303
|
+
return r.pop(), m(g);
|
|
305
304
|
}
|
|
306
305
|
if (n(i)) {
|
|
307
|
-
let
|
|
308
|
-
if (c.filter && (
|
|
306
|
+
let g = Object.keys(i).concat(t(i));
|
|
307
|
+
if (c.filter && (g = g.filter((v) => c.filter(i, v))), g.length === 0)
|
|
309
308
|
return "{}";
|
|
310
309
|
r.push(i);
|
|
311
|
-
const x = "{" +
|
|
312
|
-
const
|
|
313
|
-
let
|
|
314
|
-
return c.transform && (
|
|
315
|
-
}).join("") +
|
|
316
|
-
return r.pop(),
|
|
310
|
+
const x = "{" + d.newLine + g.map((v, u) => {
|
|
311
|
+
const y = g.length - 1 === u ? d.newLine : "," + d.newLineOrSpace, h = typeof v == "symbol", j = !h && /^[a-z$_][a-z$_0-9]*$/i.test(v), T = h || j ? v : o(v, c);
|
|
312
|
+
let f = o(i[v], c, p + c.indent);
|
|
313
|
+
return c.transform && (f = c.transform(i, v, f)), d.indent + String(T) + ": " + f + y;
|
|
314
|
+
}).join("") + d.pad + "}";
|
|
315
|
+
return r.pop(), m(x);
|
|
317
316
|
}
|
|
318
|
-
return i = String(i).replace(/[\r\n]/g, (
|
|
317
|
+
return i = String(i).replace(/[\r\n]/g, (g) => g === `
|
|
319
318
|
` ? "\\n" : "\\r"), c.singleQuotes === !1 ? (i = i.replace(/"/g, '\\"'), `"${i}"`) : (i = i.replace(/\\?'/g, "\\'"), `'${i}'`);
|
|
320
319
|
}(a, l, s);
|
|
321
|
-
},
|
|
320
|
+
}, yt;
|
|
322
321
|
}
|
|
323
322
|
var qo = Po();
|
|
324
|
-
const ue = /* @__PURE__ */
|
|
323
|
+
const ue = /* @__PURE__ */ po(qo);
|
|
325
324
|
function Le(e, n = {}) {
|
|
326
325
|
const { delimiter: t = '"', escapeChar: a = "\\", escapeNewlines: l = !0 } = n;
|
|
327
326
|
return [...e.toString()].map((r) => r === "\b" ? `${a}b` : r === " " ? `${a}t` : r === `
|
|
@@ -357,9 +356,9 @@ var Fe = (e) => Le(e, { delimiter: "'" }), le = (e) => Le(e, { delimiter: '"' })
|
|
|
357
356
|
const t = fe(e, n);
|
|
358
357
|
if (t)
|
|
359
358
|
return e[t];
|
|
360
|
-
},
|
|
359
|
+
}, et = (e, n) => !!fe(e, n), Eo = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
|
|
361
360
|
(n) => e.indexOf(n) > -1
|
|
362
|
-
),
|
|
361
|
+
), Dr = class {
|
|
363
362
|
constructor(e) {
|
|
364
363
|
this.name = "", this.toString = () => `:${this.name}`, this.name = e;
|
|
365
364
|
}
|
|
@@ -367,14 +366,14 @@ var Fe = (e) => Le(e, { delimiter: "'" }), le = (e) => Le(e, { delimiter: '"' })
|
|
|
367
366
|
constructor(e) {
|
|
368
367
|
this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
|
|
369
368
|
}
|
|
370
|
-
},
|
|
369
|
+
}, ua = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), fa = (e) => e === void 0 ? !0 : ua(e) === "object" ? Object.keys(e).length === 0 : !1, Qr = (e) => (Object.keys(e).filter((n) => fa(e[n])).forEach((n) => {
|
|
371
370
|
delete e[n];
|
|
372
371
|
}), e), Ve = (e, n) => {
|
|
373
372
|
const t = " ".repeat(e);
|
|
374
373
|
return n.replace(/\n/g, `
|
|
375
374
|
${t}`);
|
|
376
|
-
},
|
|
377
|
-
switch (
|
|
375
|
+
}, mr = (e) => {
|
|
376
|
+
switch (ua(e)) {
|
|
378
377
|
case "string":
|
|
379
378
|
return `"${e.replace(/"/g, '\\"')}"`;
|
|
380
379
|
case "file":
|
|
@@ -387,14 +386,14 @@ ${t}`);
|
|
|
387
386
|
return `#"${e.source}"`;
|
|
388
387
|
case "object": {
|
|
389
388
|
const n = Object.keys(e).reduce((t, a) => {
|
|
390
|
-
const l = Ve(a.length + 2,
|
|
389
|
+
const l = Ve(a.length + 2, mr(e[a]));
|
|
391
390
|
return `${t}:${a} ${l}
|
|
392
391
|
`;
|
|
393
392
|
}, "").trim();
|
|
394
393
|
return `{${Ve(1, n)}}`;
|
|
395
394
|
}
|
|
396
395
|
case "array": {
|
|
397
|
-
const n = e.reduce((t, a) => `${t} ${
|
|
396
|
+
const n = e.reduce((t, a) => `${t} ${mr(a)}`, "").trim();
|
|
398
397
|
return `[${Ve(1, n)}]`;
|
|
399
398
|
}
|
|
400
399
|
default:
|
|
@@ -419,36 +418,36 @@ ${t}`);
|
|
|
419
418
|
switch (t.mimeType) {
|
|
420
419
|
case "application/json":
|
|
421
420
|
{
|
|
422
|
-
c["content-type"] = new
|
|
423
|
-
const
|
|
424
|
-
|
|
421
|
+
c["content-type"] = new Dr("json"), c["form-params"] = t.jsonObj;
|
|
422
|
+
const p = fe(c.headers, "content-type");
|
|
423
|
+
p && delete c.headers[p];
|
|
425
424
|
}
|
|
426
425
|
break;
|
|
427
426
|
case "application/x-www-form-urlencoded":
|
|
428
427
|
{
|
|
429
428
|
c["form-params"] = t.paramsObj;
|
|
430
|
-
const
|
|
431
|
-
|
|
429
|
+
const p = fe(c.headers, "content-type");
|
|
430
|
+
p && delete c.headers[p];
|
|
432
431
|
}
|
|
433
432
|
break;
|
|
434
433
|
case "text/plain":
|
|
435
434
|
{
|
|
436
435
|
c.body = t.text;
|
|
437
|
-
const
|
|
438
|
-
|
|
436
|
+
const p = fe(c.headers, "content-type");
|
|
437
|
+
p && delete c.headers[p];
|
|
439
438
|
}
|
|
440
439
|
break;
|
|
441
440
|
case "multipart/form-data": {
|
|
442
441
|
if (t.params) {
|
|
443
|
-
c.multipart = t.params.map((
|
|
444
|
-
name:
|
|
445
|
-
content: new ko(
|
|
442
|
+
c.multipart = t.params.map((d) => d.fileName && !d.value ? {
|
|
443
|
+
name: d.name,
|
|
444
|
+
content: new ko(d.fileName)
|
|
446
445
|
} : {
|
|
447
|
-
name:
|
|
448
|
-
content:
|
|
446
|
+
name: d.name,
|
|
447
|
+
content: d.value
|
|
449
448
|
});
|
|
450
|
-
const
|
|
451
|
-
|
|
449
|
+
const p = fe(c.headers, "content-type");
|
|
450
|
+
p && delete c.headers[p];
|
|
452
451
|
}
|
|
453
452
|
break;
|
|
454
453
|
}
|
|
@@ -456,18 +455,18 @@ ${t}`);
|
|
|
456
455
|
switch (ge(c.headers, "accept")) {
|
|
457
456
|
case "application/json":
|
|
458
457
|
{
|
|
459
|
-
c.accept = new
|
|
460
|
-
const
|
|
461
|
-
|
|
458
|
+
c.accept = new Dr("json");
|
|
459
|
+
const p = fe(c.headers, "accept");
|
|
460
|
+
p && delete c.headers[p];
|
|
462
461
|
}
|
|
463
462
|
break;
|
|
464
463
|
}
|
|
465
464
|
if (r(`(require '[clj-http.client :as client])
|
|
466
|
-
`),
|
|
465
|
+
`), fa(Qr(c)))
|
|
467
466
|
r(`(client/${n} "${a}")`);
|
|
468
467
|
else {
|
|
469
|
-
const
|
|
470
|
-
r(`(client/${n} "${a}" ${
|
|
468
|
+
const p = 11 + n.length + a.length, d = Ve(p, mr(Qr(c)));
|
|
469
|
+
r(`(client/${n} "${a}" ${d})`);
|
|
471
470
|
}
|
|
472
471
|
return o();
|
|
473
472
|
}
|
|
@@ -506,18 +505,18 @@ ${t}`);
|
|
|
506
505
|
extname: ".cs"
|
|
507
506
|
},
|
|
508
507
|
convert: ({ allHeaders: e, postData: n, method: t, fullUrl: a }, l) => {
|
|
509
|
-
var
|
|
508
|
+
var g, x;
|
|
510
509
|
const s = {
|
|
511
510
|
indent: " ",
|
|
512
511
|
...l
|
|
513
512
|
}, { push: r, join: o } = new V({ indent: s.indent });
|
|
514
513
|
r("using System.Net.Http.Headers;");
|
|
515
514
|
let i = "";
|
|
516
|
-
const c = !!e.cookie,
|
|
517
|
-
(c ||
|
|
518
|
-
const
|
|
519
|
-
t = t.toUpperCase(), t &&
|
|
520
|
-
const
|
|
515
|
+
const c = !!e.cookie, p = Io(e);
|
|
516
|
+
(c || p.length) && (i = "clientHandler", r("var clientHandler = new HttpClientHandler"), r("{"), c && r("UseCookies = false,", 1), p.length && r(`AutomaticDecompression = ${p.join(" | ")},`, 1), r("};")), r(`var client = new HttpClient(${i});`), r("var request = new HttpRequestMessage"), r("{");
|
|
517
|
+
const d = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
|
|
518
|
+
t = t.toUpperCase(), t && d.includes(t) ? t = `HttpMethod.${t[0]}${t.substring(1).toLowerCase()}` : t = `new HttpMethod("${t}")`, r(`Method = ${t},`, 1), r(`RequestUri = new Uri("${a}"),`, 1);
|
|
519
|
+
const m = Object.keys(e).filter((v) => {
|
|
521
520
|
switch (v.toLowerCase()) {
|
|
522
521
|
case "content-type":
|
|
523
522
|
case "content-length":
|
|
@@ -527,19 +526,19 @@ ${t}`);
|
|
|
527
526
|
return !0;
|
|
528
527
|
}
|
|
529
528
|
});
|
|
530
|
-
if (
|
|
529
|
+
if (m.length && (r("Headers =", 1), r("{", 1), m.forEach((v) => {
|
|
531
530
|
r(`{ "${v}", "${le(e[v])}" },`, 2);
|
|
532
531
|
}), r("},", 1)), n.text) {
|
|
533
532
|
const v = n.mimeType;
|
|
534
533
|
switch (v) {
|
|
535
534
|
case "application/x-www-form-urlencoded":
|
|
536
|
-
r("Content = new FormUrlEncodedContent(new Dictionary<string, string>", 1), r("{", 1), (
|
|
537
|
-
r(`{ "${
|
|
535
|
+
r("Content = new FormUrlEncodedContent(new Dictionary<string, string>", 1), r("{", 1), (g = n.params) == null || g.forEach((u) => {
|
|
536
|
+
r(`{ "${u.name}", "${u.value}" },`, 2);
|
|
538
537
|
}), r("}),", 1);
|
|
539
538
|
break;
|
|
540
539
|
case "multipart/form-data":
|
|
541
|
-
r("Content = new MultipartFormDataContent", 1), r("{", 1), (x = n.params) == null || x.forEach((
|
|
542
|
-
r(`new StringContent(${JSON.stringify(
|
|
540
|
+
r("Content = new MultipartFormDataContent", 1), r("{", 1), (x = n.params) == null || x.forEach((u) => {
|
|
541
|
+
r(`new StringContent(${JSON.stringify(u.value || "")})`, 2), r("{", 2), r("Headers =", 3), r("{", 3), u.contentType && r(`ContentType = new MediaTypeHeaderValue("${u.contentType}"),`, 4), r('ContentDisposition = new ContentDispositionHeaderValue("form-data")', 4), r("{", 4), r(`Name = "${u.name}",`, 5), u.fileName && r(`FileName = "${u.fileName}",`, 5), r("}", 4), r("}", 3), r("},", 2);
|
|
543
542
|
}), r("},", 1);
|
|
544
543
|
break;
|
|
545
544
|
default:
|
|
@@ -572,31 +571,31 @@ var Fo = {
|
|
|
572
571
|
|
|
573
572
|
`), r(`var options = new RestClientOptions("${n}");`), r("var client = new RestClient(options);"), r('var request = new RestRequest("");');
|
|
574
573
|
const c = l.mimeType && l.mimeType === "multipart/form-data";
|
|
575
|
-
switch (c && r("request.AlwaysMultipartFormData = true;"), Object.keys(t).forEach((
|
|
576
|
-
if (l.mimeType &&
|
|
574
|
+
switch (c && r("request.AlwaysMultipartFormData = true;"), Object.keys(t).forEach((p) => {
|
|
575
|
+
if (l.mimeType && p.toLowerCase() === "content-type" && l.text) {
|
|
577
576
|
c && l.boundary && r(`request.FormBoundary = "${l.boundary}";`);
|
|
578
577
|
return;
|
|
579
578
|
}
|
|
580
|
-
r(`request.AddHeader("${
|
|
581
|
-
}), a.forEach(({ name:
|
|
582
|
-
r(`request.AddCookie("${
|
|
579
|
+
r(`request.AddHeader("${p}", "${le(t[p])}");`);
|
|
580
|
+
}), a.forEach(({ name: p, value: d }) => {
|
|
581
|
+
r(`request.AddCookie("${p}", "${le(d)}", "${s.pathname}", "${s.host}");`);
|
|
583
582
|
}), l.mimeType) {
|
|
584
583
|
case "multipart/form-data":
|
|
585
584
|
if (!l.params) break;
|
|
586
|
-
l.params.forEach((
|
|
587
|
-
|
|
585
|
+
l.params.forEach((p) => {
|
|
586
|
+
p.fileName ? r(`request.AddFile("${p.name}", "${p.fileName}");`) : r(`request.AddParameter("${p.name}", "${p.value}");`);
|
|
588
587
|
});
|
|
589
588
|
break;
|
|
590
589
|
case "application/x-www-form-urlencoded":
|
|
591
590
|
if (!l.params) break;
|
|
592
|
-
l.params.forEach((
|
|
593
|
-
r(`request.AddParameter("${
|
|
591
|
+
l.params.forEach((p) => {
|
|
592
|
+
r(`request.AddParameter("${p.name}", "${p.value}");`);
|
|
594
593
|
});
|
|
595
594
|
break;
|
|
596
595
|
case "application/json": {
|
|
597
596
|
if (!l.text) break;
|
|
598
|
-
const
|
|
599
|
-
r(`request.AddJsonBody(${
|
|
597
|
+
const p = JSON.stringify(l.text);
|
|
598
|
+
r(`request.AddJsonBody(${p}, false);`);
|
|
600
599
|
break;
|
|
601
600
|
}
|
|
602
601
|
default:
|
|
@@ -627,14 +626,14 @@ var Fo = {
|
|
|
627
626
|
extname: ".go"
|
|
628
627
|
},
|
|
629
628
|
convert: ({ postData: e, method: n, allHeaders: t, fullUrl: a }, l = {}) => {
|
|
630
|
-
const { blank: s, push: r, join: o } = new V({ indent: " " }), { showBoilerplate: i = !0, checkErrors: c = !1, printBody:
|
|
631
|
-
c && (r("if err != nil {",
|
|
629
|
+
const { blank: s, push: r, join: o } = new V({ indent: " " }), { showBoilerplate: i = !0, checkErrors: c = !1, printBody: p = !0, timeout: d = -1 } = l, m = c ? "err" : "_", g = i ? 1 : 0, x = () => {
|
|
630
|
+
c && (r("if err != nil {", g), r("panic(err)", g + 1), r("}", g));
|
|
632
631
|
};
|
|
633
|
-
i && (r("package main"), s(), r("import ("), r('"fmt"',
|
|
634
|
-
const v =
|
|
635
|
-
return
|
|
636
|
-
r(`req.Header.Add("${
|
|
637
|
-
}), s()), r(`res, ${
|
|
632
|
+
i && (r("package main"), s(), r("import ("), r('"fmt"', g), d > 0 && r('"time"', g), e.text && r('"strings"', g), r('"net/http"', g), p && r('"io"', g), r(")"), s(), r("func main() {"), s());
|
|
633
|
+
const v = d > 0, u = v, y = u ? "client" : "http.DefaultClient";
|
|
634
|
+
return u && (r("client := http.Client{", g), v && r(`Timeout: time.Duration(${d} * time.Second),`, g + 1), r("}", g), s()), r(`url := "${a}"`, g), s(), e.text ? (r(`payload := strings.NewReader(${JSON.stringify(e.text)})`, g), s(), r(`req, ${m} := http.NewRequest("${n}", url, payload)`, g), s()) : (r(`req, ${m} := http.NewRequest("${n}", url, nil)`, g), s()), x(), Object.keys(t).length && (Object.keys(t).forEach((h) => {
|
|
635
|
+
r(`req.Header.Add("${h}", "${le(t[h])}")`, g);
|
|
636
|
+
}), s()), r(`res, ${m} := ${y}.Do(req)`, g), x(), p && (s(), r("defer res.Body.Close()", g), r(`body, ${m} := io.ReadAll(res.Body)`, g), x()), s(), p && r("fmt.Println(string(body))", g), i && (s(), r("}")), o();
|
|
638
637
|
}
|
|
639
638
|
}, Ho = {
|
|
640
639
|
info: {
|
|
@@ -646,7 +645,7 @@ var Fo = {
|
|
|
646
645
|
clientsById: {
|
|
647
646
|
native: Bo
|
|
648
647
|
}
|
|
649
|
-
},
|
|
648
|
+
}, Kr = `\r
|
|
650
649
|
`, Mo = {
|
|
651
650
|
info: {
|
|
652
651
|
key: "http1.1",
|
|
@@ -661,19 +660,19 @@ var Fo = {
|
|
|
661
660
|
autoContentLength: !0,
|
|
662
661
|
autoHost: !0,
|
|
663
662
|
...r
|
|
664
|
-
}, { blank: i, push: c, join:
|
|
665
|
-
c(`${e} ${
|
|
666
|
-
const
|
|
667
|
-
if (
|
|
668
|
-
const
|
|
669
|
-
c(`${
|
|
670
|
-
}), o.autoHost && !
|
|
671
|
-
const
|
|
672
|
-
c(`Content-Length: ${
|
|
663
|
+
}, { blank: i, push: c, join: p } = new V({ indent: "", join: Kr }), d = o.absoluteURI ? n : t.path;
|
|
664
|
+
c(`${e} ${d} ${a}`);
|
|
665
|
+
const m = Object.keys(l);
|
|
666
|
+
if (m.forEach((v) => {
|
|
667
|
+
const u = v.toLowerCase().replace(/(^|-)(\w)/g, (y) => y.toUpperCase());
|
|
668
|
+
c(`${u}: ${l[v]}`);
|
|
669
|
+
}), o.autoHost && !m.includes("host") && c(`Host: ${t.host}`), o.autoContentLength && s.text && !m.includes("content-length")) {
|
|
670
|
+
const u = new TextEncoder().encode(s.text).length.toString();
|
|
671
|
+
c(`Content-Length: ${u}`);
|
|
673
672
|
}
|
|
674
673
|
i();
|
|
675
|
-
const
|
|
676
|
-
return `${
|
|
674
|
+
const g = p(), x = s.text || "";
|
|
675
|
+
return `${g}${Kr}${x}`;
|
|
677
676
|
}
|
|
678
677
|
}, zo = {
|
|
679
678
|
info: {
|
|
@@ -735,9 +734,9 @@ var Fo = {
|
|
|
735
734
|
const s = {
|
|
736
735
|
indent: " ",
|
|
737
736
|
...l
|
|
738
|
-
}, { push: r, blank: o, join: i } = new V({ indent: s.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"],
|
|
739
|
-
return r("OkHttpClient client = new OkHttpClient();"), o(), 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()) ?
|
|
740
|
-
r(`.addHeader("${
|
|
737
|
+
}, { push: r, blank: o, join: i } = new V({ indent: s.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], p = ["POST", "PUT", "DELETE", "PATCH"];
|
|
738
|
+
return r("OkHttpClient client = new OkHttpClient();"), o(), e.text && (e.boundary ? r(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : r(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), r(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), r("Request request = new Request.Builder()"), r(`.url("${t}")`, 1), c.includes(n.toUpperCase()) ? p.includes(n.toUpperCase()) ? e.text ? r(`.${n.toLowerCase()}(body)`, 1) : r(`.${n.toLowerCase()}(null)`, 1) : r(`.${n.toLowerCase()}()`, 1) : e.text ? r(`.method("${n.toUpperCase()}", body)`, 1) : r(`.method("${n.toUpperCase()}", null)`, 1), Object.keys(a).forEach((d) => {
|
|
739
|
+
r(`.addHeader("${d}", "${le(a[d])}")`, 1);
|
|
741
740
|
}), r(".build();", 1), o(), r("Response response = client.newCall(request).execute();"), i();
|
|
742
741
|
}
|
|
743
742
|
}, Vo = {
|
|
@@ -782,36 +781,36 @@ var Fo = {
|
|
|
782
781
|
const r = {
|
|
783
782
|
indent: " ",
|
|
784
783
|
...s
|
|
785
|
-
}, { blank: o, push: i, join: c, addPostProcessor:
|
|
784
|
+
}, { blank: o, push: i, join: c, addPostProcessor: p } = new V({ indent: r.indent });
|
|
786
785
|
i("import axios from 'axios';"), o();
|
|
787
|
-
const
|
|
786
|
+
const d = {
|
|
788
787
|
method: n,
|
|
789
788
|
url: t
|
|
790
789
|
};
|
|
791
|
-
switch (Object.keys(a).length && (
|
|
790
|
+
switch (Object.keys(a).length && (d.params = a), Object.keys(e).length && (d.headers = e), l.mimeType) {
|
|
792
791
|
case "application/x-www-form-urlencoded":
|
|
793
|
-
l.params && (i("const encodedParams = new URLSearchParams();"), l.params.forEach((
|
|
794
|
-
i(`encodedParams.set('${
|
|
795
|
-
}), o(),
|
|
792
|
+
l.params && (i("const encodedParams = new URLSearchParams();"), l.params.forEach((g) => {
|
|
793
|
+
i(`encodedParams.set('${g.name}', '${g.value}');`);
|
|
794
|
+
}), o(), d.data = "encodedParams,", p((g) => g.replace(/'encodedParams,'/, "encodedParams,")));
|
|
796
795
|
break;
|
|
797
796
|
case "application/json":
|
|
798
|
-
l.jsonObj && (
|
|
797
|
+
l.jsonObj && (d.data = l.jsonObj);
|
|
799
798
|
break;
|
|
800
799
|
case "multipart/form-data":
|
|
801
800
|
if (!l.params)
|
|
802
801
|
break;
|
|
803
|
-
i("const form = new FormData();"), l.params.forEach((
|
|
804
|
-
i(`form.append('${
|
|
805
|
-
}), o(),
|
|
802
|
+
i("const form = new FormData();"), l.params.forEach((g) => {
|
|
803
|
+
i(`form.append('${g.name}', '${g.value || g.fileName || ""}');`);
|
|
804
|
+
}), o(), d.data = "[form]";
|
|
806
805
|
break;
|
|
807
806
|
default:
|
|
808
|
-
l.text && (
|
|
807
|
+
l.text && (d.data = l.text);
|
|
809
808
|
}
|
|
810
|
-
const
|
|
809
|
+
const m = ue(d, {
|
|
811
810
|
indent: " ",
|
|
812
811
|
inlineCharacterLimit: 80
|
|
813
812
|
}).replace('"[form]"', "form");
|
|
814
|
-
return i(`const options = ${
|
|
813
|
+
return i(`const options = ${m};`), o(), 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();
|
|
815
814
|
}
|
|
816
815
|
}, Ko = {
|
|
817
816
|
info: {
|
|
@@ -839,9 +838,9 @@ var Fo = {
|
|
|
839
838
|
case "multipart/form-data":
|
|
840
839
|
if (!t.params)
|
|
841
840
|
break;
|
|
842
|
-
const
|
|
843
|
-
|
|
844
|
-
i(`form.append('${
|
|
841
|
+
const p = fe(n, "content-type");
|
|
842
|
+
p && delete n[p], i("const form = new FormData();"), t.params.forEach((d) => {
|
|
843
|
+
i(`form.append('${d.name}', '${d.value || d.fileName || ""}');`);
|
|
845
844
|
}), r();
|
|
846
845
|
break;
|
|
847
846
|
default:
|
|
@@ -854,14 +853,14 @@ var Fo = {
|
|
|
854
853
|
// The Fetch API body only accepts string parameters, but stringified JSON can be difficult
|
|
855
854
|
// to read, so we keep the object as a literal and use this transform function to wrap the
|
|
856
855
|
// literal in a `JSON.stringify` call.
|
|
857
|
-
transform: (
|
|
858
|
-
if (
|
|
856
|
+
transform: (p, d, m) => {
|
|
857
|
+
if (d === "body") {
|
|
859
858
|
if (t.mimeType === "application/x-www-form-urlencoded")
|
|
860
|
-
return `new URLSearchParams(${
|
|
859
|
+
return `new URLSearchParams(${m})`;
|
|
861
860
|
if (t.mimeType === "application/json")
|
|
862
|
-
return `JSON.stringify(${
|
|
861
|
+
return `JSON.stringify(${m})`;
|
|
863
862
|
}
|
|
864
|
-
return
|
|
863
|
+
return m;
|
|
865
864
|
}
|
|
866
865
|
})};`
|
|
867
866
|
), r(), t.params && t.mimeType === "multipart/form-data" && (i("options.body = form;"), r()), i(`fetch('${a}', options)`), i(".then(response => response.json())", 1), i(".then(response => console.log(response))", 1), i(".catch(err => console.error(err));", 1), o();
|
|
@@ -875,7 +874,7 @@ var Fo = {
|
|
|
875
874
|
extname: ".js"
|
|
876
875
|
},
|
|
877
876
|
convert: ({ fullUrl: e, method: n, allHeaders: t, postData: a }, l) => {
|
|
878
|
-
var
|
|
877
|
+
var d;
|
|
879
878
|
const s = {
|
|
880
879
|
indent: " ",
|
|
881
880
|
...l
|
|
@@ -896,19 +895,19 @@ var Fo = {
|
|
|
896
895
|
case "multipart/form-data":
|
|
897
896
|
if (!a.params)
|
|
898
897
|
break;
|
|
899
|
-
if (o("const form = new FormData();"), a.params.forEach((
|
|
900
|
-
o(`form.append('${
|
|
901
|
-
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]",
|
|
902
|
-
const
|
|
903
|
-
|
|
898
|
+
if (o("const form = new FormData();"), a.params.forEach((m) => {
|
|
899
|
+
o(`form.append('${m.name}', '${m.value || m.fileName || ""}');`);
|
|
900
|
+
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]", et(t, "content-type") && (d = ge(t, "content-type")) != null && d.includes("boundary")) {
|
|
901
|
+
const m = fe(t, "content-type");
|
|
902
|
+
m && delete c.headers[m];
|
|
904
903
|
}
|
|
905
904
|
r();
|
|
906
905
|
break;
|
|
907
906
|
default:
|
|
908
907
|
a.text && (c.data = a.text);
|
|
909
908
|
}
|
|
910
|
-
const
|
|
911
|
-
return o(`const settings = ${
|
|
909
|
+
const p = ue(c, { indent: s.indent }).replace("'[form]'", "form");
|
|
910
|
+
return o(`const settings = ${p};`), r(), o("$.ajax(settings).done(function (response) {"), o("console.log(response);", 1), o("});"), i();
|
|
912
911
|
}
|
|
913
912
|
}, Xo = {
|
|
914
913
|
info: {
|
|
@@ -936,19 +935,19 @@ var Fo = {
|
|
|
936
935
|
case "multipart/form-data":
|
|
937
936
|
if (!e.params)
|
|
938
937
|
break;
|
|
939
|
-
if (o("const data = new FormData();"), e.params.forEach((
|
|
940
|
-
o(`data.append('${
|
|
941
|
-
}),
|
|
942
|
-
const
|
|
943
|
-
|
|
938
|
+
if (o("const data = new FormData();"), e.params.forEach((p) => {
|
|
939
|
+
o(`data.append('${p.name}', '${p.value || p.fileName || ""}');`);
|
|
940
|
+
}), et(n, "content-type") && (c = ge(n, "content-type")) != null && c.includes("boundary")) {
|
|
941
|
+
const p = fe(n, "content-type");
|
|
942
|
+
p && delete n[p];
|
|
944
943
|
}
|
|
945
944
|
r();
|
|
946
945
|
break;
|
|
947
946
|
default:
|
|
948
947
|
o(`const data = ${e.text ? `'${e.text}'` : "null"};`), r();
|
|
949
948
|
}
|
|
950
|
-
return o("const xhr = new XMLHttpRequest();"), s.cors && o("xhr.withCredentials = true;"), r(), o("xhr.addEventListener('readystatechange', function () {"), o("if (this.readyState === this.DONE) {", 1), o("console.log(this.responseText);", 2), o("}", 1), o("});"), r(), o(`xhr.open('${t}', '${a}');`), Object.keys(n).forEach((
|
|
951
|
-
o(`xhr.setRequestHeader('${
|
|
949
|
+
return o("const xhr = new XMLHttpRequest();"), s.cors && o("xhr.withCredentials = true;"), r(), o("xhr.addEventListener('readystatechange', function () {"), o("if (this.readyState === this.DONE) {", 1), o("console.log(this.responseText);", 2), o("}", 1), o("});"), r(), o(`xhr.open('${t}', '${a}');`), Object.keys(n).forEach((p) => {
|
|
950
|
+
o(`xhr.setRequestHeader('${p}', '${Fe(n[p])}');`);
|
|
952
951
|
}), r(), o("xhr.send(data);"), i();
|
|
953
952
|
}
|
|
954
953
|
}, Zo = {
|
|
@@ -1018,9 +1017,9 @@ var Fo = {
|
|
|
1018
1017
|
const s = {
|
|
1019
1018
|
indent: " ",
|
|
1020
1019
|
...l
|
|
1021
|
-
}, { blank: r, join: o, push: i } = new V({ indent: s.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"],
|
|
1022
|
-
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()) ?
|
|
1023
|
-
i(`.addHeader("${
|
|
1020
|
+
}, { blank: r, join: o, push: i } = new V({ indent: s.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], p = ["POST", "PUT", "DELETE", "PATCH"];
|
|
1021
|
+
return i("val client = OkHttpClient()"), r(), e.text && (e.boundary ? i(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : i(`val mediaType = MediaType.parse("${e.mimeType}")`), i(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), i("val request = Request.Builder()"), i(`.url("${n}")`, 1), c.includes(t.toUpperCase()) ? p.includes(t.toUpperCase()) ? e.text ? i(`.${t.toLowerCase()}(body)`, 1) : i(`.${t.toLowerCase()}(null)`, 1) : i(`.${t.toLowerCase()}()`, 1) : e.text ? i(`.method("${t.toUpperCase()}", body)`, 1) : i(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(a).forEach((d) => {
|
|
1022
|
+
i(`.addHeader("${d}", "${le(a[d])}")`, 1);
|
|
1024
1023
|
}), i(".build()", 1), r(), i("val response = client.newCall(request).execute()"), o();
|
|
1025
1024
|
}
|
|
1026
1025
|
}, ni = {
|
|
@@ -1047,24 +1046,24 @@ var Fo = {
|
|
|
1047
1046
|
...l
|
|
1048
1047
|
}, { blank: r, join: o, push: i, addPostProcessor: c } = new V({ indent: s.indent });
|
|
1049
1048
|
i("const axios = require('axios');");
|
|
1050
|
-
const
|
|
1049
|
+
const p = {
|
|
1051
1050
|
method: e,
|
|
1052
1051
|
url: n
|
|
1053
1052
|
};
|
|
1054
|
-
switch (Object.keys(t).length && (
|
|
1053
|
+
switch (Object.keys(t).length && (p.headers = t), a.mimeType) {
|
|
1055
1054
|
case "application/x-www-form-urlencoded":
|
|
1056
|
-
a.params && (i("const { URLSearchParams } = require('url');"), r(), i("const encodedParams = new URLSearchParams();"), a.params.forEach((
|
|
1057
|
-
i(`encodedParams.set('${
|
|
1058
|
-
}), r(),
|
|
1055
|
+
a.params && (i("const { URLSearchParams } = require('url');"), r(), i("const encodedParams = new URLSearchParams();"), a.params.forEach((m) => {
|
|
1056
|
+
i(`encodedParams.set('${m.name}', '${m.value}');`);
|
|
1057
|
+
}), r(), p.data = "encodedParams,", c((m) => m.replace(/'encodedParams,'/, "encodedParams,")));
|
|
1059
1058
|
break;
|
|
1060
1059
|
case "application/json":
|
|
1061
|
-
r(), a.jsonObj && (
|
|
1060
|
+
r(), a.jsonObj && (p.data = a.jsonObj);
|
|
1062
1061
|
break;
|
|
1063
1062
|
default:
|
|
1064
|
-
r(), a.text && (
|
|
1063
|
+
r(), a.text && (p.data = a.text);
|
|
1065
1064
|
}
|
|
1066
|
-
const
|
|
1067
|
-
return i(`const options = ${
|
|
1065
|
+
const d = ue(p, { indent: " ", inlineCharacterLimit: 80 });
|
|
1066
|
+
return i(`const options = ${d};`), 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), o();
|
|
1068
1067
|
}
|
|
1069
1068
|
}, oi = {
|
|
1070
1069
|
info: {
|
|
@@ -1082,49 +1081,49 @@ var Fo = {
|
|
|
1082
1081
|
...s
|
|
1083
1082
|
};
|
|
1084
1083
|
let o = !1;
|
|
1085
|
-
const { blank: i, push: c, join:
|
|
1084
|
+
const { blank: i, push: c, join: p, unshift: d } = new V({ indent: r.indent });
|
|
1086
1085
|
c("const fetch = require('node-fetch');");
|
|
1087
|
-
const
|
|
1086
|
+
const m = n, g = {
|
|
1088
1087
|
method: e
|
|
1089
1088
|
};
|
|
1090
|
-
switch (Object.keys(a).length && (
|
|
1089
|
+
switch (Object.keys(a).length && (g.headers = a), t.mimeType) {
|
|
1091
1090
|
case "application/x-www-form-urlencoded":
|
|
1092
|
-
|
|
1093
|
-
c(`encodedParams.set('${
|
|
1094
|
-
}),
|
|
1091
|
+
d("const { URLSearchParams } = require('url');"), c("const encodedParams = new URLSearchParams();"), i(), (v = t.params) == null || v.forEach((y) => {
|
|
1092
|
+
c(`encodedParams.set('${y.name}', '${y.value}');`);
|
|
1093
|
+
}), g.body = "encodedParams";
|
|
1095
1094
|
break;
|
|
1096
1095
|
case "application/json":
|
|
1097
|
-
t.jsonObj && (
|
|
1096
|
+
t.jsonObj && (g.body = t.jsonObj);
|
|
1098
1097
|
break;
|
|
1099
1098
|
case "multipart/form-data":
|
|
1100
1099
|
if (!t.params)
|
|
1101
1100
|
break;
|
|
1102
|
-
const
|
|
1103
|
-
|
|
1104
|
-
if (!
|
|
1105
|
-
c(`formData.append('${
|
|
1101
|
+
const u = fe(a, "content-type");
|
|
1102
|
+
u && delete a[u], d("const FormData = require('form-data');"), c("const formData = new FormData();"), i(), t.params.forEach((y) => {
|
|
1103
|
+
if (!y.fileName && !y.fileName && !y.contentType) {
|
|
1104
|
+
c(`formData.append('${y.name}', '${y.value}');`);
|
|
1106
1105
|
return;
|
|
1107
1106
|
}
|
|
1108
|
-
|
|
1107
|
+
y.fileName && (o = !0, c(`formData.append('${y.name}', fs.createReadStream('${y.fileName}'));`));
|
|
1109
1108
|
});
|
|
1110
1109
|
break;
|
|
1111
1110
|
default:
|
|
1112
|
-
t.text && (
|
|
1111
|
+
t.text && (g.body = t.text);
|
|
1113
1112
|
}
|
|
1114
1113
|
if (l.length) {
|
|
1115
|
-
const
|
|
1116
|
-
|
|
1114
|
+
const u = l.map(({ name: y, value: h }) => `${encodeURIComponent(y)}=${encodeURIComponent(h)}`).join("; ");
|
|
1115
|
+
g.headers || (g.headers = {}), g.headers.cookie = u;
|
|
1117
1116
|
}
|
|
1118
|
-
i(), c(`const url = '${
|
|
1119
|
-
const x = ue(
|
|
1117
|
+
i(), c(`const url = '${m}';`), g.headers && !Object.keys(g.headers).length && delete g.headers;
|
|
1118
|
+
const x = ue(g, {
|
|
1120
1119
|
indent: " ",
|
|
1121
1120
|
inlineCharacterLimit: 80,
|
|
1122
1121
|
// The Fetch API body only accepts string parameters, but stringified JSON can be difficult to
|
|
1123
1122
|
// read, so we keep the object as a literal and use this transform function to wrap the literal
|
|
1124
1123
|
// in a `JSON.stringify` call.
|
|
1125
|
-
transform: (
|
|
1124
|
+
transform: (u, y, h) => y === "body" && t.mimeType === "application/json" ? `JSON.stringify(${h})` : h
|
|
1126
1125
|
});
|
|
1127
|
-
return c(`const options = ${x};`), i(), o &&
|
|
1126
|
+
return c(`const options = ${x};`), i(), o && d("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (c("options.body = formData;"), i()), c("fetch(url, options)"), c(".then(res => res.json())", 1), c(".then(json => console.log(json))", 1), c(".catch(err => console.error('error:' + err));", 1), p().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
|
|
1128
1127
|
}
|
|
1129
1128
|
}, ii = {
|
|
1130
1129
|
info: {
|
|
@@ -1135,15 +1134,15 @@ var Fo = {
|
|
|
1135
1134
|
extname: ".cjs"
|
|
1136
1135
|
},
|
|
1137
1136
|
convert: ({ uriObj: e, method: n, allHeaders: t, postData: a }, l = {}) => {
|
|
1138
|
-
var
|
|
1139
|
-
const { indent: s = " " } = l, { blank: r, join: o, push: i, unshift: c } = new V({ indent: s }),
|
|
1137
|
+
var d;
|
|
1138
|
+
const { indent: s = " " } = l, { blank: r, join: o, push: i, unshift: c } = new V({ indent: s }), p = {
|
|
1140
1139
|
method: n,
|
|
1141
1140
|
hostname: e.hostname,
|
|
1142
1141
|
port: e.port,
|
|
1143
1142
|
path: e.path,
|
|
1144
1143
|
headers: t
|
|
1145
1144
|
};
|
|
1146
|
-
switch (i(`const http = require('${(
|
|
1145
|
+
switch (i(`const http = require('${(d = e.protocol) == null ? void 0 : d.replace(":", "")}');`), r(), i(`const options = ${ue(p, { indent: s })};`), 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(), a.mimeType) {
|
|
1147
1146
|
case "application/x-www-form-urlencoded":
|
|
1148
1147
|
a.paramsObj && (c("const qs = require('querystring');"), i(
|
|
1149
1148
|
`req.write(qs.stringify(${ue(a.paramsObj, {
|
|
@@ -1180,8 +1179,8 @@ var Fo = {
|
|
|
1180
1179
|
...r
|
|
1181
1180
|
};
|
|
1182
1181
|
let i = !1;
|
|
1183
|
-
const { push: c, blank:
|
|
1184
|
-
c("const request = require('request');"),
|
|
1182
|
+
const { push: c, blank: p, join: d, unshift: m, addPostProcessor: g } = new V({ indent: o.indent });
|
|
1183
|
+
c("const request = require('request');"), p();
|
|
1185
1184
|
const x = {
|
|
1186
1185
|
method: e,
|
|
1187
1186
|
url: t
|
|
@@ -1201,22 +1200,22 @@ var Fo = {
|
|
|
1201
1200
|
x.formData[v.name] = v.value;
|
|
1202
1201
|
return;
|
|
1203
1202
|
}
|
|
1204
|
-
let
|
|
1205
|
-
v.fileName ? (i = !0,
|
|
1203
|
+
let u = {};
|
|
1204
|
+
v.fileName ? (i = !0, u = {
|
|
1206
1205
|
value: `fs.createReadStream(${v.fileName})`,
|
|
1207
1206
|
options: {
|
|
1208
1207
|
filename: v.fileName,
|
|
1209
1208
|
contentType: v.contentType ? v.contentType : null
|
|
1210
1209
|
}
|
|
1211
|
-
}) : v.value && (
|
|
1212
|
-
}),
|
|
1210
|
+
}) : v.value && (u.value = v.value), x.formData[v.name] = u;
|
|
1211
|
+
}), g((v) => v.replace(/'fs\.createReadStream\((.*)\)'/, "fs.createReadStream('$1')"));
|
|
1213
1212
|
break;
|
|
1214
1213
|
default:
|
|
1215
1214
|
a.text && (x.body = a.text);
|
|
1216
1215
|
}
|
|
1217
|
-
return s.length && (x.jar = "JAR", c("const jar = request.jar();"), s.forEach(({ name: v, value:
|
|
1218
|
-
c(`jar.setCookie(request.cookie('${encodeURIComponent(v)}=${encodeURIComponent(
|
|
1219
|
-
}),
|
|
1216
|
+
return s.length && (x.jar = "JAR", c("const jar = request.jar();"), s.forEach(({ name: v, value: u }) => {
|
|
1217
|
+
c(`jar.setCookie(request.cookie('${encodeURIComponent(v)}=${encodeURIComponent(u)}'), '${n}');`);
|
|
1218
|
+
}), p(), g((v) => v.replace(/'JAR'/, "jar"))), i && m("const fs = require('fs');"), c(`const options = ${ue(x, { indent: " ", inlineCharacterLimit: 80 })};`), p(), c("request(options, function (error, response, body) {"), c("if (error) throw new Error(error);", 1), p(), c("console.log(body);", 1), c("});"), d();
|
|
1220
1219
|
}
|
|
1221
1220
|
}, li = {
|
|
1222
1221
|
info: {
|
|
@@ -1232,32 +1231,32 @@ var Fo = {
|
|
|
1232
1231
|
...r
|
|
1233
1232
|
};
|
|
1234
1233
|
let i = !1;
|
|
1235
|
-
const { addPostProcessor: c, blank:
|
|
1234
|
+
const { addPostProcessor: c, blank: p, join: d, push: m, unshift: g } = new V({
|
|
1236
1235
|
indent: o.indent
|
|
1237
1236
|
});
|
|
1238
|
-
switch (
|
|
1239
|
-
|
|
1240
|
-
}),
|
|
1237
|
+
switch (m("const unirest = require('unirest');"), p(), m(`const req = unirest('${e}', '${n}');`), p(), t.length && (m("const CookieJar = unirest.jar();"), t.forEach((x) => {
|
|
1238
|
+
m(`CookieJar.add('${encodeURIComponent(x.name)}=${encodeURIComponent(x.value)}', '${n}');`);
|
|
1239
|
+
}), m("req.jar(CookieJar);"), p()), Object.keys(a).length && (m(`req.query(${ue(a, { indent: o.indent })});`), p()), Object.keys(s).length && (m(`req.headers(${ue(s, { indent: o.indent })});`), p()), l.mimeType) {
|
|
1241
1240
|
case "application/x-www-form-urlencoded":
|
|
1242
|
-
l.paramsObj && (
|
|
1241
|
+
l.paramsObj && (m(`req.form(${ue(l.paramsObj, { indent: o.indent })});`), p());
|
|
1243
1242
|
break;
|
|
1244
1243
|
case "application/json":
|
|
1245
|
-
l.jsonObj && (
|
|
1244
|
+
l.jsonObj && (m("req.type('json');"), m(`req.send(${ue(l.jsonObj, { indent: o.indent })});`), p());
|
|
1246
1245
|
break;
|
|
1247
1246
|
case "multipart/form-data": {
|
|
1248
1247
|
if (!l.params)
|
|
1249
1248
|
break;
|
|
1250
1249
|
const x = [];
|
|
1251
1250
|
l.params.forEach((v) => {
|
|
1252
|
-
const
|
|
1253
|
-
v.fileName && !v.value ? (i = !0,
|
|
1254
|
-
}),
|
|
1251
|
+
const u = {};
|
|
1252
|
+
v.fileName && !v.value ? (i = !0, u.body = `fs.createReadStream('${v.fileName}')`, c((y) => y.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : v.value && (u.body = v.value), u.body && (v.contentType && (u["content-type"] = v.contentType), x.push(u));
|
|
1253
|
+
}), m(`req.multipart(${ue(x, { indent: o.indent })});`), p();
|
|
1255
1254
|
break;
|
|
1256
1255
|
}
|
|
1257
1256
|
default:
|
|
1258
|
-
l.text && (
|
|
1257
|
+
l.text && (m(`req.send(${ue(l.text, { indent: o.indent })});`), p());
|
|
1259
1258
|
}
|
|
1260
|
-
return i &&
|
|
1259
|
+
return i && g("const fs = require('fs');"), m("req.end(function (res) {"), m("if (res.error) throw new Error(res.error);", 1), p(), m("console.log(res.body);", 1), m("});"), d();
|
|
1261
1260
|
}
|
|
1262
1261
|
}, ci = {
|
|
1263
1262
|
info: {
|
|
@@ -1273,21 +1272,21 @@ var Fo = {
|
|
|
1273
1272
|
axios: ai,
|
|
1274
1273
|
fetch: oi
|
|
1275
1274
|
}
|
|
1276
|
-
},
|
|
1277
|
-
const l = `${e} *${n} = `, s =
|
|
1275
|
+
}, mt = (e, n, t, a) => {
|
|
1276
|
+
const l = `${e} *${n} = `, s = gr(t, a ? l.length : void 0);
|
|
1278
1277
|
return `${l}${s};`;
|
|
1279
|
-
},
|
|
1278
|
+
}, gr = (e, n) => {
|
|
1280
1279
|
const t = n === void 0 ? ", " : `,
|
|
1281
1280
|
${" ".repeat(n)}`;
|
|
1282
1281
|
switch (Object.prototype.toString.call(e)) {
|
|
1283
1282
|
case "[object Number]":
|
|
1284
1283
|
return `@${e}`;
|
|
1285
1284
|
case "[object Array]":
|
|
1286
|
-
return `@[ ${e.map((l) =>
|
|
1285
|
+
return `@[ ${e.map((l) => gr(l)).join(t)} ]`;
|
|
1287
1286
|
case "[object Object]": {
|
|
1288
1287
|
const a = [];
|
|
1289
1288
|
return Object.keys(e).forEach((l) => {
|
|
1290
|
-
a.push(`@"${l}": ${
|
|
1289
|
+
a.push(`@"${l}": ${gr(e[l])}`);
|
|
1291
1290
|
}), `@{ ${a.join(t)} }`;
|
|
1292
1291
|
}
|
|
1293
1292
|
case "[object Boolean]":
|
|
@@ -1304,7 +1303,7 @@ var Fo = {
|
|
|
1304
1303
|
extname: ".m"
|
|
1305
1304
|
},
|
|
1306
1305
|
convert: ({ allHeaders: e, postData: n, method: t, fullUrl: a }, l) => {
|
|
1307
|
-
var
|
|
1306
|
+
var p;
|
|
1308
1307
|
const s = {
|
|
1309
1308
|
indent: " ",
|
|
1310
1309
|
pretty: !0,
|
|
@@ -1314,25 +1313,25 @@ var Fo = {
|
|
|
1314
1313
|
hasHeaders: !1,
|
|
1315
1314
|
hasBody: !1
|
|
1316
1315
|
};
|
|
1317
|
-
if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, i(), r(
|
|
1316
|
+
if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, i(), r(mt("NSDictionary", "headers", e, s.pretty))), n.text || n.jsonObj || n.params)
|
|
1318
1317
|
switch (c.hasBody = !0, n.mimeType) {
|
|
1319
1318
|
case "application/x-www-form-urlencoded":
|
|
1320
|
-
if ((
|
|
1319
|
+
if ((p = n.params) != null && p.length) {
|
|
1321
1320
|
i();
|
|
1322
|
-
const [
|
|
1321
|
+
const [d, ...m] = n.params;
|
|
1323
1322
|
r(
|
|
1324
|
-
`NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${
|
|
1325
|
-
),
|
|
1326
|
-
r(`[postData appendData:[@"&${
|
|
1323
|
+
`NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${d.name}=${d.value}" dataUsingEncoding:NSUTF8StringEncoding]];`
|
|
1324
|
+
), m.forEach(({ name: g, value: x }) => {
|
|
1325
|
+
r(`[postData appendData:[@"&${g}=${x}" dataUsingEncoding:NSUTF8StringEncoding]];`);
|
|
1327
1326
|
});
|
|
1328
1327
|
} else
|
|
1329
1328
|
c.hasBody = !1;
|
|
1330
1329
|
break;
|
|
1331
1330
|
case "application/json":
|
|
1332
|
-
n.jsonObj && (r(
|
|
1331
|
+
n.jsonObj && (r(mt("NSDictionary", "parameters", n.jsonObj, s.pretty)), i(), r("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
|
|
1333
1332
|
break;
|
|
1334
1333
|
case "multipart/form-data":
|
|
1335
|
-
r(
|
|
1334
|
+
r(mt("NSArray", "parameters", n.params || [], s.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(
|
|
1336
1335
|
'[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"; filename=\\"%@\\"\\r\\n", param[@"name"], param[@"fileName"]];',
|
|
1337
1336
|
2
|
|
1338
1337
|
), r('[body appendFormat:@"Content-Type: %@\\r\\n\\r\\n", param[@"contentType"]];', 2), r(
|
|
@@ -1376,16 +1375,16 @@ var Fo = {
|
|
|
1376
1375
|
...l
|
|
1377
1376
|
}, r = ["get", "post", "head", "delete", "patch", "put", "options"], { push: o, blank: i, join: c } = new V({ indent: s.indent });
|
|
1378
1377
|
o("open Cohttp_lwt_unix"), o("open Cohttp"), o("open Lwt"), i(), o(`let uri = Uri.of_string "${e}" in`);
|
|
1379
|
-
const
|
|
1380
|
-
|
|
1381
|
-
`let headers = Header.add (Header.init ()) "${
|
|
1382
|
-
n[
|
|
1378
|
+
const p = Object.keys(n);
|
|
1379
|
+
p.length === 1 ? o(
|
|
1380
|
+
`let headers = Header.add (Header.init ()) "${p[0]}" "${le(
|
|
1381
|
+
n[p[0]]
|
|
1383
1382
|
)}" in`
|
|
1384
|
-
) :
|
|
1383
|
+
) : p.length > 1 && (o("let headers = Header.add_list (Header.init ()) ["), p.forEach((x) => {
|
|
1385
1384
|
o(`("${x}", "${le(n[x])}");`, 1);
|
|
1386
1385
|
}), o("] in")), t.text && o(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(t.text)} in`), i();
|
|
1387
|
-
const
|
|
1388
|
-
return o(`Client.call ${
|
|
1386
|
+
const d = p.length ? "~headers " : "", m = t.text ? "~body " : "", g = r.includes(a.toLowerCase()) ? `\`${a.toUpperCase()}` : `(Code.method_of_string "${a}")`;
|
|
1387
|
+
return o(`Client.call ${d}${m}${g} uri`), o(">>= fun (res, body_stream) ->"), o("(* Do stuff with the result *)", 1), c();
|
|
1389
1388
|
}
|
|
1390
1389
|
}, di = {
|
|
1391
1390
|
info: {
|
|
@@ -1427,7 +1426,7 @@ ${t}]`;
|
|
|
1427
1426
|
default:
|
|
1428
1427
|
return "null";
|
|
1429
1428
|
}
|
|
1430
|
-
},
|
|
1429
|
+
}, Yr = [
|
|
1431
1430
|
"ACL",
|
|
1432
1431
|
"BASELINE_CONTROL",
|
|
1433
1432
|
"CHECKIN",
|
|
@@ -1467,14 +1466,14 @@ ${t}]`;
|
|
|
1467
1466
|
const {
|
|
1468
1467
|
closingTag: i = !1,
|
|
1469
1468
|
indent: c = " ",
|
|
1470
|
-
maxRedirects:
|
|
1471
|
-
namedErrors:
|
|
1472
|
-
noTags:
|
|
1473
|
-
shortTags:
|
|
1469
|
+
maxRedirects: p = 10,
|
|
1470
|
+
namedErrors: d = !1,
|
|
1471
|
+
noTags: m = !1,
|
|
1472
|
+
shortTags: g = !1,
|
|
1474
1473
|
timeout: x = 30
|
|
1475
|
-
} = o, { push: v, blank:
|
|
1476
|
-
|
|
1477
|
-
const
|
|
1474
|
+
} = o, { push: v, blank: u, join: y } = new V({ indent: c });
|
|
1475
|
+
m || (v(g ? "<?" : "<?php"), u()), v("$curl = curl_init();"), u();
|
|
1476
|
+
const h = [
|
|
1478
1477
|
{
|
|
1479
1478
|
escape: !0,
|
|
1480
1479
|
name: "CURLOPT_PORT",
|
|
@@ -1498,7 +1497,7 @@ ${t}]`;
|
|
|
1498
1497
|
{
|
|
1499
1498
|
escape: !1,
|
|
1500
1499
|
name: "CURLOPT_MAXREDIRS",
|
|
1501
|
-
value:
|
|
1500
|
+
value: p
|
|
1502
1501
|
},
|
|
1503
1502
|
{
|
|
1504
1503
|
escape: !1,
|
|
@@ -1524,14 +1523,14 @@ ${t}]`;
|
|
|
1524
1523
|
v("curl_setopt_array($curl, [");
|
|
1525
1524
|
const j = new V({ indent: c, join: `
|
|
1526
1525
|
${c}` });
|
|
1527
|
-
|
|
1526
|
+
h.forEach(({ value: O, name: b, escape: R }) => {
|
|
1528
1527
|
O != null && j.push(`${b} => ${R ? JSON.stringify(O) : O},`);
|
|
1529
1528
|
});
|
|
1530
1529
|
const T = s.map((O) => `${encodeURIComponent(O.name)}=${encodeURIComponent(O.value)}`);
|
|
1531
1530
|
T.length && j.push(`CURLOPT_COOKIE => "${T.join("; ")}",`);
|
|
1532
|
-
const
|
|
1533
|
-
return
|
|
1534
|
-
${c}${c}`), 1), j.push("],")), v(j.join(), 1), v("]);"),
|
|
1531
|
+
const f = Object.keys(r).sort().map((O) => `"${O}: ${le(r[O])}"`);
|
|
1532
|
+
return f.length && (j.push("CURLOPT_HTTPHEADER => ["), j.push(f.join(`,
|
|
1533
|
+
${c}${c}`), 1), j.push("],")), v(j.join(), 1), v("]);"), u(), v("$response = curl_exec($curl);"), v("$err = curl_error($curl);"), u(), v("curl_close($curl);"), u(), v("if ($err) {"), v(d ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), v("} else {"), v("echo $response;", 1), v("}"), !m && i && (u(), v("?>")), y();
|
|
1535
1534
|
}
|
|
1536
1535
|
}, yi = {
|
|
1537
1536
|
info: {
|
|
@@ -1550,39 +1549,39 @@ ${c}${c}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1550
1549
|
noTags: !1,
|
|
1551
1550
|
shortTags: !1,
|
|
1552
1551
|
...s
|
|
1553
|
-
}, { push: o, blank: i, join: c } = new V({ indent: r.indent }), { code:
|
|
1552
|
+
}, { push: o, blank: i, join: c } = new V({ indent: r.indent }), { code: p, push: d, join: m } = new V({ indent: r.indent });
|
|
1554
1553
|
switch (r.noTags || o(r.shortTags ? "<?" : "<?php"), o("require_once('vendor/autoload.php');"), i(), e.mimeType) {
|
|
1555
1554
|
case "application/x-www-form-urlencoded":
|
|
1556
|
-
|
|
1555
|
+
d(`'form_params' => ${te(e.paramsObj, r.indent + r.indent, r.indent)},`, 1);
|
|
1557
1556
|
break;
|
|
1558
1557
|
case "multipart/form-data": {
|
|
1559
|
-
const
|
|
1560
|
-
if (e.params && e.params.forEach((
|
|
1561
|
-
if (
|
|
1562
|
-
const
|
|
1563
|
-
name:
|
|
1564
|
-
filename:
|
|
1565
|
-
contents:
|
|
1558
|
+
const u = [];
|
|
1559
|
+
if (e.params && e.params.forEach((y) => {
|
|
1560
|
+
if (y.fileName) {
|
|
1561
|
+
const h = {
|
|
1562
|
+
name: y.name,
|
|
1563
|
+
filename: y.fileName,
|
|
1564
|
+
contents: y.value
|
|
1566
1565
|
};
|
|
1567
|
-
|
|
1568
|
-
} else
|
|
1569
|
-
name:
|
|
1570
|
-
contents:
|
|
1566
|
+
y.contentType && (h.headers = { "Content-Type": y.contentType }), u.push(h);
|
|
1567
|
+
} else y.value && u.push({
|
|
1568
|
+
name: y.name,
|
|
1569
|
+
contents: y.value
|
|
1571
1570
|
});
|
|
1572
|
-
}),
|
|
1573
|
-
const
|
|
1574
|
-
|
|
1571
|
+
}), u.length && (d(`'multipart' => ${te(u, r.indent + r.indent, r.indent)}`, 1), et(l, "content-type") && (v = ge(l, "content-type")) != null && v.indexOf("boundary"))) {
|
|
1572
|
+
const y = fe(l, "content-type");
|
|
1573
|
+
y && delete l[y];
|
|
1575
1574
|
}
|
|
1576
1575
|
break;
|
|
1577
1576
|
}
|
|
1578
1577
|
default:
|
|
1579
|
-
e.text &&
|
|
1578
|
+
e.text && d(`'body' => ${te(e.text)},`, 1);
|
|
1580
1579
|
}
|
|
1581
|
-
const
|
|
1582
|
-
return `${r.indent}${r.indent}'${
|
|
1583
|
-
}), x = a.map((
|
|
1584
|
-
return x.length &&
|
|
1585
|
-
`)),
|
|
1580
|
+
const g = Object.keys(l).sort().map(function(u) {
|
|
1581
|
+
return `${r.indent}${r.indent}'${u}' => '${Fe(l[u])}',`;
|
|
1582
|
+
}), x = a.map((u) => `${encodeURIComponent(u.name)}=${encodeURIComponent(u.value)}`).join("; ");
|
|
1583
|
+
return x.length && g.push(`${r.indent}${r.indent}'cookie' => '${Fe(x)}',`), g.length && (d("'headers' => [", 1), d(g.join(`
|
|
1584
|
+
`)), d("],", 1)), o("$client = new \\GuzzleHttp\\Client();"), i(), p.length ? (o(`$response = $client->request('${t}', '${n}', [`), o(m()), o("]);")) : o(`$response = $client->request('${t}', '${n}');`), i(), o("echo $response->getBody();"), !r.noTags && r.closingTag && (i(), o("?>")), c();
|
|
1586
1585
|
}
|
|
1587
1586
|
}, mi = {
|
|
1588
1587
|
info: {
|
|
@@ -1593,18 +1592,18 @@ ${c}${c}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1593
1592
|
extname: ".php"
|
|
1594
1593
|
},
|
|
1595
1594
|
convert: ({ method: e, url: n, postData: t, queryObj: a, headersObj: l, cookiesObj: s }, r = {}) => {
|
|
1596
|
-
const { closingTag: o = !1, indent: i = " ", noTags: c = !1, shortTags:
|
|
1597
|
-
switch (c || (
|
|
1595
|
+
const { closingTag: o = !1, indent: i = " ", noTags: c = !1, shortTags: p = !1 } = r, { push: d, blank: m, join: g } = new V({ indent: i });
|
|
1596
|
+
switch (c || (d(p ? "<?" : "<?php"), m()), Yr.includes(e.toUpperCase()) || d(`HttpRequest::methodRegister('${e}');`), d("$request = new HttpRequest();"), d(`$request->setUrl(${te(n)});`), Yr.includes(e.toUpperCase()) ? d(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : d(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), m(), Object.keys(a).length && (d(`$request->setQueryData(${te(a, i)});`), m()), Object.keys(l).length && (d(`$request->setHeaders(${te(l, i)});`), m()), Object.keys(s).length && (d(`$request->setCookies(${te(s, i)});`), m()), t.mimeType) {
|
|
1598
1597
|
case "application/x-www-form-urlencoded":
|
|
1599
|
-
|
|
1598
|
+
d(`$request->setContentType(${te(t.mimeType)});`), d(`$request->setPostFields(${te(t.paramsObj, i)});`), m();
|
|
1600
1599
|
break;
|
|
1601
1600
|
case "application/json":
|
|
1602
|
-
|
|
1601
|
+
d(`$request->setContentType(${te(t.mimeType)});`), d(`$request->setBody(json_encode(${te(t.jsonObj, i)}));`), m();
|
|
1603
1602
|
break;
|
|
1604
1603
|
default:
|
|
1605
|
-
t.text && (
|
|
1604
|
+
t.text && (d(`$request->setBody(${te(t.text)});`), m());
|
|
1606
1605
|
}
|
|
1607
|
-
return
|
|
1606
|
+
return d("try {"), d("$response = $request->send();", 1), m(), d("echo $response->getBody();", 1), d("} catch (HttpException $ex) {"), d("echo $ex;", 1), d("}"), !c && o && (m(), d("?>")), g();
|
|
1608
1607
|
}
|
|
1609
1608
|
}, gi = {
|
|
1610
1609
|
info: {
|
|
@@ -1616,43 +1615,43 @@ ${c}${c}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1616
1615
|
},
|
|
1617
1616
|
convert: ({ postData: e, headersObj: n, method: t, queryObj: a, cookiesObj: l, url: s }, r = {}) => {
|
|
1618
1617
|
var v;
|
|
1619
|
-
const { closingTag: o = !1, indent: i = " ", noTags: c = !1, shortTags:
|
|
1618
|
+
const { closingTag: o = !1, indent: i = " ", noTags: c = !1, shortTags: p = !1 } = r, { push: d, blank: m, join: g } = new V({ indent: i });
|
|
1620
1619
|
let x = !1;
|
|
1621
|
-
switch (c || (
|
|
1620
|
+
switch (c || (d(p ? "<?" : "<?php"), m()), d("$client = new http\\Client;"), d("$request = new http\\Client\\Request;"), m(), e.mimeType) {
|
|
1622
1621
|
case "application/x-www-form-urlencoded":
|
|
1623
|
-
|
|
1622
|
+
d("$body = new http\\Message\\Body;"), d(`$body->append(new http\\QueryString(${te(e.paramsObj, i)}));`), m(), x = !0;
|
|
1624
1623
|
break;
|
|
1625
1624
|
case "multipart/form-data": {
|
|
1626
1625
|
if (!e.params)
|
|
1627
1626
|
break;
|
|
1628
|
-
const
|
|
1629
|
-
e.params.forEach(({ name: T, fileName:
|
|
1630
|
-
if (
|
|
1631
|
-
|
|
1627
|
+
const u = [], y = {};
|
|
1628
|
+
e.params.forEach(({ name: T, fileName: f, value: O, contentType: b }) => {
|
|
1629
|
+
if (f) {
|
|
1630
|
+
u.push({
|
|
1632
1631
|
name: T,
|
|
1633
1632
|
type: b,
|
|
1634
|
-
file:
|
|
1633
|
+
file: f,
|
|
1635
1634
|
data: O
|
|
1636
1635
|
});
|
|
1637
1636
|
return;
|
|
1638
1637
|
}
|
|
1639
|
-
O && (
|
|
1638
|
+
O && (y[T] = O);
|
|
1640
1639
|
});
|
|
1641
|
-
const
|
|
1642
|
-
if (
|
|
1640
|
+
const h = Object.keys(y).length ? te(y, i) : "null", j = u.length ? te(u, i) : "null";
|
|
1641
|
+
if (d("$body = new http\\Message\\Body;"), d(`$body->addForm(${h}, ${j});`), et(n, "content-type") && (v = ge(n, "content-type")) != null && v.indexOf("boundary")) {
|
|
1643
1642
|
const T = fe(n, "content-type");
|
|
1644
1643
|
T && delete n[T];
|
|
1645
1644
|
}
|
|
1646
|
-
|
|
1645
|
+
m(), x = !0;
|
|
1647
1646
|
break;
|
|
1648
1647
|
}
|
|
1649
1648
|
case "application/json":
|
|
1650
|
-
|
|
1649
|
+
d("$body = new http\\Message\\Body;"), d(`$body->append(json_encode(${te(e.jsonObj, i)}));`), x = !0;
|
|
1651
1650
|
break;
|
|
1652
1651
|
default:
|
|
1653
|
-
e.text && (
|
|
1652
|
+
e.text && (d("$body = new http\\Message\\Body;"), d(`$body->append(${te(e.text)});`), m(), x = !0);
|
|
1654
1653
|
}
|
|
1655
|
-
return
|
|
1654
|
+
return d(`$request->setRequestUrl(${te(s)});`), d(`$request->setRequestMethod(${te(t)});`), x && (d("$request->setBody($body);"), m()), Object.keys(a).length && (d(`$request->setQuery(new http\\QueryString(${te(a, i)}));`), m()), Object.keys(n).length && (d(`$request->setHeaders(${te(n, i)});`), m()), Object.keys(l).length && (m(), d(`$client->setCookies(${te(l, i)});`), m()), d("$client->enqueue($request)->send();"), d("$response = $client->getResponse();"), m(), d("echo $response->getBody();"), !c && o && (m(), d("?>")), g();
|
|
1656
1655
|
}
|
|
1657
1656
|
}, vi = {
|
|
1658
1657
|
info: {
|
|
@@ -1667,18 +1666,18 @@ ${c}${c}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1667
1666
|
http1: mi,
|
|
1668
1667
|
http2: gi
|
|
1669
1668
|
}
|
|
1670
|
-
},
|
|
1671
|
-
const { push: c, join:
|
|
1669
|
+
}, pa = (e) => ({ method: t, headersObj: a, cookies: l, uriObj: s, fullUrl: r, postData: o, allHeaders: i }) => {
|
|
1670
|
+
const { push: c, join: p } = new V();
|
|
1672
1671
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(t.toUpperCase()))
|
|
1673
1672
|
return "Method not supported";
|
|
1674
|
-
const
|
|
1675
|
-
return
|
|
1673
|
+
const m = [], g = Object.keys(a);
|
|
1674
|
+
return g.length && (c("$headers=@{}"), g.forEach((x) => {
|
|
1676
1675
|
x !== "connection" && c(`$headers.Add("${x}", "${Le(a[x], { escapeChar: "`" })}")`);
|
|
1677
|
-
}),
|
|
1676
|
+
}), m.push("-Headers $headers")), l.length && (c("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), l.forEach((x) => {
|
|
1678
1677
|
c("$cookie = New-Object System.Net.Cookie"), c(`$cookie.Name = '${x.name}'`), c(`$cookie.Value = '${x.value}'`), c(`$cookie.Domain = '${s.host}'`), c("$session.Cookies.Add($cookie)");
|
|
1679
|
-
}),
|
|
1678
|
+
}), m.push("-WebSession $session")), o.text && (m.push(
|
|
1680
1679
|
`-ContentType '${Le(ge(i, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
|
|
1681
|
-
),
|
|
1680
|
+
), m.push(`-Body '${o.text}'`)), c(`$response = ${e} -Uri '${r}' -Method ${t} ${m.join(" ")}`.trim()), p();
|
|
1682
1681
|
}, bi = {
|
|
1683
1682
|
info: {
|
|
1684
1683
|
key: "restmethod",
|
|
@@ -1687,7 +1686,7 @@ ${c}${c}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1687
1686
|
description: "Powershell Invoke-RestMethod client",
|
|
1688
1687
|
extname: ".ps1"
|
|
1689
1688
|
},
|
|
1690
|
-
convert:
|
|
1689
|
+
convert: pa("Invoke-RestMethod")
|
|
1691
1690
|
}, xi = {
|
|
1692
1691
|
info: {
|
|
1693
1692
|
key: "webrequest",
|
|
@@ -1696,7 +1695,7 @@ ${c}${c}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1696
1695
|
description: "Powershell Invoke-WebRequest client",
|
|
1697
1696
|
extname: ".ps1"
|
|
1698
1697
|
},
|
|
1699
|
-
convert:
|
|
1698
|
+
convert: pa("Invoke-WebRequest")
|
|
1700
1699
|
}, $i = {
|
|
1701
1700
|
info: {
|
|
1702
1701
|
key: "powershell",
|
|
@@ -1708,7 +1707,7 @@ ${c}${c}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1708
1707
|
restmethod: bi
|
|
1709
1708
|
}
|
|
1710
1709
|
};
|
|
1711
|
-
function
|
|
1710
|
+
function Xr(e, n, t, a, l) {
|
|
1712
1711
|
const s = a.repeat(l), r = a.repeat(l - 1), o = t ? `,
|
|
1713
1712
|
${s}` : ", ", i = e === "object" ? "{" : "[", c = e === "object" ? "}" : "]";
|
|
1714
1713
|
return t ? `${i}
|
|
@@ -1722,13 +1721,13 @@ var ke = (e, n, t) => {
|
|
|
1722
1721
|
case "[object Array]": {
|
|
1723
1722
|
let a = !1;
|
|
1724
1723
|
const l = e.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (a = Object.keys(s).length > 1), ke(s, n, t)));
|
|
1725
|
-
return
|
|
1724
|
+
return Xr("array", l, a, n.indent, t);
|
|
1726
1725
|
}
|
|
1727
1726
|
case "[object Object]": {
|
|
1728
1727
|
const a = [];
|
|
1729
1728
|
for (const l in e)
|
|
1730
1729
|
a.push(`"${l}": ${ke(e[l], n, t)}`);
|
|
1731
|
-
return
|
|
1730
|
+
return Xr("object", a, n.pretty && a.length > 1, n.indent, t);
|
|
1732
1731
|
}
|
|
1733
1732
|
case "[object Null]":
|
|
1734
1733
|
return "None";
|
|
@@ -1753,10 +1752,10 @@ var ke = (e, n, t) => {
|
|
|
1753
1752
|
...l
|
|
1754
1753
|
}, { push: r, blank: o, join: i, addPostProcessor: c } = new V({ indent: s.indent });
|
|
1755
1754
|
r("import requests"), o(), r(`url = "${e}"`), o();
|
|
1756
|
-
const
|
|
1757
|
-
let
|
|
1758
|
-
const
|
|
1759
|
-
let
|
|
1755
|
+
const p = t;
|
|
1756
|
+
let d = {};
|
|
1757
|
+
const m = {};
|
|
1758
|
+
let g = !1, x = !1, v = !1;
|
|
1760
1759
|
switch (n.mimeType) {
|
|
1761
1760
|
case "application/json":
|
|
1762
1761
|
n.jsonObj && (r(`payload = ${ke(n.jsonObj, s)}`), v = !0, x = !0);
|
|
@@ -1764,18 +1763,18 @@ var ke = (e, n, t) => {
|
|
|
1764
1763
|
case "multipart/form-data":
|
|
1765
1764
|
if (!n.params)
|
|
1766
1765
|
break;
|
|
1767
|
-
if (
|
|
1768
|
-
|
|
1769
|
-
}),
|
|
1770
|
-
r(`files = ${ke(
|
|
1771
|
-
const
|
|
1772
|
-
|
|
1766
|
+
if (d = {}, n.params.forEach((h) => {
|
|
1767
|
+
h.fileName ? (h.contentType ? m[h.name] = `('${h.fileName}', open('${h.fileName}', 'rb'), '${h.contentType}')` : m[h.name] = `('${h.fileName}', open('${h.fileName}', 'rb'))`, g = !0) : (d[h.name] = h.value, x = !0);
|
|
1768
|
+
}), g) {
|
|
1769
|
+
r(`files = ${ke(m, s)}`), x && r(`payload = ${ke(d, s)}`);
|
|
1770
|
+
const h = fe(p, "content-type");
|
|
1771
|
+
h && delete p[h];
|
|
1773
1772
|
} else {
|
|
1774
|
-
const
|
|
1775
|
-
|
|
1773
|
+
const h = JSON.stringify(n.text);
|
|
1774
|
+
h && (r(`payload = ${h}`), x = !0);
|
|
1776
1775
|
}
|
|
1777
1776
|
c(
|
|
1778
|
-
(
|
|
1777
|
+
(h) => h.replace(/"\('(.+)', open\('(.+)', 'rb'\)\)"/g, '("$1", open("$2", "rb"))').replace(/"\('(.+)', open\('(.+)', 'rb'\), '(.+)'\)"/g, '("$1", open("$2", "rb"), "$3")')
|
|
1779
1778
|
);
|
|
1780
1779
|
break;
|
|
1781
1780
|
default: {
|
|
@@ -1783,25 +1782,25 @@ var ke = (e, n, t) => {
|
|
|
1783
1782
|
r(`payload = ${ke(n.paramsObj, s)}`), x = !0;
|
|
1784
1783
|
break;
|
|
1785
1784
|
}
|
|
1786
|
-
const
|
|
1787
|
-
|
|
1785
|
+
const h = JSON.stringify(n.text);
|
|
1786
|
+
h && (r(`payload = ${h}`), x = !0);
|
|
1788
1787
|
}
|
|
1789
1788
|
}
|
|
1790
|
-
const
|
|
1791
|
-
if (
|
|
1789
|
+
const u = Object.keys(p).length;
|
|
1790
|
+
if (u === 0 && (x || g))
|
|
1792
1791
|
o();
|
|
1793
|
-
else if (
|
|
1794
|
-
Object.keys(
|
|
1795
|
-
r(`headers = {"${
|
|
1792
|
+
else if (u === 1)
|
|
1793
|
+
Object.keys(p).forEach((h) => {
|
|
1794
|
+
r(`headers = {"${h}": "${le(p[h])}"}`), o();
|
|
1796
1795
|
});
|
|
1797
|
-
else if (
|
|
1798
|
-
let
|
|
1799
|
-
r("headers = {"), Object.keys(
|
|
1800
|
-
r(
|
|
1796
|
+
else if (u > 1) {
|
|
1797
|
+
let h = 1;
|
|
1798
|
+
r("headers = {"), Object.keys(p).forEach((j) => {
|
|
1799
|
+
r(h !== u ? `"${j}": "${le(p[j])}",` : `"${j}": "${le(p[j])}"`, 1), h += 1;
|
|
1801
1800
|
}), r("}"), o();
|
|
1802
1801
|
}
|
|
1803
|
-
let
|
|
1804
|
-
return x && (v ?
|
|
1802
|
+
let y = wi.includes(a) ? `response = requests.${a.toLowerCase()}(url` : `response = requests.request("${a}", url`;
|
|
1803
|
+
return x && (v ? y += ", json=payload" : y += ", data=payload"), g && (y += ", files=files"), u > 0 && (y += ", headers=headers"), y += ")", r(y), o(), r("print(response.text)"), i();
|
|
1805
1804
|
}
|
|
1806
1805
|
}, Si = {
|
|
1807
1806
|
info: {
|
|
@@ -1826,12 +1825,12 @@ var ke = (e, n, t) => {
|
|
|
1826
1825
|
r("library(httr)"), o(), r(`url <- "${e}"`), o();
|
|
1827
1826
|
const c = n;
|
|
1828
1827
|
delete n.key;
|
|
1829
|
-
const
|
|
1830
|
-
t.length === 1 ? (r(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), o()) : t.length > 1 && (r("queryString <- list("), Object.keys(c).forEach((
|
|
1831
|
-
O !==
|
|
1828
|
+
const p = Object.keys(c).length;
|
|
1829
|
+
t.length === 1 ? (r(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), o()) : t.length > 1 && (r("queryString <- list("), Object.keys(c).forEach((f, O) => {
|
|
1830
|
+
O !== p - 1 ? r(` ${f} = "${c[f].toString()}",`) : r(` ${f} = "${c[f].toString()}"`);
|
|
1832
1831
|
}), r(")"), o());
|
|
1833
|
-
const
|
|
1834
|
-
if (
|
|
1832
|
+
const d = JSON.stringify(a.text);
|
|
1833
|
+
if (d && (r(`payload <- ${d}`), o()), a.text || a.jsonObj || a.params)
|
|
1835
1834
|
switch (a.mimeType) {
|
|
1836
1835
|
case "application/x-www-form-urlencoded":
|
|
1837
1836
|
r('encode <- "form"'), o();
|
|
@@ -1846,10 +1845,10 @@ var ke = (e, n, t) => {
|
|
|
1846
1845
|
r('encode <- "raw"'), o();
|
|
1847
1846
|
break;
|
|
1848
1847
|
}
|
|
1849
|
-
const
|
|
1848
|
+
const m = ge(l, "cookie"), g = ge(l, "accept"), x = m ? `set_cookies(\`${String(m).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, v = g ? `accept("${le(g)}")` : void 0, u = `content_type("${le(a.mimeType)}")`, y = Object.entries(l).filter(([f]) => !["cookie", "accept", "content-type"].includes(f.toLowerCase())).map(([f, O]) => `'${f}' = '${Fe(O)}'`).join(", "), h = y ? `add_headers(${y})` : void 0;
|
|
1850
1849
|
let j = `response <- VERB("${s}", url`;
|
|
1851
|
-
|
|
1852
|
-
const T = [
|
|
1850
|
+
d && (j += ", body = payload"), t.length && (j += ", query = queryString");
|
|
1851
|
+
const T = [h, u, v, x].filter((f) => !!f).join(", ");
|
|
1853
1852
|
return T && (j += `, ${T}`), (a.text || a.jsonObj || a.params) && (j += ", encode = encode"), j += ")", r(j), o(), r('content(response, "text")'), i();
|
|
1854
1853
|
}
|
|
1855
1854
|
}, Ti = {
|
|
@@ -1885,11 +1884,11 @@ var ke = (e, n, t) => {
|
|
|
1885
1884
|
"UNLOCK",
|
|
1886
1885
|
"MOVE",
|
|
1887
1886
|
"TRACE"
|
|
1888
|
-
],
|
|
1889
|
-
c.includes(i) || (s(`class Net::HTTP::${
|
|
1890
|
-
const
|
|
1891
|
-
return
|
|
1892
|
-
s(`request["${
|
|
1887
|
+
], p = i.charAt(0) + i.substring(1).toLowerCase();
|
|
1888
|
+
c.includes(i) || (s(`class Net::HTTP::${p} < Net::HTTPRequest`), s(` METHOD = '${i.toUpperCase()}'`), s(` REQUEST_HAS_BODY = '${a.text ? "true" : "false"}'`), s(" RESPONSE_HAS_BODY = true"), s("end"), r()), s(`url = URI("${t}")`), r(), s("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && s("http.use_ssl = true"), r(), s(`request = Net::HTTP::${p}.new(url)`);
|
|
1889
|
+
const d = Object.keys(l);
|
|
1890
|
+
return d.length && d.forEach((m) => {
|
|
1891
|
+
s(`request["${m}"] = '${Fe(l[m])}'`);
|
|
1893
1892
|
}), a.text && s(`request.body = ${JSON.stringify(a.text)}`), r(), s("response = http.request(request)"), s("puts response.read_body"), o();
|
|
1894
1893
|
}
|
|
1895
1894
|
}, qi = {
|
|
@@ -1926,64 +1925,64 @@ var ke = (e, n, t) => {
|
|
|
1926
1925
|
extname: ".sh"
|
|
1927
1926
|
},
|
|
1928
1927
|
convert: ({ fullUrl: e, method: n, httpVersion: t, headersObj: a, allHeaders: l, postData: s }, r = {}) => {
|
|
1929
|
-
var
|
|
1930
|
-
const { indent: o = " ", short: i = !1, binary: c = !1, globOff:
|
|
1928
|
+
var u;
|
|
1929
|
+
const { indent: o = " ", short: i = !1, binary: c = !1, globOff: p = !1 } = r, d = " ", { push: m, join: g } = new V({
|
|
1931
1930
|
...typeof o == "string" ? { indent: o } : {},
|
|
1932
1931
|
join: o !== !1 ? ` \\
|
|
1933
1932
|
${o}` : " "
|
|
1934
1933
|
}), x = Ei(i);
|
|
1935
1934
|
let v = ce(e);
|
|
1936
|
-
if (
|
|
1937
|
-
const
|
|
1938
|
-
if (
|
|
1939
|
-
const
|
|
1940
|
-
if (
|
|
1941
|
-
const j = String(
|
|
1942
|
-
a[
|
|
1935
|
+
if (m(`curl ${x("request")} ${n}`), p && (v = unescape(v), m(x("globoff"))), m(`${x("url ")}${v}`), t === "HTTP/1.0" && m(x("http1.0")), ge(l, "accept-encoding") && m("--compressed"), s.mimeType === "multipart/form-data") {
|
|
1936
|
+
const y = fe(a, "content-type");
|
|
1937
|
+
if (y) {
|
|
1938
|
+
const h = a[y];
|
|
1939
|
+
if (y && h) {
|
|
1940
|
+
const j = String(h).replace(/; boundary.+?(?=(;|$))/, "");
|
|
1941
|
+
a[y] = j, l[y] = j;
|
|
1943
1942
|
}
|
|
1944
1943
|
}
|
|
1945
1944
|
}
|
|
1946
|
-
switch (Object.keys(a).sort().forEach((
|
|
1947
|
-
const
|
|
1948
|
-
|
|
1949
|
-
}), l.cookie &&
|
|
1945
|
+
switch (Object.keys(a).sort().forEach((y) => {
|
|
1946
|
+
const h = `${y}: ${a[y]}`;
|
|
1947
|
+
m(`${x("header")} ${ce(h)}`);
|
|
1948
|
+
}), l.cookie && m(`${x("cookie")} ${ce(l.cookie)}`), s.mimeType) {
|
|
1950
1949
|
case "multipart/form-data":
|
|
1951
|
-
(
|
|
1950
|
+
(u = s.params) == null || u.forEach((h) => {
|
|
1952
1951
|
let j = "";
|
|
1953
|
-
|
|
1952
|
+
h.fileName ? j = `${h.name}='@${h.fileName}'` : j = ce(`${h.name}=${h.value}`), m(`${x("form")} ${j}`);
|
|
1954
1953
|
});
|
|
1955
1954
|
break;
|
|
1956
1955
|
case "application/x-www-form-urlencoded":
|
|
1957
|
-
s.params ? s.params.forEach((
|
|
1958
|
-
const j =
|
|
1959
|
-
|
|
1960
|
-
}) :
|
|
1956
|
+
s.params ? s.params.forEach((h) => {
|
|
1957
|
+
const j = h.name, T = encodeURIComponent(h.name), f = T !== j, O = f ? T : j, b = c ? "--data-binary" : f ? "--data-urlencode" : x("data");
|
|
1958
|
+
m(`${b} ${ce(`${O}=${h.value}`)}`);
|
|
1959
|
+
}) : m(`${c ? "--data-binary" : x("data")} ${ce(s.text)}`);
|
|
1961
1960
|
break;
|
|
1962
1961
|
default:
|
|
1963
1962
|
if (!s.text)
|
|
1964
1963
|
break;
|
|
1965
|
-
let
|
|
1964
|
+
let y = !1;
|
|
1966
1965
|
if (Eo(s.mimeType) && s.text.length > 20)
|
|
1967
1966
|
try {
|
|
1968
|
-
const
|
|
1969
|
-
|
|
1967
|
+
const h = JSON.parse(s.text);
|
|
1968
|
+
y = !0, s.text.indexOf("'") > 0 ? m(
|
|
1970
1969
|
`${c ? "--data-binary" : x("data")} @- <<EOF
|
|
1971
1970
|
${JSON.stringify(
|
|
1972
|
-
|
|
1971
|
+
h,
|
|
1973
1972
|
null,
|
|
1974
|
-
|
|
1973
|
+
d
|
|
1975
1974
|
)}
|
|
1976
1975
|
EOF`
|
|
1977
|
-
) :
|
|
1976
|
+
) : m(
|
|
1978
1977
|
`${c ? "--data-binary" : x("data")} '
|
|
1979
|
-
${JSON.stringify(
|
|
1978
|
+
${JSON.stringify(h, null, d)}
|
|
1980
1979
|
'`
|
|
1981
1980
|
);
|
|
1982
1981
|
} catch {
|
|
1983
1982
|
}
|
|
1984
|
-
|
|
1983
|
+
y || m(`${c ? "--data-binary" : x("data")} ${ce(s.text)}`);
|
|
1985
1984
|
}
|
|
1986
|
-
return
|
|
1985
|
+
return g();
|
|
1987
1986
|
}
|
|
1988
1987
|
}, Ni = {
|
|
1989
1988
|
info: {
|
|
@@ -2009,28 +2008,28 @@ ${JSON.stringify(d, null, y)}
|
|
|
2009
2008
|
verbose: !1,
|
|
2010
2009
|
verify: !1,
|
|
2011
2010
|
...r
|
|
2012
|
-
}, { push: i, join: c, unshift:
|
|
2011
|
+
}, { push: i, join: c, unshift: p } = new V({
|
|
2013
2012
|
indent: o.indent,
|
|
2014
2013
|
// @ts-expect-error SEEMS LEGIT
|
|
2015
2014
|
join: o.indent !== !1 ? ` \\
|
|
2016
2015
|
${o.indent}` : " "
|
|
2017
2016
|
});
|
|
2018
|
-
let
|
|
2019
|
-
const
|
|
2020
|
-
o.headers &&
|
|
2017
|
+
let d = !1;
|
|
2018
|
+
const m = [];
|
|
2019
|
+
o.headers && m.push(o.short ? "-h" : "--headers"), o.body && m.push(o.short ? "-b" : "--body"), o.verbose && m.push(o.short ? "-v" : "--verbose"), o.print && m.push(`${o.short ? "-p" : "--print"}=${o.print}`), o.verify && m.push(`--verify=${o.verify}`), o.cert && m.push(`--cert=${o.cert}`), o.pretty && m.push(`--pretty=${o.pretty}`), o.style && m.push(`--style=${o.style}`), o.timeout && m.push(`--timeout=${o.timeout}`), o.queryParams && Object.keys(t).forEach((x) => {
|
|
2021
2020
|
const v = t[x];
|
|
2022
|
-
Array.isArray(v) ? v.forEach((
|
|
2023
|
-
i(`${x}==${ce(
|
|
2021
|
+
Array.isArray(v) ? v.forEach((u) => {
|
|
2022
|
+
i(`${x}==${ce(u)}`);
|
|
2024
2023
|
}) : i(`${x}==${ce(v)}`);
|
|
2025
2024
|
}), Object.keys(e).sort().forEach((x) => {
|
|
2026
2025
|
i(`${x}:${ce(e[x])}`);
|
|
2027
|
-
}), n.mimeType === "application/x-www-form-urlencoded" ? n.params && n.params.length && (
|
|
2026
|
+
}), n.mimeType === "application/x-www-form-urlencoded" ? n.params && n.params.length && (m.push(o.short ? "-f" : "--form"), n.params.forEach((x) => {
|
|
2028
2027
|
i(`${x.name}=${ce(x.value)}`);
|
|
2029
|
-
})) :
|
|
2030
|
-
const
|
|
2031
|
-
if (s = ce(o.queryParams ? s : a),
|
|
2028
|
+
})) : d = !0;
|
|
2029
|
+
const g = m.length ? `${m.join(" ")} ` : "";
|
|
2030
|
+
if (s = ce(o.queryParams ? s : a), p(`http ${g}${l} ${s}`), d && n.text) {
|
|
2032
2031
|
const x = ce(n.text);
|
|
2033
|
-
|
|
2032
|
+
p(`echo ${x} | `);
|
|
2034
2033
|
}
|
|
2035
2034
|
return c();
|
|
2036
2035
|
}
|
|
@@ -2070,26 +2069,26 @@ ${s.indent}` : " "
|
|
|
2070
2069
|
httpie: Ni,
|
|
2071
2070
|
wget: Ai
|
|
2072
2071
|
}
|
|
2073
|
-
},
|
|
2074
|
-
const l =
|
|
2072
|
+
}, Zr = (e, n) => n.repeat(e), en = (e, n, t, a) => {
|
|
2073
|
+
const l = Zr(a, t), s = Zr(a - 1, t), r = n ? `,
|
|
2075
2074
|
${l}` : ", ";
|
|
2076
2075
|
return n ? `[
|
|
2077
2076
|
${l}${e.join(r)}
|
|
2078
2077
|
${s}]` : `[${e.join(r)}]`;
|
|
2079
|
-
},
|
|
2078
|
+
}, tn = (e, n, t) => `let ${e} = ${Xe(n, t)}`, Xe = (e, n, t) => {
|
|
2080
2079
|
switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
|
|
2081
2080
|
case "[object Number]":
|
|
2082
2081
|
return e;
|
|
2083
2082
|
case "[object Array]": {
|
|
2084
2083
|
let a = !1;
|
|
2085
2084
|
const l = e.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (a = Object.keys(s).length > 1), Xe(s, n, t)));
|
|
2086
|
-
return
|
|
2085
|
+
return en(l, a, n.indent, t);
|
|
2087
2086
|
}
|
|
2088
2087
|
case "[object Object]": {
|
|
2089
2088
|
const a = [];
|
|
2090
2089
|
for (const l in e)
|
|
2091
2090
|
a.push(`"${l}": ${Xe(e[l], n, t)}`);
|
|
2092
|
-
return
|
|
2091
|
+
return en(
|
|
2093
2092
|
a,
|
|
2094
2093
|
// @ts-expect-error needs better types
|
|
2095
2094
|
n.pretty && a.length > 1,
|
|
@@ -2112,7 +2111,7 @@ ${s}]` : `[${e.join(r)}]`;
|
|
|
2112
2111
|
extname: ".swift"
|
|
2113
2112
|
},
|
|
2114
2113
|
convert: ({ allHeaders: e, postData: n, uriObj: t, queryObj: a, method: l }, s) => {
|
|
2115
|
-
var
|
|
2114
|
+
var m;
|
|
2116
2115
|
const r = {
|
|
2117
2116
|
indent: " ",
|
|
2118
2117
|
pretty: !0,
|
|
@@ -2120,39 +2119,39 @@ ${s}]` : `[${e.join(r)}]`;
|
|
|
2120
2119
|
...s
|
|
2121
2120
|
}, { push: o, blank: i, join: c } = new V({ indent: r.indent });
|
|
2122
2121
|
o("import Foundation"), i();
|
|
2123
|
-
const
|
|
2124
|
-
if (
|
|
2122
|
+
const p = n.text || n.jsonObj || n.params;
|
|
2123
|
+
if (p)
|
|
2125
2124
|
switch (n.mimeType) {
|
|
2126
2125
|
case "application/x-www-form-urlencoded":
|
|
2127
|
-
if ((
|
|
2128
|
-
const
|
|
2129
|
-
r.pretty ? (o("let parameters = ["),
|
|
2126
|
+
if ((m = n.params) != null && m.length) {
|
|
2127
|
+
const g = n.params.map((x) => `"${x.name}": "${x.value}"`);
|
|
2128
|
+
r.pretty ? (o("let parameters = ["), g.forEach((x) => o(`${x},`, 1)), o("]")) : o(`let parameters = [${g.join(", ")}]`), o('let joinedParameters = parameters.map { "\\($0.key)=\\($0.value)" }.joined(separator: "&")'), o("let postData = Data(joinedParameters.utf8)"), i();
|
|
2130
2129
|
}
|
|
2131
2130
|
break;
|
|
2132
2131
|
case "application/json":
|
|
2133
|
-
n.jsonObj && (o(`${
|
|
2132
|
+
n.jsonObj && (o(`${tn("parameters", n.jsonObj, r)} as [String : Any?]`), i(), o("let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])"), i());
|
|
2134
2133
|
break;
|
|
2135
2134
|
case "multipart/form-data":
|
|
2136
|
-
o(
|
|
2135
|
+
o(tn("parameters", n.params, r)), i(), o(`let boundary = "${n.boundary}"`), i(), o('var body = ""'), o("for param in parameters {"), o('let paramName = param["name"]!', 1), o('body += "--\\(boundary)\\r\\n"', 1), o('body += "Content-Disposition:form-data; name=\\"\\(paramName)\\""', 1), o('if let filename = param["fileName"] {', 1), o('let contentType = param["contentType"]!', 2), o("let fileContent = try String(contentsOfFile: filename, encoding: .utf8)", 2), o('body += "; filename=\\"\\(filename)\\"\\r\\n"', 2), o('body += "Content-Type: \\(contentType)\\r\\n\\r\\n"', 2), o("body += fileContent", 2), o('} else if let paramValue = param["value"] {', 1), o('body += "\\r\\n\\r\\n\\(paramValue)"', 2), o("}", 1), o("}"), i(), o("let postData = Data(body.utf8)"), i();
|
|
2137
2136
|
break;
|
|
2138
2137
|
default:
|
|
2139
2138
|
o(`let postData = Data("${n.text}".utf8)`), i();
|
|
2140
2139
|
}
|
|
2141
2140
|
o(`let url = URL(string: "${t.href}")!`);
|
|
2142
|
-
const
|
|
2143
|
-
return
|
|
2144
|
-
const x =
|
|
2141
|
+
const d = a ? Object.entries(a) : [];
|
|
2142
|
+
return d.length < 1 ? o("var request = URLRequest(url: url)") : (o("var components = URLComponents(url: url, resolvingAgainstBaseURL: true)!"), o("let queryItems: [URLQueryItem] = ["), d.forEach((g) => {
|
|
2143
|
+
const x = g[0], v = g[1];
|
|
2145
2144
|
switch (Object.prototype.toString.call(v)) {
|
|
2146
2145
|
case "[object String]":
|
|
2147
2146
|
o(`URLQueryItem(name: "${x}", value: "${v}"),`, 1);
|
|
2148
2147
|
break;
|
|
2149
2148
|
case "[object Array]":
|
|
2150
|
-
v.forEach((
|
|
2151
|
-
o(`URLQueryItem(name: "${x}", value: "${
|
|
2149
|
+
v.forEach((u) => {
|
|
2150
|
+
o(`URLQueryItem(name: "${x}", value: "${u}"),`, 1);
|
|
2152
2151
|
});
|
|
2153
2152
|
break;
|
|
2154
2153
|
}
|
|
2155
|
-
}), o("]"), o("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), o("var request = URLRequest(url: components.url!)")), o(`request.httpMethod = "${l}"`), o(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && o(`request.allHTTPHeaderFields = ${Xe(e, r)}`),
|
|
2154
|
+
}), o("]"), o("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), o("var request = URLRequest(url: components.url!)")), o(`request.httpMethod = "${l}"`), o(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && o(`request.allHTTPHeaderFields = ${Xe(e, r)}`), p && o("request.httpBody = postData"), i(), o("let (data, _) = try await URLSession.shared.data(for: request)"), o("print(String(decoding: data, as: UTF8.self))"), c();
|
|
2156
2155
|
}
|
|
2157
2156
|
}, Li = {
|
|
2158
2157
|
info: {
|
|
@@ -2185,17 +2184,17 @@ ${s}]` : `[${e.join(r)}]`;
|
|
|
2185
2184
|
swift: Li
|
|
2186
2185
|
}, Te = {}, Ie = { exports: {} };
|
|
2187
2186
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
2188
|
-
var _i = Ie.exports,
|
|
2187
|
+
var _i = Ie.exports, rn;
|
|
2189
2188
|
function Bi() {
|
|
2190
|
-
return
|
|
2189
|
+
return rn || (rn = 1, function(e, n) {
|
|
2191
2190
|
(function(t) {
|
|
2192
2191
|
var a = n && !n.nodeType && n, l = e && !e.nodeType && e, s = typeof Ke == "object" && Ke;
|
|
2193
2192
|
(s.global === s || s.window === s || s.self === s) && (t = s);
|
|
2194
|
-
var r, o = 2147483647, i = 36, c = 1,
|
|
2193
|
+
var r, o = 2147483647, i = 36, c = 1, p = 26, d = 38, m = 700, g = 72, x = 128, v = "-", u = /^xn--/, y = /[^\x20-\x7E]/, h = /[\x2E\u3002\uFF0E\uFF61]/g, j = {
|
|
2195
2194
|
overflow: "Overflow: input needs wider integers to process",
|
|
2196
2195
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
2197
2196
|
"invalid-input": "Invalid input"
|
|
2198
|
-
}, T = i - c,
|
|
2197
|
+
}, T = i - c, f = Math.floor, O = String.fromCharCode, b;
|
|
2199
2198
|
function R(E) {
|
|
2200
2199
|
throw new RangeError(j[E]);
|
|
2201
2200
|
}
|
|
@@ -2206,7 +2205,7 @@ function Bi() {
|
|
|
2206
2205
|
}
|
|
2207
2206
|
function C(E, k) {
|
|
2208
2207
|
var F = E.split("@"), q = "";
|
|
2209
|
-
F.length > 1 && (q = F[0] + "@", E = F[1]), E = E.replace(
|
|
2208
|
+
F.length > 1 && (q = F[0] + "@", E = F[1]), E = E.replace(h, ".");
|
|
2210
2209
|
var U = E.split("."), J = N(U, k).join(".");
|
|
2211
2210
|
return q + J;
|
|
2212
2211
|
}
|
|
@@ -2229,34 +2228,34 @@ function Bi() {
|
|
|
2229
2228
|
}
|
|
2230
2229
|
function D(E, k, F) {
|
|
2231
2230
|
var q = 0;
|
|
2232
|
-
for (E = F ?
|
|
2233
|
-
E =
|
|
2234
|
-
return
|
|
2231
|
+
for (E = F ? f(E / m) : E >> 1, E += f(E / k); E > T * p >> 1; q += i)
|
|
2232
|
+
E = f(E / T);
|
|
2233
|
+
return f(q + (T + 1) * E / (E + d));
|
|
2235
2234
|
}
|
|
2236
2235
|
function se(E) {
|
|
2237
|
-
var k = [], F = E.length, q, U = 0, J = x, z =
|
|
2236
|
+
var k = [], F = E.length, q, U = 0, J = x, z = g, K, ne, G, I, _, B, Q, W, Y;
|
|
2238
2237
|
for (K = E.lastIndexOf(v), K < 0 && (K = 0), ne = 0; ne < K; ++ne)
|
|
2239
2238
|
E.charCodeAt(ne) >= 128 && R("not-basic"), k.push(E.charCodeAt(ne));
|
|
2240
2239
|
for (G = K > 0 ? K + 1 : 0; G < F; ) {
|
|
2241
|
-
for (I = U, _ = 1, B = i; G >= F && R("invalid-input"), Q = oe(E.charCodeAt(G++)), (Q >= i || Q >
|
|
2242
|
-
Y = i - W, _ >
|
|
2243
|
-
q = k.length + 1, z = D(U - I, q, I == 0),
|
|
2240
|
+
for (I = U, _ = 1, B = i; G >= F && R("invalid-input"), Q = oe(E.charCodeAt(G++)), (Q >= i || Q > f((o - U) / _)) && R("overflow"), U += Q * _, W = B <= z ? c : B >= z + p ? p : B - z, !(Q < W); B += i)
|
|
2241
|
+
Y = i - W, _ > f(o / Y) && R("overflow"), _ *= Y;
|
|
2242
|
+
q = k.length + 1, z = D(U - I, q, I == 0), f(U / q) > o - J && R("overflow"), J += f(U / q), U %= q, k.splice(U++, 0, J);
|
|
2244
2243
|
}
|
|
2245
2244
|
return P(k);
|
|
2246
2245
|
}
|
|
2247
2246
|
function Z(E) {
|
|
2248
2247
|
var k, F, q, U, J, z, K, ne, G, I, _, B = [], Q, W, Y, ae;
|
|
2249
|
-
for (E = L(E), Q = E.length, k = x, F = 0, J =
|
|
2248
|
+
for (E = L(E), Q = E.length, k = x, F = 0, J = g, z = 0; z < Q; ++z)
|
|
2250
2249
|
_ = E[z], _ < 128 && B.push(O(_));
|
|
2251
2250
|
for (q = U = B.length, U && B.push(v); q < Q; ) {
|
|
2252
2251
|
for (K = o, z = 0; z < Q; ++z)
|
|
2253
2252
|
_ = E[z], _ >= k && _ < K && (K = _);
|
|
2254
|
-
for (W = q + 1, K - k >
|
|
2253
|
+
for (W = q + 1, K - k > f((o - F) / W) && R("overflow"), F += (K - k) * W, k = K, z = 0; z < Q; ++z)
|
|
2255
2254
|
if (_ = E[z], _ < k && ++F > o && R("overflow"), _ == k) {
|
|
2256
|
-
for (ne = F, G = i; I = G <= J ? c : G >= J +
|
|
2255
|
+
for (ne = F, G = i; I = G <= J ? c : G >= J + p ? p : G - J, !(ne < I); G += i)
|
|
2257
2256
|
ae = ne - I, Y = i - I, B.push(
|
|
2258
2257
|
O(H(I + ae % Y, 0))
|
|
2259
|
-
), ne =
|
|
2258
|
+
), ne = f(ae / Y);
|
|
2260
2259
|
B.push(O(H(ne, 0))), J = D(F, W, q == U), F = 0, ++q;
|
|
2261
2260
|
}
|
|
2262
2261
|
++F, ++k;
|
|
@@ -2265,12 +2264,12 @@ function Bi() {
|
|
|
2265
2264
|
}
|
|
2266
2265
|
function A(E) {
|
|
2267
2266
|
return C(E, function(k) {
|
|
2268
|
-
return
|
|
2267
|
+
return u.test(k) ? se(k.slice(4).toLowerCase()) : k;
|
|
2269
2268
|
});
|
|
2270
2269
|
}
|
|
2271
2270
|
function re(E) {
|
|
2272
2271
|
return C(E, function(k) {
|
|
2273
|
-
return
|
|
2272
|
+
return y.test(k) ? "xn--" + Z(k) : k;
|
|
2274
2273
|
});
|
|
2275
2274
|
}
|
|
2276
2275
|
if (r = {
|
|
@@ -2306,85 +2305,85 @@ function Bi() {
|
|
|
2306
2305
|
})(_i);
|
|
2307
2306
|
}(Ie, Ie.exports)), Ie.exports;
|
|
2308
2307
|
}
|
|
2309
|
-
var mt, rn;
|
|
2310
|
-
function pa() {
|
|
2311
|
-
return rn || (rn = 1, mt = Object), mt;
|
|
2312
|
-
}
|
|
2313
2308
|
var gt, nn;
|
|
2314
|
-
function
|
|
2315
|
-
return nn || (nn = 1, gt =
|
|
2309
|
+
function da() {
|
|
2310
|
+
return nn || (nn = 1, gt = Object), gt;
|
|
2316
2311
|
}
|
|
2317
2312
|
var vt, an;
|
|
2318
|
-
function
|
|
2319
|
-
return an || (an = 1, vt =
|
|
2313
|
+
function Hi() {
|
|
2314
|
+
return an || (an = 1, vt = Error), vt;
|
|
2320
2315
|
}
|
|
2321
2316
|
var bt, on;
|
|
2322
|
-
function
|
|
2323
|
-
return on || (on = 1, bt =
|
|
2317
|
+
function Mi() {
|
|
2318
|
+
return on || (on = 1, bt = EvalError), bt;
|
|
2324
2319
|
}
|
|
2325
2320
|
var xt, sn;
|
|
2326
|
-
function
|
|
2327
|
-
return sn || (sn = 1, xt =
|
|
2321
|
+
function zi() {
|
|
2322
|
+
return sn || (sn = 1, xt = RangeError), xt;
|
|
2328
2323
|
}
|
|
2329
2324
|
var $t, ln;
|
|
2330
|
-
function
|
|
2331
|
-
return ln || (ln = 1, $t =
|
|
2325
|
+
function Wi() {
|
|
2326
|
+
return ln || (ln = 1, $t = ReferenceError), $t;
|
|
2332
2327
|
}
|
|
2333
2328
|
var wt, cn;
|
|
2334
|
-
function
|
|
2335
|
-
return cn || (cn = 1, wt =
|
|
2329
|
+
function ha() {
|
|
2330
|
+
return cn || (cn = 1, wt = SyntaxError), wt;
|
|
2336
2331
|
}
|
|
2337
2332
|
var jt, un;
|
|
2338
|
-
function
|
|
2339
|
-
return un || (un = 1, jt =
|
|
2333
|
+
function Be() {
|
|
2334
|
+
return un || (un = 1, jt = TypeError), jt;
|
|
2340
2335
|
}
|
|
2341
2336
|
var St, fn;
|
|
2342
|
-
function
|
|
2343
|
-
return fn || (fn = 1, St =
|
|
2337
|
+
function Ji() {
|
|
2338
|
+
return fn || (fn = 1, St = URIError), St;
|
|
2344
2339
|
}
|
|
2345
2340
|
var Ot, pn;
|
|
2346
|
-
function
|
|
2347
|
-
return pn || (pn = 1, Ot = Math.
|
|
2341
|
+
function Gi() {
|
|
2342
|
+
return pn || (pn = 1, Ot = Math.abs), Ot;
|
|
2348
2343
|
}
|
|
2349
2344
|
var Tt, dn;
|
|
2350
|
-
function
|
|
2351
|
-
return dn || (dn = 1, Tt = Math.
|
|
2345
|
+
function Vi() {
|
|
2346
|
+
return dn || (dn = 1, Tt = Math.floor), Tt;
|
|
2352
2347
|
}
|
|
2353
2348
|
var Pt, hn;
|
|
2354
|
-
function
|
|
2355
|
-
return hn || (hn = 1, Pt = Math.
|
|
2349
|
+
function Di() {
|
|
2350
|
+
return hn || (hn = 1, Pt = Math.max), Pt;
|
|
2356
2351
|
}
|
|
2357
2352
|
var qt, yn;
|
|
2358
|
-
function
|
|
2359
|
-
return yn || (yn = 1, qt = Math.
|
|
2353
|
+
function Qi() {
|
|
2354
|
+
return yn || (yn = 1, qt = Math.min), qt;
|
|
2360
2355
|
}
|
|
2361
2356
|
var Ct, mn;
|
|
2362
|
-
function
|
|
2363
|
-
return mn || (mn = 1, Ct = Math.
|
|
2357
|
+
function Ki() {
|
|
2358
|
+
return mn || (mn = 1, Ct = Math.pow), Ct;
|
|
2364
2359
|
}
|
|
2365
2360
|
var Rt, gn;
|
|
2361
|
+
function Yi() {
|
|
2362
|
+
return gn || (gn = 1, Rt = Math.round), Rt;
|
|
2363
|
+
}
|
|
2364
|
+
var Et, vn;
|
|
2366
2365
|
function Xi() {
|
|
2367
|
-
return
|
|
2366
|
+
return vn || (vn = 1, Et = Number.isNaN || function(n) {
|
|
2368
2367
|
return n !== n;
|
|
2369
|
-
}),
|
|
2368
|
+
}), Et;
|
|
2370
2369
|
}
|
|
2371
|
-
var
|
|
2370
|
+
var kt, bn;
|
|
2372
2371
|
function Zi() {
|
|
2373
|
-
if (
|
|
2374
|
-
|
|
2372
|
+
if (bn) return kt;
|
|
2373
|
+
bn = 1;
|
|
2375
2374
|
var e = /* @__PURE__ */ Xi();
|
|
2376
|
-
return
|
|
2375
|
+
return kt = function(t) {
|
|
2377
2376
|
return e(t) || t === 0 ? t : t < 0 ? -1 : 1;
|
|
2378
|
-
},
|
|
2377
|
+
}, kt;
|
|
2379
2378
|
}
|
|
2380
|
-
var
|
|
2379
|
+
var Nt, xn;
|
|
2381
2380
|
function es() {
|
|
2382
|
-
return
|
|
2381
|
+
return xn || (xn = 1, Nt = Object.getOwnPropertyDescriptor), Nt;
|
|
2383
2382
|
}
|
|
2384
|
-
var
|
|
2385
|
-
function
|
|
2386
|
-
if (
|
|
2387
|
-
|
|
2383
|
+
var At, $n;
|
|
2384
|
+
function tt() {
|
|
2385
|
+
if ($n) return At;
|
|
2386
|
+
$n = 1;
|
|
2388
2387
|
var e = /* @__PURE__ */ es();
|
|
2389
2388
|
if (e)
|
|
2390
2389
|
try {
|
|
@@ -2392,12 +2391,12 @@ function et() {
|
|
|
2392
2391
|
} catch {
|
|
2393
2392
|
e = null;
|
|
2394
2393
|
}
|
|
2395
|
-
return
|
|
2394
|
+
return At = e, At;
|
|
2396
2395
|
}
|
|
2397
|
-
var
|
|
2398
|
-
function
|
|
2399
|
-
if (
|
|
2400
|
-
|
|
2396
|
+
var It, wn;
|
|
2397
|
+
function rt() {
|
|
2398
|
+
if (wn) return It;
|
|
2399
|
+
wn = 1;
|
|
2401
2400
|
var e = Object.defineProperty || !1;
|
|
2402
2401
|
if (e)
|
|
2403
2402
|
try {
|
|
@@ -2405,11 +2404,11 @@ function tt() {
|
|
|
2405
2404
|
} catch {
|
|
2406
2405
|
e = !1;
|
|
2407
2406
|
}
|
|
2408
|
-
return
|
|
2407
|
+
return It = e, It;
|
|
2409
2408
|
}
|
|
2410
|
-
var
|
|
2409
|
+
var Ut, jn;
|
|
2411
2410
|
function ts() {
|
|
2412
|
-
return
|
|
2411
|
+
return jn || (jn = 1, Ut = function() {
|
|
2413
2412
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2414
2413
|
return !1;
|
|
2415
2414
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2435,115 +2434,115 @@ function ts() {
|
|
|
2435
2434
|
return !1;
|
|
2436
2435
|
}
|
|
2437
2436
|
return !0;
|
|
2438
|
-
}),
|
|
2437
|
+
}), Ut;
|
|
2439
2438
|
}
|
|
2440
|
-
var
|
|
2439
|
+
var Lt, Sn;
|
|
2441
2440
|
function rs() {
|
|
2442
|
-
if (
|
|
2443
|
-
|
|
2441
|
+
if (Sn) return Lt;
|
|
2442
|
+
Sn = 1;
|
|
2444
2443
|
var e = typeof Symbol < "u" && Symbol, n = ts();
|
|
2445
|
-
return
|
|
2444
|
+
return Lt = function() {
|
|
2446
2445
|
return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : n();
|
|
2447
|
-
},
|
|
2448
|
-
}
|
|
2449
|
-
var Lt, Sn;
|
|
2450
|
-
function ha() {
|
|
2451
|
-
return Sn || (Sn = 1, Lt = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Lt;
|
|
2446
|
+
}, Lt;
|
|
2452
2447
|
}
|
|
2453
2448
|
var Ft, On;
|
|
2454
2449
|
function ya() {
|
|
2455
|
-
|
|
2456
|
-
On = 1;
|
|
2457
|
-
var e = /* @__PURE__ */ pa();
|
|
2458
|
-
return Ft = e.getPrototypeOf || null, Ft;
|
|
2450
|
+
return On || (On = 1, Ft = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Ft;
|
|
2459
2451
|
}
|
|
2460
2452
|
var _t, Tn;
|
|
2461
|
-
function
|
|
2453
|
+
function ma() {
|
|
2462
2454
|
if (Tn) return _t;
|
|
2463
2455
|
Tn = 1;
|
|
2456
|
+
var e = /* @__PURE__ */ da();
|
|
2457
|
+
return _t = e.getPrototypeOf || null, _t;
|
|
2458
|
+
}
|
|
2459
|
+
var Bt, Pn;
|
|
2460
|
+
function ns() {
|
|
2461
|
+
if (Pn) return Bt;
|
|
2462
|
+
Pn = 1;
|
|
2464
2463
|
var e = "Function.prototype.bind called on incompatible ", n = Object.prototype.toString, t = Math.max, a = "[object Function]", l = function(i, c) {
|
|
2465
|
-
for (var
|
|
2466
|
-
|
|
2467
|
-
for (var
|
|
2468
|
-
|
|
2469
|
-
return
|
|
2464
|
+
for (var p = [], d = 0; d < i.length; d += 1)
|
|
2465
|
+
p[d] = i[d];
|
|
2466
|
+
for (var m = 0; m < c.length; m += 1)
|
|
2467
|
+
p[m + i.length] = c[m];
|
|
2468
|
+
return p;
|
|
2470
2469
|
}, s = function(i, c) {
|
|
2471
|
-
for (var
|
|
2472
|
-
|
|
2473
|
-
return
|
|
2470
|
+
for (var p = [], d = c, m = 0; d < i.length; d += 1, m += 1)
|
|
2471
|
+
p[m] = i[d];
|
|
2472
|
+
return p;
|
|
2474
2473
|
}, r = function(o, i) {
|
|
2475
|
-
for (var c = "",
|
|
2476
|
-
c += o[
|
|
2474
|
+
for (var c = "", p = 0; p < o.length; p += 1)
|
|
2475
|
+
c += o[p], p + 1 < o.length && (c += i);
|
|
2477
2476
|
return c;
|
|
2478
2477
|
};
|
|
2479
|
-
return
|
|
2478
|
+
return Bt = function(i) {
|
|
2480
2479
|
var c = this;
|
|
2481
2480
|
if (typeof c != "function" || n.apply(c) !== a)
|
|
2482
2481
|
throw new TypeError(e + c);
|
|
2483
|
-
for (var
|
|
2484
|
-
if (this instanceof
|
|
2485
|
-
var
|
|
2482
|
+
for (var p = s(arguments, 1), d, m = function() {
|
|
2483
|
+
if (this instanceof d) {
|
|
2484
|
+
var y = c.apply(
|
|
2486
2485
|
this,
|
|
2487
|
-
l(
|
|
2486
|
+
l(p, arguments)
|
|
2488
2487
|
);
|
|
2489
|
-
return Object(
|
|
2488
|
+
return Object(y) === y ? y : this;
|
|
2490
2489
|
}
|
|
2491
2490
|
return c.apply(
|
|
2492
2491
|
i,
|
|
2493
|
-
l(
|
|
2492
|
+
l(p, arguments)
|
|
2494
2493
|
);
|
|
2495
|
-
},
|
|
2494
|
+
}, g = t(0, c.length - p.length), x = [], v = 0; v < g; v++)
|
|
2496
2495
|
x[v] = "$" + v;
|
|
2497
|
-
if (
|
|
2498
|
-
var
|
|
2496
|
+
if (d = Function("binder", "return function (" + r(x, ",") + "){ return binder.apply(this,arguments); }")(m), c.prototype) {
|
|
2497
|
+
var u = function() {
|
|
2499
2498
|
};
|
|
2500
|
-
|
|
2499
|
+
u.prototype = c.prototype, d.prototype = new u(), u.prototype = null;
|
|
2501
2500
|
}
|
|
2502
|
-
return
|
|
2503
|
-
},
|
|
2501
|
+
return d;
|
|
2502
|
+
}, Bt;
|
|
2504
2503
|
}
|
|
2505
|
-
var
|
|
2504
|
+
var Ht, qn;
|
|
2506
2505
|
function He() {
|
|
2507
|
-
if (
|
|
2508
|
-
|
|
2506
|
+
if (qn) return Ht;
|
|
2507
|
+
qn = 1;
|
|
2509
2508
|
var e = ns();
|
|
2510
|
-
return
|
|
2511
|
-
}
|
|
2512
|
-
var Ht, qn;
|
|
2513
|
-
function $r() {
|
|
2514
|
-
return qn || (qn = 1, Ht = Function.prototype.call), Ht;
|
|
2509
|
+
return Ht = Function.prototype.bind || e, Ht;
|
|
2515
2510
|
}
|
|
2516
2511
|
var Mt, Cn;
|
|
2517
|
-
function
|
|
2518
|
-
return Cn || (Cn = 1, Mt = Function.prototype.
|
|
2512
|
+
function $r() {
|
|
2513
|
+
return Cn || (Cn = 1, Mt = Function.prototype.call), Mt;
|
|
2519
2514
|
}
|
|
2520
2515
|
var zt, Rn;
|
|
2521
|
-
function
|
|
2522
|
-
return Rn || (Rn = 1, zt =
|
|
2516
|
+
function wr() {
|
|
2517
|
+
return Rn || (Rn = 1, zt = Function.prototype.apply), zt;
|
|
2523
2518
|
}
|
|
2524
2519
|
var Wt, En;
|
|
2525
|
-
function
|
|
2526
|
-
|
|
2527
|
-
En = 1;
|
|
2528
|
-
var e = He(), n = wr(), t = $r(), a = as();
|
|
2529
|
-
return Wt = a || e.call(t, n), Wt;
|
|
2520
|
+
function as() {
|
|
2521
|
+
return En || (En = 1, Wt = typeof Reflect < "u" && Reflect && Reflect.apply), Wt;
|
|
2530
2522
|
}
|
|
2531
2523
|
var Jt, kn;
|
|
2532
2524
|
function ga() {
|
|
2533
2525
|
if (kn) return Jt;
|
|
2534
2526
|
kn = 1;
|
|
2535
|
-
var e = He(), n =
|
|
2536
|
-
return Jt =
|
|
2527
|
+
var e = He(), n = wr(), t = $r(), a = as();
|
|
2528
|
+
return Jt = a || e.call(t, n), Jt;
|
|
2529
|
+
}
|
|
2530
|
+
var Gt, Nn;
|
|
2531
|
+
function va() {
|
|
2532
|
+
if (Nn) return Gt;
|
|
2533
|
+
Nn = 1;
|
|
2534
|
+
var e = He(), n = /* @__PURE__ */ Be(), t = $r(), a = ga();
|
|
2535
|
+
return Gt = function(s) {
|
|
2537
2536
|
if (s.length < 1 || typeof s[0] != "function")
|
|
2538
2537
|
throw new n("a function is required");
|
|
2539
2538
|
return a(e, t, s);
|
|
2540
|
-
},
|
|
2539
|
+
}, Gt;
|
|
2541
2540
|
}
|
|
2542
|
-
var
|
|
2541
|
+
var Vt, An;
|
|
2543
2542
|
function os() {
|
|
2544
|
-
if (
|
|
2545
|
-
|
|
2546
|
-
var e =
|
|
2543
|
+
if (An) return Vt;
|
|
2544
|
+
An = 1;
|
|
2545
|
+
var e = va(), n = /* @__PURE__ */ tt(), t;
|
|
2547
2546
|
try {
|
|
2548
2547
|
t = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
2549
2548
|
[].__proto__ === Array.prototype;
|
|
@@ -2556,19 +2555,19 @@ function os() {
|
|
|
2556
2555
|
/** @type {keyof typeof Object.prototype} */
|
|
2557
2556
|
"__proto__"
|
|
2558
2557
|
), l = Object, s = l.getPrototypeOf;
|
|
2559
|
-
return
|
|
2558
|
+
return Vt = a && typeof a.get == "function" ? e([a.get]) : typeof s == "function" ? (
|
|
2560
2559
|
/** @type {import('./get')} */
|
|
2561
2560
|
function(o) {
|
|
2562
2561
|
return s(o == null ? o : l(o));
|
|
2563
2562
|
}
|
|
2564
|
-
) : !1,
|
|
2563
|
+
) : !1, Vt;
|
|
2565
2564
|
}
|
|
2566
|
-
var
|
|
2565
|
+
var Dt, In;
|
|
2567
2566
|
function is() {
|
|
2568
|
-
if (
|
|
2569
|
-
|
|
2570
|
-
var e =
|
|
2571
|
-
return
|
|
2567
|
+
if (In) return Dt;
|
|
2568
|
+
In = 1;
|
|
2569
|
+
var e = ya(), n = ma(), t = /* @__PURE__ */ os();
|
|
2570
|
+
return Dt = e ? function(l) {
|
|
2572
2571
|
return e(l);
|
|
2573
2572
|
} : n ? function(l) {
|
|
2574
2573
|
if (!l || typeof l != "object" && typeof l != "function")
|
|
@@ -2576,37 +2575,37 @@ function is() {
|
|
|
2576
2575
|
return n(l);
|
|
2577
2576
|
} : t ? function(l) {
|
|
2578
2577
|
return t(l);
|
|
2579
|
-
} : null,
|
|
2578
|
+
} : null, Dt;
|
|
2580
2579
|
}
|
|
2581
|
-
var
|
|
2580
|
+
var Qt, Un;
|
|
2582
2581
|
function ss() {
|
|
2583
|
-
if (
|
|
2584
|
-
|
|
2582
|
+
if (Un) return Qt;
|
|
2583
|
+
Un = 1;
|
|
2585
2584
|
var e = Function.prototype.call, n = Object.prototype.hasOwnProperty, t = He();
|
|
2586
|
-
return
|
|
2585
|
+
return Qt = t.call(e, n), Qt;
|
|
2587
2586
|
}
|
|
2588
|
-
var
|
|
2587
|
+
var Kt, Ln;
|
|
2589
2588
|
function jr() {
|
|
2590
|
-
if (
|
|
2591
|
-
|
|
2592
|
-
var e, n = /* @__PURE__ */
|
|
2589
|
+
if (Ln) return Kt;
|
|
2590
|
+
Ln = 1;
|
|
2591
|
+
var e, n = /* @__PURE__ */ da(), t = /* @__PURE__ */ Hi(), a = /* @__PURE__ */ Mi(), l = /* @__PURE__ */ zi(), s = /* @__PURE__ */ Wi(), r = /* @__PURE__ */ ha(), o = /* @__PURE__ */ Be(), i = /* @__PURE__ */ Ji(), c = /* @__PURE__ */ Gi(), p = /* @__PURE__ */ Vi(), d = /* @__PURE__ */ Di(), m = /* @__PURE__ */ Qi(), g = /* @__PURE__ */ Ki(), x = /* @__PURE__ */ Yi(), v = /* @__PURE__ */ Zi(), u = Function, y = function(G) {
|
|
2593
2592
|
try {
|
|
2594
|
-
return
|
|
2593
|
+
return u('"use strict"; return (' + G + ").constructor;")();
|
|
2595
2594
|
} catch {
|
|
2596
2595
|
}
|
|
2597
|
-
},
|
|
2596
|
+
}, h = /* @__PURE__ */ tt(), j = /* @__PURE__ */ rt(), T = function() {
|
|
2598
2597
|
throw new o();
|
|
2599
|
-
},
|
|
2598
|
+
}, f = h ? function() {
|
|
2600
2599
|
try {
|
|
2601
2600
|
return arguments.callee, T;
|
|
2602
2601
|
} catch {
|
|
2603
2602
|
try {
|
|
2604
|
-
return
|
|
2603
|
+
return h(arguments, "callee").get;
|
|
2605
2604
|
} catch {
|
|
2606
2605
|
return T;
|
|
2607
2606
|
}
|
|
2608
2607
|
}
|
|
2609
|
-
}() : T, O = rs()(), b = is(), R =
|
|
2608
|
+
}() : T, O = rs()(), b = is(), R = ma(), N = ya(), C = wr(), L = $r(), P = {}, oe = typeof Uint8Array > "u" || !b ? e : b(Uint8Array), H = {
|
|
2610
2609
|
__proto__: null,
|
|
2611
2610
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
2612
2611
|
"%Array%": Array,
|
|
@@ -2636,7 +2635,7 @@ function jr() {
|
|
|
2636
2635
|
"%Float32Array%": typeof Float32Array > "u" ? e : Float32Array,
|
|
2637
2636
|
"%Float64Array%": typeof Float64Array > "u" ? e : Float64Array,
|
|
2638
2637
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? e : FinalizationRegistry,
|
|
2639
|
-
"%Function%":
|
|
2638
|
+
"%Function%": u,
|
|
2640
2639
|
"%GeneratorFunction%": P,
|
|
2641
2640
|
"%Int8Array%": typeof Int8Array > "u" ? e : Int8Array,
|
|
2642
2641
|
"%Int16Array%": typeof Int16Array > "u" ? e : Int16Array,
|
|
@@ -2650,7 +2649,7 @@ function jr() {
|
|
|
2650
2649
|
"%Math%": Math,
|
|
2651
2650
|
"%Number%": Number,
|
|
2652
2651
|
"%Object%": n,
|
|
2653
|
-
"%Object.getOwnPropertyDescriptor%":
|
|
2652
|
+
"%Object.getOwnPropertyDescriptor%": h,
|
|
2654
2653
|
"%parseFloat%": parseFloat,
|
|
2655
2654
|
"%parseInt%": parseInt,
|
|
2656
2655
|
"%Promise%": typeof Promise > "u" ? e : Promise,
|
|
@@ -2666,7 +2665,7 @@ function jr() {
|
|
|
2666
2665
|
"%StringIteratorPrototype%": O && b ? b(""[Symbol.iterator]()) : e,
|
|
2667
2666
|
"%Symbol%": O ? Symbol : e,
|
|
2668
2667
|
"%SyntaxError%": r,
|
|
2669
|
-
"%ThrowTypeError%":
|
|
2668
|
+
"%ThrowTypeError%": f,
|
|
2670
2669
|
"%TypedArray%": oe,
|
|
2671
2670
|
"%TypeError%": o,
|
|
2672
2671
|
"%Uint8Array%": typeof Uint8Array > "u" ? e : Uint8Array,
|
|
@@ -2682,10 +2681,10 @@ function jr() {
|
|
|
2682
2681
|
"%Object.defineProperty%": j,
|
|
2683
2682
|
"%Object.getPrototypeOf%": R,
|
|
2684
2683
|
"%Math.abs%": c,
|
|
2685
|
-
"%Math.floor%":
|
|
2686
|
-
"%Math.max%":
|
|
2687
|
-
"%Math.min%":
|
|
2688
|
-
"%Math.pow%":
|
|
2684
|
+
"%Math.floor%": p,
|
|
2685
|
+
"%Math.max%": d,
|
|
2686
|
+
"%Math.min%": m,
|
|
2687
|
+
"%Math.pow%": g,
|
|
2689
2688
|
"%Math.round%": x,
|
|
2690
2689
|
"%Math.sign%": v,
|
|
2691
2690
|
"%Reflect.getPrototypeOf%": N
|
|
@@ -2700,11 +2699,11 @@ function jr() {
|
|
|
2700
2699
|
var se = function G(I) {
|
|
2701
2700
|
var _;
|
|
2702
2701
|
if (I === "%AsyncFunction%")
|
|
2703
|
-
_ =
|
|
2702
|
+
_ = y("async function () {}");
|
|
2704
2703
|
else if (I === "%GeneratorFunction%")
|
|
2705
|
-
_ =
|
|
2704
|
+
_ = y("function* () {}");
|
|
2706
2705
|
else if (I === "%AsyncGeneratorFunction%")
|
|
2707
|
-
_ =
|
|
2706
|
+
_ = y("async function* () {}");
|
|
2708
2707
|
else if (I === "%AsyncGenerator%") {
|
|
2709
2708
|
var B = G("%AsyncGeneratorFunction%");
|
|
2710
2709
|
B && (_ = B.prototype);
|
|
@@ -2790,7 +2789,7 @@ function jr() {
|
|
|
2790
2789
|
}
|
|
2791
2790
|
throw new r("intrinsic " + I + " does not exist!");
|
|
2792
2791
|
};
|
|
2793
|
-
return
|
|
2792
|
+
return Kt = function(I, _) {
|
|
2794
2793
|
if (typeof I != "string" || I.length === 0)
|
|
2795
2794
|
throw new o("intrinsic name must be a non-empty string");
|
|
2796
2795
|
if (arguments.length > 1 && typeof _ != "boolean")
|
|
@@ -2811,8 +2810,8 @@ function jr() {
|
|
|
2811
2810
|
throw new o("base intrinsic for " + I + " exists, but the property is not available.");
|
|
2812
2811
|
return;
|
|
2813
2812
|
}
|
|
2814
|
-
if (
|
|
2815
|
-
var Se =
|
|
2813
|
+
if (h && Pe + 1 >= B.length) {
|
|
2814
|
+
var Se = h(ae, ye);
|
|
2816
2815
|
je = !!Se, je && "get" in Se && !("originalValue" in Se.get) ? ae = Se.get : ae = ae[ye];
|
|
2817
2816
|
} else
|
|
2818
2817
|
je = re(ae, ye), ae = ae[ye];
|
|
@@ -2820,14 +2819,14 @@ function jr() {
|
|
|
2820
2819
|
}
|
|
2821
2820
|
}
|
|
2822
2821
|
return ae;
|
|
2823
|
-
},
|
|
2822
|
+
}, Kt;
|
|
2824
2823
|
}
|
|
2825
|
-
var
|
|
2824
|
+
var Yt = { exports: {} }, Xt, Fn;
|
|
2826
2825
|
function ls() {
|
|
2827
|
-
if (
|
|
2828
|
-
|
|
2829
|
-
var e = /* @__PURE__ */
|
|
2830
|
-
return
|
|
2826
|
+
if (Fn) return Xt;
|
|
2827
|
+
Fn = 1;
|
|
2828
|
+
var e = /* @__PURE__ */ rt(), n = /* @__PURE__ */ ha(), t = /* @__PURE__ */ Be(), a = /* @__PURE__ */ tt();
|
|
2829
|
+
return Xt = function(s, r, o) {
|
|
2831
2830
|
if (!s || typeof s != "object" && typeof s != "function")
|
|
2832
2831
|
throw new t("`obj` must be an object or a function`");
|
|
2833
2832
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -2840,25 +2839,25 @@ function ls() {
|
|
|
2840
2839
|
throw new t("`nonConfigurable`, if provided, must be a boolean or null");
|
|
2841
2840
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
2842
2841
|
throw new t("`loose`, if provided, must be a boolean");
|
|
2843
|
-
var i = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null,
|
|
2842
|
+
var i = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null, p = arguments.length > 5 ? arguments[5] : null, d = arguments.length > 6 ? arguments[6] : !1, m = !!a && a(s, r);
|
|
2844
2843
|
if (e)
|
|
2845
2844
|
e(s, r, {
|
|
2846
|
-
configurable:
|
|
2847
|
-
enumerable: i === null &&
|
|
2845
|
+
configurable: p === null && m ? m.configurable : !p,
|
|
2846
|
+
enumerable: i === null && m ? m.enumerable : !i,
|
|
2848
2847
|
value: o,
|
|
2849
|
-
writable: c === null &&
|
|
2848
|
+
writable: c === null && m ? m.writable : !c
|
|
2850
2849
|
});
|
|
2851
|
-
else if (
|
|
2850
|
+
else if (d || !i && !c && !p)
|
|
2852
2851
|
s[r] = o;
|
|
2853
2852
|
else
|
|
2854
2853
|
throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
2855
|
-
},
|
|
2854
|
+
}, Xt;
|
|
2856
2855
|
}
|
|
2857
|
-
var
|
|
2856
|
+
var Zt, _n;
|
|
2858
2857
|
function cs() {
|
|
2859
|
-
if (
|
|
2860
|
-
|
|
2861
|
-
var e = /* @__PURE__ */
|
|
2858
|
+
if (_n) return Zt;
|
|
2859
|
+
_n = 1;
|
|
2860
|
+
var e = /* @__PURE__ */ rt(), n = function() {
|
|
2862
2861
|
return !!e;
|
|
2863
2862
|
};
|
|
2864
2863
|
return n.hasArrayLengthDefineBug = function() {
|
|
@@ -2869,24 +2868,24 @@ function cs() {
|
|
|
2869
2868
|
} catch {
|
|
2870
2869
|
return !0;
|
|
2871
2870
|
}
|
|
2872
|
-
},
|
|
2871
|
+
}, Zt = n, Zt;
|
|
2873
2872
|
}
|
|
2874
|
-
var
|
|
2873
|
+
var er, Bn;
|
|
2875
2874
|
function us() {
|
|
2876
|
-
if (
|
|
2877
|
-
|
|
2878
|
-
var e = /* @__PURE__ */ jr(), n = /* @__PURE__ */ ls(), t = /* @__PURE__ */ cs()(), a = /* @__PURE__ */
|
|
2879
|
-
return
|
|
2875
|
+
if (Bn) return er;
|
|
2876
|
+
Bn = 1;
|
|
2877
|
+
var e = /* @__PURE__ */ jr(), n = /* @__PURE__ */ ls(), t = /* @__PURE__ */ cs()(), a = /* @__PURE__ */ tt(), l = /* @__PURE__ */ Be(), s = e("%Math.floor%");
|
|
2878
|
+
return er = function(o, i) {
|
|
2880
2879
|
if (typeof o != "function")
|
|
2881
2880
|
throw new l("`fn` is not a function");
|
|
2882
2881
|
if (typeof i != "number" || i < 0 || i > 4294967295 || s(i) !== i)
|
|
2883
2882
|
throw new l("`length` must be a positive 32-bit integer");
|
|
2884
|
-
var c = arguments.length > 2 && !!arguments[2],
|
|
2883
|
+
var c = arguments.length > 2 && !!arguments[2], p = !0, d = !0;
|
|
2885
2884
|
if ("length" in o && a) {
|
|
2886
|
-
var
|
|
2887
|
-
|
|
2885
|
+
var m = a(o, "length");
|
|
2886
|
+
m && !m.configurable && (p = !1), m && !m.writable && (d = !1);
|
|
2888
2887
|
}
|
|
2889
|
-
return (
|
|
2888
|
+
return (p || d || !c) && (t ? n(
|
|
2890
2889
|
/** @type {Parameters<define>[0]} */
|
|
2891
2890
|
o,
|
|
2892
2891
|
"length",
|
|
@@ -2899,21 +2898,21 @@ function us() {
|
|
|
2899
2898
|
"length",
|
|
2900
2899
|
i
|
|
2901
2900
|
)), o;
|
|
2902
|
-
},
|
|
2901
|
+
}, er;
|
|
2903
2902
|
}
|
|
2904
|
-
var
|
|
2903
|
+
var tr, Hn;
|
|
2905
2904
|
function fs() {
|
|
2906
|
-
if (
|
|
2907
|
-
|
|
2908
|
-
var e = He(), n = wr(), t =
|
|
2909
|
-
return
|
|
2905
|
+
if (Hn) return tr;
|
|
2906
|
+
Hn = 1;
|
|
2907
|
+
var e = He(), n = wr(), t = ga();
|
|
2908
|
+
return tr = function() {
|
|
2910
2909
|
return t(e, n, arguments);
|
|
2911
|
-
},
|
|
2910
|
+
}, tr;
|
|
2912
2911
|
}
|
|
2913
|
-
var
|
|
2912
|
+
var Mn;
|
|
2914
2913
|
function ps() {
|
|
2915
|
-
return
|
|
2916
|
-
var n = /* @__PURE__ */ us(), t = /* @__PURE__ */
|
|
2914
|
+
return Mn || (Mn = 1, function(e) {
|
|
2915
|
+
var n = /* @__PURE__ */ us(), t = /* @__PURE__ */ rt(), a = va(), l = fs();
|
|
2917
2916
|
e.exports = function(r) {
|
|
2918
2917
|
var o = a(arguments), i = r.length - (arguments.length - 1);
|
|
2919
2918
|
return n(
|
|
@@ -2922,27 +2921,27 @@ function ps() {
|
|
|
2922
2921
|
!0
|
|
2923
2922
|
);
|
|
2924
2923
|
}, t ? t(e.exports, "apply", { value: l }) : e.exports.apply = l;
|
|
2925
|
-
}(
|
|
2924
|
+
}(Yt)), Yt.exports;
|
|
2926
2925
|
}
|
|
2927
|
-
var
|
|
2926
|
+
var rr, zn;
|
|
2928
2927
|
function ds() {
|
|
2929
|
-
if (
|
|
2930
|
-
|
|
2928
|
+
if (zn) return rr;
|
|
2929
|
+
zn = 1;
|
|
2931
2930
|
var e = /* @__PURE__ */ jr(), n = ps(), t = n(e("String.prototype.indexOf"));
|
|
2932
|
-
return
|
|
2931
|
+
return rr = function(l, s) {
|
|
2933
2932
|
var r = e(l, !!s);
|
|
2934
2933
|
return typeof r == "function" && t(l, ".prototype.") > -1 ? n(r) : r;
|
|
2935
|
-
},
|
|
2934
|
+
}, rr;
|
|
2936
2935
|
}
|
|
2937
2936
|
const hs = {}, ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2938
2937
|
__proto__: null,
|
|
2939
2938
|
default: hs
|
|
2940
|
-
}, Symbol.toStringTag, { value: "Module" })), ms = /* @__PURE__ */
|
|
2941
|
-
var
|
|
2939
|
+
}, Symbol.toStringTag, { value: "Module" })), ms = /* @__PURE__ */ ho(ys);
|
|
2940
|
+
var nr, Wn;
|
|
2942
2941
|
function gs() {
|
|
2943
|
-
if (
|
|
2944
|
-
|
|
2945
|
-
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, a = e && Map.prototype.forEach, l = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && l ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, r = l && s && typeof s.get == "function" ? s.get : null, o = l && Set.prototype.forEach, i = typeof WeakMap == "function" && WeakMap.prototype, c = i ? WeakMap.prototype.has : null,
|
|
2942
|
+
if (Wn) return nr;
|
|
2943
|
+
Wn = 1;
|
|
2944
|
+
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, a = e && Map.prototype.forEach, l = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && l ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, r = l && s && typeof s.get == "function" ? s.get : null, o = l && Set.prototype.forEach, i = typeof WeakMap == "function" && WeakMap.prototype, c = i ? WeakMap.prototype.has : null, p = typeof WeakSet == "function" && WeakSet.prototype, d = p ? WeakSet.prototype.has : null, m = typeof WeakRef == "function" && WeakRef.prototype, g = m ? WeakRef.prototype.deref : null, x = Boolean.prototype.valueOf, v = Object.prototype.toString, u = Function.prototype.toString, y = String.prototype.match, h = String.prototype.slice, j = String.prototype.replace, T = String.prototype.toUpperCase, f = String.prototype.toLowerCase, O = RegExp.prototype.test, b = Array.prototype.concat, R = Array.prototype.join, N = Array.prototype.slice, C = Math.floor, L = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, P = Object.getOwnPropertySymbols, oe = 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(w) {
|
|
2946
2945
|
return w.__proto__;
|
|
2947
2946
|
} : null);
|
|
2948
2947
|
function A(w, S) {
|
|
@@ -2952,14 +2951,14 @@ function gs() {
|
|
|
2952
2951
|
if (typeof w == "number") {
|
|
2953
2952
|
var ee = w < 0 ? -C(-w) : C(w);
|
|
2954
2953
|
if (ee !== w) {
|
|
2955
|
-
var ie = String(ee), M =
|
|
2954
|
+
var ie = String(ee), M = h.call(S, ie.length + 1);
|
|
2956
2955
|
return j.call(ie, X, "$&_") + "." + j.call(j.call(M, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
2957
2956
|
}
|
|
2958
2957
|
}
|
|
2959
2958
|
return j.call(S, X, "$&_");
|
|
2960
2959
|
}
|
|
2961
2960
|
var re = ms, E = re.custom, k = _(E) ? E : null;
|
|
2962
|
-
|
|
2961
|
+
nr = function w(S, X, ee, ie) {
|
|
2963
2962
|
var M = X || {};
|
|
2964
2963
|
if (W(M, "quoteStyle") && M.quoteStyle !== "single" && M.quoteStyle !== "double")
|
|
2965
2964
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
@@ -2991,16 +2990,16 @@ function gs() {
|
|
|
2991
2990
|
var xe = String(S) + "n";
|
|
2992
2991
|
return Oe ? A(S, xe) : xe;
|
|
2993
2992
|
}
|
|
2994
|
-
var
|
|
2995
|
-
if (typeof ee > "u" && (ee = 0), ee >=
|
|
2993
|
+
var ot = typeof M.depth > "u" ? 5 : M.depth;
|
|
2994
|
+
if (typeof ee > "u" && (ee = 0), ee >= ot && ot > 0 && typeof S == "object")
|
|
2996
2995
|
return U(S) ? "[Array]" : "[Object]";
|
|
2997
|
-
var Re =
|
|
2996
|
+
var Re = Pa(M, ee);
|
|
2998
2997
|
if (typeof ie > "u")
|
|
2999
2998
|
ie = [];
|
|
3000
2999
|
else if (he(ie, S) >= 0)
|
|
3001
3000
|
return "[Circular]";
|
|
3002
|
-
function me(Ee, We,
|
|
3003
|
-
if (We && (ie = N.call(ie), ie.push(We)),
|
|
3001
|
+
function me(Ee, We, Ca) {
|
|
3002
|
+
if (We && (ie = N.call(ie), ie.push(We)), Ca) {
|
|
3004
3003
|
var Ir = {
|
|
3005
3004
|
depth: M.depth
|
|
3006
3005
|
};
|
|
@@ -3017,23 +3016,23 @@ function gs() {
|
|
|
3017
3016
|
return typeof S == "object" && !H ? Ne(Rr) : Rr;
|
|
3018
3017
|
}
|
|
3019
3018
|
if (Ce(S)) {
|
|
3020
|
-
for (var Ae = "<" +
|
|
3021
|
-
Ae += " " +
|
|
3022
|
-
return Ae += ">", S.childNodes && S.childNodes.length && (Ae += "..."), Ae += "</" +
|
|
3019
|
+
for (var Ae = "<" + f.call(String(S.nodeName)), it = S.attributes || [], ze = 0; ze < it.length; ze++)
|
|
3020
|
+
Ae += " " + it[ze].name + "=" + F(q(it[ze].value), "double", M);
|
|
3021
|
+
return Ae += ">", S.childNodes && S.childNodes.length && (Ae += "..."), Ae += "</" + f.call(String(S.nodeName)) + ">", Ae;
|
|
3023
3022
|
}
|
|
3024
3023
|
if (U(S)) {
|
|
3025
3024
|
if (S.length === 0)
|
|
3026
3025
|
return "[]";
|
|
3027
|
-
var
|
|
3028
|
-
return Re && !
|
|
3026
|
+
var st = Me(S, me);
|
|
3027
|
+
return Re && !Ta(st) ? "[" + at(st, Re) + "]" : "[ " + R.call(st, ", ") + " ]";
|
|
3029
3028
|
}
|
|
3030
3029
|
if (K(S)) {
|
|
3031
|
-
var
|
|
3032
|
-
return !("cause" in Error.prototype) && "cause" in S && !se.call(S, "cause") ? "{ [" + String(S) + "] " + R.call(b.call("[cause]: " + me(S.cause),
|
|
3030
|
+
var lt = Me(S, me);
|
|
3031
|
+
return !("cause" in Error.prototype) && "cause" in S && !se.call(S, "cause") ? "{ [" + String(S) + "] " + R.call(b.call("[cause]: " + me(S.cause), lt), ", ") + " }" : lt.length === 0 ? "[" + String(S) + "]" : "{ [" + String(S) + "] " + R.call(lt, ", ") + " }";
|
|
3033
3032
|
}
|
|
3034
3033
|
if (typeof S == "object" && be) {
|
|
3035
3034
|
if (k && typeof S[k] == "function" && re)
|
|
3036
|
-
return re(S, { depth:
|
|
3035
|
+
return re(S, { depth: ot - ee });
|
|
3037
3036
|
if (be !== "symbol" && typeof S.inspect == "function")
|
|
3038
3037
|
return S.inspect();
|
|
3039
3038
|
}
|
|
@@ -3050,11 +3049,11 @@ function gs() {
|
|
|
3050
3049
|
}), Pr("Set", r.call(S), kr, Re);
|
|
3051
3050
|
}
|
|
3052
3051
|
if (Pe(S))
|
|
3053
|
-
return
|
|
3052
|
+
return nt("WeakMap");
|
|
3054
3053
|
if (qe(S))
|
|
3055
|
-
return
|
|
3054
|
+
return nt("WeakSet");
|
|
3056
3055
|
if (je(S))
|
|
3057
|
-
return
|
|
3056
|
+
return nt("WeakRef");
|
|
3058
3057
|
if (G(S))
|
|
3059
3058
|
return Ne(me(Number(S)));
|
|
3060
3059
|
if (B(S))
|
|
@@ -3068,8 +3067,8 @@ function gs() {
|
|
|
3068
3067
|
if (typeof globalThis < "u" && S === globalThis || typeof Ke < "u" && S === Ke)
|
|
3069
3068
|
return "{ [object globalThis] }";
|
|
3070
3069
|
if (!J(S) && !z(S)) {
|
|
3071
|
-
var
|
|
3072
|
-
return
|
|
3070
|
+
var ct = Me(S, me), Nr = Z ? Z(S) === Object.prototype : S instanceof Object || S.constructor === Object, ut = S instanceof Object ? "" : "null prototype", Ar = !Nr && D && Object(S) === S && D in S ? h.call(Y(S), 8, -1) : ut ? "Object" : "", qa = Nr || typeof S.constructor != "function" ? "" : S.constructor.name ? S.constructor.name + " " : "", ft = qa + (Ar || ut ? "[" + R.call(b.call([], Ar || [], ut || []), ": ") + "] " : "");
|
|
3071
|
+
return ct.length === 0 ? ft + "{}" : Re ? ft + "{" + at(ct, Re) + "}" : ft + "{ " + R.call(ct, ", ") + " }";
|
|
3073
3072
|
}
|
|
3074
3073
|
return String(S);
|
|
3075
3074
|
};
|
|
@@ -3135,7 +3134,7 @@ function gs() {
|
|
|
3135
3134
|
function ae(w) {
|
|
3136
3135
|
if (w.name)
|
|
3137
3136
|
return w.name;
|
|
3138
|
-
var S =
|
|
3137
|
+
var S = y.call(u.call(w), /^function\s*([\w$]+)/);
|
|
3139
3138
|
return S ? S[1] : null;
|
|
3140
3139
|
}
|
|
3141
3140
|
function he(w, S) {
|
|
@@ -3167,7 +3166,7 @@ function gs() {
|
|
|
3167
3166
|
try {
|
|
3168
3167
|
c.call(w, c);
|
|
3169
3168
|
try {
|
|
3170
|
-
|
|
3169
|
+
d.call(w, d);
|
|
3171
3170
|
} catch {
|
|
3172
3171
|
return !0;
|
|
3173
3172
|
}
|
|
@@ -3177,10 +3176,10 @@ function gs() {
|
|
|
3177
3176
|
return !1;
|
|
3178
3177
|
}
|
|
3179
3178
|
function je(w) {
|
|
3180
|
-
if (!
|
|
3179
|
+
if (!g || !w || typeof w != "object")
|
|
3181
3180
|
return !1;
|
|
3182
3181
|
try {
|
|
3183
|
-
return
|
|
3182
|
+
return g.call(w), !0;
|
|
3184
3183
|
} catch {
|
|
3185
3184
|
}
|
|
3186
3185
|
return !1;
|
|
@@ -3201,10 +3200,10 @@ function gs() {
|
|
|
3201
3200
|
return !1;
|
|
3202
3201
|
}
|
|
3203
3202
|
function qe(w) {
|
|
3204
|
-
if (!
|
|
3203
|
+
if (!d || !w || typeof w != "object")
|
|
3205
3204
|
return !1;
|
|
3206
3205
|
try {
|
|
3207
|
-
|
|
3206
|
+
d.call(w, d);
|
|
3208
3207
|
try {
|
|
3209
3208
|
c.call(w, c);
|
|
3210
3209
|
} catch {
|
|
@@ -3221,12 +3220,12 @@ function gs() {
|
|
|
3221
3220
|
function Se(w, S) {
|
|
3222
3221
|
if (w.length > S.maxStringLength) {
|
|
3223
3222
|
var X = w.length - S.maxStringLength, ee = "... " + X + " more character" + (X > 1 ? "s" : "");
|
|
3224
|
-
return Se(
|
|
3223
|
+
return Se(h.call(w, 0, S.maxStringLength), S) + ee;
|
|
3225
3224
|
}
|
|
3226
|
-
var ie = j.call(j.call(w, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g,
|
|
3225
|
+
var ie = j.call(j.call(w, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Oa);
|
|
3227
3226
|
return F(ie, "single", S);
|
|
3228
3227
|
}
|
|
3229
|
-
function
|
|
3228
|
+
function Oa(w) {
|
|
3230
3229
|
var S = w.charCodeAt(0), X = {
|
|
3231
3230
|
8: "b",
|
|
3232
3231
|
9: "t",
|
|
@@ -3239,21 +3238,21 @@ function gs() {
|
|
|
3239
3238
|
function Ne(w) {
|
|
3240
3239
|
return "Object(" + w + ")";
|
|
3241
3240
|
}
|
|
3242
|
-
function
|
|
3241
|
+
function nt(w) {
|
|
3243
3242
|
return w + " { ? }";
|
|
3244
3243
|
}
|
|
3245
3244
|
function Pr(w, S, X, ee) {
|
|
3246
|
-
var ie = ee ?
|
|
3245
|
+
var ie = ee ? at(X, ee) : R.call(X, ", ");
|
|
3247
3246
|
return w + " (" + S + ") {" + ie + "}";
|
|
3248
3247
|
}
|
|
3249
|
-
function
|
|
3248
|
+
function Ta(w) {
|
|
3250
3249
|
for (var S = 0; S < w.length; S++)
|
|
3251
3250
|
if (he(w[S], `
|
|
3252
3251
|
`) >= 0)
|
|
3253
3252
|
return !1;
|
|
3254
3253
|
return !0;
|
|
3255
3254
|
}
|
|
3256
|
-
function
|
|
3255
|
+
function Pa(w, S) {
|
|
3257
3256
|
var X;
|
|
3258
3257
|
if (w.indent === " ")
|
|
3259
3258
|
X = " ";
|
|
@@ -3266,7 +3265,7 @@ function gs() {
|
|
|
3266
3265
|
prev: R.call(Array(S + 1), X)
|
|
3267
3266
|
};
|
|
3268
3267
|
}
|
|
3269
|
-
function
|
|
3268
|
+
function at(w, S) {
|
|
3270
3269
|
if (w.length === 0)
|
|
3271
3270
|
return "";
|
|
3272
3271
|
var X = `
|
|
@@ -3294,75 +3293,75 @@ function gs() {
|
|
|
3294
3293
|
se.call(w, M[xe]) && ee.push("[" + S(M[xe]) + "]: " + S(w[M[xe]], w));
|
|
3295
3294
|
return ee;
|
|
3296
3295
|
}
|
|
3297
|
-
return
|
|
3296
|
+
return nr;
|
|
3298
3297
|
}
|
|
3299
|
-
var
|
|
3298
|
+
var ar, Jn;
|
|
3300
3299
|
function vs() {
|
|
3301
|
-
if (
|
|
3302
|
-
|
|
3303
|
-
var e = /* @__PURE__ */ jr(), n = ds(), t = /* @__PURE__ */ gs(), a = /* @__PURE__ */ Be(), l = e("%WeakMap%", !0), s = e("%Map%", !0), r = n("WeakMap.prototype.get", !0), o = n("WeakMap.prototype.set", !0), i = n("WeakMap.prototype.has", !0), c = n("Map.prototype.get", !0),
|
|
3304
|
-
for (var
|
|
3305
|
-
if (j.key ===
|
|
3306
|
-
return
|
|
3307
|
-
|
|
3308
|
-
},
|
|
3309
|
-
var
|
|
3310
|
-
return
|
|
3311
|
-
}, x = function(
|
|
3312
|
-
var j =
|
|
3313
|
-
j ? j.value =
|
|
3300
|
+
if (Jn) return ar;
|
|
3301
|
+
Jn = 1;
|
|
3302
|
+
var e = /* @__PURE__ */ jr(), n = ds(), t = /* @__PURE__ */ gs(), a = /* @__PURE__ */ Be(), l = e("%WeakMap%", !0), s = e("%Map%", !0), r = n("WeakMap.prototype.get", !0), o = n("WeakMap.prototype.set", !0), i = n("WeakMap.prototype.has", !0), c = n("Map.prototype.get", !0), p = n("Map.prototype.set", !0), d = n("Map.prototype.has", !0), m = function(u, y) {
|
|
3303
|
+
for (var h = u, j; (j = h.next) !== null; h = j)
|
|
3304
|
+
if (j.key === y)
|
|
3305
|
+
return h.next = j.next, j.next = /** @type {NonNullable<typeof list.next>} */
|
|
3306
|
+
u.next, u.next = j, j;
|
|
3307
|
+
}, g = function(u, y) {
|
|
3308
|
+
var h = m(u, y);
|
|
3309
|
+
return h && h.value;
|
|
3310
|
+
}, x = function(u, y, h) {
|
|
3311
|
+
var j = m(u, y);
|
|
3312
|
+
j ? j.value = h : u.next = /** @type {import('.').ListNode<typeof value>} */
|
|
3314
3313
|
{
|
|
3315
3314
|
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
3316
|
-
key:
|
|
3317
|
-
next:
|
|
3318
|
-
value:
|
|
3315
|
+
key: y,
|
|
3316
|
+
next: u.next,
|
|
3317
|
+
value: h
|
|
3319
3318
|
};
|
|
3320
|
-
}, v = function(
|
|
3321
|
-
return !!
|
|
3319
|
+
}, v = function(u, y) {
|
|
3320
|
+
return !!m(u, y);
|
|
3322
3321
|
};
|
|
3323
|
-
return
|
|
3324
|
-
var
|
|
3325
|
-
assert: function(
|
|
3326
|
-
if (!T.has(
|
|
3327
|
-
throw new a("Side channel does not contain " + t(
|
|
3322
|
+
return ar = function() {
|
|
3323
|
+
var y, h, j, T = {
|
|
3324
|
+
assert: function(f) {
|
|
3325
|
+
if (!T.has(f))
|
|
3326
|
+
throw new a("Side channel does not contain " + t(f));
|
|
3328
3327
|
},
|
|
3329
|
-
get: function(
|
|
3330
|
-
if (l &&
|
|
3331
|
-
if (
|
|
3332
|
-
return r(
|
|
3328
|
+
get: function(f) {
|
|
3329
|
+
if (l && f && (typeof f == "object" || typeof f == "function")) {
|
|
3330
|
+
if (y)
|
|
3331
|
+
return r(y, f);
|
|
3333
3332
|
} else if (s) {
|
|
3334
|
-
if (
|
|
3335
|
-
return c(
|
|
3333
|
+
if (h)
|
|
3334
|
+
return c(h, f);
|
|
3336
3335
|
} else if (j)
|
|
3337
|
-
return
|
|
3336
|
+
return g(j, f);
|
|
3338
3337
|
},
|
|
3339
|
-
has: function(
|
|
3340
|
-
if (l &&
|
|
3341
|
-
if (
|
|
3342
|
-
return i(
|
|
3338
|
+
has: function(f) {
|
|
3339
|
+
if (l && f && (typeof f == "object" || typeof f == "function")) {
|
|
3340
|
+
if (y)
|
|
3341
|
+
return i(y, f);
|
|
3343
3342
|
} else if (s) {
|
|
3344
|
-
if (
|
|
3345
|
-
return
|
|
3343
|
+
if (h)
|
|
3344
|
+
return d(h, f);
|
|
3346
3345
|
} else if (j)
|
|
3347
|
-
return v(j,
|
|
3346
|
+
return v(j, f);
|
|
3348
3347
|
return !1;
|
|
3349
3348
|
},
|
|
3350
|
-
set: function(
|
|
3351
|
-
l &&
|
|
3349
|
+
set: function(f, O) {
|
|
3350
|
+
l && f && (typeof f == "object" || typeof f == "function") ? (y || (y = new l()), o(y, f, O)) : s ? (h || (h = new s()), p(h, f, O)) : (j || (j = { key: {}, next: null }), x(j, f, O));
|
|
3352
3351
|
}
|
|
3353
3352
|
};
|
|
3354
3353
|
return T;
|
|
3355
|
-
},
|
|
3354
|
+
}, ar;
|
|
3356
3355
|
}
|
|
3357
|
-
var
|
|
3356
|
+
var or, Gn;
|
|
3358
3357
|
function Sr() {
|
|
3359
|
-
if (
|
|
3360
|
-
|
|
3358
|
+
if (Gn) return or;
|
|
3359
|
+
Gn = 1;
|
|
3361
3360
|
var e = String.prototype.replace, n = /%20/g, t = {
|
|
3362
3361
|
RFC1738: "RFC1738",
|
|
3363
3362
|
RFC3986: "RFC3986"
|
|
3364
3363
|
};
|
|
3365
|
-
return
|
|
3364
|
+
return or = {
|
|
3366
3365
|
default: t.RFC3986,
|
|
3367
3366
|
formatters: {
|
|
3368
3367
|
RFC1738: function(a) {
|
|
@@ -3374,79 +3373,79 @@ function Sr() {
|
|
|
3374
3373
|
},
|
|
3375
3374
|
RFC1738: t.RFC1738,
|
|
3376
3375
|
RFC3986: t.RFC3986
|
|
3377
|
-
},
|
|
3376
|
+
}, or;
|
|
3378
3377
|
}
|
|
3379
|
-
var
|
|
3380
|
-
function
|
|
3381
|
-
if (
|
|
3382
|
-
|
|
3378
|
+
var ir, Vn;
|
|
3379
|
+
function ba() {
|
|
3380
|
+
if (Vn) return ir;
|
|
3381
|
+
Vn = 1;
|
|
3383
3382
|
var e = /* @__PURE__ */ Sr(), n = Object.prototype.hasOwnProperty, t = Array.isArray, a = function() {
|
|
3384
|
-
for (var
|
|
3385
|
-
|
|
3386
|
-
return
|
|
3387
|
-
}(), l = function(
|
|
3388
|
-
for (;
|
|
3389
|
-
var
|
|
3383
|
+
for (var u = [], y = 0; y < 256; ++y)
|
|
3384
|
+
u.push("%" + ((y < 16 ? "0" : "") + y.toString(16)).toUpperCase());
|
|
3385
|
+
return u;
|
|
3386
|
+
}(), l = function(y) {
|
|
3387
|
+
for (; y.length > 1; ) {
|
|
3388
|
+
var h = y.pop(), j = h.obj[h.prop];
|
|
3390
3389
|
if (t(j)) {
|
|
3391
|
-
for (var T = [],
|
|
3392
|
-
typeof j[
|
|
3393
|
-
|
|
3390
|
+
for (var T = [], f = 0; f < j.length; ++f)
|
|
3391
|
+
typeof j[f] < "u" && T.push(j[f]);
|
|
3392
|
+
h.obj[h.prop] = T;
|
|
3394
3393
|
}
|
|
3395
3394
|
}
|
|
3396
|
-
}, s = function(
|
|
3397
|
-
for (var j =
|
|
3398
|
-
typeof
|
|
3395
|
+
}, s = function(y, h) {
|
|
3396
|
+
for (var j = h && h.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, T = 0; T < y.length; ++T)
|
|
3397
|
+
typeof y[T] < "u" && (j[T] = y[T]);
|
|
3399
3398
|
return j;
|
|
3400
|
-
}, r = function
|
|
3401
|
-
if (!
|
|
3402
|
-
return
|
|
3403
|
-
if (typeof
|
|
3404
|
-
if (t(
|
|
3405
|
-
|
|
3406
|
-
else if (
|
|
3407
|
-
(j && (j.plainObjects || j.allowPrototypes) || !n.call(Object.prototype,
|
|
3399
|
+
}, r = function u(y, h, j) {
|
|
3400
|
+
if (!h)
|
|
3401
|
+
return y;
|
|
3402
|
+
if (typeof h != "object") {
|
|
3403
|
+
if (t(y))
|
|
3404
|
+
y.push(h);
|
|
3405
|
+
else if (y && typeof y == "object")
|
|
3406
|
+
(j && (j.plainObjects || j.allowPrototypes) || !n.call(Object.prototype, h)) && (y[h] = !0);
|
|
3408
3407
|
else
|
|
3409
|
-
return [
|
|
3410
|
-
return
|
|
3408
|
+
return [y, h];
|
|
3409
|
+
return y;
|
|
3411
3410
|
}
|
|
3412
|
-
if (!
|
|
3413
|
-
return [
|
|
3414
|
-
var T =
|
|
3415
|
-
return t(
|
|
3416
|
-
if (n.call(
|
|
3417
|
-
var b =
|
|
3418
|
-
b && typeof b == "object" &&
|
|
3411
|
+
if (!y || typeof y != "object")
|
|
3412
|
+
return [y].concat(h);
|
|
3413
|
+
var T = y;
|
|
3414
|
+
return t(y) && !t(h) && (T = s(y, j)), t(y) && t(h) ? (h.forEach(function(f, O) {
|
|
3415
|
+
if (n.call(y, O)) {
|
|
3416
|
+
var b = y[O];
|
|
3417
|
+
b && typeof b == "object" && f && typeof f == "object" ? y[O] = u(b, f, j) : y.push(f);
|
|
3419
3418
|
} else
|
|
3420
|
-
|
|
3421
|
-
}),
|
|
3422
|
-
var b =
|
|
3423
|
-
return n.call(
|
|
3419
|
+
y[O] = f;
|
|
3420
|
+
}), y) : Object.keys(h).reduce(function(f, O) {
|
|
3421
|
+
var b = h[O];
|
|
3422
|
+
return n.call(f, O) ? f[O] = u(f[O], b, j) : f[O] = b, f;
|
|
3424
3423
|
}, T);
|
|
3425
|
-
}, o = function(
|
|
3426
|
-
return Object.keys(
|
|
3427
|
-
return j[T] =
|
|
3428
|
-
},
|
|
3429
|
-
}, i = function(
|
|
3430
|
-
var j =
|
|
3431
|
-
if (
|
|
3424
|
+
}, o = function(y, h) {
|
|
3425
|
+
return Object.keys(h).reduce(function(j, T) {
|
|
3426
|
+
return j[T] = h[T], j;
|
|
3427
|
+
}, y);
|
|
3428
|
+
}, i = function(u, y, h) {
|
|
3429
|
+
var j = u.replace(/\+/g, " ");
|
|
3430
|
+
if (h === "iso-8859-1")
|
|
3432
3431
|
return j.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
3433
3432
|
try {
|
|
3434
3433
|
return decodeURIComponent(j);
|
|
3435
3434
|
} catch {
|
|
3436
3435
|
return j;
|
|
3437
3436
|
}
|
|
3438
|
-
}, c = 1024,
|
|
3439
|
-
if (
|
|
3440
|
-
return
|
|
3441
|
-
var O =
|
|
3442
|
-
if (typeof
|
|
3437
|
+
}, c = 1024, p = function(y, h, j, T, f) {
|
|
3438
|
+
if (y.length === 0)
|
|
3439
|
+
return y;
|
|
3440
|
+
var O = y;
|
|
3441
|
+
if (typeof y == "symbol" ? O = Symbol.prototype.toString.call(y) : typeof y != "string" && (O = String(y)), j === "iso-8859-1")
|
|
3443
3442
|
return escape(O).replace(/%u[0-9a-f]{4}/gi, function(oe) {
|
|
3444
3443
|
return "%26%23" + parseInt(oe.slice(2), 16) + "%3B";
|
|
3445
3444
|
});
|
|
3446
3445
|
for (var b = "", R = 0; R < O.length; R += c) {
|
|
3447
3446
|
for (var N = O.length >= c ? O.slice(R, R + c) : O, C = [], L = 0; L < N.length; ++L) {
|
|
3448
3447
|
var P = N.charCodeAt(L);
|
|
3449
|
-
if (P === 45 || P === 46 || P === 95 || P === 126 || P >= 48 && P <= 57 || P >= 65 && P <= 90 || P >= 97 && P <= 122 ||
|
|
3448
|
+
if (P === 45 || P === 46 || P === 95 || P === 126 || P >= 48 && P <= 57 || P >= 65 && P <= 90 || P >= 97 && P <= 122 || f === e.RFC1738 && (P === 40 || P === 41)) {
|
|
3450
3449
|
C[C.length] = N.charAt(L);
|
|
3451
3450
|
continue;
|
|
3452
3451
|
}
|
|
@@ -3467,58 +3466,58 @@ function va() {
|
|
|
3467
3466
|
b += C.join("");
|
|
3468
3467
|
}
|
|
3469
3468
|
return b;
|
|
3470
|
-
},
|
|
3471
|
-
for (var
|
|
3472
|
-
for (var
|
|
3469
|
+
}, d = function(y) {
|
|
3470
|
+
for (var h = [{ obj: { o: y }, prop: "o" }], j = [], T = 0; T < h.length; ++T)
|
|
3471
|
+
for (var f = h[T], O = f.obj[f.prop], b = Object.keys(O), R = 0; R < b.length; ++R) {
|
|
3473
3472
|
var N = b[R], C = O[N];
|
|
3474
|
-
typeof C == "object" && C !== null && j.indexOf(C) === -1 && (
|
|
3473
|
+
typeof C == "object" && C !== null && j.indexOf(C) === -1 && (h.push({ obj: O, prop: N }), j.push(C));
|
|
3475
3474
|
}
|
|
3476
|
-
return l(
|
|
3477
|
-
},
|
|
3478
|
-
return Object.prototype.toString.call(
|
|
3479
|
-
},
|
|
3480
|
-
return !
|
|
3481
|
-
}, x = function(
|
|
3482
|
-
return [].concat(
|
|
3483
|
-
}, v = function(
|
|
3484
|
-
if (t(
|
|
3485
|
-
for (var j = [], T = 0; T <
|
|
3486
|
-
j.push(
|
|
3475
|
+
return l(h), y;
|
|
3476
|
+
}, m = function(y) {
|
|
3477
|
+
return Object.prototype.toString.call(y) === "[object RegExp]";
|
|
3478
|
+
}, g = function(y) {
|
|
3479
|
+
return !y || typeof y != "object" ? !1 : !!(y.constructor && y.constructor.isBuffer && y.constructor.isBuffer(y));
|
|
3480
|
+
}, x = function(y, h) {
|
|
3481
|
+
return [].concat(y, h);
|
|
3482
|
+
}, v = function(y, h) {
|
|
3483
|
+
if (t(y)) {
|
|
3484
|
+
for (var j = [], T = 0; T < y.length; T += 1)
|
|
3485
|
+
j.push(h(y[T]));
|
|
3487
3486
|
return j;
|
|
3488
3487
|
}
|
|
3489
|
-
return
|
|
3488
|
+
return h(y);
|
|
3490
3489
|
};
|
|
3491
|
-
return
|
|
3490
|
+
return ir = {
|
|
3492
3491
|
arrayToObject: s,
|
|
3493
3492
|
assign: o,
|
|
3494
3493
|
combine: x,
|
|
3495
|
-
compact:
|
|
3494
|
+
compact: d,
|
|
3496
3495
|
decode: i,
|
|
3497
|
-
encode:
|
|
3498
|
-
isBuffer:
|
|
3499
|
-
isRegExp:
|
|
3496
|
+
encode: p,
|
|
3497
|
+
isBuffer: g,
|
|
3498
|
+
isRegExp: m,
|
|
3500
3499
|
maybeMap: v,
|
|
3501
3500
|
merge: r
|
|
3502
|
-
},
|
|
3501
|
+
}, ir;
|
|
3503
3502
|
}
|
|
3504
|
-
var
|
|
3503
|
+
var sr, Dn;
|
|
3505
3504
|
function bs() {
|
|
3506
|
-
if (
|
|
3507
|
-
|
|
3508
|
-
var e = vs(), n = /* @__PURE__ */
|
|
3509
|
-
brackets: function(
|
|
3510
|
-
return
|
|
3505
|
+
if (Dn) return sr;
|
|
3506
|
+
Dn = 1;
|
|
3507
|
+
var e = vs(), n = /* @__PURE__ */ ba(), t = /* @__PURE__ */ Sr(), a = Object.prototype.hasOwnProperty, l = {
|
|
3508
|
+
brackets: function(u) {
|
|
3509
|
+
return u + "[]";
|
|
3511
3510
|
},
|
|
3512
3511
|
comma: "comma",
|
|
3513
|
-
indices: function(
|
|
3514
|
-
return
|
|
3512
|
+
indices: function(u, y) {
|
|
3513
|
+
return u + "[" + y + "]";
|
|
3515
3514
|
},
|
|
3516
|
-
repeat: function(
|
|
3517
|
-
return
|
|
3515
|
+
repeat: function(u) {
|
|
3516
|
+
return u;
|
|
3518
3517
|
}
|
|
3519
|
-
}, s = Array.isArray, r = Array.prototype.push, o = function(v,
|
|
3520
|
-
r.apply(v, s(
|
|
3521
|
-
}, i = Date.prototype.toISOString, c = t.default,
|
|
3518
|
+
}, s = Array.isArray, r = Array.prototype.push, o = function(v, u) {
|
|
3519
|
+
r.apply(v, s(u) ? u : [u]);
|
|
3520
|
+
}, i = Date.prototype.toISOString, c = t.default, p = {
|
|
3522
3521
|
addQueryPrefix: !1,
|
|
3523
3522
|
allowDots: !1,
|
|
3524
3523
|
allowEmptyArrays: !1,
|
|
@@ -3534,42 +3533,42 @@ function bs() {
|
|
|
3534
3533
|
formatter: t.formatters[c],
|
|
3535
3534
|
// deprecated
|
|
3536
3535
|
indices: !1,
|
|
3537
|
-
serializeDate: function(
|
|
3538
|
-
return i.call(
|
|
3536
|
+
serializeDate: function(u) {
|
|
3537
|
+
return i.call(u);
|
|
3539
3538
|
},
|
|
3540
3539
|
skipNulls: !1,
|
|
3541
3540
|
strictNullHandling: !1
|
|
3542
|
-
},
|
|
3543
|
-
return typeof
|
|
3544
|
-
},
|
|
3545
|
-
for (var A =
|
|
3546
|
-
var F = re.get(
|
|
3541
|
+
}, d = function(u) {
|
|
3542
|
+
return typeof u == "string" || typeof u == "number" || typeof u == "boolean" || typeof u == "symbol" || typeof u == "bigint";
|
|
3543
|
+
}, m = {}, g = function v(u, y, h, j, T, f, O, b, R, N, C, L, P, oe, H, D, se, Z) {
|
|
3544
|
+
for (var A = u, re = Z, E = 0, k = !1; (re = re.get(m)) !== void 0 && !k; ) {
|
|
3545
|
+
var F = re.get(u);
|
|
3547
3546
|
if (E += 1, typeof F < "u") {
|
|
3548
3547
|
if (F === E)
|
|
3549
3548
|
throw new RangeError("Cyclic object value");
|
|
3550
3549
|
k = !0;
|
|
3551
3550
|
}
|
|
3552
|
-
typeof re.get(
|
|
3551
|
+
typeof re.get(m) > "u" && (E = 0);
|
|
3553
3552
|
}
|
|
3554
|
-
if (typeof N == "function" ? A = N(
|
|
3553
|
+
if (typeof N == "function" ? A = N(y, A) : A instanceof Date ? A = P(A) : h === "comma" && s(A) && (A = n.maybeMap(A, function(Y) {
|
|
3555
3554
|
return Y instanceof Date ? P(Y) : Y;
|
|
3556
3555
|
})), A === null) {
|
|
3557
|
-
if (
|
|
3558
|
-
return R && !D ? R(
|
|
3556
|
+
if (f)
|
|
3557
|
+
return R && !D ? R(y, p.encoder, se, "key", oe) : y;
|
|
3559
3558
|
A = "";
|
|
3560
3559
|
}
|
|
3561
|
-
if (
|
|
3560
|
+
if (d(A) || n.isBuffer(A)) {
|
|
3562
3561
|
if (R) {
|
|
3563
|
-
var q = D ?
|
|
3564
|
-
return [H(q) + "=" + H(R(A,
|
|
3562
|
+
var q = D ? y : R(y, p.encoder, se, "key", oe);
|
|
3563
|
+
return [H(q) + "=" + H(R(A, p.encoder, se, "value", oe))];
|
|
3565
3564
|
}
|
|
3566
|
-
return [H(
|
|
3565
|
+
return [H(y) + "=" + H(String(A))];
|
|
3567
3566
|
}
|
|
3568
3567
|
var U = [];
|
|
3569
3568
|
if (typeof A > "u")
|
|
3570
3569
|
return U;
|
|
3571
3570
|
var J;
|
|
3572
|
-
if (
|
|
3571
|
+
if (h === "comma" && s(A))
|
|
3573
3572
|
D && R && (A = n.maybeMap(A, R)), J = [{ value: A.length > 0 ? A.join(",") || null : void 0 }];
|
|
3574
3573
|
else if (s(N))
|
|
3575
3574
|
J = N;
|
|
@@ -3577,25 +3576,25 @@ function bs() {
|
|
|
3577
3576
|
var z = Object.keys(A);
|
|
3578
3577
|
J = C ? z.sort(C) : z;
|
|
3579
3578
|
}
|
|
3580
|
-
var K = b ?
|
|
3579
|
+
var K = b ? y.replace(/\./g, "%2E") : y, ne = j && s(A) && A.length === 1 ? K + "[]" : K;
|
|
3581
3580
|
if (T && s(A) && A.length === 0)
|
|
3582
3581
|
return ne + "[]";
|
|
3583
3582
|
for (var G = 0; G < J.length; ++G) {
|
|
3584
3583
|
var I = J[G], _ = typeof I == "object" && typeof I.value < "u" ? I.value : A[I];
|
|
3585
3584
|
if (!(O && _ === null)) {
|
|
3586
|
-
var B = L && b ? I.replace(/\./g, "%2E") : I, Q = s(A) ? typeof
|
|
3587
|
-
Z.set(
|
|
3585
|
+
var B = L && b ? I.replace(/\./g, "%2E") : I, Q = s(A) ? typeof h == "function" ? h(ne, B) : ne : ne + (L ? "." + B : "[" + B + "]");
|
|
3586
|
+
Z.set(u, E);
|
|
3588
3587
|
var W = e();
|
|
3589
|
-
W.set(
|
|
3588
|
+
W.set(m, Z), o(U, v(
|
|
3590
3589
|
_,
|
|
3591
3590
|
Q,
|
|
3592
|
-
|
|
3591
|
+
h,
|
|
3593
3592
|
j,
|
|
3594
3593
|
T,
|
|
3595
|
-
|
|
3594
|
+
f,
|
|
3596
3595
|
O,
|
|
3597
3596
|
b,
|
|
3598
|
-
|
|
3597
|
+
h === "comma" && D && s(A) ? null : R,
|
|
3599
3598
|
N,
|
|
3600
3599
|
C,
|
|
3601
3600
|
L,
|
|
@@ -3609,92 +3608,92 @@ function bs() {
|
|
|
3609
3608
|
}
|
|
3610
3609
|
}
|
|
3611
3610
|
return U;
|
|
3612
|
-
}, x = function(
|
|
3613
|
-
if (!
|
|
3614
|
-
return
|
|
3615
|
-
if (typeof
|
|
3611
|
+
}, x = function(u) {
|
|
3612
|
+
if (!u)
|
|
3613
|
+
return p;
|
|
3614
|
+
if (typeof u.allowEmptyArrays < "u" && typeof u.allowEmptyArrays != "boolean")
|
|
3616
3615
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
3617
|
-
if (typeof
|
|
3616
|
+
if (typeof u.encodeDotInKeys < "u" && typeof u.encodeDotInKeys != "boolean")
|
|
3618
3617
|
throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
3619
|
-
if (
|
|
3618
|
+
if (u.encoder !== null && typeof u.encoder < "u" && typeof u.encoder != "function")
|
|
3620
3619
|
throw new TypeError("Encoder has to be a function.");
|
|
3621
|
-
var
|
|
3622
|
-
if (typeof
|
|
3620
|
+
var y = u.charset || p.charset;
|
|
3621
|
+
if (typeof u.charset < "u" && u.charset !== "utf-8" && u.charset !== "iso-8859-1")
|
|
3623
3622
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
3624
|
-
var
|
|
3625
|
-
if (typeof
|
|
3626
|
-
if (!a.call(t.formatters,
|
|
3623
|
+
var h = t.default;
|
|
3624
|
+
if (typeof u.format < "u") {
|
|
3625
|
+
if (!a.call(t.formatters, u.format))
|
|
3627
3626
|
throw new TypeError("Unknown format option provided.");
|
|
3628
|
-
|
|
3627
|
+
h = u.format;
|
|
3629
3628
|
}
|
|
3630
|
-
var j = t.formatters[
|
|
3631
|
-
(typeof
|
|
3632
|
-
var
|
|
3633
|
-
if (
|
|
3629
|
+
var j = t.formatters[h], T = p.filter;
|
|
3630
|
+
(typeof u.filter == "function" || s(u.filter)) && (T = u.filter);
|
|
3631
|
+
var f;
|
|
3632
|
+
if (u.arrayFormat in l ? f = u.arrayFormat : "indices" in u ? f = u.indices ? "indices" : "repeat" : f = p.arrayFormat, "commaRoundTrip" in u && typeof u.commaRoundTrip != "boolean")
|
|
3634
3633
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
3635
|
-
var O = typeof
|
|
3634
|
+
var O = typeof u.allowDots > "u" ? u.encodeDotInKeys === !0 ? !0 : p.allowDots : !!u.allowDots;
|
|
3636
3635
|
return {
|
|
3637
|
-
addQueryPrefix: typeof
|
|
3636
|
+
addQueryPrefix: typeof u.addQueryPrefix == "boolean" ? u.addQueryPrefix : p.addQueryPrefix,
|
|
3638
3637
|
allowDots: O,
|
|
3639
|
-
allowEmptyArrays: typeof
|
|
3640
|
-
arrayFormat:
|
|
3641
|
-
charset:
|
|
3642
|
-
charsetSentinel: typeof
|
|
3643
|
-
commaRoundTrip:
|
|
3644
|
-
delimiter: typeof
|
|
3645
|
-
encode: typeof
|
|
3646
|
-
encodeDotInKeys: typeof
|
|
3647
|
-
encoder: typeof
|
|
3648
|
-
encodeValuesOnly: typeof
|
|
3638
|
+
allowEmptyArrays: typeof u.allowEmptyArrays == "boolean" ? !!u.allowEmptyArrays : p.allowEmptyArrays,
|
|
3639
|
+
arrayFormat: f,
|
|
3640
|
+
charset: y,
|
|
3641
|
+
charsetSentinel: typeof u.charsetSentinel == "boolean" ? u.charsetSentinel : p.charsetSentinel,
|
|
3642
|
+
commaRoundTrip: u.commaRoundTrip,
|
|
3643
|
+
delimiter: typeof u.delimiter > "u" ? p.delimiter : u.delimiter,
|
|
3644
|
+
encode: typeof u.encode == "boolean" ? u.encode : p.encode,
|
|
3645
|
+
encodeDotInKeys: typeof u.encodeDotInKeys == "boolean" ? u.encodeDotInKeys : p.encodeDotInKeys,
|
|
3646
|
+
encoder: typeof u.encoder == "function" ? u.encoder : p.encoder,
|
|
3647
|
+
encodeValuesOnly: typeof u.encodeValuesOnly == "boolean" ? u.encodeValuesOnly : p.encodeValuesOnly,
|
|
3649
3648
|
filter: T,
|
|
3650
|
-
format:
|
|
3649
|
+
format: h,
|
|
3651
3650
|
formatter: j,
|
|
3652
|
-
serializeDate: typeof
|
|
3653
|
-
skipNulls: typeof
|
|
3654
|
-
sort: typeof
|
|
3655
|
-
strictNullHandling: typeof
|
|
3651
|
+
serializeDate: typeof u.serializeDate == "function" ? u.serializeDate : p.serializeDate,
|
|
3652
|
+
skipNulls: typeof u.skipNulls == "boolean" ? u.skipNulls : p.skipNulls,
|
|
3653
|
+
sort: typeof u.sort == "function" ? u.sort : null,
|
|
3654
|
+
strictNullHandling: typeof u.strictNullHandling == "boolean" ? u.strictNullHandling : p.strictNullHandling
|
|
3656
3655
|
};
|
|
3657
3656
|
};
|
|
3658
|
-
return
|
|
3659
|
-
var
|
|
3660
|
-
typeof
|
|
3661
|
-
var
|
|
3662
|
-
if (typeof
|
|
3657
|
+
return sr = function(v, u) {
|
|
3658
|
+
var y = v, h = x(u), j, T;
|
|
3659
|
+
typeof h.filter == "function" ? (T = h.filter, y = T("", y)) : s(h.filter) && (T = h.filter, j = T);
|
|
3660
|
+
var f = [];
|
|
3661
|
+
if (typeof y != "object" || y === null)
|
|
3663
3662
|
return "";
|
|
3664
|
-
var O = l[
|
|
3665
|
-
j || (j = Object.keys(
|
|
3663
|
+
var O = l[h.arrayFormat], b = O === "comma" && h.commaRoundTrip;
|
|
3664
|
+
j || (j = Object.keys(y)), h.sort && j.sort(h.sort);
|
|
3666
3665
|
for (var R = e(), N = 0; N < j.length; ++N) {
|
|
3667
3666
|
var C = j[N];
|
|
3668
|
-
|
|
3669
|
-
|
|
3667
|
+
h.skipNulls && y[C] === null || o(f, g(
|
|
3668
|
+
y[C],
|
|
3670
3669
|
C,
|
|
3671
3670
|
O,
|
|
3672
3671
|
b,
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3672
|
+
h.allowEmptyArrays,
|
|
3673
|
+
h.strictNullHandling,
|
|
3674
|
+
h.skipNulls,
|
|
3675
|
+
h.encodeDotInKeys,
|
|
3676
|
+
h.encode ? h.encoder : null,
|
|
3677
|
+
h.filter,
|
|
3678
|
+
h.sort,
|
|
3679
|
+
h.allowDots,
|
|
3680
|
+
h.serializeDate,
|
|
3681
|
+
h.format,
|
|
3682
|
+
h.formatter,
|
|
3683
|
+
h.encodeValuesOnly,
|
|
3684
|
+
h.charset,
|
|
3686
3685
|
R
|
|
3687
3686
|
));
|
|
3688
3687
|
}
|
|
3689
|
-
var L =
|
|
3690
|
-
return
|
|
3691
|
-
},
|
|
3688
|
+
var L = f.join(h.delimiter), P = h.addQueryPrefix === !0 ? "?" : "";
|
|
3689
|
+
return h.charsetSentinel && (h.charset === "iso-8859-1" ? P += "utf8=%26%2310003%3B&" : P += "utf8=%E2%9C%93&"), L.length > 0 ? P + L : "";
|
|
3690
|
+
}, sr;
|
|
3692
3691
|
}
|
|
3693
|
-
var
|
|
3692
|
+
var lr, Qn;
|
|
3694
3693
|
function xs() {
|
|
3695
|
-
if (
|
|
3696
|
-
|
|
3697
|
-
var e = /* @__PURE__ */
|
|
3694
|
+
if (Qn) return lr;
|
|
3695
|
+
Qn = 1;
|
|
3696
|
+
var e = /* @__PURE__ */ ba(), n = Object.prototype.hasOwnProperty, t = Array.isArray, a = {
|
|
3698
3697
|
allowDots: !1,
|
|
3699
3698
|
allowEmptyArrays: !1,
|
|
3700
3699
|
allowPrototypes: !1,
|
|
@@ -3715,54 +3714,54 @@ function xs() {
|
|
|
3715
3714
|
plainObjects: !1,
|
|
3716
3715
|
strictDepth: !1,
|
|
3717
3716
|
strictNullHandling: !1
|
|
3718
|
-
}, l = function(
|
|
3719
|
-
return
|
|
3717
|
+
}, l = function(m) {
|
|
3718
|
+
return m.replace(/&#(\d+);/g, function(g, x) {
|
|
3720
3719
|
return String.fromCharCode(parseInt(x, 10));
|
|
3721
3720
|
});
|
|
3722
|
-
}, s = function(
|
|
3723
|
-
return
|
|
3724
|
-
}, r = "utf8=%26%2310003%3B", o = "utf8=%E2%9C%93", i = function(
|
|
3725
|
-
var v = { __proto__: null },
|
|
3726
|
-
|
|
3727
|
-
var
|
|
3721
|
+
}, s = function(m, g) {
|
|
3722
|
+
return m && typeof m == "string" && g.comma && m.indexOf(",") > -1 ? m.split(",") : m;
|
|
3723
|
+
}, r = "utf8=%26%2310003%3B", o = "utf8=%E2%9C%93", i = function(g, x) {
|
|
3724
|
+
var v = { __proto__: null }, u = x.ignoreQueryPrefix ? g.replace(/^\?/, "") : g;
|
|
3725
|
+
u = u.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
3726
|
+
var y = x.parameterLimit === 1 / 0 ? void 0 : x.parameterLimit, h = u.split(x.delimiter, y), j = -1, T, f = x.charset;
|
|
3728
3727
|
if (x.charsetSentinel)
|
|
3729
|
-
for (T = 0; T <
|
|
3730
|
-
|
|
3731
|
-
for (T = 0; T <
|
|
3728
|
+
for (T = 0; T < h.length; ++T)
|
|
3729
|
+
h[T].indexOf("utf8=") === 0 && (h[T] === o ? f = "utf-8" : h[T] === r && (f = "iso-8859-1"), j = T, T = h.length);
|
|
3730
|
+
for (T = 0; T < h.length; ++T)
|
|
3732
3731
|
if (T !== j) {
|
|
3733
|
-
var O =
|
|
3734
|
-
R === -1 ? (N = x.decoder(O, a.decoder,
|
|
3732
|
+
var O = h[T], b = O.indexOf("]="), R = b === -1 ? O.indexOf("=") : b + 1, N, C;
|
|
3733
|
+
R === -1 ? (N = x.decoder(O, a.decoder, f, "key"), C = x.strictNullHandling ? null : "") : (N = x.decoder(O.slice(0, R), a.decoder, f, "key"), C = e.maybeMap(
|
|
3735
3734
|
s(O.slice(R + 1), x),
|
|
3736
3735
|
function(P) {
|
|
3737
|
-
return x.decoder(P, a.decoder,
|
|
3736
|
+
return x.decoder(P, a.decoder, f, "value");
|
|
3738
3737
|
}
|
|
3739
|
-
)), C && x.interpretNumericEntities &&
|
|
3738
|
+
)), C && x.interpretNumericEntities && f === "iso-8859-1" && (C = l(C)), O.indexOf("[]=") > -1 && (C = t(C) ? [C] : C);
|
|
3740
3739
|
var L = n.call(v, N);
|
|
3741
3740
|
L && x.duplicates === "combine" ? v[N] = e.combine(v[N], C) : (!L || x.duplicates === "last") && (v[N] = C);
|
|
3742
3741
|
}
|
|
3743
3742
|
return v;
|
|
3744
|
-
}, c = function(
|
|
3745
|
-
for (var
|
|
3746
|
-
var
|
|
3743
|
+
}, c = function(m, g, x, v) {
|
|
3744
|
+
for (var u = v ? g : s(g, x), y = m.length - 1; y >= 0; --y) {
|
|
3745
|
+
var h, j = m[y];
|
|
3747
3746
|
if (j === "[]" && x.parseArrays)
|
|
3748
|
-
|
|
3747
|
+
h = x.allowEmptyArrays && (u === "" || x.strictNullHandling && u === null) ? [] : [].concat(u);
|
|
3749
3748
|
else {
|
|
3750
|
-
|
|
3751
|
-
var T = j.charAt(0) === "[" && j.charAt(j.length - 1) === "]" ? j.slice(1, -1) : j,
|
|
3752
|
-
!x.parseArrays &&
|
|
3749
|
+
h = x.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
3750
|
+
var T = j.charAt(0) === "[" && j.charAt(j.length - 1) === "]" ? j.slice(1, -1) : j, f = x.decodeDotInKeys ? T.replace(/%2E/g, ".") : T, O = parseInt(f, 10);
|
|
3751
|
+
!x.parseArrays && f === "" ? h = { 0: u } : !isNaN(O) && j !== f && String(O) === f && O >= 0 && x.parseArrays && O <= x.arrayLimit ? (h = [], h[O] = u) : f !== "__proto__" && (h[f] = u);
|
|
3753
3752
|
}
|
|
3754
|
-
|
|
3753
|
+
u = h;
|
|
3755
3754
|
}
|
|
3756
|
-
return
|
|
3757
|
-
},
|
|
3758
|
-
if (
|
|
3759
|
-
var
|
|
3760
|
-
if (
|
|
3761
|
-
if (!v.plainObjects && n.call(Object.prototype,
|
|
3755
|
+
return u;
|
|
3756
|
+
}, p = function(g, x, v, u) {
|
|
3757
|
+
if (g) {
|
|
3758
|
+
var y = v.allowDots ? g.replace(/\.([^.[]+)/g, "[$1]") : g, h = /(\[[^[\]]*])/, j = /(\[[^[\]]*])/g, T = v.depth > 0 && h.exec(y), f = T ? y.slice(0, T.index) : y, O = [];
|
|
3759
|
+
if (f) {
|
|
3760
|
+
if (!v.plainObjects && n.call(Object.prototype, f) && !v.allowPrototypes)
|
|
3762
3761
|
return;
|
|
3763
|
-
O.push(
|
|
3762
|
+
O.push(f);
|
|
3764
3763
|
}
|
|
3765
|
-
for (var b = 0; v.depth > 0 && (T = j.exec(
|
|
3764
|
+
for (var b = 0; v.depth > 0 && (T = j.exec(y)) !== null && b < v.depth; ) {
|
|
3766
3765
|
if (b += 1, !v.plainObjects && n.call(Object.prototype, T[1].slice(1, -1)) && !v.allowPrototypes)
|
|
3767
3766
|
return;
|
|
3768
3767
|
O.push(T[1]);
|
|
@@ -3770,75 +3769,75 @@ function xs() {
|
|
|
3770
3769
|
if (T) {
|
|
3771
3770
|
if (v.strictDepth === !0)
|
|
3772
3771
|
throw new RangeError("Input depth exceeded depth option of " + v.depth + " and strictDepth is true");
|
|
3773
|
-
O.push("[" +
|
|
3772
|
+
O.push("[" + y.slice(T.index) + "]");
|
|
3774
3773
|
}
|
|
3775
|
-
return c(O, x, v,
|
|
3774
|
+
return c(O, x, v, u);
|
|
3776
3775
|
}
|
|
3777
|
-
},
|
|
3778
|
-
if (!
|
|
3776
|
+
}, d = function(g) {
|
|
3777
|
+
if (!g)
|
|
3779
3778
|
return a;
|
|
3780
|
-
if (typeof
|
|
3779
|
+
if (typeof g.allowEmptyArrays < "u" && typeof g.allowEmptyArrays != "boolean")
|
|
3781
3780
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
3782
|
-
if (typeof
|
|
3781
|
+
if (typeof g.decodeDotInKeys < "u" && typeof g.decodeDotInKeys != "boolean")
|
|
3783
3782
|
throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
3784
|
-
if (
|
|
3783
|
+
if (g.decoder !== null && typeof g.decoder < "u" && typeof g.decoder != "function")
|
|
3785
3784
|
throw new TypeError("Decoder has to be a function.");
|
|
3786
|
-
if (typeof
|
|
3785
|
+
if (typeof g.charset < "u" && g.charset !== "utf-8" && g.charset !== "iso-8859-1")
|
|
3787
3786
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
3788
|
-
var x = typeof
|
|
3787
|
+
var x = typeof g.charset > "u" ? a.charset : g.charset, v = typeof g.duplicates > "u" ? a.duplicates : g.duplicates;
|
|
3789
3788
|
if (v !== "combine" && v !== "first" && v !== "last")
|
|
3790
3789
|
throw new TypeError("The duplicates option must be either combine, first, or last");
|
|
3791
|
-
var
|
|
3790
|
+
var u = typeof g.allowDots > "u" ? g.decodeDotInKeys === !0 ? !0 : a.allowDots : !!g.allowDots;
|
|
3792
3791
|
return {
|
|
3793
|
-
allowDots:
|
|
3794
|
-
allowEmptyArrays: typeof
|
|
3795
|
-
allowPrototypes: typeof
|
|
3796
|
-
allowSparse: typeof
|
|
3797
|
-
arrayLimit: typeof
|
|
3792
|
+
allowDots: u,
|
|
3793
|
+
allowEmptyArrays: typeof g.allowEmptyArrays == "boolean" ? !!g.allowEmptyArrays : a.allowEmptyArrays,
|
|
3794
|
+
allowPrototypes: typeof g.allowPrototypes == "boolean" ? g.allowPrototypes : a.allowPrototypes,
|
|
3795
|
+
allowSparse: typeof g.allowSparse == "boolean" ? g.allowSparse : a.allowSparse,
|
|
3796
|
+
arrayLimit: typeof g.arrayLimit == "number" ? g.arrayLimit : a.arrayLimit,
|
|
3798
3797
|
charset: x,
|
|
3799
|
-
charsetSentinel: typeof
|
|
3800
|
-
comma: typeof
|
|
3801
|
-
decodeDotInKeys: typeof
|
|
3802
|
-
decoder: typeof
|
|
3803
|
-
delimiter: typeof
|
|
3798
|
+
charsetSentinel: typeof g.charsetSentinel == "boolean" ? g.charsetSentinel : a.charsetSentinel,
|
|
3799
|
+
comma: typeof g.comma == "boolean" ? g.comma : a.comma,
|
|
3800
|
+
decodeDotInKeys: typeof g.decodeDotInKeys == "boolean" ? g.decodeDotInKeys : a.decodeDotInKeys,
|
|
3801
|
+
decoder: typeof g.decoder == "function" ? g.decoder : a.decoder,
|
|
3802
|
+
delimiter: typeof g.delimiter == "string" || e.isRegExp(g.delimiter) ? g.delimiter : a.delimiter,
|
|
3804
3803
|
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
3805
|
-
depth: typeof
|
|
3804
|
+
depth: typeof g.depth == "number" || g.depth === !1 ? +g.depth : a.depth,
|
|
3806
3805
|
duplicates: v,
|
|
3807
|
-
ignoreQueryPrefix:
|
|
3808
|
-
interpretNumericEntities: typeof
|
|
3809
|
-
parameterLimit: typeof
|
|
3810
|
-
parseArrays:
|
|
3811
|
-
plainObjects: typeof
|
|
3812
|
-
strictDepth: typeof
|
|
3813
|
-
strictNullHandling: typeof
|
|
3806
|
+
ignoreQueryPrefix: g.ignoreQueryPrefix === !0,
|
|
3807
|
+
interpretNumericEntities: typeof g.interpretNumericEntities == "boolean" ? g.interpretNumericEntities : a.interpretNumericEntities,
|
|
3808
|
+
parameterLimit: typeof g.parameterLimit == "number" ? g.parameterLimit : a.parameterLimit,
|
|
3809
|
+
parseArrays: g.parseArrays !== !1,
|
|
3810
|
+
plainObjects: typeof g.plainObjects == "boolean" ? g.plainObjects : a.plainObjects,
|
|
3811
|
+
strictDepth: typeof g.strictDepth == "boolean" ? !!g.strictDepth : a.strictDepth,
|
|
3812
|
+
strictNullHandling: typeof g.strictNullHandling == "boolean" ? g.strictNullHandling : a.strictNullHandling
|
|
3814
3813
|
};
|
|
3815
3814
|
};
|
|
3816
|
-
return
|
|
3817
|
-
var x =
|
|
3818
|
-
if (
|
|
3815
|
+
return lr = function(m, g) {
|
|
3816
|
+
var x = d(g);
|
|
3817
|
+
if (m === "" || m === null || typeof m > "u")
|
|
3819
3818
|
return x.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
3820
|
-
for (var v = typeof
|
|
3821
|
-
var j = h
|
|
3822
|
-
|
|
3819
|
+
for (var v = typeof m == "string" ? i(m, x) : m, u = x.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, y = Object.keys(v), h = 0; h < y.length; ++h) {
|
|
3820
|
+
var j = y[h], T = p(j, v[j], x, typeof m == "string");
|
|
3821
|
+
u = e.merge(u, T, x);
|
|
3823
3822
|
}
|
|
3824
|
-
return x.allowSparse === !0 ?
|
|
3825
|
-
},
|
|
3823
|
+
return x.allowSparse === !0 ? u : e.compact(u);
|
|
3824
|
+
}, lr;
|
|
3826
3825
|
}
|
|
3827
|
-
var
|
|
3828
|
-
function
|
|
3829
|
-
if (
|
|
3830
|
-
|
|
3826
|
+
var cr, Kn;
|
|
3827
|
+
function xa() {
|
|
3828
|
+
if (Kn) return cr;
|
|
3829
|
+
Kn = 1;
|
|
3831
3830
|
var e = /* @__PURE__ */ bs(), n = /* @__PURE__ */ xs(), t = /* @__PURE__ */ Sr();
|
|
3832
|
-
return
|
|
3831
|
+
return cr = {
|
|
3833
3832
|
formats: t,
|
|
3834
3833
|
parse: n,
|
|
3835
3834
|
stringify: e
|
|
3836
|
-
},
|
|
3835
|
+
}, cr;
|
|
3837
3836
|
}
|
|
3838
|
-
var
|
|
3837
|
+
var Yn;
|
|
3839
3838
|
function $s() {
|
|
3840
|
-
if (
|
|
3841
|
-
|
|
3839
|
+
if (Yn) return Te;
|
|
3840
|
+
Yn = 1;
|
|
3842
3841
|
var e = Bi();
|
|
3843
3842
|
function n() {
|
|
3844
3843
|
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;
|
|
@@ -3870,7 +3869,7 @@ function $s() {
|
|
|
3870
3869
|
"/",
|
|
3871
3870
|
"?",
|
|
3872
3871
|
"#"
|
|
3873
|
-
],
|
|
3872
|
+
], p = 255, d = /^[+a-z0-9A-Z_-]{0,63}$/, m = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, g = {
|
|
3874
3873
|
javascript: !0,
|
|
3875
3874
|
"javascript:": !0
|
|
3876
3875
|
}, x = {
|
|
@@ -3887,23 +3886,23 @@ function $s() {
|
|
|
3887
3886
|
"ftp:": !0,
|
|
3888
3887
|
"gopher:": !0,
|
|
3889
3888
|
"file:": !0
|
|
3890
|
-
},
|
|
3891
|
-
function
|
|
3892
|
-
if (
|
|
3893
|
-
return
|
|
3889
|
+
}, u = /* @__PURE__ */ xa();
|
|
3890
|
+
function y(f, O, b) {
|
|
3891
|
+
if (f && typeof f == "object" && f instanceof n)
|
|
3892
|
+
return f;
|
|
3894
3893
|
var R = new n();
|
|
3895
|
-
return R.parse(
|
|
3894
|
+
return R.parse(f, O, b), R;
|
|
3896
3895
|
}
|
|
3897
|
-
n.prototype.parse = function(
|
|
3898
|
-
if (typeof
|
|
3899
|
-
throw new TypeError("Parameter 'url' must be a string, not " + typeof
|
|
3900
|
-
var R =
|
|
3901
|
-
C[0] = C[0].replace(L, "/"),
|
|
3902
|
-
var P =
|
|
3903
|
-
if (P = P.trim(), !b &&
|
|
3896
|
+
n.prototype.parse = function(f, O, b) {
|
|
3897
|
+
if (typeof f != "string")
|
|
3898
|
+
throw new TypeError("Parameter 'url' must be a string, not " + typeof f);
|
|
3899
|
+
var R = f.indexOf("?"), N = R !== -1 && R < f.indexOf("#") ? "?" : "#", C = f.split(N), L = /\\/g;
|
|
3900
|
+
C[0] = C[0].replace(L, "/"), f = C.join(N);
|
|
3901
|
+
var P = f;
|
|
3902
|
+
if (P = P.trim(), !b && f.split("#").length === 1) {
|
|
3904
3903
|
var oe = l.exec(P);
|
|
3905
3904
|
if (oe)
|
|
3906
|
-
return this.path = P, this.href = P, this.pathname = oe[1], oe[2] ? (this.search = oe[2], O ? this.query =
|
|
3905
|
+
return this.path = P, this.href = P, this.pathname = oe[1], oe[2] ? (this.search = oe[2], O ? this.query = u.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : O && (this.search = "", this.query = {}), this;
|
|
3907
3906
|
}
|
|
3908
3907
|
var H = t.exec(P);
|
|
3909
3908
|
if (H) {
|
|
@@ -3931,21 +3930,21 @@ function $s() {
|
|
|
3931
3930
|
if (!F)
|
|
3932
3931
|
for (var q = this.hostname.split(/\./), A = 0, U = q.length; A < U; A++) {
|
|
3933
3932
|
var J = q[A];
|
|
3934
|
-
if (J && !J.match(
|
|
3933
|
+
if (J && !J.match(d)) {
|
|
3935
3934
|
for (var z = "", K = 0, ne = J.length; K < ne; K++)
|
|
3936
3935
|
J.charCodeAt(K) > 127 ? z += "x" : z += J[K];
|
|
3937
|
-
if (!z.match(
|
|
3938
|
-
var G = q.slice(0, A), I = q.slice(A + 1), _ = J.match(
|
|
3936
|
+
if (!z.match(d)) {
|
|
3937
|
+
var G = q.slice(0, A), I = q.slice(A + 1), _ = J.match(m);
|
|
3939
3938
|
_ && (G.push(_[1]), I.unshift(_[2])), I.length && (P = "/" + I.join(".") + P), this.hostname = G.join(".");
|
|
3940
3939
|
break;
|
|
3941
3940
|
}
|
|
3942
3941
|
}
|
|
3943
3942
|
}
|
|
3944
|
-
this.hostname.length >
|
|
3943
|
+
this.hostname.length > p ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), F || (this.hostname = e.toASCII(this.hostname));
|
|
3945
3944
|
var B = this.port ? ":" + this.port : "", Q = this.hostname || "";
|
|
3946
3945
|
this.host = Q + B, this.href += this.host, F && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), P[0] !== "/" && (P = "/" + P));
|
|
3947
3946
|
}
|
|
3948
|
-
if (!
|
|
3947
|
+
if (!g[D])
|
|
3949
3948
|
for (var A = 0, U = o.length; A < U; A++) {
|
|
3950
3949
|
var W = o[A];
|
|
3951
3950
|
if (P.indexOf(W) !== -1) {
|
|
@@ -3956,20 +3955,20 @@ function $s() {
|
|
|
3956
3955
|
var ae = P.indexOf("#");
|
|
3957
3956
|
ae !== -1 && (this.hash = P.substr(ae), P = P.slice(0, ae));
|
|
3958
3957
|
var he = P.indexOf("?");
|
|
3959
|
-
if (he !== -1 ? (this.search = P.substr(he), this.query = P.substr(he + 1), O && (this.query =
|
|
3958
|
+
if (he !== -1 ? (this.search = P.substr(he), this.query = P.substr(he + 1), O && (this.query = u.parse(this.query)), P = P.slice(0, he)) : O && (this.search = "", this.query = {}), P && (this.pathname = P), v[D] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
3960
3959
|
var B = this.pathname || "", we = this.search || "";
|
|
3961
3960
|
this.path = B + we;
|
|
3962
3961
|
}
|
|
3963
3962
|
return this.href = this.format(), this;
|
|
3964
3963
|
};
|
|
3965
|
-
function
|
|
3966
|
-
return typeof
|
|
3964
|
+
function h(f) {
|
|
3965
|
+
return typeof f == "string" && (f = y(f)), f instanceof n ? f.format() : n.prototype.format.call(f);
|
|
3967
3966
|
}
|
|
3968
3967
|
n.prototype.format = function() {
|
|
3969
|
-
var
|
|
3970
|
-
|
|
3968
|
+
var f = this.auth || "";
|
|
3969
|
+
f && (f = encodeURIComponent(f), f = f.replace(/%3A/i, ":"), f += "@");
|
|
3971
3970
|
var O = this.protocol || "", b = this.pathname || "", R = this.hash || "", N = !1, C = "";
|
|
3972
|
-
this.host ? N =
|
|
3971
|
+
this.host ? N = f + this.host : this.hostname && (N = f + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (N += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (C = u.stringify(this.query, {
|
|
3973
3972
|
arrayFormat: "repeat",
|
|
3974
3973
|
addQueryPrefix: !1
|
|
3975
3974
|
}));
|
|
@@ -3978,69 +3977,69 @@ function $s() {
|
|
|
3978
3977
|
return encodeURIComponent(P);
|
|
3979
3978
|
}), L = L.replace("#", "%23"), O + N + b + L + R;
|
|
3980
3979
|
};
|
|
3981
|
-
function j(
|
|
3982
|
-
return
|
|
3980
|
+
function j(f, O) {
|
|
3981
|
+
return y(f, !1, !0).resolve(O);
|
|
3983
3982
|
}
|
|
3984
|
-
n.prototype.resolve = function(
|
|
3985
|
-
return this.resolveObject(
|
|
3983
|
+
n.prototype.resolve = function(f) {
|
|
3984
|
+
return this.resolveObject(y(f, !1, !0)).format();
|
|
3986
3985
|
};
|
|
3987
|
-
function T(
|
|
3988
|
-
return
|
|
3986
|
+
function T(f, O) {
|
|
3987
|
+
return f ? y(f, !1, !0).resolveObject(O) : O;
|
|
3989
3988
|
}
|
|
3990
|
-
return n.prototype.resolveObject = function(
|
|
3991
|
-
if (typeof
|
|
3989
|
+
return n.prototype.resolveObject = function(f) {
|
|
3990
|
+
if (typeof f == "string") {
|
|
3992
3991
|
var O = new n();
|
|
3993
|
-
O.parse(
|
|
3992
|
+
O.parse(f, !1, !0), f = O;
|
|
3994
3993
|
}
|
|
3995
3994
|
for (var b = new n(), R = Object.keys(this), N = 0; N < R.length; N++) {
|
|
3996
3995
|
var C = R[N];
|
|
3997
3996
|
b[C] = this[C];
|
|
3998
3997
|
}
|
|
3999
|
-
if (b.hash =
|
|
3998
|
+
if (b.hash = f.hash, f.href === "")
|
|
4000
3999
|
return b.href = b.format(), b;
|
|
4001
|
-
if (
|
|
4002
|
-
for (var L = Object.keys(
|
|
4000
|
+
if (f.slashes && !f.protocol) {
|
|
4001
|
+
for (var L = Object.keys(f), P = 0; P < L.length; P++) {
|
|
4003
4002
|
var oe = L[P];
|
|
4004
|
-
oe !== "protocol" && (b[oe] =
|
|
4003
|
+
oe !== "protocol" && (b[oe] = f[oe]);
|
|
4005
4004
|
}
|
|
4006
4005
|
return v[b.protocol] && b.hostname && !b.pathname && (b.pathname = "/", b.path = b.pathname), b.href = b.format(), b;
|
|
4007
4006
|
}
|
|
4008
|
-
if (
|
|
4009
|
-
if (!v[
|
|
4010
|
-
for (var H = Object.keys(
|
|
4007
|
+
if (f.protocol && f.protocol !== b.protocol) {
|
|
4008
|
+
if (!v[f.protocol]) {
|
|
4009
|
+
for (var H = Object.keys(f), D = 0; D < H.length; D++) {
|
|
4011
4010
|
var se = H[D];
|
|
4012
|
-
b[se] =
|
|
4011
|
+
b[se] = f[se];
|
|
4013
4012
|
}
|
|
4014
4013
|
return b.href = b.format(), b;
|
|
4015
4014
|
}
|
|
4016
|
-
if (b.protocol =
|
|
4017
|
-
for (var U = (
|
|
4015
|
+
if (b.protocol = f.protocol, !f.host && !x[f.protocol]) {
|
|
4016
|
+
for (var U = (f.pathname || "").split("/"); U.length && !(f.host = U.shift()); )
|
|
4018
4017
|
;
|
|
4019
|
-
|
|
4018
|
+
f.host || (f.host = ""), f.hostname || (f.hostname = ""), U[0] !== "" && U.unshift(""), U.length < 2 && U.unshift(""), b.pathname = U.join("/");
|
|
4020
4019
|
} else
|
|
4021
|
-
b.pathname =
|
|
4022
|
-
if (b.search =
|
|
4020
|
+
b.pathname = f.pathname;
|
|
4021
|
+
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) {
|
|
4023
4022
|
var Z = b.pathname || "", A = b.search || "";
|
|
4024
4023
|
b.path = Z + A;
|
|
4025
4024
|
}
|
|
4026
|
-
return b.slashes = b.slashes ||
|
|
4025
|
+
return b.slashes = b.slashes || f.slashes, b.href = b.format(), b;
|
|
4027
4026
|
}
|
|
4028
|
-
var re = b.pathname && b.pathname.charAt(0) === "/", E =
|
|
4029
|
-
if (J && (b.hostname = "", b.port = null, b.host && (q[0] === "" ? q[0] = b.host : q.unshift(b.host)), b.host = "",
|
|
4030
|
-
b.host =
|
|
4027
|
+
var re = b.pathname && b.pathname.charAt(0) === "/", E = f.host || f.pathname && f.pathname.charAt(0) === "/", k = E || re || b.host && f.pathname, F = k, q = b.pathname && b.pathname.split("/") || [], U = f.pathname && f.pathname.split("/") || [], J = b.protocol && !v[b.protocol];
|
|
4028
|
+
if (J && (b.hostname = "", b.port = null, b.host && (q[0] === "" ? q[0] = b.host : q.unshift(b.host)), b.host = "", f.protocol && (f.hostname = null, f.port = null, f.host && (U[0] === "" ? U[0] = f.host : U.unshift(f.host)), f.host = null), k = k && (U[0] === "" || q[0] === "")), E)
|
|
4029
|
+
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, q = U;
|
|
4031
4030
|
else if (U.length)
|
|
4032
|
-
q || (q = []), q.pop(), q = q.concat(U), b.search =
|
|
4033
|
-
else if (
|
|
4031
|
+
q || (q = []), q.pop(), q = q.concat(U), b.search = f.search, b.query = f.query;
|
|
4032
|
+
else if (f.search != null) {
|
|
4034
4033
|
if (J) {
|
|
4035
4034
|
b.host = q.shift(), b.hostname = b.host;
|
|
4036
4035
|
var z = b.host && b.host.indexOf("@") > 0 ? b.host.split("@") : !1;
|
|
4037
4036
|
z && (b.auth = z.shift(), b.hostname = z.shift(), b.host = b.hostname);
|
|
4038
4037
|
}
|
|
4039
|
-
return b.search =
|
|
4038
|
+
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;
|
|
4040
4039
|
}
|
|
4041
4040
|
if (!q.length)
|
|
4042
4041
|
return b.pathname = null, b.search ? b.path = "/" + b.search : b.path = null, b.href = b.format(), b;
|
|
4043
|
-
for (var K = q.slice(-1)[0], ne = (b.host ||
|
|
4042
|
+
for (var K = q.slice(-1)[0], ne = (b.host || f.host || q.length > 1) && (K === "." || K === "..") || K === "", G = 0, I = q.length; I >= 0; I--)
|
|
4044
4043
|
K = q[I], K === "." ? q.splice(I, 1) : K === ".." ? (q.splice(I, 1), G++) : G && (q.splice(I, 1), G--);
|
|
4045
4044
|
if (!k && !F)
|
|
4046
4045
|
for (; G--; G)
|
|
@@ -4052,13 +4051,13 @@ function $s() {
|
|
|
4052
4051
|
var z = b.host && b.host.indexOf("@") > 0 ? b.host.split("@") : !1;
|
|
4053
4052
|
z && (b.auth = z.shift(), b.hostname = z.shift(), b.host = b.hostname);
|
|
4054
4053
|
}
|
|
4055
|
-
return k = k || b.host && q.length, k && !_ && q.unshift(""), q.length > 0 ? b.pathname = q.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 =
|
|
4054
|
+
return k = k || b.host && q.length, k && !_ && q.unshift(""), q.length > 0 ? b.pathname = q.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;
|
|
4056
4055
|
}, n.prototype.parseHost = function() {
|
|
4057
|
-
var
|
|
4058
|
-
O && (O = O[0], O !== ":" && (this.port = O.substr(1)),
|
|
4059
|
-
}, Te.parse =
|
|
4056
|
+
var f = this.host, O = a.exec(f);
|
|
4057
|
+
O && (O = O[0], O !== ":" && (this.port = O.substr(1)), f = f.substr(0, f.length - O.length)), f && (this.hostname = f);
|
|
4058
|
+
}, Te.parse = y, Te.resolve = j, Te.resolveObject = T, Te.format = h, Te.Url = n, Te;
|
|
4060
4059
|
}
|
|
4061
|
-
var
|
|
4060
|
+
var ur = $s(), fr = /* @__PURE__ */ xa(), ws = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), js = class {
|
|
4062
4061
|
constructor(e, n = {}) {
|
|
4063
4062
|
this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
|
|
4064
4063
|
harIsAlreadyEncoded: !1,
|
|
@@ -4088,7 +4087,7 @@ var cr = $s(), ur = /* @__PURE__ */ ba(), ws = (e) => typeof e == "object" && "l
|
|
|
4088
4087
|
}), this;
|
|
4089
4088
|
}
|
|
4090
4089
|
prepare(e, n) {
|
|
4091
|
-
var
|
|
4090
|
+
var p, d, m;
|
|
4092
4091
|
const t = {
|
|
4093
4092
|
...e,
|
|
4094
4093
|
fullUrl: "",
|
|
@@ -4098,45 +4097,45 @@ var cr = $s(), ur = /* @__PURE__ */ ba(), ws = (e) => typeof e == "object" && "l
|
|
|
4098
4097
|
cookiesObj: {},
|
|
4099
4098
|
allHeaders: {}
|
|
4100
4099
|
};
|
|
4101
|
-
if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(
|
|
4102
|
-
const
|
|
4103
|
-
t.headersObj = t.headers.reduce((x, { name: v, value:
|
|
4104
|
-
const
|
|
4100
|
+
if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(Hr, {})), t.headers && t.headers.length) {
|
|
4101
|
+
const g = /^HTTP\/2/;
|
|
4102
|
+
t.headersObj = t.headers.reduce((x, { name: v, value: u }) => {
|
|
4103
|
+
const y = g.exec(t.httpVersion) ? v.toLocaleLowerCase() : v;
|
|
4105
4104
|
return {
|
|
4106
4105
|
...x,
|
|
4107
|
-
[
|
|
4106
|
+
[y]: u
|
|
4108
4107
|
};
|
|
4109
4108
|
}, {});
|
|
4110
4109
|
}
|
|
4111
4110
|
t.cookies && t.cookies.length && (t.cookiesObj = t.cookies.reduceRight(
|
|
4112
|
-
(
|
|
4113
|
-
...
|
|
4111
|
+
(g, { name: x, value: v }) => ({
|
|
4112
|
+
...g,
|
|
4114
4113
|
[x]: v
|
|
4115
4114
|
}),
|
|
4116
4115
|
{}
|
|
4117
4116
|
));
|
|
4118
|
-
const a = (
|
|
4117
|
+
const a = (p = t.cookies) == null ? void 0 : p.map(({ name: g, value: x }) => n.harIsAlreadyEncoded ? `${g}=${x}` : `${encodeURIComponent(g)}=${encodeURIComponent(x)}`);
|
|
4119
4118
|
switch (a != null && a.length && (t.allHeaders.cookie = a.join("; ")), t.postData.mimeType) {
|
|
4120
4119
|
case "multipart/mixed":
|
|
4121
4120
|
case "multipart/related":
|
|
4122
4121
|
case "multipart/form-data":
|
|
4123
4122
|
case "multipart/alternative":
|
|
4124
|
-
if (t.postData.text = "", t.postData.mimeType = "multipart/form-data", (
|
|
4125
|
-
const
|
|
4126
|
-
`,
|
|
4127
|
-
`),
|
|
4128
|
-
(
|
|
4123
|
+
if (t.postData.text = "", t.postData.mimeType = "multipart/form-data", (d = t.postData) != null && d.params) {
|
|
4124
|
+
const g = "---011000010111000001101001", x = `${g}--`, v = `\r
|
|
4125
|
+
`, u = (T) => T.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), y = (T) => T.replace(/\r?\n|\r/g, `\r
|
|
4126
|
+
`), h = [`--${g}`];
|
|
4127
|
+
(m = t.postData) == null || m.params.forEach((T, f) => {
|
|
4129
4128
|
const O = T.name, b = T.value || "", R = T.fileName || null, N = T.contentType || "application/octet-stream";
|
|
4130
|
-
R ? (
|
|
4131
|
-
`Content-Disposition: form-data; name="${
|
|
4132
|
-
),
|
|
4133
|
-
}),
|
|
4129
|
+
R ? (h.push(
|
|
4130
|
+
`Content-Disposition: form-data; name="${u(y(O))}"; filename="${R}"`
|
|
4131
|
+
), h.push(`Content-Type: ${N}`)) : h.push(`Content-Disposition: form-data; name="${u(y(O))}"`), h.push(""), h.push(y(b)), f !== t.postData.params.length - 1 && h.push(`--${g}`);
|
|
4132
|
+
}), h.push(`--${x}`), t.postData.boundary = g, t.postData.text = h.join(v);
|
|
4134
4133
|
const j = fe(t.headersObj, "content-type") || "content-type";
|
|
4135
|
-
t.headersObj[j] = `multipart/form-data; boundary=${
|
|
4134
|
+
t.headersObj[j] = `multipart/form-data; boundary=${g}`;
|
|
4136
4135
|
}
|
|
4137
4136
|
break;
|
|
4138
4137
|
case "application/x-www-form-urlencoded":
|
|
4139
|
-
t.postData.params ? (t.postData.paramsObj = t.postData.params.reduce(
|
|
4138
|
+
t.postData.params ? (t.postData.paramsObj = t.postData.params.reduce(Hr, {}), t.postData.text = fr.stringify(t.postData.paramsObj)) : t.postData.text = "";
|
|
4140
4139
|
break;
|
|
4141
4140
|
case "text/json":
|
|
4142
4141
|
case "text/x-json":
|
|
@@ -4153,16 +4152,16 @@ var cr = $s(), ur = /* @__PURE__ */ ba(), ws = (e) => typeof e == "object" && "l
|
|
|
4153
4152
|
const l = {
|
|
4154
4153
|
...t.allHeaders,
|
|
4155
4154
|
...t.headersObj
|
|
4156
|
-
}, s =
|
|
4155
|
+
}, s = ur.parse(t.url, !0, !0);
|
|
4157
4156
|
t.queryObj = {
|
|
4158
4157
|
...t.queryObj,
|
|
4159
4158
|
...s.query
|
|
4160
4159
|
};
|
|
4161
4160
|
let r;
|
|
4162
|
-
n.harIsAlreadyEncoded ? r =
|
|
4161
|
+
n.harIsAlreadyEncoded ? r = fr.stringify(t.queryObj, {
|
|
4163
4162
|
encode: !1,
|
|
4164
4163
|
indices: !1
|
|
4165
|
-
}) : r =
|
|
4164
|
+
}) : r = fr.stringify(t.queryObj, {
|
|
4166
4165
|
indices: !1
|
|
4167
4166
|
});
|
|
4168
4167
|
const o = {
|
|
@@ -4170,11 +4169,11 @@ var cr = $s(), ur = /* @__PURE__ */ ba(), ws = (e) => typeof e == "object" && "l
|
|
|
4170
4169
|
query: t.queryObj,
|
|
4171
4170
|
search: r,
|
|
4172
4171
|
path: r ? `${s.pathname}?${r}` : s.pathname
|
|
4173
|
-
}, i =
|
|
4172
|
+
}, i = ur.format({
|
|
4174
4173
|
...s,
|
|
4175
4174
|
query: null,
|
|
4176
4175
|
search: null
|
|
4177
|
-
}), c =
|
|
4176
|
+
}), c = ur.format({
|
|
4178
4177
|
...s,
|
|
4179
4178
|
...o
|
|
4180
4179
|
});
|
|
@@ -4200,8 +4199,8 @@ const Ss = ({
|
|
|
4200
4199
|
threshold: n,
|
|
4201
4200
|
root: t
|
|
4202
4201
|
} = {}) => {
|
|
4203
|
-
const [a, l] = ve(!1), s =
|
|
4204
|
-
return
|
|
4202
|
+
const [a, l] = ve(!1), s = ia(null);
|
|
4203
|
+
return xr(() => {
|
|
4205
4204
|
const r = new IntersectionObserver(
|
|
4206
4205
|
([i]) => {
|
|
4207
4206
|
i && l(i.isIntersecting);
|
|
@@ -4211,11 +4210,11 @@ const Ss = ({
|
|
|
4211
4210
|
if (o)
|
|
4212
4211
|
return r.observe(o), () => r.unobserve(o);
|
|
4213
4212
|
}, [t, e, n]), [s, a];
|
|
4214
|
-
}, Os = typeof window < "u" ?
|
|
4213
|
+
}, Os = typeof window < "u" ? to : xr, $a = ({
|
|
4215
4214
|
children: e,
|
|
4216
4215
|
maxHeight: n = 250
|
|
4217
4216
|
}) => {
|
|
4218
|
-
const t =
|
|
4217
|
+
const t = ia(null), [a, l] = ve(!1), [s, r] = ve(!1);
|
|
4219
4218
|
return Os(() => {
|
|
4220
4219
|
const o = t.current;
|
|
4221
4220
|
if (!o) return;
|
|
@@ -4225,7 +4224,7 @@ const Ss = ({
|
|
|
4225
4224
|
});
|
|
4226
4225
|
return i.observe(o), () => i.disconnect();
|
|
4227
4226
|
}, [n]), /* @__PURE__ */ $.jsxs(
|
|
4228
|
-
|
|
4227
|
+
ta,
|
|
4229
4228
|
{
|
|
4230
4229
|
className: "group",
|
|
4231
4230
|
open: s,
|
|
@@ -4233,7 +4232,7 @@ const Ss = ({
|
|
|
4233
4232
|
style: { "--max-height": `${n}px` },
|
|
4234
4233
|
children: [
|
|
4235
4234
|
/* @__PURE__ */ $.jsxs(
|
|
4236
|
-
|
|
4235
|
+
ra,
|
|
4237
4236
|
{
|
|
4238
4237
|
forceMount: !0,
|
|
4239
4238
|
className: pe(
|
|
@@ -4244,12 +4243,12 @@ const Ss = ({
|
|
|
4244
4243
|
!s && a && /* @__PURE__ */ $.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" }),
|
|
4245
4244
|
/* @__PURE__ */ $.jsx("div", { ref: t, children: e }),
|
|
4246
4245
|
!s && a && /* @__PURE__ */ $.jsx(
|
|
4247
|
-
|
|
4246
|
+
pr,
|
|
4248
4247
|
{
|
|
4249
4248
|
className: "absolute inset-0 grid place-items-center z-10 cursor-pointer peer",
|
|
4250
4249
|
asChild: !0,
|
|
4251
4250
|
children: /* @__PURE__ */ $.jsx("div", { children: /* @__PURE__ */ $.jsxs(Lr, { variant: "outline", className: "hidden group-hover:flex", children: [
|
|
4252
|
-
/* @__PURE__ */ $.jsx(
|
|
4251
|
+
/* @__PURE__ */ $.jsx(Fa, { size: 14, className: "me-1.5" }),
|
|
4253
4252
|
"Click to expand"
|
|
4254
4253
|
] }) })
|
|
4255
4254
|
}
|
|
@@ -4261,9 +4260,9 @@ const Ss = ({
|
|
|
4261
4260
|
"div",
|
|
4262
4261
|
{
|
|
4263
4262
|
className: pe("flex justify-center w-full mb-2", !s && "hidden"),
|
|
4264
|
-
children: /* @__PURE__ */ $.jsx(
|
|
4263
|
+
children: /* @__PURE__ */ $.jsx(pr, { asChild: !0, children: /* @__PURE__ */ $.jsxs(Lr, { variant: "outline", size: "sm", children: [
|
|
4265
4264
|
"Collapse",
|
|
4266
|
-
/* @__PURE__ */ $.jsx(
|
|
4265
|
+
/* @__PURE__ */ $.jsx(_a, { size: 14, className: "ms-1.5" })
|
|
4267
4266
|
] }) })
|
|
4268
4267
|
}
|
|
4269
4268
|
)
|
|
@@ -4276,37 +4275,37 @@ const Ss = ({
|
|
|
4276
4275
|
operation: t,
|
|
4277
4276
|
examples: a
|
|
4278
4277
|
}) => {
|
|
4279
|
-
var
|
|
4280
|
-
const { isAuthEnabled: l, login: s, signup: r, isPending: o, isAuthenticated: i } =
|
|
4281
|
-
var
|
|
4278
|
+
var m, g, x;
|
|
4279
|
+
const { isAuthEnabled: l, login: s, signup: r, isPending: o, isAuthenticated: i } = yo(), c = (m = t.parameters) == null ? void 0 : m.filter((v) => v.in === "header").sort((v, u) => v.required && !u.required ? -1 : 1).map((v) => {
|
|
4280
|
+
var u, y, h, j, T, f, O, b;
|
|
4282
4281
|
return {
|
|
4283
4282
|
name: v.name,
|
|
4284
|
-
defaultValue: ((
|
|
4283
|
+
defaultValue: ((u = v.schema) == null ? void 0 : u.default) ?? ((h = (y = v.examples) == null ? void 0 : y.find((R) => R.value)) == null ? void 0 : h.value) ?? "",
|
|
4285
4284
|
defaultActive: v.required ?? !1,
|
|
4286
4285
|
isRequired: v.required ?? !1,
|
|
4287
|
-
enum: ((j = v.schema) == null ? void 0 : j.type) == "array" ? (
|
|
4286
|
+
enum: ((j = v.schema) == null ? void 0 : j.type) == "array" ? (f = (T = v.schema) == null ? void 0 : T.items) == null ? void 0 : f.enum : (O = v.schema) == null ? void 0 : O.enum,
|
|
4288
4287
|
type: ((b = v.schema) == null ? void 0 : b.type) ?? "string"
|
|
4289
4288
|
};
|
|
4290
|
-
}),
|
|
4291
|
-
var
|
|
4289
|
+
}), p = (g = t.parameters) == null ? void 0 : g.filter((v) => v.in === "query").sort((v, u) => v.required && !u.required ? -1 : 1).map((v) => {
|
|
4290
|
+
var u, y, h, j, T;
|
|
4292
4291
|
return {
|
|
4293
4292
|
name: v.name,
|
|
4294
4293
|
defaultActive: v.required ?? !1,
|
|
4295
4294
|
isRequired: v.required ?? !1,
|
|
4296
|
-
enum: ((
|
|
4295
|
+
enum: ((u = v.schema) == null ? void 0 : u.type) == "array" ? (h = (y = v.schema) == null ? void 0 : y.items) == null ? void 0 : h.enum : (j = v.schema) == null ? void 0 : j.enum,
|
|
4297
4296
|
type: ((T = v.schema) == null ? void 0 : T.type) ?? "string"
|
|
4298
4297
|
};
|
|
4299
|
-
}),
|
|
4298
|
+
}), d = (x = t.parameters) == null ? void 0 : x.filter((v) => v.in === "path").map((v) => ({ name: v.name }));
|
|
4300
4299
|
return /* @__PURE__ */ $.jsx(
|
|
4301
|
-
|
|
4300
|
+
Wa,
|
|
4302
4301
|
{
|
|
4303
4302
|
server: e,
|
|
4304
4303
|
servers: n,
|
|
4305
4304
|
method: t.method,
|
|
4306
4305
|
url: t.path,
|
|
4307
4306
|
headers: c,
|
|
4308
|
-
queryParams:
|
|
4309
|
-
pathParams:
|
|
4307
|
+
queryParams: p,
|
|
4308
|
+
pathParams: d,
|
|
4310
4309
|
examples: a,
|
|
4311
4310
|
requiresLogin: l && !i && !o,
|
|
4312
4311
|
onLogin: () => s(),
|
|
@@ -4328,7 +4327,7 @@ const Ss = ({
|
|
|
4328
4327
|
),
|
|
4329
4328
|
children: e
|
|
4330
4329
|
}
|
|
4331
|
-
),
|
|
4330
|
+
), wa = ({ children: e, className: n }) => /* @__PURE__ */ $.jsx("div", { className: pe("bg-card overflow-auto p-2", n), children: e }), ja = ({ children: e, className: n }) => /* @__PURE__ */ $.jsx("div", { className: pe("border-t bg-muted dark:bg-transparent p-3", n), children: e }), $e = (e, n) => {
|
|
4332
4331
|
if (e.example !== void 0)
|
|
4333
4332
|
return e.example;
|
|
4334
4333
|
if (e.examples && typeof e.examples == "object" && "default" in e.examples) {
|
|
@@ -4400,24 +4399,24 @@ const Ss = ({
|
|
|
4400
4399
|
"text/csv": "csv",
|
|
4401
4400
|
"application/javascript": "javascript",
|
|
4402
4401
|
"application/graphql": "graphql"
|
|
4403
|
-
}[e] ?? "plain" : "plain",
|
|
4402
|
+
}[e] ?? "plain" : "plain", Sa = ({
|
|
4404
4403
|
content: e,
|
|
4405
4404
|
description: n,
|
|
4406
4405
|
onExampleChange: t
|
|
4407
4406
|
}) => {
|
|
4408
|
-
var
|
|
4409
|
-
const [a, l] = ve(0), [s, r] = ve(0), o = Array.isArray(e) && e.length === 1 ? e[0] : e[a], i = (o == null ? void 0 : o.examples) ?? [], c = i[s],
|
|
4407
|
+
var g;
|
|
4408
|
+
const [a, l] = ve(0), [s, r] = ve(0), o = Array.isArray(e) && e.length === 1 ? e[0] : e[a], i = (o == null ? void 0 : o.examples) ?? [], c = i[s], p = sa(() => {
|
|
4410
4409
|
if (c)
|
|
4411
4410
|
return "value" in c ? c.value : c;
|
|
4412
4411
|
if (o != null && o.schema)
|
|
4413
4412
|
return $e(o.schema);
|
|
4414
4413
|
}, [c, o == null ? void 0 : o.schema]);
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
}, [
|
|
4418
|
-
const
|
|
4414
|
+
xr(() => {
|
|
4415
|
+
p && (t == null || t(p));
|
|
4416
|
+
}, [p, t]);
|
|
4417
|
+
const d = Ps(p), m = qs(o == null ? void 0 : o.mediaType);
|
|
4419
4418
|
return /* @__PURE__ */ $.jsxs($.Fragment, { children: [
|
|
4420
|
-
/* @__PURE__ */ $.jsxs(
|
|
4419
|
+
/* @__PURE__ */ $.jsxs(wa, { className: "p-0", children: [
|
|
4421
4420
|
c != null && c.externalValue ? /* @__PURE__ */ $.jsx("div", { className: "p-2", children: /* @__PURE__ */ $.jsx(
|
|
4422
4421
|
"a",
|
|
4423
4422
|
{
|
|
@@ -4427,18 +4426,18 @@ const Ss = ({
|
|
|
4427
4426
|
className: "text-xs text-primary hover:underline",
|
|
4428
4427
|
children: "View External Example →"
|
|
4429
4428
|
}
|
|
4430
|
-
) }) : /* @__PURE__ */ $.jsx(
|
|
4431
|
-
|
|
4429
|
+
) }) : /* @__PURE__ */ $.jsx($a, { children: /* @__PURE__ */ $.jsx(
|
|
4430
|
+
ca,
|
|
4432
4431
|
{
|
|
4433
|
-
language:
|
|
4432
|
+
language: m,
|
|
4434
4433
|
noBackground: !0,
|
|
4435
4434
|
className: "[--scrollbar-color:gray] text-xs max-h-[500px] p-2",
|
|
4436
|
-
code:
|
|
4435
|
+
code: d
|
|
4437
4436
|
}
|
|
4438
4437
|
) }),
|
|
4439
4438
|
(c == null ? void 0 : c.description) && /* @__PURE__ */ $.jsx("div", { className: "border-t text-xs px-3 py-1.5 text-muted-foreground", children: c.description })
|
|
4440
4439
|
] }),
|
|
4441
|
-
/* @__PURE__ */ $.jsxs(
|
|
4440
|
+
/* @__PURE__ */ $.jsxs(ja, { className: "text-xs p-0 divide-y divide-border", children: [
|
|
4442
4441
|
n && /* @__PURE__ */ $.jsx("div", { className: "text-muted-foreground text-xs px-3 py-2", children: n }),
|
|
4443
4442
|
(i.length !== 0 || e.length !== 0) && /* @__PURE__ */ $.jsxs("div", { className: "flex items-center gap-2 justify-between min-w-0 px-3 py-2", children: [
|
|
4444
4443
|
/* @__PURE__ */ $.jsx("div", { className: "flex items-center gap-2 min-w-0", children: e.length > 1 ? /* @__PURE__ */ $.jsx(
|
|
@@ -4452,7 +4451,7 @@ const Ss = ({
|
|
|
4452
4451
|
label: x.mediaType
|
|
4453
4452
|
}))
|
|
4454
4453
|
}
|
|
4455
|
-
) : /* @__PURE__ */ $.jsx("span", { className: "font-mono text-[11px]", children: (
|
|
4454
|
+
) : /* @__PURE__ */ $.jsx("span", { className: "font-mono text-[11px]", children: (g = e[0]) == null ? void 0 : g.mediaType }) }),
|
|
4456
4455
|
i.length > 1 && /* @__PURE__ */ $.jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ $.jsx(
|
|
4457
4456
|
Ye,
|
|
4458
4457
|
{
|
|
@@ -4473,9 +4472,9 @@ const Ss = ({
|
|
|
4473
4472
|
onExampleChange: n
|
|
4474
4473
|
}) => e.length === 0 ? null : /* @__PURE__ */ $.jsxs(Or, { children: [
|
|
4475
4474
|
/* @__PURE__ */ $.jsx(Tr, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ $.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
|
|
4476
|
-
/* @__PURE__ */ $.jsx(
|
|
4475
|
+
/* @__PURE__ */ $.jsx(Sa, { content: e, onExampleChange: n })
|
|
4477
4476
|
] }), Rs = ({ response: e }) => /* @__PURE__ */ $.jsx(Ge.Content, { value: e.statusCode, children: /* @__PURE__ */ $.jsx(
|
|
4478
|
-
|
|
4477
|
+
Sa,
|
|
4479
4478
|
{
|
|
4480
4479
|
content: e.content ?? [],
|
|
4481
4480
|
description: e.description ?? void 0
|
|
@@ -4584,18 +4583,18 @@ const Ss = ({
|
|
|
4584
4583
|
onSelectResponse: t
|
|
4585
4584
|
}) => {
|
|
4586
4585
|
var N;
|
|
4587
|
-
const { input: a, type: l, options: s } =
|
|
4586
|
+
const { input: a, type: l, options: s } = Ze(), r = Ra(), o = De(Ns, { input: a, type: l }), i = vr(o), c = mo(), p = na(e.method), [d, m] = Ha(), [, g] = oa(), [x, v] = ve(), u = d.get("lang") ?? (s == null ? void 0 : s.examplesLanguage) ?? "shell", y = (N = e.requestBody) == null ? void 0 : N.content, h = y && (s != null && s.transformExamples) ? s.transformExamples({
|
|
4588
4587
|
auth: r,
|
|
4589
4588
|
type: "request",
|
|
4590
4589
|
operation: e,
|
|
4591
|
-
content:
|
|
4590
|
+
content: y,
|
|
4592
4591
|
context: c
|
|
4593
|
-
}) :
|
|
4594
|
-
|
|
4592
|
+
}) : y, j = /* @__PURE__ */ $.jsx(
|
|
4593
|
+
Ja,
|
|
4595
4594
|
{
|
|
4596
4595
|
path: e.path,
|
|
4597
4596
|
renderParam: ({ name: C }) => /* @__PURE__ */ $.jsx(
|
|
4598
|
-
|
|
4597
|
+
ea,
|
|
4599
4598
|
{
|
|
4600
4599
|
name: C,
|
|
4601
4600
|
backgroundOpacity: "0",
|
|
@@ -4604,10 +4603,10 @@ const Ss = ({
|
|
|
4604
4603
|
}
|
|
4605
4604
|
)
|
|
4606
4605
|
}
|
|
4607
|
-
), { selectedServer: T } =
|
|
4606
|
+
), { selectedServer: T } = br(i.data.schema.servers), f = sa(() => {
|
|
4608
4607
|
var P;
|
|
4609
|
-
const C = x ?? ((P =
|
|
4610
|
-
|
|
4608
|
+
const C = x ?? ((P = h == null ? void 0 : h[0]) != null && P.schema ? $e(
|
|
4609
|
+
h[0].schema
|
|
4611
4610
|
) : void 0), L = new js({
|
|
4612
4611
|
method: e.method.toLocaleUpperCase(),
|
|
4613
4612
|
url: T + e.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
@@ -4622,14 +4621,14 @@ const Ss = ({
|
|
|
4622
4621
|
headersSize: 0,
|
|
4623
4622
|
bodySize: 0
|
|
4624
4623
|
});
|
|
4625
|
-
return ks(L,
|
|
4624
|
+
return ks(L, u);
|
|
4626
4625
|
}, [
|
|
4627
4626
|
x,
|
|
4628
|
-
|
|
4627
|
+
h,
|
|
4629
4628
|
e.method,
|
|
4630
4629
|
e.path,
|
|
4631
4630
|
T,
|
|
4632
|
-
|
|
4631
|
+
u
|
|
4633
4632
|
]), [O, b] = Ss({ rootMargin: "200px 0px 200px 0px" }), R = b && (e.extensions["x-explorer-enabled"] === !0 || e.extensions["x-zudoku-playground-enabled"] === !0 || e.extensions["x-explorer-enabled"] === void 0 && e.extensions["x-zudoku-playground-enabled"] === void 0 && !(s != null && s.disablePlayground));
|
|
4634
4633
|
return /* @__PURE__ */ $.jsxs(
|
|
4635
4634
|
"aside",
|
|
@@ -4641,7 +4640,7 @@ const Ss = ({
|
|
|
4641
4640
|
/* @__PURE__ */ $.jsxs(Or, { children: [
|
|
4642
4641
|
/* @__PURE__ */ $.jsxs(Tr, { className: "flex justify-between items-center flex-nowrap py-2.5 gap-2 text-xs", children: [
|
|
4643
4642
|
/* @__PURE__ */ $.jsxs("span", { className: "font-mono break-words leading-6", children: [
|
|
4644
|
-
/* @__PURE__ */ $.jsx("span", { className: pe("font-semibold",
|
|
4643
|
+
/* @__PURE__ */ $.jsx("span", { className: pe("font-semibold", p), children: e.method.toLocaleUpperCase() }),
|
|
4645
4644
|
" ",
|
|
4646
4645
|
j
|
|
4647
4646
|
] }),
|
|
@@ -4650,30 +4649,30 @@ const Ss = ({
|
|
|
4650
4649
|
{
|
|
4651
4650
|
servers: i.data.schema.servers.map((C) => C.url),
|
|
4652
4651
|
operation: e,
|
|
4653
|
-
examples:
|
|
4652
|
+
examples: y ?? void 0
|
|
4654
4653
|
}
|
|
4655
4654
|
)
|
|
4656
4655
|
] }),
|
|
4657
4656
|
b && /* @__PURE__ */ $.jsxs($.Fragment, { children: [
|
|
4658
|
-
/* @__PURE__ */ $.jsx(
|
|
4659
|
-
|
|
4657
|
+
/* @__PURE__ */ $.jsx(wa, { className: "p-0", children: /* @__PURE__ */ $.jsx($a, { children: /* @__PURE__ */ $.jsx(
|
|
4658
|
+
ca,
|
|
4660
4659
|
{
|
|
4661
|
-
language:
|
|
4660
|
+
language: u,
|
|
4662
4661
|
noBackground: !0,
|
|
4663
4662
|
className: "[--scrollbar-color:gray] text-xs max-h-[500px] p-2",
|
|
4664
|
-
code:
|
|
4663
|
+
code: f
|
|
4665
4664
|
}
|
|
4666
4665
|
) }) }),
|
|
4667
|
-
/* @__PURE__ */ $.jsxs(
|
|
4666
|
+
/* @__PURE__ */ $.jsxs(ja, { className: "flex items-center text-xs gap-2 justify-end py-2.5", children: [
|
|
4668
4667
|
/* @__PURE__ */ $.jsx("span", { children: "Show example in" }),
|
|
4669
4668
|
/* @__PURE__ */ $.jsx(
|
|
4670
4669
|
Ye,
|
|
4671
4670
|
{
|
|
4672
4671
|
className: "self-start max-w-[150px]",
|
|
4673
|
-
value:
|
|
4672
|
+
value: u,
|
|
4674
4673
|
onChange: (C) => {
|
|
4675
|
-
|
|
4676
|
-
|
|
4674
|
+
g(() => {
|
|
4675
|
+
m((L) => (L.set("lang", C.target.value), L));
|
|
4677
4676
|
});
|
|
4678
4677
|
},
|
|
4679
4678
|
options: As
|
|
@@ -4682,10 +4681,10 @@ const Ss = ({
|
|
|
4682
4681
|
] })
|
|
4683
4682
|
] })
|
|
4684
4683
|
] }),
|
|
4685
|
-
b &&
|
|
4684
|
+
b && h && /* @__PURE__ */ $.jsx(
|
|
4686
4685
|
Cs,
|
|
4687
4686
|
{
|
|
4688
|
-
content:
|
|
4687
|
+
content: h,
|
|
4689
4688
|
onExampleChange: v
|
|
4690
4689
|
}
|
|
4691
4690
|
),
|
|
@@ -4713,11 +4712,11 @@ const Ss = ({
|
|
|
4713
4712
|
operationFragment: e,
|
|
4714
4713
|
serverUrl: n
|
|
4715
4714
|
}) => {
|
|
4716
|
-
var
|
|
4717
|
-
const t =
|
|
4715
|
+
var i, c, p;
|
|
4716
|
+
const t = go(Fs, e), a = uo(
|
|
4718
4717
|
t.parameters ?? [],
|
|
4719
|
-
(
|
|
4720
|
-
), l = t.responses.at(0), [
|
|
4718
|
+
(d) => d.in
|
|
4719
|
+
), { options: l } = Ze(), s = t.responses.at(0), [r, o] = ve(s == null ? void 0 : s.statusCode);
|
|
4721
4720
|
return /* @__PURE__ */ $.jsxs("div", { children: [
|
|
4722
4721
|
t.deprecated && /* @__PURE__ */ $.jsx(_r, { variant: "muted", className: "text-xs mb-4", children: "deprecated" }),
|
|
4723
4722
|
/* @__PURE__ */ $.jsxs(
|
|
@@ -4739,125 +4738,134 @@ const Ss = ({
|
|
|
4739
4738
|
}
|
|
4740
4739
|
),
|
|
4741
4740
|
/* @__PURE__ */ $.jsxs("div", { className: "text-sm flex gap-2 font-mono col-span-full", children: [
|
|
4742
|
-
/* @__PURE__ */ $.jsx("span", { className:
|
|
4743
|
-
/* @__PURE__ */ $.jsxs(
|
|
4741
|
+
/* @__PURE__ */ $.jsx("span", { className: na(t.method), children: t.method.toUpperCase() }),
|
|
4742
|
+
/* @__PURE__ */ $.jsxs(aa, { className: "max-w-full truncate flex cursor-pointer", children: [
|
|
4744
4743
|
n && /* @__PURE__ */ $.jsx("div", { className: "text-neutral-400 dark:text-neutral-500 truncate", children: n.replace(/\/$/, "") }),
|
|
4745
4744
|
/* @__PURE__ */ $.jsx("div", { className: "text-neutral-900 dark:text-neutral-200", children: t.path })
|
|
4746
4745
|
] })
|
|
4747
4746
|
] }),
|
|
4748
|
-
/* @__PURE__ */ $.jsxs(
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
var y;
|
|
4759
|
-
return (y = a[u]) != null && y.length ? /* @__PURE__ */ $.jsx(
|
|
4760
|
-
jo,
|
|
4761
|
-
{
|
|
4762
|
-
summary: t.summary ?? void 0,
|
|
4763
|
-
id: t.slug,
|
|
4764
|
-
parameters: a[u],
|
|
4765
|
-
group: u
|
|
4766
|
-
},
|
|
4767
|
-
u
|
|
4768
|
-
) : [];
|
|
4769
|
-
}
|
|
4770
|
-
) }),
|
|
4771
|
-
xo((c = (i = (o = t.requestBody) == null ? void 0 : o.content) == null ? void 0 : i.at(0)) == null ? void 0 : c.schema, (u) => {
|
|
4772
|
-
var y;
|
|
4773
|
-
return /* @__PURE__ */ $.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
4774
|
-
/* @__PURE__ */ $.jsxs(
|
|
4775
|
-
Ue,
|
|
4747
|
+
/* @__PURE__ */ $.jsxs(
|
|
4748
|
+
"div",
|
|
4749
|
+
{
|
|
4750
|
+
className: pe(
|
|
4751
|
+
"flex flex-col gap-4",
|
|
4752
|
+
(l == null ? void 0 : l.disableSidecar) && "col-span-full"
|
|
4753
|
+
),
|
|
4754
|
+
children: [
|
|
4755
|
+
t.description && /* @__PURE__ */ $.jsx(
|
|
4756
|
+
Qe,
|
|
4776
4757
|
{
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
id: `${t.slug}/request-body`,
|
|
4780
|
-
children: [
|
|
4781
|
-
t.summary && /* @__PURE__ */ $.jsxs(hr, { children: [
|
|
4782
|
-
t.summary,
|
|
4783
|
-
" › "
|
|
4784
|
-
] }),
|
|
4785
|
-
"Request Body",
|
|
4786
|
-
" ",
|
|
4787
|
-
((y = t.requestBody) == null ? void 0 : y.required) === !1 ? /* @__PURE__ */ $.jsx(_r, { variant: "muted", children: "optional" }) : ""
|
|
4788
|
-
]
|
|
4758
|
+
className: `${dr} max-w-full prose-img:max-w-prose`,
|
|
4759
|
+
content: t.description
|
|
4789
4760
|
}
|
|
4790
4761
|
),
|
|
4791
|
-
/* @__PURE__ */ $.jsx(
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
Ue,
|
|
4797
|
-
{
|
|
4798
|
-
level: 3,
|
|
4799
|
-
className: "capitalize mt-8 pt-8 border-t",
|
|
4800
|
-
id: `${t.slug}/responses`,
|
|
4801
|
-
children: [
|
|
4802
|
-
t.summary && /* @__PURE__ */ $.jsxs(hr, { children: [
|
|
4803
|
-
t.summary,
|
|
4804
|
-
" › "
|
|
4805
|
-
] }),
|
|
4806
|
-
"Responses"
|
|
4807
|
-
]
|
|
4808
|
-
}
|
|
4809
|
-
),
|
|
4810
|
-
/* @__PURE__ */ $.jsxs(
|
|
4811
|
-
io,
|
|
4812
|
-
{
|
|
4813
|
-
onValueChange: (u) => r(u),
|
|
4814
|
-
value: s,
|
|
4815
|
-
children: [
|
|
4816
|
-
t.responses.length > 1 && /* @__PURE__ */ $.jsx(so, { children: t.responses.map((u) => /* @__PURE__ */ $.jsx(
|
|
4817
|
-
lo,
|
|
4762
|
+
t.parameters && t.parameters.length > 0 && /* @__PURE__ */ $.jsx($.Fragment, { children: Us.flatMap(
|
|
4763
|
+
(d) => {
|
|
4764
|
+
var m;
|
|
4765
|
+
return (m = a[d]) != null && m.length ? /* @__PURE__ */ $.jsx(
|
|
4766
|
+
jo,
|
|
4818
4767
|
{
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4768
|
+
summary: t.summary ?? void 0,
|
|
4769
|
+
id: t.slug,
|
|
4770
|
+
parameters: a[d],
|
|
4771
|
+
group: d
|
|
4822
4772
|
},
|
|
4823
|
-
|
|
4824
|
-
)
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4773
|
+
d
|
|
4774
|
+
) : [];
|
|
4775
|
+
}
|
|
4776
|
+
) }),
|
|
4777
|
+
Br((p = (c = (i = t.requestBody) == null ? void 0 : i.content) == null ? void 0 : c.at(0)) == null ? void 0 : p.schema, (d) => {
|
|
4778
|
+
var m;
|
|
4779
|
+
return /* @__PURE__ */ $.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
4780
|
+
/* @__PURE__ */ $.jsxs(
|
|
4781
|
+
Ue,
|
|
4782
|
+
{
|
|
4783
|
+
level: 3,
|
|
4784
|
+
className: "capitalize flex items-center gap-2",
|
|
4785
|
+
id: `${t.slug}/request-body`,
|
|
4786
|
+
children: [
|
|
4787
|
+
t.summary && /* @__PURE__ */ $.jsxs(hr, { children: [
|
|
4788
|
+
t.summary,
|
|
4789
|
+
" › "
|
|
4790
|
+
] }),
|
|
4791
|
+
"Request Body",
|
|
4792
|
+
" ",
|
|
4793
|
+
((m = t.requestBody) == null ? void 0 : m.required) === !1 ? /* @__PURE__ */ $.jsx(_r, { variant: "muted", children: "optional" }) : ""
|
|
4794
|
+
]
|
|
4795
|
+
}
|
|
4796
|
+
),
|
|
4797
|
+
/* @__PURE__ */ $.jsx(yr, { schema: d })
|
|
4798
|
+
] });
|
|
4799
|
+
}),
|
|
4800
|
+
t.responses.length > 0 && /* @__PURE__ */ $.jsxs($.Fragment, { children: [
|
|
4801
|
+
/* @__PURE__ */ $.jsxs(
|
|
4802
|
+
Ue,
|
|
4803
|
+
{
|
|
4804
|
+
level: 3,
|
|
4805
|
+
className: "capitalize mt-8 pt-8 border-t",
|
|
4806
|
+
id: `${t.slug}/responses`,
|
|
4807
|
+
children: [
|
|
4808
|
+
t.summary && /* @__PURE__ */ $.jsxs(hr, { children: [
|
|
4809
|
+
t.summary,
|
|
4810
|
+
" › "
|
|
4811
|
+
] }),
|
|
4812
|
+
"Responses"
|
|
4813
|
+
]
|
|
4814
|
+
}
|
|
4815
|
+
),
|
|
4816
|
+
/* @__PURE__ */ $.jsxs(
|
|
4817
|
+
no,
|
|
4818
|
+
{
|
|
4819
|
+
onValueChange: (d) => o(d),
|
|
4820
|
+
value: r,
|
|
4821
|
+
children: [
|
|
4822
|
+
t.responses.length > 1 && /* @__PURE__ */ $.jsx(ao, { children: t.responses.map((d) => /* @__PURE__ */ $.jsx(
|
|
4823
|
+
oo,
|
|
4824
|
+
{
|
|
4825
|
+
value: d.statusCode,
|
|
4826
|
+
title: d.description ?? void 0,
|
|
4827
|
+
children: d.statusCode
|
|
4828
|
+
},
|
|
4829
|
+
d.statusCode
|
|
4830
|
+
)) }),
|
|
4831
|
+
/* @__PURE__ */ $.jsx("ul", { className: "list-none m-0 px-0", children: t.responses.map((d) => {
|
|
4832
|
+
var m, g;
|
|
4833
|
+
return /* @__PURE__ */ $.jsx(
|
|
4834
|
+
io,
|
|
4833
4835
|
{
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4836
|
+
value: d.statusCode,
|
|
4837
|
+
children: /* @__PURE__ */ $.jsx(
|
|
4838
|
+
yr,
|
|
4839
|
+
{
|
|
4840
|
+
schema: (g = (m = d.content) == null ? void 0 : m.find((x) => x.schema)) == null ? void 0 : g.schema
|
|
4841
|
+
}
|
|
4842
|
+
)
|
|
4843
|
+
},
|
|
4844
|
+
d.statusCode
|
|
4845
|
+
);
|
|
4846
|
+
}) })
|
|
4847
|
+
]
|
|
4848
|
+
}
|
|
4849
|
+
)
|
|
4850
|
+
] })
|
|
4851
|
+
]
|
|
4852
|
+
}
|
|
4853
|
+
),
|
|
4854
|
+
Br(!(l != null && l.disableSidecar), () => /* @__PURE__ */ $.jsx(
|
|
4847
4855
|
Is,
|
|
4848
4856
|
{
|
|
4849
|
-
selectedResponse:
|
|
4850
|
-
onSelectResponse:
|
|
4857
|
+
selectedResponse: r,
|
|
4858
|
+
onSelectResponse: o,
|
|
4851
4859
|
operation: t
|
|
4852
4860
|
}
|
|
4853
|
-
)
|
|
4861
|
+
))
|
|
4854
4862
|
]
|
|
4855
4863
|
},
|
|
4856
4864
|
t.operationId
|
|
4857
4865
|
)
|
|
4858
4866
|
] });
|
|
4859
4867
|
};
|
|
4860
|
-
function
|
|
4868
|
+
function Xn(e, n = 160) {
|
|
4861
4869
|
return e ? e.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/!\[.*?\]\(.*?\)/g, "").replace(/[_*`~]/g, "").replace(/^(?:>|\s*#+|-{3,}|\*{3,})/gm, "").replace(/[|>{}[\]]/g, "").replace(/\s+/g, " ").trim().substring(0, n).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : "";
|
|
4862
4870
|
}
|
|
4863
4871
|
const Fs = _e(
|
|
@@ -4974,32 +4982,32 @@ const Fs = _e(
|
|
|
4974
4982
|
}
|
|
4975
4983
|
}
|
|
4976
4984
|
`
|
|
4977
|
-
),
|
|
4985
|
+
), cl = ({
|
|
4978
4986
|
tag: e,
|
|
4979
4987
|
untagged: n
|
|
4980
4988
|
}) => {
|
|
4981
|
-
const { input: t, type: a, versions: l, version: s, options: r } =
|
|
4989
|
+
const { input: t, type: a, versions: l, version: s, options: r } = Ze(), { tag: o } = Ma(), i = De(Bs, {
|
|
4982
4990
|
input: t,
|
|
4983
4991
|
type: a,
|
|
4984
4992
|
tag: e ?? o,
|
|
4985
4993
|
untagged: n
|
|
4986
|
-
}), c =
|
|
4987
|
-
data: { schema:
|
|
4988
|
-
} = c, { selectedServer:
|
|
4989
|
-
if (
|
|
4990
|
-
...
|
|
4994
|
+
}), c = vr(i), {
|
|
4995
|
+
data: { schema: p }
|
|
4996
|
+
} = c, { selectedServer: d } = br(p.servers), m = p.title, g = p.summary, x = p.description, v = za(), u = De(_s, { input: t, type: a });
|
|
4997
|
+
if (Ea({
|
|
4998
|
+
...u,
|
|
4991
4999
|
enabled: typeof window < "u",
|
|
4992
5000
|
notifyOnChangeProps: []
|
|
4993
|
-
}),
|
|
5001
|
+
}), ka(), !p.tag)
|
|
4994
5002
|
return /* @__PURE__ */ $.jsxs("div", { className: "flex flex-col h-full items-center justify-center text-center", children: [
|
|
4995
5003
|
/* @__PURE__ */ $.jsx("div", { className: "text-muted-foreground font-medium", children: "No operations found" }),
|
|
4996
5004
|
/* @__PURE__ */ $.jsx("div", { className: "mt-2 text-sm text-muted-foreground", children: "This API doesn't have any operations defined yet." })
|
|
4997
5005
|
] });
|
|
4998
|
-
const { operations:
|
|
5006
|
+
const { operations: y, next: h, prev: j, description: T } = p.tag, f = T ? Xn(T) : g || (x ? Xn(x) : void 0), O = Object.entries(l).length > 1, b = (r == null ? void 0 : r.showVersionSelect) === "always" || O && (r == null ? void 0 : r.showVersionSelect) !== "hide", R = {
|
|
4999
5007
|
prev: j != null && j.name ? { to: `../${j.slug}`, label: j.name } : void 0,
|
|
5000
|
-
next:
|
|
5001
|
-
to: `../${
|
|
5002
|
-
label:
|
|
5008
|
+
next: h ? {
|
|
5009
|
+
to: `../${h.slug ?? Ga}`,
|
|
5010
|
+
label: h.name ?? "Other endpoints"
|
|
5003
5011
|
} : void 0
|
|
5004
5012
|
};
|
|
5005
5013
|
return /* @__PURE__ */ $.jsxs(
|
|
@@ -5009,15 +5017,15 @@ const Fs = _e(
|
|
|
5009
5017
|
"data-pagefind-filter": "section:openapi",
|
|
5010
5018
|
"data-pagefind-meta": "section:openapi",
|
|
5011
5019
|
children: [
|
|
5012
|
-
/* @__PURE__ */ $.jsxs(
|
|
5013
|
-
/* @__PURE__ */ $.jsx("title", { children: [
|
|
5014
|
-
|
|
5020
|
+
/* @__PURE__ */ $.jsxs(Na, { children: [
|
|
5021
|
+
/* @__PURE__ */ $.jsx("title", { children: [p.tag.name, m].filter(Boolean).join(" - ") }),
|
|
5022
|
+
f && /* @__PURE__ */ $.jsx("meta", { name: "description", content: f })
|
|
5015
5023
|
] }),
|
|
5016
5024
|
/* @__PURE__ */ $.jsxs("div", { className: "mb-8", children: [
|
|
5017
|
-
/* @__PURE__ */ $.jsxs(
|
|
5025
|
+
/* @__PURE__ */ $.jsxs(ta, { className: "w-full", children: [
|
|
5018
5026
|
/* @__PURE__ */ $.jsxs("div", { className: "flex flex-col gap-y-4 sm:flex-row justify-around items-start sm:items-end", children: [
|
|
5019
5027
|
/* @__PURE__ */ $.jsxs("div", { className: "flex flex-col flex-1 gap-2", children: [
|
|
5020
|
-
/* @__PURE__ */ $.jsx(
|
|
5028
|
+
/* @__PURE__ */ $.jsx(Xa, { children: m }),
|
|
5021
5029
|
/* @__PURE__ */ $.jsxs(
|
|
5022
5030
|
Ue,
|
|
5023
5031
|
{
|
|
@@ -5026,8 +5034,8 @@ const Fs = _e(
|
|
|
5026
5034
|
registerSidebarAnchor: !0,
|
|
5027
5035
|
className: "mb-0",
|
|
5028
5036
|
children: [
|
|
5029
|
-
|
|
5030
|
-
b && /* @__PURE__ */ $.jsxs("span", { className: "text-xl text-muted-foreground
|
|
5037
|
+
p.tag.name ?? "Other endpoints",
|
|
5038
|
+
b && /* @__PURE__ */ $.jsxs("span", { className: "text-xl text-muted-foreground ms-1.5", children: [
|
|
5031
5039
|
" ",
|
|
5032
5040
|
"(",
|
|
5033
5041
|
s,
|
|
@@ -5036,32 +5044,32 @@ const Fs = _e(
|
|
|
5036
5044
|
]
|
|
5037
5045
|
}
|
|
5038
5046
|
),
|
|
5039
|
-
/* @__PURE__ */ $.jsx(
|
|
5047
|
+
/* @__PURE__ */ $.jsx(bo, {})
|
|
5040
5048
|
] }),
|
|
5041
5049
|
/* @__PURE__ */ $.jsxs("div", { className: "flex flex-col gap-4 sm:items-end", children: [
|
|
5042
5050
|
b && /* @__PURE__ */ $.jsxs(
|
|
5043
|
-
|
|
5051
|
+
Va,
|
|
5044
5052
|
{
|
|
5045
5053
|
onValueChange: (N) => v(l[N]),
|
|
5046
5054
|
defaultValue: s,
|
|
5047
5055
|
disabled: !O,
|
|
5048
5056
|
children: [
|
|
5049
|
-
/* @__PURE__ */ $.jsx(
|
|
5050
|
-
/* @__PURE__ */ $.jsx(
|
|
5057
|
+
/* @__PURE__ */ $.jsx(Da, { className: "w-[180px]", children: /* @__PURE__ */ $.jsx(Qa, { placeholder: "Select version" }) }),
|
|
5058
|
+
/* @__PURE__ */ $.jsx(Ka, { children: Object.entries(l).map(([N]) => /* @__PURE__ */ $.jsx(Ya, { value: N, children: N }, N)) })
|
|
5051
5059
|
]
|
|
5052
5060
|
}
|
|
5053
5061
|
),
|
|
5054
|
-
|
|
5062
|
+
p.description && /* @__PURE__ */ $.jsxs(pr, { className: "flex items-center gap-1 text-sm font-medium text-muted-foreground group", children: [
|
|
5055
5063
|
/* @__PURE__ */ $.jsx("span", { children: "API information" }),
|
|
5056
5064
|
/* @__PURE__ */ $.jsx(
|
|
5057
|
-
|
|
5065
|
+
Zn,
|
|
5058
5066
|
{
|
|
5059
5067
|
className: "group-data-[state=open]:hidden translate-y-px",
|
|
5060
5068
|
size: 14
|
|
5061
5069
|
}
|
|
5062
5070
|
),
|
|
5063
5071
|
/* @__PURE__ */ $.jsx(
|
|
5064
|
-
|
|
5072
|
+
Ba,
|
|
5065
5073
|
{
|
|
5066
5074
|
className: "group-data-[state=closed]:hidden translate-y-px",
|
|
5067
5075
|
size: 13
|
|
@@ -5070,18 +5078,18 @@ const Fs = _e(
|
|
|
5070
5078
|
] })
|
|
5071
5079
|
] })
|
|
5072
5080
|
] }),
|
|
5073
|
-
|
|
5081
|
+
p.description && /* @__PURE__ */ $.jsx(ra, { className: "CollapsibleContent", children: /* @__PURE__ */ $.jsx(
|
|
5074
5082
|
"div",
|
|
5075
5083
|
{
|
|
5076
5084
|
className: pe(
|
|
5077
|
-
|
|
5085
|
+
dr,
|
|
5078
5086
|
"pt-4 max-w-full prose-img:max-w-prose"
|
|
5079
5087
|
),
|
|
5080
5088
|
children: /* @__PURE__ */ $.jsx(
|
|
5081
|
-
|
|
5089
|
+
Qe,
|
|
5082
5090
|
{
|
|
5083
5091
|
className: "border rounded bg-muted/25 border-border px-2.5 md:px-4",
|
|
5084
|
-
content:
|
|
5092
|
+
content: p.description
|
|
5085
5093
|
}
|
|
5086
5094
|
)
|
|
5087
5095
|
}
|
|
@@ -5091,33 +5099,33 @@ const Fs = _e(
|
|
|
5091
5099
|
"div",
|
|
5092
5100
|
{
|
|
5093
5101
|
className: pe(
|
|
5094
|
-
|
|
5102
|
+
dr,
|
|
5095
5103
|
"my-4 max-w-full prose-img:max-w-prose"
|
|
5096
5104
|
),
|
|
5097
|
-
children: /* @__PURE__ */ $.jsx(
|
|
5105
|
+
children: /* @__PURE__ */ $.jsx(Qe, { content: T })
|
|
5098
5106
|
}
|
|
5099
5107
|
)
|
|
5100
5108
|
] }),
|
|
5101
5109
|
/* @__PURE__ */ $.jsx("hr", {}),
|
|
5102
5110
|
/* @__PURE__ */ $.jsxs("div", { className: "px-6 mt-6 -mx-6 [content-visibility:auto]", children: [
|
|
5103
|
-
|
|
5111
|
+
y.map((N) => /* @__PURE__ */ $.jsxs("div", { children: [
|
|
5104
5112
|
/* @__PURE__ */ $.jsx(
|
|
5105
5113
|
Ls,
|
|
5106
5114
|
{
|
|
5107
|
-
serverUrl:
|
|
5115
|
+
serverUrl: d,
|
|
5108
5116
|
operationFragment: N
|
|
5109
5117
|
}
|
|
5110
5118
|
),
|
|
5111
5119
|
/* @__PURE__ */ $.jsx("hr", { className: "my-10" })
|
|
5112
5120
|
] }, N.slug)),
|
|
5113
|
-
/* @__PURE__ */ $.jsx(
|
|
5121
|
+
/* @__PURE__ */ $.jsx(eo, { className: "mb-4", ...R })
|
|
5114
5122
|
] })
|
|
5115
5123
|
]
|
|
5116
5124
|
}
|
|
5117
5125
|
);
|
|
5118
5126
|
};
|
|
5119
5127
|
export {
|
|
5120
|
-
|
|
5128
|
+
cl as OperationList,
|
|
5121
5129
|
Fs as OperationsFragment
|
|
5122
5130
|
};
|
|
5123
|
-
//# sourceMappingURL=OperationList-
|
|
5131
|
+
//# sourceMappingURL=OperationList-BhJcPgGi.js.map
|