@rebasepro/server 0.17.3 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/LICENSE +0 -1
  2. package/README.md +5 -1
  3. package/bin/rebase-server.js +16 -1
  4. package/dist/{GCSStorageController-Bl7nmhdv.js → GCSStorageController-ZXPoNqW3.js} +21 -10
  5. package/dist/GCSStorageController-ZXPoNqW3.js.map +1 -0
  6. package/dist/{S3StorageController-CWvvrRpF.js → S3StorageController-5pAXyv31.js} +24 -10
  7. package/dist/S3StorageController-5pAXyv31.js.map +1 -0
  8. package/dist/admin-roles-vYdp_Pil.js +36 -0
  9. package/dist/admin-roles-vYdp_Pil.js.map +1 -0
  10. package/dist/{admin_block-BX6YULvJ.js → admin_block-0Xu0r6eZ.js} +4 -1
  11. package/dist/admin_block-0Xu0r6eZ.js.map +1 -0
  12. package/dist/api/errors.d.ts +37 -0
  13. package/dist/api/live-schema-routes.d.ts +14 -0
  14. package/dist/api/logs-routes.d.ts +8 -0
  15. package/dist/api/rest/api-generator.d.ts +33 -0
  16. package/dist/api/root-error-handler.d.ts +62 -0
  17. package/dist/api/schema-drift.d.ts +39 -0
  18. package/dist/api/types.d.ts +55 -0
  19. package/dist/{ast-schema-editor-CvkYOvri.js → ast-schema-editor-CNgFJ3NF.js} +23 -7
  20. package/dist/ast-schema-editor-CNgFJ3NF.js.map +1 -0
  21. package/dist/auth/api-keys/api-key-routes.d.ts +12 -0
  22. package/dist/auth/auth-hooks.d.ts +13 -2
  23. package/dist/auth/exclude-auth-secrets.d.ts +14 -0
  24. package/dist/auth/jwt.d.ts +22 -1
  25. package/dist/auth/mfa-routes.d.ts +10 -1
  26. package/dist/auth/middleware.d.ts +22 -0
  27. package/dist/auth/rate-limiter.d.ts +50 -0
  28. package/dist/auth/registration-policy.d.ts +27 -0
  29. package/dist/auth/rls-scope.d.ts +9 -1
  30. package/dist/auth/routes.d.ts +8 -1
  31. package/dist/auth/seed-admin.d.ts +73 -0
  32. package/dist/auth/session-routes.d.ts +10 -0
  33. package/dist/{auth-DkbzMZUS.js → auth-BRiOuyq8.js} +283 -198
  34. package/dist/auth-BRiOuyq8.js.map +1 -0
  35. package/dist/{backup-CRdZkA6c.js → backup-C8P6Cl3G.js} +2 -2
  36. package/dist/{backup-CRdZkA6c.js.map → backup-C8P6Cl3G.js.map} +1 -1
  37. package/dist/boot/boot.d.ts +18 -0
  38. package/dist/boot/bundle.d.ts +29 -6
  39. package/dist/boot/ddl-bootstrap.d.ts +2 -0
  40. package/dist/boot/env.d.ts +30 -1
  41. package/dist/boot/fetch-bundle.d.ts +24 -1
  42. package/dist/boot/options.d.ts +0 -8
  43. package/dist/boot/provision.d.ts +58 -18
  44. package/dist/boot/resource-adapters.d.ts +11 -1
  45. package/dist/boot/resource-resolvers.d.ts +96 -0
  46. package/dist/boot/sources.d.ts +27 -20
  47. package/dist/collections/validate-config.d.ts +29 -0
  48. package/dist/{contract-routes-CHPVKTZW.js → contract-routes-CusnEB5h.js} +24 -9
  49. package/dist/{contract-routes-CHPVKTZW.js.map → contract-routes-CusnEB5h.js.map} +1 -1
  50. package/dist/cron/cron-loader.d.ts +7 -1
  51. package/dist/cron/cron-scheduler.d.ts +48 -2
  52. package/dist/{cron-loader-d9WMFENB.js → cron-loader-DnmIePn_.js} +23 -4
  53. package/dist/cron-loader-DnmIePn_.js.map +1 -0
  54. package/dist/{cron-routes-DSC-kZXI.js → cron-routes-D3x2ydMa.js} +9 -6
  55. package/dist/cron-routes-D3x2ydMa.js.map +1 -0
  56. package/dist/{cron-scheduler-BB82dWuU.js → cron-scheduler-BpPKpl4i.js} +148 -28
  57. package/dist/cron-scheduler-BpPKpl4i.js.map +1 -0
  58. package/dist/{cron-store-KeN8rN63.js → cron-store-CCQXwgVL.js} +5 -5
  59. package/dist/{cron-store-KeN8rN63.js.map → cron-store-CCQXwgVL.js.map} +1 -1
  60. package/dist/{ddl-bootstrap-5YZCZ8qk.js → ddl-bootstrap-CfNvxMuK.js} +26 -2
  61. package/dist/{ddl-bootstrap-5YZCZ8qk.js.map → ddl-bootstrap-CfNvxMuK.js.map} +1 -1
  62. package/dist/email/index.d.ts +1 -0
  63. package/dist/email/unconfigured.d.ts +20 -0
  64. package/dist/env.d.ts +25 -0
  65. package/dist/errors-HjfaPlvY.js +385 -0
  66. package/dist/errors-HjfaPlvY.js.map +1 -0
  67. package/dist/{function-loader-LLdmBFoL.js → function-loader-xnbDAPfa.js} +9 -3
  68. package/dist/{function-loader-LLdmBFoL.js.map → function-loader-xnbDAPfa.js.map} +1 -1
  69. package/dist/function-routes-gQ0EShVG.js +267 -0
  70. package/dist/function-routes-gQ0EShVG.js.map +1 -0
  71. package/dist/functions/define-function.d.ts +6 -3
  72. package/dist/functions/function-routes.d.ts +8 -4
  73. package/dist/functions/index.js +128 -23
  74. package/dist/functions/index.js.map +1 -1
  75. package/dist/{history-recorder-B2pL3X8b.js → history-recorder-B1FwXx9J.js} +3 -3
  76. package/dist/{history-recorder-B2pL3X8b.js.map → history-recorder-B1FwXx9J.js.map} +1 -1
  77. package/dist/{history-store-BUJ-37Sm.js → history-store-LHXaQywp.js} +2 -2
  78. package/dist/{history-store-BUJ-37Sm.js.map → history-store-LHXaQywp.js.map} +1 -1
  79. package/dist/index.d.ts +16 -4
  80. package/dist/index.es.js +16229 -7676
  81. package/dist/index.es.js.map +1 -1
  82. package/dist/init.d.ts +33 -13
  83. package/dist/{jobs-XXXcZrmj.js → jobs-DkkD9mPV.js} +5 -5
  84. package/dist/{jobs-XXXcZrmj.js.map → jobs-DkkD9mPV.js.map} +1 -1
  85. package/dist/{jwt-DNeOn39r.js → jwt-DkhXwMzR.js} +9 -314
  86. package/dist/jwt-DkhXwMzR.js.map +1 -0
  87. package/dist/keys-g8lbVC_o.js +230 -0
  88. package/dist/keys-g8lbVC_o.js.map +1 -0
  89. package/dist/{logger-DS03e908.js → logger-DO2PZc4i.js} +197 -18
  90. package/dist/logger-DO2PZc4i.js.map +1 -0
  91. package/dist/{logs-routes-DB72iQSr.js → logs-routes-CbsTpozn.js} +74 -6
  92. package/dist/logs-routes-CbsTpozn.js.map +1 -0
  93. package/dist/{openapi-generator-CpZp2Fai.js → openapi-generator-BIBbO1Tq.js} +221 -38
  94. package/dist/openapi-generator-BIBbO1Tq.js.map +1 -0
  95. package/dist/{proxy-CMymhnwG.js → proxy-Czngl3p9.js} +2 -2
  96. package/dist/{proxy-CMymhnwG.js.map → proxy-Czngl3p9.js.map} +1 -1
  97. package/dist/{query-parser-DqXNaBIH.js → query-parser-C68Q9EX4.js} +35 -6
  98. package/dist/{query-parser-DqXNaBIH.js.map → query-parser-C68Q9EX4.js.map} +1 -1
  99. package/dist/queues/runtime.d.ts +56 -0
  100. package/dist/{request-timeout-C8gkc-j7.js → request-timeout-DESvlfrS.js} +4 -6
  101. package/dist/request-timeout-DESvlfrS.js.map +1 -0
  102. package/dist/schema-edit/project-root.d.ts +4 -4
  103. package/dist/{schema-editor-routes-DNV_nBhW.js → schema-editor-routes-CcZKh50q.js} +4 -4
  104. package/dist/{schema-editor-routes-DNV_nBhW.js.map → schema-editor-routes-CcZKh50q.js.map} +1 -1
  105. package/dist/{schemas-DBxgjM9A.js → schemas-C3234HWE.js} +2746 -72
  106. package/dist/schemas-C3234HWE.js.map +1 -0
  107. package/dist/singleton.d.ts +6 -4
  108. package/dist/src-DHK4fHkw.js +1002 -0
  109. package/dist/src-DHK4fHkw.js.map +1 -0
  110. package/dist/{src-C9gKj23J.js → src-Dq-I3Ybx.js} +507 -54
  111. package/dist/src-Dq-I3Ybx.js.map +1 -0
  112. package/dist/storage/GCSStorageController.d.ts +5 -0
  113. package/dist/storage/LocalStorageController.d.ts +14 -0
  114. package/dist/storage/S3StorageController.d.ts +8 -0
  115. package/dist/storage/image-transform.d.ts +35 -0
  116. package/dist/storage/keys.d.ts +23 -0
  117. package/dist/storage/policies.d.ts +22 -0
  118. package/dist/storage/routes.d.ts +9 -0
  119. package/dist/storage/tus-handler.d.ts +43 -1
  120. package/dist/storage/types.d.ts +28 -0
  121. package/dist/types-BfKcm9do.js.map +1 -1
  122. package/dist/utils/dev-port.d.ts +18 -0
  123. package/dist/utils/logger.d.ts +60 -0
  124. package/dist/utils/request-logger.d.ts +2 -1
  125. package/package.json +30 -24
  126. package/dist/GCSStorageController-Bl7nmhdv.js.map +0 -1
  127. package/dist/S3StorageController-CWvvrRpF.js.map +0 -1
  128. package/dist/admin_block-BX6YULvJ.js.map +0 -1
  129. package/dist/ast-schema-editor-CvkYOvri.js.map +0 -1
  130. package/dist/auth-DkbzMZUS.js.map +0 -1
  131. package/dist/cron-loader-d9WMFENB.js.map +0 -1
  132. package/dist/cron-routes-DSC-kZXI.js.map +0 -1
  133. package/dist/cron-scheduler-BB82dWuU.js.map +0 -1
  134. package/dist/errors-DBwpj9N8.js +0 -231
  135. package/dist/errors-DBwpj9N8.js.map +0 -1
  136. package/dist/function-routes-ClT6UQpD.js +0 -41
  137. package/dist/function-routes-ClT6UQpD.js.map +0 -1
  138. package/dist/jwt-DNeOn39r.js.map +0 -1
  139. package/dist/logger-DS03e908.js.map +0 -1
  140. package/dist/logs-routes-DB72iQSr.js.map +0 -1
  141. package/dist/openapi-generator-CpZp2Fai.js.map +0 -1
  142. package/dist/request-timeout-C8gkc-j7.js.map +0 -1
  143. package/dist/schemas-DBxgjM9A.js.map +0 -1
  144. package/dist/src-C9gKj23J.js.map +0 -1
  145. package/dist/src-CcOl05Oq.js +0 -552
  146. package/dist/src-CcOl05Oq.js.map +0 -1
  147. package/dist/utils/logging.d.ts +0 -5
@@ -2,8 +2,11 @@ import { createRequire as __rebaseCreateRequire } from "module";
2
2
  import __rebaseProcess from "process";
3
3
  globalThis.process ??= __rebaseProcess;
4
4
  __rebaseCreateRequire(import.meta.url);
5
+ import { n as __exportAll } from "./rolldown-runtime-dW7B1o5h.js";
5
6
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
6
7
  var _a$1;
