zudoku 0.0.0-zabced09d → 0.0.0-zc17c4c22

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