zudoku 0.0.0-z25d5d85c → 0.0.0-z2f55b5ae
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/main.js +1 -1
- package/dist/app/main.js.map +1 -1
- package/dist/config/create-plugin.d.ts +2 -0
- package/dist/config/create-plugin.js +55 -0
- package/dist/config/create-plugin.js.map +1 -0
- package/dist/config/loader.js +2 -2
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +118 -68
- package/dist/config/validators/InputNavigationSchema.js +17 -0
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/NavigationSchema.d.ts +10 -2
- package/dist/config/validators/NavigationSchema.js +7 -0
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +5 -4
- package/dist/config/validators/validate.js +2 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +36 -24
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/components/Bootstrap.js +1 -2
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +2 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/Slot.test.js +1 -1
- package/dist/lib/components/Slot.test.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +7 -1
- package/dist/lib/components/TopNavigation.js +7 -2
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.d.ts +4 -1
- package/dist/lib/components/Zudoku.js +4 -7
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +9 -4
- package/dist/lib/components/context/ZudokuContext.js +4 -2
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuProvider.js +1 -1
- package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
- package/dist/lib/components/context/ZudokuReactContext.d.ts +11 -0
- package/dist/lib/components/context/ZudokuReactContext.js +4 -0
- package/dist/lib/components/context/ZudokuReactContext.js.map +1 -0
- package/dist/lib/components/navigation/Navigation.js +4 -3
- package/dist/lib/components/navigation/Navigation.js.map +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js +8 -0
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
- package/dist/lib/components/navigation/NavigationFilterContext.d.ts +8 -0
- package/dist/lib/components/navigation/NavigationFilterContext.js +12 -0
- package/dist/lib/components/navigation/NavigationFilterContext.js.map +1 -0
- package/dist/lib/components/navigation/NavigationFilterInput.d.ts +3 -0
- package/dist/lib/components/navigation/NavigationFilterInput.js +9 -0
- package/dist/lib/components/navigation/NavigationFilterInput.js.map +1 -0
- package/dist/lib/components/navigation/NavigationItem.js +11 -1
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/utils.d.ts +2 -1
- package/dist/lib/components/navigation/utils.js +22 -1
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +2 -1
- package/dist/lib/core/ZudokuContext.js +3 -1
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/__internal.d.ts +1 -0
- package/dist/lib/core/__internal.js +2 -0
- package/dist/lib/core/__internal.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +5 -1
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/core/transform-config.d.ts +4 -2
- package/dist/lib/core/transform-config.js +33 -13
- package/dist/lib/core/transform-config.js.map +1 -1
- package/dist/lib/core/transform-config.test.d.ts +1 -0
- package/dist/lib/core/transform-config.test.js +83 -0
- package/dist/lib/core/transform-config.test.js.map +1 -0
- package/dist/lib/errors/ErrorAlert.js +1 -2
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/hooks/useEvent.test.js +1 -1
- package/dist/lib/hooks/useEvent.test.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js +3 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js +20 -0
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +7 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/ui/Alert.d.ts +3 -2
- package/dist/lib/ui/Alert.js +9 -5
- package/dist/lib/ui/Alert.js.map +1 -1
- package/dist/lib/ui/InputGroup.d.ts +16 -0
- package/dist/lib/ui/InputGroup.js +65 -0
- package/dist/lib/ui/InputGroup.js.map +1 -0
- package/dist/lib/ui/Secret.js +2 -2
- package/dist/lib/ui/Secret.js.map +1 -1
- package/dist/vite/config.js +5 -2
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/plugin-config.js +16 -4
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-theme.js +2 -1
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/prerender/prerender.js +3 -1
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/prerender/worker.js +3 -1
- package/dist/vite/prerender/worker.js.map +1 -1
- package/lib/{ClaudeLogo-C6q-Xn_l.js → ClaudeLogo-Br8C_vTq.js} +3 -3
- package/lib/{ClaudeLogo-C6q-Xn_l.js.map → ClaudeLogo-Br8C_vTq.js.map} +1 -1
- package/lib/Drawer-Ch7927PF.js.map +1 -1
- package/lib/{HydrationBoundary-CNF2ZV3E.js → HydrationBoundary-CJu4vUlG.js} +6 -6
- package/lib/{HydrationBoundary-CNF2ZV3E.js.map → HydrationBoundary-CJu4vUlG.js.map} +1 -1
- package/lib/{MdxPage-B1G4W1TK.js → MdxPage-C0QFAsgv.js} +6 -6
- package/lib/{MdxPage-B1G4W1TK.js.map → MdxPage-C0QFAsgv.js.map} +1 -1
- package/lib/Mermaid-Chx5BPHn.js +104 -0
- package/lib/Mermaid-Chx5BPHn.js.map +1 -0
- package/lib/{OAuthErrorPage-01Ke086W.js → OAuthErrorPage-CFz_gBFx.js} +11 -10
- package/lib/{OAuthErrorPage-01Ke086W.js.map → OAuthErrorPage-CFz_gBFx.js.map} +1 -1
- package/lib/{OasProvider-oHPiMJZg.js → OasProvider-BnQ1_ehf.js} +3 -3
- package/lib/{OasProvider-oHPiMJZg.js.map → OasProvider-BnQ1_ehf.js.map} +1 -1
- package/lib/OperationList-Bw-3OS_8.js +5907 -0
- package/lib/OperationList-Bw-3OS_8.js.map +1 -0
- package/lib/{RouteGuard-B1lCR0C_.js → RouteGuard-CVs3yvEs.js} +3 -3
- package/lib/{RouteGuard-B1lCR0C_.js.map → RouteGuard-CVs3yvEs.js.map} +1 -1
- package/lib/{SchemaList-DoQFkJgM.js → SchemaList-IehIWcDV.js} +7 -7
- package/lib/{SchemaList-DoQFkJgM.js.map → SchemaList-IehIWcDV.js.map} +1 -1
- package/lib/{SchemaView-D2k6ZJck.js → SchemaView-BZLyoQRI.js} +3 -3
- package/lib/{SchemaView-D2k6ZJck.js.map → SchemaView-BZLyoQRI.js.map} +1 -1
- package/lib/{Secret-BDBqq4p3.js → Secret-DUpgv4V3.js} +92 -72
- package/lib/Secret-DUpgv4V3.js.map +1 -0
- package/lib/{SignUp-8kDBaLbO.js → SignUp-Dug1jAGC.js} +4 -4
- package/lib/{SignUp-8kDBaLbO.js.map → SignUp-Dug1jAGC.js.map} +1 -1
- package/lib/{SyntaxHighlight-hZOFnYl0.js → SyntaxHighlight-BMu0b_hF.js} +8 -8
- package/lib/{SyntaxHighlight-hZOFnYl0.js.map → SyntaxHighlight-BMu0b_hF.js.map} +1 -1
- package/lib/{Toc-qEIii_-W.js → Toc-BiJ2YL0O.js} +2 -2
- package/lib/{Toc-qEIii_-W.js.map → Toc-BiJ2YL0O.js.map} +1 -1
- package/lib/{Zudoku-DUsdmPME.js → Zudoku-iyiXgWFY.js} +2777 -2622
- package/lib/Zudoku-iyiXgWFY.js.map +1 -0
- package/lib/ZudokuContext-CYyb_PB_.js +175 -0
- package/lib/ZudokuContext-CYyb_PB_.js.map +1 -0
- package/lib/ZudokuReactContext-DGJAP1sN.js +222 -0
- package/lib/ZudokuReactContext-DGJAP1sN.js.map +1 -0
- package/lib/chunk-EPOLDU6W-C6C8jAwd.js.map +1 -1
- package/lib/{circular-D9tSKG2c.js → circular-CfBNz-Ot.js} +2 -2
- package/lib/{circular-D9tSKG2c.js.map → circular-CfBNz-Ot.js.map} +1 -1
- package/lib/{createServer-BprC4n85.js → createServer-BtZPTSEO.js} +4 -4
- package/lib/{createServer-BprC4n85.js.map → createServer-BtZPTSEO.js.map} +1 -1
- package/lib/{errors-7hgPDs1h.js → errors-B77S9iOc.js} +2 -2
- package/lib/{errors-7hgPDs1h.js.map → errors-B77S9iOc.js.map} +1 -1
- package/lib/{firebase-Dwn-2ju-.js → firebase-C7XKRGLf.js} +25 -24
- package/lib/{firebase-Dwn-2ju-.js.map → firebase-C7XKRGLf.js.map} +1 -1
- package/lib/{hook-ZEd1Es7D.js → hook-Dz_n9SoE.js} +16 -15
- package/lib/{hook-ZEd1Es7D.js.map → hook-Dz_n9SoE.js.map} +1 -1
- package/lib/{index-Dxdhrp-I.js → index-BDp2MTiq.js} +2 -2
- package/lib/{index-Dxdhrp-I.js.map → index-BDp2MTiq.js.map} +1 -1
- package/lib/{index-CyIW9rHv.js → index-CQ-p1wyT.js} +642 -606
- package/lib/index-CQ-p1wyT.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/index-DAWHN3cH.js.map +1 -1
- package/lib/index.esm-BYObtETB.js.map +1 -1
- package/lib/index.esm-Ca5zvoff.js.map +1 -1
- package/lib/{index.esm-DG4KaDKR.js → index.esm-Cth49JBv.js} +2 -2
- package/lib/index.esm-Cth49JBv.js.map +1 -0
- package/lib/jsx-runtime-BzflLqGi.js.map +1 -1
- package/lib/{mutation-BISOc7OM.js → mutation-B7eFBLZY.js} +2 -2
- package/lib/{mutation-BISOc7OM.js.map → mutation-B7eFBLZY.js.map} +1 -1
- package/lib/ui/Alert.js +32 -20
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/InputGroup.js +155 -0
- package/lib/ui/InputGroup.js.map +1 -0
- package/lib/ui/Secret.js +2 -2
- package/lib/ui/Secret.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +2 -2
- package/lib/useExposedProps-CzTDfXfq.js.map +1 -1
- package/lib/{useMutation-CFMGlAMW.js → useMutation-CErliDZ9.js} +5 -5
- package/lib/{useMutation-CFMGlAMW.js.map → useMutation-CErliDZ9.js.map} +1 -1
- package/lib/{useSuspenseQuery-CSB_rVek.js → useQuery-ht7aWJ3S.js} +432 -446
- package/lib/useQuery-ht7aWJ3S.js.map +1 -0
- package/lib/useSuspenseQuery-DQH4Bmc2.js +18 -0
- package/lib/useSuspenseQuery-DQH4Bmc2.js.map +1 -0
- package/lib/zudoku.__internal.js +1518 -1033
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +6 -5
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +14 -13
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-firebase.js +4 -4
- package/lib/zudoku.auth-openid.js +7 -6
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +4 -4
- package/lib/zudoku.components.js +3 -3
- package/lib/zudoku.hooks.js +3 -3
- package/lib/zudoku.mermaid.js +3 -3
- package/lib/zudoku.plugin-api-catalog.js +28 -27
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +98 -96
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/lib/zudoku.plugin-search-pagefind.js +19 -18
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/lib/zudoku.react-query.js +26 -25
- package/lib/zudoku.react-query.js.map +1 -1
- package/lib/zudoku.router.js.map +1 -1
- package/package.json +15 -9
- package/src/app/defaultTheme.css +4 -0
- package/src/app/main.css +2 -0
- package/src/app/main.tsx +1 -1
- package/src/lib/components/Bootstrap.tsx +1 -4
- package/src/lib/components/MobileTopNavigation.tsx +13 -8
- package/src/lib/components/Slot.test.tsx +1 -1
- package/src/lib/components/TopNavigation.tsx +25 -7
- package/src/lib/components/Zudoku.tsx +18 -14
- package/src/lib/components/context/ZudokuContext.ts +3 -6
- package/src/lib/components/context/ZudokuProvider.tsx +1 -1
- package/src/lib/components/context/ZudokuReactContext.tsx +17 -0
- package/src/lib/components/navigation/Navigation.tsx +4 -3
- package/src/lib/components/navigation/NavigationCategory.tsx +9 -0
- package/src/lib/components/navigation/NavigationFilterContext.tsx +28 -0
- package/src/lib/components/navigation/NavigationFilterInput.tsx +35 -0
- package/src/lib/components/navigation/NavigationItem.tsx +17 -1
- package/src/lib/components/navigation/utils.ts +32 -1
- package/src/lib/core/ZudokuContext.ts +7 -1
- package/src/lib/core/__internal.tsx +2 -0
- package/src/lib/core/plugins.ts +7 -3
- package/src/lib/core/transform-config.test.tsx +99 -0
- package/src/lib/core/transform-config.ts +57 -19
- package/src/lib/errors/ErrorAlert.tsx +1 -6
- package/src/lib/hooks/useEvent.test.tsx +1 -1
- package/src/lib/plugins/openapi/playground/fileUtils.ts +4 -0
- package/src/lib/plugins/openapi/playground/result-panel/AudioPlayer.tsx +50 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +33 -17
- package/src/lib/ui/Alert.tsx +17 -5
- package/src/lib/ui/InputGroup.tsx +168 -0
- package/src/lib/ui/Secret.tsx +2 -2
- package/lib/Mermaid-B1xNo-pf.js +0 -103
- package/lib/Mermaid-B1xNo-pf.js.map +0 -1
- package/lib/OperationList-CZ4OK8Pm.js +0 -5823
- package/lib/OperationList-CZ4OK8Pm.js.map +0 -1
- package/lib/Secret-BDBqq4p3.js.map +0 -1
- package/lib/Separator-BXt1LYnm.js +0 -27
- package/lib/Separator-BXt1LYnm.js.map +0 -1
- package/lib/Zudoku-DUsdmPME.js.map +0 -1
- package/lib/ZudokuContext-BBI06sOx.js +0 -387
- package/lib/ZudokuContext-BBI06sOx.js.map +0 -1
- package/lib/index-CyIW9rHv.js.map +0 -1
- package/lib/index.esm-DG4KaDKR.js.map +0 -1
- package/lib/useSuspenseQuery-CSB_rVek.js.map +0 -1
package/lib/zudoku.__internal.js
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { j as
|
|
3
|
-
import { b as
|
|
4
|
-
import {
|
|
5
|
-
import * as
|
|
6
|
-
import { StrictMode as
|
|
7
|
-
import { n as
|
|
8
|
-
import * as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { c as
|
|
14
|
-
import { a as
|
|
1
|
+
import { a as De, H as Ce } from "./index.esm-Ca5zvoff.js";
|
|
2
|
+
import { j as c } from "./jsx-runtime-BzflLqGi.js";
|
|
3
|
+
import { b as Ot, H as St } from "./HydrationBoundary-CJu4vUlG.js";
|
|
4
|
+
import { L as Ue, g as Pt } from "./useQuery-ht7aWJ3S.js";
|
|
5
|
+
import * as V from "react";
|
|
6
|
+
import { StrictMode as Fe, useEffect as te, useRef as Je, useState as Tt, Suspense as Et, isValidElement as Nt } from "react";
|
|
7
|
+
import { n as It, S as At, a as Le, b3 as Rt, O as Dt, d as Ct, L as Ut, h as Ft, w as Jt } from "./chunk-EPOLDU6W-C6C8jAwd.js";
|
|
8
|
+
import * as Lt from "react-dom";
|
|
9
|
+
import { B as Me, R as Mt } from "./RouteGuard-CVs3yvEs.js";
|
|
10
|
+
import { CircleFadingArrowUpIcon as Bt, LoaderCircleIcon as Vt, ExternalLink as qt, PanelLeftIcon as Wt, UnlinkIcon as Kt } from "lucide-react";
|
|
11
|
+
import { Button as Ht } from "./ui/Button.js";
|
|
12
|
+
import { a as N, A as Gt, s as Yt, P as Qt, N as Xt, d as ge, f as en, g as tn, h as nn, T as Be, H as Ve, D as rn, i as qe } from "./Zudoku-iyiXgWFY.js";
|
|
13
|
+
import { c as S } from "./cn-5-Gd1Dss.js";
|
|
14
|
+
import { a as q, d as on, j as sn } from "./ZudokuContext-CYyb_PB_.js";
|
|
15
15
|
import "./index-DAWHN3cH.js";
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
16
|
+
import "./ZudokuReactContext-DGJAP1sN.js";
|
|
17
|
+
import { D as T, a as an, b as cn } from "./Drawer-Ch7927PF.js";
|
|
18
|
+
import { VisuallyHidden as un } from "@radix-ui/react-visually-hidden";
|
|
19
|
+
import { S as ln } from "./Spinner-CI6bRyZw.js";
|
|
20
|
+
import { C as We } from "./CategoryHeading-DhmodDcq.js";
|
|
21
|
+
import { isTransformConfigPlugin as dn } from "./zudoku.plugins.js";
|
|
20
22
|
/**
|
|
21
23
|
* react-router v7.12.0
|
|
22
24
|
*
|
|
@@ -27,74 +29,81 @@ import { C as Be } from "./CategoryHeading-DhmodDcq.js";
|
|
|
27
29
|
*
|
|
28
30
|
* @license MIT
|
|
29
31
|
*/
|
|
30
|
-
function
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
+
function fn(e) {
|
|
33
|
+
return /* @__PURE__ */ V.createElement(It, { flushSync: Lt.flushSync, ...e });
|
|
32
34
|
}
|
|
33
|
-
const
|
|
35
|
+
const pn = new Ot({
|
|
34
36
|
defaultOptions: {
|
|
35
37
|
queries: {
|
|
36
38
|
staleTime: 1e3 * 60 * 5
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
|
-
}),
|
|
41
|
+
}), hn = ({
|
|
40
42
|
router: e,
|
|
41
43
|
hydrate: t = !1
|
|
42
|
-
}) => /* @__PURE__ */
|
|
44
|
+
}) => /* @__PURE__ */ c.jsx(Fe, { children: /* @__PURE__ */ c.jsx(Ue, { client: pn, children: /* @__PURE__ */ c.jsx(St, { state: t ? window.DATA : void 0, children: /* @__PURE__ */ c.jsx(Me, { value: !1, children: /* @__PURE__ */ c.jsx(De, { children: /* @__PURE__ */ c.jsx(fn, { router: e }) }) }) }) }) }), mn = ({
|
|
43
45
|
router: e,
|
|
44
46
|
context: t,
|
|
45
47
|
queryClient: n,
|
|
46
48
|
helmetContext: r,
|
|
47
49
|
bypassProtection: o = !1
|
|
48
|
-
}) => /* @__PURE__ */
|
|
49
|
-
function
|
|
50
|
-
function r(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
}) => /* @__PURE__ */ c.jsx(Fe, { children: /* @__PURE__ */ c.jsx(Ue, { client: n, children: /* @__PURE__ */ c.jsx(De, { context: r, children: /* @__PURE__ */ c.jsx(Me, { value: o, children: /* @__PURE__ */ c.jsx(At, { router: e, context: t }) }) }) }) });
|
|
51
|
+
function u(e, t, n) {
|
|
52
|
+
function r(a, l) {
|
|
53
|
+
if (a._zod || Object.defineProperty(a, "_zod", {
|
|
54
|
+
value: {
|
|
55
|
+
def: l,
|
|
56
|
+
constr: s,
|
|
57
|
+
traits: /* @__PURE__ */ new Set()
|
|
58
|
+
},
|
|
54
59
|
enumerable: !1
|
|
55
|
-
}),
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
}), a._zod.traits.has(e))
|
|
61
|
+
return;
|
|
62
|
+
a._zod.traits.add(e), t(a, l);
|
|
63
|
+
const d = s.prototype, f = Object.keys(d);
|
|
64
|
+
for (let g = 0; g < f.length; g++) {
|
|
65
|
+
const h = f[g];
|
|
66
|
+
h in a || (a[h] = d[h].bind(a));
|
|
67
|
+
}
|
|
59
68
|
}
|
|
60
69
|
const o = n?.Parent ?? Object;
|
|
61
|
-
class
|
|
70
|
+
class i extends o {
|
|
62
71
|
}
|
|
63
|
-
Object.defineProperty(
|
|
64
|
-
function
|
|
72
|
+
Object.defineProperty(i, "name", { value: e });
|
|
73
|
+
function s(a) {
|
|
65
74
|
var l;
|
|
66
|
-
const d = n?.Parent ? new
|
|
67
|
-
r(d,
|
|
68
|
-
for (const
|
|
69
|
-
|
|
75
|
+
const d = n?.Parent ? new i() : this;
|
|
76
|
+
r(d, a), (l = d._zod).deferred ?? (l.deferred = []);
|
|
77
|
+
for (const f of d._zod.deferred)
|
|
78
|
+
f();
|
|
70
79
|
return d;
|
|
71
80
|
}
|
|
72
|
-
return Object.defineProperty(
|
|
73
|
-
value: (
|
|
74
|
-
}), Object.defineProperty(
|
|
81
|
+
return Object.defineProperty(s, "init", { value: r }), Object.defineProperty(s, Symbol.hasInstance, {
|
|
82
|
+
value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(e)
|
|
83
|
+
}), Object.defineProperty(s, "name", { value: e }), s;
|
|
75
84
|
}
|
|
76
|
-
class
|
|
85
|
+
class F extends Error {
|
|
77
86
|
constructor() {
|
|
78
87
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
79
88
|
}
|
|
80
89
|
}
|
|
81
|
-
class
|
|
90
|
+
class Ke extends Error {
|
|
82
91
|
constructor(t) {
|
|
83
92
|
super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
|
|
84
93
|
}
|
|
85
94
|
}
|
|
86
|
-
const
|
|
87
|
-
function
|
|
88
|
-
return
|
|
95
|
+
const He = {};
|
|
96
|
+
function R(e) {
|
|
97
|
+
return He;
|
|
89
98
|
}
|
|
90
|
-
function
|
|
99
|
+
function Ge(e) {
|
|
91
100
|
const t = Object.values(e).filter((r) => typeof r == "number");
|
|
92
101
|
return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
|
|
93
102
|
}
|
|
94
|
-
function
|
|
103
|
+
function ie(e, t) {
|
|
95
104
|
return typeof t == "bigint" ? t.toString() : t;
|
|
96
105
|
}
|
|
97
|
-
function
|
|
106
|
+
function ue(e) {
|
|
98
107
|
return {
|
|
99
108
|
get value() {
|
|
100
109
|
{
|
|
@@ -104,20 +113,20 @@ function se(e) {
|
|
|
104
113
|
}
|
|
105
114
|
};
|
|
106
115
|
}
|
|
107
|
-
function
|
|
116
|
+
function le(e) {
|
|
108
117
|
return e == null;
|
|
109
118
|
}
|
|
110
|
-
function
|
|
119
|
+
function de(e) {
|
|
111
120
|
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
112
121
|
return e.slice(t, n);
|
|
113
122
|
}
|
|
114
|
-
const
|
|
115
|
-
function
|
|
123
|
+
const _e = Symbol("evaluating");
|
|
124
|
+
function _(e, t, n) {
|
|
116
125
|
let r;
|
|
117
126
|
Object.defineProperty(e, t, {
|
|
118
127
|
get() {
|
|
119
|
-
if (r !==
|
|
120
|
-
return r === void 0 && (r =
|
|
128
|
+
if (r !== _e)
|
|
129
|
+
return r === void 0 && (r = _e, r = n()), r;
|
|
121
130
|
},
|
|
122
131
|
set(o) {
|
|
123
132
|
Object.defineProperty(e, t, {
|
|
@@ -128,7 +137,7 @@ function h(e, t, n) {
|
|
|
128
137
|
configurable: !0
|
|
129
138
|
});
|
|
130
139
|
}
|
|
131
|
-
function
|
|
140
|
+
function C(e, t, n) {
|
|
132
141
|
Object.defineProperty(e, t, {
|
|
133
142
|
value: n,
|
|
134
143
|
writable: !0,
|
|
@@ -136,7 +145,7 @@ function O(e, t, n) {
|
|
|
136
145
|
configurable: !0
|
|
137
146
|
});
|
|
138
147
|
}
|
|
139
|
-
function
|
|
148
|
+
function I(...e) {
|
|
140
149
|
const t = {};
|
|
141
150
|
for (const n of e) {
|
|
142
151
|
const r = Object.getOwnPropertyDescriptors(n);
|
|
@@ -144,15 +153,18 @@ function S(...e) {
|
|
|
144
153
|
}
|
|
145
154
|
return Object.defineProperties({}, t);
|
|
146
155
|
}
|
|
147
|
-
function
|
|
156
|
+
function ve(e) {
|
|
148
157
|
return JSON.stringify(e);
|
|
149
158
|
}
|
|
150
|
-
|
|
159
|
+
function gn(e) {
|
|
160
|
+
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
161
|
+
}
|
|
162
|
+
const Ye = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
151
163
|
};
|
|
152
|
-
function
|
|
164
|
+
function Y(e) {
|
|
153
165
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
154
166
|
}
|
|
155
|
-
const
|
|
167
|
+
const _n = ue(() => {
|
|
156
168
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
157
169
|
return !1;
|
|
158
170
|
try {
|
|
@@ -162,27 +174,27 @@ const tn = se(() => {
|
|
|
162
174
|
return !1;
|
|
163
175
|
}
|
|
164
176
|
});
|
|
165
|
-
function
|
|
166
|
-
if (
|
|
177
|
+
function M(e) {
|
|
178
|
+
if (Y(e) === !1)
|
|
167
179
|
return !1;
|
|
168
180
|
const t = e.constructor;
|
|
169
|
-
if (t === void 0)
|
|
181
|
+
if (t === void 0 || typeof t != "function")
|
|
170
182
|
return !0;
|
|
171
183
|
const n = t.prototype;
|
|
172
|
-
return !(
|
|
184
|
+
return !(Y(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
173
185
|
}
|
|
174
|
-
function
|
|
175
|
-
return
|
|
186
|
+
function Qe(e) {
|
|
187
|
+
return M(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
176
188
|
}
|
|
177
|
-
const
|
|
178
|
-
function
|
|
189
|
+
const vn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
190
|
+
function ne(e) {
|
|
179
191
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
180
192
|
}
|
|
181
|
-
function
|
|
193
|
+
function A(e, t, n) {
|
|
182
194
|
const r = new e._zod.constr(t ?? e._zod.def);
|
|
183
195
|
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
184
196
|
}
|
|
185
|
-
function
|
|
197
|
+
function p(e) {
|
|
186
198
|
const t = e;
|
|
187
199
|
if (!t)
|
|
188
200
|
return {};
|
|
@@ -195,72 +207,79 @@ function f(e) {
|
|
|
195
207
|
}
|
|
196
208
|
return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
|
|
197
209
|
}
|
|
198
|
-
function
|
|
210
|
+
function yn(e) {
|
|
199
211
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
200
212
|
}
|
|
201
|
-
function
|
|
202
|
-
const n = e._zod.def, r =
|
|
213
|
+
function wn(e, t) {
|
|
214
|
+
const n = e._zod.def, r = n.checks;
|
|
215
|
+
if (r && r.length > 0)
|
|
216
|
+
throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
217
|
+
const i = I(e._zod.def, {
|
|
203
218
|
get shape() {
|
|
204
|
-
const
|
|
205
|
-
for (const
|
|
206
|
-
if (!(
|
|
207
|
-
throw new Error(`Unrecognized key: "${
|
|
208
|
-
t[
|
|
219
|
+
const s = {};
|
|
220
|
+
for (const a in t) {
|
|
221
|
+
if (!(a in n.shape))
|
|
222
|
+
throw new Error(`Unrecognized key: "${a}"`);
|
|
223
|
+
t[a] && (s[a] = n.shape[a]);
|
|
209
224
|
}
|
|
210
|
-
return
|
|
225
|
+
return C(this, "shape", s), s;
|
|
211
226
|
},
|
|
212
227
|
checks: []
|
|
213
228
|
});
|
|
214
|
-
return
|
|
229
|
+
return A(e, i);
|
|
215
230
|
}
|
|
216
|
-
function
|
|
217
|
-
const n = e._zod.def, r =
|
|
231
|
+
function zn(e, t) {
|
|
232
|
+
const n = e._zod.def, r = n.checks;
|
|
233
|
+
if (r && r.length > 0)
|
|
234
|
+
throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
235
|
+
const i = I(e._zod.def, {
|
|
218
236
|
get shape() {
|
|
219
|
-
const
|
|
220
|
-
for (const
|
|
221
|
-
if (!(
|
|
222
|
-
throw new Error(`Unrecognized key: "${
|
|
223
|
-
t[
|
|
237
|
+
const s = { ...e._zod.def.shape };
|
|
238
|
+
for (const a in t) {
|
|
239
|
+
if (!(a in n.shape))
|
|
240
|
+
throw new Error(`Unrecognized key: "${a}"`);
|
|
241
|
+
t[a] && delete s[a];
|
|
224
242
|
}
|
|
225
|
-
return
|
|
243
|
+
return C(this, "shape", s), s;
|
|
226
244
|
},
|
|
227
245
|
checks: []
|
|
228
246
|
});
|
|
229
|
-
return
|
|
247
|
+
return A(e, i);
|
|
230
248
|
}
|
|
231
|
-
function
|
|
232
|
-
if (!
|
|
249
|
+
function bn(e, t) {
|
|
250
|
+
if (!M(t))
|
|
233
251
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
234
252
|
const n = e._zod.def.checks;
|
|
235
|
-
if (n && n.length > 0)
|
|
236
|
-
|
|
237
|
-
|
|
253
|
+
if (n && n.length > 0) {
|
|
254
|
+
const i = e._zod.def.shape;
|
|
255
|
+
for (const s in t)
|
|
256
|
+
if (Object.getOwnPropertyDescriptor(i, s) !== void 0)
|
|
257
|
+
throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
258
|
+
}
|
|
259
|
+
const o = I(e._zod.def, {
|
|
238
260
|
get shape() {
|
|
239
|
-
const
|
|
240
|
-
return
|
|
241
|
-
}
|
|
242
|
-
checks: []
|
|
261
|
+
const i = { ...e._zod.def.shape, ...t };
|
|
262
|
+
return C(this, "shape", i), i;
|
|
263
|
+
}
|
|
243
264
|
});
|
|
244
|
-
return
|
|
265
|
+
return A(e, o);
|
|
245
266
|
}
|
|
246
|
-
function
|
|
247
|
-
if (!
|
|
267
|
+
function kn(e, t) {
|
|
268
|
+
if (!M(t))
|
|
248
269
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
249
|
-
const n = {
|
|
250
|
-
...e._zod.def,
|
|
270
|
+
const n = I(e._zod.def, {
|
|
251
271
|
get shape() {
|
|
252
272
|
const r = { ...e._zod.def.shape, ...t };
|
|
253
|
-
return
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
return T(e, n);
|
|
273
|
+
return C(this, "shape", r), r;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
return A(e, n);
|
|
258
277
|
}
|
|
259
|
-
function
|
|
260
|
-
const n =
|
|
278
|
+
function $n(e, t) {
|
|
279
|
+
const n = I(e._zod.def, {
|
|
261
280
|
get shape() {
|
|
262
281
|
const r = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
263
|
-
return
|
|
282
|
+
return C(this, "shape", r), r;
|
|
264
283
|
},
|
|
265
284
|
get catchall() {
|
|
266
285
|
return t._zod.def.catchall;
|
|
@@ -268,59 +287,61 @@ function un(e, t) {
|
|
|
268
287
|
checks: []
|
|
269
288
|
// delete existing checks
|
|
270
289
|
});
|
|
271
|
-
return
|
|
290
|
+
return A(e, n);
|
|
272
291
|
}
|
|
273
|
-
function
|
|
274
|
-
const
|
|
292
|
+
function jn(e, t, n) {
|
|
293
|
+
const o = t._zod.def.checks;
|
|
294
|
+
if (o && o.length > 0)
|
|
295
|
+
throw new Error(".partial() cannot be used on object schemas containing refinements");
|
|
296
|
+
const s = I(t._zod.def, {
|
|
275
297
|
get shape() {
|
|
276
|
-
const
|
|
298
|
+
const a = t._zod.def.shape, l = { ...a };
|
|
277
299
|
if (n)
|
|
278
|
-
for (const
|
|
279
|
-
if (!(
|
|
280
|
-
throw new Error(`Unrecognized key: "${
|
|
281
|
-
n[
|
|
300
|
+
for (const d in n) {
|
|
301
|
+
if (!(d in a))
|
|
302
|
+
throw new Error(`Unrecognized key: "${d}"`);
|
|
303
|
+
n[d] && (l[d] = e ? new e({
|
|
282
304
|
type: "optional",
|
|
283
|
-
innerType:
|
|
284
|
-
}) :
|
|
305
|
+
innerType: a[d]
|
|
306
|
+
}) : a[d]);
|
|
285
307
|
}
|
|
286
308
|
else
|
|
287
|
-
for (const
|
|
288
|
-
|
|
309
|
+
for (const d in a)
|
|
310
|
+
l[d] = e ? new e({
|
|
289
311
|
type: "optional",
|
|
290
|
-
innerType:
|
|
291
|
-
}) :
|
|
292
|
-
return
|
|
312
|
+
innerType: a[d]
|
|
313
|
+
}) : a[d];
|
|
314
|
+
return C(this, "shape", l), l;
|
|
293
315
|
},
|
|
294
316
|
checks: []
|
|
295
317
|
});
|
|
296
|
-
return
|
|
318
|
+
return A(t, s);
|
|
297
319
|
}
|
|
298
|
-
function
|
|
299
|
-
const r =
|
|
320
|
+
function xn(e, t, n) {
|
|
321
|
+
const r = I(t._zod.def, {
|
|
300
322
|
get shape() {
|
|
301
|
-
const o = t._zod.def.shape,
|
|
323
|
+
const o = t._zod.def.shape, i = { ...o };
|
|
302
324
|
if (n)
|
|
303
|
-
for (const
|
|
304
|
-
if (!(
|
|
305
|
-
throw new Error(`Unrecognized key: "${
|
|
306
|
-
n[
|
|
325
|
+
for (const s in n) {
|
|
326
|
+
if (!(s in i))
|
|
327
|
+
throw new Error(`Unrecognized key: "${s}"`);
|
|
328
|
+
n[s] && (i[s] = new e({
|
|
307
329
|
type: "nonoptional",
|
|
308
|
-
innerType: o[
|
|
330
|
+
innerType: o[s]
|
|
309
331
|
}));
|
|
310
332
|
}
|
|
311
333
|
else
|
|
312
|
-
for (const
|
|
313
|
-
s
|
|
334
|
+
for (const s in o)
|
|
335
|
+
i[s] = new e({
|
|
314
336
|
type: "nonoptional",
|
|
315
|
-
innerType: o[
|
|
337
|
+
innerType: o[s]
|
|
316
338
|
});
|
|
317
|
-
return
|
|
318
|
-
}
|
|
319
|
-
checks: []
|
|
339
|
+
return C(this, "shape", i), i;
|
|
340
|
+
}
|
|
320
341
|
});
|
|
321
|
-
return
|
|
342
|
+
return A(t, r);
|
|
322
343
|
}
|
|
323
|
-
function
|
|
344
|
+
function U(e, t = 0) {
|
|
324
345
|
if (e.aborted === !0)
|
|
325
346
|
return !0;
|
|
326
347
|
for (let n = t; n < e.issues.length; n++)
|
|
@@ -328,27 +349,27 @@ function N(e, t = 0) {
|
|
|
328
349
|
return !0;
|
|
329
350
|
return !1;
|
|
330
351
|
}
|
|
331
|
-
function
|
|
352
|
+
function Xe(e, t) {
|
|
332
353
|
return t.map((n) => {
|
|
333
354
|
var r;
|
|
334
355
|
return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
|
|
335
356
|
});
|
|
336
357
|
}
|
|
337
|
-
function
|
|
358
|
+
function K(e) {
|
|
338
359
|
return typeof e == "string" ? e : e?.message;
|
|
339
360
|
}
|
|
340
|
-
function
|
|
361
|
+
function D(e, t, n) {
|
|
341
362
|
const r = { ...e, path: e.path ?? [] };
|
|
342
363
|
if (!e.message) {
|
|
343
|
-
const o =
|
|
364
|
+
const o = K(e.inst?._zod.def?.error?.(e)) ?? K(t?.error?.(e)) ?? K(n.customError?.(e)) ?? K(n.localeError?.(e)) ?? "Invalid input";
|
|
344
365
|
r.message = o;
|
|
345
366
|
}
|
|
346
367
|
return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
|
|
347
368
|
}
|
|
348
|
-
function
|
|
369
|
+
function fe(e) {
|
|
349
370
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
350
371
|
}
|
|
351
|
-
function
|
|
372
|
+
function B(...e) {
|
|
352
373
|
const [t, n, r] = e;
|
|
353
374
|
return typeof t == "string" ? {
|
|
354
375
|
message: t,
|
|
@@ -357,118 +378,118 @@ function U(...e) {
|
|
|
357
378
|
inst: r
|
|
358
379
|
} : { ...t };
|
|
359
380
|
}
|
|
360
|
-
const
|
|
381
|
+
const et = (e, t) => {
|
|
361
382
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
362
383
|
value: e._zod,
|
|
363
384
|
enumerable: !1
|
|
364
385
|
}), Object.defineProperty(e, "issues", {
|
|
365
386
|
value: t,
|
|
366
387
|
enumerable: !1
|
|
367
|
-
}), e.message = JSON.stringify(t,
|
|
388
|
+
}), e.message = JSON.stringify(t, ie, 2), Object.defineProperty(e, "toString", {
|
|
368
389
|
value: () => e.message,
|
|
369
390
|
enumerable: !1
|
|
370
391
|
});
|
|
371
|
-
},
|
|
372
|
-
function
|
|
392
|
+
}, tt = u("$ZodError", et), nt = u("$ZodError", et, { Parent: Error });
|
|
393
|
+
function Zn(e, t = (n) => n.message) {
|
|
373
394
|
const n = {}, r = [];
|
|
374
395
|
for (const o of e.issues)
|
|
375
396
|
o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
|
|
376
397
|
return { formErrors: r, fieldErrors: n };
|
|
377
398
|
}
|
|
378
|
-
function
|
|
399
|
+
function On(e, t = (n) => n.message) {
|
|
379
400
|
const n = { _errors: [] }, r = (o) => {
|
|
380
|
-
for (const
|
|
381
|
-
if (
|
|
382
|
-
|
|
383
|
-
else if (
|
|
384
|
-
r({ issues:
|
|
385
|
-
else if (
|
|
386
|
-
r({ issues:
|
|
387
|
-
else if (
|
|
388
|
-
n._errors.push(t(
|
|
401
|
+
for (const i of o.issues)
|
|
402
|
+
if (i.code === "invalid_union" && i.errors.length)
|
|
403
|
+
i.errors.map((s) => r({ issues: s }));
|
|
404
|
+
else if (i.code === "invalid_key")
|
|
405
|
+
r({ issues: i.issues });
|
|
406
|
+
else if (i.code === "invalid_element")
|
|
407
|
+
r({ issues: i.issues });
|
|
408
|
+
else if (i.path.length === 0)
|
|
409
|
+
n._errors.push(t(i));
|
|
389
410
|
else {
|
|
390
|
-
let
|
|
391
|
-
for (;
|
|
392
|
-
const l =
|
|
393
|
-
|
|
411
|
+
let s = n, a = 0;
|
|
412
|
+
for (; a < i.path.length; ) {
|
|
413
|
+
const l = i.path[a];
|
|
414
|
+
a === i.path.length - 1 ? (s[l] = s[l] || { _errors: [] }, s[l]._errors.push(t(i))) : s[l] = s[l] || { _errors: [] }, s = s[l], a++;
|
|
394
415
|
}
|
|
395
416
|
}
|
|
396
417
|
};
|
|
397
418
|
return r(e), n;
|
|
398
419
|
}
|
|
399
|
-
const
|
|
400
|
-
const
|
|
401
|
-
if (
|
|
402
|
-
throw new
|
|
403
|
-
if (
|
|
404
|
-
const
|
|
405
|
-
throw
|
|
420
|
+
const pe = (e) => (t, n, r, o) => {
|
|
421
|
+
const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, i);
|
|
422
|
+
if (s instanceof Promise)
|
|
423
|
+
throw new F();
|
|
424
|
+
if (s.issues.length) {
|
|
425
|
+
const a = new (o?.Err ?? e)(s.issues.map((l) => D(l, i, R())));
|
|
426
|
+
throw Ye(a, o?.callee), a;
|
|
406
427
|
}
|
|
407
|
-
return
|
|
408
|
-
},
|
|
409
|
-
const
|
|
410
|
-
let
|
|
411
|
-
if (
|
|
412
|
-
const
|
|
413
|
-
throw
|
|
428
|
+
return s.value;
|
|
429
|
+
}, he = (e) => async (t, n, r, o) => {
|
|
430
|
+
const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
431
|
+
let s = t._zod.run({ value: n, issues: [] }, i);
|
|
432
|
+
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
433
|
+
const a = new (o?.Err ?? e)(s.issues.map((l) => D(l, i, R())));
|
|
434
|
+
throw Ye(a, o?.callee), a;
|
|
414
435
|
}
|
|
415
|
-
return
|
|
416
|
-
},
|
|
417
|
-
const o = r ? { ...r, async: !1 } : { async: !1 },
|
|
418
|
-
if (
|
|
419
|
-
throw new
|
|
420
|
-
return
|
|
436
|
+
return s.value;
|
|
437
|
+
}, re = (e) => (t, n, r) => {
|
|
438
|
+
const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
|
|
439
|
+
if (i instanceof Promise)
|
|
440
|
+
throw new F();
|
|
441
|
+
return i.issues.length ? {
|
|
421
442
|
success: !1,
|
|
422
|
-
error: new (e ??
|
|
423
|
-
} : { success: !0, data:
|
|
424
|
-
},
|
|
443
|
+
error: new (e ?? tt)(i.issues.map((s) => D(s, o, R())))
|
|
444
|
+
} : { success: !0, data: i.value };
|
|
445
|
+
}, Sn = /* @__PURE__ */ re(nt), oe = (e) => async (t, n, r) => {
|
|
425
446
|
const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
426
|
-
let
|
|
427
|
-
return
|
|
447
|
+
let i = t._zod.run({ value: n, issues: [] }, o);
|
|
448
|
+
return i instanceof Promise && (i = await i), i.issues.length ? {
|
|
428
449
|
success: !1,
|
|
429
|
-
error: new e(
|
|
430
|
-
} : { success: !0, data:
|
|
431
|
-
},
|
|
450
|
+
error: new e(i.issues.map((s) => D(s, o, R())))
|
|
451
|
+
} : { success: !0, data: i.value };
|
|
452
|
+
}, Pn = /* @__PURE__ */ oe(nt), Tn = (e) => (t, n, r) => {
|
|
432
453
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
433
|
-
return
|
|
434
|
-
},
|
|
454
|
+
return pe(e)(t, n, o);
|
|
455
|
+
}, En = (e) => (t, n, r) => pe(e)(t, n, r), Nn = (e) => async (t, n, r) => {
|
|
435
456
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
436
|
-
return
|
|
437
|
-
},
|
|
457
|
+
return he(e)(t, n, o);
|
|
458
|
+
}, In = (e) => async (t, n, r) => he(e)(t, n, r), An = (e) => (t, n, r) => {
|
|
438
459
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
439
|
-
return
|
|
440
|
-
},
|
|
460
|
+
return re(e)(t, n, o);
|
|
461
|
+
}, Rn = (e) => (t, n, r) => re(e)(t, n, r), Dn = (e) => async (t, n, r) => {
|
|
441
462
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
442
|
-
return
|
|
443
|
-
},
|
|
444
|
-
function
|
|
445
|
-
return new RegExp(
|
|
463
|
+
return oe(e)(t, n, o);
|
|
464
|
+
}, Cn = (e) => async (t, n, r) => oe(e)(t, n, r), Un = /^[cC][^\s-]{8,}$/, Fn = /^[0-9a-z]+$/, Jn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Ln = /^[0-9a-vA-V]{20}$/, Mn = /^[A-Za-z0-9]{27}$/, Bn = /^[a-zA-Z0-9_-]{21}$/, Vn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, qn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, ye = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Wn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Kn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
465
|
+
function Hn() {
|
|
466
|
+
return new RegExp(Kn, "u");
|
|
446
467
|
}
|
|
447
|
-
const
|
|
448
|
-
function
|
|
468
|
+
const Gn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Yn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, Qn = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Xn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, er = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, rt = /^[A-Za-z0-9_-]*$/, tr = /^\+[1-9]\d{6,14}$/, ot = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", nr = /* @__PURE__ */ new RegExp(`^${ot}$`);
|
|
469
|
+
function st(e) {
|
|
449
470
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
450
471
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
451
472
|
}
|
|
452
|
-
function
|
|
453
|
-
return new RegExp(`^${
|
|
473
|
+
function rr(e) {
|
|
474
|
+
return new RegExp(`^${st(e)}$`);
|
|
454
475
|
}
|
|
455
|
-
function
|
|
456
|
-
const t =
|
|
476
|
+
function or(e) {
|
|
477
|
+
const t = st({ precision: e.precision }), n = ["Z"];
|
|
457
478
|
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
458
479
|
const r = `${t}(?:${n.join("|")})`;
|
|
459
|
-
return new RegExp(`^${
|
|
480
|
+
return new RegExp(`^${ot}T(?:${r})$`);
|
|
460
481
|
}
|
|
461
|
-
const
|
|
482
|
+
const sr = (e) => {
|
|
462
483
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
463
484
|
return new RegExp(`^${t}$`);
|
|
464
|
-
},
|
|
485
|
+
}, ir = /^[^A-Z]*$/, ar = /^[^a-z]*$/, E = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
|
|
465
486
|
var n;
|
|
466
487
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
467
|
-
}),
|
|
488
|
+
}), cr = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
|
|
468
489
|
var n;
|
|
469
|
-
|
|
490
|
+
E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
470
491
|
const o = r.value;
|
|
471
|
-
return !
|
|
492
|
+
return !le(o) && o.length !== void 0;
|
|
472
493
|
}), e._zod.onattach.push((r) => {
|
|
473
494
|
const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
474
495
|
t.maximum < o && (r._zod.bag.maximum = t.maximum);
|
|
@@ -476,9 +497,9 @@ const qn = (e) => {
|
|
|
476
497
|
const o = r.value;
|
|
477
498
|
if (o.length <= t.maximum)
|
|
478
499
|
return;
|
|
479
|
-
const
|
|
500
|
+
const s = fe(o);
|
|
480
501
|
r.issues.push({
|
|
481
|
-
origin:
|
|
502
|
+
origin: s,
|
|
482
503
|
code: "too_big",
|
|
483
504
|
maximum: t.maximum,
|
|
484
505
|
inclusive: !0,
|
|
@@ -487,11 +508,11 @@ const qn = (e) => {
|
|
|
487
508
|
continue: !t.abort
|
|
488
509
|
});
|
|
489
510
|
};
|
|
490
|
-
}),
|
|
511
|
+
}), ur = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
|
|
491
512
|
var n;
|
|
492
|
-
|
|
513
|
+
E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
493
514
|
const o = r.value;
|
|
494
|
-
return !
|
|
515
|
+
return !le(o) && o.length !== void 0;
|
|
495
516
|
}), e._zod.onattach.push((r) => {
|
|
496
517
|
const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
497
518
|
t.minimum > o && (r._zod.bag.minimum = t.minimum);
|
|
@@ -499,9 +520,9 @@ const qn = (e) => {
|
|
|
499
520
|
const o = r.value;
|
|
500
521
|
if (o.length >= t.minimum)
|
|
501
522
|
return;
|
|
502
|
-
const
|
|
523
|
+
const s = fe(o);
|
|
503
524
|
r.issues.push({
|
|
504
|
-
origin:
|
|
525
|
+
origin: s,
|
|
505
526
|
code: "too_small",
|
|
506
527
|
minimum: t.minimum,
|
|
507
528
|
inclusive: !0,
|
|
@@ -510,22 +531,22 @@ const qn = (e) => {
|
|
|
510
531
|
continue: !t.abort
|
|
511
532
|
});
|
|
512
533
|
};
|
|
513
|
-
}),
|
|
534
|
+
}), lr = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
|
|
514
535
|
var n;
|
|
515
|
-
|
|
536
|
+
E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
516
537
|
const o = r.value;
|
|
517
|
-
return !
|
|
538
|
+
return !le(o) && o.length !== void 0;
|
|
518
539
|
}), e._zod.onattach.push((r) => {
|
|
519
540
|
const o = r._zod.bag;
|
|
520
541
|
o.minimum = t.length, o.maximum = t.length, o.length = t.length;
|
|
521
542
|
}), e._zod.check = (r) => {
|
|
522
|
-
const o = r.value,
|
|
523
|
-
if (
|
|
543
|
+
const o = r.value, i = o.length;
|
|
544
|
+
if (i === t.length)
|
|
524
545
|
return;
|
|
525
|
-
const
|
|
546
|
+
const s = fe(o), a = i > t.length;
|
|
526
547
|
r.issues.push({
|
|
527
|
-
origin:
|
|
528
|
-
...
|
|
548
|
+
origin: s,
|
|
549
|
+
...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
|
|
529
550
|
inclusive: !0,
|
|
530
551
|
exact: !0,
|
|
531
552
|
input: r.value,
|
|
@@ -533,11 +554,11 @@ const qn = (e) => {
|
|
|
533
554
|
continue: !t.abort
|
|
534
555
|
});
|
|
535
556
|
};
|
|
536
|
-
}),
|
|
557
|
+
}), se = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
|
|
537
558
|
var n, r;
|
|
538
|
-
|
|
539
|
-
const
|
|
540
|
-
|
|
559
|
+
E.init(e, t), e._zod.onattach.push((o) => {
|
|
560
|
+
const i = o._zod.bag;
|
|
561
|
+
i.format = t.format, t.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(t.pattern));
|
|
541
562
|
}), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
|
|
542
563
|
t.pattern.lastIndex = 0, !t.pattern.test(o.value) && o.issues.push({
|
|
543
564
|
origin: "string",
|
|
@@ -550,8 +571,8 @@ const qn = (e) => {
|
|
|
550
571
|
});
|
|
551
572
|
}) : (r = e._zod).check ?? (r.check = () => {
|
|
552
573
|
});
|
|
553
|
-
}),
|
|
554
|
-
|
|
574
|
+
}), dr = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
|
|
575
|
+
se.init(e, t), e._zod.check = (n) => {
|
|
555
576
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
556
577
|
origin: "string",
|
|
557
578
|
code: "invalid_format",
|
|
@@ -562,16 +583,16 @@ const qn = (e) => {
|
|
|
562
583
|
continue: !t.abort
|
|
563
584
|
});
|
|
564
585
|
};
|
|
565
|
-
}),
|
|
566
|
-
t.pattern ?? (t.pattern =
|
|
567
|
-
}),
|
|
568
|
-
t.pattern ?? (t.pattern =
|
|
569
|
-
}),
|
|
570
|
-
|
|
571
|
-
const n =
|
|
586
|
+
}), fr = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
|
|
587
|
+
t.pattern ?? (t.pattern = ir), se.init(e, t);
|
|
588
|
+
}), pr = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
|
|
589
|
+
t.pattern ?? (t.pattern = ar), se.init(e, t);
|
|
590
|
+
}), hr = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
|
|
591
|
+
E.init(e, t);
|
|
592
|
+
const n = ne(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
572
593
|
t.pattern = r, e._zod.onattach.push((o) => {
|
|
573
|
-
const
|
|
574
|
-
|
|
594
|
+
const i = o._zod.bag;
|
|
595
|
+
i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
|
|
575
596
|
}), e._zod.check = (o) => {
|
|
576
597
|
o.value.includes(t.includes, t.position) || o.issues.push({
|
|
577
598
|
origin: "string",
|
|
@@ -583,9 +604,9 @@ const qn = (e) => {
|
|
|
583
604
|
continue: !t.abort
|
|
584
605
|
});
|
|
585
606
|
};
|
|
586
|
-
}),
|
|
587
|
-
|
|
588
|
-
const n = new RegExp(`^${
|
|
607
|
+
}), mr = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
|
|
608
|
+
E.init(e, t);
|
|
609
|
+
const n = new RegExp(`^${ne(t.prefix)}.*`);
|
|
589
610
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
590
611
|
const o = r._zod.bag;
|
|
591
612
|
o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
|
|
@@ -600,9 +621,9 @@ const qn = (e) => {
|
|
|
600
621
|
continue: !t.abort
|
|
601
622
|
});
|
|
602
623
|
};
|
|
603
|
-
}),
|
|
604
|
-
|
|
605
|
-
const n = new RegExp(`.*${
|
|
624
|
+
}), gr = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
|
|
625
|
+
E.init(e, t);
|
|
626
|
+
const n = new RegExp(`.*${ne(t.suffix)}$`);
|
|
606
627
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
607
628
|
const o = r._zod.bag;
|
|
608
629
|
o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
|
|
@@ -617,12 +638,12 @@ const qn = (e) => {
|
|
|
617
638
|
continue: !t.abort
|
|
618
639
|
});
|
|
619
640
|
};
|
|
620
|
-
}),
|
|
621
|
-
|
|
641
|
+
}), _r = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
|
|
642
|
+
E.init(e, t), e._zod.check = (n) => {
|
|
622
643
|
n.value = t.tx(n.value);
|
|
623
644
|
};
|
|
624
645
|
});
|
|
625
|
-
class
|
|
646
|
+
class vr {
|
|
626
647
|
constructor(t = []) {
|
|
627
648
|
this.content = [], this.indent = 0, this && (this.args = t);
|
|
628
649
|
}
|
|
@@ -635,96 +656,96 @@ class or {
|
|
|
635
656
|
return;
|
|
636
657
|
}
|
|
637
658
|
const r = t.split(`
|
|
638
|
-
`).filter((
|
|
639
|
-
for (const
|
|
640
|
-
this.content.push(
|
|
659
|
+
`).filter((s) => s), o = Math.min(...r.map((s) => s.length - s.trimStart().length)), i = r.map((s) => s.slice(o)).map((s) => " ".repeat(this.indent * 2) + s);
|
|
660
|
+
for (const s of i)
|
|
661
|
+
this.content.push(s);
|
|
641
662
|
}
|
|
642
663
|
compile() {
|
|
643
|
-
const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((
|
|
664
|
+
const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((i) => ` ${i}`)];
|
|
644
665
|
return new t(...n, o.join(`
|
|
645
666
|
`));
|
|
646
667
|
}
|
|
647
668
|
}
|
|
648
|
-
const
|
|
669
|
+
const yr = {
|
|
649
670
|
major: 4,
|
|
650
|
-
minor:
|
|
651
|
-
patch:
|
|
652
|
-
},
|
|
671
|
+
minor: 3,
|
|
672
|
+
patch: 6
|
|
673
|
+
}, w = /* @__PURE__ */ u("$ZodType", (e, t) => {
|
|
653
674
|
var n;
|
|
654
|
-
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
675
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = yr;
|
|
655
676
|
const r = [...e._zod.def.checks ?? []];
|
|
656
677
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
657
678
|
for (const o of r)
|
|
658
|
-
for (const
|
|
659
|
-
|
|
679
|
+
for (const i of o._zod.onattach)
|
|
680
|
+
i(e);
|
|
660
681
|
if (r.length === 0)
|
|
661
682
|
(n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
|
|
662
683
|
e._zod.run = e._zod.parse;
|
|
663
684
|
});
|
|
664
685
|
else {
|
|
665
|
-
const o = (
|
|
666
|
-
let d =
|
|
667
|
-
for (const
|
|
668
|
-
if (
|
|
669
|
-
if (!
|
|
686
|
+
const o = (s, a, l) => {
|
|
687
|
+
let d = U(s), f;
|
|
688
|
+
for (const g of a) {
|
|
689
|
+
if (g._zod.def.when) {
|
|
690
|
+
if (!g._zod.def.when(s))
|
|
670
691
|
continue;
|
|
671
692
|
} else if (d)
|
|
672
693
|
continue;
|
|
673
|
-
const
|
|
674
|
-
if (
|
|
675
|
-
throw new
|
|
676
|
-
if (
|
|
677
|
-
|
|
678
|
-
await
|
|
694
|
+
const h = s.issues.length, m = g._zod.check(s);
|
|
695
|
+
if (m instanceof Promise && l?.async === !1)
|
|
696
|
+
throw new F();
|
|
697
|
+
if (f || m instanceof Promise)
|
|
698
|
+
f = (f ?? Promise.resolve()).then(async () => {
|
|
699
|
+
await m, s.issues.length !== h && (d || (d = U(s, h)));
|
|
679
700
|
});
|
|
680
701
|
else {
|
|
681
|
-
if (
|
|
702
|
+
if (s.issues.length === h)
|
|
682
703
|
continue;
|
|
683
|
-
d || (d =
|
|
704
|
+
d || (d = U(s, h));
|
|
684
705
|
}
|
|
685
706
|
}
|
|
686
|
-
return
|
|
687
|
-
},
|
|
688
|
-
if (
|
|
689
|
-
return
|
|
690
|
-
const d = o(
|
|
707
|
+
return f ? f.then(() => s) : s;
|
|
708
|
+
}, i = (s, a, l) => {
|
|
709
|
+
if (U(s))
|
|
710
|
+
return s.aborted = !0, s;
|
|
711
|
+
const d = o(a, r, l);
|
|
691
712
|
if (d instanceof Promise) {
|
|
692
713
|
if (l.async === !1)
|
|
693
|
-
throw new
|
|
694
|
-
return d.then((
|
|
714
|
+
throw new F();
|
|
715
|
+
return d.then((f) => e._zod.parse(f, l));
|
|
695
716
|
}
|
|
696
717
|
return e._zod.parse(d, l);
|
|
697
718
|
};
|
|
698
|
-
e._zod.run = (
|
|
699
|
-
if (
|
|
700
|
-
return e._zod.parse(
|
|
701
|
-
if (
|
|
702
|
-
const d = e._zod.parse({ value:
|
|
703
|
-
return d instanceof Promise ? d.then((
|
|
719
|
+
e._zod.run = (s, a) => {
|
|
720
|
+
if (a.skipChecks)
|
|
721
|
+
return e._zod.parse(s, a);
|
|
722
|
+
if (a.direction === "backward") {
|
|
723
|
+
const d = e._zod.parse({ value: s.value, issues: [] }, { ...a, skipChecks: !0 });
|
|
724
|
+
return d instanceof Promise ? d.then((f) => i(f, s, a)) : i(d, s, a);
|
|
704
725
|
}
|
|
705
|
-
const l = e._zod.parse(
|
|
726
|
+
const l = e._zod.parse(s, a);
|
|
706
727
|
if (l instanceof Promise) {
|
|
707
|
-
if (
|
|
708
|
-
throw new
|
|
709
|
-
return l.then((d) => o(d, r,
|
|
728
|
+
if (a.async === !1)
|
|
729
|
+
throw new F();
|
|
730
|
+
return l.then((d) => o(d, r, a));
|
|
710
731
|
}
|
|
711
|
-
return o(l, r,
|
|
732
|
+
return o(l, r, a);
|
|
712
733
|
};
|
|
713
734
|
}
|
|
714
|
-
e
|
|
735
|
+
_(e, "~standard", () => ({
|
|
715
736
|
validate: (o) => {
|
|
716
737
|
try {
|
|
717
|
-
const
|
|
718
|
-
return
|
|
738
|
+
const i = Sn(e, o);
|
|
739
|
+
return i.success ? { value: i.data } : { issues: i.error?.issues };
|
|
719
740
|
} catch {
|
|
720
|
-
return
|
|
741
|
+
return Pn(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
|
|
721
742
|
}
|
|
722
743
|
},
|
|
723
744
|
vendor: "zod",
|
|
724
745
|
version: 1
|
|
725
|
-
};
|
|
726
|
-
}),
|
|
727
|
-
|
|
746
|
+
}));
|
|
747
|
+
}), me = /* @__PURE__ */ u("$ZodString", (e, t) => {
|
|
748
|
+
w.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? sr(e._zod.bag), e._zod.parse = (n, r) => {
|
|
728
749
|
if (t.coerce)
|
|
729
750
|
try {
|
|
730
751
|
n.value = String(n.value);
|
|
@@ -737,11 +758,11 @@ const sr = {
|
|
|
737
758
|
inst: e
|
|
738
759
|
}), n;
|
|
739
760
|
};
|
|
740
|
-
}),
|
|
741
|
-
|
|
742
|
-
}),
|
|
743
|
-
t.pattern ?? (t.pattern =
|
|
744
|
-
}),
|
|
761
|
+
}), v = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
|
|
762
|
+
se.init(e, t), me.init(e, t);
|
|
763
|
+
}), wr = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
|
|
764
|
+
t.pattern ?? (t.pattern = qn), v.init(e, t);
|
|
765
|
+
}), zr = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
|
|
745
766
|
if (t.version) {
|
|
746
767
|
const r = {
|
|
747
768
|
v1: 1,
|
|
@@ -755,21 +776,21 @@ const sr = {
|
|
|
755
776
|
}[t.version];
|
|
756
777
|
if (r === void 0)
|
|
757
778
|
throw new Error(`Invalid UUID version: "${t.version}"`);
|
|
758
|
-
t.pattern ?? (t.pattern =
|
|
779
|
+
t.pattern ?? (t.pattern = ye(r));
|
|
759
780
|
} else
|
|
760
|
-
t.pattern ?? (t.pattern =
|
|
761
|
-
|
|
762
|
-
}),
|
|
763
|
-
t.pattern ?? (t.pattern =
|
|
764
|
-
}),
|
|
765
|
-
|
|
781
|
+
t.pattern ?? (t.pattern = ye());
|
|
782
|
+
v.init(e, t);
|
|
783
|
+
}), br = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
|
|
784
|
+
t.pattern ?? (t.pattern = Wn), v.init(e, t);
|
|
785
|
+
}), kr = /* @__PURE__ */ u("$ZodURL", (e, t) => {
|
|
786
|
+
v.init(e, t), e._zod.check = (n) => {
|
|
766
787
|
try {
|
|
767
788
|
const r = n.value.trim(), o = new URL(r);
|
|
768
789
|
t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
|
|
769
790
|
code: "invalid_format",
|
|
770
791
|
format: "url",
|
|
771
792
|
note: "Invalid hostname",
|
|
772
|
-
pattern:
|
|
793
|
+
pattern: t.hostname.source,
|
|
773
794
|
input: n.value,
|
|
774
795
|
inst: e,
|
|
775
796
|
continue: !t.abort
|
|
@@ -793,38 +814,32 @@ const sr = {
|
|
|
793
814
|
});
|
|
794
815
|
}
|
|
795
816
|
};
|
|
796
|
-
}),
|
|
797
|
-
t.pattern ?? (t.pattern =
|
|
798
|
-
}),
|
|
799
|
-
t.pattern ?? (t.pattern =
|
|
800
|
-
}),
|
|
801
|
-
t.pattern ?? (t.pattern =
|
|
802
|
-
}),
|
|
803
|
-
t.pattern ?? (t.pattern =
|
|
804
|
-
}),
|
|
805
|
-
t.pattern ?? (t.pattern =
|
|
806
|
-
}),
|
|
807
|
-
t.pattern ?? (t.pattern =
|
|
808
|
-
}),
|
|
809
|
-
t.pattern ?? (t.pattern =
|
|
810
|
-
}),
|
|
811
|
-
t.pattern ?? (t.pattern =
|
|
812
|
-
}),
|
|
813
|
-
t.pattern ?? (t.pattern =
|
|
814
|
-
}),
|
|
815
|
-
t.pattern ?? (t.pattern =
|
|
816
|
-
}),
|
|
817
|
-
t.pattern ?? (t.pattern =
|
|
818
|
-
}),
|
|
819
|
-
t.pattern ?? (t.pattern =
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
});
|
|
823
|
-
}), yr = /* @__PURE__ */ c("$ZodIPv6", (e, t) => {
|
|
824
|
-
t.pattern ?? (t.pattern = Dn), m.init(e, t), e._zod.onattach.push((n) => {
|
|
825
|
-
const r = n._zod.bag;
|
|
826
|
-
r.format = "ipv6";
|
|
827
|
-
}), e._zod.check = (n) => {
|
|
817
|
+
}), $r = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
|
|
818
|
+
t.pattern ?? (t.pattern = Hn()), v.init(e, t);
|
|
819
|
+
}), jr = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
|
|
820
|
+
t.pattern ?? (t.pattern = Bn), v.init(e, t);
|
|
821
|
+
}), xr = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
|
|
822
|
+
t.pattern ?? (t.pattern = Un), v.init(e, t);
|
|
823
|
+
}), Zr = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
|
|
824
|
+
t.pattern ?? (t.pattern = Fn), v.init(e, t);
|
|
825
|
+
}), Or = /* @__PURE__ */ u("$ZodULID", (e, t) => {
|
|
826
|
+
t.pattern ?? (t.pattern = Jn), v.init(e, t);
|
|
827
|
+
}), Sr = /* @__PURE__ */ u("$ZodXID", (e, t) => {
|
|
828
|
+
t.pattern ?? (t.pattern = Ln), v.init(e, t);
|
|
829
|
+
}), Pr = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
|
|
830
|
+
t.pattern ?? (t.pattern = Mn), v.init(e, t);
|
|
831
|
+
}), Tr = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
|
|
832
|
+
t.pattern ?? (t.pattern = or(t)), v.init(e, t);
|
|
833
|
+
}), Er = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
|
|
834
|
+
t.pattern ?? (t.pattern = nr), v.init(e, t);
|
|
835
|
+
}), Nr = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
|
|
836
|
+
t.pattern ?? (t.pattern = rr(t)), v.init(e, t);
|
|
837
|
+
}), Ir = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
|
|
838
|
+
t.pattern ?? (t.pattern = Vn), v.init(e, t);
|
|
839
|
+
}), Ar = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
|
|
840
|
+
t.pattern ?? (t.pattern = Gn), v.init(e, t), e._zod.bag.format = "ipv4";
|
|
841
|
+
}), Rr = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
|
|
842
|
+
t.pattern ?? (t.pattern = Yn), v.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
828
843
|
try {
|
|
829
844
|
new URL(`http://[${n.value}]`);
|
|
830
845
|
} catch {
|
|
@@ -837,21 +852,21 @@ const sr = {
|
|
|
837
852
|
});
|
|
838
853
|
}
|
|
839
854
|
};
|
|
840
|
-
}),
|
|
841
|
-
t.pattern ?? (t.pattern =
|
|
842
|
-
}),
|
|
843
|
-
t.pattern ?? (t.pattern =
|
|
855
|
+
}), Dr = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
|
|
856
|
+
t.pattern ?? (t.pattern = Qn), v.init(e, t);
|
|
857
|
+
}), Cr = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
|
|
858
|
+
t.pattern ?? (t.pattern = Xn), v.init(e, t), e._zod.check = (n) => {
|
|
844
859
|
const r = n.value.split("/");
|
|
845
860
|
try {
|
|
846
861
|
if (r.length !== 2)
|
|
847
862
|
throw new Error();
|
|
848
|
-
const [o,
|
|
849
|
-
if (!
|
|
863
|
+
const [o, i] = r;
|
|
864
|
+
if (!i)
|
|
850
865
|
throw new Error();
|
|
851
|
-
const
|
|
852
|
-
if (`${
|
|
866
|
+
const s = Number(i);
|
|
867
|
+
if (`${s}` !== i)
|
|
853
868
|
throw new Error();
|
|
854
|
-
if (
|
|
869
|
+
if (s < 0 || s > 128)
|
|
855
870
|
throw new Error();
|
|
856
871
|
new URL(`http://[${o}]`);
|
|
857
872
|
} catch {
|
|
@@ -865,7 +880,7 @@ const sr = {
|
|
|
865
880
|
}
|
|
866
881
|
};
|
|
867
882
|
});
|
|
868
|
-
function
|
|
883
|
+
function it(e) {
|
|
869
884
|
if (e === "")
|
|
870
885
|
return !0;
|
|
871
886
|
if (e.length % 4 !== 0)
|
|
@@ -876,11 +891,9 @@ function et(e) {
|
|
|
876
891
|
return !1;
|
|
877
892
|
}
|
|
878
893
|
}
|
|
879
|
-
const
|
|
880
|
-
t.pattern ?? (t.pattern =
|
|
881
|
-
n.
|
|
882
|
-
}), e._zod.check = (n) => {
|
|
883
|
-
et(n.value) || n.issues.push({
|
|
894
|
+
const Ur = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
|
|
895
|
+
t.pattern ?? (t.pattern = er), v.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
896
|
+
it(n.value) || n.issues.push({
|
|
884
897
|
code: "invalid_format",
|
|
885
898
|
format: "base64",
|
|
886
899
|
input: n.value,
|
|
@@ -889,17 +902,15 @@ const Zr = /* @__PURE__ */ c("$ZodBase64", (e, t) => {
|
|
|
889
902
|
});
|
|
890
903
|
};
|
|
891
904
|
});
|
|
892
|
-
function
|
|
893
|
-
if (!
|
|
905
|
+
function Fr(e) {
|
|
906
|
+
if (!rt.test(e))
|
|
894
907
|
return !1;
|
|
895
908
|
const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
896
|
-
return
|
|
909
|
+
return it(n);
|
|
897
910
|
}
|
|
898
|
-
const
|
|
899
|
-
t.pattern ?? (t.pattern =
|
|
900
|
-
n.
|
|
901
|
-
}), e._zod.check = (n) => {
|
|
902
|
-
$r(n.value) || n.issues.push({
|
|
911
|
+
const Jr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
|
|
912
|
+
t.pattern ?? (t.pattern = rt), v.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
913
|
+
Fr(n.value) || n.issues.push({
|
|
903
914
|
code: "invalid_format",
|
|
904
915
|
format: "base64url",
|
|
905
916
|
input: n.value,
|
|
@@ -907,10 +918,10 @@ const jr = /* @__PURE__ */ c("$ZodBase64URL", (e, t) => {
|
|
|
907
918
|
continue: !t.abort
|
|
908
919
|
});
|
|
909
920
|
};
|
|
910
|
-
}),
|
|
911
|
-
t.pattern ?? (t.pattern =
|
|
921
|
+
}), Lr = /* @__PURE__ */ u("$ZodE164", (e, t) => {
|
|
922
|
+
t.pattern ?? (t.pattern = tr), v.init(e, t);
|
|
912
923
|
});
|
|
913
|
-
function
|
|
924
|
+
function Mr(e, t = null) {
|
|
914
925
|
try {
|
|
915
926
|
const n = e.split(".");
|
|
916
927
|
if (n.length !== 3)
|
|
@@ -924,9 +935,9 @@ function Pr(e, t = null) {
|
|
|
924
935
|
return !1;
|
|
925
936
|
}
|
|
926
937
|
}
|
|
927
|
-
const
|
|
928
|
-
|
|
929
|
-
|
|
938
|
+
const Br = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
939
|
+
v.init(e, t), e._zod.check = (n) => {
|
|
940
|
+
Mr(n.value, t.alg) || n.issues.push({
|
|
930
941
|
code: "invalid_format",
|
|
931
942
|
format: "jwt",
|
|
932
943
|
input: n.value,
|
|
@@ -934,21 +945,21 @@ const Tr = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
|
|
|
934
945
|
continue: !t.abort
|
|
935
946
|
});
|
|
936
947
|
};
|
|
937
|
-
}),
|
|
938
|
-
|
|
939
|
-
}),
|
|
940
|
-
|
|
948
|
+
}), Vr = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
|
|
949
|
+
w.init(e, t), e._zod.parse = (n) => n;
|
|
950
|
+
}), qr = /* @__PURE__ */ u("$ZodNever", (e, t) => {
|
|
951
|
+
w.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
|
|
941
952
|
expected: "never",
|
|
942
953
|
code: "invalid_type",
|
|
943
954
|
input: n.value,
|
|
944
955
|
inst: e
|
|
945
956
|
}), n);
|
|
946
957
|
});
|
|
947
|
-
function
|
|
948
|
-
e.issues.length && t.issues.push(...
|
|
958
|
+
function we(e, t, n) {
|
|
959
|
+
e.issues.length && t.issues.push(...Xe(n, e.issues)), t.value[n] = e.value;
|
|
949
960
|
}
|
|
950
|
-
const
|
|
951
|
-
|
|
961
|
+
const Wr = /* @__PURE__ */ u("$ZodArray", (e, t) => {
|
|
962
|
+
w.init(e, t), e._zod.parse = (n, r) => {
|
|
952
963
|
const o = n.value;
|
|
953
964
|
if (!Array.isArray(o))
|
|
954
965
|
return n.issues.push({
|
|
@@ -958,26 +969,31 @@ const Or = /* @__PURE__ */ c("$ZodArray", (e, t) => {
|
|
|
958
969
|
inst: e
|
|
959
970
|
}), n;
|
|
960
971
|
n.value = Array(o.length);
|
|
961
|
-
const
|
|
962
|
-
for (let
|
|
963
|
-
const
|
|
964
|
-
value:
|
|
972
|
+
const i = [];
|
|
973
|
+
for (let s = 0; s < o.length; s++) {
|
|
974
|
+
const a = o[s], l = t.element._zod.run({
|
|
975
|
+
value: a,
|
|
965
976
|
issues: []
|
|
966
977
|
}, r);
|
|
967
|
-
l instanceof Promise ?
|
|
978
|
+
l instanceof Promise ? i.push(l.then((d) => we(d, n, s))) : we(l, n, s);
|
|
968
979
|
}
|
|
969
|
-
return
|
|
980
|
+
return i.length ? Promise.all(i).then(() => n) : n;
|
|
970
981
|
};
|
|
971
982
|
});
|
|
972
|
-
function
|
|
973
|
-
|
|
983
|
+
function Q(e, t, n, r, o) {
|
|
984
|
+
if (e.issues.length) {
|
|
985
|
+
if (o && !(n in r))
|
|
986
|
+
return;
|
|
987
|
+
t.issues.push(...Xe(n, e.issues));
|
|
988
|
+
}
|
|
989
|
+
e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
974
990
|
}
|
|
975
|
-
function
|
|
991
|
+
function at(e) {
|
|
976
992
|
const t = Object.keys(e.shape);
|
|
977
993
|
for (const r of t)
|
|
978
994
|
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
979
995
|
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
980
|
-
const n =
|
|
996
|
+
const n = yn(e.shape);
|
|
981
997
|
return {
|
|
982
998
|
...e,
|
|
983
999
|
keys: t,
|
|
@@ -986,186 +1002,203 @@ function tt(e) {
|
|
|
986
1002
|
optionalKeys: new Set(n)
|
|
987
1003
|
};
|
|
988
1004
|
}
|
|
989
|
-
function
|
|
990
|
-
const
|
|
991
|
-
for (const
|
|
992
|
-
if (
|
|
1005
|
+
function ct(e, t, n, r, o, i) {
|
|
1006
|
+
const s = [], a = o.keySet, l = o.catchall._zod, d = l.def.type, f = l.optout === "optional";
|
|
1007
|
+
for (const g in t) {
|
|
1008
|
+
if (a.has(g))
|
|
993
1009
|
continue;
|
|
994
1010
|
if (d === "never") {
|
|
995
|
-
|
|
1011
|
+
s.push(g);
|
|
996
1012
|
continue;
|
|
997
1013
|
}
|
|
998
|
-
const
|
|
999
|
-
|
|
1014
|
+
const h = l.run({ value: t[g], issues: [] }, r);
|
|
1015
|
+
h instanceof Promise ? e.push(h.then((m) => Q(m, n, g, t, f))) : Q(h, n, g, t, f);
|
|
1000
1016
|
}
|
|
1001
|
-
return
|
|
1017
|
+
return s.length && n.issues.push({
|
|
1002
1018
|
code: "unrecognized_keys",
|
|
1003
|
-
keys:
|
|
1019
|
+
keys: s,
|
|
1004
1020
|
input: t,
|
|
1005
|
-
inst:
|
|
1021
|
+
inst: i
|
|
1006
1022
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1007
1023
|
}
|
|
1008
|
-
const
|
|
1009
|
-
if (
|
|
1010
|
-
const
|
|
1024
|
+
const Kr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
1025
|
+
if (w.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1026
|
+
const a = t.shape;
|
|
1011
1027
|
Object.defineProperty(t, "shape", {
|
|
1012
1028
|
get: () => {
|
|
1013
|
-
const l = { ...
|
|
1029
|
+
const l = { ...a };
|
|
1014
1030
|
return Object.defineProperty(t, "shape", {
|
|
1015
1031
|
value: l
|
|
1016
1032
|
}), l;
|
|
1017
1033
|
}
|
|
1018
1034
|
});
|
|
1019
1035
|
}
|
|
1020
|
-
const r =
|
|
1021
|
-
|
|
1022
|
-
const
|
|
1023
|
-
for (const d in
|
|
1024
|
-
const
|
|
1025
|
-
if (
|
|
1036
|
+
const r = ue(() => at(t));
|
|
1037
|
+
_(e._zod, "propValues", () => {
|
|
1038
|
+
const a = t.shape, l = {};
|
|
1039
|
+
for (const d in a) {
|
|
1040
|
+
const f = a[d]._zod;
|
|
1041
|
+
if (f.values) {
|
|
1026
1042
|
l[d] ?? (l[d] = /* @__PURE__ */ new Set());
|
|
1027
|
-
for (const
|
|
1028
|
-
l[d].add(
|
|
1043
|
+
for (const g of f.values)
|
|
1044
|
+
l[d].add(g);
|
|
1029
1045
|
}
|
|
1030
1046
|
}
|
|
1031
1047
|
return l;
|
|
1032
1048
|
});
|
|
1033
|
-
const o =
|
|
1034
|
-
let
|
|
1035
|
-
e._zod.parse = (
|
|
1036
|
-
|
|
1037
|
-
const d =
|
|
1049
|
+
const o = Y, i = t.catchall;
|
|
1050
|
+
let s;
|
|
1051
|
+
e._zod.parse = (a, l) => {
|
|
1052
|
+
s ?? (s = r.value);
|
|
1053
|
+
const d = a.value;
|
|
1038
1054
|
if (!o(d))
|
|
1039
|
-
return
|
|
1055
|
+
return a.issues.push({
|
|
1040
1056
|
expected: "object",
|
|
1041
1057
|
code: "invalid_type",
|
|
1042
1058
|
input: d,
|
|
1043
1059
|
inst: e
|
|
1044
|
-
}),
|
|
1045
|
-
|
|
1046
|
-
const
|
|
1047
|
-
for (const
|
|
1048
|
-
const
|
|
1049
|
-
|
|
1060
|
+
}), a;
|
|
1061
|
+
a.value = {};
|
|
1062
|
+
const f = [], g = s.shape;
|
|
1063
|
+
for (const h of s.keys) {
|
|
1064
|
+
const m = g[h], $ = m._zod.optout === "optional", b = m._zod.run({ value: d[h], issues: [] }, l);
|
|
1065
|
+
b instanceof Promise ? f.push(b.then((W) => Q(W, a, h, d, $))) : Q(b, a, h, d, $);
|
|
1050
1066
|
}
|
|
1051
|
-
return
|
|
1067
|
+
return i ? ct(f, d, a, l, r.value, e) : f.length ? Promise.all(f).then(() => a) : a;
|
|
1052
1068
|
};
|
|
1053
|
-
}),
|
|
1054
|
-
|
|
1055
|
-
const n = e._zod.parse, r =
|
|
1056
|
-
const
|
|
1057
|
-
const
|
|
1058
|
-
return `shape[${
|
|
1069
|
+
}), Hr = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
|
|
1070
|
+
Kr.init(e, t);
|
|
1071
|
+
const n = e._zod.parse, r = ue(() => at(t)), o = (h) => {
|
|
1072
|
+
const m = new vr(["shape", "payload", "ctx"]), $ = r.value, b = (P) => {
|
|
1073
|
+
const x = ve(P);
|
|
1074
|
+
return `shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`;
|
|
1059
1075
|
};
|
|
1060
|
-
|
|
1061
|
-
const
|
|
1062
|
-
let
|
|
1063
|
-
for (const
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
for (const
|
|
1067
|
-
const
|
|
1068
|
-
|
|
1069
|
-
if (${
|
|
1070
|
-
|
|
1076
|
+
m.write("const input = payload.value;");
|
|
1077
|
+
const W = /* @__PURE__ */ Object.create(null);
|
|
1078
|
+
let jt = 0;
|
|
1079
|
+
for (const P of $.keys)
|
|
1080
|
+
W[P] = `key_${jt++}`;
|
|
1081
|
+
m.write("const newResult = {};");
|
|
1082
|
+
for (const P of $.keys) {
|
|
1083
|
+
const x = W[P], O = ve(P), Zt = h[P]?._zod?.optout === "optional";
|
|
1084
|
+
m.write(`const ${x} = ${b(P)};`), Zt ? m.write(`
|
|
1085
|
+
if (${x}.issues.length) {
|
|
1086
|
+
if (${O} in input) {
|
|
1087
|
+
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
1088
|
+
...iss,
|
|
1089
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
1090
|
+
})));
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
if (${x}.value === undefined) {
|
|
1095
|
+
if (${O} in input) {
|
|
1096
|
+
newResult[${O}] = undefined;
|
|
1097
|
+
}
|
|
1098
|
+
} else {
|
|
1099
|
+
newResult[${O}] = ${x}.value;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
`) : m.write(`
|
|
1103
|
+
if (${x}.issues.length) {
|
|
1104
|
+
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
1071
1105
|
...iss,
|
|
1072
|
-
path: iss.path ? [${
|
|
1106
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
1073
1107
|
})));
|
|
1074
1108
|
}
|
|
1075
1109
|
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
newResult[${R}] = undefined;
|
|
1110
|
+
if (${x}.value === undefined) {
|
|
1111
|
+
if (${O} in input) {
|
|
1112
|
+
newResult[${O}] = undefined;
|
|
1080
1113
|
}
|
|
1081
1114
|
} else {
|
|
1082
|
-
newResult[${
|
|
1115
|
+
newResult[${O}] = ${x}.value;
|
|
1083
1116
|
}
|
|
1084
1117
|
|
|
1085
1118
|
`);
|
|
1086
1119
|
}
|
|
1087
|
-
|
|
1088
|
-
const
|
|
1089
|
-
return (
|
|
1120
|
+
m.write("payload.value = newResult;"), m.write("return payload;");
|
|
1121
|
+
const xt = m.compile();
|
|
1122
|
+
return (P, x) => xt(h, P, x);
|
|
1090
1123
|
};
|
|
1091
|
-
let
|
|
1092
|
-
const
|
|
1093
|
-
let
|
|
1094
|
-
e._zod.parse = (
|
|
1095
|
-
|
|
1096
|
-
const
|
|
1097
|
-
return
|
|
1124
|
+
let i;
|
|
1125
|
+
const s = Y, a = !He.jitless, d = a && _n.value, f = t.catchall;
|
|
1126
|
+
let g;
|
|
1127
|
+
e._zod.parse = (h, m) => {
|
|
1128
|
+
g ?? (g = r.value);
|
|
1129
|
+
const $ = h.value;
|
|
1130
|
+
return s($) ? a && d && m?.async === !1 && m.jitless !== !0 ? (i || (i = o(t.shape)), h = i(h, m), f ? ct([], $, h, m, g, e) : h) : n(h, m) : (h.issues.push({
|
|
1098
1131
|
expected: "object",
|
|
1099
1132
|
code: "invalid_type",
|
|
1100
|
-
input:
|
|
1133
|
+
input: $,
|
|
1101
1134
|
inst: e
|
|
1102
|
-
}),
|
|
1135
|
+
}), h);
|
|
1103
1136
|
};
|
|
1104
1137
|
});
|
|
1105
|
-
function
|
|
1106
|
-
for (const
|
|
1107
|
-
if (
|
|
1108
|
-
return t.value =
|
|
1109
|
-
const o = e.filter((
|
|
1138
|
+
function ze(e, t, n, r) {
|
|
1139
|
+
for (const i of e)
|
|
1140
|
+
if (i.issues.length === 0)
|
|
1141
|
+
return t.value = i.value, t;
|
|
1142
|
+
const o = e.filter((i) => !U(i));
|
|
1110
1143
|
return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
|
|
1111
1144
|
code: "invalid_union",
|
|
1112
1145
|
input: t.value,
|
|
1113
1146
|
inst: n,
|
|
1114
|
-
errors: e.map((
|
|
1147
|
+
errors: e.map((i) => i.issues.map((s) => D(s, r, R())))
|
|
1115
1148
|
}), t);
|
|
1116
1149
|
}
|
|
1117
|
-
const
|
|
1118
|
-
|
|
1150
|
+
const Gr = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
|
|
1151
|
+
w.init(e, t), _(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), _(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), _(e._zod, "values", () => {
|
|
1119
1152
|
if (t.options.every((o) => o._zod.values))
|
|
1120
1153
|
return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
|
|
1121
|
-
}),
|
|
1154
|
+
}), _(e._zod, "pattern", () => {
|
|
1122
1155
|
if (t.options.every((o) => o._zod.pattern)) {
|
|
1123
|
-
const o = t.options.map((
|
|
1124
|
-
return new RegExp(`^(${o.map((
|
|
1156
|
+
const o = t.options.map((i) => i._zod.pattern);
|
|
1157
|
+
return new RegExp(`^(${o.map((i) => de(i.source)).join("|")})$`);
|
|
1125
1158
|
}
|
|
1126
1159
|
});
|
|
1127
1160
|
const n = t.options.length === 1, r = t.options[0]._zod.run;
|
|
1128
|
-
e._zod.parse = (o,
|
|
1161
|
+
e._zod.parse = (o, i) => {
|
|
1129
1162
|
if (n)
|
|
1130
|
-
return r(o,
|
|
1131
|
-
let
|
|
1132
|
-
const
|
|
1163
|
+
return r(o, i);
|
|
1164
|
+
let s = !1;
|
|
1165
|
+
const a = [];
|
|
1133
1166
|
for (const l of t.options) {
|
|
1134
1167
|
const d = l._zod.run({
|
|
1135
1168
|
value: o.value,
|
|
1136
1169
|
issues: []
|
|
1137
|
-
},
|
|
1170
|
+
}, i);
|
|
1138
1171
|
if (d instanceof Promise)
|
|
1139
|
-
|
|
1172
|
+
a.push(d), s = !0;
|
|
1140
1173
|
else {
|
|
1141
1174
|
if (d.issues.length === 0)
|
|
1142
1175
|
return d;
|
|
1143
|
-
|
|
1176
|
+
a.push(d);
|
|
1144
1177
|
}
|
|
1145
1178
|
}
|
|
1146
|
-
return
|
|
1179
|
+
return s ? Promise.all(a).then((l) => ze(l, o, e, i)) : ze(a, o, e, i);
|
|
1147
1180
|
};
|
|
1148
|
-
}),
|
|
1149
|
-
|
|
1150
|
-
const o = n.value,
|
|
1151
|
-
return
|
|
1181
|
+
}), Yr = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
|
|
1182
|
+
w.init(e, t), e._zod.parse = (n, r) => {
|
|
1183
|
+
const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), s = t.right._zod.run({ value: o, issues: [] }, r);
|
|
1184
|
+
return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([l, d]) => be(n, l, d)) : be(n, i, s);
|
|
1152
1185
|
};
|
|
1153
1186
|
});
|
|
1154
|
-
function
|
|
1187
|
+
function ae(e, t) {
|
|
1155
1188
|
if (e === t)
|
|
1156
1189
|
return { valid: !0, data: e };
|
|
1157
1190
|
if (e instanceof Date && t instanceof Date && +e == +t)
|
|
1158
1191
|
return { valid: !0, data: e };
|
|
1159
|
-
if (
|
|
1160
|
-
const n = Object.keys(t), r = Object.keys(e).filter((
|
|
1161
|
-
for (const
|
|
1162
|
-
const
|
|
1163
|
-
if (!
|
|
1192
|
+
if (M(e) && M(t)) {
|
|
1193
|
+
const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
|
|
1194
|
+
for (const i of r) {
|
|
1195
|
+
const s = ae(e[i], t[i]);
|
|
1196
|
+
if (!s.valid)
|
|
1164
1197
|
return {
|
|
1165
1198
|
valid: !1,
|
|
1166
|
-
mergeErrorPath: [
|
|
1199
|
+
mergeErrorPath: [i, ...s.mergeErrorPath]
|
|
1167
1200
|
};
|
|
1168
|
-
o[
|
|
1201
|
+
o[i] = s.data;
|
|
1169
1202
|
}
|
|
1170
1203
|
return { valid: !0, data: o };
|
|
1171
1204
|
}
|
|
@@ -1174,94 +1207,112 @@ function re(e, t) {
|
|
|
1174
1207
|
return { valid: !1, mergeErrorPath: [] };
|
|
1175
1208
|
const n = [];
|
|
1176
1209
|
for (let r = 0; r < e.length; r++) {
|
|
1177
|
-
const o = e[r],
|
|
1178
|
-
if (!
|
|
1210
|
+
const o = e[r], i = t[r], s = ae(o, i);
|
|
1211
|
+
if (!s.valid)
|
|
1179
1212
|
return {
|
|
1180
1213
|
valid: !1,
|
|
1181
|
-
mergeErrorPath: [r, ...
|
|
1214
|
+
mergeErrorPath: [r, ...s.mergeErrorPath]
|
|
1182
1215
|
};
|
|
1183
|
-
n.push(
|
|
1216
|
+
n.push(s.data);
|
|
1184
1217
|
}
|
|
1185
1218
|
return { valid: !0, data: n };
|
|
1186
1219
|
}
|
|
1187
1220
|
return { valid: !1, mergeErrorPath: [] };
|
|
1188
1221
|
}
|
|
1189
|
-
function
|
|
1190
|
-
|
|
1222
|
+
function be(e, t, n) {
|
|
1223
|
+
const r = /* @__PURE__ */ new Map();
|
|
1224
|
+
let o;
|
|
1225
|
+
for (const a of t.issues)
|
|
1226
|
+
if (a.code === "unrecognized_keys") {
|
|
1227
|
+
o ?? (o = a);
|
|
1228
|
+
for (const l of a.keys)
|
|
1229
|
+
r.has(l) || r.set(l, {}), r.get(l).l = !0;
|
|
1230
|
+
} else
|
|
1231
|
+
e.issues.push(a);
|
|
1232
|
+
for (const a of n.issues)
|
|
1233
|
+
if (a.code === "unrecognized_keys")
|
|
1234
|
+
for (const l of a.keys)
|
|
1235
|
+
r.has(l) || r.set(l, {}), r.get(l).r = !0;
|
|
1236
|
+
else
|
|
1237
|
+
e.issues.push(a);
|
|
1238
|
+
const i = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
|
|
1239
|
+
if (i.length && o && e.issues.push({ ...o, keys: i }), U(e))
|
|
1191
1240
|
return e;
|
|
1192
|
-
const
|
|
1193
|
-
if (!
|
|
1194
|
-
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(
|
|
1195
|
-
return e.value =
|
|
1196
|
-
}
|
|
1197
|
-
const
|
|
1198
|
-
|
|
1199
|
-
const n =
|
|
1200
|
-
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) =>
|
|
1201
|
-
const
|
|
1202
|
-
return r.has(
|
|
1241
|
+
const s = ae(t.value, n.value);
|
|
1242
|
+
if (!s.valid)
|
|
1243
|
+
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
|
|
1244
|
+
return e.value = s.data, e;
|
|
1245
|
+
}
|
|
1246
|
+
const Qr = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
|
|
1247
|
+
w.init(e, t);
|
|
1248
|
+
const n = Ge(t.entries), r = new Set(n);
|
|
1249
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => vn.has(typeof o)).map((o) => typeof o == "string" ? ne(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
|
|
1250
|
+
const s = o.value;
|
|
1251
|
+
return r.has(s) || o.issues.push({
|
|
1203
1252
|
code: "invalid_value",
|
|
1204
1253
|
values: n,
|
|
1205
|
-
input:
|
|
1254
|
+
input: s,
|
|
1206
1255
|
inst: e
|
|
1207
1256
|
}), o;
|
|
1208
1257
|
};
|
|
1209
|
-
}),
|
|
1210
|
-
|
|
1258
|
+
}), Xr = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
|
|
1259
|
+
w.init(e, t), e._zod.parse = (n, r) => {
|
|
1211
1260
|
if (r.direction === "backward")
|
|
1212
|
-
throw new
|
|
1261
|
+
throw new Ke(e.constructor.name);
|
|
1213
1262
|
const o = t.transform(n.value, n);
|
|
1214
1263
|
if (r.async)
|
|
1215
|
-
return (o instanceof Promise ? o : Promise.resolve(o)).then((
|
|
1264
|
+
return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (n.value = s, n));
|
|
1216
1265
|
if (o instanceof Promise)
|
|
1217
|
-
throw new
|
|
1266
|
+
throw new F();
|
|
1218
1267
|
return n.value = o, n;
|
|
1219
1268
|
};
|
|
1220
1269
|
});
|
|
1221
|
-
function
|
|
1270
|
+
function ke(e, t) {
|
|
1222
1271
|
return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
|
|
1223
1272
|
}
|
|
1224
|
-
const
|
|
1225
|
-
|
|
1273
|
+
const ut = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
|
|
1274
|
+
w.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), _(e._zod, "pattern", () => {
|
|
1226
1275
|
const n = t.innerType._zod.pattern;
|
|
1227
|
-
return n ? new RegExp(`^(${
|
|
1276
|
+
return n ? new RegExp(`^(${de(n.source)})?$`) : void 0;
|
|
1228
1277
|
}), e._zod.parse = (n, r) => {
|
|
1229
1278
|
if (t.innerType._zod.optin === "optional") {
|
|
1230
1279
|
const o = t.innerType._zod.run(n, r);
|
|
1231
|
-
return o instanceof Promise ? o.then((
|
|
1280
|
+
return o instanceof Promise ? o.then((i) => ke(i, n.value)) : ke(o, n.value);
|
|
1232
1281
|
}
|
|
1233
1282
|
return n.value === void 0 ? n : t.innerType._zod.run(n, r);
|
|
1234
1283
|
};
|
|
1235
|
-
}),
|
|
1236
|
-
|
|
1284
|
+
}), eo = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
|
|
1285
|
+
ut.init(e, t), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
|
|
1286
|
+
}), to = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
|
|
1287
|
+
w.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "pattern", () => {
|
|
1237
1288
|
const n = t.innerType._zod.pattern;
|
|
1238
|
-
return n ? new RegExp(`^(${
|
|
1239
|
-
}),
|
|
1240
|
-
}),
|
|
1241
|
-
|
|
1289
|
+
return n ? new RegExp(`^(${de(n.source)}|null)$`) : void 0;
|
|
1290
|
+
}), _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
|
|
1291
|
+
}), no = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
|
|
1292
|
+
w.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
1242
1293
|
if (r.direction === "backward")
|
|
1243
1294
|
return t.innerType._zod.run(n, r);
|
|
1244
1295
|
if (n.value === void 0)
|
|
1245
1296
|
return n.value = t.defaultValue, n;
|
|
1246
1297
|
const o = t.innerType._zod.run(n, r);
|
|
1247
|
-
return o instanceof Promise ? o.then((
|
|
1298
|
+
return o instanceof Promise ? o.then((i) => $e(i, t)) : $e(o, t);
|
|
1248
1299
|
};
|
|
1249
1300
|
});
|
|
1250
|
-
function
|
|
1301
|
+
function $e(e, t) {
|
|
1251
1302
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1252
1303
|
}
|
|
1253
|
-
const
|
|
1254
|
-
|
|
1255
|
-
}),
|
|
1256
|
-
|
|
1304
|
+
const ro = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
|
|
1305
|
+
w.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
|
|
1306
|
+
}), oo = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
|
|
1307
|
+
w.init(e, t), _(e._zod, "values", () => {
|
|
1257
1308
|
const n = t.innerType._zod.values;
|
|
1258
1309
|
return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
|
|
1259
1310
|
}), e._zod.parse = (n, r) => {
|
|
1260
1311
|
const o = t.innerType._zod.run(n, r);
|
|
1261
|
-
return o instanceof Promise ? o.then((
|
|
1312
|
+
return o instanceof Promise ? o.then((i) => je(i, e)) : je(o, e);
|
|
1262
1313
|
};
|
|
1263
1314
|
});
|
|
1264
|
-
function
|
|
1315
|
+
function je(e, t) {
|
|
1265
1316
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1266
1317
|
code: "invalid_type",
|
|
1267
1318
|
expected: "nonoptional",
|
|
@@ -1269,58 +1320,58 @@ function ye(e, t) {
|
|
|
1269
1320
|
inst: t
|
|
1270
1321
|
}), e;
|
|
1271
1322
|
}
|
|
1272
|
-
const
|
|
1273
|
-
|
|
1323
|
+
const so = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
|
|
1324
|
+
w.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
1274
1325
|
if (r.direction === "backward")
|
|
1275
1326
|
return t.innerType._zod.run(n, r);
|
|
1276
1327
|
const o = t.innerType._zod.run(n, r);
|
|
1277
|
-
return o instanceof Promise ? o.then((
|
|
1328
|
+
return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
|
|
1278
1329
|
...n,
|
|
1279
1330
|
error: {
|
|
1280
|
-
issues:
|
|
1331
|
+
issues: i.issues.map((s) => D(s, r, R()))
|
|
1281
1332
|
},
|
|
1282
1333
|
input: n.value
|
|
1283
1334
|
}), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
|
|
1284
1335
|
...n,
|
|
1285
1336
|
error: {
|
|
1286
|
-
issues: o.issues.map((
|
|
1337
|
+
issues: o.issues.map((i) => D(i, r, R()))
|
|
1287
1338
|
},
|
|
1288
1339
|
input: n.value
|
|
1289
1340
|
}), n.issues = []), n);
|
|
1290
1341
|
};
|
|
1291
|
-
}),
|
|
1292
|
-
|
|
1342
|
+
}), io = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
|
|
1343
|
+
w.init(e, t), _(e._zod, "values", () => t.in._zod.values), _(e._zod, "optin", () => t.in._zod.optin), _(e._zod, "optout", () => t.out._zod.optout), _(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
|
|
1293
1344
|
if (r.direction === "backward") {
|
|
1294
|
-
const
|
|
1295
|
-
return
|
|
1345
|
+
const i = t.out._zod.run(n, r);
|
|
1346
|
+
return i instanceof Promise ? i.then((s) => H(s, t.in, r)) : H(i, t.in, r);
|
|
1296
1347
|
}
|
|
1297
1348
|
const o = t.in._zod.run(n, r);
|
|
1298
|
-
return o instanceof Promise ? o.then((
|
|
1349
|
+
return o instanceof Promise ? o.then((i) => H(i, t.out, r)) : H(o, t.out, r);
|
|
1299
1350
|
};
|
|
1300
1351
|
});
|
|
1301
|
-
function
|
|
1352
|
+
function H(e, t, n) {
|
|
1302
1353
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
|
|
1303
1354
|
}
|
|
1304
|
-
const
|
|
1305
|
-
|
|
1355
|
+
const ao = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
|
|
1356
|
+
w.init(e, t), _(e._zod, "propValues", () => t.innerType._zod.propValues), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "optin", () => t.innerType?._zod?.optin), _(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
|
|
1306
1357
|
if (r.direction === "backward")
|
|
1307
1358
|
return t.innerType._zod.run(n, r);
|
|
1308
1359
|
const o = t.innerType._zod.run(n, r);
|
|
1309
|
-
return o instanceof Promise ? o.then(
|
|
1360
|
+
return o instanceof Promise ? o.then(xe) : xe(o);
|
|
1310
1361
|
};
|
|
1311
1362
|
});
|
|
1312
|
-
function
|
|
1363
|
+
function xe(e) {
|
|
1313
1364
|
return e.value = Object.freeze(e.value), e;
|
|
1314
1365
|
}
|
|
1315
|
-
const
|
|
1316
|
-
|
|
1366
|
+
const co = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
|
|
1367
|
+
E.init(e, t), w.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
1317
1368
|
const r = n.value, o = t.fn(r);
|
|
1318
1369
|
if (o instanceof Promise)
|
|
1319
|
-
return o.then((
|
|
1320
|
-
|
|
1370
|
+
return o.then((i) => Ze(i, n, r, e));
|
|
1371
|
+
Ze(o, n, r, e);
|
|
1321
1372
|
};
|
|
1322
1373
|
});
|
|
1323
|
-
function
|
|
1374
|
+
function Ze(e, t, n, r) {
|
|
1324
1375
|
if (!e) {
|
|
1325
1376
|
const o = {
|
|
1326
1377
|
code: "custom",
|
|
@@ -1332,21 +1383,17 @@ function xe(e, t, n, r) {
|
|
|
1332
1383
|
continue: !r._zod.def.abort
|
|
1333
1384
|
// params: inst._zod.def.params,
|
|
1334
1385
|
};
|
|
1335
|
-
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(
|
|
1386
|
+
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(B(o));
|
|
1336
1387
|
}
|
|
1337
1388
|
}
|
|
1338
|
-
|
|
1389
|
+
var Oe;
|
|
1390
|
+
class uo {
|
|
1339
1391
|
constructor() {
|
|
1340
1392
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
1341
1393
|
}
|
|
1342
1394
|
add(t, ...n) {
|
|
1343
1395
|
const r = n[0];
|
|
1344
|
-
|
|
1345
|
-
if (this._idmap.has(r.id))
|
|
1346
|
-
throw new Error(`ID ${r.id} already exists in the registry`);
|
|
1347
|
-
this._idmap.set(r.id, t);
|
|
1348
|
-
}
|
|
1349
|
-
return this;
|
|
1396
|
+
return this._map.set(t, r), r && typeof r == "object" && "id" in r && this._idmap.set(r.id, t), this;
|
|
1350
1397
|
}
|
|
1351
1398
|
clear() {
|
|
1352
1399
|
return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
|
|
@@ -1369,218 +1416,243 @@ class Kr {
|
|
|
1369
1416
|
return this._map.has(t);
|
|
1370
1417
|
}
|
|
1371
1418
|
}
|
|
1372
|
-
function
|
|
1373
|
-
return new
|
|
1419
|
+
function lo() {
|
|
1420
|
+
return new uo();
|
|
1374
1421
|
}
|
|
1375
|
-
|
|
1376
|
-
|
|
1422
|
+
(Oe = globalThis).__zod_globalRegistry ?? (Oe.__zod_globalRegistry = lo());
|
|
1423
|
+
const L = globalThis.__zod_globalRegistry;
|
|
1424
|
+
// @__NO_SIDE_EFFECTS__
|
|
1425
|
+
function fo(e, t) {
|
|
1377
1426
|
return new e({
|
|
1378
1427
|
type: "string",
|
|
1379
|
-
...
|
|
1428
|
+
...p(t)
|
|
1380
1429
|
});
|
|
1381
1430
|
}
|
|
1382
|
-
|
|
1431
|
+
// @__NO_SIDE_EFFECTS__
|
|
1432
|
+
function po(e, t) {
|
|
1383
1433
|
return new e({
|
|
1384
1434
|
type: "string",
|
|
1385
1435
|
format: "email",
|
|
1386
1436
|
check: "string_format",
|
|
1387
1437
|
abort: !1,
|
|
1388
|
-
...
|
|
1438
|
+
...p(t)
|
|
1389
1439
|
});
|
|
1390
1440
|
}
|
|
1391
|
-
|
|
1441
|
+
// @__NO_SIDE_EFFECTS__
|
|
1442
|
+
function Se(e, t) {
|
|
1392
1443
|
return new e({
|
|
1393
1444
|
type: "string",
|
|
1394
1445
|
format: "guid",
|
|
1395
1446
|
check: "string_format",
|
|
1396
1447
|
abort: !1,
|
|
1397
|
-
...
|
|
1448
|
+
...p(t)
|
|
1398
1449
|
});
|
|
1399
1450
|
}
|
|
1400
|
-
|
|
1451
|
+
// @__NO_SIDE_EFFECTS__
|
|
1452
|
+
function ho(e, t) {
|
|
1401
1453
|
return new e({
|
|
1402
1454
|
type: "string",
|
|
1403
1455
|
format: "uuid",
|
|
1404
1456
|
check: "string_format",
|
|
1405
1457
|
abort: !1,
|
|
1406
|
-
...
|
|
1458
|
+
...p(t)
|
|
1407
1459
|
});
|
|
1408
1460
|
}
|
|
1409
|
-
|
|
1461
|
+
// @__NO_SIDE_EFFECTS__
|
|
1462
|
+
function mo(e, t) {
|
|
1410
1463
|
return new e({
|
|
1411
1464
|
type: "string",
|
|
1412
1465
|
format: "uuid",
|
|
1413
1466
|
check: "string_format",
|
|
1414
1467
|
abort: !1,
|
|
1415
1468
|
version: "v4",
|
|
1416
|
-
...
|
|
1469
|
+
...p(t)
|
|
1417
1470
|
});
|
|
1418
1471
|
}
|
|
1419
|
-
|
|
1472
|
+
// @__NO_SIDE_EFFECTS__
|
|
1473
|
+
function go(e, t) {
|
|
1420
1474
|
return new e({
|
|
1421
1475
|
type: "string",
|
|
1422
1476
|
format: "uuid",
|
|
1423
1477
|
check: "string_format",
|
|
1424
1478
|
abort: !1,
|
|
1425
1479
|
version: "v6",
|
|
1426
|
-
...
|
|
1480
|
+
...p(t)
|
|
1427
1481
|
});
|
|
1428
1482
|
}
|
|
1429
|
-
|
|
1483
|
+
// @__NO_SIDE_EFFECTS__
|
|
1484
|
+
function _o(e, t) {
|
|
1430
1485
|
return new e({
|
|
1431
1486
|
type: "string",
|
|
1432
1487
|
format: "uuid",
|
|
1433
1488
|
check: "string_format",
|
|
1434
1489
|
abort: !1,
|
|
1435
1490
|
version: "v7",
|
|
1436
|
-
...
|
|
1491
|
+
...p(t)
|
|
1437
1492
|
});
|
|
1438
1493
|
}
|
|
1439
|
-
|
|
1494
|
+
// @__NO_SIDE_EFFECTS__
|
|
1495
|
+
function vo(e, t) {
|
|
1440
1496
|
return new e({
|
|
1441
1497
|
type: "string",
|
|
1442
1498
|
format: "url",
|
|
1443
1499
|
check: "string_format",
|
|
1444
1500
|
abort: !1,
|
|
1445
|
-
...
|
|
1501
|
+
...p(t)
|
|
1446
1502
|
});
|
|
1447
1503
|
}
|
|
1448
|
-
|
|
1504
|
+
// @__NO_SIDE_EFFECTS__
|
|
1505
|
+
function yo(e, t) {
|
|
1449
1506
|
return new e({
|
|
1450
1507
|
type: "string",
|
|
1451
1508
|
format: "emoji",
|
|
1452
1509
|
check: "string_format",
|
|
1453
1510
|
abort: !1,
|
|
1454
|
-
...
|
|
1511
|
+
...p(t)
|
|
1455
1512
|
});
|
|
1456
1513
|
}
|
|
1457
|
-
|
|
1514
|
+
// @__NO_SIDE_EFFECTS__
|
|
1515
|
+
function wo(e, t) {
|
|
1458
1516
|
return new e({
|
|
1459
1517
|
type: "string",
|
|
1460
1518
|
format: "nanoid",
|
|
1461
1519
|
check: "string_format",
|
|
1462
1520
|
abort: !1,
|
|
1463
|
-
...
|
|
1521
|
+
...p(t)
|
|
1464
1522
|
});
|
|
1465
1523
|
}
|
|
1466
|
-
|
|
1524
|
+
// @__NO_SIDE_EFFECTS__
|
|
1525
|
+
function zo(e, t) {
|
|
1467
1526
|
return new e({
|
|
1468
1527
|
type: "string",
|
|
1469
1528
|
format: "cuid",
|
|
1470
1529
|
check: "string_format",
|
|
1471
1530
|
abort: !1,
|
|
1472
|
-
...
|
|
1531
|
+
...p(t)
|
|
1473
1532
|
});
|
|
1474
1533
|
}
|
|
1475
|
-
|
|
1534
|
+
// @__NO_SIDE_EFFECTS__
|
|
1535
|
+
function bo(e, t) {
|
|
1476
1536
|
return new e({
|
|
1477
1537
|
type: "string",
|
|
1478
1538
|
format: "cuid2",
|
|
1479
1539
|
check: "string_format",
|
|
1480
1540
|
abort: !1,
|
|
1481
|
-
...
|
|
1541
|
+
...p(t)
|
|
1482
1542
|
});
|
|
1483
1543
|
}
|
|
1484
|
-
|
|
1544
|
+
// @__NO_SIDE_EFFECTS__
|
|
1545
|
+
function ko(e, t) {
|
|
1485
1546
|
return new e({
|
|
1486
1547
|
type: "string",
|
|
1487
1548
|
format: "ulid",
|
|
1488
1549
|
check: "string_format",
|
|
1489
1550
|
abort: !1,
|
|
1490
|
-
...
|
|
1551
|
+
...p(t)
|
|
1491
1552
|
});
|
|
1492
1553
|
}
|
|
1493
|
-
|
|
1554
|
+
// @__NO_SIDE_EFFECTS__
|
|
1555
|
+
function $o(e, t) {
|
|
1494
1556
|
return new e({
|
|
1495
1557
|
type: "string",
|
|
1496
1558
|
format: "xid",
|
|
1497
1559
|
check: "string_format",
|
|
1498
1560
|
abort: !1,
|
|
1499
|
-
...
|
|
1561
|
+
...p(t)
|
|
1500
1562
|
});
|
|
1501
1563
|
}
|
|
1502
|
-
|
|
1564
|
+
// @__NO_SIDE_EFFECTS__
|
|
1565
|
+
function jo(e, t) {
|
|
1503
1566
|
return new e({
|
|
1504
1567
|
type: "string",
|
|
1505
1568
|
format: "ksuid",
|
|
1506
1569
|
check: "string_format",
|
|
1507
1570
|
abort: !1,
|
|
1508
|
-
...
|
|
1571
|
+
...p(t)
|
|
1509
1572
|
});
|
|
1510
1573
|
}
|
|
1511
|
-
|
|
1574
|
+
// @__NO_SIDE_EFFECTS__
|
|
1575
|
+
function xo(e, t) {
|
|
1512
1576
|
return new e({
|
|
1513
1577
|
type: "string",
|
|
1514
1578
|
format: "ipv4",
|
|
1515
1579
|
check: "string_format",
|
|
1516
1580
|
abort: !1,
|
|
1517
|
-
...
|
|
1581
|
+
...p(t)
|
|
1518
1582
|
});
|
|
1519
1583
|
}
|
|
1520
|
-
|
|
1584
|
+
// @__NO_SIDE_EFFECTS__
|
|
1585
|
+
function Zo(e, t) {
|
|
1521
1586
|
return new e({
|
|
1522
1587
|
type: "string",
|
|
1523
1588
|
format: "ipv6",
|
|
1524
1589
|
check: "string_format",
|
|
1525
1590
|
abort: !1,
|
|
1526
|
-
...
|
|
1591
|
+
...p(t)
|
|
1527
1592
|
});
|
|
1528
1593
|
}
|
|
1529
|
-
|
|
1594
|
+
// @__NO_SIDE_EFFECTS__
|
|
1595
|
+
function Oo(e, t) {
|
|
1530
1596
|
return new e({
|
|
1531
1597
|
type: "string",
|
|
1532
1598
|
format: "cidrv4",
|
|
1533
1599
|
check: "string_format",
|
|
1534
1600
|
abort: !1,
|
|
1535
|
-
...
|
|
1601
|
+
...p(t)
|
|
1536
1602
|
});
|
|
1537
1603
|
}
|
|
1538
|
-
|
|
1604
|
+
// @__NO_SIDE_EFFECTS__
|
|
1605
|
+
function So(e, t) {
|
|
1539
1606
|
return new e({
|
|
1540
1607
|
type: "string",
|
|
1541
1608
|
format: "cidrv6",
|
|
1542
1609
|
check: "string_format",
|
|
1543
1610
|
abort: !1,
|
|
1544
|
-
...
|
|
1611
|
+
...p(t)
|
|
1545
1612
|
});
|
|
1546
1613
|
}
|
|
1547
|
-
|
|
1614
|
+
// @__NO_SIDE_EFFECTS__
|
|
1615
|
+
function Po(e, t) {
|
|
1548
1616
|
return new e({
|
|
1549
1617
|
type: "string",
|
|
1550
1618
|
format: "base64",
|
|
1551
1619
|
check: "string_format",
|
|
1552
1620
|
abort: !1,
|
|
1553
|
-
...
|
|
1621
|
+
...p(t)
|
|
1554
1622
|
});
|
|
1555
1623
|
}
|
|
1556
|
-
|
|
1624
|
+
// @__NO_SIDE_EFFECTS__
|
|
1625
|
+
function To(e, t) {
|
|
1557
1626
|
return new e({
|
|
1558
1627
|
type: "string",
|
|
1559
1628
|
format: "base64url",
|
|
1560
1629
|
check: "string_format",
|
|
1561
1630
|
abort: !1,
|
|
1562
|
-
...
|
|
1631
|
+
...p(t)
|
|
1563
1632
|
});
|
|
1564
1633
|
}
|
|
1565
|
-
|
|
1634
|
+
// @__NO_SIDE_EFFECTS__
|
|
1635
|
+
function Eo(e, t) {
|
|
1566
1636
|
return new e({
|
|
1567
1637
|
type: "string",
|
|
1568
1638
|
format: "e164",
|
|
1569
1639
|
check: "string_format",
|
|
1570
1640
|
abort: !1,
|
|
1571
|
-
...
|
|
1641
|
+
...p(t)
|
|
1572
1642
|
});
|
|
1573
1643
|
}
|
|
1574
|
-
|
|
1644
|
+
// @__NO_SIDE_EFFECTS__
|
|
1645
|
+
function No(e, t) {
|
|
1575
1646
|
return new e({
|
|
1576
1647
|
type: "string",
|
|
1577
1648
|
format: "jwt",
|
|
1578
1649
|
check: "string_format",
|
|
1579
1650
|
abort: !1,
|
|
1580
|
-
...
|
|
1651
|
+
...p(t)
|
|
1581
1652
|
});
|
|
1582
1653
|
}
|
|
1583
|
-
|
|
1654
|
+
// @__NO_SIDE_EFFECTS__
|
|
1655
|
+
function Io(e, t) {
|
|
1584
1656
|
return new e({
|
|
1585
1657
|
type: "string",
|
|
1586
1658
|
format: "datetime",
|
|
@@ -1588,209 +1660,584 @@ function zo(e, t) {
|
|
|
1588
1660
|
offset: !1,
|
|
1589
1661
|
local: !1,
|
|
1590
1662
|
precision: null,
|
|
1591
|
-
...
|
|
1663
|
+
...p(t)
|
|
1592
1664
|
});
|
|
1593
1665
|
}
|
|
1594
|
-
|
|
1666
|
+
// @__NO_SIDE_EFFECTS__
|
|
1667
|
+
function Ao(e, t) {
|
|
1595
1668
|
return new e({
|
|
1596
1669
|
type: "string",
|
|
1597
1670
|
format: "date",
|
|
1598
1671
|
check: "string_format",
|
|
1599
|
-
...
|
|
1672
|
+
...p(t)
|
|
1600
1673
|
});
|
|
1601
1674
|
}
|
|
1602
|
-
|
|
1675
|
+
// @__NO_SIDE_EFFECTS__
|
|
1676
|
+
function Ro(e, t) {
|
|
1603
1677
|
return new e({
|
|
1604
1678
|
type: "string",
|
|
1605
1679
|
format: "time",
|
|
1606
1680
|
check: "string_format",
|
|
1607
1681
|
precision: null,
|
|
1608
|
-
...
|
|
1682
|
+
...p(t)
|
|
1609
1683
|
});
|
|
1610
1684
|
}
|
|
1611
|
-
|
|
1685
|
+
// @__NO_SIDE_EFFECTS__
|
|
1686
|
+
function Do(e, t) {
|
|
1612
1687
|
return new e({
|
|
1613
1688
|
type: "string",
|
|
1614
1689
|
format: "duration",
|
|
1615
1690
|
check: "string_format",
|
|
1616
|
-
...
|
|
1691
|
+
...p(t)
|
|
1617
1692
|
});
|
|
1618
1693
|
}
|
|
1619
|
-
|
|
1694
|
+
// @__NO_SIDE_EFFECTS__
|
|
1695
|
+
function Co(e) {
|
|
1620
1696
|
return new e({
|
|
1621
1697
|
type: "unknown"
|
|
1622
1698
|
});
|
|
1623
1699
|
}
|
|
1624
|
-
|
|
1700
|
+
// @__NO_SIDE_EFFECTS__
|
|
1701
|
+
function Uo(e, t) {
|
|
1625
1702
|
return new e({
|
|
1626
1703
|
type: "never",
|
|
1627
|
-
...
|
|
1704
|
+
...p(t)
|
|
1628
1705
|
});
|
|
1629
1706
|
}
|
|
1630
|
-
|
|
1631
|
-
|
|
1707
|
+
// @__NO_SIDE_EFFECTS__
|
|
1708
|
+
function lt(e, t) {
|
|
1709
|
+
return new cr({
|
|
1632
1710
|
check: "max_length",
|
|
1633
|
-
...
|
|
1711
|
+
...p(t),
|
|
1634
1712
|
maximum: e
|
|
1635
1713
|
});
|
|
1636
1714
|
}
|
|
1637
|
-
|
|
1638
|
-
|
|
1715
|
+
// @__NO_SIDE_EFFECTS__
|
|
1716
|
+
function X(e, t) {
|
|
1717
|
+
return new ur({
|
|
1639
1718
|
check: "min_length",
|
|
1640
|
-
...
|
|
1719
|
+
...p(t),
|
|
1641
1720
|
minimum: e
|
|
1642
1721
|
});
|
|
1643
1722
|
}
|
|
1644
|
-
|
|
1645
|
-
|
|
1723
|
+
// @__NO_SIDE_EFFECTS__
|
|
1724
|
+
function dt(e, t) {
|
|
1725
|
+
return new lr({
|
|
1646
1726
|
check: "length_equals",
|
|
1647
|
-
...
|
|
1727
|
+
...p(t),
|
|
1648
1728
|
length: e
|
|
1649
1729
|
});
|
|
1650
1730
|
}
|
|
1651
|
-
|
|
1652
|
-
|
|
1731
|
+
// @__NO_SIDE_EFFECTS__
|
|
1732
|
+
function Fo(e, t) {
|
|
1733
|
+
return new dr({
|
|
1653
1734
|
check: "string_format",
|
|
1654
1735
|
format: "regex",
|
|
1655
|
-
...
|
|
1736
|
+
...p(t),
|
|
1656
1737
|
pattern: e
|
|
1657
1738
|
});
|
|
1658
1739
|
}
|
|
1659
|
-
|
|
1660
|
-
|
|
1740
|
+
// @__NO_SIDE_EFFECTS__
|
|
1741
|
+
function Jo(e) {
|
|
1742
|
+
return new fr({
|
|
1661
1743
|
check: "string_format",
|
|
1662
1744
|
format: "lowercase",
|
|
1663
|
-
...
|
|
1745
|
+
...p(e)
|
|
1664
1746
|
});
|
|
1665
1747
|
}
|
|
1666
|
-
|
|
1667
|
-
|
|
1748
|
+
// @__NO_SIDE_EFFECTS__
|
|
1749
|
+
function Lo(e) {
|
|
1750
|
+
return new pr({
|
|
1668
1751
|
check: "string_format",
|
|
1669
1752
|
format: "uppercase",
|
|
1670
|
-
...
|
|
1753
|
+
...p(e)
|
|
1671
1754
|
});
|
|
1672
1755
|
}
|
|
1673
|
-
|
|
1674
|
-
|
|
1756
|
+
// @__NO_SIDE_EFFECTS__
|
|
1757
|
+
function Mo(e, t) {
|
|
1758
|
+
return new hr({
|
|
1675
1759
|
check: "string_format",
|
|
1676
1760
|
format: "includes",
|
|
1677
|
-
...
|
|
1761
|
+
...p(t),
|
|
1678
1762
|
includes: e
|
|
1679
1763
|
});
|
|
1680
1764
|
}
|
|
1681
|
-
|
|
1682
|
-
|
|
1765
|
+
// @__NO_SIDE_EFFECTS__
|
|
1766
|
+
function Bo(e, t) {
|
|
1767
|
+
return new mr({
|
|
1683
1768
|
check: "string_format",
|
|
1684
1769
|
format: "starts_with",
|
|
1685
|
-
...
|
|
1770
|
+
...p(t),
|
|
1686
1771
|
prefix: e
|
|
1687
1772
|
});
|
|
1688
1773
|
}
|
|
1689
|
-
|
|
1690
|
-
|
|
1774
|
+
// @__NO_SIDE_EFFECTS__
|
|
1775
|
+
function Vo(e, t) {
|
|
1776
|
+
return new gr({
|
|
1691
1777
|
check: "string_format",
|
|
1692
1778
|
format: "ends_with",
|
|
1693
|
-
...
|
|
1779
|
+
...p(t),
|
|
1694
1780
|
suffix: e
|
|
1695
1781
|
});
|
|
1696
1782
|
}
|
|
1697
|
-
|
|
1698
|
-
|
|
1783
|
+
// @__NO_SIDE_EFFECTS__
|
|
1784
|
+
function J(e) {
|
|
1785
|
+
return new _r({
|
|
1699
1786
|
check: "overwrite",
|
|
1700
1787
|
tx: e
|
|
1701
1788
|
});
|
|
1702
1789
|
}
|
|
1703
|
-
|
|
1704
|
-
|
|
1790
|
+
// @__NO_SIDE_EFFECTS__
|
|
1791
|
+
function qo(e) {
|
|
1792
|
+
return /* @__PURE__ */ J((t) => t.normalize(e));
|
|
1793
|
+
}
|
|
1794
|
+
// @__NO_SIDE_EFFECTS__
|
|
1795
|
+
function Wo() {
|
|
1796
|
+
return /* @__PURE__ */ J((e) => e.trim());
|
|
1705
1797
|
}
|
|
1706
|
-
|
|
1707
|
-
|
|
1798
|
+
// @__NO_SIDE_EFFECTS__
|
|
1799
|
+
function Ko() {
|
|
1800
|
+
return /* @__PURE__ */ J((e) => e.toLowerCase());
|
|
1708
1801
|
}
|
|
1709
|
-
|
|
1710
|
-
|
|
1802
|
+
// @__NO_SIDE_EFFECTS__
|
|
1803
|
+
function Ho() {
|
|
1804
|
+
return /* @__PURE__ */ J((e) => e.toUpperCase());
|
|
1711
1805
|
}
|
|
1712
|
-
|
|
1713
|
-
|
|
1806
|
+
// @__NO_SIDE_EFFECTS__
|
|
1807
|
+
function Go() {
|
|
1808
|
+
return /* @__PURE__ */ J((e) => gn(e));
|
|
1714
1809
|
}
|
|
1715
|
-
|
|
1810
|
+
// @__NO_SIDE_EFFECTS__
|
|
1811
|
+
function Yo(e, t, n) {
|
|
1716
1812
|
return new e({
|
|
1717
1813
|
type: "array",
|
|
1718
1814
|
element: t,
|
|
1719
1815
|
// get element() {
|
|
1720
1816
|
// return element;
|
|
1721
1817
|
// },
|
|
1722
|
-
...
|
|
1818
|
+
...p(n)
|
|
1723
1819
|
});
|
|
1724
1820
|
}
|
|
1725
|
-
|
|
1821
|
+
// @__NO_SIDE_EFFECTS__
|
|
1822
|
+
function Qo(e, t, n) {
|
|
1726
1823
|
return new e({
|
|
1727
1824
|
type: "custom",
|
|
1728
1825
|
check: "custom",
|
|
1729
1826
|
fn: t,
|
|
1730
|
-
...
|
|
1827
|
+
...p(n)
|
|
1731
1828
|
});
|
|
1732
1829
|
}
|
|
1733
|
-
|
|
1734
|
-
|
|
1830
|
+
// @__NO_SIDE_EFFECTS__
|
|
1831
|
+
function Xo(e) {
|
|
1832
|
+
const t = /* @__PURE__ */ es((n) => (n.addIssue = (r) => {
|
|
1735
1833
|
if (typeof r == "string")
|
|
1736
|
-
n.issues.push(
|
|
1834
|
+
n.issues.push(B(r, n.value, t._zod.def));
|
|
1737
1835
|
else {
|
|
1738
1836
|
const o = r;
|
|
1739
|
-
o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(
|
|
1837
|
+
o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(B(o));
|
|
1740
1838
|
}
|
|
1741
1839
|
}, e(n.value, n)));
|
|
1742
1840
|
return t;
|
|
1743
1841
|
}
|
|
1744
|
-
|
|
1745
|
-
|
|
1842
|
+
// @__NO_SIDE_EFFECTS__
|
|
1843
|
+
function es(e, t) {
|
|
1844
|
+
const n = new E({
|
|
1746
1845
|
check: "custom",
|
|
1747
|
-
...
|
|
1846
|
+
...p(t)
|
|
1748
1847
|
});
|
|
1749
1848
|
return n._zod.check = e, n;
|
|
1750
1849
|
}
|
|
1751
|
-
|
|
1752
|
-
|
|
1850
|
+
function ft(e) {
|
|
1851
|
+
let t = e?.target ?? "draft-2020-12";
|
|
1852
|
+
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
1853
|
+
processors: e.processors ?? {},
|
|
1854
|
+
metadataRegistry: e?.metadata ?? L,
|
|
1855
|
+
target: t,
|
|
1856
|
+
unrepresentable: e?.unrepresentable ?? "throw",
|
|
1857
|
+
override: e?.override ?? (() => {
|
|
1858
|
+
}),
|
|
1859
|
+
io: e?.io ?? "output",
|
|
1860
|
+
counter: 0,
|
|
1861
|
+
seen: /* @__PURE__ */ new Map(),
|
|
1862
|
+
cycles: e?.cycles ?? "ref",
|
|
1863
|
+
reused: e?.reused ?? "inline",
|
|
1864
|
+
external: e?.external ?? void 0
|
|
1865
|
+
};
|
|
1866
|
+
}
|
|
1867
|
+
function k(e, t, n = { path: [], schemaPath: [] }) {
|
|
1868
|
+
var r;
|
|
1869
|
+
const o = e._zod.def, i = t.seen.get(e);
|
|
1870
|
+
if (i)
|
|
1871
|
+
return i.count++, n.schemaPath.includes(e) && (i.cycle = n.path), i.schema;
|
|
1872
|
+
const s = { schema: {}, count: 1, cycle: void 0, path: n.path };
|
|
1873
|
+
t.seen.set(e, s);
|
|
1874
|
+
const a = e._zod.toJSONSchema?.();
|
|
1875
|
+
if (a)
|
|
1876
|
+
s.schema = a;
|
|
1877
|
+
else {
|
|
1878
|
+
const f = {
|
|
1879
|
+
...n,
|
|
1880
|
+
schemaPath: [...n.schemaPath, e],
|
|
1881
|
+
path: n.path
|
|
1882
|
+
};
|
|
1883
|
+
if (e._zod.processJSONSchema)
|
|
1884
|
+
e._zod.processJSONSchema(t, s.schema, f);
|
|
1885
|
+
else {
|
|
1886
|
+
const h = s.schema, m = t.processors[o.type];
|
|
1887
|
+
if (!m)
|
|
1888
|
+
throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
|
|
1889
|
+
m(e, t, h, f);
|
|
1890
|
+
}
|
|
1891
|
+
const g = e._zod.parent;
|
|
1892
|
+
g && (s.ref || (s.ref = g), k(g, t, f), t.seen.get(g).isParent = !0);
|
|
1893
|
+
}
|
|
1894
|
+
const l = t.metadataRegistry.get(e);
|
|
1895
|
+
return l && Object.assign(s.schema, l), t.io === "input" && j(e) && (delete s.schema.examples, delete s.schema.default), t.io === "input" && s.schema._prefault && ((r = s.schema).default ?? (r.default = s.schema._prefault)), delete s.schema._prefault, t.seen.get(e).schema;
|
|
1896
|
+
}
|
|
1897
|
+
function pt(e, t) {
|
|
1898
|
+
const n = e.seen.get(t);
|
|
1899
|
+
if (!n)
|
|
1900
|
+
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
1901
|
+
const r = /* @__PURE__ */ new Map();
|
|
1902
|
+
for (const s of e.seen.entries()) {
|
|
1903
|
+
const a = e.metadataRegistry.get(s[0])?.id;
|
|
1904
|
+
if (a) {
|
|
1905
|
+
const l = r.get(a);
|
|
1906
|
+
if (l && l !== s[0])
|
|
1907
|
+
throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
|
|
1908
|
+
r.set(a, s[0]);
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
const o = (s) => {
|
|
1912
|
+
const a = e.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
1913
|
+
if (e.external) {
|
|
1914
|
+
const g = e.external.registry.get(s[0])?.id, h = e.external.uri ?? (($) => $);
|
|
1915
|
+
if (g)
|
|
1916
|
+
return { ref: h(g) };
|
|
1917
|
+
const m = s[1].defId ?? s[1].schema.id ?? `schema${e.counter++}`;
|
|
1918
|
+
return s[1].defId = m, { defId: m, ref: `${h("__shared")}#/${a}/${m}` };
|
|
1919
|
+
}
|
|
1920
|
+
if (s[1] === n)
|
|
1921
|
+
return { ref: "#" };
|
|
1922
|
+
const d = `#/${a}/`, f = s[1].schema.id ?? `__schema${e.counter++}`;
|
|
1923
|
+
return { defId: f, ref: d + f };
|
|
1924
|
+
}, i = (s) => {
|
|
1925
|
+
if (s[1].schema.$ref)
|
|
1926
|
+
return;
|
|
1927
|
+
const a = s[1], { ref: l, defId: d } = o(s);
|
|
1928
|
+
a.def = { ...a.schema }, d && (a.defId = d);
|
|
1929
|
+
const f = a.schema;
|
|
1930
|
+
for (const g in f)
|
|
1931
|
+
delete f[g];
|
|
1932
|
+
f.$ref = l;
|
|
1933
|
+
};
|
|
1934
|
+
if (e.cycles === "throw")
|
|
1935
|
+
for (const s of e.seen.entries()) {
|
|
1936
|
+
const a = s[1];
|
|
1937
|
+
if (a.cycle)
|
|
1938
|
+
throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
1939
|
+
|
|
1940
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
|
|
1941
|
+
}
|
|
1942
|
+
for (const s of e.seen.entries()) {
|
|
1943
|
+
const a = s[1];
|
|
1944
|
+
if (t === s[0]) {
|
|
1945
|
+
i(s);
|
|
1946
|
+
continue;
|
|
1947
|
+
}
|
|
1948
|
+
if (e.external) {
|
|
1949
|
+
const d = e.external.registry.get(s[0])?.id;
|
|
1950
|
+
if (t !== s[0] && d) {
|
|
1951
|
+
i(s);
|
|
1952
|
+
continue;
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
if (e.metadataRegistry.get(s[0])?.id) {
|
|
1956
|
+
i(s);
|
|
1957
|
+
continue;
|
|
1958
|
+
}
|
|
1959
|
+
if (a.cycle) {
|
|
1960
|
+
i(s);
|
|
1961
|
+
continue;
|
|
1962
|
+
}
|
|
1963
|
+
if (a.count > 1 && e.reused === "ref") {
|
|
1964
|
+
i(s);
|
|
1965
|
+
continue;
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
function ht(e, t) {
|
|
1970
|
+
const n = e.seen.get(t);
|
|
1971
|
+
if (!n)
|
|
1972
|
+
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
1973
|
+
const r = (s) => {
|
|
1974
|
+
const a = e.seen.get(s);
|
|
1975
|
+
if (a.ref === null)
|
|
1976
|
+
return;
|
|
1977
|
+
const l = a.def ?? a.schema, d = { ...l }, f = a.ref;
|
|
1978
|
+
if (a.ref = null, f) {
|
|
1979
|
+
r(f);
|
|
1980
|
+
const h = e.seen.get(f), m = h.schema;
|
|
1981
|
+
if (m.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (l.allOf = l.allOf ?? [], l.allOf.push(m)) : Object.assign(l, m), Object.assign(l, d), s._zod.parent === f)
|
|
1982
|
+
for (const b in l)
|
|
1983
|
+
b === "$ref" || b === "allOf" || b in d || delete l[b];
|
|
1984
|
+
if (m.$ref && h.def)
|
|
1985
|
+
for (const b in l)
|
|
1986
|
+
b === "$ref" || b === "allOf" || b in h.def && JSON.stringify(l[b]) === JSON.stringify(h.def[b]) && delete l[b];
|
|
1987
|
+
}
|
|
1988
|
+
const g = s._zod.parent;
|
|
1989
|
+
if (g && g !== f) {
|
|
1990
|
+
r(g);
|
|
1991
|
+
const h = e.seen.get(g);
|
|
1992
|
+
if (h?.schema.$ref && (l.$ref = h.schema.$ref, h.def))
|
|
1993
|
+
for (const m in l)
|
|
1994
|
+
m === "$ref" || m === "allOf" || m in h.def && JSON.stringify(l[m]) === JSON.stringify(h.def[m]) && delete l[m];
|
|
1995
|
+
}
|
|
1996
|
+
e.override({
|
|
1997
|
+
zodSchema: s,
|
|
1998
|
+
jsonSchema: l,
|
|
1999
|
+
path: a.path ?? []
|
|
2000
|
+
});
|
|
2001
|
+
};
|
|
2002
|
+
for (const s of [...e.seen.entries()].reverse())
|
|
2003
|
+
r(s[0]);
|
|
2004
|
+
const o = {};
|
|
2005
|
+
if (e.target === "draft-2020-12" ? o.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? o.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? o.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
|
|
2006
|
+
const s = e.external.registry.get(t)?.id;
|
|
2007
|
+
if (!s)
|
|
2008
|
+
throw new Error("Schema is missing an `id` property");
|
|
2009
|
+
o.$id = e.external.uri(s);
|
|
2010
|
+
}
|
|
2011
|
+
Object.assign(o, n.def ?? n.schema);
|
|
2012
|
+
const i = e.external?.defs ?? {};
|
|
2013
|
+
for (const s of e.seen.entries()) {
|
|
2014
|
+
const a = s[1];
|
|
2015
|
+
a.def && a.defId && (i[a.defId] = a.def);
|
|
2016
|
+
}
|
|
2017
|
+
e.external || Object.keys(i).length > 0 && (e.target === "draft-2020-12" ? o.$defs = i : o.definitions = i);
|
|
2018
|
+
try {
|
|
2019
|
+
const s = JSON.parse(JSON.stringify(o));
|
|
2020
|
+
return Object.defineProperty(s, "~standard", {
|
|
2021
|
+
value: {
|
|
2022
|
+
...t["~standard"],
|
|
2023
|
+
jsonSchema: {
|
|
2024
|
+
input: ee(t, "input", e.processors),
|
|
2025
|
+
output: ee(t, "output", e.processors)
|
|
2026
|
+
}
|
|
2027
|
+
},
|
|
2028
|
+
enumerable: !1,
|
|
2029
|
+
writable: !1
|
|
2030
|
+
}), s;
|
|
2031
|
+
} catch {
|
|
2032
|
+
throw new Error("Error converting schema to JSON.");
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
function j(e, t) {
|
|
2036
|
+
const n = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
2037
|
+
if (n.seen.has(e))
|
|
2038
|
+
return !1;
|
|
2039
|
+
n.seen.add(e);
|
|
2040
|
+
const r = e._zod.def;
|
|
2041
|
+
if (r.type === "transform")
|
|
2042
|
+
return !0;
|
|
2043
|
+
if (r.type === "array")
|
|
2044
|
+
return j(r.element, n);
|
|
2045
|
+
if (r.type === "set")
|
|
2046
|
+
return j(r.valueType, n);
|
|
2047
|
+
if (r.type === "lazy")
|
|
2048
|
+
return j(r.getter(), n);
|
|
2049
|
+
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
|
|
2050
|
+
return j(r.innerType, n);
|
|
2051
|
+
if (r.type === "intersection")
|
|
2052
|
+
return j(r.left, n) || j(r.right, n);
|
|
2053
|
+
if (r.type === "record" || r.type === "map")
|
|
2054
|
+
return j(r.keyType, n) || j(r.valueType, n);
|
|
2055
|
+
if (r.type === "pipe")
|
|
2056
|
+
return j(r.in, n) || j(r.out, n);
|
|
2057
|
+
if (r.type === "object") {
|
|
2058
|
+
for (const o in r.shape)
|
|
2059
|
+
if (j(r.shape[o], n))
|
|
2060
|
+
return !0;
|
|
2061
|
+
return !1;
|
|
2062
|
+
}
|
|
2063
|
+
if (r.type === "union") {
|
|
2064
|
+
for (const o of r.options)
|
|
2065
|
+
if (j(o, n))
|
|
2066
|
+
return !0;
|
|
2067
|
+
return !1;
|
|
2068
|
+
}
|
|
2069
|
+
if (r.type === "tuple") {
|
|
2070
|
+
for (const o of r.items)
|
|
2071
|
+
if (j(o, n))
|
|
2072
|
+
return !0;
|
|
2073
|
+
return !!(r.rest && j(r.rest, n));
|
|
2074
|
+
}
|
|
2075
|
+
return !1;
|
|
2076
|
+
}
|
|
2077
|
+
const ts = (e, t = {}) => (n) => {
|
|
2078
|
+
const r = ft({ ...n, processors: t });
|
|
2079
|
+
return k(e, r), pt(r, e), ht(r, e);
|
|
2080
|
+
}, ee = (e, t, n = {}) => (r) => {
|
|
2081
|
+
const { libraryOptions: o, target: i } = r ?? {}, s = ft({ ...o ?? {}, target: i, io: t, processors: n });
|
|
2082
|
+
return k(e, s), pt(s, e), ht(s, e);
|
|
2083
|
+
}, ns = {
|
|
2084
|
+
guid: "uuid",
|
|
2085
|
+
url: "uri",
|
|
2086
|
+
datetime: "date-time",
|
|
2087
|
+
json_string: "json-string",
|
|
2088
|
+
regex: ""
|
|
2089
|
+
// do not set
|
|
2090
|
+
}, rs = (e, t, n, r) => {
|
|
2091
|
+
const o = n;
|
|
2092
|
+
o.type = "string";
|
|
2093
|
+
const { minimum: i, maximum: s, format: a, patterns: l, contentEncoding: d } = e._zod.bag;
|
|
2094
|
+
if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), a && (o.format = ns[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), d && (o.contentEncoding = d), l && l.size > 0) {
|
|
2095
|
+
const f = [...l];
|
|
2096
|
+
f.length === 1 ? o.pattern = f[0].source : f.length > 1 && (o.allOf = [
|
|
2097
|
+
...f.map((g) => ({
|
|
2098
|
+
...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
|
|
2099
|
+
pattern: g.source
|
|
2100
|
+
}))
|
|
2101
|
+
]);
|
|
2102
|
+
}
|
|
2103
|
+
}, os = (e, t, n, r) => {
|
|
2104
|
+
n.not = {};
|
|
2105
|
+
}, ss = (e, t, n, r) => {
|
|
2106
|
+
}, is = (e, t, n, r) => {
|
|
2107
|
+
const o = e._zod.def, i = Ge(o.entries);
|
|
2108
|
+
i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), n.enum = i;
|
|
2109
|
+
}, as = (e, t, n, r) => {
|
|
2110
|
+
if (t.unrepresentable === "throw")
|
|
2111
|
+
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
2112
|
+
}, cs = (e, t, n, r) => {
|
|
2113
|
+
if (t.unrepresentable === "throw")
|
|
2114
|
+
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
2115
|
+
}, us = (e, t, n, r) => {
|
|
2116
|
+
const o = n, i = e._zod.def, { minimum: s, maximum: a } = e._zod.bag;
|
|
2117
|
+
typeof s == "number" && (o.minItems = s), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = k(i.element, t, { ...r, path: [...r.path, "items"] });
|
|
2118
|
+
}, ls = (e, t, n, r) => {
|
|
2119
|
+
const o = n, i = e._zod.def;
|
|
2120
|
+
o.type = "object", o.properties = {};
|
|
2121
|
+
const s = i.shape;
|
|
2122
|
+
for (const d in s)
|
|
2123
|
+
o.properties[d] = k(s[d], t, {
|
|
2124
|
+
...r,
|
|
2125
|
+
path: [...r.path, "properties", d]
|
|
2126
|
+
});
|
|
2127
|
+
const a = new Set(Object.keys(s)), l = new Set([...a].filter((d) => {
|
|
2128
|
+
const f = i.shape[d]._zod;
|
|
2129
|
+
return t.io === "input" ? f.optin === void 0 : f.optout === void 0;
|
|
2130
|
+
}));
|
|
2131
|
+
l.size > 0 && (o.required = Array.from(l)), i.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = k(i.catchall, t, {
|
|
2132
|
+
...r,
|
|
2133
|
+
path: [...r.path, "additionalProperties"]
|
|
2134
|
+
})) : t.io === "output" && (o.additionalProperties = !1);
|
|
2135
|
+
}, ds = (e, t, n, r) => {
|
|
2136
|
+
const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((a, l) => k(a, t, {
|
|
2137
|
+
...r,
|
|
2138
|
+
path: [...r.path, i ? "oneOf" : "anyOf", l]
|
|
2139
|
+
}));
|
|
2140
|
+
i ? n.oneOf = s : n.anyOf = s;
|
|
2141
|
+
}, fs = (e, t, n, r) => {
|
|
2142
|
+
const o = e._zod.def, i = k(o.left, t, {
|
|
2143
|
+
...r,
|
|
2144
|
+
path: [...r.path, "allOf", 0]
|
|
2145
|
+
}), s = k(o.right, t, {
|
|
2146
|
+
...r,
|
|
2147
|
+
path: [...r.path, "allOf", 1]
|
|
2148
|
+
}), a = (d) => "allOf" in d && Object.keys(d).length === 1, l = [
|
|
2149
|
+
...a(i) ? i.allOf : [i],
|
|
2150
|
+
...a(s) ? s.allOf : [s]
|
|
2151
|
+
];
|
|
2152
|
+
n.allOf = l;
|
|
2153
|
+
}, ps = (e, t, n, r) => {
|
|
2154
|
+
const o = e._zod.def, i = k(o.innerType, t, r), s = t.seen.get(e);
|
|
2155
|
+
t.target === "openapi-3.0" ? (s.ref = o.innerType, n.nullable = !0) : n.anyOf = [i, { type: "null" }];
|
|
2156
|
+
}, hs = (e, t, n, r) => {
|
|
2157
|
+
const o = e._zod.def;
|
|
2158
|
+
k(o.innerType, t, r);
|
|
2159
|
+
const i = t.seen.get(e);
|
|
2160
|
+
i.ref = o.innerType;
|
|
2161
|
+
}, ms = (e, t, n, r) => {
|
|
2162
|
+
const o = e._zod.def;
|
|
2163
|
+
k(o.innerType, t, r);
|
|
2164
|
+
const i = t.seen.get(e);
|
|
2165
|
+
i.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
|
|
2166
|
+
}, gs = (e, t, n, r) => {
|
|
2167
|
+
const o = e._zod.def;
|
|
2168
|
+
k(o.innerType, t, r);
|
|
2169
|
+
const i = t.seen.get(e);
|
|
2170
|
+
i.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
|
|
2171
|
+
}, _s = (e, t, n, r) => {
|
|
2172
|
+
const o = e._zod.def;
|
|
2173
|
+
k(o.innerType, t, r);
|
|
2174
|
+
const i = t.seen.get(e);
|
|
2175
|
+
i.ref = o.innerType;
|
|
2176
|
+
let s;
|
|
2177
|
+
try {
|
|
2178
|
+
s = o.catchValue(void 0);
|
|
2179
|
+
} catch {
|
|
2180
|
+
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
2181
|
+
}
|
|
2182
|
+
n.default = s;
|
|
2183
|
+
}, vs = (e, t, n, r) => {
|
|
2184
|
+
const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
|
|
2185
|
+
k(i, t, r);
|
|
2186
|
+
const s = t.seen.get(e);
|
|
2187
|
+
s.ref = i;
|
|
2188
|
+
}, ys = (e, t, n, r) => {
|
|
2189
|
+
const o = e._zod.def;
|
|
2190
|
+
k(o.innerType, t, r);
|
|
2191
|
+
const i = t.seen.get(e);
|
|
2192
|
+
i.ref = o.innerType, n.readOnly = !0;
|
|
2193
|
+
}, mt = (e, t, n, r) => {
|
|
2194
|
+
const o = e._zod.def;
|
|
2195
|
+
k(o.innerType, t, r);
|
|
2196
|
+
const i = t.seen.get(e);
|
|
2197
|
+
i.ref = o.innerType;
|
|
2198
|
+
}, ws = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
|
|
2199
|
+
Tr.init(e, t), y.init(e, t);
|
|
1753
2200
|
});
|
|
1754
|
-
function
|
|
1755
|
-
return
|
|
2201
|
+
function zs(e) {
|
|
2202
|
+
return /* @__PURE__ */ Io(ws, e);
|
|
1756
2203
|
}
|
|
1757
|
-
const
|
|
1758
|
-
|
|
2204
|
+
const bs = /* @__PURE__ */ u("ZodISODate", (e, t) => {
|
|
2205
|
+
Er.init(e, t), y.init(e, t);
|
|
1759
2206
|
});
|
|
1760
|
-
function
|
|
1761
|
-
return
|
|
2207
|
+
function ks(e) {
|
|
2208
|
+
return /* @__PURE__ */ Ao(bs, e);
|
|
1762
2209
|
}
|
|
1763
|
-
const
|
|
1764
|
-
|
|
2210
|
+
const $s = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
|
|
2211
|
+
Nr.init(e, t), y.init(e, t);
|
|
1765
2212
|
});
|
|
1766
|
-
function
|
|
1767
|
-
return
|
|
2213
|
+
function js(e) {
|
|
2214
|
+
return /* @__PURE__ */ Ro($s, e);
|
|
1768
2215
|
}
|
|
1769
|
-
const
|
|
1770
|
-
|
|
2216
|
+
const xs = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
|
|
2217
|
+
Ir.init(e, t), y.init(e, t);
|
|
1771
2218
|
});
|
|
1772
|
-
function
|
|
1773
|
-
return
|
|
2219
|
+
function Zs(e) {
|
|
2220
|
+
return /* @__PURE__ */ Do(xs, e);
|
|
1774
2221
|
}
|
|
1775
|
-
const
|
|
1776
|
-
|
|
2222
|
+
const Os = (e, t) => {
|
|
2223
|
+
tt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
1777
2224
|
format: {
|
|
1778
|
-
value: (n) =>
|
|
2225
|
+
value: (n) => On(e, n)
|
|
1779
2226
|
// enumerable: false,
|
|
1780
2227
|
},
|
|
1781
2228
|
flatten: {
|
|
1782
|
-
value: (n) =>
|
|
2229
|
+
value: (n) => Zn(e, n)
|
|
1783
2230
|
// enumerable: false,
|
|
1784
2231
|
},
|
|
1785
2232
|
addIssue: {
|
|
1786
2233
|
value: (n) => {
|
|
1787
|
-
e.issues.push(n), e.message = JSON.stringify(e.issues,
|
|
2234
|
+
e.issues.push(n), e.message = JSON.stringify(e.issues, ie, 2);
|
|
1788
2235
|
}
|
|
1789
2236
|
// enumerable: false,
|
|
1790
2237
|
},
|
|
1791
2238
|
addIssues: {
|
|
1792
2239
|
value: (n) => {
|
|
1793
|
-
e.issues.push(...n), e.message = JSON.stringify(e.issues,
|
|
2240
|
+
e.issues.push(...n), e.message = JSON.stringify(e.issues, ie, 2);
|
|
1794
2241
|
}
|
|
1795
2242
|
// enumerable: false,
|
|
1796
2243
|
},
|
|
@@ -1801,312 +2248,328 @@ const Jo = (e, t) => {
|
|
|
1801
2248
|
// enumerable: false,
|
|
1802
2249
|
}
|
|
1803
2250
|
});
|
|
1804
|
-
},
|
|
2251
|
+
}, Z = u("ZodError", Os, {
|
|
1805
2252
|
Parent: Error
|
|
1806
|
-
}),
|
|
2253
|
+
}), Ss = /* @__PURE__ */ pe(Z), Ps = /* @__PURE__ */ he(Z), Ts = /* @__PURE__ */ re(Z), Es = /* @__PURE__ */ oe(Z), Ns = /* @__PURE__ */ Tn(Z), Is = /* @__PURE__ */ En(Z), As = /* @__PURE__ */ Nn(Z), Rs = /* @__PURE__ */ In(Z), Ds = /* @__PURE__ */ An(Z), Cs = /* @__PURE__ */ Rn(Z), Us = /* @__PURE__ */ Dn(Z), Fs = /* @__PURE__ */ Cn(Z), z = /* @__PURE__ */ u("ZodType", (e, t) => (w.init(e, t), Object.assign(e["~standard"], {
|
|
2254
|
+
jsonSchema: {
|
|
2255
|
+
input: ee(e, "input"),
|
|
2256
|
+
output: ee(e, "output")
|
|
2257
|
+
}
|
|
2258
|
+
}), e.toJSONSchema = ts(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(I(t, {
|
|
1807
2259
|
checks: [
|
|
1808
2260
|
...t.checks ?? [],
|
|
1809
2261
|
...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
1810
2262
|
]
|
|
1811
|
-
})
|
|
2263
|
+
}), {
|
|
2264
|
+
parent: !0
|
|
2265
|
+
}), e.with = e.check, e.clone = (n, r) => A(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Ss(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Ts(e, n, r), e.parseAsync = async (n, r) => Ps(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Es(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Ns(e, n, r), e.decode = (n, r) => Is(e, n, r), e.encodeAsync = async (n, r) => As(e, n, r), e.decodeAsync = async (n, r) => Rs(e, n, r), e.safeEncode = (n, r) => Ds(e, n, r), e.safeDecode = (n, r) => Cs(e, n, r), e.safeEncodeAsync = async (n, r) => Us(e, n, r), e.safeDecodeAsync = async (n, r) => Fs(e, n, r), e.refine = (n, r) => e.check(Ei(n, r)), e.superRefine = (n) => e.check(Ni(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ J(n)), e.optional = () => Ne(e), e.exactOptional = () => yi(e), e.nullable = () => Ie(e), e.nullish = () => Ne(Ie(e)), e.nonoptional = (n) => ji(e, n), e.array = () => ui(e), e.or = (n) => pi([e, n]), e.and = (n) => mi(e, n), e.transform = (n) => Ae(e, _i(n)), e.default = (n) => bi(e, n), e.prefault = (n) => $i(e, n), e.catch = (n) => Zi(e, n), e.pipe = (n) => Ae(e, n), e.readonly = () => Pi(e), e.describe = (n) => {
|
|
1812
2266
|
const r = e.clone();
|
|
1813
|
-
return
|
|
2267
|
+
return L.add(r, { description: n }), r;
|
|
1814
2268
|
}, Object.defineProperty(e, "description", {
|
|
1815
2269
|
get() {
|
|
1816
|
-
return
|
|
2270
|
+
return L.get(e)?.description;
|
|
1817
2271
|
},
|
|
1818
2272
|
configurable: !0
|
|
1819
2273
|
}), e.meta = (...n) => {
|
|
1820
2274
|
if (n.length === 0)
|
|
1821
|
-
return
|
|
2275
|
+
return L.get(e);
|
|
1822
2276
|
const r = e.clone();
|
|
1823
|
-
return
|
|
1824
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)),
|
|
1825
|
-
|
|
2277
|
+
return L.add(r, n[0]), r;
|
|
2278
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), gt = /* @__PURE__ */ u("_ZodString", (e, t) => {
|
|
2279
|
+
me.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, i) => rs(e, r, o);
|
|
1826
2280
|
const n = e._zod.bag;
|
|
1827
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(
|
|
1828
|
-
}),
|
|
1829
|
-
|
|
2281
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ Fo(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ Mo(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Bo(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ Vo(...r)), e.min = (...r) => e.check(/* @__PURE__ */ X(...r)), e.max = (...r) => e.check(/* @__PURE__ */ lt(...r)), e.length = (...r) => e.check(/* @__PURE__ */ dt(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ X(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ Jo(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Lo(r)), e.trim = () => e.check(/* @__PURE__ */ Wo()), e.normalize = (...r) => e.check(/* @__PURE__ */ qo(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Ko()), e.toUpperCase = () => e.check(/* @__PURE__ */ Ho()), e.slugify = () => e.check(/* @__PURE__ */ Go());
|
|
2282
|
+
}), Js = /* @__PURE__ */ u("ZodString", (e, t) => {
|
|
2283
|
+
me.init(e, t), gt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ po(Ls, n)), e.url = (n) => e.check(/* @__PURE__ */ vo(Ms, n)), e.jwt = (n) => e.check(/* @__PURE__ */ No(oi, n)), e.emoji = (n) => e.check(/* @__PURE__ */ yo(Bs, n)), e.guid = (n) => e.check(/* @__PURE__ */ Se(Te, n)), e.uuid = (n) => e.check(/* @__PURE__ */ ho(G, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ mo(G, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ go(G, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ _o(G, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ wo(Vs, n)), e.guid = (n) => e.check(/* @__PURE__ */ Se(Te, n)), e.cuid = (n) => e.check(/* @__PURE__ */ zo(qs, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ bo(Ws, n)), e.ulid = (n) => e.check(/* @__PURE__ */ ko(Ks, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Po(ti, n)), e.base64url = (n) => e.check(/* @__PURE__ */ To(ni, n)), e.xid = (n) => e.check(/* @__PURE__ */ $o(Hs, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ jo(Gs, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ xo(Ys, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Zo(Qs, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Oo(Xs, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ So(ei, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Eo(ri, n)), e.datetime = (n) => e.check(zs(n)), e.date = (n) => e.check(ks(n)), e.time = (n) => e.check(js(n)), e.duration = (n) => e.check(Zs(n));
|
|
1830
2284
|
});
|
|
1831
|
-
function
|
|
1832
|
-
return
|
|
1833
|
-
}
|
|
1834
|
-
const
|
|
1835
|
-
|
|
1836
|
-
}),
|
|
1837
|
-
|
|
1838
|
-
}),
|
|
1839
|
-
|
|
1840
|
-
}),
|
|
1841
|
-
|
|
1842
|
-
}),
|
|
1843
|
-
|
|
1844
|
-
}),
|
|
1845
|
-
|
|
1846
|
-
}),
|
|
1847
|
-
|
|
1848
|
-
}),
|
|
1849
|
-
|
|
1850
|
-
}),
|
|
1851
|
-
|
|
1852
|
-
}),
|
|
1853
|
-
|
|
1854
|
-
}),
|
|
1855
|
-
|
|
1856
|
-
}),
|
|
1857
|
-
|
|
1858
|
-
}),
|
|
1859
|
-
|
|
1860
|
-
}),
|
|
1861
|
-
|
|
1862
|
-
}),
|
|
1863
|
-
|
|
1864
|
-
}),
|
|
1865
|
-
|
|
1866
|
-
}),
|
|
1867
|
-
|
|
1868
|
-
}),
|
|
1869
|
-
|
|
1870
|
-
}),
|
|
1871
|
-
|
|
1872
|
-
}),
|
|
1873
|
-
|
|
1874
|
-
}),
|
|
1875
|
-
|
|
2285
|
+
function Pe(e) {
|
|
2286
|
+
return /* @__PURE__ */ fo(Js, e);
|
|
2287
|
+
}
|
|
2288
|
+
const y = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
|
|
2289
|
+
v.init(e, t), gt.init(e, t);
|
|
2290
|
+
}), Ls = /* @__PURE__ */ u("ZodEmail", (e, t) => {
|
|
2291
|
+
br.init(e, t), y.init(e, t);
|
|
2292
|
+
}), Te = /* @__PURE__ */ u("ZodGUID", (e, t) => {
|
|
2293
|
+
wr.init(e, t), y.init(e, t);
|
|
2294
|
+
}), G = /* @__PURE__ */ u("ZodUUID", (e, t) => {
|
|
2295
|
+
zr.init(e, t), y.init(e, t);
|
|
2296
|
+
}), Ms = /* @__PURE__ */ u("ZodURL", (e, t) => {
|
|
2297
|
+
kr.init(e, t), y.init(e, t);
|
|
2298
|
+
}), Bs = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
|
|
2299
|
+
$r.init(e, t), y.init(e, t);
|
|
2300
|
+
}), Vs = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
|
|
2301
|
+
jr.init(e, t), y.init(e, t);
|
|
2302
|
+
}), qs = /* @__PURE__ */ u("ZodCUID", (e, t) => {
|
|
2303
|
+
xr.init(e, t), y.init(e, t);
|
|
2304
|
+
}), Ws = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
|
|
2305
|
+
Zr.init(e, t), y.init(e, t);
|
|
2306
|
+
}), Ks = /* @__PURE__ */ u("ZodULID", (e, t) => {
|
|
2307
|
+
Or.init(e, t), y.init(e, t);
|
|
2308
|
+
}), Hs = /* @__PURE__ */ u("ZodXID", (e, t) => {
|
|
2309
|
+
Sr.init(e, t), y.init(e, t);
|
|
2310
|
+
}), Gs = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
|
|
2311
|
+
Pr.init(e, t), y.init(e, t);
|
|
2312
|
+
}), Ys = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
|
|
2313
|
+
Ar.init(e, t), y.init(e, t);
|
|
2314
|
+
}), Qs = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
|
|
2315
|
+
Rr.init(e, t), y.init(e, t);
|
|
2316
|
+
}), Xs = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
|
|
2317
|
+
Dr.init(e, t), y.init(e, t);
|
|
2318
|
+
}), ei = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
|
|
2319
|
+
Cr.init(e, t), y.init(e, t);
|
|
2320
|
+
}), ti = /* @__PURE__ */ u("ZodBase64", (e, t) => {
|
|
2321
|
+
Ur.init(e, t), y.init(e, t);
|
|
2322
|
+
}), ni = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
|
|
2323
|
+
Jr.init(e, t), y.init(e, t);
|
|
2324
|
+
}), ri = /* @__PURE__ */ u("ZodE164", (e, t) => {
|
|
2325
|
+
Lr.init(e, t), y.init(e, t);
|
|
2326
|
+
}), oi = /* @__PURE__ */ u("ZodJWT", (e, t) => {
|
|
2327
|
+
Br.init(e, t), y.init(e, t);
|
|
2328
|
+
}), si = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
|
|
2329
|
+
Vr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ss();
|
|
1876
2330
|
});
|
|
1877
2331
|
function Ee() {
|
|
1878
|
-
return
|
|
2332
|
+
return /* @__PURE__ */ Co(si);
|
|
1879
2333
|
}
|
|
1880
|
-
const
|
|
1881
|
-
|
|
2334
|
+
const ii = /* @__PURE__ */ u("ZodNever", (e, t) => {
|
|
2335
|
+
qr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => os(e, n, r);
|
|
1882
2336
|
});
|
|
1883
|
-
function
|
|
1884
|
-
return
|
|
2337
|
+
function ai(e) {
|
|
2338
|
+
return /* @__PURE__ */ Uo(ii, e);
|
|
1885
2339
|
}
|
|
1886
|
-
const
|
|
1887
|
-
|
|
2340
|
+
const ci = /* @__PURE__ */ u("ZodArray", (e, t) => {
|
|
2341
|
+
Wr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => us(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ X(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ X(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ lt(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ dt(n, r)), e.unwrap = () => e.element;
|
|
1888
2342
|
});
|
|
1889
|
-
function
|
|
1890
|
-
return
|
|
2343
|
+
function ui(e, t) {
|
|
2344
|
+
return /* @__PURE__ */ Yo(ci, e, t);
|
|
1891
2345
|
}
|
|
1892
|
-
const
|
|
1893
|
-
|
|
2346
|
+
const li = /* @__PURE__ */ u("ZodObject", (e, t) => {
|
|
2347
|
+
Hr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ls(e, n, r, o), _(e, "shape", () => t.shape), e.keyof = () => _t(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Ee() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Ee() }), e.strict = () => e.clone({ ...e._zod.def, catchall: ai() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => bn(e, n), e.safeExtend = (n) => kn(e, n), e.merge = (n) => $n(e, n), e.pick = (n) => wn(e, n), e.omit = (n) => zn(e, n), e.partial = (...n) => jn(vt, e, n[0]), e.required = (...n) => xn(yt, e, n[0]);
|
|
1894
2348
|
});
|
|
1895
|
-
function
|
|
2349
|
+
function di(e, t) {
|
|
1896
2350
|
const n = {
|
|
1897
2351
|
type: "object",
|
|
1898
2352
|
shape: e ?? {},
|
|
1899
|
-
...
|
|
2353
|
+
...p(t)
|
|
1900
2354
|
};
|
|
1901
|
-
return new
|
|
2355
|
+
return new li(n);
|
|
1902
2356
|
}
|
|
1903
|
-
const
|
|
1904
|
-
|
|
2357
|
+
const fi = /* @__PURE__ */ u("ZodUnion", (e, t) => {
|
|
2358
|
+
Gr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ds(e, n, r, o), e.options = t.options;
|
|
1905
2359
|
});
|
|
1906
|
-
function
|
|
1907
|
-
return new
|
|
2360
|
+
function pi(e, t) {
|
|
2361
|
+
return new fi({
|
|
1908
2362
|
type: "union",
|
|
1909
2363
|
options: e,
|
|
1910
|
-
...
|
|
2364
|
+
...p(t)
|
|
1911
2365
|
});
|
|
1912
2366
|
}
|
|
1913
|
-
const
|
|
1914
|
-
|
|
2367
|
+
const hi = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
|
|
2368
|
+
Yr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => fs(e, n, r, o);
|
|
1915
2369
|
});
|
|
1916
|
-
function
|
|
1917
|
-
return new
|
|
2370
|
+
function mi(e, t) {
|
|
2371
|
+
return new hi({
|
|
1918
2372
|
type: "intersection",
|
|
1919
2373
|
left: e,
|
|
1920
2374
|
right: t
|
|
1921
2375
|
});
|
|
1922
2376
|
}
|
|
1923
|
-
const
|
|
1924
|
-
|
|
2377
|
+
const ce = /* @__PURE__ */ u("ZodEnum", (e, t) => {
|
|
2378
|
+
Qr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, i) => is(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
1925
2379
|
const n = new Set(Object.keys(t.entries));
|
|
1926
2380
|
e.extract = (r, o) => {
|
|
1927
|
-
const
|
|
1928
|
-
for (const
|
|
1929
|
-
if (n.has(
|
|
1930
|
-
s
|
|
2381
|
+
const i = {};
|
|
2382
|
+
for (const s of r)
|
|
2383
|
+
if (n.has(s))
|
|
2384
|
+
i[s] = t.entries[s];
|
|
1931
2385
|
else
|
|
1932
|
-
throw new Error(`Key ${
|
|
1933
|
-
return new
|
|
2386
|
+
throw new Error(`Key ${s} not found in enum`);
|
|
2387
|
+
return new ce({
|
|
1934
2388
|
...t,
|
|
1935
2389
|
checks: [],
|
|
1936
|
-
...
|
|
1937
|
-
entries:
|
|
2390
|
+
...p(o),
|
|
2391
|
+
entries: i
|
|
1938
2392
|
});
|
|
1939
2393
|
}, e.exclude = (r, o) => {
|
|
1940
|
-
const
|
|
1941
|
-
for (const
|
|
1942
|
-
if (n.has(
|
|
1943
|
-
delete s
|
|
2394
|
+
const i = { ...t.entries };
|
|
2395
|
+
for (const s of r)
|
|
2396
|
+
if (n.has(s))
|
|
2397
|
+
delete i[s];
|
|
1944
2398
|
else
|
|
1945
|
-
throw new Error(`Key ${
|
|
1946
|
-
return new
|
|
2399
|
+
throw new Error(`Key ${s} not found in enum`);
|
|
2400
|
+
return new ce({
|
|
1947
2401
|
...t,
|
|
1948
2402
|
checks: [],
|
|
1949
|
-
...
|
|
1950
|
-
entries:
|
|
2403
|
+
...p(o),
|
|
2404
|
+
entries: i
|
|
1951
2405
|
});
|
|
1952
2406
|
};
|
|
1953
2407
|
});
|
|
1954
|
-
function
|
|
2408
|
+
function _t(e, t) {
|
|
1955
2409
|
const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
|
|
1956
|
-
return new
|
|
2410
|
+
return new ce({
|
|
1957
2411
|
type: "enum",
|
|
1958
2412
|
entries: n,
|
|
1959
|
-
...
|
|
2413
|
+
...p(t)
|
|
1960
2414
|
});
|
|
1961
2415
|
}
|
|
1962
|
-
const
|
|
1963
|
-
|
|
2416
|
+
const gi = /* @__PURE__ */ u("ZodTransform", (e, t) => {
|
|
2417
|
+
Xr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => cs(e, n), e._zod.parse = (n, r) => {
|
|
1964
2418
|
if (r.direction === "backward")
|
|
1965
|
-
throw new
|
|
1966
|
-
n.addIssue = (
|
|
1967
|
-
if (typeof
|
|
1968
|
-
n.issues.push(
|
|
2419
|
+
throw new Ke(e.constructor.name);
|
|
2420
|
+
n.addIssue = (i) => {
|
|
2421
|
+
if (typeof i == "string")
|
|
2422
|
+
n.issues.push(B(i, n.value, t));
|
|
1969
2423
|
else {
|
|
1970
|
-
const
|
|
1971
|
-
|
|
2424
|
+
const s = i;
|
|
2425
|
+
s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = n.value), s.inst ?? (s.inst = e), n.issues.push(B(s));
|
|
1972
2426
|
}
|
|
1973
2427
|
};
|
|
1974
2428
|
const o = t.transform(n.value, n);
|
|
1975
|
-
return o instanceof Promise ? o.then((
|
|
2429
|
+
return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
|
|
1976
2430
|
};
|
|
1977
2431
|
});
|
|
1978
|
-
function
|
|
1979
|
-
return new
|
|
2432
|
+
function _i(e) {
|
|
2433
|
+
return new gi({
|
|
1980
2434
|
type: "transform",
|
|
1981
2435
|
transform: e
|
|
1982
2436
|
});
|
|
1983
2437
|
}
|
|
1984
|
-
const
|
|
1985
|
-
|
|
2438
|
+
const vt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
|
|
2439
|
+
ut.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => mt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
1986
2440
|
});
|
|
1987
|
-
function
|
|
1988
|
-
return new
|
|
2441
|
+
function Ne(e) {
|
|
2442
|
+
return new vt({
|
|
1989
2443
|
type: "optional",
|
|
1990
2444
|
innerType: e
|
|
1991
2445
|
});
|
|
1992
2446
|
}
|
|
1993
|
-
const
|
|
1994
|
-
|
|
2447
|
+
const vi = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
|
|
2448
|
+
eo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => mt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
1995
2449
|
});
|
|
1996
|
-
function
|
|
1997
|
-
return new
|
|
2450
|
+
function yi(e) {
|
|
2451
|
+
return new vi({
|
|
2452
|
+
type: "optional",
|
|
2453
|
+
innerType: e
|
|
2454
|
+
});
|
|
2455
|
+
}
|
|
2456
|
+
const wi = /* @__PURE__ */ u("ZodNullable", (e, t) => {
|
|
2457
|
+
to.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ps(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2458
|
+
});
|
|
2459
|
+
function Ie(e) {
|
|
2460
|
+
return new wi({
|
|
1998
2461
|
type: "nullable",
|
|
1999
2462
|
innerType: e
|
|
2000
2463
|
});
|
|
2001
2464
|
}
|
|
2002
|
-
const
|
|
2003
|
-
|
|
2465
|
+
const zi = /* @__PURE__ */ u("ZodDefault", (e, t) => {
|
|
2466
|
+
no.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ms(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
2004
2467
|
});
|
|
2005
|
-
function
|
|
2006
|
-
return new
|
|
2468
|
+
function bi(e, t) {
|
|
2469
|
+
return new zi({
|
|
2007
2470
|
type: "default",
|
|
2008
2471
|
innerType: e,
|
|
2009
2472
|
get defaultValue() {
|
|
2010
|
-
return typeof t == "function" ? t() :
|
|
2473
|
+
return typeof t == "function" ? t() : Qe(t);
|
|
2011
2474
|
}
|
|
2012
2475
|
});
|
|
2013
2476
|
}
|
|
2014
|
-
const
|
|
2015
|
-
|
|
2477
|
+
const ki = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
|
|
2478
|
+
ro.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => gs(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2016
2479
|
});
|
|
2017
|
-
function
|
|
2018
|
-
return new
|
|
2480
|
+
function $i(e, t) {
|
|
2481
|
+
return new ki({
|
|
2019
2482
|
type: "prefault",
|
|
2020
2483
|
innerType: e,
|
|
2021
2484
|
get defaultValue() {
|
|
2022
|
-
return typeof t == "function" ? t() :
|
|
2485
|
+
return typeof t == "function" ? t() : Qe(t);
|
|
2023
2486
|
}
|
|
2024
2487
|
});
|
|
2025
2488
|
}
|
|
2026
|
-
const
|
|
2027
|
-
|
|
2489
|
+
const yt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
|
|
2490
|
+
oo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => hs(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2028
2491
|
});
|
|
2029
|
-
function
|
|
2030
|
-
return new
|
|
2492
|
+
function ji(e, t) {
|
|
2493
|
+
return new yt({
|
|
2031
2494
|
type: "nonoptional",
|
|
2032
2495
|
innerType: e,
|
|
2033
|
-
...
|
|
2496
|
+
...p(t)
|
|
2034
2497
|
});
|
|
2035
2498
|
}
|
|
2036
|
-
const
|
|
2037
|
-
|
|
2499
|
+
const xi = /* @__PURE__ */ u("ZodCatch", (e, t) => {
|
|
2500
|
+
so.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => _s(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
2038
2501
|
});
|
|
2039
|
-
function
|
|
2040
|
-
return new
|
|
2502
|
+
function Zi(e, t) {
|
|
2503
|
+
return new xi({
|
|
2041
2504
|
type: "catch",
|
|
2042
2505
|
innerType: e,
|
|
2043
2506
|
catchValue: typeof t == "function" ? t : () => t
|
|
2044
2507
|
});
|
|
2045
2508
|
}
|
|
2046
|
-
const
|
|
2047
|
-
|
|
2509
|
+
const Oi = /* @__PURE__ */ u("ZodPipe", (e, t) => {
|
|
2510
|
+
io.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => vs(e, n, r, o), e.in = t.in, e.out = t.out;
|
|
2048
2511
|
});
|
|
2049
|
-
function
|
|
2050
|
-
return new
|
|
2512
|
+
function Ae(e, t) {
|
|
2513
|
+
return new Oi({
|
|
2051
2514
|
type: "pipe",
|
|
2052
2515
|
in: e,
|
|
2053
2516
|
out: t
|
|
2054
2517
|
// ...util.normalizeParams(params),
|
|
2055
2518
|
});
|
|
2056
2519
|
}
|
|
2057
|
-
const
|
|
2058
|
-
|
|
2520
|
+
const Si = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
|
|
2521
|
+
ao.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ys(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2059
2522
|
});
|
|
2060
|
-
function
|
|
2061
|
-
return new
|
|
2523
|
+
function Pi(e) {
|
|
2524
|
+
return new Si({
|
|
2062
2525
|
type: "readonly",
|
|
2063
2526
|
innerType: e
|
|
2064
2527
|
});
|
|
2065
2528
|
}
|
|
2066
|
-
const
|
|
2067
|
-
|
|
2529
|
+
const Ti = /* @__PURE__ */ u("ZodCustom", (e, t) => {
|
|
2530
|
+
co.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => as(e, n);
|
|
2068
2531
|
});
|
|
2069
|
-
function
|
|
2070
|
-
return
|
|
2532
|
+
function Ei(e, t = {}) {
|
|
2533
|
+
return /* @__PURE__ */ Qo(Ti, e, t);
|
|
2071
2534
|
}
|
|
2072
|
-
function
|
|
2073
|
-
return
|
|
2535
|
+
function Ni(e) {
|
|
2536
|
+
return /* @__PURE__ */ Xo(e);
|
|
2074
2537
|
}
|
|
2075
|
-
const
|
|
2076
|
-
buildId:
|
|
2077
|
-
timestamp:
|
|
2078
|
-
status:
|
|
2079
|
-
}),
|
|
2538
|
+
const Ii = di({
|
|
2539
|
+
buildId: Pe(),
|
|
2540
|
+
timestamp: Pe(),
|
|
2541
|
+
status: _t(["in-progress", "success", "failed"])
|
|
2542
|
+
}), Ai = ({
|
|
2080
2543
|
buildId: e,
|
|
2081
2544
|
environmentType: t,
|
|
2082
2545
|
endpoint: n = "/__zuplo/docs"
|
|
2083
2546
|
}) => {
|
|
2084
|
-
const r =
|
|
2547
|
+
const r = Pt({
|
|
2085
2548
|
queryKey: ["zuplo-build-check", e, n],
|
|
2086
2549
|
refetchInterval: 3e3,
|
|
2087
2550
|
enabled: e !== void 0 && t === "WORKING_COPY",
|
|
2088
2551
|
retry: !1,
|
|
2089
|
-
queryFn: () => fetch(n, { signal: AbortSignal.timeout(2e3) }).then((
|
|
2090
|
-
if (!
|
|
2091
|
-
return
|
|
2092
|
-
}).then((
|
|
2552
|
+
queryFn: () => fetch(n, { signal: AbortSignal.timeout(2e3) }).then((i) => {
|
|
2553
|
+
if (!i.ok) throw new Error("Failed to fetch build status");
|
|
2554
|
+
return i.json();
|
|
2555
|
+
}).then((i) => Ii.parse(i))
|
|
2093
2556
|
});
|
|
2094
|
-
if (
|
|
2557
|
+
if (te(() => {
|
|
2095
2558
|
r.data?.status === "success" && r.data.buildId && (document.cookie = `zuplo-build=${r.data.buildId}; path=/; max-age=300; secure; SameSite=None`);
|
|
2096
2559
|
}, [r.data]), r.isError || !r.data || r.data.buildId === e)
|
|
2097
2560
|
return null;
|
|
2098
2561
|
const o = r.data.status === "success";
|
|
2099
|
-
return /* @__PURE__ */
|
|
2100
|
-
o ? /* @__PURE__ */
|
|
2101
|
-
/* @__PURE__ */
|
|
2102
|
-
/* @__PURE__ */
|
|
2103
|
-
] }) : /* @__PURE__ */
|
|
2104
|
-
/* @__PURE__ */
|
|
2105
|
-
/* @__PURE__ */
|
|
2562
|
+
return /* @__PURE__ */ c.jsxs("div", { className: "fixed flex flex-col gap-3 p-4 rounded-xl w-96 border z-20 bg-background left-0 right-0 top-4 mx-auto shadow-lg", children: [
|
|
2563
|
+
o ? /* @__PURE__ */ c.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
|
|
2564
|
+
/* @__PURE__ */ c.jsx(Bt, { size: 16 }),
|
|
2565
|
+
/* @__PURE__ */ c.jsx("span", { className: "text-sm", children: "New version available" })
|
|
2566
|
+
] }) : /* @__PURE__ */ c.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
|
|
2567
|
+
/* @__PURE__ */ c.jsx(Vt, { size: 16, className: "animate-spin" }),
|
|
2568
|
+
/* @__PURE__ */ c.jsx("span", { className: "text-sm", children: "Building new version..." })
|
|
2106
2569
|
] }),
|
|
2107
|
-
/* @__PURE__ */
|
|
2108
|
-
o && /* @__PURE__ */
|
|
2109
|
-
|
|
2570
|
+
/* @__PURE__ */ c.jsx("span", { className: "text-xs", children: o ? "To see the new version, reload the page now." : "A new version of the developer portal will be available soon." }),
|
|
2571
|
+
o && /* @__PURE__ */ c.jsx(
|
|
2572
|
+
Ht,
|
|
2110
2573
|
{
|
|
2111
2574
|
variant: "outline",
|
|
2112
2575
|
size: "sm",
|
|
@@ -2118,52 +2581,52 @@ const Qs = Is({
|
|
|
2118
2581
|
}
|
|
2119
2582
|
)
|
|
2120
2583
|
] });
|
|
2121
|
-
},
|
|
2122
|
-
const e =
|
|
2123
|
-
|
|
2584
|
+
}, Ri = () => {
|
|
2585
|
+
const e = Le(), t = Je(e.pathname);
|
|
2586
|
+
te(() => {
|
|
2124
2587
|
const n = t.current !== e.pathname, r = e.hash !== "";
|
|
2125
2588
|
n && !r && window.scrollTo(0, 0), t.current = e.pathname;
|
|
2126
2589
|
}, [e.pathname, e.hash]);
|
|
2127
|
-
},
|
|
2590
|
+
}, Di = ({
|
|
2128
2591
|
icon: e
|
|
2129
|
-
}) => typeof e == "string" ? /* @__PURE__ */
|
|
2592
|
+
}) => typeof e == "string" ? /* @__PURE__ */ c.jsx(
|
|
2130
2593
|
"img",
|
|
2131
2594
|
{
|
|
2132
2595
|
src: `https://cdn.simpleicons.org/${e}/000000/ffffff`,
|
|
2133
2596
|
className: "size-5",
|
|
2134
2597
|
alt: e
|
|
2135
2598
|
}
|
|
2136
|
-
) : e,
|
|
2137
|
-
const { site: e } =
|
|
2138
|
-
return t ? /* @__PURE__ */
|
|
2139
|
-
/* @__PURE__ */
|
|
2599
|
+
) : e, Ci = (e) => /^https?:/.test(e), Ui = () => {
|
|
2600
|
+
const { site: e } = q(), t = e?.footer;
|
|
2601
|
+
return t ? /* @__PURE__ */ c.jsx("footer", { className: "border-t bg-background", children: /* @__PURE__ */ c.jsxs("div", { className: "mx-auto max-w-screen-2xl px-4 lg:px-8 py-8 pt-20", children: [
|
|
2602
|
+
/* @__PURE__ */ c.jsxs(
|
|
2140
2603
|
"div",
|
|
2141
2604
|
{
|
|
2142
|
-
className:
|
|
2605
|
+
className: S("flex flex-row gap-8", {
|
|
2143
2606
|
"justify-center": !t.position || t.position === "center",
|
|
2144
2607
|
"justify-start": t.position === "start",
|
|
2145
2608
|
"justify-end": t.position === "end"
|
|
2146
2609
|
}),
|
|
2147
2610
|
children: [
|
|
2148
|
-
/* @__PURE__ */
|
|
2149
|
-
t.columns && /* @__PURE__ */
|
|
2611
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "footer-before" }),
|
|
2612
|
+
t.columns && /* @__PURE__ */ c.jsx(
|
|
2150
2613
|
"div",
|
|
2151
2614
|
{
|
|
2152
2615
|
className: "w-full md:max-w-screen-md grid grid-cols-[1fr_1fr] gap-8 md:grid-cols-[repeat(var(--columns),minmax(0,1fr))]",
|
|
2153
2616
|
style: { "--columns": t.columns.length },
|
|
2154
|
-
children: t.columns.map((n) => /* @__PURE__ */
|
|
2617
|
+
children: t.columns.map((n) => /* @__PURE__ */ c.jsxs(
|
|
2155
2618
|
"div",
|
|
2156
2619
|
{
|
|
2157
|
-
className:
|
|
2620
|
+
className: S({
|
|
2158
2621
|
"justify-self-center": !n.position || n.position === "center",
|
|
2159
2622
|
"justify-self-start": n.position === "start",
|
|
2160
2623
|
"justify-self-end": n.position === "end"
|
|
2161
2624
|
}),
|
|
2162
2625
|
children: [
|
|
2163
|
-
/* @__PURE__ */
|
|
2164
|
-
/* @__PURE__ */
|
|
2626
|
+
/* @__PURE__ */ c.jsx("span", { className: "text-sm font-semibold", children: n.title }),
|
|
2627
|
+
/* @__PURE__ */ c.jsx("ul", { className: "mt-4 space-y-2", children: n.links.map((r) => {
|
|
2165
2628
|
const o = "flex flex-row gap-1 items-center text-sm text-muted-foreground hover:text-accent-foreground";
|
|
2166
|
-
return /* @__PURE__ */
|
|
2629
|
+
return /* @__PURE__ */ c.jsx("li", { children: Ci(r.href) ? /* @__PURE__ */ c.jsxs(
|
|
2167
2630
|
"a",
|
|
2168
2631
|
{
|
|
2169
2632
|
href: r.href,
|
|
@@ -2171,11 +2634,11 @@ const Qs = Is({
|
|
|
2171
2634
|
rel: "noopener noreferrer",
|
|
2172
2635
|
className: o,
|
|
2173
2636
|
children: [
|
|
2174
|
-
/* @__PURE__ */
|
|
2175
|
-
/* @__PURE__ */
|
|
2637
|
+
/* @__PURE__ */ c.jsx("span", { children: r.label }),
|
|
2638
|
+
/* @__PURE__ */ c.jsx(qt, { size: 12 })
|
|
2176
2639
|
]
|
|
2177
2640
|
}
|
|
2178
|
-
) : /* @__PURE__ */
|
|
2641
|
+
) : /* @__PURE__ */ c.jsx(Gt, { to: r.href, className: o, children: /* @__PURE__ */ c.jsx("span", { children: r.label }) }) }, r.href + r.label);
|
|
2179
2642
|
}) })
|
|
2180
2643
|
]
|
|
2181
2644
|
},
|
|
@@ -2183,20 +2646,20 @@ const Qs = Is({
|
|
|
2183
2646
|
))
|
|
2184
2647
|
}
|
|
2185
2648
|
),
|
|
2186
|
-
/* @__PURE__ */
|
|
2649
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "footer-after" })
|
|
2187
2650
|
]
|
|
2188
2651
|
}
|
|
2189
2652
|
),
|
|
2190
|
-
/* @__PURE__ */
|
|
2653
|
+
/* @__PURE__ */ c.jsxs(
|
|
2191
2654
|
"div",
|
|
2192
2655
|
{
|
|
2193
|
-
className:
|
|
2656
|
+
className: S(
|
|
2194
2657
|
"flex items-center justify-between",
|
|
2195
2658
|
t.columns && "border-t mt-8 pt-8"
|
|
2196
2659
|
),
|
|
2197
2660
|
children: [
|
|
2198
|
-
t.logo && /* @__PURE__ */
|
|
2199
|
-
/* @__PURE__ */
|
|
2661
|
+
t.logo && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
2662
|
+
/* @__PURE__ */ c.jsx(
|
|
2200
2663
|
"img",
|
|
2201
2664
|
{
|
|
2202
2665
|
src: t.logo.src.light,
|
|
@@ -2205,7 +2668,7 @@ const Qs = Is({
|
|
|
2205
2668
|
style: { width: t.logo.width }
|
|
2206
2669
|
}
|
|
2207
2670
|
),
|
|
2208
|
-
/* @__PURE__ */
|
|
2671
|
+
/* @__PURE__ */ c.jsx(
|
|
2209
2672
|
"img",
|
|
2210
2673
|
{
|
|
2211
2674
|
src: t.logo.src.dark,
|
|
@@ -2215,8 +2678,8 @@ const Qs = Is({
|
|
|
2215
2678
|
}
|
|
2216
2679
|
)
|
|
2217
2680
|
] }),
|
|
2218
|
-
t.copyright && /* @__PURE__ */
|
|
2219
|
-
/* @__PURE__ */
|
|
2681
|
+
t.copyright && /* @__PURE__ */ c.jsx("p", { className: "text-sm text-muted-foreground", children: t.copyright }),
|
|
2682
|
+
/* @__PURE__ */ c.jsx("div", { className: "flex items-center gap-2", children: t.social?.map((n) => /* @__PURE__ */ c.jsxs(
|
|
2220
2683
|
"a",
|
|
2221
2684
|
{
|
|
2222
2685
|
href: n.href,
|
|
@@ -2224,7 +2687,7 @@ const Qs = Is({
|
|
|
2224
2687
|
rel: "noopener noreferrer",
|
|
2225
2688
|
className: "w-auto gap-2 flex text-muted-foreground hover:text-accent-foreground",
|
|
2226
2689
|
children: [
|
|
2227
|
-
/* @__PURE__ */
|
|
2690
|
+
/* @__PURE__ */ c.jsx(Di, { icon: n.icon }),
|
|
2228
2691
|
n.label
|
|
2229
2692
|
]
|
|
2230
2693
|
},
|
|
@@ -2234,87 +2697,87 @@ const Qs = Is({
|
|
|
2234
2697
|
}
|
|
2235
2698
|
)
|
|
2236
2699
|
] }) }) : null;
|
|
2237
|
-
},
|
|
2700
|
+
}, wt = ({
|
|
2238
2701
|
shouldScaleBackground: e = !0,
|
|
2239
2702
|
...t
|
|
2240
|
-
}) => /* @__PURE__ */
|
|
2241
|
-
|
|
2703
|
+
}) => /* @__PURE__ */ c.jsx(
|
|
2704
|
+
T.Root,
|
|
2242
2705
|
{
|
|
2243
2706
|
shouldScaleBackground: e,
|
|
2244
2707
|
...t
|
|
2245
2708
|
}
|
|
2246
2709
|
);
|
|
2247
|
-
|
|
2248
|
-
const
|
|
2249
|
-
|
|
2710
|
+
wt.displayName = "Drawer";
|
|
2711
|
+
const Fi = T.Trigger, Ji = T.Portal, zt = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
2712
|
+
T.Overlay,
|
|
2250
2713
|
{
|
|
2251
2714
|
ref: n,
|
|
2252
|
-
className:
|
|
2715
|
+
className: S("fixed inset-0 z-50 bg-black/80", e),
|
|
2253
2716
|
...t
|
|
2254
2717
|
}
|
|
2255
2718
|
));
|
|
2256
|
-
|
|
2257
|
-
const
|
|
2258
|
-
({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */
|
|
2259
|
-
/* @__PURE__ */
|
|
2260
|
-
/* @__PURE__ */
|
|
2261
|
-
|
|
2719
|
+
zt.displayName = T.Overlay.displayName;
|
|
2720
|
+
const Li = V.forwardRef(
|
|
2721
|
+
({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ c.jsxs(Ji, { children: [
|
|
2722
|
+
/* @__PURE__ */ c.jsx(zt, {}),
|
|
2723
|
+
/* @__PURE__ */ c.jsxs(
|
|
2724
|
+
T.Content,
|
|
2262
2725
|
{
|
|
2263
2726
|
ref: o,
|
|
2264
|
-
className:
|
|
2727
|
+
className: S(
|
|
2265
2728
|
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
2266
2729
|
e
|
|
2267
2730
|
),
|
|
2268
2731
|
...r,
|
|
2269
2732
|
children: [
|
|
2270
|
-
!n && /* @__PURE__ */
|
|
2733
|
+
!n && /* @__PURE__ */ c.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
2271
2734
|
t
|
|
2272
2735
|
]
|
|
2273
2736
|
}
|
|
2274
2737
|
)
|
|
2275
2738
|
] })
|
|
2276
2739
|
);
|
|
2277
|
-
|
|
2278
|
-
const
|
|
2279
|
-
|
|
2740
|
+
Li.displayName = "DrawerContent";
|
|
2741
|
+
const Mi = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
2742
|
+
T.Title,
|
|
2280
2743
|
{
|
|
2281
2744
|
ref: n,
|
|
2282
|
-
className:
|
|
2745
|
+
className: S(
|
|
2283
2746
|
"text-lg font-semibold leading-none tracking-tight",
|
|
2284
2747
|
e
|
|
2285
2748
|
),
|
|
2286
2749
|
...t
|
|
2287
2750
|
}
|
|
2288
2751
|
));
|
|
2289
|
-
|
|
2290
|
-
const
|
|
2291
|
-
|
|
2752
|
+
Mi.displayName = T.Title.displayName;
|
|
2753
|
+
const Bi = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
2754
|
+
T.Description,
|
|
2292
2755
|
{
|
|
2293
2756
|
ref: n,
|
|
2294
|
-
className:
|
|
2757
|
+
className: S("text-sm text-muted-foreground", e),
|
|
2295
2758
|
...t
|
|
2296
2759
|
}
|
|
2297
2760
|
));
|
|
2298
|
-
|
|
2299
|
-
const
|
|
2761
|
+
Bi.displayName = T.Description.displayName;
|
|
2762
|
+
const bt = ({
|
|
2300
2763
|
children: e,
|
|
2301
2764
|
className: t
|
|
2302
2765
|
}) => {
|
|
2303
|
-
const { options: n } =
|
|
2304
|
-
return
|
|
2766
|
+
const { options: n } = q(), r = Je(null);
|
|
2767
|
+
return te(() => {
|
|
2305
2768
|
const o = r.current?.querySelector('[aria-current="page"]');
|
|
2306
|
-
|
|
2307
|
-
}, []), /* @__PURE__ */
|
|
2769
|
+
Yt(o ?? null);
|
|
2770
|
+
}, []), /* @__PURE__ */ c.jsxs(
|
|
2308
2771
|
"div",
|
|
2309
2772
|
{
|
|
2310
2773
|
className: "grid sticky top-(--header-height) lg:h-[calc(100vh-var(--header-height))] grid-rows-[1fr_min-content] border-r",
|
|
2311
2774
|
"data-pagefind-ignore": "all",
|
|
2312
2775
|
children: [
|
|
2313
|
-
/* @__PURE__ */
|
|
2776
|
+
/* @__PURE__ */ c.jsx(
|
|
2314
2777
|
"nav",
|
|
2315
2778
|
{
|
|
2316
2779
|
ref: r,
|
|
2317
|
-
className:
|
|
2780
|
+
className: S(
|
|
2318
2781
|
"hidden max-w-[calc(var(--side-nav-width)+var(--padding-nav-item))] lg:flex scrollbar flex-col overflow-y-auto shrink-0 text-sm pe-3 ps-4 lg:ps-8",
|
|
2319
2782
|
"-mx-(--padding-nav-item) pb-[8vh] pt-(--padding-content-top) scroll-pt-2 gap-1",
|
|
2320
2783
|
// Revert the padding/margin on the first child
|
|
@@ -2327,36 +2790,36 @@ const dt = ({
|
|
|
2327
2790
|
children: e
|
|
2328
2791
|
}
|
|
2329
2792
|
),
|
|
2330
|
-
/* @__PURE__ */
|
|
2793
|
+
/* @__PURE__ */ c.jsx("div", { className: "bg-background border-t p-2 mx-5 gap-2 items-center mt-2 drop-shadow-[0_-3px_1px_rgba(0,0,0,0.015)] hidden lg:[&:has(>_:nth-child(1):last-child)]:flex", children: n.site?.showPoweredBy !== !1 && /* @__PURE__ */ c.jsx(Qt, {}) })
|
|
2331
2794
|
]
|
|
2332
2795
|
}
|
|
2333
2796
|
);
|
|
2334
2797
|
};
|
|
2335
|
-
|
|
2336
|
-
const
|
|
2798
|
+
bt.displayName = "NavigationWrapper";
|
|
2799
|
+
const Vi = ({
|
|
2337
2800
|
onRequestClose: e,
|
|
2338
2801
|
navigation: t
|
|
2339
|
-
}) => /* @__PURE__ */
|
|
2340
|
-
/* @__PURE__ */
|
|
2341
|
-
/* @__PURE__ */
|
|
2342
|
-
t.map((n) => /* @__PURE__ */
|
|
2343
|
-
|
|
2802
|
+
}) => /* @__PURE__ */ c.jsxs(Xt, { children: [
|
|
2803
|
+
/* @__PURE__ */ c.jsxs(bt, { children: [
|
|
2804
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "navigation-before" }),
|
|
2805
|
+
t.map((n) => /* @__PURE__ */ c.jsx(
|
|
2806
|
+
ge,
|
|
2344
2807
|
{
|
|
2345
2808
|
item: n
|
|
2346
2809
|
},
|
|
2347
2810
|
n.type + (n.label ?? "") + ("path" in n ? n.path : "") + ("file" in n ? n.file : "") + ("to" in n ? n.to : "")
|
|
2348
2811
|
)),
|
|
2349
|
-
/* @__PURE__ */
|
|
2812
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "navigation-after" })
|
|
2350
2813
|
] }),
|
|
2351
|
-
/* @__PURE__ */
|
|
2352
|
-
|
|
2814
|
+
/* @__PURE__ */ c.jsx(
|
|
2815
|
+
an,
|
|
2353
2816
|
{
|
|
2354
|
-
className: "lg:hidden h-
|
|
2817
|
+
className: "lg:hidden h-dvh start-0 w-[320px] rounded-none",
|
|
2355
2818
|
"aria-describedby": void 0,
|
|
2356
|
-
children: /* @__PURE__ */
|
|
2357
|
-
/* @__PURE__ */
|
|
2358
|
-
t.map((n) => /* @__PURE__ */
|
|
2359
|
-
|
|
2819
|
+
children: /* @__PURE__ */ c.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
|
|
2820
|
+
/* @__PURE__ */ c.jsx(un, { children: /* @__PURE__ */ c.jsx(cn, { children: "Navigation" }) }),
|
|
2821
|
+
t.map((n) => /* @__PURE__ */ c.jsx(
|
|
2822
|
+
ge,
|
|
2360
2823
|
{
|
|
2361
2824
|
item: n,
|
|
2362
2825
|
onRequestClose: e
|
|
@@ -2366,113 +2829,113 @@ const ui = ({
|
|
|
2366
2829
|
] })
|
|
2367
2830
|
}
|
|
2368
2831
|
)
|
|
2369
|
-
] }),
|
|
2370
|
-
const [t, n] =
|
|
2371
|
-
return /* @__PURE__ */
|
|
2372
|
-
|
|
2832
|
+
] }), qi = ({ children: e }) => {
|
|
2833
|
+
const [t, n] = Tt(!1), { navigation: r } = on(), o = r.length > 0, i = Rt().state === "loading", { options: s } = q();
|
|
2834
|
+
return /* @__PURE__ */ c.jsxs(
|
|
2835
|
+
wt,
|
|
2373
2836
|
{
|
|
2374
|
-
direction:
|
|
2837
|
+
direction: s.site?.dir === "rtl" ? "right" : "left",
|
|
2375
2838
|
open: t,
|
|
2376
|
-
onOpenChange: (
|
|
2839
|
+
onOpenChange: (a) => n(a),
|
|
2377
2840
|
children: [
|
|
2378
|
-
o && /* @__PURE__ */
|
|
2379
|
-
|
|
2841
|
+
o && /* @__PURE__ */ c.jsx(
|
|
2842
|
+
Vi,
|
|
2380
2843
|
{
|
|
2381
2844
|
onRequestClose: () => n(!1),
|
|
2382
2845
|
navigation: r
|
|
2383
2846
|
}
|
|
2384
2847
|
),
|
|
2385
|
-
o && /* @__PURE__ */
|
|
2386
|
-
/* @__PURE__ */
|
|
2387
|
-
/* @__PURE__ */
|
|
2848
|
+
o && /* @__PURE__ */ c.jsx("div", { className: "lg:hidden m-0 p-0 md:-mx-4 md:px-4 py-2 sticky bg-background/80 backdrop-blur-xs z-10 top-0 start-0 end-0 border-b", children: /* @__PURE__ */ c.jsxs(Fi, { className: "flex items-center gap-2 px-4", children: [
|
|
2849
|
+
/* @__PURE__ */ c.jsx(Wt, { size: 16, strokeWidth: 1.5 }),
|
|
2850
|
+
/* @__PURE__ */ c.jsx("span", { className: "text-sm", children: "Menu" })
|
|
2388
2851
|
] }) }),
|
|
2389
|
-
/* @__PURE__ */
|
|
2852
|
+
/* @__PURE__ */ c.jsxs(
|
|
2390
2853
|
"main",
|
|
2391
2854
|
{
|
|
2392
2855
|
"data-pagefind-body": !0,
|
|
2393
|
-
className:
|
|
2856
|
+
className: S(
|
|
2394
2857
|
"px-4 lg:pe-8 lg:px-8",
|
|
2395
2858
|
!o && "col-span-full",
|
|
2396
|
-
|
|
2859
|
+
i && "animate-pulse"
|
|
2397
2860
|
),
|
|
2398
2861
|
children: [
|
|
2399
|
-
/* @__PURE__ */
|
|
2862
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "content-before" }),
|
|
2400
2863
|
e,
|
|
2401
|
-
/* @__PURE__ */
|
|
2864
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "content-after" })
|
|
2402
2865
|
]
|
|
2403
2866
|
}
|
|
2404
2867
|
)
|
|
2405
2868
|
]
|
|
2406
2869
|
}
|
|
2407
2870
|
);
|
|
2408
|
-
},
|
|
2409
|
-
const { authentication: t } =
|
|
2410
|
-
return
|
|
2871
|
+
}, Wi = () => /* @__PURE__ */ c.jsx("main", { className: "col-span-full row-span-full grid place-items-center", children: /* @__PURE__ */ c.jsx(ln, {}) }), Ki = ({ children: e }) => {
|
|
2872
|
+
const { authentication: t } = q();
|
|
2873
|
+
return en(), Ri(), te(() => {
|
|
2411
2874
|
t?.onPageLoad?.();
|
|
2412
|
-
}, [t]), /* @__PURE__ */
|
|
2413
|
-
/* @__PURE__ */
|
|
2414
|
-
/* @__PURE__ */
|
|
2415
|
-
/* @__PURE__ */
|
|
2416
|
-
/* @__PURE__ */
|
|
2875
|
+
}, [t]), /* @__PURE__ */ c.jsxs(tn, { children: [
|
|
2876
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "layout-before-head" }),
|
|
2877
|
+
/* @__PURE__ */ c.jsx(nn, {}),
|
|
2878
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "layout-after-head" }),
|
|
2879
|
+
/* @__PURE__ */ c.jsx(
|
|
2417
2880
|
"div",
|
|
2418
2881
|
{
|
|
2419
|
-
className:
|
|
2882
|
+
className: S(
|
|
2420
2883
|
"grid max-w-screen-2xl w-full lg:mx-auto",
|
|
2421
2884
|
"[&:has(>:only-child)]:grid-rows-1 grid-rows-[0_min-content_1fr] lg:grid-rows-[min-content_1fr]",
|
|
2422
2885
|
"grid-cols-1 lg:grid-cols-[var(--side-nav-width)_1fr]"
|
|
2423
2886
|
),
|
|
2424
|
-
children: /* @__PURE__ */
|
|
2887
|
+
children: /* @__PURE__ */ c.jsx(Et, { fallback: /* @__PURE__ */ c.jsx(Wi, {}), children: /* @__PURE__ */ c.jsx(qi, { children: e ?? /* @__PURE__ */ c.jsx(Dt, {}) }) })
|
|
2425
2888
|
}
|
|
2426
2889
|
),
|
|
2427
|
-
/* @__PURE__ */
|
|
2890
|
+
/* @__PURE__ */ c.jsx(Ui, {})
|
|
2428
2891
|
] });
|
|
2429
|
-
},
|
|
2430
|
-
const { meta: t, options: n } =
|
|
2431
|
-
return /* @__PURE__ */
|
|
2432
|
-
/* @__PURE__ */
|
|
2433
|
-
n.canonicalUrlOrigin && /* @__PURE__ */
|
|
2892
|
+
}, Hi = ({ children: e }) => {
|
|
2893
|
+
const { meta: t, options: n } = q(), r = Le();
|
|
2894
|
+
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
2895
|
+
/* @__PURE__ */ c.jsxs(Ce, { titleTemplate: t?.title, defaultTitle: t?.defaultTitle, children: [
|
|
2896
|
+
n.canonicalUrlOrigin && /* @__PURE__ */ c.jsx(
|
|
2434
2897
|
"link",
|
|
2435
2898
|
{
|
|
2436
2899
|
rel: "canonical",
|
|
2437
|
-
href:
|
|
2900
|
+
href: sn(
|
|
2438
2901
|
n.canonicalUrlOrigin,
|
|
2439
2902
|
n.basePath,
|
|
2440
2903
|
r.pathname
|
|
2441
2904
|
)
|
|
2442
2905
|
}
|
|
2443
2906
|
),
|
|
2444
|
-
t?.description && /* @__PURE__ */
|
|
2445
|
-
t?.favicon && /* @__PURE__ */
|
|
2446
|
-
t?.generator && /* @__PURE__ */
|
|
2447
|
-
t?.applicationName && /* @__PURE__ */
|
|
2448
|
-
t?.referrer && /* @__PURE__ */
|
|
2449
|
-
t?.keywords && t.keywords.length > 0 && /* @__PURE__ */
|
|
2450
|
-
t?.authors?.map((o) => /* @__PURE__ */
|
|
2451
|
-
t?.creator && /* @__PURE__ */
|
|
2452
|
-
t?.publisher && /* @__PURE__ */
|
|
2907
|
+
t?.description && /* @__PURE__ */ c.jsx("meta", { name: "description", content: t.description }),
|
|
2908
|
+
t?.favicon && /* @__PURE__ */ c.jsx("link", { rel: "icon", href: t.favicon }),
|
|
2909
|
+
t?.generator && /* @__PURE__ */ c.jsx("meta", { name: "generator", content: t.generator }),
|
|
2910
|
+
t?.applicationName && /* @__PURE__ */ c.jsx("meta", { name: "application-name", content: t.applicationName }),
|
|
2911
|
+
t?.referrer && /* @__PURE__ */ c.jsx("meta", { name: "referrer", content: t.referrer }),
|
|
2912
|
+
t?.keywords && t.keywords.length > 0 && /* @__PURE__ */ c.jsx("meta", { name: "keywords", content: t.keywords.join(", ") }),
|
|
2913
|
+
t?.authors?.map((o) => /* @__PURE__ */ c.jsx("meta", { name: "author", content: o }, o)),
|
|
2914
|
+
t?.creator && /* @__PURE__ */ c.jsx("meta", { name: "creator", content: t.creator }),
|
|
2915
|
+
t?.publisher && /* @__PURE__ */ c.jsx("meta", { name: "publisher", content: t.publisher })
|
|
2453
2916
|
] }),
|
|
2454
2917
|
e
|
|
2455
2918
|
] });
|
|
2456
|
-
},
|
|
2919
|
+
}, Gi = ({
|
|
2457
2920
|
title: e = "An error occurred",
|
|
2458
2921
|
message: t,
|
|
2459
2922
|
category: n
|
|
2460
|
-
}) => /* @__PURE__ */
|
|
2461
|
-
n && /* @__PURE__ */
|
|
2462
|
-
e && /* @__PURE__ */
|
|
2463
|
-
/* @__PURE__ */
|
|
2464
|
-
] }),
|
|
2465
|
-
const e =
|
|
2466
|
-
return /* @__PURE__ */
|
|
2467
|
-
/* @__PURE__ */
|
|
2468
|
-
/* @__PURE__ */
|
|
2923
|
+
}) => /* @__PURE__ */ c.jsxs(Be, { className: "h-full pt-(--padding-content-top)", children: [
|
|
2924
|
+
n && /* @__PURE__ */ c.jsx(We, { children: n }),
|
|
2925
|
+
e && /* @__PURE__ */ c.jsx(Ve, { level: 1, className: "flex gap-3.5 items-center", children: e }),
|
|
2926
|
+
/* @__PURE__ */ c.jsx("p", { children: t })
|
|
2927
|
+
] }), kt = () => {
|
|
2928
|
+
const e = Ct();
|
|
2929
|
+
return /* @__PURE__ */ c.jsxs(Be, { className: "h-full pt-(--padding-content-top)", children: [
|
|
2930
|
+
/* @__PURE__ */ c.jsx(We, { children: "404" }),
|
|
2931
|
+
/* @__PURE__ */ c.jsxs(Ve, { level: 1, className: "flex gap-3.5 items-center", children: [
|
|
2469
2932
|
"Page not found",
|
|
2470
|
-
/* @__PURE__ */
|
|
2933
|
+
/* @__PURE__ */ c.jsx(Kt, { size: 24 })
|
|
2471
2934
|
] }),
|
|
2472
|
-
/* @__PURE__ */
|
|
2935
|
+
/* @__PURE__ */ c.jsxs(rn, { children: [
|
|
2473
2936
|
"Start by adding a file at",
|
|
2474
2937
|
" ",
|
|
2475
|
-
/* @__PURE__ */
|
|
2938
|
+
/* @__PURE__ */ c.jsxs("code", { children: [
|
|
2476
2939
|
"{DOCUMENT_ROOT}",
|
|
2477
2940
|
"/",
|
|
2478
2941
|
e["*"],
|
|
@@ -2481,13 +2944,13 @@ const ui = ({
|
|
|
2481
2944
|
" ",
|
|
2482
2945
|
"and add some content to make this error go away. By default",
|
|
2483
2946
|
" ",
|
|
2484
|
-
/* @__PURE__ */
|
|
2947
|
+
/* @__PURE__ */ c.jsx("code", { children: "DOCUMENT_ROOT" }),
|
|
2485
2948
|
" is the `pages` directory."
|
|
2486
2949
|
] }),
|
|
2487
|
-
/* @__PURE__ */
|
|
2488
|
-
/* @__PURE__ */
|
|
2950
|
+
/* @__PURE__ */ c.jsx("p", { children: "It seems that the page you are looking for does not exist or may have been moved. Please check the URL for any typos or use the navigation menu to find the correct page." }),
|
|
2951
|
+
/* @__PURE__ */ c.jsx(Ut, { to: "/", children: "Go back home" })
|
|
2489
2952
|
] });
|
|
2490
|
-
},
|
|
2953
|
+
}, Yi = (e) => {
|
|
2491
2954
|
switch (e) {
|
|
2492
2955
|
case 400:
|
|
2493
2956
|
return {
|
|
@@ -2550,12 +3013,12 @@ const ui = ({
|
|
|
2550
3013
|
message: "Something went wrong while processing your request."
|
|
2551
3014
|
};
|
|
2552
3015
|
}
|
|
2553
|
-
},
|
|
3016
|
+
}, Qi = ({ statusCode: e, message: t }) => {
|
|
2554
3017
|
if (e === 404)
|
|
2555
|
-
return /* @__PURE__ */
|
|
2556
|
-
const n =
|
|
2557
|
-
return /* @__PURE__ */
|
|
2558
|
-
|
|
3018
|
+
return /* @__PURE__ */ c.jsx(kt, {});
|
|
3019
|
+
const n = Yi(e);
|
|
3020
|
+
return /* @__PURE__ */ c.jsx(
|
|
3021
|
+
Gi,
|
|
2559
3022
|
{
|
|
2560
3023
|
title: n.title,
|
|
2561
3024
|
message: t ?? n.message,
|
|
@@ -2563,24 +3026,46 @@ const ui = ({
|
|
|
2563
3026
|
}
|
|
2564
3027
|
);
|
|
2565
3028
|
};
|
|
2566
|
-
function
|
|
2567
|
-
const t =
|
|
2568
|
-
return
|
|
2569
|
-
}
|
|
2570
|
-
function
|
|
2571
|
-
return /* @__PURE__ */
|
|
2572
|
-
}
|
|
2573
|
-
const
|
|
3029
|
+
function Xi({ className: e }) {
|
|
3030
|
+
const t = Ft();
|
|
3031
|
+
return Jt(t) && t.status === 404 ? /* @__PURE__ */ c.jsx(kt, {}) : /* @__PURE__ */ c.jsx("div", { className: S("mx-4 max-w-2xl", e), children: /* @__PURE__ */ c.jsx(qe, { error: t }) });
|
|
3032
|
+
}
|
|
3033
|
+
function ea({ error: e }) {
|
|
3034
|
+
return /* @__PURE__ */ c.jsx(qe, { error: e });
|
|
3035
|
+
}
|
|
3036
|
+
const Re = (e) => typeof e == "object" && e !== null && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype, $t = (e, t) => {
|
|
3037
|
+
const n = { ...e };
|
|
3038
|
+
for (const r of Object.keys(t)) {
|
|
3039
|
+
const o = t[r], i = e[r];
|
|
3040
|
+
Nt(o) || Array.isArray(o) || !Re(o) ? n[r] = o : Re(i) ? n[r] = $t(
|
|
3041
|
+
i,
|
|
3042
|
+
o
|
|
3043
|
+
) : n[r] = o;
|
|
3044
|
+
}
|
|
3045
|
+
return n;
|
|
3046
|
+
}, ta = async (e) => {
|
|
3047
|
+
const t = e.plugins ?? [];
|
|
3048
|
+
let n = e;
|
|
3049
|
+
for (const r of t.filter(dn)) {
|
|
3050
|
+
const o = (s) => $t(n, s), i = await r.transformConfig?.({
|
|
3051
|
+
config: n,
|
|
3052
|
+
merge: o
|
|
3053
|
+
});
|
|
3054
|
+
i && (n = i);
|
|
3055
|
+
}
|
|
3056
|
+
return n;
|
|
3057
|
+
}, ba = Ki, ka = Xi, $a = ea, ja = hn, xa = mn, Za = Mt, Oa = Ce, Sa = Qi, Pa = Ai, Ta = Hi, Ea = ta;
|
|
2574
3058
|
export {
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
3059
|
+
ja as Bootstrap,
|
|
3060
|
+
xa as BootstrapStatic,
|
|
3061
|
+
Pa as BuildCheck,
|
|
3062
|
+
Oa as Head,
|
|
3063
|
+
ba as Layout,
|
|
3064
|
+
Ta as Meta,
|
|
3065
|
+
Za as RouteGuard,
|
|
3066
|
+
ka as RouterError,
|
|
3067
|
+
$a as ServerError,
|
|
3068
|
+
Sa as StatusPage,
|
|
3069
|
+
Ea as runPluginTransformConfig
|
|
2585
3070
|
};
|
|
2586
3071
|
//# sourceMappingURL=zudoku.__internal.js.map
|