8
+ /** A special constant with type `never` */
9
+ var NEVER = /*@__PURE__*/ Object.freeze({ status: "aborted" });
7
10
  function $constructor(name, initializer, params) {
8
11
  function init(inst, def) {
9
12
  if (!inst._zod) Object.defineProperty(inst, "_zod", {
@@ -43,6 +46,7 @@ function $constructor(name, initializer, params) {
43
46
  Object.defineProperty(_, "name", { value: name });
44
47
  return _;
45
48
  }
49
+ var $brand = Symbol("zod_brand");
46
50
  var $ZodAsyncError = class extends Error {
47
51
  constructor() {
48
52
  super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
@@ -62,10 +66,89 @@ function config(newConfig) {
62
66
  }
63
67
  //#endregion
64
68
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
69
+ var util_exports = /* @__PURE__ */ __exportAll({
70
+ BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
71
+ Class: () => Class,
72
+ NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
73
+ aborted: () => aborted,
74
+ allowsEval: () => allowsEval,
75
+ assert: () => assert,
76
+ assertEqual: () => assertEqual,
77
+ assertIs: () => assertIs,
78
+ assertNever: () => assertNever,
79
+ assertNotEqual: () => assertNotEqual,
80
+ assignProp: () => assignProp,
81
+ base64ToUint8Array: () => base64ToUint8Array,
82
+ base64urlToUint8Array: () => base64urlToUint8Array,
83
+ cached: () => cached,
84
+ captureStackTrace: () => captureStackTrace,
85
+ cleanEnum: () => cleanEnum,
86
+ cleanRegex: () => cleanRegex,
87
+ clone: () => clone,
88
+ cloneDef: () => cloneDef,
89
+ createTransparentProxy: () => createTransparentProxy,
90
+ defineLazy: () => defineLazy,
91
+ esc: () => esc,
92
+ escapeRegex: () => escapeRegex,
93
+ explicitlyAborted: () => explicitlyAborted,
94
+ extend: () => extend,
95
+ finalizeIssue: () => finalizeIssue,
96
+ floatSafeRemainder: () => floatSafeRemainder,
97
+ getElementAtPath: () => getElementAtPath,
98
+ getEnumValues: () => getEnumValues,
99
+ getLengthableOrigin: () => getLengthableOrigin,
100
+ getParsedType: () => getParsedType,
101
+ getSizableOrigin: () => getSizableOrigin,
102
+ hexToUint8Array: () => hexToUint8Array,
103
+ isObject: () => isObject,
104
+ isPlainObject: () => isPlainObject,
105
+ issue: () => issue,
106
+ joinValues: () => joinValues,
107
+ jsonStringifyReplacer: () => jsonStringifyReplacer,
108
+ merge: () => merge,
109
+ mergeDefs: () => mergeDefs,
110
+ normalizeParams: () => normalizeParams,
111
+ nullish: () => nullish$1,
112
+ numKeys: () => numKeys,
113
+ objectClone: () => objectClone,
114
+ omit: () => omit,
115
+ optionalKeys: () => optionalKeys,
116
+ parsedType: () => parsedType,
117
+ partial: () => partial,
118
+ pick: () => pick,
119
+ prefixIssues: () => prefixIssues,
120
+ primitiveTypes: () => primitiveTypes,
121
+ promiseAllObject: () => promiseAllObject,
122
+ propertyKeyTypes: () => propertyKeyTypes,
123
+ randomString: () => randomString,
124
+ required: () => required,
125
+ safeExtend: () => safeExtend,
126
+ shallowClone: () => shallowClone,
127
+ slugify: () => slugify,
128
+ stringifyPrimitive: () => stringifyPrimitive,
129
+ uint8ArrayToBase64: () => uint8ArrayToBase64,
130
+ uint8ArrayToBase64url: () => uint8ArrayToBase64url,
131
+ uint8ArrayToHex: () => uint8ArrayToHex,
132
+ unwrapMessage: () => unwrapMessage
133
+ });
134
+ function assertEqual(val) {
135
+ return val;
136
+ }
137
+ function assertNotEqual(val) {
138
+ return val;
139
+ }
140
+ function assertIs(_arg) {}
141
+ function assertNever(_x) {
142
+ throw new Error("Unexpected value in exhaustive check");
143
+ }
144
+ function assert(_) {}
65
145
  function getEnumValues(entries) {
66
146
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
67
147
  return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
68
148
  }
149
+ function joinValues(array, separator = "|") {
150
+ return array.map((val) => stringifyPrimitive(val)).join(separator);
151
+ }
69
152
  function jsonStringifyReplacer(_, value) {
70
153
  if (typeof value === "bigint") return value.toString();
71
154
  return value;
@@ -80,7 +163,7 @@ function cached(getter) {
80
163
  throw new Error("cached value already set");
81
164
  } };
82
165
  }
83
- function nullish(input) {
166
+ function nullish$1(input) {
84
167
  return input === null || input === void 0;
85
168
  }
86
169
  function cleanRegex(source) {
@@ -113,6 +196,9 @@ function defineLazy(object, key, getter) {
113
196
  configurable: true
114
197
  });
115
198
  }
199
+ function objectClone(obj) {
200
+ return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
201
+ }
116
202
  function assignProp(target, prop, value) {
117
203
  Object.defineProperty(target, prop, {
118
204
  value,
@@ -129,6 +215,28 @@ function mergeDefs(...defs) {
129
215
  }
130
216
  return Object.defineProperties({}, mergedDescriptors);
131
217
  }
218
+ function cloneDef(schema) {
219
+ return mergeDefs(schema._zod.def);
220
+ }
221
+ function getElementAtPath(obj, path) {
222
+ if (!path) return obj;
223
+ return path.reduce((acc, key) => acc?.[key], obj);
224
+ }
225
+ function promiseAllObject(promisesObj) {
226
+ const keys = Object.keys(promisesObj);
227
+ const promises = keys.map((key) => promisesObj[key]);
228
+ return Promise.all(promises).then((results) => {
229
+ const resolvedObj = {};
230
+ for (let i = 0; i < keys.length; i++) resolvedObj[keys[i]] = results[i];
231
+ return resolvedObj;
232
+ });
233
+ }
234
+ function randomString(length = 10) {
235
+ const chars = "abcdefghijklmnopqrstuvwxyz";
236
+ let str = "";
237
+ for (let i = 0; i < length; i++) str += chars[Math.floor(Math.random() * 26)];
238
+ return str;
239
+ }
132
240
  function esc(str) {
133
241
  return JSON.stringify(str);
134
242
  }
@@ -166,11 +274,46 @@ function shallowClone(o) {
166
274
  if (o instanceof Set) return new Set(o);
167
275
  return o;
168
276
  }
277
+ function numKeys(data) {
278
+ let keyCount = 0;
279
+ for (const key in data) if (Object.prototype.hasOwnProperty.call(data, key)) keyCount++;
280
+ return keyCount;
281
+ }
282
+ var getParsedType = (data) => {
283
+ const t = typeof data;
284
+ switch (t) {
285
+ case "undefined": return "undefined";
286
+ case "string": return "string";
287
+ case "number": return Number.isNaN(data) ? "nan" : "number";
288
+ case "boolean": return "boolean";
289
+ case "function": return "function";
290
+ case "bigint": return "bigint";
291
+ case "symbol": return "symbol";
292
+ case "object":
293
+ if (Array.isArray(data)) return "array";
294
+ if (data === null) return "null";
295
+ if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") return "promise";
296
+ if (typeof Map !== "undefined" && data instanceof Map) return "map";
297
+ if (typeof Set !== "undefined" && data instanceof Set) return "set";
298
+ if (typeof Date !== "undefined" && data instanceof Date) return "date";
299
+ if (typeof File !== "undefined" && data instanceof File) return "file";
300
+ return "object";
301
+ default: throw new Error(`Unknown data type: ${t}`);
302
+ }
303
+ };
169
304
  var propertyKeyTypes = /* @__PURE__*/ new Set([
170
305
  "string",
171
306
  "number",
172
307
  "symbol"
173
308
  ]);
309
+ var primitiveTypes = /* @__PURE__*/ new Set([
310
+ "string",
311
+ "number",
312
+ "bigint",
313
+ "boolean",
314
+ "symbol",
315
+ "undefined"
316
+ ]);
174
317
  function escapeRegex(str) {
175
318
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
176
319
  }
@@ -194,6 +337,44 @@ function normalizeParams(_params) {
194
337
  };
195
338
  return params;
196
339
  }
340
+ function createTransparentProxy(getter) {
341
+ let target;
342
+ return new Proxy({}, {
343
+ get(_, prop, receiver) {
344
+ target ?? (target = getter());
345
+ return Reflect.get(target, prop, receiver);
346
+ },
347
+ set(_, prop, value, receiver) {
348
+ target ?? (target = getter());
349
+ return Reflect.set(target, prop, value, receiver);
350
+ },
351
+ has(_, prop) {
352
+ target ?? (target = getter());
353
+ return Reflect.has(target, prop);
354
+ },
355
+ deleteProperty(_, prop) {
356
+ target ?? (target = getter());
357
+ return Reflect.deleteProperty(target, prop);
358
+ },
359
+ ownKeys(_) {
360
+ target ?? (target = getter());
361
+ return Reflect.ownKeys(target);
362
+ },
363
+ getOwnPropertyDescriptor(_, prop) {
364
+ target ?? (target = getter());
365
+ return Reflect.getOwnPropertyDescriptor(target, prop);
366
+ },
367
+ defineProperty(_, prop, descriptor) {
368
+ target ?? (target = getter());
369
+ return Reflect.defineProperty(target, prop, descriptor);
370
+ }
371
+ });
372
+ }
373
+ function stringifyPrimitive(value) {
374
+ if (typeof value === "bigint") return value.toString() + "n";
375
+ if (typeof value === "string") return `"${value}"`;
376
+ return `${value}`;
377
+ }
197
378
  function optionalKeys(shape) {
198
379
  return Object.keys(shape).filter((k) => {
199
380
  return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional";
@@ -206,6 +387,10 @@ var NUMBER_FORMAT_RANGES = {
206
387
  float32: [-34028234663852886e22, 34028234663852886e22],
207
388
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
208
389
  };
390
+ var BIGINT_FORMAT_RANGES = {
391
+ int64: [/* @__PURE__*/ BigInt("-9223372036854775808"), /* @__PURE__*/ BigInt("9223372036854775807")],
392
+ uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt("18446744073709551615")]
393
+ };
209
394
  function pick(schema, mask) {
210
395
  const currDef = schema._zod.def;
211
396
  const checks = currDef.checks;
@@ -360,11 +545,30 @@ function finalizeIssue(iss, ctx, config) {
360
545
  if (ctx?.reportInput) rest.input = _input;
361
546
  return rest;
362
547
  }
548
+ function getSizableOrigin(input) {
549
+ if (input instanceof Set) return "set";
550
+ if (input instanceof Map) return "map";
551
+ if (input instanceof File) return "file";
552
+ return "unknown";
553
+ }
363
554
  function getLengthableOrigin(input) {
364
555
  if (Array.isArray(input)) return "array";
365
556
  if (typeof input === "string") return "string";
366
557
  return "unknown";
367
558
  }
559
+ function parsedType(data) {
560
+ const t = typeof data;
561
+ switch (t) {
562
+ case "number": return Number.isNaN(data) ? "nan" : "number";
563
+ case "object": {
564
+ if (data === null) return "null";
565
+ if (Array.isArray(data)) return "array";
566
+ const obj = data;
567
+ if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) return obj.constructor.name;
568
+ }
569
+ }
570
+ return t;
571
+ }
368
572
  function issue(...args) {
369
573
  const [iss, input, inst] = args;
370
574
  if (typeof iss === "string") return {
@@ -375,6 +579,42 @@ function issue(...args) {
375
579
  };
376
580
  return { ...iss };
377
581
  }
582
+ function cleanEnum(obj) {
583
+ return Object.entries(obj).filter(([k, _]) => {
584
+ return Number.isNaN(Number.parseInt(k, 10));
585
+ }).map((el) => el[1]);
586
+ }
587
+ function base64ToUint8Array(base64) {
588
+ const binaryString = atob(base64);
589
+ const bytes = new Uint8Array(binaryString.length);
590
+ for (let i = 0; i < binaryString.length; i++) bytes[i] = binaryString.charCodeAt(i);
591
+ return bytes;
592
+ }
593
+ function uint8ArrayToBase64(bytes) {
594
+ let binaryString = "";
595
+ for (let i = 0; i < bytes.length; i++) binaryString += String.fromCharCode(bytes[i]);
596
+ return btoa(binaryString);
597
+ }
598
+ function base64urlToUint8Array(base64url) {
599
+ const base64 = base64url.replace(/-/g, "+").replace(/_/g, "/");
600
+ return base64ToUint8Array(base64 + "=".repeat((4 - base64.length % 4) % 4));
601
+ }
602
+ function uint8ArrayToBase64url(bytes) {
603
+ return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
604
+ }
605
+ function hexToUint8Array(hex) {
606
+ const cleanHex = hex.replace(/^0x/, "");
607
+ if (cleanHex.length % 2 !== 0) throw new Error("Invalid hex string length");
608
+ const bytes = new Uint8Array(cleanHex.length / 2);
609
+ for (let i = 0; i < cleanHex.length; i += 2) bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);
610
+ return bytes;
611
+ }
612
+ function uint8ArrayToHex(bytes) {
613
+ return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join("");
614
+ }
615
+ var Class = class {
616
+ constructor(..._args) {}
617
+ };
378
618
  //#endregion
379
619
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
380
620
  var initializer$1 = (inst, def) => {
@@ -435,6 +675,94 @@ function formatError(error, mapper = (issue) => issue.message) {
435
675
  processError(error);
436
676
  return fieldErrors;
437
677
  }
678
+ function treeifyError(error, mapper = (issue) => issue.message) {
679
+ const result = { errors: [] };
680
+ const processError = (error, path = []) => {
681
+ var _a, _b;
682
+ for (const issue of error.issues) if (issue.code === "invalid_union" && issue.errors.length) issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));
683
+ else if (issue.code === "invalid_key") processError({ issues: issue.issues }, [...path, ...issue.path]);
684
+ else if (issue.code === "invalid_element") processError({ issues: issue.issues }, [...path, ...issue.path]);
685
+ else {
686
+ const fullpath = [...path, ...issue.path];
687
+ if (fullpath.length === 0) {
688
+ result.errors.push(mapper(issue));
689
+ continue;
690
+ }
691
+ let curr = result;
692
+ let i = 0;
693
+ while (i < fullpath.length) {
694
+ const el = fullpath[i];
695
+ const terminal = i === fullpath.length - 1;
696
+ if (typeof el === "string") {
697
+ curr.properties ?? (curr.properties = {});
698
+ (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });
699
+ curr = curr.properties[el];
700
+ } else {
701
+ curr.items ?? (curr.items = []);
702
+ (_b = curr.items)[el] ?? (_b[el] = { errors: [] });
703
+ curr = curr.items[el];
704
+ }
705
+ if (terminal) curr.errors.push(mapper(issue));
706
+ i++;
707
+ }
708
+ }
709
+ };
710
+ processError(error);
711
+ return result;
712
+ }
713
+ /** Format a ZodError as a human-readable string in the following form.
714
+ *
715
+ * From
716
+ *
717
+ * ```ts
718
+ * ZodError {
719
+ * issues: [
720
+ * {
721
+ * expected: 'string',
722
+ * code: 'invalid_type',
723
+ * path: [ 'username' ],
724
+ * message: 'Invalid input: expected string'
725
+ * },
726
+ * {
727
+ * expected: 'number',
728
+ * code: 'invalid_type',
729
+ * path: [ 'favoriteNumbers', 1 ],
730
+ * message: 'Invalid input: expected number'
731
+ * }
732
+ * ];
733
+ * }
734
+ * ```
735
+ *
736
+ * to
737
+ *
738
+ * ```
739
+ * username
740
+ * ✖ Expected number, received string at "username
741
+ * favoriteNumbers[0]
742
+ * ✖ Invalid input: expected number
743
+ * ```
744
+ */
745
+ function toDotPath(_path) {
746
+ const segs = [];
747
+ const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
748
+ for (const seg of path) if (typeof seg === "number") segs.push(`[${seg}]`);
749
+ else if (typeof seg === "symbol") segs.push(`[${JSON.stringify(String(seg))}]`);
750
+ else if (/[^\w$]/.test(seg)) segs.push(`[${JSON.stringify(seg)}]`);
751
+ else {
752
+ if (segs.length) segs.push(".");
753
+ segs.push(seg);
754
+ }
755
+ return segs.join("");
756
+ }
757
+ function prettifyError(error) {
758
+ const lines = [];
759
+ const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
760
+ for (const issue of issues) {
761
+ lines.push(`✖ ${issue.message}`);
762
+ if (issue.path?.length) lines.push(` → at ${toDotPath(issue.path)}`);
763
+ }
764
+ return lines.join("\n");
765
+ }
438
766
  //#endregion
439
767
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
440
768
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
@@ -454,6 +782,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
454
782
  }
455
783
  return result.value;
456
784
  };
785
+ var parse$1 = /* @__PURE__*/ _parse($ZodRealError);
457
786
  var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
458
787
  const ctx = _ctx ? {
459
788
  ..._ctx,
@@ -471,6 +800,7 @@ var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
471
800
  }
472
801
  return result.value;
473
802
  };
803
+ var parseAsync$1 = /* @__PURE__*/ _parseAsync($ZodRealError);
474
804
  var _safeParse = (_Err) => (schema, value, _ctx) => {
475
805
  const ctx = _ctx ? {
476
806
  ..._ctx,
@@ -516,9 +846,11 @@ var _encode = (_Err) => (schema, value, _ctx) => {
516
846
  } : { direction: "backward" };
517
847
  return _parse(_Err)(schema, value, ctx);
518
848
  };
849
+ var encode$1 = /* @__PURE__*/ _encode($ZodRealError);
519
850
  var _decode = (_Err) => (schema, value, _ctx) => {
520
851
  return _parse(_Err)(schema, value, _ctx);
521
852
  };
853
+ var decode$1 = /* @__PURE__*/ _decode($ZodRealError);
522
854
  var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
523
855
  const ctx = _ctx ? {
524
856
  ..._ctx,
@@ -526,9 +858,11 @@ var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
526
858
  } : { direction: "backward" };
527
859
  return _parseAsync(_Err)(schema, value, ctx);
528
860
  };
861
+ var encodeAsync$1 = /* @__PURE__*/ _encodeAsync($ZodRealError);
529
862
  var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
530
863
  return _parseAsync(_Err)(schema, value, _ctx);
531
864
  };
865
+ var decodeAsync$1 = /* @__PURE__*/ _decodeAsync($ZodRealError);
532
866
  var _safeEncode = (_Err) => (schema, value, _ctx) => {
533
867
  const ctx = _ctx ? {
534
868
  ..._ctx,
@@ -536,9 +870,11 @@ var _safeEncode = (_Err) => (schema, value, _ctx) => {
536
870
  } : { direction: "backward" };
537
871
  return _safeParse(_Err)(schema, value, ctx);
538
872
  };
873
+ var safeEncode$1 = /* @__PURE__*/ _safeEncode($ZodRealError);
539
874
  var _safeDecode = (_Err) => (schema, value, _ctx) => {
540
875
  return _safeParse(_Err)(schema, value, _ctx);
541
876
  };
877
+ var safeDecode$1 = /* @__PURE__*/ _safeDecode($ZodRealError);
542
878
  var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
543
879
  const ctx = _ctx ? {
544
880
  ..._ctx,
@@ -546,49 +882,131 @@ var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
546
882
  } : { direction: "backward" };
547
883
  return _safeParseAsync(_Err)(schema, value, ctx);
548
884
  };
885
+ var safeEncodeAsync$1 = /* @__PURE__*/ _safeEncodeAsync($ZodRealError);
549
886
  var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
550
887
  return _safeParseAsync(_Err)(schema, value, _ctx);
551
888
  };
889
+ var safeDecodeAsync$1 = /* @__PURE__*/ _safeDecodeAsync($ZodRealError);
552
890
  //#endregion
553
891
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/regexes.js
892
+ var regexes_exports = /* @__PURE__ */ __exportAll({
893
+ base64: () => base64$1,
894
+ base64url: () => base64url$1,
895
+ bigint: () => bigint$1,
896
+ boolean: () => boolean$1,
897
+ browserEmail: () => browserEmail,
898
+ cidrv4: () => cidrv4$1,
899
+ cidrv6: () => cidrv6$1,
900
+ cuid: () => cuid$1,
901
+ cuid2: () => cuid2$1,
902
+ date: () => date$2,
903
+ datetime: () => datetime$1,
904
+ domain: () => domain,
905
+ duration: () => duration$1,
906
+ e164: () => e164$1,
907
+ email: () => email$1,
908
+ emoji: () => emoji$1,
909
+ extendedDuration: () => extendedDuration,
910
+ guid: () => guid$1,
911
+ hex: () => hex$1,
912
+ hostname: () => hostname$1,
913
+ html5Email: () => html5Email,
914
+ httpProtocol: () => httpProtocol,
915
+ idnEmail: () => idnEmail,
916
+ integer: () => integer,
917
+ ipv4: () => ipv4$1,
918
+ ipv6: () => ipv6$1,
919
+ ksuid: () => ksuid$1,
920
+ lowercase: () => lowercase,
921
+ mac: () => mac$1,
922
+ md5_base64: () => md5_base64,
923
+ md5_base64url: () => md5_base64url,
924
+ md5_hex: () => md5_hex,
925
+ nanoid: () => nanoid$1,
926
+ null: () => _null$2,
927
+ number: () => number$1,
928
+ rfc5322Email: () => rfc5322Email,
929
+ sha1_base64: () => sha1_base64,
930
+ sha1_base64url: () => sha1_base64url,
931
+ sha1_hex: () => sha1_hex,
932
+ sha256_base64: () => sha256_base64,
933
+ sha256_base64url: () => sha256_base64url,
934
+ sha256_hex: () => sha256_hex,
935
+ sha384_base64: () => sha384_base64,
936
+ sha384_base64url: () => sha384_base64url,
937
+ sha384_hex: () => sha384_hex,
938
+ sha512_base64: () => sha512_base64,
939
+ sha512_base64url: () => sha512_base64url,
940
+ sha512_hex: () => sha512_hex,
941
+ string: () => string$1,
942
+ time: () => time$1,
943
+ ulid: () => ulid$1,
944
+ undefined: () => _undefined$2,
945
+ unicodeEmail: () => unicodeEmail,
946
+ uppercase: () => uppercase,
947
+ uuid: () => uuid$1,
948
+ uuid4: () => uuid4,
949
+ uuid6: () => uuid6,
950
+ uuid7: () => uuid7,
951
+ xid: () => xid$1
952
+ });
554
953
  /**
555
954
  * @deprecated CUID v1 is deprecated by its authors due to information leakage
556
955
  * (timestamps embedded in the id). Use {@link cuid2} instead.
557
956
  * See https://github.com/paralleldrive/cuid.
558
957
  */
559
- var cuid = /^[cC][0-9a-z]{6,}$/;
560
- var cuid2 = /^[0-9a-z]+$/;
561
- var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
562
- var xid = /^[0-9a-vA-V]{20}$/;
563
- var ksuid = /^[A-Za-z0-9]{27}$/;
564
- var nanoid = /^[a-zA-Z0-9_-]{21}$/;
958
+ var cuid$1 = /^[cC][0-9a-z]{6,}$/;
959
+ var cuid2$1 = /^[0-9a-z]+$/;
960
+ var ulid$1 = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
961
+ var xid$1 = /^[0-9a-vA-V]{20}$/;
962
+ var ksuid$1 = /^[A-Za-z0-9]{27}$/;
963
+ var nanoid$1 = /^[a-zA-Z0-9_-]{21}$/;
565
964
  /** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */
566
965
  var duration$1 = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
966
+ /** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */
967
+ var extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
567
968
  /** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */
568
- var guid = /^([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})$/;
969
+ var guid$1 = /^([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})$/;
569
970
  /** Returns a regex for validating an RFC 9562/4122 UUID.
570
971
  *
571
972
  * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
572
- var uuid = (version) => {
973
+ var uuid$1 = (version) => {
573
974
  if (!version) return /^([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)$/;
574
975
  return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
575
976
  };
977
+ var uuid4 = /*@__PURE__*/ uuid$1(4);
978
+ var uuid6 = /*@__PURE__*/ uuid$1(6);
979
+ var uuid7 = /*@__PURE__*/ uuid$1(7);
576
980
  /** Practical email validation */
577
- var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
981
+ var email$1 = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
982
+ /** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */
983
+ var html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
984
+ /** The classic emailregex.com regex for RFC 5322-compliant emails */
985
+ var rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
986
+ /** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */
987
+ var unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u;
988
+ var idnEmail = unicodeEmail;
989
+ var browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
578
990
  var _emoji$1 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
579
- function emoji() {
991
+ function emoji$1() {
580
992
  return new RegExp(_emoji$1, "u");
581
993
  }
582
- var ipv4 = /^(?:(?: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])$/;
583
- var ipv6 = /^(([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}|:))$/;
584
- var cidrv4 = /^((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])$/;
585
- var cidrv6 = /^(([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])$/;
586
- var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
587
- var base64url = /^[A-Za-z0-9_-]*$/;
994
+ var ipv4$1 = /^(?:(?: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])$/;
995
+ var ipv6$1 = /^(([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}|:))$/;
996
+ var mac$1 = (delimiter) => {
997
+ const escapedDelim = escapeRegex(delimiter ?? ":");
998
+ return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
999
+ };
1000
+ var cidrv4$1 = /^((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])$/;
1001
+ var cidrv6$1 = /^(([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])$/;
1002
+ var base64$1 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
1003
+ var base64url$1 = /^[A-Za-z0-9_-]*$/;
1004
+ var hostname$1 = /^(?=.{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])?)*\.?$/;
1005
+ var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
588
1006
  var httpProtocol = /^https?$/;
589
- var e164 = /^\+[1-9]\d{6,14}$/;
1007
+ var e164$1 = /^\+[1-9]\d{6,14}$/;
590
1008
  var dateSource = `(?:(?:\\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])))`;
591
- var date$1 = /*@__PURE__*/ new RegExp(`^${dateSource}$`);
1009
+ var date$2 = /*@__PURE__*/ new RegExp(`^${dateSource}$`);
592
1010
  function timeSource(args) {
593
1011
  const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
594
1012
  return typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
@@ -608,11 +1026,36 @@ var string$1 = (params) => {
608
1026
  const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
609
1027
  return new RegExp(`^${regex}$`);
610
1028
  };
1029
+ var bigint$1 = /^-?\d+n?$/;
611
1030
  var integer = /^-?\d+$/;
612
- var number = /^-?\d+(?:\.\d+)?$/;
1031
+ var number$1 = /^-?\d+(?:\.\d+)?$/;
613
1032
  var boolean$1 = /^(?:true|false)$/i;
1033
+ var _null$2 = /^null$/i;
1034
+ var _undefined$2 = /^undefined$/i;
614
1035
  var lowercase = /^[^A-Z]*$/;
615
1036
  var uppercase = /^[^a-z]*$/;
1037
+ var hex$1 = /^[0-9a-fA-F]*$/;
1038
+ function fixedBase64(bodyLength, padding) {
1039
+ return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);
1040
+ }
1041
+ function fixedBase64url(length) {
1042
+ return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);
1043
+ }
1044
+ var md5_hex = /^[0-9a-fA-F]{32}$/;
1045
+ var md5_base64 = /*@__PURE__*/ fixedBase64(22, "==");
1046
+ var md5_base64url = /*@__PURE__*/ fixedBase64url(22);
1047
+ var sha1_hex = /^[0-9a-fA-F]{40}$/;
1048
+ var sha1_base64 = /*@__PURE__*/ fixedBase64(27, "=");
1049
+ var sha1_base64url = /*@__PURE__*/ fixedBase64url(27);
1050
+ var sha256_hex = /^[0-9a-fA-F]{64}$/;
1051
+ var sha256_base64 = /*@__PURE__*/ fixedBase64(43, "=");
1052
+ var sha256_base64url = /*@__PURE__*/ fixedBase64url(43);
1053
+ var sha384_hex = /^[0-9a-fA-F]{96}$/;
1054
+ var sha384_base64 = /*@__PURE__*/ fixedBase64(64, "");
1055
+ var sha384_base64url = /*@__PURE__*/ fixedBase64url(64);
1056
+ var sha512_hex = /^[0-9a-fA-F]{128}$/;
1057
+ var sha512_base64 = /*@__PURE__*/ fixedBase64(86, "==");
1058
+ var sha512_base64url = /*@__PURE__*/ fixedBase64url(86);
616
1059
  //#endregion
617
1060
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.js
618
1061
  var $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
@@ -760,12 +1203,128 @@ var $ZodCheckNumberFormat = /*@__PURE__*/ $constructor("$ZodCheckNumberFormat",
760
1203
  });
761
1204
  };
762
1205
  });
1206
+ var $ZodCheckBigIntFormat = /*@__PURE__*/ $constructor("$ZodCheckBigIntFormat", (inst, def) => {
1207
+ $ZodCheck.init(inst, def);
1208
+ const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format];
1209
+ inst._zod.onattach.push((inst) => {
1210
+ const bag = inst._zod.bag;
1211
+ bag.format = def.format;
1212
+ bag.minimum = minimum;
1213
+ bag.maximum = maximum;
1214
+ });
1215
+ inst._zod.check = (payload) => {
1216
+ const input = payload.value;
1217
+ if (input < minimum) payload.issues.push({
1218
+ origin: "bigint",
1219
+ input,
1220
+ code: "too_small",
1221
+ minimum,
1222
+ inclusive: true,
1223
+ inst,
1224
+ continue: !def.abort
1225
+ });
1226
+ if (input > maximum) payload.issues.push({
1227
+ origin: "bigint",
1228
+ input,
1229
+ code: "too_big",
1230
+ maximum,
1231
+ inclusive: true,
1232
+ inst,
1233
+ continue: !def.abort
1234
+ });
1235
+ };
1236
+ });
1237
+ var $ZodCheckMaxSize = /*@__PURE__*/ $constructor("$ZodCheckMaxSize", (inst, def) => {
1238
+ var _a;
1239
+ $ZodCheck.init(inst, def);
1240
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1241
+ const val = payload.value;
1242
+ return !nullish$1(val) && val.size !== void 0;
1243
+ });
1244
+ inst._zod.onattach.push((inst) => {
1245
+ const curr = inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1246
+ if (def.maximum < curr) inst._zod.bag.maximum = def.maximum;
1247
+ });
1248
+ inst._zod.check = (payload) => {
1249
+ const input = payload.value;
1250
+ if (input.size <= def.maximum) return;
1251
+ payload.issues.push({
1252
+ origin: getSizableOrigin(input),
1253
+ code: "too_big",
1254
+ maximum: def.maximum,
1255
+ inclusive: true,
1256
+ input,
1257
+ inst,
1258
+ continue: !def.abort
1259
+ });
1260
+ };
1261
+ });
1262
+ var $ZodCheckMinSize = /*@__PURE__*/ $constructor("$ZodCheckMinSize", (inst, def) => {
1263
+ var _a;
1264
+ $ZodCheck.init(inst, def);
1265
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1266
+ const val = payload.value;
1267
+ return !nullish$1(val) && val.size !== void 0;
1268
+ });
1269
+ inst._zod.onattach.push((inst) => {
1270
+ const curr = inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1271
+ if (def.minimum > curr) inst._zod.bag.minimum = def.minimum;
1272
+ });
1273
+ inst._zod.check = (payload) => {
1274
+ const input = payload.value;
1275
+ if (input.size >= def.minimum) return;
1276
+ payload.issues.push({
1277
+ origin: getSizableOrigin(input),
1278
+ code: "too_small",
1279
+ minimum: def.minimum,
1280
+ inclusive: true,
1281
+ input,
1282
+ inst,
1283
+ continue: !def.abort
1284
+ });
1285
+ };
1286
+ });
1287
+ var $ZodCheckSizeEquals = /*@__PURE__*/ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1288
+ var _a;
1289
+ $ZodCheck.init(inst, def);
1290
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1291
+ const val = payload.value;
1292
+ return !nullish$1(val) && val.size !== void 0;
1293
+ });
1294
+ inst._zod.onattach.push((inst) => {
1295
+ const bag = inst._zod.bag;
1296
+ bag.minimum = def.size;
1297
+ bag.maximum = def.size;
1298
+ bag.size = def.size;
1299
+ });
1300
+ inst._zod.check = (payload) => {
1301
+ const input = payload.value;
1302
+ const size = input.size;
1303
+ if (size === def.size) return;
1304
+ const tooBig = size > def.size;
1305
+ payload.issues.push({
1306
+ origin: getSizableOrigin(input),
1307
+ ...tooBig ? {
1308
+ code: "too_big",
1309
+ maximum: def.size
1310
+ } : {
1311
+ code: "too_small",
1312
+ minimum: def.size
1313
+ },
1314
+ inclusive: true,
1315
+ exact: true,
1316
+ input: payload.value,
1317
+ inst,
1318
+ continue: !def.abort
1319
+ });
1320
+ };
1321
+ });
763
1322
  var $ZodCheckMaxLength = /*@__PURE__*/ $constructor("$ZodCheckMaxLength", (inst, def) => {
764
1323
  var _a;
765
1324
  $ZodCheck.init(inst, def);
766
1325
  (_a = inst._zod.def).when ?? (_a.when = (payload) => {
767
1326
  const val = payload.value;
768
- return !nullish(val) && val.length !== void 0;
1327
+ return !nullish$1(val) && val.length !== void 0;
769
1328
  });
770
1329
  inst._zod.onattach.push((inst) => {
771
1330
  const curr = inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
@@ -791,7 +1350,7 @@ var $ZodCheckMinLength = /*@__PURE__*/ $constructor("$ZodCheckMinLength", (inst,
791
1350
  $ZodCheck.init(inst, def);
792
1351
  (_a = inst._zod.def).when ?? (_a.when = (payload) => {
793
1352
  const val = payload.value;
794
- return !nullish(val) && val.length !== void 0;
1353
+ return !nullish$1(val) && val.length !== void 0;
795
1354
  });
796
1355
  inst._zod.onattach.push((inst) => {
797
1356
  const curr = inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
@@ -817,7 +1376,7 @@ var $ZodCheckLengthEquals = /*@__PURE__*/ $constructor("$ZodCheckLengthEquals",
817
1376
  $ZodCheck.init(inst, def);
818
1377
  (_a = inst._zod.def).when ?? (_a.when = (payload) => {
819
1378
  const val = payload.value;
820
- return !nullish(val) && val.length !== void 0;
1379
+ return !nullish$1(val) && val.length !== void 0;
821
1380
  });
822
1381
  inst._zod.onattach.push((inst) => {
823
1382
  const bag = inst._zod.bag;
@@ -965,6 +1524,37 @@ var $ZodCheckEndsWith = /*@__PURE__*/ $constructor("$ZodCheckEndsWith", (inst, d
965
1524
  });
966
1525
  };
967
1526
  });
1527
+ function handleCheckPropertyResult(result, payload, property) {
1528
+ if (result.issues.length) payload.issues.push(...prefixIssues(property, result.issues));
1529
+ }
1530
+ var $ZodCheckProperty = /*@__PURE__*/ $constructor("$ZodCheckProperty", (inst, def) => {
1531
+ $ZodCheck.init(inst, def);
1532
+ inst._zod.check = (payload) => {
1533
+ const result = def.schema._zod.run({
1534
+ value: payload.value[def.property],
1535
+ issues: []
1536
+ }, {});
1537
+ if (result instanceof Promise) return result.then((result) => handleCheckPropertyResult(result, payload, def.property));
1538
+ handleCheckPropertyResult(result, payload, def.property);
1539
+ };
1540
+ });
1541
+ var $ZodCheckMimeType = /*@__PURE__*/ $constructor("$ZodCheckMimeType", (inst, def) => {
1542
+ $ZodCheck.init(inst, def);
1543
+ const mimeSet = new Set(def.mime);
1544
+ inst._zod.onattach.push((inst) => {
1545
+ inst._zod.bag.mime = def.mime;
1546
+ });
1547
+ inst._zod.check = (payload) => {
1548
+ if (mimeSet.has(payload.value.type)) return;
1549
+ payload.issues.push({
1550
+ code: "invalid_value",
1551
+ values: def.mime,
1552
+ input: payload.value.type,
1553
+ inst,
1554
+ continue: !def.abort
1555
+ });
1556
+ };
1557
+ });
968
1558
  var $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (inst, def) => {
969
1559
  $ZodCheck.init(inst, def);
970
1560
  inst._zod.check = (payload) => {
@@ -1122,7 +1712,7 @@ var $ZodStringFormat = /*@__PURE__*/ $constructor("$ZodStringFormat", (inst, def
1122
1712
  $ZodString.init(inst, def);
1123
1713
  });
1124
1714
  var $ZodGUID = /*@__PURE__*/ $constructor("$ZodGUID", (inst, def) => {
1125
- def.pattern ?? (def.pattern = guid);
1715
+ def.pattern ?? (def.pattern = guid$1);
1126
1716
  $ZodStringFormat.init(inst, def);
1127
1717
  });
1128
1718
  var $ZodUUID = /*@__PURE__*/ $constructor("$ZodUUID", (inst, def) => {
@@ -1138,12 +1728,12 @@ var $ZodUUID = /*@__PURE__*/ $constructor("$ZodUUID", (inst, def) => {
1138
1728
  v8: 8
1139
1729
  }[def.version];
1140
1730
  if (v === void 0) throw new Error(`Invalid UUID version: "${def.version}"`);
1141
- def.pattern ?? (def.pattern = uuid(v));
1142
- } else def.pattern ?? (def.pattern = uuid());
1731
+ def.pattern ?? (def.pattern = uuid$1(v));
1732
+ } else def.pattern ?? (def.pattern = uuid$1());
1143
1733
  $ZodStringFormat.init(inst, def);
1144
1734
  });
1145
1735
  var $ZodEmail = /*@__PURE__*/ $constructor("$ZodEmail", (inst, def) => {
1146
- def.pattern ?? (def.pattern = email);
1736
+ def.pattern ?? (def.pattern = email$1);
1147
1737
  $ZodStringFormat.init(inst, def);
1148
1738
  });
1149
1739
  var $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
@@ -1204,11 +1794,11 @@ var $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
1204
1794
  };
1205
1795
  });
1206
1796
  var $ZodEmoji = /*@__PURE__*/ $constructor("$ZodEmoji", (inst, def) => {
1207
- def.pattern ?? (def.pattern = emoji());
1797
+ def.pattern ?? (def.pattern = emoji$1());
1208
1798
  $ZodStringFormat.init(inst, def);
1209
1799
  });
1210
1800
  var $ZodNanoID = /*@__PURE__*/ $constructor("$ZodNanoID", (inst, def) => {
1211
- def.pattern ?? (def.pattern = nanoid);
1801
+ def.pattern ?? (def.pattern = nanoid$1);
1212
1802
  $ZodStringFormat.init(inst, def);
1213
1803
  });
1214
1804
  /**
@@ -1217,23 +1807,23 @@ var $ZodNanoID = /*@__PURE__*/ $constructor("$ZodNanoID", (inst, def) => {
1217
1807
  * See https://github.com/paralleldrive/cuid.
1218
1808
  */
1219
1809
  var $ZodCUID = /*@__PURE__*/ $constructor("$ZodCUID", (inst, def) => {
1220
- def.pattern ?? (def.pattern = cuid);
1810
+ def.pattern ?? (def.pattern = cuid$1);
1221
1811
  $ZodStringFormat.init(inst, def);
1222
1812
  });
1223
1813
  var $ZodCUID2 = /*@__PURE__*/ $constructor("$ZodCUID2", (inst, def) => {
1224
- def.pattern ?? (def.pattern = cuid2);
1814
+ def.pattern ?? (def.pattern = cuid2$1);
1225
1815
  $ZodStringFormat.init(inst, def);
1226
1816
  });
1227
1817
  var $ZodULID = /*@__PURE__*/ $constructor("$ZodULID", (inst, def) => {
1228
- def.pattern ?? (def.pattern = ulid);
1818
+ def.pattern ?? (def.pattern = ulid$1);
1229
1819
  $ZodStringFormat.init(inst, def);
1230
1820
  });
1231
1821
  var $ZodXID = /*@__PURE__*/ $constructor("$ZodXID", (inst, def) => {
1232
- def.pattern ?? (def.pattern = xid);
1822
+ def.pattern ?? (def.pattern = xid$1);
1233
1823
  $ZodStringFormat.init(inst, def);
1234
1824
  });
1235
1825
  var $ZodKSUID = /*@__PURE__*/ $constructor("$ZodKSUID", (inst, def) => {
1236
- def.pattern ?? (def.pattern = ksuid);
1826
+ def.pattern ?? (def.pattern = ksuid$1);
1237
1827
  $ZodStringFormat.init(inst, def);
1238
1828
  });
1239
1829
  var $ZodISODateTime = /*@__PURE__*/ $constructor("$ZodISODateTime", (inst, def) => {
@@ -1241,7 +1831,7 @@ var $ZodISODateTime = /*@__PURE__*/ $constructor("$ZodISODateTime", (inst, def)
1241
1831
  $ZodStringFormat.init(inst, def);
1242
1832
  });
1243
1833
  var $ZodISODate = /*@__PURE__*/ $constructor("$ZodISODate", (inst, def) => {
1244
- def.pattern ?? (def.pattern = date$1);
1834
+ def.pattern ?? (def.pattern = date$2);
1245
1835
  $ZodStringFormat.init(inst, def);
1246
1836
  });
1247
1837
  var $ZodISOTime = /*@__PURE__*/ $constructor("$ZodISOTime", (inst, def) => {
@@ -1253,12 +1843,12 @@ var $ZodISODuration = /*@__PURE__*/ $constructor("$ZodISODuration", (inst, def)
1253
1843
  $ZodStringFormat.init(inst, def);
1254
1844
  });
1255
1845
  var $ZodIPv4 = /*@__PURE__*/ $constructor("$ZodIPv4", (inst, def) => {
1256
- def.pattern ?? (def.pattern = ipv4);
1846
+ def.pattern ?? (def.pattern = ipv4$1);
1257
1847
  $ZodStringFormat.init(inst, def);
1258
1848
  inst._zod.bag.format = `ipv4`;
1259
1849
  });
1260
1850
  var $ZodIPv6 = /*@__PURE__*/ $constructor("$ZodIPv6", (inst, def) => {
1261
- def.pattern ?? (def.pattern = ipv6);
1851
+ def.pattern ?? (def.pattern = ipv6$1);
1262
1852
  $ZodStringFormat.init(inst, def);
1263
1853
  inst._zod.bag.format = `ipv6`;
1264
1854
  inst._zod.check = (payload) => {
@@ -1275,12 +1865,17 @@ var $ZodIPv6 = /*@__PURE__*/ $constructor("$ZodIPv6", (inst, def) => {
1275
1865
  }
1276
1866
  };
1277
1867
  });
1868
+ var $ZodMAC = /*@__PURE__*/ $constructor("$ZodMAC", (inst, def) => {
1869
+ def.pattern ?? (def.pattern = mac$1(def.delimiter));
1870
+ $ZodStringFormat.init(inst, def);
1871
+ inst._zod.bag.format = `mac`;
1872
+ });
1278
1873
  var $ZodCIDRv4 = /*@__PURE__*/ $constructor("$ZodCIDRv4", (inst, def) => {
1279
- def.pattern ?? (def.pattern = cidrv4);
1874
+ def.pattern ?? (def.pattern = cidrv4$1);
1280
1875
  $ZodStringFormat.init(inst, def);
1281
1876
  });
1282
1877
  var $ZodCIDRv6 = /*@__PURE__*/ $constructor("$ZodCIDRv6", (inst, def) => {
1283
- def.pattern ?? (def.pattern = cidrv6);
1878
+ def.pattern ?? (def.pattern = cidrv6$1);
1284
1879
  $ZodStringFormat.init(inst, def);
1285
1880
  inst._zod.check = (payload) => {
1286
1881
  const parts = payload.value.split("/");
@@ -1315,7 +1910,7 @@ function isValidBase64(data) {
1315
1910
  }
1316
1911
  }
1317
1912
  var $ZodBase64 = /*@__PURE__*/ $constructor("$ZodBase64", (inst, def) => {
1318
- def.pattern ?? (def.pattern = base64);
1913
+ def.pattern ?? (def.pattern = base64$1);
1319
1914
  $ZodStringFormat.init(inst, def);
1320
1915
  inst._zod.bag.contentEncoding = "base64";
1321
1916
  inst._zod.check = (payload) => {
@@ -1330,12 +1925,12 @@ var $ZodBase64 = /*@__PURE__*/ $constructor("$ZodBase64", (inst, def) => {
1330
1925
  };
1331
1926
  });
1332
1927
  function isValidBase64URL(data) {
1333
- if (!base64url.test(data)) return false;
1928
+ if (!base64url$1.test(data)) return false;
1334
1929
  const base64 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
1335
1930
  return isValidBase64(base64.padEnd(Math.ceil(base64.length / 4) * 4, "="));
1336
1931
  }
1337
1932
  var $ZodBase64URL = /*@__PURE__*/ $constructor("$ZodBase64URL", (inst, def) => {
1338
- def.pattern ?? (def.pattern = base64url);
1933
+ def.pattern ?? (def.pattern = base64url$1);
1339
1934
  $ZodStringFormat.init(inst, def);
1340
1935
  inst._zod.bag.contentEncoding = "base64url";
1341
1936
  inst._zod.check = (payload) => {
@@ -1350,7 +1945,7 @@ var $ZodBase64URL = /*@__PURE__*/ $constructor("$ZodBase64URL", (inst, def) => {
1350
1945
  };
1351
1946
  });
1352
1947
  var $ZodE164 = /*@__PURE__*/ $constructor("$ZodE164", (inst, def) => {
1353
- def.pattern ?? (def.pattern = e164);
1948
+ def.pattern ?? (def.pattern = e164$1);
1354
1949
  $ZodStringFormat.init(inst, def);
1355
1950
  });
1356
1951
  function isValidJWT(token, algorithm = null) {
@@ -1381,9 +1976,22 @@ var $ZodJWT = /*@__PURE__*/ $constructor("$ZodJWT", (inst, def) => {
1381
1976
  });
1382
1977
  };
1383
1978
  });
1979
+ var $ZodCustomStringFormat = /*@__PURE__*/ $constructor("$ZodCustomStringFormat", (inst, def) => {
1980
+ $ZodStringFormat.init(inst, def);
1981
+ inst._zod.check = (payload) => {
1982
+ if (def.fn(payload.value)) return;
1983
+ payload.issues.push({
1984
+ code: "invalid_format",
1985
+ format: def.format,
1986
+ input: payload.value,
1987
+ inst,
1988
+ continue: !def.abort
1989
+ });
1990
+ };
1991
+ });
1384
1992
  var $ZodNumber = /*@__PURE__*/ $constructor("$ZodNumber", (inst, def) => {
1385
1993
  $ZodType.init(inst, def);
1386
- inst._zod.pattern = inst._zod.bag.pattern ?? number;
1994
+ inst._zod.pattern = inst._zod.bag.pattern ?? number$1;
1387
1995
  inst._zod.parse = (payload, _ctx) => {
1388
1996
  if (def.coerce) try {
1389
1997
  payload.value = Number(payload.value);
@@ -1423,6 +2031,77 @@ var $ZodBoolean = /*@__PURE__*/ $constructor("$ZodBoolean", (inst, def) => {
1423
2031
  return payload;
1424
2032
  };
1425
2033
  });
2034
+ var $ZodBigInt = /*@__PURE__*/ $constructor("$ZodBigInt", (inst, def) => {
2035
+ $ZodType.init(inst, def);
2036
+ inst._zod.pattern = bigint$1;
2037
+ inst._zod.parse = (payload, _ctx) => {
2038
+ if (def.coerce) try {
2039
+ payload.value = BigInt(payload.value);
2040
+ } catch (_) {}
2041
+ if (typeof payload.value === "bigint") return payload;
2042
+ payload.issues.push({
2043
+ expected: "bigint",
2044
+ code: "invalid_type",
2045
+ input: payload.value,
2046
+ inst
2047
+ });
2048
+ return payload;
2049
+ };
2050
+ });
2051
+ var $ZodBigIntFormat = /*@__PURE__*/ $constructor("$ZodBigIntFormat", (inst, def) => {
2052
+ $ZodCheckBigIntFormat.init(inst, def);
2053
+ $ZodBigInt.init(inst, def);
2054
+ });
2055
+ var $ZodSymbol = /*@__PURE__*/ $constructor("$ZodSymbol", (inst, def) => {
2056
+ $ZodType.init(inst, def);
2057
+ inst._zod.parse = (payload, _ctx) => {
2058
+ const input = payload.value;
2059
+ if (typeof input === "symbol") return payload;
2060
+ payload.issues.push({
2061
+ expected: "symbol",
2062
+ code: "invalid_type",
2063
+ input,
2064
+ inst
2065
+ });
2066
+ return payload;
2067
+ };
2068
+ });
2069
+ var $ZodUndefined = /*@__PURE__*/ $constructor("$ZodUndefined", (inst, def) => {
2070
+ $ZodType.init(inst, def);
2071
+ inst._zod.pattern = _undefined$2;
2072
+ inst._zod.values = /* @__PURE__ */ new Set([void 0]);
2073
+ inst._zod.parse = (payload, _ctx) => {
2074
+ const input = payload.value;
2075
+ if (typeof input === "undefined") return payload;
2076
+ payload.issues.push({
2077
+ expected: "undefined",
2078
+ code: "invalid_type",
2079
+ input,
2080
+ inst
2081
+ });
2082
+ return payload;
2083
+ };
2084
+ });
2085
+ var $ZodNull = /*@__PURE__*/ $constructor("$ZodNull", (inst, def) => {
2086
+ $ZodType.init(inst, def);
2087
+ inst._zod.pattern = _null$2;
2088
+ inst._zod.values = /* @__PURE__ */ new Set([null]);
2089
+ inst._zod.parse = (payload, _ctx) => {
2090
+ const input = payload.value;
2091
+ if (input === null) return payload;
2092
+ payload.issues.push({
2093
+ expected: "null",
2094
+ code: "invalid_type",
2095
+ input,
2096
+ inst
2097
+ });
2098
+ return payload;
2099
+ };
2100
+ });
2101
+ var $ZodAny = /*@__PURE__*/ $constructor("$ZodAny", (inst, def) => {
2102
+ $ZodType.init(inst, def);
2103
+ inst._zod.parse = (payload) => payload;
2104
+ });
1426
2105
  var $ZodUnknown = /*@__PURE__*/ $constructor("$ZodUnknown", (inst, def) => {
1427
2106
  $ZodType.init(inst, def);
1428
2107
  inst._zod.parse = (payload) => payload;
@@ -1439,6 +2118,39 @@ var $ZodNever = /*@__PURE__*/ $constructor("$ZodNever", (inst, def) => {
1439
2118
  return payload;
1440
2119
  };
1441
2120
  });
2121
+ var $ZodVoid = /*@__PURE__*/ $constructor("$ZodVoid", (inst, def) => {
2122
+ $ZodType.init(inst, def);
2123
+ inst._zod.parse = (payload, _ctx) => {
2124
+ const input = payload.value;
2125
+ if (typeof input === "undefined") return payload;
2126
+ payload.issues.push({
2127
+ expected: "void",
2128
+ code: "invalid_type",
2129
+ input,
2130
+ inst
2131
+ });
2132
+ return payload;
2133
+ };
2134
+ });
2135
+ var $ZodDate = /*@__PURE__*/ $constructor("$ZodDate", (inst, def) => {
2136
+ $ZodType.init(inst, def);
2137
+ inst._zod.parse = (payload, _ctx) => {
2138
+ if (def.coerce) try {
2139
+ payload.value = new Date(payload.value);
2140
+ } catch (_err) {}
2141
+ const input = payload.value;
2142
+ const isDate = input instanceof Date;
2143
+ if (isDate && !Number.isNaN(input.getTime())) return payload;
2144
+ payload.issues.push({
2145
+ expected: "date",
2146
+ code: "invalid_type",
2147
+ input,
2148
+ ...isDate ? { received: "Invalid Date" } : {},
2149
+ inst
2150
+ });
2151
+ return payload;
2152
+ };
2153
+ });
1442
2154
  function handleArrayResult(result, final, index) {
1443
2155
  if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
1444
2156
  final.value[index] = result.value;
@@ -1767,8 +2479,109 @@ var $ZodUnion = /*@__PURE__*/ $constructor("$ZodUnion", (inst, def) => {
1767
2479
  });
1768
2480
  };
1769
2481
  });
1770
- var $ZodIntersection = /*@__PURE__*/ $constructor("$ZodIntersection", (inst, def) => {
1771
- $ZodType.init(inst, def);
2482
+ function handleExclusiveUnionResults(results, final, inst, ctx) {
2483
+ const successes = results.filter((r) => r.issues.length === 0);
2484
+ if (successes.length === 1) {
2485
+ final.value = successes[0].value;
2486
+ return final;
2487
+ }
2488
+ if (successes.length === 0) final.issues.push({
2489
+ code: "invalid_union",
2490
+ input: final.value,
2491
+ inst,
2492
+ errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
2493
+ });
2494
+ else final.issues.push({
2495
+ code: "invalid_union",
2496
+ input: final.value,
2497
+ inst,
2498
+ errors: [],
2499
+ inclusive: false
2500
+ });
2501
+ return final;
2502
+ }
2503
+ var $ZodXor = /*@__PURE__*/ $constructor("$ZodXor", (inst, def) => {
2504
+ $ZodUnion.init(inst, def);
2505
+ def.inclusive = false;
2506
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
2507
+ inst._zod.parse = (payload, ctx) => {
2508
+ if (first) return first(payload, ctx);
2509
+ let async = false;
2510
+ const results = [];
2511
+ for (const option of def.options) {
2512
+ const result = option._zod.run({
2513
+ value: payload.value,
2514
+ issues: []
2515
+ }, ctx);
2516
+ if (result instanceof Promise) {
2517
+ results.push(result);
2518
+ async = true;
2519
+ } else results.push(result);
2520
+ }
2521
+ if (!async) return handleExclusiveUnionResults(results, payload, inst, ctx);
2522
+ return Promise.all(results).then((results) => {
2523
+ return handleExclusiveUnionResults(results, payload, inst, ctx);
2524
+ });
2525
+ };
2526
+ });
2527
+ var $ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
2528
+ def.inclusive = false;
2529
+ $ZodUnion.init(inst, def);
2530
+ const _super = inst._zod.parse;
2531
+ defineLazy(inst._zod, "propValues", () => {
2532
+ const propValues = {};
2533
+ for (const option of def.options) {
2534
+ const pv = option._zod.propValues;
2535
+ if (!pv || Object.keys(pv).length === 0) throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
2536
+ for (const [k, v] of Object.entries(pv)) {
2537
+ if (!propValues[k]) propValues[k] = /* @__PURE__ */ new Set();
2538
+ for (const val of v) propValues[k].add(val);
2539
+ }
2540
+ }
2541
+ return propValues;
2542
+ });
2543
+ const disc = cached(() => {
2544
+ const opts = def.options;
2545
+ const map = /* @__PURE__ */ new Map();
2546
+ for (const o of opts) {
2547
+ const values = o._zod.propValues?.[def.discriminator];
2548
+ if (!values || values.size === 0) throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
2549
+ for (const v of values) {
2550
+ if (map.has(v)) throw new Error(`Duplicate discriminator value "${String(v)}"`);
2551
+ map.set(v, o);
2552
+ }
2553
+ }
2554
+ return map;
2555
+ });
2556
+ inst._zod.parse = (payload, ctx) => {
2557
+ const input = payload.value;
2558
+ if (!isObject(input)) {
2559
+ payload.issues.push({
2560
+ code: "invalid_type",
2561
+ expected: "object",
2562
+ input,
2563
+ inst
2564
+ });
2565
+ return payload;
2566
+ }
2567
+ const opt = disc.value.get(input?.[def.discriminator]);
2568
+ if (opt) return opt._zod.run(payload, ctx);
2569
+ if (def.unionFallback || ctx.direction === "backward") return _super(payload, ctx);
2570
+ payload.issues.push({
2571
+ code: "invalid_union",
2572
+ errors: [],
2573
+ note: "No matching discriminator",
2574
+ discriminator: def.discriminator,
2575
+ options: Array.from(disc.value.keys()),
2576
+ input,
2577
+ path: [def.discriminator],
2578
+ inst
2579
+ });
2580
+ return payload;
2581
+ };
2582
+ });
2583
+ var $ZodIntersection = /*@__PURE__*/ $constructor("$ZodIntersection", (inst, def) => {
2584
+ $ZodType.init(inst, def);
1772
2585
  inst._zod.parse = (payload, ctx) => {
1773
2586
  const input = payload.value;
1774
2587
  const left = def.left._zod.run({
@@ -1866,6 +2679,98 @@ function handleIntersectionResults(result, left, right) {
1866
2679
  result.value = merged.data;
1867
2680
  return result;
1868
2681
  }
2682
+ var $ZodTuple = /*@__PURE__*/ $constructor("$ZodTuple", (inst, def) => {
2683
+ $ZodType.init(inst, def);
2684
+ const items = def.items;
2685
+ inst._zod.parse = (payload, ctx) => {
2686
+ const input = payload.value;
2687
+ if (!Array.isArray(input)) {
2688
+ payload.issues.push({
2689
+ input,
2690
+ inst,
2691
+ expected: "tuple",
2692
+ code: "invalid_type"
2693
+ });
2694
+ return payload;
2695
+ }
2696
+ payload.value = [];
2697
+ const proms = [];
2698
+ const optinStart = getTupleOptStart(items, "optin");
2699
+ const optoutStart = getTupleOptStart(items, "optout");
2700
+ if (!def.rest) {
2701
+ if (input.length < optinStart) {
2702
+ payload.issues.push({
2703
+ code: "too_small",
2704
+ minimum: optinStart,
2705
+ inclusive: true,
2706
+ input,
2707
+ inst,
2708
+ origin: "array"
2709
+ });
2710
+ return payload;
2711
+ }
2712
+ if (input.length > items.length) payload.issues.push({
2713
+ code: "too_big",
2714
+ maximum: items.length,
2715
+ inclusive: true,
2716
+ input,
2717
+ inst,
2718
+ origin: "array"
2719
+ });
2720
+ }
2721
+ const itemResults = new Array(items.length);
2722
+ for (let i = 0; i < items.length; i++) {
2723
+ const r = items[i]._zod.run({
2724
+ value: input[i],
2725
+ issues: []
2726
+ }, ctx);
2727
+ if (r instanceof Promise) proms.push(r.then((rr) => {
2728
+ itemResults[i] = rr;
2729
+ }));
2730
+ else itemResults[i] = r;
2731
+ }
2732
+ if (def.rest) {
2733
+ let i = items.length - 1;
2734
+ const rest = input.slice(items.length);
2735
+ for (const el of rest) {
2736
+ i++;
2737
+ const result = def.rest._zod.run({
2738
+ value: el,
2739
+ issues: []
2740
+ }, ctx);
2741
+ if (result instanceof Promise) proms.push(result.then((r) => handleTupleResult(r, payload, i)));
2742
+ else handleTupleResult(result, payload, i);
2743
+ }
2744
+ }
2745
+ if (proms.length) return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
2746
+ return handleTupleResults(itemResults, payload, items, input, optoutStart);
2747
+ };
2748
+ });
2749
+ function getTupleOptStart(items, key) {
2750
+ for (let i = items.length - 1; i >= 0; i--) if (items[i]._zod[key] !== "optional") return i + 1;
2751
+ return 0;
2752
+ }
2753
+ function handleTupleResult(result, final, index) {
2754
+ if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
2755
+ final.value[index] = result.value;
2756
+ }
2757
+ function handleTupleResults(itemResults, final, items, input, optoutStart) {
2758
+ for (let i = 0; i < items.length; i++) {
2759
+ const r = itemResults[i];
2760
+ const isPresent = i < input.length;
2761
+ if (r.issues.length) {
2762
+ if (!isPresent && i >= optoutStart) {
2763
+ final.value.length = i;
2764
+ break;
2765
+ }
2766
+ final.issues.push(...prefixIssues(i, r.issues));
2767
+ }
2768
+ final.value[i] = r.value;
2769
+ }
2770
+ for (let i = final.value.length - 1; i >= input.length; i--) if (items[i]._zod.optout === "optional" && final.value[i] === void 0) final.value.length = i;
2771
+ else break;
2772
+ return final;
2773
+ }
1869
2774
  var $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
1870
2775
  $ZodType.init(inst, def);
1871
2776
  inst._zod.parse = (payload, ctx) => {
@@ -1937,7 +2842,7 @@ var $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
1937
2842
  issues: []
1938
2843
  }, ctx);
1939
2844
  if (keyResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
1940
- if (typeof key === "string" && number.test(key) && keyResult.issues.length) {
2845
+ if (typeof key === "string" && number$1.test(key) && keyResult.issues.length) {
1941
2846
  const retryResult = def.keyType._zod.run({
1942
2847
  value: Number(key),
1943
2848
  issues: []
@@ -1975,6 +2880,90 @@ var $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
1975
2880
  return payload;
1976
2881
  };
1977
2882
  });
2883
+ var $ZodMap = /*@__PURE__*/ $constructor("$ZodMap", (inst, def) => {
2884
+ $ZodType.init(inst, def);
2885
+ inst._zod.parse = (payload, ctx) => {
2886
+ const input = payload.value;
2887
+ if (!(input instanceof Map)) {
2888
+ payload.issues.push({
2889
+ expected: "map",
2890
+ code: "invalid_type",
2891
+ input,
2892
+ inst
2893
+ });
2894
+ return payload;
2895
+ }
2896
+ const proms = [];
2897
+ payload.value = /* @__PURE__ */ new Map();
2898
+ for (const [key, value] of input) {
2899
+ const keyResult = def.keyType._zod.run({
2900
+ value: key,
2901
+ issues: []
2902
+ }, ctx);
2903
+ const valueResult = def.valueType._zod.run({
2904
+ value,
2905
+ issues: []
2906
+ }, ctx);
2907
+ if (keyResult instanceof Promise || valueResult instanceof Promise) proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {
2908
+ handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
2909
+ }));
2910
+ else handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
2911
+ }
2912
+ if (proms.length) return Promise.all(proms).then(() => payload);
2913
+ return payload;
2914
+ };
2915
+ });
2916
+ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
2917
+ if (keyResult.issues.length) if (propertyKeyTypes.has(typeof key)) final.issues.push(...prefixIssues(key, keyResult.issues));
2918
+ else final.issues.push({
2919
+ code: "invalid_key",
2920
+ origin: "map",
2921
+ input,
2922
+ inst,
2923
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
2924
+ });
2925
+ if (valueResult.issues.length) if (propertyKeyTypes.has(typeof key)) final.issues.push(...prefixIssues(key, valueResult.issues));
2926
+ else final.issues.push({
2927
+ origin: "map",
2928
+ code: "invalid_element",
2929
+ input,
2930
+ inst,
2931
+ key,
2932
+ issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
2933
+ });
2934
+ final.value.set(keyResult.value, valueResult.value);
2935
+ }
2936
+ var $ZodSet = /*@__PURE__*/ $constructor("$ZodSet", (inst, def) => {
2937
+ $ZodType.init(inst, def);
2938
+ inst._zod.parse = (payload, ctx) => {
2939
+ const input = payload.value;
2940
+ if (!(input instanceof Set)) {
2941
+ payload.issues.push({
2942
+ input,
2943
+ inst,
2944
+ expected: "set",
2945
+ code: "invalid_type"
2946
+ });
2947
+ return payload;
2948
+ }
2949
+ const proms = [];
2950
+ payload.value = /* @__PURE__ */ new Set();
2951
+ for (const item of input) {
2952
+ const result = def.valueType._zod.run({
2953
+ value: item,
2954
+ issues: []
2955
+ }, ctx);
2956
+ if (result instanceof Promise) proms.push(result.then((result) => handleSetResult(result, payload)));
2957
+ else handleSetResult(result, payload);
2958
+ }
2959
+ if (proms.length) return Promise.all(proms).then(() => payload);
2960
+ return payload;
2961
+ };
2962
+ });
2963
+ function handleSetResult(result, final) {
2964
+ if (result.issues.length) final.issues.push(...result.issues);
2965
+ final.value.add(result.value);
2966
+ }
1978
2967
  var $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
1979
2968
  $ZodType.init(inst, def);
1980
2969
  const values = getEnumValues(def.entries);
@@ -1993,6 +2982,38 @@ var $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
1993
2982
  return payload;
1994
2983
  };
1995
2984
  });
2985
+ var $ZodLiteral = /*@__PURE__*/ $constructor("$ZodLiteral", (inst, def) => {
2986
+ $ZodType.init(inst, def);
2987
+ if (def.values.length === 0) throw new Error("Cannot create literal schema with no valid values");
2988
+ const values = new Set(def.values);
2989
+ inst._zod.values = values;
2990
+ inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
2991
+ inst._zod.parse = (payload, _ctx) => {
2992
+ const input = payload.value;
2993
+ if (values.has(input)) return payload;
2994
+ payload.issues.push({
2995
+ code: "invalid_value",
2996
+ values: def.values,
2997
+ input,
2998
+ inst
2999
+ });
3000
+ return payload;
3001
+ };
3002
+ });
3003
+ var $ZodFile = /*@__PURE__*/ $constructor("$ZodFile", (inst, def) => {
3004
+ $ZodType.init(inst, def);
3005
+ inst._zod.parse = (payload, _ctx) => {
3006
+ const input = payload.value;
3007
+ if (input instanceof File) return payload;
3008
+ payload.issues.push({
3009
+ expected: "file",
3010
+ code: "invalid_type",
3011
+ input,
3012
+ inst
3013
+ });
3014
+ return payload;
3015
+ };
3016
+ });
1996
3017
  var $ZodTransform = /*@__PURE__*/ $constructor("$ZodTransform", (inst, def) => {
1997
3018
  $ZodType.init(inst, def);
1998
3019
  inst._zod.optin = "optional";
@@ -2116,6 +3137,19 @@ function handleNonOptionalResult(payload, inst) {
2116
3137
  });
2117
3138
  return payload;
2118
3139
  }
3140
+ var $ZodSuccess = /*@__PURE__*/ $constructor("$ZodSuccess", (inst, def) => {
3141
+ $ZodType.init(inst, def);
3142
+ inst._zod.parse = (payload, ctx) => {
3143
+ if (ctx.direction === "backward") throw new $ZodEncodeError("ZodSuccess");
3144
+ const result = def.innerType._zod.run(payload, ctx);
3145
+ if (result instanceof Promise) return result.then((result) => {
3146
+ payload.value = result.issues.length === 0;
3147
+ return payload;
3148
+ });
3149
+ payload.value = result.issues.length === 0;
3150
+ return payload;
3151
+ };
3152
+ });
2119
3153
  var $ZodCatch = /*@__PURE__*/ $constructor("$ZodCatch", (inst, def) => {
2120
3154
  $ZodType.init(inst, def);
2121
3155
  inst._zod.optin = "optional";
@@ -2150,6 +3184,21 @@ var $ZodCatch = /*@__PURE__*/ $constructor("$ZodCatch", (inst, def) => {
2150
3184
  return payload;
2151
3185
  };
2152
3186
  });
3187
+ var $ZodNaN = /*@__PURE__*/ $constructor("$ZodNaN", (inst, def) => {
3188
+ $ZodType.init(inst, def);
3189
+ inst._zod.parse = (payload, _ctx) => {
3190
+ if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) {
3191
+ payload.issues.push({
3192
+ input: payload.value,
3193
+ inst,
3194
+ expected: "nan",
3195
+ code: "invalid_type"
3196
+ });
3197
+ return payload;
3198
+ }
3199
+ return payload;
3200
+ };
3201
+ });
2153
3202
  var $ZodPipe = /*@__PURE__*/ $constructor("$ZodPipe", (inst, def) => {
2154
3203
  $ZodType.init(inst, def);
2155
3204
  defineLazy(inst._zod, "values", () => def.in._zod.values);
@@ -2178,6 +3227,52 @@ function handlePipeResult(left, next, ctx) {
2178
3227
  fallback: left.fallback
2179
3228
  }, ctx);
2180
3229
  }
3230
+ var $ZodCodec = /*@__PURE__*/ $constructor("$ZodCodec", (inst, def) => {
3231
+ $ZodType.init(inst, def);
3232
+ defineLazy(inst._zod, "values", () => def.in._zod.values);
3233
+ defineLazy(inst._zod, "optin", () => def.in._zod.optin);
3234
+ defineLazy(inst._zod, "optout", () => def.out._zod.optout);
3235
+ defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
3236
+ inst._zod.parse = (payload, ctx) => {
3237
+ if ((ctx.direction || "forward") === "forward") {
3238
+ const left = def.in._zod.run(payload, ctx);
3239
+ if (left instanceof Promise) return left.then((left) => handleCodecAResult(left, def, ctx));
3240
+ return handleCodecAResult(left, def, ctx);
3241
+ } else {
3242
+ const right = def.out._zod.run(payload, ctx);
3243
+ if (right instanceof Promise) return right.then((right) => handleCodecAResult(right, def, ctx));
3244
+ return handleCodecAResult(right, def, ctx);
3245
+ }
3246
+ };
3247
+ });
3248
+ function handleCodecAResult(result, def, ctx) {
3249
+ if (result.issues.length) {
3250
+ result.aborted = true;
3251
+ return result;
3252
+ }
3253
+ if ((ctx.direction || "forward") === "forward") {
3254
+ const transformed = def.transform(result.value, result);
3255
+ if (transformed instanceof Promise) return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));
3256
+ return handleCodecTxResult(result, transformed, def.out, ctx);
3257
+ } else {
3258
+ const transformed = def.reverseTransform(result.value, result);
3259
+ if (transformed instanceof Promise) return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));
3260
+ return handleCodecTxResult(result, transformed, def.in, ctx);
3261
+ }
3262
+ }
3263
+ function handleCodecTxResult(left, value, nextSchema, ctx) {
3264
+ if (left.issues.length) {
3265
+ left.aborted = true;
3266
+ return left;
3267
+ }
3268
+ return nextSchema._zod.run({
3269
+ value,
3270
+ issues: left.issues
3271
+ }, ctx);
3272
+ }
3273
+ var $ZodPreprocess = /*@__PURE__*/ $constructor("$ZodPreprocess", (inst, def) => {
3274
+ $ZodPipe.init(inst, def);
3275
+ });
2181
3276
  var $ZodReadonly = /*@__PURE__*/ $constructor("$ZodReadonly", (inst, def) => {
2182
3277
  $ZodType.init(inst, def);
2183
3278
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -2195,6 +3290,130 @@ function handleReadonlyResult(payload) {
2195
3290
  payload.value = Object.freeze(payload.value);
2196
3291
  return payload;
2197
3292
  }
3293
+ var $ZodTemplateLiteral = /*@__PURE__*/ $constructor("$ZodTemplateLiteral", (inst, def) => {
3294
+ $ZodType.init(inst, def);
3295
+ const regexParts = [];
3296
+ for (const part of def.parts) if (typeof part === "object" && part !== null) {
3297
+ if (!part._zod.pattern) throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
3298
+ const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;
3299
+ if (!source) throw new Error(`Invalid template literal part: ${part._zod.traits}`);
3300
+ const start = source.startsWith("^") ? 1 : 0;
3301
+ const end = source.endsWith("$") ? source.length - 1 : source.length;
3302
+ regexParts.push(source.slice(start, end));
3303
+ } else if (part === null || primitiveTypes.has(typeof part)) regexParts.push(escapeRegex(`${part}`));
3304
+ else throw new Error(`Invalid template literal part: ${part}`);
3305
+ inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`);
3306
+ inst._zod.parse = (payload, _ctx) => {
3307
+ if (typeof payload.value !== "string") {
3308
+ payload.issues.push({
3309
+ input: payload.value,
3310
+ inst,
3311
+ expected: "string",
3312
+ code: "invalid_type"
3313
+ });
3314
+ return payload;
3315
+ }
3316
+ inst._zod.pattern.lastIndex = 0;
3317
+ if (!inst._zod.pattern.test(payload.value)) {
3318
+ payload.issues.push({
3319
+ input: payload.value,
3320
+ inst,
3321
+ code: "invalid_format",
3322
+ format: def.format ?? "template_literal",
3323
+ pattern: inst._zod.pattern.source
3324
+ });
3325
+ return payload;
3326
+ }
3327
+ return payload;
3328
+ };
3329
+ });
3330
+ var $ZodFunction = /*@__PURE__*/ $constructor("$ZodFunction", (inst, def) => {
3331
+ $ZodType.init(inst, def);
3332
+ inst._def = def;
3333
+ inst._zod.def = def;
3334
+ inst.implement = (func) => {
3335
+ if (typeof func !== "function") throw new Error("implement() must be called with a function");
3336
+ return function(...args) {
3337
+ const parsedArgs = inst._def.input ? parse$1(inst._def.input, args) : args;
3338
+ const result = Reflect.apply(func, this, parsedArgs);
3339
+ if (inst._def.output) return parse$1(inst._def.output, result);
3340
+ return result;
3341
+ };
3342
+ };
3343
+ inst.implementAsync = (func) => {
3344
+ if (typeof func !== "function") throw new Error("implementAsync() must be called with a function");
3345
+ return async function(...args) {
3346
+ const parsedArgs = inst._def.input ? await parseAsync$1(inst._def.input, args) : args;
3347
+ const result = await Reflect.apply(func, this, parsedArgs);
3348
+ if (inst._def.output) return await parseAsync$1(inst._def.output, result);
3349
+ return result;
3350
+ };
3351
+ };
3352
+ inst._zod.parse = (payload, _ctx) => {
3353
+ if (typeof payload.value !== "function") {
3354
+ payload.issues.push({
3355
+ code: "invalid_type",
3356
+ expected: "function",
3357
+ input: payload.value,
3358
+ inst
3359
+ });
3360
+ return payload;
3361
+ }
3362
+ if (inst._def.output && inst._def.output._zod.def.type === "promise") payload.value = inst.implementAsync(payload.value);
3363
+ else payload.value = inst.implement(payload.value);
3364
+ return payload;
3365
+ };
3366
+ inst.input = (...args) => {
3367
+ const F = inst.constructor;
3368
+ if (Array.isArray(args[0])) return new F({
3369
+ type: "function",
3370
+ input: new $ZodTuple({
3371
+ type: "tuple",
3372
+ items: args[0],
3373
+ rest: args[1]
3374
+ }),
3375
+ output: inst._def.output
3376
+ });
3377
+ return new F({
3378
+ type: "function",
3379
+ input: args[0],
3380
+ output: inst._def.output
3381
+ });
3382
+ };
3383
+ inst.output = (output) => {
3384
+ const F = inst.constructor;
3385
+ return new F({
3386
+ type: "function",
3387
+ input: inst._def.input,
3388
+ output
3389
+ });
3390
+ };
3391
+ return inst;
3392
+ });
3393
+ var $ZodPromise = /*@__PURE__*/ $constructor("$ZodPromise", (inst, def) => {
3394
+ $ZodType.init(inst, def);
3395
+ inst._zod.parse = (payload, ctx) => {
3396
+ return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({
3397
+ value: inner,
3398
+ issues: []
3399
+ }, ctx));
3400
+ };
3401
+ });
3402
+ var $ZodLazy = /*@__PURE__*/ $constructor("$ZodLazy", (inst, def) => {
3403
+ $ZodType.init(inst, def);
3404
+ defineLazy(inst._zod, "innerType", () => {
3405
+ const d = def;
3406
+ if (!d._cachedInner) d._cachedInner = def.getter();
3407
+ return d._cachedInner;
3408
+ });
3409
+ defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
3410
+ defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
3411
+ defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
3412
+ defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0);
3413
+ inst._zod.parse = (payload, ctx) => {
3414
+ return inst._zod.innerType._zod.run(payload, ctx);
3415
+ };
3416
+ });
2198
3417
  var $ZodCustom = /*@__PURE__*/ $constructor("$ZodCustom", (inst, def) => {
2199
3418
  $ZodCheck.init(inst, def);
2200
3419
  $ZodType.init(inst, def);
@@ -2224,6 +3443,8 @@ function handleRefineResult(result, payload, input, inst) {
2224
3443
  //#endregion
2225
3444
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
2226
3445
  var _a;
3446
+ var $output = Symbol("ZodOutput");
3447
+ var $input = Symbol("ZodInput");
2227
3448
  var $ZodRegistry = class {
2228
3449
  constructor() {
2229
3450
  this._map = /* @__PURE__ */ new WeakMap();
@@ -2278,6 +3499,14 @@ function _string(Class, params) {
2278
3499
  });
2279
3500
  }
2280
3501
  // @__NO_SIDE_EFFECTS__
3502
+ function _coercedString(Class, params) {
3503
+ return new Class({
3504
+ type: "string",
3505
+ coerce: true,
3506
+ ...normalizeParams(params)
3507
+ });
3508
+ }
3509
+ // @__NO_SIDE_EFFECTS__
2281
3510
  function _email(Class, params) {
2282
3511
  return new Class({
2283
3512
  type: "string",
@@ -2446,6 +3675,16 @@ function _ipv6(Class, params) {
2446
3675
  });
2447
3676
  }
2448
3677
  // @__NO_SIDE_EFFECTS__
3678
+ function _mac(Class, params) {
3679
+ return new Class({
3680
+ type: "string",
3681
+ format: "mac",
3682
+ check: "string_format",
3683
+ abort: false,
3684
+ ...normalizeParams(params)
3685
+ });
3686
+ }
3687
+ // @__NO_SIDE_EFFECTS__
2449
3688
  function _cidrv4(Class, params) {
2450
3689
  return new Class({
2451
3690
  type: "string",
@@ -2505,6 +3744,13 @@ function _jwt(Class, params) {
2505
3744
  ...normalizeParams(params)
2506
3745
  });
2507
3746
  }
3747
+ var TimePrecision = {
3748
+ Any: null,
3749
+ Minute: -1,
3750
+ Second: 0,
3751
+ Millisecond: 3,
3752
+ Microsecond: 6
3753
+ };
2508
3754
  // @__NO_SIDE_EFFECTS__
2509
3755
  function _isoDateTime(Class, params) {
2510
3756
  return new Class({
@@ -2537,48 +3783,193 @@ function _isoTime(Class, params) {
2537
3783
  });
2538
3784
  }
2539
3785
  // @__NO_SIDE_EFFECTS__
2540
- function _isoDuration(Class, params) {
3786
+ function _isoDuration(Class, params) {
3787
+ return new Class({
3788
+ type: "string",
3789
+ format: "duration",
3790
+ check: "string_format",
3791
+ ...normalizeParams(params)
3792
+ });
3793
+ }
3794
+ // @__NO_SIDE_EFFECTS__
3795
+ function _number(Class, params) {
3796
+ return new Class({
3797
+ type: "number",
3798
+ checks: [],
3799
+ ...normalizeParams(params)
3800
+ });
3801
+ }
3802
+ // @__NO_SIDE_EFFECTS__
3803
+ function _coercedNumber(Class, params) {
3804
+ return new Class({
3805
+ type: "number",
3806
+ coerce: true,
3807
+ checks: [],
3808
+ ...normalizeParams(params)
3809
+ });
3810
+ }
3811
+ // @__NO_SIDE_EFFECTS__
3812
+ function _int(Class, params) {
3813
+ return new Class({
3814
+ type: "number",
3815
+ check: "number_format",
3816
+ abort: false,
3817
+ format: "safeint",
3818
+ ...normalizeParams(params)
3819
+ });
3820
+ }
3821
+ // @__NO_SIDE_EFFECTS__
3822
+ function _float32(Class, params) {
3823
+ return new Class({
3824
+ type: "number",
3825
+ check: "number_format",
3826
+ abort: false,
3827
+ format: "float32",
3828
+ ...normalizeParams(params)
3829
+ });
3830
+ }
3831
+ // @__NO_SIDE_EFFECTS__
3832
+ function _float64(Class, params) {
3833
+ return new Class({
3834
+ type: "number",
3835
+ check: "number_format",
3836
+ abort: false,
3837
+ format: "float64",
3838
+ ...normalizeParams(params)
3839
+ });
3840
+ }
3841
+ // @__NO_SIDE_EFFECTS__
3842
+ function _int32(Class, params) {
3843
+ return new Class({
3844
+ type: "number",
3845
+ check: "number_format",
3846
+ abort: false,
3847
+ format: "int32",
3848
+ ...normalizeParams(params)
3849
+ });
3850
+ }
3851
+ // @__NO_SIDE_EFFECTS__
3852
+ function _uint32(Class, params) {
3853
+ return new Class({
3854
+ type: "number",
3855
+ check: "number_format",
3856
+ abort: false,
3857
+ format: "uint32",
3858
+ ...normalizeParams(params)
3859
+ });
3860
+ }
3861
+ // @__NO_SIDE_EFFECTS__
3862
+ function _boolean(Class, params) {
3863
+ return new Class({
3864
+ type: "boolean",
3865
+ ...normalizeParams(params)
3866
+ });
3867
+ }
3868
+ // @__NO_SIDE_EFFECTS__
3869
+ function _coercedBoolean(Class, params) {
3870
+ return new Class({
3871
+ type: "boolean",
3872
+ coerce: true,
3873
+ ...normalizeParams(params)
3874
+ });
3875
+ }
3876
+ // @__NO_SIDE_EFFECTS__
3877
+ function _bigint(Class, params) {
3878
+ return new Class({
3879
+ type: "bigint",
3880
+ ...normalizeParams(params)
3881
+ });
3882
+ }
3883
+ // @__NO_SIDE_EFFECTS__
3884
+ function _coercedBigint(Class, params) {
3885
+ return new Class({
3886
+ type: "bigint",
3887
+ coerce: true,
3888
+ ...normalizeParams(params)
3889
+ });
3890
+ }
3891
+ // @__NO_SIDE_EFFECTS__
3892
+ function _int64(Class, params) {
3893
+ return new Class({
3894
+ type: "bigint",
3895
+ check: "bigint_format",
3896
+ abort: false,
3897
+ format: "int64",
3898
+ ...normalizeParams(params)
3899
+ });
3900
+ }
3901
+ // @__NO_SIDE_EFFECTS__
3902
+ function _uint64(Class, params) {
3903
+ return new Class({
3904
+ type: "bigint",
3905
+ check: "bigint_format",
3906
+ abort: false,
3907
+ format: "uint64",
3908
+ ...normalizeParams(params)
3909
+ });
3910
+ }
3911
+ // @__NO_SIDE_EFFECTS__
3912
+ function _symbol(Class, params) {
3913
+ return new Class({
3914
+ type: "symbol",
3915
+ ...normalizeParams(params)
3916
+ });
3917
+ }
3918
+ // @__NO_SIDE_EFFECTS__
3919
+ function _undefined$1(Class, params) {
3920
+ return new Class({
3921
+ type: "undefined",
3922
+ ...normalizeParams(params)
3923
+ });
3924
+ }
3925
+ // @__NO_SIDE_EFFECTS__
3926
+ function _null$1(Class, params) {
3927
+ return new Class({
3928
+ type: "null",
3929
+ ...normalizeParams(params)
3930
+ });
3931
+ }
3932
+ // @__NO_SIDE_EFFECTS__
3933
+ function _any(Class) {
3934
+ return new Class({ type: "any" });
3935
+ }
3936
+ // @__NO_SIDE_EFFECTS__
3937
+ function _unknown(Class) {
3938
+ return new Class({ type: "unknown" });
3939
+ }
3940
+ // @__NO_SIDE_EFFECTS__
3941
+ function _never(Class, params) {
2541
3942
  return new Class({
2542
- type: "string",
2543
- format: "duration",
2544
- check: "string_format",
3943
+ type: "never",
2545
3944
  ...normalizeParams(params)
2546
3945
  });
2547
3946
  }
2548
3947
  // @__NO_SIDE_EFFECTS__
2549
- function _coercedNumber(Class, params) {
3948
+ function _void$1(Class, params) {
2550
3949
  return new Class({
2551
- type: "number",
2552
- coerce: true,
2553
- checks: [],
3950
+ type: "void",
2554
3951
  ...normalizeParams(params)
2555
3952
  });
2556
3953
  }
2557
3954
  // @__NO_SIDE_EFFECTS__
2558
- function _int(Class, params) {
3955
+ function _date(Class, params) {
2559
3956
  return new Class({
2560
- type: "number",
2561
- check: "number_format",
2562
- abort: false,
2563
- format: "safeint",
3957
+ type: "date",
2564
3958
  ...normalizeParams(params)
2565
3959
  });
2566
3960
  }
2567
3961
  // @__NO_SIDE_EFFECTS__
2568
- function _boolean(Class, params) {
3962
+ function _coercedDate(Class, params) {
2569
3963
  return new Class({
2570
- type: "boolean",
3964
+ type: "date",
3965
+ coerce: true,
2571
3966
  ...normalizeParams(params)
2572
3967
  });
2573
3968
  }
2574
3969
  // @__NO_SIDE_EFFECTS__
2575
- function _unknown(Class) {
2576
- return new Class({ type: "unknown" });
2577
- }
2578
- // @__NO_SIDE_EFFECTS__
2579
- function _never(Class, params) {
3970
+ function _nan(Class, params) {
2580
3971
  return new Class({
2581
- type: "never",
3972
+ type: "nan",
2582
3973
  ...normalizeParams(params)
2583
3974
  });
2584
3975
  }
@@ -2619,6 +4010,22 @@ function _gte(value, params) {
2619
4010
  });
2620
4011
  }
2621
4012
  // @__NO_SIDE_EFFECTS__
4013
+ function _positive(params) {
4014
+ return /* @__PURE__ */ _gt(0, params);
4015
+ }
4016
+ // @__NO_SIDE_EFFECTS__
4017
+ function _negative(params) {
4018
+ return /* @__PURE__ */ _lt(0, params);
4019
+ }
4020
+ // @__NO_SIDE_EFFECTS__
4021
+ function _nonpositive(params) {
4022
+ return /* @__PURE__ */ _lte(0, params);
4023
+ }
4024
+ // @__NO_SIDE_EFFECTS__
4025
+ function _nonnegative(params) {
4026
+ return /* @__PURE__ */ _gte(0, params);
4027
+ }
4028
+ // @__NO_SIDE_EFFECTS__
2622
4029
  function _multipleOf(value, params) {
2623
4030
  return new $ZodCheckMultipleOf({
2624
4031
  check: "multiple_of",
@@ -2627,6 +4034,30 @@ function _multipleOf(value, params) {
2627
4034
  });
2628
4035
  }
2629
4036
  // @__NO_SIDE_EFFECTS__
4037
+ function _maxSize(maximum, params) {
4038
+ return new $ZodCheckMaxSize({
4039
+ check: "max_size",
4040
+ ...normalizeParams(params),
4041
+ maximum
4042
+ });
4043
+ }
4044
+ // @__NO_SIDE_EFFECTS__
4045
+ function _minSize(minimum, params) {
4046
+ return new $ZodCheckMinSize({
4047
+ check: "min_size",
4048
+ ...normalizeParams(params),
4049
+ minimum
4050
+ });
4051
+ }
4052
+ // @__NO_SIDE_EFFECTS__
4053
+ function _size(size, params) {
4054
+ return new $ZodCheckSizeEquals({
4055
+ check: "size_equals",
4056
+ ...normalizeParams(params),
4057
+ size
4058
+ });
4059
+ }
4060
+ // @__NO_SIDE_EFFECTS__
2630
4061
  function _maxLength(maximum, params) {
2631
4062
  return new $ZodCheckMaxLength({
2632
4063
  check: "max_length",
@@ -2703,6 +4134,23 @@ function _endsWith(suffix, params) {
2703
4134
  });
2704
4135
  }
2705
4136
  // @__NO_SIDE_EFFECTS__
4137
+ function _property(property, schema, params) {
4138
+ return new $ZodCheckProperty({
4139
+ check: "property",
4140
+ property,
4141
+ schema,
4142
+ ...normalizeParams(params)
4143
+ });
4144
+ }
4145
+ // @__NO_SIDE_EFFECTS__
4146
+ function _mime(types, params) {
4147
+ return new $ZodCheckMimeType({
4148
+ check: "mime_type",
4149
+ mime: types,
4150
+ ...normalizeParams(params)
4151
+ });
4152
+ }
4153
+ // @__NO_SIDE_EFFECTS__
2706
4154
  function _overwrite(tx) {
2707
4155
  return new $ZodCheckOverwrite({
2708
4156
  check: "overwrite",
@@ -2738,6 +4186,215 @@ function _array(Class, element, params) {
2738
4186
  });
2739
4187
  }
2740
4188
  // @__NO_SIDE_EFFECTS__
4189
+ function _union(Class, options, params) {
4190
+ return new Class({
4191
+ type: "union",
4192
+ options,
4193
+ ...normalizeParams(params)
4194
+ });
4195
+ }
4196
+ function _xor(Class, options, params) {
4197
+ return new Class({
4198
+ type: "union",
4199
+ options,
4200
+ inclusive: false,
4201
+ ...normalizeParams(params)
4202
+ });
4203
+ }
4204
+ // @__NO_SIDE_EFFECTS__
4205
+ function _discriminatedUnion(Class, discriminator, options, params) {
4206
+ return new Class({
4207
+ type: "union",
4208
+ options,
4209
+ discriminator,
4210
+ ...normalizeParams(params)
4211
+ });
4212
+ }
4213
+ // @__NO_SIDE_EFFECTS__
4214
+ function _intersection(Class, left, right) {
4215
+ return new Class({
4216
+ type: "intersection",
4217
+ left,
4218
+ right
4219
+ });
4220
+ }
4221
+ // @__NO_SIDE_EFFECTS__
4222
+ function _tuple(Class, items, _paramsOrRest, _params) {
4223
+ const hasRest = _paramsOrRest instanceof $ZodType;
4224
+ return new Class({
4225
+ type: "tuple",
4226
+ items,
4227
+ rest: hasRest ? _paramsOrRest : null,
4228
+ ...normalizeParams(hasRest ? _params : _paramsOrRest)
4229
+ });
4230
+ }
4231
+ // @__NO_SIDE_EFFECTS__
4232
+ function _record(Class, keyType, valueType, params) {
4233
+ return new Class({
4234
+ type: "record",
4235
+ keyType,
4236
+ valueType,
4237
+ ...normalizeParams(params)
4238
+ });
4239
+ }
4240
+ // @__NO_SIDE_EFFECTS__
4241
+ function _map(Class, keyType, valueType, params) {
4242
+ return new Class({
4243
+ type: "map",
4244
+ keyType,
4245
+ valueType,
4246
+ ...normalizeParams(params)
4247
+ });
4248
+ }
4249
+ // @__NO_SIDE_EFFECTS__
4250
+ function _set(Class, valueType, params) {
4251
+ return new Class({
4252
+ type: "set",
4253
+ valueType,
4254
+ ...normalizeParams(params)
4255
+ });
4256
+ }
4257
+ // @__NO_SIDE_EFFECTS__
4258
+ function _enum$1(Class, values, params) {
4259
+ return new Class({
4260
+ type: "enum",
4261
+ entries: Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values,
4262
+ ...normalizeParams(params)
4263
+ });
4264
+ }
4265
+ /** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
4266
+ *
4267
+ * ```ts
4268
+ * enum Colors { red, green, blue }
4269
+ * z.enum(Colors);
4270
+ * ```
4271
+ */
4272
+ // @__NO_SIDE_EFFECTS__
4273
+ function _nativeEnum(Class, entries, params) {
4274
+ return new Class({
4275
+ type: "enum",
4276
+ entries,
4277
+ ...normalizeParams(params)
4278
+ });
4279
+ }
4280
+ // @__NO_SIDE_EFFECTS__
4281
+ function _literal(Class, value, params) {
4282
+ return new Class({
4283
+ type: "literal",
4284
+ values: Array.isArray(value) ? value : [value],
4285
+ ...normalizeParams(params)
4286
+ });
4287
+ }
4288
+ // @__NO_SIDE_EFFECTS__
4289
+ function _file(Class, params) {
4290
+ return new Class({
4291
+ type: "file",
4292
+ ...normalizeParams(params)
4293
+ });
4294
+ }
4295
+ // @__NO_SIDE_EFFECTS__
4296
+ function _transform(Class, fn) {
4297
+ return new Class({
4298
+ type: "transform",
4299
+ transform: fn
4300
+ });
4301
+ }
4302
+ // @__NO_SIDE_EFFECTS__
4303
+ function _optional(Class, innerType) {
4304
+ return new Class({
4305
+ type: "optional",
4306
+ innerType
4307
+ });
4308
+ }
4309
+ // @__NO_SIDE_EFFECTS__
4310
+ function _nullable(Class, innerType) {
4311
+ return new Class({
4312
+ type: "nullable",
4313
+ innerType
4314
+ });
4315
+ }
4316
+ // @__NO_SIDE_EFFECTS__
4317
+ function _default$1(Class, innerType, defaultValue) {
4318
+ return new Class({
4319
+ type: "default",
4320
+ innerType,
4321
+ get defaultValue() {
4322
+ return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue);
4323
+ }
4324
+ });
4325
+ }
4326
+ // @__NO_SIDE_EFFECTS__
4327
+ function _nonoptional(Class, innerType, params) {
4328
+ return new Class({
4329
+ type: "nonoptional",
4330
+ innerType,
4331
+ ...normalizeParams(params)
4332
+ });
4333
+ }
4334
+ // @__NO_SIDE_EFFECTS__
4335
+ function _success(Class, innerType) {
4336
+ return new Class({
4337
+ type: "success",
4338
+ innerType
4339
+ });
4340
+ }
4341
+ // @__NO_SIDE_EFFECTS__
4342
+ function _catch$1(Class, innerType, catchValue) {
4343
+ return new Class({
4344
+ type: "catch",
4345
+ innerType,
4346
+ catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
4347
+ });
4348
+ }
4349
+ // @__NO_SIDE_EFFECTS__
4350
+ function _pipe(Class, in_, out) {
4351
+ return new Class({
4352
+ type: "pipe",
4353
+ in: in_,
4354
+ out
4355
+ });
4356
+ }
4357
+ // @__NO_SIDE_EFFECTS__
4358
+ function _readonly(Class, innerType) {
4359
+ return new Class({
4360
+ type: "readonly",
4361
+ innerType
4362
+ });
4363
+ }
4364
+ // @__NO_SIDE_EFFECTS__
4365
+ function _templateLiteral(Class, parts, params) {
4366
+ return new Class({
4367
+ type: "template_literal",
4368
+ parts,
4369
+ ...normalizeParams(params)
4370
+ });
4371
+ }
4372
+ // @__NO_SIDE_EFFECTS__
4373
+ function _lazy(Class, getter) {
4374
+ return new Class({
4375
+ type: "lazy",
4376
+ getter
4377
+ });
4378
+ }
4379
+ // @__NO_SIDE_EFFECTS__
4380
+ function _promise(Class, innerType) {
4381
+ return new Class({
4382
+ type: "promise",
4383
+ innerType
4384
+ });
4385
+ }
4386
+ // @__NO_SIDE_EFFECTS__
4387
+ function _custom(Class, fn, _params) {
4388
+ const norm = normalizeParams(_params);
4389
+ norm.abort ?? (norm.abort = true);
4390
+ return new Class({
4391
+ type: "custom",
4392
+ check: "custom",
4393
+ fn,
4394
+ ...norm
4395
+ });
4396
+ }
4397
+ // @__NO_SIDE_EFFECTS__
2741
4398
  function _refine(Class, fn, _params) {
2742
4399
  return new Class({
2743
4400
  type: "custom",
@@ -2774,6 +4431,108 @@ function _check(fn, params) {
2774
4431
  ch._zod.check = fn;
2775
4432
  return ch;
2776
4433
  }
4434
+ // @__NO_SIDE_EFFECTS__
4435
+ function describe$1(description) {
4436
+ const ch = new $ZodCheck({ check: "describe" });
4437
+ ch._zod.onattach = [(inst) => {
4438
+ const existing = globalRegistry.get(inst) ?? {};
4439
+ globalRegistry.add(inst, {
4440
+ ...existing,
4441
+ description
4442
+ });
4443
+ }];
4444
+ ch._zod.check = () => {};
4445
+ return ch;
4446
+ }
4447
+ // @__NO_SIDE_EFFECTS__
4448
+ function meta$1(metadata) {
4449
+ const ch = new $ZodCheck({ check: "meta" });
4450
+ ch._zod.onattach = [(inst) => {
4451
+ const existing = globalRegistry.get(inst) ?? {};
4452
+ globalRegistry.add(inst, {
4453
+ ...existing,
4454
+ ...metadata
4455
+ });
4456
+ }];
4457
+ ch._zod.check = () => {};
4458
+ return ch;
4459
+ }
4460
+ // @__NO_SIDE_EFFECTS__
4461
+ function _stringbool(Classes, _params) {
4462
+ const params = normalizeParams(_params);
4463
+ let truthyArray = params.truthy ?? [
4464
+ "true",
4465
+ "1",
4466
+ "yes",
4467
+ "on",
4468
+ "y",
4469
+ "enabled"
4470
+ ];
4471
+ let falsyArray = params.falsy ?? [
4472
+ "false",
4473
+ "0",
4474
+ "no",
4475
+ "off",
4476
+ "n",
4477
+ "disabled"
4478
+ ];
4479
+ if (params.case !== "sensitive") {
4480
+ truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
4481
+ falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
4482
+ }
4483
+ const truthySet = new Set(truthyArray);
4484
+ const falsySet = new Set(falsyArray);
4485
+ const _Codec = Classes.Codec ?? $ZodCodec;
4486
+ const _Boolean = Classes.Boolean ?? $ZodBoolean;
4487
+ const codec = new _Codec({
4488
+ type: "pipe",
4489
+ in: new (Classes.String ?? $ZodString)({
4490
+ type: "string",
4491
+ error: params.error
4492
+ }),
4493
+ out: new _Boolean({
4494
+ type: "boolean",
4495
+ error: params.error
4496
+ }),
4497
+ transform: ((input, payload) => {
4498
+ let data = input;
4499
+ if (params.case !== "sensitive") data = data.toLowerCase();
4500
+ if (truthySet.has(data)) return true;
4501
+ else if (falsySet.has(data)) return false;
4502
+ else {
4503
+ payload.issues.push({
4504
+ code: "invalid_value",
4505
+ expected: "stringbool",
4506
+ values: [...truthySet, ...falsySet],
4507
+ input: payload.value,
4508
+ inst: codec,
4509
+ continue: false
4510
+ });
4511
+ return {};
4512
+ }
4513
+ }),
4514
+ reverseTransform: ((input, _payload) => {
4515
+ if (input === true) return truthyArray[0] || "true";
4516
+ else return falsyArray[0] || "false";
4517
+ }),
4518
+ error: params.error
4519
+ });
4520
+ return codec;
4521
+ }
4522
+ // @__NO_SIDE_EFFECTS__
4523
+ function _stringFormat(Class, format, fnOrRegex, _params = {}) {
4524
+ const params = normalizeParams(_params);
4525
+ const def = {
4526
+ ...normalizeParams(_params),
4527
+ check: "string_format",
4528
+ type: "string",
4529
+ format,
4530
+ fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
4531
+ ...params
4532
+ };
4533
+ if (fnOrRegex instanceof RegExp) def.pattern = fnOrRegex;
4534
+ return new Class(def);
4535
+ }
2777
4536
  //#endregion
2778
4537
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
2779
4538
  function initializeContext(params) {
@@ -3120,9 +4879,33 @@ var numberProcessor = (schema, ctx, _json, _params) => {
3120
4879
  var booleanProcessor = (_schema, _ctx, json, _params) => {
3121
4880
  json.type = "boolean";
3122
4881
  };
4882
+ var bigintProcessor = (_schema, ctx, _json, _params) => {
4883
+ if (ctx.unrepresentable === "throw") throw new Error("BigInt cannot be represented in JSON Schema");
4884
+ };
4885
+ var symbolProcessor = (_schema, ctx, _json, _params) => {
4886
+ if (ctx.unrepresentable === "throw") throw new Error("Symbols cannot be represented in JSON Schema");
4887
+ };
4888
+ var nullProcessor = (_schema, ctx, json, _params) => {
4889
+ if (ctx.target === "openapi-3.0") {
4890
+ json.type = "string";
4891
+ json.nullable = true;
4892
+ json.enum = [null];
4893
+ } else json.type = "null";
4894
+ };
4895
+ var undefinedProcessor = (_schema, ctx, _json, _params) => {
4896
+ if (ctx.unrepresentable === "throw") throw new Error("Undefined cannot be represented in JSON Schema");
4897
+ };
4898
+ var voidProcessor = (_schema, ctx, _json, _params) => {
4899
+ if (ctx.unrepresentable === "throw") throw new Error("Void cannot be represented in JSON Schema");
4900
+ };
3123
4901
  var neverProcessor = (_schema, _ctx, json, _params) => {
3124
4902
  json.not = {};
3125
4903
  };
4904
+ var anyProcessor = (_schema, _ctx, _json, _params) => {};
4905
+ var unknownProcessor = (_schema, _ctx, _json, _params) => {};
4906
+ var dateProcessor = (_schema, ctx, _json, _params) => {
4907
+ if (ctx.unrepresentable === "throw") throw new Error("Date cannot be represented in JSON Schema");
4908
+ };
3126
4909
  var enumProcessor = (schema, _ctx, json, _params) => {
3127
4910
  const def = schema._zod.def;
3128
4911
  const values = getEnumValues(def.entries);
@@ -3130,12 +4913,74 @@ var enumProcessor = (schema, _ctx, json, _params) => {
3130
4913
  if (values.every((v) => typeof v === "string")) json.type = "string";
3131
4914
  json.enum = values;
3132
4915
  };
4916
+ var literalProcessor = (schema, ctx, json, _params) => {
4917
+ const def = schema._zod.def;
4918
+ const vals = [];
4919
+ for (const val of def.values) if (val === void 0) {
4920
+ if (ctx.unrepresentable === "throw") throw new Error("Literal `undefined` cannot be represented in JSON Schema");
4921
+ } else if (typeof val === "bigint") if (ctx.unrepresentable === "throw") throw new Error("BigInt literals cannot be represented in JSON Schema");
4922
+ else vals.push(Number(val));
4923
+ else vals.push(val);
4924
+ if (vals.length === 0) {} else if (vals.length === 1) {
4925
+ const val = vals[0];
4926
+ json.type = val === null ? "null" : typeof val;
4927
+ if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") json.enum = [val];
4928
+ else json.const = val;
4929
+ } else {
4930
+ if (vals.every((v) => typeof v === "number")) json.type = "number";
4931
+ if (vals.every((v) => typeof v === "string")) json.type = "string";
4932
+ if (vals.every((v) => typeof v === "boolean")) json.type = "boolean";
4933
+ if (vals.every((v) => v === null)) json.type = "null";
4934
+ json.enum = vals;
4935
+ }
4936
+ };
4937
+ var nanProcessor = (_schema, ctx, _json, _params) => {
4938
+ if (ctx.unrepresentable === "throw") throw new Error("NaN cannot be represented in JSON Schema");
4939
+ };
4940
+ var templateLiteralProcessor = (schema, _ctx, json, _params) => {
4941
+ const _json = json;
4942
+ const pattern = schema._zod.pattern;
4943
+ if (!pattern) throw new Error("Pattern not found in template literal");
4944
+ _json.type = "string";
4945
+ _json.pattern = pattern.source;
4946
+ };
4947
+ var fileProcessor = (schema, _ctx, json, _params) => {
4948
+ const _json = json;
4949
+ const file = {
4950
+ type: "string",
4951
+ format: "binary",
4952
+ contentEncoding: "binary"
4953
+ };
4954
+ const { minimum, maximum, mime } = schema._zod.bag;
4955
+ if (minimum !== void 0) file.minLength = minimum;
4956
+ if (maximum !== void 0) file.maxLength = maximum;
4957
+ if (mime) if (mime.length === 1) {
4958
+ file.contentMediaType = mime[0];
4959
+ Object.assign(_json, file);
4960
+ } else {
4961
+ Object.assign(_json, file);
4962
+ _json.anyOf = mime.map((m) => ({ contentMediaType: m }));
4963
+ }
4964
+ else Object.assign(_json, file);
4965
+ };
4966
+ var successProcessor = (_schema, _ctx, json, _params) => {
4967
+ json.type = "boolean";
4968
+ };
3133
4969
  var customProcessor = (_schema, ctx, _json, _params) => {
3134
4970
  if (ctx.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
3135
4971
  };
4972
+ var functionProcessor = (_schema, ctx, _json, _params) => {
4973
+ if (ctx.unrepresentable === "throw") throw new Error("Function types cannot be represented in JSON Schema");
4974
+ };
3136
4975
  var transformProcessor = (_schema, ctx, _json, _params) => {
3137
4976
  if (ctx.unrepresentable === "throw") throw new Error("Transforms cannot be represented in JSON Schema");
3138
4977
  };
4978
+ var mapProcessor = (_schema, ctx, _json, _params) => {
4979
+ if (ctx.unrepresentable === "throw") throw new Error("Map cannot be represented in JSON Schema");
4980
+ };
4981
+ var setProcessor = (_schema, ctx, _json, _params) => {
4982
+ if (ctx.unrepresentable === "throw") throw new Error("Set cannot be represented in JSON Schema");
4983
+ };
3139
4984
  var arrayProcessor = (schema, ctx, _json, params) => {
3140
4985
  const json = _json;
3141
4986
  const def = schema._zod.def;
@@ -3212,6 +5057,44 @@ var intersectionProcessor = (schema, ctx, json, params) => {
3212
5057
  const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
3213
5058
  json.allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
3214
5059
  };
5060
+ var tupleProcessor = (schema, ctx, _json, params) => {
5061
+ const json = _json;
5062
+ const def = schema._zod.def;
5063
+ json.type = "array";
5064
+ const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
5065
+ const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
5066
+ const prefixItems = def.items.map((x, i) => process(x, ctx, {
5067
+ ...params,
5068
+ path: [
5069
+ ...params.path,
5070
+ prefixPath,
5071
+ i
5072
+ ]
5073
+ }));
5074
+ const rest = def.rest ? process(def.rest, ctx, {
5075
+ ...params,
5076
+ path: [
5077
+ ...params.path,
5078
+ restPath,
5079
+ ...ctx.target === "openapi-3.0" ? [def.items.length] : []
5080
+ ]
5081
+ }) : null;
5082
+ if (ctx.target === "draft-2020-12") {
5083
+ json.prefixItems = prefixItems;
5084
+ if (rest) json.items = rest;
5085
+ } else if (ctx.target === "openapi-3.0") {
5086
+ json.items = { anyOf: prefixItems };
5087
+ if (rest) json.items.anyOf.push(rest);
5088
+ json.minItems = prefixItems.length;
5089
+ if (!rest) json.maxItems = prefixItems.length;
5090
+ } else {
5091
+ json.items = prefixItems;
5092
+ if (rest) json.additionalItems = rest;
5093
+ }
5094
+ const { minimum, maximum } = schema._zod.bag;
5095
+ if (typeof minimum === "number") json.minItems = minimum;
5096
+ if (typeof maximum === "number") json.maxItems = maximum;
5097
+ };
3215
5098
  var recordProcessor = (schema, ctx, _json, params) => {
3216
5099
  const json = _json;
3217
5100
  const def = schema._zod.def;
@@ -3302,14 +5185,111 @@ var readonlyProcessor = (schema, ctx, json, params) => {
3302
5185
  seen.ref = def.innerType;
3303
5186
  json.readOnly = true;
3304
5187
  };
5188
+ var promiseProcessor = (schema, ctx, _json, params) => {
5189
+ const def = schema._zod.def;
5190
+ process(def.innerType, ctx, params);
5191
+ const seen = ctx.seen.get(schema);
5192
+ seen.ref = def.innerType;
5193
+ };
3305
5194
  var optionalProcessor = (schema, ctx, _json, params) => {
3306
5195
  const def = schema._zod.def;
3307
5196
  process(def.innerType, ctx, params);
3308
5197
  const seen = ctx.seen.get(schema);
3309
5198
  seen.ref = def.innerType;
3310
5199
  };
5200
+ var lazyProcessor = (schema, ctx, _json, params) => {
5201
+ const innerType = schema._zod.innerType;
5202
+ process(innerType, ctx, params);
5203
+ const seen = ctx.seen.get(schema);
5204
+ seen.ref = innerType;
5205
+ };
5206
+ var allProcessors = {
5207
+ string: stringProcessor,
5208
+ number: numberProcessor,
5209
+ boolean: booleanProcessor,
5210
+ bigint: bigintProcessor,
5211
+ symbol: symbolProcessor,
5212
+ null: nullProcessor,
5213
+ undefined: undefinedProcessor,
5214
+ void: voidProcessor,
5215
+ never: neverProcessor,
5216
+ any: anyProcessor,
5217
+ unknown: unknownProcessor,
5218
+ date: dateProcessor,
5219
+ enum: enumProcessor,
5220
+ literal: literalProcessor,
5221
+ nan: nanProcessor,
5222
+ template_literal: templateLiteralProcessor,
5223
+ file: fileProcessor,
5224
+ success: successProcessor,
5225
+ custom: customProcessor,
5226
+ function: functionProcessor,
5227
+ transform: transformProcessor,
5228
+ map: mapProcessor,
5229
+ set: setProcessor,
5230
+ array: arrayProcessor,
5231
+ object: objectProcessor,
5232
+ union: unionProcessor,
5233
+ intersection: intersectionProcessor,
5234
+ tuple: tupleProcessor,
5235
+ record: recordProcessor,
5236
+ nullable: nullableProcessor,
5237
+ nonoptional: nonoptionalProcessor,
5238
+ default: defaultProcessor,
5239
+ prefault: prefaultProcessor,
5240
+ catch: catchProcessor,
5241
+ pipe: pipeProcessor,
5242
+ readonly: readonlyProcessor,
5243
+ promise: promiseProcessor,
5244
+ optional: optionalProcessor,
5245
+ lazy: lazyProcessor
5246
+ };
5247
+ function toJSONSchema(input, params) {
5248
+ if ("_idmap" in input) {
5249
+ const registry = input;
5250
+ const ctx = initializeContext({
5251
+ ...params,
5252
+ processors: allProcessors
5253
+ });
5254
+ const defs = {};
5255
+ for (const entry of registry._idmap.entries()) {
5256
+ const [_, schema] = entry;
5257
+ process(schema, ctx);
5258
+ }
5259
+ const schemas = {};
5260
+ ctx.external = {
5261
+ registry,
5262
+ uri: params?.uri,
5263
+ defs
5264
+ };
5265
+ for (const entry of registry._idmap.entries()) {
5266
+ const [key, schema] = entry;
5267
+ extractDefs(ctx, schema);
5268
+ schemas[key] = finalize(ctx, schema);
5269
+ }
5270
+ if (Object.keys(defs).length > 0) schemas.__shared = { [ctx.target === "draft-2020-12" ? "$defs" : "definitions"]: defs };
5271
+ return { schemas };
5272
+ }
5273
+ const ctx = initializeContext({
5274
+ ...params,
5275
+ processors: allProcessors
5276
+ });
5277
+ process(input, ctx);
5278
+ extractDefs(ctx, input);
5279
+ return finalize(ctx, input);
5280
+ }
3311
5281
  //#endregion
3312
5282
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/iso.js
5283
+ var iso_exports = /* @__PURE__ */ __exportAll({
5284
+ ZodISODate: () => ZodISODate,
5285
+ ZodISODateTime: () => ZodISODateTime,
5286
+ ZodISODuration: () => ZodISODuration,
5287
+ ZodISOTime: () => ZodISOTime,
5288
+ date: () => date$1,
5289
+ datetime: () => datetime,
5290
+ duration: () => duration,
5291
+ time: () => time
5292
+ });
3313
5293
  var ZodISODateTime = /*@__PURE__*/ $constructor("ZodISODateTime", (inst, def) => {
3314
5294
  $ZodISODateTime.init(inst, def);
3315
5295
  ZodStringFormat.init(inst, def);
@@ -3321,7 +5301,7 @@ var ZodISODate = /*@__PURE__*/ $constructor("ZodISODate", (inst, def) => {
3321
5301
  $ZodISODate.init(inst, def);
3322
5302
  ZodStringFormat.init(inst, def);
3323
5303
  });
3324
- function date(params) {
5304
+ function date$1(params) {
3325
5305
  return /* @__PURE__ */ _isoDate(ZodISODate, params);
3326
5306
  }
3327
5307
  var ZodISOTime = /*@__PURE__*/ $constructor("ZodISOTime", (inst, def) => {
@@ -3359,6 +5339,7 @@ var initializer = (inst, issues) => {
3359
5339
  } }
3360
5340
  });
3361
5341
  };
5342
+ var ZodError = /*@__PURE__*/ $constructor("ZodError", initializer);
3362
5343
  var ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, { Parent: Error });
3363
5344
  //#endregion
3364
5345
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.js
@@ -3376,6 +5357,174 @@ var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
3376
5357
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
3377
5358
  //#endregion
3378
5359
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
5360
+ var schemas_exports = /* @__PURE__ */ __exportAll({
5361
+ ZodAny: () => ZodAny,
5362
+ ZodArray: () => ZodArray,
5363
+ ZodBase64: () => ZodBase64,
5364
+ ZodBase64URL: () => ZodBase64URL,
5365
+ ZodBigInt: () => ZodBigInt,
5366
+ ZodBigIntFormat: () => ZodBigIntFormat,
5367
+ ZodBoolean: () => ZodBoolean,
5368
+ ZodCIDRv4: () => ZodCIDRv4,
5369
+ ZodCIDRv6: () => ZodCIDRv6,
5370
+ ZodCUID: () => ZodCUID,
5371
+ ZodCUID2: () => ZodCUID2,
5372
+ ZodCatch: () => ZodCatch,
5373
+ ZodCodec: () => ZodCodec,
5374
+ ZodCustom: () => ZodCustom,
5375
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
5376
+ ZodDate: () => ZodDate,
5377
+ ZodDefault: () => ZodDefault,
5378
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
5379
+ ZodE164: () => ZodE164,
5380
+ ZodEmail: () => ZodEmail,
5381
+ ZodEmoji: () => ZodEmoji,
5382
+ ZodEnum: () => ZodEnum,
5383
+ ZodExactOptional: () => ZodExactOptional,
5384
+ ZodFile: () => ZodFile,
5385
+ ZodFunction: () => ZodFunction,
5386
+ ZodGUID: () => ZodGUID,
5387
+ ZodIPv4: () => ZodIPv4,
5388
+ ZodIPv6: () => ZodIPv6,
5389
+ ZodIntersection: () => ZodIntersection,
5390
+ ZodJWT: () => ZodJWT,
5391
+ ZodKSUID: () => ZodKSUID,
5392
+ ZodLazy: () => ZodLazy,
5393
+ ZodLiteral: () => ZodLiteral,
5394
+ ZodMAC: () => ZodMAC,
5395
+ ZodMap: () => ZodMap,
5396
+ ZodNaN: () => ZodNaN,
5397
+ ZodNanoID: () => ZodNanoID,
5398
+ ZodNever: () => ZodNever,
5399
+ ZodNonOptional: () => ZodNonOptional,
5400
+ ZodNull: () => ZodNull,
5401
+ ZodNullable: () => ZodNullable,
5402
+ ZodNumber: () => ZodNumber,
5403
+ ZodNumberFormat: () => ZodNumberFormat,
5404
+ ZodObject: () => ZodObject,
5405
+ ZodOptional: () => ZodOptional,
5406
+ ZodPipe: () => ZodPipe,
5407
+ ZodPrefault: () => ZodPrefault,
5408
+ ZodPreprocess: () => ZodPreprocess,
5409
+ ZodPromise: () => ZodPromise,
5410
+ ZodReadonly: () => ZodReadonly,
5411
+ ZodRecord: () => ZodRecord,
5412
+ ZodSet: () => ZodSet,
5413
+ ZodString: () => ZodString,
5414
+ ZodStringFormat: () => ZodStringFormat,
5415
+ ZodSuccess: () => ZodSuccess,
5416
+ ZodSymbol: () => ZodSymbol,
5417
+ ZodTemplateLiteral: () => ZodTemplateLiteral,
5418
+ ZodTransform: () => ZodTransform,
5419
+ ZodTuple: () => ZodTuple,
5420
+ ZodType: () => ZodType,
5421
+ ZodULID: () => ZodULID,
5422
+ ZodURL: () => ZodURL,
5423
+ ZodUUID: () => ZodUUID,
5424
+ ZodUndefined: () => ZodUndefined,
5425
+ ZodUnion: () => ZodUnion,
5426
+ ZodUnknown: () => ZodUnknown,
5427
+ ZodVoid: () => ZodVoid,
5428
+ ZodXID: () => ZodXID,
5429
+ ZodXor: () => ZodXor,
5430
+ _ZodString: () => _ZodString,
5431
+ _default: () => _default,
5432
+ _function: () => _function,
5433
+ any: () => any,
5434
+ array: () => array,
5435
+ base64: () => base64,
5436
+ base64url: () => base64url,
5437
+ bigint: () => bigint,
5438
+ boolean: () => boolean,
5439
+ catch: () => _catch,
5440
+ check: () => check,
5441
+ cidrv4: () => cidrv4,
5442
+ cidrv6: () => cidrv6,
5443
+ codec: () => codec,
5444
+ cuid: () => cuid,
5445
+ cuid2: () => cuid2,
5446
+ custom: () => custom,
5447
+ date: () => date,
5448
+ describe: () => describe,
5449
+ discriminatedUnion: () => discriminatedUnion,
5450
+ e164: () => e164,
5451
+ email: () => email,
5452
+ emoji: () => emoji,
5453
+ enum: () => _enum,
5454
+ exactOptional: () => exactOptional,
5455
+ file: () => file,
5456
+ float32: () => float32,
5457
+ float64: () => float64,
5458
+ function: () => _function,
5459
+ guid: () => guid,
5460
+ hash: () => hash,
5461
+ hex: () => hex,
5462
+ hostname: () => hostname,
5463
+ httpUrl: () => httpUrl,
5464
+ instanceof: () => _instanceof,
5465
+ int: () => int,
5466
+ int32: () => int32,
5467
+ int64: () => int64,
5468
+ intersection: () => intersection,
5469
+ invertCodec: () => invertCodec,
5470
+ ipv4: () => ipv4,
5471
+ ipv6: () => ipv6,
5472
+ json: () => json,
5473
+ jwt: () => jwt,
5474
+ keyof: () => keyof,
5475
+ ksuid: () => ksuid,
5476
+ lazy: () => lazy,
5477
+ literal: () => literal,
5478
+ looseObject: () => looseObject,
5479
+ looseRecord: () => looseRecord,
5480
+ mac: () => mac,
5481
+ map: () => map,
5482
+ meta: () => meta,
5483
+ nan: () => nan,
5484
+ nanoid: () => nanoid,
5485
+ nativeEnum: () => nativeEnum,
5486
+ never: () => never,
5487
+ nonoptional: () => nonoptional,
5488
+ null: () => _null,
5489
+ nullable: () => nullable,
5490
+ nullish: () => nullish,
5491
+ number: () => number,
5492
+ object: () => object,
5493
+ optional: () => optional,
5494
+ partialRecord: () => partialRecord,
5495
+ pipe: () => pipe,
5496
+ prefault: () => prefault,
5497
+ preprocess: () => preprocess,
5498
+ promise: () => promise,
5499
+ readonly: () => readonly,
5500
+ record: () => record,
5501
+ refine: () => refine,
5502
+ set: () => set,
5503
+ strictObject: () => strictObject,
5504
+ string: () => string,
5505
+ stringFormat: () => stringFormat,
5506
+ stringbool: () => stringbool,
5507
+ success: () => success,
5508
+ superRefine: () => superRefine,
5509
+ symbol: () => symbol,
5510
+ templateLiteral: () => templateLiteral,
5511
+ transform: () => transform,
5512
+ tuple: () => tuple,
5513
+ uint32: () => uint32,
5514
+ uint64: () => uint64,
5515
+ ulid: () => ulid,
5516
+ undefined: () => _undefined,
5517
+ union: () => union,
5518
+ unknown: () => unknown,
5519
+ url: () => url,
5520
+ uuid: () => uuid,
5521
+ uuidv4: () => uuidv4,
5522
+ uuidv6: () => uuidv6,
5523
+ uuidv7: () => uuidv7,
5524
+ void: () => _void,
5525
+ xid: () => xid,
5526
+ xor: () => xor
5527
+ });
3379
5528
  var _installedGroups = /* @__PURE__ */ new WeakMap();
3380
5529
  function _installLazyMethods(inst, group, methods) {
3381
5530
  const proto = Object.getPrototypeOf(inst);
@@ -3621,7 +5770,7 @@ var ZodString = /*@__PURE__*/ $constructor("ZodString", (inst, def) => {
3621
5770
  inst.cidrv6 = (params) => inst.check(/* @__PURE__ */ _cidrv6(ZodCIDRv6, params));
3622
5771
  inst.e164 = (params) => inst.check(/* @__PURE__ */ _e164(ZodE164, params));
3623
5772
  inst.datetime = (params) => inst.check(datetime(params));
3624
- inst.date = (params) => inst.check(date(params));
5773
+ inst.date = (params) => inst.check(date$1(params));
3625
5774
  inst.time = (params) => inst.check(time(params));
3626
5775
  inst.duration = (params) => inst.check(duration(params));
3627
5776
  });
@@ -3636,26 +5785,60 @@ var ZodEmail = /*@__PURE__*/ $constructor("ZodEmail", (inst, def) => {
3636
5785
  $ZodEmail.init(inst, def);
3637
5786
  ZodStringFormat.init(inst, def);
3638
5787
  });
5788
+ function email(params) {
5789
+ return /* @__PURE__ */ _email(ZodEmail, params);
5790
+ }
3639
5791
  var ZodGUID = /*@__PURE__*/ $constructor("ZodGUID", (inst, def) => {
3640
5792
  $ZodGUID.init(inst, def);
3641
5793
  ZodStringFormat.init(inst, def);
3642
5794
  });
5795
+ function guid(params) {
5796
+ return /* @__PURE__ */ _guid(ZodGUID, params);
5797
+ }
3643
5798
  var ZodUUID = /*@__PURE__*/ $constructor("ZodUUID", (inst, def) => {
3644
5799
  $ZodUUID.init(inst, def);
3645
5800
  ZodStringFormat.init(inst, def);
3646
5801
  });
5802
+ function uuid(params) {
5803
+ return /* @__PURE__ */ _uuid(ZodUUID, params);
5804
+ }
5805
+ function uuidv4(params) {
5806
+ return /* @__PURE__ */ _uuidv4(ZodUUID, params);
5807
+ }
5808
+ function uuidv6(params) {
5809
+ return /* @__PURE__ */ _uuidv6(ZodUUID, params);
5810
+ }
5811
+ function uuidv7(params) {
5812
+ return /* @__PURE__ */ _uuidv7(ZodUUID, params);
5813
+ }
3647
5814
  var ZodURL = /*@__PURE__*/ $constructor("ZodURL", (inst, def) => {
3648
5815
  $ZodURL.init(inst, def);
3649
5816
  ZodStringFormat.init(inst, def);
3650
5817
  });
5818
+ function url(params) {
5819
+ return /* @__PURE__ */ _url(ZodURL, params);
5820
+ }
5821
+ function httpUrl(params) {
5822
+ return /* @__PURE__ */ _url(ZodURL, {
5823
+ protocol: httpProtocol,
5824
+ hostname: domain,
5825
+ ...normalizeParams(params)
5826
+ });
5827
+ }
3651
5828
  var ZodEmoji = /*@__PURE__*/ $constructor("ZodEmoji", (inst, def) => {
3652
5829
  $ZodEmoji.init(inst, def);
3653
5830
  ZodStringFormat.init(inst, def);
3654
5831
  });
5832
+ function emoji(params) {
5833
+ return /* @__PURE__ */ _emoji(ZodEmoji, params);
5834
+ }
3655
5835
  var ZodNanoID = /*@__PURE__*/ $constructor("ZodNanoID", (inst, def) => {
3656
5836
  $ZodNanoID.init(inst, def);
3657
5837
  ZodStringFormat.init(inst, def);
3658
5838
  });
5839
+ function nanoid(params) {
5840
+ return /* @__PURE__ */ _nanoid(ZodNanoID, params);
5841
+ }
3659
5842
  /**
3660
5843
  * @deprecated CUID v1 is deprecated by its authors due to information leakage
3661
5844
  * (timestamps embedded in the id). Use {@link ZodCUID2} instead.
@@ -3665,54 +5848,126 @@ var ZodCUID = /*@__PURE__*/ $constructor("ZodCUID", (inst, def) => {
3665
5848
  $ZodCUID.init(inst, def);
3666
5849
  ZodStringFormat.init(inst, def);
3667
5850
  });
5851
+ /**
5852
+ * Validates a CUID v1 string.
5853
+ *
5854
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
5855
+ * (timestamps embedded in the id). Use {@link cuid2 | `z.cuid2()`} instead.
5856
+ * See https://github.com/paralleldrive/cuid.
5857
+ */
5858
+ function cuid(params) {
5859
+ return /* @__PURE__ */ _cuid(ZodCUID, params);
5860
+ }
3668
5861
  var ZodCUID2 = /*@__PURE__*/ $constructor("ZodCUID2", (inst, def) => {
3669
5862
  $ZodCUID2.init(inst, def);
3670
5863
  ZodStringFormat.init(inst, def);
3671
5864
  });
5865
+ function cuid2(params) {
5866
+ return /* @__PURE__ */ _cuid2(ZodCUID2, params);
5867
+ }
3672
5868
  var ZodULID = /*@__PURE__*/ $constructor("ZodULID", (inst, def) => {
3673
5869
  $ZodULID.init(inst, def);
3674
5870
  ZodStringFormat.init(inst, def);
3675
5871
  });
5872
+ function ulid(params) {
5873
+ return /* @__PURE__ */ _ulid(ZodULID, params);
5874
+ }
3676
5875
  var ZodXID = /*@__PURE__*/ $constructor("ZodXID", (inst, def) => {
3677
5876
  $ZodXID.init(inst, def);
3678
5877
  ZodStringFormat.init(inst, def);
3679
5878
  });
5879
+ function xid(params) {
5880
+ return /* @__PURE__ */ _xid(ZodXID, params);
5881
+ }
3680
5882
  var ZodKSUID = /*@__PURE__*/ $constructor("ZodKSUID", (inst, def) => {
3681
5883
  $ZodKSUID.init(inst, def);
3682
5884
  ZodStringFormat.init(inst, def);
3683
5885
  });
5886
+ function ksuid(params) {
5887
+ return /* @__PURE__ */ _ksuid(ZodKSUID, params);
5888
+ }
3684
5889
  var ZodIPv4 = /*@__PURE__*/ $constructor("ZodIPv4", (inst, def) => {
3685
5890
  $ZodIPv4.init(inst, def);
3686
5891
  ZodStringFormat.init(inst, def);
3687
5892
  });
5893
+ function ipv4(params) {
5894
+ return /* @__PURE__ */ _ipv4(ZodIPv4, params);
5895
+ }
5896
+ var ZodMAC = /*@__PURE__*/ $constructor("ZodMAC", (inst, def) => {
5897
+ $ZodMAC.init(inst, def);
5898
+ ZodStringFormat.init(inst, def);
5899
+ });
5900
+ function mac(params) {
5901
+ return /* @__PURE__ */ _mac(ZodMAC, params);
5902
+ }
3688
5903
  var ZodIPv6 = /*@__PURE__*/ $constructor("ZodIPv6", (inst, def) => {
3689
5904
  $ZodIPv6.init(inst, def);
3690
5905
  ZodStringFormat.init(inst, def);
3691
5906
  });
5907
+ function ipv6(params) {
5908
+ return /* @__PURE__ */ _ipv6(ZodIPv6, params);
5909
+ }
3692
5910
  var ZodCIDRv4 = /*@__PURE__*/ $constructor("ZodCIDRv4", (inst, def) => {
3693
5911
  $ZodCIDRv4.init(inst, def);
3694
5912
  ZodStringFormat.init(inst, def);
3695
5913
  });
5914
+ function cidrv4(params) {
5915
+ return /* @__PURE__ */ _cidrv4(ZodCIDRv4, params);
5916
+ }
3696
5917
  var ZodCIDRv6 = /*@__PURE__*/ $constructor("ZodCIDRv6", (inst, def) => {
3697
5918
  $ZodCIDRv6.init(inst, def);
3698
5919
  ZodStringFormat.init(inst, def);
3699
5920
  });
5921
+ function cidrv6(params) {
5922
+ return /* @__PURE__ */ _cidrv6(ZodCIDRv6, params);
5923
+ }
3700
5924
  var ZodBase64 = /*@__PURE__*/ $constructor("ZodBase64", (inst, def) => {
3701
5925
  $ZodBase64.init(inst, def);
3702
5926
  ZodStringFormat.init(inst, def);
3703
5927
  });
5928
+ function base64(params) {
5929
+ return /* @__PURE__ */ _base64(ZodBase64, params);
5930
+ }
3704
5931
  var ZodBase64URL = /*@__PURE__*/ $constructor("ZodBase64URL", (inst, def) => {
3705
5932
  $ZodBase64URL.init(inst, def);
3706
5933
  ZodStringFormat.init(inst, def);
3707
5934
  });
5935
+ function base64url(params) {
5936
+ return /* @__PURE__ */ _base64url(ZodBase64URL, params);
5937
+ }
3708
5938
  var ZodE164 = /*@__PURE__*/ $constructor("ZodE164", (inst, def) => {
3709
5939
  $ZodE164.init(inst, def);
3710
5940
  ZodStringFormat.init(inst, def);
3711
5941
  });
5942
+ function e164(params) {
5943
+ return /* @__PURE__ */ _e164(ZodE164, params);
5944
+ }
3712
5945
  var ZodJWT = /*@__PURE__*/ $constructor("ZodJWT", (inst, def) => {
3713
5946
  $ZodJWT.init(inst, def);
3714
5947
  ZodStringFormat.init(inst, def);
3715
5948
  });
5949
+ function jwt(params) {
5950
+ return /* @__PURE__ */ _jwt(ZodJWT, params);
5951
+ }
5952
+ var ZodCustomStringFormat = /*@__PURE__*/ $constructor("ZodCustomStringFormat", (inst, def) => {
5953
+ $ZodCustomStringFormat.init(inst, def);
5954
+ ZodStringFormat.init(inst, def);
5955
+ });
5956
+ function stringFormat(format, fnOrRegex, _params = {}) {
5957
+ return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
5958
+ }
5959
+ function hostname(_params) {
5960
+ return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, "hostname", hostname$1, _params);
5961
+ }
5962
+ function hex(_params) {
5963
+ return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, "hex", hex$1, _params);
5964
+ }
5965
+ function hash(alg, params) {
5966
+ const format = `${alg}_${params?.enc ?? "hex"}`;
5967
+ const regex = regexes_exports[format];
5968
+ if (!regex) throw new Error(`Unrecognized hash format: ${format}`);
5969
+ return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, format, regex, params);
5970
+ }
3716
5971
  var ZodNumber = /*@__PURE__*/ $constructor("ZodNumber", (inst, def) => {
3717
5972
  $ZodNumber.init(inst, def);
3718
5973
  ZodType.init(inst, def);
@@ -3771,6 +6026,9 @@ var ZodNumber = /*@__PURE__*/ $constructor("ZodNumber", (inst, def) => {
3771
6026
  inst.isFinite = true;
3772
6027
  inst.format = bag.format ?? null;
3773
6028
  });
6029
+ function number(params) {
6030
+ return /* @__PURE__ */ _number(ZodNumber, params);
6031
+ }
3774
6032
  var ZodNumberFormat = /*@__PURE__*/ $constructor("ZodNumberFormat", (inst, def) => {
3775
6033
  $ZodNumberFormat.init(inst, def);
3776
6034
  ZodNumber.init(inst, def);
@@ -3778,6 +6036,18 @@ var ZodNumberFormat = /*@__PURE__*/ $constructor("ZodNumberFormat", (inst, def)
3778
6036
  function int(params) {
3779
6037
  return /* @__PURE__ */ _int(ZodNumberFormat, params);
3780
6038
  }
6039
+ function float32(params) {
6040
+ return /* @__PURE__ */ _float32(ZodNumberFormat, params);
6041
+ }
6042
+ function float64(params) {
6043
+ return /* @__PURE__ */ _float64(ZodNumberFormat, params);
6044
+ }
6045
+ function int32(params) {
6046
+ return /* @__PURE__ */ _int32(ZodNumberFormat, params);
6047
+ }
6048
+ function uint32(params) {
6049
+ return /* @__PURE__ */ _uint32(ZodNumberFormat, params);
6050
+ }
3781
6051
  var ZodBoolean = /*@__PURE__*/ $constructor("ZodBoolean", (inst, def) => {
3782
6052
  $ZodBoolean.init(inst, def);
3783
6053
  ZodType.init(inst, def);
@@ -3786,6 +6056,73 @@ var ZodBoolean = /*@__PURE__*/ $constructor("ZodBoolean", (inst, def) => {
3786
6056
  function boolean(params) {
3787
6057
  return /* @__PURE__ */ _boolean(ZodBoolean, params);
3788
6058
  }
6059
+ var ZodBigInt = /*@__PURE__*/ $constructor("ZodBigInt", (inst, def) => {
6060
+ $ZodBigInt.init(inst, def);
6061
+ ZodType.init(inst, def);
6062
+ inst._zod.processJSONSchema = (ctx, json, params) => bigintProcessor(inst, ctx, json, params);
6063
+ inst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
6064
+ inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
6065
+ inst.gt = (value, params) => inst.check(/* @__PURE__ */ _gt(value, params));
6066
+ inst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
6067
+ inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
6068
+ inst.lt = (value, params) => inst.check(/* @__PURE__ */ _lt(value, params));
6069
+ inst.lte = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
6070
+ inst.max = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
6071
+ inst.positive = (params) => inst.check(/* @__PURE__ */ _gt(BigInt(0), params));
6072
+ inst.negative = (params) => inst.check(/* @__PURE__ */ _lt(BigInt(0), params));
6073
+ inst.nonpositive = (params) => inst.check(/* @__PURE__ */ _lte(BigInt(0), params));
6074
+ inst.nonnegative = (params) => inst.check(/* @__PURE__ */ _gte(BigInt(0), params));
6075
+ inst.multipleOf = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));
6076
+ const bag = inst._zod.bag;
6077
+ inst.minValue = bag.minimum ?? null;
6078
+ inst.maxValue = bag.maximum ?? null;
6079
+ inst.format = bag.format ?? null;
6080
+ });
6081
+ function bigint(params) {
6082
+ return /* @__PURE__ */ _bigint(ZodBigInt, params);
6083
+ }
6084
+ var ZodBigIntFormat = /*@__PURE__*/ $constructor("ZodBigIntFormat", (inst, def) => {
6085
+ $ZodBigIntFormat.init(inst, def);
6086
+ ZodBigInt.init(inst, def);
6087
+ });
6088
+ function int64(params) {
6089
+ return /* @__PURE__ */ _int64(ZodBigIntFormat, params);
6090
+ }
6091
+ function uint64(params) {
6092
+ return /* @__PURE__ */ _uint64(ZodBigIntFormat, params);
6093
+ }
6094
+ var ZodSymbol = /*@__PURE__*/ $constructor("ZodSymbol", (inst, def) => {
6095
+ $ZodSymbol.init(inst, def);
6096
+ ZodType.init(inst, def);
6097
+ inst._zod.processJSONSchema = (ctx, json, params) => symbolProcessor(inst, ctx, json, params);
6098
+ });
6099
+ function symbol(params) {
6100
+ return /* @__PURE__ */ _symbol(ZodSymbol, params);
6101
+ }
6102
+ var ZodUndefined = /*@__PURE__*/ $constructor("ZodUndefined", (inst, def) => {
6103
+ $ZodUndefined.init(inst, def);
6104
+ ZodType.init(inst, def);
6105
+ inst._zod.processJSONSchema = (ctx, json, params) => undefinedProcessor(inst, ctx, json, params);
6106
+ });
6107
+ function _undefined(params) {
6108
+ return /* @__PURE__ */ _undefined$1(ZodUndefined, params);
6109
+ }
6110
+ var ZodNull = /*@__PURE__*/ $constructor("ZodNull", (inst, def) => {
6111
+ $ZodNull.init(inst, def);
6112
+ ZodType.init(inst, def);
6113
+ inst._zod.processJSONSchema = (ctx, json, params) => nullProcessor(inst, ctx, json, params);
6114
+ });
6115
+ function _null(params) {
6116
+ return /* @__PURE__ */ _null$1(ZodNull, params);
6117
+ }
6118
+ var ZodAny = /*@__PURE__*/ $constructor("ZodAny", (inst, def) => {
6119
+ $ZodAny.init(inst, def);
6120
+ ZodType.init(inst, def);
6121
+ inst._zod.processJSONSchema = (ctx, json, params) => void 0;
6122
+ });
6123
+ function any() {
6124
+ return /* @__PURE__ */ _any(ZodAny);
6125
+ }
3789
6126
  var ZodUnknown = /*@__PURE__*/ $constructor("ZodUnknown", (inst, def) => {
3790
6127
  $ZodUnknown.init(inst, def);
3791
6128
  ZodType.init(inst, def);
@@ -3802,6 +6139,27 @@ var ZodNever = /*@__PURE__*/ $constructor("ZodNever", (inst, def) => {
3802
6139
  function never(params) {
3803
6140
  return /* @__PURE__ */ _never(ZodNever, params);
3804
6141
  }
6142
+ var ZodVoid = /*@__PURE__*/ $constructor("ZodVoid", (inst, def) => {
6143
+ $ZodVoid.init(inst, def);
6144
+ ZodType.init(inst, def);
6145
+ inst._zod.processJSONSchema = (ctx, json, params) => voidProcessor(inst, ctx, json, params);
6146
+ });
6147
+ function _void(params) {
6148
+ return /* @__PURE__ */ _void$1(ZodVoid, params);
6149
+ }
6150
+ var ZodDate = /*@__PURE__*/ $constructor("ZodDate", (inst, def) => {
6151
+ $ZodDate.init(inst, def);
6152
+ ZodType.init(inst, def);
6153
+ inst._zod.processJSONSchema = (ctx, json, params) => dateProcessor(inst, ctx, json, params);
6154
+ inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
6155
+ inst.max = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
6156
+ const c = inst._zod.bag;
6157
+ inst.minDate = c.minimum ? new Date(c.minimum) : null;
6158
+ inst.maxDate = c.maximum ? new Date(c.maximum) : null;
6159
+ });
6160
+ function date(params) {
6161
+ return /* @__PURE__ */ _date(ZodDate, params);
6162
+ }
3805
6163
  var ZodArray = /*@__PURE__*/ $constructor("ZodArray", (inst, def) => {
3806
6164
  $ZodArray.init(inst, def);
3807
6165
  ZodType.init(inst, def);
@@ -3828,6 +6186,10 @@ var ZodArray = /*@__PURE__*/ $constructor("ZodArray", (inst, def) => {
3828
6186
  function array(element, params) {
3829
6187
  return /* @__PURE__ */ _array(ZodArray, element, params);
3830
6188
  }
6189
+ function keyof(schema) {
6190
+ const shape = schema._zod.def.shape;
6191
+ return _enum(Object.keys(shape));
6192
+ }
3831
6193
  var ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
3832
6194
  $ZodObjectJIT.init(inst, def);
3833
6195
  ZodType.init(inst, def);
@@ -3899,6 +6261,22 @@ function object(shape, params) {
3899
6261
  ...normalizeParams(params)
3900
6262
  });
3901
6263
  }
6264
+ function strictObject(shape, params) {
6265
+ return new ZodObject({
6266
+ type: "object",
6267
+ shape,
6268
+ catchall: never(),
6269
+ ...normalizeParams(params)
6270
+ });
6271
+ }
6272
+ function looseObject(shape, params) {
6273
+ return new ZodObject({
6274
+ type: "object",
6275
+ shape,
6276
+ catchall: unknown(),
6277
+ ...normalizeParams(params)
6278
+ });
6279
+ }
3902
6280
  var ZodUnion = /*@__PURE__*/ $constructor("ZodUnion", (inst, def) => {
3903
6281
  $ZodUnion.init(inst, def);
3904
6282
  ZodType.init(inst, def);
@@ -3912,6 +6290,35 @@ function union(options, params) {
3912
6290
  ...normalizeParams(params)
3913
6291
  });
3914
6292
  }
6293
+ var ZodXor = /*@__PURE__*/ $constructor("ZodXor", (inst, def) => {
6294
+ ZodUnion.init(inst, def);
6295
+ $ZodXor.init(inst, def);
6296
+ inst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);
6297
+ inst.options = def.options;
6298
+ });
6299
+ /** Creates an exclusive union (XOR) where exactly one option must match.
6300
+ * Unlike regular unions that succeed when any option matches, xor fails if
6301
+ * zero or more than one option matches the input. */
6302
+ function xor(options, params) {
6303
+ return new ZodXor({
6304
+ type: "union",
6305
+ options,
6306
+ inclusive: false,
6307
+ ...normalizeParams(params)
6308
+ });
6309
+ }
6310
+ var ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("ZodDiscriminatedUnion", (inst, def) => {
6311
+ ZodUnion.init(inst, def);
6312
+ $ZodDiscriminatedUnion.init(inst, def);
6313
+ });
6314
+ function discriminatedUnion(discriminator, options, params) {
6315
+ return new ZodDiscriminatedUnion({
6316
+ type: "union",
6317
+ options,
6318
+ discriminator,
6319
+ ...normalizeParams(params)
6320
+ });
6321
+ }
3915
6322
  var ZodIntersection = /*@__PURE__*/ $constructor("ZodIntersection", (inst, def) => {
3916
6323
  $ZodIntersection.init(inst, def);
3917
6324
  ZodType.init(inst, def);
@@ -3924,6 +6331,24 @@ function intersection(left, right) {
3924
6331
  right
3925
6332
  });
3926
6333
  }
6334
+ var ZodTuple = /*@__PURE__*/ $constructor("ZodTuple", (inst, def) => {
6335
+ $ZodTuple.init(inst, def);
6336
+ ZodType.init(inst, def);
6337
+ inst._zod.processJSONSchema = (ctx, json, params) => tupleProcessor(inst, ctx, json, params);
6338
+ inst.rest = (rest) => inst.clone({
6339
+ ...inst._zod.def,
6340
+ rest
6341
+ });
6342
+ });
6343
+ function tuple(items, _paramsOrRest, _params) {
6344
+ const hasRest = _paramsOrRest instanceof $ZodType;
6345
+ return new ZodTuple({
6346
+ type: "tuple",
6347
+ items,
6348
+ rest: hasRest ? _paramsOrRest : null,
6349
+ ...normalizeParams(hasRest ? _params : _paramsOrRest)
6350
+ });
6351
+ }
3927
6352
  var ZodRecord = /*@__PURE__*/ $constructor("ZodRecord", (inst, def) => {
3928
6353
  $ZodRecord.init(inst, def);
3929
6354
  ZodType.init(inst, def);
@@ -3945,6 +6370,60 @@ function record(keyType, valueType, params) {
3945
6370
  ...normalizeParams(params)
3946
6371
  });
3947
6372
  }
6373
+ function partialRecord(keyType, valueType, params) {
6374
+ const k = clone(keyType);
6375
+ k._zod.values = void 0;
6376
+ return new ZodRecord({
6377
+ type: "record",
6378
+ keyType: k,
6379
+ valueType,
6380
+ ...normalizeParams(params)
6381
+ });
6382
+ }
6383
+ function looseRecord(keyType, valueType, params) {
6384
+ return new ZodRecord({
6385
+ type: "record",
6386
+ keyType,
6387
+ valueType,
6388
+ mode: "loose",
6389
+ ...normalizeParams(params)
6390
+ });
6391
+ }
6392
+ var ZodMap = /*@__PURE__*/ $constructor("ZodMap", (inst, def) => {
6393
+ $ZodMap.init(inst, def);
6394
+ ZodType.init(inst, def);
6395
+ inst._zod.processJSONSchema = (ctx, json, params) => mapProcessor(inst, ctx, json, params);
6396
+ inst.keyType = def.keyType;
6397
+ inst.valueType = def.valueType;
6398
+ inst.min = (...args) => inst.check(/* @__PURE__ */ _minSize(...args));
6399
+ inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minSize(1, params));
6400
+ inst.max = (...args) => inst.check(/* @__PURE__ */ _maxSize(...args));
6401
+ inst.size = (...args) => inst.check(/* @__PURE__ */ _size(...args));
6402
+ });
6403
+ function map(keyType, valueType, params) {
6404
+ return new ZodMap({
6405
+ type: "map",
6406
+ keyType,
6407
+ valueType,
6408
+ ...normalizeParams(params)
6409
+ });
6410
+ }
6411
+ var ZodSet = /*@__PURE__*/ $constructor("ZodSet", (inst, def) => {
6412
+ $ZodSet.init(inst, def);
6413
+ ZodType.init(inst, def);
6414
+ inst._zod.processJSONSchema = (ctx, json, params) => setProcessor(inst, ctx, json, params);
6415
+ inst.min = (...args) => inst.check(/* @__PURE__ */ _minSize(...args));
6416
+ inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minSize(1, params));
6417
+ inst.max = (...args) => inst.check(/* @__PURE__ */ _maxSize(...args));
6418
+ inst.size = (...args) => inst.check(/* @__PURE__ */ _size(...args));
6419
+ });
6420
+ function set(valueType, params) {
6421
+ return new ZodSet({
6422
+ type: "set",
6423
+ valueType,
6424
+ ...normalizeParams(params)
6425
+ });
6426
+ }
3948
6427
  var ZodEnum = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
3949
6428
  $ZodEnum.init(inst, def);
3950
6429
  ZodType.init(inst, def);
@@ -3982,6 +6461,48 @@ function _enum(values, params) {
3982
6461
  ...normalizeParams(params)
3983
6462
  });
3984
6463
  }
6464
+ /** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
6465
+ *
6466
+ * ```ts
6467
+ * enum Colors { red, green, blue }
6468
+ * z.enum(Colors);
6469
+ * ```
6470
+ */
6471
+ function nativeEnum(entries, params) {
6472
+ return new ZodEnum({
6473
+ type: "enum",
6474
+ entries,
6475
+ ...normalizeParams(params)
6476
+ });
6477
+ }
6478
+ var ZodLiteral = /*@__PURE__*/ $constructor("ZodLiteral", (inst, def) => {
6479
+ $ZodLiteral.init(inst, def);
6480
+ ZodType.init(inst, def);
6481
+ inst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);
6482
+ inst.values = new Set(def.values);
6483
+ Object.defineProperty(inst, "value", { get() {
6484
+ if (def.values.length > 1) throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
6485
+ return def.values[0];
6486
+ } });
6487
+ });
6488
+ function literal(value, params) {
6489
+ return new ZodLiteral({
6490
+ type: "literal",
6491
+ values: Array.isArray(value) ? value : [value],
6492
+ ...normalizeParams(params)
6493
+ });
6494
+ }
6495
+ var ZodFile = /*@__PURE__*/ $constructor("ZodFile", (inst, def) => {
6496
+ $ZodFile.init(inst, def);
6497
+ ZodType.init(inst, def);
6498
+ inst._zod.processJSONSchema = (ctx, json, params) => fileProcessor(inst, ctx, json, params);
6499
+ inst.min = (size, params) => inst.check(/* @__PURE__ */ _minSize(size, params));
6500
+ inst.max = (size, params) => inst.check(/* @__PURE__ */ _maxSize(size, params));
6501
+ inst.mime = (types, params) => inst.check(/* @__PURE__ */ _mime(Array.isArray(types) ? types : [types], params));
6502
+ });
6503
+ function file(params) {
6504
+ return /* @__PURE__ */ _file(ZodFile, params);
6505
+ }
3985
6506
  var ZodTransform = /*@__PURE__*/ $constructor("ZodTransform", (inst, def) => {
3986
6507
  $ZodTransform.init(inst, def);
3987
6508
  ZodType.init(inst, def);
@@ -4052,6 +6573,9 @@ function nullable(innerType) {
4052
6573
  innerType
4053
6574
  });
4054
6575
  }
6576
+ function nullish(innerType) {
6577
+ return optional(nullable(innerType));
6578
+ }
4055
6579
  var ZodDefault = /*@__PURE__*/ $constructor("ZodDefault", (inst, def) => {
4056
6580
  $ZodDefault.init(inst, def);
4057
6581
  ZodType.init(inst, def);
@@ -4096,6 +6620,18 @@ function nonoptional(innerType, params) {
4096
6620
  ...normalizeParams(params)
4097
6621
  });
4098
6622
  }
6623
+ var ZodSuccess = /*@__PURE__*/ $constructor("ZodSuccess", (inst, def) => {
6624
+ $ZodSuccess.init(inst, def);
6625
+ ZodType.init(inst, def);
6626
+ inst._zod.processJSONSchema = (ctx, json, params) => successProcessor(inst, ctx, json, params);
6627
+ inst.unwrap = () => inst._zod.def.innerType;
6628
+ });
6629
+ function success(innerType) {
6630
+ return new ZodSuccess({
6631
+ type: "success",
6632
+ innerType
6633
+ });
6634
+ }
4099
6635
  var ZodCatch = /*@__PURE__*/ $constructor("ZodCatch", (inst, def) => {
4100
6636
  $ZodCatch.init(inst, def);
4101
6637
  ZodType.init(inst, def);
@@ -4110,6 +6646,14 @@ function _catch(innerType, catchValue) {
4110
6646
  catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
4111
6647
  });
4112
6648
  }
6649
+ var ZodNaN = /*@__PURE__*/ $constructor("ZodNaN", (inst, def) => {
6650
+ $ZodNaN.init(inst, def);
6651
+ ZodType.init(inst, def);
6652
+ inst._zod.processJSONSchema = (ctx, json, params) => nanProcessor(inst, ctx, json, params);
6653
+ });
6654
+ function nan(params) {
6655
+ return /* @__PURE__ */ _nan(ZodNaN, params);
6656
+ }
4113
6657
  var ZodPipe = /*@__PURE__*/ $constructor("ZodPipe", (inst, def) => {
4114
6658
  $ZodPipe.init(inst, def);
4115
6659
  ZodType.init(inst, def);
@@ -4124,6 +6668,33 @@ function pipe(in_, out) {
4124
6668
  out
4125
6669
  });
4126
6670
  }
6671
+ var ZodCodec = /*@__PURE__*/ $constructor("ZodCodec", (inst, def) => {
6672
+ ZodPipe.init(inst, def);
6673
+ $ZodCodec.init(inst, def);
6674
+ });
6675
+ function codec(in_, out, params) {
6676
+ return new ZodCodec({
6677
+ type: "pipe",
6678
+ in: in_,
6679
+ out,
6680
+ transform: params.decode,
6681
+ reverseTransform: params.encode
6682
+ });
6683
+ }
6684
+ function invertCodec(codec) {
6685
+ const def = codec._zod.def;
6686
+ return new ZodCodec({
6687
+ type: "pipe",
6688
+ in: def.out,
6689
+ out: def.in,
6690
+ transform: def.reverseTransform,
6691
+ reverseTransform: def.transform
6692
+ });
6693
+ }
6694
+ var ZodPreprocess = /*@__PURE__*/ $constructor("ZodPreprocess", (inst, def) => {
6695
+ ZodPipe.init(inst, def);
6696
+ $ZodPreprocess.init(inst, def);
6697
+ });
4127
6698
  var ZodReadonly = /*@__PURE__*/ $constructor("ZodReadonly", (inst, def) => {
4128
6699
  $ZodReadonly.init(inst, def);
4129
6700
  ZodType.init(inst, def);
@@ -4136,18 +6707,121 @@ function readonly(innerType) {
4136
6707
  innerType
4137
6708
  });
4138
6709
  }
6710
+ var ZodTemplateLiteral = /*@__PURE__*/ $constructor("ZodTemplateLiteral", (inst, def) => {
6711
+ $ZodTemplateLiteral.init(inst, def);
6712
+ ZodType.init(inst, def);
6713
+ inst._zod.processJSONSchema = (ctx, json, params) => templateLiteralProcessor(inst, ctx, json, params);
6714
+ });
6715
+ function templateLiteral(parts, params) {
6716
+ return new ZodTemplateLiteral({
6717
+ type: "template_literal",
6718
+ parts,
6719
+ ...normalizeParams(params)
6720
+ });
6721
+ }
6722
+ var ZodLazy = /*@__PURE__*/ $constructor("ZodLazy", (inst, def) => {
6723
+ $ZodLazy.init(inst, def);
6724
+ ZodType.init(inst, def);
6725
+ inst._zod.processJSONSchema = (ctx, json, params) => lazyProcessor(inst, ctx, json, params);
6726
+ inst.unwrap = () => inst._zod.def.getter();
6727
+ });
6728
+ function lazy(getter) {
6729
+ return new ZodLazy({
6730
+ type: "lazy",
6731
+ getter
6732
+ });
6733
+ }
6734
+ var ZodPromise = /*@__PURE__*/ $constructor("ZodPromise", (inst, def) => {
6735
+ $ZodPromise.init(inst, def);
6736
+ ZodType.init(inst, def);
6737
+ inst._zod.processJSONSchema = (ctx, json, params) => promiseProcessor(inst, ctx, json, params);
6738
+ inst.unwrap = () => inst._zod.def.innerType;
6739
+ });
6740
+ function promise(innerType) {
6741
+ return new ZodPromise({
6742
+ type: "promise",
6743
+ innerType
6744
+ });
6745
+ }
6746
+ var ZodFunction = /*@__PURE__*/ $constructor("ZodFunction", (inst, def) => {
6747
+ $ZodFunction.init(inst, def);
6748
+ ZodType.init(inst, def);
6749
+ inst._zod.processJSONSchema = (ctx, json, params) => functionProcessor(inst, ctx, json, params);
6750
+ });
6751
+ function _function(params) {
6752
+ return new ZodFunction({
6753
+ type: "function",
6754
+ input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array(unknown()),
6755
+ output: params?.output ?? unknown()
6756
+ });
6757
+ }
4139
6758
  var ZodCustom = /*@__PURE__*/ $constructor("ZodCustom", (inst, def) => {
4140
6759
  $ZodCustom.init(inst, def);
4141
6760
  ZodType.init(inst, def);
4142
6761
  inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
4143
6762
  });
6763
+ function check(fn) {
6764
+ const ch = new $ZodCheck({ check: "custom" });
6765
+ ch._zod.check = fn;
6766
+ return ch;
6767
+ }
6768
+ function custom(fn, _params) {
6769
+ return /* @__PURE__ */ _custom(ZodCustom, fn ?? (() => true), _params);
6770
+ }
4144
6771
  function refine(fn, _params = {}) {
4145
6772
  return /* @__PURE__ */ _refine(ZodCustom, fn, _params);
4146
6773
  }
4147
6774
  function superRefine(fn, params) {
4148
6775
  return /* @__PURE__ */ _superRefine(fn, params);
4149
6776
  }
6777
+ var describe = describe$1;
6778
+ var meta = meta$1;
6779
+ function _instanceof(cls, params = {}) {
6780
+ const inst = new ZodCustom({
6781
+ type: "custom",
6782
+ check: "custom",
6783
+ fn: (data) => data instanceof cls,
6784
+ abort: true,
6785
+ ...normalizeParams(params)
6786
+ });
6787
+ inst._zod.bag.Class = cls;
6788
+ inst._zod.check = (payload) => {
6789
+ if (!(payload.value instanceof cls)) payload.issues.push({
6790
+ code: "invalid_type",
6791
+ expected: cls.name,
6792
+ input: payload.value,
6793
+ inst,
6794
+ path: [...inst._zod.def.path ?? []]
6795
+ });
6796
+ };
6797
+ return inst;
6798
+ }
6799
+ var stringbool = (...args) => /* @__PURE__ */ _stringbool({
6800
+ Codec: ZodCodec,
6801
+ Boolean: ZodBoolean,
6802
+ String: ZodString
6803
+ }, ...args);
6804
+ function json(params) {
6805
+ const jsonSchema = lazy(() => {
6806
+ return union([
6807
+ string(params),
6808
+ number(),
6809
+ boolean(),
6810
+ _null(),
6811
+ array(jsonSchema),
6812
+ record(string(), jsonSchema)
6813
+ ]);
6814
+ });
6815
+ return jsonSchema;
6816
+ }
6817
+ function preprocess(fn, schema) {
6818
+ return new ZodPreprocess({
6819
+ type: "pipe",
6820
+ in: transform(fn),
6821
+ out: schema
6822
+ });
6823
+ }
4150
6824
  //#endregion
4151
- export { record as a, _coercedNumber as c, object as i, _enum as n, string as o, boolean as r, unknown as s, ZodNumber as t };
6825
+ export { ZodString as $, $ZodCUID as $a, _positive as $i, uuid as $n, $ZodTuple as $o, _discriminatedUnion as $r, encodeAsync$1 as $s, int as $t, ZodJWT as A, _uuid as Aa, _mac as Ai, preprocess as An, $ZodNanoID as Ao, initializeContext as Ar, $ZodCheckOverwrite as As, boolean as At, ZodNull as B, $input as Ba, _nativeEnum as Bi, stringbool as Bn, $ZodPipe as Bo, _check as Br, _encode as Bs, discriminatedUnion as Bt, ZodExactOptional as C, _uint64 as Ca, $constructor as Cc, _ksuid as Ci, nullish as Cn, $ZodJWT as Co, iso_exports as Cr, $ZodCheckMaxLength as Cs, _undefined as Ct, ZodIPv4 as D, _unknown as Da, _lowercase as Di, partialRecord as Dn, $ZodMAC as Do, createToJSONSchemaMethod as Dr, $ZodCheckMinSize as Ds, base64 as Dt, ZodGUID as E, _union as Ea, globalConfig as Ec, _literal as Ei, optional as En, $ZodLiteral as Eo, createStandardJSONSchemaMethod as Er, $ZodCheckMinLength as Es, array as Et, ZodMap as F, _xid as Fa, _minLength as Fi, schemas_exports as Fn, $ZodNumber as Fo, _base64 as Fr, $ZodCheckStringFormat as Fs, cuid as Ft, ZodOptional as G, $ZodArray as Ga, _nonpositive as Gi, transform as Gn, $ZodRecord as Go, _coercedDate as Gr, _safeDecodeAsync as Gs, file as Gt, ZodNumber as H, globalRegistry as Ha, _never as Hi, superRefine as Hn, $ZodPreprocess as Ho, _cidrv6 as Hr, _parse as Hs, email as Ht, ZodNaN as I, _xor as Ia, _minSize as Ii, set as In, $ZodNumberFormat as Io, _base64url as Ir, $ZodCheckUpperCase as Is, cuid2 as It, ZodPreprocess as J, $ZodBigInt as Ja, _nullable as Ji, uint64 as Jn, $ZodStringFormat as Jo, _cuid as Jr, _safeParse as Js, guid as Jt, ZodPipe as K, $ZodBase64 as Ka, _normalize as Ki, tuple as Kn, $ZodSet as Ko, _coercedNumber as Kr, _safeEncode as Ks, float32 as Kt, ZodNanoID as L, describe$1 as La, _multipleOf as Li, strictObject as Ln, $ZodObject as Lo, _bigint as Lr, regexes_exports as Ls, custom as Lt, ZodLazy as M, _uuidv6 as Ma, _maxLength as Mi, readonly as Mn, $ZodNonOptional as Mo, TimePrecision as Mr, $ZodCheckRegex as Ms, cidrv4 as Mt, ZodLiteral as N, _uuidv7 as Na, _maxSize as Ni, record as Nn, $ZodNull as No, _any as Nr, $ZodCheckSizeEquals as Ns, cidrv6 as Nt, ZodIPv6 as O, _uppercase as Oa, _lt as Oi, pipe as On, $ZodMap as Oo, extractDefs as Or, $ZodCheckMultipleOf as Os, base64url as Ot, ZodMAC as P, _void$1 as Pa, _mime as Pi, refine as Pn, $ZodNullable as Po, _array as Pr, $ZodCheckStartsWith as Ps, codec as Pt, ZodSet as Q, $ZodCIDRv6 as Qa, _pipe as Qi, url as Qn, $ZodTransform as Qo, _default$1 as Qr, encode$1 as Qs, httpUrl as Qt, ZodNever as R, meta$1 as Ra, _nan as Ri, string as Rn, $ZodObjectJIT as Ro, _boolean as Rr, _decode as Rs, date as Rt, ZodEnum as S, _uint32 as Sa, $brand as Sc, _jwt as Si, nullable as Sn, $ZodIntersection as So, ZodISOTime as Sr, $ZodCheckLowerCase as Ss, _null as St, ZodFunction as T, _undefined$1 as Ta, config as Tc, _length as Ti, object as Tn, $ZodLazy as To, toJSONSchema as Tr, $ZodCheckMimeType as Ts, any as Tt, ZodNumberFormat as U, registry as Ua, _nonnegative as Ui, symbol as Un, $ZodPromise as Uo, _coercedBigint as Ur, _parseAsync as Us, emoji as Ut, ZodNullable as V, $output as Va, _negative as Vi, success as Vn, $ZodPrefault as Vo, _cidrv4 as Vr, _encodeAsync as Vs, e164 as Vt, ZodObject as W, $ZodAny as Wa, _nonoptional as Wi, templateLiteral as Wn, $ZodReadonly as Wo, _coercedBoolean as Wr, _safeDecode as Ws, exactOptional as Wt, ZodReadonly as X, $ZodBoolean as Xa, _optional as Xi, union as Xn, $ZodSymbol as Xo, _custom as Xr, decode$1 as Xs, hex as Xt, ZodPromise as Y, $ZodBigIntFormat as Ya, _number as Yi, ulid as Yn, $ZodSuccess as Yo, _cuid2 as Yr, _safeParseAsync as Ys, hash as Yt, ZodRecord as Z, $ZodCIDRv4 as Za, _overwrite as Zi, unknown as Zn, $ZodTemplateLiteral as Zo, _date as Zr, decodeAsync$1 as Zs, hostname as Zt, ZodDefault as _, _toLowerCase as _a, parsedType as _c, _ipv6 as _i, nan as _n, $ZodIPv6 as _o, ZodError as _r, $ZodCheckEndsWith as _s, _catch as _t, ZodBigInt as a, _regex as aa, safeEncodeAsync$1 as ac, _file as ai, ipv6 as an, $ZodDate as ao, decode as ar, $ZodUnion as as, ZodTuple as at, ZodEmail as b, _trim as ba, $ZodAsyncError as bc, _isoDuration as bi, never as bn, $ZodISODuration as bo, ZodISODateTime as br, $ZodCheckLengthEquals as bs, _function as bt, ZodCIDRv4 as c, _slugify as ca, $ZodError as cc, _gt as ci, keyof as cn, $ZodE164 as co, encodeAsync as cr, $ZodXID as cs, ZodURL as ct, ZodCUID2 as d, _stringFormat as da, formatError as dc, _includes as di, literal as dn, $ZodEnum as do, safeDecode as dr, isValidBase64URL as ds, ZodUnion as dt, _promise as ea, parse$1 as ec, _e164 as ei, int32 as en, $ZodCUID2 as eo, uuidv4 as er, $ZodType as es, ZodStringFormat as et, ZodCatch as f, _stringbool as fa, prettifyError as fc, _int as fi, looseObject as fn, $ZodExactOptional as fo, safeDecodeAsync as fr, isValidJWT as fs, ZodUnknown as ft, ZodDate as g, _templateLiteral as ga, joinValues as gc, _ipv4 as gi, meta as gn, $ZodIPv4 as go, safeParseAsync as gr, $ZodCheckBigIntFormat as gs, _ZodString as gt, ZodCustomStringFormat as h, _symbol as ha, clone as hc, _intersection as hi, map as hn, $ZodGUID as ho, safeParse as hr, $ZodCheck as hs, ZodXor as ht, ZodBase64URL as i, _refine as ia, safeEncode$1 as ic, _enum$1 as ii, ipv4 as in, $ZodCustomStringFormat as io, xor as ir, $ZodUndefined as is, ZodTransform as it, ZodKSUID as j, _uuidv4 as ja, _map as ji, promise as jn, $ZodNever as jo, process as jr, $ZodCheckProperty as js, check as jt, ZodIntersection as k, _url as ka, _lte as ki, prefault as kn, $ZodNaN as ko, finalize as kr, $ZodCheckNumberFormat as ks, bigint as kt, ZodCIDRv6 as l, _startsWith as la, $ZodRealError as lc, _gte as li, ksuid as ln, $ZodEmail as lo, parse as lr, $ZodXor as ls, ZodUUID as lt, ZodCustom as m, _superRefine as ma, treeifyError as mc, _int64 as mi, mac as mn, $ZodFunction as mo, safeEncodeAsync as mr, Doc as ms, ZodXID as mt, ZodArray as n, _readonly as na, safeDecode$1 as nc, _emoji as ni, intersection as nn, $ZodCodec as no, uuidv7 as nr, $ZodURL as ns, ZodSymbol as nt, ZodBigIntFormat as o, _set as oa, safeParse$1 as oc, _float32 as oi, json as on, $ZodDefault as oo, decodeAsync as or, $ZodUnknown as os, ZodType as ot, ZodCodec as p, _success as pa, toDotPath as pc, _int32 as pi, looseRecord as pn, $ZodFile as po, safeEncode as pr, version as ps, ZodVoid as pt, ZodPrefault as q, $ZodBase64URL as qa, _null$1 as qi, uint32 as qn, $ZodString as qo, _coercedString as qr, _safeEncodeAsync as qs, float64 as qt, ZodBase64 as r, _record as ra, safeDecodeAsync$1 as rc, _endsWith as ri, invertCodec as rn, $ZodCustom as ro, xid as rr, $ZodUUID as rs, ZodTemplateLiteral as rt, ZodBoolean as s, _size as sa, safeParseAsync$1 as sc, _float64 as si, jwt as sn, $ZodDiscriminatedUnion as so, encode as sr, $ZodVoid as ss, ZodULID as st, ZodAny as t, _property as ta, parseAsync$1 as tc, _email as ti, int64 as tn, $ZodCatch as to, uuidv6 as tr, $ZodULID as ts, ZodSuccess as tt, ZodCUID as u, _string as ua, flattenError as uc, _guid as ui, lazy as un, $ZodEmoji as uo, parseAsync as ur, isValidBase64 as us, ZodUndefined as ut, ZodDiscriminatedUnion as v, _toUpperCase as va, stringifyPrimitive as vc, _isoDate as vi, nanoid as vn, $ZodISODate as vo, ZodRealError as vr, $ZodCheckGreaterThan as vs, _default as vt, ZodFile as w, _ulid as wa, NEVER as wc, _lazy as wi, number as wn, $ZodKSUID as wo, allProcessors as wr, $ZodCheckMaxSize as ws, _void as wt, ZodEmoji as x, _tuple as xa, $ZodEncodeError as xc, _isoTime as xi, nonoptional as xn, $ZodISOTime as xo, ZodISODuration as xr, $ZodCheckLessThan as xs, _instanceof as xt, ZodE164 as y, _transform as ya, util_exports as yc, _isoDateTime as yi, nativeEnum as yn, $ZodISODateTime as yo, ZodISODate as yr, $ZodCheckIncludes as ys, _enum as yt, ZodNonOptional as z, $ZodRegistry as za, _nanoid as zi, stringFormat as zn, $ZodOptional as zo, _catch$1 as zr, _decodeAsync as zs, describe as zt };
4152
6826
 
4153
- //# sourceMappingURL=schemas-DBxgjM9A.js.map
6827
+ //# sourceMappingURL=schemas-C3234HWE.js.map